const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/javascript-DSjyp_zn.js","assets/typescript-CQXWgW2t.js"])))=>i.map(i=>d[i]);
var Orn=Object.defineProperty;var jrn=(t,e,n)=>e in t?Orn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var HX=(t,e,n)=>jrn(t,typeof e!="symbol"?e+"":e,n);function Z0t(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const o=Object.getOwnPropertyDescriptor(i,r);o&&Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();var Bl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ao(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Q0t={exports:{}},gNe={},J0t={exports:{}},Zte={exports:{}};Zte.exports;(function(t,e){/**
 * @license React
 * react.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n="18.3.1",i=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g=Symbol.iterator,y="@@iterator";function _(Ae){if(Ae===null||typeof Ae!="object")return null;var pt=g&&Ae[g]||Ae[y];return typeof pt=="function"?pt:null}var w={current:null},C={transition:null},N={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},E={current:null},D={},k=null;function M(Ae){k=Ae}D.setExtraStackFrame=function(Ae){k=Ae},D.getCurrentStack=null,D.getStackAddendum=function(){var Ae="";k&&(Ae+=k);var pt=D.getCurrentStack;return pt&&(Ae+=pt()||""),Ae};var T=!1,A=!1,R=!1,P=!1,O=!1,V={ReactCurrentDispatcher:w,ReactCurrentBatchConfig:C,ReactCurrentOwner:E};V.ReactDebugCurrentFrame=D,V.ReactCurrentActQueue=N;function F(Ae){{for(var pt=arguments.length,tn=new Array(pt>1?pt-1:0),pn=1;pn<pt;pn++)tn[pn-1]=arguments[pn];B("warn",Ae,tn)}}function $(Ae){{for(var pt=arguments.length,tn=new Array(pt>1?pt-1:0),pn=1;pn<pt;pn++)tn[pn-1]=arguments[pn];B("error",Ae,tn)}}function B(Ae,pt,tn){{var pn=V.ReactDebugCurrentFrame,ni=pn.getStackAddendum();ni!==""&&(pt+="%s",tn=tn.concat([ni]));var Br=tn.map(function(Ji){return String(Ji)});Br.unshift("Warning: "+pt),Function.prototype.apply.call(console[Ae],console,Br)}}var z={};function H(Ae,pt){{var tn=Ae.constructor,pn=tn&&(tn.displayName||tn.name)||"ReactClass",ni=pn+"."+pt;if(z[ni])return;$("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",pt,pn),z[ni]=!0}}var K={isMounted:function(Ae){return!1},enqueueForceUpdate:function(Ae,pt,tn){H(Ae,"forceUpdate")},enqueueReplaceState:function(Ae,pt,tn,pn){H(Ae,"replaceState")},enqueueSetState:function(Ae,pt,tn,pn){H(Ae,"setState")}},q=Object.assign,U={};Object.freeze(U);function Y(Ae,pt,tn){this.props=Ae,this.context=pt,this.refs=U,this.updater=tn||K}Y.prototype.isReactComponent={},Y.prototype.setState=function(Ae,pt){if(typeof Ae!="object"&&typeof Ae!="function"&&Ae!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,Ae,pt,"setState")},Y.prototype.forceUpdate=function(Ae){this.updater.enqueueForceUpdate(this,Ae,"forceUpdate")};{var J={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},ae=function(Ae,pt){Object.defineProperty(Y.prototype,Ae,{get:function(){F("%s(...) is deprecated in plain JavaScript React classes. %s",pt[0],pt[1])}})};for(var se in J)J.hasOwnProperty(se)&&ae(se,J[se])}function oe(){}oe.prototype=Y.prototype;function fe(Ae,pt,tn){this.props=Ae,this.context=pt,this.refs=U,this.updater=tn||K}var de=fe.prototype=new oe;de.constructor=fe,q(de,Y.prototype),de.isPureReactComponent=!0;function ie(){var Ae={current:null};return Object.seal(Ae),Ae}var Q=Array.isArray;function be(Ae){return Q(Ae)}function le(Ae){{var pt=typeof Symbol=="function"&&Symbol.toStringTag,tn=pt&&Ae[Symbol.toStringTag]||Ae.constructor.name||"Object";return tn}}function Ne(Ae){try{return Le(Ae),!1}catch{return!0}}function Le(Ae){return""+Ae}function Te(Ae){if(Ne(Ae))return $("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",le(Ae)),Le(Ae)}function De(Ae,pt,tn){var pn=Ae.displayName;if(pn)return pn;var ni=pt.displayName||pt.name||"";return ni!==""?tn+"("+ni+")":tn}function Pe(Ae){return Ae.displayName||"Context"}function ge(Ae){if(Ae==null)return null;if(typeof Ae.tag=="number"&&$("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof Ae=="function")return Ae.displayName||Ae.name||null;if(typeof Ae=="string")return Ae;switch(Ae){case o:return"Fragment";case r:return"Portal";case a:return"Profiler";case s:return"StrictMode";case d:return"Suspense";case h:return"SuspenseList"}if(typeof Ae=="object")switch(Ae.$$typeof){case c:var pt=Ae;return Pe(pt)+".Consumer";case l:var tn=Ae;return Pe(tn._context)+".Provider";case u:return De(Ae,Ae.render,"ForwardRef");case f:var pn=Ae.displayName||null;return pn!==null?pn:ge(Ae.type)||"Memo";case m:{var ni=Ae,Br=ni._payload,Ji=ni._init;try{return ge(Ji(Br))}catch{return null}}}return null}var he=Object.prototype.hasOwnProperty,me={key:!0,ref:!0,__self:!0,__source:!0},X,re,we;we={};function ue(Ae){if(he.call(Ae,"ref")){var pt=Object.getOwnPropertyDescriptor(Ae,"ref").get;if(pt&&pt.isReactWarning)return!1}return Ae.ref!==void 0}function Ce(Ae){if(he.call(Ae,"key")){var pt=Object.getOwnPropertyDescriptor(Ae,"key").get;if(pt&&pt.isReactWarning)return!1}return Ae.key!==void 0}function ze(Ae,pt){var tn=function(){X||(X=!0,$("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",pt))};tn.isReactWarning=!0,Object.defineProperty(Ae,"key",{get:tn,configurable:!0})}function Ye(Ae,pt){var tn=function(){re||(re=!0,$("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",pt))};tn.isReactWarning=!0,Object.defineProperty(Ae,"ref",{get:tn,configurable:!0})}function Ke(Ae){if(typeof Ae.ref=="string"&&E.current&&Ae.__self&&E.current.stateNode!==Ae.__self){var pt=ge(E.current.type);we[pt]||($('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',pt,Ae.ref),we[pt]=!0)}}var Xe=function(Ae,pt,tn,pn,ni,Br,Ji){var eo={$$typeof:i,type:Ae,key:pt,ref:tn,props:Ji,_owner:Br};return eo._store={},Object.defineProperty(eo._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(eo,"_self",{configurable:!1,enumerable:!1,writable:!1,value:pn}),Object.defineProperty(eo,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ni}),Object.freeze&&(Object.freeze(eo.props),Object.freeze(eo)),eo};function it(Ae,pt,tn){var pn,ni={},Br=null,Ji=null,eo=null,ns=null;if(pt!=null){ue(pt)&&(Ji=pt.ref,Ke(pt)),Ce(pt)&&(Te(pt.key),Br=""+pt.key),eo=pt.__self===void 0?null:pt.__self,ns=pt.__source===void 0?null:pt.__source;for(pn in pt)he.call(pt,pn)&&!me.hasOwnProperty(pn)&&(ni[pn]=pt[pn])}var ba=arguments.length-2;if(ba===1)ni.children=tn;else if(ba>1){for(var il=Array(ba),rl=0;rl<ba;rl++)il[rl]=arguments[rl+2];Object.freeze&&Object.freeze(il),ni.children=il}if(Ae&&Ae.defaultProps){var Rl=Ae.defaultProps;for(pn in Rl)ni[pn]===void 0&&(ni[pn]=Rl[pn])}if(Br||Ji){var _c=typeof Ae=="function"?Ae.displayName||Ae.name||"Unknown":Ae;Br&&ze(ni,_c),Ji&&Ye(ni,_c)}return Xe(Ae,Br,Ji,eo,ns,E.current,ni)}function ut(Ae,pt){var tn=Xe(Ae.type,pt,Ae.ref,Ae._self,Ae._source,Ae._owner,Ae.props);return tn}function Ge(Ae,pt,tn){if(Ae==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+Ae+".");var pn,ni=q({},Ae.props),Br=Ae.key,Ji=Ae.ref,eo=Ae._self,ns=Ae._source,ba=Ae._owner;if(pt!=null){ue(pt)&&(Ji=pt.ref,ba=E.current),Ce(pt)&&(Te(pt.key),Br=""+pt.key);var il;Ae.type&&Ae.type.defaultProps&&(il=Ae.type.defaultProps);for(pn in pt)he.call(pt,pn)&&!me.hasOwnProperty(pn)&&(pt[pn]===void 0&&il!==void 0?ni[pn]=il[pn]:ni[pn]=pt[pn])}var rl=arguments.length-2;if(rl===1)ni.children=tn;else if(rl>1){for(var Rl=Array(rl),_c=0;_c<rl;_c++)Rl[_c]=arguments[_c+2];ni.children=Rl}return Xe(Ae.type,Br,Ji,eo,ns,ba,ni)}function Ee(Ae){return typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===i}var Se=".",je=":";function nt(Ae){var pt=/[=:]/g,tn={"=":"=0",":":"=2"},pn=Ae.replace(pt,function(ni){return tn[ni]});return"$"+pn}var rt=!1,St=/\/+/g;function At(Ae){return Ae.replace(St,"$&/")}function Nt(Ae,pt){return typeof Ae=="object"&&Ae!==null&&Ae.key!=null?(Te(Ae.key),nt(""+Ae.key)):pt.toString(36)}function vt(Ae,pt,tn,pn,ni){var Br=typeof Ae;(Br==="undefined"||Br==="boolean")&&(Ae=null);var Ji=!1;if(Ae===null)Ji=!0;else switch(Br){case"string":case"number":Ji=!0;break;case"object":switch(Ae.$$typeof){case i:case r:Ji=!0}}if(Ji){var eo=Ae,ns=ni(eo),ba=pn===""?Se+Nt(eo,0):pn;if(be(ns)){var il="";ba!=null&&(il=At(ba)+"/"),vt(ns,pt,il,"",function(Wge){return Wge})}else ns!=null&&(Ee(ns)&&(ns.key&&(!eo||eo.key!==ns.key)&&Te(ns.key),ns=ut(ns,tn+(ns.key&&(!eo||eo.key!==ns.key)?At(""+ns.key)+"/":"")+ba)),pt.push(ns));return 1}var rl,Rl,_c=0,Ws=pn===""?Se:pn+je;if(be(Ae))for(var rN=0;rN<Ae.length;rN++)rl=Ae[rN],Rl=Ws+Nt(rl,rN),_c+=vt(rl,pt,tn,Rl,ni);else{var kR=_(Ae);if(typeof kR=="function"){var A$=Ae;kR===A$.entries&&(rt||F("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),rt=!0);for(var Hge=kR.call(A$),Ww,R$=0;!(Ww=Hge.next()).done;)rl=Ww.value,Rl=Ws+Nt(rl,R$++),_c+=vt(rl,pt,tn,Rl,ni)}else if(Br==="object"){var P$=String(Ae);throw new Error("Objects are not valid as a React child (found: "+(P$==="[object Object]"?"object with keys {"+Object.keys(Ae).join(", ")+"}":P$)+"). If you meant to render a collection of children, use an array instead.")}}return _c}function $t(Ae,pt,tn){if(Ae==null)return Ae;var pn=[],ni=0;return vt(Ae,pn,"","",function(Br){return pt.call(tn,Br,ni++)}),pn}function ln(Ae){var pt=0;return $t(Ae,function(){pt++}),pt}function Jt(Ae,pt,tn){$t(Ae,function(){pt.apply(this,arguments)},tn)}function en(Ae){return $t(Ae,function(pt){return pt})||[]}function Ft(Ae){if(!Ee(Ae))throw new Error("React.Children.only expected to receive a single React element child.");return Ae}function dn(Ae){var pt={$$typeof:c,_currentValue:Ae,_currentValue2:Ae,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};pt.Provider={$$typeof:l,_context:pt};var tn=!1,pn=!1,ni=!1;{var Br={$$typeof:c,_context:pt};Object.defineProperties(Br,{Provider:{get:function(){return pn||(pn=!0,$("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),pt.Provider},set:function(Ji){pt.Provider=Ji}},_currentValue:{get:function(){return pt._currentValue},set:function(Ji){pt._currentValue=Ji}},_currentValue2:{get:function(){return pt._currentValue2},set:function(Ji){pt._currentValue2=Ji}},_threadCount:{get:function(){return pt._threadCount},set:function(Ji){pt._threadCount=Ji}},Consumer:{get:function(){return tn||(tn=!0,$("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),pt.Consumer}},displayName:{get:function(){return pt.displayName},set:function(Ji){ni||(F("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",Ji),ni=!0)}}}),pt.Consumer=Br}return pt._currentRenderer=null,pt._currentRenderer2=null,pt}var Ze=-1,dt=0,at=1,mt=2;function It(Ae){if(Ae._status===Ze){var pt=Ae._result,tn=pt();if(tn.then(function(Br){if(Ae._status===dt||Ae._status===Ze){var Ji=Ae;Ji._status=at,Ji._result=Br}},function(Br){if(Ae._status===dt||Ae._status===Ze){var Ji=Ae;Ji._status=mt,Ji._result=Br}}),Ae._status===Ze){var pn=Ae;pn._status=dt,pn._result=tn}}if(Ae._status===at){var ni=Ae._result;return ni===void 0&&$(`lazy: Expected the result of a dynamic import() call. Instead received: %s

Your code should look like: 
  const MyComponent = lazy(() => import('./MyComponent'))

Did you accidentally put curly braces around the import?`,ni),"default"in ni||$(`lazy: Expected the result of a dynamic import() call. Instead received: %s

Your code should look like: 
  const MyComponent = lazy(() => import('./MyComponent'))`,ni),ni.default}else throw Ae._result}function Ve(Ae){var pt={_status:Ze,_result:Ae},tn={$$typeof:m,_payload:pt,_init:It};{var pn,ni;Object.defineProperties(tn,{defaultProps:{configurable:!0,get:function(){return pn},set:function(Br){$("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),pn=Br,Object.defineProperty(tn,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return ni},set:function(Br){$("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),ni=Br,Object.defineProperty(tn,"propTypes",{enumerable:!0})}}})}return tn}function bt(Ae){Ae!=null&&Ae.$$typeof===f?$("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof Ae!="function"?$("forwardRef requires a render function but was given %s.",Ae===null?"null":typeof Ae):Ae.length!==0&&Ae.length!==2&&$("forwardRef render functions accept exactly two parameters: props and ref. %s",Ae.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),Ae!=null&&(Ae.defaultProps!=null||Ae.propTypes!=null)&&$("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var pt={$$typeof:u,render:Ae};{var tn;Object.defineProperty(pt,"displayName",{enumerable:!1,configurable:!0,get:function(){return tn},set:function(pn){tn=pn,!Ae.name&&!Ae.displayName&&(Ae.displayName=pn)}})}return pt}var wt;wt=Symbol.for("react.module.reference");function $e(Ae){return!!(typeof Ae=="string"||typeof Ae=="function"||Ae===o||Ae===a||O||Ae===s||Ae===d||Ae===h||P||Ae===p||T||A||R||typeof Ae=="object"&&Ae!==null&&(Ae.$$typeof===m||Ae.$$typeof===f||Ae.$$typeof===l||Ae.$$typeof===c||Ae.$$typeof===u||Ae.$$typeof===wt||Ae.getModuleId!==void 0))}function We(Ae,pt){$e(Ae)||$("memo: The first argument must be a component. Instead received: %s",Ae===null?"null":typeof Ae);var tn={$$typeof:f,type:Ae,compare:pt===void 0?null:pt};{var pn;Object.defineProperty(tn,"displayName",{enumerable:!1,configurable:!0,get:function(){return pn},set:function(ni){pn=ni,!Ae.name&&!Ae.displayName&&(Ae.displayName=ni)}})}return tn}function tt(){var Ae=w.current;return Ae===null&&$(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),Ae}function _t(Ae){var pt=tt();if(Ae._context!==void 0){var tn=Ae._context;tn.Consumer===Ae?$("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):tn.Provider===Ae&&$("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return pt.useContext(Ae)}function ht(Ae){var pt=tt();return pt.useState(Ae)}function qe(Ae,pt,tn){var pn=tt();return pn.useReducer(Ae,pt,tn)}function ft(Ae){var pt=tt();return pt.useRef(Ae)}function Ct(Ae,pt){var tn=tt();return tn.useEffect(Ae,pt)}function Pt(Ae,pt){var tn=tt();return tn.useInsertionEffect(Ae,pt)}function an(Ae,pt){var tn=tt();return tn.useLayoutEffect(Ae,pt)}function _n(Ae,pt){var tn=tt();return tn.useCallback(Ae,pt)}function on(Ae,pt){var tn=tt();return tn.useMemo(Ae,pt)}function yn(Ae,pt,tn){var pn=tt();return pn.useImperativeHandle(Ae,pt,tn)}function fi(Ae,pt){{var tn=tt();return tn.useDebugValue(Ae,pt)}}function oi(){var Ae=tt();return Ae.useTransition()}function Qi(Ae){var pt=tt();return pt.useDeferredValue(Ae)}function mi(){var Ae=tt();return Ae.useId()}function Vr(Ae,pt,tn){var pn=tt();return pn.useSyncExternalStore(Ae,pt,tn)}var _i=0,ur,si,Ii,Si,To,ts,La;function pc(){}pc.__reactDisabledLog=!0;function gc(){{if(_i===0){ur=console.log,si=console.info,Ii=console.warn,Si=console.error,To=console.group,ts=console.groupCollapsed,La=console.groupEnd;var Ae={configurable:!0,enumerable:!0,value:pc,writable:!0};Object.defineProperties(console,{info:Ae,log:Ae,warn:Ae,error:Ae,group:Ae,groupCollapsed:Ae,groupEnd:Ae})}_i++}}function ca(){{if(_i--,_i===0){var Ae={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:q({},Ae,{value:ur}),info:q({},Ae,{value:si}),warn:q({},Ae,{value:Ii}),error:q({},Ae,{value:Si}),group:q({},Ae,{value:To}),groupCollapsed:q({},Ae,{value:ts}),groupEnd:q({},Ae,{value:La})})}_i<0&&$("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Nr=V.ReactCurrentDispatcher,$i;function us(Ae,pt,tn){{if($i===void 0)try{throw Error()}catch(ni){var pn=ni.stack.trim().match(/\n( *(at )?)/);$i=pn&&pn[1]||""}return`
`+$i+Ae}}var fr=!1,Gi;{var zn=typeof WeakMap=="function"?WeakMap:Map;Gi=new zn}function pi(Ae,pt){if(!Ae||fr)return"";{var tn=Gi.get(Ae);if(tn!==void 0)return tn}var pn;fr=!0;var ni=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Br;Br=Nr.current,Nr.current=null,gc();try{if(pt){var Ji=function(){throw Error()};if(Object.defineProperty(Ji.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ji,[])}catch(Ws){pn=Ws}Reflect.construct(Ae,[],Ji)}else{try{Ji.call()}catch(Ws){pn=Ws}Ae.call(Ji.prototype)}}else{try{throw Error()}catch(Ws){pn=Ws}Ae()}}catch(Ws){if(Ws&&pn&&typeof Ws.stack=="string"){for(var eo=Ws.stack.split(`
`),ns=pn.stack.split(`
`),ba=eo.length-1,il=ns.length-1;ba>=1&&il>=0&&eo[ba]!==ns[il];)il--;for(;ba>=1&&il>=0;ba--,il--)if(eo[ba]!==ns[il]){if(ba!==1||il!==1)do if(ba--,il--,il<0||eo[ba]!==ns[il]){var rl=`
`+eo[ba].replace(" at new "," at ");return Ae.displayName&&rl.includes("<anonymous>")&&(rl=rl.replace("<anonymous>",Ae.displayName)),typeof Ae=="function"&&Gi.set(Ae,rl),rl}while(ba>=1&&il>=0);break}}}finally{fr=!1,Nr.current=Br,ca(),Error.prepareStackTrace=ni}var Rl=Ae?Ae.displayName||Ae.name:"",_c=Rl?us(Rl):"";return typeof Ae=="function"&&Gi.set(Ae,_c),_c}function Tr(Ae,pt,tn){return pi(Ae,!1)}function vs(Ae){var pt=Ae.prototype;return!!(pt&&pt.isReactComponent)}function ua(Ae,pt,tn){if(Ae==null)return"";if(typeof Ae=="function")return pi(Ae,vs(Ae));if(typeof Ae=="string")return us(Ae);switch(Ae){case d:return us("Suspense");case h:return us("SuspenseList")}if(typeof Ae=="object")switch(Ae.$$typeof){case u:return Tr(Ae.render);case f:return ua(Ae.type,pt,tn);case m:{var pn=Ae,ni=pn._payload,Br=pn._init;try{return ua(Br(ni),pt,tn)}catch{}}}return""}var Al={},bc=V.ReactDebugCurrentFrame;function vc(Ae){if(Ae){var pt=Ae._owner,tn=ua(Ae.type,Ae._source,pt?pt.type:null);bc.setExtraStackFrame(tn)}else bc.setExtraStackFrame(null)}function Hn(Ae,pt,tn,pn,ni){{var Br=Function.call.bind(he);for(var Ji in Ae)if(Br(Ae,Ji)){var eo=void 0;try{if(typeof Ae[Ji]!="function"){var ns=Error((pn||"React class")+": "+tn+" type `"+Ji+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof Ae[Ji]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ns.name="Invariant Violation",ns}eo=Ae[Ji](pt,Ji,pn,tn,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ba){eo=ba}eo&&!(eo instanceof Error)&&(vc(ni),$("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",pn||"React class",tn,Ji,typeof eo),vc(null)),eo instanceof Error&&!(eo.message in Al)&&(Al[eo.message]=!0,vc(ni),$("Failed %s type: %s",tn,eo.message),vc(null))}}}function cn(Ae){if(Ae){var pt=Ae._owner,tn=ua(Ae.type,Ae._source,pt?pt.type:null);M(tn)}else M(null)}var Ui;Ui=!1;function Pr(){if(E.current){var Ae=ge(E.current.type);if(Ae)return`

Check the render method of \``+Ae+"`."}return""}function bi(Ae){if(Ae!==void 0){var pt=Ae.fileName.replace(/^.*[\\\/]/,""),tn=Ae.lineNumber;return`

Check your code at `+pt+":"+tn+"."}return""}function zu(Ae){return Ae!=null?bi(Ae.__source):""}var Ms={};function Jl(Ae){var pt=Pr();if(!pt){var tn=typeof Ae=="string"?Ae:Ae.displayName||Ae.name;tn&&(pt=`

Check the top-level render call using <`+tn+">.")}return pt}function Hu(Ae,pt){if(!(!Ae._store||Ae._store.validated||Ae.key!=null)){Ae._store.validated=!0;var tn=Jl(pt);if(!Ms[tn]){Ms[tn]=!0;var pn="";Ae&&Ae._owner&&Ae._owner!==E.current&&(pn=" It was passed a child from "+ge(Ae._owner.type)+"."),cn(Ae),$('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',tn,pn),cn(null)}}}function sg(Ae,pt){if(typeof Ae=="object"){if(be(Ae))for(var tn=0;tn<Ae.length;tn++){var pn=Ae[tn];Ee(pn)&&Hu(pn,pt)}else if(Ee(Ae))Ae._store&&(Ae._store.validated=!0);else if(Ae){var ni=_(Ae);if(typeof ni=="function"&&ni!==Ae.entries)for(var Br=ni.call(Ae),Ji;!(Ji=Br.next()).done;)Ee(Ji.value)&&Hu(Ji.value,pt)}}}function yc(Ae){{var pt=Ae.type;if(pt==null||typeof pt=="string")return;var tn;if(typeof pt=="function")tn=pt.propTypes;else if(typeof pt=="object"&&(pt.$$typeof===u||pt.$$typeof===f))tn=pt.propTypes;else return;if(tn){var pn=ge(pt);Hn(tn,Ae.props,"prop",pn,Ae)}else if(pt.PropTypes!==void 0&&!Ui){Ui=!0;var ni=ge(pt);$("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ni||"Unknown")}typeof pt.getDefaultProps=="function"&&!pt.getDefaultProps.isReactClassApproved&&$("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function nl(Ae){{for(var pt=Object.keys(Ae.props),tn=0;tn<pt.length;tn++){var pn=pt[tn];if(pn!=="children"&&pn!=="key"){cn(Ae),$("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",pn),cn(null);break}}Ae.ref!==null&&(cn(Ae),$("Invalid attribute `ref` supplied to `React.Fragment`."),cn(null))}}function Vi(Ae,pt,tn){var pn=$e(Ae);if(!pn){var ni="";(Ae===void 0||typeof Ae=="object"&&Ae!==null&&Object.keys(Ae).length===0)&&(ni+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Br=zu(pt);Br?ni+=Br:ni+=Pr();var Ji;Ae===null?Ji="null":be(Ae)?Ji="array":Ae!==void 0&&Ae.$$typeof===i?(Ji="<"+(ge(Ae.type)||"Unknown")+" />",ni=" Did you accidentally export a JSX literal instead of a component?"):Ji=typeof Ae,$("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ji,ni)}var eo=it.apply(this,arguments);if(eo==null)return eo;if(pn)for(var ns=2;ns<arguments.length;ns++)sg(arguments[ns],Ae);return Ae===o?nl(eo):yc(eo),eo}var tr=!1;function Uo(Ae){var pt=Vi.bind(null,Ae);return pt.type=Ae,tr||(tr=!0,F("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(pt,"type",{enumerable:!1,get:function(){return F("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:Ae}),Ae}}),pt}function Js(Ae,pt,tn){for(var pn=Ge.apply(this,arguments),ni=2;ni<arguments.length;ni++)sg(arguments[ni],pn.type);return yc(pn),pn}function vl(Ae,pt){var tn=C.transition;C.transition={};var pn=C.transition;C.transition._updatedFibers=new Set;try{Ae()}finally{if(C.transition=tn,tn===null&&pn._updatedFibers){var ni=pn._updatedFibers.size;ni>10&&F("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),pn._updatedFibers.clear()}}}var ty=!1,ny=null;function TM(Ae){if(ny===null)try{var pt=("require"+Math.random()).slice(0,7),tn=t&&t[pt];ny=tn.call(t,"timers").setImmediate}catch{ny=function(ni){ty===!1&&(ty=!0,typeof MessageChannel>"u"&&$("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var Br=new MessageChannel;Br.port1.onmessage=ni,Br.port2.postMessage(void 0)}}return ny(Ae)}var ag=0,FG=!1;function $G(Ae){{var pt=ag;ag++,N.current===null&&(N.current=[]);var tn=N.isBatchingLegacy,pn;try{if(N.isBatchingLegacy=!0,pn=Ae(),!tn&&N.didScheduleLegacyUpdate){var ni=N.current;ni!==null&&(N.didScheduleLegacyUpdate=!1,DR(ni))}}catch(Rl){throw Hw(pt),Rl}finally{N.isBatchingLegacy=tn}if(pn!==null&&typeof pn=="object"&&typeof pn.then=="function"){var Br=pn,Ji=!1,eo={then:function(Rl,_c){Ji=!0,Br.then(function(Ws){Hw(pt),ag===0?ER(Ws,Rl,_c):Rl(Ws)},function(Ws){Hw(pt),_c(Ws)})}};return!FG&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){Ji||(FG=!0,$("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),eo}else{var ns=pn;if(Hw(pt),ag===0){var ba=N.current;ba!==null&&(DR(ba),N.current=null);var il={then:function(Rl,_c){N.current===null?(N.current=[],ER(ns,Rl,_c)):Rl(ns)}};return il}else{var rl={then:function(Rl,_c){Rl(ns)}};return rl}}}}function Hw(Ae){Ae!==ag-1&&$("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),ag=Ae}function ER(Ae,pt,tn){{var pn=N.current;if(pn!==null)try{DR(pn),TM(function(){pn.length===0?(N.current=null,pt(Ae)):ER(Ae,pt,tn)})}catch(ni){tn(ni)}else pt(Ae)}}var iN=!1;function DR(Ae){if(!iN){iN=!0;var pt=0;try{for(;pt<Ae.length;pt++){var tn=Ae[pt];do tn=tn(!0);while(tn!==null)}Ae.length=0}catch(pn){throw Ae=Ae.slice(pt+1),pn}finally{iN=!1}}}var VG=Vi,BG=Js,zG=Uo,HG={map:$t,forEach:Jt,count:ln,toArray:en,only:Ft};e.Children=HG,e.Component=Y,e.Fragment=o,e.Profiler=a,e.PureComponent=fe,e.StrictMode=s,e.Suspense=d,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=V,e.act=$G,e.cloneElement=BG,e.createContext=dn,e.createElement=VG,e.createFactory=zG,e.createRef=ie,e.forwardRef=bt,e.isValidElement=Ee,e.lazy=Ve,e.memo=We,e.startTransition=vl,e.unstable_act=$G,e.useCallback=_n,e.useContext=_t,e.useDebugValue=fi,e.useDeferredValue=Qi,e.useEffect=Ct,e.useId=mi,e.useImperativeHandle=yn,e.useInsertionEffect=Pt,e.useLayoutEffect=an,e.useMemo=on,e.useReducer=qe,e.useRef=ft,e.useState=ht,e.useSyncExternalStore=Vr,e.useTransition=oi,e.version=n,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(Zte,Zte.exports);var Frn=Zte.exports;J0t.exports=Frn;var b=J0t.exports;const Z=ao(b),CF=Z0t({__proto__:null,default:Z},[b]);/**
 * @license React
 * react-jsx-dev-runtime.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(){var t=b,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),m=Symbol.iterator,p="@@iterator";function g(Ve){if(Ve===null||typeof Ve!="object")return null;var bt=m&&Ve[m]||Ve[p];return typeof bt=="function"?bt:null}var y=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(Ve){{for(var bt=arguments.length,wt=new Array(bt>1?bt-1:0),$e=1;$e<bt;$e++)wt[$e-1]=arguments[$e];w("error",Ve,wt)}}function w(Ve,bt,wt){{var $e=y.ReactDebugCurrentFrame,We=$e.getStackAddendum();We!==""&&(bt+="%s",wt=wt.concat([We]));var tt=wt.map(function(_t){return String(_t)});tt.unshift("Warning: "+bt),Function.prototype.apply.call(console[Ve],console,tt)}}var C=!1,N=!1,E=!1,D=!1,k=!1,M;M=Symbol.for("react.module.reference");function T(Ve){return!!(typeof Ve=="string"||typeof Ve=="function"||Ve===i||Ve===o||k||Ve===r||Ve===c||Ve===u||D||Ve===f||C||N||E||typeof Ve=="object"&&Ve!==null&&(Ve.$$typeof===h||Ve.$$typeof===d||Ve.$$typeof===s||Ve.$$typeof===a||Ve.$$typeof===l||Ve.$$typeof===M||Ve.getModuleId!==void 0))}function A(Ve,bt,wt){var $e=Ve.displayName;if($e)return $e;var We=bt.displayName||bt.name||"";return We!==""?wt+"("+We+")":wt}function R(Ve){return Ve.displayName||"Context"}function P(Ve){if(Ve==null)return null;if(typeof Ve.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof Ve=="function")return Ve.displayName||Ve.name||null;if(typeof Ve=="string")return Ve;switch(Ve){case i:return"Fragment";case n:return"Portal";case o:return"Profiler";case r:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof Ve=="object")switch(Ve.$$typeof){case a:var bt=Ve;return R(bt)+".Consumer";case s:var wt=Ve;return R(wt._context)+".Provider";case l:return A(Ve,Ve.render,"ForwardRef");case d:var $e=Ve.displayName||null;return $e!==null?$e:P(Ve.type)||"Memo";case h:{var We=Ve,tt=We._payload,_t=We._init;try{return P(_t(tt))}catch{return null}}}return null}var O=Object.assign,V=0,F,$,B,z,H,K,q;function U(){}U.__reactDisabledLog=!0;function Y(){{if(V===0){F=console.log,$=console.info,B=console.warn,z=console.error,H=console.group,K=console.groupCollapsed,q=console.groupEnd;var Ve={configurable:!0,enumerable:!0,value:U,writable:!0};Object.defineProperties(console,{info:Ve,log:Ve,warn:Ve,error:Ve,group:Ve,groupCollapsed:Ve,groupEnd:Ve})}V++}}function J(){{if(V--,V===0){var Ve={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:O({},Ve,{value:F}),info:O({},Ve,{value:$}),warn:O({},Ve,{value:B}),error:O({},Ve,{value:z}),group:O({},Ve,{value:H}),groupCollapsed:O({},Ve,{value:K}),groupEnd:O({},Ve,{value:q})})}V<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ae=y.ReactCurrentDispatcher,se;function oe(Ve,bt,wt){{if(se===void 0)try{throw Error()}catch(We){var $e=We.stack.trim().match(/\n( *(at )?)/);se=$e&&$e[1]||""}return`
`+se+Ve}}var fe=!1,de;{var ie=typeof WeakMap=="function"?WeakMap:Map;de=new ie}function Q(Ve,bt){if(!Ve||fe)return"";{var wt=de.get(Ve);if(wt!==void 0)return wt}var $e;fe=!0;var We=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var tt;tt=ae.current,ae.current=null,Y();try{if(bt){var _t=function(){throw Error()};if(Object.defineProperty(_t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_t,[])}catch(on){$e=on}Reflect.construct(Ve,[],_t)}else{try{_t.call()}catch(on){$e=on}Ve.call(_t.prototype)}}else{try{throw Error()}catch(on){$e=on}Ve()}}catch(on){if(on&&$e&&typeof on.stack=="string"){for(var ht=on.stack.split(`
`),qe=$e.stack.split(`
`),ft=ht.length-1,Ct=qe.length-1;ft>=1&&Ct>=0&&ht[ft]!==qe[Ct];)Ct--;for(;ft>=1&&Ct>=0;ft--,Ct--)if(ht[ft]!==qe[Ct]){if(ft!==1||Ct!==1)do if(ft--,Ct--,Ct<0||ht[ft]!==qe[Ct]){var Pt=`
`+ht[ft].replace(" at new "," at ");return Ve.displayName&&Pt.includes("<anonymous>")&&(Pt=Pt.replace("<anonymous>",Ve.displayName)),typeof Ve=="function"&&de.set(Ve,Pt),Pt}while(ft>=1&&Ct>=0);break}}}finally{fe=!1,ae.current=tt,J(),Error.prepareStackTrace=We}var an=Ve?Ve.displayName||Ve.name:"",_n=an?oe(an):"";return typeof Ve=="function"&&de.set(Ve,_n),_n}function be(Ve,bt,wt){return Q(Ve,!1)}function le(Ve){var bt=Ve.prototype;return!!(bt&&bt.isReactComponent)}function Ne(Ve,bt,wt){if(Ve==null)return"";if(typeof Ve=="function")return Q(Ve,le(Ve));if(typeof Ve=="string")return oe(Ve);switch(Ve){case c:return oe("Suspense");case u:return oe("SuspenseList")}if(typeof Ve=="object")switch(Ve.$$typeof){case l:return be(Ve.render);case d:return Ne(Ve.type,bt,wt);case h:{var $e=Ve,We=$e._payload,tt=$e._init;try{return Ne(tt(We),bt,wt)}catch{}}}return""}var Le=Object.prototype.hasOwnProperty,Te={},De=y.ReactDebugCurrentFrame;function Pe(Ve){if(Ve){var bt=Ve._owner,wt=Ne(Ve.type,Ve._source,bt?bt.type:null);De.setExtraStackFrame(wt)}else De.setExtraStackFrame(null)}function ge(Ve,bt,wt,$e,We){{var tt=Function.call.bind(Le);for(var _t in Ve)if(tt(Ve,_t)){var ht=void 0;try{if(typeof Ve[_t]!="function"){var qe=Error(($e||"React class")+": "+wt+" type `"+_t+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof Ve[_t]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw qe.name="Invariant Violation",qe}ht=Ve[_t](bt,_t,$e,wt,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ft){ht=ft}ht&&!(ht instanceof Error)&&(Pe(We),_("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",$e||"React class",wt,_t,typeof ht),Pe(null)),ht instanceof Error&&!(ht.message in Te)&&(Te[ht.message]=!0,Pe(We),_("Failed %s type: %s",wt,ht.message),Pe(null))}}}var he=Array.isArray;function me(Ve){return he(Ve)}function X(Ve){{var bt=typeof Symbol=="function"&&Symbol.toStringTag,wt=bt&&Ve[Symbol.toStringTag]||Ve.constructor.name||"Object";return wt}}function re(Ve){try{return we(Ve),!1}catch{return!0}}function we(Ve){return""+Ve}function ue(Ve){if(re(Ve))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",X(Ve)),we(Ve)}var Ce=y.ReactCurrentOwner,ze={key:!0,ref:!0,__self:!0,__source:!0},Ye,Ke,Xe;Xe={};function it(Ve){if(Le.call(Ve,"ref")){var bt=Object.getOwnPropertyDescriptor(Ve,"ref").get;if(bt&&bt.isReactWarning)return!1}return Ve.ref!==void 0}function ut(Ve){if(Le.call(Ve,"key")){var bt=Object.getOwnPropertyDescriptor(Ve,"key").get;if(bt&&bt.isReactWarning)return!1}return Ve.key!==void 0}function Ge(Ve,bt){if(typeof Ve.ref=="string"&&Ce.current&&bt&&Ce.current.stateNode!==bt){var wt=P(Ce.current.type);Xe[wt]||(_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',P(Ce.current.type),Ve.ref),Xe[wt]=!0)}}function Ee(Ve,bt){{var wt=function(){Ye||(Ye=!0,_("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",bt))};wt.isReactWarning=!0,Object.defineProperty(Ve,"key",{get:wt,configurable:!0})}}function Se(Ve,bt){{var wt=function(){Ke||(Ke=!0,_("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",bt))};wt.isReactWarning=!0,Object.defineProperty(Ve,"ref",{get:wt,configurable:!0})}}var je=function(Ve,bt,wt,$e,We,tt,_t){var ht={$$typeof:e,type:Ve,key:bt,ref:wt,props:_t,_owner:tt};return ht._store={},Object.defineProperty(ht._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ht,"_self",{configurable:!1,enumerable:!1,writable:!1,value:$e}),Object.defineProperty(ht,"_source",{configurable:!1,enumerable:!1,writable:!1,value:We}),Object.freeze&&(Object.freeze(ht.props),Object.freeze(ht)),ht};function nt(Ve,bt,wt,$e,We){{var tt,_t={},ht=null,qe=null;wt!==void 0&&(ue(wt),ht=""+wt),ut(bt)&&(ue(bt.key),ht=""+bt.key),it(bt)&&(qe=bt.ref,Ge(bt,We));for(tt in bt)Le.call(bt,tt)&&!ze.hasOwnProperty(tt)&&(_t[tt]=bt[tt]);if(Ve&&Ve.defaultProps){var ft=Ve.defaultProps;for(tt in ft)_t[tt]===void 0&&(_t[tt]=ft[tt])}if(ht||qe){var Ct=typeof Ve=="function"?Ve.displayName||Ve.name||"Unknown":Ve;ht&&Ee(_t,Ct),qe&&Se(_t,Ct)}return je(Ve,ht,qe,We,$e,Ce.current,_t)}}var rt=y.ReactCurrentOwner,St=y.ReactDebugCurrentFrame;function At(Ve){if(Ve){var bt=Ve._owner,wt=Ne(Ve.type,Ve._source,bt?bt.type:null);St.setExtraStackFrame(wt)}else St.setExtraStackFrame(null)}var Nt;Nt=!1;function vt(Ve){return typeof Ve=="object"&&Ve!==null&&Ve.$$typeof===e}function $t(){{if(rt.current){var Ve=P(rt.current.type);if(Ve)return`

Check the render method of \``+Ve+"`."}return""}}function ln(Ve){{if(Ve!==void 0){var bt=Ve.fileName.replace(/^.*[\\\/]/,""),wt=Ve.lineNumber;return`

Check your code at `+bt+":"+wt+"."}return""}}var Jt={};function en(Ve){{var bt=$t();if(!bt){var wt=typeof Ve=="string"?Ve:Ve.displayName||Ve.name;wt&&(bt=`

Check the top-level render call using <`+wt+">.")}return bt}}function Ft(Ve,bt){{if(!Ve._store||Ve._store.validated||Ve.key!=null)return;Ve._store.validated=!0;var wt=en(bt);if(Jt[wt])return;Jt[wt]=!0;var $e="";Ve&&Ve._owner&&Ve._owner!==rt.current&&($e=" It was passed a child from "+P(Ve._owner.type)+"."),At(Ve),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',wt,$e),At(null)}}function dn(Ve,bt){{if(typeof Ve!="object")return;if(me(Ve))for(var wt=0;wt<Ve.length;wt++){var $e=Ve[wt];vt($e)&&Ft($e,bt)}else if(vt(Ve))Ve._store&&(Ve._store.validated=!0);else if(Ve){var We=g(Ve);if(typeof We=="function"&&We!==Ve.entries)for(var tt=We.call(Ve),_t;!(_t=tt.next()).done;)vt(_t.value)&&Ft(_t.value,bt)}}}function Ze(Ve){{var bt=Ve.type;if(bt==null||typeof bt=="string")return;var wt;if(typeof bt=="function")wt=bt.propTypes;else if(typeof bt=="object"&&(bt.$$typeof===l||bt.$$typeof===d))wt=bt.propTypes;else return;if(wt){var $e=P(bt);ge(wt,Ve.props,"prop",$e,Ve)}else if(bt.PropTypes!==void 0&&!Nt){Nt=!0;var We=P(bt);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",We||"Unknown")}typeof bt.getDefaultProps=="function"&&!bt.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function dt(Ve){{for(var bt=Object.keys(Ve.props),wt=0;wt<bt.length;wt++){var $e=bt[wt];if($e!=="children"&&$e!=="key"){At(Ve),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$e),At(null);break}}Ve.ref!==null&&(At(Ve),_("Invalid attribute `ref` supplied to `React.Fragment`."),At(null))}}var at={};function mt(Ve,bt,wt,$e,We,tt){{var _t=T(Ve);if(!_t){var ht="";(Ve===void 0||typeof Ve=="object"&&Ve!==null&&Object.keys(Ve).length===0)&&(ht+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var qe=ln(We);qe?ht+=qe:ht+=$t();var ft;Ve===null?ft="null":me(Ve)?ft="array":Ve!==void 0&&Ve.$$typeof===e?(ft="<"+(P(Ve.type)||"Unknown")+" />",ht=" Did you accidentally export a JSX literal instead of a component?"):ft=typeof Ve,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ft,ht)}var Ct=nt(Ve,bt,wt,We,tt);if(Ct==null)return Ct;if(_t){var Pt=bt.children;if(Pt!==void 0)if($e)if(me(Pt)){for(var an=0;an<Pt.length;an++)dn(Pt[an],Ve);Object.freeze&&Object.freeze(Pt)}else _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else dn(Pt,Ve)}if(Le.call(bt,"key")){var _n=P(Ve),on=Object.keys(bt).filter(function(oi){return oi!=="key"}),yn=on.length>0?"{key: someKey, "+on.join(": ..., ")+": ...}":"{key: someKey}";if(!at[_n+yn]){var fi=on.length>0?"{"+on.join(": ..., ")+": ...}":"{}";_(`A props object containing a "key" prop is being spread into JSX:
  let props = %s;
  <%s {...props} />
React keys must be passed directly to JSX without using spread:
  let props = %s;
  <%s key={someKey} {...props} />`,yn,_n,fi,_n),at[_n+yn]=!0}}return Ve===i?dt(Ct):Ze(Ct),Ct}}var It=mt;gNe.Fragment=i,gNe.jsxDEV=It})();Q0t.exports=gNe;var v=Q0t.exports;const e_t=Object.prototype.toString;function lue(t){switch(e_t.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return GC(t,Error)}}function SF(t,e){return e_t.call(t)===`[object ${e}]`}function t_t(t){return SF(t,"ErrorEvent")}function aXe(t){return SF(t,"DOMError")}function $rn(t){return SF(t,"DOMException")}function CC(t){return SF(t,"String")}function w3e(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function C3e(t){return t===null||w3e(t)||typeof t!="object"&&typeof t!="function"}function cj(t){return SF(t,"Object")}function cue(t){return typeof Event<"u"&&GC(t,Event)}function Vrn(t){return typeof Element<"u"&&GC(t,Element)}function Brn(t){return SF(t,"RegExp")}function uue(t){return!!(t&&t.then&&typeof t.then=="function")}function zrn(t){return cj(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function GC(t,e){try{return t instanceof e}catch{return!1}}function n_t(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function J4(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function lXe(t,e){if(!Array.isArray(t))return"";const n=[];for(let i=0;i<t.length;i++){const r=t[i];try{n_t(r)?n.push("[VueViewModel]"):n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function Hrn(t,e,n=!1){return CC(t)?Brn(e)?e.test(t):CC(e)?n?t===e:t.includes(e):!1:!1}function cD(t,e=[],n=!1){return e.some(i=>Hrn(t,i,n))}function Wrn(t,e,n=250,i,r,o,s){if(!o.exception||!o.exception.values||!s||!GC(s.originalException,Error))return;const a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=Urn(bNe(t,e,r,s.originalException,i,o.exception.values,a,0),n))}function bNe(t,e,n,i,r,o,s,a){if(o.length>=n+1)return o;let l=[...o];if(GC(i[r],Error)){cXe(s,a);const c=t(e,i[r]),u=l.length;uXe(c,r,u,a),l=bNe(t,e,n,i[r],r,[c,...l],c,u)}return Array.isArray(i.errors)&&i.errors.forEach((c,u)=>{if(GC(c,Error)){cXe(s,a);const d=t(e,c),h=l.length;uXe(d,`errors[${u}]`,h,a),l=bNe(t,e,n,c,r,[d,...l],d,h)}}),l}function cXe(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function uXe(t,e,n,i){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:i}}function Urn(t,e){return t.map(n=>(n.value&&(n.value=J4(n.value,e)),n))}function i_t(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}const uD="8.34.0",ms=globalThis;function due(t,e,n){const i=n||ms,r=i.__SENTRY__=i.__SENTRY__||{},o=r[uD]=r[uD]||{};return o[t]||(o[t]=e())}const e3=ms,Krn=80;function YC(t,e={}){if(!t)return"<unknown>";try{let n=t;const i=5,r=[];let o=0,s=0;const a=" > ",l=a.length;let c;const u=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||Krn;for(;n&&o++<i&&(c=qrn(n,u),!(c==="html"||o>1&&s+r.length*l+c.length>=d));)r.push(c),s+=c.length,n=n.parentNode;return r.reverse().join(a)}catch{return"<unknown>"}}function qrn(t,e){const n=t,i=[];if(!n||!n.tagName)return"";if(e3.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}i.push(n.tagName.toLowerCase());const r=e&&e.length?e.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(r&&r.length)r.forEach(s=>{i.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&i.push(`#${n.id}`);const s=n.className;if(s&&CC(s)){const a=s.split(/\s+/);for(const l of a)i.push(`.${l}`)}}const o=["aria-label","type","name","title","alt"];for(const s of o){const a=n.getAttribute(s);a&&i.push(`[${s}="${a}"]`)}return i.join("")}function S3e(){try{return e3.document.location.href}catch{return""}}function Grn(t){return e3.document&&e3.document.querySelector?e3.document.querySelector(t):null}function r_t(t){if(!e3.HTMLElement)return null;let e=t;const n=5;for(let i=0;i<n;i++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}const NF=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Yrn="Sentry Logger ",vNe=["debug","info","warn","error","log","assert","trace"],Qte={};function EF(t){if(!("console"in ms))return t();const e=ms.console,n={},i=Object.keys(Qte);i.forEach(r=>{const o=Qte[r];n[r]=e[r],e[r]=o});try{return t()}finally{i.forEach(r=>{e[r]=n[r]})}}function Xrn(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return NF?vNe.forEach(n=>{e[n]=(...i)=>{t&&EF(()=>{ms.console[n](`${Yrn}[${n}]:`,...i)})}}):vNe.forEach(n=>{e[n]=()=>{}}),e}const Zn=due("logger",Xrn),Zrn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Qrn(t){return t==="http"||t==="https"}function DF(t,e=!1){const{host:n,path:i,pass:r,port:o,projectId:s,protocol:a,publicKey:l}=t;return`${a}://${l}${e&&r?`:${r}`:""}@${n}${o?`:${o}`:""}/${i&&`${i}/`}${s}`}function Jrn(t){const e=Zrn.exec(t);if(!e){EF(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}const[n,i,r="",o="",s="",a=""]=e.slice(1);let l="",c=a;const u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){const d=c.match(/^\d+/);d&&(c=d[0])}return o_t({host:o,pass:r,path:l,projectId:c,port:s,protocol:n,publicKey:i})}function o_t(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function eon(t){if(!NF)return!0;const{port:e,projectId:n,protocol:i}=t;return["protocol","publicKey","host","projectId"].find(s=>t[s]?!1:(Zn.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?Qrn(i)?e&&isNaN(parseInt(e,10))?(Zn.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(Zn.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),!1):(Zn.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function s_t(t){const e=typeof t=="string"?Jrn(t):o_t(t);if(!(!e||!eon(e)))return e}class xx extends Error{constructor(e,n="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function yp(t,e,n){if(!(e in t))return;const i=t[e],r=n(i);typeof r=="function"&&a_t(r,i),t[e]=r}function Cv(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{NF&&Zn.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function a_t(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,Cv(t,"__sentry_original__",e)}catch{}}function N3e(t){return t.__sentry_original__}function ton(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function l_t(t){if(lue(t))return{message:t.message,name:t.name,stack:t.stack,...hXe(t)};if(cue(t)){const e={type:t.type,target:dXe(t.target),currentTarget:dXe(t.currentTarget),...hXe(t)};return typeof CustomEvent<"u"&&GC(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function dXe(t){try{return Vrn(t)?YC(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function hXe(t){if(typeof t=="object"&&t!==null){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function non(t,e=40){const n=Object.keys(l_t(t));n.sort();const i=n[0];if(!i)return"[object has no keys]";if(i.length>=e)return J4(i,e);for(let r=n.length;r>0;r--){const o=n.slice(0,r).join(", ");if(!(o.length>e))return r===n.length?o:J4(o,e)}return""}function Eu(t){return yNe(t,new Map)}function yNe(t,e){if(ion(t)){const n=e.get(t);if(n!==void 0)return n;const i={};e.set(t,i);for(const r of Object.getOwnPropertyNames(t))typeof t[r]<"u"&&(i[r]=yNe(t[r],e));return i}if(Array.isArray(t)){const n=e.get(t);if(n!==void 0)return n;const i=[];return e.set(t,i),t.forEach(r=>{i.push(yNe(r,e))}),i}return t}function ion(t){if(!cj(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}const c_t=50,x2="?",fXe=/\(error: (.*)\)/,mXe=/captureMessage|captureException/;function u_t(...t){const e=t.sort((n,i)=>n[0]-i[0]).map(n=>n[1]);return(n,i=0,r=0)=>{const o=[],s=n.split(`
`);for(let a=i;a<s.length;a++){const l=s[a];if(l.length>1024)continue;const c=fXe.test(l)?l.replace(fXe,"$1"):l;if(!c.match(/\S*Error: /)){for(const u of e){const d=u(c);if(d){o.push(d);break}}if(o.length>=c_t+r)break}}return oon(o.slice(r))}}function ron(t){return Array.isArray(t)?u_t(...t):t}function oon(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(WX(e).function||"")&&e.pop(),e.reverse(),mXe.test(WX(e).function||"")&&(e.pop(),mXe.test(WX(e).function||"")&&e.pop()),e.slice(0,c_t).map(n=>({...n,filename:n.filename||WX(e).filename,function:n.function||x2}))}function WX(t){return t[t.length-1]||{}}const U0e="<anonymous>";function XC(t){try{return!t||typeof t!="function"?U0e:t.name||U0e}catch{return U0e}}function pXe(t){const e=t.exception;if(e){const n=[];try{return e.values.forEach(i=>{i.stacktrace.frames&&n.push(...i.stacktrace.frames)}),n}catch{return}}}const eee={},gXe={};function Ok(t,e){eee[t]=eee[t]||[],eee[t].push(e)}function jk(t,e){gXe[t]||(e(),gXe[t]=!0)}function pv(t,e){const n=t&&eee[t];if(n)for(const i of n)try{i(e)}catch(r){NF&&Zn.error(`Error while triggering instrumentation handler.
Type: ${t}
Name: ${XC(i)}
Error:`,r)}}function son(t){const e="console";Ok(e,t),jk(e,aon)}function aon(){"console"in ms&&vNe.forEach(function(t){t in ms.console&&yp(ms.console,t,function(e){return Qte[t]=e,function(...n){pv("console",{args:n,level:t});const r=Qte[t];r&&r.apply(ms.console,n)}})})}const _Ne=ms;function d_t(){if(!("fetch"in _Ne))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function xNe(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function lon(){if(typeof EdgeRuntime=="string")return!0;if(!d_t())return!1;if(xNe(_Ne.fetch))return!0;let t=!1;const e=_Ne.document;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=xNe(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){NF&&Zn.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}const h_t=1e3;function nK(){return Date.now()/h_t}function con(){const{performance:t}=ms;if(!t||!t.now)return nK;const e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/h_t}const ym=con(),Dm=(()=>{const{performance:t}=ms;if(!t||!t.now)return;const e=3600*1e3,n=t.now(),i=Date.now(),r=t.timeOrigin?Math.abs(t.timeOrigin+n-i):e,o=r<e,s=t.timing&&t.timing.navigationStart,l=typeof s=="number"?Math.abs(s+n-i):e,c=l<e;return o||c?r<=l?t.timeOrigin:s:i})();function f_t(t,e){const n="fetch";Ok(n,t),jk(n,()=>m_t(void 0,e))}function uon(t){const e="fetch-body-resolved";Ok(e,t),jk(e,()=>m_t(hon))}function m_t(t,e=!1){e&&!lon()||yp(ms,"fetch",function(n){return function(...i){const{method:r,url:o}=fon(i),s={args:i,fetchData:{method:r,url:o},startTimestamp:ym()*1e3};t||pv("fetch",{...s});const a=new Error().stack;return n.apply(ms,i).then(async l=>(t?t(l):pv("fetch",{...s,endTimestamp:ym()*1e3,response:l}),l),l=>{throw pv("fetch",{...s,endTimestamp:ym()*1e3,error:l}),lue(l)&&l.stack===void 0&&(l.stack=a,Cv(l,"framesToPop",1)),l})}})}async function don(t,e){if(t&&t.body){const n=t.body,i=n.getReader(),r=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let o=!0;for(;o;){let s;try{s=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await i.read();clearTimeout(s),a&&(e(),o=!1)}catch{o=!1}finally{clearTimeout(s)}}clearTimeout(r),i.releaseLock(),n.cancel().then(null,()=>{})}}function hon(t){let e;try{e=t.clone()}catch{return}don(e,()=>{pv("fetch-body-resolved",{endTimestamp:ym()*1e3,response:t})})}function wNe(t,e){return!!t&&typeof t=="object"&&!!t[e]}function bXe(t){return typeof t=="string"?t:t?wNe(t,"url")?t.url:t.toString?t.toString():"":""}function fon(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,i]=t;return{url:bXe(n),method:wNe(i,"method")?String(i.method).toUpperCase():"GET"}}const e=t[0];return{url:bXe(e),method:wNe(e,"method")?String(e.method).toUpperCase():"GET"}}let UX=null;function p_t(t){const e="error";Ok(e,t),jk(e,mon)}function mon(){UX=ms.onerror,ms.onerror=function(t,e,n,i,r){return pv("error",{column:i,error:r,line:n,msg:t,url:e}),UX&&!UX.__SENTRY_LOADER__?UX.apply(this,arguments):!1},ms.onerror.__SENTRY_INSTRUMENTED__=!0}let KX=null;function g_t(t){const e="unhandledrejection";Ok(e,t),jk(e,pon)}function pon(){KX=ms.onunhandledrejection,ms.onunhandledrejection=function(t){return pv("unhandledrejection",t),KX&&!KX.__SENTRY_LOADER__?KX.apply(this,arguments):!0},ms.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function gon(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function bon(){return"npm"}function von(){return!gon()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function CNe(){return typeof window<"u"&&(!von()||yon())}function yon(){return ms.process!==void 0&&ms.process.type==="renderer"}function _on(){const t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(r){if(t)return e.has(r)?!0:(e.add(r),!1);for(let o=0;o<e.length;o++)if(e[o]===r)return!0;return e.push(r),!1}function i(r){if(t)e.delete(r);else for(let o=0;o<e.length;o++)if(e[o]===r){e.splice(o,1);break}}return[n,i]}function ql(){const t=ms,e=t.crypto||t.msCrypto;let n=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const i=new Uint8Array(1);return e.getRandomValues(i),i[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,i=>(i^(n()&15)>>i/4).toString(16))}function b_t(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function JN(t){const{message:e,event_id:n}=t;if(e)return e;const i=b_t(t);return i?i.type&&i.value?`${i.type}: ${i.value}`:i.type||i.value||n||"<unknown>":n||"<unknown>"}function SNe(t,e,n){const i=t.exception=t.exception||{},r=i.values=i.values||[],o=r[0]=r[0]||{};o.value||(o.value=e||""),o.type||(o.type="Error")}function hz(t,e){const n=b_t(t);if(!n)return;const i={type:"generic",handled:!0},r=n.mechanism;if(n.mechanism={...i,...r,...e},e&&"data"in e){const o={...r&&r.data,...e.data};n.mechanism.data=o}}function vXe(t){if(t&&t.__sentry_captured__)return!0;try{Cv(t,"__sentry_captured__",!0)}catch{}return!1}function v_t(t){return Array.isArray(t)?t:[t]}function mx(t,e=100,n=1/0){try{return NNe("",t,e,n)}catch(i){return{ERROR:`**non-serializable** (${i})`}}}function y_t(t,e=3,n=100*1024){const i=mx(t,e);return Son(i)>n?y_t(t,e-1,n):i}function NNe(t,e,n=1/0,i=1/0,r=_on()){const[o,s]=r;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;const a=xon(t,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;const l=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(l===0)return a.replace("object ","");if(o(e))return"[Circular ~]";const c=e;if(c&&typeof c.toJSON=="function")try{const f=c.toJSON();return NNe("",f,l-1,i,r)}catch{}const u=Array.isArray(e)?[]:{};let d=0;const h=l_t(e);for(const f in h){if(!Object.prototype.hasOwnProperty.call(h,f))continue;if(d>=i){u[f]="[MaxProperties ~]";break}const m=h[f];u[f]=NNe(f,m,l-1,i,r),d++}return s(e),u}function xon(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(n_t(e))return"[VueViewModel]";if(zrn(e))return"[SyntheticEvent]";if(typeof e=="number"&&!Number.isFinite(e))return`[${e}]`;if(typeof e=="function")return`[Function: ${XC(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;const n=won(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function won(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function Con(t){return~-encodeURI(t).split(/%..|./).length}function Son(t){return Con(JSON.stringify(t))}var T1;(function(t){t[t.PENDING=0]="PENDING";const n=1;t[t.RESOLVED=n]="RESOLVED";const i=2;t[t.REJECTED=i]="REJECTED"})(T1||(T1={}));function ZC(t){return new ev(e=>{e(t)})}function Jte(t){return new ev((e,n)=>{n(t)})}class ev{constructor(e){ev.prototype.__init.call(this),ev.prototype.__init2.call(this),ev.prototype.__init3.call(this),ev.prototype.__init4.call(this),this._state=T1.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new ev((i,r)=>{this._handlers.push([!1,o=>{if(!e)i(o);else try{i(e(o))}catch(s){r(s)}},o=>{if(!n)r(o);else try{i(n(o))}catch(s){r(s)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new ev((n,i)=>{let r,o;return this.then(s=>{o=!1,r=s,e&&e()},s=>{o=!0,r=s,e&&e()}).then(()=>{if(o){i(r);return}n(r)})})}__init(){this._resolve=e=>{this._setResult(T1.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(T1.REJECTED,e)}}__init3(){this._setResult=(e,n)=>{if(this._state===T1.PENDING){if(uue(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===T1.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===T1.RESOLVED&&n[1](this._value),this._state===T1.REJECTED&&n[2](this._value),n[0]=!0)})}}}function Non(t){const e=[];function n(){return t===void 0||e.length<t}function i(s){return e.splice(e.indexOf(s),1)[0]||Promise.resolve(void 0)}function r(s){if(!n())return Jte(new xx("Not adding Promise because buffer limit was reached."));const a=s();return e.indexOf(a)===-1&&e.push(a),a.then(()=>i(a)).then(null,()=>i(a).then(null,()=>{})),a}function o(s){return new ev((a,l)=>{let c=e.length;if(!c)return a(!0);const u=setTimeout(()=>{s&&s>0&&a(!1)},s);e.forEach(d=>{ZC(d).then(()=>{--c||(clearTimeout(u),a(!0))},l)})})}return{$:e,add:r,drain:o}}function GT(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",i=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:i,relative:e[5]+n+i}}const Eon=["fatal","error","warning","log","info","debug"];function __t(t){return t==="warn"?"warning":Eon.includes(t)?t:"log"}const ENe="baggage",x_t="sentry-",Don=/^sentry-/,kon=8192;function w_t(t){const e=Mon(t);if(!e)return;const n=Object.entries(e).reduce((i,[r,o])=>{if(r.match(Don)){const s=r.slice(x_t.length);i[s]=o}return i},{});if(Object.keys(n).length>0)return n}function C_t(t){if(!t)return;const e=Object.entries(t).reduce((n,[i,r])=>(r&&(n[`${x_t}${i}`]=r),n),{});return Lon(e)}function Mon(t){if(!(!t||!CC(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{const i=yXe(n);return Object.entries(i).forEach(([r,o])=>{e[r]=o}),e},{}):yXe(t)}function yXe(t){return t.split(",").map(e=>e.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((e,[n,i])=>(n&&i&&(e[n]=i),e),{})}function Lon(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((e,[n,i],r)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(i)}`,s=r===0?o:`${e},${o}`;return s.length>kon?(NF&&Zn.warn(`Not adding key: ${n} with val: ${i} to baggage header due to exceeding baggage size limits.`),e):s},"")}const Ton=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Ion(t){if(!t)return;const e=t.match(Ton);if(!e)return;let n;return e[3]==="1"?n=!0:e[3]==="0"&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}function Aon(t,e){const n=Ion(t),i=w_t(e),{traceId:r,parentSpanId:o,parentSampled:s}=n||{};return n?{traceId:r||ql(),parentSpanId:o||ql().substring(16),spanId:ql().substring(16),sampled:s,dsc:i||{}}:{traceId:r||ql(),spanId:ql().substring(16)}}function E3e(t=ql(),e=ql().substring(16),n){let i="";return n!==void 0&&(i=n?"-1":"-0"),`${t}-${e}${i}`}function SA(t,e=[]){return[t,e]}function Ron(t,e){const[n,i]=t;return[n,[...i,e]]}function _Xe(t,e){const n=t[1];for(const i of n){const r=i[0].type;if(e(i,r))return!0}return!1}function DNe(t){return ms.__SENTRY__&&ms.__SENTRY__.encodePolyfill?ms.__SENTRY__.encodePolyfill(t):new TextEncoder().encode(t)}function Pon(t){const[e,n]=t;let i=JSON.stringify(e);function r(o){typeof i=="string"?i=typeof o=="string"?i+o:[DNe(i),o]:i.push(typeof o=="string"?DNe(o):o)}for(const o of n){const[s,a]=o;if(r(`
${JSON.stringify(s)}
`),typeof a=="string"||a instanceof Uint8Array)r(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(mx(a))}r(l)}}return typeof i=="string"?i:Oon(i)}function Oon(t){const e=t.reduce((r,o)=>r+o.length,0),n=new Uint8Array(e);let i=0;for(const r of t)n.set(r,i),i+=r.length;return n}function jon(t){return[{type:"span"},t]}function Fon(t){const e=typeof t.data=="string"?DNe(t.data):t.data;return[Eu({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}const $on={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function xXe(t){return $on[t]}function D3e(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function S_t(t,e,n,i){const r=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&i&&{dsn:DF(i)},...r&&{trace:Eu({...r})}}}function Von(t,e,n){const i=[{type:"client_report"},{timestamp:nK(),discarded_events:t}];return SA(e?{dsn:e}:{},[i])}const Bon=60*1e3;function zon(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;const i=Date.parse(`${t}`);return isNaN(i)?Bon:i-e}function Hon(t,e){return t[e]||t.all||0}function N_t(t,e,n=Date.now()){return Hon(t,e)>n}function E_t(t,{statusCode:e,headers:n},i=Date.now()){const r={...t},o=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(o)for(const a of o.trim().split(",")){const[l,c,,,u]=a.split(":",5),d=parseInt(l,10),h=(isNaN(d)?60:d)*1e3;if(!c)r.all=i+h;else for(const f of c.split(";"))f==="metric_bucket"?(!u||u.split(";").includes("custom"))&&(r[f]=i+h):r[f]=i+h}else s?r.all=i+zon(s,i):e===429&&(r.all=i+60*1e3);return r}function Won(t,e){return t??e()}function Og(t){let e,n=t[0],i=1;for(;i<t.length;){const r=t[i],o=t[i+1];if(i+=2,(r==="optionalAccess"||r==="optionalCall")&&n==null)return;r==="access"||r==="optionalAccess"?(e=n,n=o(n)):(r==="call"||r==="optionalCall")&&(n=o((...s)=>n.call(e,...s)),e=void 0)}return n}function ene(){return{traceId:ql(),spanId:ql().substring(16)}}const qX=ms;function Uon(){const t=qX.chrome,e=t&&t.app&&t.app.runtime,n="history"in qX&&!!qX.history.pushState&&!!qX.history.replaceState;return!e&&n}const Ro=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function kF(){return k3e(ms),ms}function k3e(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||uD,e[uD]=e[uD]||{}}function Kon(t){const e=ym(),n={sid:ql(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Gon(n)};return t&&uj(n,t),n}function uj(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||ym(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:ql()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function qon(t,e){let n={};t.status==="ok"&&(n={status:"exited"}),uj(t,n)}function Gon(t){return Eu({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}const kNe="_sentrySpan";function fz(t,e){e?Cv(t,kNe,e):delete t[kNe]}function tne(t){return t[kNe]}const Yon=100;class M3e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=ene()}clone(){const e=new M3e;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,fz(e,tne(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&uj(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const n=typeof e=="function"?e(this):e,[i,r]=n instanceof HD?[n.getScopeData(),n.getRequestSession()]:cj(n)?[e,e.requestSession]:[],{tags:o,extra:s,user:a,contexts:l,level:c,fingerprint:u=[],propagationContext:d}=i||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...s},this._contexts={...this._contexts,...l},a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,fz(this,void 0),this._attachments=[],this._propagationContext=ene(),this._notifyScopeListeners(),this}addBreadcrumb(e,n){const i=typeof n=="number"?n:Yon;if(i<=0)return this;const r={timestamp:nK(),...e},o=this._breadcrumbs;return o.push(r),this._breadcrumbs=o.length>i?o.slice(-i):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:tne(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){const i=n&&n.event_id?n.event_id:ql();if(!this._client)return Zn.warn("No client configured on scope - will not capture exception!"),i;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...n,event_id:i},this),i}captureMessage(e,n,i){const r=i&&i.event_id?i.event_id:ql();if(!this._client)return Zn.warn("No client configured on scope - will not capture message!"),r;const o=new Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:o,...i,event_id:r},this),r}captureEvent(e,n){const i=n&&n.event_id?n.event_id:ql();return this._client?(this._client.captureEvent(e,{...n,event_id:i},this),i):(Zn.warn("No client configured on scope - will not capture event!"),i)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}const HD=M3e;function Xon(){return due("defaultCurrentScope",()=>new HD)}function Zon(){return due("defaultIsolationScope",()=>new HD)}class Qon{constructor(e,n){let i;e?i=e:i=new HD;let r;n?r=n:r=new HD,this._stack=[{scope:i}],this._isolationScope=r}withScope(e){const n=this._pushScope();let i;try{i=e(n)}catch(r){throw this._popScope(),r}return uue(i)?i.then(r=>(this._popScope(),r),r=>{throw this._popScope(),r}):(this._popScope(),i)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function dj(){const t=kF(),e=k3e(t);return e.stack=e.stack||new Qon(Xon(),Zon())}function Jon(t){return dj().withScope(t)}function esn(t,e){const n=dj();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function wXe(t){return dj().withScope(()=>t(dj().getIsolationScope()))}function tsn(){return{withIsolationScope:wXe,withScope:Jon,withSetScope:esn,withSetIsolationScope:(t,e)=>wXe(e),getCurrentScope:()=>dj().getScope(),getIsolationScope:()=>dj().getIsolationScope()}}function iK(t){const e=k3e(t);return e.acs?e.acs:tsn()}function ka(){const t=kF();return iK(t).getCurrentScope()}function Om(){const t=kF();return iK(t).getIsolationScope()}function D_t(){return due("globalScope",()=>new HD)}function hue(...t){const e=kF(),n=iK(e);if(t.length===2){const[i,r]=t;return i?n.withSetScope(i,r):n.withScope(r)}return n.withScope(t[0])}function Bo(){return ka().getClient()}const nsn="_sentryMetrics";function MNe(t){const e=t[nsn];if(!e)return;const n={};for(const[,[i,r]]of e)(n[i]||(n[i]=[])).push(Eu(r));return n}const Lx="sentry.source",k_t="sentry.sample_rate",WD="sentry.op",bd="sentry.origin",LNe="sentry.idle_span_finish_reason",fue="sentry.measurement_unit",mue="sentry.measurement_value",isn="sentry.profile_id",L3e="sentry.exclusive_time",rsn=0,M_t=1,Od=2;function osn(t){if(t<400&&t>=100)return{code:M_t};if(t>=400&&t<500)switch(t){case 401:return{code:Od,message:"unauthenticated"};case 403:return{code:Od,message:"permission_denied"};case 404:return{code:Od,message:"not_found"};case 409:return{code:Od,message:"already_exists"};case 413:return{code:Od,message:"failed_precondition"};case 429:return{code:Od,message:"resource_exhausted"};case 499:return{code:Od,message:"cancelled"};default:return{code:Od,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:Od,message:"unimplemented"};case 503:return{code:Od,message:"unavailable"};case 504:return{code:Od,message:"deadline_exceeded"};default:return{code:Od,message:"internal_error"}}return{code:Od,message:"unknown_error"}}function L_t(t,e){t.setAttribute("http.response.status_code",e);const n=osn(e);n.message!=="unknown_error"&&t.setStatus(n)}const T_t=0,I_t=1;function ssn(t){const{spanId:e,traceId:n}=t.spanContext(),{data:i,op:r,parent_span_id:o,status:s,origin:a}=Gs(t);return Eu({parent_span_id:o,span_id:e,trace_id:n,data:i,op:r,status:s,origin:a})}function asn(t){const{spanId:e,traceId:n}=t.spanContext(),{parent_span_id:i}=Gs(t);return Eu({parent_span_id:i,span_id:e,trace_id:n})}function A_t(t){const{traceId:e,spanId:n}=t.spanContext(),i=NA(t);return E3e(e,n,i)}function YT(t){return typeof t=="number"?CXe(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?CXe(t.getTime()):ym()}function CXe(t){return t>9999999999?t/1e3:t}function Gs(t){if(csn(t))return t.getSpanJSON();try{const{spanId:e,traceId:n}=t.spanContext();if(lsn(t)){const{attributes:i,startTime:r,name:o,endTime:s,parentSpanId:a,status:l}=t;return Eu({span_id:e,trace_id:n,data:i,description:o,parent_span_id:a,start_timestamp:YT(r),timestamp:YT(s)||void 0,status:R_t(l),op:i[WD],origin:i[bd],_metrics_summary:MNe(t)})}return{span_id:e,trace_id:n}}catch{return{}}}function lsn(t){const e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function csn(t){return typeof t.getSpanJSON=="function"}function NA(t){const{traceFlags:e}=t.spanContext();return e===I_t}function R_t(t){if(!(!t||t.code===rsn))return t.code===M_t?"ok":t.message||"unknown_error"}const XT="_sentryChildSpans",TNe="_sentryRootSpan";function P_t(t,e){const n=t[TNe]||t;Cv(e,TNe,n),t[XT]?t[XT].add(e):Cv(t,XT,new Set([e]))}function usn(t,e){t[XT]&&t[XT].delete(e)}function tee(t){const e=new Set;function n(i){if(!e.has(i)&&NA(i)){e.add(i);const r=i[XT]?Array.from(i[XT]):[];for(const o of r)n(o)}}return n(t),Array.from(e)}function Mh(t){return t[TNe]||t}function Wh(){const t=kF(),e=iK(t);return e.getActiveSpan?e.getActiveSpan():tne(ka())}let SXe=!1;function dsn(){SXe||(SXe=!0,p_t(INe),g_t(INe))}function INe(){const t=Wh(),e=t&&Mh(t);if(e){const n="internal_error";Ro&&Zn.log(`[Tracing] Root span: ${n} -> Global error occured`),e.setStatus({code:Od,message:n})}}INe.tag="sentry_tracingErrorCallback";const O_t="_sentryScope",j_t="_sentryIsolationScope";function hsn(t,e,n){t&&(Cv(t,j_t,n),Cv(t,O_t,e))}function NXe(t){return{scope:t[O_t],isolationScope:t[j_t]}}function QC(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=Bo(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class MF{constructor(e={}){this._traceId=e.traceId||ql(),this._spanId=e.spanId||ql().substring(16)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:T_t}}end(e){}setAttribute(e,n){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,n,i){return this}addLink(e){return this}addLinks(e){return this}recordException(e,n){}}const T3e="production",F_t="_frozenDsc";function EXe(t,e){Cv(t,F_t,e)}function pue(t,e){const n=e.getOptions(),{publicKey:i}=e.getDsn()||{},r=Eu({environment:n.environment||T3e,release:n.release,public_key:i,trace_id:t});return e.emit("createDsc",r),r}function Fk(t){const e=Bo();if(!e)return{};const n=pue(Gs(t).trace_id||"",e),i=Mh(t),r=i[F_t];if(r)return r;const o=i.spanContext().traceState,s=o&&o.get("sentry.dsc"),a=s&&w_t(s);if(a)return a;const l=Gs(i),c=l.data||{},u=c[k_t];u!=null&&(n.sample_rate=`${u}`);const d=c[Lx],h=l.description;return d!=="url"&&h&&(n.transaction=h),QC()&&(n.sampled=String(NA(i))),e.emit("createDsc",n,i),n}function fsn(t){if(!Ro)return;const{description:e="< unknown name >",op:n="< unknown op >",parent_span_id:i}=Gs(t),{spanId:r}=t.spanContext(),o=NA(t),s=Mh(t),a=s===t,l=`[Tracing] Starting ${o?"sampled":"unsampled"} ${a?"root ":""}span`,c=[`op: ${n}`,`name: ${e}`,`ID: ${r}`];if(i&&c.push(`parent ID: ${i}`),!a){const{op:u,description:d}=Gs(s);c.push(`root ID: ${s.spanContext().spanId}`),u&&c.push(`root op: ${u}`),d&&c.push(`root description: ${d}`)}Zn.log(`${l}
  ${c.join(`
  `)}`)}function msn(t){if(!Ro)return;const{description:e="< unknown name >",op:n="< unknown op >"}=Gs(t),{spanId:i}=t.spanContext(),o=Mh(t)===t,s=`[Tracing] Finishing "${n}" ${o?"root ":""}span "${e}" with ID ${i}`;Zn.log(s)}function nne(t){if(typeof t=="boolean")return Number(t);const e=typeof t=="string"?parseFloat(t):t;if(typeof e!="number"||isNaN(e)||e<0||e>1){Ro&&Zn.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`);return}return e}function psn(t,e){if(!QC(t))return[!1];let n;typeof t.tracesSampler=="function"?n=t.tracesSampler(e):e.parentSampled!==void 0?n=e.parentSampled:typeof t.tracesSampleRate<"u"?n=t.tracesSampleRate:n=1;const i=nne(n);return i===void 0?(Ro&&Zn.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):i?Math.random()<i?[!0,i]:(Ro&&Zn.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),[!1,i]):(Ro&&Zn.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i])}function gsn(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function bsn(t,e,n,i){const r=D3e(n),o={sent_at:new Date().toISOString(),...r&&{sdk:r},...!!i&&e&&{dsn:DF(e)}},s="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return SA(o,[s])}function vsn(t,e,n,i){const r=D3e(n),o=t.type&&t.type!=="replay_event"?t.type:"event";gsn(t,n&&n.sdk);const s=S_t(t,r,i,e);return delete t.sdkProcessingMetadata,SA(s,[[{type:o},t]])}function ysn(t,e){function n(u){return!!u.trace_id&&!!u.public_key}const i=Fk(t[0]),r=e&&e.getDsn(),o=e&&e.getOptions().tunnel,s={sent_at:new Date().toISOString(),...n(i)&&{trace:i},...!!o&&r&&{dsn:DF(r)}},a=e&&e.getOptions().beforeSendSpan,l=a?u=>a(Gs(u)):u=>Gs(u),c=[];for(const u of t){const d=l(u);d&&c.push(jon(d))}return SA(s,c)}function _sn(t,e,n,i=Wh()){const r=i&&Mh(i);r&&r.addEvent(t,{[mue]:e,[fue]:n})}function DXe(t){if(!t||t.length===0)return;const e={};return t.forEach(n=>{const i=n.attributes||{},r=i[fue],o=i[mue];typeof r=="string"&&typeof o=="number"&&(e[n.name]={value:o,unit:r})}),e}const kXe=1e3;class I3e{constructor(e={}){this._traceId=e.traceId||ql(),this._spanId=e.spanId||ql().substring(16),this._startTime=e.startTimestamp||ym(),this._attributes={},this.setAttributes({[bd]:"manual",[WD]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this}addLinks(e){return this}recordException(e,n){}spanContext(){const{_spanId:e,_traceId:n,_sampled:i}=this;return{spanId:e,traceId:n,traceFlags:i?I_t:T_t}}setAttribute(e,n){return n===void 0?delete this._attributes[e]:this._attributes[e]=n,this}setAttributes(e){return Object.keys(e).forEach(n=>this.setAttribute(n,e[n])),this}updateStartTime(e){this._startTime=YT(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this}end(e){this._endTime||(this._endTime=YT(e),msn(this),this._onSpanEnded())}getSpanJSON(){return Eu({data:this._attributes,description:this._name,op:this._attributes[WD],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:R_t(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[bd],_metrics_summary:MNe(this),profile_id:this._attributes[isn],exclusive_time:this._attributes[L3e],measurements:DXe(this._events),is_segment:this._isStandaloneSpan&&Mh(this)===this||void 0,segment_id:this._isStandaloneSpan?Mh(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,n,i){Ro&&Zn.log("[Tracing] Adding an event to span:",e);const r=MXe(n)?n:i||ym(),o=MXe(n)?{}:n||{},s={name:e,time:YT(r),attributes:o};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=Bo();if(e&&e.emit("spanEnd",this),!(this._isStandaloneSpan||this===Mh(this)))return;if(this._isStandaloneSpan){this._sampled?wsn(ysn([this],e)):(Ro&&Zn.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span"));return}const i=this._convertSpanToTransaction();i&&(NXe(this).scope||ka()).captureEvent(i)}_convertSpanToTransaction(){if(!LXe(Gs(this)))return;this._name||(Ro&&Zn.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:n}=NXe(this),r=(e||ka()).getClient()||Bo();if(this._sampled!==!0){Ro&&Zn.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),r&&r.recordDroppedEvent("sample_rate","transaction");return}const s=tee(this).filter(d=>d!==this&&!xsn(d)).map(d=>Gs(d)).filter(LXe),a=this._attributes[Lx],l={contexts:{trace:ssn(this)},spans:s.length>kXe?s.sort((d,h)=>d.start_timestamp-h.start_timestamp).slice(0,kXe):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:n,...Eu({dynamicSamplingContext:Fk(this)})},_metrics_summary:MNe(this),...a&&{transaction_info:{source:a}}},c=DXe(this._events);return c&&Object.keys(c).length&&(Ro&&Zn.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),l.measurements=c),l}}function MXe(t){return t&&typeof t=="number"||t instanceof Date||Array.isArray(t)}function LXe(t){return!!t.start_timestamp&&!!t.timestamp&&!!t.span_id&&!!t.trace_id}function xsn(t){return t instanceof I3e&&t.isStandaloneSpan()}function wsn(t){const e=Bo();if(!e)return;const n=t[1];if(!n||n.length===0){e.recordDroppedEvent("before_send","span");return}const i=e.getTransport();i&&i.send(t).then(null,r=>{Ro&&Zn.error("Error while sending span:",r)})}const $_t="__SENTRY_SUPPRESS_TRACING__";function $k(t){const e=B_t();if(e.startInactiveSpan)return e.startInactiveSpan(t);const n=Ssn(t),{forceTransaction:i,parentSpan:r}=t;return(t.scope?s=>hue(t.scope,s):r!==void 0?s=>V_t(r,s):s=>s())(()=>{const s=ka(),a=Esn(s);return t.onlyIfParent&&!a?new MF:Csn({parentSpan:a,spanArguments:n,forceTransaction:i,scope:s})})}function V_t(t,e){const n=B_t();return n.withActiveSpan?n.withActiveSpan(t,e):hue(i=>(fz(i,t||void 0),e(i)))}function Csn({parentSpan:t,spanArguments:e,forceTransaction:n,scope:i}){if(!QC())return new MF;const r=Om();let o;if(t&&!n)o=Nsn(t,i,e),P_t(t,o);else if(t){const s=Fk(t),{traceId:a,spanId:l}=t.spanContext(),c=NA(t);o=TXe({traceId:a,parentSpanId:l,...e},i,c),EXe(o,s)}else{const{traceId:s,dsc:a,parentSpanId:l,sampled:c}={...r.getPropagationContext(),...i.getPropagationContext()};o=TXe({traceId:s,parentSpanId:l,...e},i,c),a&&EXe(o,a)}return fsn(o),hsn(o,i,r),o}function Ssn(t){const n={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const i={...n};return i.startTimestamp=YT(t.startTime),delete i.startTime,i}return n}function B_t(){const t=kF();return iK(t)}function TXe(t,e,n){const i=Bo(),r=i&&i.getOptions()||{},{name:o="",attributes:s}=t,[a,l]=e.getScopeData().sdkProcessingMetadata[$_t]?[!1]:psn(r,{name:o,parentSampled:n,attributes:s,transactionContext:{name:o,parentSampled:n}}),c=new I3e({...t,attributes:{[Lx]:"custom",...t.attributes},sampled:a});return l!==void 0&&c.setAttribute(k_t,l),i&&i.emit("spanStart",c),c}function Nsn(t,e,n){const{spanId:i,traceId:r}=t.spanContext(),o=e.getScopeData().sdkProcessingMetadata[$_t]?!1:NA(t),s=o?new I3e({...n,parentSpanId:i,traceId:r,sampled:o}):new MF({traceId:r});P_t(t,s);const a=Bo();return a&&(a.emit("spanStart",s),n.endTimestamp&&a.emit("spanEnd",s)),s}function Esn(t){const e=tne(t);if(!e)return;const n=Bo();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?Mh(e):e}const nee={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Dsn="heartbeatFailed",ksn="idleTimeout",Msn="finalTimeout",Lsn="externalFinish";function z_t(t,e={}){const n=new Map;let i=!1,r,o=Lsn,s=!e.disableAutoFinish;const a=[],{idleTimeout:l=nee.idleTimeout,finalTimeout:c=nee.finalTimeout,childSpanTimeout:u=nee.childSpanTimeout,beforeSpanEnd:d}=e,h=Bo();if(!h||!QC())return new MF;const f=ka(),m=Wh(),p=Tsn(t);p.end=new Proxy(p.end,{apply(E,D,k){d&&d(p);const[M,...T]=k,A=M||ym(),R=YT(A),P=tee(p).filter(B=>B!==p);if(!P.length)return N(R),Reflect.apply(E,D,[R,...T]);const O=P.map(B=>Gs(B).timestamp).filter(B=>!!B),V=O.length?Math.max(...O):void 0,F=Gs(p).start_timestamp,$=Math.min(F?F+c/1e3:1/0,Math.max(F||-1/0,Math.min(R,V||1/0)));return N($),Reflect.apply(E,D,[$,...T])}});function g(){r&&(clearTimeout(r),r=void 0)}function y(E){g(),r=setTimeout(()=>{!i&&n.size===0&&s&&(o=ksn,p.end(E))},l)}function _(E){r=setTimeout(()=>{!i&&s&&(o=Dsn,p.end(E))},u)}function w(E){g(),n.set(E,!0);const D=ym();_(D+u/1e3)}function C(E){if(n.has(E)&&n.delete(E),n.size===0){const D=ym();y(D+l/1e3)}}function N(E){i=!0,n.clear(),a.forEach(R=>R()),fz(f,m);const D=Gs(p),{start_timestamp:k}=D;if(!k)return;(D.data||{})[LNe]||p.setAttribute(LNe,o),Zn.log(`[Tracing] Idle span "${D.op}" finished`);const T=tee(p).filter(R=>R!==p);let A=0;T.forEach(R=>{R.isRecording()&&(R.setStatus({code:Od,message:"cancelled"}),R.end(E),Ro&&Zn.log("[Tracing] Cancelling span since span ended early",JSON.stringify(R,void 0,2)));const P=Gs(R),{timestamp:O=0,start_timestamp:V=0}=P,F=V<=E,$=(c+l)/1e3,B=O-V<=$;if(Ro){const z=JSON.stringify(R,void 0,2);F?B||Zn.log("[Tracing] Discarding span since it finished after idle span final timeout",z):Zn.log("[Tracing] Discarding span since it happened after idle span was finished",z)}(!B||!F)&&(usn(p,R),A++)}),A>0&&p.setAttribute("sentry.idle_span_discarded_spans",A)}return a.push(h.on("spanStart",E=>{if(i||E===p||Gs(E).timestamp)return;tee(p).includes(E)&&w(E.spanContext().spanId)})),a.push(h.on("spanEnd",E=>{i||C(E.spanContext().spanId)})),a.push(h.on("idleSpanEnableAutoFinish",E=>{E===p&&(s=!0,y(),n.size&&_())})),e.disableAutoFinish||y(),setTimeout(()=>{i||(p.setStatus({code:Od,message:"deadline_exceeded"}),o=Msn,p.end())},c),p}function Tsn(t){const e=$k(t);return fz(ka(),e),Ro&&Zn.log("[Tracing] Started span is an idle span"),e}function ANe(t,e,n,i=0){return new ev((r,o)=>{const s=t[i];if(e===null||typeof s!="function")r(e);else{const a=s({...e},n);Ro&&s.id&&a===null&&Zn.log(`Event processor "${s.id}" dropped event`),uue(a)?a.then(l=>ANe(t,l,n,i+1).then(r)).then(null,o):ANe(t,a,n,i+1).then(r).then(null,o)}})}function Isn(t,e){const{fingerprint:n,span:i,breadcrumbs:r,sdkProcessingMetadata:o}=e;Asn(t,e),i&&Osn(t,i),jsn(t,n),Rsn(t,r),Psn(t,o)}function IXe(t,e){const{extra:n,tags:i,user:r,contexts:o,level:s,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:c,eventProcessors:u,attachments:d,propagationContext:h,transactionName:f,span:m}=e;dV(t,"extra",n),dV(t,"tags",i),dV(t,"user",r),dV(t,"contexts",o),dV(t,"sdkProcessingMetadata",a),s&&(t.level=s),f&&(t.transactionName=f),m&&(t.span=m),l.length&&(t.breadcrumbs=[...t.breadcrumbs,...l]),c.length&&(t.fingerprint=[...t.fingerprint,...c]),u.length&&(t.eventProcessors=[...t.eventProcessors,...u]),d.length&&(t.attachments=[...t.attachments,...d]),t.propagationContext={...t.propagationContext,...h}}function dV(t,e,n){if(n&&Object.keys(n).length){t[e]={...t[e]};for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[e][i]=n[i])}}function Asn(t,e){const{extra:n,tags:i,user:r,contexts:o,level:s,transactionName:a}=e,l=Eu(n);l&&Object.keys(l).length&&(t.extra={...l,...t.extra});const c=Eu(i);c&&Object.keys(c).length&&(t.tags={...c,...t.tags});const u=Eu(r);u&&Object.keys(u).length&&(t.user={...u,...t.user});const d=Eu(o);d&&Object.keys(d).length&&(t.contexts={...d,...t.contexts}),s&&(t.level=s),a&&t.type!=="transaction"&&(t.transaction=a)}function Rsn(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function Psn(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function Osn(t,e){t.contexts={trace:asn(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Fk(e),...t.sdkProcessingMetadata};const n=Mh(e),i=Gs(n).description;i&&!t.transaction&&t.type==="transaction"&&(t.transaction=i)}function jsn(t,e){t.fingerprint=t.fingerprint?v_t(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}function H_t(t,e,n,i,r,o){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=t,l={...e,event_id:e.event_id||n.event_id||ql(),timestamp:e.timestamp||nK()},c=n.integrations||t.integrations.map(g=>g.name);Fsn(l,t),Bsn(l,c),r&&r.emit("applyFrameMetadata",e),e.type===void 0&&$sn(l,t.stackParser);const u=Hsn(i,n.captureContext);n.mechanism&&hz(l,n.mechanism);const d=r?r.getEventProcessors():[],h=D_t().getScopeData();if(o){const g=o.getScopeData();IXe(h,g)}if(u){const g=u.getScopeData();IXe(h,g)}const f=[...n.attachments||[],...h.attachments];f.length&&(n.attachments=f),Isn(l,h);const m=[...d,...h.eventProcessors];return ANe(m,l,n).then(g=>(g&&Vsn(g),typeof s=="number"&&s>0?zsn(g,s,a):g))}function Fsn(t,e){const{environment:n,release:i,dist:r,maxValueLength:o=250}=e;"environment"in t||(t.environment="environment"in e?n:T3e),t.release===void 0&&i!==void 0&&(t.release=i),t.dist===void 0&&r!==void 0&&(t.dist=r),t.message&&(t.message=J4(t.message,o));const s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=J4(s.value,o));const a=t.request;a&&a.url&&(a.url=J4(a.url,o))}const AXe=new WeakMap;function $sn(t,e){const n=ms._sentryDebugIds;if(!n)return;let i;const r=AXe.get(e);r?i=r:(i=new Map,AXe.set(e,i));const o=Object.entries(n).reduce((s,[a,l])=>{let c;const u=i.get(a);u?c=u:(c=e(a),i.set(a,c));for(let d=c.length-1;d>=0;d--){const h=c[d];if(h.filename){s[h.filename]=l;break}}return s},{});try{t.exception.values.forEach(s=>{s.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=o[a.filename])})})}catch{}}function Vsn(t){const e={};try{t.exception.values.forEach(i=>{i.stacktrace.frames.forEach(r=>{r.debug_id&&(r.abs_path?e[r.abs_path]=r.debug_id:r.filename&&(e[r.filename]=r.debug_id),delete r.debug_id)})})}catch{}if(Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.entries(e).forEach(([i,r])=>{n.push({type:"sourcemap",code_file:i,debug_id:r})})}function Bsn(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function zsn(t,e,n){if(!t)return null;const i={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(r=>({...r,...r.data&&{data:mx(r.data,e,n)}}))},...t.user&&{user:mx(t.user,e,n)},...t.contexts&&{contexts:mx(t.contexts,e,n)},...t.extra&&{extra:mx(t.extra,e,n)}};return t.contexts&&t.contexts.trace&&i.contexts&&(i.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(i.contexts.trace.data=mx(t.contexts.trace.data,e,n))),t.spans&&(i.spans=t.spans.map(r=>({...r,...r.data&&{data:mx(r.data,e,n)}}))),i}function Hsn(t,e){if(!e)return t;const n=t?t.clone():new HD;return n.update(e),n}function Wsn(t){if(t)return Usn(t)?{captureContext:t}:qsn(t)?{captureContext:t}:t}function Usn(t){return t instanceof HD||typeof t=="function"}const Ksn=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function qsn(t){return Object.keys(t).some(e=>Ksn.includes(e))}function rK(t,e){return ka().captureException(t,Wsn(e))}function W_t(t,e){return ka().captureEvent(t,e)}function U_t(t,e){Om().setContext(t,e)}function Gsn(t){Om().setUser(t)}function Ysn(){return Om().lastEventId()}function Xsn(t){Om().addEventProcessor(t)}function RXe(t){const e=Bo(),n=Om(),i=ka(),{release:r,environment:o=T3e}=e&&e.getOptions()||{},{userAgent:s}=ms.navigator||{},a=Kon({release:r,environment:o,user:i.getUser()||n.getUser(),...s&&{userAgent:s},...t}),l=n.getSession();return l&&l.status==="ok"&&uj(l,{status:"exited"}),K_t(),n.setSession(a),i.setSession(a),a}function K_t(){const t=Om(),e=ka(),n=e.getSession()||t.getSession();n&&qon(n),q_t(),t.setSession(),e.setSession()}function q_t(){const t=Om(),e=ka(),n=Bo(),i=e.getSession()||t.getSession();i&&n&&n.captureSession(i)}function PXe(t=!1){if(t){K_t();return}q_t()}const Zsn="7";function G_t(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Qsn(t){return`${G_t(t)}${t.projectId}/envelope/`}function Jsn(t,e){return ton({sentry_key:t.publicKey,sentry_version:Zsn,...e&&{sentry_client:`${e.name}/${e.version}`}})}function ean(t,e,n){return e||`${Qsn(t)}?${Jsn(t,n)}`}function tan(t,e){const n=s_t(t);if(!n)return"";const i=`${G_t(n)}embed/error-page/`;let r=`dsn=${DF(n)}`;for(const o in e)if(o!=="dsn"&&o!=="onClose")if(o==="user"){const s=e.user;if(!s)continue;s.name&&(r+=`&name=${encodeURIComponent(s.name)}`),s.email&&(r+=`&email=${encodeURIComponent(s.email)}`)}else r+=`&${encodeURIComponent(o)}=${encodeURIComponent(e[o])}`;return`${i}?${r}`}const OXe=[];function nan(t){const e={};return t.forEach(n=>{const{name:i}=n,r=e[i];r&&!r.isDefaultInstance&&n.isDefaultInstance||(e[i]=n)}),Object.values(e)}function ian(t){const e=t.defaultIntegrations||[],n=t.integrations;e.forEach(s=>{s.isDefaultInstance=!0});let i;Array.isArray(n)?i=[...e,...n]:typeof n=="function"?i=v_t(n(e)):i=e;const r=nan(i),o=r.findIndex(s=>s.name==="Debug");if(o>-1){const[s]=r.splice(o,1);r.push(s)}return r}function ran(t,e){const n={};return e.forEach(i=>{i&&Y_t(t,i,n)}),n}function jXe(t,e){for(const n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function Y_t(t,e,n){if(n[e.name]){Ro&&Zn.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,OXe.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),OXe.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){const i=e.preprocessEvent.bind(e);t.on("preprocessEvent",(r,o)=>i(r,o,t))}if(typeof e.processEvent=="function"){const i=e.processEvent.bind(e),r=Object.assign((o,s)=>i(o,s,t),{id:e.name});t.addEventProcessor(r)}Ro&&Zn.log(`Integration installed: ${e.name}`)}const FXe="Not capturing exception because it's already been captured.";class oan{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=s_t(e.dsn):Ro&&Zn.warn("No DSN provided, client will not send events."),this._dsn){const n=ean(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}}captureException(e,n,i){const r=ql();if(vXe(e))return Ro&&Zn.log(FXe),r;const o={event_id:r,...n};return this._process(this.eventFromException(e,o).then(s=>this._captureEvent(s,o,i))),o.event_id}captureMessage(e,n,i,r){const o={event_id:ql(),...i},s=w3e(e)?e:String(e),a=C3e(e)?this.eventFromMessage(s,n,o):this.eventFromException(e,o);return this._process(a.then(l=>this._captureEvent(l,o,r))),o.event_id}captureEvent(e,n,i){const r=ql();if(n&&n.originalException&&vXe(n.originalException))return Ro&&Zn.log(FXe),r;const o={event_id:r,...n},a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,o,a||i)),o.event_id}captureSession(e){typeof e.release!="string"?Ro&&Zn.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),uj(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(e).then(i=>n.flush(e).then(r=>i&&r))):ZC(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const n=this._integrations[e.name];Y_t(this,e,this._integrations),n||jXe(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let i=vsn(e,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])i=Ron(i,Fon(o));const r=this.sendEnvelope(i);r&&r.then(o=>this.emit("afterSendEvent",e,o),null)}sendSession(e){const n=bsn(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(e,n,i){if(this._options.sendClientReports){const r=typeof i=="number"?i:1,o=`${e}:${n}`;Ro&&Zn.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(e,n){const i=this._hooks[e]=this._hooks[e]||[];return i.push(n),()=>{const r=i.indexOf(n);r>-1&&i.splice(r,1)}}emit(e,...n){const i=this._hooks[e];i&&i.forEach(r=>r(...n))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,n=>(Ro&&Zn.error("Error while sending event:",n),n)):(Ro&&Zn.error("Transport disabled"),ZC({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=ran(this,e),jXe(this,e)}_updateSessionFromEvent(e,n){let i=!1,r=!1;const o=n.exception&&n.exception.values;if(o){r=!0;for(const l of o){const c=l.mechanism;if(c&&c.handled===!1){i=!0;break}}}const s=e.status==="ok";(s&&e.errors===0||s&&i)&&(uj(e,{...i&&{status:"crashed"},errors:e.errors||Number(r||i)}),this.captureSession(e))}_isClientDoneProcessing(e){return new ev(n=>{let i=0;const r=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(i+=r,e&&i>=e&&(clearInterval(o),n(!1)))},r)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,i,r=Om()){const o=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s.length>0&&(n.integrations=s),this.emit("preprocessEvent",e,n),e.type||r.setLastEventId(e.event_id||n.event_id),H_t(o,e,n,i,this,r).then(a=>{if(a===null)return a;const l={...r.getPropagationContext(),...i?i.getPropagationContext():void 0};if(!(a.contexts&&a.contexts.trace)&&l){const{traceId:u,spanId:d,parentSpanId:h,dsc:f}=l;a.contexts={trace:Eu({trace_id:u,span_id:d,parent_span_id:h}),...a.contexts};const m=f||pue(u,this);a.sdkProcessingMetadata={dynamicSamplingContext:m,...a.sdkProcessingMetadata}}return a})}_captureEvent(e,n={},i){return this._processEvent(e,n,i).then(r=>r.event_id,r=>{if(Ro){const o=r;o.logLevel==="log"?Zn.log(o.message):Zn.warn(o)}})}_processEvent(e,n,i){const r=this.getOptions(),{sampleRate:o}=r,s=Z_t(e),a=X_t(e),l=e.type||"error",c=`before send for type \`${l}\``,u=typeof o>"u"?void 0:nne(o);if(a&&typeof u=="number"&&Math.random()>u)return this.recordDroppedEvent("sample_rate","error",e),Jte(new xx(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const d=l==="replay_event"?"replay":l,f=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,n,i,f).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",d,e),new xx("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return m;const g=aan(this,r,m,n);return san(g,c)}).then(m=>{if(m===null){if(this.recordDroppedEvent("before_send",d,e),s){const _=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",_)}throw new xx(`${c} returned \`null\`, will not send event.`,"log")}const p=i&&i.getSession();if(!s&&p&&this._updateSessionFromEvent(p,m),s){const y=m.sdkProcessingMetadata&&m.sdkProcessingMetadata.spanCountBeforeProcessing||0,_=m.spans?m.spans.length:0,w=y-_;w>0&&this.recordDroppedEvent("before_send","span",w)}const g=m.transaction_info;if(s&&g&&m.transaction!==e.transaction){const y="custom";m.transaction_info={...g,source:y}}return this.sendEvent(m,n),m}).then(null,m=>{throw m instanceof xx?m:(this.captureException(m,{data:{__sentry__:!0},originalException:m}),new xx(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${m}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([n,i])=>{const[r,o]=n.split(":");return{reason:r,category:o,quantity:i}})}_flushOutcomes(){Ro&&Zn.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0){Ro&&Zn.log("No outcomes to send");return}if(!this._dsn){Ro&&Zn.log("No dsn provided, will not send outcomes");return}Ro&&Zn.log("Sending outcomes:",e);const n=Von(e,this._options.tunnel&&DF(this._dsn));this.sendEnvelope(n)}}function san(t,e){const n=`${e} must return \`null\` or a valid event.`;if(uue(t))return t.then(i=>{if(!cj(i)&&i!==null)throw new xx(n);return i},i=>{throw new xx(`${e} rejected with ${i}`)});if(!cj(t)&&t!==null)throw new xx(n);return t}function aan(t,e,n,i){const{beforeSend:r,beforeSendTransaction:o,beforeSendSpan:s}=e;if(X_t(n)&&r)return r(n,i);if(Z_t(n)){if(n.spans&&s){const a=[];for(const l of n.spans){const c=s(l);c?a.push(c):t.recordDroppedEvent("before_send","span")}n.spans=a}if(o){if(n.spans){const a=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:a}}return o(n,i)}}return n}function X_t(t){return t.type===void 0}function Z_t(t){return t.type==="transaction"}function lan(t,e){e.debug===!0&&(Ro?Zn.enable():EF(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ka().update(e.initialScope);const i=new t(e);return can(i),i.init(),i}function can(t){ka().setClient(t)}const uan=64;function dan(t,e,n=Non(t.bufferSize||uan)){let i={};const r=s=>n.drain(s);function o(s){const a=[];if(_Xe(s,(d,h)=>{const f=xXe(h);if(N_t(i,f)){const m=$Xe(d,h);t.recordDroppedEvent("ratelimit_backoff",f,m)}else a.push(d)}),a.length===0)return ZC({});const l=SA(s[0],a),c=d=>{_Xe(l,(h,f)=>{const m=$Xe(h,f);t.recordDroppedEvent(d,xXe(f),m)})},u=()=>e({body:Pon(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&Ro&&Zn.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),i=E_t(i,d),d),d=>{throw c("network_error"),d});return n.add(u).then(d=>d,d=>{if(d instanceof xx)return Ro&&Zn.error("Skipped sending event because buffer is full."),c("queue_overflow"),ZC({});throw d})}return{send:o,flush:r}}function $Xe(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}function han(t,e){const n=e&&e.getDsn(),i=e&&e.getOptions().tunnel;return man(t,n)||fan(t,i)}function fan(t,e){return e?VXe(t)===VXe(e):!1}function man(t,e){return e?t.includes(e.host):!1}function VXe(t){return t[t.length-1]==="/"?t.slice(0,-1):t}function Q_t(t,e,n=[e],i="npm"){const r=t._metadata||{};r.sdk||(r.sdk={name:`sentry.javascript.${e}`,packages:n.map(o=>({name:`${i}:@sentry/${o}`,version:uD})),version:uD}),t._metadata=r}const pan=100;function UD(t,e){const n=Bo(),i=Om();if(!n)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:o=pan}=n.getOptions();if(o<=0)return;const a={timestamp:nK(),...t},l=r?EF(()=>r(a,e)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,e),i.addBreadcrumb(l,o))}let BXe;const gan="FunctionToString",zXe=new WeakMap,ban=()=>({name:gan,setupOnce(){BXe=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=N3e(this),n=zXe.has(Bo())&&e!==void 0?e:this;return BXe.apply(n,t)}}catch{}},setup(t){zXe.set(t,!0)}}),van=ban,yan=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],_an="InboundFilters",xan=(t={})=>({name:_an,processEvent(e,n,i){const r=i.getOptions(),o=Can(t,r);return San(e,o)?null:e}}),wan=xan;function Can(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:yan],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function San(t,e){return e.ignoreInternal&&Lan(t)?(Ro&&Zn.warn(`Event dropped due to being internal Sentry Error.
Event: ${JN(t)}`),!0):Nan(t,e.ignoreErrors)?(Ro&&Zn.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
Event: ${JN(t)}`),!0):Ian(t)?(Ro&&Zn.warn(`Event dropped due to not having an error message, error type or stacktrace.
Event: ${JN(t)}`),!0):Ean(t,e.ignoreTransactions)?(Ro&&Zn.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
Event: ${JN(t)}`),!0):Dan(t,e.denyUrls)?(Ro&&Zn.warn(`Event dropped due to being matched by \`denyUrls\` option.
Event: ${JN(t)}.
Url: ${ine(t)}`),!0):kan(t,e.allowUrls)?!1:(Ro&&Zn.warn(`Event dropped due to not being matched by \`allowUrls\` option.
Event: ${JN(t)}.
Url: ${ine(t)}`),!0)}function Nan(t,e){return t.type||!e||!e.length?!1:Man(t).some(n=>cD(n,e))}function Ean(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;const n=t.transaction;return n?cD(n,e):!1}function Dan(t,e){if(!e||!e.length)return!1;const n=ine(t);return n?cD(n,e):!1}function kan(t,e){if(!e||!e.length)return!0;const n=ine(t);return n?cD(n,e):!0}function Man(t){const e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch{}return n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`)),e}function Lan(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function Tan(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function ine(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?Tan(e):null}catch{return Ro&&Zn.error(`Cannot extract url for event ${JN(t)}`),null}}function Ian(t){return t.type||!t.exception||!t.exception.values||t.exception.values.length===0?!1:!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value)}const Aan="Dedupe",Ran=()=>{let t;return{name:Aan,processEvent(e){if(e.type)return e;try{if(Oan(e,t))return Ro&&Zn.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},Pan=Ran;function Oan(t,e){return e?!!(jan(t,e)||Fan(t,e)):!1}function jan(t,e){const n=t.message,i=e.message;return!(!n&&!i||n&&!i||!n&&i||n!==i||!ext(t,e)||!J_t(t,e))}function Fan(t,e){const n=HXe(e),i=HXe(t);return!(!n||!i||n.type!==i.type||n.value!==i.value||!ext(t,e)||!J_t(t,e))}function J_t(t,e){let n=pXe(t),i=pXe(e);if(!n&&!i)return!0;if(n&&!i||!n&&i||(n=n,i=i,i.length!==n.length))return!1;for(let r=0;r<i.length;r++){const o=i[r],s=n[r];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function ext(t,e){let n=t.fingerprint,i=e.fingerprint;if(!n&&!i)return!0;if(n&&!i||!n&&i)return!1;n=n,i=i;try{return n.join("")===i.join("")}catch{return!1}}function HXe(t){return t.exception&&t.exception.values&&t.exception.values[0]}function $an(t,e,n,i,r="auto.http.browser"){if(!t.fetchData)return;const o=QC()&&e(t.fetchData.url);if(t.endTimestamp&&o){const m=t.fetchData.__span;if(!m)return;const p=i[m];p&&(zan(p,t),delete i[m]);return}const s=ka(),a=Bo(),{method:l,url:c}=t.fetchData,u=Ban(c),d=u?GT(u).host:void 0,h=!!Wh(),f=o&&h?$k({name:`${l} ${c}`,attributes:{url:c,type:"fetch","http.method":l,"http.url":u,"server.address":d,[bd]:r,[WD]:"http.client"}}):new MF;if(t.fetchData.__span=f.spanContext().spanId,i[f.spanContext().spanId]=f,n(t.fetchData.url)&&a){const m=t.args[0];t.args[1]=t.args[1]||{};const p=t.args[1];p.headers=Van(m,a,s,p,QC()&&h?f:void 0)}return f}function Van(t,e,n,i,r){const o=Om(),{traceId:s,spanId:a,sampled:l,dsc:c}={...o.getPropagationContext(),...n.getPropagationContext()},u=r?A_t(r):E3e(s,a,l),d=C_t(c||(r?Fk(r):pue(s,e))),h=i.headers||(typeof Request<"u"&&GC(t,Request)?t.headers:void 0);if(h)if(typeof Headers<"u"&&GC(h,Headers)){const f=new Headers(h);return f.append("sentry-trace",u),d&&f.append(ENe,d),f}else if(Array.isArray(h)){const f=[...h,["sentry-trace",u]];return d&&f.push([ENe,d]),f}else{const f="baggage"in h?h.baggage:void 0,m=[];return Array.isArray(f)?m.push(...f):f&&m.push(f),d&&m.push(d),{...h,"sentry-trace":u,baggage:m.length>0?m.join(","):void 0}}else return{"sentry-trace":u,baggage:d}}function Ban(t){try{return new URL(t).href}catch{return}}function zan(t,e){if(e.response){L_t(t,e.response.status);const n=e.response&&e.response.headers&&e.response.headers.get("content-length");if(n){const i=parseInt(n);i>0&&t.setAttribute("http.response_content_length",i)}}else e.error&&t.setStatus({code:Od,message:"internal_error"});t.end()}function Han(t,e={},n=ka()){const{message:i,name:r,email:o,url:s,source:a,associatedEventId:l,tags:c}=t,u={contexts:{feedback:Eu({contact_email:o,name:r,message:i,url:s,source:a,associated_event_id:l})},type:"feedback",level:"info",tags:c},d=n&&n.getClient()||Bo();return d&&d.emit("beforeSendFeedback",u,e),n.captureEvent(u,e)}const vr=ms;let RNe=0;function txt(){return RNe>0}function Wan(){RNe++,setTimeout(()=>{RNe--})}function hj(t,e={},n){if(typeof t!="function")return t;try{const r=t.__sentry_wrapped__;if(r)return typeof r=="function"?r:t;if(N3e(t))return t}catch{return t}const i=function(){const r=Array.prototype.slice.call(arguments);try{const o=r.map(s=>hj(s,e));return t.apply(this,o)}catch(o){throw Wan(),hue(s=>{s.addEventProcessor(a=>(e.mechanism&&(SNe(a,void 0),hz(a,e.mechanism)),a.extra={...a.extra,arguments:r},a)),rK(o)}),o}};try{for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}catch{}a_t(i,t),Cv(t,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get(){return t.name}})}catch{}return i}const Sp=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function A3e(t,e){const n=R3e(t,e),i={type:Yan(e),value:Xan(e)};return n.length&&(i.stacktrace={frames:n}),i.type===void 0&&i.value===""&&(i.value="Unrecoverable error caught"),i}function Uan(t,e,n,i){const r=Bo(),o=r&&r.getOptions().normalizeDepth,s=tln(e),a={__serialized__:y_t(e,o)};if(s)return{exception:{values:[A3e(t,s)]},extra:a};const l={exception:{values:[{type:cue(e)?e.constructor.name:i?"UnhandledRejection":"Error",value:Jan(e,{isUnhandledRejection:i})}]},extra:a};if(n){const c=R3e(t,n);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function K0e(t,e){return{exception:{values:[A3e(t,e)]}}}function R3e(t,e){const n=e.stacktrace||e.stack||"",i=qan(e),r=Gan(e);try{return t(n,i,r)}catch{}return[]}const Kan=/Minified React error #\d+;/i;function qan(t){return t&&Kan.test(t.message)?1:0}function Gan(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function nxt(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function Yan(t){const e=t&&t.name;return!e&&nxt(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function Xan(t){const e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:nxt(t)&&Array.isArray(t.message)&&t.message.length==2?t.message[1]:e:"No error message"}function Zan(t,e,n,i){const r=n&&n.syntheticException||void 0,o=P3e(t,e,r,i);return hz(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),ZC(o)}function Qan(t,e,n="info",i,r){const o=i&&i.syntheticException||void 0,s=PNe(t,e,o,r);return s.level=n,i&&i.event_id&&(s.event_id=i.event_id),ZC(s)}function P3e(t,e,n,i,r){let o;if(t_t(e)&&e.error)return K0e(t,e.error);if(aXe(e)||$rn(e)){const s=e;if("stack"in e)o=K0e(t,e);else{const a=s.name||(aXe(s)?"DOMError":"DOMException"),l=s.message?`${a}: ${s.message}`:a;o=PNe(t,l,n,i),SNe(o,l)}return"code"in s&&(o.tags={...o.tags,"DOMException.code":`${s.code}`}),o}return lue(e)?K0e(t,e):cj(e)||cue(e)?(o=Uan(t,e,n,r),hz(o,{synthetic:!0}),o):(o=PNe(t,e,n,i),SNe(o,`${e}`),hz(o,{synthetic:!0}),o)}function PNe(t,e,n,i){const r={};if(i&&n){const o=R3e(t,n);o.length&&(r.exception={values:[{value:e,stacktrace:{frames:o}}]})}if(w3e(e)){const{__sentry_template_string__:o,__sentry_template_values__:s}=e;return r.logentry={message:o,params:s},r}return r.message=e,r}function Jan(t,{isUnhandledRejection:e}){const n=non(t),i=e?"promise rejection":"exception";return t_t(t)?`Event \`ErrorEvent\` captured as ${i} with message \`${t.message}\``:cue(t)?`Event \`${eln(t)}\` (type=${t.type}) captured as ${i}`:`Object captured as ${i} with keys: ${n}`}function eln(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function tln(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];if(n instanceof Error)return n}}function nln(t,{metadata:e,tunnel:n,dsn:i}){const r={event_id:t.event_id,sent_at:new Date().toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!i&&{dsn:DF(i)}},o=iln(t);return SA(r,[o])}function iln(t){return[{type:"user_report"},t]}class rln extends oan{constructor(e){const n={parentSpanIsAlwaysRootSpan:!0,...e},i=vr.SENTRY_SDK_SOURCE||bon();Q_t(n,"browser",["browser"],i),super(n),n.sendClientReports&&vr.document&&vr.document.addEventListener("visibilitychange",()=>{vr.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return Zan(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",i){return Qan(this._options.stackParser,e,n,i,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){Sp&&Zn.warn("SDK not enabled, will not capture user feedback.");return}const n=nln(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(e,n,i){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,i)}}const Zg=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,oln=(t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good",LF=(t,e,n,i)=>{let r,o;return s=>{e.value>=0&&(s||i)&&(o=e.value-(r||0),(o||r===void 0)&&(r=e.value,e.delta=o,e.rating=oln(e.value,n),t(e)))}},bo=ms,sln=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,oK=()=>bo.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],sK=()=>{const t=oK();return t&&t.activationStart||0},TF=(t,e)=>{const n=oK();let i="navigate";return n&&(bo.document&&bo.document.prerendering||sK()>0?i="prerender":bo.document&&bo.document.wasDiscarded?i="restore":n.type&&(i=n.type.replace(/_/g,"-"))),{name:t,value:typeof e>"u"?-1:e,rating:"good",delta:0,entries:[],id:sln(),navigationType:i}},EA=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const i=new PerformanceObserver(r=>{Promise.resolve().then(()=>{e(r.getEntries())})});return i.observe(Object.assign({type:t,buffered:!0},n||{})),i}}catch{}},aK=t=>{const e=n=>{(n.type==="pagehide"||bo.document&&bo.document.visibilityState==="hidden")&&t(n)};bo.document&&(addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0))},O3e=t=>{let e=!1;return n=>{e||(t(n),e=!0)}};let mz=-1;const aln=()=>{mz=bo.document.visibilityState==="hidden"&&!bo.document.prerendering?0:1/0},rne=t=>{bo.document.visibilityState==="hidden"&&mz>-1&&(mz=t.type==="visibilitychange"?t.timeStamp:0,removeEventListener("visibilitychange",rne,!0),removeEventListener("prerenderingchange",rne,!0))},lln=()=>{addEventListener("visibilitychange",rne,!0),addEventListener("prerenderingchange",rne,!0)},gue=()=>(bo.document&&mz<0&&(aln(),lln()),{get firstHiddenTime(){return mz}}),lK=t=>{bo.document&&bo.document.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},cln=[1800,3e3],uln=(t,e={})=>{lK(()=>{const n=gue(),i=TF("FCP");let r;const s=EA("paint",a=>{a.forEach(l=>{l.name==="first-contentful-paint"&&(s.disconnect(),l.startTime<n.firstHiddenTime&&(i.value=Math.max(l.startTime-sK(),0),i.entries.push(l),r(!0)))})});s&&(r=LF(t,i,cln,e.reportAllChanges))})},dln=[.1,.25],hln=(t,e={})=>{uln(O3e(()=>{const n=TF("CLS",0);let i,r=0,o=[];const s=l=>{l.forEach(c=>{if(!c.hadRecentInput){const u=o[0],d=o[o.length-1];r&&u&&d&&c.startTime-d.startTime<1e3&&c.startTime-u.startTime<5e3?(r+=c.value,o.push(c)):(r=c.value,o=[c])}}),r>n.value&&(n.value=r,n.entries=o,i())},a=EA("layout-shift",s);a&&(i=LF(t,n,dln,e.reportAllChanges),aK(()=>{s(a.takeRecords()),i(!0)}),setTimeout(i,0))}))},fln=[100,300],mln=(t,e={})=>{lK(()=>{const n=gue(),i=TF("FID");let r;const o=l=>{l.startTime<n.firstHiddenTime&&(i.value=l.processingStart-l.startTime,i.entries.push(l),r(!0))},s=l=>{l.forEach(o)},a=EA("first-input",s);r=LF(t,i,fln,e.reportAllChanges),a&&aK(O3e(()=>{s(a.takeRecords()),a.disconnect()}))})};let ixt=0,q0e=1/0,GX=0;const pln=t=>{t.forEach(e=>{e.interactionId&&(q0e=Math.min(q0e,e.interactionId),GX=Math.max(GX,e.interactionId),ixt=GX?(GX-q0e)/7+1:0)})};let ONe;const gln=()=>ONe?ixt:performance.interactionCount||0,bln=()=>{"interactionCount"in performance||ONe||(ONe=EA("event",pln,{type:"event",buffered:!0,durationThreshold:0}))},vln=[200,500],yln=0,rxt=()=>gln()-yln,WXe=10,H1=[],G0e={},UXe=t=>{const e=H1[H1.length-1],n=G0e[t.interactionId];if(n||H1.length<WXe||e&&t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{const i={id:t.interactionId,latency:t.duration,entries:[t]};G0e[i.id]=i,H1.push(i)}H1.sort((i,r)=>r.latency-i.latency),H1.splice(WXe).forEach(i=>{delete G0e[i.id]})}},_ln=()=>{const t=Math.min(H1.length-1,Math.floor(rxt()/50));return H1[t]},xln=(t,e={})=>{lK(()=>{bln();const n=TF("INP");let i;const r=s=>{s.forEach(l=>{l.interactionId&&UXe(l),l.entryType==="first-input"&&!H1.some(u=>u.entries.some(d=>l.duration===d.duration&&l.startTime===d.startTime))&&UXe(l)});const a=_ln();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,i())},o=EA("event",r,{durationThreshold:e.durationThreshold!=null?e.durationThreshold:40});i=LF(t,n,vln,e.reportAllChanges),o&&("PerformanceEventTiming"in bo&&"interactionId"in PerformanceEventTiming.prototype&&o.observe({type:"first-input",buffered:!0}),aK(()=>{r(o.takeRecords()),n.value<0&&rxt()>0&&(n.value=0,n.entries=[]),i(!0)}))})},wln=[2500,4e3],KXe={},Cln=(t,e={})=>{lK(()=>{const n=gue(),i=TF("LCP");let r;const o=a=>{const l=a[a.length-1];l&&l.startTime<n.firstHiddenTime&&(i.value=Math.max(l.startTime-sK(),0),i.entries=[l],r())},s=EA("largest-contentful-paint",o);if(s){r=LF(t,i,wln,e.reportAllChanges);const a=O3e(()=>{KXe[i.id]||(o(s.takeRecords()),s.disconnect(),KXe[i.id]=!0,r(!0))});["keydown","click"].forEach(l=>{bo.document&&addEventListener(l,()=>setTimeout(a,0),!0)}),aK(a)}})},Sln=[800,1800],jNe=t=>{bo.document&&bo.document.prerendering?lK(()=>jNe(t)):bo.document&&bo.document.readyState!=="complete"?addEventListener("load",()=>jNe(t),!0):setTimeout(t,0)},Nln=(t,e={})=>{const n=TF("TTFB"),i=LF(t,n,Sln,e.reportAllChanges);jNe(()=>{const r=oK();if(r){const o=r.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-sK(),0),n.entries=[r],i(!0)}})},_9={},one={};let oxt,sxt,axt,lxt,cxt;function j3e(t,e=!1){return cK("cls",t,Dln,oxt,e)}function uxt(t,e=!1){return cK("lcp",t,Mln,axt,e)}function dxt(t){return cK("fid",t,kln,sxt)}function Eln(t){return cK("ttfb",t,Lln,lxt)}function hxt(t){return cK("inp",t,Tln,cxt)}function fj(t,e){return fxt(t,e),one[t]||(Iln(t),one[t]=!0),mxt(t,e)}function IF(t,e){const n=_9[t];if(!(!n||!n.length))for(const i of n)try{i(e)}catch(r){Zg&&Zn.error(`Error while triggering instrumentation handler.
Type: ${t}
Name: ${XC(i)}
Error:`,r)}}function Dln(){return hln(t=>{IF("cls",{metric:t}),oxt=t},{reportAllChanges:!0})}function kln(){return mln(t=>{IF("fid",{metric:t}),sxt=t})}function Mln(){return Cln(t=>{IF("lcp",{metric:t}),axt=t},{reportAllChanges:!0})}function Lln(){return Nln(t=>{IF("ttfb",{metric:t}),lxt=t})}function Tln(){return xln(t=>{IF("inp",{metric:t}),cxt=t})}function cK(t,e,n,i,r=!1){fxt(t,e);let o;return one[t]||(o=n(),one[t]=!0),i&&e({metric:i}),mxt(t,e,r?o:void 0)}function Iln(t){const e={};t==="event"&&(e.durationThreshold=0),EA(t,n=>{IF(t,{entries:n})},e)}function fxt(t,e){_9[t]=_9[t]||[],_9[t].push(e)}function mxt(t,e,n){return()=>{n&&n();const i=_9[t];if(!i)return;const r=i.indexOf(e);r!==-1&&i.splice(r,1)}}function Aln(t){return"duration"in t}function Y0e(t){return typeof t=="number"&&isFinite(t)}function mj(t,e,n,{...i}){const r=Gs(t).start_timestamp;return r&&r>e&&typeof t.updateStartTime=="function"&&t.updateStartTime(e),V_t(t,()=>{const o=$k({startTime:e,...i});return o&&o.end(n),o})}function pxt(t){const e=Bo();if(!e)return;const{name:n,transaction:i,attributes:r,startTime:o}=t,{release:s,environment:a}=e.getOptions(),l=e.getIntegrationByName("Replay"),c=l&&l.getReplayId(),u=ka(),d=u.getUser(),h=d!==void 0?d.email||d.id||d.ip_address:void 0;let f;try{f=u.getScopeData().contexts.profile.profile_id}catch{}const m={release:s,environment:a,user:h||void 0,profile_id:f||void 0,replay_id:c||void 0,transaction:i,"user_agent.original":bo.navigator&&bo.navigator.userAgent,...r};return $k({name:n,attributes:m,startTime:o,experimental:{standalone:!0}})}function F3e(){return bo&&bo.addEventListener&&bo.performance}function nu(t){return t/1e3}function Rln(){let t=0,e,n;if(!Oln())return;let i=!1;function r(){i||(i=!0,n&&Pln(t,e,n),o())}const o=j3e(({metric:s})=>{const a=s.entries[s.entries.length-1];a&&(t=s.value,e=a)},!0);aK(()=>{r()}),setTimeout(()=>{const s=Bo(),a=Og([s,"optionalAccess",d=>d.on,"call",d=>d("startNavigationSpan",()=>{r(),a&&a()})]),l=Wh(),c=l&&Mh(l),u=c&&Gs(c);u&&u.op==="pageload"&&(n=c.spanContext().spanId)},0)}function Pln(t,e,n){Zg&&Zn.log(`Sending CLS span (${t})`);const i=nu((Dm||0)+(Og([e,"optionalAccess",l=>l.startTime])||0)),r=ka().getScopeData().transactionName,o=e?YC(Og([e,"access",l=>l.sources,"access",l=>l[0],"optionalAccess",l=>l.node])):"Layout shift",s=Eu({[bd]:"auto.http.browser.cls",[WD]:"ui.webvital.cls",[L3e]:Og([e,"optionalAccess",l=>l.duration])||0,"sentry.pageload.span_id":n}),a=pxt({name:o,transaction:r,attributes:s,startTime:i});Og([a,"optionalAccess",l=>l.addEvent,"call",l=>l("cls",{[fue]:"",[mue]:t})]),Og([a,"optionalAccess",l=>l.end,"call",l=>l(i)])}function Oln(){try{return Og([PerformanceObserver,"access",t=>t.supportedEntryTypes,"optionalAccess",t=>t.includes,"call",t=>t("layout-shift")])}catch{return!1}}const jln=2147483647;let qXe=0,mh={},Z_,x9;function Fln({recordClsStandaloneSpans:t}){const e=F3e();if(e&&Dm){e.mark&&bo.performance.mark("sentry-tracing-init");const n=Wln(),i=Hln(),r=Uln(),o=t?Rln():zln();return()=>{n(),i(),r(),o&&o()}}return()=>{}}function $ln(){fj("longtask",({entries:t})=>{if(Wh())for(const e of t){const n=nu(Dm+e.startTime),i=nu(e.duration),r=$k({name:"Main UI thread blocked",op:"ui.long-task",startTime:n,attributes:{[bd]:"auto.ui.browser.metrics"}});r&&r.end(n+i)}})}function Vln(){new PerformanceObserver(e=>{if(Wh())for(const n of e.getEntries()){if(!n.scripts[0])continue;const i=nu(Dm+n.startTime),r=nu(n.duration),o={[bd]:"auto.ui.browser.metrics"},s=n.scripts[0],{invoker:a,invokerType:l,sourceURL:c,sourceFunctionName:u,sourceCharPosition:d}=s;o["browser.script.invoker"]=a,o["browser.script.invoker_type"]=l,c&&(o["code.filepath"]=c),u&&(o["code.function"]=u),d!==-1&&(o["browser.script.source_char_position"]=d);const h=$k({name:"Main UI thread blocked",op:"ui.long-animation-frame",startTime:i,attributes:o});h&&h.end(i+r)}}).observe({type:"long-animation-frame",buffered:!0})}function Bln(){fj("event",({entries:t})=>{if(Wh()){for(const e of t)if(e.name==="click"){const n=nu(Dm+e.startTime),i=nu(e.duration),r={name:YC(e.target),op:`ui.interaction.${e.name}`,startTime:n,attributes:{[bd]:"auto.ui.browser.metrics"}},o=r_t(e.target);o&&(r.attributes["ui.component_name"]=o);const s=$k(r);s&&s.end(n+i)}}})}function zln(){return j3e(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(Zg&&Zn.log(`[Measurements] Adding CLS ${t.value}`),mh.cls={value:t.value,unit:""},x9=e)},!0)}function Hln(){return uxt(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(Zg&&Zn.log("[Measurements] Adding LCP"),mh.lcp={value:t.value,unit:"millisecond"},Z_=e)},!0)}function Wln(){return dxt(({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e)return;const n=nu(Dm),i=nu(e.startTime);Zg&&Zn.log("[Measurements] Adding FID"),mh.fid={value:t.value,unit:"millisecond"},mh["mark.fid"]={value:n+i,unit:"second"}})}function Uln(){return Eln(({metric:t})=>{t.entries[t.entries.length-1]&&(Zg&&Zn.log("[Measurements] Adding TTFB"),mh.ttfb={value:t.value,unit:"millisecond"})})}function Kln(t,e){const n=F3e();if(!n||!bo.performance.getEntries||!Dm)return;Zg&&Zn.log("[Tracing] Adding & adjusting spans using Performance API");const i=nu(Dm),r=n.getEntries(),{op:o,start_timestamp:s}=Gs(t);if(r.slice(qXe).forEach(a=>{const l=nu(a.startTime),c=nu(Math.max(0,a.duration));if(!(o==="navigation"&&s&&i+l<s))switch(a.entryType){case"navigation":{Gln(t,a,i);break}case"mark":case"paint":case"measure":{qln(t,a,l,c,i);const u=gue(),d=a.startTime<u.firstHiddenTime;a.name==="first-paint"&&d&&(Zg&&Zn.log("[Measurements] Adding FP"),mh.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&d&&(Zg&&Zn.log("[Measurements] Adding FCP"),mh.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{Xln(t,a,a.name,l,c,i);break}}}),qXe=Math.max(r.length-1,0),Zln(t),o==="pageload"){Jln(mh);const a=mh["mark.fid"];a&&mh.fid&&(mj(t,a.value,a.value+nu(mh.fid.value),{name:"first input delay",op:"ui.action",attributes:{[bd]:"auto.ui.browser.metrics"}}),delete mh["mark.fid"]),(!("fcp"in mh)||!e.recordClsOnPageloadSpan)&&delete mh.cls,Object.entries(mh).forEach(([l,c])=>{_sn(l,c.value,c.unit)}),t.setAttribute("performance.timeOrigin",i),t.setAttribute("performance.activationStart",sK()),Qln(t)}Z_=void 0,x9=void 0,mh={}}function qln(t,e,n,i,r){const o=oK(),s=nu(o?o.requestStart:0),a=r+Math.max(n,s),l=r+n,c=l+i,u={[bd]:"auto.resource.browser.metrics"};return a!==l&&(u["sentry.browser.measure_happened_before_request"]=!0,u["sentry.browser.measure_start_time"]=a),mj(t,a,c,{name:e.name,op:e.entryType,attributes:u}),a}function Gln(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(i=>{YX(t,e,i,n)}),YX(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),YX(t,e,"fetch",n,"cache","domainLookupStart"),YX(t,e,"domainLookup",n,"DNS"),Yln(t,e,n)}function YX(t,e,n,i,r,o){const s=o?e[o]:e[`${n}End`],a=e[`${n}Start`];!a||!s||mj(t,i+nu(a),i+nu(s),{op:`browser.${r||n}`,name:e.name,attributes:{[bd]:"auto.ui.browser.metrics"}})}function Yln(t,e,n){const i=n+nu(e.requestStart),r=n+nu(e.responseEnd),o=n+nu(e.responseStart);e.responseEnd&&(mj(t,i,r,{op:"browser.request",name:e.name,attributes:{[bd]:"auto.ui.browser.metrics"}}),mj(t,o,r,{op:"browser.response",name:e.name,attributes:{[bd]:"auto.ui.browser.metrics"}}))}function Xln(t,e,n,i,r,o){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;const s=GT(n),a={[bd]:"auto.resource.browser.metrics"};X0e(a,e,"transferSize","http.response_transfer_size"),X0e(a,e,"encodedBodySize","http.response_content_length"),X0e(a,e,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in e&&(a["resource.render_blocking_status"]=e.renderBlockingStatus),s.protocol&&(a["url.scheme"]=s.protocol.split(":").pop()),s.host&&(a["server.address"]=s.host),a["url.same_origin"]=n.includes(bo.location.origin);const l=o+i,c=l+r;mj(t,l,c,{name:n.replace(bo.location.origin,""),op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",attributes:a})}function Zln(t){const e=bo.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&t.setAttribute("connectionType",n.type),Y0e(n.rtt)&&(mh["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Y0e(e.deviceMemory)&&t.setAttribute("deviceMemory",`${e.deviceMemory} GB`),Y0e(e.hardwareConcurrency)&&t.setAttribute("hardwareConcurrency",String(e.hardwareConcurrency))}function Qln(t){Z_&&(Zg&&Zn.log("[Measurements] Adding LCP Data"),Z_.element&&t.setAttribute("lcp.element",YC(Z_.element)),Z_.id&&t.setAttribute("lcp.id",Z_.id),Z_.url&&t.setAttribute("lcp.url",Z_.url.trim().slice(0,200)),t.setAttribute("lcp.size",Z_.size)),x9&&x9.sources&&(Zg&&Zn.log("[Measurements] Adding CLS Data"),x9.sources.forEach((e,n)=>t.setAttribute(`cls.source.${n+1}`,YC(e.node))))}function X0e(t,e,n,i){const r=e[n];r!=null&&r<jln&&(t[i]=r)}function Jln(t){const e=oK();if(!e)return;const{responseStart:n,requestStart:i}=e;i<=n&&(Zg&&Zn.log("[Measurements] Adding TTFB Request Time"),t["ttfb.requestTime"]={value:n-i,unit:"millisecond"})}const ecn=1e3;let GXe,FNe,$Ne;function gxt(t){const e="dom";Ok(e,t),jk(e,tcn)}function tcn(){if(!bo.document)return;const t=pv.bind(null,"dom"),e=YXe(t,!0);bo.document.addEventListener("click",e,!1),bo.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{const i=bo[n]&&bo[n].prototype;!i||!i.hasOwnProperty||!i.hasOwnProperty("addEventListener")||(yp(i,"addEventListener",function(r){return function(o,s,a){if(o==="click"||o=="keypress")try{const l=this,c=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},u=c[o]=c[o]||{refCount:0};if(!u.handler){const d=YXe(t);u.handler=d,r.call(this,o,d,a)}u.refCount++}catch{}return r.call(this,o,s,a)}}),yp(i,"removeEventListener",function(r){return function(o,s,a){if(o==="click"||o=="keypress")try{const l=this,c=l.__sentry_instrumentation_handlers__||{},u=c[o];u&&(u.refCount--,u.refCount<=0&&(r.call(this,o,u.handler,a),u.handler=void 0,delete c[o]),Object.keys(c).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return r.call(this,o,s,a)}}))})}function ncn(t){if(t.type!==FNe)return!1;try{if(!t.target||t.target._sentryId!==$Ne)return!1}catch{}return!0}function icn(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function YXe(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const i=rcn(n);if(icn(n.type,i))return;Cv(n,"_sentryCaptured",!0),i&&!i._sentryId&&Cv(i,"_sentryId",ql());const r=n.type==="keypress"?"input":n.type;ncn(n)||(t({event:n,name:r,global:e}),FNe=n.type,$Ne=i?i._sentryId:void 0),clearTimeout(GXe),GXe=bo.setTimeout(()=>{$Ne=void 0,FNe=void 0},ecn)}}function rcn(t){try{return t.target}catch{return null}}let XX;function bue(t){const e="history";Ok(e,t),jk(e,ocn)}function ocn(){if(!Uon())return;const t=bo.onpopstate;bo.onpopstate=function(...n){const i=bo.location.href,r=XX;if(XX=i,pv("history",{from:r,to:i}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...i){const r=i.length>2?i[2]:void 0;if(r){const o=XX,s=String(r);XX=s,pv("history",{from:o,to:s})}return n.apply(this,i)}}yp(bo.history,"pushState",e),yp(bo.history,"replaceState",e)}const iee={};function bxt(t){const e=iee[t];if(e)return e;let n=bo[t];if(xNe(n))return iee[t]=n.bind(bo);const i=bo.document;if(i&&typeof i.createElement=="function")try{const r=i.createElement("iframe");r.hidden=!0,i.head.appendChild(r);const o=r.contentWindow;o&&o[t]&&(n=o[t]),i.head.removeChild(r)}catch(r){Zg&&Zn.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,r)}return n&&(iee[t]=n.bind(bo))}function XXe(t){iee[t]=void 0}function pj(...t){return bxt("setTimeout")(...t)}const NT="__sentry_xhr_v3__";function vxt(t){const e="xhr";Ok(e,t),jk(e,scn)}function scn(){if(!bo.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,i){const r=ym()*1e3,o=CC(i[0])?i[0].toUpperCase():void 0,s=acn(i[1]);if(!o||!s)return e.apply(n,i);n[NT]={method:o,url:s,request_headers:{}},o==="POST"&&s.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const a=()=>{const l=n[NT];if(l&&n.readyState===4){try{l.status_code=n.status}catch{}const c={endTimestamp:ym()*1e3,startTimestamp:r,xhr:n};pv("xhr",c)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(l,c,u){return a(),l.apply(c,u)}}):n.addEventListener("readystatechange",a),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(l,c,u){const[d,h]=u,f=c[NT];return f&&CC(d)&&CC(h)&&(f.request_headers[d.toLowerCase()]=h),l.apply(c,u)}}),e.apply(n,i)}}),t.send=new Proxy(t.send,{apply(e,n,i){const r=n[NT];if(!r)return e.apply(n,i);i[0]!==void 0&&(r.body=i[0]);const o={startTimestamp:ym()*1e3,xhr:n};return pv("xhr",o),e.apply(n,i)}})}function acn(t){if(CC(t))return t;try{return t.toString()}catch{}}const Z0e=[],ree=new Map;function lcn(){if(F3e()&&Dm){const e=ccn();return()=>{e()}}return()=>{}}const ZXe={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function ccn(){return hxt(({metric:t})=>{if(t.value==null)return;const e=t.entries.find(m=>m.duration===t.value&&ZXe[m.name]);if(!e)return;const{interactionId:n}=e,i=ZXe[e.name],r=nu(Dm+e.startTime),o=nu(t.value),s=Wh(),a=s?Mh(s):void 0,c=(n!=null?ree.get(n):void 0)||a,u=c?Gs(c).description:ka().getScopeData().transactionName,d=YC(e.target),h=Eu({[bd]:"auto.http.browser.inp",[WD]:`ui.interaction.${i}`,[L3e]:e.duration}),f=pxt({name:d,transaction:u,attributes:h,startTime:r});Og([f,"optionalAccess",m=>m.addEvent,"call",m=>m("inp",{[fue]:"millisecond",[mue]:t.value})]),Og([f,"optionalAccess",m=>m.end,"call",m=>m(r+o)])})}function ucn(t){const e=({entries:n})=>{const i=Wh(),r=i&&Mh(i);n.forEach(o=>{if(!Aln(o)||!r)return;const s=o.interactionId;if(s!=null&&!ree.has(s)){if(Z0e.length>10){const a=Z0e.shift();ree.delete(a)}Z0e.push(s),ree.set(s,r)}})};fj("event",e),fj("first-input",e)}function dcn(t,e=bxt("fetch")){let n=0,i=0;function r(o){const s=o.body.length;n+=s,i++;const a={body:o.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&i<15,...t.fetchOptions};if(!e)return XXe("fetch"),Jte("No fetch implementation available");try{return e(t.url,a).then(l=>(n-=s,i--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return XXe("fetch"),n-=s,i--,Jte(l)}}return dan(t,r)}const hcn=30,fcn=50;function VNe(t,e,n,i){const r={filename:t,function:e==="<anonymous>"?x2:e,in_app:!0};return n!==void 0&&(r.lineno=n),i!==void 0&&(r.colno=i),r}const mcn=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,pcn=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,gcn=/\((\S*)(?::(\d+))(?::(\d+))\)/,bcn=t=>{const e=mcn.exec(t);if(e){const[,i,r,o]=e;return VNe(i,x2,+r,+o)}const n=pcn.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){const s=gcn.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}const[r,o]=yxt(n[1]||x2,n[2]);return VNe(o,r,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},vcn=[hcn,bcn],ycn=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,_cn=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,xcn=t=>{const e=ycn.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const o=_cn.exec(e[3]);o&&(e[1]=e[1]||"eval",e[3]=o[1],e[4]=o[2],e[5]="")}let i=e[3],r=e[1]||x2;return[r,i]=yxt(r,i),VNe(i,r,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},wcn=[fcn,xcn],Ccn=[vcn,wcn],Scn=u_t(...Ccn),yxt=(t,e)=>{const n=t.indexOf("safari-extension")!==-1,i=t.indexOf("safari-web-extension")!==-1;return n||i?[t.indexOf("@")!==-1?t.split("@")[0]:x2,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},ZX=1024,Ncn="Breadcrumbs",Ecn=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:Ncn,setup(n){e.console&&son(Lcn(n)),e.dom&&gxt(Mcn(n,e.dom)),e.xhr&&vxt(Tcn(n)),e.fetch&&f_t(Icn(n)),e.history&&bue(Acn(n)),e.sentry&&n.on("beforeSendEvent",kcn(n))}}},Dcn=Ecn;function kcn(t){return function(n){Bo()===t&&UD({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:JN(n)},{event:n})}}function Mcn(t,e){return function(i){if(Bo()!==t)return;let r,o,s=typeof e=="object"?e.serializeAttribute:void 0,a=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;a&&a>ZX&&(Sp&&Zn.warn(`\`dom.maxStringLength\` cannot exceed ${ZX}, but a value of ${a} was configured. Sentry will use ${ZX} instead.`),a=ZX),typeof s=="string"&&(s=[s]);try{const c=i.event,u=Rcn(c)?c.target:c;r=YC(u,{keyAttrs:s,maxStringLength:a}),o=r_t(u)}catch{r="<unknown>"}if(r.length===0)return;const l={category:`ui.${i.name}`,message:r};o&&(l.data={"ui.component_name":o}),UD(l,{event:i.event,name:i.name,global:i.global})}}function Lcn(t){return function(n){if(Bo()!==t)return;const i={category:"console",data:{arguments:n.args,logger:"console"},level:__t(n.level),message:lXe(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)i.message=`Assertion failed: ${lXe(n.args.slice(1)," ")||"console.assert"}`,i.data.arguments=n.args.slice(1);else return;UD(i,{input:n.args,level:n.level})}}function Tcn(t){return function(n){if(Bo()!==t)return;const{startTimestamp:i,endTimestamp:r}=n,o=n.xhr[NT];if(!i||!r||!o)return;const{method:s,url:a,status_code:l,body:c}=o,u={method:s,url:a,status_code:l},d={xhr:n.xhr,input:c,startTimestamp:i,endTimestamp:r},h=i_t(l);UD({category:"xhr",data:u,type:"http",level:h},d)}}function Icn(t){return function(n){if(Bo()!==t)return;const{startTimestamp:i,endTimestamp:r}=n;if(r&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const o=n.fetchData,s={data:n.error,input:n.args,startTimestamp:i,endTimestamp:r};UD({category:"fetch",data:o,level:"error",type:"http"},s)}else{const o=n.response,s={...n.fetchData,status_code:o&&o.status},a={input:n.args,response:o,startTimestamp:i,endTimestamp:r},l=i_t(s.status_code);UD({category:"fetch",data:s,type:"http",level:l},a)}}}function Acn(t){return function(n){if(Bo()!==t)return;let i=n.from,r=n.to;const o=GT(vr.location.href);let s=i?GT(i):void 0;const a=GT(r);(!s||!s.path)&&(s=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===s.protocol&&o.host===s.host&&(i=s.relative),UD({category:"navigation",data:{from:i,to:r}})}}function Rcn(t){return!!t&&!!t.target}const Pcn=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Ocn="BrowserApiErrors",jcn=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:Ocn,setupOnce(){e.setTimeout&&yp(vr,"setTimeout",QXe),e.setInterval&&yp(vr,"setInterval",QXe),e.requestAnimationFrame&&yp(vr,"requestAnimationFrame",$cn),e.XMLHttpRequest&&"XMLHttpRequest"in vr&&yp(XMLHttpRequest.prototype,"send",Vcn);const n=e.eventTarget;n&&(Array.isArray(n)?n:Pcn).forEach(Bcn)}}},Fcn=jcn;function QXe(t){return function(...e){const n=e[0];return e[0]=hj(n,{mechanism:{data:{function:XC(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function $cn(t){return function(e){return t.apply(this,[hj(e,{mechanism:{data:{function:"requestAnimationFrame",handler:XC(t)},handled:!1,type:"instrument"}})])}}function Vcn(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&yp(n,r,function(o){const s={mechanism:{data:{function:r,handler:XC(o)},handled:!1,type:"instrument"}},a=N3e(o);return a&&(s.mechanism.data.handler=XC(a)),hj(o,s)})}),t.apply(this,e)}}function Bcn(t){const e=vr,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(yp(n,"addEventListener",function(i){return function(r,o,s){try{typeof o.handleEvent=="function"&&(o.handleEvent=hj(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:XC(o),target:t},handled:!1,type:"instrument"}}))}catch{}return i.apply(this,[r,hj(o,{mechanism:{data:{function:"addEventListener",handler:XC(o),target:t},handled:!1,type:"instrument"}}),s])}}),yp(n,"removeEventListener",function(i){return function(r,o,s){const a=o;try{const l=a&&a.__sentry_wrapped__;l&&i.call(this,r,l,s)}catch{}return i.call(this,r,a,s)}}))}const zcn="GlobalHandlers",Hcn=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:zcn,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(Ucn(n),JXe("onerror")),e.onunhandledrejection&&(Kcn(n),JXe("onunhandledrejection"))}}},Wcn=Hcn;function Ucn(t){p_t(e=>{const{stackParser:n,attachStacktrace:i}=_xt();if(Bo()!==t||txt())return;const{msg:r,url:o,line:s,column:a,error:l}=e,c=Ycn(P3e(n,l||r,void 0,i,!1),o,s,a);c.level="error",W_t(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function Kcn(t){g_t(e=>{const{stackParser:n,attachStacktrace:i}=_xt();if(Bo()!==t||txt())return;const r=qcn(e),o=C3e(r)?Gcn(r):P3e(n,r,void 0,i,!0);o.level="error",W_t(o,{originalException:r,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function qcn(t){if(C3e(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function Gcn(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function Ycn(t,e,n,i){const r=t.exception=t.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[],c=isNaN(parseInt(i,10))?void 0:i,u=isNaN(parseInt(n,10))?void 0:n,d=CC(e)&&e.length>0?e:S3e();return l.length===0&&l.push({colno:c,filename:d,function:x2,in_app:!0,lineno:u}),t}function JXe(t){Sp&&Zn.log(`Global Handler attached: ${t}`)}function _xt(){const t=Bo();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Xcn=()=>({name:"HttpContext",preprocessEvent(t){if(!vr.navigator&&!vr.location&&!vr.document)return;const e=t.request&&t.request.url||vr.location&&vr.location.href,{referrer:n}=vr.document||{},{userAgent:i}=vr.navigator||{},r={...t.request&&t.request.headers,...n&&{Referer:n},...i&&{"User-Agent":i}},o={...t.request,...e&&{url:e},headers:r};t.request=o}}),Zcn="cause",Qcn=5,Jcn="LinkedErrors",eun=(t={})=>{const e=t.limit||Qcn,n=t.key||Zcn;return{name:Jcn,preprocessEvent(i,r,o){const s=o.getOptions();Wrn(A3e,s.stackParser,s.maxValueLength,n,e,i,r)}}},tun=eun;function nun(t){return[wan(),van(),Fcn(),Dcn(),Wcn(),tun(),Pan(),Xcn()]}function iun(t={}){const e={defaultIntegrations:nun(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:vr.SENTRY_RELEASE&&vr.SENTRY_RELEASE.id?vr.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return t.defaultIntegrations==null&&delete t.defaultIntegrations,{...e,...t}}function run(){const t=typeof vr.window<"u"&&vr;if(!t)return!1;const e=t.chrome?"chrome":"browser",n=t[e],i=n&&n.runtime&&n.runtime.id,r=vr.location&&vr.location.href||"",o=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],s=!!i&&vr===vr.top&&o.some(l=>r.startsWith(`${l}//`)),a=typeof t.nw<"u";return!!i&&!s&&!a}function oun(t={}){const e=iun(t);if(run()){EF(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}Sp&&(d_t()||Zn.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...e,stackParser:ron(e.stackParser||Scn),integrations:ian(e),transport:e.transport||dcn},i=lan(rln,n);return e.autoSessionTracking&&sun(),i}function BNe(t={}){if(!vr.document){Sp&&Zn.error("Global document not defined in showReportDialog call");return}const e=ka(),n=e.getClient(),i=n&&n.getDsn();if(!i){Sp&&Zn.error("DSN not configured for showReportDialog call");return}if(e&&(t.user={...e.getUser(),...t.user}),!t.eventId){const a=Ysn();a&&(t.eventId=a)}const r=vr.document.createElement("script");r.async=!0,r.crossOrigin="anonymous",r.src=tan(i,t),t.onLoad&&(r.onload=t.onLoad);const{onClose:o}=t;if(o){const a=l=>{if(l.data==="__sentry_reportdialog_closed__")try{o()}finally{vr.removeEventListener("message",a)}};vr.addEventListener("message",a)}const s=vr.document.head||vr.document.body;s?s.appendChild(r):Sp&&Zn.error("Not injecting report dialog. No injection point found in HTML")}function sun(){if(typeof vr.document>"u"){Sp&&Zn.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}RXe({ignoreDuration:!0}),PXe(),bue(({from:t,to:e})=>{t!==void 0&&t!==e&&(RXe({ignoreDuration:!0}),PXe())})}const aun={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",debugIntegration:"debug",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",sessionTimingIntegration:"sessiontiming",browserProfilingIntegration:"browserprofiling"},eZe=vr;async function lun(t,e){const n=aun[t],i=eZe.Sentry=eZe.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${t}`);const r=i[t];if(typeof r=="function"&&!("_isShim"in r))return r;const o=cun(n),s=vr.document.createElement("script");s.src=o,s.crossOrigin="anonymous",s.referrerPolicy="origin",e&&s.setAttribute("nonce",e);const a=new Promise((d,h)=>{s.addEventListener("load",()=>d()),s.addEventListener("error",h)}),l=vr.document.currentScript,c=vr.document.body||vr.document.head||l&&l.parentElement;if(c)c.appendChild(s);else throw new Error(`Could not find parent element to insert lazy-loaded ${t} script`);try{await a}catch{throw new Error(`Error when loading integration: ${t}`)}const u=i[t];if(typeof u!="function")throw new Error(`Could not load integration: ${t}`);return u}function cun(t){const e=Bo(),n=e&&e.getOptions(),i=n&&n.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${uD}/${t}.min.js`,i).toString()}const Cl=ms,$3e="sentryReplaySession",uun="replay_event",V3e="Unable to send Replay",dun=3e5,hun=9e5,fun=5e3,mun=5500,pun=6e4,gun=5e3,bun=3,tZe=15e4,QX=5e3,vun=3e3,yun=300,B3e=2e7,_un=4999,xun=15e3,nZe=36e5;function zNe(t,e){return t??e()}function pz(t){let e,n=t[0],i=1;for(;i<t.length;){const r=t[i],o=t[i+1];if(i+=2,(r==="optionalAccess"||r==="optionalCall")&&n==null)return;r==="access"||r==="optionalAccess"?(e=n,n=o(n)):(r==="call"||r==="optionalCall")&&(n=o((...s)=>n.call(e,...s)),e=void 0)}return n}var nd;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(nd||(nd={}));function wun(t){return t.nodeType===t.ELEMENT_NODE}function w9(t){const e=pz([t,"optionalAccess",n=>n.host]);return pz([e,"optionalAccess",n=>n.shadowRoot])===t}function C9(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function Cun(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function Sun(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}function sne(t){try{const e=t.rules||t.cssRules;return e?Cun(Array.from(e,xxt).join("")):null}catch{return null}}function xxt(t){let e;if(Eun(t))try{e=sne(t.styleSheet)||Sun(t)}catch{}else if(Dun(t)&&t.selectorText.includes(":"))return Nun(t.cssText);return e||t.cssText}function Nun(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function Eun(t){return"styleSheet"in t}function Dun(t){return"selectorText"in t}class wxt{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;const n=pz([this,"access",i=>i.getMeta,"call",i=>i(e),"optionalAccess",i=>i.id]);return zNe(n,()=>-1)}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,n){const i=n.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,n)}replace(e,n){const i=this.getNode(e);if(i){const r=this.nodeMetaMap.get(i);r&&this.nodeMetaMap.set(n,r)}this.idNodeMap.set(e,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function kun(){return new wxt}function vue({maskInputOptions:t,tagName:e,type:n}){return e==="OPTION"&&(e="SELECT"),!!(t[e.toLowerCase()]||n&&t[n]||n==="password"||e==="INPUT"&&!n&&t.text)}function gz({isMasked:t,element:e,value:n,maskInputFn:i}){let r=n||"";return t?(i&&(r=i(r,e)),"*".repeat(r.length)):r}function gj(t){return t.toLowerCase()}function HNe(t){return t.toUpperCase()}const iZe="__rrweb_original__";function Mun(t){const e=t.getContext("2d");if(!e)return!0;const n=50;for(let i=0;i<t.width;i+=n)for(let r=0;r<t.height;r+=n){const o=e.getImageData,s=iZe in o?o[iZe]:o;if(new Uint32Array(s.call(e,i,r,Math.min(n,t.width-i),Math.min(n,t.height-r)).data.buffer).some(l=>l!==0))return!1}return!0}function z3e(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?gj(e):null}function ane(t,e,n){return e==="INPUT"&&(n==="radio"||n==="checkbox")?t.getAttribute("value")||"":t.value}function Cxt(t,e){let n;try{n=new URL(t,zNe(e,()=>window.location.href))}catch{return null}const i=/\.([0-9a-z]+)(?:$)/i,r=n.pathname.match(i);return zNe(pz([r,"optionalAccess",o=>o[1]]),()=>null)}const rZe={};function Sxt(t){const e=rZe[t];if(e)return e;const n=window.document;let i=window[t];if(n&&typeof n.createElement=="function")try{const r=n.createElement("iframe");r.hidden=!0,n.head.appendChild(r);const o=r.contentWindow;o&&o[t]&&(i=o[t]),n.head.removeChild(r)}catch{}return rZe[t]=i.bind(window)}function WNe(...t){return Sxt("setTimeout")(...t)}function Nxt(...t){return Sxt("clearTimeout")(...t)}let Lun=1;const Tun=new RegExp("[^a-z0-9-_:]"),bz=-2;function H3e(){return Lun++}function Iun(t){if(t instanceof HTMLFormElement)return"form";const e=gj(t.tagName);return Tun.test(e)?"div":e}function Aun(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}let wP,oZe;const Run=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Pun=/^(?:[a-z+]+:)?\/\//i,Oun=/^www\..*/i,jun=/^(data:)([^,]*),(.*)/i;function lne(t,e){return(t||"").replace(Run,(n,i,r,o,s,a)=>{const l=r||s||a,c=i||o||"";if(!l)return n;if(Pun.test(l)||Oun.test(l))return`url(${c}${l}${c})`;if(jun.test(l))return`url(${c}${l}${c})`;if(l[0]==="/")return`url(${c}${Aun(e)+l}${c})`;const u=e.split("/"),d=l.split("/");u.pop();for(const h of d)h!=="."&&(h===".."?u.pop():u.push(h));return`url(${c}${u.join("/")}${c})`})}const Fun=/^[^ \t\n\r\u000c]+/,$un=/^[, \t\n\r\u000c]+/;function Vun(t,e){if(e.trim()==="")return e;let n=0;function i(o){let s;const a=o.exec(e.substring(n));return a?(s=a[0],n+=s.length,s):""}const r=[];for(;i($un),!(n>=e.length);){let o=i(Fun);if(o.slice(-1)===",")o=WO(t,o.substring(0,o.length-1)),r.push(o);else{let s="";o=WO(t,o);let a=!1;for(;;){const l=e.charAt(n);if(l===""){r.push((o+s).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){n+=1,r.push((o+s).trim());break}else l==="("&&(a=!0);s+=l,n+=1}}}return r.join(", ")}const sZe=new WeakMap;function WO(t,e){return!e||e.trim()===""?e:yue(t,e)}function Bun(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function yue(t,e){let n=sZe.get(t);if(n||(n=t.createElement("a"),sZe.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function Ext(t,e,n,i,r,o){return i&&(n==="src"||n==="href"&&!(e==="use"&&i[0]==="#")||n==="xlink:href"&&i[0]!=="#"||n==="background"&&(e==="table"||e==="td"||e==="th")?WO(t,i):n==="srcset"?Vun(t,i):n==="style"?lne(i,yue(t)):e==="object"&&n==="data"?WO(t,i):typeof o=="function"?o(n,i,r):i)}function Dxt(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function zun(t,e,n,i){try{if(i&&t.matches(i))return!1;if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let r=t.classList.length;r--;){const o=t.classList[r];if(e.test(o))return!0}if(n)return t.matches(n)}catch{}return!1}function Hun(t,e){for(let n=t.classList.length;n--;){const i=t.classList[n];if(e.test(i))return!0}return!1}function ET(t,e,n=1/0,i=0){return!t||t.nodeType!==t.ELEMENT_NODE||i>n?-1:e(t)?i:ET(t.parentNode,e,n,i+1)}function UO(t,e){return n=>{const i=n;if(i===null)return!1;try{if(t){if(typeof t=="string"){if(i.matches(`.${t}`))return!0}else if(Hun(i,t))return!0}return!!(e&&i.matches(e))}catch{return!1}}}function bj(t,e,n,i,r,o){try{const s=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){const c=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(c))return!0}let a=-1,l=-1;if(o){if(l=ET(s,UO(i,r)),l<0)return!0;a=ET(s,UO(e,n),l>=0?l:1/0)}else{if(a=ET(s,UO(e,n)),a<0)return!1;l=ET(s,UO(i,r),a>=0?a:1/0)}return a>=0?l>=0?a<=l:!0:l>=0?!1:!!o}catch{}return!!o}function Wun(t,e,n){const i=t.contentWindow;if(!i)return;let r=!1,o;try{o=i.document.readyState}catch{return}if(o!=="complete"){const a=WNe(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{Nxt(a),r=!0,e()});return}const s="about:blank";if(i.location.href!==s||t.src===s||t.src==="")return WNe(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function Uun(t,e,n){let i=!1,r;try{r=t.sheet}catch{return}if(r)return;const o=WNe(()=>{i||(e(),i=!0)},n);t.addEventListener("load",()=>{Nxt(o),i=!0,e()})}function Kun(t,e){const{doc:n,mirror:i,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:a,maskAttributeFn:l,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:h,inlineStylesheet:f,maskInputOptions:m={},maskTextFn:p,maskInputFn:g,dataURLOptions:y={},inlineImages:_,recordCanvas:w,keepIframeSrcFn:C,newlyAddedElement:N=!1}=e,E=qun(n,i);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:nd.Document,childNodes:[],compatMode:t.compatMode}:{type:nd.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:nd.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:E};case t.ELEMENT_NODE:return Yun(t,{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:f,maskAttributeFn:l,maskInputOptions:m,maskInputFn:g,dataURLOptions:y,inlineImages:_,recordCanvas:w,keepIframeSrcFn:C,newlyAddedElement:N,rootId:E,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:h});case t.TEXT_NODE:return Gun(t,{doc:n,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:h,maskTextFn:p,maskInputOptions:m,maskInputFn:g,rootId:E});case t.CDATA_SECTION_NODE:return{type:nd.CDATA,textContent:"",rootId:E};case t.COMMENT_NODE:return{type:nd.Comment,textContent:t.textContent||"",rootId:E};default:return!1}}function qun(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return n===1?void 0:n}function Gun(t,e){const{maskAllText:n,maskTextClass:i,unmaskTextClass:r,maskTextSelector:o,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:l,maskInputFn:c,rootId:u}=e,d=t.parentNode&&t.parentNode.tagName;let h=t.textContent;const f=d==="STYLE"?!0:void 0,m=d==="SCRIPT"?!0:void 0,p=d==="TEXTAREA"?!0:void 0;if(f&&h){try{t.nextSibling||t.previousSibling||pz([t,"access",y=>y.parentNode,"access",y=>y.sheet,"optionalAccess",y=>y.cssRules])&&(h=sne(t.parentNode.sheet))}catch(y){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${y}`,t)}h=lne(h,yue(e.doc))}m&&(h="SCRIPT_PLACEHOLDER");const g=bj(t,i,o,r,s,n);if(!f&&!m&&!p&&h&&g&&(h=a?a(h,t.parentElement):h.replace(/[\S]/g,"*")),p&&h&&(l.textarea||g)&&(h=c?c(h,t.parentNode):h.replace(/[\S]/g,"*")),d==="OPTION"&&h){const y=vue({type:null,tagName:d,maskInputOptions:l});h=gz({isMasked:bj(t,i,o,r,s,y),element:t,value:h,maskInputFn:c})}return{type:nd.Text,textContent:h||"",isStyle:f,rootId:u}}function Yun(t,e){const{doc:n,blockClass:i,blockSelector:r,unblockSelector:o,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:l,maskInputFn:c,dataURLOptions:u={},inlineImages:d,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:m=!1,rootId:p,maskAllText:g,maskTextClass:y,unmaskTextClass:_,maskTextSelector:w,unmaskTextSelector:C}=e,N=zun(t,i,r,o),E=Iun(t);let D={};const k=t.attributes.length;for(let T=0;T<k;T++){const A=t.attributes[T];A.name&&!Dxt(E,A.name,A.value)&&(D[A.name]=Ext(n,E,gj(A.name),A.value,t,l))}if(E==="link"&&s){const T=Array.from(n.styleSheets).find(R=>R.href===t.href);let A=null;T&&(A=sne(T)),A&&(delete D.rel,delete D.href,D._cssText=lne(A,T.href))}if(E==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const T=sne(t.sheet);T&&(D._cssText=lne(T,yue(n)))}if(E==="input"||E==="textarea"||E==="select"||E==="option"){const T=t,A=z3e(T),R=ane(T,HNe(E),A),P=T.checked;if(A!=="submit"&&A!=="button"&&R){const O=bj(T,y,w,_,C,vue({type:A,tagName:HNe(E),maskInputOptions:a}));D.value=gz({isMasked:O,element:T,value:R,maskInputFn:c})}P&&(D.checked=P)}if(E==="option"&&(t.selected&&!a.select?D.selected=!0:delete D.selected),E==="canvas"&&h){if(t.__context==="2d")Mun(t)||(D.rr_dataURL=t.toDataURL(u.type,u.quality));else if(!("__context"in t)){const T=t.toDataURL(u.type,u.quality),A=n.createElement("canvas");A.width=t.width,A.height=t.height;const R=A.toDataURL(u.type,u.quality);T!==R&&(D.rr_dataURL=T)}}if(E==="img"&&d){wP||(wP=n.createElement("canvas"),oZe=wP.getContext("2d"));const T=t,A=T.currentSrc||T.getAttribute("src")||"<unknown-src>",R=T.crossOrigin,P=()=>{T.removeEventListener("load",P);try{wP.width=T.naturalWidth,wP.height=T.naturalHeight,oZe.drawImage(T,0,0),D.rr_dataURL=wP.toDataURL(u.type,u.quality)}catch(O){if(T.crossOrigin!=="anonymous"){T.crossOrigin="anonymous",T.complete&&T.naturalWidth!==0?P():T.addEventListener("load",P);return}else console.warn(`Cannot inline img src=${A}! Error: ${O}`)}T.crossOrigin==="anonymous"&&(R?D.crossOrigin=R:T.removeAttribute("crossorigin"))};T.complete&&T.naturalWidth!==0?P():T.addEventListener("load",P)}if((E==="audio"||E==="video")&&(D.rr_mediaState=t.paused?"paused":"played",D.rr_mediaCurrentTime=t.currentTime),m||(t.scrollLeft&&(D.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(D.rr_scrollTop=t.scrollTop)),N){const{width:T,height:A}=t.getBoundingClientRect();D={class:D.class,rr_width:`${T}px`,rr_height:`${A}px`}}E==="iframe"&&!f(D.src)&&(!N&&!t.contentDocument&&(D.rr_src=D.src),delete D.src);let M;try{customElements.get(E)&&(M=!0)}catch{}return{type:nd.Element,tagName:E,attributes:D,childNodes:[],isSVG:Bun(t)||void 0,needBlock:N,rootId:p,isCustom:M}}function _l(t){return t==null?"":t.toLowerCase()}function Xun(t,e){if(e.comment&&t.type===nd.Comment)return!0;if(t.type===nd.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&Cxt(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(_l(t.attributes.name).match(/^msapplication-tile(image|color)$/)||_l(t.attributes.name)==="application-name"||_l(t.attributes.rel)==="icon"||_l(t.attributes.rel)==="apple-touch-icon"||_l(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&_l(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(_l(t.attributes.property).match(/^(og|twitter|fb):/)||_l(t.attributes.name).match(/^(og|twitter):/)||_l(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(_l(t.attributes.name)==="robots"||_l(t.attributes.name)==="googlebot"||_l(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(_l(t.attributes.name)==="author"||_l(t.attributes.name)==="generator"||_l(t.attributes.name)==="framework"||_l(t.attributes.name)==="publisher"||_l(t.attributes.name)==="progid"||_l(t.attributes.property).match(/^article:/)||_l(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(_l(t.attributes.name)==="google-site-verification"||_l(t.attributes.name)==="yandex-verification"||_l(t.attributes.name)==="csrf-token"||_l(t.attributes.name)==="p:domain_verify"||_l(t.attributes.name)==="verify-v1"||_l(t.attributes.name)==="verification"||_l(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function KO(t,e){const{doc:n,mirror:i,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:h=!1,inlineStylesheet:f=!0,maskInputOptions:m={},maskAttributeFn:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:w={},inlineImages:C=!1,recordCanvas:N=!1,onSerialize:E,onIframeLoad:D,iframeLoadTimeout:k=5e3,onStylesheetLoad:M,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:R=!1}=e;let{preserveWhiteSpace:P=!0}=e;const O=Kun(t,{doc:n,mirror:i,blockClass:r,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:f,maskInputOptions:m,maskAttributeFn:p,maskTextFn:g,maskInputFn:y,dataURLOptions:w,inlineImages:C,recordCanvas:N,keepIframeSrcFn:A,newlyAddedElement:R});if(!O)return console.warn(t,"not serialized"),null;let V;i.hasNode(t)?V=i.getId(t):Xun(O,_)||!P&&O.type===nd.Text&&!O.isStyle&&!O.textContent.replace(/^\s+|\s+$/gm,"").length?V=bz:V=H3e();const F=Object.assign(O,{id:V});if(i.add(t,F),V===bz)return null;E&&E(t);let $=!h;if(F.type===nd.Element){$=$&&!F.needBlock,delete F.needBlock;const B=t.shadowRoot;B&&C9(B)&&(F.isShadowHost=!0)}if((F.type===nd.Document||F.type===nd.Element)&&$){_.headWhitespace&&F.type===nd.Element&&F.tagName==="head"&&(P=!1);const B={doc:n,mirror:i,blockClass:r,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:h,inlineStylesheet:f,maskInputOptions:m,maskAttributeFn:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:w,inlineImages:C,recordCanvas:N,preserveWhiteSpace:P,onSerialize:E,onIframeLoad:D,iframeLoadTimeout:k,onStylesheetLoad:M,stylesheetLoadTimeout:T,keepIframeSrcFn:A};for(const z of Array.from(t.childNodes)){const H=KO(z,B);H&&F.childNodes.push(H)}if(wun(t)&&t.shadowRoot)for(const z of Array.from(t.shadowRoot.childNodes)){const H=KO(z,B);H&&(C9(t.shadowRoot)&&(H.isShadow=!0),F.childNodes.push(H))}}return t.parentNode&&w9(t.parentNode)&&C9(t.parentNode)&&(F.isShadow=!0),F.type===nd.Element&&F.tagName==="iframe"&&Wun(t,()=>{const B=t.contentDocument;if(B&&D){const z=KO(B,{doc:B,mirror:i,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:m,maskAttributeFn:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:w,inlineImages:C,recordCanvas:N,preserveWhiteSpace:P,onSerialize:E,onIframeLoad:D,iframeLoadTimeout:k,onStylesheetLoad:M,stylesheetLoadTimeout:T,keepIframeSrcFn:A});z&&D(t,z)}},k),F.type===nd.Element&&F.tagName==="link"&&typeof F.attributes.rel=="string"&&(F.attributes.rel==="stylesheet"||F.attributes.rel==="preload"&&typeof F.attributes.href=="string"&&Cxt(F.attributes.href)==="css")&&Uun(t,()=>{if(M){const B=KO(t,{doc:n,mirror:i,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:m,maskAttributeFn:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:w,inlineImages:C,recordCanvas:N,preserveWhiteSpace:P,onSerialize:E,onIframeLoad:D,iframeLoadTimeout:k,onStylesheetLoad:M,stylesheetLoadTimeout:T,keepIframeSrcFn:A});B&&M(t,B)}},T),F}function Zun(t,e){const{mirror:n=new wxt,blockClass:i="rr-block",blockSelector:r=null,unblockSelector:o=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:c=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:h=!1,recordCanvas:f=!1,maskAllInputs:m=!1,maskAttributeFn:p,maskTextFn:g,maskInputFn:y,slimDOM:_=!1,dataURLOptions:w,preserveWhiteSpace:C,onSerialize:N,onIframeLoad:E,iframeLoadTimeout:D,onStylesheetLoad:k,stylesheetLoadTimeout:M,keepIframeSrcFn:T=()=>!1}=e||{};return KO(t,{doc:t,mirror:n,blockClass:i,blockSelector:r,unblockSelector:o,maskAllText:s,maskTextClass:a,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:m===!1?{}:m,maskAttributeFn:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:_===!0||_==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:_==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:_===!1?{}:_,dataURLOptions:w,inlineImages:h,recordCanvas:f,preserveWhiteSpace:C,onSerialize:N,onIframeLoad:E,iframeLoadTimeout:D,onStylesheetLoad:k,stylesheetLoadTimeout:M,keepIframeSrcFn:T,newlyAddedElement:!1})}function eE(t){let e,n=t[0],i=1;for(;i<t.length;){const r=t[i],o=t[i+1];if(i+=2,(r==="optionalAccess"||r==="optionalCall")&&n==null)return;r==="access"||r==="optionalAccess"?(e=n,n=o(n)):(r==="call"||r==="optionalCall")&&(n=o((...s)=>n.call(e,...s)),e=void 0)}return n}function cm(t,e,n=document){const i={capture:!0,passive:!0};return n.addEventListener(t,e,i),()=>n.removeEventListener(t,e,i)}const SO=`Please stop import mirror directly. Instead of that,\r
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
or you can use record.mirror to access the mirror instance during recording.`;let aZe={map:{},getId(){return console.error(SO),-1},getNode(){return console.error(SO),null},removeNodeFromMap(){console.error(SO)},has(){return console.error(SO),!1},reset(){console.error(SO)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(aZe=new Proxy(aZe,{get(t,e,n){return e==="map"&&console.error(SO),Reflect.get(t,e,n)}}));function vz(t,e,n={}){let i=null,r=0;return function(...o){const s=Date.now();!r&&n.leading===!1&&(r=s);const a=e-(s-r),l=this;a<=0||a>e?(i&&(rdn(i),i=null),r=s,t.apply(l,o)):!i&&n.trailing!==!1&&(i=_ue(()=>{r=n.leading===!1?0:Date.now(),i=null,t.apply(l,o)},a))}}function kxt(t,e,n,i,r=window){const o=r.Object.getOwnPropertyDescriptor(t,e);return r.Object.defineProperty(t,e,i?n:{set(s){_ue(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>kxt(t,e,o||{},!0)}function W3e(t,e,n){try{if(!(e in t))return()=>{};const i=t[e],r=n(i);return typeof r=="function"&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=r,()=>{t[e]=i}}catch{return()=>{}}}let cne=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(cne=()=>new Date().getTime());function Mxt(t){const e=t.document;return{left:e.scrollingElement?e.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:eE([e,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||eE([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||eE([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:e.scrollingElement?e.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:eE([e,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||eE([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||eE([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function Lxt(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Txt(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ixt(t){return t?t.nodeType===t.ELEMENT_NODE?t:t.parentElement:null}function Ig(t,e,n,i,r){if(!t)return!1;const o=Ixt(t);if(!o)return!1;const s=UO(e,n);if(!r){const c=i&&o.matches(i);return s(o)&&!c}const a=ET(o,s);let l=-1;return a<0?!1:(i&&(l=ET(o,UO(null,i))),a>-1&&l<0?!0:a<l)}function Qun(t,e){return e.getId(t)!==-1}function Q0e(t,e){return e.getId(t)===bz}function Axt(t,e){if(w9(t))return!1;const n=e.getId(t);return e.has(n)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?!1:t.parentNode?Axt(t.parentNode,e):!0:!0}function UNe(t){return!!t.changedTouches}function Jun(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let n=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function Rxt(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function Pxt(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function KNe(t){return!!eE([t,"optionalAccess",e=>e.shadowRoot])}class edn{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return Won(this.styleIDMap.get(e),()=>-1)}has(e){return this.styleIDMap.has(e)}add(e,n){if(this.has(e))return this.getId(e);let i;return n===void 0?i=this.id++:i=n,this.styleIDMap.set(e,i),this.idStyleMap.set(i,e),i}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Oxt(t){let e=null;return eE([t,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(e=t.getRootNode().host),e}function tdn(t){let e=t,n;for(;n=Oxt(e);)e=n;return e}function ndn(t){const e=t.ownerDocument;if(!e)return!1;const n=tdn(t);return e.contains(n)}function jxt(t){const e=t.ownerDocument;return e?e.contains(t)||ndn(t):!1}const lZe={};function U3e(t){const e=lZe[t];if(e)return e;const n=window.document;let i=window[t];if(n&&typeof n.createElement=="function")try{const r=n.createElement("iframe");r.hidden=!0,n.head.appendChild(r);const o=r.contentWindow;o&&o[t]&&(i=o[t]),n.head.removeChild(r)}catch{}return lZe[t]=i.bind(window)}function idn(...t){return U3e("requestAnimationFrame")(...t)}function _ue(...t){return U3e("setTimeout")(...t)}function rdn(...t){return U3e("clearTimeout")(...t)}var qo=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(qo||{}),_o=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(_o||{}),Yf=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Yf||{}),N1=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(N1||{});function odn(t){let e,n=t[0],i=1;for(;i<t.length;){const r=t[i],o=t[i+1];if(i+=2,(r==="optionalAccess"||r==="optionalCall")&&n==null)return;r==="access"||r==="optionalAccess"?(e=n,n=o(n)):(r==="call"||r==="optionalCall")&&(n=o((...s)=>n.call(e,...s)),e=void 0)}return n}function cZe(t){return"__ln"in t}class sdn{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let i=0;i<e;i++)n=odn([n,"optionalAccess",r=>r.next])||null;return n}addNode(e){const n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&cZe(e.previousSibling)){const i=e.previousSibling.__ln.next;n.next=i,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,i&&(i.previous=n)}else if(e.nextSibling&&cZe(e.nextSibling)&&e.nextSibling.__ln.previous){const i=e.nextSibling.__ln.previous;n.previous=i,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,i&&(i.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(e){const n=e.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const uZe=(t,e)=>`${t}@${e}`;class adn{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],n=new Set,i=new sdn,r=l=>{let c=l,u=bz;for(;u===bz;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},o=l=>{if(!l.parentNode||!jxt(l))return;const c=w9(l.parentNode)?this.mirror.getId(Oxt(l)):this.mirror.getId(l.parentNode),u=r(l);if(c===-1||u===-1)return i.addNode(l);const d=KO(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:h=>{Rxt(h,this.mirror)&&!Ig(h,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(h),Pxt(h,this.mirror)&&this.stylesheetManager.trackLinkElement(h),KNe(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(h,f)=>{Ig(h,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(h,f),h.contentWindow&&this.canvasManager.addWindow(h.contentWindow),this.shadowDomManager.observeAttachShadow(h))},onStylesheetLoad:(h,f)=>{this.stylesheetManager.attachLinkElement(h,f)}});d&&(e.push({parentId:c,nextId:u,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)dZe(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||o(l);for(const l of this.addedSet)!hZe(this.droppedSet,l)&&!dZe(this.removes,l,this.mirror)||hZe(this.movedSet,l)?o(l):this.droppedSet.add(l);let s=null;for(;i.length;){let l=null;if(s){const c=this.mirror.getId(s.value.parentNode),u=r(s.value);c!==-1&&u!==-1&&(l=s)}if(!l){let c=i.tail;for(;c;){const u=c;if(c=c.previous,u){const d=this.mirror.getId(u.value.parentNode);if(r(u.value)===-1)continue;if(d!==-1){l=u;break}else{const f=u.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=f.parentNode.host;if(this.mirror.getId(m)!==-1){l=u;break}}}}}}if(!l){for(;i.head;)i.removeNode(i.head.value);break}s=l.previous,i.removeNode(l.value),o(l.value)}const a={texts:this.texts.map(l=>({id:this.mirror.getId(l.node),value:l.value})).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:c}=l;if(typeof c.style=="string"){const u=JSON.stringify(l.styleDiff),d=JSON.stringify(l._unchangedStyles);u.length<c.style.length&&(u+d).split("var(").length===c.style.split("var(").length&&(c.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:c}}).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=e=>{if(!Q0e(e.target,this.mirror))switch(e.type){case"characterData":{const n=e.target.textContent;!Ig(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:bj(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,Ixt(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{const n=e.target;let i=e.attributeName,r=e.target.getAttribute(i);if(i==="value"){const s=z3e(n),a=n.tagName;r=ane(n,a,s);const l=vue({maskInputOptions:this.maskInputOptions,tagName:a,type:s}),c=bj(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);r=gz({isMasked:c,element:n,value:r,maskInputFn:this.maskInputFn})}if(Ig(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let o=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&i==="src"&&!this.keepIframeSrcFn(r))if(!n.contentDocument)i="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),i==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!Dxt(n.tagName,i)&&(o.attributes[i]=Ext(this.doc,gj(n.tagName),gj(i),r,n,this.maskAttributeFn),i==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const s=this.unattachedDoc.createElement("span");e.oldValue&&s.setAttribute("style",e.oldValue);for(const a of Array.from(n.style)){const l=n.style.getPropertyValue(a),c=n.style.getPropertyPriority(a);l!==s.style.getPropertyValue(a)||c!==s.style.getPropertyPriority(a)?c===""?o.styleDiff[a]=l:o.styleDiff[a]=[l,c]:o._unchangedStyles[a]=[l,c]}for(const a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}break}case"childList":{if(Ig(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{const i=this.mirror.getId(n),r=w9(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Ig(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Q0e(n,this.mirror)||!Qun(n,this.mirror)||(this.addedSet.has(n)?(qNe(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&i===-1||Axt(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[uZe(i,r)]?qNe(this.movedSet,n):this.removes.push({parentId:r,id:i,isShadow:w9(e.target)&&C9(e.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(e,n)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Q0e(e,this.mirror))return;this.movedSet.add(e);let i=null;n&&this.mirror.hasNode(n)&&(i=this.mirror.getId(n)),i&&i!==-1&&(this.movedMap[uZe(this.mirror.getId(e),i)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ig(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach(i=>this.genAdds(i)),KNe(e)&&e.shadowRoot.childNodes.forEach(i=>{this.processedNodeManager.add(i,this),this.genAdds(i,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=e[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function qNe(t,e){t.delete(e),e.childNodes.forEach(n=>qNe(t,n))}function dZe(t,e,n){return t.length===0?!1:ldn(t,e,n)}function ldn(t,e,n){let i=e.parentNode;for(;i;){const r=n.getId(i);if(t.some(o=>o.id===r))return!0;i=i.parentNode}return!1}function hZe(t,e){return t.size===0?!1:Fxt(t,e)}function Fxt(t,e){const{parentNode:n}=e;return n?t.has(n)?!0:Fxt(t,n):!1}let S9;function cdn(t){S9=t}function udn(){S9=void 0}const Os=t=>S9?(...n)=>{try{return t(...n)}catch(i){if(S9&&S9(i)===!0)return()=>{};throw i}}:t;function Uy(t){let e,n=t[0],i=1;for(;i<t.length;){const r=t[i],o=t[i+1];if(i+=2,(r==="optionalAccess"||r==="optionalCall")&&n==null)return;r==="access"||r==="optionalAccess"?(e=n,n=o(n)):(r==="call"||r==="optionalCall")&&(n=o((...s)=>n.call(e,...s)),e=void 0)}return n}const qO=[];function uK(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function $xt(t,e){const n=new adn;qO.push(n),n.init(t);let i=window.MutationObserver||window.__rrMutationObserver;const r=Uy([window,"optionalAccess",s=>s.Zone,"optionalAccess",s=>s.__symbol__,"optionalCall",s=>s("MutationObserver")]);r&&window[r]&&(i=window[r]);const o=new i(Os(s=>{t.onMutation&&t.onMutation(s)===!1||n.processMutations.bind(n)(s)}));return o.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function ddn({mousemoveCb:t,sampling:e,doc:n,mirror:i}){if(e.mousemove===!1)return()=>{};const r=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let s=[],a;const l=vz(Os(d=>{const h=Date.now()-a;t(s.map(f=>(f.timeOffset-=h,f)),d),s=[],a=null}),o),c=Os(vz(Os(d=>{const h=uK(d),{clientX:f,clientY:m}=UNe(d)?d.changedTouches[0]:d;a||(a=cne()),s.push({x:f,y:m,id:i.getId(h),timeOffset:cne()-a}),l(typeof DragEvent<"u"&&d instanceof DragEvent?_o.Drag:d instanceof MouseEvent?_o.MouseMove:_o.TouchMove)}),r,{trailing:!1})),u=[cm("mousemove",c,n),cm("touchmove",c,n),cm("drag",c,n)];return Os(()=>{u.forEach(d=>d())})}function hdn({mouseInteractionCb:t,doc:e,mirror:n,blockClass:i,blockSelector:r,unblockSelector:o,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,l=[];let c=null;const u=d=>h=>{const f=uK(h);if(Ig(f,i,r,o,!0))return;let m=null,p=d;if("pointerType"in h){switch(h.pointerType){case"mouse":m=N1.Mouse;break;case"touch":m=N1.Touch;break;case"pen":m=N1.Pen;break}m===N1.Touch?Yf[d]===Yf.MouseDown?p="TouchStart":Yf[d]===Yf.MouseUp&&(p="TouchEnd"):N1.Pen}else UNe(h)&&(m=N1.Touch);m!==null?(c=m,(p.startsWith("Touch")&&m===N1.Touch||p.startsWith("Mouse")&&m===N1.Mouse)&&(m=null)):Yf[d]===Yf.Click&&(m=c,c=null);const g=UNe(h)?h.changedTouches[0]:h;if(!g)return;const y=n.getId(f),{clientX:_,clientY:w}=g;Os(t)({type:Yf[p],id:y,x:_,y:w,...m!==null&&{pointerType:m}})};return Object.keys(Yf).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let h=gj(d);const f=u(d);if(window.PointerEvent)switch(Yf[d]){case Yf.MouseDown:case Yf.MouseUp:h=h.replace("mouse","pointer");break;case Yf.TouchStart:case Yf.TouchEnd:return}l.push(cm(h,f,e))}),Os(()=>{l.forEach(d=>d())})}function Vxt({scrollCb:t,doc:e,mirror:n,blockClass:i,blockSelector:r,unblockSelector:o,sampling:s}){const a=Os(vz(Os(l=>{const c=uK(l);if(!c||Ig(c,i,r,o,!0))return;const u=n.getId(c);if(c===e&&e.defaultView){const d=Mxt(e.defaultView);t({id:u,x:d.left,y:d.top})}else t({id:u,x:c.scrollLeft,y:c.scrollTop})}),s.scroll||100));return cm("scroll",a,e)}function fdn({viewportResizeCb:t},{win:e}){let n=-1,i=-1;const r=Os(vz(Os(()=>{const o=Lxt(),s=Txt();(n!==o||i!==s)&&(t({width:Number(s),height:Number(o)}),n=o,i=s)}),200));return cm("resize",r,e)}const mdn=["INPUT","TEXTAREA","SELECT"],fZe=new WeakMap;function pdn({inputCb:t,doc:e,mirror:n,blockClass:i,blockSelector:r,unblockSelector:o,ignoreClass:s,ignoreSelector:a,maskInputOptions:l,maskInputFn:c,sampling:u,userTriggeredOnInput:d,maskTextClass:h,unmaskTextClass:f,maskTextSelector:m,unmaskTextSelector:p}){function g(D){let k=uK(D);const M=D.isTrusted,T=k&&HNe(k.tagName);if(T==="OPTION"&&(k=k.parentElement),!k||!T||mdn.indexOf(T)<0||Ig(k,i,r,o,!0))return;const A=k;if(A.classList.contains(s)||a&&A.matches(a))return;const R=z3e(k);let P=ane(A,T,R),O=!1;const V=vue({maskInputOptions:l,tagName:T,type:R}),F=bj(k,h,m,f,p,V);(R==="radio"||R==="checkbox")&&(O=k.checked),P=gz({isMasked:F,element:k,value:P,maskInputFn:c}),y(k,d?{text:P,isChecked:O,userTriggered:M}:{text:P,isChecked:O});const $=k.name;R==="radio"&&$&&O&&e.querySelectorAll(`input[type="radio"][name="${$}"]`).forEach(B=>{if(B!==k){const z=gz({isMasked:F,element:B,value:ane(B,T,R),maskInputFn:c});y(B,d?{text:z,isChecked:!O,userTriggered:!1}:{text:z,isChecked:!O})}})}function y(D,k){const M=fZe.get(D);if(!M||M.text!==k.text||M.isChecked!==k.isChecked){fZe.set(D,k);const T=n.getId(D);Os(t)({...k,id:T})}}const w=(u.input==="last"?["change"]:["input","change"]).map(D=>cm(D,Os(g),e)),C=e.defaultView;if(!C)return()=>{w.forEach(D=>D())};const N=C.Object.getOwnPropertyDescriptor(C.HTMLInputElement.prototype,"value"),E=[[C.HTMLInputElement.prototype,"value"],[C.HTMLInputElement.prototype,"checked"],[C.HTMLSelectElement.prototype,"value"],[C.HTMLTextAreaElement.prototype,"value"],[C.HTMLSelectElement.prototype,"selectedIndex"],[C.HTMLOptionElement.prototype,"selected"]];return N&&N.set&&w.push(...E.map(D=>kxt(D[0],D[1],{set(){Os(g)({target:this,isTrusted:!1})}},!1,C))),Os(()=>{w.forEach(D=>D())})}function une(t){const e=[];function n(i,r){if(JX("CSSGroupingRule")&&i.parentRule instanceof CSSGroupingRule||JX("CSSMediaRule")&&i.parentRule instanceof CSSMediaRule||JX("CSSSupportsRule")&&i.parentRule instanceof CSSSupportsRule||JX("CSSConditionRule")&&i.parentRule instanceof CSSConditionRule){const s=Array.from(i.parentRule.cssRules).indexOf(i);r.unshift(s)}else if(i.parentStyleSheet){const s=Array.from(i.parentStyleSheet.cssRules).indexOf(i);r.unshift(s)}return r}return n(t,e)}function tE(t,e,n){let i,r;return t?(t.ownerNode?i=e.getId(t.ownerNode):r=n.getId(t),{styleId:r,id:i}):{}}function gdn({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:i}){if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};const r=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(r,{apply:Os((u,d,h)=>{const[f,m]=h,{id:p,styleId:g}=tE(d,e,n.styleMirror);return(p&&p!==-1||g&&g!==-1)&&t({id:p,styleId:g,adds:[{rule:f,index:m}]}),u.apply(d,h)})});const o=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:Os((u,d,h)=>{const[f]=h,{id:m,styleId:p}=tE(d,e,n.styleMirror);return(m&&m!==-1||p&&p!==-1)&&t({id:m,styleId:p,removes:[{index:f}]}),u.apply(d,h)})});let s;i.CSSStyleSheet.prototype.replace&&(s=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:Os((u,d,h)=>{const[f]=h,{id:m,styleId:p}=tE(d,e,n.styleMirror);return(m&&m!==-1||p&&p!==-1)&&t({id:m,styleId:p,replace:f}),u.apply(d,h)})}));let a;i.CSSStyleSheet.prototype.replaceSync&&(a=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Os((u,d,h)=>{const[f]=h,{id:m,styleId:p}=tE(d,e,n.styleMirror);return(m&&m!==-1||p&&p!==-1)&&t({id:m,styleId:p,replaceSync:f}),u.apply(d,h)})}));const l={};eZ("CSSGroupingRule")?l.CSSGroupingRule=i.CSSGroupingRule:(eZ("CSSMediaRule")&&(l.CSSMediaRule=i.CSSMediaRule),eZ("CSSConditionRule")&&(l.CSSConditionRule=i.CSSConditionRule),eZ("CSSSupportsRule")&&(l.CSSSupportsRule=i.CSSSupportsRule));const c={};return Object.entries(l).forEach(([u,d])=>{c[u]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(c[u].insertRule,{apply:Os((h,f,m)=>{const[p,g]=m,{id:y,styleId:_}=tE(f.parentStyleSheet,e,n.styleMirror);return(y&&y!==-1||_&&_!==-1)&&t({id:y,styleId:_,adds:[{rule:p,index:[...une(f),g||0]}]}),h.apply(f,m)})}),d.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:Os((h,f,m)=>{const[p]=m,{id:g,styleId:y}=tE(f.parentStyleSheet,e,n.styleMirror);return(g&&g!==-1||y&&y!==-1)&&t({id:g,styleId:y,removes:[{index:[...une(f),p]}]}),h.apply(f,m)})})}),Os(()=>{i.CSSStyleSheet.prototype.insertRule=r,i.CSSStyleSheet.prototype.deleteRule=o,s&&(i.CSSStyleSheet.prototype.replace=s),a&&(i.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([u,d])=>{d.prototype.insertRule=c[u].insertRule,d.prototype.deleteRule=c[u].deleteRule})})}function Bxt({mirror:t,stylesheetManager:e},n){let i=null;n.nodeName==="#document"?i=t.getId(n):i=t.getId(n.host);const r=n.nodeName==="#document"?Uy([n,"access",s=>s.defaultView,"optionalAccess",s=>s.Document]):Uy([n,"access",s=>s.ownerDocument,"optionalAccess",s=>s.defaultView,"optionalAccess",s=>s.ShadowRoot]),o=Uy([r,"optionalAccess",s=>s.prototype])?Object.getOwnPropertyDescriptor(Uy([r,"optionalAccess",s=>s.prototype]),"adoptedStyleSheets"):void 0;return i===null||i===-1||!r||!o?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return Uy([o,"access",s=>s.get,"optionalAccess",s=>s.call,"call",s=>s(this)])},set(s){const a=Uy([o,"access",l=>l.set,"optionalAccess",l=>l.call,"call",l=>l(this,s)]);if(i!==null&&i!==-1)try{e.adoptStyleSheets(s,i)}catch{}return a}}),Os(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function bdn({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:i},{win:r}){const o=r.CSSStyleDeclaration.prototype.setProperty;r.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:Os((a,l,c)=>{const[u,d,h]=c;if(n.has(u))return o.apply(l,[u,d,h]);const{id:f,styleId:m}=tE(Uy([l,"access",p=>p.parentRule,"optionalAccess",p=>p.parentStyleSheet]),e,i.styleMirror);return(f&&f!==-1||m&&m!==-1)&&t({id:f,styleId:m,set:{property:u,value:d,priority:h},index:une(l.parentRule)}),a.apply(l,c)})});const s=r.CSSStyleDeclaration.prototype.removeProperty;return r.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:Os((a,l,c)=>{const[u]=c;if(n.has(u))return s.apply(l,[u]);const{id:d,styleId:h}=tE(Uy([l,"access",f=>f.parentRule,"optionalAccess",f=>f.parentStyleSheet]),e,i.styleMirror);return(d&&d!==-1||h&&h!==-1)&&t({id:d,styleId:h,remove:{property:u},index:une(l.parentRule)}),a.apply(l,c)})}),Os(()=>{r.CSSStyleDeclaration.prototype.setProperty=o,r.CSSStyleDeclaration.prototype.removeProperty=s})}function vdn({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:i,mirror:r,sampling:o,doc:s}){const a=Os(c=>vz(Os(u=>{const d=uK(u);if(!d||Ig(d,e,n,i,!0))return;const{currentTime:h,volume:f,muted:m,playbackRate:p}=d;t({type:c,id:r.getId(d),currentTime:h,volume:f,muted:m,playbackRate:p})}),o.media||500)),l=[cm("play",a(0),s),cm("pause",a(1),s),cm("seeked",a(2),s),cm("volumechange",a(3),s),cm("ratechange",a(4),s)];return Os(()=>{l.forEach(c=>c())})}function ydn({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const i=[],r=new WeakMap,o=n.FontFace;n.FontFace=function(l,c,u){const d=new o(l,c,u);return r.set(d,{family:l,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),d};const s=W3e(e.fonts,"add",function(a){return function(l){return _ue(Os(()=>{const c=r.get(l);c&&(t(c),r.delete(l))}),0),a.apply(this,[l])}});return i.push(()=>{n.FontFace=o}),i.push(s),Os(()=>{i.forEach(a=>a())})}function _dn(t){const{doc:e,mirror:n,blockClass:i,blockSelector:r,unblockSelector:o,selectionCb:s}=t;let a=!0;const l=Os(()=>{const c=e.getSelection();if(!c||a&&Uy([c,"optionalAccess",h=>h.isCollapsed]))return;a=c.isCollapsed||!1;const u=[],d=c.rangeCount||0;for(let h=0;h<d;h++){const f=c.getRangeAt(h),{startContainer:m,startOffset:p,endContainer:g,endOffset:y}=f;Ig(m,i,r,o,!0)||Ig(g,i,r,o,!0)||u.push({start:n.getId(m),startOffset:p,end:n.getId(g),endOffset:y})}s({ranges:u})});return l(),cm("selectionchange",l)}function xdn({doc:t,customElementCb:e}){const n=t.defaultView;return!n||!n.customElements?()=>{}:W3e(n.customElements,"define",function(r){return function(o,s,a){try{e({define:{name:o}})}catch{}return r.apply(this,[o,s,a])}})}function wdn(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};let i;t.recordDOM&&(i=$xt(t,t.doc));const r=ddn(t),o=hdn(t),s=Vxt(t),a=fdn(t,{win:n}),l=pdn(t),c=vdn(t);let u=()=>{},d=()=>{},h=()=>{},f=()=>{};t.recordDOM&&(u=gdn(t,{win:n}),d=Bxt(t,t.doc),h=bdn(t,{win:n}),t.collectFonts&&(f=ydn(t)));const m=_dn(t),p=xdn(t),g=[];for(const y of t.plugins)g.push(y.observer(y.callback,n,y.options));return Os(()=>{qO.forEach(y=>y.reset()),Uy([i,"optionalAccess",y=>y.disconnect,"call",y=>y()]),r(),o(),s(),a(),l(),c(),u(),d(),h(),f(),m(),p(),g.forEach(y=>y())})}function JX(t){return typeof window[t]<"u"}function eZ(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class GNe{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,n,i,r){const o=i||this.getIdToRemoteIdMap(e),s=r||this.getRemoteIdToIdMap(e);let a=o.get(n);return a||(a=this.generateIdFn(),o.set(n,a),s.set(a,n)),a}getIds(e,n){const i=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return n.map(o=>this.getId(e,o,i,r))}getRemoteId(e,n,i){const r=i||this.getRemoteIdToIdMap(e);if(typeof n!="number")return n;const o=r.get(n);return o||-1}getRemoteIds(e,n){const i=this.getRemoteIdToIdMap(e);return n.map(r=>this.getRemoteId(e,r,i))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let n=this.iframeIdToRemoteIdMap.get(e);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(e,n)),n}getRemoteIdToIdMap(e){let n=this.iframeRemoteIdToIdMap.get(e);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(e,n)),n}}function mZe(t){let e,n=t[0],i=1;for(;i<t.length;){const r=t[i],o=t[i+1];if(i+=2,(r==="optionalAccess"||r==="optionalCall")&&n==null)return;r==="access"||r==="optionalAccess"?(e=n,n=o(n)):(r==="call"||r==="optionalCall")&&(n=o((...s)=>n.call(e,...s)),e=void 0)}return n}class Cdn{constructor(){this.crossOriginIframeMirror=new GNe(H3e),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Sdn{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new GNe(H3e),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new GNe(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,n){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),mZe([this,"access",i=>i.loadListener,"optionalCall",i=>i(e)]),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const n=e;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!e.source)return;const r=this.crossOriginIframeMap.get(e.source);if(!r)return;const o=this.transformCrossOriginEvent(r,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(e,n){switch(n.type){case qo.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(n.data.node,e);const i=n.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(n.data.node,i),{timestamp:n.timestamp,type:qo.IncrementalSnapshot,data:{source:_o.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case qo.Meta:case qo.Load:case qo.DomContentLoaded:return!1;case qo.Plugin:return n;case qo.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case qo.IncrementalSnapshot:switch(n.data.source){case _o.Mutation:return n.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(i.node,r)}),n.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),n.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),n.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),n;case _o.Drag:case _o.TouchMove:case _o.MouseMove:return n.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),n;case _o.ViewportResize:return!1;case _o.MediaInteraction:case _o.MouseInteraction:case _o.Scroll:case _o.CanvasMutation:case _o.Input:return this.replaceIds(n.data,e,["id"]),n;case _o.StyleSheetRule:case _o.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case _o.Font:return n;case _o.Selection:return n.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),n;case _o.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),mZe([n,"access",i=>i.data,"access",i=>i.styles,"optionalAccess",i=>i.forEach,"call",i=>i(r=>{this.replaceStyleIds(r,e,["styleId"])})]),n}}return!1}replace(e,n,i,r){for(const o of r)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=e.getIds(i,n[o]):n[o]=e.getId(i,n[o]));return n}replaceIds(e,n,i){return this.replace(this.crossOriginIframeMirror,e,n,i)}replaceStyleIds(e,n,i){return this.replace(this.crossOriginIframeStyleMirror,e,n,i)}replaceIdOnNode(e,n){this.replaceIds(e,n,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(i=>{this.replaceIdOnNode(i,n)})}patchRootIdOnNode(e,n){e.type!==nd.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(i=>{this.patchRootIdOnNode(i,n)})}}class Ndn{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Edn{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,n){if(!C9(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const i=$xt({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(Vxt({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),_ue(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Bxt({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,n){const i=this;this.restoreHandlers.push(W3e(e.prototype,"attachShadow",function(r){return function(o){const s=r.call(this,o);return this.shadowRoot&&jxt(this)&&i.addShadowRoot(this.shadowRoot,n),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class pZe{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class Ddn{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new edn,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,n){if(e.length===0)return;const i={id:n,styleIds:[]},r=[];for(const o of e){let s;this.styleMirror.has(o)?s=this.styleMirror.getId(o):(s=this.styleMirror.add(o),r.push({styleId:s,rules:Array.from(o.rules||CSSRule,(a,l)=>({rule:xxt(a),index:l}))})),i.styleIds.push(s)}r.length>0&&(i.styles=r),this.adoptedStyleSheetCb(i)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class kdn{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,n){const i=this.nodeMap.get(e);return i&&Array.from(i).some(r=>r!==n)}add(e,n){this.active||(this.active=!0,idn(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}destroy(){}}let Cc,dne;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=Og([t,"access",e=>e.contentWindow,"optionalAccess",e=>e.Array,"access",e=>e.from])||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const xy=kun();function SC(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskAllText:c=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:h=null,unmaskTextSelector:f=null,inlineStylesheet:m=!0,maskAllInputs:p,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:_,maskInputFn:w,maskTextFn:C,maxCanvasSize:N=null,packFn:E,sampling:D={},dataURLOptions:k={},mousemoveWait:M,recordDOM:T=!0,recordCanvas:A=!1,recordCrossOriginIframes:R=!1,recordAfter:P=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:O=!1,collectFonts:V=!1,inlineImages:F=!1,plugins:$,keepIframeSrcFn:B=()=>!1,ignoreCSSAttributes:z=new Set([]),errorHandler:H,onMutation:K,getCanvasManager:q}=t;cdn(H);const U=R?window.parent===window:!0;let Y=!1;if(!U)try{window.parent.document&&(Y=!1)}catch{Y=!0}if(U&&!e)throw new Error("emit function is required");if(!U&&!Y)return()=>{};M!==void 0&&D.mousemove===void 0&&(D.mousemove=M),xy.reset();const J=p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g!==void 0?g:{},ae=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all"}:y||{};Jun();let se,oe=0;const fe=ge=>{for(const he of $||[])he.eventProcessor&&(ge=he.eventProcessor(ge));return E&&!Y&&(ge=E(ge)),ge};Cc=(ge,he)=>{const me=ge;if(me.timestamp=cne(),Og([qO,"access",X=>X[0],"optionalAccess",X=>X.isFrozen,"call",X=>X()])&&me.type!==qo.FullSnapshot&&!(me.type===qo.IncrementalSnapshot&&me.data.source===_o.Mutation)&&qO.forEach(X=>X.unfreeze()),U)Og([e,"optionalCall",X=>X(fe(me),he)]);else if(Y){const X={type:"rrweb",event:fe(me),origin:window.location.origin,isCheckout:he};window.parent.postMessage(X,"*")}if(me.type===qo.FullSnapshot)se=me,oe=0;else if(me.type===qo.IncrementalSnapshot){if(me.data.source===_o.Mutation&&me.data.isAttachIframe)return;oe++;const X=i&&oe>=i,re=n&&se&&me.timestamp-se.timestamp>n;(X||re)&&Pe(!0)}};const de=ge=>{Cc({type:qo.IncrementalSnapshot,data:{source:_o.Mutation,...ge}})},ie=ge=>Cc({type:qo.IncrementalSnapshot,data:{source:_o.Scroll,...ge}}),Q=ge=>Cc({type:qo.IncrementalSnapshot,data:{source:_o.CanvasMutation,...ge}}),be=ge=>Cc({type:qo.IncrementalSnapshot,data:{source:_o.AdoptedStyleSheet,...ge}}),le=new Ddn({mutationCb:de,adoptedStyleSheetCb:be}),Ne=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Cdn:new Sdn({mirror:xy,mutationCb:de,stylesheetManager:le,recordCrossOriginIframes:R,wrappedEmit:Cc});for(const ge of $||[])ge.getMirror&&ge.getMirror({nodeMirror:xy,crossOriginIframeMirror:Ne.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ne.crossOriginIframeStyleMirror});const Le=new kdn,Te=Ldn(q,{mirror:xy,win:window,mutationCb:ge=>Cc({type:qo.IncrementalSnapshot,data:{source:_o.CanvasMutation,...ge}}),recordCanvas:A,blockClass:r,blockSelector:o,unblockSelector:s,maxCanvasSize:N,sampling:D.canvas,dataURLOptions:k,errorHandler:H}),De=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Ndn:new Edn({mutationCb:de,scrollCb:ie,bypassOptions:{onMutation:K,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:f,inlineStylesheet:m,maskInputOptions:J,dataURLOptions:k,maskAttributeFn:_,maskTextFn:C,maskInputFn:w,recordCanvas:A,inlineImages:F,sampling:D,slimDOMOptions:ae,iframeManager:Ne,stylesheetManager:le,canvasManager:Te,keepIframeSrcFn:B,processedNodeManager:Le},mirror:xy}),Pe=(ge=!1)=>{if(!T)return;Cc({type:qo.Meta,data:{href:window.location.href,width:Txt(),height:Lxt()}},ge),le.reset(),De.init(),qO.forEach(me=>me.lock());const he=Zun(document,{mirror:xy,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:f,inlineStylesheet:m,maskAllInputs:J,maskAttributeFn:_,maskInputFn:w,maskTextFn:C,slimDOM:ae,dataURLOptions:k,recordCanvas:A,inlineImages:F,onSerialize:me=>{Rxt(me,xy)&&Ne.addIframe(me),Pxt(me,xy)&&le.trackLinkElement(me),KNe(me)&&De.addShadowRoot(me.shadowRoot,document)},onIframeLoad:(me,X)=>{Ne.attachIframe(me,X),me.contentWindow&&Te.addWindow(me.contentWindow),De.observeAttachShadow(me)},onStylesheetLoad:(me,X)=>{le.attachLinkElement(me,X)},keepIframeSrcFn:B});if(!he)return console.warn("Failed to snapshot the document");Cc({type:qo.FullSnapshot,data:{node:he,initialOffset:Mxt(window)}}),qO.forEach(me=>me.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&le.adoptStyleSheets(document.adoptedStyleSheets,xy.getId(document))};dne=Pe;try{const ge=[],he=X=>Os(wdn)({onMutation:K,mutationCb:de,mousemoveCb:(re,we)=>Cc({type:qo.IncrementalSnapshot,data:{source:we,positions:re}}),mouseInteractionCb:re=>Cc({type:qo.IncrementalSnapshot,data:{source:_o.MouseInteraction,...re}}),scrollCb:ie,viewportResizeCb:re=>Cc({type:qo.IncrementalSnapshot,data:{source:_o.ViewportResize,...re}}),inputCb:re=>Cc({type:qo.IncrementalSnapshot,data:{source:_o.Input,...re}}),mediaInteractionCb:re=>Cc({type:qo.IncrementalSnapshot,data:{source:_o.MediaInteraction,...re}}),styleSheetRuleCb:re=>Cc({type:qo.IncrementalSnapshot,data:{source:_o.StyleSheetRule,...re}}),styleDeclarationCb:re=>Cc({type:qo.IncrementalSnapshot,data:{source:_o.StyleDeclaration,...re}}),canvasMutationCb:Q,fontCb:re=>Cc({type:qo.IncrementalSnapshot,data:{source:_o.Font,...re}}),selectionCb:re=>{Cc({type:qo.IncrementalSnapshot,data:{source:_o.Selection,...re}})},customElementCb:re=>{Cc({type:qo.IncrementalSnapshot,data:{source:_o.CustomElement,...re}})},blockClass:r,ignoreClass:a,ignoreSelector:l,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:f,maskInputOptions:J,inlineStylesheet:m,sampling:D,recordDOM:T,recordCanvas:A,inlineImages:F,userTriggeredOnInput:O,collectFonts:V,doc:X,maskAttributeFn:_,maskInputFn:w,maskTextFn:C,keepIframeSrcFn:B,blockSelector:o,unblockSelector:s,slimDOMOptions:ae,dataURLOptions:k,mirror:xy,iframeManager:Ne,stylesheetManager:le,shadowDomManager:De,processedNodeManager:Le,canvasManager:Te,ignoreCSSAttributes:z,plugins:Og([$,"optionalAccess",re=>re.filter,"call",re=>re(we=>we.observer),"optionalAccess",re=>re.map,"call",re=>re(we=>({observer:we.observer,options:we.options,callback:ue=>Cc({type:qo.Plugin,data:{plugin:we.name,payload:ue}})}))])||[]},{});Ne.addLoadListener(X=>{try{ge.push(he(X.contentDocument))}catch(re){console.warn(re)}});const me=()=>{Pe(),ge.push(he(document))};return document.readyState==="interactive"||document.readyState==="complete"?me():(ge.push(cm("DOMContentLoaded",()=>{Cc({type:qo.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&me()})),ge.push(cm("load",()=>{Cc({type:qo.Load,data:{}}),P==="load"&&me()},window))),()=>{ge.forEach(X=>X()),Le.destroy(),dne=void 0,udn()}}catch(ge){console.warn(ge)}}function Mdn(t){if(!dne)throw new Error("please take full snapshot after start recording");dne(t)}SC.mirror=xy;SC.takeFullSnapshot=Mdn;function Ldn(t,e){try{return t?t(e):new pZe}catch{return console.warn("Unable to initialize CanvasManager"),new pZe}}const ro=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,gZe=["info","warn","error","log"],oee="[Replay] ";function J0e(t,e="info"){UD({category:"console",data:{logger:"replay"},level:e,message:`${oee}${t}`},{level:e})}function Tdn(){let t=!1,e=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:i=>{t=i.captureExceptions,e=i.traceInternals}};return ro?(gZe.forEach(i=>{n[i]=(...r)=>{Zn[i](oee,...r),e&&J0e(r.join(""),__t(i))}}),n.exception=(i,...r)=>{r.length&&n.error&&n.error(...r),Zn.error(oee,i),t?rK(i):e&&J0e(i,"error")},n.infoTick=(...i)=>{Zn.info(oee,...i),e&&setTimeout(()=>J0e(i[0]),0)}):gZe.forEach(i=>{n[i]=()=>{}}),n}const go=Tdn(),Idn=3,Adn=5;function K3e(t){return t>9999999999?t:t*1e3}function e_e(t){return t>9999999999?t/1e3:t}function dK(t,e){e.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate(()=>(t.throttledAddEvent({type:qo.Custom,timestamp:(e.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:mx(e,10,1e3)}}),e.category==="console")))}const Rdn="button,a";function zxt(t){return t.closest(Rdn)||t}function Hxt(t){const e=Wxt(t);return!e||!(e instanceof Element)?e:zxt(e)}function Wxt(t){return Pdn(t)?t.target:t}function Pdn(t){return typeof t=="object"&&!!t&&"target"in t}let nE;function Odn(t){return nE||(nE=[],jdn()),nE.push(t),()=>{const e=nE?nE.indexOf(t):-1;e>-1&&nE.splice(e,1)}}function jdn(){yp(Cl,"open",function(t){return function(...e){if(nE)try{nE.forEach(n=>n())}catch{}return t.apply(Cl,e)}})}const Fdn=new Set([_o.Mutation,_o.StyleSheetRule,_o.StyleDeclaration,_o.AdoptedStyleSheet,_o.CanvasMutation,_o.Selection,_o.MediaInteraction]);function $dn(t,e,n){t.handleClick(e,n)}class Vdn{constructor(e,n,i=dK){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=i}addListeners(){const e=Odn(()=>{this._lastMutation=bZe()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,n){if(zdn(n,this._ignoreSelector)||!Hdn(e))return;const i={timestamp:e_e(e.timestamp),clickBreadcrumb:e,clickCount:0,node:n};this._clicks.some(r=>r.node===i.node&&Math.abs(r.timestamp-i.timestamp)<1)||(this._clicks.push(i),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=e_e(e)}registerScroll(e=Date.now()){this._lastScroll=e_e(e)}registerClick(e){const n=zxt(e);this._handleMultiClick(n)}_handleMultiClick(e){this._getClicks(e).forEach(n=>{n.clickCount++})}_getClicks(e){return this._clicks.filter(n=>n.node===e)}_checkClicks(){const e=[],n=bZe();this._clicks.forEach(i=>{!i.mutationAfter&&this._lastMutation&&(i.mutationAfter=i.timestamp<=this._lastMutation?this._lastMutation-i.timestamp:void 0),!i.scrollAfter&&this._lastScroll&&(i.scrollAfter=i.timestamp<=this._lastScroll?this._lastScroll-i.timestamp:void 0),i.timestamp+this._timeout<=n&&e.push(i)});for(const i of e){const r=this._clicks.indexOf(i);r>-1&&(this._generateBreadcrumbs(i),this._clicks.splice(r,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const n=this._replay,i=e.scrollAfter&&e.scrollAfter<=this._scollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,o=!i&&!r,{clickCount:s,clickBreadcrumb:a}=e;if(o){const l=Math.min(e.mutationAfter||this._timeout,this._timeout)*1e3,c=l<this._timeout*1e3?"mutation":"timeout",u={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:Cl.location.href,route:n.getCurrentRoute(),timeAfterClickMs:l,endReason:c,clickCount:s||1}};this._addBreadcrumbEvent(n,u);return}if(s>1){const l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:Cl.location.href,route:n.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(n,l)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=pj(()=>this._checkClicks(),1e3)}}const Bdn=["A","BUTTON","INPUT"];function zdn(t,e){return!!(!Bdn.includes(t.tagName)||t.tagName==="INPUT"&&!["submit","button"].includes(t.getAttribute("type")||"")||t.tagName==="A"&&(t.hasAttribute("download")||t.hasAttribute("target")&&t.getAttribute("target")!=="_self")||e&&t.matches(e))}function Hdn(t){return!!(t.data&&typeof t.data.nodeId=="number"&&t.timestamp)}function bZe(){return Date.now()/1e3}function Wdn(t,e){try{if(!Udn(e))return;const{source:n}=e.data;if(Fdn.has(n)&&t.registerMutation(e.timestamp),n===_o.Scroll&&t.registerScroll(e.timestamp),Kdn(e)){const{type:i,id:r}=e.data,o=SC.mirror.getNode(r);o instanceof HTMLElement&&i===Yf.Click&&t.registerClick(o)}}catch{}}function Udn(t){return t.type===Idn}function Kdn(t){return t.data.source===_o.MouseInteraction}function Tx(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var hne;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(hne||(hne={}));const qdn=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Gdn(t){const e={};!t["data-sentry-component"]&&t["data-sentry-element"]&&(t["data-sentry-component"]=t["data-sentry-element"]);for(const n in t)if(qdn.has(n)){let i=n;(n==="data-testid"||n==="data-test-id")&&(i="testId"),e[i]=t[n]}return e}const Ydn=t=>e=>{if(!t.isEnabled())return;const n=Xdn(e);if(!n)return;const i=e.name==="click",r=i?e.event:void 0;i&&t.clickDetector&&r&&r.target&&!r.altKey&&!r.metaKey&&!r.ctrlKey&&!r.shiftKey&&$dn(t.clickDetector,n,Hxt(e.event)),dK(t,n)};function Uxt(t,e){const n=SC.mirror.getId(t),i=n&&SC.mirror.getNode(n),r=i&&SC.mirror.getMeta(i),o=r&&Qdn(r)?r:null;return{message:e,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(s=>s.type===hne.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:Gdn(o.attributes)}}:{}}}function Xdn(t){const{target:e,message:n}=Zdn(t);return Tx({category:`ui.${t.name}`,...Uxt(e,n)})}function Zdn(t){const e=t.name==="click";let n,i=null;try{i=e?Hxt(t.event):Wxt(t.event),n=YC(i,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:i,message:n}}function Qdn(t){return t.type===hne.Element}function Jdn(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=ehn(e);n&&dK(t,n)}function ehn(t){const{metaKey:e,shiftKey:n,ctrlKey:i,altKey:r,key:o,target:s}=t;if(!s||thn(s)||!o)return null;const a=e||i||r,l=o.length===1;if(!a&&l)return null;const c=YC(s,{maxStringLength:200})||"<unknown>",u=Uxt(s,c);return Tx({category:"ui.keyDown",message:c,data:{...u.data,metaKey:e,shiftKey:n,ctrlKey:i,altKey:r,key:o}})}function thn(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable}const nhn={resource:ahn,paint:ohn,navigation:shn};function tZ(t,e){return({metric:n})=>void e.replayPerformanceEntries.push(t(n))}function ihn(t){return t.map(rhn).filter(Boolean)}function rhn(t){const e=nhn[t.entryType];return e?e(t):null}function vj(t){return((Dm||Cl.performance.timeOrigin)+t)/1e3}function ohn(t){const{duration:e,entryType:n,name:i,startTime:r}=t,o=vj(r);return{type:n,name:i,start:o,end:o+e,data:void 0}}function shn(t){const{entryType:e,name:n,decodedBodySize:i,duration:r,domComplete:o,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:c,loadEventStart:u,loadEventEnd:d,redirectCount:h,startTime:f,transferSize:m,type:p}=t;return r===0?null:{type:`${e}.${p}`,start:vj(f),end:vj(o),name:n,data:{size:m,decodedBodySize:i,encodedBodySize:s,duration:r,domInteractive:c,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:u,loadEventEnd:d,domComplete:o,redirectCount:h}}}function ahn(t){const{entryType:e,initiatorType:n,name:i,responseEnd:r,startTime:o,decodedBodySize:s,encodedBodySize:a,responseStatus:l,transferSize:c}=t;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${e}.${n}`,start:vj(o),end:vj(r),name:i,data:{size:c,statusCode:l,decodedBodySize:s,encodedBodySize:a}}}function lhn(t){const e=t.entries[t.entries.length-1],n=e&&e.element?[e.element]:void 0;return xue(t,"largest-contentful-paint",n)}function chn(t){return t.sources!==void 0}function uhn(t){const e=[],n=[];for(const i of t.entries)if(chn(i)){const r=[];for(const o of i.sources)if(o.node){n.push(o.node);const s=SC.mirror.getId(o.node);s&&r.push(s)}e.push({value:i.value,nodeIds:r.length?r:void 0})}return xue(t,"cumulative-layout-shift",n,e)}function dhn(t){const e=t.entries[t.entries.length-1],n=e&&e.target?[e.target]:void 0;return xue(t,"first-input-delay",n)}function hhn(t){const e=t.entries[t.entries.length-1],n=e&&e.target?[e.target]:void 0;return xue(t,"interaction-to-next-paint",n)}function xue(t,e,n,i){const r=t.value,o=t.rating,s=vj(r);return{type:"web-vital",name:e,start:s,end:s,data:{value:r,size:r,rating:o,nodeIds:n?n.map(a=>SC.mirror.getId(a)):void 0,attributions:i}}}function fhn(t){function e(r){t.performanceEntries.includes(r)||t.performanceEntries.push(r)}function n({entries:r}){r.forEach(e)}const i=[];return["navigation","paint","resource"].forEach(r=>{i.push(fj(r,n))}),i.push(uxt(tZ(lhn,t)),j3e(tZ(uhn,t)),dxt(tZ(dhn,t)),hxt(tZ(hhn,t))),()=>{i.forEach(r=>r())}}const mhn='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(J)return J.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function phn(){const t=new Blob([mhn]);return URL.createObjectURL(t)}class q3e extends Error{constructor(){super(`Event buffer exceeded maximum size of ${B3e}.`)}}class Kxt{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const n=JSON.stringify(e).length;if(this._totalSize+=n,this._totalSize>B3e)throw new q3e;this.events.push(e)}finish(){return new Promise(e=>{const n=this.events;this.clear(),e(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map(n=>n.timestamp).sort()[0];return e?K3e(e):null}}class ghn{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((e,n)=>{this._worker.addEventListener("message",({data:i})=>{i.success?e():n()},{once:!0}),this._worker.addEventListener("error",i=>{n(i)},{once:!0})}),this._ensureReadyPromise)}destroy(){ro&&go.info("Destroying compression worker"),this._worker.terminate()}postMessage(e,n){const i=this._getAndIncrementId();return new Promise((r,o)=>{const s=({data:a})=>{const l=a;if(l.method===e&&l.id===i){if(this._worker.removeEventListener("message",s),!l.success){ro&&go.error("Error in compression worker: ",l.response),o(new Error("Error in compression worker"));return}r(l.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:i,method:e,arg:n})})}_getAndIncrementId(){return this._id++}}class bhn{constructor(e){this._worker=new ghn(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const n=K3e(e.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const i=JSON.stringify(e);return this._totalSize+=i.length,this._totalSize>B3e?Promise.reject(new q3e):this._sendEventToWorker(i)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{ro&&go.exception(e,'Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class vhn{constructor(e){this._fallback=new Kxt,this._compression=new bhn(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){ro&&go.exception(e,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:n}=this._fallback,i=[];for(const r of e)i.push(this._compression.addEvent(r));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(i),this._fallback.clear()}catch(r){ro&&go.exception(r,"Failed to add events when switching buffers.")}}}function yhn({useCompression:t,workerUrl:e}){if(t&&window.Worker){const n=_hn(e);if(n)return n}return ro&&go.info("Using simple buffer"),new Kxt}function _hn(t){try{const e=t||xhn();if(!e)return;ro&&go.info(`Using compression worker${t?` from ${t}`:""}`);const n=new Worker(e);return new vhn(n)}catch(e){ro&&go.exception(e,"Failed to create compression worker")}}function xhn(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?phn():""}function G3e(){try{return"sessionStorage"in Cl&&!!Cl.sessionStorage}catch{return!1}}function whn(t){Chn(),t.session=void 0}function Chn(){if(G3e())try{Cl.sessionStorage.removeItem($3e)}catch{}}function qxt(t){return t===void 0?!1:Math.random()<t}function Gxt(t){const e=Date.now(),n=t.id||ql(),i=t.started||e,r=t.lastActivity||e,o=t.segmentId||0,s=t.sampled,a=t.previousSessionId;return{id:n,started:i,lastActivity:r,segmentId:o,sampled:s,previousSessionId:a}}function Y3e(t){if(G3e())try{Cl.sessionStorage.setItem($3e,JSON.stringify(t))}catch{}}function Shn(t,e){return qxt(t)?"session":e?"buffer":!1}function vZe({sessionSampleRate:t,allowBuffering:e,stickySession:n=!1},{previousSessionId:i}={}){const r=Shn(t,e),o=Gxt({sampled:r,previousSessionId:i});return n&&Y3e(o),o}function Nhn(){if(!G3e())return null;try{const t=Cl.sessionStorage.getItem($3e);if(!t)return null;const e=JSON.parse(t);return ro&&go.infoTick("Loading existing session"),Gxt(e)}catch{return null}}function YNe(t,e,n=+new Date){return t===null||e===void 0||e<0?!0:e===0?!1:t+e<=n}function Yxt(t,{maxReplayDuration:e,sessionIdleExpire:n,targetTime:i=Date.now()}){return YNe(t.started,e,i)||YNe(t.lastActivity,n,i)}function Xxt(t,{sessionIdleExpire:e,maxReplayDuration:n}){return!(!Yxt(t,{sessionIdleExpire:e,maxReplayDuration:n})||t.sampled==="buffer"&&t.segmentId===0)}function t_e({sessionIdleExpire:t,maxReplayDuration:e,previousSessionId:n},i){const r=i.stickySession&&Nhn();return r?Xxt(r,{sessionIdleExpire:t,maxReplayDuration:e})?(ro&&go.infoTick("Session in sessionStorage is expired, creating new one..."),vZe(i,{previousSessionId:r.id})):r:(ro&&go.infoTick("Creating new session"),vZe(i,{previousSessionId:n}))}function Ehn(t){return t.type===qo.Custom}function X3e(t,e,n){return Qxt(t,e)?(Zxt(t,e,n),!0):!1}function Dhn(t,e,n){return Qxt(t,e)?Zxt(t,e,n):Promise.resolve(null)}async function Zxt(t,e,n){if(!t.eventBuffer)return null;try{n&&t.recordingMode==="buffer"&&t.eventBuffer.clear(),n&&(t.eventBuffer.hasCheckout=!0);const i=t.getOptions(),r=khn(e,i.beforeAddRecordingEvent);return r?await t.eventBuffer.addEvent(r):void 0}catch(i){const r=i&&i instanceof q3e?"addEventSizeExceeded":"addEvent";t.handleException(i),await t.stop({reason:r});const o=Bo();o&&o.recordDroppedEvent("internal_sdk_error","replay")}}function Qxt(t,e){if(!t.eventBuffer||t.isPaused()||!t.isEnabled())return!1;const n=K3e(e.timestamp);return n+t.timeouts.sessionIdlePause<Date.now()?!1:n>t.getContext().initialTimestamp+t.getOptions().maxReplayDuration?(ro&&go.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function khn(t,e){try{if(typeof e=="function"&&Ehn(t))return e(t)}catch(n){return ro&&go.exception(n,"An error occured in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return t}function Z3e(t){return!t.type}function XNe(t){return t.type==="transaction"}function Mhn(t){return t.type==="replay_event"}function yZe(t){return t.type==="feedback"}function Lhn(t){return(e,n)=>{if(!t.isEnabled()||!Z3e(e)&&!XNe(e))return;const i=n&&n.statusCode;if(!(!i||i<200||i>=300)){if(XNe(e)){Thn(t,e);return}Ihn(t,e)}}}function Thn(t,e){const n=t.getContext();e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(e.contexts.trace.trace_id)}function Ihn(t,e){const n=t.getContext();if(e.event_id&&n.errorIds.size<100&&n.errorIds.add(e.event_id),t.recordingMode!=="buffer"||!e.tags||!e.tags.replayId)return;const{beforeErrorSampling:i}=t.getOptions();typeof i=="function"&&!i(e)||pj(async()=>{try{await t.sendBufferedReplayOrFlush()}catch(r){t.handleException(r)}})}function Ahn(t){return e=>{!t.isEnabled()||!Z3e(e)||Rhn(t,e)}}function Rhn(t,e){const n=e.exception&&e.exception.values&&e.exception.values[0]&&e.exception.values[0].value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const i=Tx({category:"replay.hydrate-error",data:{url:S3e()}});dK(t,i)}}function Phn(t){const e=Bo();e&&e.on("beforeAddBreadcrumb",n=>Ohn(t,n))}function Ohn(t,e){if(!t.isEnabled()||!Jxt(e))return;const n=jhn(e);n&&dK(t,n)}function jhn(t){return!Jxt(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui.")?null:t.category==="console"?Fhn(t):Tx(t)}function Fhn(t){const e=t.data&&t.data.arguments;if(!Array.isArray(e)||e.length===0)return Tx(t);let n=!1;const i=e.map(r=>{if(!r)return r;if(typeof r=="string")return r.length>QX?(n=!0,`${r.slice(0,QX)}…`):r;if(typeof r=="object")try{const o=mx(r,7);return JSON.stringify(o).length>QX?(n=!0,`${JSON.stringify(o,null,2).slice(0,QX)}…`):o}catch{}return r});return Tx({...t,data:{...t.data,arguments:i,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Jxt(t){return!!t.category}function $hn(t,e){return t.type||!t.exception||!t.exception.values||!t.exception.values.length?!1:!!(e.originalException&&e.originalException.__rrweb__)}function Vhn(t,e){t.triggerUserActivity(),t.addUpdate(()=>e.timestamp?(t.throttledAddEvent({type:qo.Custom,timestamp:e.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:e.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:e.event_id}}}}),!1):!0)}function Bhn(t,e){return t.recordingMode!=="buffer"||e.message===V3e||!e.exception||e.type?!1:qxt(t.getOptions().errorSampleRate)}function zhn(t){return Object.assign((e,n)=>!t.isEnabled()||t.isPaused()?e:Mhn(e)?(delete e.breadcrumbs,e):!Z3e(e)&&!XNe(e)&&!yZe(e)||!t.checkAndHandleExpiredSession()?e:yZe(e)?(t.flush(),e.contexts.feedback.replay_id=t.getSessionId(),Vhn(t,e),e):$hn(e,n)&&!t.getOptions()._experiments.captureExceptions?(ro&&go.log("Ignoring error from rrweb internals",e),null):((Bhn(t,e)||t.recordingMode==="session")&&(e.tags={...e.tags,replayId:t.getSessionId()}),e),{id:"Replay"})}function wue(t,e){return e.map(({type:n,start:i,end:r,name:o,data:s})=>{const a=t.throttledAddEvent({type:qo.Custom,timestamp:i,data:{tag:"performanceSpan",payload:{op:n,description:o,startTimestamp:i,endTimestamp:r,data:s}}});return typeof a=="string"?Promise.resolve(null):a})}function Hhn(t){const{from:e,to:n}=t,i=Date.now()/1e3;return{type:"navigation.push",start:i,end:i,name:n,data:{previous:e}}}function Whn(t){return e=>{if(!t.isEnabled())return;const n=Hhn(e);n!==null&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate(()=>(wue(t,[n]),!1)))}}function Uhn(t,e){return ro&&t.getOptions()._experiments.traceInternals?!1:han(e,Bo())}function ewt(t,e){t.isEnabled()&&e!==null&&(Uhn(t,e.name)||t.addUpdate(()=>(wue(t,[e]),!0)))}function Cue(t){if(!t)return;const e=new TextEncoder;try{if(typeof t=="string")return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=rwt(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch{}}function twt(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function nwt(t){try{if(typeof t=="string")return[t];if(t instanceof URLSearchParams)return[t.toString()];if(t instanceof FormData)return[rwt(t)];if(!t)return[void 0]}catch(e){return ro&&go.exception(e,"Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return ro&&go.info("Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function fne(t,e){if(!t)return{headers:{},size:void 0,_meta:{warnings:[e]}};const n={...t._meta},i=n.warnings||[];return n.warnings=[...i,e],t._meta=n,t}function iwt(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:i,url:r,method:o,statusCode:s,request:a,response:l}=e;return{type:t,start:n/1e3,end:i/1e3,name:r,data:Eu({method:o,statusCode:s,request:a,response:l})}}function yz(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function dD(t,e,n){if(!e&&Object.keys(t).length===0)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const i={headers:t,size:e},{body:r,warnings:o}=Khn(n);return i.body=r,o&&o.length>0&&(i._meta={warnings:o}),i}function ZNe(t,e){return Object.entries(t).reduce((n,[i,r])=>{const o=i.toLowerCase();return e.includes(o)&&t[i]&&(n[o]=r),n},{})}function rwt(t){return new URLSearchParams(t).toString()}function Khn(t){if(!t||typeof t!="string")return{body:t};const e=t.length>tZe,n=qhn(t);if(e){const i=t.slice(0,tZe);return n?{body:i,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${i}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(t)}}catch{}return{body:t}}function qhn(t){const e=t[0],n=t[t.length-1];return e==="["&&n==="]"||e==="{"&&n==="}"}function mne(t,e){const n=Ghn(t);return cD(n,e)}function Ghn(t,e=Cl.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(Cl.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const i=n.href;return!t.endsWith("/")&&i.endsWith("/")?i.slice(0,-1):i}async function Yhn(t,e,n){try{const i=await Zhn(t,e,n),r=iwt("resource.fetch",i);ewt(n.replay,r)}catch(i){ro&&go.exception(i,"Failed to capture fetch breadcrumb")}}function Xhn(t,e){const{input:n,response:i}=e,r=n?owt(n):void 0,o=Cue(r),s=i?twt(i.headers.get("content-length")):void 0;o!==void 0&&(t.data.request_body_size=o),s!==void 0&&(t.data.response_body_size=s)}async function Zhn(t,e,n){const i=Date.now(),{startTimestamp:r=i,endTimestamp:o=i}=e,{url:s,method:a,status_code:l=0,request_body_size:c,response_body_size:u}=t.data,d=mne(s,n.networkDetailAllowUrls)&&!mne(s,n.networkDetailDenyUrls),h=d?Qhn(n,e.input,c):yz(c),f=await Jhn(d,n,e.response,u);return{startTimestamp:r,endTimestamp:o,url:s,method:a,statusCode:l,request:h,response:f}}function Qhn({networkCaptureBodies:t,networkRequestHeaders:e},n,i){const r=n?nfn(n,e):{};if(!t)return dD(r,i,void 0);const o=owt(n),[s,a]=nwt(o),l=dD(r,i,s);return a?fne(l,a):l}async function Jhn(t,{networkCaptureBodies:e,networkResponseHeaders:n},i,r){if(!t&&r!==void 0)return yz(r);const o=i?swt(i.headers,n):{};if(!i||!e&&r!==void 0)return dD(o,r,void 0);const[s,a]=await tfn(i),l=efn(s,{networkCaptureBodies:e,responseBodySize:r,captureDetails:t,headers:o});return a?fne(l,a):l}function efn(t,{networkCaptureBodies:e,responseBodySize:n,captureDetails:i,headers:r}){try{const o=t&&t.length&&n===void 0?Cue(t):n;return i?e?dD(r,o,t):dD(r,o,void 0):yz(o)}catch(o){return ro&&go.exception(o,"Failed to serialize response body"),dD(r,n,void 0)}}async function tfn(t){const e=ifn(t);if(!e)return[void 0,"BODY_PARSE_ERROR"];try{return[await rfn(e)]}catch(n){return ro&&go.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"]}}function owt(t=[]){if(!(t.length!==2||typeof t[1]!="object"))return t[1].body}function swt(t,e){const n={};return e.forEach(i=>{t.get(i)&&(n[i]=t.get(i))}),n}function nfn(t,e){return t.length===1&&typeof t[0]!="string"?_Ze(t[0],e):t.length===2?_Ze(t[1],e):{}}function _Ze(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?swt(n,e):Array.isArray(n)?{}:ZNe(n,e):{}}function ifn(t){try{return t.clone()}catch(e){ro&&go.exception(e,"Failed to clone response body")}}function rfn(t){return new Promise((e,n)=>{const i=pj(()=>n(new Error("Timeout while trying to read response body")),500);ofn(t).then(r=>e(r),r=>n(r)).finally(()=>clearTimeout(i))})}async function ofn(t){return await t.text()}async function sfn(t,e,n){try{const i=lfn(t,e,n),r=iwt("resource.xhr",i);ewt(n.replay,r)}catch(i){ro&&go.exception(i,"Failed to capture xhr breadcrumb")}}function afn(t,e){const{xhr:n,input:i}=e;if(!n)return;const r=Cue(i),o=n.getResponseHeader("content-length")?twt(n.getResponseHeader("content-length")):hfn(n.response,n.responseType);r!==void 0&&(t.data.request_body_size=r),o!==void 0&&(t.data.response_body_size=o)}function lfn(t,e,n){const i=Date.now(),{startTimestamp:r=i,endTimestamp:o=i,input:s,xhr:a}=e,{url:l,method:c,status_code:u=0,request_body_size:d,response_body_size:h}=t.data;if(!l)return null;if(!a||!mne(l,n.networkDetailAllowUrls)||mne(l,n.networkDetailDenyUrls)){const E=yz(d),D=yz(h);return{startTimestamp:r,endTimestamp:o,url:l,method:c,statusCode:u,request:E,response:D}}const f=a[NT],m=f?ZNe(f.request_headers,n.networkRequestHeaders):{},p=ZNe(cfn(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?nwt(s):[void 0],[_,w]=n.networkCaptureBodies?ufn(a):[void 0],C=dD(m,d,g),N=dD(p,h,_);return{startTimestamp:r,endTimestamp:o,url:l,method:c,statusCode:u,request:y?fne(C,y):C,response:w?fne(N,w):N}}function cfn(t){const e=t.getAllResponseHeaders();return e?e.split(`\r
`).reduce((n,i)=>{const[r,o]=i.split(": ");return o&&(n[r.toLowerCase()]=o),n},{}):{}}function ufn(t){const e=[];try{return[t.responseText]}catch(n){e.push(n)}try{return dfn(t.response,t.responseType)}catch(n){e.push(n)}return ro&&go.warn("Failed to get xhr response body",...e),[void 0]}function dfn(t,e){try{if(typeof t=="string")return[t];if(t instanceof Document)return[t.body.outerHTML];if(e==="json"&&t&&typeof t=="object")return[JSON.stringify(t)];if(!t)return[void 0]}catch(n){return ro&&go.exception(n,"Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return ro&&go.info("Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function hfn(t,e){try{const n=e==="json"&&t&&typeof t=="object"?JSON.stringify(t):t;return Cue(n)}catch{return}}function ffn(t){const e=Bo();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:i,networkCaptureBodies:r,networkRequestHeaders:o,networkResponseHeaders:s}=t.getOptions(),a={replay:t,networkDetailAllowUrls:n,networkDetailDenyUrls:i,networkCaptureBodies:r,networkRequestHeaders:o,networkResponseHeaders:s};e&&e.on("beforeAddBreadcrumb",(l,c)=>mfn(a,l,c))}catch{}}function mfn(t,e,n){if(e.data)try{pfn(e)&&bfn(n)&&(afn(e,n),sfn(e,n,t)),gfn(e)&&vfn(n)&&(Xhn(e,n),Yhn(e,n,t))}catch(i){ro&&go.exception(i,"Error when enriching network breadcrumb")}}function pfn(t){return t.category==="xhr"}function gfn(t){return t.category==="fetch"}function bfn(t){return t&&t.xhr}function vfn(t){return t&&t.response}function yfn(t){const e=Bo();gxt(Ydn(t)),bue(Whn(t)),Phn(t),ffn(t);const n=zhn(t);Xsn(n),e&&(e.on("beforeSendEvent",Ahn(t)),e.on("afterSendEvent",Lhn(t)),e.on("createDsc",i=>{const r=t.getSessionId();r&&t.isEnabled()&&t.recordingMode==="session"&&t.checkAndHandleExpiredSession()&&(i.replay_id=r)}),e.on("spanStart",i=>{t.lastActiveSpan=i}),e.on("spanEnd",i=>{t.lastActiveSpan=i}),e.on("beforeSendFeedback",(i,r)=>{const o=t.getSessionId();r&&r.includeReplay&&t.isEnabled()&&o&&i.contexts&&i.contexts.feedback&&(i.contexts.feedback.replay_id=o)}))}async function _fn(t){try{return Promise.all(wue(t,[xfn(Cl.performance.memory)]))}catch{return[]}}function xfn(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:i}=t,r=Date.now()/1e3;return{type:"memory",name:"memory",start:r,end:r,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:i}}}}function wfn(t,e,n){let i,r,o;const s=n&&n.maxWait?Math.max(n.maxWait,e):0;function a(){return l(),i=t(),i}function l(){r!==void 0&&clearTimeout(r),o!==void 0&&clearTimeout(o),r=o=void 0}function c(){return r!==void 0||o!==void 0?a():i}function u(){return r&&clearTimeout(r),r=pj(a,e),s&&o===void 0&&(o=pj(a,s)),i}return u.cancel=l,u.flush=c,u}function Cfn(t){let e=!1;return(n,i)=>{if(!t.checkAndHandleExpiredSession()){ro&&go.warn("Received replay event after session expired.");return}const r=i||!e;e=!0,t.clickDetector&&Wdn(t.clickDetector,n),t.addUpdate(()=>{if(t.recordingMode==="buffer"&&r&&t.setInitialState(),!X3e(t,n,r))return!0;if(!r)return!1;const o=t.session;if(Nfn(t,r),o&&o.previousSessionId)return!0;if(t.recordingMode==="buffer"&&o&&t.eventBuffer){const s=t.eventBuffer.getEarliestTimestamp();s&&(ro&&go.info(`Updating session start time to earliest event in buffer to ${new Date(s)}`),o.started=s,t.getOptions().stickySession&&Y3e(o))}return t.recordingMode==="session"&&t.flush(),!0})}}function Sfn(t){const e=t.getOptions();return{type:qo.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:t.isRecordingCanvas(),sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:t.eventBuffer?t.eventBuffer.type==="worker":!1,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}function Nfn(t,e){!e||!t.session||t.session.segmentId!==0||X3e(t,Sfn(t),!1)}function Efn(){const t=ka().getPropagationContext().dsc;t&&delete t.replay_id;const e=Wh();if(e){const n=Fk(e);delete n.replay_id}}function Dfn(t,e,n,i){return SA(S_t(t,D3e(t),i,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:typeof e=="string"?new TextEncoder().encode(e).length:e.length},e]])}function kfn({recordingData:t,headers:e}){let n;const i=`${JSON.stringify(e)}
`;if(typeof t=="string")n=`${i}${t}`;else{const o=new TextEncoder().encode(i);n=new Uint8Array(o.length+t.length),n.set(o),n.set(t,o.length)}return n}async function Mfn({client:t,scope:e,replayId:n,event:i}){const r=typeof t._integrations=="object"&&t._integrations!==null&&!Array.isArray(t._integrations)?Object.keys(t._integrations):void 0,o={event_id:n,integrations:r};t.emit("preprocessEvent",i,o);const s=await H_t(t.getOptions(),i,o,e,t,Om());if(!s)return null;s.platform=s.platform||"javascript";const a=t.getSdkMetadata(),{name:l,version:c}=a&&a.sdk||{};return s.sdk={...s.sdk,name:l||"sentry.javascript.unknown",version:c||"0.0.0"},s}async function Lfn({recordingData:t,replayId:e,segmentId:n,eventContext:i,timestamp:r,session:o}){const s=kfn({recordingData:t,headers:{segment_id:n}}),{urls:a,errorIds:l,traceIds:c,initialTimestamp:u}=i,d=Bo(),h=ka(),f=d&&d.getTransport(),m=d&&d.getDsn();if(!d||!f||!m||!o.sampled)return ZC({});const p={type:uun,replay_start_timestamp:u/1e3,timestamp:r/1e3,error_ids:l,trace_ids:c,urls:a,replay_id:e,segment_id:n,replay_type:o.sampled},g=await Mfn({scope:h,client:d,replayId:e,event:p});if(!g)return d.recordDroppedEvent("event_processor","replay",p),ro&&go.info("An event processor returned `null`, will not send event."),ZC({});delete g.sdkProcessingMetadata;const y=Dfn(g,s,m,d.getOptions().tunnel);let _;try{_=await f.send(y)}catch(C){const N=new Error(V3e);try{N.cause=C}catch{}throw N}if(typeof _.statusCode=="number"&&(_.statusCode<200||_.statusCode>=300))throw new awt(_.statusCode);const w=E_t({},_);if(N_t(w,"replay"))throw new Q3e(w);return _}class awt extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class Q3e extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function lwt(t,e={count:0,interval:gun}){const{recordingData:n,onError:i}=t;if(n.length)try{return await Lfn(t),!0}catch(r){if(r instanceof awt||r instanceof Q3e)throw r;if(U_t("Replays",{_retryCount:e.count}),i&&i(r),e.count>=bun){const o=new Error(`${V3e} - max retries exceeded`);try{o.cause=r}catch{}throw o}return e.interval*=++e.count,new Promise((o,s)=>{pj(async()=>{try{await lwt(t,e),o(!0)}catch(a){s(a)}},e.interval)})}}const cwt="__THROTTLED",Tfn="__SKIPPED";function Ifn(t,e,n){const i=new Map,r=a=>{const l=a-n;i.forEach((c,u)=>{u<l&&i.delete(u)})},o=()=>[...i.values()].reduce((a,l)=>a+l,0);let s=!1;return(...a)=>{const l=Math.floor(Date.now()/1e3);if(r(l),o()>=e){const u=s;return s=!0,u?Tfn:cwt}s=!1;const c=i.get(l)||0;return i.set(l,c+1),t(...a)}}class iE{constructor({options:e,recordingOptions:n}){iE.prototype.__init.call(this),iE.prototype.__init2.call(this),iE.prototype.__init3.call(this),iE.prototype.__init4.call(this),iE.prototype.__init5.call(this),iE.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:dun,sessionIdleExpire:hun},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=e,this._debouncedFlush=wfn(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Ifn((s,a)=>Dhn(this,s,a),300,5);const{slowClickTimeout:i,slowClickIgnoreSelectors:r}=this.getOptions(),o=i?{threshold:Math.min(vun,i),timeout:i,scrollTimeout:yun,ignoreSelector:r?r.join(","):""}:void 0;if(o&&(this.clickDetector=new Vdn(this,o)),ro){const s=e._experiments;go.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){ro&&go.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:n,sessionSampleRate:i}=this._options,r=n<=0&&i<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session){ro&&go.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",ro&&go.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){ro&&go.info("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){ro&&go.info("Buffering is in progress, call `flush()` to save the replay");return}ro&&go.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=t_e({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled){ro&&go.info("Buffering is in progress, call `flush()` to save the replay");return}ro&&go.infoTick("Starting replay in buffer mode");const e=t_e({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=SC({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:pun}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Cfn(this),onMutation:this._onMutationHandler,...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{ro&&go.info(`Stopping Replay${n?` triggered by ${n}`:""}`),Efn(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,whn(this)}catch(i){this.handleException(i)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),ro&&go.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),ro&&go.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();ro&&go.info("Converting buffer to session"),await this.flushImmediate();const i=this.stopRecording();!e||!i||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const n=e();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&YNe(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const e=`${Cl.location.pathname}${Cl.location.hash}${Cl.location.search}`,n=`${Cl.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(e,n){const i=this._throttledAddEvent(e,n);if(i===cwt){const r=Tx({category:"replay.throttled"});this.addUpdate(()=>!X3e(this,{type:Adn,timestamp:r.timestamp||0,data:{tag:"breadcrumb",payload:r,metric:!0}}))}return i}getCurrentRoute(){const e=this.lastActiveSpan||Wh(),n=e&&Mh(e),r=(n&&Gs(n).data||{})[Lx];if(!(!n||!r||!["route","custom"].includes(r)))return Gs(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=yhn({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const n=this._options.errorSampleRate>0,i=t_e({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=i}_checkSession(){if(!this.session)return!1;const e=this.session;return Xxt(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(e),!1):!0}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{Cl.document.addEventListener("visibilitychange",this._handleVisibilityChange),Cl.addEventListener("blur",this._handleWindowBlur),Cl.addEventListener("focus",this._handleWindowFocus),Cl.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(yfn(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=fhn(this)}_removeListeners(){try{Cl.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Cl.removeEventListener("blur",this._handleWindowBlur),Cl.removeEventListener("focus",this._handleWindowFocus),Cl.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}__init(){this._handleVisibilityChange=()=>{Cl.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=Tx({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=Tx({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{Jdn(this,e)}}_doChangeToBackgroundTasks(e){!this.session||Yxt(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){ro&&go.info("Document has become active, but session has expired");return}e&&this._createCustomBreadcrumb(e)}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:qo.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){const e=ihn(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(wue(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:n}=this;if(!e||!n||this._requiresManualStart||e.segmentId)return;const i=n.getEarliestTimestamp();i&&i<this._context.initialTimestamp&&(this._context.initialTimestamp=i)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){ro&&go.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await _fn(this),!!this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const i=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await lwt({replayId:e,recordingData:o,segmentId:r,eventContext:i,session:this.session,timestamp:n,onError:s=>this.handleException(s)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const i=Bo();if(i){const r=n instanceof Q3e?"ratelimit_backoff":"send_error";i.recordDroppedEvent(r,"replay")}}}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){ro&&go.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,r=Date.now()-n;this._debouncedFlush.cancel();const o=r<this._options.minReplayDuration,s=r>this._options.maxReplayDuration+5e3;if(o||s){ro&&go.info(`Session duration (${Math.floor(r/1e3)}s) is too ${o?"short":"long"}, not sending replay.`),o&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&ro&&go.info("Flushing initial segment without checkout.");const l=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(c){this.handleException(c)}finally{this._flushLock=void 0,l&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Y3e(this.session)}__init6(){this._onMutationHandler=e=>{const n=e.length,i=this._options.mutationLimit,r=this._options.mutationBreadcrumbLimit,o=i&&n>i;if(n>r||o){const s=Tx({category:"replay.mutations",data:{count:n,limit:o}});this._createCustomBreadcrumb(s)}return o?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function hV(t,e){return[...t,...e].join(",")}function Afn({mask:t,unmask:e,block:n,unblock:i,ignore:r}){const o=['base[href="/"]'],s=hV(t,[".sentry-mask","[data-sentry-mask]"]),a=hV(e,[]);return{maskTextSelector:s,unmaskTextSelector:a,blockSelector:hV(n,[".sentry-block","[data-sentry-block]",...o]),unblockSelector:hV(i,[]),ignoreSelector:hV(r,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function Rfn({el:t,key:e,maskAttributes:n,maskAllText:i,privacyOptions:r,value:o}){return!i||r.unmaskTextSelector&&t.matches(r.unmaskTextSelector)?o:n.includes(e)||e==="value"&&t.tagName==="INPUT"&&["submit","button"].includes(t.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o}const xZe='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Pfn=["content-length","content-type","accept"];let wZe=!1;const Ofn=t=>new Sue(t);class Sue{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=fun,flushMaxDelay:n=mun,minReplayDuration:i=_un,maxReplayDuration:r=nZe,stickySession:o=!0,useCompression:s=!0,workerUrl:a,_experiments:l={},maskAllText:c=!0,maskAllInputs:u=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:h=750,mutationLimit:f=1e4,slowClickTimeout:m=7e3,slowClickIgnoreSelectors:p=[],networkDetailAllowUrls:g=[],networkDetailDenyUrls:y=[],networkCaptureBodies:_=!0,networkRequestHeaders:w=[],networkResponseHeaders:C=[],mask:N=[],maskAttributes:E=["title","placeholder"],unmask:D=[],block:k=[],unblock:M=[],ignore:T=[],maskFn:A,beforeAddRecordingEvent:R,beforeErrorSampling:P}={}){this.name=Sue.id;const O=Afn({mask:N,unmask:D,block:k,unblock:M,ignore:T});if(this._recordingOptions={maskAllInputs:u,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:A,maskInputFn:A,maskAttributeFn:(V,F,$)=>Rfn({maskAttributes:E,maskAllText:c,privacyOptions:O,key:V,value:F,el:$}),...O,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:V=>{try{V.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:n,minReplayDuration:Math.min(i,xun),maxReplayDuration:Math.min(r,nZe),stickySession:o,useCompression:s,workerUrl:a,blockAllMedia:d,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:h,mutationLimit:f,slowClickTimeout:m,slowClickIgnoreSelectors:p,networkDetailAllowUrls:g,networkDetailDenyUrls:y,networkCaptureBodies:_,networkRequestHeaders:CZe(w),networkResponseHeaders:CZe(C),beforeAddRecordingEvent:R,beforeErrorSampling:P,_experiments:l},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${xZe}`:xZe),this._isInitialized&&CNe())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return wZe}set _isInitialized(e){wZe=e}afterAllSetup(e){!CNe()||this._replay||(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const n=jfn(this._initialOptions,e);this._replay=new iE({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const n=e.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}Sue.__initStatic();function jfn(t,e){const n=e.getOptions(),i={sessionSampleRate:0,errorSampleRate:0,...Eu(t)},r=nne(n.replaysSessionSampleRate),o=nne(n.replaysOnErrorSampleRate);return r==null&&o==null&&EF(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),r!=null&&(i.sessionSampleRate=r),o!=null&&(i.errorSampleRate=o),i}function CZe(t){return[...Pfn,...t.map(e=>e.toLowerCase())]}const Ix=ms,Ra=Ix.document,I7=Ix.navigator,uwt="Report a Bug",Ffn="Cancel",$fn="Send Bug Report",Vfn="Confirm",Bfn="Report a Bug",zfn="your.email@example.org",Hfn="Email",Wfn="What's the bug? What did you expect?",Ufn="Description",Kfn="Your Name",qfn="Name",Gfn="Thank you for your report!",Yfn="(required)",Xfn="Add a screenshot",Zfn="Remove screenshot",Qfn="widget",Jfn="api",emn=5e3,tmn=(t,e={includeReplay:!0})=>{if(!t.message)throw new Error("Unable to submit feedback with empty message");const n=Bo();if(!n)throw new Error("No client setup, cannot send feedback.");t.tags&&Object.keys(t.tags).length&&ka().setTags(t.tags);const i=Han({source:Jfn,url:S3e(),...t},e);return new Promise((r,o)=>{const s=setTimeout(()=>o("Unable to determine if Feedback was correctly sent."),5e3),a=n.on("afterSendEvent",(l,c)=>{if(l.event_id===i)return clearTimeout(s),a(),c&&typeof c.statusCode=="number"&&c.statusCode>=200&&c.statusCode<300&&r(i),c&&typeof c.statusCode=="number"&&c.statusCode===0?o("Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker."):c&&typeof c.statusCode=="number"&&c.statusCode===403?o("Unable to send Feedback. This could be because this domain is not in your list of allowed domains."):o("Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker")})})},see=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function nmn(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(I7.userAgent)||/Macintosh/i.test(I7.userAgent)&&I7.maxTouchPoints&&I7.maxTouchPoints>1||!isSecureContext)}function nZ(t,e){return{...t,...e,tags:{...t.tags,...e.tags},onFormOpen:()=>{e.onFormOpen&&e.onFormOpen(),t.onFormOpen&&t.onFormOpen()},onFormClose:()=>{e.onFormClose&&e.onFormClose(),t.onFormClose&&t.onFormClose()},onSubmitSuccess:n=>{e.onSubmitSuccess&&e.onSubmitSuccess(n),t.onSubmitSuccess&&t.onSubmitSuccess(n)},onSubmitError:n=>{e.onSubmitError&&e.onSubmitError(n),t.onSubmitError&&t.onSubmitError(n)},onFormSubmitted:()=>{e.onFormSubmitted&&e.onFormSubmitted(),t.onFormSubmitted&&t.onFormSubmitted()},themeDark:{...t.themeDark,...e.themeDark},themeLight:{...t.themeLight,...e.themeLight}}}function imn(t){const e=Ra.createElement("style");return e.textContent=`
.widget__actor {
  position: fixed;
  z-index: var(--z-index);
  margin: var(--page-margin);
  inset: var(--actor-inset);

  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;

  font-family: inherit;
  font-size: var(--font-size);
  font-weight: 600;
  line-height: 1.14em;
  text-decoration: none;

  background: var(--actor-background, var(--background));
  border-radius: var(--actor-border-radius, 1.7em/50%);
  border: var(--actor-border, var(--border));
  box-shadow: var(--actor-box-shadow, var(--box-shadow));
  color: var(--actor-color, var(--foreground));
  fill: var(--actor-color, var(--foreground));
  cursor: pointer;
  opacity: 1;
  transition: transform 0.2s ease-in-out;
  transform: translate(0, 0) scale(1);
}
.widget__actor[aria-hidden="true"] {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translate(0, 16px) scale(0.98);
}

.widget__actor:hover {
  background: var(--actor-hover-background, var(--background));
  filter: var(--interactive-filter);
}

.widget__actor svg {
  width: 1.14em;
  height: 1.14em;
}

@media (max-width: 600px) {
  .widget__actor span {
    display: none;
  }
}
`,t&&e.setAttribute("nonce",t),e}function Rg(t,e){return Object.entries(e).forEach(([n,i])=>{t.setAttributeNS(null,n,i)}),t}const CP=20,rmn="http://www.w3.org/2000/svg";function omn(){const t=a=>Ix.document.createElementNS(rmn,a),e=Rg(t("svg"),{width:`${CP}`,height:`${CP}`,viewBox:`0 0 ${CP} ${CP}`,fill:"var(--actor-color, var(--foreground))"}),n=Rg(t("g"),{clipPath:"url(#clip0_57_80)"}),i=Rg(t("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});e.appendChild(n).appendChild(i);const r=t("defs"),o=Rg(t("clipPath"),{id:"clip0_57_80"}),s=Rg(t("rect"),{width:`${CP}`,height:`${CP}`,fill:"white"});return o.appendChild(s),r.appendChild(o),e.appendChild(r).appendChild(o).appendChild(s),e}function smn({triggerLabel:t,triggerAriaLabel:e,shadow:n,styleNonce:i}){const r=Ra.createElement("button");if(r.type="button",r.className="widget__actor",r.ariaHidden="false",r.ariaLabel=e||t||uwt,r.appendChild(omn()),t){const s=Ra.createElement("span");s.appendChild(Ra.createTextNode(t)),r.appendChild(s)}const o=imn(i);return{el:r,appendToDom(){n.appendChild(o),n.appendChild(r)},removeFromDom(){n.removeChild(r),n.removeChild(o)},show(){r.ariaHidden="false"},hide(){r.ariaHidden="true"}}}const dwt="rgba(88, 74, 192, 1)",amn={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:dwt,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},SZe={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:dwt,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function NZe(t){return`
  --foreground: ${t.foreground};
  --background: ${t.background};
  --accent-foreground: ${t.accentForeground};
  --accent-background: ${t.accentBackground};
  --success-color: ${t.successColor};
  --error-color: ${t.errorColor};
  --border: ${t.border};
  --box-shadow: ${t.boxShadow};
  --outline: ${t.outline};
  --interactive-filter: ${t.interactiveFilter};
  `}function lmn({colorScheme:t,themeDark:e,themeLight:n,styleNonce:i}){const r=Ra.createElement("style");return r.textContent=`
:host {
  --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
  --font-size: 14px;
  --z-index: 100000;

  --page-margin: 16px;
  --inset: auto 0 0 auto;
  --actor-inset: var(--inset);

  font-family: var(--font-family);
  font-size: var(--font-size);

  ${t!=="system"?"color-scheme: only light;":""}

  ${NZe(t==="dark"?{...SZe,...e}:{...amn,...n})}
}

${t==="system"?`
@media (prefers-color-scheme: dark) {
  :host {
    ${NZe({...SZe,...e})}
  }
}`:""}
}
`,i&&r.setAttribute("nonce",i),r}const cmn=({lazyLoadIntegration:t,getModalIntegration:e,getScreenshotIntegration:n})=>({id:r="sentry-feedback",autoInject:o=!0,showBranding:s=!0,isEmailRequired:a=!1,isNameRequired:l=!1,showEmail:c=!0,showName:u=!0,enableScreenshot:d=!0,useSentryUser:h={email:"email",name:"username"},tags:f,styleNonce:m,scriptNonce:p,colorScheme:g="system",themeLight:y={},themeDark:_={},addScreenshotButtonLabel:w=Xfn,cancelButtonLabel:C=Ffn,confirmButtonLabel:N=Vfn,emailLabel:E=Hfn,emailPlaceholder:D=zfn,formTitle:k=Bfn,isRequiredLabel:M=Yfn,messageLabel:T=Ufn,messagePlaceholder:A=Wfn,nameLabel:R=qfn,namePlaceholder:P=Kfn,removeScreenshotButtonLabel:O=Zfn,submitButtonLabel:V=$fn,successMessageText:F=Gfn,triggerLabel:$=uwt,triggerAriaLabel:B="",onFormOpen:z,onFormClose:H,onSubmitSuccess:K,onSubmitError:q,onFormSubmitted:U}={})=>{const Y={id:r,autoInject:o,showBranding:s,isEmailRequired:a,isNameRequired:l,showEmail:c,showName:u,enableScreenshot:d,useSentryUser:h,tags:f,styleNonce:m,scriptNonce:p,colorScheme:g,themeDark:_,themeLight:y,triggerLabel:$,triggerAriaLabel:B,cancelButtonLabel:C,submitButtonLabel:V,confirmButtonLabel:N,formTitle:k,emailLabel:E,emailPlaceholder:D,messageLabel:T,messagePlaceholder:A,nameLabel:R,namePlaceholder:P,successMessageText:F,isRequiredLabel:M,addScreenshotButtonLabel:w,removeScreenshotButtonLabel:O,onFormClose:H,onFormOpen:z,onSubmitError:q,onSubmitSuccess:K,onFormSubmitted:U};let J=null,ae=[];const se=Q=>{if(!J){const be=Ra.createElement("div");be.id=String(Q.id),Ra.body.appendChild(be),J=be.attachShadow({mode:"open"}),J.appendChild(lmn(Q))}return J},oe=async(Q,be,le)=>{const Ne=Bo(),Le=Ne&&Ne.getIntegrationByName(Q);if(Le)return Le;const De=(be&&be()||await t(le,p))();return Ne&&Ne.addIntegration(De),De},fe=async Q=>{const be=Q.enableScreenshot&&nmn(),[le,Ne]=await Promise.all([oe("FeedbackModal",e,"feedbackModalIntegration"),be?oe("FeedbackScreenshot",n,"feedbackScreenshotIntegration"):void 0]);if(!le)throw see&&Zn.error("[Feedback] Missing feedback modal integration. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!");be&&!Ne&&see&&Zn.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.");const Le=le.createDialog({options:{...Q,onFormClose:()=>{Le&&Le.close(),Q.onFormClose&&Q.onFormClose()},onFormSubmitted:()=>{Le&&Le.close(),Q.onFormSubmitted&&Q.onFormSubmitted()}},screenshotIntegration:be?Ne:void 0,sendFeedback:tmn,shadow:se(Q)});return Le},de=(Q,be={})=>{const le=nZ(Y,be),Ne=typeof Q=="string"?Ra.querySelector(Q):typeof Q.addEventListener=="function"?Q:null;if(!Ne)throw see&&Zn.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let Le=null;const Te=async()=>{Le||(Le=await fe({...le,onFormSubmitted:()=>{Le&&Le.removeFromDom(),le.onFormSubmitted&&le.onFormSubmitted()}})),Le.appendToDom(),Le.open()};Ne.addEventListener("click",Te);const De=()=>{ae=ae.filter(Pe=>Pe!==De),Le&&Le.removeFromDom(),Le=null,Ne.removeEventListener("click",Te)};return ae.push(De),De},ie=(Q={})=>{const be=nZ(Y,Q),le=se(be),Ne=smn({triggerLabel:be.triggerLabel,triggerAriaLabel:be.triggerAriaLabel,shadow:le,styleNonce:m});return de(Ne.el,{...be,onFormOpen(){Ne.hide()},onFormClose(){Ne.show()},onFormSubmitted(){Ne.show()}}),Ne};return{name:"Feedback",setupOnce(){!CNe()||!Y.autoInject||(Ra.readyState==="loading"?Ra.addEventListener("DOMContentLoaded",()=>ie().appendToDom()):ie().appendToDom())},attachTo:de,createWidget(Q={}){const be=ie(nZ(Y,Q));return be.appendToDom(),be},async createForm(Q={}){return fe(nZ(Y,Q))},remove(){J&&(J.parentElement&&J.parentElement.remove(),J=null),ae.forEach(Q=>Q()),ae=[]}}};var Nue,hl,hwt,YL,EZe,fwt,QNe,_z={},J3e=[],umn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,eje=Array.isArray;function TE(t,e){for(var n in e)t[n]=e[n];return t}function mwt(t){var e=t.parentNode;e&&e.removeChild(t)}function Xo(t,e,n){var i,r,o,s={};for(o in e)o=="key"?i=e[o]:o=="ref"?r=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?Nue.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return aee(t,s,i,r,null)}function aee(t,e,n,i,r){var o={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r??++hwt,__i:-1,__u:0};return r==null&&hl.vnode!=null&&hl.vnode(o),o}function hK(t){return t.children}function lee(t,e){this.props=t,this.context=e}function yj(t,e){if(e==null)return t.__?yj(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?yj(t):null}function dmn(t,e,n){var i,r=t.__v,o=r.__e,s=t.__P;if(s)return(i=TE({},r)).__v=r.__v+1,hl.vnode&&hl.vnode(i),tje(s,i,r,t.__n,s.ownerSVGElement!==void 0,32&r.__u?[o]:null,e,o??yj(r),!!(32&r.__u),n),i.__.__k[i.__i]=i,i.__d=void 0,i.__e!=o&&pwt(i),i}function pwt(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return pwt(t)}}function DZe(t){(!t.__d&&(t.__d=!0)&&YL.push(t)&&!pne.__r++||EZe!==hl.debounceRendering)&&((EZe=hl.debounceRendering)||fwt)(pne)}function pne(){var t,e,n,i=[],r=[];for(YL.sort(QNe);t=YL.shift();)t.__d&&(n=YL.length,e=dmn(t,i,r)||e,n===0||YL.length>n?(JNe(i,e,r),r.length=i.length=0,e=void 0,YL.sort(QNe)):e&&hl.__c&&hl.__c(e,J3e));e&&JNe(i,e,r),pne.__r=0}function gwt(t,e,n,i,r,o,s,a,l,c,u){var d,h,f,m,p,g=i&&i.__k||J3e,y=e.length;for(n.__d=l,hmn(n,e,g),l=n.__d,d=0;d<y;d++)(f=n.__k[d])!=null&&typeof f!="boolean"&&typeof f!="function"&&(h=f.__i===-1?_z:g[f.__i]||_z,f.__i=d,tje(t,f,h,r,o,s,a,l,c,u),m=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&nje(h.ref,null,f),u.push(f.ref,f.__c||m,f)),p==null&&m!=null&&(p=m),65536&f.__u||h.__k===f.__k?l=bwt(f,l,t):typeof f.type=="function"&&f.__d!==void 0?l=f.__d:m&&(l=m.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=l,n.__e=p}function hmn(t,e,n){var i,r,o,s,a,l=e.length,c=n.length,u=c,d=0;for(t.__k=[],i=0;i<l;i++)(r=t.__k[i]=(r=e[i])==null||typeof r=="boolean"||typeof r=="function"?null:typeof r=="string"||typeof r=="number"||typeof r=="bigint"||r.constructor==String?aee(null,r,null,null,r):eje(r)?aee(hK,{children:r},null,null,null):r.constructor===void 0&&r.__b>0?aee(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)!=null?(r.__=t,r.__b=t.__b+1,a=fmn(r,n,s=i+d,u),r.__i=a,o=null,a!==-1&&(u--,(o=n[a])&&(o.__u|=131072)),o==null||o.__v===null?(a==-1&&d--,typeof r.type!="function"&&(r.__u|=65536)):a!==s&&(a===s+1?d++:a>s?u>l-s?d+=a-s:d--:d=a<s&&a==s-1?a-s:0,a!==i+d&&(r.__u|=65536))):(o=n[i])&&o.key==null&&o.__e&&(o.__e==t.__d&&(t.__d=yj(o)),eEe(o,o,!1),n[i]=null,u--);if(u)for(i=0;i<c;i++)(o=n[i])!=null&&!(131072&o.__u)&&(o.__e==t.__d&&(t.__d=yj(o)),eEe(o,o))}function bwt(t,e,n){var i,r;if(typeof t.type=="function"){for(i=t.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=t,e=bwt(i[r],e,n));return e}t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function fmn(t,e,n,i){var r=t.key,o=t.type,s=n-1,a=n+1,l=e[n];if(l===null||l&&r==l.key&&o===l.type)return n;if(i>(l!=null&&!(131072&l.__u)?1:0))for(;s>=0||a<e.length;){if(s>=0){if((l=e[s])&&!(131072&l.__u)&&r==l.key&&o===l.type)return s;s--}if(a<e.length){if((l=e[a])&&!(131072&l.__u)&&r==l.key&&o===l.type)return a;a++}}return-1}function kZe(t,e,n){e[0]==="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||umn.test(e)?n:n+"px"}function iZ(t,e,n,i,r){var o;e:if(e==="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof i=="string"&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||kZe(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||kZe(t.style,e,n[e])}else if(e[0]==="o"&&e[1]==="n")o=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?i?n.u=i.u:(n.u=Date.now(),t.addEventListener(e,o?LZe:MZe,o)):t.removeEventListener(e,o?LZe:MZe,o);else{if(r)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e!=="role"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,n))}}function MZe(t){if(this.l){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(hl.event?hl.event(t):t)}}function LZe(t){if(this.l)return this.l[t.type+!0](hl.event?hl.event(t):t)}function tje(t,e,n,i,r,o,s,a,l,c){var u,d,h,f,m,p,g,y,_,w,C,N,E,D,k,M=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=e.__e=n.__e]),(u=hl.__b)&&u(e);e:if(typeof M=="function")try{if(y=e.props,_=(u=M.contextType)&&i[u.__c],w=u?_?_.props.value:u.__:i,n.__c?g=(d=e.__c=n.__c).__=d.__E:("prototype"in M&&M.prototype.render?e.__c=d=new M(y,w):(e.__c=d=new lee(y,w),d.constructor=M,d.render=pmn),_&&_.sub(d),d.props=y,d.state||(d.state={}),d.context=w,d.__n=i,h=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),M.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=TE({},d.__s)),TE(d.__s,M.getDerivedStateFromProps(y,d.__s))),f=d.props,m=d.state,d.__v=e,h)M.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(M.getDerivedStateFromProps==null&&y!==f&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(y,w),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(y,d.__s,w)===!1||e.__v===n.__v)){for(e.__v!==n.__v&&(d.props=y,d.state=d.__s,d.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach(function(T){T&&(T.__=e)}),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(y,d.__s,w),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(f,m,p)})}if(d.context=w,d.props=y,d.__P=t,d.__e=!1,N=hl.__r,E=0,"prototype"in M&&M.prototype.render){for(d.state=d.__s,d.__d=!1,N&&N(e),u=d.render(d.props,d.state,d.context),D=0;D<d._sb.length;D++)d.__h.push(d._sb[D]);d._sb=[]}else do d.__d=!1,N&&N(e),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++E<25);d.state=d.__s,d.getChildContext!=null&&(i=TE(TE({},i),d.getChildContext())),h||d.getSnapshotBeforeUpdate==null||(p=d.getSnapshotBeforeUpdate(f,m)),gwt(t,eje(k=u!=null&&u.type===hK&&u.key==null?u.props.children:u)?k:[k],e,n,i,r,o,s,a,l,c),d.base=e.__e,e.__u&=-161,d.__h.length&&s.push(d),g&&(d.__E=d.__=null)}catch(T){e.__v=null,l||o!=null?(e.__e=a,e.__u|=l?160:32,o[o.indexOf(a)]=null):(e.__e=n.__e,e.__k=n.__k),hl.__e(T,e,n)}else o==null&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=mmn(n.__e,e,n,i,r,o,s,l,c);(u=hl.diffed)&&u(e)}function JNe(t,e,n){for(var i=0;i<n.length;i++)nje(n[i],n[++i],n[++i]);hl.__c&&hl.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(o){o.call(r)})}catch(o){hl.__e(o,r.__v)}})}function mmn(t,e,n,i,r,o,s,a,l){var c,u,d,h,f,m,p,g=n.props,y=e.props,_=e.type;if(_==="svg"&&(r=!0),o!=null){for(c=0;c<o.length;c++)if((f=o[c])&&"setAttribute"in f==!!_&&(_?f.localName===_:f.nodeType===3)){t=f,o[c]=null;break}}if(t==null){if(_===null)return document.createTextNode(y);t=r?document.createElementNS("http://www.w3.org/2000/svg",_):document.createElement(_,y.is&&y),o=null,a=!1}if(_===null)g===y||a&&t.data===y||(t.data=y);else{if(o=o&&Nue.call(t.childNodes),g=n.props||_z,!a&&o!=null)for(g={},c=0;c<t.attributes.length;c++)g[(f=t.attributes[c]).name]=f.value;for(c in g)f=g[c],c=="children"||(c=="dangerouslySetInnerHTML"?d=f:c==="key"||c in y||iZ(t,c,null,f,r));for(c in y)f=y[c],c=="children"?h=f:c=="dangerouslySetInnerHTML"?u=f:c=="value"?m=f:c=="checked"?p=f:c==="key"||a&&typeof f!="function"||g[c]===f||iZ(t,c,f,g[c],r);if(u)a||d&&(u.__html===d.__html||u.__html===t.innerHTML)||(t.innerHTML=u.__html),e.__k=[];else if(d&&(t.innerHTML=""),gwt(t,eje(h)?h:[h],e,n,i,r&&_!=="foreignObject",o,s,o?o[0]:n.__k&&yj(n,0),a,l),o!=null)for(c=o.length;c--;)o[c]!=null&&mwt(o[c]);a||(c="value",m!==void 0&&(m!==t[c]||_==="progress"&&!m||_==="option"&&m!==g[c])&&iZ(t,c,m,g[c],!1),c="checked",p!==void 0&&p!==t[c]&&iZ(t,c,p,g[c],!1))}return t}function nje(t,e,n){try{typeof t=="function"?t(e):t.current=e}catch(i){hl.__e(i,n)}}function eEe(t,e,n){var i,r;if(hl.unmount&&hl.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||nje(i,null,e)),(i=t.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(o){hl.__e(o,e)}i.base=i.__P=null,t.__c=void 0}if(i=t.__k)for(r=0;r<i.length;r++)i[r]&&eEe(i[r],e,n||typeof t.type!="function");n||t.__e==null||mwt(t.__e),t.__=t.__e=t.__d=void 0}function pmn(t,e,n){return this.constructor(t,n)}function gmn(t,e,n){var i,r,o,s;hl.__&&hl.__(t,e),r=(i=typeof n=="function")?null:e.__k,o=[],s=[],tje(e,t=(!i&&n||e).__k=Xo(hK,null,[t]),r||_z,_z,e.ownerSVGElement!==void 0,!i&&n?[n]:r?null:e.firstChild?Nue.call(e.childNodes):null,o,!i&&n?n:r?r.__e:e.firstChild,i,s),t.__d=void 0,JNe(o,t,s)}Nue=J3e.slice,hl={__e:function(t,e,n,i){for(var r,o,s;e=e.__;)if((r=e.__c)&&!r.__)try{if((o=r.constructor)&&o.getDerivedStateFromError!=null&&(r.setState(o.getDerivedStateFromError(t)),s=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(t,i||{}),s=r.__d),s)return r.__E=r}catch(a){t=a}throw t}},hwt=0,lee.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=TE({},this.state),typeof t=="function"&&(t=t(TE({},n),this.props)),t&&TE(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),DZe(this))},lee.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),DZe(this))},lee.prototype.render=hK,YL=[],fwt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,QNe=function(t,e){return t.__v.__b-e.__v.__b},pne.__r=0;var JC,cl,n_e,TZe,_j=0,vwt=[],cee=[],ic=hl,IZe=ic.__b,AZe=ic.__r,RZe=ic.diffed,PZe=ic.__c,OZe=ic.unmount,jZe=ic.__;function DA(t,e){ic.__h&&ic.__h(cl,t,_j||e),_j=0;var n=cl.__H||(cl.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:cee}),n.__[t]}function t3(t){return _j=1,ywt(xwt,t)}function ywt(t,e,n){var i=DA(JC++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):xwt(void 0,e),function(a){var l=i.__N?i.__N[0]:i.__[0],c=i.t(l,a);l!==c&&(i.__N=[c,i.__[1]],i.__c.setState({}))}],i.__c=cl,!cl.u)){var r=function(a,l,c){if(!i.__c.__H)return!0;var u=i.__c.__H.__.filter(function(h){return!!h.__c});if(u.every(function(h){return!h.__N}))return!o||o.call(this,a,l,c);var d=!1;return u.forEach(function(h){if(h.__N){var f=h.__[0];h.__=h.__N,h.__N=void 0,f!==h.__[0]&&(d=!0)}}),!(!d&&i.__c.props===a)&&(!o||o.call(this,a,l,c))};cl.u=!0;var o=cl.shouldComponentUpdate,s=cl.componentWillUpdate;cl.componentWillUpdate=function(a,l,c){if(this.__e){var u=o;o=void 0,r(a,l,c),o=u}s&&s.call(this,a,l,c)},cl.shouldComponentUpdate=r}return i.__N||i.__}function bmn(t,e){var n=DA(JC++,3);!ic.__s&&ije(n.__H,e)&&(n.__=t,n.i=e,cl.__H.__h.push(n))}function _wt(t,e){var n=DA(JC++,4);!ic.__s&&ije(n.__H,e)&&(n.__=t,n.i=e,cl.__h.push(n))}function vmn(t){return _j=5,fK(function(){return{current:t}},[])}function ymn(t,e,n){_j=6,_wt(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},n==null?n:n.concat(t))}function fK(t,e){var n=DA(JC++,7);return ije(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function n3(t,e){return _j=8,fK(function(){return t},e)}function _mn(t){var e=cl.context[t.__c],n=DA(JC++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(cl)),e.props.value):t.__}function xmn(t,e){ic.useDebugValue&&ic.useDebugValue(e?e(t):t)}function wmn(t){var e=DA(JC++,10),n=t3();return e.__=t,cl.componentDidCatch||(cl.componentDidCatch=function(i,r){e.__&&e.__(i,r),n[1](i)}),[n[0],function(){n[1](void 0)}]}function Cmn(){var t=DA(JC++,11);if(!t.__){for(var e=cl.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function Smn(){for(var t;t=vwt.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(uee),t.__H.__h.forEach(tEe),t.__H.__h=[]}catch(e){t.__H.__h=[],ic.__e(e,t.__v)}}ic.__b=function(t){cl=null,IZe&&IZe(t)},ic.__=function(t,e){e.__k&&e.__k.__m&&(t.__m=e.__k.__m),jZe&&jZe(t,e)},ic.__r=function(t){AZe&&AZe(t),JC=0;var e=(cl=t.__c).__H;e&&(n_e===cl?(e.__h=[],cl.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=cee,n.__N=n.i=void 0})):(e.__h.forEach(uee),e.__h.forEach(tEe),e.__h=[],JC=0)),n_e=cl},ic.diffed=function(t){RZe&&RZe(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(vwt.push(e)!==1&&TZe===ic.requestAnimationFrame||((TZe=ic.requestAnimationFrame)||Nmn)(Smn)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==cee&&(n.__=n.__V),n.i=void 0,n.__V=cee})),n_e=cl=null},ic.__c=function(t,e){e.some(function(n){try{n.__h.forEach(uee),n.__h=n.__h.filter(function(i){return!i.__||tEe(i)})}catch(i){e.some(function(r){r.__h&&(r.__h=[])}),e=[],ic.__e(i,n.__v)}}),PZe&&PZe(t,e)},ic.unmount=function(t){OZe&&OZe(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(i){try{uee(i)}catch(r){e=r}}),n.__H=void 0,e&&ic.__e(e,n.__v))};var FZe=typeof requestAnimationFrame=="function";function Nmn(t){var e,n=function(){clearTimeout(i),FZe&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,100);FZe&&(e=requestAnimationFrame(n))}function uee(t){var e=cl,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),cl=e}function tEe(t){var e=cl;t.__c=t.__(),cl=e}function ije(t,e){return!t||t.length!==e.length||e.some(function(n,i){return n!==t[i]})}function xwt(t,e){return typeof e=="function"?e(t):e}const Emn={__proto__:null,useCallback:n3,useContext:_mn,useDebugValue:xmn,useEffect:bmn,useErrorBoundary:wmn,useId:Cmn,useImperativeHandle:ymn,useLayoutEffect:_wt,useMemo:fK,useReducer:ywt,useRef:vmn,useState:t3},Dmn="http://www.w3.org/2000/svg";function kmn(){const t=i=>Ra.createElementNS(Dmn,i),e=Rg(t("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Rg(t("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return e.appendChild(n),e}const $Ze="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/DialogHeader.tsx";function Mmn({options:t}){const e=fK(()=>({__html:kmn().outerHTML}),[]);return Xo("h2",{class:"dialog__header",__self:this,__source:{fileName:$Ze,lineNumber:16}},t.formTitle,t.showBranding?Xo("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:e,__self:this,__source:{fileName:$Ze,lineNumber:19}}):null)}function Lmn(t,e){const n=[];return e.isNameRequired&&!t.name&&n.push(e.nameLabel),e.isEmailRequired&&!t.email&&n.push(e.emailLabel),t.message||n.push(e.messageLabel),n}const Wl="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/Form.tsx";function i_e(t,e){const n=t.get(e);return typeof n=="string"?n.trim():""}function Tmn({options:t,defaultEmail:e,defaultName:n,onFormClose:i,onSubmit:r,onSubmitSuccess:o,onSubmitError:s,showEmail:a,showName:l,screenshotInput:c}){const{tags:u,addScreenshotButtonLabel:d,removeScreenshotButtonLabel:h,cancelButtonLabel:f,emailLabel:m,emailPlaceholder:p,isEmailRequired:g,isNameRequired:y,messageLabel:_,messagePlaceholder:w,nameLabel:C,namePlaceholder:N,submitButtonLabel:E,isRequiredLabel:D}=t,[k,M]=t3(null),[T,A]=t3(!1),R=c&&c.input,[P,O]=t3(null),V=n3(B=>{O(B),A(!1)},[]),F=n3(B=>{const z=Lmn(B,{emailLabel:m,isEmailRequired:g,isNameRequired:y,messageLabel:_,nameLabel:C});return z.length>0?M(`Please enter in the following required fields: ${z.join(", ")}`):M(null),z.length===0},[m,g,y,_,C]),$=n3(async B=>{try{if(B.preventDefault(),!(B.target instanceof HTMLFormElement))return;const z=new FormData(B.target),H=await(c&&T?c.value():void 0),K={name:i_e(z,"name"),email:i_e(z,"email"),message:i_e(z,"message"),attachments:H?[H]:void 0};if(!F(K))return;try{await r({name:K.name,email:K.email,message:K.message,source:Qfn,tags:u},{attachments:K.attachments}),o(K)}catch(q){see&&Zn.error(q),M(q),s(q)}}catch{}},[c&&T,o,s]);return Xo("form",{class:"form",onSubmit:$,__self:this,__source:{fileName:Wl,lineNumber:144}},R&&T?Xo(R,{onError:V,__self:this,__source:{fileName:Wl,lineNumber:146}}):null,Xo("div",{class:"form__right","data-sentry-feedback":!0,__self:this,__source:{fileName:Wl,lineNumber:149}},Xo("div",{class:"form__top",__self:this,__source:{fileName:Wl,lineNumber:150}},k?Xo("div",{class:"form__error-container",__self:this,__source:{fileName:Wl,lineNumber:151}},k):null,l?Xo("label",{for:"name",class:"form__label",__self:this,__source:{fileName:Wl,lineNumber:154}},Xo(r_e,{label:C,isRequiredLabel:D,isRequired:y,__self:this,__source:{fileName:Wl,lineNumber:155}}),Xo("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:N,required:y,type:"text",__self:this,__source:{fileName:Wl,lineNumber:156}})):Xo("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden",__self:this,__source:{fileName:Wl,lineNumber:167}}),a?Xo("label",{for:"email",class:"form__label",__self:this,__source:{fileName:Wl,lineNumber:171}},Xo(r_e,{label:m,isRequiredLabel:D,isRequired:g,__self:this,__source:{fileName:Wl,lineNumber:172}}),Xo("input",{class:"form__input",defaultValue:e,id:"email",name:"email",placeholder:p,required:g,type:"email",__self:this,__source:{fileName:Wl,lineNumber:173}})):Xo("input",{"aria-hidden":!0,value:e,name:"email",type:"hidden",__self:this,__source:{fileName:Wl,lineNumber:184}}),Xo("label",{for:"message",class:"form__label",__self:this,__source:{fileName:Wl,lineNumber:187}},Xo(r_e,{label:_,isRequiredLabel:D,isRequired:!0,__self:this,__source:{fileName:Wl,lineNumber:188}}),Xo("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:w,required:!0,rows:5,__self:this,__source:{fileName:Wl,lineNumber:189}})),R?Xo("label",{for:"screenshot",class:"form__label",__self:this,__source:{fileName:Wl,lineNumber:201}},Xo("button",{class:"btn btn--default",type:"button",onClick:()=>{O(null),A(B=>!B)},__self:this,__source:{fileName:Wl,lineNumber:202}},T?h:d),P?Xo("div",{class:"form__error-container",__self:this,__source:{fileName:Wl,lineNumber:212}},P.message):null):null),Xo("div",{class:"btn-group",__self:this,__source:{fileName:Wl,lineNumber:216}},Xo("button",{class:"btn btn--primary",type:"submit",__self:this,__source:{fileName:Wl,lineNumber:217}},E),Xo("button",{class:"btn btn--default",type:"button",onClick:i,__self:this,__source:{fileName:Wl,lineNumber:220}},f))))}function r_e({label:t,isRequired:e,isRequiredLabel:n}){return Xo("span",{class:"form__label__text",__self:this,__source:{fileName:Wl,lineNumber:239}},t,e&&Xo("span",{class:"form__label__text--required",__self:this,__source:{fileName:Wl,lineNumber:241}},n))}const rZ=16,VZe=17,Imn="http://www.w3.org/2000/svg";function Amn(){const t=l=>Ix.document.createElementNS(Imn,l),e=Rg(t("svg"),{width:`${rZ}`,height:`${VZe}`,viewBox:`0 0 ${rZ} ${VZe}`,fill:"inherit"}),n=Rg(t("g"),{clipPath:"url(#clip0_57_156)"}),i=Rg(t("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),r=Rg(t("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});e.appendChild(n).append(r,i);const o=t("defs"),s=Rg(t("clipPath"),{id:"clip0_57_156"}),a=Rg(t("rect"),{width:`${rZ}`,height:`${rZ}`,fill:"white",transform:"translate(0 0.5)"});return s.appendChild(a),o.appendChild(s),e.appendChild(o).appendChild(s).appendChild(a),e}const f1="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/Dialog.tsx";function Rmn({open:t,onFormSubmitted:e,...n}){const i=n.options,r=fK(()=>({__html:Amn().outerHTML}),[]),[o,s]=t3(null),a=n3(()=>{o&&(clearTimeout(o),s(null)),e()},[o]),l=n3(c=>{n.onSubmitSuccess(c),s(setTimeout(()=>{e(),s(null)},emn))},[e]);return Xo(hK,{__self:this,__source:{fileName:f1,lineNumber:48}},o?Xo("div",{class:"success__position",onClick:a,__self:this,__source:{fileName:f1,lineNumber:50}},Xo("div",{class:"success__content",__self:this,__source:{fileName:f1,lineNumber:51}},i.successMessageText,Xo("span",{class:"success__icon",dangerouslySetInnerHTML:r,__self:this,__source:{fileName:f1,lineNumber:53}}))):Xo("dialog",{class:"dialog",onClick:i.onFormClose,open:t,__self:this,__source:{fileName:f1,lineNumber:57}},Xo("div",{class:"dialog__position",__self:this,__source:{fileName:f1,lineNumber:58}},Xo("div",{class:"dialog__content",onClick:c=>{c.stopPropagation()},__self:this,__source:{fileName:f1,lineNumber:59}},Xo(Mmn,{options:i,__self:this,__source:{fileName:f1,lineNumber:66}}),Xo(Tmn,{...n,onSubmitSuccess:l,__self:this,__source:{fileName:f1,lineNumber:67}})))))}const Pmn=`
.dialog {
  position: fixed;
  z-index: var(--z-index);
  margin: 0;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  height: 100vh;
  width: 100vw;

  color: var(--dialog-color, var(--foreground));
  fill: var(--dialog-color, var(--foreground));
  line-height: 1.75em;

  background-color: rgba(0, 0, 0, 0.05);
  border: none;
  inset: 0;
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

.dialog__position {
  position: fixed;
  z-index: var(--z-index);
  inset: var(--dialog-inset);
  padding: var(--page-margin);
  display: flex;
  max-height: calc(100vh - (2 * var(--page-margin)));
}
@media (max-width: 600px) {
  .dialog__position {
    inset: var(--page-margin);
    padding: 0;
  }
}

.dialog__position:has(.editor) {
  inset: var(--page-margin);
  padding: 0;
}

.dialog:not([open]) {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.dialog:not([open]) .dialog__content {
  transform: translate(0, -16px) scale(0.98);
}

.dialog__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: var(--dialog-padding, 24px);
  max-width: 100%;
  width: 100%;
  max-height: 100%;
  overflow: auto;

  background: var(--dialog-background, var(--background));
  border-radius: var(--dialog-border-radius, 20px);
  border: var(--dialog-border, var(--border));
  box-shadow: var(--dialog-box-shadow, var(--box-shadow));
  transform: translate(0, 0) scale(1);
  transition: transform 0.2s ease-in-out;
}
`,Omn=`
.dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: var(--dialog-header-weight, 600);
  margin: 0;
}

.brand-link {
  display: inline-flex;
}
.brand-link:focus-visible {
  outline: var(--outline);
}
`,jmn=`
.form {
  display: flex;
  overflow: auto;
  flex-direction: row;
  gap: 16px;
  flex: 1 0;
}

.form__right {
  flex: 0 0 auto;
  width: var(--form-width, 272px);
  display: flex;
  overflow: auto;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

@media (max-width: 600px) {
  .form__right {
    width: var(--form-width, 100%);
  }
}

.form__top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form__error-container {
  color: var(--error-color);
  fill: var(--error-color);
}

.form__label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0px;
}

.form__label__text {
  display: flex;
  gap: 4px;
  align-items: center;
}

.form__label__text--required {
  font-size: 0.85em;
}

.form__input {
  font-family: inherit;
  line-height: inherit;
  background: transparent;
  box-sizing: border-box;
  border: var(--input-border, var(--border));
  border-radius: var(--input-border-radius, 6px);
  color: var(--input-color, inherit);
  fill: var(--input-color, inherit);
  font-size: var(--input-font-size, inherit);
  font-weight: var(--input-font-weight, 500);
  padding: 6px 12px;
}

.form__input::placeholder {
  opacity: 0.65;
  color: var(--input-placeholder-color, inherit);
  filter: var(--interactive-filter);
}

.form__input:focus-visible {
  outline: var(--input-focus-outline, var(--outline));
}

.form__input--textarea {
  font-family: inherit;
  resize: vertical;
}

.error {
  color: var(--error-color);
  fill: var(--error-color);
}
`,Fmn=`
.btn-group {
  display: grid;
  gap: 8px;
}

.btn {
  line-height: inherit;
  border: var(--button-border, var(--border));
  border-radius: var(--button-border-radius, 6px);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--button-font-size, inherit);
  font-weight: var(--button-font-weight, 600);
  padding: var(--button-padding, 6px 16px);
}
.btn[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

.btn--primary {
  color: var(--button-primary-color, var(--accent-foreground));
  fill: var(--button-primary-color, var(--accent-foreground));
  background: var(--button-primary-background, var(--accent-background));
  border: var(--button-primary-border, var(--border));
  border-radius: var(--button-primary-border-radius, 6px);
  font-weight: var(--button-primary-font-weight, 500);
}
.btn--primary:hover {
  color: var(--button-primary-hover-color, var(--accent-foreground));
  fill: var(--button-primary-hover-color, var(--accent-foreground));
  background: var(--button-primary-hover-background, var(--accent-background));
  filter: var(--interactive-filter);
}
.btn--primary:focus-visible {
  background: var(--button-primary-hover-background, var(--accent-background));
  filter: var(--interactive-filter);
  outline: var(--button-primary-focus-outline, var(--outline));
}

.btn--default {
  color: var(--button-color, var(--foreground));
  fill: var(--button-color, var(--foreground));
  background: var(--button-background, var(--background));
  border: var(--button-border, var(--border));
  border-radius: var(--button-border-radius, 6px);
  font-weight: var(--button-font-weight, 500);
}
.btn--default:hover {
  color: var(--button-color, var(--foreground));
  fill: var(--button-color, var(--foreground));
  background: var(--button-hover-background, var(--background));
  filter: var(--interactive-filter);
}
.btn--default:focus-visible {
  background: var(--button-hover-background, var(--background));
  filter: var(--interactive-filter);
  outline: var(--button-focus-outline, var(--outline));
}
`,$mn=`
.success__position {
  position: fixed;
  inset: var(--dialog-inset);
  padding: var(--page-margin);
  z-index: var(--z-index);
}
.success__content {
  background: var(--success-background, var(--background));
  border: var(--success-border, var(--border));
  border-radius: var(--success-border-radius, 1.7em/50%);
  box-shadow: var(--success-box-shadow, var(--box-shadow));
  font-weight: var(--success-font-weight, 600);
  color: var(--success-color);
  fill: var(--success-color);
  padding: 12px 24px;
  line-height: 1.75em;

  display: grid;
  align-items: center;
  grid-auto-flow: column;
  gap: 6px;
  cursor: default;
}

.success__icon {
  display: flex;
}
`;function Vmn(t){const e=Ra.createElement("style");return e.textContent=`
:host {
  --dialog-inset: var(--inset);
}

${Pmn}
${Omn}
${jmn}
${Fmn}
${$mn}
`,t&&e.setAttribute("nonce",t),e}const Bmn="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/integration.tsx";function zmn(){const t=ka().getUser(),e=Om().getUser(),n=D_t().getUser();return t&&Object.keys(t).length?t:e&&Object.keys(e).length?e:n}const Hmn=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:t,screenshotIntegration:e,sendFeedback:n,shadow:i})=>{const r=i,o=t.useSentryUser,s=zmn(),a=Ra.createElement("div"),l=Vmn(t.styleNonce);let c="";const u={get el(){return a},appendToDom(){!r.contains(l)&&!r.contains(a)&&(r.appendChild(l),r.appendChild(a))},removeFromDom(){r.removeChild(a),r.removeChild(l),Ra.body.style.overflow=c},open(){h(!0),t.onFormOpen&&t.onFormOpen(),c=Ra.body.style.overflow,Ra.body.style.overflow="hidden"},close(){h(!1),Ra.body.style.overflow=c}},d=e&&e.createInput({h:Xo,hooks:Emn,dialog:u,options:t}),h=f=>{gmn(Xo(Rmn,{options:t,screenshotInput:d,showName:t.showName||t.isNameRequired,showEmail:t.showEmail||t.isEmailRequired,defaultName:o&&s&&s[o.name]||"",defaultEmail:o&&s&&s[o.email]||"",onFormClose:()=>{h(!1),t.onFormClose&&t.onFormClose()},onSubmit:n,onSubmitSuccess:m=>{h(!1),t.onSubmitSuccess&&t.onSubmitSuccess(m)},onSubmitError:m=>{t.onSubmitError&&t.onSubmitError(m)},onFormSubmitted:()=>{t.onFormSubmitted&&t.onFormSubmitted()},open:f,__self:void 0,__source:{fileName:Bmn,lineNumber:67}}),a)};return u}}),Wmn="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/screenshot/components/CropCorner.tsx";function Umn({h:t}){return function({top:n,left:i,corner:r,onGrabButton:o}){return t("button",{class:`editor__crop-corner editor__crop-corner--${r} `,style:{top:n,left:i},onMouseDown:s=>{s.preventDefault(),o(s,r)},onClick:s=>{s.preventDefault()},__self:this,__source:{fileName:Wmn,lineNumber:22}})}}function Kmn(t){const e=Ra.createElement("style"),n="#1A141F",i="#302735";return e.textContent=`
.editor {
  padding: 10px;
  padding-top: 65px;
  padding-bottom: 65px;
  flex-grow: 1;

  background-color: ${n};
  background-image: repeating-linear-gradient(
      -145deg,
      transparent,
      transparent 8px,
      ${n} 8px,
      ${n} 11px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 15px,
      ${i} 15px,
      ${i} 16px
    );
}

.editor__canvas-container {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.editor__canvas-container canvas {
  object-fit: contain;
  position: relative;
}

.editor__crop-btn-group {
  padding: 8px;
  gap: 8px;
  border-radius: var(--menu-border-radius, 6px);
  background: var(--button-primary-background, var(--background));
  width: 175px;
  position: absolute;
}

.editor__crop-corner {
  width: 30px;
  height: 30px;
  position: absolute;
  background: none;
  border: 3px solid #ffffff;
}

.editor__crop-corner--top-left {
  cursor: nwse-resize;
  border-right: none;
  border-bottom: none;
}
.editor__crop-corner--top-right {
  cursor: nesw-resize;
  border-left: none;
  border-bottom: none;
}
.editor__crop-corner--bottom-left {
  cursor: nesw-resize;
  border-right: none;
  border-top: none;
}
.editor__crop-corner--bottom-right {
  cursor: nwse-resize;
  border-left: none;
  border-top: none;
}
`,t&&e.setAttribute("nonce",t),e}function qmn({hooks:t}){return function({onBeforeScreenshot:n,onScreenshot:i,onAfterScreenshot:r,onError:o}){t.useEffect(()=>{(async()=>{n();const a=await I7.mediaDevices.getDisplayMedia({video:{width:Ix.innerWidth*Ix.devicePixelRatio,height:Ix.innerHeight*Ix.devicePixelRatio},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),l=Ra.createElement("video");await new Promise((c,u)=>{l.srcObject=a,l.onloadedmetadata=()=>{i(l),a.getTracks().forEach(d=>d.stop()),c()},l.play().catch(u)}),r()})().catch(o)},[])}}const Ib="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx",A7=30,E1=3,kN=A7+E1,Zm=Ix.devicePixelRatio,fV=t=>({x:Math.min(t.startX,t.endX),y:Math.min(t.startY,t.endY),width:Math.abs(t.startX-t.endX),height:Math.abs(t.startY-t.endY)}),o_e=t=>{const e=t.clientHeight,n=t.clientWidth,i=t.width/t.height;let r=e*i,o=e;r>n&&(r=n,o=n/i);const s=(n-r)/2,a=(e-o)/2;return{startX:s,startY:a,endX:r+s,endY:o+a}};function Gmn({h:t,hooks:e,imageBuffer:n,dialog:i,options:r}){const o=qmn({hooks:e});return function({onError:a}){const l=e.useMemo(()=>({__html:Kmn(r.styleNonce).innerText}),[]),c=Umn({h:t}),u=e.useRef(null),d=e.useRef(null),h=e.useRef(null),[f,m]=e.useState({startX:0,startY:0,endX:0,endY:0}),[p,g]=e.useState(!1),[y,_]=e.useState(!1);e.useEffect(()=>{Ix.addEventListener("resize",w,!1)},[]);function w(){const M=h.current,T=fV(o_e(n));if(M){M.width=T.width*Zm,M.height=T.height*Zm,M.style.width=`${T.width}px`,M.style.height=`${T.height}px`;const R=M.getContext("2d");R&&R.scale(Zm,Zm)}const A=d.current;A&&(A.style.width=`${T.width}px`,A.style.height=`${T.height}px`),m({startX:0,startY:0,endX:T.width,endY:T.height})}e.useEffect(()=>{const M=h.current;if(!M)return;const T=M.getContext("2d");if(!T)return;const A=fV(o_e(n)),R=fV(f);T.clearRect(0,0,A.width,A.height),T.fillStyle="rgba(0, 0, 0, 0.5)",T.fillRect(0,0,A.width,A.height),T.clearRect(R.x,R.y,R.width,R.height),T.strokeStyle="#ffffff",T.lineWidth=3,T.strokeRect(R.x+1,R.y+1,R.width-2,R.height-2),T.strokeStyle="#000000",T.lineWidth=1,T.strokeRect(R.x+3,R.y+3,R.width-6,R.height-6)},[f]);function C(M,T){g(!1),_(!0);const A=N(T),R=()=>{Ra.removeEventListener("mousemove",A),Ra.removeEventListener("mouseup",R),g(!0),_(!1)};Ra.addEventListener("mouseup",R),Ra.addEventListener("mousemove",A)}const N=e.useCallback(M=>function(T){if(!h.current)return;const A=h.current,R=A.getBoundingClientRect(),P=T.clientX-R.x,O=T.clientY-R.y;switch(M){case"top-left":m(V=>({...V,startX:Math.min(Math.max(0,P),V.endX-kN),startY:Math.min(Math.max(0,O),V.endY-kN)}));break;case"top-right":m(V=>({...V,endX:Math.max(Math.min(P,A.width/Zm),V.startX+kN),startY:Math.min(Math.max(0,O),V.endY-kN)}));break;case"bottom-left":m(V=>({...V,startX:Math.min(Math.max(0,P),V.endX-kN),endY:Math.max(Math.min(O,A.height/Zm),V.startY+kN)}));break;case"bottom-right":m(V=>({...V,endX:Math.max(Math.min(P,A.width/Zm),V.startX+kN),endY:Math.max(Math.min(O,A.height/Zm),V.startY+kN)}));break}},[]),E=e.useRef({initialX:0,initialY:0});function D(M){if(y)return;E.current={initialX:M.clientX,initialY:M.clientY};const T=R=>{const P=h.current;if(!P)return;const O=R.clientX-E.current.initialX,V=R.clientY-E.current.initialY;m(F=>{const $=Math.max(0,Math.min(F.startX+O,P.width/Zm-(F.endX-F.startX))),B=Math.max(0,Math.min(F.startY+V,P.height/Zm-(F.endY-F.startY))),z=$+(F.endX-F.startX),H=B+(F.endY-F.startY);return E.current.initialX=R.clientX,E.current.initialY=R.clientY,{startX:$,startY:B,endX:z,endY:H}})},A=()=>{Ra.removeEventListener("mousemove",T),Ra.removeEventListener("mouseup",A)};Ra.addEventListener("mousemove",T),Ra.addEventListener("mouseup",A)}function k(){const M=Ra.createElement("canvas"),T=fV(o_e(n)),A=fV(f);M.width=A.width*Zm,M.height=A.height*Zm;const R=M.getContext("2d");R&&n&&R.drawImage(n,A.x/T.width*n.width,A.y/T.height*n.height,A.width/T.width*n.width,A.height/T.height*n.height,0,0,M.width,M.height);const P=n.getContext("2d");P&&(P.clearRect(0,0,n.width,n.height),n.width=M.width,n.height=M.height,n.style.width=`${A.width}px`,n.style.height=`${A.height}px`,P.drawImage(M,0,0),w())}return o({onBeforeScreenshot:e.useCallback(()=>{i.el.style.display="none"},[]),onScreenshot:e.useCallback(M=>{const T=n.getContext("2d");if(!T)throw new Error("Could not get canvas context");n.width=M.videoWidth,n.height=M.videoHeight,n.style.width="100%",n.style.height="100%",T.drawImage(M,0,0)},[n]),onAfterScreenshot:e.useCallback(()=>{i.el.style.display="block";const M=u.current;M&&M.appendChild(n),w()},[]),onError:e.useCallback(M=>{i.el.style.display="block",a(M)},[])}),t("div",{class:"editor",__self:this,__source:{fileName:Ib,lineNumber:315}},t("style",{nonce:r.styleNonce,dangerouslySetInnerHTML:l,__self:this,__source:{fileName:Ib,lineNumber:316}}),t("div",{class:"editor__canvas-container",ref:u,__self:this,__source:{fileName:Ib,lineNumber:317}},t("div",{class:"editor__crop-container",style:{position:"absolute",zIndex:1},ref:d,__self:this,__source:{fileName:Ib,lineNumber:318}},t("canvas",{onMouseDown:D,style:{position:"absolute",cursor:p?"move":"auto"},ref:h,__self:this,__source:{fileName:Ib,lineNumber:319}}),t(c,{left:f.startX-E1,top:f.startY-E1,onGrabButton:C,corner:"top-left",__self:this,__source:{fileName:Ib,lineNumber:324}}),t(c,{left:f.endX-A7+E1,top:f.startY-E1,onGrabButton:C,corner:"top-right",__self:this,__source:{fileName:Ib,lineNumber:330}}),t(c,{left:f.startX-E1,top:f.endY-A7+E1,onGrabButton:C,corner:"bottom-left",__self:this,__source:{fileName:Ib,lineNumber:336}}),t(c,{left:f.endX-A7+E1,top:f.endY-A7+E1,onGrabButton:C,corner:"bottom-right",__self:this,__source:{fileName:Ib,lineNumber:342}}),t("div",{style:{left:Math.max(0,f.endX-191),top:Math.max(0,f.endY+8),display:p?"flex":"none"},class:"editor__crop-btn-group",__self:this,__source:{fileName:Ib,lineNumber:348}},t("button",{onClick:M=>{M.preventDefault(),h.current&&m({startX:0,startY:0,endX:h.current.width/Zm,endY:h.current.height/Zm}),g(!1)},class:"btn btn--default",__self:this,__source:{fileName:Ib,lineNumber:356}},r.cancelButtonLabel),t("button",{onClick:M=>{M.preventDefault(),k(),g(!1)},class:"btn btn--primary",__self:this,__source:{fileName:Ib,lineNumber:373}},r.confirmButtonLabel)))))}}const Ymn=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:t,hooks:e,dialog:n,options:i})=>{const r=Ra.createElement("canvas");return{input:Gmn({h:t,hooks:e,imageBuffer:r,dialog:n,options:i}),value:async()=>{const o=await new Promise(s=>{r.toBlob(s,"image/png")});if(o)return{data:new Uint8Array(await o.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}),Xmn=cmn({lazyLoadIntegration:lun,getModalIntegration:()=>Hmn,getScreenshotIntegration:()=>Ymn}),BZe=new WeakMap,s_e=new Map,nEe={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function Zmn(t,e){const{traceFetch:n,traceXHR:i,shouldCreateSpanForRequest:r,enableHTTPTimings:o,tracePropagationTargets:s}={traceFetch:nEe.traceFetch,traceXHR:nEe.traceXHR,...e},a=typeof r=="function"?r:u=>!0,l=u=>tpn(u,s),c={};n&&(t.addEventProcessor(u=>(u.type==="transaction"&&u.spans&&u.spans.forEach(d=>{if(d.op==="http.client"){const h=s_e.get(d.span_id);h&&(d.timestamp=h/1e3,s_e.delete(d.span_id))}}),u)),uon(u=>{if(u.response){const d=BZe.get(u.response);d&&u.endTimestamp&&s_e.set(d,u.endTimestamp)}}),f_t(u=>{const d=$an(u,a,l,c);if(u.response&&u.fetchData.__span&&BZe.set(u.response,u.fetchData.__span),d){const h=wwt(u.fetchData.url),f=h?GT(h).host:void 0;d.setAttributes({"http.url":h,"server.address":f})}o&&d&&zZe(d)})),i&&vxt(u=>{const d=npn(u,a,l,c);o&&d&&zZe(d)})}function Qmn(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function zZe(t){const{url:e}=Gs(t).data||{};if(!e||typeof e!="string")return;const n=fj("resource",({entries:i})=>{i.forEach(r=>{Qmn(r)&&r.name.endsWith(e)&&(epn(r).forEach(s=>t.setAttribute(...s)),setTimeout(n))})})}function Jmn(t){let e="unknown",n="unknown",i="";for(const r of t){if(r==="/"){[e,n]=t.split("/");break}if(!isNaN(Number(r))){e=i==="h"?"http":i,n=t.split(i)[1];break}i+=r}return i===t&&(e=i),{name:e,version:n}}function A_(t=0){return((Dm||performance.timeOrigin)+t)/1e3}function epn(t){const{name:e,version:n}=Jmn(t.nextHopProtocol),i=[];return i.push(["network.protocol.version",n],["network.protocol.name",e]),Dm?[...i,["http.request.redirect_start",A_(t.redirectStart)],["http.request.fetch_start",A_(t.fetchStart)],["http.request.domain_lookup_start",A_(t.domainLookupStart)],["http.request.domain_lookup_end",A_(t.domainLookupEnd)],["http.request.connect_start",A_(t.connectStart)],["http.request.secure_connection_start",A_(t.secureConnectionStart)],["http.request.connection_end",A_(t.connectEnd)],["http.request.request_start",A_(t.requestStart)],["http.request.response_start",A_(t.responseStart)],["http.request.response_end",A_(t.responseEnd)]]:i}function tpn(t,e){const n=vr.location&&vr.location.href;if(n){let i,r;try{i=new URL(t,n),r=new URL(n).origin}catch{return!1}const o=i.origin===r;return e?cD(i.toString(),e)||o&&cD(i.pathname,e):o}else{const i=!!t.match(/^\/(?!\/)/);return e?cD(t,e):i}}function npn(t,e,n,i){const r=t.xhr,o=r&&r[NT];if(!r||r.__sentry_own_request__||!o)return;const s=QC()&&e(o.url);if(t.endTimestamp&&s){const h=r.__sentry_xhr_span_id__;if(!h)return;const f=i[h];f&&o.status_code!==void 0&&(L_t(f,o.status_code),f.end(),delete i[h]);return}const a=wwt(o.url),l=a?GT(a).host:void 0,c=!!Wh(),u=s&&c?$k({name:`${o.method} ${o.url}`,attributes:{type:"xhr","http.method":o.method,"http.url":a,url:o.url,"server.address":l,[bd]:"auto.http.browser",[WD]:"http.client"}}):new MF;r.__sentry_xhr_span_id__=u.spanContext().spanId,i[r.__sentry_xhr_span_id__]=u;const d=Bo();return r.setRequestHeader&&n(o.url)&&d&&ipn(r,d,QC()&&c?u:void 0),u}function ipn(t,e,n){const i=ka(),r=Om(),{traceId:o,spanId:s,sampled:a,dsc:l}={...r.getPropagationContext(),...i.getPropagationContext()},c=n&&QC()?A_t(n):E3e(o,s,a),u=C_t(l||(n?Fk(n):pue(o,e)));rpn(t,c,u)}function rpn(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader(ENe,n)}catch{}}function wwt(t){try{return new URL(t,vr.location.origin).href}catch{return}}function opn(){vr&&vr.document?vr.document.addEventListener("visibilitychange",()=>{const t=Wh();if(!t)return;const e=Mh(t);if(vr.document.hidden&&e){const n="cancelled",{op:i,status:r}=Gs(e);Sp&&Zn.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${i}`),r||e.setStatus({code:Od,message:n}),e.setAttribute("sentry.cancellation_reason","document.hidden"),e.end()}}):Sp&&Zn.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const spn="BrowserTracing",apn={...nee,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...nEe},Cwt=(t={})=>{dsn();const{enableInp:e,enableLongTask:n,enableLongAnimationFrame:i,_experiments:{enableInteractions:r,enableStandaloneClsSpans:o},beforeStartSpan:s,idleTimeout:a,finalTimeout:l,childSpanTimeout:c,markBackgroundSpan:u,traceFetch:d,traceXHR:h,shouldCreateSpanForRequest:f,enableHTTPTimings:m,instrumentPageLoad:p,instrumentNavigation:g}={...apn,...t},y=Fln({recordClsStandaloneSpans:o||!1});e&&lcn(),i&&ms.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?Vln():n&&$ln(),r&&Bln();const _={name:void 0,source:void 0};function w(C,N){const E=N.op==="pageload",D=s?s(N):N,k=D.attributes||{};N.name!==D.name&&(k[Lx]="custom",D.attributes=k),_.name=D.name,_.source=k[Lx];const M=z_t(D,{idleTimeout:a,finalTimeout:l,childSpanTimeout:c,disableAutoFinish:E,beforeSpanEnd:A=>{y(),Kln(A,{recordClsOnPageloadSpan:!o})}});function T(){["interactive","complete"].includes(vr.document.readyState)&&C.emit("idleSpanEnableAutoFinish",M)}return E&&vr.document&&(vr.document.addEventListener("readystatechange",()=>{T()}),T()),M}return{name:spn,afterAllSetup(C){let N,E=vr.location&&vr.location.href;C.on("startNavigationSpan",D=>{Bo()===C&&(N&&!Gs(N).timestamp&&(Sp&&Zn.log(`[Tracing] Finishing current root span with op: ${Gs(N).op}`),N.end()),N=w(C,{op:"navigation",...D}))}),C.on("startPageLoadSpan",(D,k={})=>{if(Bo()!==C)return;N&&!Gs(N).timestamp&&(Sp&&Zn.log(`[Tracing] Finishing current root span with op: ${Gs(N).op}`),N.end());const M=k.sentryTrace||HZe("sentry-trace"),T=k.baggage||HZe("baggage"),A=Aon(M,T);ka().setPropagationContext(A),N=w(C,{op:"pageload",...D})}),C.on("spanEnd",D=>{const k=Gs(D).op;if(D!==Mh(D)||k!=="navigation"&&k!=="pageload")return;const M=ka(),T=M.getPropagationContext();M.setPropagationContext({...T,sampled:T.sampled!==void 0?T.sampled:NA(D),dsc:T.dsc||Fk(D)})}),vr.location&&(p&&Swt(C,{name:vr.location.pathname,startTime:Dm?Dm/1e3:void 0,attributes:{[Lx]:"url",[bd]:"auto.pageload.browser"}}),g&&bue(({to:D,from:k})=>{if(k===void 0&&E&&E.indexOf(D)!==-1){E=void 0;return}k!==D&&(E=void 0,lpn(C,{name:vr.location.pathname,attributes:{[Lx]:"url",[bd]:"auto.navigation.browser"}}))})),u&&opn(),r&&cpn(a,l,c,_),e&&ucn(),Zmn(C,{traceFetch:d,traceXHR:h,tracePropagationTargets:C.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:f,enableHTTPTimings:m})}}};function Swt(t,e,n){t.emit("startPageLoadSpan",e,n),ka().setTransactionName(e.name);const i=Wh();return(i&&Gs(i).op)==="pageload"?i:void 0}function lpn(t,e){Om().setPropagationContext(ene()),ka().setPropagationContext(ene()),t.emit("startNavigationSpan",e),ka().setTransactionName(e.name);const n=Wh();return(n&&Gs(n).op)==="navigation"?n:void 0}function HZe(t){const e=Grn(`meta[name=${t}]`);return e?e.getAttribute("content"):void 0}function cpn(t,e,n,i){let r;const o=()=>{const s="ui.action.click",a=Wh(),l=a&&Mh(a);if(l){const c=Gs(l).op;if(["navigation","pageload"].includes(c)){Sp&&Zn.warn(`[Tracing] Did not create ${s} span because a pageload or navigation span is in progress.`);return}}if(r&&(r.setAttribute(LNe,"interactionInterrupted"),r.end(),r=void 0),!i.name){Sp&&Zn.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`);return}r=z_t({name:i.name,op:s,attributes:{[Lx]:i.source||"url"}},{idleTimeout:t,finalTimeout:e,childSpanTimeout:n})};vr.document&&addEventListener("click",o,{once:!1,capture:!0})}function upn(t){const e={...t};return Q_t(e,"react"),U_t("react",{version:b.version}),oun(e)}function dpn(t){const e=t.match(/^([^.]+)/);return e!==null&&parseInt(e[0])>=17}function hpn(t,e){const n=new WeakSet;function i(r,o){if(!n.has(r)){if(r.cause)return n.add(r),i(r.cause,o);r.cause=o}}i(t,e)}function fpn(t,{componentStack:e},n){if(dpn(b.version)&&lue(t)&&e){const i=new Error(t.message);i.name=`React ErrorBoundary ${t.name}`,i.stack=e,hpn(t,i)}return rK(t,{...n,captureContext:{contexts:{react:{componentStack:e}}}})}var Nwt={exports:{}},Ia={};/** @license React v16.13.1
 * react-is.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,r=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,f=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,p=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,y=t?Symbol.for("react.responder"):60118,_=t?Symbol.for("react.scope"):60119;function w(Q){return typeof Q=="string"||typeof Q=="function"||Q===i||Q===c||Q===o||Q===r||Q===d||Q===h||typeof Q=="object"&&Q!==null&&(Q.$$typeof===m||Q.$$typeof===f||Q.$$typeof===s||Q.$$typeof===a||Q.$$typeof===u||Q.$$typeof===g||Q.$$typeof===y||Q.$$typeof===_||Q.$$typeof===p)}function C(Q){if(typeof Q=="object"&&Q!==null){var be=Q.$$typeof;switch(be){case e:var le=Q.type;switch(le){case l:case c:case i:case o:case r:case d:return le;default:var Ne=le&&le.$$typeof;switch(Ne){case a:case u:case m:case f:case s:return Ne;default:return be}}case n:return be}}}var N=l,E=c,D=a,k=s,M=e,T=u,A=i,R=m,P=f,O=n,V=o,F=r,$=d,B=!1;function z(Q){return B||(B=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),H(Q)||C(Q)===l}function H(Q){return C(Q)===c}function K(Q){return C(Q)===a}function q(Q){return C(Q)===s}function U(Q){return typeof Q=="object"&&Q!==null&&Q.$$typeof===e}function Y(Q){return C(Q)===u}function J(Q){return C(Q)===i}function ae(Q){return C(Q)===m}function se(Q){return C(Q)===f}function oe(Q){return C(Q)===n}function fe(Q){return C(Q)===o}function de(Q){return C(Q)===r}function ie(Q){return C(Q)===d}Ia.AsyncMode=N,Ia.ConcurrentMode=E,Ia.ContextConsumer=D,Ia.ContextProvider=k,Ia.Element=M,Ia.ForwardRef=T,Ia.Fragment=A,Ia.Lazy=R,Ia.Memo=P,Ia.Portal=O,Ia.Profiler=V,Ia.StrictMode=F,Ia.Suspense=$,Ia.isAsyncMode=z,Ia.isConcurrentMode=H,Ia.isContextConsumer=K,Ia.isContextProvider=q,Ia.isElement=U,Ia.isForwardRef=Y,Ia.isFragment=J,Ia.isLazy=ae,Ia.isMemo=se,Ia.isPortal=oe,Ia.isProfiler=fe,Ia.isStrictMode=de,Ia.isSuspense=ie,Ia.isValidElementType=w,Ia.typeOf=C})();Nwt.exports=Ia;var rje=Nwt.exports,oje=rje,mpn={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ppn={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},gpn={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ewt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},sje={};sje[oje.ForwardRef]=gpn;sje[oje.Memo]=Ewt;function WZe(t){return oje.isMemo(t)?Ewt:sje[t.$$typeof]||mpn}var bpn=Object.defineProperty,vpn=Object.getOwnPropertyNames,UZe=Object.getOwnPropertySymbols,ypn=Object.getOwnPropertyDescriptor,_pn=Object.getPrototypeOf,KZe=Object.prototype;function Dwt(t,e,n){if(typeof e!="string"){if(KZe){var i=_pn(e);i&&i!==KZe&&Dwt(t,i,n)}var r=vpn(e);UZe&&(r=r.concat(UZe(e)));for(var o=WZe(t),s=WZe(e),a=0;a<r.length;++a){var l=r[a];if(!ppn[l]&&!(n&&n[l])&&!(s&&s[l])&&!(o&&o[l])){var c=ypn(e,l);try{bpn(t,l,c)}catch{}}}}return t}var xpn=Dwt;const qZe=ao(xpn),wpn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,GZe={componentStack:null,error:null,eventId:null};let kwt=class Mwt extends b.Component{constructor(e){super(e),Mwt.prototype.__init.call(this),this.state=GZe,this._openFallbackReportDialog=!0;const n=Bo();n&&e.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=n.on("afterSendEvent",i=>{!i.type&&this._lastEventId&&i.event_id===this._lastEventId&&BNe({...e.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(e,n){const{componentStack:i}=n,r=i??void 0,{beforeCapture:o,onError:s,showDialog:a,dialogOptions:l}=this.props;hue(c=>{o&&o(c,e,r);const u=fpn(e,n,{mechanism:{handled:!!this.props.fallback}});s&&s(e,r,u),a&&(this._lastEventId=u,this._openFallbackReportDialog&&BNe({...l,eventId:u})),this.setState({error:e,componentStack:i,eventId:u})})}componentDidMount(){const{onMount:e}=this.props;e&&e()}componentWillUnmount(){const{error:e,componentStack:n,eventId:i}=this.state,{onUnmount:r}=this.props;r&&r(e,n,i),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}__init(){this.resetErrorBoundary=()=>{const{onReset:e}=this.props,{error:n,componentStack:i,eventId:r}=this.state;e&&e(n,i,r),this.setState(GZe)}}render(){const{fallback:e,children:n}=this.props,i=this.state;if(i.error){let r;return typeof e=="function"?r=b.createElement(e,{error:i.error,componentStack:i.componentStack,resetError:this.resetErrorBoundary,eventId:i.eventId}):r=e,b.isValidElement(r)?r:(e&&wpn&&Zn.warn("fallback did not produce a valid ReactElement"),null)}return typeof n=="function"?n():n}};const Cpn=new WeakSet;function Spn(t){const e=Cwt({...t,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:n,useLocation:i,useNavigationType:r,createRoutesFromChildren:o,matchRoutes:s,stripBasename:a,instrumentPageLoad:l=!0,instrumentNavigation:c=!0}=t;return{...e,setup(){},afterAllSetup(u){e.afterAllSetup(u);const d=vr&&vr.location&&vr.location.pathname;l&&d&&Swt(u,{name:d,attributes:{[Lx]:"url",[WD]:"pageload",[bd]:"auto.pageload.react.reactrouter_v6"}}),c&&Cpn.add(u)}}}var Lwt={exports:{}},wg={},Twt={exports:{}},Iwt={};(function(t){/**
 * @license React
 * scheduler.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=!1,n=!1,i=5;function r(Xe,it){var ut=Xe.length;Xe.push(it),a(Xe,it,ut)}function o(Xe){return Xe.length===0?null:Xe[0]}function s(Xe){if(Xe.length===0)return null;var it=Xe[0],ut=Xe.pop();return ut!==it&&(Xe[0]=ut,l(Xe,ut,0)),it}function a(Xe,it,ut){for(var Ge=ut;Ge>0;){var Ee=Ge-1>>>1,Se=Xe[Ee];if(c(Se,it)>0)Xe[Ee]=it,Xe[Ge]=Se,Ge=Ee;else return}}function l(Xe,it,ut){for(var Ge=ut,Ee=Xe.length,Se=Ee>>>1;Ge<Se;){var je=(Ge+1)*2-1,nt=Xe[je],rt=je+1,St=Xe[rt];if(c(nt,it)<0)rt<Ee&&c(St,nt)<0?(Xe[Ge]=St,Xe[rt]=it,Ge=rt):(Xe[Ge]=nt,Xe[je]=it,Ge=je);else if(rt<Ee&&c(St,it)<0)Xe[Ge]=St,Xe[rt]=it,Ge=rt;else return}}function c(Xe,it){var ut=Xe.sortIndex-it.sortIndex;return ut!==0?ut:Xe.id-it.id}var u=1,d=2,h=3,f=4,m=5;function p(Xe,it){}var g=typeof performance=="object"&&typeof performance.now=="function";if(g){var y=performance;t.unstable_now=function(){return y.now()}}else{var _=Date,w=_.now();t.unstable_now=function(){return _.now()-w}}var C=1073741823,N=-1,E=250,D=5e3,k=1e4,M=C,T=[],A=[],R=1,P=null,O=h,V=!1,F=!1,$=!1,B=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function K(Xe){for(var it=o(A);it!==null;){if(it.callback===null)s(A);else if(it.startTime<=Xe)s(A),it.sortIndex=it.expirationTime,r(T,it);else return;it=o(A)}}function q(Xe){if($=!1,K(Xe),!F)if(o(T)!==null)F=!0,ue(U);else{var it=o(A);it!==null&&Ce(q,it.startTime-Xe)}}function U(Xe,it){F=!1,$&&($=!1,ze()),V=!0;var ut=O;try{var Ge;if(!n)return Y(Xe,it)}finally{P=null,O=ut,V=!1}}function Y(Xe,it){var ut=it;for(K(ut),P=o(T);P!==null&&!e&&!(P.expirationTime>ut&&(!Xe||Pe()));){var Ge=P.callback;if(typeof Ge=="function"){P.callback=null,O=P.priorityLevel;var Ee=P.expirationTime<=ut,Se=Ge(Ee);ut=t.unstable_now(),typeof Se=="function"?P.callback=Se:P===o(T)&&s(T),K(ut)}else s(T);P=o(T)}if(P!==null)return!0;var je=o(A);return je!==null&&Ce(q,je.startTime-ut),!1}function J(Xe,it){switch(Xe){case u:case d:case h:case f:case m:break;default:Xe=h}var ut=O;O=Xe;try{return it()}finally{O=ut}}function ae(Xe){var it;switch(O){case u:case d:case h:it=h;break;default:it=O;break}var ut=O;O=it;try{return Xe()}finally{O=ut}}function se(Xe){var it=O;return function(){var ut=O;O=it;try{return Xe.apply(this,arguments)}finally{O=ut}}}function oe(Xe,it,ut){var Ge=t.unstable_now(),Ee;if(typeof ut=="object"&&ut!==null){var Se=ut.delay;typeof Se=="number"&&Se>0?Ee=Ge+Se:Ee=Ge}else Ee=Ge;var je;switch(Xe){case u:je=N;break;case d:je=E;break;case m:je=M;break;case f:je=k;break;case h:default:je=D;break}var nt=Ee+je,rt={id:R++,callback:it,priorityLevel:Xe,startTime:Ee,expirationTime:nt,sortIndex:-1};return Ee>Ge?(rt.sortIndex=Ee,r(A,rt),o(T)===null&&rt===o(A)&&($?ze():$=!0,Ce(q,Ee-Ge))):(rt.sortIndex=nt,r(T,rt),!F&&!V&&(F=!0,ue(U))),rt}function fe(){}function de(){!F&&!V&&(F=!0,ue(U))}function ie(){return o(T)}function Q(Xe){Xe.callback=null}function be(){return O}var le=!1,Ne=null,Le=-1,Te=i,De=-1;function Pe(){var Xe=t.unstable_now()-De;return!(Xe<Te)}function ge(){}function he(Xe){if(Xe<0||Xe>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}Xe>0?Te=Math.floor(1e3/Xe):Te=i}var me=function(){if(Ne!==null){var Xe=t.unstable_now();De=Xe;var it=!0,ut=!0;try{ut=Ne(it,Xe)}finally{ut?X():(le=!1,Ne=null)}}else le=!1},X;if(typeof H=="function")X=function(){H(me)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,we=re.port2;re.port1.onmessage=me,X=function(){we.postMessage(null)}}else X=function(){B(me,0)};function ue(Xe){Ne=Xe,le||(le=!0,X())}function Ce(Xe,it){Le=B(function(){Xe(t.unstable_now())},it)}function ze(){z(Le),Le=-1}var Ye=ge,Ke=null;t.unstable_IdlePriority=m,t.unstable_ImmediatePriority=u,t.unstable_LowPriority=f,t.unstable_NormalPriority=h,t.unstable_Profiling=Ke,t.unstable_UserBlockingPriority=d,t.unstable_cancelCallback=Q,t.unstable_continueExecution=de,t.unstable_forceFrameRate=he,t.unstable_getCurrentPriorityLevel=be,t.unstable_getFirstCallbackNode=ie,t.unstable_next=ae,t.unstable_pauseExecution=fe,t.unstable_requestPaint=Ye,t.unstable_runWithPriority=J,t.unstable_scheduleCallback=oe,t.unstable_shouldYield=Pe,t.unstable_wrapCallback=se,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(Iwt);Twt.exports=Iwt;var Npn=Twt.exports;/**
 * @license React
 * react-dom.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=b,e=Npn,n=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,i=!1;function r(x){i=x}function o(x){if(!i){for(var S=arguments.length,L=new Array(S>1?S-1:0),j=1;j<S;j++)L[j-1]=arguments[j];a("warn",x,L)}}function s(x){if(!i){for(var S=arguments.length,L=new Array(S>1?S-1:0),j=1;j<S;j++)L[j-1]=arguments[j];a("error",x,L)}}function a(x,S,L){{var j=n.ReactDebugCurrentFrame,W=j.getStackAddendum();W!==""&&(S+="%s",L=L.concat([W]));var G=L.map(function(te){return String(te)});G.unshift("Warning: "+S),Function.prototype.apply.call(console[x],console,G)}}var l=0,c=1,u=2,d=3,h=4,f=5,m=6,p=7,g=8,y=9,_=10,w=11,C=12,N=13,E=14,D=15,k=16,M=17,T=18,A=19,R=21,P=22,O=23,V=24,F=25,$=!0,B=!1,z=!1,H=!1,K=!1,q=!0,U=!1,Y=!0,J=!0,ae=!0,se=!0,oe=new Set,fe={},de={};function ie(x,S){Q(x,S),Q(x+"Capture",S)}function Q(x,S){fe[x]&&s("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",x),fe[x]=S;{var L=x.toLowerCase();de[L]=x,x==="onDoubleClick"&&(de.ondblclick=x)}for(var j=0;j<S.length;j++)oe.add(S[j])}var be=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",le=Object.prototype.hasOwnProperty;function Ne(x){{var S=typeof Symbol=="function"&&Symbol.toStringTag,L=S&&x[Symbol.toStringTag]||x.constructor.name||"Object";return L}}function Le(x){try{return Te(x),!1}catch{return!0}}function Te(x){return""+x}function De(x,S){if(Le(x))return s("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",S,Ne(x)),Te(x)}function Pe(x){if(Le(x))return s("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ne(x)),Te(x)}function ge(x,S){if(Le(x))return s("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",S,Ne(x)),Te(x)}function he(x,S){if(Le(x))return s("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",S,Ne(x)),Te(x)}function me(x){if(Le(x))return s("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",Ne(x)),Te(x)}function X(x){if(Le(x))return s("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.",Ne(x)),Te(x)}var re=0,we=1,ue=2,Ce=3,ze=4,Ye=5,Ke=6,Xe=":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",it=Xe+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ut=new RegExp("^["+Xe+"]["+it+"]*$"),Ge={},Ee={};function Se(x){return le.call(Ee,x)?!0:le.call(Ge,x)?!1:ut.test(x)?(Ee[x]=!0,!0):(Ge[x]=!0,s("Invalid attribute name: `%s`",x),!1)}function je(x,S,L){return S!==null?S.type===re:L?!1:x.length>2&&(x[0]==="o"||x[0]==="O")&&(x[1]==="n"||x[1]==="N")}function nt(x,S,L,j){if(L!==null&&L.type===re)return!1;switch(typeof S){case"function":case"symbol":return!0;case"boolean":{if(j)return!1;if(L!==null)return!L.acceptsBooleans;var W=x.toLowerCase().slice(0,5);return W!=="data-"&&W!=="aria-"}default:return!1}}function rt(x,S,L,j){if(S===null||typeof S>"u"||nt(x,S,L,j))return!0;if(j)return!1;if(L!==null)switch(L.type){case Ce:return!S;case ze:return S===!1;case Ye:return isNaN(S);case Ke:return isNaN(S)||S<1}return!1}function St(x){return Nt.hasOwnProperty(x)?Nt[x]:null}function At(x,S,L,j,W,G,te){this.acceptsBooleans=S===ue||S===Ce||S===ze,this.attributeName=j,this.attributeNamespace=W,this.mustUseProperty=L,this.propertyName=x,this.type=S,this.sanitizeURL=G,this.removeEmptyString=te}var Nt={},vt=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];vt.forEach(function(x){Nt[x]=new At(x,re,!1,x,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(x){var S=x[0],L=x[1];Nt[S]=new At(S,we,!1,L,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(x){Nt[x]=new At(x,ue,!1,x.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(x){Nt[x]=new At(x,ue,!1,x,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(x){Nt[x]=new At(x,Ce,!1,x.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(x){Nt[x]=new At(x,Ce,!0,x,null,!1,!1)}),["capture","download"].forEach(function(x){Nt[x]=new At(x,ze,!1,x,null,!1,!1)}),["cols","rows","size","span"].forEach(function(x){Nt[x]=new At(x,Ke,!1,x,null,!1,!1)}),["rowSpan","start"].forEach(function(x){Nt[x]=new At(x,Ye,!1,x.toLowerCase(),null,!1,!1)});var $t=/[\-\:]([a-z])/g,ln=function(x){return x[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(x){var S=x.replace($t,ln);Nt[S]=new At(S,we,!1,x,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(x){var S=x.replace($t,ln);Nt[S]=new At(S,we,!1,x,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(x){var S=x.replace($t,ln);Nt[S]=new At(S,we,!1,x,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(x){Nt[x]=new At(x,we,!1,x.toLowerCase(),null,!1,!1)});var Jt="xlinkHref";Nt[Jt]=new At("xlinkHref",we,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(x){Nt[x]=new At(x,we,!1,x.toLowerCase(),null,!0,!0)});var en=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,Ft=!1;function dn(x){!Ft&&en.test(x)&&(Ft=!0,s("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(x)))}function Ze(x,S,L,j){if(j.mustUseProperty){var W=j.propertyName;return x[W]}else{De(L,S),j.sanitizeURL&&dn(""+L);var G=j.attributeName,te=null;if(j.type===ze){if(x.hasAttribute(G)){var pe=x.getAttribute(G);return pe===""?!0:rt(S,L,j,!1)?pe:pe===""+L?L:pe}}else if(x.hasAttribute(G)){if(rt(S,L,j,!1))return x.getAttribute(G);if(j.type===Ce)return L;te=x.getAttribute(G)}return rt(S,L,j,!1)?te===null?L:te:te===""+L?L:te}}function dt(x,S,L,j){{if(!Se(S))return;if(!x.hasAttribute(S))return L===void 0?void 0:null;var W=x.getAttribute(S);return De(L,S),W===""+L?L:W}}function at(x,S,L,j){var W=St(S);if(!je(S,W,j)){if(rt(S,L,W,j)&&(L=null),j||W===null){if(Se(S)){var G=S;L===null?x.removeAttribute(G):(De(L,S),x.setAttribute(G,""+L))}return}var te=W.mustUseProperty;if(te){var pe=W.propertyName;if(L===null){var ke=W.type;x[pe]=ke===Ce?!1:""}else x[pe]=L;return}var Ue=W.attributeName,et=W.attributeNamespace;if(L===null)x.removeAttribute(Ue);else{var kt=W.type,Dt;kt===Ce||kt===ze&&L===!0?Dt="":(De(L,Ue),Dt=""+L,W.sanitizeURL&&dn(Dt.toString())),et?x.setAttributeNS(et,Ue,Dt):x.setAttribute(Ue,Dt)}}}var mt=Symbol.for("react.element"),It=Symbol.for("react.portal"),Ve=Symbol.for("react.fragment"),bt=Symbol.for("react.strict_mode"),wt=Symbol.for("react.profiler"),$e=Symbol.for("react.provider"),We=Symbol.for("react.context"),tt=Symbol.for("react.forward_ref"),_t=Symbol.for("react.suspense"),ht=Symbol.for("react.suspense_list"),qe=Symbol.for("react.memo"),ft=Symbol.for("react.lazy"),Ct=Symbol.for("react.scope"),Pt=Symbol.for("react.debug_trace_mode"),an=Symbol.for("react.offscreen"),_n=Symbol.for("react.legacy_hidden"),on=Symbol.for("react.cache"),yn=Symbol.for("react.tracing_marker"),fi=Symbol.iterator,oi="@@iterator";function Qi(x){if(x===null||typeof x!="object")return null;var S=fi&&x[fi]||x[oi];return typeof S=="function"?S:null}var mi=Object.assign,Vr=0,_i,ur,si,Ii,Si,To,ts;function La(){}La.__reactDisabledLog=!0;function pc(){{if(Vr===0){_i=console.log,ur=console.info,si=console.warn,Ii=console.error,Si=console.group,To=console.groupCollapsed,ts=console.groupEnd;var x={configurable:!0,enumerable:!0,value:La,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}Vr++}}function gc(){{if(Vr--,Vr===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:mi({},x,{value:_i}),info:mi({},x,{value:ur}),warn:mi({},x,{value:si}),error:mi({},x,{value:Ii}),group:mi({},x,{value:Si}),groupCollapsed:mi({},x,{value:To}),groupEnd:mi({},x,{value:ts})})}Vr<0&&s("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ca=n.ReactCurrentDispatcher,Nr;function $i(x,S,L){{if(Nr===void 0)try{throw Error()}catch(W){var j=W.stack.trim().match(/\n( *(at )?)/);Nr=j&&j[1]||""}return`
`+Nr+x}}var us=!1,fr;{var Gi=typeof WeakMap=="function"?WeakMap:Map;fr=new Gi}function zn(x,S){if(!x||us)return"";{var L=fr.get(x);if(L!==void 0)return L}var j;us=!0;var W=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var G;G=ca.current,ca.current=null,pc();try{if(S){var te=function(){throw Error()};if(Object.defineProperty(te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(te,[])}catch(nn){j=nn}Reflect.construct(x,[],te)}else{try{te.call()}catch(nn){j=nn}x.call(te.prototype)}}else{try{throw Error()}catch(nn){j=nn}x()}}catch(nn){if(nn&&j&&typeof nn.stack=="string"){for(var pe=nn.stack.split(`
`),ke=j.stack.split(`
`),Ue=pe.length-1,et=ke.length-1;Ue>=1&&et>=0&&pe[Ue]!==ke[et];)et--;for(;Ue>=1&&et>=0;Ue--,et--)if(pe[Ue]!==ke[et]){if(Ue!==1||et!==1)do if(Ue--,et--,et<0||pe[Ue]!==ke[et]){var kt=`
`+pe[Ue].replace(" at new "," at ");return x.displayName&&kt.includes("<anonymous>")&&(kt=kt.replace("<anonymous>",x.displayName)),typeof x=="function"&&fr.set(x,kt),kt}while(Ue>=1&&et>=0);break}}}finally{us=!1,ca.current=G,gc(),Error.prepareStackTrace=W}var Dt=x?x.displayName||x.name:"",Zt=Dt?$i(Dt):"";return typeof x=="function"&&fr.set(x,Zt),Zt}function pi(x,S,L){return zn(x,!0)}function Tr(x,S,L){return zn(x,!1)}function vs(x){var S=x.prototype;return!!(S&&S.isReactComponent)}function ua(x,S,L){if(x==null)return"";if(typeof x=="function")return zn(x,vs(x));if(typeof x=="string")return $i(x);switch(x){case _t:return $i("Suspense");case ht:return $i("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case tt:return Tr(x.render);case qe:return ua(x.type,S,L);case ft:{var j=x,W=j._payload,G=j._init;try{return ua(G(W),S,L)}catch{}}}return""}function Al(x){switch(x._debugOwner&&x._debugOwner.type,x._debugSource,x.tag){case f:return $i(x.type);case k:return $i("Lazy");case N:return $i("Suspense");case A:return $i("SuspenseList");case l:case u:case D:return Tr(x.type);case w:return Tr(x.type.render);case c:return pi(x.type);default:return""}}function bc(x){try{var S="",L=x;do S+=Al(L),L=L.return;while(L);return S}catch(j){return`
Error generating stack: `+j.message+`
`+j.stack}}function vc(x,S,L){var j=x.displayName;if(j)return j;var W=S.displayName||S.name||"";return W!==""?L+"("+W+")":L}function Hn(x){return x.displayName||"Context"}function cn(x){if(x==null)return null;if(typeof x.tag=="number"&&s("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof x=="function")return x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case Ve:return"Fragment";case It:return"Portal";case wt:return"Profiler";case bt:return"StrictMode";case _t:return"Suspense";case ht:return"SuspenseList"}if(typeof x=="object")switch(x.$$typeof){case We:var S=x;return Hn(S)+".Consumer";case $e:var L=x;return Hn(L._context)+".Provider";case tt:return vc(x,x.render,"ForwardRef");case qe:var j=x.displayName||null;return j!==null?j:cn(x.type)||"Memo";case ft:{var W=x,G=W._payload,te=W._init;try{return cn(te(G))}catch{return null}}}return null}function Ui(x,S,L){var j=S.displayName||S.name||"";return x.displayName||(j!==""?L+"("+j+")":L)}function Pr(x){return x.displayName||"Context"}function bi(x){var S=x.tag,L=x.type;switch(S){case V:return"Cache";case y:var j=L;return Pr(j)+".Consumer";case _:var W=L;return Pr(W._context)+".Provider";case T:return"DehydratedFragment";case w:return Ui(L,L.render,"ForwardRef");case p:return"Fragment";case f:return L;case h:return"Portal";case d:return"Root";case m:return"Text";case k:return cn(L);case g:return L===bt?"StrictMode":"Mode";case P:return"Offscreen";case C:return"Profiler";case R:return"Scope";case N:return"Suspense";case A:return"SuspenseList";case F:return"TracingMarker";case c:case l:case M:case u:case E:case D:if(typeof L=="function")return L.displayName||L.name||null;if(typeof L=="string")return L;break}return null}var zu=n.ReactDebugCurrentFrame,Ms=null,Jl=!1;function Hu(){{if(Ms===null)return null;var x=Ms._debugOwner;if(x!==null&&typeof x<"u")return bi(x)}return null}function sg(){return Ms===null?"":bc(Ms)}function yc(){zu.getCurrentStack=null,Ms=null,Jl=!1}function nl(x){zu.getCurrentStack=x===null?null:sg,Ms=x,Jl=!1}function Vi(){return Ms}function tr(x){Jl=x}function Uo(x){return""+x}function Js(x){switch(typeof x){case"boolean":case"number":case"string":case"undefined":return x;case"object":return X(x),x;default:return""}}var vl={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function ty(x,S){vl[S.type]||S.onChange||S.onInput||S.readOnly||S.disabled||S.value==null||s("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),S.onChange||S.readOnly||S.disabled||S.checked==null||s("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function ny(x){var S=x.type,L=x.nodeName;return L&&L.toLowerCase()==="input"&&(S==="checkbox"||S==="radio")}function TM(x){return x._valueTracker}function ag(x){x._valueTracker=null}function FG(x){var S="";return x&&(ny(x)?S=x.checked?"true":"false":S=x.value),S}function $G(x){var S=ny(x)?"checked":"value",L=Object.getOwnPropertyDescriptor(x.constructor.prototype,S);X(x[S]);var j=""+x[S];if(!(x.hasOwnProperty(S)||typeof L>"u"||typeof L.get!="function"||typeof L.set!="function")){var W=L.get,G=L.set;Object.defineProperty(x,S,{configurable:!0,get:function(){return W.call(this)},set:function(pe){X(pe),j=""+pe,G.call(this,pe)}}),Object.defineProperty(x,S,{enumerable:L.enumerable});var te={getValue:function(){return j},setValue:function(pe){X(pe),j=""+pe},stopTracking:function(){ag(x),delete x[S]}};return te}}function Hw(x){TM(x)||(x._valueTracker=$G(x))}function ER(x){if(!x)return!1;var S=TM(x);if(!S)return!0;var L=S.getValue(),j=FG(x);return j!==L?(S.setValue(j),!0):!1}function iN(x){if(x=x||(typeof document<"u"?document:void 0),typeof x>"u")return null;try{return x.activeElement||x.body}catch{return x.body}}var DR=!1,VG=!1,BG=!1,zG=!1;function HG(x){var S=x.type==="checkbox"||x.type==="radio";return S?x.checked!=null:x.value!=null}function Ae(x,S){var L=x,j=S.checked,W=mi({},S,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:j??L._wrapperState.initialChecked});return W}function pt(x,S){ty("input",S),S.checked!==void 0&&S.defaultChecked!==void 0&&!VG&&(s("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",Hu()||"A component",S.type),VG=!0),S.value!==void 0&&S.defaultValue!==void 0&&!DR&&(s("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",Hu()||"A component",S.type),DR=!0);var L=x,j=S.defaultValue==null?"":S.defaultValue;L._wrapperState={initialChecked:S.checked!=null?S.checked:S.defaultChecked,initialValue:Js(S.value!=null?S.value:j),controlled:HG(S)}}function tn(x,S){var L=x,j=S.checked;j!=null&&at(L,"checked",j,!1)}function pn(x,S){var L=x;{var j=HG(S);!L._wrapperState.controlled&&j&&!zG&&(s("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),zG=!0),L._wrapperState.controlled&&!j&&!BG&&(s("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),BG=!0)}tn(x,S);var W=Js(S.value),G=S.type;if(W!=null)G==="number"?(W===0&&L.value===""||L.value!=W)&&(L.value=Uo(W)):L.value!==Uo(W)&&(L.value=Uo(W));else if(G==="submit"||G==="reset"){L.removeAttribute("value");return}S.hasOwnProperty("value")?eo(L,S.type,W):S.hasOwnProperty("defaultValue")&&eo(L,S.type,Js(S.defaultValue)),S.checked==null&&S.defaultChecked!=null&&(L.defaultChecked=!!S.defaultChecked)}function ni(x,S,L){var j=x;if(S.hasOwnProperty("value")||S.hasOwnProperty("defaultValue")){var W=S.type,G=W==="submit"||W==="reset";if(G&&(S.value===void 0||S.value===null))return;var te=Uo(j._wrapperState.initialValue);L||te!==j.value&&(j.value=te),j.defaultValue=te}var pe=j.name;pe!==""&&(j.name=""),j.defaultChecked=!j.defaultChecked,j.defaultChecked=!!j._wrapperState.initialChecked,pe!==""&&(j.name=pe)}function Br(x,S){var L=x;pn(L,S),Ji(L,S)}function Ji(x,S){var L=S.name;if(S.type==="radio"&&L!=null){for(var j=x;j.parentNode;)j=j.parentNode;De(L,"name");for(var W=j.querySelectorAll("input[name="+JSON.stringify(""+L)+'][type="radio"]'),G=0;G<W.length;G++){var te=W[G];if(!(te===x||te.form!==x.form)){var pe=MY(te);if(!pe)throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");ER(te),pn(te,pe)}}}}function eo(x,S,L){(S!=="number"||iN(x.ownerDocument)!==x)&&(L==null?x.defaultValue=Uo(x._wrapperState.initialValue):x.defaultValue!==Uo(L)&&(x.defaultValue=Uo(L)))}var ns=!1,ba=!1,il=!1;function rl(x,S){S.value==null&&(typeof S.children=="object"&&S.children!==null?t.Children.forEach(S.children,function(L){L!=null&&(typeof L=="string"||typeof L=="number"||ba||(ba=!0,s("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}):S.dangerouslySetInnerHTML!=null&&(il||(il=!0,s("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")))),S.selected!=null&&!ns&&(s("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),ns=!0)}function Rl(x,S){S.value!=null&&x.setAttribute("value",Uo(Js(S.value)))}var _c=Array.isArray;function Ws(x){return _c(x)}var rN;rN=!1;function kR(){var x=Hu();return x?`

Check the render method of \``+x+"`.":""}var A$=["value","defaultValue"];function Hge(x){{ty("select",x);for(var S=0;S<A$.length;S++){var L=A$[S];if(x[L]!=null){var j=Ws(x[L]);x.multiple&&!j?s("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",L,kR()):!x.multiple&&j&&s("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",L,kR())}}}}function Ww(x,S,L,j){var W=x.options;if(S){for(var G=L,te={},pe=0;pe<G.length;pe++)te["$"+G[pe]]=!0;for(var ke=0;ke<W.length;ke++){var Ue=te.hasOwnProperty("$"+W[ke].value);W[ke].selected!==Ue&&(W[ke].selected=Ue),Ue&&j&&(W[ke].defaultSelected=!0)}}else{for(var et=Uo(Js(L)),kt=null,Dt=0;Dt<W.length;Dt++){if(W[Dt].value===et){W[Dt].selected=!0,j&&(W[Dt].defaultSelected=!0);return}kt===null&&!W[Dt].disabled&&(kt=W[Dt])}kt!==null&&(kt.selected=!0)}}function R$(x,S){return mi({},S,{value:void 0})}function P$(x,S){var L=x;Hge(S),L._wrapperState={wasMultiple:!!S.multiple},S.value!==void 0&&S.defaultValue!==void 0&&!rN&&(s("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),rN=!0)}function Wge(x,S){var L=x;L.multiple=!!S.multiple;var j=S.value;j!=null?Ww(L,!!S.multiple,j,!1):S.defaultValue!=null&&Ww(L,!!S.multiple,S.defaultValue,!0)}function _Yt(x,S){var L=x,j=L._wrapperState.wasMultiple;L._wrapperState.wasMultiple=!!S.multiple;var W=S.value;W!=null?Ww(L,!!S.multiple,W,!1):j!==!!S.multiple&&(S.defaultValue!=null?Ww(L,!!S.multiple,S.defaultValue,!0):Ww(L,!!S.multiple,S.multiple?[]:"",!1))}function xYt(x,S){var L=x,j=S.value;j!=null&&Ww(L,!!S.multiple,j,!1)}var eUe=!1;function Uge(x,S){var L=x;if(S.dangerouslySetInnerHTML!=null)throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var j=mi({},S,{value:void 0,defaultValue:void 0,children:Uo(L._wrapperState.initialValue)});return j}function tUe(x,S){var L=x;ty("textarea",S),S.value!==void 0&&S.defaultValue!==void 0&&!eUe&&(s("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",Hu()||"A component"),eUe=!0);var j=S.value;if(j==null){var W=S.children,G=S.defaultValue;if(W!=null){s("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(G!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Ws(W)){if(W.length>1)throw new Error("<textarea> can only have at most one child.");W=W[0]}G=W}}G==null&&(G=""),j=G}L._wrapperState={initialValue:Js(j)}}function nUe(x,S){var L=x,j=Js(S.value),W=Js(S.defaultValue);if(j!=null){var G=Uo(j);G!==L.value&&(L.value=G),S.defaultValue==null&&L.defaultValue!==G&&(L.defaultValue=G)}W!=null&&(L.defaultValue=Uo(W))}function iUe(x,S){var L=x,j=L.textContent;j===L._wrapperState.initialValue&&j!==""&&j!==null&&(L.value=j)}function wYt(x,S){nUe(x,S)}var Uw="http://www.w3.org/1999/xhtml",CYt="http://www.w3.org/1998/Math/MathML",Kge="http://www.w3.org/2000/svg";function qge(x){switch(x){case"svg":return Kge;case"math":return CYt;default:return Uw}}function Gge(x,S){return x==null||x===Uw?qge(S):x===Kge&&S==="foreignObject"?Uw:x}var SYt=function(x){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(S,L,j,W){MSApp.execUnsafeLocalFunction(function(){return x(S,L,j,W)})}:x},WG,rUe=SYt(function(x,S){if(x.namespaceURI===Kge&&!("innerHTML"in x)){WG=WG||document.createElement("div"),WG.innerHTML="<svg>"+S.valueOf().toString()+"</svg>";for(var L=WG.firstChild;x.firstChild;)x.removeChild(x.firstChild);for(;L.firstChild;)x.appendChild(L.firstChild);return}x.innerHTML=S}),Um=1,Kw=3,du=8,qw=9,Yge=11,UG=function(x,S){if(S){var L=x.firstChild;if(L&&L===x.lastChild&&L.nodeType===Kw){L.nodeValue=S;return}}x.textContent=S},NYt={animation:["animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction"],background:["backgroundAttachment","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize"],backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:["borderBottomColor","borderBottomStyle","borderBottomWidth","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRightColor","borderRightStyle","borderRightWidth","borderTopColor","borderTopStyle","borderTopWidth"],borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:["fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontWeight","lineHeight"],fontVariant:["fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition"],gap:["columnGap","rowGap"],grid:["gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:["maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPositionX","maskPositionY","maskRepeat","maskSize"],maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},O$={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function EYt(x,S){return x+S.charAt(0).toUpperCase()+S.substring(1)}var DYt=["Webkit","ms","Moz","O"];Object.keys(O$).forEach(function(x){DYt.forEach(function(S){O$[EYt(S,x)]=O$[x]})});function Xge(x,S,L){var j=S==null||typeof S=="boolean"||S==="";return j?"":!L&&typeof S=="number"&&S!==0&&!(O$.hasOwnProperty(x)&&O$[x])?S+"px":(he(S,x),(""+S).trim())}var kYt=/([A-Z])/g,MYt=/^ms-/;function LYt(x){return x.replace(kYt,"-$1").toLowerCase().replace(MYt,"-ms-")}var oUe=function(){};{var TYt=/^(?:webkit|moz|o)[A-Z]/,IYt=/^-ms-/,AYt=/-(.)/g,sUe=/;\s*$/,MR={},Zge={},aUe=!1,lUe=!1,RYt=function(x){return x.replace(AYt,function(S,L){return L.toUpperCase()})},PYt=function(x){MR.hasOwnProperty(x)&&MR[x]||(MR[x]=!0,s("Unsupported style property %s. Did you mean %s?",x,RYt(x.replace(IYt,"ms-"))))},OYt=function(x){MR.hasOwnProperty(x)&&MR[x]||(MR[x]=!0,s("Unsupported vendor-prefixed style property %s. Did you mean %s?",x,x.charAt(0).toUpperCase()+x.slice(1)))},jYt=function(x,S){Zge.hasOwnProperty(S)&&Zge[S]||(Zge[S]=!0,s(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,x,S.replace(sUe,"")))},FYt=function(x,S){aUe||(aUe=!0,s("`NaN` is an invalid value for the `%s` css style property.",x))},$Yt=function(x,S){lUe||(lUe=!0,s("`Infinity` is an invalid value for the `%s` css style property.",x))};oUe=function(x,S){x.indexOf("-")>-1?PYt(x):TYt.test(x)?OYt(x):sUe.test(S)&&jYt(x,S),typeof S=="number"&&(isNaN(S)?FYt(x,S):isFinite(S)||$Yt(x,S))}}var VYt=oUe;function BYt(x){{var S="",L="";for(var j in x)if(x.hasOwnProperty(j)){var W=x[j];if(W!=null){var G=j.indexOf("--")===0;S+=L+(G?j:LYt(j))+":",S+=Xge(j,W,G),L=";"}}return S||null}}function cUe(x,S){var L=x.style;for(var j in S)if(S.hasOwnProperty(j)){var W=j.indexOf("--")===0;W||VYt(j,S[j]);var G=Xge(j,S[j],W);j==="float"&&(j="cssFloat"),W?L.setProperty(j,G):L[j]=G}}function zYt(x){return x==null||typeof x=="boolean"||x===""}function uUe(x){var S={};for(var L in x)for(var j=NYt[L]||[L],W=0;W<j.length;W++)S[j[W]]=L;return S}function HYt(x,S){{if(!S)return;var L=uUe(x),j=uUe(S),W={};for(var G in L){var te=L[G],pe=j[G];if(pe&&te!==pe){var ke=te+","+pe;if(W[ke])continue;W[ke]=!0,s("%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",zYt(x[te])?"Removing":"Updating",te,pe)}}}}var WYt={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},UYt=mi({menuitem:!0},WYt),KYt="__html";function Qge(x,S){if(S){if(UYt[x]&&(S.children!=null||S.dangerouslySetInnerHTML!=null))throw new Error(x+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");if(S.dangerouslySetInnerHTML!=null){if(S.children!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof S.dangerouslySetInnerHTML!="object"||!(KYt in S.dangerouslySetInnerHTML))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.")}if(!S.suppressContentEditableWarning&&S.contentEditable&&S.children!=null&&s("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),S.style!=null&&typeof S.style!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.")}}function IM(x,S){if(x.indexOf("-")===-1)return typeof S.is=="string";switch(x){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var KG={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},dUe={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},LR={},qYt=new RegExp("^(aria)-["+it+"]*$"),GYt=new RegExp("^(aria)[A-Z]["+it+"]*$");function YYt(x,S){{if(le.call(LR,S)&&LR[S])return!0;if(GYt.test(S)){var L="aria-"+S.slice(4).toLowerCase(),j=dUe.hasOwnProperty(L)?L:null;if(j==null)return s("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",S),LR[S]=!0,!0;if(S!==j)return s("Invalid ARIA attribute `%s`. Did you mean `%s`?",S,j),LR[S]=!0,!0}if(qYt.test(S)){var W=S.toLowerCase(),G=dUe.hasOwnProperty(W)?W:null;if(G==null)return LR[S]=!0,!1;if(S!==G)return s("Unknown ARIA attribute `%s`. Did you mean `%s`?",S,G),LR[S]=!0,!0}}return!0}function XYt(x,S){{var L=[];for(var j in S){var W=YYt(x,j);W||L.push(j)}var G=L.map(function(te){return"`"+te+"`"}).join(", ");L.length===1?s("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",G,x):L.length>1&&s("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",G,x)}}function ZYt(x,S){IM(x,S)||XYt(x,S)}var hUe=!1;function QYt(x,S){{if(x!=="input"&&x!=="textarea"&&x!=="select")return;S!=null&&S.value===null&&!hUe&&(hUe=!0,x==="select"&&S.multiple?s("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",x):s("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",x))}}var fUe=function(){};{var jf={},mUe=/^on./,JYt=/^on[^A-Z]/,eXt=new RegExp("^(aria)-["+it+"]*$"),tXt=new RegExp("^(aria)[A-Z]["+it+"]*$");fUe=function(x,S,L,j){if(le.call(jf,S)&&jf[S])return!0;var W=S.toLowerCase();if(W==="onfocusin"||W==="onfocusout")return s("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),jf[S]=!0,!0;if(j!=null){var G=j.registrationNameDependencies,te=j.possibleRegistrationNames;if(G.hasOwnProperty(S))return!0;var pe=te.hasOwnProperty(W)?te[W]:null;if(pe!=null)return s("Invalid event handler property `%s`. Did you mean `%s`?",S,pe),jf[S]=!0,!0;if(mUe.test(S))return s("Unknown event handler property `%s`. It will be ignored.",S),jf[S]=!0,!0}else if(mUe.test(S))return JYt.test(S)&&s("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",S),jf[S]=!0,!0;if(eXt.test(S)||tXt.test(S))return!0;if(W==="innerhtml")return s("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),jf[S]=!0,!0;if(W==="aria")return s("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),jf[S]=!0,!0;if(W==="is"&&L!==null&&L!==void 0&&typeof L!="string")return s("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof L),jf[S]=!0,!0;if(typeof L=="number"&&isNaN(L))return s("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",S),jf[S]=!0,!0;var ke=St(S),Ue=ke!==null&&ke.type===re;if(KG.hasOwnProperty(W)){var et=KG[W];if(et!==S)return s("Invalid DOM property `%s`. Did you mean `%s`?",S,et),jf[S]=!0,!0}else if(!Ue&&S!==W)return s("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",S,W),jf[S]=!0,!0;return typeof L=="boolean"&&nt(S,L,ke,!1)?(L?s('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',L,S,S,L,S):s('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',L,S,S,L,S,S,S),jf[S]=!0,!0):Ue?!0:nt(S,L,ke,!1)?(jf[S]=!0,!1):((L==="false"||L==="true")&&ke!==null&&ke.type===Ce&&(s("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",L,S,L==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',S,L),jf[S]=!0),!0)}}var nXt=function(x,S,L){{var j=[];for(var W in S){var G=fUe(x,W,S[W],L);G||j.push(W)}var te=j.map(function(pe){return"`"+pe+"`"}).join(", ");j.length===1?s("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",te,x):j.length>1&&s("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",te,x)}};function iXt(x,S,L){IM(x,S)||nXt(x,S,L)}var pUe=1,Jge=2,j$=4,rXt=pUe|Jge|j$,F$=null;function oXt(x){F$!==null&&s("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),F$=x}function sXt(){F$===null&&s("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),F$=null}function aXt(x){return x===F$}function ebe(x){var S=x.target||x.srcElement||window;return S.correspondingUseElement&&(S=S.correspondingUseElement),S.nodeType===Kw?S.parentNode:S}var tbe=null,TR=null,IR=null;function gUe(x){var S=hN(x);if(S){if(typeof tbe!="function")throw new Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var L=S.stateNode;if(L){var j=MY(L);tbe(S.stateNode,S.type,j)}}}function lXt(x){tbe=x}function bUe(x){TR?IR?IR.push(x):IR=[x]:TR=x}function cXt(){return TR!==null||IR!==null}function vUe(){if(TR){var x=TR,S=IR;if(TR=null,IR=null,gUe(x),S)for(var L=0;L<S.length;L++)gUe(S[L])}}var yUe=function(x,S){return x(S)},_Ue=function(){},nbe=!1;function uXt(){var x=cXt();x&&(_Ue(),vUe())}function xUe(x,S,L){if(nbe)return x(S,L);nbe=!0;try{return yUe(x,S,L)}finally{nbe=!1,uXt()}}function dXt(x,S,L){yUe=x,_Ue=L}function hXt(x){return x==="button"||x==="input"||x==="select"||x==="textarea"}function fXt(x,S,L){switch(x){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!!(L.disabled&&hXt(S));default:return!1}}function $$(x,S){var L=x.stateNode;if(L===null)return null;var j=MY(L);if(j===null)return null;var W=j[S];if(fXt(S,x.type,j))return null;if(W&&typeof W!="function")throw new Error("Expected `"+S+"` listener to be a function, instead got a value of `"+typeof W+"` type.");return W}var ibe=!1;if(be)try{var V$={};Object.defineProperty(V$,"passive",{get:function(){ibe=!0}}),window.addEventListener("test",V$,V$),window.removeEventListener("test",V$,V$)}catch{ibe=!1}function wUe(x,S,L,j,W,G,te,pe,ke){var Ue=Array.prototype.slice.call(arguments,3);try{S.apply(L,Ue)}catch(et){this.onError(et)}}var CUe=wUe;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var rbe=document.createElement("react");CUe=function(S,L,j,W,G,te,pe,ke,Ue){if(typeof document>"u"||document===null)throw new Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var et=document.createEvent("Event"),kt=!1,Dt=!0,Zt=window.event,nn=Object.getOwnPropertyDescriptor(window,"event");function xn(){rbe.removeEventListener(wn,wr,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=Zt)}var Ni=Array.prototype.slice.call(arguments,3);function wr(){kt=!0,xn(),L.apply(j,Ni),Dt=!1}var sr,os=!1,Ko=!1;function Bt(zt){if(sr=zt.error,os=!0,sr===null&&zt.colno===0&&zt.lineno===0&&(Ko=!0),zt.defaultPrevented&&sr!=null&&typeof sr=="object")try{sr._suppressLogging=!0}catch{}}var wn="react-"+(S||"invokeguardedcallback");if(window.addEventListener("error",Bt),rbe.addEventListener(wn,wr,!1),et.initEvent(wn,!1,!1),rbe.dispatchEvent(et),nn&&Object.defineProperty(window,"event",nn),kt&&Dt&&(os?Ko&&(sr=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")):sr=new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`),this.onError(sr)),window.removeEventListener("error",Bt),!kt)return xn(),wUe.apply(this,arguments)}}var mXt=CUe,AR=!1,qG=null,GG=!1,obe=null,pXt={onError:function(x){AR=!0,qG=x}};function sbe(x,S,L,j,W,G,te,pe,ke){AR=!1,qG=null,mXt.apply(pXt,arguments)}function gXt(x,S,L,j,W,G,te,pe,ke){if(sbe.apply(this,arguments),AR){var Ue=abe();GG||(GG=!0,obe=Ue)}}function bXt(){if(GG){var x=obe;throw GG=!1,obe=null,x}}function vXt(){return AR}function abe(){if(AR){var x=qG;return AR=!1,qG=null,x}else throw new Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function RR(x){return x._reactInternals}function yXt(x){return x._reactInternals!==void 0}function _Xt(x,S){x._reactInternals=S}var Or=0,PR=1,hu=2,ds=4,AM=16,B$=32,lbe=64,Us=128,Gw=256,oN=512,RM=1024,iy=2048,Yw=4096,PM=8192,YG=16384,xXt=iy|ds|lbe|oN|RM|YG,wXt=32767,z$=32768,Ff=65536,cbe=131072,SUe=1048576,ube=2097152,OM=4194304,dbe=8388608,Xw=16777216,XG=33554432,hbe=ds|RM|0,fbe=hu|ds|AM|B$|oN|Yw|PM,H$=ds|lbe|oN|PM,OR=iy|AM,Zw=OM|dbe|ube,CXt=n.ReactCurrentOwner;function jM(x){var S=x,L=x;if(x.alternate)for(;S.return;)S=S.return;else{var j=S;do S=j,(S.flags&(hu|Yw))!==Or&&(L=S.return),j=S.return;while(j)}return S.tag===d?L:null}function NUe(x){if(x.tag===N){var S=x.memoizedState;if(S===null){var L=x.alternate;L!==null&&(S=L.memoizedState)}if(S!==null)return S.dehydrated}return null}function EUe(x){return x.tag===d?x.stateNode.containerInfo:null}function SXt(x){return jM(x)===x}function NXt(x){{var S=CXt.current;if(S!==null&&S.tag===c){var L=S,j=L.stateNode;j._warnedAboutRefsInRender||s("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",bi(L)||"A component"),j._warnedAboutRefsInRender=!0}}var W=RR(x);return W?jM(W)===W:!1}function DUe(x){if(jM(x)!==x)throw new Error("Unable to find node on an unmounted component.")}function kUe(x){var S=x.alternate;if(!S){var L=jM(x);if(L===null)throw new Error("Unable to find node on an unmounted component.");return L!==x?null:x}for(var j=x,W=S;;){var G=j.return;if(G===null)break;var te=G.alternate;if(te===null){var pe=G.return;if(pe!==null){j=W=pe;continue}break}if(G.child===te.child){for(var ke=G.child;ke;){if(ke===j)return DUe(G),x;if(ke===W)return DUe(G),S;ke=ke.sibling}throw new Error("Unable to find node on an unmounted component.")}if(j.return!==W.return)j=G,W=te;else{for(var Ue=!1,et=G.child;et;){if(et===j){Ue=!0,j=G,W=te;break}if(et===W){Ue=!0,W=G,j=te;break}et=et.sibling}if(!Ue){for(et=te.child;et;){if(et===j){Ue=!0,j=te,W=G;break}if(et===W){Ue=!0,W=te,j=G;break}et=et.sibling}if(!Ue)throw new Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(j.alternate!==W)throw new Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(j.tag!==d)throw new Error("Unable to find node on an unmounted component.");return j.stateNode.current===j?x:S}function MUe(x){var S=kUe(x);return S!==null?LUe(S):null}function LUe(x){if(x.tag===f||x.tag===m)return x;for(var S=x.child;S!==null;){var L=LUe(S);if(L!==null)return L;S=S.sibling}return null}function EXt(x){var S=kUe(x);return S!==null?TUe(S):null}function TUe(x){if(x.tag===f||x.tag===m)return x;for(var S=x.child;S!==null;){if(S.tag!==h){var L=TUe(S);if(L!==null)return L}S=S.sibling}return null}var IUe=e.unstable_scheduleCallback,DXt=e.unstable_cancelCallback,kXt=e.unstable_shouldYield,MXt=e.unstable_requestPaint,kd=e.unstable_now,LXt=e.unstable_getCurrentPriorityLevel,ZG=e.unstable_ImmediatePriority,mbe=e.unstable_UserBlockingPriority,FM=e.unstable_NormalPriority,TXt=e.unstable_LowPriority,pbe=e.unstable_IdlePriority,IXt=e.unstable_yieldValue,AXt=e.unstable_setDisableYieldValue,jR=null,Qh=null,Li=null,__=!1,ry=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function RXt(x){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var S=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(S.isDisabled)return!0;if(!S.supportsFiber)return s("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{J&&(x=mi({},x,{getLaneLabelMap:VXt,injectProfilingHooks:$Xt})),jR=S.inject(x),Qh=S}catch(L){s("React instrumentation encountered an error: %s.",L)}return!!S.checkDCE}function PXt(x,S){if(Qh&&typeof Qh.onScheduleFiberRoot=="function")try{Qh.onScheduleFiberRoot(jR,x,S)}catch(L){__||(__=!0,s("React instrumentation encountered an error: %s",L))}}function OXt(x,S){if(Qh&&typeof Qh.onCommitFiberRoot=="function")try{var L=(x.current.flags&Us)===Us;if(ae){var j;switch(S){case ug:j=ZG;break;case Jw:j=mbe;break;case e1:j=FM;break;case rY:j=pbe;break;default:j=FM;break}Qh.onCommitFiberRoot(jR,x,j,L)}}catch(W){__||(__=!0,s("React instrumentation encountered an error: %s",W))}}function jXt(x){if(Qh&&typeof Qh.onPostCommitFiberRoot=="function")try{Qh.onPostCommitFiberRoot(jR,x)}catch(S){__||(__=!0,s("React instrumentation encountered an error: %s",S))}}function FXt(x){if(Qh&&typeof Qh.onCommitFiberUnmount=="function")try{Qh.onCommitFiberUnmount(jR,x)}catch(S){__||(__=!0,s("React instrumentation encountered an error: %s",S))}}function Md(x){if(typeof IXt=="function"&&(AXt(x),r(x)),Qh&&typeof Qh.setStrictMode=="function")try{Qh.setStrictMode(jR,x)}catch(S){__||(__=!0,s("React instrumentation encountered an error: %s",S))}}function $Xt(x){Li=x}function VXt(){{for(var x=new Map,S=1,L=0;L<bbe;L++){var j=sZt(S);x.set(S,j),S*=2}return x}}function BXt(x){Li!==null&&typeof Li.markCommitStarted=="function"&&Li.markCommitStarted(x)}function AUe(){Li!==null&&typeof Li.markCommitStopped=="function"&&Li.markCommitStopped()}function W$(x){Li!==null&&typeof Li.markComponentRenderStarted=="function"&&Li.markComponentRenderStarted(x)}function FR(){Li!==null&&typeof Li.markComponentRenderStopped=="function"&&Li.markComponentRenderStopped()}function zXt(x){Li!==null&&typeof Li.markComponentPassiveEffectMountStarted=="function"&&Li.markComponentPassiveEffectMountStarted(x)}function HXt(){Li!==null&&typeof Li.markComponentPassiveEffectMountStopped=="function"&&Li.markComponentPassiveEffectMountStopped()}function WXt(x){Li!==null&&typeof Li.markComponentPassiveEffectUnmountStarted=="function"&&Li.markComponentPassiveEffectUnmountStarted(x)}function UXt(){Li!==null&&typeof Li.markComponentPassiveEffectUnmountStopped=="function"&&Li.markComponentPassiveEffectUnmountStopped()}function KXt(x){Li!==null&&typeof Li.markComponentLayoutEffectMountStarted=="function"&&Li.markComponentLayoutEffectMountStarted(x)}function qXt(){Li!==null&&typeof Li.markComponentLayoutEffectMountStopped=="function"&&Li.markComponentLayoutEffectMountStopped()}function RUe(x){Li!==null&&typeof Li.markComponentLayoutEffectUnmountStarted=="function"&&Li.markComponentLayoutEffectUnmountStarted(x)}function PUe(){Li!==null&&typeof Li.markComponentLayoutEffectUnmountStopped=="function"&&Li.markComponentLayoutEffectUnmountStopped()}function GXt(x,S,L){Li!==null&&typeof Li.markComponentErrored=="function"&&Li.markComponentErrored(x,S,L)}function YXt(x,S,L){Li!==null&&typeof Li.markComponentSuspended=="function"&&Li.markComponentSuspended(x,S,L)}function XXt(x){Li!==null&&typeof Li.markLayoutEffectsStarted=="function"&&Li.markLayoutEffectsStarted(x)}function ZXt(){Li!==null&&typeof Li.markLayoutEffectsStopped=="function"&&Li.markLayoutEffectsStopped()}function QXt(x){Li!==null&&typeof Li.markPassiveEffectsStarted=="function"&&Li.markPassiveEffectsStarted(x)}function JXt(){Li!==null&&typeof Li.markPassiveEffectsStopped=="function"&&Li.markPassiveEffectsStopped()}function OUe(x){Li!==null&&typeof Li.markRenderStarted=="function"&&Li.markRenderStarted(x)}function eZt(){Li!==null&&typeof Li.markRenderYielded=="function"&&Li.markRenderYielded()}function jUe(){Li!==null&&typeof Li.markRenderStopped=="function"&&Li.markRenderStopped()}function tZt(x){Li!==null&&typeof Li.markRenderScheduled=="function"&&Li.markRenderScheduled(x)}function nZt(x,S){Li!==null&&typeof Li.markForceUpdateScheduled=="function"&&Li.markForceUpdateScheduled(x,S)}function gbe(x,S){Li!==null&&typeof Li.markStateUpdateScheduled=="function"&&Li.markStateUpdateScheduled(x,S)}var kr=0,is=1,va=2,xc=8,x_=16,FUe=Math.clz32?Math.clz32:oZt,iZt=Math.log,rZt=Math.LN2;function oZt(x){var S=x>>>0;return S===0?32:31-(iZt(S)/rZt|0)|0}var bbe=31,On=0,Ld=0,to=1,$R=2,Qw=4,$M=8,w_=16,U$=32,VR=4194240,K$=64,vbe=128,ybe=256,_be=512,xbe=1024,wbe=2048,Cbe=4096,Sbe=8192,Nbe=16384,Ebe=32768,Dbe=65536,kbe=131072,Mbe=262144,Lbe=524288,Tbe=1048576,Ibe=2097152,QG=130023424,BR=4194304,Abe=8388608,Rbe=16777216,Pbe=33554432,Obe=67108864,$Ue=BR,q$=134217728,VUe=268435455,G$=268435456,VM=536870912,lg=1073741824;function sZt(x){{if(x&to)return"Sync";if(x&$R)return"InputContinuousHydration";if(x&Qw)return"InputContinuous";if(x&$M)return"DefaultHydration";if(x&w_)return"Default";if(x&U$)return"TransitionHydration";if(x&VR)return"Transition";if(x&QG)return"Retry";if(x&q$)return"SelectiveHydration";if(x&G$)return"IdleHydration";if(x&VM)return"Idle";if(x&lg)return"Offscreen"}}var yl=-1,JG=K$,eY=BR;function Y$(x){switch(BM(x)){case to:return to;case $R:return $R;case Qw:return Qw;case $M:return $M;case w_:return w_;case U$:return U$;case K$:case vbe:case ybe:case _be:case xbe:case wbe:case Cbe:case Sbe:case Nbe:case Ebe:case Dbe:case kbe:case Mbe:case Lbe:case Tbe:case Ibe:return x&VR;case BR:case Abe:case Rbe:case Pbe:case Obe:return x&QG;case q$:return q$;case G$:return G$;case VM:return VM;case lg:return lg;default:return s("Should have found matching lanes. This is a bug in React."),x}}function tY(x,S){var L=x.pendingLanes;if(L===On)return On;var j=On,W=x.suspendedLanes,G=x.pingedLanes,te=L&VUe;if(te!==On){var pe=te&~W;if(pe!==On)j=Y$(pe);else{var ke=te&G;ke!==On&&(j=Y$(ke))}}else{var Ue=L&~W;Ue!==On?j=Y$(Ue):G!==On&&(j=Y$(G))}if(j===On)return On;if(S!==On&&S!==j&&(S&W)===On){var et=BM(j),kt=BM(S);if(et>=kt||et===w_&&(kt&VR)!==On)return S}(j&Qw)!==On&&(j|=L&w_);var Dt=x.entangledLanes;if(Dt!==On)for(var Zt=x.entanglements,nn=j&Dt;nn>0;){var xn=zM(nn),Ni=1<<xn;j|=Zt[xn],nn&=~Ni}return j}function aZt(x,S){for(var L=x.eventTimes,j=yl;S>0;){var W=zM(S),G=1<<W,te=L[W];te>j&&(j=te),S&=~G}return j}function lZt(x,S){switch(x){case to:case $R:case Qw:return S+250;case $M:case w_:case U$:case K$:case vbe:case ybe:case _be:case xbe:case wbe:case Cbe:case Sbe:case Nbe:case Ebe:case Dbe:case kbe:case Mbe:case Lbe:case Tbe:case Ibe:return S+5e3;case BR:case Abe:case Rbe:case Pbe:case Obe:return yl;case q$:case G$:case VM:case lg:return yl;default:return s("Should have found matching lanes. This is a bug in React."),yl}}function cZt(x,S){for(var L=x.pendingLanes,j=x.suspendedLanes,W=x.pingedLanes,G=x.expirationTimes,te=L;te>0;){var pe=zM(te),ke=1<<pe,Ue=G[pe];Ue===yl?((ke&j)===On||(ke&W)!==On)&&(G[pe]=lZt(ke,S)):Ue<=S&&(x.expiredLanes|=ke),te&=~ke}}function uZt(x){return Y$(x.pendingLanes)}function jbe(x){var S=x.pendingLanes&~lg;return S!==On?S:S&lg?lg:On}function dZt(x){return(x&to)!==On}function Fbe(x){return(x&VUe)!==On}function BUe(x){return(x&QG)===x}function hZt(x){var S=to|Qw|w_;return(x&S)===On}function fZt(x){return(x&VR)===x}function nY(x,S){var L=$R|Qw|$M|w_;return(S&L)!==On}function mZt(x,S){return(S&x.expiredLanes)!==On}function zUe(x){return(x&VR)!==On}function HUe(){var x=JG;return JG<<=1,(JG&VR)===On&&(JG=K$),x}function pZt(){var x=eY;return eY<<=1,(eY&QG)===On&&(eY=BR),x}function BM(x){return x&-x}function X$(x){return BM(x)}function zM(x){return 31-FUe(x)}function $be(x){return zM(x)}function cg(x,S){return(x&S)!==On}function zR(x,S){return(x&S)===S}function Io(x,S){return x|S}function iY(x,S){return x&~S}function WUe(x,S){return x&S}function L3r(x){return x}function gZt(x,S){return x!==Ld&&x<S?x:S}function Vbe(x){for(var S=[],L=0;L<bbe;L++)S.push(x);return S}function Z$(x,S,L){x.pendingLanes|=S,S!==VM&&(x.suspendedLanes=On,x.pingedLanes=On);var j=x.eventTimes,W=$be(S);j[W]=L}function bZt(x,S){x.suspendedLanes|=S,x.pingedLanes&=~S;for(var L=x.expirationTimes,j=S;j>0;){var W=zM(j),G=1<<W;L[W]=yl,j&=~G}}function UUe(x,S,L){x.pingedLanes|=x.suspendedLanes&S}function vZt(x,S){var L=x.pendingLanes&~S;x.pendingLanes=S,x.suspendedLanes=On,x.pingedLanes=On,x.expiredLanes&=S,x.mutableReadLanes&=S,x.entangledLanes&=S;for(var j=x.entanglements,W=x.eventTimes,G=x.expirationTimes,te=L;te>0;){var pe=zM(te),ke=1<<pe;j[pe]=On,W[pe]=yl,G[pe]=yl,te&=~ke}}function Bbe(x,S){for(var L=x.entangledLanes|=S,j=x.entanglements,W=L;W;){var G=zM(W),te=1<<G;te&S|j[G]&S&&(j[G]|=S),W&=~te}}function yZt(x,S){var L=BM(S),j;switch(L){case Qw:j=$R;break;case w_:j=$M;break;case K$:case vbe:case ybe:case _be:case xbe:case wbe:case Cbe:case Sbe:case Nbe:case Ebe:case Dbe:case kbe:case Mbe:case Lbe:case Tbe:case Ibe:case BR:case Abe:case Rbe:case Pbe:case Obe:j=U$;break;case VM:j=G$;break;default:j=Ld;break}return(j&(x.suspendedLanes|S))!==Ld?Ld:j}function KUe(x,S,L){if(ry)for(var j=x.pendingUpdatersLaneMap;L>0;){var W=$be(L),G=1<<W,te=j[W];te.add(S),L&=~G}}function qUe(x,S){if(ry)for(var L=x.pendingUpdatersLaneMap,j=x.memoizedUpdaters;S>0;){var W=$be(S),G=1<<W,te=L[W];te.size>0&&(te.forEach(function(pe){var ke=pe.alternate;(ke===null||!j.has(ke))&&j.add(pe)}),te.clear()),S&=~G}}function GUe(x,S){return null}var ug=to,Jw=Qw,e1=w_,rY=VM,Q$=Ld;function oy(){return Q$}function Td(x){Q$=x}function _Zt(x,S){var L=Q$;try{return Q$=x,S()}finally{Q$=L}}function xZt(x,S){return x!==0&&x<S?x:S}function wZt(x,S){return x>S?x:S}function zbe(x,S){return x!==0&&x<S}function YUe(x){var S=BM(x);return zbe(ug,S)?zbe(Jw,S)?Fbe(S)?e1:rY:Jw:ug}function oY(x){var S=x.current.memoizedState;return S.isDehydrated}var XUe;function CZt(x){XUe=x}function SZt(x){XUe(x)}var Hbe;function NZt(x){Hbe=x}var ZUe;function EZt(x){ZUe=x}var QUe;function DZt(x){QUe=x}var JUe;function kZt(x){JUe=x}var Wbe=!1,sY=[],sN=null,aN=null,lN=null,J$=new Map,e8=new Map,cN=[],MZt=["mousedown","mouseup","touchcancel","touchend","touchstart","auxclick","dblclick","pointercancel","pointerdown","pointerup","dragend","dragstart","drop","compositionend","compositionstart","keydown","keypress","keyup","input","textInput","copy","cut","paste","click","change","contextmenu","reset","submit"];function LZt(x){return MZt.indexOf(x)>-1}function TZt(x,S,L,j,W){return{blockedOn:x,domEventName:S,eventSystemFlags:L,nativeEvent:W,targetContainers:[j]}}function eKe(x,S){switch(x){case"focusin":case"focusout":sN=null;break;case"dragenter":case"dragleave":aN=null;break;case"mouseover":case"mouseout":lN=null;break;case"pointerover":case"pointerout":{var L=S.pointerId;J$.delete(L);break}case"gotpointercapture":case"lostpointercapture":{var j=S.pointerId;e8.delete(j);break}}}function t8(x,S,L,j,W,G){if(x===null||x.nativeEvent!==G){var te=TZt(S,L,j,W,G);if(S!==null){var pe=hN(S);pe!==null&&Hbe(pe)}return te}x.eventSystemFlags|=j;var ke=x.targetContainers;return W!==null&&ke.indexOf(W)===-1&&ke.push(W),x}function IZt(x,S,L,j,W){switch(S){case"focusin":{var G=W;return sN=t8(sN,x,S,L,j,G),!0}case"dragenter":{var te=W;return aN=t8(aN,x,S,L,j,te),!0}case"mouseover":{var pe=W;return lN=t8(lN,x,S,L,j,pe),!0}case"pointerover":{var ke=W,Ue=ke.pointerId;return J$.set(Ue,t8(J$.get(Ue)||null,x,S,L,j,ke)),!0}case"gotpointercapture":{var et=W,kt=et.pointerId;return e8.set(kt,t8(e8.get(kt)||null,x,S,L,j,et)),!0}}return!1}function tKe(x){var S=UM(x.target);if(S!==null){var L=jM(S);if(L!==null){var j=L.tag;if(j===N){var W=NUe(L);if(W!==null){x.blockedOn=W,JUe(x.priority,function(){ZUe(L)});return}}else if(j===d){var G=L.stateNode;if(oY(G)){x.blockedOn=EUe(L);return}}}}x.blockedOn=null}function AZt(x){for(var S=QUe(),L={blockedOn:null,target:x,priority:S},j=0;j<cN.length&&zbe(S,cN[j].priority);j++);cN.splice(j,0,L),j===0&&tKe(L)}function aY(x){if(x.blockedOn!==null)return!1;for(var S=x.targetContainers;S.length>0;){var L=S[0],j=qbe(x.domEventName,x.eventSystemFlags,L,x.nativeEvent);if(j===null){var W=x.nativeEvent,G=new W.constructor(W.type,W);oXt(G),W.target.dispatchEvent(G),sXt()}else{var te=hN(j);return te!==null&&Hbe(te),x.blockedOn=j,!1}S.shift()}return!0}function nKe(x,S,L){aY(x)&&L.delete(S)}function RZt(){Wbe=!1,sN!==null&&aY(sN)&&(sN=null),aN!==null&&aY(aN)&&(aN=null),lN!==null&&aY(lN)&&(lN=null),J$.forEach(nKe),e8.forEach(nKe)}function n8(x,S){x.blockedOn===S&&(x.blockedOn=null,Wbe||(Wbe=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,RZt)))}function i8(x){if(sY.length>0){n8(sY[0],x);for(var S=1;S<sY.length;S++){var L=sY[S];L.blockedOn===x&&(L.blockedOn=null)}}sN!==null&&n8(sN,x),aN!==null&&n8(aN,x),lN!==null&&n8(lN,x);var j=function(pe){return n8(pe,x)};J$.forEach(j),e8.forEach(j);for(var W=0;W<cN.length;W++){var G=cN[W];G.blockedOn===x&&(G.blockedOn=null)}for(;cN.length>0;){var te=cN[0];if(te.blockedOn!==null)break;tKe(te),te.blockedOn===null&&cN.shift()}}var HR=n.ReactCurrentBatchConfig,Ube=!0;function iKe(x){Ube=!!x}function PZt(){return Ube}function OZt(x,S,L){var j=rKe(S),W;switch(j){case ug:W=jZt;break;case Jw:W=FZt;break;case e1:default:W=Kbe;break}return W.bind(null,S,L,x)}function jZt(x,S,L,j){var W=oy(),G=HR.transition;HR.transition=null;try{Td(ug),Kbe(x,S,L,j)}finally{Td(W),HR.transition=G}}function FZt(x,S,L,j){var W=oy(),G=HR.transition;HR.transition=null;try{Td(Jw),Kbe(x,S,L,j)}finally{Td(W),HR.transition=G}}function Kbe(x,S,L,j){Ube&&$Zt(x,S,L,j)}function $Zt(x,S,L,j){var W=qbe(x,S,L,j);if(W===null){ave(x,S,j,lY,L),eKe(x,j);return}if(IZt(W,x,S,L,j)){j.stopPropagation();return}if(eKe(x,j),S&j$&&LZt(x)){for(;W!==null;){var G=hN(W);G!==null&&SZt(G);var te=qbe(x,S,L,j);if(te===null&&ave(x,S,j,lY,L),te===W)break;W=te}W!==null&&j.stopPropagation();return}ave(x,S,j,null,L)}var lY=null;function qbe(x,S,L,j){lY=null;var W=ebe(j),G=UM(W);if(G!==null){var te=jM(G);if(te===null)G=null;else{var pe=te.tag;if(pe===N){var ke=NUe(te);if(ke!==null)return ke;G=null}else if(pe===d){var Ue=te.stateNode;if(oY(Ue))return EUe(te);G=null}else te!==G&&(G=null)}}return lY=G,null}function rKe(x){switch(x){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return ug;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return Jw;case"message":{var S=LXt();switch(S){case ZG:return ug;case mbe:return Jw;case FM:case TXt:return e1;case pbe:return rY;default:return e1}}default:return e1}}function VZt(x,S,L){return x.addEventListener(S,L,!1),L}function BZt(x,S,L){return x.addEventListener(S,L,!0),L}function zZt(x,S,L,j){return x.addEventListener(S,L,{capture:!0,passive:j}),L}function HZt(x,S,L,j){return x.addEventListener(S,L,{passive:j}),L}var r8=null,Gbe=null,o8=null;function WZt(x){return r8=x,Gbe=sKe(),!0}function UZt(){r8=null,Gbe=null,o8=null}function oKe(){if(o8)return o8;var x,S=Gbe,L=S.length,j,W=sKe(),G=W.length;for(x=0;x<L&&S[x]===W[x];x++);var te=L-x;for(j=1;j<=te&&S[L-j]===W[G-j];j++);var pe=j>1?1-j:void 0;return o8=W.slice(x,pe),o8}function sKe(){return"value"in r8?r8.value:r8.textContent}function cY(x){var S,L=x.keyCode;return"charCode"in x?(S=x.charCode,S===0&&L===13&&(S=13)):S=L,S===10&&(S=13),S>=32||S===13?S:0}function uY(){return!0}function aKe(){return!1}function dg(x){function S(L,j,W,G,te){this._reactName=L,this._targetInst=W,this.type=j,this.nativeEvent=G,this.target=te,this.currentTarget=null;for(var pe in x)if(x.hasOwnProperty(pe)){var ke=x[pe];ke?this[pe]=ke(G):this[pe]=G[pe]}var Ue=G.defaultPrevented!=null?G.defaultPrevented:G.returnValue===!1;return Ue?this.isDefaultPrevented=uY:this.isDefaultPrevented=aKe,this.isPropagationStopped=aKe,this}return mi(S.prototype,{preventDefault:function(){this.defaultPrevented=!0;var L=this.nativeEvent;L&&(L.preventDefault?L.preventDefault():typeof L.returnValue!="unknown"&&(L.returnValue=!1),this.isDefaultPrevented=uY)},stopPropagation:function(){var L=this.nativeEvent;L&&(L.stopPropagation?L.stopPropagation():typeof L.cancelBubble!="unknown"&&(L.cancelBubble=!0),this.isPropagationStopped=uY)},persist:function(){},isPersistent:uY}),S}var WR={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(x){return x.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ybe=dg(WR),s8=mi({},WR,{view:0,detail:0}),KZt=dg(s8),Xbe,Zbe,a8;function qZt(x){x!==a8&&(a8&&x.type==="mousemove"?(Xbe=x.screenX-a8.screenX,Zbe=x.screenY-a8.screenY):(Xbe=0,Zbe=0),a8=x)}var dY=mi({},s8,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jbe,button:0,buttons:0,relatedTarget:function(x){return x.relatedTarget===void 0?x.fromElement===x.srcElement?x.toElement:x.fromElement:x.relatedTarget},movementX:function(x){return"movementX"in x?x.movementX:(qZt(x),Xbe)},movementY:function(x){return"movementY"in x?x.movementY:Zbe}}),lKe=dg(dY),GZt=mi({},dY,{dataTransfer:0}),YZt=dg(GZt),XZt=mi({},s8,{relatedTarget:0}),Qbe=dg(XZt),ZZt=mi({},WR,{animationName:0,elapsedTime:0,pseudoElement:0}),QZt=dg(ZZt),JZt=mi({},WR,{clipboardData:function(x){return"clipboardData"in x?x.clipboardData:window.clipboardData}}),eQt=dg(JZt),tQt=mi({},WR,{data:0}),cKe=dg(tQt),nQt=cKe,iQt={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rQt={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};function oQt(x){if(x.key){var S=iQt[x.key]||x.key;if(S!=="Unidentified")return S}if(x.type==="keypress"){var L=cY(x);return L===13?"Enter":String.fromCharCode(L)}return x.type==="keydown"||x.type==="keyup"?rQt[x.keyCode]||"Unidentified":""}var sQt={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function aQt(x){var S=this,L=S.nativeEvent;if(L.getModifierState)return L.getModifierState(x);var j=sQt[x];return j?!!L[j]:!1}function Jbe(x){return aQt}var lQt=mi({},s8,{key:oQt,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jbe,charCode:function(x){return x.type==="keypress"?cY(x):0},keyCode:function(x){return x.type==="keydown"||x.type==="keyup"?x.keyCode:0},which:function(x){return x.type==="keypress"?cY(x):x.type==="keydown"||x.type==="keyup"?x.keyCode:0}}),cQt=dg(lQt),uQt=mi({},dY,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uKe=dg(uQt),dQt=mi({},s8,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jbe}),hQt=dg(dQt),fQt=mi({},WR,{propertyName:0,elapsedTime:0,pseudoElement:0}),mQt=dg(fQt),pQt=mi({},dY,{deltaX:function(x){return"deltaX"in x?x.deltaX:"wheelDeltaX"in x?-x.wheelDeltaX:0},deltaY:function(x){return"deltaY"in x?x.deltaY:"wheelDeltaY"in x?-x.wheelDeltaY:"wheelDelta"in x?-x.wheelDelta:0},deltaZ:0,deltaMode:0}),gQt=dg(pQt),bQt=[9,13,27,32],dKe=229,eve=be&&"CompositionEvent"in window,l8=null;be&&"documentMode"in document&&(l8=document.documentMode);var vQt=be&&"TextEvent"in window&&!l8,hKe=be&&(!eve||l8&&l8>8&&l8<=11),fKe=32,mKe=String.fromCharCode(fKe);function yQt(){ie("onBeforeInput",["compositionend","keypress","textInput","paste"]),ie("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),ie("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),ie("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var pKe=!1;function _Qt(x){return(x.ctrlKey||x.altKey||x.metaKey)&&!(x.ctrlKey&&x.altKey)}function xQt(x){switch(x){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function wQt(x,S){return x==="keydown"&&S.keyCode===dKe}function gKe(x,S){switch(x){case"keyup":return bQt.indexOf(S.keyCode)!==-1;case"keydown":return S.keyCode!==dKe;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bKe(x){var S=x.detail;return typeof S=="object"&&"data"in S?S.data:null}function vKe(x){return x.locale==="ko"}var UR=!1;function CQt(x,S,L,j,W){var G,te;if(eve?G=xQt(S):UR?gKe(S,j)&&(G="onCompositionEnd"):wQt(S,j)&&(G="onCompositionStart"),!G)return null;hKe&&!vKe(j)&&(!UR&&G==="onCompositionStart"?UR=WZt(W):G==="onCompositionEnd"&&UR&&(te=oKe()));var pe=gY(L,G);if(pe.length>0){var ke=new cKe(G,S,null,j,W);if(x.push({event:ke,listeners:pe}),te)ke.data=te;else{var Ue=bKe(j);Ue!==null&&(ke.data=Ue)}}}function SQt(x,S){switch(x){case"compositionend":return bKe(S);case"keypress":var L=S.which;return L!==fKe?null:(pKe=!0,mKe);case"textInput":var j=S.data;return j===mKe&&pKe?null:j;default:return null}}function NQt(x,S){if(UR){if(x==="compositionend"||!eve&&gKe(x,S)){var L=oKe();return UZt(),UR=!1,L}return null}switch(x){case"paste":return null;case"keypress":if(!_Qt(S)){if(S.char&&S.char.length>1)return S.char;if(S.which)return String.fromCharCode(S.which)}return null;case"compositionend":return hKe&&!vKe(S)?null:S.data;default:return null}}function EQt(x,S,L,j,W){var G;if(vQt?G=SQt(S,j):G=NQt(S,j),!G)return null;var te=gY(L,"onBeforeInput");if(te.length>0){var pe=new nQt("onBeforeInput","beforeinput",null,j,W);x.push({event:pe,listeners:te}),pe.data=G}}function DQt(x,S,L,j,W,G,te){CQt(x,S,L,j,W),EQt(x,S,L,j,W)}var kQt={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function yKe(x){var S=x&&x.nodeName&&x.nodeName.toLowerCase();return S==="input"?!!kQt[x.type]:S==="textarea"}/**
 * Checks if an event is supported in the current execution environment.
 *
 * NOTE: This will not work correctly for non-generic events such as `change`,
 * `reset`, `load`, `error`, and `select`.
 *
 * Borrows from Modernizr.
 *
 * @param {string} eventNameSuffix Event name, e.g. "click".
 * @return {boolean} True if the event is supported.
 * @internal
 * @license Modernizr 3.0.0pre (Custom Build) | MIT
 */function MQt(x){if(!be)return!1;var S="on"+x,L=S in document;if(!L){var j=document.createElement("div");j.setAttribute(S,"return;"),L=typeof j[S]=="function"}return L}function LQt(){ie("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function _Ke(x,S,L,j){bUe(j);var W=gY(S,"onChange");if(W.length>0){var G=new Ybe("onChange","change",null,L,j);x.push({event:G,listeners:W})}}var c8=null,u8=null;function TQt(x){var S=x.nodeName&&x.nodeName.toLowerCase();return S==="select"||S==="input"&&x.type==="file"}function IQt(x){var S=[];_Ke(S,u8,x,ebe(x)),xUe(AQt,S)}function AQt(x){FKe(x,0)}function hY(x){var S=ZR(x);if(ER(S))return x}function RQt(x,S){if(x==="change")return S}var xKe=!1;be&&(xKe=MQt("input")&&(!document.documentMode||document.documentMode>9));function PQt(x,S){c8=x,u8=S,c8.attachEvent("onpropertychange",CKe)}function wKe(){c8&&(c8.detachEvent("onpropertychange",CKe),c8=null,u8=null)}function CKe(x){x.propertyName==="value"&&hY(u8)&&IQt(x)}function OQt(x,S,L){x==="focusin"?(wKe(),PQt(S,L)):x==="focusout"&&wKe()}function jQt(x,S){if(x==="selectionchange"||x==="keyup"||x==="keydown")return hY(u8)}function FQt(x){var S=x.nodeName;return S&&S.toLowerCase()==="input"&&(x.type==="checkbox"||x.type==="radio")}function $Qt(x,S){if(x==="click")return hY(S)}function VQt(x,S){if(x==="input"||x==="change")return hY(S)}function BQt(x){var S=x._wrapperState;!S||!S.controlled||x.type!=="number"||eo(x,"number",x.value)}function zQt(x,S,L,j,W,G,te){var pe=L?ZR(L):window,ke,Ue;if(TQt(pe)?ke=RQt:yKe(pe)?xKe?ke=VQt:(ke=jQt,Ue=OQt):FQt(pe)&&(ke=$Qt),ke){var et=ke(S,L);if(et){_Ke(x,et,j,W);return}}Ue&&Ue(S,pe,L),S==="focusout"&&BQt(pe)}function HQt(){Q("onMouseEnter",["mouseout","mouseover"]),Q("onMouseLeave",["mouseout","mouseover"]),Q("onPointerEnter",["pointerout","pointerover"]),Q("onPointerLeave",["pointerout","pointerover"])}function WQt(x,S,L,j,W,G,te){var pe=S==="mouseover"||S==="pointerover",ke=S==="mouseout"||S==="pointerout";if(pe&&!aXt(j)){var Ue=j.relatedTarget||j.fromElement;if(Ue&&(UM(Ue)||N8(Ue)))return}if(!(!ke&&!pe)){var et;if(W.window===W)et=W;else{var kt=W.ownerDocument;kt?et=kt.defaultView||kt.parentWindow:et=window}var Dt,Zt;if(ke){var nn=j.relatedTarget||j.toElement;if(Dt=L,Zt=nn?UM(nn):null,Zt!==null){var xn=jM(Zt);(Zt!==xn||Zt.tag!==f&&Zt.tag!==m)&&(Zt=null)}}else Dt=null,Zt=L;if(Dt!==Zt){var Ni=lKe,wr="onMouseLeave",sr="onMouseEnter",os="mouse";(S==="pointerout"||S==="pointerover")&&(Ni=uKe,wr="onPointerLeave",sr="onPointerEnter",os="pointer");var Ko=Dt==null?et:ZR(Dt),Bt=Zt==null?et:ZR(Zt),wn=new Ni(wr,os+"leave",Dt,j,W);wn.target=Ko,wn.relatedTarget=Bt;var zt=null,Bn=UM(W);if(Bn===L){var Pi=new Ni(sr,os+"enter",Zt,j,W);Pi.target=Bt,Pi.relatedTarget=Ko,zt=Pi}mJt(x,wn,zt,Dt,Zt)}}}function UQt(x,S){return x===S&&(x!==0||1/x===1/S)||x!==x&&S!==S}var hg=typeof Object.is=="function"?Object.is:UQt;function d8(x,S){if(hg(x,S))return!0;if(typeof x!="object"||x===null||typeof S!="object"||S===null)return!1;var L=Object.keys(x),j=Object.keys(S);if(L.length!==j.length)return!1;for(var W=0;W<L.length;W++){var G=L[W];if(!le.call(S,G)||!hg(x[G],S[G]))return!1}return!0}function SKe(x){for(;x&&x.firstChild;)x=x.firstChild;return x}function KQt(x){for(;x;){if(x.nextSibling)return x.nextSibling;x=x.parentNode}}function NKe(x,S){for(var L=SKe(x),j=0,W=0;L;){if(L.nodeType===Kw){if(W=j+L.textContent.length,j<=S&&W>=S)return{node:L,offset:S-j};j=W}L=SKe(KQt(L))}}function qQt(x){var S=x.ownerDocument,L=S&&S.defaultView||window,j=L.getSelection&&L.getSelection();if(!j||j.rangeCount===0)return null;var W=j.anchorNode,G=j.anchorOffset,te=j.focusNode,pe=j.focusOffset;try{W.nodeType,te.nodeType}catch{return null}return GQt(x,W,G,te,pe)}function GQt(x,S,L,j,W){var G=0,te=-1,pe=-1,ke=0,Ue=0,et=x,kt=null;e:for(;;){for(var Dt=null;et===S&&(L===0||et.nodeType===Kw)&&(te=G+L),et===j&&(W===0||et.nodeType===Kw)&&(pe=G+W),et.nodeType===Kw&&(G+=et.nodeValue.length),(Dt=et.firstChild)!==null;)kt=et,et=Dt;for(;;){if(et===x)break e;if(kt===S&&++ke===L&&(te=G),kt===j&&++Ue===W&&(pe=G),(Dt=et.nextSibling)!==null)break;et=kt,kt=et.parentNode}et=Dt}return te===-1||pe===-1?null:{start:te,end:pe}}function YQt(x,S){var L=x.ownerDocument||document,j=L&&L.defaultView||window;if(j.getSelection){var W=j.getSelection(),G=x.textContent.length,te=Math.min(S.start,G),pe=S.end===void 0?te:Math.min(S.end,G);if(!W.extend&&te>pe){var ke=pe;pe=te,te=ke}var Ue=NKe(x,te),et=NKe(x,pe);if(Ue&&et){if(W.rangeCount===1&&W.anchorNode===Ue.node&&W.anchorOffset===Ue.offset&&W.focusNode===et.node&&W.focusOffset===et.offset)return;var kt=L.createRange();kt.setStart(Ue.node,Ue.offset),W.removeAllRanges(),te>pe?(W.addRange(kt),W.extend(et.node,et.offset)):(kt.setEnd(et.node,et.offset),W.addRange(kt))}}}function EKe(x){return x&&x.nodeType===Kw}function DKe(x,S){return!x||!S?!1:x===S?!0:EKe(x)?!1:EKe(S)?DKe(x,S.parentNode):"contains"in x?x.contains(S):x.compareDocumentPosition?!!(x.compareDocumentPosition(S)&16):!1}function XQt(x){return x&&x.ownerDocument&&DKe(x.ownerDocument.documentElement,x)}function ZQt(x){try{return typeof x.contentWindow.location.href=="string"}catch{return!1}}function kKe(){for(var x=window,S=iN();S instanceof x.HTMLIFrameElement;){if(ZQt(S))x=S.contentWindow;else return S;S=iN(x.document)}return S}function tve(x){var S=x&&x.nodeName&&x.nodeName.toLowerCase();return S&&(S==="input"&&(x.type==="text"||x.type==="search"||x.type==="tel"||x.type==="url"||x.type==="password")||S==="textarea"||x.contentEditable==="true")}function QQt(){var x=kKe();return{focusedElem:x,selectionRange:tve(x)?eJt(x):null}}function JQt(x){var S=kKe(),L=x.focusedElem,j=x.selectionRange;if(S!==L&&XQt(L)){j!==null&&tve(L)&&tJt(L,j);for(var W=[],G=L;G=G.parentNode;)G.nodeType===Um&&W.push({element:G,left:G.scrollLeft,top:G.scrollTop});typeof L.focus=="function"&&L.focus();for(var te=0;te<W.length;te++){var pe=W[te];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}}function eJt(x){var S;return"selectionStart"in x?S={start:x.selectionStart,end:x.selectionEnd}:S=qQt(x),S||{start:0,end:0}}function tJt(x,S){var L=S.start,j=S.end;j===void 0&&(j=L),"selectionStart"in x?(x.selectionStart=L,x.selectionEnd=Math.min(j,x.value.length)):YQt(x,S)}var nJt=be&&"documentMode"in document&&document.documentMode<=11;function iJt(){ie("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var KR=null,nve=null,h8=null,ive=!1;function rJt(x){if("selectionStart"in x&&tve(x))return{start:x.selectionStart,end:x.selectionEnd};var S=x.ownerDocument&&x.ownerDocument.defaultView||window,L=S.getSelection();return{anchorNode:L.anchorNode,anchorOffset:L.anchorOffset,focusNode:L.focusNode,focusOffset:L.focusOffset}}function oJt(x){return x.window===x?x.document:x.nodeType===qw?x:x.ownerDocument}function MKe(x,S,L){var j=oJt(L);if(!(ive||KR==null||KR!==iN(j))){var W=rJt(KR);if(!h8||!d8(h8,W)){h8=W;var G=gY(nve,"onSelect");if(G.length>0){var te=new Ybe("onSelect","select",null,S,L);x.push({event:te,listeners:G}),te.target=KR}}}}function sJt(x,S,L,j,W,G,te){var pe=L?ZR(L):window;switch(S){case"focusin":(yKe(pe)||pe.contentEditable==="true")&&(KR=pe,nve=L,h8=null);break;case"focusout":KR=null,nve=null,h8=null;break;case"mousedown":ive=!0;break;case"contextmenu":case"mouseup":case"dragend":ive=!1,MKe(x,j,W);break;case"selectionchange":if(nJt)break;case"keydown":case"keyup":MKe(x,j,W)}}function fY(x,S){var L={};return L[x.toLowerCase()]=S.toLowerCase(),L["Webkit"+x]="webkit"+S,L["Moz"+x]="moz"+S,L}var qR={animationend:fY("Animation","AnimationEnd"),animationiteration:fY("Animation","AnimationIteration"),animationstart:fY("Animation","AnimationStart"),transitionend:fY("Transition","TransitionEnd")},rve={},LKe={};be&&(LKe=document.createElement("div").style,"AnimationEvent"in window||(delete qR.animationend.animation,delete qR.animationiteration.animation,delete qR.animationstart.animation),"TransitionEvent"in window||delete qR.transitionend.transition);function mY(x){if(rve[x])return rve[x];if(!qR[x])return x;var S=qR[x];for(var L in S)if(S.hasOwnProperty(L)&&L in LKe)return rve[x]=S[L];return x}var TKe=mY("animationend"),IKe=mY("animationiteration"),AKe=mY("animationstart"),RKe=mY("transitionend"),PKe=new Map,OKe=["abort","auxClick","cancel","canPlay","canPlayThrough","click","close","contextMenu","copy","cut","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","gotPointerCapture","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","lostPointerCapture","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","pointerCancel","pointerDown","pointerMove","pointerOut","pointerOver","pointerUp","progress","rateChange","reset","resize","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchStart","volumeChange","scroll","toggle","touchMove","waiting","wheel"];function uN(x,S){PKe.set(x,S),ie(S,[x])}function aJt(){for(var x=0;x<OKe.length;x++){var S=OKe[x],L=S.toLowerCase(),j=S[0].toUpperCase()+S.slice(1);uN(L,"on"+j)}uN(TKe,"onAnimationEnd"),uN(IKe,"onAnimationIteration"),uN(AKe,"onAnimationStart"),uN("dblclick","onDoubleClick"),uN("focusin","onFocus"),uN("focusout","onBlur"),uN(RKe,"onTransitionEnd")}function lJt(x,S,L,j,W,G,te){var pe=PKe.get(S);if(pe!==void 0){var ke=Ybe,Ue=S;switch(S){case"keypress":if(cY(j)===0)return;case"keydown":case"keyup":ke=cQt;break;case"focusin":Ue="focus",ke=Qbe;break;case"focusout":Ue="blur",ke=Qbe;break;case"beforeblur":case"afterblur":ke=Qbe;break;case"click":if(j.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ke=lKe;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ke=YZt;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ke=hQt;break;case TKe:case IKe:case AKe:ke=QZt;break;case RKe:ke=mQt;break;case"scroll":ke=KZt;break;case"wheel":ke=gQt;break;case"copy":case"cut":case"paste":ke=eQt;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ke=uKe;break}var et=(G&j$)!==0;{var kt=!et&&S==="scroll",Dt=hJt(L,pe,j.type,et,kt);if(Dt.length>0){var Zt=new ke(pe,Ue,null,j,W);x.push({event:Zt,listeners:Dt})}}}}aJt(),HQt(),LQt(),iJt(),yQt();function cJt(x,S,L,j,W,G,te){lJt(x,S,L,j,W,G);var pe=(G&rXt)===0;pe&&(WQt(x,S,L,j,W),zQt(x,S,L,j,W),sJt(x,S,L,j,W),DQt(x,S,L,j,W))}var f8=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],ove=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(f8));function jKe(x,S,L){var j=x.type||"unknown-event";x.currentTarget=L,gXt(j,S,void 0,x),x.currentTarget=null}function uJt(x,S,L){var j;if(L)for(var W=S.length-1;W>=0;W--){var G=S[W],te=G.instance,pe=G.currentTarget,ke=G.listener;if(te!==j&&x.isPropagationStopped())return;jKe(x,ke,pe),j=te}else for(var Ue=0;Ue<S.length;Ue++){var et=S[Ue],kt=et.instance,Dt=et.currentTarget,Zt=et.listener;if(kt!==j&&x.isPropagationStopped())return;jKe(x,Zt,Dt),j=kt}}function FKe(x,S){for(var L=(S&j$)!==0,j=0;j<x.length;j++){var W=x[j],G=W.event,te=W.listeners;uJt(G,te,L)}bXt()}function dJt(x,S,L,j,W){var G=ebe(L),te=[];cJt(te,x,j,L,G,S),FKe(te,S)}function Pl(x,S){ove.has(x)||s('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',x);var L=!1,j=Ben(S),W=pJt(x);j.has(W)||($Ke(S,x,Jge,L),j.add(W))}function sve(x,S,L){ove.has(x)&&!S&&s('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',x);var j=0;S&&(j|=j$),$Ke(L,x,j,S)}var pY="_reactListening"+Math.random().toString(36).slice(2);function m8(x){if(!x[pY]){x[pY]=!0,oe.forEach(function(L){L!=="selectionchange"&&(ove.has(L)||sve(L,!1,x),sve(L,!0,x))});var S=x.nodeType===qw?x:x.ownerDocument;S!==null&&(S[pY]||(S[pY]=!0,sve("selectionchange",!1,S)))}}function $Ke(x,S,L,j,W){var G=OZt(x,S,L),te=void 0;ibe&&(S==="touchstart"||S==="touchmove"||S==="wheel")&&(te=!0),x=x,j?te!==void 0?zZt(x,S,G,te):BZt(x,S,G):te!==void 0?HZt(x,S,G,te):VZt(x,S,G)}function VKe(x,S){return x===S||x.nodeType===du&&x.parentNode===S}function ave(x,S,L,j,W){var G=j;if(!(S&pUe)&&!(S&Jge)){var te=W;if(j!==null){var pe=j;e:for(;;){if(pe===null)return;var ke=pe.tag;if(ke===d||ke===h){var Ue=pe.stateNode.containerInfo;if(VKe(Ue,te))break;if(ke===h)for(var et=pe.return;et!==null;){var kt=et.tag;if(kt===d||kt===h){var Dt=et.stateNode.containerInfo;if(VKe(Dt,te))return}et=et.return}for(;Ue!==null;){var Zt=UM(Ue);if(Zt===null)return;var nn=Zt.tag;if(nn===f||nn===m){pe=G=Zt;continue e}Ue=Ue.parentNode}}pe=pe.return}}}xUe(function(){return dJt(x,S,L,G)})}function p8(x,S,L){return{instance:x,listener:S,currentTarget:L}}function hJt(x,S,L,j,W,G){for(var te=S!==null?S+"Capture":null,pe=j?te:S,ke=[],Ue=x,et=null;Ue!==null;){var kt=Ue,Dt=kt.stateNode,Zt=kt.tag;if(Zt===f&&Dt!==null&&(et=Dt,pe!==null)){var nn=$$(Ue,pe);nn!=null&&ke.push(p8(Ue,nn,et))}if(W)break;Ue=Ue.return}return ke}function gY(x,S){for(var L=S+"Capture",j=[],W=x;W!==null;){var G=W,te=G.stateNode,pe=G.tag;if(pe===f&&te!==null){var ke=te,Ue=$$(W,L);Ue!=null&&j.unshift(p8(W,Ue,ke));var et=$$(W,S);et!=null&&j.push(p8(W,et,ke))}W=W.return}return j}function GR(x){if(x===null)return null;do x=x.return;while(x&&x.tag!==f);return x||null}function fJt(x,S){for(var L=x,j=S,W=0,G=L;G;G=GR(G))W++;for(var te=0,pe=j;pe;pe=GR(pe))te++;for(;W-te>0;)L=GR(L),W--;for(;te-W>0;)j=GR(j),te--;for(var ke=W;ke--;){if(L===j||j!==null&&L===j.alternate)return L;L=GR(L),j=GR(j)}return null}function BKe(x,S,L,j,W){for(var G=S._reactName,te=[],pe=L;pe!==null&&pe!==j;){var ke=pe,Ue=ke.alternate,et=ke.stateNode,kt=ke.tag;if(Ue!==null&&Ue===j)break;if(kt===f&&et!==null){var Dt=et;if(W){var Zt=$$(pe,G);Zt!=null&&te.unshift(p8(pe,Zt,Dt))}else if(!W){var nn=$$(pe,G);nn!=null&&te.push(p8(pe,nn,Dt))}}pe=pe.return}te.length!==0&&x.push({event:S,listeners:te})}function mJt(x,S,L,j,W){var G=j&&W?fJt(j,W):null;j!==null&&BKe(x,S,j,G,!1),W!==null&&L!==null&&BKe(x,L,W,G,!0)}function pJt(x,S){return x+"__bubble"}var Km=!1,g8="dangerouslySetInnerHTML",bY="suppressContentEditableWarning",dN="suppressHydrationWarning",zKe="autoFocus",HM="children",WM="style",vY="__html",lve,yY,b8,HKe,_Y,WKe,UKe;lve={dialog:!0,webview:!0},yY=function(x,S){ZYt(x,S),QYt(x,S),iXt(x,S,{registrationNameDependencies:fe,possibleRegistrationNames:de})},WKe=be&&!document.documentMode,b8=function(x,S,L){if(!Km){var j=xY(L),W=xY(S);W!==j&&(Km=!0,s("Prop `%s` did not match. Server: %s Client: %s",x,JSON.stringify(W),JSON.stringify(j)))}},HKe=function(x){if(!Km){Km=!0;var S=[];x.forEach(function(L){S.push(L)}),s("Extra attributes from the server: %s",S)}},_Y=function(x,S){S===!1?s("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",x,x,x):s("Expected `%s` listener to be a function, instead got a value of `%s` type.",x,typeof S)},UKe=function(x,S){var L=x.namespaceURI===Uw?x.ownerDocument.createElement(x.tagName):x.ownerDocument.createElementNS(x.namespaceURI,x.tagName);return L.innerHTML=S,L.innerHTML};var gJt=/\r\n?/g,bJt=/\u0000|\uFFFD/g;function xY(x){me(x);var S=typeof x=="string"?x:""+x;return S.replace(gJt,`
`).replace(bJt,"")}function wY(x,S,L,j){var W=xY(S),G=xY(x);if(G!==W&&(j&&(Km||(Km=!0,s('Text content did not match. Server: "%s" Client: "%s"',G,W))),L&&$))throw new Error("Text content does not match server-rendered HTML.")}function KKe(x){return x.nodeType===qw?x:x.ownerDocument}function vJt(){}function CY(x){x.onclick=vJt}function yJt(x,S,L,j,W){for(var G in j)if(j.hasOwnProperty(G)){var te=j[G];if(G===WM)te&&Object.freeze(te),cUe(S,te);else if(G===g8){var pe=te?te[vY]:void 0;pe!=null&&rUe(S,pe)}else if(G===HM)if(typeof te=="string"){var ke=x!=="textarea"||te!=="";ke&&UG(S,te)}else typeof te=="number"&&UG(S,""+te);else G===bY||G===dN||G===zKe||(fe.hasOwnProperty(G)?te!=null&&(typeof te!="function"&&_Y(G,te),G==="onScroll"&&Pl("scroll",S)):te!=null&&at(S,G,te,W))}}function _Jt(x,S,L,j){for(var W=0;W<S.length;W+=2){var G=S[W],te=S[W+1];G===WM?cUe(x,te):G===g8?rUe(x,te):G===HM?UG(x,te):at(x,G,te,j)}}function xJt(x,S,L,j){var W,G=KKe(L),te,pe=j;if(pe===Uw&&(pe=qge(x)),pe===Uw){if(W=IM(x,S),!W&&x!==x.toLowerCase()&&s("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",x),x==="script"){var ke=G.createElement("div");ke.innerHTML="<script><\/script>";var Ue=ke.firstChild;te=ke.removeChild(Ue)}else if(typeof S.is=="string")te=G.createElement(x,{is:S.is});else if(te=G.createElement(x),x==="select"){var et=te;S.multiple?et.multiple=!0:S.size&&(et.size=S.size)}}else te=G.createElementNS(pe,x);return pe===Uw&&!W&&Object.prototype.toString.call(te)==="[object HTMLUnknownElement]"&&!le.call(lve,x)&&(lve[x]=!0,s("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",x)),te}function wJt(x,S){return KKe(S).createTextNode(x)}function CJt(x,S,L,j){var W=IM(S,L);yY(S,L);var G;switch(S){case"dialog":Pl("cancel",x),Pl("close",x),G=L;break;case"iframe":case"object":case"embed":Pl("load",x),G=L;break;case"video":case"audio":for(var te=0;te<f8.length;te++)Pl(f8[te],x);G=L;break;case"source":Pl("error",x),G=L;break;case"img":case"image":case"link":Pl("error",x),Pl("load",x),G=L;break;case"details":Pl("toggle",x),G=L;break;case"input":pt(x,L),G=Ae(x,L),Pl("invalid",x);break;case"option":rl(x,L),G=L;break;case"select":P$(x,L),G=R$(x,L),Pl("invalid",x);break;case"textarea":tUe(x,L),G=Uge(x,L),Pl("invalid",x);break;default:G=L}switch(Qge(S,G),yJt(S,x,j,G,W),S){case"input":Hw(x),ni(x,L,!1);break;case"textarea":Hw(x),iUe(x);break;case"option":Rl(x,L);break;case"select":Wge(x,L);break;default:typeof G.onClick=="function"&&CY(x);break}}function SJt(x,S,L,j,W){yY(S,j);var G=null,te,pe;switch(S){case"input":te=Ae(x,L),pe=Ae(x,j),G=[];break;case"select":te=R$(x,L),pe=R$(x,j),G=[];break;case"textarea":te=Uge(x,L),pe=Uge(x,j),G=[];break;default:te=L,pe=j,typeof te.onClick!="function"&&typeof pe.onClick=="function"&&CY(x);break}Qge(S,pe);var ke,Ue,et=null;for(ke in te)if(!(pe.hasOwnProperty(ke)||!te.hasOwnProperty(ke)||te[ke]==null))if(ke===WM){var kt=te[ke];for(Ue in kt)kt.hasOwnProperty(Ue)&&(et||(et={}),et[Ue]="")}else ke===g8||ke===HM||ke===bY||ke===dN||ke===zKe||(fe.hasOwnProperty(ke)?G||(G=[]):(G=G||[]).push(ke,null));for(ke in pe){var Dt=pe[ke],Zt=te!=null?te[ke]:void 0;if(!(!pe.hasOwnProperty(ke)||Dt===Zt||Dt==null&&Zt==null))if(ke===WM)if(Dt&&Object.freeze(Dt),Zt){for(Ue in Zt)Zt.hasOwnProperty(Ue)&&(!Dt||!Dt.hasOwnProperty(Ue))&&(et||(et={}),et[Ue]="");for(Ue in Dt)Dt.hasOwnProperty(Ue)&&Zt[Ue]!==Dt[Ue]&&(et||(et={}),et[Ue]=Dt[Ue])}else et||(G||(G=[]),G.push(ke,et)),et=Dt;else if(ke===g8){var nn=Dt?Dt[vY]:void 0,xn=Zt?Zt[vY]:void 0;nn!=null&&xn!==nn&&(G=G||[]).push(ke,nn)}else ke===HM?(typeof Dt=="string"||typeof Dt=="number")&&(G=G||[]).push(ke,""+Dt):ke===bY||ke===dN||(fe.hasOwnProperty(ke)?(Dt!=null&&(typeof Dt!="function"&&_Y(ke,Dt),ke==="onScroll"&&Pl("scroll",x)),!G&&Zt!==Dt&&(G=[])):(G=G||[]).push(ke,Dt))}return et&&(HYt(et,pe[WM]),(G=G||[]).push(WM,et)),G}function NJt(x,S,L,j,W){L==="input"&&W.type==="radio"&&W.name!=null&&tn(x,W);var G=IM(L,j),te=IM(L,W);switch(_Jt(x,S,G,te),L){case"input":pn(x,W);break;case"textarea":nUe(x,W);break;case"select":_Yt(x,W);break}}function EJt(x){{var S=x.toLowerCase();return KG.hasOwnProperty(S)&&KG[S]||null}}function DJt(x,S,L,j,W,G,te){var pe,ke;switch(pe=IM(S,L),yY(S,L),S){case"dialog":Pl("cancel",x),Pl("close",x);break;case"iframe":case"object":case"embed":Pl("load",x);break;case"video":case"audio":for(var Ue=0;Ue<f8.length;Ue++)Pl(f8[Ue],x);break;case"source":Pl("error",x);break;case"img":case"image":case"link":Pl("error",x),Pl("load",x);break;case"details":Pl("toggle",x);break;case"input":pt(x,L),Pl("invalid",x);break;case"option":rl(x,L);break;case"select":P$(x,L),Pl("invalid",x);break;case"textarea":tUe(x,L),Pl("invalid",x);break}Qge(S,L);{ke=new Set;for(var et=x.attributes,kt=0;kt<et.length;kt++){var Dt=et[kt].name.toLowerCase();switch(Dt){case"value":break;case"checked":break;case"selected":break;default:ke.add(et[kt].name)}}}var Zt=null;for(var nn in L)if(L.hasOwnProperty(nn)){var xn=L[nn];if(nn===HM)typeof xn=="string"?x.textContent!==xn&&(L[dN]!==!0&&wY(x.textContent,xn,G,te),Zt=[HM,xn]):typeof xn=="number"&&x.textContent!==""+xn&&(L[dN]!==!0&&wY(x.textContent,xn,G,te),Zt=[HM,""+xn]);else if(fe.hasOwnProperty(nn))xn!=null&&(typeof xn!="function"&&_Y(nn,xn),nn==="onScroll"&&Pl("scroll",x));else if(te&&typeof pe=="boolean"){var Ni=void 0,wr=pe&&U?null:St(nn);if(L[dN]!==!0){if(!(nn===bY||nn===dN||nn==="value"||nn==="checked"||nn==="selected")){if(nn===g8){var sr=x.innerHTML,os=xn?xn[vY]:void 0;if(os!=null){var Ko=UKe(x,os);Ko!==sr&&b8(nn,sr,Ko)}}else if(nn===WM){if(ke.delete(nn),WKe){var Bt=BYt(xn);Ni=x.getAttribute("style"),Bt!==Ni&&b8(nn,Ni,Bt)}}else if(pe&&!U)ke.delete(nn.toLowerCase()),Ni=dt(x,nn,xn),xn!==Ni&&b8(nn,Ni,xn);else if(!je(nn,wr,pe)&&!rt(nn,xn,wr,pe)){var wn=!1;if(wr!==null)ke.delete(wr.attributeName),Ni=Ze(x,nn,xn,wr);else{var zt=j;if(zt===Uw&&(zt=qge(S)),zt===Uw)ke.delete(nn.toLowerCase());else{var Bn=EJt(nn);Bn!==null&&Bn!==nn&&(wn=!0,ke.delete(Bn)),ke.delete(nn)}Ni=dt(x,nn,xn)}var Pi=U;!Pi&&xn!==Ni&&!wn&&b8(nn,Ni,xn)}}}}}switch(te&&ke.size>0&&L[dN]!==!0&&HKe(ke),S){case"input":Hw(x),ni(x,L,!0);break;case"textarea":Hw(x),iUe(x);break;case"select":case"option":break;default:typeof L.onClick=="function"&&CY(x);break}return Zt}function kJt(x,S,L){var j=x.nodeValue!==S;return j}function cve(x,S){{if(Km)return;Km=!0,s("Did not expect server HTML to contain a <%s> in <%s>.",S.nodeName.toLowerCase(),x.nodeName.toLowerCase())}}function uve(x,S){{if(Km)return;Km=!0,s('Did not expect server HTML to contain the text node "%s" in <%s>.',S.nodeValue,x.nodeName.toLowerCase())}}function dve(x,S,L){{if(Km)return;Km=!0,s("Expected server HTML to contain a matching <%s> in <%s>.",S,x.nodeName.toLowerCase())}}function hve(x,S){{if(S===""||Km)return;Km=!0,s('Expected server HTML to contain a matching text node for "%s" in <%s>.',S,x.nodeName.toLowerCase())}}function MJt(x,S,L){switch(S){case"input":Br(x,L);return;case"textarea":wYt(x,L);return;case"select":xYt(x,L);return}}var v8=function(){},y8=function(){};{var LJt=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],qKe=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],TJt=qKe.concat(["button"]),IJt=["dd","dt","li","option","optgroup","p","rp","rt"],GKe={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};y8=function(x,S){var L=mi({},x||GKe),j={tag:S};return qKe.indexOf(S)!==-1&&(L.aTagInScope=null,L.buttonTagInScope=null,L.nobrTagInScope=null),TJt.indexOf(S)!==-1&&(L.pTagInButtonScope=null),LJt.indexOf(S)!==-1&&S!=="address"&&S!=="div"&&S!=="p"&&(L.listItemTagAutoclosing=null,L.dlItemTagAutoclosing=null),L.current=j,S==="form"&&(L.formTag=j),S==="a"&&(L.aTagInScope=j),S==="button"&&(L.buttonTagInScope=j),S==="nobr"&&(L.nobrTagInScope=j),S==="p"&&(L.pTagInButtonScope=j),S==="li"&&(L.listItemTagAutoclosing=j),(S==="dd"||S==="dt")&&(L.dlItemTagAutoclosing=j),L};var AJt=function(x,S){switch(S){case"select":return x==="option"||x==="optgroup"||x==="#text";case"optgroup":return x==="option"||x==="#text";case"option":return x==="#text";case"tr":return x==="th"||x==="td"||x==="style"||x==="script"||x==="template";case"tbody":case"thead":case"tfoot":return x==="tr"||x==="style"||x==="script"||x==="template";case"colgroup":return x==="col"||x==="template";case"table":return x==="caption"||x==="colgroup"||x==="tbody"||x==="tfoot"||x==="thead"||x==="style"||x==="script"||x==="template";case"head":return x==="base"||x==="basefont"||x==="bgsound"||x==="link"||x==="meta"||x==="title"||x==="noscript"||x==="noframes"||x==="style"||x==="script"||x==="template";case"html":return x==="head"||x==="body"||x==="frameset";case"frameset":return x==="frame";case"#document":return x==="html"}switch(x){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return S!=="h1"&&S!=="h2"&&S!=="h3"&&S!=="h4"&&S!=="h5"&&S!=="h6";case"rp":case"rt":return IJt.indexOf(S)===-1;case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return S==null}return!0},RJt=function(x,S){switch(x){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return S.pTagInButtonScope;case"form":return S.formTag||S.pTagInButtonScope;case"li":return S.listItemTagAutoclosing;case"dd":case"dt":return S.dlItemTagAutoclosing;case"button":return S.buttonTagInScope;case"a":return S.aTagInScope;case"nobr":return S.nobrTagInScope}return null},YKe={};v8=function(x,S,L){L=L||GKe;var j=L.current,W=j&&j.tag;S!=null&&(x!=null&&s("validateDOMNesting: when childText is passed, childTag should be null"),x="#text");var G=AJt(x,W)?null:j,te=G?null:RJt(x,L),pe=G||te;if(pe){var ke=pe.tag,Ue=!!G+"|"+x+"|"+ke;if(!YKe[Ue]){YKe[Ue]=!0;var et=x,kt="";if(x==="#text"?/\S/.test(S)?et="Text nodes":(et="Whitespace text nodes",kt=" Make sure you don't have any extra whitespace between tags on each line of your source code."):et="<"+x+">",G){var Dt="";ke==="table"&&x==="tr"&&(Dt+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),s("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",et,ke,kt,Dt)}else s("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",et,ke)}}}}var SY="suppressHydrationWarning",NY="$",EY="/$",_8="$?",x8="$!",PJt="style",fve=null,mve=null;function OJt(x){var S,L,j=x.nodeType;switch(j){case qw:case Yge:{S=j===qw?"#document":"#fragment";var W=x.documentElement;L=W?W.namespaceURI:Gge(null,"");break}default:{var G=j===du?x.parentNode:x,te=G.namespaceURI||null;S=G.tagName,L=Gge(te,S);break}}{var pe=S.toLowerCase(),ke=y8(null,pe);return{namespace:L,ancestorInfo:ke}}}function jJt(x,S,L){{var j=x,W=Gge(j.namespace,S),G=y8(j.ancestorInfo,S);return{namespace:W,ancestorInfo:G}}}function T3r(x){return x}function FJt(x){fve=PZt(),mve=QQt();var S=null;return iKe(!1),S}function $Jt(x){JQt(mve),iKe(fve),fve=null,mve=null}function VJt(x,S,L,j,W){var G;{var te=j;if(v8(x,null,te.ancestorInfo),typeof S.children=="string"||typeof S.children=="number"){var pe=""+S.children,ke=y8(te.ancestorInfo,x);v8(null,pe,ke)}G=te.namespace}var Ue=xJt(x,S,L,G);return S8(W,Ue),wve(Ue,S),Ue}function BJt(x,S){x.appendChild(S)}function zJt(x,S,L,j,W){switch(CJt(x,S,L,j),S){case"button":case"input":case"select":case"textarea":return!!L.autoFocus;case"img":return!0;default:return!1}}function HJt(x,S,L,j,W,G){{var te=G;if(typeof j.children!=typeof L.children&&(typeof j.children=="string"||typeof j.children=="number")){var pe=""+j.children,ke=y8(te.ancestorInfo,S);v8(null,pe,ke)}}return SJt(x,S,L,j)}function pve(x,S){return x==="textarea"||x==="noscript"||typeof S.children=="string"||typeof S.children=="number"||typeof S.dangerouslySetInnerHTML=="object"&&S.dangerouslySetInnerHTML!==null&&S.dangerouslySetInnerHTML.__html!=null}function WJt(x,S,L,j){{var W=L;v8(null,x,W.ancestorInfo)}var G=wJt(x,S);return S8(j,G),G}function UJt(){var x=window.event;return x===void 0?e1:rKe(x.type)}var gve=typeof setTimeout=="function"?setTimeout:void 0,KJt=typeof clearTimeout=="function"?clearTimeout:void 0,bve=-1,XKe=typeof Promise=="function"?Promise:void 0,qJt=typeof queueMicrotask=="function"?queueMicrotask:typeof XKe<"u"?function(x){return XKe.resolve(null).then(x).catch(GJt)}:gve;function GJt(x){setTimeout(function(){throw x})}function YJt(x,S,L,j){switch(S){case"button":case"input":case"select":case"textarea":L.autoFocus&&x.focus();return;case"img":{L.src&&(x.src=L.src);return}}}function XJt(x,S,L,j,W,G){NJt(x,S,L,j,W),wve(x,W)}function ZKe(x){UG(x,"")}function ZJt(x,S,L){x.nodeValue=L}function QJt(x,S){x.appendChild(S)}function JJt(x,S){var L;x.nodeType===du?(L=x.parentNode,L.insertBefore(S,x)):(L=x,L.appendChild(S));var j=x._reactRootContainer;j==null&&L.onclick===null&&CY(L)}function een(x,S,L){x.insertBefore(S,L)}function ten(x,S,L){x.nodeType===du?x.parentNode.insertBefore(S,L):x.insertBefore(S,L)}function nen(x,S){x.removeChild(S)}function ien(x,S){x.nodeType===du?x.parentNode.removeChild(S):x.removeChild(S)}function vve(x,S){var L=S,j=0;do{var W=L.nextSibling;if(x.removeChild(L),W&&W.nodeType===du){var G=W.data;if(G===EY)if(j===0){x.removeChild(W),i8(S);return}else j--;else(G===NY||G===_8||G===x8)&&j++}L=W}while(L);i8(S)}function ren(x,S){x.nodeType===du?vve(x.parentNode,S):x.nodeType===Um&&vve(x,S),i8(x)}function oen(x){x=x;var S=x.style;typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none"}function sen(x){x.nodeValue=""}function aen(x,S){x=x;var L=S[PJt],j=L!=null&&L.hasOwnProperty("display")?L.display:null;x.style.display=Xge("display",j)}function len(x,S){x.nodeValue=S}function cen(x){x.nodeType===Um?x.textContent="":x.nodeType===qw&&x.documentElement&&x.removeChild(x.documentElement)}function uen(x,S,L){return x.nodeType!==Um||S.toLowerCase()!==x.nodeName.toLowerCase()?null:x}function den(x,S){return S===""||x.nodeType!==Kw?null:x}function hen(x){return x.nodeType!==du?null:x}function QKe(x){return x.data===_8}function yve(x){return x.data===x8}function fen(x){var S=x.nextSibling&&x.nextSibling.dataset,L,j,W;return S&&(L=S.dgst,j=S.msg,W=S.stck),{message:j,digest:L,stack:W}}function men(x,S){x._reactRetry=S}function DY(x){for(;x!=null;x=x.nextSibling){var S=x.nodeType;if(S===Um||S===Kw)break;if(S===du){var L=x.data;if(L===NY||L===x8||L===_8)break;if(L===EY)return null}}return x}function w8(x){return DY(x.nextSibling)}function pen(x){return DY(x.firstChild)}function gen(x){return DY(x.firstChild)}function ben(x){return DY(x.nextSibling)}function ven(x,S,L,j,W,G,te){S8(G,x),wve(x,L);var pe;{var ke=W;pe=ke.namespace}var Ue=(G.mode&is)!==kr;return DJt(x,S,L,pe,j,Ue,te)}function yen(x,S,L,j){return S8(L,x),L.mode&is,kJt(x,S)}function _en(x,S){S8(S,x)}function xen(x){for(var S=x.nextSibling,L=0;S;){if(S.nodeType===du){var j=S.data;if(j===EY){if(L===0)return w8(S);L--}else(j===NY||j===x8||j===_8)&&L++}S=S.nextSibling}return null}function JKe(x){for(var S=x.previousSibling,L=0;S;){if(S.nodeType===du){var j=S.data;if(j===NY||j===x8||j===_8){if(L===0)return S;L--}else j===EY&&L++}S=S.previousSibling}return null}function wen(x){i8(x)}function Cen(x){i8(x)}function Sen(x){return x!=="head"&&x!=="body"}function Nen(x,S,L,j){var W=!0;wY(S.nodeValue,L,j,W)}function Een(x,S,L,j,W,G){if(S[SY]!==!0){var te=!0;wY(j.nodeValue,W,G,te)}}function Den(x,S){S.nodeType===Um?cve(x,S):S.nodeType===du||uve(x,S)}function ken(x,S){{var L=x.parentNode;L!==null&&(S.nodeType===Um?cve(L,S):S.nodeType===du||uve(L,S))}}function Men(x,S,L,j,W){(W||S[SY]!==!0)&&(j.nodeType===Um?cve(L,j):j.nodeType===du||uve(L,j))}function Len(x,S,L){dve(x,S)}function Ten(x,S){hve(x,S)}function Ien(x,S,L){{var j=x.parentNode;j!==null&&dve(j,S)}}function Aen(x,S){{var L=x.parentNode;L!==null&&hve(L,S)}}function Ren(x,S,L,j,W,G){(G||S[SY]!==!0)&&dve(L,j)}function Pen(x,S,L,j,W){(W||S[SY]!==!0)&&hve(L,j)}function Oen(x){s("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",x.nodeName.toLowerCase())}function jen(x){m8(x)}var YR=Math.random().toString(36).slice(2),XR="__reactFiber$"+YR,_ve="__reactProps$"+YR,C8="__reactContainer$"+YR,xve="__reactEvents$"+YR,Fen="__reactListeners$"+YR,$en="__reactHandles$"+YR;function Ven(x){delete x[XR],delete x[_ve],delete x[xve],delete x[Fen],delete x[$en]}function S8(x,S){S[XR]=x}function kY(x,S){S[C8]=x}function eqe(x){x[C8]=null}function N8(x){return!!x[C8]}function UM(x){var S=x[XR];if(S)return S;for(var L=x.parentNode;L;){if(S=L[C8]||L[XR],S){var j=S.alternate;if(S.child!==null||j!==null&&j.child!==null)for(var W=JKe(x);W!==null;){var G=W[XR];if(G)return G;W=JKe(W)}return S}x=L,L=x.parentNode}return null}function hN(x){var S=x[XR]||x[C8];return S&&(S.tag===f||S.tag===m||S.tag===N||S.tag===d)?S:null}function ZR(x){if(x.tag===f||x.tag===m)return x.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function MY(x){return x[_ve]||null}function wve(x,S){x[_ve]=S}function Ben(x){var S=x[xve];return S===void 0&&(S=x[xve]=new Set),S}var tqe={},nqe=n.ReactDebugCurrentFrame;function LY(x){if(x){var S=x._owner,L=ua(x.type,x._source,S?S.type:null);nqe.setExtraStackFrame(L)}else nqe.setExtraStackFrame(null)}function sy(x,S,L,j,W){{var G=Function.call.bind(le);for(var te in x)if(G(x,te)){var pe=void 0;try{if(typeof x[te]!="function"){var ke=Error((j||"React class")+": "+L+" type `"+te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[te]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ke.name="Invariant Violation",ke}pe=x[te](S,te,j,L,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ue){pe=Ue}pe&&!(pe instanceof Error)&&(LY(W),s("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",j||"React class",L,te,typeof pe),LY(null)),pe instanceof Error&&!(pe.message in tqe)&&(tqe[pe.message]=!0,LY(W),s("Failed %s type: %s",L,pe.message),LY(null))}}}var Cve=[],TY;TY=[];var t1=-1;function fN(x){return{current:x}}function Jh(x,S){if(t1<0){s("Unexpected pop.");return}S!==TY[t1]&&s("Unexpected Fiber popped."),x.current=Cve[t1],Cve[t1]=null,TY[t1]=null,t1--}function ef(x,S,L){t1++,Cve[t1]=x.current,TY[t1]=L,x.current=S}var Sve;Sve={};var fg={};Object.freeze(fg);var n1=fN(fg),C_=fN(!1),Nve=fg;function QR(x,S,L){return L&&S_(S)?Nve:n1.current}function iqe(x,S,L){{var j=x.stateNode;j.__reactInternalMemoizedUnmaskedChildContext=S,j.__reactInternalMemoizedMaskedChildContext=L}}function JR(x,S){{var L=x.type,j=L.contextTypes;if(!j)return fg;var W=x.stateNode;if(W&&W.__reactInternalMemoizedUnmaskedChildContext===S)return W.__reactInternalMemoizedMaskedChildContext;var G={};for(var te in j)G[te]=S[te];{var pe=bi(x)||"Unknown";sy(j,G,"context",pe)}return W&&iqe(x,S,G),G}}function IY(){return C_.current}function S_(x){{var S=x.childContextTypes;return S!=null}}function AY(x){Jh(C_,x),Jh(n1,x)}function Eve(x){Jh(C_,x),Jh(n1,x)}function rqe(x,S,L){{if(n1.current!==fg)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");ef(n1,S,x),ef(C_,L,x)}}function oqe(x,S,L){{var j=x.stateNode,W=S.childContextTypes;if(typeof j.getChildContext!="function"){{var G=bi(x)||"Unknown";Sve[G]||(Sve[G]=!0,s("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",G,G))}return L}var te=j.getChildContext();for(var pe in te)if(!(pe in W))throw new Error((bi(x)||"Unknown")+'.getChildContext(): key "'+pe+'" is not defined in childContextTypes.');{var ke=bi(x)||"Unknown";sy(W,te,"child context",ke)}return mi({},L,te)}}function RY(x){{var S=x.stateNode,L=S&&S.__reactInternalMemoizedMergedChildContext||fg;return Nve=n1.current,ef(n1,L,x),ef(C_,C_.current,x),!0}}function sqe(x,S,L){{var j=x.stateNode;if(!j)throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(L){var W=oqe(x,S,Nve);j.__reactInternalMemoizedMergedChildContext=W,Jh(C_,x),Jh(n1,x),ef(n1,W,x),ef(C_,L,x)}else Jh(C_,x),ef(C_,L,x)}}function zen(x){{if(!SXt(x)||x.tag!==c)throw new Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var S=x;do{switch(S.tag){case d:return S.stateNode.context;case c:{var L=S.type;if(S_(L))return S.stateNode.__reactInternalMemoizedMergedChildContext;break}}S=S.return}while(S!==null);throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var mN=0,PY=1,i1=null,Dve=!1,kve=!1;function aqe(x){i1===null?i1=[x]:i1.push(x)}function Hen(x){Dve=!0,aqe(x)}function lqe(){Dve&&pN()}function pN(){if(!kve&&i1!==null){kve=!0;var x=0,S=oy();try{var L=!0,j=i1;for(Td(ug);x<j.length;x++){var W=j[x];do W=W(L);while(W!==null)}i1=null,Dve=!1}catch(G){throw i1!==null&&(i1=i1.slice(x+1)),IUe(ZG,pN),G}finally{Td(S),kve=!1}}return null}var eP=[],tP=0,OY=null,jY=0,Nb=[],Eb=0,KM=null,r1=1,o1="";function Wen(x){return GM(),(x.flags&SUe)!==Or}function Uen(x){return GM(),jY}function Ken(){var x=o1,S=r1,L=S&~qen(S);return L.toString(32)+x}function qM(x,S){GM(),eP[tP++]=jY,eP[tP++]=OY,OY=x,jY=S}function cqe(x,S,L){GM(),Nb[Eb++]=r1,Nb[Eb++]=o1,Nb[Eb++]=KM,KM=x;var j=r1,W=o1,G=FY(j)-1,te=j&~(1<<G),pe=L+1,ke=FY(S)+G;if(ke>30){var Ue=G-G%5,et=(1<<Ue)-1,kt=(te&et).toString(32),Dt=te>>Ue,Zt=G-Ue,nn=FY(S)+Zt,xn=pe<<Zt,Ni=xn|Dt,wr=kt+W;r1=1<<nn|Ni,o1=wr}else{var sr=pe<<G,os=sr|te,Ko=W;r1=1<<ke|os,o1=Ko}}function Mve(x){GM();var S=x.return;if(S!==null){var L=1,j=0;qM(x,L),cqe(x,L,j)}}function FY(x){return 32-FUe(x)}function qen(x){return 1<<FY(x)-1}function Lve(x){for(;x===OY;)OY=eP[--tP],eP[tP]=null,jY=eP[--tP],eP[tP]=null;for(;x===KM;)KM=Nb[--Eb],Nb[Eb]=null,o1=Nb[--Eb],Nb[Eb]=null,r1=Nb[--Eb],Nb[Eb]=null}function Gen(){return GM(),KM!==null?{id:r1,overflow:o1}:null}function Yen(x,S){GM(),Nb[Eb++]=r1,Nb[Eb++]=o1,Nb[Eb++]=KM,r1=S.id,o1=S.overflow,KM=x}function GM(){ih()||s("Expected to be hydrating. This is a bug in React. Please file an issue.")}var nh=null,Db=null,ay=!1,YM=!1,gN=null;function Xen(){ay&&s("We should not be hydrating here. This is a bug in React. Please file a bug.")}function uqe(){YM=!0}function Zen(){return YM}function Qen(x){var S=x.stateNode.containerInfo;return Db=gen(S),nh=x,ay=!0,gN=null,YM=!1,!0}function Jen(x,S,L){return Db=ben(S),nh=x,ay=!0,gN=null,YM=!1,L!==null&&Yen(x,L),!0}function dqe(x,S){switch(x.tag){case d:{Den(x.stateNode.containerInfo,S);break}case f:{var L=(x.mode&is)!==kr;Men(x.type,x.memoizedProps,x.stateNode,S,L);break}case N:{var j=x.memoizedState;j.dehydrated!==null&&ken(j.dehydrated,S);break}}}function hqe(x,S){dqe(x,S);var L=irn();L.stateNode=S,L.return=x;var j=x.deletions;j===null?(x.deletions=[L],x.flags|=AM):j.push(L)}function Tve(x,S){{if(YM)return;switch(x.tag){case d:{var L=x.stateNode.containerInfo;switch(S.tag){case f:var j=S.type;S.pendingProps,Len(L,j);break;case m:var W=S.pendingProps;Ten(L,W);break}break}case f:{var G=x.type,te=x.memoizedProps,pe=x.stateNode;switch(S.tag){case f:{var ke=S.type,Ue=S.pendingProps,et=(x.mode&is)!==kr;Ren(G,te,pe,ke,Ue,et);break}case m:{var kt=S.pendingProps,Dt=(x.mode&is)!==kr;Pen(G,te,pe,kt,Dt);break}}break}case N:{var Zt=x.memoizedState,nn=Zt.dehydrated;if(nn!==null)switch(S.tag){case f:var xn=S.type;S.pendingProps,Ien(nn,xn);break;case m:var Ni=S.pendingProps;Aen(nn,Ni);break}break}default:return}}}function fqe(x,S){S.flags=S.flags&~Yw|hu,Tve(x,S)}function mqe(x,S){switch(x.tag){case f:{var L=x.type;x.pendingProps;var j=uen(S,L);return j!==null?(x.stateNode=j,nh=x,Db=pen(j),!0):!1}case m:{var W=x.pendingProps,G=den(S,W);return G!==null?(x.stateNode=G,nh=x,Db=null,!0):!1}case N:{var te=hen(S);if(te!==null){var pe={dehydrated:te,treeContext:Gen(),retryLane:lg};x.memoizedState=pe;var ke=rrn(te);return ke.return=x,x.child=ke,nh=x,Db=null,!0}return!1}default:return!1}}function Ive(x){return(x.mode&is)!==kr&&(x.flags&Us)===Or}function Ave(x){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function Rve(x){if(ay){var S=Db;if(!S){Ive(x)&&(Tve(nh,x),Ave()),fqe(nh,x),ay=!1,nh=x;return}var L=S;if(!mqe(x,S)){Ive(x)&&(Tve(nh,x),Ave()),S=w8(L);var j=nh;if(!S||!mqe(x,S)){fqe(nh,x),ay=!1,nh=x;return}hqe(j,L)}}}function etn(x,S,L){var j=x.stateNode,W=!YM,G=ven(j,x.type,x.memoizedProps,S,L,x,W);return x.updateQueue=G,G!==null}function ttn(x){var S=x.stateNode,L=x.memoizedProps,j=yen(S,L,x);if(j){var W=nh;if(W!==null)switch(W.tag){case d:{var G=W.stateNode.containerInfo,te=(W.mode&is)!==kr;Nen(G,S,L,te);break}case f:{var pe=W.type,ke=W.memoizedProps,Ue=W.stateNode,et=(W.mode&is)!==kr;Een(pe,ke,Ue,S,L,et);break}}}return j}function ntn(x){var S=x.memoizedState,L=S!==null?S.dehydrated:null;if(!L)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");_en(L,x)}function itn(x){var S=x.memoizedState,L=S!==null?S.dehydrated:null;if(!L)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return xen(L)}function pqe(x){for(var S=x.return;S!==null&&S.tag!==f&&S.tag!==d&&S.tag!==N;)S=S.return;nh=S}function $Y(x){if(x!==nh)return!1;if(!ay)return pqe(x),ay=!0,!1;if(x.tag!==d&&(x.tag!==f||Sen(x.type)&&!pve(x.type,x.memoizedProps))){var S=Db;if(S)if(Ive(x))gqe(x),Ave();else for(;S;)hqe(x,S),S=w8(S)}return pqe(x),x.tag===N?Db=itn(x):Db=nh?w8(x.stateNode):null,!0}function rtn(){return ay&&Db!==null}function gqe(x){for(var S=Db;S;)dqe(x,S),S=w8(S)}function nP(){nh=null,Db=null,ay=!1,YM=!1}function bqe(){gN!==null&&(uYe(gN),gN=null)}function ih(){return ay}function Pve(x){gN===null?gN=[x]:gN.push(x)}var otn=n.ReactCurrentBatchConfig,stn=null;function atn(){return otn.transition}var ly={recordUnsafeLifecycleWarnings:function(x,S){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(x,S){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var ltn=function(x){for(var S=null,L=x;L!==null;)L.mode&xc&&(S=L),L=L.return;return S},XM=function(x){var S=[];return x.forEach(function(L){S.push(L)}),S.sort().join(", ")},E8=[],D8=[],k8=[],M8=[],L8=[],T8=[],ZM=new Set;ly.recordUnsafeLifecycleWarnings=function(x,S){ZM.has(x.type)||(typeof S.componentWillMount=="function"&&S.componentWillMount.__suppressDeprecationWarning!==!0&&E8.push(x),x.mode&xc&&typeof S.UNSAFE_componentWillMount=="function"&&D8.push(x),typeof S.componentWillReceiveProps=="function"&&S.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&k8.push(x),x.mode&xc&&typeof S.UNSAFE_componentWillReceiveProps=="function"&&M8.push(x),typeof S.componentWillUpdate=="function"&&S.componentWillUpdate.__suppressDeprecationWarning!==!0&&L8.push(x),x.mode&xc&&typeof S.UNSAFE_componentWillUpdate=="function"&&T8.push(x))},ly.flushPendingUnsafeLifecycleWarnings=function(){var x=new Set;E8.length>0&&(E8.forEach(function(Dt){x.add(bi(Dt)||"Component"),ZM.add(Dt.type)}),E8=[]);var S=new Set;D8.length>0&&(D8.forEach(function(Dt){S.add(bi(Dt)||"Component"),ZM.add(Dt.type)}),D8=[]);var L=new Set;k8.length>0&&(k8.forEach(function(Dt){L.add(bi(Dt)||"Component"),ZM.add(Dt.type)}),k8=[]);var j=new Set;M8.length>0&&(M8.forEach(function(Dt){j.add(bi(Dt)||"Component"),ZM.add(Dt.type)}),M8=[]);var W=new Set;L8.length>0&&(L8.forEach(function(Dt){W.add(bi(Dt)||"Component"),ZM.add(Dt.type)}),L8=[]);var G=new Set;if(T8.length>0&&(T8.forEach(function(Dt){G.add(bi(Dt)||"Component"),ZM.add(Dt.type)}),T8=[]),S.size>0){var te=XM(S);s(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.

* Move code with side effects to componentDidMount, and set initial state in the constructor.

Please update the following components: %s`,te)}if(j.size>0){var pe=XM(j);s(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state

Please update the following components: %s`,pe)}if(G.size>0){var ke=XM(G);s(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.

Please update the following components: %s`,ke)}if(x.size>0){var Ue=XM(x);o(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.

* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.

Please update the following components: %s`,Ue)}if(L.size>0){var et=XM(L);o(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.

Please update the following components: %s`,et)}if(W.size>0){var kt=XM(W);o(`componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.

Please update the following components: %s`,kt)}};var VY=new Map,vqe=new Set;ly.recordLegacyContextWarning=function(x,S){var L=ltn(x);if(L===null){s("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(!vqe.has(x.type)){var j=VY.get(L);(x.type.contextTypes!=null||x.type.childContextTypes!=null||S!==null&&typeof S.getChildContext=="function")&&(j===void 0&&(j=[],VY.set(L,j)),j.push(x))}},ly.flushLegacyContextWarning=function(){VY.forEach(function(x,S){if(x.length!==0){var L=x[0],j=new Set;x.forEach(function(G){j.add(bi(G)||"Component"),vqe.add(G.type)});var W=XM(j);try{nl(L),s(`Legacy context API has been detected within a strict-mode tree.

The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.

Please update the following components: %s

Learn more about this warning here: https://reactjs.org/link/legacy-context`,W)}finally{yc()}}})},ly.discardPendingWarnings=function(){E8=[],D8=[],k8=[],M8=[],L8=[],T8=[],VY=new Map}}var Ove,jve,Fve,$ve,Vve,yqe=function(x,S){};Ove=!1,jve=!1,Fve={},$ve={},Vve={},yqe=function(x,S){if(!(x===null||typeof x!="object")&&!(!x._store||x._store.validated||x.key!=null)){if(typeof x._store!="object")throw new Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");x._store.validated=!0;var L=bi(S)||"Component";$ve[L]||($ve[L]=!0,s('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};function ctn(x){return x.prototype&&x.prototype.isReactComponent}function I8(x,S,L){var j=L.ref;if(j!==null&&typeof j!="function"&&typeof j!="object"){if((x.mode&xc||Y)&&!(L._owner&&L._self&&L._owner.stateNode!==L._self)&&!(L._owner&&L._owner.tag!==c)&&!(typeof L.type=="function"&&!ctn(L.type))&&L._owner){var W=bi(x)||"Component";Fve[W]||(s('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',W,j),Fve[W]=!0)}if(L._owner){var G=L._owner,te;if(G){var pe=G;if(pe.tag!==c)throw new Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");te=pe.stateNode}if(!te)throw new Error("Missing owner for string ref "+j+". This error is likely caused by a bug in React. Please file an issue.");var ke=te;ge(j,"ref");var Ue=""+j;if(S!==null&&S.ref!==null&&typeof S.ref=="function"&&S.ref._stringRef===Ue)return S.ref;var et=function(kt){var Dt=ke.refs;kt===null?delete Dt[Ue]:Dt[Ue]=kt};return et._stringRef=Ue,et}else{if(typeof j!="string")throw new Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!L._owner)throw new Error("Element ref was specified as a string ("+j+`) but no owner was set. This could happen for one of the following reasons:
1. You may be adding a ref to a function component
2. You may be adding a ref to a component that was not created inside a component's render method
3. You have multiple copies of React loaded
See https://reactjs.org/link/refs-must-have-owner for more information.`)}}return j}function BY(x,S){var L=Object.prototype.toString.call(S);throw new Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}function zY(x){{var S=bi(x)||"Component";if(Vve[S])return;Vve[S]=!0,s("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}}function _qe(x){var S=x._payload,L=x._init;return L(S)}function xqe(x){function S(Bt,wn){if(x){var zt=Bt.deletions;zt===null?(Bt.deletions=[wn],Bt.flags|=AM):zt.push(wn)}}function L(Bt,wn){if(!x)return null;for(var zt=wn;zt!==null;)S(Bt,zt),zt=zt.sibling;return null}function j(Bt,wn){for(var zt=new Map,Bn=wn;Bn!==null;)Bn.key!==null?zt.set(Bn.key,Bn):zt.set(Bn.index,Bn),Bn=Bn.sibling;return zt}function W(Bt,wn){var zt=sL(Bt,wn);return zt.index=0,zt.sibling=null,zt}function G(Bt,wn,zt){if(Bt.index=zt,!x)return Bt.flags|=SUe,wn;var Bn=Bt.alternate;if(Bn!==null){var Pi=Bn.index;return Pi<wn?(Bt.flags|=hu,wn):Pi}else return Bt.flags|=hu,wn}function te(Bt){return x&&Bt.alternate===null&&(Bt.flags|=hu),Bt}function pe(Bt,wn,zt,Bn){if(wn===null||wn.tag!==m){var Pi=P0e(zt,Bt.mode,Bn);return Pi.return=Bt,Pi}else{var Di=W(wn,zt);return Di.return=Bt,Di}}function ke(Bt,wn,zt,Bn){var Pi=zt.type;if(Pi===Ve)return et(Bt,wn,zt.props.children,Bn,zt.key);if(wn!==null&&(wn.elementType===Pi||EYe(wn,zt)||typeof Pi=="object"&&Pi!==null&&Pi.$$typeof===ft&&_qe(Pi)===wn.type)){var Di=W(wn,zt.props);return Di.ref=I8(Bt,wn,zt),Di.return=Bt,Di._debugSource=zt._source,Di._debugOwner=zt._owner,Di}var zr=R0e(zt,Bt.mode,Bn);return zr.ref=I8(Bt,wn,zt),zr.return=Bt,zr}function Ue(Bt,wn,zt,Bn){if(wn===null||wn.tag!==h||wn.stateNode.containerInfo!==zt.containerInfo||wn.stateNode.implementation!==zt.implementation){var Pi=O0e(zt,Bt.mode,Bn);return Pi.return=Bt,Pi}else{var Di=W(wn,zt.children||[]);return Di.return=Bt,Di}}function et(Bt,wn,zt,Bn,Pi){if(wn===null||wn.tag!==p){var Di=DN(zt,Bt.mode,Bn,Pi);return Di.return=Bt,Di}else{var zr=W(wn,zt);return zr.return=Bt,zr}}function kt(Bt,wn,zt){if(typeof wn=="string"&&wn!==""||typeof wn=="number"){var Bn=P0e(""+wn,Bt.mode,zt);return Bn.return=Bt,Bn}if(typeof wn=="object"&&wn!==null){switch(wn.$$typeof){case mt:{var Pi=R0e(wn,Bt.mode,zt);return Pi.ref=I8(Bt,null,wn),Pi.return=Bt,Pi}case It:{var Di=O0e(wn,Bt.mode,zt);return Di.return=Bt,Di}case ft:{var zr=wn._payload,lo=wn._init;return kt(Bt,lo(zr),zt)}}if(Ws(wn)||Qi(wn)){var _a=DN(wn,Bt.mode,zt,null);return _a.return=Bt,_a}BY(Bt,wn)}return typeof wn=="function"&&zY(Bt),null}function Dt(Bt,wn,zt,Bn){var Pi=wn!==null?wn.key:null;if(typeof zt=="string"&&zt!==""||typeof zt=="number")return Pi!==null?null:pe(Bt,wn,""+zt,Bn);if(typeof zt=="object"&&zt!==null){switch(zt.$$typeof){case mt:return zt.key===Pi?ke(Bt,wn,zt,Bn):null;case It:return zt.key===Pi?Ue(Bt,wn,zt,Bn):null;case ft:{var Di=zt._payload,zr=zt._init;return Dt(Bt,wn,zr(Di),Bn)}}if(Ws(zt)||Qi(zt))return Pi!==null?null:et(Bt,wn,zt,Bn,null);BY(Bt,zt)}return typeof zt=="function"&&zY(Bt),null}function Zt(Bt,wn,zt,Bn,Pi){if(typeof Bn=="string"&&Bn!==""||typeof Bn=="number"){var Di=Bt.get(zt)||null;return pe(wn,Di,""+Bn,Pi)}if(typeof Bn=="object"&&Bn!==null){switch(Bn.$$typeof){case mt:{var zr=Bt.get(Bn.key===null?zt:Bn.key)||null;return ke(wn,zr,Bn,Pi)}case It:{var lo=Bt.get(Bn.key===null?zt:Bn.key)||null;return Ue(wn,lo,Bn,Pi)}case ft:var _a=Bn._payload,Ls=Bn._init;return Zt(Bt,wn,zt,Ls(_a),Pi)}if(Ws(Bn)||Qi(Bn)){var Wc=Bt.get(zt)||null;return et(wn,Wc,Bn,Pi,null)}BY(wn,Bn)}return typeof Bn=="function"&&zY(wn),null}function nn(Bt,wn,zt){{if(typeof Bt!="object"||Bt===null)return wn;switch(Bt.$$typeof){case mt:case It:yqe(Bt,zt);var Bn=Bt.key;if(typeof Bn!="string")break;if(wn===null){wn=new Set,wn.add(Bn);break}if(!wn.has(Bn)){wn.add(Bn);break}s("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",Bn);break;case ft:var Pi=Bt._payload,Di=Bt._init;nn(Di(Pi),wn,zt);break}}return wn}function xn(Bt,wn,zt,Bn){for(var Pi=null,Di=0;Di<zt.length;Di++){var zr=zt[Di];Pi=nn(zr,Pi,Bt)}for(var lo=null,_a=null,Ls=wn,Wc=0,Ts=0,wc=null;Ls!==null&&Ts<zt.length;Ts++){Ls.index>Ts?(wc=Ls,Ls=null):wc=Ls.sibling;var nf=Dt(Bt,Ls,zt[Ts],Bn);if(nf===null){Ls===null&&(Ls=wc);break}x&&Ls&&nf.alternate===null&&S(Bt,Ls),Wc=G(nf,Wc,Ts),_a===null?lo=nf:_a.sibling=nf,_a=nf,Ls=wc}if(Ts===zt.length){if(L(Bt,Ls),ih()){var uh=Ts;qM(Bt,uh)}return lo}if(Ls===null){for(;Ts<zt.length;Ts++){var pg=kt(Bt,zt[Ts],Bn);pg!==null&&(Wc=G(pg,Wc,Ts),_a===null?lo=pg:_a.sibling=pg,_a=pg)}if(ih()){var zf=Ts;qM(Bt,zf)}return lo}for(var Hf=j(Bt,Ls);Ts<zt.length;Ts++){var rf=Zt(Hf,Bt,Ts,zt[Ts],Bn);rf!==null&&(x&&rf.alternate!==null&&Hf.delete(rf.key===null?Ts:rf.key),Wc=G(rf,Wc,Ts),_a===null?lo=rf:_a.sibling=rf,_a=rf)}if(x&&Hf.forEach(function(xP){return S(Bt,xP)}),ih()){var h1=Ts;qM(Bt,h1)}return lo}function Ni(Bt,wn,zt,Bn){var Pi=Qi(zt);if(typeof Pi!="function")throw new Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{typeof Symbol=="function"&&zt[Symbol.toStringTag]==="Generator"&&(jve||s("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),jve=!0),zt.entries===Pi&&(Ove||s("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Ove=!0);var Di=Pi.call(zt);if(Di)for(var zr=null,lo=Di.next();!lo.done;lo=Di.next()){var _a=lo.value;zr=nn(_a,zr,Bt)}}var Ls=Pi.call(zt);if(Ls==null)throw new Error("An iterable object provided no iterator.");for(var Wc=null,Ts=null,wc=wn,nf=0,uh=0,pg=null,zf=Ls.next();wc!==null&&!zf.done;uh++,zf=Ls.next()){wc.index>uh?(pg=wc,wc=null):pg=wc.sibling;var Hf=Dt(Bt,wc,zf.value,Bn);if(Hf===null){wc===null&&(wc=pg);break}x&&wc&&Hf.alternate===null&&S(Bt,wc),nf=G(Hf,nf,uh),Ts===null?Wc=Hf:Ts.sibling=Hf,Ts=Hf,wc=pg}if(zf.done){if(L(Bt,wc),ih()){var rf=uh;qM(Bt,rf)}return Wc}if(wc===null){for(;!zf.done;uh++,zf=Ls.next()){var h1=kt(Bt,zf.value,Bn);h1!==null&&(nf=G(h1,nf,uh),Ts===null?Wc=h1:Ts.sibling=h1,Ts=h1)}if(ih()){var xP=uh;qM(Bt,xP)}return Wc}for(var uV=j(Bt,wc);!zf.done;uh++,zf=Ls.next()){var I_=Zt(uV,Bt,uh,zf.value,Bn);I_!==null&&(x&&I_.alternate!==null&&uV.delete(I_.key===null?uh:I_.key),nf=G(I_,nf,uh),Ts===null?Wc=I_:Ts.sibling=I_,Ts=I_)}if(x&&uV.forEach(function(Prn){return S(Bt,Prn)}),ih()){var Rrn=uh;qM(Bt,Rrn)}return Wc}function wr(Bt,wn,zt,Bn){if(wn!==null&&wn.tag===m){L(Bt,wn.sibling);var Pi=W(wn,zt);return Pi.return=Bt,Pi}L(Bt,wn);var Di=P0e(zt,Bt.mode,Bn);return Di.return=Bt,Di}function sr(Bt,wn,zt,Bn){for(var Pi=zt.key,Di=wn;Di!==null;){if(Di.key===Pi){var zr=zt.type;if(zr===Ve){if(Di.tag===p){L(Bt,Di.sibling);var lo=W(Di,zt.props.children);return lo.return=Bt,lo._debugSource=zt._source,lo._debugOwner=zt._owner,lo}}else if(Di.elementType===zr||EYe(Di,zt)||typeof zr=="object"&&zr!==null&&zr.$$typeof===ft&&_qe(zr)===Di.type){L(Bt,Di.sibling);var _a=W(Di,zt.props);return _a.ref=I8(Bt,Di,zt),_a.return=Bt,_a._debugSource=zt._source,_a._debugOwner=zt._owner,_a}L(Bt,Di);break}else S(Bt,Di);Di=Di.sibling}if(zt.type===Ve){var Ls=DN(zt.props.children,Bt.mode,Bn,zt.key);return Ls.return=Bt,Ls}else{var Wc=R0e(zt,Bt.mode,Bn);return Wc.ref=I8(Bt,wn,zt),Wc.return=Bt,Wc}}function os(Bt,wn,zt,Bn){for(var Pi=zt.key,Di=wn;Di!==null;){if(Di.key===Pi)if(Di.tag===h&&Di.stateNode.containerInfo===zt.containerInfo&&Di.stateNode.implementation===zt.implementation){L(Bt,Di.sibling);var zr=W(Di,zt.children||[]);return zr.return=Bt,zr}else{L(Bt,Di);break}else S(Bt,Di);Di=Di.sibling}var lo=O0e(zt,Bt.mode,Bn);return lo.return=Bt,lo}function Ko(Bt,wn,zt,Bn){var Pi=typeof zt=="object"&&zt!==null&&zt.type===Ve&&zt.key===null;if(Pi&&(zt=zt.props.children),typeof zt=="object"&&zt!==null){switch(zt.$$typeof){case mt:return te(sr(Bt,wn,zt,Bn));case It:return te(os(Bt,wn,zt,Bn));case ft:var Di=zt._payload,zr=zt._init;return Ko(Bt,wn,zr(Di),Bn)}if(Ws(zt))return xn(Bt,wn,zt,Bn);if(Qi(zt))return Ni(Bt,wn,zt,Bn);BY(Bt,zt)}return typeof zt=="string"&&zt!==""||typeof zt=="number"?te(wr(Bt,wn,""+zt,Bn)):(typeof zt=="function"&&zY(Bt),L(Bt,wn))}return Ko}var iP=xqe(!0),wqe=xqe(!1);function utn(x,S){if(x!==null&&S.child!==x.child)throw new Error("Resuming work not yet implemented.");if(S.child!==null){var L=S.child,j=sL(L,L.pendingProps);for(S.child=j,j.return=S;L.sibling!==null;)L=L.sibling,j=j.sibling=sL(L,L.pendingProps),j.return=S;j.sibling=null}}function dtn(x,S){for(var L=x.child;L!==null;)Qin(L,S),L=L.sibling}var Bve=fN(null),zve;zve={};var HY=null,rP=null,Hve=null,WY=!1;function UY(){HY=null,rP=null,Hve=null,WY=!1}function Cqe(){WY=!0}function Sqe(){WY=!1}function Nqe(x,S,L){ef(Bve,S._currentValue,x),S._currentValue=L,S._currentRenderer!==void 0&&S._currentRenderer!==null&&S._currentRenderer!==zve&&s("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),S._currentRenderer=zve}function Wve(x,S){var L=Bve.current;Jh(Bve,S),x._currentValue=L}function Uve(x,S,L){for(var j=x;j!==null;){var W=j.alternate;if(zR(j.childLanes,S)?W!==null&&!zR(W.childLanes,S)&&(W.childLanes=Io(W.childLanes,S)):(j.childLanes=Io(j.childLanes,S),W!==null&&(W.childLanes=Io(W.childLanes,S))),j===L)break;j=j.return}j!==L&&s("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function htn(x,S,L){ftn(x,S,L)}function ftn(x,S,L){var j=x.child;for(j!==null&&(j.return=x);j!==null;){var W=void 0,G=j.dependencies;if(G!==null){W=j.child;for(var te=G.firstContext;te!==null;){if(te.context===S){if(j.tag===c){var pe=X$(L),ke=s1(yl,pe);ke.tag=qY;var Ue=j.updateQueue;if(Ue!==null){var et=Ue.shared,kt=et.pending;kt===null?ke.next=ke:(ke.next=kt.next,kt.next=ke),et.pending=ke}}j.lanes=Io(j.lanes,L);var Dt=j.alternate;Dt!==null&&(Dt.lanes=Io(Dt.lanes,L)),Uve(j.return,L,x),G.lanes=Io(G.lanes,L);break}te=te.next}}else if(j.tag===_)W=j.type===x.type?null:j.child;else if(j.tag===T){var Zt=j.return;if(Zt===null)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");Zt.lanes=Io(Zt.lanes,L);var nn=Zt.alternate;nn!==null&&(nn.lanes=Io(nn.lanes,L)),Uve(Zt,L,x),W=j.sibling}else W=j.child;if(W!==null)W.return=j;else for(W=j;W!==null;){if(W===x){W=null;break}var xn=W.sibling;if(xn!==null){xn.return=W.return,W=xn;break}W=W.return}j=W}}function oP(x,S){HY=x,rP=null,Hve=null;var L=x.dependencies;if(L!==null){var j=L.firstContext;j!==null&&(cg(L.lanes,S)&&q8(),L.firstContext=null)}}function fu(x){WY&&s("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");var S=x._currentValue;if(Hve!==x){var L={context:x,memoizedValue:S,next:null};if(rP===null){if(HY===null)throw new Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");rP=L,HY.dependencies={lanes:On,firstContext:L}}else rP=rP.next=L}return S}var QM=null;function Kve(x){QM===null?QM=[x]:QM.push(x)}function mtn(){if(QM!==null){for(var x=0;x<QM.length;x++){var S=QM[x],L=S.interleaved;if(L!==null){S.interleaved=null;var j=L.next,W=S.pending;if(W!==null){var G=W.next;W.next=j,L.next=G}S.pending=L}}QM=null}}function Eqe(x,S,L,j){var W=S.interleaved;return W===null?(L.next=L,Kve(S)):(L.next=W.next,W.next=L),S.interleaved=L,KY(x,j)}function ptn(x,S,L,j){var W=S.interleaved;W===null?(L.next=L,Kve(S)):(L.next=W.next,W.next=L),S.interleaved=L}function gtn(x,S,L,j){var W=S.interleaved;return W===null?(L.next=L,Kve(S)):(L.next=W.next,W.next=L),S.interleaved=L,KY(x,j)}function qm(x,S){return KY(x,S)}var btn=KY;function KY(x,S){x.lanes=Io(x.lanes,S);var L=x.alternate;L!==null&&(L.lanes=Io(L.lanes,S)),L===null&&(x.flags&(hu|Yw))!==Or&&wYe(x);for(var j=x,W=x.return;W!==null;)W.childLanes=Io(W.childLanes,S),L=W.alternate,L!==null?L.childLanes=Io(L.childLanes,S):(W.flags&(hu|Yw))!==Or&&wYe(x),j=W,W=W.return;if(j.tag===d){var G=j.stateNode;return G}else return null}var Dqe=0,kqe=1,qY=2,qve=3,GY=!1,Gve,YY;Gve=!1,YY=null;function Yve(x){var S={baseState:x.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:On},effects:null};x.updateQueue=S}function Mqe(x,S){var L=S.updateQueue,j=x.updateQueue;if(L===j){var W={baseState:j.baseState,firstBaseUpdate:j.firstBaseUpdate,lastBaseUpdate:j.lastBaseUpdate,shared:j.shared,effects:j.effects};S.updateQueue=W}}function s1(x,S){var L={eventTime:x,lane:S,tag:Dqe,payload:null,callback:null,next:null};return L}function bN(x,S,L){var j=x.updateQueue;if(j===null)return null;var W=j.shared;if(YY===W&&!Gve&&(s("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),Gve=!0),pin()){var G=W.pending;return G===null?S.next=S:(S.next=G.next,G.next=S),W.pending=S,btn(x,L)}else return gtn(x,W,S,L)}function XY(x,S,L){var j=S.updateQueue;if(j!==null){var W=j.shared;if(zUe(L)){var G=W.lanes;G=WUe(G,x.pendingLanes);var te=Io(G,L);W.lanes=te,Bbe(x,te)}}}function Xve(x,S){var L=x.updateQueue,j=x.alternate;if(j!==null){var W=j.updateQueue;if(L===W){var G=null,te=null,pe=L.firstBaseUpdate;if(pe!==null){var ke=pe;do{var Ue={eventTime:ke.eventTime,lane:ke.lane,tag:ke.tag,payload:ke.payload,callback:ke.callback,next:null};te===null?G=te=Ue:(te.next=Ue,te=Ue),ke=ke.next}while(ke!==null);te===null?G=te=S:(te.next=S,te=S)}else G=te=S;L={baseState:W.baseState,firstBaseUpdate:G,lastBaseUpdate:te,shared:W.shared,effects:W.effects},x.updateQueue=L;return}}var et=L.lastBaseUpdate;et===null?L.firstBaseUpdate=S:et.next=S,L.lastBaseUpdate=S}function vtn(x,S,L,j,W,G){switch(L.tag){case kqe:{var te=L.payload;if(typeof te=="function"){Cqe();var pe=te.call(G,j,W);{if(x.mode&xc){Md(!0);try{te.call(G,j,W)}finally{Md(!1)}}Sqe()}return pe}return te}case qve:x.flags=x.flags&~Ff|Us;case Dqe:{var ke=L.payload,Ue;if(typeof ke=="function"){Cqe(),Ue=ke.call(G,j,W);{if(x.mode&xc){Md(!0);try{ke.call(G,j,W)}finally{Md(!1)}}Sqe()}}else Ue=ke;return Ue==null?j:mi({},j,Ue)}case qY:return GY=!0,j}return j}function ZY(x,S,L,j){var W=x.updateQueue;GY=!1,YY=W.shared;var G=W.firstBaseUpdate,te=W.lastBaseUpdate,pe=W.shared.pending;if(pe!==null){W.shared.pending=null;var ke=pe,Ue=ke.next;ke.next=null,te===null?G=Ue:te.next=Ue,te=ke;var et=x.alternate;if(et!==null){var kt=et.updateQueue,Dt=kt.lastBaseUpdate;Dt!==te&&(Dt===null?kt.firstBaseUpdate=Ue:Dt.next=Ue,kt.lastBaseUpdate=ke)}}if(G!==null){var Zt=W.baseState,nn=On,xn=null,Ni=null,wr=null,sr=G;do{var os=sr.lane,Ko=sr.eventTime;if(zR(j,os)){if(wr!==null){var wn={eventTime:Ko,lane:Ld,tag:sr.tag,payload:sr.payload,callback:sr.callback,next:null};wr=wr.next=wn}Zt=vtn(x,W,sr,Zt,S,L);var zt=sr.callback;if(zt!==null&&sr.lane!==Ld){x.flags|=lbe;var Bn=W.effects;Bn===null?W.effects=[sr]:Bn.push(sr)}}else{var Bt={eventTime:Ko,lane:os,tag:sr.tag,payload:sr.payload,callback:sr.callback,next:null};wr===null?(Ni=wr=Bt,xn=Zt):wr=wr.next=Bt,nn=Io(nn,os)}if(sr=sr.next,sr===null){if(pe=W.shared.pending,pe===null)break;var Pi=pe,Di=Pi.next;Pi.next=null,sr=Di,W.lastBaseUpdate=Pi,W.shared.pending=null}}while(!0);wr===null&&(xn=Zt),W.baseState=xn,W.firstBaseUpdate=Ni,W.lastBaseUpdate=wr;var zr=W.shared.interleaved;if(zr!==null){var lo=zr;do nn=Io(nn,lo.lane),lo=lo.next;while(lo!==zr)}else G===null&&(W.shared.lanes=On);oV(nn),x.lanes=nn,x.memoizedState=Zt}YY=null}function ytn(x,S){if(typeof x!="function")throw new Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+x));x.call(S)}function Lqe(){GY=!1}function QY(){return GY}function Tqe(x,S,L){var j=S.effects;if(S.effects=null,j!==null)for(var W=0;W<j.length;W++){var G=j[W],te=G.callback;te!==null&&(G.callback=null,ytn(te,L))}}var A8={},vN=fN(A8),R8=fN(A8),JY=fN(A8);function eX(x){if(x===A8)throw new Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return x}function Iqe(){var x=eX(JY.current);return x}function Zve(x,S){ef(JY,S,x),ef(R8,x,x),ef(vN,A8,x);var L=OJt(S);Jh(vN,x),ef(vN,L,x)}function sP(x){Jh(vN,x),Jh(R8,x),Jh(JY,x)}function Qve(){var x=eX(vN.current);return x}function Aqe(x){eX(JY.current);var S=eX(vN.current),L=jJt(S,x.type);S!==L&&(ef(R8,x,x),ef(vN,L,x))}function Jve(x){R8.current===x&&(Jh(vN,x),Jh(R8,x))}var _tn=0,Rqe=1,Pqe=1,P8=2,cy=fN(_tn);function eye(x,S){return(x&S)!==0}function aP(x){return x&Rqe}function tye(x,S){return x&Rqe|S}function xtn(x,S){return x|S}function yN(x,S){ef(cy,S,x)}function lP(x){Jh(cy,x)}function wtn(x,S){var L=x.memoizedState;return L!==null?L.dehydrated!==null:(x.memoizedProps,!0)}function tX(x){for(var S=x;S!==null;){if(S.tag===N){var L=S.memoizedState;if(L!==null){var j=L.dehydrated;if(j===null||QKe(j)||yve(j))return S}}else if(S.tag===A&&S.memoizedProps.revealOrder!==void 0){var W=(S.flags&Us)!==Or;if(W)return S}else if(S.child!==null){S.child.return=S,S=S.child;continue}if(S===x)return null;for(;S.sibling===null;){if(S.return===null||S.return===x)return null;S=S.return}S.sibling.return=S.return,S=S.sibling}return null}var Gm=0,Wu=1,N_=2,Uu=4,rh=8,nye=[];function iye(){for(var x=0;x<nye.length;x++){var S=nye[x];S._workInProgressVersionPrimary=null}nye.length=0}function Ctn(x,S){var L=S._getVersion,j=L(S._source);x.mutableSourceEagerHydrationData==null?x.mutableSourceEagerHydrationData=[S,j]:x.mutableSourceEagerHydrationData.push(S,j)}var Ai=n.ReactCurrentDispatcher,O8=n.ReactCurrentBatchConfig,rye,cP;rye=new Set;var JM=On,ya=null,Ku=null,qu=null,nX=!1,j8=!1,F8=0,Stn=0,Ntn=25,kn=null,kb=null,_N=-1,oye=!1;function ea(){{var x=kn;kb===null?kb=[x]:kb.push(x)}}function yi(){{var x=kn;kb!==null&&(_N++,kb[_N]!==x&&Etn(x))}}function uP(x){x!=null&&!Ws(x)&&s("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",kn,typeof x)}function Etn(x){{var S=bi(ya);if(!rye.has(S)&&(rye.add(S),kb!==null)){for(var L="",j=30,W=0;W<=_N;W++){for(var G=kb[W],te=W===_N?x:G,pe=W+1+". "+G;pe.length<j;)pe+=" ";pe+=te+`
`,L+=pe}s(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks

   Previous render            Next render
   ------------------------------------------------------
%s   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`,S,L)}}}function tf(){throw new Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function sye(x,S){if(oye)return!1;if(S===null)return s("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",kn),!1;x.length!==S.length&&s(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.

Previous: %s
Incoming: %s`,kn,"["+S.join(", ")+"]","["+x.join(", ")+"]");for(var L=0;L<S.length&&L<x.length;L++)if(!hg(x[L],S[L]))return!1;return!0}function dP(x,S,L,j,W,G){JM=G,ya=S,kb=x!==null?x._debugHookTypes:null,_N=-1,oye=x!==null&&x.type!==S.type,S.memoizedState=null,S.updateQueue=null,S.lanes=On,x!==null&&x.memoizedState!==null?Ai.current=iGe:kb!==null?Ai.current=nGe:Ai.current=tGe;var te=L(j,W);if(j8){var pe=0;do{if(j8=!1,F8=0,pe>=Ntn)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");pe+=1,oye=!1,Ku=null,qu=null,S.updateQueue=null,_N=-1,Ai.current=rGe,te=L(j,W)}while(j8)}Ai.current=pX,S._debugHookTypes=kb;var ke=Ku!==null&&Ku.next!==null;if(JM=On,ya=null,Ku=null,qu=null,kn=null,kb=null,_N=-1,x!==null&&(x.flags&Zw)!==(S.flags&Zw)&&(x.mode&is)!==kr&&s("Internal React error: Expected static flag was missing. Please notify the React team."),nX=!1,ke)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return te}function hP(){var x=F8!==0;return F8=0,x}function Oqe(x,S,L){S.updateQueue=x.updateQueue,(S.mode&x_)!==kr?S.flags&=~(XG|Xw|iy|ds):S.flags&=~(iy|ds),x.lanes=iY(x.lanes,L)}function jqe(){if(Ai.current=pX,nX){for(var x=ya.memoizedState;x!==null;){var S=x.queue;S!==null&&(S.pending=null),x=x.next}nX=!1}JM=On,ya=null,Ku=null,qu=null,kb=null,_N=-1,kn=null,Xqe=!1,j8=!1,F8=0}function E_(){var x={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qu===null?ya.memoizedState=qu=x:qu=qu.next=x,qu}function Mb(){var x;if(Ku===null){var S=ya.alternate;S!==null?x=S.memoizedState:x=null}else x=Ku.next;var L;if(qu===null?L=ya.memoizedState:L=qu.next,L!==null)qu=L,L=qu.next,Ku=x;else{if(x===null)throw new Error("Rendered more hooks than during the previous render.");Ku=x;var j={memoizedState:Ku.memoizedState,baseState:Ku.baseState,baseQueue:Ku.baseQueue,queue:Ku.queue,next:null};qu===null?ya.memoizedState=qu=j:qu=qu.next=j}return qu}function Fqe(){return{lastEffect:null,stores:null}}function aye(x,S){return typeof S=="function"?S(x):S}function lye(x,S,L){var j=E_(),W;L!==void 0?W=L(S):W=S,j.memoizedState=j.baseState=W;var G={pending:null,interleaved:null,lanes:On,dispatch:null,lastRenderedReducer:x,lastRenderedState:W};j.queue=G;var te=G.dispatch=Ltn.bind(null,ya,G);return[j.memoizedState,te]}function cye(x,S,L){var j=Mb(),W=j.queue;if(W===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");W.lastRenderedReducer=x;var G=Ku,te=G.baseQueue,pe=W.pending;if(pe!==null){if(te!==null){var ke=te.next,Ue=pe.next;te.next=Ue,pe.next=ke}G.baseQueue!==te&&s("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),G.baseQueue=te=pe,W.pending=null}if(te!==null){var et=te.next,kt=G.baseState,Dt=null,Zt=null,nn=null,xn=et;do{var Ni=xn.lane;if(zR(JM,Ni)){if(nn!==null){var sr={lane:Ld,action:xn.action,hasEagerState:xn.hasEagerState,eagerState:xn.eagerState,next:null};nn=nn.next=sr}if(xn.hasEagerState)kt=xn.eagerState;else{var os=xn.action;kt=x(kt,os)}}else{var wr={lane:Ni,action:xn.action,hasEagerState:xn.hasEagerState,eagerState:xn.eagerState,next:null};nn===null?(Zt=nn=wr,Dt=kt):nn=nn.next=wr,ya.lanes=Io(ya.lanes,Ni),oV(Ni)}xn=xn.next}while(xn!==null&&xn!==et);nn===null?Dt=kt:nn.next=Zt,hg(kt,j.memoizedState)||q8(),j.memoizedState=kt,j.baseState=Dt,j.baseQueue=nn,W.lastRenderedState=kt}var Ko=W.interleaved;if(Ko!==null){var Bt=Ko;do{var wn=Bt.lane;ya.lanes=Io(ya.lanes,wn),oV(wn),Bt=Bt.next}while(Bt!==Ko)}else te===null&&(W.lanes=On);var zt=W.dispatch;return[j.memoizedState,zt]}function uye(x,S,L){var j=Mb(),W=j.queue;if(W===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");W.lastRenderedReducer=x;var G=W.dispatch,te=W.pending,pe=j.memoizedState;if(te!==null){W.pending=null;var ke=te.next,Ue=ke;do{var et=Ue.action;pe=x(pe,et),Ue=Ue.next}while(Ue!==ke);hg(pe,j.memoizedState)||q8(),j.memoizedState=pe,j.baseQueue===null&&(j.baseState=pe),W.lastRenderedState=pe}return[pe,G]}function I3r(x,S,L){}function A3r(x,S,L){}function dye(x,S,L){var j=ya,W=E_(),G,te=ih();if(te){if(L===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");G=L(),cP||G!==L()&&(s("The result of getServerSnapshot should be cached to avoid an infinite loop"),cP=!0)}else{if(G=S(),!cP){var pe=S();hg(G,pe)||(s("The result of getSnapshot should be cached to avoid an infinite loop"),cP=!0)}var ke=RX();if(ke===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");nY(ke,JM)||$qe(j,S,G)}W.memoizedState=G;var Ue={value:G,getSnapshot:S};return W.queue=Ue,aX(Bqe.bind(null,j,Ue,x),[x]),j.flags|=iy,$8(Wu|rh,Vqe.bind(null,j,Ue,G,S),void 0,null),G}function iX(x,S,L){var j=ya,W=Mb(),G=S();if(!cP){var te=S();hg(G,te)||(s("The result of getSnapshot should be cached to avoid an infinite loop"),cP=!0)}var pe=W.memoizedState,ke=!hg(pe,G);ke&&(W.memoizedState=G,q8());var Ue=W.queue;if(B8(Bqe.bind(null,j,Ue,x),[x]),Ue.getSnapshot!==S||ke||qu!==null&&qu.memoizedState.tag&Wu){j.flags|=iy,$8(Wu|rh,Vqe.bind(null,j,Ue,G,S),void 0,null);var et=RX();if(et===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");nY(et,JM)||$qe(j,S,G)}return G}function $qe(x,S,L){x.flags|=YG;var j={getSnapshot:S,value:L},W=ya.updateQueue;if(W===null)W=Fqe(),ya.updateQueue=W,W.stores=[j];else{var G=W.stores;G===null?W.stores=[j]:G.push(j)}}function Vqe(x,S,L,j){S.value=L,S.getSnapshot=j,zqe(S)&&Hqe(x)}function Bqe(x,S,L){var j=function(){zqe(S)&&Hqe(x)};return L(j)}function zqe(x){var S=x.getSnapshot,L=x.value;try{var j=S();return!hg(L,j)}catch{return!0}}function Hqe(x){var S=qm(x,to);S!==null&&Zu(S,x,to,yl)}function rX(x){var S=E_();typeof x=="function"&&(x=x()),S.memoizedState=S.baseState=x;var L={pending:null,interleaved:null,lanes:On,dispatch:null,lastRenderedReducer:aye,lastRenderedState:x};S.queue=L;var j=L.dispatch=Ttn.bind(null,ya,L);return[S.memoizedState,j]}function hye(x){return cye(aye)}function fye(x){return uye(aye)}function $8(x,S,L,j){var W={tag:x,create:S,destroy:L,deps:j,next:null},G=ya.updateQueue;if(G===null)G=Fqe(),ya.updateQueue=G,G.lastEffect=W.next=W;else{var te=G.lastEffect;if(te===null)G.lastEffect=W.next=W;else{var pe=te.next;te.next=W,W.next=pe,G.lastEffect=W}}return W}function mye(x){var S=E_();{var L={current:x};return S.memoizedState=L,L}}function oX(x){var S=Mb();return S.memoizedState}function V8(x,S,L,j){var W=E_(),G=j===void 0?null:j;ya.flags|=x,W.memoizedState=$8(Wu|S,L,void 0,G)}function sX(x,S,L,j){var W=Mb(),G=j===void 0?null:j,te=void 0;if(Ku!==null){var pe=Ku.memoizedState;if(te=pe.destroy,G!==null){var ke=pe.deps;if(sye(G,ke)){W.memoizedState=$8(S,L,te,G);return}}}ya.flags|=x,W.memoizedState=$8(Wu|S,L,te,G)}function aX(x,S){return(ya.mode&x_)!==kr?V8(XG|iy|dbe,rh,x,S):V8(iy|dbe,rh,x,S)}function B8(x,S){return sX(iy,rh,x,S)}function pye(x,S){return V8(ds,N_,x,S)}function lX(x,S){return sX(ds,N_,x,S)}function gye(x,S){var L=ds;return L|=OM,(ya.mode&x_)!==kr&&(L|=Xw),V8(L,Uu,x,S)}function cX(x,S){return sX(ds,Uu,x,S)}function Wqe(x,S){if(typeof S=="function"){var L=S,j=x();return L(j),function(){L(null)}}else if(S!=null){var W=S;W.hasOwnProperty("current")||s("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(W).join(", ")+"}");var G=x();return W.current=G,function(){W.current=null}}}function bye(x,S,L){typeof S!="function"&&s("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",S!==null?typeof S:"null");var j=L!=null?L.concat([x]):null,W=ds;return W|=OM,(ya.mode&x_)!==kr&&(W|=Xw),V8(W,Uu,Wqe.bind(null,S,x),j)}function uX(x,S,L){typeof S!="function"&&s("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",S!==null?typeof S:"null");var j=L!=null?L.concat([x]):null;return sX(ds,Uu,Wqe.bind(null,S,x),j)}function Dtn(x,S){}var dX=Dtn;function vye(x,S){var L=E_(),j=S===void 0?null:S;return L.memoizedState=[x,j],x}function hX(x,S){var L=Mb(),j=S===void 0?null:S,W=L.memoizedState;if(W!==null&&j!==null){var G=W[1];if(sye(j,G))return W[0]}return L.memoizedState=[x,j],x}function yye(x,S){var L=E_(),j=S===void 0?null:S,W=x();return L.memoizedState=[W,j],W}function fX(x,S){var L=Mb(),j=S===void 0?null:S,W=L.memoizedState;if(W!==null&&j!==null){var G=W[1];if(sye(j,G))return W[0]}var te=x();return L.memoizedState=[te,j],te}function _ye(x){var S=E_();return S.memoizedState=x,x}function Uqe(x){var S=Mb(),L=Ku,j=L.memoizedState;return qqe(S,j,x)}function Kqe(x){var S=Mb();if(Ku===null)return S.memoizedState=x,x;var L=Ku.memoizedState;return qqe(S,L,x)}function qqe(x,S,L){var j=!hZt(JM);if(j){if(!hg(L,S)){var W=HUe();ya.lanes=Io(ya.lanes,W),oV(W),x.baseState=!0}return S}else return x.baseState&&(x.baseState=!1,q8()),x.memoizedState=L,L}function ktn(x,S,L){var j=oy();Td(xZt(j,Jw)),x(!0);var W=O8.transition;O8.transition={};var G=O8.transition;O8.transition._updatedFibers=new Set;try{x(!1),S()}finally{if(Td(j),O8.transition=W,W===null&&G._updatedFibers){var te=G._updatedFibers.size;te>10&&o("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),G._updatedFibers.clear()}}}function xye(){var x=rX(!1),S=x[0],L=x[1],j=ktn.bind(null,L),W=E_();return W.memoizedState=j,[S,j]}function Gqe(){var x=hye(),S=x[0],L=Mb(),j=L.memoizedState;return[S,j]}function Yqe(){var x=fye(),S=x[0],L=Mb(),j=L.memoizedState;return[S,j]}var Xqe=!1;function Mtn(){return Xqe}function wye(){var x=E_(),S=RX(),L=S.identifierPrefix,j;if(ih()){var W=Ken();j=":"+L+"R"+W;var G=F8++;G>0&&(j+="H"+G.toString(32)),j+=":"}else{var te=Stn++;j=":"+L+"r"+te.toString(32)+":"}return x.memoizedState=j,j}function mX(){var x=Mb(),S=x.memoizedState;return S}function Ltn(x,S,L){typeof arguments[3]=="function"&&s("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var j=NN(x),W={lane:j,action:L,hasEagerState:!1,eagerState:null,next:null};if(Zqe(x))Qqe(S,W);else{var G=Eqe(x,S,W,j);if(G!==null){var te=Bf();Zu(G,x,j,te),Jqe(G,S,j)}}eGe(x,j)}function Ttn(x,S,L){typeof arguments[3]=="function"&&s("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var j=NN(x),W={lane:j,action:L,hasEagerState:!1,eagerState:null,next:null};if(Zqe(x))Qqe(S,W);else{var G=x.alternate;if(x.lanes===On&&(G===null||G.lanes===On)){var te=S.lastRenderedReducer;if(te!==null){var pe;pe=Ai.current,Ai.current=uy;try{var ke=S.lastRenderedState,Ue=te(ke,L);if(W.hasEagerState=!0,W.eagerState=Ue,hg(Ue,ke)){ptn(x,S,W,j);return}}catch{}finally{Ai.current=pe}}}var et=Eqe(x,S,W,j);if(et!==null){var kt=Bf();Zu(et,x,j,kt),Jqe(et,S,j)}}eGe(x,j)}function Zqe(x){var S=x.alternate;return x===ya||S!==null&&S===ya}function Qqe(x,S){j8=nX=!0;var L=x.pending;L===null?S.next=S:(S.next=L.next,L.next=S),x.pending=S}function Jqe(x,S,L){if(zUe(L)){var j=S.lanes;j=WUe(j,x.pendingLanes);var W=Io(j,L);S.lanes=W,Bbe(x,W)}}function eGe(x,S,L){gbe(x,S)}var pX={readContext:fu,useCallback:tf,useContext:tf,useEffect:tf,useImperativeHandle:tf,useInsertionEffect:tf,useLayoutEffect:tf,useMemo:tf,useReducer:tf,useRef:tf,useState:tf,useDebugValue:tf,useDeferredValue:tf,useTransition:tf,useMutableSource:tf,useSyncExternalStore:tf,useId:tf,unstable_isNewReconciler:B},tGe=null,nGe=null,iGe=null,rGe=null,D_=null,uy=null,gX=null;{var Cye=function(){s("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},no=function(){s("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};tGe={readContext:function(x){return fu(x)},useCallback:function(x,S){return kn="useCallback",ea(),uP(S),vye(x,S)},useContext:function(x){return kn="useContext",ea(),fu(x)},useEffect:function(x,S){return kn="useEffect",ea(),uP(S),aX(x,S)},useImperativeHandle:function(x,S,L){return kn="useImperativeHandle",ea(),uP(L),bye(x,S,L)},useInsertionEffect:function(x,S){return kn="useInsertionEffect",ea(),uP(S),pye(x,S)},useLayoutEffect:function(x,S){return kn="useLayoutEffect",ea(),uP(S),gye(x,S)},useMemo:function(x,S){kn="useMemo",ea(),uP(S);var L=Ai.current;Ai.current=D_;try{return yye(x,S)}finally{Ai.current=L}},useReducer:function(x,S,L){kn="useReducer",ea();var j=Ai.current;Ai.current=D_;try{return lye(x,S,L)}finally{Ai.current=j}},useRef:function(x){return kn="useRef",ea(),mye(x)},useState:function(x){kn="useState",ea();var S=Ai.current;Ai.current=D_;try{return rX(x)}finally{Ai.current=S}},useDebugValue:function(x,S){return kn="useDebugValue",ea(),void 0},useDeferredValue:function(x){return kn="useDeferredValue",ea(),_ye(x)},useTransition:function(){return kn="useTransition",ea(),xye()},useMutableSource:function(x,S,L){return kn="useMutableSource",ea(),void 0},useSyncExternalStore:function(x,S,L){return kn="useSyncExternalStore",ea(),dye(x,S,L)},useId:function(){return kn="useId",ea(),wye()},unstable_isNewReconciler:B},nGe={readContext:function(x){return fu(x)},useCallback:function(x,S){return kn="useCallback",yi(),vye(x,S)},useContext:function(x){return kn="useContext",yi(),fu(x)},useEffect:function(x,S){return kn="useEffect",yi(),aX(x,S)},useImperativeHandle:function(x,S,L){return kn="useImperativeHandle",yi(),bye(x,S,L)},useInsertionEffect:function(x,S){return kn="useInsertionEffect",yi(),pye(x,S)},useLayoutEffect:function(x,S){return kn="useLayoutEffect",yi(),gye(x,S)},useMemo:function(x,S){kn="useMemo",yi();var L=Ai.current;Ai.current=D_;try{return yye(x,S)}finally{Ai.current=L}},useReducer:function(x,S,L){kn="useReducer",yi();var j=Ai.current;Ai.current=D_;try{return lye(x,S,L)}finally{Ai.current=j}},useRef:function(x){return kn="useRef",yi(),mye(x)},useState:function(x){kn="useState",yi();var S=Ai.current;Ai.current=D_;try{return rX(x)}finally{Ai.current=S}},useDebugValue:function(x,S){return kn="useDebugValue",yi(),void 0},useDeferredValue:function(x){return kn="useDeferredValue",yi(),_ye(x)},useTransition:function(){return kn="useTransition",yi(),xye()},useMutableSource:function(x,S,L){return kn="useMutableSource",yi(),void 0},useSyncExternalStore:function(x,S,L){return kn="useSyncExternalStore",yi(),dye(x,S,L)},useId:function(){return kn="useId",yi(),wye()},unstable_isNewReconciler:B},iGe={readContext:function(x){return fu(x)},useCallback:function(x,S){return kn="useCallback",yi(),hX(x,S)},useContext:function(x){return kn="useContext",yi(),fu(x)},useEffect:function(x,S){return kn="useEffect",yi(),B8(x,S)},useImperativeHandle:function(x,S,L){return kn="useImperativeHandle",yi(),uX(x,S,L)},useInsertionEffect:function(x,S){return kn="useInsertionEffect",yi(),lX(x,S)},useLayoutEffect:function(x,S){return kn="useLayoutEffect",yi(),cX(x,S)},useMemo:function(x,S){kn="useMemo",yi();var L=Ai.current;Ai.current=uy;try{return fX(x,S)}finally{Ai.current=L}},useReducer:function(x,S,L){kn="useReducer",yi();var j=Ai.current;Ai.current=uy;try{return cye(x,S,L)}finally{Ai.current=j}},useRef:function(x){return kn="useRef",yi(),oX()},useState:function(x){kn="useState",yi();var S=Ai.current;Ai.current=uy;try{return hye(x)}finally{Ai.current=S}},useDebugValue:function(x,S){return kn="useDebugValue",yi(),dX()},useDeferredValue:function(x){return kn="useDeferredValue",yi(),Uqe(x)},useTransition:function(){return kn="useTransition",yi(),Gqe()},useMutableSource:function(x,S,L){return kn="useMutableSource",yi(),void 0},useSyncExternalStore:function(x,S,L){return kn="useSyncExternalStore",yi(),iX(x,S)},useId:function(){return kn="useId",yi(),mX()},unstable_isNewReconciler:B},rGe={readContext:function(x){return fu(x)},useCallback:function(x,S){return kn="useCallback",yi(),hX(x,S)},useContext:function(x){return kn="useContext",yi(),fu(x)},useEffect:function(x,S){return kn="useEffect",yi(),B8(x,S)},useImperativeHandle:function(x,S,L){return kn="useImperativeHandle",yi(),uX(x,S,L)},useInsertionEffect:function(x,S){return kn="useInsertionEffect",yi(),lX(x,S)},useLayoutEffect:function(x,S){return kn="useLayoutEffect",yi(),cX(x,S)},useMemo:function(x,S){kn="useMemo",yi();var L=Ai.current;Ai.current=gX;try{return fX(x,S)}finally{Ai.current=L}},useReducer:function(x,S,L){kn="useReducer",yi();var j=Ai.current;Ai.current=gX;try{return uye(x,S,L)}finally{Ai.current=j}},useRef:function(x){return kn="useRef",yi(),oX()},useState:function(x){kn="useState",yi();var S=Ai.current;Ai.current=gX;try{return fye(x)}finally{Ai.current=S}},useDebugValue:function(x,S){return kn="useDebugValue",yi(),dX()},useDeferredValue:function(x){return kn="useDeferredValue",yi(),Kqe(x)},useTransition:function(){return kn="useTransition",yi(),Yqe()},useMutableSource:function(x,S,L){return kn="useMutableSource",yi(),void 0},useSyncExternalStore:function(x,S,L){return kn="useSyncExternalStore",yi(),iX(x,S)},useId:function(){return kn="useId",yi(),mX()},unstable_isNewReconciler:B},D_={readContext:function(x){return Cye(),fu(x)},useCallback:function(x,S){return kn="useCallback",no(),ea(),vye(x,S)},useContext:function(x){return kn="useContext",no(),ea(),fu(x)},useEffect:function(x,S){return kn="useEffect",no(),ea(),aX(x,S)},useImperativeHandle:function(x,S,L){return kn="useImperativeHandle",no(),ea(),bye(x,S,L)},useInsertionEffect:function(x,S){return kn="useInsertionEffect",no(),ea(),pye(x,S)},useLayoutEffect:function(x,S){return kn="useLayoutEffect",no(),ea(),gye(x,S)},useMemo:function(x,S){kn="useMemo",no(),ea();var L=Ai.current;Ai.current=D_;try{return yye(x,S)}finally{Ai.current=L}},useReducer:function(x,S,L){kn="useReducer",no(),ea();var j=Ai.current;Ai.current=D_;try{return lye(x,S,L)}finally{Ai.current=j}},useRef:function(x){return kn="useRef",no(),ea(),mye(x)},useState:function(x){kn="useState",no(),ea();var S=Ai.current;Ai.current=D_;try{return rX(x)}finally{Ai.current=S}},useDebugValue:function(x,S){return kn="useDebugValue",no(),ea(),void 0},useDeferredValue:function(x){return kn="useDeferredValue",no(),ea(),_ye(x)},useTransition:function(){return kn="useTransition",no(),ea(),xye()},useMutableSource:function(x,S,L){return kn="useMutableSource",no(),ea(),void 0},useSyncExternalStore:function(x,S,L){return kn="useSyncExternalStore",no(),ea(),dye(x,S,L)},useId:function(){return kn="useId",no(),ea(),wye()},unstable_isNewReconciler:B},uy={readContext:function(x){return Cye(),fu(x)},useCallback:function(x,S){return kn="useCallback",no(),yi(),hX(x,S)},useContext:function(x){return kn="useContext",no(),yi(),fu(x)},useEffect:function(x,S){return kn="useEffect",no(),yi(),B8(x,S)},useImperativeHandle:function(x,S,L){return kn="useImperativeHandle",no(),yi(),uX(x,S,L)},useInsertionEffect:function(x,S){return kn="useInsertionEffect",no(),yi(),lX(x,S)},useLayoutEffect:function(x,S){return kn="useLayoutEffect",no(),yi(),cX(x,S)},useMemo:function(x,S){kn="useMemo",no(),yi();var L=Ai.current;Ai.current=uy;try{return fX(x,S)}finally{Ai.current=L}},useReducer:function(x,S,L){kn="useReducer",no(),yi();var j=Ai.current;Ai.current=uy;try{return cye(x,S,L)}finally{Ai.current=j}},useRef:function(x){return kn="useRef",no(),yi(),oX()},useState:function(x){kn="useState",no(),yi();var S=Ai.current;Ai.current=uy;try{return hye(x)}finally{Ai.current=S}},useDebugValue:function(x,S){return kn="useDebugValue",no(),yi(),dX()},useDeferredValue:function(x){return kn="useDeferredValue",no(),yi(),Uqe(x)},useTransition:function(){return kn="useTransition",no(),yi(),Gqe()},useMutableSource:function(x,S,L){return kn="useMutableSource",no(),yi(),void 0},useSyncExternalStore:function(x,S,L){return kn="useSyncExternalStore",no(),yi(),iX(x,S)},useId:function(){return kn="useId",no(),yi(),mX()},unstable_isNewReconciler:B},gX={readContext:function(x){return Cye(),fu(x)},useCallback:function(x,S){return kn="useCallback",no(),yi(),hX(x,S)},useContext:function(x){return kn="useContext",no(),yi(),fu(x)},useEffect:function(x,S){return kn="useEffect",no(),yi(),B8(x,S)},useImperativeHandle:function(x,S,L){return kn="useImperativeHandle",no(),yi(),uX(x,S,L)},useInsertionEffect:function(x,S){return kn="useInsertionEffect",no(),yi(),lX(x,S)},useLayoutEffect:function(x,S){return kn="useLayoutEffect",no(),yi(),cX(x,S)},useMemo:function(x,S){kn="useMemo",no(),yi();var L=Ai.current;Ai.current=uy;try{return fX(x,S)}finally{Ai.current=L}},useReducer:function(x,S,L){kn="useReducer",no(),yi();var j=Ai.current;Ai.current=uy;try{return uye(x,S,L)}finally{Ai.current=j}},useRef:function(x){return kn="useRef",no(),yi(),oX()},useState:function(x){kn="useState",no(),yi();var S=Ai.current;Ai.current=uy;try{return fye(x)}finally{Ai.current=S}},useDebugValue:function(x,S){return kn="useDebugValue",no(),yi(),dX()},useDeferredValue:function(x){return kn="useDeferredValue",no(),yi(),Kqe(x)},useTransition:function(){return kn="useTransition",no(),yi(),Yqe()},useMutableSource:function(x,S,L){return kn="useMutableSource",no(),yi(),void 0},useSyncExternalStore:function(x,S,L){return kn="useSyncExternalStore",no(),yi(),iX(x,S)},useId:function(){return kn="useId",no(),yi(),mX()},unstable_isNewReconciler:B}}var xN=e.unstable_now,oGe=0,bX=-1,z8=-1,vX=-1,Sye=!1,yX=!1;function sGe(){return Sye}function Itn(){yX=!0}function Atn(){Sye=!1,yX=!1}function Rtn(){Sye=yX,yX=!1}function aGe(){return oGe}function lGe(){oGe=xN()}function Nye(x){z8=xN(),x.actualStartTime<0&&(x.actualStartTime=xN())}function cGe(x){z8=-1}function _X(x,S){if(z8>=0){var L=xN()-z8;x.actualDuration+=L,S&&(x.selfBaseDuration=L),z8=-1}}function k_(x){if(bX>=0){var S=xN()-bX;bX=-1;for(var L=x.return;L!==null;){switch(L.tag){case d:var j=L.stateNode;j.effectDuration+=S;return;case C:var W=L.stateNode;W.effectDuration+=S;return}L=L.return}}}function Eye(x){if(vX>=0){var S=xN()-vX;vX=-1;for(var L=x.return;L!==null;){switch(L.tag){case d:var j=L.stateNode;j!==null&&(j.passiveEffectDuration+=S);return;case C:var W=L.stateNode;W!==null&&(W.passiveEffectDuration+=S);return}L=L.return}}}function M_(){bX=xN()}function Dye(){vX=xN()}function kye(x){for(var S=x.child;S;)x.actualDuration+=S.actualDuration,S=S.sibling}function dy(x,S){if(x&&x.defaultProps){var L=mi({},S),j=x.defaultProps;for(var W in j)L[W]===void 0&&(L[W]=j[W]);return L}return S}var Mye={},Lye,Tye,Iye,Aye,Rye,uGe,xX,Pye,Oye,jye,H8;{Lye=new Set,Tye=new Set,Iye=new Set,Aye=new Set,Pye=new Set,Rye=new Set,Oye=new Set,jye=new Set,H8=new Set;var dGe=new Set;xX=function(x,S){if(!(x===null||typeof x=="function")){var L=S+"_"+x;dGe.has(L)||(dGe.add(L),s("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",S,x))}},uGe=function(x,S){if(S===void 0){var L=cn(x)||"Component";Rye.has(L)||(Rye.add(L),s("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",L))}},Object.defineProperty(Mye,"_processChildContext",{enumerable:!1,value:function(){throw new Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(Mye)}function Fye(x,S,L,j){var W=x.memoizedState,G=L(j,W);{if(x.mode&xc){Md(!0);try{G=L(j,W)}finally{Md(!1)}}uGe(S,G)}var te=G==null?W:mi({},W,G);if(x.memoizedState=te,x.lanes===On){var pe=x.updateQueue;pe.baseState=te}}var $ye={isMounted:NXt,enqueueSetState:function(x,S,L){var j=RR(x),W=Bf(),G=NN(j),te=s1(W,G);te.payload=S,L!=null&&(xX(L,"setState"),te.callback=L);var pe=bN(j,te,G);pe!==null&&(Zu(pe,j,G,W),XY(pe,j,G)),gbe(j,G)},enqueueReplaceState:function(x,S,L){var j=RR(x),W=Bf(),G=NN(j),te=s1(W,G);te.tag=kqe,te.payload=S,L!=null&&(xX(L,"replaceState"),te.callback=L);var pe=bN(j,te,G);pe!==null&&(Zu(pe,j,G,W),XY(pe,j,G)),gbe(j,G)},enqueueForceUpdate:function(x,S){var L=RR(x),j=Bf(),W=NN(L),G=s1(j,W);G.tag=qY,S!=null&&(xX(S,"forceUpdate"),G.callback=S);var te=bN(L,G,W);te!==null&&(Zu(te,L,W,j),XY(te,L,W)),nZt(L,W)}};function hGe(x,S,L,j,W,G,te){var pe=x.stateNode;if(typeof pe.shouldComponentUpdate=="function"){var ke=pe.shouldComponentUpdate(j,G,te);{if(x.mode&xc){Md(!0);try{ke=pe.shouldComponentUpdate(j,G,te)}finally{Md(!1)}}ke===void 0&&s("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",cn(S)||"Component")}return ke}return S.prototype&&S.prototype.isPureReactComponent?!d8(L,j)||!d8(W,G):!0}function Ptn(x,S,L){var j=x.stateNode;{var W=cn(S)||"Component",G=j.render;G||(S.prototype&&typeof S.prototype.render=="function"?s("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",W):s("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",W)),j.getInitialState&&!j.getInitialState.isReactClassApproved&&!j.state&&s("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",W),j.getDefaultProps&&!j.getDefaultProps.isReactClassApproved&&s("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",W),j.propTypes&&s("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",W),j.contextType&&s("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",W),S.childContextTypes&&!H8.has(S)&&(x.mode&xc)===kr&&(H8.add(S),s(`%s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead

.Learn more about this warning here: https://reactjs.org/link/legacy-context`,W)),S.contextTypes&&!H8.has(S)&&(x.mode&xc)===kr&&(H8.add(S),s(`%s uses the legacy contextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() with static contextType instead.

Learn more about this warning here: https://reactjs.org/link/legacy-context`,W)),j.contextTypes&&s("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",W),S.contextType&&S.contextTypes&&!Oye.has(S)&&(Oye.add(S),s("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",W)),typeof j.componentShouldUpdate=="function"&&s("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",W),S.prototype&&S.prototype.isPureReactComponent&&typeof j.shouldComponentUpdate<"u"&&s("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",cn(S)||"A pure component"),typeof j.componentDidUnmount=="function"&&s("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",W),typeof j.componentDidReceiveProps=="function"&&s("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",W),typeof j.componentWillRecieveProps=="function"&&s("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",W),typeof j.UNSAFE_componentWillRecieveProps=="function"&&s("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",W);var te=j.props!==L;j.props!==void 0&&te&&s("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",W,W),j.defaultProps&&s("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",W,W),typeof j.getSnapshotBeforeUpdate=="function"&&typeof j.componentDidUpdate!="function"&&!Iye.has(S)&&(Iye.add(S),s("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",cn(S))),typeof j.getDerivedStateFromProps=="function"&&s("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",W),typeof j.getDerivedStateFromError=="function"&&s("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",W),typeof S.getSnapshotBeforeUpdate=="function"&&s("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",W);var pe=j.state;pe&&(typeof pe!="object"||Ws(pe))&&s("%s.state: must be set to an object or null",W),typeof j.getChildContext=="function"&&typeof S.childContextTypes!="object"&&s("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",W)}}function fGe(x,S){S.updater=$ye,x.stateNode=S,_Xt(S,x),S._reactInternalInstance=Mye}function mGe(x,S,L){var j=!1,W=fg,G=fg,te=S.contextType;if("contextType"in S){var pe=te===null||te!==void 0&&te.$$typeof===We&&te._context===void 0;if(!pe&&!jye.has(S)){jye.add(S);var ke="";te===void 0?ke=" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof te!="object"?ke=" However, it is set to a "+typeof te+".":te.$$typeof===$e?ke=" Did you accidentally pass the Context.Provider instead?":te._context!==void 0?ke=" Did you accidentally pass the Context.Consumer instead?":ke=" However, it is set to an object with keys {"+Object.keys(te).join(", ")+"}.",s("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",cn(S)||"Component",ke)}}if(typeof te=="object"&&te!==null)G=fu(te);else{W=QR(x,S,!0);var Ue=S.contextTypes;j=Ue!=null,G=j?JR(x,W):fg}var et=new S(L,G);if(x.mode&xc){Md(!0);try{et=new S(L,G)}finally{Md(!1)}}var kt=x.memoizedState=et.state!==null&&et.state!==void 0?et.state:null;fGe(x,et);{if(typeof S.getDerivedStateFromProps=="function"&&kt===null){var Dt=cn(S)||"Component";Tye.has(Dt)||(Tye.add(Dt),s("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",Dt,et.state===null?"null":"undefined",Dt))}if(typeof S.getDerivedStateFromProps=="function"||typeof et.getSnapshotBeforeUpdate=="function"){var Zt=null,nn=null,xn=null;if(typeof et.componentWillMount=="function"&&et.componentWillMount.__suppressDeprecationWarning!==!0?Zt="componentWillMount":typeof et.UNSAFE_componentWillMount=="function"&&(Zt="UNSAFE_componentWillMount"),typeof et.componentWillReceiveProps=="function"&&et.componentWillReceiveProps.__suppressDeprecationWarning!==!0?nn="componentWillReceiveProps":typeof et.UNSAFE_componentWillReceiveProps=="function"&&(nn="UNSAFE_componentWillReceiveProps"),typeof et.componentWillUpdate=="function"&&et.componentWillUpdate.__suppressDeprecationWarning!==!0?xn="componentWillUpdate":typeof et.UNSAFE_componentWillUpdate=="function"&&(xn="UNSAFE_componentWillUpdate"),Zt!==null||nn!==null||xn!==null){var Ni=cn(S)||"Component",wr=typeof S.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";Aye.has(Ni)||(Aye.add(Ni),s(`Unsafe legacy lifecycles will not be called for components using new component APIs.

%s uses %s but also contains the following legacy lifecycles:%s%s%s

The above lifecycles should be removed. Learn more about this warning here:
https://reactjs.org/link/unsafe-component-lifecycles`,Ni,wr,Zt!==null?`
  `+Zt:"",nn!==null?`
  `+nn:"",xn!==null?`
  `+xn:""))}}}return j&&iqe(x,W,G),et}function Otn(x,S){var L=S.state;typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),L!==S.state&&(s("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",bi(x)||"Component"),$ye.enqueueReplaceState(S,S.state,null))}function pGe(x,S,L,j){var W=S.state;if(typeof S.componentWillReceiveProps=="function"&&S.componentWillReceiveProps(L,j),typeof S.UNSAFE_componentWillReceiveProps=="function"&&S.UNSAFE_componentWillReceiveProps(L,j),S.state!==W){{var G=bi(x)||"Component";Lye.has(G)||(Lye.add(G),s("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",G))}$ye.enqueueReplaceState(S,S.state,null)}}function Vye(x,S,L,j){Ptn(x,S,L);var W=x.stateNode;W.props=L,W.state=x.memoizedState,W.refs={},Yve(x);var G=S.contextType;if(typeof G=="object"&&G!==null)W.context=fu(G);else{var te=QR(x,S,!0);W.context=JR(x,te)}{if(W.state===L){var pe=cn(S)||"Component";Pye.has(pe)||(Pye.add(pe),s("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",pe))}x.mode&xc&&ly.recordLegacyContextWarning(x,W),ly.recordUnsafeLifecycleWarnings(x,W)}W.state=x.memoizedState;var ke=S.getDerivedStateFromProps;if(typeof ke=="function"&&(Fye(x,S,ke,L),W.state=x.memoizedState),typeof S.getDerivedStateFromProps!="function"&&typeof W.getSnapshotBeforeUpdate!="function"&&(typeof W.UNSAFE_componentWillMount=="function"||typeof W.componentWillMount=="function")&&(Otn(x,W),ZY(x,L,W,j),W.state=x.memoizedState),typeof W.componentDidMount=="function"){var Ue=ds;Ue|=OM,(x.mode&x_)!==kr&&(Ue|=Xw),x.flags|=Ue}}function jtn(x,S,L,j){var W=x.stateNode,G=x.memoizedProps;W.props=G;var te=W.context,pe=S.contextType,ke=fg;if(typeof pe=="object"&&pe!==null)ke=fu(pe);else{var Ue=QR(x,S,!0);ke=JR(x,Ue)}var et=S.getDerivedStateFromProps,kt=typeof et=="function"||typeof W.getSnapshotBeforeUpdate=="function";!kt&&(typeof W.UNSAFE_componentWillReceiveProps=="function"||typeof W.componentWillReceiveProps=="function")&&(G!==L||te!==ke)&&pGe(x,W,L,ke),Lqe();var Dt=x.memoizedState,Zt=W.state=Dt;if(ZY(x,L,W,j),Zt=x.memoizedState,G===L&&Dt===Zt&&!IY()&&!QY()){if(typeof W.componentDidMount=="function"){var nn=ds;nn|=OM,(x.mode&x_)!==kr&&(nn|=Xw),x.flags|=nn}return!1}typeof et=="function"&&(Fye(x,S,et,L),Zt=x.memoizedState);var xn=QY()||hGe(x,S,G,L,Dt,Zt,ke);if(xn){if(!kt&&(typeof W.UNSAFE_componentWillMount=="function"||typeof W.componentWillMount=="function")&&(typeof W.componentWillMount=="function"&&W.componentWillMount(),typeof W.UNSAFE_componentWillMount=="function"&&W.UNSAFE_componentWillMount()),typeof W.componentDidMount=="function"){var Ni=ds;Ni|=OM,(x.mode&x_)!==kr&&(Ni|=Xw),x.flags|=Ni}}else{if(typeof W.componentDidMount=="function"){var wr=ds;wr|=OM,(x.mode&x_)!==kr&&(wr|=Xw),x.flags|=wr}x.memoizedProps=L,x.memoizedState=Zt}return W.props=L,W.state=Zt,W.context=ke,xn}function Ftn(x,S,L,j,W){var G=S.stateNode;Mqe(x,S);var te=S.memoizedProps,pe=S.type===S.elementType?te:dy(S.type,te);G.props=pe;var ke=S.pendingProps,Ue=G.context,et=L.contextType,kt=fg;if(typeof et=="object"&&et!==null)kt=fu(et);else{var Dt=QR(S,L,!0);kt=JR(S,Dt)}var Zt=L.getDerivedStateFromProps,nn=typeof Zt=="function"||typeof G.getSnapshotBeforeUpdate=="function";!nn&&(typeof G.UNSAFE_componentWillReceiveProps=="function"||typeof G.componentWillReceiveProps=="function")&&(te!==ke||Ue!==kt)&&pGe(S,G,j,kt),Lqe();var xn=S.memoizedState,Ni=G.state=xn;if(ZY(S,j,G,W),Ni=S.memoizedState,te===ke&&xn===Ni&&!IY()&&!QY()&&!z)return typeof G.componentDidUpdate=="function"&&(te!==x.memoizedProps||xn!==x.memoizedState)&&(S.flags|=ds),typeof G.getSnapshotBeforeUpdate=="function"&&(te!==x.memoizedProps||xn!==x.memoizedState)&&(S.flags|=RM),!1;typeof Zt=="function"&&(Fye(S,L,Zt,j),Ni=S.memoizedState);var wr=QY()||hGe(S,L,pe,j,xn,Ni,kt)||z;return wr?(!nn&&(typeof G.UNSAFE_componentWillUpdate=="function"||typeof G.componentWillUpdate=="function")&&(typeof G.componentWillUpdate=="function"&&G.componentWillUpdate(j,Ni,kt),typeof G.UNSAFE_componentWillUpdate=="function"&&G.UNSAFE_componentWillUpdate(j,Ni,kt)),typeof G.componentDidUpdate=="function"&&(S.flags|=ds),typeof G.getSnapshotBeforeUpdate=="function"&&(S.flags|=RM)):(typeof G.componentDidUpdate=="function"&&(te!==x.memoizedProps||xn!==x.memoizedState)&&(S.flags|=ds),typeof G.getSnapshotBeforeUpdate=="function"&&(te!==x.memoizedProps||xn!==x.memoizedState)&&(S.flags|=RM),S.memoizedProps=j,S.memoizedState=Ni),G.props=j,G.state=Ni,G.context=kt,wr}function eL(x,S){return{value:x,source:S,stack:bc(S),digest:null}}function Bye(x,S,L){return{value:x,source:null,stack:L??null,digest:S??null}}function $tn(x,S){return!0}function zye(x,S){try{var L=$tn(x,S);if(L===!1)return;var j=S.value,W=S.source,G=S.stack,te=G!==null?G:"";if(j!=null&&j._suppressLogging){if(x.tag===c)return;console.error(j)}var pe=W?bi(W):null,ke=pe?"The above error occurred in the <"+pe+"> component:":"The above error occurred in one of your React components:",Ue;if(x.tag===d)Ue=`Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;else{var et=bi(x)||"Anonymous";Ue="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+et+".")}var kt=ke+`
`+te+`

`+(""+Ue);console.error(kt)}catch(Dt){setTimeout(function(){throw Dt})}}var Vtn=typeof WeakMap=="function"?WeakMap:Map;function gGe(x,S,L){var j=s1(yl,L);j.tag=qve,j.payload={element:null};var W=S.value;return j.callback=function(){Iin(W),zye(x,S)},j}function Hye(x,S,L){var j=s1(yl,L);j.tag=qve;var W=x.type.getDerivedStateFromError;if(typeof W=="function"){var G=S.value;j.payload=function(){return W(G)},j.callback=function(){DYe(x),zye(x,S)}}var te=x.stateNode;return te!==null&&typeof te.componentDidCatch=="function"&&(j.callback=function(){DYe(x),zye(x,S),typeof W!="function"&&Lin(this);var ke=S.value,Ue=S.stack;this.componentDidCatch(ke,{componentStack:Ue!==null?Ue:""}),typeof W!="function"&&(cg(x.lanes,to)||s("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",bi(x)||"Unknown"))}),j}function bGe(x,S,L){var j=x.pingCache,W;if(j===null?(j=x.pingCache=new Vtn,W=new Set,j.set(S,W)):(W=j.get(S),W===void 0&&(W=new Set,j.set(S,W))),!W.has(L)){W.add(L);var G=Ain.bind(null,x,S,L);ry&&sV(x,L),S.then(G,G)}}function Btn(x,S,L,j){var W=x.updateQueue;if(W===null){var G=new Set;G.add(L),x.updateQueue=G}else W.add(L)}function ztn(x,S){var L=x.tag;if((x.mode&is)===kr&&(L===l||L===w||L===D)){var j=x.alternate;j?(x.updateQueue=j.updateQueue,x.memoizedState=j.memoizedState,x.lanes=j.lanes):(x.updateQueue=null,x.memoizedState=null)}}function vGe(x){var S=x;do{if(S.tag===N&&wtn(S))return S;S=S.return}while(S!==null);return null}function yGe(x,S,L,j,W){if((x.mode&is)===kr){if(x===S)x.flags|=Ff;else{if(x.flags|=Us,L.flags|=cbe,L.flags&=~(xXt|z$),L.tag===c){var G=L.alternate;if(G===null)L.tag=M;else{var te=s1(yl,to);te.tag=qY,bN(L,te,to)}}L.lanes=Io(L.lanes,to)}return x}return x.flags|=Ff,x.lanes=W,x}function Htn(x,S,L,j,W){if(L.flags|=z$,ry&&sV(x,W),j!==null&&typeof j=="object"&&typeof j.then=="function"){var G=j;ztn(L),ih()&&L.mode&is&&uqe();var te=vGe(S);if(te!==null){te.flags&=~Gw,yGe(te,S,L,x,W),te.mode&is&&bGe(x,G,W),Btn(te,x,G);return}else{if(!dZt(W)){bGe(x,G,W),w0e();return}var pe=new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");j=pe}}else if(ih()&&L.mode&is){uqe();var ke=vGe(S);if(ke!==null){(ke.flags&Ff)===Or&&(ke.flags|=Gw),yGe(ke,S,L,x,W),Pve(eL(j,L));return}}j=eL(j,L),win(j);var Ue=S;do{switch(Ue.tag){case d:{var et=j;Ue.flags|=Ff;var kt=X$(W);Ue.lanes=Io(Ue.lanes,kt);var Dt=gGe(Ue,et,kt);Xve(Ue,Dt);return}case c:var Zt=j,nn=Ue.type,xn=Ue.stateNode;if((Ue.flags&Us)===Or&&(typeof nn.getDerivedStateFromError=="function"||xn!==null&&typeof xn.componentDidCatch=="function"&&!vYe(xn))){Ue.flags|=Ff;var Ni=X$(W);Ue.lanes=Io(Ue.lanes,Ni);var wr=Hye(Ue,Zt,Ni);Xve(Ue,wr);return}break}Ue=Ue.return}while(Ue!==null)}function Wtn(){return null}var W8=n.ReactCurrentOwner,hy=!1,Wye,U8,Uye,Kye,qye,tL,Gye,wX,K8;Wye={},U8={},Uye={},Kye={},qye={},tL=!1,Gye={},wX={},K8={};function $f(x,S,L,j){x===null?S.child=wqe(S,null,L,j):S.child=iP(S,x.child,L,j)}function Utn(x,S,L,j){S.child=iP(S,x.child,null,j),S.child=iP(S,null,L,j)}function _Ge(x,S,L,j,W){if(S.type!==S.elementType){var G=L.propTypes;G&&sy(G,j,"prop",cn(L))}var te=L.render,pe=S.ref,ke,Ue;oP(S,W),W$(S);{if(W8.current=S,tr(!0),ke=dP(x,S,te,j,pe,W),Ue=hP(),S.mode&xc){Md(!0);try{ke=dP(x,S,te,j,pe,W),Ue=hP()}finally{Md(!1)}}tr(!1)}return FR(),x!==null&&!hy?(Oqe(x,S,W),a1(x,S,W)):(ih()&&Ue&&Mve(S),S.flags|=PR,$f(x,S,ke,W),S.child)}function xGe(x,S,L,j,W){if(x===null){var G=L.type;if(Xin(G)&&L.compare===null&&L.defaultProps===void 0){var te=G;return te=_P(G),S.tag=D,S.type=te,Zye(S,G),wGe(x,S,te,j,W)}{var pe=G.propTypes;if(pe&&sy(pe,j,"prop",cn(G)),L.defaultProps!==void 0){var ke=cn(G)||"Unknown";K8[ke]||(s("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",ke),K8[ke]=!0)}}var Ue=A0e(L.type,null,j,S,S.mode,W);return Ue.ref=S.ref,Ue.return=S,S.child=Ue,Ue}{var et=L.type,kt=et.propTypes;kt&&sy(kt,j,"prop",cn(et))}var Dt=x.child,Zt=i0e(x,W);if(!Zt){var nn=Dt.memoizedProps,xn=L.compare;if(xn=xn!==null?xn:d8,xn(nn,j)&&x.ref===S.ref)return a1(x,S,W)}S.flags|=PR;var Ni=sL(Dt,j);return Ni.ref=S.ref,Ni.return=S,S.child=Ni,Ni}function wGe(x,S,L,j,W){if(S.type!==S.elementType){var G=S.elementType;if(G.$$typeof===ft){var te=G,pe=te._payload,ke=te._init;try{G=ke(pe)}catch{G=null}var Ue=G&&G.propTypes;Ue&&sy(Ue,j,"prop",cn(G))}}if(x!==null){var et=x.memoizedProps;if(d8(et,j)&&x.ref===S.ref&&S.type===x.type)if(hy=!1,S.pendingProps=j=et,i0e(x,W))(x.flags&cbe)!==Or&&(hy=!0);else return S.lanes=x.lanes,a1(x,S,W)}return Yye(x,S,L,j,W)}function CGe(x,S,L){var j=S.pendingProps,W=j.children,G=x!==null?x.memoizedState:null;if(j.mode==="hidden"||H)if((S.mode&is)===kr){var te={baseLanes:On,cachePool:null,transitions:null};S.memoizedState=te,PX(S,L)}else if(cg(L,lg)){var kt={baseLanes:On,cachePool:null,transitions:null};S.memoizedState=kt;var Dt=G!==null?G.baseLanes:L;PX(S,Dt)}else{var pe=null,ke;if(G!==null){var Ue=G.baseLanes;ke=Io(Ue,L)}else ke=L;S.lanes=S.childLanes=lg;var et={baseLanes:ke,cachePool:pe,transitions:null};return S.memoizedState=et,S.updateQueue=null,PX(S,ke),null}else{var Zt;G!==null?(Zt=Io(G.baseLanes,L),S.memoizedState=null):Zt=L,PX(S,Zt)}return $f(x,S,W,L),S.child}function Ktn(x,S,L){var j=S.pendingProps;return $f(x,S,j,L),S.child}function qtn(x,S,L){var j=S.pendingProps.children;return $f(x,S,j,L),S.child}function Gtn(x,S,L){{S.flags|=ds;{var j=S.stateNode;j.effectDuration=0,j.passiveEffectDuration=0}}var W=S.pendingProps,G=W.children;return $f(x,S,G,L),S.child}function SGe(x,S){var L=S.ref;(x===null&&L!==null||x!==null&&x.ref!==L)&&(S.flags|=oN,S.flags|=ube)}function Yye(x,S,L,j,W){if(S.type!==S.elementType){var G=L.propTypes;G&&sy(G,j,"prop",cn(L))}var te;{var pe=QR(S,L,!0);te=JR(S,pe)}var ke,Ue;oP(S,W),W$(S);{if(W8.current=S,tr(!0),ke=dP(x,S,L,j,te,W),Ue=hP(),S.mode&xc){Md(!0);try{ke=dP(x,S,L,j,te,W),Ue=hP()}finally{Md(!1)}}tr(!1)}return FR(),x!==null&&!hy?(Oqe(x,S,W),a1(x,S,W)):(ih()&&Ue&&Mve(S),S.flags|=PR,$f(x,S,ke,W),S.child)}function NGe(x,S,L,j,W){{switch(drn(S)){case!1:{var G=S.stateNode,te=S.type,pe=new te(S.memoizedProps,G.context),ke=pe.state;G.updater.enqueueSetState(G,ke,null);break}case!0:{S.flags|=Us,S.flags|=Ff;var Ue=new Error("Simulated error coming from DevTools"),et=X$(W);S.lanes=Io(S.lanes,et);var kt=Hye(S,eL(Ue,S),et);Xve(S,kt);break}}if(S.type!==S.elementType){var Dt=L.propTypes;Dt&&sy(Dt,j,"prop",cn(L))}}var Zt;S_(L)?(Zt=!0,RY(S)):Zt=!1,oP(S,W);var nn=S.stateNode,xn;nn===null?(SX(x,S),mGe(S,L,j),Vye(S,L,j,W),xn=!0):x===null?xn=jtn(S,L,j,W):xn=Ftn(x,S,L,j,W);var Ni=Xye(x,S,L,xn,Zt,W);{var wr=S.stateNode;xn&&wr.props!==j&&(tL||s("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",bi(S)||"a component"),tL=!0)}return Ni}function Xye(x,S,L,j,W,G){SGe(x,S);var te=(S.flags&Us)!==Or;if(!j&&!te)return W&&sqe(S,L,!1),a1(x,S,G);var pe=S.stateNode;W8.current=S;var ke;if(te&&typeof L.getDerivedStateFromError!="function")ke=null,cGe();else{W$(S);{if(tr(!0),ke=pe.render(),S.mode&xc){Md(!0);try{pe.render()}finally{Md(!1)}}tr(!1)}FR()}return S.flags|=PR,x!==null&&te?Utn(x,S,ke,G):$f(x,S,ke,G),S.memoizedState=pe.state,W&&sqe(S,L,!0),S.child}function EGe(x){var S=x.stateNode;S.pendingContext?rqe(x,S.pendingContext,S.pendingContext!==S.context):S.context&&rqe(x,S.context,!1),Zve(x,S.containerInfo)}function Ytn(x,S,L){if(EGe(S),x===null)throw new Error("Should have a current fiber. This is a bug in React.");var j=S.pendingProps,W=S.memoizedState,G=W.element;Mqe(x,S),ZY(S,j,null,L);var te=S.memoizedState;S.stateNode;var pe=te.element;if(W.isDehydrated){var ke={element:pe,isDehydrated:!1,cache:te.cache,pendingSuspenseBoundaries:te.pendingSuspenseBoundaries,transitions:te.transitions},Ue=S.updateQueue;if(Ue.baseState=ke,S.memoizedState=ke,S.flags&Gw){var et=eL(new Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),S);return DGe(x,S,pe,L,et)}else if(pe!==G){var kt=eL(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),S);return DGe(x,S,pe,L,kt)}else{Qen(S);var Dt=wqe(S,null,pe,L);S.child=Dt;for(var Zt=Dt;Zt;)Zt.flags=Zt.flags&~hu|Yw,Zt=Zt.sibling}}else{if(nP(),pe===G)return a1(x,S,L);$f(x,S,pe,L)}return S.child}function DGe(x,S,L,j,W){return nP(),Pve(W),S.flags|=Gw,$f(x,S,L,j),S.child}function Xtn(x,S,L){Aqe(S),x===null&&Rve(S);var j=S.type,W=S.pendingProps,G=x!==null?x.memoizedProps:null,te=W.children,pe=pve(j,W);return pe?te=null:G!==null&&pve(j,G)&&(S.flags|=B$),SGe(x,S),$f(x,S,te,L),S.child}function Ztn(x,S){return x===null&&Rve(S),null}function Qtn(x,S,L,j){SX(x,S);var W=S.pendingProps,G=L,te=G._payload,pe=G._init,ke=pe(te);S.type=ke;var Ue=S.tag=Zin(ke),et=dy(ke,W),kt;switch(Ue){case l:return Zye(S,ke),S.type=ke=_P(ke),kt=Yye(null,S,ke,et,j),kt;case c:return S.type=ke=D0e(ke),kt=NGe(null,S,ke,et,j),kt;case w:return S.type=ke=k0e(ke),kt=_Ge(null,S,ke,et,j),kt;case E:{if(S.type!==S.elementType){var Dt=ke.propTypes;Dt&&sy(Dt,et,"prop",cn(ke))}return kt=xGe(null,S,ke,dy(ke.type,et),j),kt}}var Zt="";throw ke!==null&&typeof ke=="object"&&ke.$$typeof===ft&&(Zt=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+ke+". "+("Lazy element type must resolve to a class or function."+Zt))}function Jtn(x,S,L,j,W){SX(x,S),S.tag=c;var G;return S_(L)?(G=!0,RY(S)):G=!1,oP(S,W),mGe(S,L,j),Vye(S,L,j,W),Xye(null,S,L,!0,G,W)}function enn(x,S,L,j){SX(x,S);var W=S.pendingProps,G;{var te=QR(S,L,!1);G=JR(S,te)}oP(S,j);var pe,ke;W$(S);{if(L.prototype&&typeof L.prototype.render=="function"){var Ue=cn(L)||"Unknown";Wye[Ue]||(s("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",Ue,Ue),Wye[Ue]=!0)}S.mode&xc&&ly.recordLegacyContextWarning(S,null),tr(!0),W8.current=S,pe=dP(null,S,L,W,G,j),ke=hP(),tr(!1)}if(FR(),S.flags|=PR,typeof pe=="object"&&pe!==null&&typeof pe.render=="function"&&pe.$$typeof===void 0){var et=cn(L)||"Unknown";U8[et]||(s("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",et,et,et),U8[et]=!0)}if(typeof pe=="object"&&pe!==null&&typeof pe.render=="function"&&pe.$$typeof===void 0){{var kt=cn(L)||"Unknown";U8[kt]||(s("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",kt,kt,kt),U8[kt]=!0)}S.tag=c,S.memoizedState=null,S.updateQueue=null;var Dt=!1;return S_(L)?(Dt=!0,RY(S)):Dt=!1,S.memoizedState=pe.state!==null&&pe.state!==void 0?pe.state:null,Yve(S),fGe(S,pe),Vye(S,L,W,j),Xye(null,S,L,!0,Dt,j)}else{if(S.tag=l,S.mode&xc){Md(!0);try{pe=dP(null,S,L,W,G,j),ke=hP()}finally{Md(!1)}}return ih()&&ke&&Mve(S),$f(null,S,pe,j),Zye(S,L),S.child}}function Zye(x,S){{if(S&&S.childContextTypes&&s("%s(...): childContextTypes cannot be defined on a function component.",S.displayName||S.name||"Component"),x.ref!==null){var L="",j=Hu();j&&(L+=`

Check the render method of \``+j+"`.");var W=j||"",G=x._debugSource;G&&(W=G.fileName+":"+G.lineNumber),qye[W]||(qye[W]=!0,s("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",L))}if(S.defaultProps!==void 0){var te=cn(S)||"Unknown";K8[te]||(s("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",te),K8[te]=!0)}if(typeof S.getDerivedStateFromProps=="function"){var pe=cn(S)||"Unknown";Kye[pe]||(s("%s: Function components do not support getDerivedStateFromProps.",pe),Kye[pe]=!0)}if(typeof S.contextType=="object"&&S.contextType!==null){var ke=cn(S)||"Unknown";Uye[ke]||(s("%s: Function components do not support contextType.",ke),Uye[ke]=!0)}}}var Qye={dehydrated:null,treeContext:null,retryLane:Ld};function Jye(x){return{baseLanes:x,cachePool:Wtn(),transitions:null}}function tnn(x,S){var L=null;return{baseLanes:Io(x.baseLanes,S),cachePool:L,transitions:x.transitions}}function nnn(x,S,L,j){if(S!==null){var W=S.memoizedState;if(W===null)return!1}return eye(x,P8)}function inn(x,S){return iY(x.childLanes,S)}function kGe(x,S,L){var j=S.pendingProps;hrn(S)&&(S.flags|=Us);var W=cy.current,G=!1,te=(S.flags&Us)!==Or;if(te||nnn(W,x)?(G=!0,S.flags&=~Us):(x===null||x.memoizedState!==null)&&(W=xtn(W,Pqe)),W=aP(W),yN(S,W),x===null){Rve(S);var pe=S.memoizedState;if(pe!==null){var ke=pe.dehydrated;if(ke!==null)return lnn(S,ke)}var Ue=j.children,et=j.fallback;if(G){var kt=rnn(S,Ue,et,L),Dt=S.child;return Dt.memoizedState=Jye(L),S.memoizedState=Qye,kt}else return e0e(S,Ue)}else{var Zt=x.memoizedState;if(Zt!==null){var nn=Zt.dehydrated;if(nn!==null)return cnn(x,S,te,j,nn,Zt,L)}if(G){var xn=j.fallback,Ni=j.children,wr=snn(x,S,Ni,xn,L),sr=S.child,os=x.child.memoizedState;return sr.memoizedState=os===null?Jye(L):tnn(os,L),sr.childLanes=inn(x,L),S.memoizedState=Qye,wr}else{var Ko=j.children,Bt=onn(x,S,Ko,L);return S.memoizedState=null,Bt}}}function e0e(x,S,L){var j=x.mode,W={mode:"visible",children:S},G=t0e(W,j);return G.return=x,x.child=G,G}function rnn(x,S,L,j){var W=x.mode,G=x.child,te={mode:"hidden",children:S},pe,ke;return(W&is)===kr&&G!==null?(pe=G,pe.childLanes=On,pe.pendingProps=te,x.mode&va&&(pe.actualDuration=0,pe.actualStartTime=-1,pe.selfBaseDuration=0,pe.treeBaseDuration=0),ke=DN(L,W,j,null)):(pe=t0e(te,W),ke=DN(L,W,j,null)),pe.return=x,ke.return=x,pe.sibling=ke,x.child=pe,ke}function t0e(x,S,L){return MYe(x,S,On,null)}function MGe(x,S){return sL(x,S)}function onn(x,S,L,j){var W=x.child,G=W.sibling,te=MGe(W,{mode:"visible",children:L});if((S.mode&is)===kr&&(te.lanes=j),te.return=S,te.sibling=null,G!==null){var pe=S.deletions;pe===null?(S.deletions=[G],S.flags|=AM):pe.push(G)}return S.child=te,te}function snn(x,S,L,j,W){var G=S.mode,te=x.child,pe=te.sibling,ke={mode:"hidden",children:L},Ue;if((G&is)===kr&&S.child!==te){var et=S.child;Ue=et,Ue.childLanes=On,Ue.pendingProps=ke,S.mode&va&&(Ue.actualDuration=0,Ue.actualStartTime=-1,Ue.selfBaseDuration=te.selfBaseDuration,Ue.treeBaseDuration=te.treeBaseDuration),S.deletions=null}else Ue=MGe(te,ke),Ue.subtreeFlags=te.subtreeFlags&Zw;var kt;return pe!==null?kt=sL(pe,j):(kt=DN(j,G,W,null),kt.flags|=hu),kt.return=S,Ue.return=S,Ue.sibling=kt,S.child=Ue,kt}function CX(x,S,L,j){j!==null&&Pve(j),iP(S,x.child,null,L);var W=S.pendingProps,G=W.children,te=e0e(S,G);return te.flags|=hu,S.memoizedState=null,te}function ann(x,S,L,j,W){var G=S.mode,te={mode:"visible",children:L},pe=t0e(te,G),ke=DN(j,G,W,null);return ke.flags|=hu,pe.return=S,ke.return=S,pe.sibling=ke,S.child=pe,(S.mode&is)!==kr&&iP(S,x.child,null,W),ke}function lnn(x,S,L){return(x.mode&is)===kr?(s("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."),x.lanes=to):yve(S)?x.lanes=$M:x.lanes=lg,null}function cnn(x,S,L,j,W,G,te){if(L)if(S.flags&Gw){S.flags&=~Gw;var Bt=Bye(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return CX(x,S,te,Bt)}else{if(S.memoizedState!==null)return S.child=x.child,S.flags|=Us,null;var wn=j.children,zt=j.fallback,Bn=ann(x,S,wn,zt,te),Pi=S.child;return Pi.memoizedState=Jye(te),S.memoizedState=Qye,Bn}else{if(Xen(),(S.mode&is)===kr)return CX(x,S,te,null);if(yve(W)){var pe,ke,Ue;{var et=fen(W);pe=et.digest,ke=et.message,Ue=et.stack}var kt;ke?kt=new Error(ke):kt=new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var Dt=Bye(kt,pe,Ue);return CX(x,S,te,Dt)}var Zt=cg(te,x.childLanes);if(hy||Zt){var nn=RX();if(nn!==null){var xn=yZt(nn,te);if(xn!==Ld&&xn!==G.retryLane){G.retryLane=xn;var Ni=yl;qm(x,xn),Zu(nn,x,xn,Ni)}}w0e();var wr=Bye(new Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));return CX(x,S,te,wr)}else if(QKe(W)){S.flags|=Us,S.child=x.child;var sr=Rin.bind(null,x);return men(W,sr),null}else{Jen(S,W,G.treeContext);var os=j.children,Ko=e0e(S,os);return Ko.flags|=Yw,Ko}}}function LGe(x,S,L){x.lanes=Io(x.lanes,S);var j=x.alternate;j!==null&&(j.lanes=Io(j.lanes,S)),Uve(x.return,S,L)}function unn(x,S,L){for(var j=S;j!==null;){if(j.tag===N){var W=j.memoizedState;W!==null&&LGe(j,L,x)}else if(j.tag===A)LGe(j,L,x);else if(j.child!==null){j.child.return=j,j=j.child;continue}if(j===x)return;for(;j.sibling===null;){if(j.return===null||j.return===x)return;j=j.return}j.sibling.return=j.return,j=j.sibling}}function dnn(x){for(var S=x,L=null;S!==null;){var j=S.alternate;j!==null&&tX(j)===null&&(L=S),S=S.sibling}return L}function hnn(x){if(x!==void 0&&x!=="forwards"&&x!=="backwards"&&x!=="together"&&!Gye[x])if(Gye[x]=!0,typeof x=="string")switch(x.toLowerCase()){case"together":case"forwards":case"backwards":{s('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',x,x.toLowerCase());break}case"forward":case"backward":{s('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',x,x.toLowerCase());break}default:s('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',x);break}else s('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',x)}function fnn(x,S){x!==void 0&&!wX[x]&&(x!=="collapsed"&&x!=="hidden"?(wX[x]=!0,s('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',x)):S!=="forwards"&&S!=="backwards"&&(wX[x]=!0,s('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',x)))}function TGe(x,S){{var L=Ws(x),j=!L&&typeof Qi(x)=="function";if(L||j){var W=L?"array":"iterable";return s("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",W,S,W),!1}}return!0}function mnn(x,S){if((S==="forwards"||S==="backwards")&&x!==void 0&&x!==null&&x!==!1)if(Ws(x)){for(var L=0;L<x.length;L++)if(!TGe(x[L],L))return}else{var j=Qi(x);if(typeof j=="function"){var W=j.call(x);if(W)for(var G=W.next(),te=0;!G.done;G=W.next()){if(!TGe(G.value,te))return;te++}}else s('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',S)}}function n0e(x,S,L,j,W){var G=x.memoizedState;G===null?x.memoizedState={isBackwards:S,rendering:null,renderingStartTime:0,last:j,tail:L,tailMode:W}:(G.isBackwards=S,G.rendering=null,G.renderingStartTime=0,G.last=j,G.tail=L,G.tailMode=W)}function IGe(x,S,L){var j=S.pendingProps,W=j.revealOrder,G=j.tail,te=j.children;hnn(W),fnn(G,W),mnn(te,W),$f(x,S,te,L);var pe=cy.current,ke=eye(pe,P8);if(ke)pe=tye(pe,P8),S.flags|=Us;else{var Ue=x!==null&&(x.flags&Us)!==Or;Ue&&unn(S,S.child,L),pe=aP(pe)}if(yN(S,pe),(S.mode&is)===kr)S.memoizedState=null;else switch(W){case"forwards":{var et=dnn(S.child),kt;et===null?(kt=S.child,S.child=null):(kt=et.sibling,et.sibling=null),n0e(S,!1,kt,et,G);break}case"backwards":{var Dt=null,Zt=S.child;for(S.child=null;Zt!==null;){var nn=Zt.alternate;if(nn!==null&&tX(nn)===null){S.child=Zt;break}var xn=Zt.sibling;Zt.sibling=Dt,Dt=Zt,Zt=xn}n0e(S,!0,Dt,null,G);break}case"together":{n0e(S,!1,null,null,void 0);break}default:S.memoizedState=null}return S.child}function pnn(x,S,L){Zve(S,S.stateNode.containerInfo);var j=S.pendingProps;return x===null?S.child=iP(S,null,j,L):$f(x,S,j,L),S.child}var AGe=!1;function gnn(x,S,L){var j=S.type,W=j._context,G=S.pendingProps,te=S.memoizedProps,pe=G.value;{"value"in G||AGe||(AGe=!0,s("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var ke=S.type.propTypes;ke&&sy(ke,G,"prop","Context.Provider")}if(Nqe(S,W,pe),te!==null){var Ue=te.value;if(hg(Ue,pe)){if(te.children===G.children&&!IY())return a1(x,S,L)}else htn(S,W,L)}var et=G.children;return $f(x,S,et,L),S.child}var RGe=!1;function bnn(x,S,L){var j=S.type;j._context===void 0?j!==j.Consumer&&(RGe||(RGe=!0,s("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):j=j._context;var W=S.pendingProps,G=W.children;typeof G!="function"&&s("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),oP(S,L);var te=fu(j);W$(S);var pe;return W8.current=S,tr(!0),pe=G(te),tr(!1),FR(),S.flags|=PR,$f(x,S,pe,L),S.child}function q8(){hy=!0}function SX(x,S){(S.mode&is)===kr&&x!==null&&(x.alternate=null,S.alternate=null,S.flags|=hu)}function a1(x,S,L){return x!==null&&(S.dependencies=x.dependencies),cGe(),oV(S.lanes),cg(L,S.childLanes)?(utn(x,S),S.child):null}function vnn(x,S,L){{var j=S.return;if(j===null)throw new Error("Cannot swap the root fiber.");if(x.alternate=null,S.alternate=null,L.index=S.index,L.sibling=S.sibling,L.return=S.return,L.ref=S.ref,S===j.child)j.child=L;else{var W=j.child;if(W===null)throw new Error("Expected parent to have a child.");for(;W.sibling!==S;)if(W=W.sibling,W===null)throw new Error("Expected to find the previous sibling.");W.sibling=L}var G=j.deletions;return G===null?(j.deletions=[x],j.flags|=AM):G.push(x),L.flags|=hu,L}}function i0e(x,S){var L=x.lanes;return!!cg(L,S)}function ynn(x,S,L){switch(S.tag){case d:EGe(S),S.stateNode,nP();break;case f:Aqe(S);break;case c:{var j=S.type;S_(j)&&RY(S);break}case h:Zve(S,S.stateNode.containerInfo);break;case _:{var W=S.memoizedProps.value,G=S.type._context;Nqe(S,G,W);break}case C:{var te=cg(L,S.childLanes);te&&(S.flags|=ds);{var pe=S.stateNode;pe.effectDuration=0,pe.passiveEffectDuration=0}}break;case N:{var ke=S.memoizedState;if(ke!==null){if(ke.dehydrated!==null)return yN(S,aP(cy.current)),S.flags|=Us,null;var Ue=S.child,et=Ue.childLanes;if(cg(L,et))return kGe(x,S,L);yN(S,aP(cy.current));var kt=a1(x,S,L);return kt!==null?kt.sibling:null}else yN(S,aP(cy.current));break}case A:{var Dt=(x.flags&Us)!==Or,Zt=cg(L,S.childLanes);if(Dt){if(Zt)return IGe(x,S,L);S.flags|=Us}var nn=S.memoizedState;if(nn!==null&&(nn.rendering=null,nn.tail=null,nn.lastEffect=null),yN(S,cy.current),Zt)break;return null}case P:case O:return S.lanes=On,CGe(x,S,L)}return a1(x,S,L)}function PGe(x,S,L){if(S._debugNeedsRemount&&x!==null)return vnn(x,S,A0e(S.type,S.key,S.pendingProps,S._debugOwner||null,S.mode,S.lanes));if(x!==null){var j=x.memoizedProps,W=S.pendingProps;if(j!==W||IY()||S.type!==x.type)hy=!0;else{var G=i0e(x,L);if(!G&&(S.flags&Us)===Or)return hy=!1,ynn(x,S,L);(x.flags&cbe)!==Or?hy=!0:hy=!1}}else if(hy=!1,ih()&&Wen(S)){var te=S.index,pe=Uen();cqe(S,pe,te)}switch(S.lanes=On,S.tag){case u:return enn(x,S,S.type,L);case k:{var ke=S.elementType;return Qtn(x,S,ke,L)}case l:{var Ue=S.type,et=S.pendingProps,kt=S.elementType===Ue?et:dy(Ue,et);return Yye(x,S,Ue,kt,L)}case c:{var Dt=S.type,Zt=S.pendingProps,nn=S.elementType===Dt?Zt:dy(Dt,Zt);return NGe(x,S,Dt,nn,L)}case d:return Ytn(x,S,L);case f:return Xtn(x,S,L);case m:return Ztn(x,S);case N:return kGe(x,S,L);case h:return pnn(x,S,L);case w:{var xn=S.type,Ni=S.pendingProps,wr=S.elementType===xn?Ni:dy(xn,Ni);return _Ge(x,S,xn,wr,L)}case p:return Ktn(x,S,L);case g:return qtn(x,S,L);case C:return Gtn(x,S,L);case _:return gnn(x,S,L);case y:return bnn(x,S,L);case E:{var sr=S.type,os=S.pendingProps,Ko=dy(sr,os);if(S.type!==S.elementType){var Bt=sr.propTypes;Bt&&sy(Bt,Ko,"prop",cn(sr))}return Ko=dy(sr.type,Ko),xGe(x,S,sr,Ko,L)}case D:return wGe(x,S,S.type,S.pendingProps,L);case M:{var wn=S.type,zt=S.pendingProps,Bn=S.elementType===wn?zt:dy(wn,zt);return Jtn(x,S,wn,Bn,L)}case A:return IGe(x,S,L);case R:break;case P:return CGe(x,S,L)}throw new Error("Unknown unit of work tag ("+S.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function fP(x){x.flags|=ds}function OGe(x){x.flags|=oN,x.flags|=ube}var jGe,r0e,FGe,$Ge;jGe=function(x,S,L,j){for(var W=S.child;W!==null;){if(W.tag===f||W.tag===m)BJt(x,W.stateNode);else if(W.tag!==h){if(W.child!==null){W.child.return=W,W=W.child;continue}}if(W===S)return;for(;W.sibling===null;){if(W.return===null||W.return===S)return;W=W.return}W.sibling.return=W.return,W=W.sibling}},r0e=function(x,S){},FGe=function(x,S,L,j,W){var G=x.memoizedProps;if(G!==j){var te=S.stateNode,pe=Qve(),ke=HJt(te,L,G,j,W,pe);S.updateQueue=ke,ke&&fP(S)}},$Ge=function(x,S,L,j){L!==j&&fP(S)};function G8(x,S){if(!ih())switch(x.tailMode){case"hidden":{for(var L=x.tail,j=null;L!==null;)L.alternate!==null&&(j=L),L=L.sibling;j===null?x.tail=null:j.sibling=null;break}case"collapsed":{for(var W=x.tail,G=null;W!==null;)W.alternate!==null&&(G=W),W=W.sibling;G===null?!S&&x.tail!==null?x.tail.sibling=null:x.tail=null:G.sibling=null;break}}}function oh(x){var S=x.alternate!==null&&x.alternate.child===x.child,L=On,j=Or;if(S){if((x.mode&va)!==kr){for(var ke=x.selfBaseDuration,Ue=x.child;Ue!==null;)L=Io(L,Io(Ue.lanes,Ue.childLanes)),j|=Ue.subtreeFlags&Zw,j|=Ue.flags&Zw,ke+=Ue.treeBaseDuration,Ue=Ue.sibling;x.treeBaseDuration=ke}else for(var et=x.child;et!==null;)L=Io(L,Io(et.lanes,et.childLanes)),j|=et.subtreeFlags&Zw,j|=et.flags&Zw,et.return=x,et=et.sibling;x.subtreeFlags|=j}else{if((x.mode&va)!==kr){for(var W=x.actualDuration,G=x.selfBaseDuration,te=x.child;te!==null;)L=Io(L,Io(te.lanes,te.childLanes)),j|=te.subtreeFlags,j|=te.flags,W+=te.actualDuration,G+=te.treeBaseDuration,te=te.sibling;x.actualDuration=W,x.treeBaseDuration=G}else for(var pe=x.child;pe!==null;)L=Io(L,Io(pe.lanes,pe.childLanes)),j|=pe.subtreeFlags,j|=pe.flags,pe.return=x,pe=pe.sibling;x.subtreeFlags|=j}return x.childLanes=L,S}function _nn(x,S,L){if(rtn()&&(S.mode&is)!==kr&&(S.flags&Us)===Or)return gqe(S),nP(),S.flags|=Gw|z$|Ff,!1;var j=$Y(S);if(L!==null&&L.dehydrated!==null)if(x===null){if(!j)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(ntn(S),oh(S),(S.mode&va)!==kr){var W=L!==null;if(W){var G=S.child;G!==null&&(S.treeBaseDuration-=G.treeBaseDuration)}}return!1}else{if(nP(),(S.flags&Us)===Or&&(S.memoizedState=null),S.flags|=ds,oh(S),(S.mode&va)!==kr){var te=L!==null;if(te){var pe=S.child;pe!==null&&(S.treeBaseDuration-=pe.treeBaseDuration)}}return!1}else return bqe(),!0}function VGe(x,S,L){var j=S.pendingProps;switch(Lve(S),S.tag){case u:case k:case D:case l:case w:case p:case g:case C:case y:case E:return oh(S),null;case c:{var W=S.type;return S_(W)&&AY(S),oh(S),null}case d:{var G=S.stateNode;if(sP(S),Eve(S),iye(),G.pendingContext&&(G.context=G.pendingContext,G.pendingContext=null),x===null||x.child===null){var te=$Y(S);if(te)fP(S);else if(x!==null){var pe=x.memoizedState;(!pe.isDehydrated||(S.flags&Gw)!==Or)&&(S.flags|=RM,bqe())}}return r0e(x,S),oh(S),null}case f:{Jve(S);var ke=Iqe(),Ue=S.type;if(x!==null&&S.stateNode!=null)FGe(x,S,Ue,j,ke),x.ref!==S.ref&&OGe(S);else{if(!j){if(S.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return oh(S),null}var et=Qve(),kt=$Y(S);if(kt)etn(S,ke,et)&&fP(S);else{var Dt=VJt(Ue,j,ke,et,S);jGe(Dt,S,!1,!1),S.stateNode=Dt,zJt(Dt,Ue,j,ke)&&fP(S)}S.ref!==null&&OGe(S)}return oh(S),null}case m:{var Zt=j;if(x&&S.stateNode!=null){var nn=x.memoizedProps;$Ge(x,S,nn,Zt)}else{if(typeof Zt!="string"&&S.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var xn=Iqe(),Ni=Qve(),wr=$Y(S);wr?ttn(S)&&fP(S):S.stateNode=WJt(Zt,xn,Ni,S)}return oh(S),null}case N:{lP(S);var sr=S.memoizedState;if(x===null||x.memoizedState!==null&&x.memoizedState.dehydrated!==null){var os=_nn(x,S,sr);if(!os)return S.flags&Ff?S:null}if((S.flags&Us)!==Or)return S.lanes=L,(S.mode&va)!==kr&&kye(S),S;var Ko=sr!==null,Bt=x!==null&&x.memoizedState!==null;if(Ko!==Bt&&Ko){var wn=S.child;if(wn.flags|=PM,(S.mode&is)!==kr){var zt=x===null&&(S.memoizedProps.unstable_avoidThisFallback!==!0||!K);zt||eye(cy.current,Pqe)?xin():w0e()}}var Bn=S.updateQueue;if(Bn!==null&&(S.flags|=ds),oh(S),(S.mode&va)!==kr&&Ko){var Pi=S.child;Pi!==null&&(S.treeBaseDuration-=Pi.treeBaseDuration)}return null}case h:return sP(S),r0e(x,S),x===null&&jen(S.stateNode.containerInfo),oh(S),null;case _:var Di=S.type._context;return Wve(Di,S),oh(S),null;case M:{var zr=S.type;return S_(zr)&&AY(S),oh(S),null}case A:{lP(S);var lo=S.memoizedState;if(lo===null)return oh(S),null;var _a=(S.flags&Us)!==Or,Ls=lo.rendering;if(Ls===null)if(_a)G8(lo,!1);else{var Wc=Cin()&&(x===null||(x.flags&Us)===Or);if(!Wc)for(var Ts=S.child;Ts!==null;){var wc=tX(Ts);if(wc!==null){_a=!0,S.flags|=Us,G8(lo,!1);var nf=wc.updateQueue;return nf!==null&&(S.updateQueue=nf,S.flags|=ds),S.subtreeFlags=Or,dtn(S,L),yN(S,tye(cy.current,P8)),S.child}Ts=Ts.sibling}lo.tail!==null&&kd()>aYe()&&(S.flags|=Us,_a=!0,G8(lo,!1),S.lanes=$Ue)}else{if(!_a){var uh=tX(Ls);if(uh!==null){S.flags|=Us,_a=!0;var pg=uh.updateQueue;if(pg!==null&&(S.updateQueue=pg,S.flags|=ds),G8(lo,!0),lo.tail===null&&lo.tailMode==="hidden"&&!Ls.alternate&&!ih())return oh(S),null}else kd()*2-lo.renderingStartTime>aYe()&&L!==lg&&(S.flags|=Us,_a=!0,G8(lo,!1),S.lanes=$Ue)}if(lo.isBackwards)Ls.sibling=S.child,S.child=Ls;else{var zf=lo.last;zf!==null?zf.sibling=Ls:S.child=Ls,lo.last=Ls}}if(lo.tail!==null){var Hf=lo.tail;lo.rendering=Hf,lo.tail=Hf.sibling,lo.renderingStartTime=kd(),Hf.sibling=null;var rf=cy.current;return _a?rf=tye(rf,P8):rf=aP(rf),yN(S,rf),Hf}return oh(S),null}case R:break;case P:case O:{x0e(S);var h1=S.memoizedState,xP=h1!==null;if(x!==null){var uV=x.memoizedState,I_=uV!==null;I_!==xP&&!H&&(S.flags|=PM)}return!xP||(S.mode&is)===kr?oh(S):cg(T_,lg)&&(oh(S),S.subtreeFlags&(hu|ds)&&(S.flags|=PM)),null}case V:return null;case F:return null}throw new Error("Unknown unit of work tag ("+S.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function xnn(x,S,L){switch(Lve(S),S.tag){case c:{var j=S.type;S_(j)&&AY(S);var W=S.flags;return W&Ff?(S.flags=W&~Ff|Us,(S.mode&va)!==kr&&kye(S),S):null}case d:{S.stateNode,sP(S),Eve(S),iye();var G=S.flags;return(G&Ff)!==Or&&(G&Us)===Or?(S.flags=G&~Ff|Us,S):null}case f:return Jve(S),null;case N:{lP(S);var te=S.memoizedState;if(te!==null&&te.dehydrated!==null){if(S.alternate===null)throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");nP()}var pe=S.flags;return pe&Ff?(S.flags=pe&~Ff|Us,(S.mode&va)!==kr&&kye(S),S):null}case A:return lP(S),null;case h:return sP(S),null;case _:var ke=S.type._context;return Wve(ke,S),null;case P:case O:return x0e(S),null;case V:return null;default:return null}}function BGe(x,S,L){switch(Lve(S),S.tag){case c:{var j=S.type.childContextTypes;j!=null&&AY(S);break}case d:{S.stateNode,sP(S),Eve(S),iye();break}case f:{Jve(S);break}case h:sP(S);break;case N:lP(S);break;case A:lP(S);break;case _:var W=S.type._context;Wve(W,S);break;case P:case O:x0e(S);break}}var zGe=null;zGe=new Set;var NX=!1,sh=!1,wnn=typeof WeakSet=="function"?WeakSet:Set,Yi=null,mP=null,pP=null;function Cnn(x){sbe(null,function(){throw x}),abe()}var Snn=function(x,S){if(S.props=x.memoizedProps,S.state=x.memoizedState,x.mode&va)try{M_(),S.componentWillUnmount()}finally{k_(x)}else S.componentWillUnmount()};function HGe(x,S){try{wN(Uu,x)}catch(L){ol(x,S,L)}}function o0e(x,S,L){try{Snn(x,L)}catch(j){ol(x,S,j)}}function Nnn(x,S,L){try{L.componentDidMount()}catch(j){ol(x,S,j)}}function WGe(x,S){try{KGe(x)}catch(L){ol(x,S,L)}}function gP(x,S){var L=x.ref;if(L!==null)if(typeof L=="function"){var j;try{if(ae&&se&&x.mode&va)try{M_(),j=L(null)}finally{k_(x)}else j=L(null)}catch(W){ol(x,S,W)}typeof j=="function"&&s("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",bi(x))}else L.current=null}function EX(x,S,L){try{L()}catch(j){ol(x,S,j)}}var UGe=!1;function Enn(x,S){FJt(x.containerInfo),Yi=S,Dnn();var L=UGe;return UGe=!1,L}function Dnn(){for(;Yi!==null;){var x=Yi,S=x.child;(x.subtreeFlags&hbe)!==Or&&S!==null?(S.return=x,Yi=S):knn()}}function knn(){for(;Yi!==null;){var x=Yi;nl(x);try{Mnn(x)}catch(L){ol(x,x.return,L)}yc();var S=x.sibling;if(S!==null){S.return=x.return,Yi=S;return}Yi=x.return}}function Mnn(x){var S=x.alternate,L=x.flags;if((L&RM)!==Or){switch(nl(x),x.tag){case l:case w:case D:break;case c:{if(S!==null){var j=S.memoizedProps,W=S.memoizedState,G=x.stateNode;x.type===x.elementType&&!tL&&(G.props!==x.memoizedProps&&s("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",bi(x)||"instance"),G.state!==x.memoizedState&&s("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",bi(x)||"instance"));var te=G.getSnapshotBeforeUpdate(x.elementType===x.type?j:dy(x.type,j),W);{var pe=zGe;te===void 0&&!pe.has(x.type)&&(pe.add(x.type),s("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",bi(x)))}G.__reactInternalSnapshotBeforeUpdate=te}break}case d:{{var ke=x.stateNode;cen(ke.containerInfo)}break}case f:case m:case h:case M:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}yc()}}function fy(x,S,L){var j=S.updateQueue,W=j!==null?j.lastEffect:null;if(W!==null){var G=W.next,te=G;do{if((te.tag&x)===x){var pe=te.destroy;te.destroy=void 0,pe!==void 0&&((x&rh)!==Gm?WXt(S):(x&Uu)!==Gm&&RUe(S),(x&N_)!==Gm&&aV(!0),EX(S,L,pe),(x&N_)!==Gm&&aV(!1),(x&rh)!==Gm?UXt():(x&Uu)!==Gm&&PUe())}te=te.next}while(te!==G)}}function wN(x,S){var L=S.updateQueue,j=L!==null?L.lastEffect:null;if(j!==null){var W=j.next,G=W;do{if((G.tag&x)===x){(x&rh)!==Gm?zXt(S):(x&Uu)!==Gm&&KXt(S);var te=G.create;(x&N_)!==Gm&&aV(!0),G.destroy=te(),(x&N_)!==Gm&&aV(!1),(x&rh)!==Gm?HXt():(x&Uu)!==Gm&&qXt();{var pe=G.destroy;if(pe!==void 0&&typeof pe!="function"){var ke=void 0;(G.tag&Uu)!==Or?ke="useLayoutEffect":(G.tag&N_)!==Or?ke="useInsertionEffect":ke="useEffect";var Ue=void 0;pe===null?Ue=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof pe.then=="function"?Ue=`

It looks like you wrote `+ke+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:

`+ke+`(() => {
  async function fetchData() {
    // You can await here
    const response = await MyAPI.getData(someId);
    // ...
  }
  fetchData();
}, [someId]); // Or [] if effect doesn't need props or state

Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`:Ue=" You returned: "+pe,s("%s must not return anything besides a function, which is used for clean-up.%s",ke,Ue)}}}G=G.next}while(G!==W)}}function Lnn(x,S){if((S.flags&ds)!==Or)switch(S.tag){case C:{var L=S.stateNode.passiveEffectDuration,j=S.memoizedProps,W=j.id,G=j.onPostCommit,te=aGe(),pe=S.alternate===null?"mount":"update";sGe()&&(pe="nested-update"),typeof G=="function"&&G(W,pe,L,te);var ke=S.return;e:for(;ke!==null;){switch(ke.tag){case d:var Ue=ke.stateNode;Ue.passiveEffectDuration+=L;break e;case C:var et=ke.stateNode;et.passiveEffectDuration+=L;break e}ke=ke.return}break}}}function Tnn(x,S,L,j){if((L.flags&H$)!==Or)switch(L.tag){case l:case w:case D:{if(!sh)if(L.mode&va)try{M_(),wN(Uu|Wu,L)}finally{k_(L)}else wN(Uu|Wu,L);break}case c:{var W=L.stateNode;if(L.flags&ds&&!sh)if(S===null)if(L.type===L.elementType&&!tL&&(W.props!==L.memoizedProps&&s("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",bi(L)||"instance"),W.state!==L.memoizedState&&s("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",bi(L)||"instance")),L.mode&va)try{M_(),W.componentDidMount()}finally{k_(L)}else W.componentDidMount();else{var G=L.elementType===L.type?S.memoizedProps:dy(L.type,S.memoizedProps),te=S.memoizedState;if(L.type===L.elementType&&!tL&&(W.props!==L.memoizedProps&&s("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",bi(L)||"instance"),W.state!==L.memoizedState&&s("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",bi(L)||"instance")),L.mode&va)try{M_(),W.componentDidUpdate(G,te,W.__reactInternalSnapshotBeforeUpdate)}finally{k_(L)}else W.componentDidUpdate(G,te,W.__reactInternalSnapshotBeforeUpdate)}var pe=L.updateQueue;pe!==null&&(L.type===L.elementType&&!tL&&(W.props!==L.memoizedProps&&s("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",bi(L)||"instance"),W.state!==L.memoizedState&&s("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",bi(L)||"instance")),Tqe(L,pe,W));break}case d:{var ke=L.updateQueue;if(ke!==null){var Ue=null;if(L.child!==null)switch(L.child.tag){case f:Ue=L.child.stateNode;break;case c:Ue=L.child.stateNode;break}Tqe(L,ke,Ue)}break}case f:{var et=L.stateNode;if(S===null&&L.flags&ds){var kt=L.type,Dt=L.memoizedProps;YJt(et,kt,Dt)}break}case m:break;case h:break;case C:{{var Zt=L.memoizedProps,nn=Zt.onCommit,xn=Zt.onRender,Ni=L.stateNode.effectDuration,wr=aGe(),sr=S===null?"mount":"update";sGe()&&(sr="nested-update"),typeof xn=="function"&&xn(L.memoizedProps.id,sr,L.actualDuration,L.treeBaseDuration,L.actualStartTime,wr);{typeof nn=="function"&&nn(L.memoizedProps.id,sr,Ni,wr),kin(L);var os=L.return;e:for(;os!==null;){switch(os.tag){case d:var Ko=os.stateNode;Ko.effectDuration+=Ni;break e;case C:var Bt=os.stateNode;Bt.effectDuration+=Ni;break e}os=os.return}}}break}case N:{$nn(x,L);break}case A:case M:case R:case P:case O:case F:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}sh||L.flags&oN&&KGe(L)}function Inn(x){switch(x.tag){case l:case w:case D:{if(x.mode&va)try{M_(),HGe(x,x.return)}finally{k_(x)}else HGe(x,x.return);break}case c:{var S=x.stateNode;typeof S.componentDidMount=="function"&&Nnn(x,x.return,S),WGe(x,x.return);break}case f:{WGe(x,x.return);break}}}function Ann(x,S){for(var L=null,j=x;;){if(j.tag===f){if(L===null){L=j;try{var W=j.stateNode;S?oen(W):aen(j.stateNode,j.memoizedProps)}catch(te){ol(x,x.return,te)}}}else if(j.tag===m){if(L===null)try{var G=j.stateNode;S?sen(G):len(G,j.memoizedProps)}catch(te){ol(x,x.return,te)}}else if(!((j.tag===P||j.tag===O)&&j.memoizedState!==null&&j!==x)){if(j.child!==null){j.child.return=j,j=j.child;continue}}if(j===x)return;for(;j.sibling===null;){if(j.return===null||j.return===x)return;L===j&&(L=null),j=j.return}L===j&&(L=null),j.sibling.return=j.return,j=j.sibling}}function KGe(x){var S=x.ref;if(S!==null){var L=x.stateNode,j;switch(x.tag){case f:j=L;break;default:j=L}if(typeof S=="function"){var W;if(x.mode&va)try{M_(),W=S(j)}finally{k_(x)}else W=S(j);typeof W=="function"&&s("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",bi(x))}else S.hasOwnProperty("current")||s("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",bi(x)),S.current=j}}function Rnn(x){var S=x.alternate;S!==null&&(S.return=null),x.return=null}function qGe(x){var S=x.alternate;S!==null&&(x.alternate=null,qGe(S));{if(x.child=null,x.deletions=null,x.sibling=null,x.tag===f){var L=x.stateNode;L!==null&&Ven(L)}x.stateNode=null,x._debugOwner=null,x.return=null,x.dependencies=null,x.memoizedProps=null,x.memoizedState=null,x.pendingProps=null,x.stateNode=null,x.updateQueue=null}}function Pnn(x){for(var S=x.return;S!==null;){if(GGe(S))return S;S=S.return}throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function GGe(x){return x.tag===f||x.tag===d||x.tag===h}function YGe(x){var S=x;e:for(;;){for(;S.sibling===null;){if(S.return===null||GGe(S.return))return null;S=S.return}for(S.sibling.return=S.return,S=S.sibling;S.tag!==f&&S.tag!==m&&S.tag!==T;){if(S.flags&hu||S.child===null||S.tag===h)continue e;S.child.return=S,S=S.child}if(!(S.flags&hu))return S.stateNode}}function Onn(x){var S=Pnn(x);switch(S.tag){case f:{var L=S.stateNode;S.flags&B$&&(ZKe(L),S.flags&=~B$);var j=YGe(x);a0e(x,j,L);break}case d:case h:{var W=S.stateNode.containerInfo,G=YGe(x);s0e(x,G,W);break}default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function s0e(x,S,L){var j=x.tag,W=j===f||j===m;if(W){var G=x.stateNode;S?ten(L,G,S):JJt(L,G)}else if(j!==h){var te=x.child;if(te!==null){s0e(te,S,L);for(var pe=te.sibling;pe!==null;)s0e(pe,S,L),pe=pe.sibling}}}function a0e(x,S,L){var j=x.tag,W=j===f||j===m;if(W){var G=x.stateNode;S?een(L,G,S):QJt(L,G)}else if(j!==h){var te=x.child;if(te!==null){a0e(te,S,L);for(var pe=te.sibling;pe!==null;)a0e(pe,S,L),pe=pe.sibling}}}var ah=null,my=!1;function jnn(x,S,L){{var j=S;e:for(;j!==null;){switch(j.tag){case f:{ah=j.stateNode,my=!1;break e}case d:{ah=j.stateNode.containerInfo,my=!0;break e}case h:{ah=j.stateNode.containerInfo,my=!0;break e}}j=j.return}if(ah===null)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");XGe(x,S,L),ah=null,my=!1}Rnn(L)}function CN(x,S,L){for(var j=L.child;j!==null;)XGe(x,S,j),j=j.sibling}function XGe(x,S,L){switch(FXt(L),L.tag){case f:sh||gP(L,S);case m:{{var j=ah,W=my;ah=null,CN(x,S,L),ah=j,my=W,ah!==null&&(my?ien(ah,L.stateNode):nen(ah,L.stateNode))}return}case T:{ah!==null&&(my?ren(ah,L.stateNode):vve(ah,L.stateNode));return}case h:{{var G=ah,te=my;ah=L.stateNode.containerInfo,my=!0,CN(x,S,L),ah=G,my=te}return}case l:case w:case E:case D:{if(!sh){var pe=L.updateQueue;if(pe!==null){var ke=pe.lastEffect;if(ke!==null){var Ue=ke.next,et=Ue;do{var kt=et,Dt=kt.destroy,Zt=kt.tag;Dt!==void 0&&((Zt&N_)!==Gm?EX(L,S,Dt):(Zt&Uu)!==Gm&&(RUe(L),L.mode&va?(M_(),EX(L,S,Dt),k_(L)):EX(L,S,Dt),PUe())),et=et.next}while(et!==Ue)}}}CN(x,S,L);return}case c:{if(!sh){gP(L,S);var nn=L.stateNode;typeof nn.componentWillUnmount=="function"&&o0e(L,S,nn)}CN(x,S,L);return}case R:{CN(x,S,L);return}case P:{if(L.mode&is){var xn=sh;sh=xn||L.memoizedState!==null,CN(x,S,L),sh=xn}else CN(x,S,L);break}default:{CN(x,S,L);return}}}function Fnn(x){x.memoizedState}function $nn(x,S){var L=S.memoizedState;if(L===null){var j=S.alternate;if(j!==null){var W=j.memoizedState;if(W!==null){var G=W.dehydrated;G!==null&&Cen(G)}}}}function ZGe(x){var S=x.updateQueue;if(S!==null){x.updateQueue=null;var L=x.stateNode;L===null&&(L=x.stateNode=new wnn),S.forEach(function(j){var W=Pin.bind(null,x,j);if(!L.has(j)){if(L.add(j),ry)if(mP!==null&&pP!==null)sV(pP,mP);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");j.then(W,W)}})}}function Vnn(x,S,L){mP=L,pP=x,nl(S),QGe(S,x),nl(S),mP=null,pP=null}function py(x,S,L){var j=S.deletions;if(j!==null)for(var W=0;W<j.length;W++){var G=j[W];try{jnn(x,S,G)}catch(ke){ol(G,S,ke)}}var te=Vi();if(S.subtreeFlags&fbe)for(var pe=S.child;pe!==null;)nl(pe),QGe(pe,x),pe=pe.sibling;nl(te)}function QGe(x,S,L){var j=x.alternate,W=x.flags;switch(x.tag){case l:case w:case E:case D:{if(py(S,x),L_(x),W&ds){try{fy(N_|Wu,x,x.return),wN(N_|Wu,x)}catch(zr){ol(x,x.return,zr)}if(x.mode&va){try{M_(),fy(Uu|Wu,x,x.return)}catch(zr){ol(x,x.return,zr)}k_(x)}else try{fy(Uu|Wu,x,x.return)}catch(zr){ol(x,x.return,zr)}}return}case c:{py(S,x),L_(x),W&oN&&j!==null&&gP(j,j.return);return}case f:{py(S,x),L_(x),W&oN&&j!==null&&gP(j,j.return);{if(x.flags&B$){var G=x.stateNode;try{ZKe(G)}catch(zr){ol(x,x.return,zr)}}if(W&ds){var te=x.stateNode;if(te!=null){var pe=x.memoizedProps,ke=j!==null?j.memoizedProps:pe,Ue=x.type,et=x.updateQueue;if(x.updateQueue=null,et!==null)try{XJt(te,et,Ue,ke,pe,x)}catch(zr){ol(x,x.return,zr)}}}}return}case m:{if(py(S,x),L_(x),W&ds){if(x.stateNode===null)throw new Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var kt=x.stateNode,Dt=x.memoizedProps,Zt=j!==null?j.memoizedProps:Dt;try{ZJt(kt,Zt,Dt)}catch(zr){ol(x,x.return,zr)}}return}case d:{if(py(S,x),L_(x),W&ds&&j!==null){var nn=j.memoizedState;if(nn.isDehydrated)try{wen(S.containerInfo)}catch(zr){ol(x,x.return,zr)}}return}case h:{py(S,x),L_(x);return}case N:{py(S,x),L_(x);var xn=x.child;if(xn.flags&PM){var Ni=xn.stateNode,wr=xn.memoizedState,sr=wr!==null;if(Ni.isHidden=sr,sr){var os=xn.alternate!==null&&xn.alternate.memoizedState!==null;os||_in()}}if(W&ds){try{Fnn(x)}catch(zr){ol(x,x.return,zr)}ZGe(x)}return}case P:{var Ko=j!==null&&j.memoizedState!==null;if(x.mode&is){var Bt=sh;sh=Bt||Ko,py(S,x),sh=Bt}else py(S,x);if(L_(x),W&PM){var wn=x.stateNode,zt=x.memoizedState,Bn=zt!==null,Pi=x;if(wn.isHidden=Bn,Bn&&!Ko&&(Pi.mode&is)!==kr){Yi=Pi;for(var Di=Pi.child;Di!==null;)Yi=Di,znn(Di),Di=Di.sibling}Ann(Pi,Bn)}return}case A:{py(S,x),L_(x),W&ds&&ZGe(x);return}case R:return;default:{py(S,x),L_(x);return}}}function L_(x){var S=x.flags;if(S&hu){try{Onn(x)}catch(L){ol(x,x.return,L)}x.flags&=~hu}S&Yw&&(x.flags&=~Yw)}function Bnn(x,S,L){mP=L,pP=S,Yi=x,JGe(x,S,L),mP=null,pP=null}function JGe(x,S,L){for(var j=(x.mode&is)!==kr;Yi!==null;){var W=Yi,G=W.child;if(W.tag===P&&j){var te=W.memoizedState!==null,pe=te||NX;if(pe){l0e(x,S,L);continue}else{var ke=W.alternate,Ue=ke!==null&&ke.memoizedState!==null,et=Ue||sh,kt=NX,Dt=sh;NX=pe,sh=et,sh&&!Dt&&(Yi=W,Hnn(W));for(var Zt=G;Zt!==null;)Yi=Zt,JGe(Zt,S,L),Zt=Zt.sibling;Yi=W,NX=kt,sh=Dt,l0e(x,S,L);continue}}(W.subtreeFlags&H$)!==Or&&G!==null?(G.return=W,Yi=G):l0e(x,S,L)}}function l0e(x,S,L){for(;Yi!==null;){var j=Yi;if((j.flags&H$)!==Or){var W=j.alternate;nl(j);try{Tnn(S,W,j,L)}catch(te){ol(j,j.return,te)}yc()}if(j===x){Yi=null;return}var G=j.sibling;if(G!==null){G.return=j.return,Yi=G;return}Yi=j.return}}function znn(x){for(;Yi!==null;){var S=Yi,L=S.child;switch(S.tag){case l:case w:case E:case D:{if(S.mode&va)try{M_(),fy(Uu,S,S.return)}finally{k_(S)}else fy(Uu,S,S.return);break}case c:{gP(S,S.return);var j=S.stateNode;typeof j.componentWillUnmount=="function"&&o0e(S,S.return,j);break}case f:{gP(S,S.return);break}case P:{var W=S.memoizedState!==null;if(W){eYe(x);continue}break}}L!==null?(L.return=S,Yi=L):eYe(x)}}function eYe(x){for(;Yi!==null;){var S=Yi;if(S===x){Yi=null;return}var L=S.sibling;if(L!==null){L.return=S.return,Yi=L;return}Yi=S.return}}function Hnn(x){for(;Yi!==null;){var S=Yi,L=S.child;if(S.tag===P){var j=S.memoizedState!==null;if(j){tYe(x);continue}}L!==null?(L.return=S,Yi=L):tYe(x)}}function tYe(x){for(;Yi!==null;){var S=Yi;nl(S);try{Inn(S)}catch(j){ol(S,S.return,j)}if(yc(),S===x){Yi=null;return}var L=S.sibling;if(L!==null){L.return=S.return,Yi=L;return}Yi=S.return}}function Wnn(x,S,L,j){Yi=S,Unn(S,x,L,j)}function Unn(x,S,L,j){for(;Yi!==null;){var W=Yi,G=W.child;(W.subtreeFlags&OR)!==Or&&G!==null?(G.return=W,Yi=G):Knn(x,S,L,j)}}function Knn(x,S,L,j){for(;Yi!==null;){var W=Yi;if((W.flags&iy)!==Or){nl(W);try{qnn(S,W,L,j)}catch(te){ol(W,W.return,te)}yc()}if(W===x){Yi=null;return}var G=W.sibling;if(G!==null){G.return=W.return,Yi=G;return}Yi=W.return}}function qnn(x,S,L,j){switch(S.tag){case l:case w:case D:{if(S.mode&va){Dye();try{wN(rh|Wu,S)}finally{Eye(S)}}else wN(rh|Wu,S);break}}}function Gnn(x){Yi=x,Ynn()}function Ynn(){for(;Yi!==null;){var x=Yi,S=x.child;if((Yi.flags&AM)!==Or){var L=x.deletions;if(L!==null){for(var j=0;j<L.length;j++){var W=L[j];Yi=W,Qnn(W,x)}{var G=x.alternate;if(G!==null){var te=G.child;if(te!==null){G.child=null;do{var pe=te.sibling;te.sibling=null,te=pe}while(te!==null)}}}Yi=x}}(x.subtreeFlags&OR)!==Or&&S!==null?(S.return=x,Yi=S):Xnn()}}function Xnn(){for(;Yi!==null;){var x=Yi;(x.flags&iy)!==Or&&(nl(x),Znn(x),yc());var S=x.sibling;if(S!==null){S.return=x.return,Yi=S;return}Yi=x.return}}function Znn(x){switch(x.tag){case l:case w:case D:{x.mode&va?(Dye(),fy(rh|Wu,x,x.return),Eye(x)):fy(rh|Wu,x,x.return);break}}}function Qnn(x,S){for(;Yi!==null;){var L=Yi;nl(L),ein(L,S),yc();var j=L.child;j!==null?(j.return=L,Yi=j):Jnn(x)}}function Jnn(x){for(;Yi!==null;){var S=Yi,L=S.sibling,j=S.return;if(qGe(S),S===x){Yi=null;return}if(L!==null){L.return=j,Yi=L;return}Yi=j}}function ein(x,S){switch(x.tag){case l:case w:case D:{x.mode&va?(Dye(),fy(rh,x,S),Eye(x)):fy(rh,x,S);break}}}function tin(x){switch(x.tag){case l:case w:case D:{try{wN(Uu|Wu,x)}catch(L){ol(x,x.return,L)}break}case c:{var S=x.stateNode;try{S.componentDidMount()}catch(L){ol(x,x.return,L)}break}}}function nin(x){switch(x.tag){case l:case w:case D:{try{wN(rh|Wu,x)}catch(S){ol(x,x.return,S)}break}}}function iin(x){switch(x.tag){case l:case w:case D:{try{fy(Uu|Wu,x,x.return)}catch(L){ol(x,x.return,L)}break}case c:{var S=x.stateNode;typeof S.componentWillUnmount=="function"&&o0e(x,x.return,S);break}}}function rin(x){switch(x.tag){case l:case w:case D:try{fy(rh|Wu,x,x.return)}catch(S){ol(x,x.return,S)}}}if(typeof Symbol=="function"&&Symbol.for){var Y8=Symbol.for;Y8("selector.component"),Y8("selector.has_pseudo_class"),Y8("selector.role"),Y8("selector.test_id"),Y8("selector.text")}var oin=[];function sin(){oin.forEach(function(x){return x()})}var ain=n.ReactCurrentActQueue;function lin(x){{var S=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,L=typeof jest<"u";return L&&S!==!1}}function nYe(){{var x=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return!x&&ain.current!==null&&s("The current testing environment is not configured to support act(...)"),x}}var cin=Math.ceil,c0e=n.ReactCurrentDispatcher,u0e=n.ReactCurrentOwner,lh=n.ReactCurrentBatchConfig,gy=n.ReactCurrentActQueue,Gu=0,iYe=1,ch=2,Lb=4,l1=0,X8=1,nL=2,DX=3,Z8=4,rYe=5,d0e=6,rs=Gu,Vf=null,ec=null,Yu=On,T_=On,h0e=fN(On),Xu=l1,Q8=null,kX=On,J8=On,MX=On,eV=null,Ym=null,f0e=0,oYe=500,sYe=1/0,uin=500,c1=null;function tV(){sYe=kd()+uin}function aYe(){return sYe}var LX=!1,m0e=null,bP=null,iL=!1,SN=null,nV=On,p0e=[],g0e=null,din=50,iV=0,b0e=null,v0e=!1,TX=!1,hin=50,vP=0,IX=null,rV=yl,AX=On,lYe=!1;function RX(){return Vf}function Bf(){return(rs&(ch|Lb))!==Gu?kd():(rV!==yl||(rV=kd()),rV)}function NN(x){var S=x.mode;if((S&is)===kr)return to;if((rs&ch)!==Gu&&Yu!==On)return X$(Yu);var L=atn()!==stn;if(L){if(lh.transition!==null){var j=lh.transition;j._updatedFibers||(j._updatedFibers=new Set),j._updatedFibers.add(x)}return AX===Ld&&(AX=HUe()),AX}var W=oy();if(W!==Ld)return W;var G=UJt();return G}function fin(x){var S=x.mode;return(S&is)===kr?to:pZt()}function Zu(x,S,L,j){jin(),lYe&&s("useInsertionEffect must not schedule updates."),v0e&&(TX=!0),Z$(x,L,j),(rs&ch)!==On&&x===Vf?Vin(S):(ry&&KUe(x,S,L),Bin(S),x===Vf&&((rs&ch)===Gu&&(J8=Io(J8,L)),Xu===Z8&&EN(x,Yu)),Xm(x,j),L===to&&rs===Gu&&(S.mode&is)===kr&&!gy.isBatchingLegacy&&(tV(),lqe()))}function min(x,S,L){var j=x.current;j.lanes=S,Z$(x,S,L),Xm(x,L)}function pin(x){return(rs&ch)!==Gu}function Xm(x,S){var L=x.callbackNode;cZt(x,S);var j=tY(x,x===Vf?Yu:On);if(j===On){L!==null&&SYe(L),x.callbackNode=null,x.callbackPriority=Ld;return}var W=BM(j),G=x.callbackPriority;if(G===W&&!(gy.current!==null&&L!==N0e)){L==null&&G!==to&&s("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}L!=null&&SYe(L);var te;if(W===to)x.tag===mN?(gy.isBatchingLegacy!==null&&(gy.didScheduleLegacyUpdate=!0),Hen(dYe.bind(null,x))):aqe(dYe.bind(null,x)),gy.current!==null?gy.current.push(pN):qJt(function(){(rs&(ch|Lb))===Gu&&pN()}),te=null;else{var pe;switch(YUe(j)){case ug:pe=ZG;break;case Jw:pe=mbe;break;case e1:pe=FM;break;case rY:pe=pbe;break;default:pe=FM;break}te=E0e(pe,cYe.bind(null,x))}x.callbackPriority=W,x.callbackNode=te}function cYe(x,S){if(Atn(),rV=yl,AX=On,(rs&(ch|Lb))!==Gu)throw new Error("Should not already be working.");var L=x.callbackNode,j=d1();if(j&&x.callbackNode!==L)return null;var W=tY(x,x===Vf?Yu:On);if(W===On)return null;var G=!nY(x,W)&&!mZt(x,W)&&!S,te=G?Nin(x,W):OX(x,W);if(te!==l1){if(te===nL){var pe=jbe(x);pe!==On&&(W=pe,te=y0e(x,pe))}if(te===X8){var ke=Q8;throw rL(x,On),EN(x,W),Xm(x,kd()),ke}if(te===d0e)EN(x,W);else{var Ue=!nY(x,W),et=x.current.alternate;if(Ue&&!bin(et)){if(te=OX(x,W),te===nL){var kt=jbe(x);kt!==On&&(W=kt,te=y0e(x,kt))}if(te===X8){var Dt=Q8;throw rL(x,On),EN(x,W),Xm(x,kd()),Dt}}x.finishedWork=et,x.finishedLanes=W,gin(x,te,W)}}return Xm(x,kd()),x.callbackNode===L?cYe.bind(null,x):null}function y0e(x,S){var L=eV;if(oY(x)){var j=rL(x,S);j.flags|=Gw,Oen(x.containerInfo)}var W=OX(x,S);if(W!==nL){var G=Ym;Ym=L,G!==null&&uYe(G)}return W}function uYe(x){Ym===null?Ym=x:Ym.push.apply(Ym,x)}function gin(x,S,L){switch(S){case l1:case X8:throw new Error("Root did not complete. This is a bug in React.");case nL:{oL(x,Ym,c1);break}case DX:{if(EN(x,L),BUe(L)&&!NYe()){var j=f0e+oYe-kd();if(j>10){var W=tY(x,On);if(W!==On)break;var G=x.suspendedLanes;if(!zR(G,L)){Bf(),UUe(x,G);break}x.timeoutHandle=gve(oL.bind(null,x,Ym,c1),j);break}}oL(x,Ym,c1);break}case Z8:{if(EN(x,L),fZt(L))break;if(!NYe()){var te=aZt(x,L),pe=te,ke=kd()-pe,Ue=Oin(ke)-ke;if(Ue>10){x.timeoutHandle=gve(oL.bind(null,x,Ym,c1),Ue);break}}oL(x,Ym,c1);break}case rYe:{oL(x,Ym,c1);break}default:throw new Error("Unknown root exit status.")}}function bin(x){for(var S=x;;){if(S.flags&YG){var L=S.updateQueue;if(L!==null){var j=L.stores;if(j!==null)for(var W=0;W<j.length;W++){var G=j[W],te=G.getSnapshot,pe=G.value;try{if(!hg(te(),pe))return!1}catch{return!1}}}}var ke=S.child;if(S.subtreeFlags&YG&&ke!==null){ke.return=S,S=ke;continue}if(S===x)return!0;for(;S.sibling===null;){if(S.return===null||S.return===x)return!0;S=S.return}S.sibling.return=S.return,S=S.sibling}return!0}function EN(x,S){S=iY(S,MX),S=iY(S,J8),bZt(x,S)}function dYe(x){if(Rtn(),(rs&(ch|Lb))!==Gu)throw new Error("Should not already be working.");d1();var S=tY(x,On);if(!cg(S,to))return Xm(x,kd()),null;var L=OX(x,S);if(x.tag!==mN&&L===nL){var j=jbe(x);j!==On&&(S=j,L=y0e(x,j))}if(L===X8){var W=Q8;throw rL(x,On),EN(x,S),Xm(x,kd()),W}if(L===d0e)throw new Error("Root did not complete. This is a bug in React.");var G=x.current.alternate;return x.finishedWork=G,x.finishedLanes=S,oL(x,Ym,c1),Xm(x,kd()),null}function vin(x,S){S!==On&&(Bbe(x,Io(S,to)),Xm(x,kd()),(rs&(ch|Lb))===Gu&&(tV(),pN()))}function _0e(x,S){var L=rs;rs|=iYe;try{return x(S)}finally{rs=L,rs===Gu&&!gy.isBatchingLegacy&&(tV(),lqe())}}function yin(x,S,L,j,W){var G=oy(),te=lh.transition;try{return lh.transition=null,Td(ug),x(S,L,j,W)}finally{Td(G),lh.transition=te,rs===Gu&&tV()}}function u1(x){SN!==null&&SN.tag===mN&&(rs&(ch|Lb))===Gu&&d1();var S=rs;rs|=iYe;var L=lh.transition,j=oy();try{return lh.transition=null,Td(ug),x?x():void 0}finally{Td(j),lh.transition=L,rs=S,(rs&(ch|Lb))===Gu&&pN()}}function hYe(){return(rs&(ch|Lb))!==Gu}function PX(x,S){ef(h0e,T_,x),T_=Io(T_,S)}function x0e(x){T_=h0e.current,Jh(h0e,x)}function rL(x,S){x.finishedWork=null,x.finishedLanes=On;var L=x.timeoutHandle;if(L!==bve&&(x.timeoutHandle=bve,KJt(L)),ec!==null)for(var j=ec.return;j!==null;){var W=j.alternate;BGe(W,j),j=j.return}Vf=x;var G=sL(x.current,null);return ec=G,Yu=T_=S,Xu=l1,Q8=null,kX=On,J8=On,MX=On,eV=null,Ym=null,mtn(),ly.discardPendingWarnings(),G}function fYe(x,S){do{var L=ec;try{if(UY(),jqe(),yc(),u0e.current=null,L===null||L.return===null){Xu=X8,Q8=S,ec=null;return}if(ae&&L.mode&va&&_X(L,!0),J)if(FR(),S!==null&&typeof S=="object"&&typeof S.then=="function"){var j=S;YXt(L,j,Yu)}else GXt(L,S,Yu);Htn(x,L.return,L,S,Yu),bYe(L)}catch(W){S=W,ec===L&&L!==null?(L=L.return,ec=L):L=ec;continue}return}while(!0)}function mYe(){var x=c0e.current;return c0e.current=pX,x===null?pX:x}function pYe(x){c0e.current=x}function _in(){f0e=kd()}function oV(x){kX=Io(x,kX)}function xin(){Xu===l1&&(Xu=DX)}function w0e(){(Xu===l1||Xu===DX||Xu===nL)&&(Xu=Z8),Vf!==null&&(Fbe(kX)||Fbe(J8))&&EN(Vf,Yu)}function win(x){Xu!==Z8&&(Xu=nL),eV===null?eV=[x]:eV.push(x)}function Cin(){return Xu===l1}function OX(x,S){var L=rs;rs|=ch;var j=mYe();if(Vf!==x||Yu!==S){if(ry){var W=x.memoizedUpdaters;W.size>0&&(sV(x,Yu),W.clear()),qUe(x,S)}c1=GUe(),rL(x,S)}OUe(S);do try{Sin();break}catch(G){fYe(x,G)}while(!0);if(UY(),rs=L,pYe(j),ec!==null)throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return jUe(),Vf=null,Yu=On,Xu}function Sin(){for(;ec!==null;)gYe(ec)}function Nin(x,S){var L=rs;rs|=ch;var j=mYe();if(Vf!==x||Yu!==S){if(ry){var W=x.memoizedUpdaters;W.size>0&&(sV(x,Yu),W.clear()),qUe(x,S)}c1=GUe(),tV(),rL(x,S)}OUe(S);do try{Ein();break}catch(G){fYe(x,G)}while(!0);return UY(),pYe(j),rs=L,ec!==null?(eZt(),l1):(jUe(),Vf=null,Yu=On,Xu)}function Ein(){for(;ec!==null&&!kXt();)gYe(ec)}function gYe(x){var S=x.alternate;nl(x);var L;(x.mode&va)!==kr?(Nye(x),L=C0e(S,x,T_),_X(x,!0)):L=C0e(S,x,T_),yc(),x.memoizedProps=x.pendingProps,L===null?bYe(x):ec=L,u0e.current=null}function bYe(x){var S=x;do{var L=S.alternate,j=S.return;if((S.flags&z$)===Or){nl(S);var W=void 0;if((S.mode&va)===kr?W=VGe(L,S,T_):(Nye(S),W=VGe(L,S,T_),_X(S,!1)),yc(),W!==null){ec=W;return}}else{var G=xnn(L,S);if(G!==null){G.flags&=wXt,ec=G;return}if((S.mode&va)!==kr){_X(S,!1);for(var te=S.actualDuration,pe=S.child;pe!==null;)te+=pe.actualDuration,pe=pe.sibling;S.actualDuration=te}if(j!==null)j.flags|=z$,j.subtreeFlags=Or,j.deletions=null;else{Xu=d0e,ec=null;return}}var ke=S.sibling;if(ke!==null){ec=ke;return}S=j,ec=S}while(S!==null);Xu===l1&&(Xu=rYe)}function oL(x,S,L){var j=oy(),W=lh.transition;try{lh.transition=null,Td(ug),Din(x,S,L,j)}finally{lh.transition=W,Td(j)}return null}function Din(x,S,L,j){do d1();while(SN!==null);if(Fin(),(rs&(ch|Lb))!==Gu)throw new Error("Should not already be working.");var W=x.finishedWork,G=x.finishedLanes;if(BXt(G),W===null)return AUe(),null;if(G===On&&s("root.finishedLanes should not be empty during a commit. This is a bug in React."),x.finishedWork=null,x.finishedLanes=On,W===x.current)throw new Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");x.callbackNode=null,x.callbackPriority=Ld;var te=Io(W.lanes,W.childLanes);vZt(x,te),x===Vf&&(Vf=null,ec=null,Yu=On),((W.subtreeFlags&OR)!==Or||(W.flags&OR)!==Or)&&(iL||(iL=!0,g0e=L,E0e(FM,function(){return d1(),null})));var pe=(W.subtreeFlags&(hbe|fbe|H$|OR))!==Or,ke=(W.flags&(hbe|fbe|H$|OR))!==Or;if(pe||ke){var Ue=lh.transition;lh.transition=null;var et=oy();Td(ug);var kt=rs;rs|=Lb,u0e.current=null,Enn(x,W),lGe(),Vnn(x,W,G),$Jt(x.containerInfo),x.current=W,XXt(G),Bnn(W,x,G),ZXt(),MXt(),rs=kt,Td(et),lh.transition=Ue}else x.current=W,lGe();var Dt=iL;if(iL?(iL=!1,SN=x,nV=G):(vP=0,IX=null),te=x.pendingLanes,te===On&&(bP=null),Dt||xYe(x.current,!1),OXt(W.stateNode,j),ry&&x.memoizedUpdaters.clear(),sin(),Xm(x,kd()),S!==null)for(var Zt=x.onRecoverableError,nn=0;nn<S.length;nn++){var xn=S[nn],Ni=xn.stack,wr=xn.digest;Zt(xn.value,{componentStack:Ni,digest:wr})}if(LX){LX=!1;var sr=m0e;throw m0e=null,sr}return cg(nV,to)&&x.tag!==mN&&d1(),te=x.pendingLanes,cg(te,to)?(Itn(),x===b0e?iV++:(iV=0,b0e=x)):iV=0,pN(),AUe(),null}function d1(){if(SN!==null){var x=YUe(nV),S=wZt(e1,x),L=lh.transition,j=oy();try{return lh.transition=null,Td(S),Min()}finally{Td(j),lh.transition=L}}return!1}function kin(x){p0e.push(x),iL||(iL=!0,E0e(FM,function(){return d1(),null}))}function Min(){if(SN===null)return!1;var x=g0e;g0e=null;var S=SN,L=nV;if(SN=null,nV=On,(rs&(ch|Lb))!==Gu)throw new Error("Cannot flush passive effects while already rendering.");v0e=!0,TX=!1,QXt(L);var j=rs;rs|=Lb,Gnn(S.current),Wnn(S,S.current,L,x);{var W=p0e;p0e=[];for(var G=0;G<W.length;G++){var te=W[G];Lnn(S,te)}}JXt(),xYe(S.current,!0),rs=j,pN(),TX?S===IX?vP++:(vP=0,IX=S):vP=0,v0e=!1,TX=!1,jXt(S);{var pe=S.current.stateNode;pe.effectDuration=0,pe.passiveEffectDuration=0}return!0}function vYe(x){return bP!==null&&bP.has(x)}function Lin(x){bP===null?bP=new Set([x]):bP.add(x)}function Tin(x){LX||(LX=!0,m0e=x)}var Iin=Tin;function yYe(x,S,L){var j=eL(L,S),W=gGe(x,j,to),G=bN(x,W,to),te=Bf();G!==null&&(Z$(G,to,te),Xm(G,te))}function ol(x,S,L){if(Cnn(L),aV(!1),x.tag===d){yYe(x,x,L);return}var j=null;for(j=S;j!==null;){if(j.tag===d){yYe(j,x,L);return}else if(j.tag===c){var W=j.type,G=j.stateNode;if(typeof W.getDerivedStateFromError=="function"||typeof G.componentDidCatch=="function"&&!vYe(G)){var te=eL(L,x),pe=Hye(j,te,to),ke=bN(j,pe,to),Ue=Bf();ke!==null&&(Z$(ke,to,Ue),Xm(ke,Ue));return}}j=j.return}s(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.

Error message:

%s`,L)}function Ain(x,S,L){var j=x.pingCache;j!==null&&j.delete(S);var W=Bf();UUe(x,L),zin(x),Vf===x&&zR(Yu,L)&&(Xu===Z8||Xu===DX&&BUe(Yu)&&kd()-f0e<oYe?rL(x,On):MX=Io(MX,L)),Xm(x,W)}function _Ye(x,S){S===Ld&&(S=fin(x));var L=Bf(),j=qm(x,S);j!==null&&(Z$(j,S,L),Xm(j,L))}function Rin(x){var S=x.memoizedState,L=Ld;S!==null&&(L=S.retryLane),_Ye(x,L)}function Pin(x,S){var L=Ld,j;switch(x.tag){case N:j=x.stateNode;var W=x.memoizedState;W!==null&&(L=W.retryLane);break;case A:j=x.stateNode;break;default:throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}j!==null&&j.delete(S),_Ye(x,L)}function Oin(x){return x<120?120:x<480?480:x<1080?1080:x<1920?1920:x<3e3?3e3:x<4320?4320:cin(x/1960)*1960}function jin(){if(iV>din)throw iV=0,b0e=null,new Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");vP>hin&&(vP=0,IX=null,s("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function Fin(){ly.flushLegacyContextWarning(),ly.flushPendingUnsafeLifecycleWarnings()}function xYe(x,S){nl(x),jX(x,Xw,iin),S&&jX(x,XG,rin),jX(x,Xw,tin),S&&jX(x,XG,nin),yc()}function jX(x,S,L){for(var j=x,W=null;j!==null;){var G=j.subtreeFlags&S;j!==W&&j.child!==null&&G!==Or?j=j.child:((j.flags&S)!==Or&&L(j),j.sibling!==null?j=j.sibling:j=W=j.return)}}var FX=null;function wYe(x){{if((rs&ch)!==Gu||!(x.mode&is))return;var S=x.tag;if(S!==u&&S!==d&&S!==c&&S!==l&&S!==w&&S!==E&&S!==D)return;var L=bi(x)||"ReactComponent";if(FX!==null){if(FX.has(L))return;FX.add(L)}else FX=new Set([L]);var j=Ms;try{nl(x),s("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{j?nl(x):yc()}}}var C0e;{var $in=null;C0e=function(x,S,L){var j=LYe($in,S);try{return PGe(x,S,L)}catch(G){if(Zen()||G!==null&&typeof G=="object"&&typeof G.then=="function")throw G;if(UY(),jqe(),BGe(x,S),LYe(S,j),S.mode&va&&Nye(S),sbe(null,PGe,null,x,S,L),vXt()){var W=abe();typeof W=="object"&&W!==null&&W._suppressLogging&&typeof G=="object"&&G!==null&&!G._suppressLogging&&(G._suppressLogging=!0)}throw G}}}var CYe=!1,S0e;S0e=new Set;function Vin(x){if(Jl&&!Mtn())switch(x.tag){case l:case w:case D:{var S=ec&&bi(ec)||"Unknown",L=S;if(!S0e.has(L)){S0e.add(L);var j=bi(x)||"Unknown";s("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",j,S,S)}break}case c:{CYe||(s("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),CYe=!0);break}}}function sV(x,S){if(ry){var L=x.memoizedUpdaters;L.forEach(function(j){KUe(x,j,S)})}}var N0e={};function E0e(x,S){{var L=gy.current;return L!==null?(L.push(S),N0e):IUe(x,S)}}function SYe(x){if(x!==N0e)return DXt(x)}function NYe(){return gy.current!==null}function Bin(x){{if(x.mode&is){if(!nYe())return}else if(!lin()||rs!==Gu||x.tag!==l&&x.tag!==w&&x.tag!==D)return;if(gy.current===null){var S=Ms;try{nl(x),s(`An update to %s inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,bi(x))}finally{S?nl(x):yc()}}}}function zin(x){x.tag!==mN&&nYe()&&gy.current===null&&s(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).

When testing, code that resolves suspended data should be wrapped into act(...):

act(() => {
  /* finish loading suspended data */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`)}function aV(x){lYe=x}var Tb=null,yP=null,Hin=function(x){Tb=x};function _P(x){{if(Tb===null)return x;var S=Tb(x);return S===void 0?x:S.current}}function D0e(x){return _P(x)}function k0e(x){{if(Tb===null)return x;var S=Tb(x);if(S===void 0){if(x!=null&&typeof x.render=="function"){var L=_P(x.render);if(x.render!==L){var j={$$typeof:tt,render:L};return x.displayName!==void 0&&(j.displayName=x.displayName),j}}return x}return S.current}}function EYe(x,S){{if(Tb===null)return!1;var L=x.elementType,j=S.type,W=!1,G=typeof j=="object"&&j!==null?j.$$typeof:null;switch(x.tag){case c:{typeof j=="function"&&(W=!0);break}case l:{(typeof j=="function"||G===ft)&&(W=!0);break}case w:{(G===tt||G===ft)&&(W=!0);break}case E:case D:{(G===qe||G===ft)&&(W=!0);break}default:return!1}if(W){var te=Tb(L);if(te!==void 0&&te===Tb(j))return!0}return!1}}function DYe(x){{if(Tb===null||typeof WeakSet!="function")return;yP===null&&(yP=new WeakSet),yP.add(x)}}var Win=function(x,S){{if(Tb===null)return;var L=S.staleFamilies,j=S.updatedFamilies;d1(),u1(function(){M0e(x.current,j,L)})}},Uin=function(x,S){{if(x.context!==fg)return;d1(),u1(function(){lV(S,x,null,null)})}};function M0e(x,S,L){{var j=x.alternate,W=x.child,G=x.sibling,te=x.tag,pe=x.type,ke=null;switch(te){case l:case D:case c:ke=pe;break;case w:ke=pe.render;break}if(Tb===null)throw new Error("Expected resolveFamily to be set during hot reload.");var Ue=!1,et=!1;if(ke!==null){var kt=Tb(ke);kt!==void 0&&(L.has(kt)?et=!0:S.has(kt)&&(te===c?et=!0:Ue=!0))}if(yP!==null&&(yP.has(x)||j!==null&&yP.has(j))&&(et=!0),et&&(x._debugNeedsRemount=!0),et||Ue){var Dt=qm(x,to);Dt!==null&&Zu(Dt,x,to,yl)}W!==null&&!et&&M0e(W,S,L),G!==null&&M0e(G,S,L)}}var Kin=function(x,S){{var L=new Set,j=new Set(S.map(function(W){return W.current}));return L0e(x.current,j,L),L}};function L0e(x,S,L){{var j=x.child,W=x.sibling,G=x.tag,te=x.type,pe=null;switch(G){case l:case D:case c:pe=te;break;case w:pe=te.render;break}var ke=!1;pe!==null&&S.has(pe)&&(ke=!0),ke?qin(x,L):j!==null&&L0e(j,S,L),W!==null&&L0e(W,S,L)}}function qin(x,S){{var L=Gin(x,S);if(L)return;for(var j=x;;){switch(j.tag){case f:S.add(j.stateNode);return;case h:S.add(j.stateNode.containerInfo);return;case d:S.add(j.stateNode.containerInfo);return}if(j.return===null)throw new Error("Expected to reach root first.");j=j.return}}}function Gin(x,S){for(var L=x,j=!1;;){if(L.tag===f)j=!0,S.add(L.stateNode);else if(L.child!==null){L.child.return=L,L=L.child;continue}if(L===x)return j;for(;L.sibling===null;){if(L.return===null||L.return===x)return j;L=L.return}L.sibling.return=L.return,L=L.sibling}return!1}var T0e;{T0e=!1;try{var kYe=Object.preventExtensions({})}catch{T0e=!0}}function Yin(x,S,L,j){this.tag=x,this.key=L,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=S,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=j,this.flags=Or,this.subtreeFlags=Or,this.deletions=null,this.lanes=On,this.childLanes=On,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!T0e&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var mg=function(x,S,L,j){return new Yin(x,S,L,j)};function I0e(x){var S=x.prototype;return!!(S&&S.isReactComponent)}function Xin(x){return typeof x=="function"&&!I0e(x)&&x.defaultProps===void 0}function Zin(x){if(typeof x=="function")return I0e(x)?c:l;if(x!=null){var S=x.$$typeof;if(S===tt)return w;if(S===qe)return E}return u}function sL(x,S){var L=x.alternate;L===null?(L=mg(x.tag,S,x.key,x.mode),L.elementType=x.elementType,L.type=x.type,L.stateNode=x.stateNode,L._debugSource=x._debugSource,L._debugOwner=x._debugOwner,L._debugHookTypes=x._debugHookTypes,L.alternate=x,x.alternate=L):(L.pendingProps=S,L.type=x.type,L.flags=Or,L.subtreeFlags=Or,L.deletions=null,L.actualDuration=0,L.actualStartTime=-1),L.flags=x.flags&Zw,L.childLanes=x.childLanes,L.lanes=x.lanes,L.child=x.child,L.memoizedProps=x.memoizedProps,L.memoizedState=x.memoizedState,L.updateQueue=x.updateQueue;var j=x.dependencies;switch(L.dependencies=j===null?null:{lanes:j.lanes,firstContext:j.firstContext},L.sibling=x.sibling,L.index=x.index,L.ref=x.ref,L.selfBaseDuration=x.selfBaseDuration,L.treeBaseDuration=x.treeBaseDuration,L._debugNeedsRemount=x._debugNeedsRemount,L.tag){case u:case l:case D:L.type=_P(x.type);break;case c:L.type=D0e(x.type);break;case w:L.type=k0e(x.type);break}return L}function Qin(x,S){x.flags&=Zw|hu;var L=x.alternate;if(L===null)x.childLanes=On,x.lanes=S,x.child=null,x.subtreeFlags=Or,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null,x.selfBaseDuration=0,x.treeBaseDuration=0;else{x.childLanes=L.childLanes,x.lanes=L.lanes,x.child=L.child,x.subtreeFlags=Or,x.deletions=null,x.memoizedProps=L.memoizedProps,x.memoizedState=L.memoizedState,x.updateQueue=L.updateQueue,x.type=L.type;var j=L.dependencies;x.dependencies=j===null?null:{lanes:j.lanes,firstContext:j.firstContext},x.selfBaseDuration=L.selfBaseDuration,x.treeBaseDuration=L.treeBaseDuration}return x}function Jin(x,S,L){var j;return x===PY?(j=is,S===!0&&(j|=xc,j|=x_)):j=kr,ry&&(j|=va),mg(d,null,null,j)}function A0e(x,S,L,j,W,G){var te=u,pe=x;if(typeof x=="function")I0e(x)?(te=c,pe=D0e(pe)):pe=_P(pe);else if(typeof x=="string")te=f;else e:switch(x){case Ve:return DN(L.children,W,G,S);case bt:te=g,W|=xc,(W&is)!==kr&&(W|=x_);break;case wt:return ern(L,W,G,S);case _t:return trn(L,W,G,S);case ht:return nrn(L,W,G,S);case an:return MYe(L,W,G,S);case _n:case Ct:case on:case yn:case Pt:default:{if(typeof x=="object"&&x!==null)switch(x.$$typeof){case $e:te=_;break e;case We:te=y;break e;case tt:te=w,pe=k0e(pe);break e;case qe:te=E;break e;case ft:te=k,pe=null;break e}var ke="";{(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(ke+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ue=j?bi(j):null;Ue&&(ke+=`

Check the render method of \``+Ue+"`.")}throw new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(x==null?x:typeof x)+"."+ke))}}var et=mg(te,L,S,W);return et.elementType=x,et.type=pe,et.lanes=G,et._debugOwner=j,et}function R0e(x,S,L){var j=null;j=x._owner;var W=x.type,G=x.key,te=x.props,pe=A0e(W,G,te,j,S,L);return pe._debugSource=x._source,pe._debugOwner=x._owner,pe}function DN(x,S,L,j){var W=mg(p,x,j,S);return W.lanes=L,W}function ern(x,S,L,j){typeof x.id!="string"&&s('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof x.id);var W=mg(C,x,j,S|va);return W.elementType=wt,W.lanes=L,W.stateNode={effectDuration:0,passiveEffectDuration:0},W}function trn(x,S,L,j){var W=mg(N,x,j,S);return W.elementType=_t,W.lanes=L,W}function nrn(x,S,L,j){var W=mg(A,x,j,S);return W.elementType=ht,W.lanes=L,W}function MYe(x,S,L,j){var W=mg(P,x,j,S);W.elementType=an,W.lanes=L;var G={isHidden:!1};return W.stateNode=G,W}function P0e(x,S,L){var j=mg(m,x,null,S);return j.lanes=L,j}function irn(){var x=mg(f,null,null,kr);return x.elementType="DELETED",x}function rrn(x){var S=mg(T,null,null,kr);return S.stateNode=x,S}function O0e(x,S,L){var j=x.children!==null?x.children:[],W=mg(h,j,x.key,S);return W.lanes=L,W.stateNode={containerInfo:x.containerInfo,pendingChildren:null,implementation:x.implementation},W}function LYe(x,S){return x===null&&(x=mg(u,null,null,kr)),x.tag=S.tag,x.key=S.key,x.elementType=S.elementType,x.type=S.type,x.stateNode=S.stateNode,x.return=S.return,x.child=S.child,x.sibling=S.sibling,x.index=S.index,x.ref=S.ref,x.pendingProps=S.pendingProps,x.memoizedProps=S.memoizedProps,x.updateQueue=S.updateQueue,x.memoizedState=S.memoizedState,x.dependencies=S.dependencies,x.mode=S.mode,x.flags=S.flags,x.subtreeFlags=S.subtreeFlags,x.deletions=S.deletions,x.lanes=S.lanes,x.childLanes=S.childLanes,x.alternate=S.alternate,x.actualDuration=S.actualDuration,x.actualStartTime=S.actualStartTime,x.selfBaseDuration=S.selfBaseDuration,x.treeBaseDuration=S.treeBaseDuration,x._debugSource=S._debugSource,x._debugOwner=S._debugOwner,x._debugNeedsRemount=S._debugNeedsRemount,x._debugHookTypes=S._debugHookTypes,x}function orn(x,S,L,j,W){this.tag=S,this.containerInfo=x,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=bve,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=Ld,this.eventTimes=Vbe(On),this.expirationTimes=Vbe(yl),this.pendingLanes=On,this.suspendedLanes=On,this.pingedLanes=On,this.expiredLanes=On,this.mutableReadLanes=On,this.finishedLanes=On,this.entangledLanes=On,this.entanglements=Vbe(On),this.identifierPrefix=j,this.onRecoverableError=W,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;for(var G=this.pendingUpdatersLaneMap=[],te=0;te<bbe;te++)G.push(new Set)}switch(S){case PY:this._debugRootType=L?"hydrateRoot()":"createRoot()";break;case mN:this._debugRootType=L?"hydrate()":"render()";break}}function TYe(x,S,L,j,W,G,te,pe,ke,Ue){var et=new orn(x,S,L,pe,ke),kt=Jin(S,G);et.current=kt,kt.stateNode=et;{var Dt={element:j,isDehydrated:L,cache:null,transitions:null,pendingSuspenseBoundaries:null};kt.memoizedState=Dt}return Yve(kt),et}var j0e="18.3.1";function srn(x,S,L){var j=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return Pe(j),{$$typeof:It,key:j==null?null:""+j,children:x,containerInfo:S,implementation:L}}var F0e,$0e;F0e=!1,$0e={};function IYe(x){if(!x)return fg;var S=RR(x),L=zen(S);if(S.tag===c){var j=S.type;if(S_(j))return oqe(S,j,L)}return L}function arn(x,S){{var L=RR(x);if(L===void 0){if(typeof x.render=="function")throw new Error("Unable to find node on an unmounted component.");var j=Object.keys(x).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+j)}var W=MUe(L);if(W===null)return null;if(W.mode&xc){var G=bi(L)||"Component";if(!$0e[G]){$0e[G]=!0;var te=Ms;try{nl(W),L.mode&xc?s("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",S,S,G):s("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",S,S,G)}finally{te?nl(te):yc()}}}return W.stateNode}}function AYe(x,S,L,j,W,G,te,pe){var ke=!1,Ue=null;return TYe(x,S,ke,Ue,L,j,W,G,te)}function RYe(x,S,L,j,W,G,te,pe,ke,Ue){var et=!0,kt=TYe(L,j,et,x,W,G,te,pe,ke);kt.context=IYe(null);var Dt=kt.current,Zt=Bf(),nn=NN(Dt),xn=s1(Zt,nn);return xn.callback=S??null,bN(Dt,xn,nn),min(kt,nn,Zt),kt}function lV(x,S,L,j){PXt(S,x);var W=S.current,G=Bf(),te=NN(W);tZt(te);var pe=IYe(L);S.context===null?S.context=pe:S.pendingContext=pe,Jl&&Ms!==null&&!F0e&&(F0e=!0,s(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.

Check the render method of %s.`,bi(Ms)||"Unknown"));var ke=s1(G,te);ke.payload={element:x},j=j===void 0?null:j,j!==null&&(typeof j!="function"&&s("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",j),ke.callback=j);var Ue=bN(W,ke,te);return Ue!==null&&(Zu(Ue,W,te,G),XY(Ue,W,te)),te}function $X(x){var S=x.current;if(!S.child)return null;switch(S.child.tag){case f:return S.child.stateNode;default:return S.child.stateNode}}function lrn(x){switch(x.tag){case d:{var S=x.stateNode;if(oY(S)){var L=uZt(S);vin(S,L)}break}case N:{u1(function(){var W=qm(x,to);if(W!==null){var G=Bf();Zu(W,x,to,G)}});var j=to;V0e(x,j);break}}}function PYe(x,S){var L=x.memoizedState;L!==null&&L.dehydrated!==null&&(L.retryLane=gZt(L.retryLane,S))}function V0e(x,S){PYe(x,S);var L=x.alternate;L&&PYe(L,S)}function crn(x){if(x.tag===N){var S=q$,L=qm(x,S);if(L!==null){var j=Bf();Zu(L,x,S,j)}V0e(x,S)}}function urn(x){if(x.tag===N){var S=NN(x),L=qm(x,S);if(L!==null){var j=Bf();Zu(L,x,S,j)}V0e(x,S)}}function OYe(x){var S=EXt(x);return S===null?null:S.stateNode}var jYe=function(x){return null};function drn(x){return jYe(x)}var FYe=function(x){return!1};function hrn(x){return FYe(x)}var $Ye=null,VYe=null,BYe=null,zYe=null,HYe=null,WYe=null,UYe=null,KYe=null,qYe=null;{var GYe=function(x,S,L){var j=S[L],W=Ws(x)?x.slice():mi({},x);return L+1===S.length?(Ws(W)?W.splice(j,1):delete W[j],W):(W[j]=GYe(x[j],S,L+1),W)},YYe=function(x,S){return GYe(x,S,0)},XYe=function(x,S,L,j){var W=S[j],G=Ws(x)?x.slice():mi({},x);if(j+1===S.length){var te=L[j];G[te]=G[W],Ws(G)?G.splice(W,1):delete G[W]}else G[W]=XYe(x[W],S,L,j+1);return G},ZYe=function(x,S,L){if(S.length!==L.length){o("copyWithRename() expects paths of the same length");return}else for(var j=0;j<L.length-1;j++)if(S[j]!==L[j]){o("copyWithRename() expects paths to be the same except for the deepest key");return}return XYe(x,S,L,0)},QYe=function(x,S,L,j){if(L>=S.length)return j;var W=S[L],G=Ws(x)?x.slice():mi({},x);return G[W]=QYe(x[W],S,L+1,j),G},JYe=function(x,S,L){return QYe(x,S,0,L)},B0e=function(x,S){for(var L=x.memoizedState;L!==null&&S>0;)L=L.next,S--;return L};$Ye=function(x,S,L,j){var W=B0e(x,S);if(W!==null){var G=JYe(W.memoizedState,L,j);W.memoizedState=G,W.baseState=G,x.memoizedProps=mi({},x.memoizedProps);var te=qm(x,to);te!==null&&Zu(te,x,to,yl)}},VYe=function(x,S,L){var j=B0e(x,S);if(j!==null){var W=YYe(j.memoizedState,L);j.memoizedState=W,j.baseState=W,x.memoizedProps=mi({},x.memoizedProps);var G=qm(x,to);G!==null&&Zu(G,x,to,yl)}},BYe=function(x,S,L,j){var W=B0e(x,S);if(W!==null){var G=ZYe(W.memoizedState,L,j);W.memoizedState=G,W.baseState=G,x.memoizedProps=mi({},x.memoizedProps);var te=qm(x,to);te!==null&&Zu(te,x,to,yl)}},zYe=function(x,S,L){x.pendingProps=JYe(x.memoizedProps,S,L),x.alternate&&(x.alternate.pendingProps=x.pendingProps);var j=qm(x,to);j!==null&&Zu(j,x,to,yl)},HYe=function(x,S){x.pendingProps=YYe(x.memoizedProps,S),x.alternate&&(x.alternate.pendingProps=x.pendingProps);var L=qm(x,to);L!==null&&Zu(L,x,to,yl)},WYe=function(x,S,L){x.pendingProps=ZYe(x.memoizedProps,S,L),x.alternate&&(x.alternate.pendingProps=x.pendingProps);var j=qm(x,to);j!==null&&Zu(j,x,to,yl)},UYe=function(x){var S=qm(x,to);S!==null&&Zu(S,x,to,yl)},KYe=function(x){jYe=x},qYe=function(x){FYe=x}}function frn(x){var S=MUe(x);return S===null?null:S.stateNode}function mrn(x){return null}function prn(){return Ms}function grn(x){var S=x.findFiberByHostInstance,L=n.ReactCurrentDispatcher;return RXt({bundleType:x.bundleType,version:x.version,rendererPackageName:x.rendererPackageName,rendererConfig:x.rendererConfig,overrideHookState:$Ye,overrideHookStateDeletePath:VYe,overrideHookStateRenamePath:BYe,overrideProps:zYe,overridePropsDeletePath:HYe,overridePropsRenamePath:WYe,setErrorHandler:KYe,setSuspenseHandler:qYe,scheduleUpdate:UYe,currentDispatcherRef:L,findHostInstanceByFiber:frn,findFiberByHostInstance:S||mrn,findHostInstancesForRefresh:Kin,scheduleRefresh:Win,scheduleRoot:Uin,setRefreshHandler:Hin,getCurrentFiber:prn,reconcilerVersion:j0e})}var eXe=typeof reportError=="function"?reportError:function(x){console.error(x)};function z0e(x){this._internalRoot=x}VX.prototype.render=z0e.prototype.render=function(x){var S=this._internalRoot;if(S===null)throw new Error("Cannot update an unmounted root.");{typeof arguments[1]=="function"?s("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):BX(arguments[1])?s("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof arguments[1]<"u"&&s("You passed a second argument to root.render(...) but it only accepts one argument.");var L=S.containerInfo;if(L.nodeType!==du){var j=OYe(S.current);j&&j.parentNode!==L&&s("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}}lV(x,S,null,null)},VX.prototype.unmount=z0e.prototype.unmount=function(){typeof arguments[0]=="function"&&s("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var x=this._internalRoot;if(x!==null){this._internalRoot=null;var S=x.containerInfo;hYe()&&s("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),u1(function(){lV(null,x,null,null)}),eqe(S)}};function brn(x,S){if(!BX(x))throw new Error("createRoot(...): Target container is not a DOM element.");tXe(x);var L=!1,j=!1,W="",G=eXe;S!=null&&(S.hydrate?o("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof S=="object"&&S!==null&&S.$$typeof===mt&&s(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:

  let root = createRoot(domContainer);
  root.render(<App />);`),S.unstable_strictMode===!0&&(L=!0),S.identifierPrefix!==void 0&&(W=S.identifierPrefix),S.onRecoverableError!==void 0&&(G=S.onRecoverableError),S.transitionCallbacks!==void 0&&S.transitionCallbacks);var te=AYe(x,PY,null,L,j,W,G);kY(te.current,x);var pe=x.nodeType===du?x.parentNode:x;return m8(pe),new z0e(te)}function VX(x){this._internalRoot=x}function vrn(x){x&&AZt(x)}VX.prototype.unstable_scheduleHydration=vrn;function yrn(x,S,L){if(!BX(x))throw new Error("hydrateRoot(...): Target container is not a DOM element.");tXe(x),S===void 0&&s("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var j=L??null,W=L!=null&&L.hydratedSources||null,G=!1,te=!1,pe="",ke=eXe;L!=null&&(L.unstable_strictMode===!0&&(G=!0),L.identifierPrefix!==void 0&&(pe=L.identifierPrefix),L.onRecoverableError!==void 0&&(ke=L.onRecoverableError));var Ue=RYe(S,null,x,PY,j,G,te,pe,ke);if(kY(Ue.current,x),m8(x),W)for(var et=0;et<W.length;et++){var kt=W[et];Ctn(Ue,kt)}return new VX(Ue)}function BX(x){return!!(x&&(x.nodeType===Um||x.nodeType===qw||x.nodeType===Yge||!q))}function cV(x){return!!(x&&(x.nodeType===Um||x.nodeType===qw||x.nodeType===Yge||x.nodeType===du&&x.nodeValue===" react-mount-point-unstable "))}function tXe(x){x.nodeType===Um&&x.tagName&&x.tagName.toUpperCase()==="BODY"&&s("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),N8(x)&&(x._reactRootContainer?s("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):s("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var _rn=n.ReactCurrentOwner,nXe;nXe=function(x){if(x._reactRootContainer&&x.nodeType!==du){var S=OYe(x._reactRootContainer.current);S&&S.parentNode!==x&&s("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var L=!!x._reactRootContainer,j=H0e(x),W=!!(j&&hN(j));W&&!L&&s("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),x.nodeType===Um&&x.tagName&&x.tagName.toUpperCase()==="BODY"&&s("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function H0e(x){return x?x.nodeType===qw?x.documentElement:x.firstChild:null}function iXe(){}function xrn(x,S,L,j,W){if(W){if(typeof j=="function"){var G=j;j=function(){var Dt=$X(te);G.call(Dt)}}var te=RYe(S,j,x,mN,null,!1,!1,"",iXe);x._reactRootContainer=te,kY(te.current,x);var pe=x.nodeType===du?x.parentNode:x;return m8(pe),u1(),te}else{for(var ke;ke=x.lastChild;)x.removeChild(ke);if(typeof j=="function"){var Ue=j;j=function(){var Dt=$X(et);Ue.call(Dt)}}var et=AYe(x,mN,null,!1,!1,"",iXe);x._reactRootContainer=et,kY(et.current,x);var kt=x.nodeType===du?x.parentNode:x;return m8(kt),u1(function(){lV(S,et,L,j)}),et}}function wrn(x,S){x!==null&&typeof x!="function"&&s("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",S,x)}function zX(x,S,L,j,W){nXe(L),wrn(W===void 0?null:W,"render");var G=L._reactRootContainer,te;if(!G)te=xrn(L,S,x,W,j);else{if(te=G,typeof W=="function"){var pe=W;W=function(){var ke=$X(te);pe.call(ke)}}lV(S,te,x,W)}return $X(te)}var rXe=!1;function Crn(x){{rXe||(rXe=!0,s("findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node"));var S=_rn.current;if(S!==null&&S.stateNode!==null){var L=S.stateNode._warnedAboutRefsInRender;L||s("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",cn(S.type)||"A component"),S.stateNode._warnedAboutRefsInRender=!0}}return x==null?null:x.nodeType===Um?x:arn(x,"findDOMNode")}function Srn(x,S,L){if(s("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!cV(S))throw new Error("Target container is not a DOM element.");{var j=N8(S)&&S._reactRootContainer===void 0;j&&s("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return zX(null,x,S,!0,L)}function Nrn(x,S,L){if(s("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!cV(S))throw new Error("Target container is not a DOM element.");{var j=N8(S)&&S._reactRootContainer===void 0;j&&s("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return zX(null,x,S,!1,L)}function Ern(x,S,L,j){if(s("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!cV(L))throw new Error("Target container is not a DOM element.");if(x==null||!yXt(x))throw new Error("parentComponent must be a valid React Component");return zX(x,S,L,!1,j)}var oXe=!1;function Drn(x){if(oXe||(oXe=!0,s("unmountComponentAtNode is deprecated and will be removed in the next major release. Switch to the createRoot API. Learn more: https://reactjs.org/link/switch-to-createroot")),!cV(x))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var S=N8(x)&&x._reactRootContainer===void 0;S&&s("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(x._reactRootContainer){{var L=H0e(x),j=L&&!hN(L);j&&s("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return u1(function(){zX(null,null,x,!1,function(){x._reactRootContainer=null,eqe(x)})}),!0}else{{var W=H0e(x),G=!!(W&&hN(W)),te=x.nodeType===Um&&cV(x.parentNode)&&!!x.parentNode._reactRootContainer;G&&s("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",te?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}CZt(lrn),NZt(crn),EZt(urn),DZt(oy),kZt(_Zt),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&s("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),lXt(MJt),dXt(_0e,yin,u1);function krn(x,S){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!BX(S))throw new Error("Target container is not a DOM element.");return srn(x,S,null,L)}function Mrn(x,S,L,j){return Ern(x,S,L,j)}var W0e={usingClientEntryPoint:!1,Events:[hN,ZR,MY,bUe,vUe,_0e]};function Lrn(x,S){return W0e.usingClientEntryPoint||s('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),brn(x,S)}function Trn(x,S,L){return W0e.usingClientEntryPoint||s('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),yrn(x,S,L)}function Irn(x){return hYe()&&s("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),u1(x)}var Arn=grn({findFiberByHostInstance:UM,bundleType:1,version:j0e,rendererPackageName:"react-dom"});if(!Arn&&be&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var sXe=window.location.protocol;/^(https?|file):$/.test(sXe)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(sXe==="file:"?`
You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}wg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W0e,wg.createPortal=krn,wg.createRoot=Lrn,wg.findDOMNode=Crn,wg.flushSync=Irn,wg.hydrate=Srn,wg.hydrateRoot=Trn,wg.render=Nrn,wg.unmountComponentAtNode=Drn,wg.unstable_batchedUpdates=_0e,wg.unstable_renderSubtreeIntoContainer=Mrn,wg.version=j0e,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})();Lwt.exports=wg;var Fc=Lwt.exports;const sv=ao(Fc),Awt=Z0t({__proto__:null,default:sv},[Fc]);var Rwt,YZe=Fc;{var XZe=YZe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Rwt=function(t,e){XZe.usingClientEntryPoint=!0;try{return YZe.createRoot(t,e)}finally{XZe.usingClientEntryPoint=!1}}}/**
 * @remix-run/router v1.20.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function Ul(){return Ul=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Ul.apply(this,arguments)}var yu;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(yu||(yu={}));const ZZe="popstate";function Epn(t){t===void 0&&(t={});function e(i,r){let{pathname:o,search:s,hash:a}=i.location;return xz("",{pathname:o,search:s,hash:a},r.state&&r.state.usr||null,r.state&&r.state.key||"default")}function n(i,r){return typeof r=="string"?r:KD(r)}return kpn(e,n,null,t)}function Eo(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Mu(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Dpn(){return Math.random().toString(36).substr(2,8)}function QZe(t,e){return{usr:t.state,key:t.key,idx:e}}function xz(t,e,n,i){return n===void 0&&(n=null),Ul({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Vk(e):e,{state:n,key:e&&e.key||i||Dpn()})}function KD(t){let{pathname:e="/",search:n="",hash:i=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function Vk(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substr(i),t=t.substr(0,i)),t&&(e.pathname=t)}return e}function kpn(t,e,n,i){i===void 0&&(i={});let{window:r=document.defaultView,v5Compat:o=!1}=i,s=r.history,a=yu.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(Ul({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function d(){a=yu.Pop;let g=u(),y=g==null?null:g-c;c=g,l&&l({action:a,location:p.location,delta:y})}function h(g,y){a=yu.Push;let _=xz(p.location,g,y);c=u()+1;let w=QZe(_,c),C=p.createHref(_);try{s.pushState(w,"",C)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;r.location.assign(C)}o&&l&&l({action:a,location:p.location,delta:1})}function f(g,y){a=yu.Replace;let _=xz(p.location,g,y);c=u();let w=QZe(_,c),C=p.createHref(_);s.replaceState(w,"",C),o&&l&&l({action:a,location:p.location,delta:0})}function m(g){let y=r.location.origin!=="null"?r.location.origin:r.location.href,_=typeof g=="string"?g:KD(g);return _=_.replace(/ $/,"%20"),Eo(y,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,y)}let p={get action(){return a},get location(){return t(r,s)},listen(g){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(ZZe,d),l=g,()=>{r.removeEventListener(ZZe,d),l=null}},createHref(g){return e(r,g)},createURL:m,encodeLocation(g){let y=m(g);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:f,go(g){return s.go(g)}};return p}var Wa;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Wa||(Wa={}));const Mpn=new Set(["lazy","caseSensitive","path","id","index","children"]);function Lpn(t){return t.index===!0}function gne(t,e,n,i){return n===void 0&&(n=[]),i===void 0&&(i={}),t.map((r,o)=>{let s=[...n,String(o)],a=typeof r.id=="string"?r.id:s.join("-");if(Eo(r.index!==!0||!r.children,"Cannot specify children on an index route"),Eo(!i[a],'Found a route id collision on id "'+a+`".  Route id's must be globally unique within Data Router usages`),Lpn(r)){let l=Ul({},r,e(r),{id:a});return i[a]=l,l}else{let l=Ul({},r,e(r),{id:a,children:void 0});return i[a]=l,r.children&&(l.children=gne(r.children,e,s,i)),l}})}function vE(t,e,n){return n===void 0&&(n="/"),dee(t,e,n,!1)}function dee(t,e,n,i){let r=typeof e=="string"?Vk(e):e,o=rb(r.pathname||"/",n);if(o==null)return null;let s=Pwt(t);Ipn(s);let a=null;for(let l=0;a==null&&l<s.length;++l){let c=Hpn(o);a=Bpn(s[l],c,i)}return a}function Tpn(t,e){let{route:n,pathname:i,params:r}=t;return{id:n.id,pathname:i,params:r,data:e[n.id],handle:n.handle}}function Pwt(t,e,n,i){e===void 0&&(e=[]),n===void 0&&(n=[]),i===void 0&&(i="");let r=(o,s,a)=>{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(Eo(l.relativePath.startsWith(i),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(i.length));let c=$x([i,l.relativePath]),u=n.concat(l);o.children&&o.children.length>0&&(Eo(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Pwt(o.children,e,u,c)),!(o.path==null&&!o.index)&&e.push({path:c,score:$pn(c,o.index),routesMeta:u})};return t.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))r(o,s);else for(let l of Owt(o.path))r(o,s,l)}),e}function Owt(t){let e=t.split("/");if(e.length===0)return[];let[n,...i]=e,r=n.endsWith("?"),o=n.replace(/\?$/,"");if(i.length===0)return r?[o,""]:[o];let s=Owt(i.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),r&&a.push(...s),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function Ipn(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:Vpn(e.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const Apn=/^:[\w-]+$/,Rpn=3,Ppn=2,Opn=1,jpn=10,Fpn=-2,JZe=t=>t==="*";function $pn(t,e){let n=t.split("/"),i=n.length;return n.some(JZe)&&(i+=Fpn),e&&(i+=Ppn),n.filter(r=>!JZe(r)).reduce((r,o)=>r+(Apn.test(o)?Rpn:o===""?Opn:jpn),i)}function Vpn(t,e){return t.length===e.length&&t.slice(0,-1).every((i,r)=>i===e[r])?t[t.length-1]-e[e.length-1]:0}function Bpn(t,e,n){n===void 0&&(n=!1);let{routesMeta:i}=t,r={},o="/",s=[];for(let a=0;a<i.length;++a){let l=i[a],c=a===i.length-1,u=o==="/"?e:e.slice(o.length)||"/",d=bne({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),h=l.route;if(!d&&c&&n&&!i[i.length-1].route.index&&(d=bne({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;Object.assign(r,d.params),s.push({params:r,pathname:$x([o,d.pathname]),pathnameBase:Kpn($x([o,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(o=$x([o,d.pathnameBase]))}return s}function bne(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,i]=zpn(t.path,t.caseSensitive,t.end),r=e.match(n);if(!r)return null;let o=r[0],s=o.replace(/(.)\/+$/,"$1"),a=r.slice(1);return{params:i.reduce((c,u,d)=>{let{paramName:h,isOptional:f}=u;if(h==="*"){let p=a[d]||"";s=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}const m=a[d];return f&&!m?c[h]=void 0:c[h]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:t}}function zpn(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),Mu(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let i=[],r="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(i.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(i.push({paramName:"*"}),r+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":t!==""&&t!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),i]}function Hpn(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Mu(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function rb(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&i!=="/"?null:t.slice(n)||"/"}function Wpn(t,e){e===void 0&&(e="/");let{pathname:n,search:i="",hash:r=""}=typeof t=="string"?Vk(t):t;return{pathname:n?n.startsWith("/")?n:Upn(n,e):e,search:qpn(i),hash:Gpn(r)}}function Upn(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function a_e(t,e,n,i){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(i)+"].  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 jwt(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function Eue(t,e){let n=jwt(t);return e?n.map((i,r)=>r===n.length-1?i.pathname:i.pathnameBase):n.map(i=>i.pathnameBase)}function Due(t,e,n,i){i===void 0&&(i=!1);let r;typeof t=="string"?r=Vk(t):(r=Ul({},t),Eo(!r.pathname||!r.pathname.includes("?"),a_e("?","pathname","search",r)),Eo(!r.pathname||!r.pathname.includes("#"),a_e("#","pathname","hash",r)),Eo(!r.search||!r.search.includes("#"),a_e("#","search","hash",r)));let o=t===""||r.pathname==="",s=o?"/":r.pathname,a;if(s==null)a=n;else{let d=e.length-1;if(!i&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),d-=1;r.pathname=h.join("/")}a=d>=0?e[d]:"/"}let l=Wpn(r,a),c=s&&s!=="/"&&s.endsWith("/"),u=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const $x=t=>t.join("/").replace(/\/\/+/g,"/"),Kpn=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),qpn=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Gpn=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class vne{constructor(e,n,i,r){r===void 0&&(r=!1),this.status=e,this.statusText=n||"",this.internal=r,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}}function kue(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Fwt=["post","put","patch","delete"],Ypn=new Set(Fwt),Xpn=["get",...Fwt],Zpn=new Set(Xpn),Qpn=new Set([301,302,303,307,308]),Jpn=new Set([307,308]),l_e={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},egn={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},NO={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},aje=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tgn=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),$wt="remix-router-transitions";function ngn(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",i=!n;Eo(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let r;if(t.mapRouteProperties)r=t.mapRouteProperties;else if(t.detectErrorBoundary){let Ze=t.detectErrorBoundary;r=dt=>({hasErrorBoundary:Ze(dt)})}else r=tgn;let o={},s=gne(t.routes,r,void 0,o),a,l=t.basename||"/",c=t.dataStrategy||sgn,u=t.patchRoutesOnNavigation,d=Ul({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},t.future),h=null,f=new Set,m=null,p=null,g=null,y=t.hydrationData!=null,_=vE(s,t.history.location,l),w=null;if(_==null&&!u){let Ze=sp(404,{pathname:t.history.location.pathname}),{matches:dt,route:at}=uQe(s);_=dt,w={[at.id]:Ze}}_&&!t.hydrationData&&Jt(_,s,t.history.location.pathname).active&&(_=null);let C;if(_)if(_.some(Ze=>Ze.route.lazy))C=!1;else if(!_.some(Ze=>Ze.route.loader))C=!0;else if(d.v7_partialHydration){let Ze=t.hydrationData?t.hydrationData.loaderData:null,dt=t.hydrationData?t.hydrationData.errors:null;if(dt){let at=_.findIndex(mt=>dt[mt.route.id]!==void 0);C=_.slice(0,at+1).every(mt=>!rEe(mt.route,Ze,dt))}else C=_.every(at=>!rEe(at.route,Ze,dt))}else C=t.hydrationData!=null;else if(C=!1,_=[],d.v7_partialHydration){let Ze=Jt(null,s,t.history.location.pathname);Ze.active&&Ze.matches&&(_=Ze.matches)}let N,E={historyAction:t.history.action,location:t.history.location,matches:_,initialized:C,navigation:l_e,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||w,fetchers:new Map,blockers:new Map},D=yu.Pop,k=!1,M,T=!1,A=new Map,R=null,P=!1,O=!1,V=[],F=new Set,$=new Map,B=0,z=-1,H=new Map,K=new Set,q=new Map,U=new Map,Y=new Set,J=new Map,ae=new Map,se;function oe(){if(h=t.history.listen(Ze=>{let{action:dt,location:at,delta:mt}=Ze;if(se){se(),se=void 0;return}Mu(ae.size===0||mt!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let It=rt({currentLocation:E.location,nextLocation:at,historyAction:dt});if(It&&mt!=null){let Ve=new Promise(bt=>{se=bt});t.history.go(mt*-1),nt(It,{state:"blocked",location:at,proceed(){nt(It,{state:"proceeding",proceed:void 0,reset:void 0,location:at}),Ve.then(()=>t.history.go(mt))},reset(){let bt=new Map(E.blockers);bt.set(It,NO),ie({blockers:bt})}});return}return Ne(dt,at)}),n){_gn(e,A);let Ze=()=>xgn(e,A);e.addEventListener("pagehide",Ze),R=()=>e.removeEventListener("pagehide",Ze)}return E.initialized||Ne(yu.Pop,E.location,{initialHydration:!0}),N}function fe(){h&&h(),R&&R(),f.clear(),M&&M.abort(),E.fetchers.forEach((Ze,dt)=>Ke(dt)),E.blockers.forEach((Ze,dt)=>je(dt))}function de(Ze){return f.add(Ze),()=>f.delete(Ze)}function ie(Ze,dt){dt===void 0&&(dt={}),E=Ul({},E,Ze);let at=[],mt=[];d.v7_fetcherPersist&&E.fetchers.forEach((It,Ve)=>{It.state==="idle"&&(Y.has(Ve)?mt.push(Ve):at.push(Ve))}),[...f].forEach(It=>It(E,{deletedFetchers:mt,viewTransitionOpts:dt.viewTransitionOpts,flushSync:dt.flushSync===!0})),d.v7_fetcherPersist&&(at.forEach(It=>E.fetchers.delete(It)),mt.forEach(It=>Ke(It)))}function Q(Ze,dt,at){var mt,It;let{flushSync:Ve}=at===void 0?{}:at,bt=E.actionData!=null&&E.navigation.formMethod!=null&&Py(E.navigation.formMethod)&&E.navigation.state==="loading"&&((mt=Ze.state)==null?void 0:mt._isRedirect)!==!0,wt;dt.actionData?Object.keys(dt.actionData).length>0?wt=dt.actionData:wt=null:bt?wt=E.actionData:wt=null;let $e=dt.loaderData?lQe(E.loaderData,dt.loaderData,dt.matches||[],dt.errors):E.loaderData,We=E.blockers;We.size>0&&(We=new Map(We),We.forEach((ht,qe)=>We.set(qe,NO)));let tt=k===!0||E.navigation.formMethod!=null&&Py(E.navigation.formMethod)&&((It=Ze.state)==null?void 0:It._isRedirect)!==!0;a&&(s=a,a=void 0),P||D===yu.Pop||(D===yu.Push?t.history.push(Ze,Ze.state):D===yu.Replace&&t.history.replace(Ze,Ze.state));let _t;if(D===yu.Pop){let ht=A.get(E.location.pathname);ht&&ht.has(Ze.pathname)?_t={currentLocation:E.location,nextLocation:Ze}:A.has(Ze.pathname)&&(_t={currentLocation:Ze,nextLocation:E.location})}else if(T){let ht=A.get(E.location.pathname);ht?ht.add(Ze.pathname):(ht=new Set([Ze.pathname]),A.set(E.location.pathname,ht)),_t={currentLocation:E.location,nextLocation:Ze}}ie(Ul({},dt,{actionData:wt,loaderData:$e,historyAction:D,location:Ze,initialized:!0,navigation:l_e,revalidation:"idle",restoreScrollPosition:ln(Ze,dt.matches||E.matches),preventScrollReset:tt,blockers:We}),{viewTransitionOpts:_t,flushSync:Ve===!0}),D=yu.Pop,k=!1,T=!1,P=!1,O=!1,V=[]}async function be(Ze,dt){if(typeof Ze=="number"){t.history.go(Ze);return}let at=iEe(E.location,E.matches,l,d.v7_prependBasename,Ze,d.v7_relativeSplatPath,dt==null?void 0:dt.fromRouteId,dt==null?void 0:dt.relative),{path:mt,submission:It,error:Ve}=eQe(d.v7_normalizeFormMethod,!1,at,dt),bt=E.location,wt=xz(E.location,mt,dt&&dt.state);wt=Ul({},wt,t.history.encodeLocation(wt));let $e=dt&&dt.replace!=null?dt.replace:void 0,We=yu.Push;$e===!0?We=yu.Replace:$e===!1||It!=null&&Py(It.formMethod)&&It.formAction===E.location.pathname+E.location.search&&(We=yu.Replace);let tt=dt&&"preventScrollReset"in dt?dt.preventScrollReset===!0:void 0,_t=(dt&&dt.flushSync)===!0,ht=rt({currentLocation:bt,nextLocation:wt,historyAction:We});if(ht){nt(ht,{state:"blocked",location:wt,proceed(){nt(ht,{state:"proceeding",proceed:void 0,reset:void 0,location:wt}),be(Ze,dt)},reset(){let qe=new Map(E.blockers);qe.set(ht,NO),ie({blockers:qe})}});return}return await Ne(We,wt,{submission:It,pendingError:Ve,preventScrollReset:tt,replace:dt&&dt.replace,enableViewTransition:dt&&dt.viewTransition,flushSync:_t})}function le(){if(ue(),ie({revalidation:"loading"}),E.navigation.state!=="submitting"){if(E.navigation.state==="idle"){Ne(E.historyAction,E.location,{startUninterruptedRevalidation:!0});return}Ne(D||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation,enableViewTransition:T===!0})}}async function Ne(Ze,dt,at){M&&M.abort(),M=null,D=Ze,P=(at&&at.startUninterruptedRevalidation)===!0,$t(E.location,E.matches),k=(at&&at.preventScrollReset)===!0,T=(at&&at.enableViewTransition)===!0;let mt=a||s,It=at&&at.overrideNavigation,Ve=vE(mt,dt,l),bt=(at&&at.flushSync)===!0,wt=Jt(Ve,mt,dt.pathname);if(wt.active&&wt.matches&&(Ve=wt.matches),!Ve){let{error:ft,notFoundMatches:Ct,route:Pt}=St(dt.pathname);Q(dt,{matches:Ct,loaderData:{},errors:{[Pt.id]:ft}},{flushSync:bt});return}if(E.initialized&&!O&&hgn(E.location,dt)&&!(at&&at.submission&&Py(at.submission.formMethod))){Q(dt,{matches:Ve},{flushSync:bt});return}M=new AbortController;let $e=SP(t.history,dt,M.signal,at&&at.submission),We;if(at&&at.pendingError)We=[XL(Ve).route.id,{type:Wa.error,error:at.pendingError}];else if(at&&at.submission&&Py(at.submission.formMethod)){let ft=await Le($e,dt,at.submission,Ve,wt.active,{replace:at.replace,flushSync:bt});if(ft.shortCircuited)return;if(ft.pendingActionResult){let[Ct,Pt]=ft.pendingActionResult;if(Ag(Pt)&&kue(Pt.error)&&Pt.error.status===404){M=null,Q(dt,{matches:ft.matches,loaderData:{},errors:{[Ct]:Pt.error}});return}}Ve=ft.matches||Ve,We=ft.pendingActionResult,It=c_e(dt,at.submission),bt=!1,wt.active=!1,$e=SP(t.history,$e.url,$e.signal)}let{shortCircuited:tt,matches:_t,loaderData:ht,errors:qe}=await Te($e,dt,Ve,wt.active,It,at&&at.submission,at&&at.fetcherSubmission,at&&at.replace,at&&at.initialHydration===!0,bt,We);tt||(M=null,Q(dt,Ul({matches:_t||Ve},cQe(We),{loaderData:ht,errors:qe})))}async function Le(Ze,dt,at,mt,It,Ve){Ve===void 0&&(Ve={}),ue();let bt=vgn(dt,at);if(ie({navigation:bt},{flushSync:Ve.flushSync===!0}),It){let We=await en(mt,dt.pathname,Ze.signal);if(We.type==="aborted")return{shortCircuited:!0};if(We.type==="error"){let tt=XL(We.partialMatches).route.id;return{matches:We.partialMatches,pendingActionResult:[tt,{type:Wa.error,error:We.error}]}}else if(We.matches)mt=We.matches;else{let{notFoundMatches:tt,error:_t,route:ht}=St(dt.pathname);return{matches:tt,pendingActionResult:[ht.id,{type:Wa.error,error:_t}]}}}let wt,$e=R7(mt,dt);if(!$e.route.action&&!$e.route.lazy)wt={type:Wa.error,error:sp(405,{method:Ze.method,pathname:dt.pathname,routeId:$e.route.id})};else if(wt=(await re("action",E,Ze,[$e],mt,null))[$e.route.id],Ze.signal.aborted)return{shortCircuited:!0};if(DT(wt)){let We;return Ve&&Ve.replace!=null?We=Ve.replace:We=oQe(wt.response.headers.get("Location"),new URL(Ze.url),l)===E.location.pathname+E.location.search,await X(Ze,wt,!0,{submission:at,replace:We}),{shortCircuited:!0}}if(IE(wt))throw sp(400,{type:"defer-action"});if(Ag(wt)){let We=XL(mt,$e.route.id);return(Ve&&Ve.replace)!==!0&&(D=yu.Push),{matches:mt,pendingActionResult:[We.route.id,wt]}}return{matches:mt,pendingActionResult:[$e.route.id,wt]}}async function Te(Ze,dt,at,mt,It,Ve,bt,wt,$e,We,tt){let _t=It||c_e(dt,Ve),ht=Ve||bt||hQe(_t),qe=!P&&(!d.v7_partialHydration||!$e);if(mt){if(qe){let ur=De(tt);ie(Ul({navigation:_t},ur!==void 0?{actionData:ur}:{}),{flushSync:We})}let _i=await en(at,dt.pathname,Ze.signal);if(_i.type==="aborted")return{shortCircuited:!0};if(_i.type==="error"){let ur=XL(_i.partialMatches).route.id;return{matches:_i.partialMatches,loaderData:{},errors:{[ur]:_i.error}}}else if(_i.matches)at=_i.matches;else{let{error:ur,notFoundMatches:si,route:Ii}=St(dt.pathname);return{matches:si,loaderData:{},errors:{[Ii.id]:ur}}}}let ft=a||s,[Ct,Pt]=nQe(t.history,E,at,ht,dt,d.v7_partialHydration&&$e===!0,d.v7_skipActionErrorRevalidation,O,V,F,Y,q,K,ft,l,tt);if(At(_i=>!(at&&at.some(ur=>ur.route.id===_i))||Ct&&Ct.some(ur=>ur.route.id===_i)),z=++B,Ct.length===0&&Pt.length===0){let _i=Ge();return Q(dt,Ul({matches:at,loaderData:{},errors:tt&&Ag(tt[1])?{[tt[0]]:tt[1].error}:null},cQe(tt),_i?{fetchers:new Map(E.fetchers)}:{}),{flushSync:We}),{shortCircuited:!0}}if(qe){let _i={};if(!mt){_i.navigation=_t;let ur=De(tt);ur!==void 0&&(_i.actionData=ur)}Pt.length>0&&(_i.fetchers=Pe(Pt)),ie(_i,{flushSync:We})}Pt.forEach(_i=>{it(_i.key),_i.controller&&$.set(_i.key,_i.controller)});let an=()=>Pt.forEach(_i=>it(_i.key));M&&M.signal.addEventListener("abort",an);let{loaderResults:_n,fetcherResults:on}=await we(E,at,Ct,Pt,Ze);if(Ze.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener("abort",an),Pt.forEach(_i=>$.delete(_i.key));let yn=oZ(_n);if(yn)return await X(Ze,yn.result,!0,{replace:wt}),{shortCircuited:!0};if(yn=oZ(on),yn)return K.add(yn.key),await X(Ze,yn.result,!0,{replace:wt}),{shortCircuited:!0};let{loaderData:fi,errors:oi}=aQe(E,at,_n,tt,Pt,on,J);J.forEach((_i,ur)=>{_i.subscribe(si=>{(si||_i.done)&&J.delete(ur)})}),d.v7_partialHydration&&$e&&E.errors&&(oi=Ul({},E.errors,oi));let Qi=Ge(),mi=Ee(z),Vr=Qi||mi||Pt.length>0;return Ul({matches:at,loaderData:fi,errors:oi},Vr?{fetchers:new Map(E.fetchers)}:{})}function De(Ze){if(Ze&&!Ag(Ze[1]))return{[Ze[0]]:Ze[1].data};if(E.actionData)return Object.keys(E.actionData).length===0?null:E.actionData}function Pe(Ze){return Ze.forEach(dt=>{let at=E.fetchers.get(dt.key),mt=mV(void 0,at?at.data:void 0);E.fetchers.set(dt.key,mt)}),new Map(E.fetchers)}function ge(Ze,dt,at,mt){if(i)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");it(Ze);let It=(mt&&mt.flushSync)===!0,Ve=a||s,bt=iEe(E.location,E.matches,l,d.v7_prependBasename,at,d.v7_relativeSplatPath,dt,mt==null?void 0:mt.relative),wt=vE(Ve,bt,l),$e=Jt(wt,Ve,bt);if($e.active&&$e.matches&&(wt=$e.matches),!wt){ze(Ze,dt,sp(404,{pathname:bt}),{flushSync:It});return}let{path:We,submission:tt,error:_t}=eQe(d.v7_normalizeFormMethod,!0,bt,mt);if(_t){ze(Ze,dt,_t,{flushSync:It});return}let ht=R7(wt,We),qe=(mt&&mt.preventScrollReset)===!0;if(tt&&Py(tt.formMethod)){he(Ze,dt,We,ht,wt,$e.active,It,qe,tt);return}q.set(Ze,{routeId:dt,path:We}),me(Ze,dt,We,ht,wt,$e.active,It,qe,tt)}async function he(Ze,dt,at,mt,It,Ve,bt,wt,$e){ue(),q.delete(Ze);function We(Si){if(!Si.route.action&&!Si.route.lazy){let To=sp(405,{method:$e.formMethod,pathname:at,routeId:dt});return ze(Ze,dt,To,{flushSync:bt}),!0}return!1}if(!Ve&&We(mt))return;let tt=E.fetchers.get(Ze);Ce(Ze,ygn($e,tt),{flushSync:bt});let _t=new AbortController,ht=SP(t.history,at,_t.signal,$e);if(Ve){let Si=await en(It,at,ht.signal);if(Si.type==="aborted")return;if(Si.type==="error"){ze(Ze,dt,Si.error,{flushSync:bt});return}else if(Si.matches){if(It=Si.matches,mt=R7(It,at),We(mt))return}else{ze(Ze,dt,sp(404,{pathname:at}),{flushSync:bt});return}}$.set(Ze,_t);let qe=B,Ct=(await re("action",E,ht,[mt],It,Ze))[mt.route.id];if(ht.signal.aborted){$.get(Ze)===_t&&$.delete(Ze);return}if(d.v7_fetcherPersist&&Y.has(Ze)){if(DT(Ct)||Ag(Ct)){Ce(Ze,UN(void 0));return}}else{if(DT(Ct))if($.delete(Ze),z>qe){Ce(Ze,UN(void 0));return}else return K.add(Ze),Ce(Ze,mV($e)),X(ht,Ct,!1,{fetcherSubmission:$e,preventScrollReset:wt});if(Ag(Ct)){ze(Ze,dt,Ct.error);return}}if(IE(Ct))throw sp(400,{type:"defer-action"});let Pt=E.navigation.location||E.location,an=SP(t.history,Pt,_t.signal),_n=a||s,on=E.navigation.state!=="idle"?vE(_n,E.navigation.location,l):E.matches;Eo(on,"Didn't find any matches after fetcher action");let yn=++B;H.set(Ze,yn);let fi=mV($e,Ct.data);E.fetchers.set(Ze,fi);let[oi,Qi]=nQe(t.history,E,on,$e,Pt,!1,d.v7_skipActionErrorRevalidation,O,V,F,Y,q,K,_n,l,[mt.route.id,Ct]);Qi.filter(Si=>Si.key!==Ze).forEach(Si=>{let To=Si.key,ts=E.fetchers.get(To),La=mV(void 0,ts?ts.data:void 0);E.fetchers.set(To,La),it(To),Si.controller&&$.set(To,Si.controller)}),ie({fetchers:new Map(E.fetchers)});let mi=()=>Qi.forEach(Si=>it(Si.key));_t.signal.addEventListener("abort",mi);let{loaderResults:Vr,fetcherResults:_i}=await we(E,on,oi,Qi,an);if(_t.signal.aborted)return;_t.signal.removeEventListener("abort",mi),H.delete(Ze),$.delete(Ze),Qi.forEach(Si=>$.delete(Si.key));let ur=oZ(Vr);if(ur)return X(an,ur.result,!1,{preventScrollReset:wt});if(ur=oZ(_i),ur)return K.add(ur.key),X(an,ur.result,!1,{preventScrollReset:wt});let{loaderData:si,errors:Ii}=aQe(E,on,Vr,void 0,Qi,_i,J);if(E.fetchers.has(Ze)){let Si=UN(Ct.data);E.fetchers.set(Ze,Si)}Ee(yn),E.navigation.state==="loading"&&yn>z?(Eo(D,"Expected pending action"),M&&M.abort(),Q(E.navigation.location,{matches:on,loaderData:si,errors:Ii,fetchers:new Map(E.fetchers)})):(ie({errors:Ii,loaderData:lQe(E.loaderData,si,on,Ii),fetchers:new Map(E.fetchers)}),O=!1)}async function me(Ze,dt,at,mt,It,Ve,bt,wt,$e){let We=E.fetchers.get(Ze);Ce(Ze,mV($e,We?We.data:void 0),{flushSync:bt});let tt=new AbortController,_t=SP(t.history,at,tt.signal);if(Ve){let Ct=await en(It,at,_t.signal);if(Ct.type==="aborted")return;if(Ct.type==="error"){ze(Ze,dt,Ct.error,{flushSync:bt});return}else if(Ct.matches)It=Ct.matches,mt=R7(It,at);else{ze(Ze,dt,sp(404,{pathname:at}),{flushSync:bt});return}}$.set(Ze,tt);let ht=B,ft=(await re("loader",E,_t,[mt],It,Ze))[mt.route.id];if(IE(ft)&&(ft=await lje(ft,_t.signal,!0)||ft),$.get(Ze)===tt&&$.delete(Ze),!_t.signal.aborted){if(Y.has(Ze)){Ce(Ze,UN(void 0));return}if(DT(ft))if(z>ht){Ce(Ze,UN(void 0));return}else{K.add(Ze),await X(_t,ft,!1,{preventScrollReset:wt});return}if(Ag(ft)){ze(Ze,dt,ft.error);return}Eo(!IE(ft),"Unhandled fetcher deferred data"),Ce(Ze,UN(ft.data))}}async function X(Ze,dt,at,mt){let{submission:It,fetcherSubmission:Ve,preventScrollReset:bt,replace:wt}=mt===void 0?{}:mt;dt.response.headers.has("X-Remix-Revalidate")&&(O=!0);let $e=dt.response.headers.get("Location");Eo($e,"Expected a Location header on the redirect Response"),$e=oQe($e,new URL(Ze.url),l);let We=xz(E.location,$e,{_isRedirect:!0});if(n){let Ct=!1;if(dt.response.headers.has("X-Remix-Reload-Document"))Ct=!0;else if(aje.test($e)){const Pt=t.history.createURL($e);Ct=Pt.origin!==e.location.origin||rb(Pt.pathname,l)==null}if(Ct){wt?e.location.replace($e):e.location.assign($e);return}}M=null;let tt=wt===!0||dt.response.headers.has("X-Remix-Replace")?yu.Replace:yu.Push,{formMethod:_t,formAction:ht,formEncType:qe}=E.navigation;!It&&!Ve&&_t&&ht&&qe&&(It=hQe(E.navigation));let ft=It||Ve;if(Jpn.has(dt.response.status)&&ft&&Py(ft.formMethod))await Ne(tt,We,{submission:Ul({},ft,{formAction:$e}),preventScrollReset:bt||k,enableViewTransition:at?T:void 0});else{let Ct=c_e(We,It);await Ne(tt,We,{overrideNavigation:Ct,fetcherSubmission:Ve,preventScrollReset:bt||k,enableViewTransition:at?T:void 0})}}async function re(Ze,dt,at,mt,It,Ve){let bt,wt={};try{bt=await agn(c,Ze,dt,at,mt,It,Ve,o,r)}catch($e){return mt.forEach(We=>{wt[We.route.id]={type:Wa.error,error:$e}}),wt}for(let[$e,We]of Object.entries(bt))if(fgn(We)){let tt=We.result;wt[$e]={type:Wa.redirect,response:ugn(tt,at,$e,It,l,d.v7_relativeSplatPath)}}else wt[$e]=await cgn(We);return wt}async function we(Ze,dt,at,mt,It){let Ve=Ze.matches,bt=re("loader",Ze,It,at,dt,null),wt=Promise.all(mt.map(async tt=>{if(tt.matches&&tt.match&&tt.controller){let ht=(await re("loader",Ze,SP(t.history,tt.path,tt.controller.signal),[tt.match],tt.matches,tt.key))[tt.match.route.id];return{[tt.key]:ht}}else return Promise.resolve({[tt.key]:{type:Wa.error,error:sp(404,{pathname:tt.path})}})})),$e=await bt,We=(await wt).reduce((tt,_t)=>Object.assign(tt,_t),{});return await Promise.all([ggn(dt,$e,It.signal,Ve,Ze.loaderData),bgn(dt,We,mt)]),{loaderResults:$e,fetcherResults:We}}function ue(){O=!0,V.push(...At()),q.forEach((Ze,dt)=>{$.has(dt)&&F.add(dt),it(dt)})}function Ce(Ze,dt,at){at===void 0&&(at={}),E.fetchers.set(Ze,dt),ie({fetchers:new Map(E.fetchers)},{flushSync:(at&&at.flushSync)===!0})}function ze(Ze,dt,at,mt){mt===void 0&&(mt={});let It=XL(E.matches,dt);Ke(Ze),ie({errors:{[It.route.id]:at},fetchers:new Map(E.fetchers)},{flushSync:(mt&&mt.flushSync)===!0})}function Ye(Ze){return d.v7_fetcherPersist&&(U.set(Ze,(U.get(Ze)||0)+1),Y.has(Ze)&&Y.delete(Ze)),E.fetchers.get(Ze)||egn}function Ke(Ze){let dt=E.fetchers.get(Ze);$.has(Ze)&&!(dt&&dt.state==="loading"&&H.has(Ze))&&it(Ze),q.delete(Ze),H.delete(Ze),K.delete(Ze),Y.delete(Ze),F.delete(Ze),E.fetchers.delete(Ze)}function Xe(Ze){if(d.v7_fetcherPersist){let dt=(U.get(Ze)||0)-1;dt<=0?(U.delete(Ze),Y.add(Ze)):U.set(Ze,dt)}else Ke(Ze);ie({fetchers:new Map(E.fetchers)})}function it(Ze){let dt=$.get(Ze);dt&&(dt.abort(),$.delete(Ze))}function ut(Ze){for(let dt of Ze){let at=Ye(dt),mt=UN(at.data);E.fetchers.set(dt,mt)}}function Ge(){let Ze=[],dt=!1;for(let at of K){let mt=E.fetchers.get(at);Eo(mt,"Expected fetcher: "+at),mt.state==="loading"&&(K.delete(at),Ze.push(at),dt=!0)}return ut(Ze),dt}function Ee(Ze){let dt=[];for(let[at,mt]of H)if(mt<Ze){let It=E.fetchers.get(at);Eo(It,"Expected fetcher: "+at),It.state==="loading"&&(it(at),H.delete(at),dt.push(at))}return ut(dt),dt.length>0}function Se(Ze,dt){let at=E.blockers.get(Ze)||NO;return ae.get(Ze)!==dt&&ae.set(Ze,dt),at}function je(Ze){E.blockers.delete(Ze),ae.delete(Ze)}function nt(Ze,dt){let at=E.blockers.get(Ze)||NO;Eo(at.state==="unblocked"&&dt.state==="blocked"||at.state==="blocked"&&dt.state==="blocked"||at.state==="blocked"&&dt.state==="proceeding"||at.state==="blocked"&&dt.state==="unblocked"||at.state==="proceeding"&&dt.state==="unblocked","Invalid blocker state transition: "+at.state+" -> "+dt.state);let mt=new Map(E.blockers);mt.set(Ze,dt),ie({blockers:mt})}function rt(Ze){let{currentLocation:dt,nextLocation:at,historyAction:mt}=Ze;if(ae.size===0)return;ae.size>1&&Mu(!1,"A router only supports one blocker at a time");let It=Array.from(ae.entries()),[Ve,bt]=It[It.length-1],wt=E.blockers.get(Ve);if(!(wt&&wt.state==="proceeding")&&bt({currentLocation:dt,nextLocation:at,historyAction:mt}))return Ve}function St(Ze){let dt=sp(404,{pathname:Ze}),at=a||s,{matches:mt,route:It}=uQe(at);return At(),{notFoundMatches:mt,route:It,error:dt}}function At(Ze){let dt=[];return J.forEach((at,mt)=>{(!Ze||Ze(mt))&&(at.cancel(),dt.push(mt),J.delete(mt))}),dt}function Nt(Ze,dt,at){if(m=Ze,g=dt,p=at||null,!y&&E.navigation===l_e){y=!0;let mt=ln(E.location,E.matches);mt!=null&&ie({restoreScrollPosition:mt})}return()=>{m=null,g=null,p=null}}function vt(Ze,dt){return p&&p(Ze,dt.map(mt=>Tpn(mt,E.loaderData)))||Ze.key}function $t(Ze,dt){if(m&&g){let at=vt(Ze,dt);m[at]=g()}}function ln(Ze,dt){if(m){let at=vt(Ze,dt),mt=m[at];if(typeof mt=="number")return mt}return null}function Jt(Ze,dt,at){if(u)if(Ze){if(Object.keys(Ze[0].params).length>0)return{active:!0,matches:dee(dt,at,l,!0)}}else return{active:!0,matches:dee(dt,at,l,!0)||[]};return{active:!1,matches:null}}async function en(Ze,dt,at){if(!u)return{type:"success",matches:Ze};let mt=Ze;for(;;){let It=a==null,Ve=a||s,bt=o;try{await u({path:dt,matches:mt,patch:(We,tt)=>{at.aborted||rQe(We,tt,Ve,bt,r)}})}catch(We){return{type:"error",error:We,partialMatches:mt}}finally{It&&!at.aborted&&(s=[...s])}if(at.aborted)return{type:"aborted"};let wt=vE(Ve,dt,l);if(wt)return{type:"success",matches:wt};let $e=dee(Ve,dt,l,!0);if(!$e||mt.length===$e.length&&mt.every((We,tt)=>We.route.id===$e[tt].route.id))return{type:"success",matches:null};mt=$e}}function Ft(Ze){o={},a=gne(Ze,r,void 0,o)}function dn(Ze,dt){let at=a==null;rQe(Ze,dt,a||s,o,r),at&&(s=[...s],ie({}))}return N={get basename(){return l},get future(){return d},get state(){return E},get routes(){return s},get window(){return e},initialize:oe,subscribe:de,enableScrollRestoration:Nt,navigate:be,fetch:ge,revalidate:le,createHref:Ze=>t.history.createHref(Ze),encodeLocation:Ze=>t.history.encodeLocation(Ze),getFetcher:Ye,deleteFetcher:Xe,dispose:fe,getBlocker:Se,deleteBlocker:je,patchRoutes:dn,_internalFetchControllers:$,_internalActiveDeferreds:J,_internalSetRoutes:Ft},N}function ign(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function iEe(t,e,n,i,r,o,s,a){let l,c;if(s){l=[];for(let d of e)if(l.push(d),d.route.id===s){c=d;break}}else l=e,c=e[e.length-1];let u=Due(r||".",Eue(l,o),rb(t.pathname,n)||t.pathname,a==="path");if(r==null&&(u.search=t.search,u.hash=t.hash),(r==null||r===""||r===".")&&c){let d=cje(u.search);if(c.route.index&&!d)u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&d){let h=new URLSearchParams(u.search),f=h.getAll("index");h.delete("index"),f.filter(p=>p).forEach(p=>h.append("index",p));let m=h.toString();u.search=m?"?"+m:""}}return i&&n!=="/"&&(u.pathname=u.pathname==="/"?n:$x([n,u.pathname])),KD(u)}function eQe(t,e,n,i){if(!i||!ign(i))return{path:n};if(i.formMethod&&!pgn(i.formMethod))return{path:n,error:sp(405,{method:i.formMethod})};let r=()=>({path:n,error:sp(400,{type:"invalid-body"})}),o=i.formMethod||"get",s=t?o.toUpperCase():o.toLowerCase(),a=zwt(n);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!Py(s))return r();let h=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((f,m)=>{let[p,g]=m;return""+f+p+"="+g+`
`},""):String(i.body);return{path:n,submission:{formMethod:s,formAction:a,formEncType:i.formEncType,formData:void 0,json:void 0,text:h}}}else if(i.formEncType==="application/json"){if(!Py(s))return r();try{let h=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:n,submission:{formMethod:s,formAction:a,formEncType:i.formEncType,formData:void 0,json:h,text:void 0}}}catch{return r()}}}Eo(typeof FormData=="function","FormData is not available in this environment");let l,c;if(i.formData)l=oEe(i.formData),c=i.formData;else if(i.body instanceof FormData)l=oEe(i.body),c=i.body;else if(i.body instanceof URLSearchParams)l=i.body,c=sQe(l);else if(i.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(i.body),c=sQe(l)}catch{return r()}let u={formMethod:s,formAction:a,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Py(u.formMethod))return{path:n,submission:u};let d=Vk(n);return e&&d.search&&cje(d.search)&&l.append("index",""),d.search="?"+l,{path:KD(d),submission:u}}function tQe(t,e,n){n===void 0&&(n=!1);let i=t.findIndex(r=>r.route.id===e);return i>=0?t.slice(0,n?i+1:i):t}function nQe(t,e,n,i,r,o,s,a,l,c,u,d,h,f,m,p){let g=p?Ag(p[1])?p[1].error:p[1].data:void 0,y=t.createURL(e.location),_=t.createURL(r),w=n;o&&e.errors?w=tQe(n,Object.keys(e.errors)[0],!0):p&&Ag(p[1])&&(w=tQe(n,p[0]));let C=p?p[1].statusCode:void 0,N=s&&C&&C>=400,E=w.filter((k,M)=>{let{route:T}=k;if(T.lazy)return!0;if(T.loader==null)return!1;if(o)return rEe(T,e.loaderData,e.errors);if(rgn(e.loaderData,e.matches[M],k)||l.some(P=>P===k.route.id))return!0;let A=e.matches[M],R=k;return iQe(k,Ul({currentUrl:y,currentParams:A.params,nextUrl:_,nextParams:R.params},i,{actionResult:g,actionStatus:C,defaultShouldRevalidate:N?!1:a||y.pathname+y.search===_.pathname+_.search||y.search!==_.search||Vwt(A,R)}))}),D=[];return d.forEach((k,M)=>{if(o||!n.some(O=>O.route.id===k.routeId)||u.has(M))return;let T=vE(f,k.path,m);if(!T){D.push({key:M,routeId:k.routeId,path:k.path,matches:null,match:null,controller:null});return}let A=e.fetchers.get(M),R=R7(T,k.path),P=!1;h.has(M)?P=!1:c.has(M)?(c.delete(M),P=!0):A&&A.state!=="idle"&&A.data===void 0?P=a:P=iQe(R,Ul({currentUrl:y,currentParams:e.matches[e.matches.length-1].params,nextUrl:_,nextParams:n[n.length-1].params},i,{actionResult:g,actionStatus:C,defaultShouldRevalidate:N?!1:a})),P&&D.push({key:M,routeId:k.routeId,path:k.path,matches:T,match:R,controller:new AbortController})}),[E,D]}function rEe(t,e,n){if(t.lazy)return!0;if(!t.loader)return!1;let i=e!=null&&e[t.id]!==void 0,r=n!=null&&n[t.id]!==void 0;return!i&&r?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!i&&!r}function rgn(t,e,n){let i=!e||n.route.id!==e.route.id,r=t[n.route.id]===void 0;return i||r}function Vwt(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function iQe(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}function rQe(t,e,n,i,r){var o;let s;if(t){let c=i[t];Eo(c,"No route found to patch children into: routeId = "+t),c.children||(c.children=[]),s=c.children}else s=n;let a=e.filter(c=>!s.some(u=>Bwt(c,u))),l=gne(a,r,[t||"_","patch",String(((o=s)==null?void 0:o.length)||"0")],i);s.push(...l)}function Bwt(t,e){return"id"in t&&"id"in e&&t.id===e.id?!0:t.index===e.index&&t.path===e.path&&t.caseSensitive===e.caseSensitive?(!t.children||t.children.length===0)&&(!e.children||e.children.length===0)?!0:t.children.every((n,i)=>{var r;return(r=e.children)==null?void 0:r.some(o=>Bwt(n,o))}):!1}async function ogn(t,e,n){if(!t.lazy)return;let i=await t.lazy();if(!t.lazy)return;let r=n[t.id];Eo(r,"No route found in manifest");let o={};for(let s in i){let l=r[s]!==void 0&&s!=="hasErrorBoundary";Mu(!l,'Route "'+r.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!Mpn.has(s)&&(o[s]=i[s])}Object.assign(r,o),Object.assign(r,Ul({},e(r),{lazy:void 0}))}async function sgn(t){let{matches:e}=t,n=e.filter(r=>r.shouldLoad);return(await Promise.all(n.map(r=>r.resolve()))).reduce((r,o,s)=>Object.assign(r,{[n[s].route.id]:o}),{})}async function agn(t,e,n,i,r,o,s,a,l,c){let u=o.map(f=>f.route.lazy?ogn(f.route,l,a):void 0),d=o.map((f,m)=>{let p=u[m],g=r.some(_=>_.route.id===f.route.id);return Ul({},f,{shouldLoad:g,resolve:async _=>(_&&i.method==="GET"&&(f.route.lazy||f.route.loader)&&(g=!0),g?lgn(e,i,f,p,_,c):Promise.resolve({type:Wa.data,result:void 0}))})}),h=await t({matches:d,request:i,params:o[0].params,fetcherKey:s,context:c});try{await Promise.all(u)}catch{}return h}async function lgn(t,e,n,i,r,o){let s,a,l=c=>{let u,d=new Promise((m,p)=>u=p);a=()=>u(),e.signal.addEventListener("abort",a);let h=m=>typeof c!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+n.route.id+"]"))):c({request:e,params:n.params,context:o},...m!==void 0?[m]:[]),f=(async()=>{try{return{type:"data",result:await(r?r(p=>h(p)):h())}}catch(m){return{type:"error",result:m}}})();return Promise.race([f,d])};try{let c=n.route[t];if(i)if(c){let u,[d]=await Promise.all([l(c).catch(h=>{u=h}),i]);if(u!==void 0)throw u;s=d}else if(await i,c=n.route[t],c)s=await l(c);else if(t==="action"){let u=new URL(e.url),d=u.pathname+u.search;throw sp(405,{method:e.method,pathname:d,routeId:n.route.id})}else return{type:Wa.data,result:void 0};else if(c)s=await l(c);else{let u=new URL(e.url),d=u.pathname+u.search;throw sp(404,{pathname:d})}Eo(s.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(c){return{type:Wa.error,result:c}}finally{a&&e.signal.removeEventListener("abort",a)}return s}async function cgn(t){let{result:e,type:n}=t;if(Hwt(e)){let c;try{let u=e.headers.get("Content-Type");u&&/\bapplication\/json\b/.test(u)?e.body==null?c=null:c=await e.json():c=await e.text()}catch(u){return{type:Wa.error,error:u}}return n===Wa.error?{type:Wa.error,error:new vne(e.status,e.statusText,c),statusCode:e.status,headers:e.headers}:{type:Wa.data,data:c,statusCode:e.status,headers:e.headers}}if(n===Wa.error){if(dQe(e)){var i;if(e.data instanceof Error){var r;return{type:Wa.error,error:e.data,statusCode:(r=e.init)==null?void 0:r.status}}e=new vne(((i=e.init)==null?void 0:i.status)||500,void 0,e.data)}return{type:Wa.error,error:e,statusCode:kue(e)?e.status:void 0}}if(mgn(e)){var o,s;return{type:Wa.deferred,deferredData:e,statusCode:(o=e.init)==null?void 0:o.status,headers:((s=e.init)==null?void 0:s.headers)&&new Headers(e.init.headers)}}if(dQe(e)){var a,l;return{type:Wa.data,data:e.data,statusCode:(a=e.init)==null?void 0:a.status,headers:(l=e.init)!=null&&l.headers?new Headers(e.init.headers):void 0}}return{type:Wa.data,data:e}}function ugn(t,e,n,i,r,o){let s=t.headers.get("Location");if(Eo(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!aje.test(s)){let a=i.slice(0,i.findIndex(l=>l.route.id===n)+1);s=iEe(new URL(e.url),a,r,!0,s,o),t.headers.set("Location",s)}return t}function oQe(t,e,n){if(aje.test(t)){let i=t,r=i.startsWith("//")?new URL(e.protocol+i):new URL(i),o=rb(r.pathname,n)!=null;if(r.origin===e.origin&&o)return r.pathname+r.search+r.hash}return t}function SP(t,e,n,i){let r=t.createURL(zwt(e)).toString(),o={signal:n};if(i&&Py(i.formMethod)){let{formMethod:s,formEncType:a}=i;o.method=s.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(i.json)):a==="text/plain"?o.body=i.text:a==="application/x-www-form-urlencoded"&&i.formData?o.body=oEe(i.formData):o.body=i.formData}return new Request(r,o)}function oEe(t){let e=new URLSearchParams;for(let[n,i]of t.entries())e.append(n,typeof i=="string"?i:i.name);return e}function sQe(t){let e=new FormData;for(let[n,i]of t.entries())e.append(n,i);return e}function dgn(t,e,n,i,r){let o={},s=null,a,l=!1,c={},u=n&&Ag(n[1])?n[1].error:void 0;return t.forEach(d=>{if(!(d.route.id in e))return;let h=d.route.id,f=e[h];if(Eo(!DT(f),"Cannot handle redirect results in processLoaderData"),Ag(f)){let m=f.error;u!==void 0&&(m=u,u=void 0),s=s||{};{let p=XL(t,h);s[p.route.id]==null&&(s[p.route.id]=m)}o[h]=void 0,l||(l=!0,a=kue(f.error)?f.error.status:500),f.headers&&(c[h]=f.headers)}else IE(f)?(i.set(h,f.deferredData),o[h]=f.deferredData.data,f.statusCode!=null&&f.statusCode!==200&&!l&&(a=f.statusCode),f.headers&&(c[h]=f.headers)):(o[h]=f.data,f.statusCode&&f.statusCode!==200&&!l&&(a=f.statusCode),f.headers&&(c[h]=f.headers))}),u!==void 0&&n&&(s={[n[0]]:u},o[n[0]]=void 0),{loaderData:o,errors:s,statusCode:a||200,loaderHeaders:c}}function aQe(t,e,n,i,r,o,s){let{loaderData:a,errors:l}=dgn(e,n,i,s);return r.forEach(c=>{let{key:u,match:d,controller:h}=c,f=o[u];if(Eo(f,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(Ag(f)){let m=XL(t.matches,d==null?void 0:d.route.id);l&&l[m.route.id]||(l=Ul({},l,{[m.route.id]:f.error})),t.fetchers.delete(u)}else if(DT(f))Eo(!1,"Unhandled fetcher revalidation redirect");else if(IE(f))Eo(!1,"Unhandled fetcher deferred data");else{let m=UN(f.data);t.fetchers.set(u,m)}}),{loaderData:a,errors:l}}function lQe(t,e,n,i){let r=Ul({},e);for(let o of n){let s=o.route.id;if(e.hasOwnProperty(s)?e[s]!==void 0&&(r[s]=e[s]):t[s]!==void 0&&o.route.loader&&(r[s]=t[s]),i&&i.hasOwnProperty(s))break}return r}function cQe(t){return t?Ag(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function XL(t,e){return(e?t.slice(0,t.findIndex(i=>i.route.id===e)+1):[...t]).reverse().find(i=>i.route.hasErrorBoundary===!0)||t[0]}function uQe(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function sp(t,e){let{pathname:n,routeId:i,method:r,type:o,message:s}=e===void 0?{}:e,a="Unknown Server Error",l="Unknown @remix-run/router error";return t===400?(a="Bad Request",r&&n&&i?l="You made a "+r+' request to "'+n+'" but '+('did not provide a `loader` for route "'+i+'", ')+"so there is no way to handle the request.":o==="defer-action"?l="defer() is not supported in actions":o==="invalid-body"&&(l="Unable to encode submission body")):t===403?(a="Forbidden",l='Route "'+i+'" does not match URL "'+n+'"'):t===404?(a="Not Found",l='No route matches URL "'+n+'"'):t===405&&(a="Method Not Allowed",r&&n&&i?l="You made a "+r.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+i+'", ')+"so there is no way to handle the request.":r&&(l='Invalid request method "'+r.toUpperCase()+'"')),new vne(t||500,a,new Error(l),!0)}function oZ(t){let e=Object.entries(t);for(let n=e.length-1;n>=0;n--){let[i,r]=e[n];if(DT(r))return{key:i,result:r}}}function zwt(t){let e=typeof t=="string"?Vk(t):t;return KD(Ul({},e,{hash:""}))}function hgn(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function fgn(t){return Hwt(t.result)&&Qpn.has(t.result.status)}function IE(t){return t.type===Wa.deferred}function Ag(t){return t.type===Wa.error}function DT(t){return(t&&t.type)===Wa.redirect}function dQe(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function mgn(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function Hwt(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function pgn(t){return Zpn.has(t.toLowerCase())}function Py(t){return Ypn.has(t.toLowerCase())}async function ggn(t,e,n,i,r){let o=Object.entries(e);for(let s=0;s<o.length;s++){let[a,l]=o[s],c=t.find(h=>(h==null?void 0:h.route.id)===a);if(!c)continue;let u=i.find(h=>h.route.id===c.route.id),d=u!=null&&!Vwt(u,c)&&(r&&r[c.route.id])!==void 0;IE(l)&&d&&await lje(l,n,!1).then(h=>{h&&(e[a]=h)})}}async function bgn(t,e,n){for(let i=0;i<n.length;i++){let{key:r,routeId:o,controller:s}=n[i],a=e[r];t.find(c=>(c==null?void 0:c.route.id)===o)&&IE(a)&&(Eo(s,"Expected an AbortController for revalidating fetcher deferred result"),await lje(a,s.signal,!0).then(c=>{c&&(e[r]=c)}))}}async function lje(t,e,n){if(n===void 0&&(n=!1),!await t.deferredData.resolveData(e)){if(n)try{return{type:Wa.data,data:t.deferredData.unwrappedData}}catch(r){return{type:Wa.error,error:r}}return{type:Wa.data,data:t.deferredData.data}}}function cje(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function R7(t,e){let n=typeof e=="string"?Vk(e).search:e.search;if(t[t.length-1].route.index&&cje(n||""))return t[t.length-1];let i=jwt(t);return i[i.length-1]}function hQe(t){let{formMethod:e,formAction:n,formEncType:i,text:r,formData:o,json:s}=t;if(!(!e||!n||!i)){if(r!=null)return{formMethod:e,formAction:n,formEncType:i,formData:void 0,json:void 0,text:r};if(o!=null)return{formMethod:e,formAction:n,formEncType:i,formData:o,json:void 0,text:void 0};if(s!==void 0)return{formMethod:e,formAction:n,formEncType:i,formData:void 0,json:s,text:void 0}}}function c_e(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function vgn(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function mV(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function ygn(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function UN(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function _gn(t,e){try{let n=t.sessionStorage.getItem($wt);if(n){let i=JSON.parse(n);for(let[r,o]of Object.entries(i||{}))o&&Array.isArray(o)&&e.set(r,new Set(o||[]))}}catch{}}function xgn(t,e){if(e.size>0){let n={};for(let[i,r]of e)n[i]=[...r];try{t.sessionStorage.setItem($wt,JSON.stringify(n))}catch(i){Mu(!1,"Failed to save applied view transitions in sessionStorage ("+i+").")}}}/**
 * React Router v6.27.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function xj(){return xj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},xj.apply(this,arguments)}const AF=b.createContext(null);AF.displayName="DataRouter";const Mue=b.createContext(null);Mue.displayName="DataRouterState";const wgn=b.createContext(null);wgn.displayName="Await";const $v=b.createContext(null);$v.displayName="Navigation";const mK=b.createContext(null);mK.displayName="Location";const Vv=b.createContext({outlet:null,matches:[],isDataRoute:!1});Vv.displayName="Route";const uje=b.createContext(null);uje.displayName="RouteError";function Cgn(t,e){let{relative:n}=e===void 0?{}:e;RF()||Eo(!1,"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:r}=b.useContext($v),{hash:o,pathname:s,search:a}=pK(t,{relative:n}),l=s;return i!=="/"&&(l=s==="/"?i:$x([i,s])),r.createHref({pathname:l,search:a,hash:o})}function RF(){return b.useContext(mK)!=null}function Gp(){return RF()||Eo(!1,"useLocation() may be used only in the context of a <Router> component."),b.useContext(mK).location}function Sgn(){return b.useContext(mK).navigationType}const Wwt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Uwt(t){b.useContext($v).static||b.useLayoutEffect(t)}function Qr(){let{isDataRoute:t}=b.useContext(Vv);return t?$gn():Ngn()}function Ngn(){RF()||Eo(!1,"useNavigate() may be used only in the context of a <Router> component.");let t=b.useContext(AF),{basename:e,future:n,navigator:i}=b.useContext($v),{matches:r}=b.useContext(Vv),{pathname:o}=Gp(),s=JSON.stringify(Eue(r,n.v7_relativeSplatPath)),a=b.useRef(!1);return Uwt(()=>{a.current=!0}),b.useCallback(function(c,u){if(u===void 0&&(u={}),Mu(a.current,Wwt),!a.current)return;if(typeof c=="number"){i.go(c);return}let d=Due(c,JSON.parse(s),o,u.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:$x([e,d.pathname])),(u.replace?i.replace:i.push)(d,u.state,u)},[e,i,s,o,t])}const Egn=b.createContext(null);function Dgn(t){let e=b.useContext(Vv).outlet;return e&&b.createElement(Egn.Provider,{value:t},e)}function If(){let{matches:t}=b.useContext(Vv),e=t[t.length-1];return e?e.params:{}}function pK(t,e){let{relative:n}=e===void 0?{}:e,{future:i}=b.useContext($v),{matches:r}=b.useContext(Vv),{pathname:o}=Gp(),s=JSON.stringify(Eue(r,i.v7_relativeSplatPath));return b.useMemo(()=>Due(t,JSON.parse(s),o,n==="path"),[t,s,o,n])}function kgn(t,e,n,i){RF()||Eo(!1,"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=b.useContext($v),{matches:o}=b.useContext(Vv),s=o[o.length-1],a=s?s.params:{},l=s?s.pathname:"/",c=s?s.pathnameBase:"/",u=s&&s.route;{let y=u&&u.path||"";Gwt(l,!u||y.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+l+'" (under <Route path="'+y+'">) 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.

`+('Please change the parent <Route path="'+y+'"> to <Route ')+('path="'+(y==="/"?"*":y+"/*")+'">.'))}let d=Gp(),h;h=d;let f=h.pathname||"/",m=f;if(c!=="/"){let y=c.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let p=vE(t,{pathname:m});return Mu(u||p!=null,'No routes matched location "'+h.pathname+h.search+h.hash+'" '),Mu(p==null||p[p.length-1].route.element!==void 0||p[p.length-1].route.Component!==void 0||p[p.length-1].route.lazy!==void 0,'Matched leaf route at location "'+h.pathname+h.search+h.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.'),Agn(p&&p.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:$x([c,r.encodeLocation?r.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:$x([c,r.encodeLocation?r.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,n,i)}function Mgn(){let t=Ogn(),e=kue(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:i},o={padding:"2px 4px",backgroundColor:i},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),s=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:o},"ErrorBoundary")," or"," ",b.createElement("code",{style:o},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},e),n?b.createElement("pre",{style:r},n):null,s)}const Lgn=b.createElement(Mgn,null);class Tgn extends b.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,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?b.createElement(Vv.Provider,{value:this.props.routeContext},b.createElement(uje.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ign(t){let{routeContext:e,match:n,children:i}=t,r=b.useContext(AF);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(Vv.Provider,{value:e},i)}function Agn(t,e,n,i){var r;if(e===void 0&&(e=[]),n===void 0&&(n=null),i===void 0&&(i=null),t==null){var o;if(!n)return null;if(n.errors)t=n.matches;else if((o=i)!=null&&o.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let s=t,a=(r=n)==null?void 0:r.errors;if(a!=null){let u=s.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||Eo(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(a).join(",")),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(n&&i&&i.v7_partialHydration)for(let u=0;u<s.length;u++){let d=s[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:h,errors:f}=n,m=d.route.loader&&h[d.route.id]===void 0&&(!f||f[d.route.id]===void 0);if(d.route.lazy||m){l=!0,c>=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,d,h)=>{let f,m=!1,p=null,g=null;n&&(f=a&&d.route.id?a[d.route.id]:void 0,p=d.route.errorElement||Lgn,l&&(c<0&&h===0?(Gwt("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,g=null):c===h&&(m=!0,g=d.route.hydrateFallbackElement||null)));let y=e.concat(s.slice(0,h+1)),_=()=>{let w;return f?w=p:m?w=g:d.route.Component?w=b.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=u,b.createElement(Ign,{match:d,routeContext:{outlet:u,matches:y,isDataRoute:n!=null},children:w})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?b.createElement(Tgn,{location:n.location,revalidation:n.revalidation,component:p,error:f,children:_(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):_()},null)}var dje=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(dje||{}),wj=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(wj||{});function hje(t){return t+" must be used within a data router.  See https://reactrouter.com/routers/picking-a-router."}function Kwt(t){let e=b.useContext(AF);return e||Eo(!1,hje(t)),e}function qwt(t){let e=b.useContext(Mue);return e||Eo(!1,hje(t)),e}function Rgn(t){let e=b.useContext(Vv);return e||Eo(!1,hje(t)),e}function fje(t){let e=Rgn(t),n=e.matches[e.matches.length-1];return n.route.id||Eo(!1,t+' can only be used on routes that contain a unique "id"'),n.route.id}function Pgn(){return fje(wj.UseRouteId)}function Ogn(){var t;let e=b.useContext(uje),n=qwt(wj.UseRouteError),i=fje(wj.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[i]}let jgn=0;function Fgn(t){let{router:e,basename:n}=Kwt(dje.UseBlocker),i=qwt(wj.UseBlocker),[r,o]=b.useState(""),s=b.useCallback(a=>{if(typeof t!="function")return!!t;if(n==="/")return t(a);let{currentLocation:l,nextLocation:c,historyAction:u}=a;return t({currentLocation:xj({},l,{pathname:rb(l.pathname,n)||l.pathname}),nextLocation:xj({},c,{pathname:rb(c.pathname,n)||c.pathname}),historyAction:u})},[n,t]);return b.useEffect(()=>{let a=String(++jgn);return o(a),()=>e.deleteBlocker(a)},[e]),b.useEffect(()=>{r!==""&&e.getBlocker(r,s)},[e,r,s]),r&&i.blockers.has(r)?i.blockers.get(r):NO}function $gn(){let{router:t}=Kwt(dje.UseNavigateStable),e=fje(wj.UseNavigateStable),n=b.useRef(!1);return Uwt(()=>{n.current=!0}),b.useCallback(function(r,o){o===void 0&&(o={}),Mu(n.current,Wwt),n.current&&(typeof r=="number"?t.navigate(r):t.navigate(r,xj({fromRouteId:e},o)))},[t,e])}const fQe={};function Gwt(t,e,n){!e&&!fQe[t]&&(fQe[t]=!0,Mu(!1,n))}function Op(t){let{to:e,replace:n,state:i,relative:r}=t;RF()||Eo(!1,"<Navigate> may be used only in the context of a <Router> component.");let{future:o,static:s}=b.useContext($v);Mu(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=b.useContext(Vv),{pathname:l}=Gp(),c=Qr(),u=Due(e,Eue(a,o.v7_relativeSplatPath),l,r==="path"),d=JSON.stringify(u);return b.useEffect(()=>c(JSON.parse(d),{replace:n,state:i,relative:r}),[c,d,r,n,i]),null}function Cj(t){return Dgn(t.context)}function Vgn(t){Eo(!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 Bgn(t){let{basename:e="/",children:n=null,location:i,navigationType:r=yu.Pop,navigator:o,static:s=!1,future:a}=t;RF()&&Eo(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=b.useMemo(()=>({basename:l,navigator:o,static:s,future:xj({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof i=="string"&&(i=Vk(i));let{pathname:u="/",search:d="",hash:h="",state:f=null,key:m="default"}=i,p=b.useMemo(()=>{let g=rb(u,l);return g==null?null:{location:{pathname:g,search:d,hash:h,state:f,key:m},navigationType:r}},[l,u,d,h,f,m,r]);return Mu(p!=null,'<Router basename="'+l+'"> is not able to match the URL '+('"'+u+d+h+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),p==null?null:b.createElement($v.Provider,{value:c},b.createElement(mK.Provider,{children:n,value:p}))}new Promise(()=>{});function sEe(t,e){e===void 0&&(e=[]);let n=[];return b.Children.forEach(t,(i,r)=>{if(!b.isValidElement(i))return;let o=[...e,r];if(i.type===b.Fragment){n.push.apply(n,sEe(i.props.children,o));return}i.type!==Vgn&&Eo(!1,"["+(typeof i.type=="string"?i.type:i.type.name)+"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>"),!i.props.index||!i.props.children||Eo(!1,"An index route cannot have child routes.");let s={id:i.props.id||o.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(s.children=sEe(i.props.children,o)),n.push(s)}),n}function zgn(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&Mu(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(e,{element:b.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&Mu(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(e,{hydrateFallbackElement:b.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&Mu(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(e,{errorElement:b.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),e}/**
 * React Router DOM v6.27.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function qD(){return qD=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},qD.apply(this,arguments)}function mje(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}const hee="get",fee="application/x-www-form-urlencoded";function Lue(t){return t!=null&&typeof t.tagName=="string"}function Hgn(t){return Lue(t)&&t.tagName.toLowerCase()==="button"}function Wgn(t){return Lue(t)&&t.tagName.toLowerCase()==="form"}function Ugn(t){return Lue(t)&&t.tagName.toLowerCase()==="input"}function Kgn(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function qgn(t,e){return t.button===0&&(!e||e==="_self")&&!Kgn(t)}function wz(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let i=t[n];return e.concat(Array.isArray(i)?i.map(r=>[n,r]):[[n,i]])},[]))}function Ggn(t,e){let n=wz(t);return e&&e.forEach((i,r)=>{n.has(r)||e.getAll(r).forEach(o=>{n.append(r,o)})}),n}let sZ=null;function Ygn(){if(sZ===null)try{new FormData(document.createElement("form"),0),sZ=!1}catch{sZ=!0}return sZ}const Xgn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function u_e(t){return t!=null&&!Xgn.has(t)?(Mu(!1,'"'+t+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+fee+'"')),null):t}function Zgn(t,e){let n,i,r,o,s;if(Wgn(t)){let a=t.getAttribute("action");i=a?rb(a,e):null,n=t.getAttribute("method")||hee,r=u_e(t.getAttribute("enctype"))||fee,o=new FormData(t)}else if(Hgn(t)||Ugn(t)&&(t.type==="submit"||t.type==="image")){let a=t.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=t.getAttribute("formaction")||a.getAttribute("action");if(i=l?rb(l,e):null,n=t.getAttribute("formmethod")||a.getAttribute("method")||hee,r=u_e(t.getAttribute("formenctype"))||u_e(a.getAttribute("enctype"))||fee,o=new FormData(a,t),!Ygn()){let{name:c,type:u,value:d}=t;if(u==="image"){let h=c?c+".":"";o.append(h+"x","0"),o.append(h+"y","0")}else c&&o.append(c,d)}}else{if(Lue(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=hee,i=null,r=fee,s=t}return o&&r==="text/plain"&&(s=o,o=void 0),{action:i,method:n.toLowerCase(),encType:r,formData:o,body:s}}const Qgn=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Jgn=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],ebn=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"],tbn="6";try{window.__reactRouterVersion=tbn}catch{}function nbn(t,e){return ngn({basename:void 0,future:qD({},void 0,{v7_prependBasename:!0}),history:Epn({window:void 0}),hydrationData:ibn(),routes:t,mapRouteProperties:zgn,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function ibn(){var t;let e=(t=window)==null?void 0:t.__staticRouterHydrationData;return e&&e.errors&&(e=qD({},e,{errors:rbn(e.errors)})),e}function rbn(t){if(!t)return null;let e=Object.entries(t),n={};for(let[i,r]of e)if(r&&r.__type==="RouteErrorResponse")n[i]=new vne(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type==="Error"){if(r.__subType){let o=window[r.__subType];if(typeof o=="function")try{let s=new o(r.message);s.stack="",n[i]=s}catch{}}if(n[i]==null){let o=new Error(r.message);o.stack="",n[i]=o}}else n[i]=r;return n}const pje=b.createContext({isTransitioning:!1});pje.displayName="ViewTransition";const Ywt=b.createContext(new Map);Ywt.displayName="Fetchers";const obn="startTransition",mQe=CF[obn],sbn="flushSync",pQe=Awt[sbn];function abn(t){mQe?mQe(t):t()}function pV(t){pQe?pQe(t):t()}class lbn{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",e(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",n(i))}})}}function cbn(t){let{fallbackElement:e,router:n,future:i}=t,[r,o]=b.useState(n.state),[s,a]=b.useState(),[l,c]=b.useState({isTransitioning:!1}),[u,d]=b.useState(),[h,f]=b.useState(),[m,p]=b.useState(),g=b.useRef(new Map),{v7_startTransition:y}=i||{},_=b.useCallback(k=>{y?abn(k):k()},[y]),w=b.useCallback((k,M)=>{let{deletedFetchers:T,flushSync:A,viewTransitionOpts:R}=M;T.forEach(O=>g.current.delete(O)),k.fetchers.forEach((O,V)=>{O.data!==void 0&&g.current.set(V,O.data)});let P=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!R||P){A?pV(()=>o(k)):_(()=>o(k));return}if(A){pV(()=>{h&&(u&&u.resolve(),h.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:R.currentLocation,nextLocation:R.nextLocation})});let O=n.window.document.startViewTransition(()=>{pV(()=>o(k))});O.finished.finally(()=>{pV(()=>{d(void 0),f(void 0),a(void 0),c({isTransitioning:!1})})}),pV(()=>f(O));return}h?(u&&u.resolve(),h.skipTransition(),p({state:k,currentLocation:R.currentLocation,nextLocation:R.nextLocation})):(a(k),c({isTransitioning:!0,flushSync:!1,currentLocation:R.currentLocation,nextLocation:R.nextLocation}))},[n.window,h,u,g,_]);b.useLayoutEffect(()=>n.subscribe(w),[n,w]),b.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new lbn)},[l]),b.useEffect(()=>{if(u&&s&&n.window){let k=s,M=u.promise,T=n.window.document.startViewTransition(async()=>{_(()=>o(k)),await M});T.finished.finally(()=>{d(void 0),f(void 0),a(void 0),c({isTransitioning:!1})}),f(T)}},[_,s,u,n.window]),b.useEffect(()=>{u&&s&&r.location.key===s.location.key&&u.resolve()},[u,h,r.location,s]),b.useEffect(()=>{!l.isTransitioning&&m&&(a(m.state),c({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),p(void 0))},[l.isTransitioning,m]),b.useEffect(()=>{Mu(e==null||!n.future.v7_partialHydration,"`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead")},[]);let C=b.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:k=>n.navigate(k),push:(k,M,T)=>n.navigate(k,{state:M,preventScrollReset:T==null?void 0:T.preventScrollReset}),replace:(k,M,T)=>n.navigate(k,{replace:!0,state:M,preventScrollReset:T==null?void 0:T.preventScrollReset})}),[n]),N=n.basename||"/",E=b.useMemo(()=>({router:n,navigator:C,static:!1,basename:N}),[n,C,N]),D=b.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return b.createElement(b.Fragment,null,b.createElement(AF.Provider,{value:E},b.createElement(Mue.Provider,{value:r},b.createElement(Ywt.Provider,{value:g.current},b.createElement(pje.Provider,{value:l},b.createElement(Bgn,{basename:N,location:r.location,navigationType:r.historyAction,navigator:C,future:D},r.initialized||n.future.v7_partialHydration?b.createElement(ubn,{routes:n.routes,future:n.future,state:r}):e))))),null)}const ubn=b.memo(dbn);function dbn(t){let{routes:e,future:n,state:i}=t;return kgn(e,void 0,i,n)}const hbn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",fbn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,T0=b.forwardRef(function(e,n){let{onClick:i,relative:r,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:u,viewTransition:d}=e,h=mje(e,Qgn),{basename:f}=b.useContext($v),m,p=!1;if(typeof c=="string"&&fbn.test(c)&&(m=c,hbn))try{let w=new URL(window.location.href),C=c.startsWith("//")?new URL(w.protocol+c):new URL(c),N=rb(C.pathname,f);C.origin===w.origin&&N!=null?c=N+C.search+C.hash:p=!0}catch{Mu(!1,'<Link to="'+c+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let g=Cgn(c,{relative:r}),y=gbn(c,{replace:s,state:a,target:l,preventScrollReset:u,relative:r,viewTransition:d});function _(w){i&&i(w),w.defaultPrevented||y(w)}return b.createElement("a",qD({},h,{href:m||g,onClick:p||o?i:_,ref:n,target:l}))});T0.displayName="Link";const Np=b.forwardRef(function(e,n){let{"aria-current":i="page",caseSensitive:r=!1,className:o="",end:s=!1,style:a,to:l,viewTransition:c,children:u}=e,d=mje(e,Jgn),h=pK(l,{relative:d.relative}),f=Gp(),m=b.useContext(Mue),{navigator:p,basename:g}=b.useContext($v),y=m!=null&&Cbn(h)&&c===!0,_=p.encodeLocation?p.encodeLocation(h).pathname:h.pathname,w=f.pathname,C=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;r||(w=w.toLowerCase(),C=C?C.toLowerCase():null,_=_.toLowerCase()),C&&g&&(C=rb(C,g)||C);const N=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let E=w===_||!s&&w.startsWith(_)&&w.charAt(N)==="/",D=C!=null&&(C===_||!s&&C.startsWith(_)&&C.charAt(_.length)==="/"),k={isActive:E,isPending:D,isTransitioning:y},M=E?i:void 0,T;typeof o=="function"?T=o(k):T=[o,E?"active":null,D?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let A=typeof a=="function"?a(k):a;return b.createElement(T0,qD({},d,{"aria-current":M,className:T,ref:n,style:A,to:l,viewTransition:c}),typeof u=="function"?u(k):u)});Np.displayName="NavLink";const mbn=b.forwardRef((t,e)=>{let{fetcherKey:n,navigate:i,reloadDocument:r,replace:o,state:s,method:a=hee,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:h}=t,f=mje(t,ebn),m=_bn(),p=xbn(l,{relative:u}),g=a.toLowerCase()==="get"?"get":"post",y=_=>{if(c&&c(_),_.defaultPrevented)return;_.preventDefault();let w=_.nativeEvent.submitter,C=(w==null?void 0:w.getAttribute("formmethod"))||a;m(w||_.currentTarget,{fetcherKey:n,method:C,navigate:i,replace:o,state:s,relative:u,preventScrollReset:d,viewTransition:h})};return b.createElement("form",qD({ref:e,method:g,action:p,onSubmit:r?c:y},f))});mbn.displayName="Form";var yne;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(yne||(yne={}));var gQe;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(gQe||(gQe={}));function pbn(t){return t+" must be used within a data router.  See https://reactrouter.com/routers/picking-a-router."}function Xwt(t){let e=b.useContext(AF);return e||Eo(!1,pbn(t)),e}function gbn(t,e){let{target:n,replace:i,state:r,preventScrollReset:o,relative:s,viewTransition:a}=e===void 0?{}:e,l=Qr(),c=Gp(),u=pK(t,{relative:s});return b.useCallback(d=>{if(qgn(d,n)){d.preventDefault();let h=i!==void 0?i:KD(c)===KD(u);l(t,{replace:h,state:r,preventScrollReset:o,relative:s,viewTransition:a})}},[c,l,u,i,r,n,t,o,s,a])}function Bv(t){Mu(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let e=b.useRef(wz(t)),n=b.useRef(!1),i=Gp(),r=b.useMemo(()=>Ggn(i.search,n.current?null:e.current),[i.search]),o=Qr(),s=b.useCallback((a,l)=>{const c=wz(typeof a=="function"?a(r):a);n.current=!0,o("?"+c,l)},[o,r]);return[r,s]}function bbn(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let vbn=0,ybn=()=>"__"+String(++vbn)+"__";function _bn(){let{router:t}=Xwt(yne.UseSubmit),{basename:e}=b.useContext($v),n=Pgn();return b.useCallback(function(i,r){r===void 0&&(r={}),bbn();let{action:o,method:s,encType:a,formData:l,body:c}=Zgn(i,e);if(r.navigate===!1){let u=r.fetcherKey||ybn();t.fetch(u,n,r.action||o,{preventScrollReset:r.preventScrollReset,formData:l,body:c,formMethod:r.method||s,formEncType:r.encType||a,flushSync:r.flushSync})}else t.navigate(r.action||o,{preventScrollReset:r.preventScrollReset,formData:l,body:c,formMethod:r.method||s,formEncType:r.encType||a,replace:r.replace,state:r.state,fromRouteId:n,flushSync:r.flushSync,viewTransition:r.viewTransition})},[t,e,n])}function xbn(t,e){let{relative:n}=e===void 0?{}:e,{basename:i}=b.useContext($v),r=b.useContext(Vv);r||Eo(!1,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),s=qD({},pK(t||".",{relative:n})),a=Gp();if(t==null){s.search=a.search;let l=new URLSearchParams(s.search),c=l.getAll("index");if(c.some(d=>d==="")){l.delete("index"),c.filter(h=>h).forEach(h=>l.append("index",h));let d=l.toString();s.search=d?"?"+d:""}}return(!t||t===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(s.pathname=s.pathname==="/"?i:$x([i,s.pathname])),KD(s)}function wbn(t,e){let{capture:n}=e||{};b.useEffect(()=>{let i=n!=null?{capture:n}:void 0;return window.addEventListener("beforeunload",t,i),()=>{window.removeEventListener("beforeunload",t,i)}},[t,n])}function Cbn(t,e){e===void 0&&(e={});let n=b.useContext(pje);n==null&&Eo(!1,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Xwt(yne.useViewTransitionState),r=pK(t,{relative:e.relative});if(!n.isTransitioning)return!1;let o=rb(n.currentLocation.pathname,i)||n.currentLocation.pathname,s=rb(n.nextLocation.pathname,i)||n.nextLocation.pathname;return bne(r.pathname,s)!=null||bne(r.pathname,o)!=null}var Zwt={};function Sbn(t){const e=new Error(t);if(e.stack===void 0)try{throw e}catch{}return e}var Nbn=Sbn,xo=Nbn;function Ebn(t){return!!t&&typeof t.then=="function"}var ul=Ebn;function Dbn(t,e){if(t!=null)return t;throw xo(e??"Got unexpected null or undefined")}var Gl=Dbn;function Po(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Tue{getValue(){throw xo("BaseLoadable")}toPromise(){throw xo("BaseLoadable")}valueMaybe(){throw xo("BaseLoadable")}valueOrThrow(){throw xo(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw xo("BaseLoadable")}promiseOrThrow(){throw xo(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw xo("BaseLoadable")}errorOrThrow(){throw xo(`Loadable expected error, but in "${this.state}" state`)}is(e){return e.state===this.state&&e.contents===this.contents}map(e){throw xo("BaseLoadable")}}class kbn extends Tue{constructor(e){super(),Po(this,"state","hasValue"),Po(this,"contents",void 0),this.contents=e}getValue(){return this.contents}toPromise(){return Promise.resolve(this.contents)}valueMaybe(){return this.contents}valueOrThrow(){return this.contents}promiseMaybe(){}errorMaybe(){}map(e){try{const n=e(this.contents);return ul(n)?w2(n):Sj(n)?n:gK(n)}catch(n){return ul(n)?w2(n.next(()=>this.map(e))):Iue(n)}}}class Mbn extends Tue{constructor(e){super(),Po(this,"state","hasError"),Po(this,"contents",void 0),this.contents=e}getValue(){throw this.contents}toPromise(){return Promise.reject(this.contents)}valueMaybe(){}promiseMaybe(){}errorMaybe(){return this.contents}errorOrThrow(){return this.contents}map(e){return this}}class Qwt extends Tue{constructor(e){super(),Po(this,"state","loading"),Po(this,"contents",void 0),this.contents=e}getValue(){throw this.contents}toPromise(){return this.contents}valueMaybe(){}promiseMaybe(){return this.contents}promiseOrThrow(){return this.contents}errorMaybe(){}map(e){return w2(this.contents.then(n=>{const i=e(n);if(Sj(i)){const r=i;switch(r.state){case"hasValue":return r.contents;case"hasError":throw r.contents;case"loading":return r.contents}}return i}).catch(n=>{if(ul(n))return n.then(()=>this.map(e).contents);throw n}))}}function gK(t){return Object.freeze(new kbn(t))}function Iue(t){return Object.freeze(new Mbn(t))}function w2(t){return Object.freeze(new Qwt(t))}function Jwt(){return Object.freeze(new Qwt(new Promise(()=>{})))}function Lbn(t){return t.every(e=>e.state==="hasValue")?gK(t.map(e=>e.contents)):t.some(e=>e.state==="hasError")?Iue(Gl(t.find(e=>e.state==="hasError"),"Invalid loadable passed to loadableAll").contents):w2(Promise.all(t.map(e=>e.contents)))}function e1t(t){const n=(Array.isArray(t)?t:Object.getOwnPropertyNames(t).map(r=>t[r])).map(r=>Sj(r)?r:ul(r)?w2(r):gK(r)),i=Lbn(n);return Array.isArray(t)?i:i.map(r=>Object.getOwnPropertyNames(t).reduce((o,s,a)=>({...o,[s]:r[a]}),{}))}function Sj(t){return t instanceof Tue}const Tbn={of:t=>ul(t)?w2(t):Sj(t)?t:gK(t),error:t=>Iue(t),loading:()=>Jwt(),all:e1t,isLoadable:Sj};var kA={loadableWithValue:gK,loadableWithError:Iue,loadableWithPromise:w2,loadableLoading:Jwt,loadableAll:e1t,isLoadable:Sj,RecoilLoadable:Tbn},Ibn=kA.loadableWithValue,Abn=kA.loadableWithError,Rbn=kA.loadableWithPromise,Pbn=kA.loadableLoading,Obn=kA.loadableAll,jbn=kA.isLoadable,Fbn=kA.RecoilLoadable,bK=Object.freeze({__proto__:null,loadableWithValue:Ibn,loadableWithError:Abn,loadableWithPromise:Rbn,loadableLoading:Pbn,loadableAll:Obn,isLoadable:jbn,RecoilLoadable:Fbn});const aEe={RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED:!0,RECOIL_GKS_ENABLED:new Set(["recoil_hamt_2020","recoil_sync_external_store","recoil_suppress_rerender_in_callback","recoil_memory_managament_2020"])};function $bn(t,e){var n,i;const r=(n=Zwt[t])===null||n===void 0||(i=n.toLowerCase())===null||i===void 0?void 0:i.trim();if(r==null||r==="")return;if(!["true","false"].includes(r))throw xo(`process.env.${t} value must be 'true', 'false', or empty: ${r}`);e(r==="true")}function Vbn(t,e){var n;const i=(n=Zwt[t])===null||n===void 0?void 0:n.trim();i==null||i===""||e(i.split(/\s*,\s*|\s+/))}function Bbn(){var t;typeof process>"u"||((t=process)===null||t===void 0?void 0:t.env)!=null&&($bn("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED",e=>{aEe.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=e}),Vbn("RECOIL_GKS_ENABLED",e=>{e.forEach(n=>{aEe.RECOIL_GKS_ENABLED.add(n)})}))}Bbn();var PF=aEe;function Aue(t){return PF.RECOIL_GKS_ENABLED.has(t)}Aue.setPass=t=>{PF.RECOIL_GKS_ENABLED.add(t)};Aue.setFail=t=>{PF.RECOIL_GKS_ENABLED.delete(t)};Aue.clear=()=>{PF.RECOIL_GKS_ENABLED.clear()};var dl=Aue;function zbn(t,e,{error:n}={}){return console.error(t,n),null}var Hbn=zbn,jh=Hbn,d_e,h_e,f_e;const Wbn=(d_e=Z.createMutableSource)!==null&&d_e!==void 0?d_e:Z.unstable_createMutableSource,t1t=(h_e=Z.useMutableSource)!==null&&h_e!==void 0?h_e:Z.unstable_useMutableSource,gje=(f_e=Z.useSyncExternalStore)!==null&&f_e!==void 0?f_e:Z.unstable_useSyncExternalStore;let bQe=!1;function Ubn(){var t;const{ReactCurrentDispatcher:e,ReactCurrentOwner:n}=Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,r=((t=e==null?void 0:e.current)!==null&&t!==void 0?t:n.currentDispatcher).useSyncExternalStore!=null;return gje&&!r&&!bQe&&(bQe=!0,jh("A React renderer without React 18+ API support is being used with React 18+.")),r}function Kbn(){return dl("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:dl("recoil_sync_external_store")&&gje!=null?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:dl("recoil_mutable_source")&&t1t!=null&&typeof window<"u"&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?dl("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:dl("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}}function qbn(){return!1}var OF={createMutableSource:Wbn,useMutableSource:t1t,useSyncExternalStore:gje,currentRendererSupportsUseSyncExternalStore:Ubn,reactMode:Kbn,isFastRefreshEnabled:qbn};class bje{constructor(e){Po(this,"key",void 0),this.key=e}toJSON(){return{key:this.key}}}class n1t extends bje{}class i1t extends bje{}function Gbn(t){return t instanceof n1t||t instanceof i1t}var Rue={AbstractRecoilValue:bje,RecoilState:n1t,RecoilValueReadOnly:i1t,isRecoilValue:Gbn},Ybn=Rue.AbstractRecoilValue,Xbn=Rue.RecoilState,Zbn=Rue.RecoilValueReadOnly,Qbn=Rue.isRecoilValue,C2=Object.freeze({__proto__:null,AbstractRecoilValue:Ybn,RecoilState:Xbn,RecoilValueReadOnly:Zbn,isRecoilValue:Qbn});function Jbn(t,...e){let n=0;return t.replace(/%s/g,()=>String(e[n++]))}var evn=Jbn;function tvn(t,...e){{const n=evn.call(null,t,...e),i=new Error(n);i.name="Expectation Violation",console.error(i)}}var nvn=tvn,Pue=nvn;function ivn(t,e){return function*(){let n=0;for(const i of t)yield e(i,n++)}()}var Oue=ivn;const{isFastRefreshEnabled:rvn}=OF;class r1t{}const ovn=new r1t,S2=new Map,vje=new Map;function svn(t){return Oue(t,e=>Gl(vje.get(e)))}function avn(t){if(S2.has(t)){const e=`Duplicate atom key "${t}". This is a FATAL ERROR in
      production. But it is safe to ignore this warning if it occurred because of
      hot module replacement.`;rvn()||Pue(e,"recoil")}}function lvn(t){PF.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&avn(t.key),S2.set(t.key,t);const e=t.set==null?new C2.RecoilValueReadOnly(t.key):new C2.RecoilState(t.key);return vje.set(t.key,e),e}class o1t extends Error{}function cvn(t){const e=S2.get(t);if(e==null)throw new o1t(`Missing definition for RecoilValue: "${t}""`);return e}function uvn(t){return S2.get(t)}const _ne=new Map;function dvn(t){var e;if(!dl("recoil_memory_managament_2020"))return;const n=S2.get(t);if(n!=null&&(e=n.shouldDeleteConfigOnRelease)!==null&&e!==void 0&&e.call(n)){var i;S2.delete(t),(i=s1t(t))===null||i===void 0||i(),_ne.delete(t)}}function hvn(t,e){dl("recoil_memory_managament_2020")&&(e===void 0?_ne.delete(t):_ne.set(t,e))}function s1t(t){return _ne.get(t)}var Yp={nodes:S2,recoilValues:vje,registerNode:lvn,getNode:cvn,getNodeMaybe:uvn,deleteNodeConfigIfPossible:dvn,setConfigDeletionHandler:hvn,getConfigDeletionHandler:s1t,recoilValuesForKeys:svn,NodeMissingError:o1t,DefaultValue:r1t,DEFAULT_VALUE:ovn};function fvn(t,e){e()}var mvn={enqueueExecution:fvn};function pvn(t,e){return e={exports:{}},t(e,e.exports),e.exports}var gvn=pvn(function(t){var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ee){return typeof Ee}:function(Ee){return Ee&&typeof Symbol=="function"&&Ee.constructor===Symbol&&Ee!==Symbol.prototype?"symbol":typeof Ee},n={},i=5,r=Math.pow(2,i),o=r-1,s=r/2,a=r/4,l={},c=function(Se){return function(){return Se}},u=n.hash=function(Ee){var Se=typeof Ee>"u"?"undefined":e(Ee);if(Se==="number")return Ee;Se!=="string"&&(Ee+="");for(var je=0,nt=0,rt=Ee.length;nt<rt;++nt){var St=Ee.charCodeAt(nt);je=(je<<5)-je+St|0}return je},d=function(Se){return Se-=Se>>1&1431655765,Se=(Se&858993459)+(Se>>2&858993459),Se=Se+(Se>>4)&252645135,Se+=Se>>8,Se+=Se>>16,Se&127},h=function(Se,je){return je>>>Se&o},f=function(Se){return 1<<Se},m=function(Se,je){return d(Se&je-1)},p=function(Se,je,nt,rt){var St=rt;if(!Se){var At=rt.length;St=new Array(At);for(var Nt=0;Nt<At;++Nt)St[Nt]=rt[Nt]}return St[je]=nt,St},g=function(Se,je,nt){var rt=nt.length-1,St=0,At=0,Nt=nt;if(Se)St=At=je;else for(Nt=new Array(rt);St<je;)Nt[At++]=nt[St++];for(++St;St<=rt;)Nt[At++]=nt[St++];return Se&&(Nt.length=rt),Nt},y=function(Se,je,nt,rt){var St=rt.length;if(Se){for(var At=St;At>=je;)rt[At--]=rt[At];return rt[je]=nt,rt}for(var Nt=0,vt=0,$t=new Array(St+1);Nt<je;)$t[vt++]=rt[Nt++];for($t[je]=nt;Nt<St;)$t[++vt]=rt[Nt++];return $t},_=1,w=2,C=3,N=4,E={__hamt_isEmpty:!0},D=function(Se){return Se===E||Se&&Se.__hamt_isEmpty},k=function(Se,je,nt,rt){return{type:_,edit:Se,hash:je,key:nt,value:rt,_modify:B}},M=function(Se,je,nt){return{type:w,edit:Se,hash:je,children:nt,_modify:z}},T=function(Se,je,nt){return{type:C,edit:Se,mask:je,children:nt,_modify:H}},A=function(Se,je,nt){return{type:N,edit:Se,size:je,children:nt,_modify:K}},R=function(Se){return Se===E||Se.type===_||Se.type===w},P=function(Se,je,nt,rt,St){for(var At=[],Nt=rt,vt=0,$t=0;Nt;++$t)Nt&1&&(At[$t]=St[vt++]),Nt>>>=1;return At[je]=nt,A(Se,vt+1,At)},O=function(Se,je,nt,rt){for(var St=new Array(je-1),At=0,Nt=0,vt=0,$t=rt.length;vt<$t;++vt)if(vt!==nt){var ln=rt[vt];ln&&!D(ln)&&(St[At++]=ln,Nt|=1<<vt)}return T(Se,Nt,St)},V=function Ee(Se,je,nt,rt,St,At){if(nt===St)return M(Se,nt,[At,rt]);var Nt=h(je,nt),vt=h(je,St);return T(Se,f(Nt)|f(vt),Nt===vt?[Ee(Se,je+i,nt,rt,St,At)]:Nt<vt?[rt,At]:[At,rt])},F=function(Se,je,nt,rt,St,At,Nt,vt){for(var $t=St.length,ln=0;ln<$t;++ln){var Jt=St[ln];if(nt(Nt,Jt.key)){var en=Jt.value,Ft=At(en);return Ft===en?St:Ft===l?(--vt.value,g(Se,ln,St)):p(Se,ln,k(je,rt,Nt,Ft),St)}}var dn=At();return dn===l?St:(++vt.value,p(Se,$t,k(je,rt,Nt,dn),St))},$=function(Se,je){return Se===je.edit},B=function(Se,je,nt,rt,St,At,Nt){if(je(At,this.key)){var vt=rt(this.value);return vt===this.value?this:vt===l?(--Nt.value,E):$(Se,this)?(this.value=vt,this):k(Se,St,At,vt)}var $t=rt();return $t===l?this:(++Nt.value,V(Se,nt,this.hash,this,St,k(Se,St,At,$t)))},z=function(Se,je,nt,rt,St,At,Nt){if(St===this.hash){var vt=$(Se,this),$t=F(vt,Se,je,this.hash,this.children,rt,At,Nt);return $t===this.children?this:$t.length>1?M(Se,this.hash,$t):$t[0]}var ln=rt();return ln===l?this:(++Nt.value,V(Se,nt,this.hash,this,St,k(Se,St,At,ln)))},H=function(Se,je,nt,rt,St,At,Nt){var vt=this.mask,$t=this.children,ln=h(nt,St),Jt=f(ln),en=m(vt,Jt),Ft=vt&Jt,dn=Ft?$t[en]:E,Ze=dn._modify(Se,je,nt+i,rt,St,At,Nt);if(dn===Ze)return this;var dt=$(Se,this),at=vt,mt=void 0;if(Ft&&D(Ze)){if(at&=~Jt,!at)return E;if($t.length<=2&&R($t[en^1]))return $t[en^1];mt=g(dt,en,$t)}else if(!Ft&&!D(Ze)){if($t.length>=s)return P(Se,ln,Ze,vt,$t);at|=Jt,mt=y(dt,en,Ze,$t)}else mt=p(dt,en,Ze,$t);return dt?(this.mask=at,this.children=mt,this):T(Se,at,mt)},K=function(Se,je,nt,rt,St,At,Nt){var vt=this.size,$t=this.children,ln=h(nt,St),Jt=$t[ln],en=(Jt||E)._modify(Se,je,nt+i,rt,St,At,Nt);if(Jt===en)return this;var Ft=$(Se,this),dn=void 0;if(D(Jt)&&!D(en))++vt,dn=p(Ft,ln,en,$t);else if(!D(Jt)&&D(en)){if(--vt,vt<=a)return O(Se,vt,ln,$t);dn=p(Ft,ln,E,$t)}else dn=p(Ft,ln,en,$t);return Ft?(this.size=vt,this.children=dn,this):A(Se,vt,dn)};E._modify=function(Ee,Se,je,nt,rt,St,At){var Nt=nt();return Nt===l?E:(++At.value,k(Ee,rt,St,Nt))};function q(Ee,Se,je,nt,rt){this._editable=Ee,this._edit=Se,this._config=je,this._root=nt,this._size=rt}q.prototype.setTree=function(Ee,Se){return this._editable?(this._root=Ee,this._size=Se,this):Ee===this._root?this:new q(this._editable,this._edit,this._config,Ee,Se)};var U=n.tryGetHash=function(Ee,Se,je,nt){for(var rt=nt._root,St=0,At=nt._config.keyEq;;)switch(rt.type){case _:return At(je,rt.key)?rt.value:Ee;case w:{if(Se===rt.hash)for(var Nt=rt.children,vt=0,$t=Nt.length;vt<$t;++vt){var ln=Nt[vt];if(At(je,ln.key))return ln.value}return Ee}case C:{var Jt=h(St,Se),en=f(Jt);if(rt.mask&en){rt=rt.children[m(rt.mask,en)],St+=i;break}return Ee}case N:{if(rt=rt.children[h(St,Se)],rt){St+=i;break}return Ee}default:return Ee}};q.prototype.tryGetHash=function(Ee,Se,je){return U(Ee,Se,je,this)};var Y=n.tryGet=function(Ee,Se,je){return U(Ee,je._config.hash(Se),Se,je)};q.prototype.tryGet=function(Ee,Se){return Y(Ee,Se,this)};var J=n.getHash=function(Ee,Se,je){return U(void 0,Ee,Se,je)};q.prototype.getHash=function(Ee,Se){return J(Ee,Se,this)},n.get=function(Ee,Se){return U(void 0,Se._config.hash(Ee),Ee,Se)},q.prototype.get=function(Ee,Se){return Y(Se,Ee,this)};var ae=n.has=function(Ee,Se,je){return U(l,Ee,Se,je)!==l};q.prototype.hasHash=function(Ee,Se){return ae(Ee,Se,this)};var se=n.has=function(Ee,Se){return ae(Se._config.hash(Ee),Ee,Se)};q.prototype.has=function(Ee){return se(Ee,this)};var oe=function(Se,je){return Se===je};n.make=function(Ee){return new q(0,0,{keyEq:Ee&&Ee.keyEq||oe,hash:Ee&&Ee.hash||u},E,0)},n.empty=n.make();var fe=n.isEmpty=function(Ee){return Ee&&!!D(Ee._root)};q.prototype.isEmpty=function(){return fe(this)};var de=n.modifyHash=function(Ee,Se,je,nt){var rt={value:nt._size},St=nt._root._modify(nt._editable?nt._edit:NaN,nt._config.keyEq,0,Ee,Se,je,rt);return nt.setTree(St,rt.value)};q.prototype.modifyHash=function(Ee,Se,je){return de(je,Ee,Se,this)};var ie=n.modify=function(Ee,Se,je){return de(Ee,je._config.hash(Se),Se,je)};q.prototype.modify=function(Ee,Se){return ie(Se,Ee,this)};var Q=n.setHash=function(Ee,Se,je,nt){return de(c(je),Ee,Se,nt)};q.prototype.setHash=function(Ee,Se,je){return Q(Ee,Se,je,this)};var be=n.set=function(Ee,Se,je){return Q(je._config.hash(Ee),Ee,Se,je)};q.prototype.set=function(Ee,Se){return be(Ee,Se,this)};var le=c(l),Ne=n.removeHash=function(Ee,Se,je){return de(le,Ee,Se,je)};q.prototype.removeHash=q.prototype.deleteHash=function(Ee,Se){return Ne(Ee,Se,this)};var Le=n.remove=function(Ee,Se){return Ne(Se._config.hash(Ee),Ee,Se)};q.prototype.remove=q.prototype.delete=function(Ee){return Le(Ee,this)};var Te=n.beginMutation=function(Ee){return new q(Ee._editable+1,Ee._edit+1,Ee._config,Ee._root,Ee._size)};q.prototype.beginMutation=function(){return Te(this)};var De=n.endMutation=function(Ee){return Ee._editable=Ee._editable&&Ee._editable-1,Ee};q.prototype.endMutation=function(){return De(this)};var Pe=n.mutate=function(Ee,Se){var je=Te(Se);return Ee(je),De(je)};q.prototype.mutate=function(Ee){return Pe(Ee,this)};var ge=function(Se){return Se&&he(Se[0],Se[1],Se[2],Se[3],Se[4])},he=function(Se,je,nt,rt,St){for(;nt<Se;){var At=je[nt++];if(At&&!D(At))return me(At,rt,[Se,je,nt,rt,St])}return ge(St)},me=function(Se,je,nt){switch(Se.type){case _:return{value:je(Se),rest:nt};case w:case N:case C:var rt=Se.children;return he(rt.length,rt,0,je,nt);default:return ge(nt)}},X={done:!0};function re(Ee){this.v=Ee}re.prototype.next=function(){if(!this.v)return X;var Ee=this.v;return this.v=ge(Ee.rest),Ee},re.prototype[Symbol.iterator]=function(){return this};var we=function(Se,je){return new re(me(Se._root,je))},ue=function(Se){return[Se.key,Se.value]},Ce=n.entries=function(Ee){return we(Ee,ue)};q.prototype.entries=q.prototype[Symbol.iterator]=function(){return Ce(this)};var ze=function(Se){return Se.key},Ye=n.keys=function(Ee){return we(Ee,ze)};q.prototype.keys=function(){return Ye(this)};var Ke=function(Se){return Se.value},Xe=n.values=q.prototype.values=function(Ee){return we(Ee,Ke)};q.prototype.values=function(){return Xe(this)};var it=n.fold=function(Ee,Se,je){var nt=je._root;if(nt.type===_)return Ee(Se,nt.value,nt.key);for(var rt=[nt.children],St=void 0;St=rt.pop();)for(var At=0,Nt=St.length;At<Nt;){var vt=St[At++];vt&&vt.type&&(vt.type===_?Se=Ee(Se,vt.value,vt.key):rt.push(vt.children))}return Se};q.prototype.fold=function(Ee,Se){return it(Ee,Se,this)};var ut=n.forEach=function(Ee,Se){return it(function(je,nt,rt){return Ee(nt,rt,Se)},null,Se)};q.prototype.forEach=function(Ee){return ut(Ee,this)};var Ge=n.count=function(Ee){return Ee._size};q.prototype.count=function(){return Ge(this)},Object.defineProperty(q.prototype,"size",{get:q.prototype.count}),t.exports?t.exports=n:(void 0).hamt=n});class bvn{constructor(e){Po(this,"_map",void 0),this._map=new Map(e==null?void 0:e.entries())}keys(){return this._map.keys()}entries(){return this._map.entries()}get(e){return this._map.get(e)}has(e){return this._map.has(e)}set(e,n){return this._map.set(e,n),this}delete(e){return this._map.delete(e),this}clone(){return _je(this)}toMap(){return new Map(this._map)}}class yje{constructor(e){if(Po(this,"_hamt",gvn.empty.beginMutation()),e instanceof yje){const n=e._hamt.endMutation();e._hamt=n.beginMutation(),this._hamt=n.beginMutation()}else if(e)for(const[n,i]of e.entries())this._hamt.set(n,i)}keys(){return this._hamt.keys()}entries(){return this._hamt.entries()}get(e){return this._hamt.get(e)}has(e){return this._hamt.has(e)}set(e,n){return this._hamt.set(e,n),this}delete(e){return this._hamt.delete(e),this}clone(){return _je(this)}toMap(){return new Map(this._hamt)}}function _je(t){return dl("recoil_hamt_2020")?new yje(t):new bvn(t)}var vvn={persistentMap:_je},yvn=vvn.persistentMap,_vn=Object.freeze({__proto__:null,persistentMap:yvn});function xvn(t,...e){const n=new Set;e:for(const i of t){for(const r of e)if(r.has(i))continue e;n.add(i)}return n}var N9=xvn;function wvn(t,e){const n=new Map;return t.forEach((i,r)=>{n.set(r,e(i,r))}),n}var xne=wvn;function Cvn(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function Svn(t){return{nodeDeps:xne(t.nodeDeps,e=>new Set(e)),nodeToNodeSubscriptions:xne(t.nodeToNodeSubscriptions,e=>new Set(e))}}function m_e(t,e,n,i){const{nodeDeps:r,nodeToNodeSubscriptions:o}=n,s=r.get(t);if(s&&i&&s!==i.nodeDeps.get(t))return;r.set(t,e);const a=s==null?e:N9(e,s);for(const l of a)o.has(l)||o.set(l,new Set),Gl(o.get(l)).add(t);if(s){const l=N9(s,e);for(const c of l){if(!o.has(c))return;const u=Gl(o.get(c));u.delete(t),u.size===0&&o.delete(c)}}}function Nvn(t,e,n,i){var r,o,s,a;const l=n.getState();i===l.currentTree.version||i===((r=l.nextTree)===null||r===void 0?void 0:r.version)||i===((o=l.previousTree)===null||o===void 0?void 0:o.version)||jh("Tried to save dependencies to a discarded tree");const c=n.getGraph(i);if(m_e(t,e,c),i===((s=l.previousTree)===null||s===void 0?void 0:s.version)){const d=n.getGraph(l.currentTree.version);m_e(t,e,d,c)}if(i===((a=l.previousTree)===null||a===void 0?void 0:a.version)||i===l.currentTree.version){var u;const d=(u=l.nextTree)===null||u===void 0?void 0:u.version;if(d!==void 0){const h=n.getGraph(d);m_e(t,e,h,c)}}}var vK={cloneGraph:Svn,graph:Cvn,saveDepsToStore:Nvn};let Evn=0;const Dvn=()=>Evn++;let kvn=0;const Mvn=()=>kvn++;let Lvn=0;const Tvn=()=>Lvn++;var jue={getNextTreeStateVersion:Dvn,getNextStoreID:Mvn,getNextComponentID:Tvn};const{persistentMap:vQe}=_vn,{graph:Ivn}=vK,{getNextTreeStateVersion:a1t}=jue;function l1t(){const t=a1t();return{version:t,stateID:t,transactionMetadata:{},dirtyAtoms:new Set,atomValues:vQe(),nonvalidatedAtoms:vQe()}}function Avn(){const t=l1t();return{currentTree:t,nextTree:null,previousTree:null,commitDepth:0,knownAtoms:new Set,knownSelectors:new Set,transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(t.version,Ivn()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var c1t={makeEmptyTreeState:l1t,makeEmptyStoreState:Avn,getNextTreeStateVersion:a1t};class u1t{}function Rvn(){return new u1t}var Fue={RetentionZone:u1t,retentionZone:Rvn};function Pvn(t,e){const n=new Set(t);return n.add(e),n}function Ovn(t,e){const n=new Set(t);return n.delete(e),n}function jvn(t,e,n){const i=new Map(t);return i.set(e,n),i}function Fvn(t,e,n){const i=new Map(t);return i.set(e,n(i.get(e))),i}function $vn(t,e){const n=new Map(t);return n.delete(e),n}function Vvn(t,e){const n=new Map(t);return e.forEach(i=>n.delete(i)),n}var d1t={setByAddingToSet:Pvn,setByDeletingFromSet:Ovn,mapBySettingInMap:jvn,mapByUpdatingInMap:Fvn,mapByDeletingFromMap:$vn,mapByDeletingMultipleFromMap:Vvn};function*Bvn(t,e){let n=0;for(const i of t)e(i,n++)&&(yield i)}var xje=Bvn;function zvn(t,e){return new Proxy(t,{get:(i,r)=>(!(r in i)&&r in e&&(i[r]=e[r]()),i[r]),ownKeys:i=>Object.keys(i)})}var h1t=zvn;const{getNode:yK,getNodeMaybe:Hvn,recoilValuesForKeys:yQe}=Yp,{RetentionZone:_Qe}=Fue,{setByAddingToSet:Wvn}=d1t,Uvn=Object.freeze(new Set);class Kvn extends Error{}function qvn(t,e,n){if(!dl("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:i}=t.getState().retention;function r(o){let s=i.get(o);s||i.set(o,s=new Set),s.add(e)}if(n instanceof _Qe)r(n);else if(Array.isArray(n))for(const o of n)r(o);return()=>{if(!dl("recoil_memory_managament_2020"))return;const{retention:o}=t.getState();function s(a){const l=o.nodesRetainedByZone.get(a);l==null||l.delete(e),l&&l.size===0&&o.nodesRetainedByZone.delete(a)}if(n instanceof _Qe)s(n);else if(Array.isArray(n))for(const a of n)s(a)}}function wje(t,e,n,i){const r=t.getState();if(r.nodeCleanupFunctions.has(n))return;const o=yK(n),s=qvn(t,n,o.retainedBy),a=o.init(t,e,i);r.nodeCleanupFunctions.set(n,()=>{a(),s()})}function Gvn(t,e,n){wje(t,t.getState().currentTree,e,n)}function Yvn(t,e){var n;const i=t.getState();(n=i.nodeCleanupFunctions.get(e))===null||n===void 0||n(),i.nodeCleanupFunctions.delete(e)}function Xvn(t,e,n){return wje(t,e,n,"get"),yK(n).get(t,e)}function f1t(t,e,n){return yK(n).peek(t,e)}function Zvn(t,e,n){var i;const r=Hvn(e);return r==null||(i=r.invalidate)===null||i===void 0||i.call(r,t),{...t,atomValues:t.atomValues.clone().delete(e),nonvalidatedAtoms:t.nonvalidatedAtoms.clone().set(e,n),dirtyAtoms:Wvn(t.dirtyAtoms,e)}}function Qvn(t,e,n,i){const r=yK(n);if(r.set==null)throw new Kvn(`Attempt to set read-only RecoilValue: ${n}`);const o=r.set;return wje(t,e,n,"set"),o(t,e,i)}function Jvn(t,e,n){const i=t.getState(),r=t.getGraph(e.version),o=yK(n).nodeType;return h1t({type:o},{loadable:()=>f1t(t,e,n),isActive:()=>i.knownAtoms.has(n)||i.knownSelectors.has(n),isSet:()=>o==="selector"?!1:e.atomValues.has(n),isModified:()=>e.dirtyAtoms.has(n),deps:()=>{var s;return yQe((s=r.nodeDeps.get(n))!==null&&s!==void 0?s:[])},subscribers:()=>{var s,a;return{nodes:yQe(xje(m1t(t,e,new Set([n])),l=>l!==n)),components:Oue((s=(a=i.nodeToComponentSubscriptions.get(n))===null||a===void 0?void 0:a.values())!==null&&s!==void 0?s:[],([l])=>({name:l}))}}})}function m1t(t,e,n){const i=new Set,r=Array.from(n),o=t.getGraph(e.version);for(let a=r.pop();a;a=r.pop()){var s;i.add(a);const l=(s=o.nodeToNodeSubscriptions.get(a))!==null&&s!==void 0?s:Uvn;for(const c of l)i.has(c)||r.push(c)}return i}var Bk={getNodeLoadable:Xvn,peekNodeLoadable:f1t,setNodeValue:Qvn,initializeNode:Gvn,cleanUpNode:Yvn,setUnvalidatedAtomValue_DEPRECATED:Zvn,peekNodeInfo:Jvn,getDownstreamNodes:m1t};let p1t=null;function eyn(t){p1t=t}function tyn(){var t;(t=p1t)===null||t===void 0||t()}var g1t={setInvalidateMemoizedSnapshot:eyn,invalidateMemoizedSnapshot:tyn};const{getDownstreamNodes:nyn,getNodeLoadable:b1t,setNodeValue:iyn}=Bk,{getNextComponentID:ryn}=jue,{getNode:oyn,getNodeMaybe:v1t}=Yp,{DefaultValue:Cje}=Yp,{reactMode:syn}=OF,{AbstractRecoilValue:ayn,RecoilState:lyn,RecoilValueReadOnly:cyn,isRecoilValue:uyn}=C2,{invalidateMemoizedSnapshot:dyn}=g1t;function hyn(t,{key:e},n=t.getState().currentTree){var i,r;const o=t.getState();n.version===o.currentTree.version||n.version===((i=o.nextTree)===null||i===void 0?void 0:i.version)||n.version===((r=o.previousTree)===null||r===void 0?void 0:r.version)||jh("Tried to read from a discarded tree");const s=b1t(t,n,e);return s.state==="loading"&&s.contents.catch(()=>{}),s}function fyn(t,e){const n=t.clone();return e.forEach((i,r)=>{i.state==="hasValue"&&i.contents instanceof Cje?n.delete(r):n.set(r,i)}),n}function myn(t,e,{key:n},i){if(typeof i=="function"){const r=b1t(t,e,n);if(r.state==="loading"){const o=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw jh(o),xo(o)}else if(r.state==="hasError")throw r.contents;return i(r.contents)}else return i}function pyn(t,e,n){if(n.type==="set"){const{recoilValue:r,valueOrUpdater:o}=n,s=myn(t,e,r,o),a=iyn(t,e,r.key,s);for(const[l,c]of a.entries())lEe(e,l,c)}else if(n.type==="setLoadable"){const{recoilValue:{key:r},loadable:o}=n;lEe(e,r,o)}else if(n.type==="markModified"){const{recoilValue:{key:r}}=n;e.dirtyAtoms.add(r)}else if(n.type==="setUnvalidated"){var i;const{recoilValue:{key:r},unvalidatedValue:o}=n,s=v1t(r);s==null||(i=s.invalidate)===null||i===void 0||i.call(s,e),e.atomValues.delete(r),e.nonvalidatedAtoms.set(r,o),e.dirtyAtoms.add(r)}else jh(`Unknown action ${n.type}`)}function lEe(t,e,n){n.state==="hasValue"&&n.contents instanceof Cje?t.atomValues.delete(e):t.atomValues.set(e,n),t.dirtyAtoms.add(e),t.nonvalidatedAtoms.delete(e)}function y1t(t,e){t.replaceState(n=>{const i=_1t(n);for(const r of e)pyn(t,i,r);return x1t(t,i),dyn(),i})}function $ue(t,e){if(E9.length){const n=E9[E9.length-1];let i=n.get(t);i||n.set(t,i=[]),i.push(e)}else y1t(t,[e])}const E9=[];function gyn(){const t=new Map;return E9.push(t),()=>{for(const[n,i]of t)y1t(n,i);E9.pop()!==t&&jh("Incorrect order of batch popping")}}function _1t(t){return{...t,atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(t.dirtyAtoms)}}function x1t(t,e){const n=nyn(t,e,e.dirtyAtoms);for(const o of n){var i,r;(i=v1t(o))===null||i===void 0||(r=i.invalidate)===null||r===void 0||r.call(i,e)}}function w1t(t,e,n){$ue(t,{type:"set",recoilValue:e,valueOrUpdater:n})}function byn(t,e,n){if(n instanceof Cje)return w1t(t,e,n);$ue(t,{type:"setLoadable",recoilValue:e,loadable:n})}function vyn(t,e){$ue(t,{type:"markModified",recoilValue:e})}function yyn(t,e,n){$ue(t,{type:"setUnvalidated",recoilValue:e,unvalidatedValue:n})}function _yn(t,{key:e},n,i=null){const r=ryn(),o=t.getState();o.nodeToComponentSubscriptions.has(e)||o.nodeToComponentSubscriptions.set(e,new Map),Gl(o.nodeToComponentSubscriptions.get(e)).set(r,[i??"<not captured>",n]);const s=syn();if(s.early&&(s.mode==="LEGACY"||s.mode==="MUTABLE_SOURCE")){const a=t.getState().nextTree;a&&a.dirtyAtoms.has(e)&&n(a)}return{release:()=>{const a=t.getState(),l=a.nodeToComponentSubscriptions.get(e);if(l===void 0||!l.has(r)){jh(`Subscription missing at release time for atom ${e}. This is a bug in Recoil.`);return}l.delete(r),l.size===0&&a.nodeToComponentSubscriptions.delete(e)}}}function xyn(t,e){var n;const{currentTree:i}=t.getState(),r=oyn(e.key);(n=r.clearCache)===null||n===void 0||n.call(r,t,i)}var Cw={RecoilValueReadOnly:cyn,AbstractRecoilValue:ayn,RecoilState:lyn,getRecoilValueAsLoadable:hyn,setRecoilValue:w1t,setRecoilValueLoadable:byn,markRecoilValueModified:vyn,setUnvalidatedRecoilValue:yyn,subscribeToRecoilValue:_yn,isRecoilValue:uyn,applyAtomValueWrites:fyn,batchStart:gyn,writeLoadableToTreeState:lEe,invalidateDownstreams:x1t,copyTreeState:_1t,refreshRecoilValue:xyn};function wyn(t,e,n){const i=t.entries();let r=i.next();for(;!r.done;){const o=r.value;if(e.call(n,o[1],o[0],t))return!0;r=i.next()}return!1}var Cyn=wyn;const{cleanUpNode:Syn}=Bk,{deleteNodeConfigIfPossible:Nyn,getNode:C1t}=Yp,{RetentionZone:S1t}=Fue,Eyn=12e4,N1t=new Set;function E1t(t,e){const n=t.getState(),i=n.currentTree;if(n.nextTree){jh("releaseNodesNowOnCurrentTree should only be called at the end of a batch");return}const r=new Set;for(const s of e)if(s instanceof S1t)for(const a of Lyn(n,s))r.add(a);else r.add(s);const o=Dyn(t,r);for(const s of o)Myn(t,i,s)}function Dyn(t,e){const n=t.getState(),i=n.currentTree,r=t.getGraph(i.version),o=new Set,s=new Set;return a(e),o;function a(l){const c=new Set,u=kyn(t,i,l,o,s);for(const m of u){var d;if(C1t(m).retainedBy==="recoilRoot"){s.add(m);continue}if(((d=n.retention.referenceCounts.get(m))!==null&&d!==void 0?d:0)>0){s.add(m);continue}if(D1t(m).some(g=>n.retention.referenceCounts.get(g))){s.add(m);continue}const p=r.nodeToNodeSubscriptions.get(m);if(p&&Cyn(p,g=>s.has(g))){s.add(m);continue}o.add(m),c.add(m)}const h=new Set;for(const m of c)for(const p of(f=r.nodeDeps.get(m))!==null&&f!==void 0?f:N1t){var f;o.has(p)||h.add(p)}h.size&&a(h)}}function kyn(t,e,n,i,r){const o=t.getGraph(e.version),s=[],a=new Set;for(;n.size>0;)l(Gl(n.values().next().value));return s;function l(c){if(i.has(c)||r.has(c)){n.delete(c);return}if(a.has(c))return;const u=o.nodeToNodeSubscriptions.get(c);if(u)for(const d of u)l(d);a.add(c),n.delete(c),s.push(c)}}function Myn(t,e,n){if(!dl("recoil_memory_managament_2020"))return;Syn(t,n);const i=t.getState();i.knownAtoms.delete(n),i.knownSelectors.delete(n),i.nodeTransactionSubscriptions.delete(n),i.retention.referenceCounts.delete(n);const r=D1t(n);for(const l of r){var o;(o=i.retention.nodesRetainedByZone.get(l))===null||o===void 0||o.delete(n)}e.atomValues.delete(n),e.dirtyAtoms.delete(n),e.nonvalidatedAtoms.delete(n);const s=i.graphsByVersion.get(e.version);if(s){const l=s.nodeDeps.get(n);if(l!==void 0){s.nodeDeps.delete(n);for(const c of l){var a;(a=s.nodeToNodeSubscriptions.get(c))===null||a===void 0||a.delete(n)}}s.nodeToNodeSubscriptions.delete(n)}Nyn(n)}function Lyn(t,e){var n;return(n=t.retention.nodesRetainedByZone.get(e))!==null&&n!==void 0?n:N1t}function D1t(t){const e=C1t(t).retainedBy;return e===void 0||e==="components"||e==="recoilRoot"?[]:e instanceof S1t?[e]:e}function Tyn(t,e){const n=t.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(e):E1t(t,new Set([e]))}function Iyn(t,e,n){var i;if(!dl("recoil_memory_managament_2020"))return;const r=t.getState().retention.referenceCounts,o=((i=r.get(e))!==null&&i!==void 0?i:0)+n;o===0?k1t(t,e):r.set(e,o)}function k1t(t,e){if(!dl("recoil_memory_managament_2020"))return;t.getState().retention.referenceCounts.delete(e),Tyn(t,e)}function Ayn(t){if(!dl("recoil_memory_managament_2020"))return;const e=t.getState();E1t(t,e.retention.retainablesToCheckForRelease),e.retention.retainablesToCheckForRelease.clear()}function Ryn(t){return t===void 0?"recoilRoot":t}var MA={SUSPENSE_TIMEOUT_MS:Eyn,updateRetainCount:Iyn,updateRetainCountToZero:k1t,releaseScheduledRetainablesNow:Ayn,retainedByOptionWithDefault:Ryn};const{unstable_batchedUpdates:Pyn}=sv;var Oyn={unstable_batchedUpdates:Pyn};const{unstable_batchedUpdates:jyn}=Oyn;var Fyn={unstable_batchedUpdates:jyn};const{batchStart:$yn}=Cw,{unstable_batchedUpdates:Vyn}=Fyn;let Sje=Vyn||(t=>t());const Byn=t=>{Sje=t},zyn=()=>Sje,Hyn=t=>{Sje(()=>{let e=()=>{};try{e=$yn(),t()}finally{e()}})};var Vue={getBatcher:zyn,setBatcher:Byn,batchUpdates:Hyn};function*Wyn(t){for(const e of t)for(const n of e)yield n}var M1t=Wyn;const L1t=typeof Window>"u"||typeof window>"u",Uyn=t=>!L1t&&(t===window||t instanceof Window),Kyn=typeof navigator<"u"&&navigator.product==="ReactNative";var _K={isSSR:L1t,isReactNative:Kyn,isWindow:Uyn};function qyn(t,e){let n;return(...i)=>{n||(n={});const r=e(...i);return Object.hasOwnProperty.call(n,r)||(n[r]=t(...i)),n[r]}}function Gyn(t,e){let n,i;return(...r)=>{const o=e(...r);return n===o||(n=o,i=t(...r)),i}}function Yyn(t,e){let n,i;return[(...s)=>{const a=e(...s);return n===a||(n=a,i=t(...s)),i},()=>{n=null}]}var Xyn={memoizeWithArgsHash:qyn,memoizeOneWithArgsHash:Gyn,memoizeOneWithArgsHashAndInvalidation:Yyn};const{batchUpdates:cEe}=Vue,{initializeNode:Zyn,peekNodeInfo:Qyn}=Bk,{graph:Jyn}=vK,{getNextStoreID:e0n}=jue,{DEFAULT_VALUE:t0n,recoilValues:xQe,recoilValuesForKeys:wQe}=Yp,{AbstractRecoilValue:n0n,getRecoilValueAsLoadable:i0n,setRecoilValue:CQe,setUnvalidatedRecoilValue:r0n}=Cw,{updateRetainCount:mee}=MA,{setInvalidateMemoizedSnapshot:o0n}=g1t,{getNextTreeStateVersion:s0n,makeEmptyStoreState:a0n}=c1t,{isSSR:l0n}=_K,{memoizeOneWithArgsHashAndInvalidation:c0n}=Xyn,u0n=`
Recoil Snapshots only last for the duration of the callback they are provided to. To keep a Snapshot longer, do this:

  const release = snapshot.retain();
  try {
    await doSomethingWithSnapshot(snapshot);
  } finally {
    release();
  }

This is currently a DEV-only warning but will become a thrown exception in the next release of Recoil.
`;class Bue{constructor(e,n){Po(this,"_store",void 0),Po(this,"_refCount",1),Po(this,"getLoadable",i=>(this.checkRefCount_INTERNAL(),i0n(this._store,i))),Po(this,"getPromise",i=>(this.checkRefCount_INTERNAL(),this.getLoadable(i).toPromise())),Po(this,"getNodes_UNSTABLE",i=>{if(this.checkRefCount_INTERNAL(),(i==null?void 0:i.isModified)===!0){if((i==null?void 0:i.isInitialized)===!1)return[];const s=this._store.getState().currentTree;return wQe(s.dirtyAtoms)}const r=this._store.getState().knownAtoms,o=this._store.getState().knownSelectors;return(i==null?void 0:i.isInitialized)==null?xQe.values():i.isInitialized===!0?wQe(M1t([r,o])):xje(xQe.values(),({key:s})=>!r.has(s)&&!o.has(s))}),Po(this,"getInfo_UNSTABLE",({key:i})=>(this.checkRefCount_INTERNAL(),Qyn(this._store,this._store.getState().currentTree,i))),Po(this,"map",i=>{this.checkRefCount_INTERNAL();const r=new uEe(this,cEe);return i(r),r}),Po(this,"asyncMap",async i=>{this.checkRefCount_INTERNAL();const r=new uEe(this,cEe);return r.retain(),await i(r),r.autoRelease_INTERNAL(),r}),this._store={storeID:e0n(),parentStoreID:n,getState:()=>e,replaceState:i=>{e.currentTree=i(e.currentTree)},getGraph:i=>{const r=e.graphsByVersion;if(r.has(i))return Gl(r.get(i));const o=Jyn();return r.set(i,o),o},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw xo("Cannot subscribe to Snapshots")}};for(const i of this._store.getState().knownAtoms)Zyn(this._store,i,"get"),mee(this._store,i,1);this.autoRelease_INTERNAL()}retain(){if(this._refCount<=0)throw xo("Snapshot has already been released.");this._refCount++;let e=!1;return()=>{e||(e=!0,this._release())}}autoRelease_INTERNAL(){l0n||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(e=>e()),this._store.getState().nodeCleanupFunctions.clear(),!dl("recoil_memory_managament_2020"))return}else this._refCount<0&&jh("Snapshot released an extra time.")}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){dl("recoil_memory_managament_2020")&&this._refCount<=0&&jh(u0n)}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function T1t(t,e,n=!1){const i=t.getState(),r=n?s0n():e.version;return{currentTree:{version:n?r:e.version,stateID:n?r:e.stateID,transactionMetadata:{...e.transactionMetadata},dirtyAtoms:new Set(e.dirtyAtoms),atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(i.knownAtoms),knownSelectors:new Set(i.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(r,t.getGraph(e.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(Oue(i.nodeCleanupFunctions.entries(),([o])=>[o,()=>{}]))}}function d0n(t){const e=new Bue(a0n());return t!=null?e.map(t):e}const[SQe,I1t]=c0n((t,e)=>{var n;const i=t.getState(),r=e==="latest"?(n=i.nextTree)!==null&&n!==void 0?n:i.currentTree:Gl(i.previousTree);return new Bue(T1t(t,r),t.storeID)},(t,e)=>{var n,i;return String(e)+String(t.storeID)+String((n=t.getState().nextTree)===null||n===void 0?void 0:n.version)+String(t.getState().currentTree.version)+String((i=t.getState().previousTree)===null||i===void 0?void 0:i.version)});o0n(I1t);function h0n(t,e="latest"){const n=SQe(t,e);return n.isRetained()?n:(I1t(),SQe(t,e))}class uEe extends Bue{constructor(e,n){super(T1t(e.getStore_INTERNAL(),e.getStore_INTERNAL().getState().currentTree,!0),e.getStoreID()),Po(this,"_batch",void 0),Po(this,"set",(i,r)=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();this._batch(()=>{mee(o,i.key,1),CQe(this.getStore_INTERNAL(),i,r)})}),Po(this,"reset",i=>{this.checkRefCount_INTERNAL();const r=this.getStore_INTERNAL();this._batch(()=>{mee(r,i.key,1),CQe(this.getStore_INTERNAL(),i,t0n)})}),Po(this,"setUnvalidatedAtomValues_DEPRECATED",i=>{this.checkRefCount_INTERNAL();const r=this.getStore_INTERNAL();cEe(()=>{for(const[o,s]of i.entries())mee(r,o,1),r0n(r,new n0n(o),s)})}),this._batch=n}}var zue={Snapshot:Bue,MutableSnapshot:uEe,freshSnapshot:d0n,cloneSnapshot:h0n},f0n=zue.Snapshot,m0n=zue.MutableSnapshot,p0n=zue.freshSnapshot,g0n=zue.cloneSnapshot,Hue=Object.freeze({__proto__:null,Snapshot:f0n,MutableSnapshot:m0n,freshSnapshot:p0n,cloneSnapshot:g0n});function b0n(...t){const e=new Set;for(const n of t)for(const i of n)e.add(i);return e}var v0n=b0n;const{useRef:y0n}=Z;function _0n(t){const e=y0n(t);return e.current===t&&typeof t=="function"&&(e.current=t()),e}var NQe=_0n;const{getNextTreeStateVersion:x0n,makeEmptyStoreState:A1t}=c1t,{cleanUpNode:w0n,getDownstreamNodes:C0n,initializeNode:S0n,setNodeValue:N0n,setUnvalidatedAtomValue_DEPRECATED:E0n}=Bk,{graph:D0n}=vK,{cloneGraph:k0n}=vK,{getNextStoreID:R1t}=jue,{createMutableSource:p_e,reactMode:P1t}=OF,{applyAtomValueWrites:M0n}=Cw,{releaseScheduledRetainablesNow:O1t}=MA,{freshSnapshot:L0n}=Hue,{useCallback:T0n,useContext:j1t,useEffect:dEe,useMemo:I0n,useRef:A0n,useState:R0n}=Z;function gV(){throw xo("This component must be used inside a <RecoilRoot> component.")}const F1t=Object.freeze({storeID:R1t(),getState:gV,replaceState:gV,getGraph:gV,subscribeToTransactions:gV,addTransactionMetadata:gV});let hEe=!1;function EQe(t){if(hEe)throw xo("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const e=t.getState();if(e.nextTree===null){dl("recoil_memory_managament_2020")&&dl("recoil_release_on_cascading_update_killswitch_2021")&&e.commitDepth>0&&O1t(t);const n=e.currentTree.version,i=x0n();e.nextTree={...e.currentTree,version:i,stateID:i,dirtyAtoms:new Set,transactionMetadata:{}},e.graphsByVersion.set(i,k0n(Gl(e.graphsByVersion.get(n))))}}const $1t=Z.createContext({current:F1t}),Wue=()=>j1t($1t),V1t=Z.createContext(null);function P0n(){const t=j1t(V1t);return t==null&&Pue("Attempted to use a Recoil hook outside of a <RecoilRoot>. <RecoilRoot> must be an ancestor of any component that uses Recoil hooks."),t}function Nje(t,e,n){const i=C0n(t,n,n.dirtyAtoms);for(const r of i){const o=e.nodeToComponentSubscriptions.get(r);if(o)for(const[s,[a,l]]of o)l(n)}}function B1t(t){const e=t.getState(),n=e.currentTree,i=n.dirtyAtoms;if(i.size){for(const[r,o]of e.nodeTransactionSubscriptions)if(i.has(r))for(const[s,a]of o)a(t);for(const[r,o]of e.transactionSubscriptions)o(t);(!P1t().early||e.suspendedComponentResolvers.size>0)&&(Nje(t,e,n),e.suspendedComponentResolvers.forEach(r=>r()),e.suspendedComponentResolvers.clear())}e.queuedComponentCallbacks_DEPRECATED.forEach(r=>r(n)),e.queuedComponentCallbacks_DEPRECATED.splice(0,e.queuedComponentCallbacks_DEPRECATED.length)}function O0n(t){const e=t.getState();e.commitDepth++;try{const{nextTree:n}=e;if(n==null)return;e.previousTree=e.currentTree,e.currentTree=n,e.nextTree=null,B1t(t),e.previousTree!=null?e.graphsByVersion.delete(e.previousTree.version):jh("Ended batch with no previous state, which is unexpected","recoil"),e.previousTree=null,dl("recoil_memory_managament_2020")&&n==null&&O1t(t)}finally{e.commitDepth--}}function j0n({setNotifyBatcherOfChange:t}){const e=Wue(),[,n]=R0n([]);return t(()=>n({})),dEe(()=>(t(()=>n({})),()=>{t(()=>{})}),[t]),dEe(()=>{mvn.enqueueExecution("Batcher",()=>{O0n(e.current)})}),null}typeof window<"u"&&!window.$recoilDebugStates&&(window.$recoilDebugStates=[]);function F0n(t,e){const n=A1t();return e({set:(i,r)=>{const o=n.currentTree,s=N0n(t,o,i.key,r),a=new Set(s.keys()),l=o.nonvalidatedAtoms.clone();for(const c of a)l.delete(c);n.currentTree={...o,dirtyAtoms:v0n(o.dirtyAtoms,a),atomValues:M0n(o.atomValues,s),nonvalidatedAtoms:l}},setUnvalidatedAtomValues:i=>{i.forEach((r,o)=>{n.currentTree=E0n(n.currentTree,o,r)})}}),n}function $0n(t){const e=L0n(t),n=e.getStore_INTERNAL().getState();return e.retain(),n.nodeCleanupFunctions.forEach(i=>i()),n.nodeCleanupFunctions.clear(),n}let DQe=0;function V0n({initializeState_DEPRECATED:t,initializeState:e,store_INTERNAL:n,children:i}){let r;const o=f=>{const m=r.current.graphsByVersion;if(m.has(f))return Gl(m.get(f));const p=D0n();return m.set(f,p),p},s=(f,m)=>{if(m==null){const{transactionSubscriptions:p}=d.current.getState(),g=DQe++;return p.set(g,f),{release:()=>{p.delete(g)}}}else{const{nodeTransactionSubscriptions:p}=d.current.getState();p.has(m)||p.set(m,new Map);const g=DQe++;return Gl(p.get(m)).set(g,f),{release:()=>{const y=p.get(m);y&&(y.delete(g),y.size===0&&p.delete(m))}}}},a=f=>{EQe(d.current);for(const m of Object.keys(f))Gl(d.current.getState().nextTree).transactionMetadata[m]=f[m]},l=f=>{EQe(d.current);const m=Gl(r.current.nextTree);let p;try{hEe=!0,p=f(m)}finally{hEe=!1}p!==m&&(typeof window<"u"&&window.$recoilDebugStates.push(p),r.current.nextTree=p,P1t().early&&Nje(d.current,r.current,p),Gl(c.current)())},c=A0n(null),u=T0n(f=>{c.current=f},[c]),d=NQe(()=>n??{storeID:R1t(),getState:()=>r.current,replaceState:l,getGraph:o,subscribeToTransactions:s,addTransactionMetadata:a});n!=null&&(d.current=n),r=NQe(()=>t!=null?F0n(d.current,t):e!=null?$0n(e):A1t());const h=I0n(()=>p_e==null?void 0:p_e(r,()=>r.current.currentTree.version),[r]);return dEe(()=>{const f=d.current;for(const m of new Set(f.getState().knownAtoms))S0n(f,m,"get");return()=>{for(const m of f.getState().knownAtoms)w0n(f,m)}},[d]),Z.createElement($1t.Provider,{value:d},Z.createElement(V1t.Provider,{value:h},Z.createElement(j0n,{setNotifyBatcherOfChange:u}),i))}function B0n(t){const{override:e,...n}=t,i=Wue();return e===!1&&i.current!==F1t?t.children:Z.createElement(V0n,n)}function z0n(){return Wue().current.storeID}var LS={RecoilRoot:B0n,useStoreRef:Wue,useRecoilMutableSource:P0n,useRecoilStoreID:z0n,notifyComponents_FOR_TESTING:Nje,sendEndOfBatchNotifications_FOR_TESTING:B1t};function H0n(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0,i=t.length;n<i;n++)if(t[n]!==e[n])return!1;return!0}var W0n=H0n;const{useEffect:U0n,useRef:K0n}=Z;function q0n(t){const e=K0n();return U0n(()=>{e.current=t}),e.current}var z1t=q0n;const{useStoreRef:G0n}=LS,{SUSPENSE_TIMEOUT_MS:Y0n}=MA,{updateRetainCount:bV}=MA,{RetentionZone:X0n}=Fue,{useEffect:Z0n,useRef:Q0n}=Z,{isSSR:kQe}=_K;function J0n(t){if(dl("recoil_memory_managament_2020"))return e_n(t)}function e_n(t){const n=(Array.isArray(t)?t:[t]).map(s=>s instanceof X0n?s:s.key),i=G0n();Z0n(()=>{if(!dl("recoil_memory_managament_2020"))return;const s=i.current;if(r.current&&!kQe)window.clearTimeout(r.current),r.current=null;else for(const a of n)bV(s,a,1);return()=>{for(const a of n)bV(s,a,-1)}},[i,...n]);const r=Q0n(),o=z1t(n);if(!kQe&&(o===void 0||!W0n(o,n))){const s=i.current;for(const a of n)bV(s,a,1);if(o)for(const a of o)bV(s,a,-1);r.current&&window.clearTimeout(r.current),r.current=window.setTimeout(()=>{r.current=null;for(const a of n)bV(s,a,-1)},Y0n)}}var Eje=J0n;function t_n(){return"<component name not available>"}var xK=t_n;const{batchUpdates:n_n}=Vue,{DEFAULT_VALUE:H1t}=Yp,{currentRendererSupportsUseSyncExternalStore:i_n,reactMode:LA,useMutableSource:r_n,useSyncExternalStore:o_n}=OF,{useRecoilMutableSource:s_n,useStoreRef:Sw}=LS,{isRecoilValue:a_n}=C2,{AbstractRecoilValue:fEe,getRecoilValueAsLoadable:wK,setRecoilValue:wne,setUnvalidatedRecoilValue:l_n,subscribeToRecoilValue:Nj}=Cw,{useCallback:Ep,useEffect:Ej,useMemo:W1t,useRef:D9,useState:Dje}=Z,{setByAddingToSet:c_n}=d1t,{isSSR:u_n}=_K;function kje(t,e,n){if(t.state==="hasValue")return t.contents;throw t.state==="loading"?new Promise(r=>{const o=n.current.getState().suspendedComponentResolvers;o.add(r),u_n&&ul(t.contents)&&t.contents.finally(()=>{o.delete(r)})}):t.state==="hasError"?t.contents:xo(`Invalid value of loadable atom "${e.key}"`)}function am(t,e){if(!a_n(t))throw xo(`Invalid argument to ${e}: expected an atom or selector but got ${String(t)}`)}function d_n(){const t=xK(),e=Sw(),[,n]=Dje([]),i=D9(new Set);i.current=new Set;const r=D9(new Set),o=D9(new Map),s=Ep(l=>{const c=o.current.get(l);c&&(c.release(),o.current.delete(l))},[o]),a=Ep((l,c)=>{o.current.has(c)&&n([])},[]);return Ej(()=>{const l=e.current;N9(i.current,r.current).forEach(c=>{if(o.current.has(c)){Pue(`Double subscription to RecoilValue "${c}"`);return}const u=Nj(l,new fEe(c),h=>a(h,c),t);o.current.set(c,u),l.getState().nextTree?l.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{a(l.getState(),c)}):a(l.getState(),c)}),N9(r.current,i.current).forEach(c=>{s(c)}),r.current=i.current}),Ej(()=>{const l=o.current;return N9(i.current,new Set(l.keys())).forEach(c=>{const u=Nj(e.current,new fEe(c),d=>a(d,c),t);l.set(c,u)}),()=>l.forEach((c,u)=>s(u))},[t,e,s,a]),W1t(()=>{function l(m){return am(m,"useSetRecoilState"),p=>{wne(e.current,m,p)}}function c(m){return am(m,"useResetRecoilState"),()=>wne(e.current,m,H1t)}function u(m){var p;am(m,"useRecoilValueLoadable"),i.current.has(m.key)||(i.current=c_n(i.current,m.key));const g=e.current.getState();return wK(e.current,m,LA().early&&(p=g.nextTree)!==null&&p!==void 0?p:g.currentTree)}function d(m){am(m,"useRecoilValue");const p=u(m);return kje(p,m,e)}function h(m){return am(m,"useRecoilState"),[d(m),l(m)]}function f(m){return am(m,"useRecoilStateLoadable"),[u(m),l(m)]}return{getRecoilValue:d,getRecoilValueLoadable:u,getRecoilState:h,getRecoilStateLoadable:f,getSetRecoilState:l,getResetRecoilState:c}},[i,e])}const CK={current:0};function h_n(t){const e=Sw(),n=xK(),i=Ep(()=>{var a;CK.current++;const l=e.current,c=l.getState(),u=LA().early&&(a=c.nextTree)!==null&&a!==void 0?a:c.currentTree;return{loadable:wK(l,t,u),key:t.key}},[e,t]),r=Ep(a=>{let l;return()=>{var c,u;const d=a();return(c=l)!==null&&c!==void 0&&c.loadable.is(d.loadable)&&((u=l)===null||u===void 0?void 0:u.key)===d.key?l:(l=d,d)}},[]),o=W1t(()=>r(i),[i,r]),s=Ep(a=>{const l=e.current;return Nj(l,t,a,n).release},[e,t,n]);return o_n(s,o,o).loadable}function f_n(t){const e=Sw(),n=Ep(()=>{var c;const u=e.current,d=u.getState(),h=LA().early&&(c=d.nextTree)!==null&&c!==void 0?c:d.currentTree;return wK(u,t,h)},[e,t]),i=Ep(()=>(CK.current++,n()),[n]),r=xK(),o=Ep((c,u)=>{const d=e.current;return Nj(d,t,()=>{if(!dl("recoil_suppress_rerender_in_callback"))return u();const f=n();l.current.is(f)||u(),l.current=f},r).release},[e,t,r,n]),s=s_n();if(s==null)throw xo("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const a=r_n(s,i,o),l=D9(a);return Ej(()=>{l.current=a}),a}function mEe(t){const e=Sw(),n=xK(),i=Ep(()=>{var l;CK.current++;const c=e.current,u=c.getState(),d=LA().early&&(l=u.nextTree)!==null&&l!==void 0?l:u.currentTree;return wK(c,t,d)},[e,t]),r=Ep(()=>({loadable:i(),key:t.key}),[i,t.key]),o=Ep(l=>{const c=r();return l.loadable.is(c.loadable)&&l.key===c.key?l:c},[r]);Ej(()=>{const l=Nj(e.current,t,c=>{a(o)},n);return a(o),l.release},[n,t,e,o]);const[s,a]=Dje(r);return s.key!==t.key?r().loadable:s.loadable}function m_n(t){const e=Sw(),[,n]=Dje([]),i=xK(),r=Ep(()=>{var a;CK.current++;const l=e.current,c=l.getState(),u=LA().early&&(a=c.nextTree)!==null&&a!==void 0?a:c.currentTree;return wK(l,t,u)},[e,t]),o=r(),s=D9(o);return Ej(()=>{s.current=o}),Ej(()=>{const a=e.current,l=a.getState(),c=Nj(a,t,d=>{var h;if(!dl("recoil_suppress_rerender_in_callback"))return n([]);const f=r();(h=s.current)!==null&&h!==void 0&&h.is(f)||n(f),s.current=f},i);if(l.nextTree)a.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{s.current=null,n([])});else{var u;if(!dl("recoil_suppress_rerender_in_callback"))return n([]);const d=r();(u=s.current)!==null&&u!==void 0&&u.is(d)||n(d),s.current=d}return c.release},[i,r,t,e]),o}function Mje(t){return am(t,"useRecoilValueLoadable"),dl("recoil_memory_managament_2020")&&Eje(t),{TRANSITION_SUPPORT:mEe,SYNC_EXTERNAL_STORE:i_n()?h_n:mEe,MUTABLE_SOURCE:f_n,LEGACY:m_n}[LA().mode](t)}function U1t(t){am(t,"useRecoilValue");const e=Sw(),n=Mje(t);return kje(n,t,e)}function Uue(t){am(t,"useSetRecoilState");const e=Sw();return Ep(n=>{wne(e.current,t,n)},[e,t])}function p_n(t){am(t,"useResetRecoilState");const e=Sw();return Ep(()=>{wne(e.current,t,H1t)},[e,t])}function g_n(t){return am(t,"useRecoilState"),[U1t(t),Uue(t)]}function b_n(t){return am(t,"useRecoilStateLoadable"),[Mje(t),Uue(t)]}function v_n(){const t=Sw();return(e,n={})=>{n_n(()=>{t.current.addTransactionMetadata(n),e.forEach((i,r)=>l_n(t.current,new fEe(r),i))})}}function K1t(t){return am(t,"useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE"),LA().early||jh("Attepmt to use a hook with UNSTABLE_TRANSITION_SUPPORT in a rendering mode incompatible with concurrent rendering.  Try enabling the recoil_sync_external_store or recoil_transition_support GKs."),dl("recoil_memory_managament_2020")&&Eje(t),mEe(t)}function q1t(t){am(t,"useRecoilValue_TRANSITION_SUPPORT_UNSTABLE");const e=Sw(),n=K1t(t);return kje(n,t,e)}function y_n(t){return am(t,"useRecoilState_TRANSITION_SUPPORT_UNSTABLE"),[q1t(t),Uue(t)]}var __n={recoilComponentGetRecoilValueCount_FOR_TESTING:CK,useRecoilInterface:d_n,useRecoilState:g_n,useRecoilStateLoadable:b_n,useRecoilValue:U1t,useRecoilValueLoadable:Mje,useResetRecoilState:p_n,useSetRecoilState:Uue,useSetUnvalidatedAtomValues:v_n,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:K1t,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:q1t,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:y_n};function x_n(t,e){const n=new Map;for(const[i,r]of t)e(r,i)&&n.set(i,r);return n}var w_n=x_n;function C_n(t,e){const n=new Set;for(const i of t)e(i)&&n.add(i);return n}var S_n=C_n;function N_n(...t){const e=new Map;for(let n=0;n<t.length;n++){const i=t[n].keys();let r;for(;!(r=i.next()).done;)e.set(r.value,t[n].get(r.value))}return e}var E_n=N_n;const{batchUpdates:D_n}=Vue,{DEFAULT_VALUE:k_n,getNode:G1t,nodes:M_n}=Yp,{useStoreRef:Lje}=LS,{AbstractRecoilValue:L_n,setRecoilValueLoadable:T_n}=Cw,{SUSPENSE_TIMEOUT_MS:I_n}=MA,{cloneSnapshot:Cne}=Hue,{useCallback:Kue,useEffect:Y1t,useRef:MQe,useState:A_n}=Z,{isSSR:LQe}=_K;function que(t){const e=Lje();Y1t(()=>e.current.subscribeToTransactions(t).release,[t,e])}function TQe(t){const e=t.atomValues.toMap(),n=xne(w_n(e,(i,r)=>{const s=G1t(r).persistence_UNSTABLE;return s!=null&&s.type!=="none"&&i.state==="hasValue"}),i=>i.contents);return E_n(t.nonvalidatedAtoms.toMap(),n)}function R_n(t){que(Kue(e=>{let n=e.getState().previousTree;const i=e.getState().currentTree;n||(jh("Transaction subscribers notified without a previous tree being present -- this is a bug in Recoil"),n=e.getState().currentTree);const r=TQe(i),o=TQe(n),s=xne(M_n,l=>{var c,u,d,h;return{persistence_UNSTABLE:{type:(c=(u=l.persistence_UNSTABLE)===null||u===void 0?void 0:u.type)!==null&&c!==void 0?c:"none",backButton:(d=(h=l.persistence_UNSTABLE)===null||h===void 0?void 0:h.backButton)!==null&&d!==void 0?d:!1}}}),a=S_n(i.dirtyAtoms,l=>r.has(l)||o.has(l));t({atomValues:r,previousAtomValues:o,atomInfo:s,modifiedAtoms:a,transactionMetadata:{...i.transactionMetadata}})},[t]))}function P_n(t){que(Kue(e=>{const n=Cne(e,"latest"),i=Cne(e,"previous");t({snapshot:n,previousSnapshot:i})},[t]))}function O_n(){const t=Lje(),[e,n]=A_n(()=>Cne(t.current)),i=z1t(e),r=MQe(),o=MQe();if(que(Kue(a=>n(Cne(a)),[])),Y1t(()=>{const a=e.retain();if(r.current&&!LQe){var l;window.clearTimeout(r.current),r.current=null,(l=o.current)===null||l===void 0||l.call(o),o.current=null}return()=>{window.setTimeout(a,10)}},[e]),i!==e&&!LQe){if(r.current){var s;window.clearTimeout(r.current),r.current=null,(s=o.current)===null||s===void 0||s.call(o),o.current=null}o.current=e.retain(),r.current=window.setTimeout(()=>{var a;r.current=null,(a=o.current)===null||a===void 0||a.call(o),o.current=null},I_n)}return e}function X1t(t,e){var n;const i=t.getState(),r=(n=i.nextTree)!==null&&n!==void 0?n:i.currentTree,o=e.getStore_INTERNAL().getState().currentTree;D_n(()=>{const s=new Set;for(const c of[r.atomValues.keys(),o.atomValues.keys()])for(const u of c){var a,l;((a=r.atomValues.get(u))===null||a===void 0?void 0:a.contents)!==((l=o.atomValues.get(u))===null||l===void 0?void 0:l.contents)&&G1t(u).shouldRestoreFromSnapshots&&s.add(u)}s.forEach(c=>{T_n(t,new L_n(c),o.atomValues.has(c)?Gl(o.atomValues.get(c)):k_n)}),t.replaceState(c=>({...c,stateID:e.getID()}))})}function j_n(){const t=Lje();return Kue(e=>X1t(t.current,e),[t])}var Z1t={useRecoilSnapshot:O_n,gotoSnapshot:X1t,useGotoRecoilSnapshot:j_n,useRecoilTransactionObserver:P_n,useTransactionObservation_DEPRECATED:R_n,useTransactionSubscription_DEPRECATED:que};const{peekNodeInfo:F_n}=Bk,{useStoreRef:$_n}=LS;function V_n(){const t=$_n();return({key:e})=>F_n(t.current,t.current.getState().currentTree,e)}var B_n=V_n;const{reactMode:z_n}=OF,{RecoilRoot:H_n,useStoreRef:W_n}=LS,{useMemo:U_n}=Z;function K_n(){z_n().mode==="MUTABLE_SOURCE"&&console.warn("Warning: There are known issues using useRecoilBridgeAcrossReactRoots() in recoil_mutable_source rendering mode.  Please consider upgrading to recoil_sync_external_store mode.");const t=W_n().current;return U_n(()=>{function e({children:n}){return Z.createElement(H_n,{store_INTERNAL:t},n)}return e},[t])}var q_n=K_n;const{loadableWithValue:G_n}=bK,{initializeNode:Y_n}=Bk,{DEFAULT_VALUE:X_n,getNode:Z_n}=Yp,{copyTreeState:Q_n,getRecoilValueAsLoadable:J_n,invalidateDownstreams:exn,writeLoadableToTreeState:txn}=Cw;function IQe(t){return Z_n(t.key).nodeType==="atom"}class nxn{constructor(e,n){Po(this,"_store",void 0),Po(this,"_treeState",void 0),Po(this,"_changes",void 0),Po(this,"get",i=>{if(this._changes.has(i.key))return this._changes.get(i.key);if(!IQe(i))throw xo("Reading selectors within atomicUpdate is not supported");const r=J_n(this._store,i,this._treeState);if(r.state==="hasValue")return r.contents;throw r.state==="hasError"?r.contents:xo(`Expected Recoil atom ${i.key} to have a value, but it is in a loading state.`)}),Po(this,"set",(i,r)=>{if(!IQe(i))throw xo("Setting selectors within atomicUpdate is not supported");if(typeof r=="function"){const o=this.get(i);this._changes.set(i.key,r(o))}else Y_n(this._store,i.key,"set"),this._changes.set(i.key,r)}),Po(this,"reset",i=>{this.set(i,X_n)}),this._store=e,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const e=Q_n(this._treeState);for(const[n,i]of this._changes)txn(e,n,G_n(i));return exn(this._store,e),e}}function ixn(t){return e=>{t.replaceState(n=>{const i=new nxn(t,n);return e(i),i.newTreeState_INTERNAL()})}}var rxn={atomicUpdater:ixn},oxn=rxn.atomicUpdater,Q1t=Object.freeze({__proto__:null,atomicUpdater:oxn});function sxn(t,e){if(!t)throw new Error(e)}var axn=sxn,P7=axn;const{atomicUpdater:lxn}=Q1t,{batchUpdates:cxn}=Vue,{DEFAULT_VALUE:uxn}=Yp,{useStoreRef:dxn}=LS,{refreshRecoilValue:hxn,setRecoilValue:AQe}=Cw,{cloneSnapshot:fxn}=Hue,{gotoSnapshot:mxn}=Z1t,{useCallback:pxn}=Z;class J1t{}const gxn=new J1t;function eCt(t,e,n,i){let r=gxn,o;if(cxn(()=>{const a="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create.  Please see the docs at recoiljs.org for details.";if(typeof e!="function")throw xo(a);const l=h1t({...i??{},set:(u,d)=>AQe(t,u,d),reset:u=>AQe(t,u,uxn),refresh:u=>hxn(t,u),gotoSnapshot:u=>mxn(t,u),transact_UNSTABLE:u=>lxn(t)(u)},{snapshot:()=>{const u=fxn(t);return o=u.retain(),u}}),c=e(l);if(typeof c!="function")throw xo(a);r=c(...n)}),r instanceof J1t&&P7(!1,"batchUpdates should return immediately"),ul(r))r=r.finally(()=>{var a;(a=o)===null||a===void 0||a()});else{var s;(s=o)===null||s===void 0||s()}return r}function bxn(t,e){const n=dxn();return pxn((...i)=>eCt(n.current,t,i),e!=null?[...e,n]:void 0)}var tCt={recoilCallback:eCt,useRecoilCallback:bxn};const{useStoreRef:vxn}=LS,{refreshRecoilValue:yxn}=Cw,{useCallback:_xn}=Z;function xxn(t){const e=vxn();return _xn(()=>{const n=e.current;yxn(n,t)},[t,e])}var wxn=xxn;const{atomicUpdater:Cxn}=Q1t,{useStoreRef:Sxn}=LS,{useMemo:Nxn}=Z;function Exn(t,e){const n=Sxn();return Nxn(()=>(...i)=>{Cxn(n.current)(o=>{t(o)(...i)})},e!=null?[...e,n]:void 0)}var Dxn=Exn;class kxn{constructor(e){Po(this,"value",void 0),this.value=e}}var Mxn={WrappedValue:kxn},Lxn=Mxn.WrappedValue,nCt=Object.freeze({__proto__:null,WrappedValue:Lxn});const{isFastRefreshEnabled:Txn}=OF;class RQe extends Error{}class Ixn{constructor(e){var n,i,r;Po(this,"_name",void 0),Po(this,"_numLeafs",void 0),Po(this,"_root",void 0),Po(this,"_onHit",void 0),Po(this,"_onSet",void 0),Po(this,"_mapNodeValue",void 0),this._name=e==null?void 0:e.name,this._numLeafs=0,this._root=null,this._onHit=(n=e==null?void 0:e.onHit)!==null&&n!==void 0?n:()=>{},this._onSet=(i=e==null?void 0:e.onSet)!==null&&i!==void 0?i:()=>{},this._mapNodeValue=(r=e==null?void 0:e.mapNodeValue)!==null&&r!==void 0?r:o=>o}size(){return this._numLeafs}root(){return this._root}get(e,n){var i;return(i=this.getLeafNode(e,n))===null||i===void 0?void 0:i.value}getLeafNode(e,n){if(this._root==null)return;let i=this._root;for(;i;){if(n==null||n.onNodeVisit(i),i.type==="leaf")return this._onHit(i),i;const r=this._mapNodeValue(e(i.nodeKey));i=i.branches.get(r)}}set(e,n,i){const r=()=>{var o,s,a,l;let c,u;for(const[g,y]of e){var d,h,f;const _=this._root;if((_==null?void 0:_.type)==="leaf")throw this.invalidCacheError();const w=c;if(c=w?w.branches.get(u):_,c=(d=c)!==null&&d!==void 0?d:{type:"branch",nodeKey:g,parent:w,branches:new Map,branchKey:u},c.type!=="branch"||c.nodeKey!==g)throw this.invalidCacheError();w==null||w.branches.set(u,c),i==null||(h=i.onNodeVisit)===null||h===void 0||h.call(i,c),u=this._mapNodeValue(y),this._root=(f=this._root)!==null&&f!==void 0?f:c}const m=c?(o=c)===null||o===void 0?void 0:o.branches.get(u):this._root;if(m!=null&&(m.type!=="leaf"||m.branchKey!==u))throw this.invalidCacheError();const p={type:"leaf",value:n,parent:c,branchKey:u};(s=c)===null||s===void 0||s.branches.set(u,p),this._root=(a=this._root)!==null&&a!==void 0?a:p,this._numLeafs++,this._onSet(p),i==null||(l=i.onNodeVisit)===null||l===void 0||l.call(i,p)};try{r()}catch(o){if(o instanceof RQe)this.clear(),r();else throw o}}delete(e){const n=this.root();if(!n)return!1;if(e===n)return this._root=null,this._numLeafs=0,!0;let i=e.parent,r=e.branchKey;for(;i;){var o;if(i.branches.delete(r),i===n)return i.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(i.branches.size>0)break;r=(o=i)===null||o===void 0?void 0:o.branchKey,i=i.parent}for(;i!==n;i=i.parent)if(i==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){const e=Txn()?"Possible Fast Refresh module reload detected.  This may also be caused by an selector returning inconsistent values. Resetting cache.":"Invalid cache values.  This happens when selectors do not return consistent values for the same input dependency values.  That may also be caused when using Fast Refresh to change a selector implementation.  Resetting cache.";throw jh(e+(this._name!=null?` - ${this._name}`:"")),new RQe}}var Axn={TreeCache:Ixn},Rxn=Axn.TreeCache,iCt=Object.freeze({__proto__:null,TreeCache:Rxn});let Pxn=class{constructor(e){var n;Po(this,"_maxSize",void 0),Po(this,"_size",void 0),Po(this,"_head",void 0),Po(this,"_tail",void 0),Po(this,"_map",void 0),Po(this,"_keyMapper",void 0),this._maxSize=e.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(n=e.mapKey)!==null&&n!==void 0?n:i=>i}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(e){return this._map.has(this._keyMapper(e))}get(e){const n=this._keyMapper(e),i=this._map.get(n);if(i)return this.set(e,i.value),i.value}set(e,n){const i=this._keyMapper(e);this._map.get(i)&&this.delete(e);const o=this.head(),s={key:e,right:o,left:null,value:n};o?o.left=s:this._tail=s,this._map.set(i,s),this._head=s,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const e=this.tail();e&&this.delete(e.key)}delete(e){const n=this._keyMapper(e);if(!this._size||!this._map.has(n))return;const i=Gl(this._map.get(n)),r=i.right,o=i.left;r&&(r.left=i.left),o&&(o.right=i.right),i===this.head()&&(this._head=r),i===this.tail()&&(this._tail=o),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}};var Oxn={LRUCache:Pxn},jxn=Oxn.LRUCache,rCt=Object.freeze({__proto__:null,LRUCache:jxn});const{LRUCache:Fxn}=rCt,{TreeCache:$xn}=iCt;function Vxn({name:t,maxSize:e,mapNodeValue:n=i=>i}){const i=new Fxn({maxSize:e}),r=new $xn({name:t,mapNodeValue:n,onHit:o=>{i.set(o,!0)},onSet:o=>{const s=i.tail();i.set(o,!0),s&&r.size()>e&&r.delete(s.key)}});return r}var PQe=Vxn;const Bxn=15;function Wb(t,e,n){if(typeof t=="string"&&!t.includes('"')&&!t.includes("\\"))return`"${t}"`;switch(typeof t){case"undefined":return"";case"boolean":return t?"true":"false";case"number":case"symbol":return String(t);case"string":return JSON.stringify(t);case"function":if((e==null?void 0:e.allowFunctions)!==!0)throw xo("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${t.name})__`}if(t===null)return"null";if(typeof t!="object"){var i;return(i=JSON.stringify(t))!==null&&i!==void 0?i:""}if(ul(t))return"__PROMISE__";if(Array.isArray(t))return`[${t.map((r,o)=>Wb(r,e,o.toString()))}]`;if(typeof t.toJSON=="function")return Wb(t.toJSON(n),e,n);if(t instanceof Map){const r={};for(const[o,s]of t)r[typeof o=="string"?o:Wb(o,e)]=s;return Wb(r,e,n)}return t instanceof Set?Wb(Array.from(t).sort((r,o)=>Wb(r,e).localeCompare(Wb(o,e))),e,n):Symbol!==void 0&&t[Symbol.iterator]!=null&&typeof t[Symbol.iterator]=="function"?Wb(Array.from(t),e,n):`{${Object.keys(t).filter(r=>t[r]!==void 0).sort().map(r=>`${Wb(r,e)}:${Wb(t[r],e,r)}`).join(",")}}`}function zxn(t,e={allowFunctions:!1}){if(typeof window<"u"){const n=window.performance?window.performance.now():0,i=Wb(t,e),r=window.performance?window.performance.now():0;return r-n>Bxn&&(console.groupCollapsed(`Recoil: Spent ${r-n}ms computing a cache key`),console.warn(t,i),console.groupEnd()),i}return Wb(t,e)}var Gue=zxn;const{TreeCache:Hxn}=iCt,aZ={equality:"reference",eviction:"keep-all",maxSize:1/0};function Wxn({equality:t=aZ.equality,eviction:e=aZ.eviction,maxSize:n=aZ.maxSize}=aZ,i){const r=Uxn(t);return Kxn(e,n,r,i)}function Uxn(t){switch(t){case"reference":return e=>e;case"value":return e=>Gue(e)}throw xo(`Unrecognized equality policy ${t}`)}function Kxn(t,e,n,i){switch(t){case"keep-all":return new Hxn({name:i,mapNodeValue:n});case"lru":return PQe({name:i,maxSize:Gl(e),mapNodeValue:n});case"most-recent":return PQe({name:i,maxSize:1,mapNodeValue:n})}throw xo(`Unrecognized eviction policy ${t}`)}var qxn=Wxn;function Gxn(t){var e,n;if(typeof window>"u")return!1;const r=(n=(t!=null?(e=t.ownerDocument)!==null&&e!==void 0?e:t:document).defaultView)!==null&&n!==void 0?n:window;return t!=null&&(typeof r.Node=="function"?t instanceof r.Node:typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")}var Yxn=Gxn;const{isReactNative:Xxn,isWindow:Zxn}=_K;function Qxn(t){if(t===null||typeof t!="object")return!0;switch(typeof t.$$typeof){case"symbol":return!0;case"number":return!0}return!!(t["@@__IMMUTABLE_ITERABLE__@@"]!=null||t["@@__IMMUTABLE_KEYED__@@"]!=null||t["@@__IMMUTABLE_INDEXED__@@"]!=null||t["@@__IMMUTABLE_ORDERED__@@"]!=null||t["@@__IMMUTABLE_RECORD__@@"]!=null||Yxn(t)||ul(t)||t instanceof Error||ArrayBuffer.isView(t)||!Xxn&&Zxn(t))}function oCt(t){if(!(typeof t!="object"||Qxn(t))){Object.freeze(t);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];typeof n=="object"&&n!=null&&!Object.isFrozen(n)&&oCt(n)}Object.seal(t)}}var pEe=oCt;function Jxn(t){return()=>null}var ewn={startPerfBlock:Jxn};const{isLoadable:twn,loadableWithError:lZ,loadableWithPromise:nwn,loadableWithValue:g_e}=bK,{WrappedValue:sCt}=nCt,{getNodeLoadable:cZ,peekNodeLoadable:iwn,setNodeValue:rwn}=Bk,{saveDepsToStore:own}=vK,{DEFAULT_VALUE:swn,getConfigDeletionHandler:awn,getNode:lwn,registerNode:OQe}=Yp,{isRecoilValue:cwn}=C2,{markRecoilValueModified:jQe}=Cw,{retainedByOptionWithDefault:uwn}=MA,{recoilCallback:dwn}=tCt,{startPerfBlock:hwn}=ewn;class aCt{}const vV=new aCt,yV=[],uZ=new Map,fwn=(()=>{let t=0;return()=>t++})();function lCt(t){let e=null;const{key:n,get:i,cachePolicy_UNSTABLE:r}=t,o=t.set!=null?t.set:void 0;{if(typeof n!="string")throw xo("A key option with a unique string value must be provided when creating a selector.");if(typeof i!="function")throw xo("Selectors must specify a get callback option to get the selector value.")}const s=new Set,a=qxn(r??{equality:"reference",eviction:"keep-all"},n),l=uwn(t.retainedBy_UNSTABLE),c=new Map;let u=0;function d(){return!dl("recoil_memory_managament_2020")||u>0}function h(q){return q.getState().knownSelectors.add(n),u++,()=>{u--}}function f(){return awn(n)!==void 0&&!d()}function m(q,U,Y,J,ae){F(U,J,ae),p(q,Y)}function p(q,U){O(q,U)&&P(q),y(U,!0)}function g(q,U){O(q,U)&&(Gl(T(q)).stateVersions.clear(),y(U,!1))}function y(q,U){const Y=uZ.get(q);if(Y!=null){for(const J of Y)jQe(J,Gl(e));U&&uZ.delete(q)}}function _(q,U){let Y=uZ.get(U);Y==null&&uZ.set(U,Y=new Set),Y.add(q)}function w(q,U,Y,J,ae,se){return U.then(oe=>{if(!d())throw P(q),vV;const fe=g_e(oe);return m(q,Y,ae,fe,J),oe}).catch(oe=>{if(!d())throw P(q),vV;if(ul(oe))return C(q,oe,Y,J,ae,se);const fe=lZ(oe);throw m(q,Y,ae,fe,J),oe})}function C(q,U,Y,J,ae,se){return U.then(oe=>{if(!d())throw P(q),vV;se.loadingDepKey!=null&&se.loadingDepPromise===U?Y.atomValues.set(se.loadingDepKey,g_e(oe)):q.getState().knownSelectors.forEach(Q=>{Y.atomValues.delete(Q)});const fe=D(q,Y);if(fe&&fe.state!=="loading"){if((O(q,ae)||T(q)==null)&&p(q,ae),fe.state==="hasValue")return fe.contents;throw fe.contents}if(!O(q,ae)){const Q=M(q,Y);if(Q!=null)return Q.loadingLoadable.contents}const[de,ie]=E(q,Y,ae);if(de.state!=="loading"&&m(q,Y,ae,de,ie),de.state==="hasError")throw de.contents;return de.contents}).catch(oe=>{if(oe instanceof aCt)throw vV;if(!d())throw P(q),vV;const fe=lZ(oe);throw m(q,Y,ae,fe,J),oe})}function N(q,U,Y,J){var ae,se,oe,fe;if(O(q,J)||U.version===((ae=q.getState())===null||ae===void 0||(se=ae.currentTree)===null||se===void 0?void 0:se.version)||U.version===((oe=q.getState())===null||oe===void 0||(fe=oe.nextTree)===null||fe===void 0?void 0:fe.version)){var de,ie,Q;own(n,Y,q,(de=(ie=q.getState())===null||ie===void 0||(Q=ie.nextTree)===null||Q===void 0?void 0:Q.version)!==null&&de!==void 0?de:q.getState().currentTree.version)}for(const be of Y)s.add(be)}function E(q,U,Y){const J=hwn(n);let ae=!0,se=!0;const oe=()=>{J(),se=!1};let fe,de=!1,ie;const Q={loadingDepKey:null,loadingDepPromise:null},be=new Map;function le({key:Le}){const Te=cZ(q,U,Le);switch(be.set(Le,Te),ae||(N(q,U,new Set(be.keys()),Y),g(q,Y)),Te.state){case"hasValue":return Te.contents;case"hasError":throw Te.contents;case"loading":throw Q.loadingDepKey=Le,Q.loadingDepPromise=Te.contents,Te.contents}throw xo("Invalid Loadable state")}const Ne=Le=>(...Te)=>{if(se)throw xo("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated.  It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return e==null&&P7(!1,"Recoil Value can never be null"),dwn(q,Le,Te,{node:e})};try{fe=i({get:le,getCallback:Ne}),fe=cwn(fe)?le(fe):fe,twn(fe)&&(fe.state==="hasError"&&(de=!0),fe=fe.contents),ul(fe)?fe=w(q,fe,U,be,Y,Q).finally(oe):oe(),fe=fe instanceof sCt?fe.value:fe}catch(Le){fe=Le,ul(fe)?fe=C(q,fe,U,be,Y,Q).finally(oe):(de=!0,oe())}return de?ie=lZ(fe):ul(fe)?ie=nwn(fe):ie=g_e(fe),ae=!1,R(q,Y,be),N(q,U,new Set(be.keys()),Y),[ie,be]}function D(q,U){let Y=U.atomValues.get(n);if(Y!=null)return Y;const J=new Set;try{Y=a.get(se=>(typeof se!="string"&&P7(!1,"Cache nodeKey is type string"),cZ(q,U,se).contents),{onNodeVisit:se=>{se.type==="branch"&&se.nodeKey!==n&&J.add(se.nodeKey)}})}catch(se){throw xo(`Problem with cache lookup for selector "${n}": ${se.message}`)}if(Y){var ae;U.atomValues.set(n,Y),N(q,U,J,(ae=T(q))===null||ae===void 0?void 0:ae.executionID)}return Y}function k(q,U){const Y=D(q,U);if(Y!=null)return P(q),Y;const J=M(q,U);if(J!=null){var ae;return((ae=J.loadingLoadable)===null||ae===void 0?void 0:ae.state)==="loading"&&_(q,J.executionID),J.loadingLoadable}const se=fwn(),[oe,fe]=E(q,U,se);return oe.state==="loading"?(A(q,se,oe,fe,U),_(q,se)):(P(q),F(U,oe,fe)),oe}function M(q,U){const Y=M1t([c.has(q)?[Gl(c.get(q))]:[],Oue(xje(c,([ae])=>ae!==q),([,ae])=>ae)]);function J(ae){for(const[se,oe]of ae)if(!cZ(q,U,se).is(oe))return!0;return!1}for(const ae of Y){if(ae.stateVersions.get(U.version)||!J(ae.depValuesDiscoveredSoFarDuringAsyncWork))return ae.stateVersions.set(U.version,!0),ae;ae.stateVersions.set(U.version,!1)}}function T(q){return c.get(q)}function A(q,U,Y,J,ae){c.set(q,{depValuesDiscoveredSoFarDuringAsyncWork:J,executionID:U,loadingLoadable:Y,stateVersions:new Map([[ae.version,!0]])})}function R(q,U,Y){if(O(q,U)){const J=T(q);J!=null&&(J.depValuesDiscoveredSoFarDuringAsyncWork=Y)}}function P(q){c.delete(q)}function O(q,U){var Y;return U===((Y=T(q))===null||Y===void 0?void 0:Y.executionID)}function V(q){return Array.from(q.entries()).map(([U,Y])=>[U,Y.contents])}function F(q,U,Y){U.state!=="loading"&&!t.dangerouslyAllowMutability&&pEe(U.contents),q.atomValues.set(n,U);try{a.set(V(Y),U)}catch(J){throw xo(`Problem with setting cache for selector "${n}": ${J.message}`)}}function $(q){if(yV.includes(n)){const U=`Recoil selector has circular dependencies: ${yV.slice(yV.indexOf(n)).join(" → ")}`;return lZ(xo(U))}yV.push(n);try{return q()}finally{yV.pop()}}function B(q,U){const Y=U.atomValues.get(n);return Y??a.get(J=>{var ae;return typeof J!="string"&&P7(!1,"Cache nodeKey is type string"),(ae=iwn(q,U,J))===null||ae===void 0?void 0:ae.contents})}function z(q,U){return $(()=>k(q,U))}function H(q){q.atomValues.delete(n)}function K(q,U){e==null&&P7(!1,"Recoil Value can never be null");for(const J of s){var Y;const ae=lwn(J);(Y=ae.clearCache)===null||Y===void 0||Y.call(ae,q,U)}s.clear(),H(U),a.clear(),jQe(q,e)}return o!=null?e=OQe({key:n,nodeType:"selector",peek:B,get:z,set:(U,Y,J)=>{let ae=!1;const se=new Map;function oe({key:Q}){if(ae)throw xo("Recoil: Async selector sets are not currently supported.");const be=cZ(U,Y,Q);if(be.state==="hasValue")return be.contents;if(be.state==="loading"){const le=`Getting value of asynchronous atom or selector "${Q}" in a pending state while setting selector "${n}" is not yet supported.`;throw jh(le),xo(le)}else throw be.contents}function fe(Q,be){if(ae){const Le="Recoil: Async selector sets are not currently supported.";throw jh(Le),xo(Le)}const le=typeof be=="function"?be(oe(Q)):be;rwn(U,Y,Q.key,le).forEach((Le,Te)=>se.set(Te,Le))}function de(Q){fe(Q,swn)}const ie=o({set:fe,get:oe,reset:de},J);if(ie!==void 0)throw ul(ie)?xo("Recoil: Async selector sets are not currently supported."):xo("Recoil: selector set should be a void function.");return ae=!0,se},init:h,invalidate:H,clearCache:K,shouldDeleteConfigOnRelease:f,dangerouslyAllowMutability:t.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l}):e=OQe({key:n,nodeType:"selector",peek:B,get:z,init:h,invalidate:H,clearCache:K,shouldDeleteConfigOnRelease:f,dangerouslyAllowMutability:t.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l})}lCt.value=t=>new sCt(t);var Dj=lCt;const{isLoadable:mwn,loadableWithError:b_e,loadableWithPromise:v_e,loadableWithValue:NP}=bK,{WrappedValue:cCt}=nCt,{peekNodeInfo:pwn}=Bk,{DEFAULT_VALUE:ZL,DefaultValue:rE,getConfigDeletionHandler:uCt,registerNode:gwn,setConfigDeletionHandler:bwn}=Yp,{isRecoilValue:vwn}=C2,{getRecoilValueAsLoadable:ywn,markRecoilValueModified:_wn,setRecoilValue:FQe,setRecoilValueLoadable:xwn}=Cw,{retainedByOptionWithDefault:wwn}=MA,_V=t=>t instanceof cCt?t.value:t;function Cwn(t){const{key:e,persistence_UNSTABLE:n}=t,i=wwn(t.retainedBy_UNSTABLE);let r=0;function o(_){return v_e(_.then(w=>(s=NP(w),w)).catch(w=>{throw s=b_e(w),w}))}let s=ul(t.default)?o(t.default):mwn(t.default)?t.default.state==="loading"?o(t.default.contents):t.default:NP(_V(t.default));c(s.contents);let a;const l=new Map;function c(_){return t.dangerouslyAllowMutability!==!0?ul(_)?_.then(w=>(pEe(w),w)):(pEe(_),_):_}function u(_,w){const C=w.then(N=>{var E,D;return((D=((E=_.getState().nextTree)!==null&&E!==void 0?E:_.getState().currentTree).atomValues.get(e))===null||D===void 0?void 0:D.contents)===C&&FQe(_,y,N),N}).catch(N=>{var E,D;throw((D=((E=_.getState().nextTree)!==null&&E!==void 0?E:_.getState().currentTree).atomValues.get(e))===null||D===void 0?void 0:D.contents)===C&&xwn(_,y,b_e(N)),N});return C}function d(_,w,C){var N;r++;const E=()=>{var T;r--,(T=l.get(_))===null||T===void 0||T.forEach(A=>A()),l.delete(_)};if(_.getState().knownAtoms.add(e),s.state==="loading"){const T=()=>{var A;((A=_.getState().nextTree)!==null&&A!==void 0?A:_.getState().currentTree).atomValues.has(e)||_wn(_,y)};s.contents.finally(T)}const D=(N=t.effects)!==null&&N!==void 0?N:t.effects_UNSTABLE;if(D!=null){let T=function(H){if(O&&H.key===e){const K=P;return K instanceof rE?h(_,w):ul(K)?v_e(K.then(q=>q instanceof rE?s.toPromise():q)):NP(K)}return ywn(_,H)},A=function(H){return T(H).toPromise()},R=function(H){var K;const q=pwn(_,(K=_.getState().nextTree)!==null&&K!==void 0?K:_.getState().currentTree,H.key);return O&&H.key===e&&!(P instanceof rE)?{...q,isSet:!0,loadable:T(H)}:q},P=ZL,O=!0,V=!1,F=null;const $=H=>K=>{if(O){const q=T(y),U=q.state==="hasValue"?q.contents:ZL;P=typeof K=="function"?K(U):K,ul(P)&&(P=P.then(Y=>(F={effect:H,value:Y},Y)))}else{if(ul(K))throw xo("Setting atoms to async values is not implemented.");typeof K!="function"&&(F={effect:H,value:_V(K)}),FQe(_,y,typeof K=="function"?q=>{const U=_V(K(q));return F={effect:H,value:U},U}:_V(K))}},B=H=>()=>$(H)(ZL),z=H=>K=>{var q;const{release:U}=_.subscribeToTransactions(Y=>{var J;let{currentTree:ae,previousTree:se}=Y.getState();se||(jh("Transaction subscribers notified without a next tree being present -- this is a bug in Recoil"),se=ae);const oe=(J=ae.atomValues.get(e))!==null&&J!==void 0?J:s;if(oe.state==="hasValue"){var fe,de,ie,Q;const be=oe.contents,le=(fe=se.atomValues.get(e))!==null&&fe!==void 0?fe:s,Ne=le.state==="hasValue"?le.contents:ZL;((de=F)===null||de===void 0?void 0:de.effect)!==H||((ie=F)===null||ie===void 0?void 0:ie.value)!==be?K(be,Ne,!ae.atomValues.has(e)):((Q=F)===null||Q===void 0?void 0:Q.effect)===H&&(F=null)}},e);l.set(_,[...(q=l.get(_))!==null&&q!==void 0?q:[],U])};for(const H of D)try{const K=H({node:y,storeID:_.storeID,parentStoreID_UNSTABLE:_.parentStoreID,trigger:C,setSelf:$(H),resetSelf:B(H),onSet:z(H),getPromise:A,getLoadable:T,getInfo_UNSTABLE:R});if(K!=null){var k;l.set(_,[...(k=l.get(_))!==null&&k!==void 0?k:[],K])}}catch(K){P=K,V=!0}if(O=!1,!(P instanceof rE)){var M;const H=V?b_e(P):ul(P)?v_e(u(_,P)):NP(_V(P));c(H.contents),w.atomValues.set(e,H),(M=_.getState().nextTree)===null||M===void 0||M.atomValues.set(e,H)}}return E}function h(_,w){var C,N;return(C=(N=w.atomValues.get(e))!==null&&N!==void 0?N:a)!==null&&C!==void 0?C:s}function f(_,w){if(w.atomValues.has(e))return Gl(w.atomValues.get(e));if(w.nonvalidatedAtoms.has(e)){if(a!=null)return a;if(n==null)return Pue(`Tried to restore a persisted value for atom ${e} but it has no persistence settings.`),s;const C=w.nonvalidatedAtoms.get(e),N=n.validator(C,ZL);return a=N instanceof rE?s:NP(N),a}else return s}function m(){a=void 0}function p(_,w,C){if(w.atomValues.has(e)){const N=Gl(w.atomValues.get(e));if(N.state==="hasValue"&&C===N.contents)return new Map}else if(!w.nonvalidatedAtoms.has(e)&&C instanceof rE)return new Map;return c(C),a=void 0,new Map().set(e,NP(C))}function g(){return uCt(e)!==void 0&&r<=0}const y=gwn({key:e,nodeType:"atom",peek:h,get:f,set:p,init:d,invalidate:m,shouldDeleteConfigOnRelease:g,dangerouslyAllowMutability:t.dangerouslyAllowMutability,persistence_UNSTABLE:t.persistence_UNSTABLE?{type:t.persistence_UNSTABLE.type,backButton:t.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:i});return y}function Tje(t){if(typeof t.key!="string")throw xo("A key option with a unique string value must be provided when creating an atom.");const{...e}=t,n="default"in t?t.default:new Promise(()=>{});return vwn(n)?Swn({...e,default:n}):Cwn({...e,default:n})}function Swn(t){const e=Tje({...t,default:ZL,persistence_UNSTABLE:t.persistence_UNSTABLE===void 0?void 0:{...t.persistence_UNSTABLE,validator:i=>i instanceof rE?i:Gl(t.persistence_UNSTABLE).validator(i,ZL)},effects:t.effects,effects_UNSTABLE:t.effects_UNSTABLE}),n=Dj({key:`${t.key}__withFallback`,get:({get:i})=>{const r=i(e);return r instanceof rE?t.default:r},set:({set:i},r)=>i(e,r),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:t.dangerouslyAllowMutability});return bwn(n.key,uCt(t.key)),n}Tje.value=t=>new cCt(t);var dCt=Tje;let Nwn=class{constructor(e){var n;Po(this,"_map",void 0),Po(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(n=e==null?void 0:e.mapKey)!==null&&n!==void 0?n:i=>i}size(){return this._map.size}has(e){return this._map.has(this._keyMapper(e))}get(e){return this._map.get(this._keyMapper(e))}set(e,n){this._map.set(this._keyMapper(e),n)}delete(e){this._map.delete(this._keyMapper(e))}clear(){this._map.clear()}};var Ewn={MapCache:Nwn},Dwn=Ewn.MapCache,kwn=Object.freeze({__proto__:null,MapCache:Dwn});const{LRUCache:$Qe}=rCt,{MapCache:Mwn}=kwn,dZ={equality:"reference",eviction:"none",maxSize:1/0};function Lwn({equality:t=dZ.equality,eviction:e=dZ.eviction,maxSize:n=dZ.maxSize}=dZ){const i=Twn(t);return Iwn(e,n,i)}function Twn(t){switch(t){case"reference":return e=>e;case"value":return e=>Gue(e)}throw xo(`Unrecognized equality policy ${t}`)}function Iwn(t,e,n){switch(t){case"keep-all":return new Mwn({mapKey:n});case"lru":return new $Qe({mapKey:n,maxSize:Gl(e)});case"most-recent":return new $Qe({mapKey:n,maxSize:1})}throw xo(`Unrecognized eviction policy ${t}`)}var hCt=Lwn;const{setConfigDeletionHandler:Awn}=Yp;function Rwn(t){var e,n;const i=hCt({equality:(e=(n=t.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&e!==void 0?e:"value",eviction:"keep-all"});return r=>{var o,s;const a=i.get(r);if(a!=null)return a;const{cachePolicyForParams_UNSTABLE:l,...c}=t,u="default"in t?t.default:new Promise(()=>{}),d=dCt({...c,key:`${t.key}__${(o=Gue(r))!==null&&o!==void 0?o:"void"}`,default:typeof u=="function"?u(r):u,retainedBy_UNSTABLE:typeof t.retainedBy_UNSTABLE=="function"?t.retainedBy_UNSTABLE(r):t.retainedBy_UNSTABLE,effects:typeof t.effects=="function"?t.effects(r):typeof t.effects_UNSTABLE=="function"?t.effects_UNSTABLE(r):(s=t.effects)!==null&&s!==void 0?s:t.effects_UNSTABLE});return i.set(r,d),Awn(d.key,()=>{i.delete(r)}),d}}var Pwn=Rwn;const{setConfigDeletionHandler:Own}=Yp;let jwn=0;function Fwn(t){var e,n;const i=hCt({equality:(e=(n=t.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&e!==void 0?e:"value",eviction:"keep-all"});return r=>{var o;let s;try{s=i.get(r)}catch(h){throw xo(`Problem with cache lookup for selector ${t.key}: ${h.message}`)}if(s!=null)return s;const a=`${t.key}__selectorFamily/${(o=Gue(r,{allowFunctions:!0}))!==null&&o!==void 0?o:"void"}/${jwn++}`,l=h=>t.get(r)(h),c=t.cachePolicy_UNSTABLE,u=typeof t.retainedBy_UNSTABLE=="function"?t.retainedBy_UNSTABLE(r):t.retainedBy_UNSTABLE;let d;if(t.set!=null){const h=t.set;d=Dj({key:a,get:l,set:(m,p)=>h(r)(m,p),cachePolicy_UNSTABLE:c,dangerouslyAllowMutability:t.dangerouslyAllowMutability,retainedBy_UNSTABLE:u})}else d=Dj({key:a,get:l,cachePolicy_UNSTABLE:c,dangerouslyAllowMutability:t.dangerouslyAllowMutability,retainedBy_UNSTABLE:u});return i.set(r,d),Own(d.key,()=>{i.delete(r)}),d}}var zk=Fwn;const $wn=zk({key:"__constant",get:t=>()=>t,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function Vwn(t){return $wn(t)}var Bwn=Vwn;const zwn=zk({key:"__error",get:t=>()=>{throw xo(t)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function Hwn(t){return zwn(t)}var Wwn=Hwn;function Uwn(t){return t}var Kwn=Uwn;const{loadableWithError:fCt,loadableWithPromise:mCt,loadableWithValue:pCt}=bK;function Yue(t,e){const n=Array(e.length).fill(void 0),i=Array(e.length).fill(void 0);for(const[r,o]of e.entries())try{n[r]=t(o)}catch(s){i[r]=s}return[n,i]}function qwn(t){return t!=null&&!ul(t)}function Xue(t){return Array.isArray(t)?t:Object.getOwnPropertyNames(t).map(e=>t[e])}function gEe(t,e){return Array.isArray(t)?e:Object.getOwnPropertyNames(t).reduce((n,i,r)=>({...n,[i]:e[r]}),{})}function i3(t,e,n){const i=n.map((r,o)=>r==null?pCt(e[o]):ul(r)?mCt(r):fCt(r));return gEe(t,i)}function Gwn(t,e){return e.map((n,i)=>n===void 0?t[i]:n)}const Ywn=zk({key:"__waitForNone",get:t=>({get:e})=>{const n=Xue(t),[i,r]=Yue(e,n);return i3(t,i,r)},dangerouslyAllowMutability:!0}),Xwn=zk({key:"__waitForAny",get:t=>({get:e})=>{const n=Xue(t),[i,r]=Yue(e,n);return r.some(o=>!ul(o))?i3(t,i,r):new Promise(o=>{for(const[s,a]of r.entries())ul(a)&&a.then(l=>{i[s]=l,r[s]=void 0,o(i3(t,i,r))}).catch(l=>{r[s]=l,o(i3(t,i,r))})})},dangerouslyAllowMutability:!0}),Zwn=zk({key:"__waitForAll",get:t=>({get:e})=>{const n=Xue(t),[i,r]=Yue(e,n);if(r.every(s=>s==null))return gEe(t,i);const o=r.find(qwn);if(o!=null)throw o;return Promise.all(r).then(s=>gEe(t,Gwn(i,s)))},dangerouslyAllowMutability:!0}),Qwn=zk({key:"__waitForAllSettled",get:t=>({get:e})=>{const n=Xue(t),[i,r]=Yue(e,n);return r.every(o=>!ul(o))?i3(t,i,r):Promise.all(r.map((o,s)=>ul(o)?o.then(a=>{i[s]=a,r[s]=void 0}).catch(a=>{i[s]=void 0,r[s]=a}):null)).then(()=>i3(t,i,r))},dangerouslyAllowMutability:!0}),Jwn=zk({key:"__noWait",get:t=>({get:e})=>{try{return Dj.value(pCt(e(t)))}catch(n){return Dj.value(ul(n)?mCt(n):fCt(n))}},dangerouslyAllowMutability:!0});var e1n={waitForNone:Ywn,waitForAny:Xwn,waitForAll:Zwn,waitForAllSettled:Qwn,noWait:Jwn};const{RecoilLoadable:t1n}=bK,{DefaultValue:n1n}=Yp,{RecoilRoot:i1n,useRecoilStoreID:r1n}=LS,{isRecoilValue:o1n}=C2,{retentionZone:s1n}=Fue,{freshSnapshot:a1n}=Hue,{useRecoilState:l1n,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:c1n,useRecoilStateLoadable:u1n,useRecoilValue:d1n,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:h1n,useRecoilValueLoadable:f1n,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:m1n,useResetRecoilState:p1n,useSetRecoilState:g1n}=__n,{useGotoRecoilSnapshot:b1n,useRecoilSnapshot:v1n,useRecoilTransactionObserver:y1n}=Z1t,{useRecoilCallback:_1n}=tCt,{noWait:x1n,waitForAll:w1n,waitForAllSettled:C1n,waitForAny:S1n,waitForNone:N1n}=e1n;var jF={DefaultValue:n1n,isRecoilValue:o1n,RecoilLoadable:t1n,RecoilEnv:PF,RecoilRoot:i1n,useRecoilStoreID:r1n,useRecoilBridgeAcrossReactRoots_UNSTABLE:q_n,atom:dCt,selector:Dj,atomFamily:Pwn,selectorFamily:zk,constSelector:Bwn,errorSelector:Wwn,readOnlySelector:Kwn,noWait:x1n,waitForNone:N1n,waitForAny:S1n,waitForAll:w1n,waitForAllSettled:C1n,useRecoilValue:d1n,useRecoilValueLoadable:f1n,useRecoilState:l1n,useRecoilStateLoadable:u1n,useSetRecoilState:g1n,useResetRecoilState:p1n,useGetRecoilValueInfo_UNSTABLE:B_n,useRecoilRefresher_UNSTABLE:wxn,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:m1n,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:h1n,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:c1n,useRecoilCallback:_1n,useRecoilTransaction_UNSTABLE:Dxn,useGotoRecoilSnapshot:b1n,useRecoilSnapshot:v1n,useRecoilTransactionObserver_UNSTABLE:y1n,snapshot_UNSTABLE:a1n,useRetain:Eje,retentionZone:s1n},E1n=jF.RecoilRoot,Xp=jF.atom,FF=jF.selector,Oi=jF.useRecoilValue,f0=jF.useRecoilState,Wd=jF.useSetRecoilState;function gCt(t){if(Array.isArray(t))return t}function D1n(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(u){c=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}function bEe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Ije(t,e){if(t){if(typeof t=="string")return bEe(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bEe(t,e):void 0}}function bCt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function He(t,e){return gCt(t)||D1n(t,e)||Ije(t,e)||bCt()}function Un(t){"@babel/helpers - typeof";return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Un(t)}function k1n(t,e){if(Un(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(Un(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function vCt(t){var e=k1n(t,"string");return Un(e)=="symbol"?e:e+""}function ye(t,e,n){return(e=vCt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function M1n(t){if(Array.isArray(t))return bEe(t)}function yCt(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function L1n(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ot(t){return M1n(t)||yCt(t)||Ije(t)||L1n()}function VQe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Ie(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?VQe(Object(n),!0).forEach(function(i){ye(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):VQe(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Cz(t){for(var e=0,n,i=0,r=t.length;r>=4;++i,r-=4)n=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}function Lu(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function vEe(t,e){if(!t)return!1;if(t.contains)return t.contains(e);for(var n=e;n;){if(n===t)return!0;n=n.parentNode}return!1}var BQe="data-rc-order",zQe="data-rc-priority",T1n="rc-util-key",yEe=new Map;function _Ct(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.mark;return e?e.startsWith("data-")?e:"data-".concat(e):T1n}function Zue(t){if(t.attachTo)return t.attachTo;var e=document.querySelector("head");return e||document.body}function I1n(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function Aje(t){return Array.from((yEe.get(t)||t).children).filter(function(e){return e.tagName==="STYLE"})}function xCt(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Lu())return null;var n=e.csp,i=e.prepend,r=e.priority,o=r===void 0?0:r,s=I1n(i),a=s==="prependQueue",l=document.createElement("style");l.setAttribute(BQe,s),a&&o&&l.setAttribute(zQe,"".concat(o)),n!=null&&n.nonce&&(l.nonce=n==null?void 0:n.nonce),l.innerHTML=t;var c=Zue(e),u=c.firstChild;if(i){if(a){var d=(e.styles||Aje(c)).filter(function(h){if(!["prepend","prependQueue"].includes(h.getAttribute(BQe)))return!1;var f=Number(h.getAttribute(zQe)||0);return o>=f});if(d.length)return c.insertBefore(l,d[d.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function wCt(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Zue(e);return(e.styles||Aje(n)).find(function(i){return i.getAttribute(_Ct(e))===t})}function Sz(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=wCt(t,e);if(n){var i=Zue(e);i.removeChild(n)}}function A1n(t,e){var n=yEe.get(t);if(!n||!vEe(document,n)){var i=xCt("",e),r=i.parentNode;yEe.set(t,r),t.removeChild(i)}}function NC(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=Zue(n),r=Aje(i),o=Ie(Ie({},n),{},{styles:r});A1n(i,o);var s=wCt(e,o);if(s){var a,l;if((a=o.csp)!==null&&a!==void 0&&a.nonce&&s.nonce!==((l=o.csp)===null||l===void 0?void 0:l.nonce)){var c;s.nonce=(c=o.csp)===null||c===void 0?void 0:c.nonce}return s.innerHTML!==t&&(s.innerHTML=t),s}var u=xCt(t,o);return u.setAttribute(_Ct(o),e),u}function $F(t,e){if(t==null)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;n[i]=t[i]}return n}function di(t,e){if(t==null)return{};var n,i,r=$F(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.includes(n)||{}.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Hk(t,e,n){var i=b.useRef({});return(!("value"in i.current)||n(i.current.condition,e))&&(i.current.value=t(),i.current.condition=e),i.current.value}var _Ee={},Rje=[],R1n=function(e){Rje.push(e)};function I0(t,e){if(!t&&console!==void 0){var n=Rje.reduce(function(i,r){return r(i??"","warning")},e);n&&console.error("Warning: ".concat(n))}}function P1n(t,e){if(!t&&console!==void 0){var n=Rje.reduce(function(i,r){return r(i??"","note")},e);n&&console.warn("Note: ".concat(n))}}function O1n(){_Ee={}}function CCt(t,e,n){!e&&!_Ee[n]&&(t(!1,n),_Ee[n]=!0)}function ii(t,e){CCt(I0,t,e)}function Sne(t,e){CCt(P1n,t,e)}ii.preMessage=R1n;ii.resetWarned=O1n;ii.noteOnce=Sne;function jp(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=new Set;function r(o,s){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=i.has(o);if(ii(!l,"Warning: There may be circular references"),l)return!1;if(o===s)return!0;if(n&&a>1)return!1;i.add(o);var c=a+1;if(Array.isArray(o)){if(!Array.isArray(s)||o.length!==s.length)return!1;for(var u=0;u<o.length;u++)if(!r(o[u],s[u],c))return!1;return!0}if(o&&s&&Un(o)==="object"&&Un(s)==="object"){var d=Object.keys(o);return d.length!==Object.keys(s).length?!1:d.every(function(h){return r(o[h],s[h],c)})}return!1}return r(t,e)}function Za(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function HQe(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,vCt(i.key),i)}}function Qa(t,e,n){return e&&HQe(t.prototype,e),n&&HQe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var j1n="%";function xEe(t){return t.join(j1n)}var F1n=function(){function t(e){Za(this,t),ye(this,"instanceId",void 0),ye(this,"cache",new Map),this.instanceId=e}return Qa(t,[{key:"get",value:function(n){return this.opGet(xEe(n))}},{key:"opGet",value:function(n){return this.cache.get(n)||null}},{key:"update",value:function(n,i){return this.opUpdate(xEe(n),i)}},{key:"opUpdate",value:function(n,i){var r=this.cache.get(n),o=i(r);o===null?this.cache.delete(n):this.cache.set(n,o)}}]),t}(),$1n=["children"],kj="data-token-hash",m0="data-css-hash",V1n="data-cache-path",AE="__cssinjs_instance__";function SCt(){var t=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var e=document.body.querySelectorAll("style[".concat(m0,"]"))||[],n=document.head.firstChild;Array.from(e).forEach(function(r){r[AE]=r[AE]||t,r[AE]===t&&document.head.insertBefore(r,n)});var i={};Array.from(document.querySelectorAll("style[".concat(m0,"]"))).forEach(function(r){var o=r.getAttribute(m0);if(i[o]){if(r[AE]===t){var s;(s=r.parentNode)===null||s===void 0||s.removeChild(r)}}else i[o]=!0})}return new F1n(t)}var Mj=b.createContext({hashPriority:"low",cache:SCt(),defaultCache:!0}),B1n=function(e){var n=e.children,i=di(e,$1n),r=b.useContext(Mj),o=Hk(function(){var s=Ie({},r);Object.keys(i).forEach(function(l){var c=i[l];i[l]!==void 0&&(s[l]=c)});var a=i.cache;return s.cache=s.cache||SCt(),s.defaultCache=!a&&r.defaultCache,s},[r,i],function(s,a){return!jp(s[0],a[0],!0)||!jp(s[1],a[1],!0)});return b.createElement(Mj.Provider,{value:o},n)};function bn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Lj(t,e){return Lj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Lj(t,e)}function Zp(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lj(t,e)}function N2(t){return N2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N2(t)}function Que(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Que=function(){return!!t})()}function NCt(t,e){if(e&&(Un(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bn(t)}function pb(t){var e=Que();return function(){var n,i=N2(t);if(e){var r=N2(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return NCt(this,n)}}function z1n(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}var Pje=function(){function t(){Za(this,t),ye(this,"cache",void 0),ye(this,"keys",void 0),ye(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return Qa(t,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(n){var i,r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s={map:this.cache};return n.forEach(function(a){if(!s)s=void 0;else{var l;s=(l=s)===null||l===void 0||(l=l.map)===null||l===void 0?void 0:l.get(a)}}),(i=s)!==null&&i!==void 0&&i.value&&o&&(s.value[1]=this.cacheCallTimes++),(r=s)===null||r===void 0?void 0:r.value}},{key:"get",value:function(n){var i;return(i=this.internalGet(n,!0))===null||i===void 0?void 0:i[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,i){var r=this;if(!this.has(n)){if(this.size()+1>t.MAX_CACHE_SIZE+t.MAX_CACHE_OFFSET){var o=this.keys.reduce(function(c,u){var d=He(c,2),h=d[1];return r.internalGet(u)[1]<h?[u,r.internalGet(u)[1]]:c},[this.keys[0],this.cacheCallTimes]),s=He(o,1),a=s[0];this.delete(a)}this.keys.push(n)}var l=this.cache;n.forEach(function(c,u){if(u===n.length-1)l.set(c,{value:[i,r.cacheCallTimes++]});else{var d=l.get(c);d?d.map||(d.map=new Map):l.set(c,{map:new Map}),l=l.get(c).map}})}},{key:"deleteByPath",value:function(n,i){var r=n.get(i[0]);if(i.length===1){var o;return r.map?n.set(i[0],{map:r.map}):n.delete(i[0]),(o=r.value)===null||o===void 0?void 0:o[0]}var s=this.deleteByPath(r.map,i.slice(1));return(!r.map||r.map.size===0)&&!r.value&&n.delete(i[0]),s}},{key:"delete",value:function(n){if(this.has(n))return this.keys=this.keys.filter(function(i){return!z1n(i,n)}),this.deleteByPath(this.cache,n)}}]),t}();ye(Pje,"MAX_CACHE_SIZE",20);ye(Pje,"MAX_CACHE_OFFSET",5);var WQe=0,ECt=function(){function t(e){Za(this,t),ye(this,"derivatives",void 0),ye(this,"id",void 0),this.derivatives=Array.isArray(e)?e:[e],this.id=WQe,e.length===0&&I0(e.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),WQe+=1}return Qa(t,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(i,r){return r(n,i)},void 0)}}]),t}(),y_e=new Pje;function wEe(t){var e=Array.isArray(t)?t:[t];return y_e.has(e)||y_e.set(e,new ECt(e)),y_e.get(e)}var H1n=new WeakMap,__e={};function W1n(t,e){for(var n=H1n,i=0;i<e.length;i+=1){var r=e[i];n.has(r)||n.set(r,new WeakMap),n=n.get(r)}return n.has(__e)||n.set(__e,t()),n.get(__e)}var UQe=new WeakMap;function k9(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=UQe.get(t)||"";return n||(Object.keys(t).forEach(function(i){var r=t[i];n+=i,r instanceof ECt?n+=r.id:r&&Un(r)==="object"?n+=k9(r,e):n+=r}),e&&(n=Cz(n)),UQe.set(t,n)),n}function KQe(t,e){return Cz("".concat(e,"_").concat(k9(t,!0)))}var CEe=Lu();function xe(t){return typeof t=="number"?"".concat(t,"px"):t}function Nne(t,e,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(r)return t;var o=Ie(Ie({},i),{},ye(ye({},kj,e),m0,n)),s=Object.keys(o).map(function(a){var l=o[a];return l?"".concat(a,'="').concat(l,'"'):null}).filter(function(a){return a}).join(" ");return"<style ".concat(s,">").concat(t,"</style>")}var pee=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(n?"".concat(n,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},U1n=function(e,n,i){return Object.keys(e).length?".".concat(n).concat(i!=null&&i.scope?".".concat(i.scope):"","{").concat(Object.entries(e).map(function(r){var o=He(r,2),s=o[0],a=o[1];return"".concat(s,":").concat(a,";")}).join(""),"}"):""},DCt=function(e,n,i){var r={},o={};return Object.entries(e).forEach(function(s){var a,l,c=He(s,2),u=c[0],d=c[1];if(i!=null&&(a=i.preserve)!==null&&a!==void 0&&a[u])o[u]=d;else if((typeof d=="string"||typeof d=="number")&&!(i!=null&&(l=i.ignore)!==null&&l!==void 0&&l[u])){var h,f=pee(u,i==null?void 0:i.prefix);r[f]=typeof d=="number"&&!(i!=null&&(h=i.unitless)!==null&&h!==void 0&&h[u])?"".concat(d,"px"):String(d),o[u]="var(".concat(f,")")}}),[o,U1n(r,n,{scope:i==null?void 0:i.scope})]},qQe=Lu()?b.useLayoutEffect:b.useEffect,Lr=function(e,n){var i=b.useRef(!0);qQe(function(){return e(i.current)},n),qQe(function(){return i.current=!1,function(){i.current=!0}},[])},ZT=function(e,n){Lr(function(i){if(!i)return e()},n)},K1n=Ie({},CF),GQe=K1n.useInsertionEffect,q1n=function(e,n,i){b.useMemo(e,i),Lr(function(){return n(!0)},i)},G1n=GQe?function(t,e,n){return GQe(function(){return t(),e()},n)}:q1n,Y1n=Ie({},CF),X1n=Y1n.useInsertionEffect,Z1n=function(e){var n=[],i=!1;function r(o){if(i){I0(!1,"[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.");return}n.push(o)}return b.useEffect(function(){return i=!1,function(){i=!0,n.length&&n.forEach(function(o){return o()})}},e),r},Q1n=function(){return function(e){e()}},J1n=typeof X1n<"u"?Z1n:Q1n,SEe=!1;function eCn(){return SEe}const tCn=eCn;if(typeof module<"u"&&module&&module.hot&&typeof window<"u"){var x_e=window;if(typeof x_e.webpackHotUpdate=="function"){var nCn=x_e.webpackHotUpdate;x_e.webpackHotUpdate=function(){return SEe=!0,setTimeout(function(){SEe=!1},0),nCn.apply(void 0,arguments)}}}function Oje(t,e,n,i,r){var o=b.useContext(Mj),s=o.cache,a=[t].concat(Ot(e)),l=xEe(a),c=J1n([l]),u=tCn(),d=function(p){s.opUpdate(l,function(g){var y=g||[void 0,void 0],_=He(y,2),w=_[0],C=w===void 0?0:w,N=_[1],E=N;N&&u&&(i==null||i(E,u),E=null);var D=E||n(),k=[C,D];return p?p(k):k})};b.useMemo(function(){d()},[l]);var h=s.opGet(l);h||(d(),h=s.opGet(l));var f=h[1];return G1n(function(){r==null||r(f)},function(m){return d(function(p){var g=He(p,2),y=g[0],_=g[1];return m&&y===0&&(r==null||r(f)),[y+1,_]}),function(){s.opUpdate(l,function(p){var g=p||[],y=He(g,2),_=y[0],w=_===void 0?0:_,C=y[1],N=w-1;return N===0?(c(function(){(m||!s.opGet(l))&&(i==null||i(C,!1))}),null):[w-1,C]})}},[l]),f}var iCn={},rCn="css-dev-only-do-not-override",QL=new Map;function oCn(t){QL.set(t,(QL.get(t)||0)+1)}function sCn(t,e){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(kj,'="').concat(t,'"]'));n.forEach(function(i){if(i[AE]===e){var r;(r=i.parentNode)===null||r===void 0||r.removeChild(i)}})}}var aCn=0;function lCn(t,e){QL.set(t,(QL.get(t)||0)-1);var n=Array.from(QL.keys()),i=n.filter(function(r){var o=QL.get(r)||0;return o<=0});n.length-i.length>aCn&&i.forEach(function(r){sCn(r,e),QL.delete(r)})}var cCn=function(e,n,i,r){var o=i.getDerivativeToken(e),s=Ie(Ie({},o),n);return r&&(s=r(s)),s},kCt="token";function uCn(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=b.useContext(Mj),r=i.cache.instanceId,o=i.container,s=n.salt,a=s===void 0?"":s,l=n.override,c=l===void 0?iCn:l,u=n.formatToken,d=n.getComputedToken,h=n.cssVar,f=W1n(function(){return Object.assign.apply(Object,[{}].concat(Ot(e)))},e),m=k9(f),p=k9(c),g=h?k9(h):"",y=Oje(kCt,[a,t.id,m,p,g],function(){var _,w=d?d(f,c,t):cCn(f,c,t,u),C=Ie({},w),N="";if(h){var E=DCt(w,h.key,{prefix:h.prefix,ignore:h.ignore,unitless:h.unitless,preserve:h.preserve}),D=He(E,2);w=D[0],N=D[1]}var k=KQe(w,a);w._tokenKey=k,C._tokenKey=KQe(C,a);var M=(_=h==null?void 0:h.key)!==null&&_!==void 0?_:k;w._themeKey=M,oCn(M);var T="".concat(rCn,"-").concat(Cz(k));return w._hashId=T,[w,T,C,N,(h==null?void 0:h.key)||""]},function(_){lCn(_[0]._themeKey,r)},function(_){var w=He(_,4),C=w[0],N=w[3];if(h&&N){var E=NC(N,Cz("css-variables-".concat(C._themeKey)),{mark:m0,prepend:"queue",attachTo:o,priority:-999});E[AE]=r,E.setAttribute(kj,C._themeKey)}});return y}var dCn=function(e,n,i){var r=He(e,5),o=r[2],s=r[3],a=r[4],l=i||{},c=l.plain;if(!s)return null;var u=o._tokenKey,d=-999,h={"data-rc-order":"prependQueue","data-rc-priority":"".concat(d)},f=Nne(s,a,u,h,c);return[d,u,f]};function lt(){return lt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},lt.apply(null,arguments)}var hCn={animationIterationCount: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,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},MCt="comm",LCt="rule",TCt="decl",fCn="@import",mCn="@keyframes",pCn="@layer",ICt=Math.abs,jje=String.fromCharCode;function ACt(t){return t.trim()}function gee(t,e,n){return t.replace(e,n)}function gCn(t,e,n){return t.indexOf(e,n)}function Nz(t,e){return t.charCodeAt(e)|0}function Tj(t,e,n){return t.slice(e,n)}function ux(t){return t.length}function bCn(t){return t.length}function hZ(t,e){return e.push(t),t}var Jue=1,Ij=1,RCt=0,Sv=0,wu=0,VF="";function Fje(t,e,n,i,r,o,s,a){return{value:t,root:e,parent:n,type:i,props:r,children:o,line:Jue,column:Ij,length:s,return:"",siblings:a}}function vCn(){return wu}function yCn(){return wu=Sv>0?Nz(VF,--Sv):0,Ij--,wu===10&&(Ij=1,Jue--),wu}function p0(){return wu=Sv<RCt?Nz(VF,Sv++):0,Ij++,wu===10&&(Ij=1,Jue++),wu}function RE(){return Nz(VF,Sv)}function bee(){return Sv}function ede(t,e){return Tj(VF,t,e)}function Ez(t){switch(t){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 _Cn(t){return Jue=Ij=1,RCt=ux(VF=t),Sv=0,[]}function xCn(t){return VF="",t}function w_e(t){return ACt(ede(Sv-1,NEe(t===91?t+2:t===40?t+1:t)))}function wCn(t){for(;(wu=RE())&&wu<33;)p0();return Ez(t)>2||Ez(wu)>3?"":" "}function CCn(t,e){for(;--e&&p0()&&!(wu<48||wu>102||wu>57&&wu<65||wu>70&&wu<97););return ede(t,bee()+(e<6&&RE()==32&&p0()==32))}function NEe(t){for(;p0();)switch(wu){case t:return Sv;case 34:case 39:t!==34&&t!==39&&NEe(wu);break;case 40:t===41&&NEe(t);break;case 92:p0();break}return Sv}function SCn(t,e){for(;p0()&&t+wu!==57;)if(t+wu===84&&RE()===47)break;return"/*"+ede(e,Sv-1)+"*"+jje(t===47?t:p0())}function NCn(t){for(;!Ez(RE());)p0();return ede(t,Sv)}function ECn(t){return xCn(vee("",null,null,null,[""],t=_Cn(t),0,[0],t))}function vee(t,e,n,i,r,o,s,a,l){for(var c=0,u=0,d=s,h=0,f=0,m=0,p=1,g=1,y=1,_=0,w="",C=r,N=o,E=i,D=w;g;)switch(m=_,_=p0()){case 40:if(m!=108&&Nz(D,d-1)==58){gCn(D+=gee(w_e(_),"&","&\f"),"&\f",ICt(c?a[c-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:D+=w_e(_);break;case 9:case 10:case 13:case 32:D+=wCn(m);break;case 92:D+=CCn(bee()-1,7);continue;case 47:switch(RE()){case 42:case 47:hZ(DCn(SCn(p0(),bee()),e,n,l),l),(Ez(m||1)==5||Ez(RE()||1)==5)&&ux(D)&&Tj(D,-1,void 0)!==" "&&(D+=" ");break;default:D+="/"}break;case 123*p:a[c++]=ux(D)*y;case 125*p:case 59:case 0:switch(_){case 0:case 125:g=0;case 59+u:y==-1&&(D=gee(D,/\f/g,"")),f>0&&(ux(D)-d||p===0&&m===47)&&hZ(f>32?XQe(D+";",i,n,d-1,l):XQe(gee(D," ","")+";",i,n,d-2,l),l);break;case 59:D+=";";default:if(hZ(E=YQe(D,e,n,c,u,r,a,w,C=[],N=[],d,o),o),_===123)if(u===0)vee(D,e,E,E,C,o,d,a,N);else switch(h===99&&Nz(D,3)===110?100:h){case 100:case 108:case 109:case 115:vee(t,E,E,i&&hZ(YQe(t,E,E,0,0,r,a,w,r,C=[],d,N),N),r,N,d,a,i?C:N);break;default:vee(D,E,E,E,[""],N,0,a,N)}}c=u=f=0,p=y=1,w=D="",d=s;break;case 58:d=1+ux(D),f=m;default:if(p<1){if(_==123)--p;else if(_==125&&p++==0&&yCn()==125)continue}switch(D+=jje(_),_*p){case 38:y=u>0?1:(D+="\f",-1);break;case 44:a[c++]=(ux(D)-1)*y,y=1;break;case 64:RE()===45&&(D+=w_e(p0())),h=RE(),u=d=ux(w=D+=NCn(bee())),_++;break;case 45:m===45&&ux(D)==2&&(p=0)}}return o}function YQe(t,e,n,i,r,o,s,a,l,c,u,d){for(var h=r-1,f=r===0?o:[""],m=bCn(f),p=0,g=0,y=0;p<i;++p)for(var _=0,w=Tj(t,h+1,h=ICt(g=s[p])),C=t;_<m;++_)(C=ACt(g>0?f[_]+" "+w:gee(w,/&\f/g,f[_])))&&(l[y++]=C);return Fje(t,e,n,r===0?LCt:a,l,c,u,d)}function DCn(t,e,n,i){return Fje(t,e,n,MCt,jje(vCn()),Tj(t,2,-2),0,i)}function XQe(t,e,n,i,r){return Fje(t,e,n,TCt,Tj(t,0,i),Tj(t,i+1,-1),i,r)}function EEe(t,e){for(var n="",i=0;i<t.length;i++)n+=e(t[i],i,t,e)||"";return n}function kCn(t,e,n,i){switch(t.type){case pCn:if(t.children.length)break;case fCn:case TCt:return t.return=t.return||t.value;case MCt:return"";case mCn:return t.return=t.value+"{"+EEe(t.children,i)+"}";case LCt:if(!ux(t.value=t.props.join(",")))return""}return ux(n=EEe(t.children,i))?t.return=t.value+"{"+n+"}":""}function PCt(t,e){var n=e.path,i=e.parentSelectors;ii(!1,"[Ant Design CSS-in-JS] ".concat(n?"Error in ".concat(n,": "):"").concat(t).concat(i.length?" Selector: ".concat(i.join(" | ")):""))}var MCn=function(e,n,i){if(e==="content"){var r=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,o=["normal","none","initial","inherit","unset"];(typeof n!="string"||o.indexOf(n)===-1&&!r.test(n)&&(n.charAt(0)!==n.charAt(n.length-1)||n.charAt(0)!=='"'&&n.charAt(0)!=="'"))&&PCt("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(n,"\"'`."),i)}},LCn=function(e,n,i){e==="animation"&&i.hashId&&n!=="none"&&PCt("You seem to be using hashed animation '".concat(n,"', in which case 'animationName' with Keyframe as value is recommended."),i)},ZQe="data-ant-cssinjs-cache-path",OCt="_FILE_STYLE__",QT,jCt=!0;function TCn(){if(!QT&&(QT={},Lu())){var t=document.createElement("div");t.className=ZQe,t.style.position="fixed",t.style.visibility="hidden",t.style.top="-9999px",document.body.appendChild(t);var e=getComputedStyle(t).content||"";e=e.replace(/^"/,"").replace(/"$/,""),e.split(";").forEach(function(r){var o=r.split(":"),s=He(o,2),a=s[0],l=s[1];QT[a]=l});var n=document.querySelector("style[".concat(ZQe,"]"));if(n){var i;jCt=!1,(i=n.parentNode)===null||i===void 0||i.removeChild(n)}document.body.removeChild(t)}}function ICn(t){return TCn(),!!QT[t]}function ACn(t){var e=QT[t],n=null;if(e&&Lu())if(jCt)n=OCt;else{var i=document.querySelector("style[".concat(m0,'="').concat(QT[t],'"]'));i?n=i.innerHTML:delete QT[t]}return[n,e]}var FCt="_skip_check_",$Ct="_multi_value_";function yee(t){var e=EEe(ECn(t),kCn);return e.replace(/\{%%%\:[^;];}/g,";")}function RCn(t){return Un(t)==="object"&&t&&(FCt in t||$Ct in t)}function QQe(t,e,n){if(!e)return t;var i=".".concat(e),r=n==="low"?":where(".concat(i,")"):i,o=t.split(",").map(function(s){var a,l=s.trim().split(/\s+/),c=l[0]||"",u=((a=c.match(/^\w+/))===null||a===void 0?void 0:a[0])||"";return c="".concat(u).concat(r).concat(c.slice(u.length)),[c].concat(Ot(l.slice(1))).join(" ")});return o.join(",")}var PCn=function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},r=i.root,o=i.injectHash,s=i.parentSelectors,a=n.hashId,l=n.layer,c=n.path,u=n.hashPriority,d=n.transformers,h=d===void 0?[]:d,f=n.linters,m=f===void 0?[]:f,p="",g={};function y(C){var N=C.getName(a);if(!g[N]){var E=t(C.style,n,{root:!1,parentSelectors:s}),D=He(E,1),k=D[0];g[N]="@keyframes ".concat(C.getName(a)).concat(k)}}function _(C){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return C.forEach(function(E){Array.isArray(E)?_(E,N):E&&N.push(E)}),N}var w=_(Array.isArray(e)?e:[e]);return w.forEach(function(C){var N=typeof C=="string"&&!r?{}:C;if(typeof N=="string")p+="".concat(N,`
`);else if(N._keyframe)y(N);else{var E=h.reduce(function(D,k){var M;return(k==null||(M=k.visit)===null||M===void 0?void 0:M.call(k,D))||D},N);Object.keys(E).forEach(function(D){var k=E[D];if(Un(k)==="object"&&k&&(D!=="animationName"||!k._keyframe)&&!RCn(k)){var M=!1,T=D.trim(),A=!1;(r||o)&&a?T.startsWith("@")?M=!0:T==="&"?T=QQe("",a,u):T=QQe(D,a,u):r&&!a&&(T==="&"||T==="")&&(T="",A=!0);var R=t(k,n,{root:A,injectHash:M,parentSelectors:[].concat(Ot(s),[T])}),P=He(R,2),O=P[0],V=P[1];g=Ie(Ie({},g),V),p+="".concat(T).concat(O)}else{let B=function(z,H){(Un(k)!=="object"||!(k!=null&&k[FCt]))&&[MCn,LCn].concat(Ot(m)).forEach(function(U){return U(z,H,{path:c,hashId:a,parentSelectors:s})});var K=z.replace(/[A-Z]/g,function(U){return"-".concat(U.toLowerCase())}),q=H;!hCn[z]&&typeof q=="number"&&q!==0&&(q="".concat(q,"px")),z==="animationName"&&H!==null&&H!==void 0&&H._keyframe&&(y(H),q=H.getName(a)),p+="".concat(K,":").concat(q,";")};var F,$=(F=k==null?void 0:k.value)!==null&&F!==void 0?F:k;Un(k)==="object"&&k!==null&&k!==void 0&&k[$Ct]&&Array.isArray($)?$.forEach(function(z){B(D,z)}):B(D,$)}})}}),r?l&&(p="@layer ".concat(l.name," {").concat(p,"}"),l.dependencies&&(g["@layer ".concat(l.name)]=l.dependencies.map(function(C){return"@layer ".concat(C,", ").concat(l.name,";")}).join(`
`))):p="{".concat(p,"}"),[p,g]};function VCt(t,e){return Cz("".concat(t.join("%")).concat(e))}function OCn(){return null}var BCt="style";function DEe(t,e){var n=t.token,i=t.path,r=t.hashId,o=t.layer,s=t.nonce,a=t.clientOnly,l=t.order,c=l===void 0?0:l,u=b.useContext(Mj),d=u.autoClear,h=u.mock,f=u.defaultCache,m=u.hashPriority,p=u.container,g=u.ssrInline,y=u.transformers,_=u.linters,w=u.cache,C=u.layer,N=n._tokenKey,E=[N];C&&E.push("layer"),E.push.apply(E,Ot(i));var D=CEe;h!==void 0&&(D=h==="client");var k=Oje(BCt,E,function(){var P=E.join("|");if(ICn(P)){var O=ACn(P),V=He(O,2),F=V[0],$=V[1];if(F)return[F,N,$,{},a,c]}var B=e(),z=PCn(B,{hashId:r,hashPriority:m,layer:C?o:void 0,path:i.join("-"),transformers:y,linters:_}),H=He(z,2),K=H[0],q=H[1],U=yee(K),Y=VCt(E,U);return[U,N,Y,q,a,c]},function(P,O){var V=He(P,3),F=V[2];(O||d)&&CEe&&Sz(F,{mark:m0})},function(P){var O=He(P,4),V=O[0];O[1];var F=O[2],$=O[3];if(D&&V!==OCt){var B={mark:m0,prepend:C?!1:"queue",attachTo:p,priority:c},z=typeof s=="function"?s():s;z&&(B.csp={nonce:z});var H=[],K=[];Object.keys($).forEach(function(U){U.startsWith("@layer")?H.push(U):K.push(U)}),H.forEach(function(U){NC(yee($[U]),"_layer-".concat(U),Ie(Ie({},B),{},{prepend:!0}))});var q=NC(V,F,B);q[AE]=w.instanceId,q.setAttribute(kj,N),q.setAttribute(V1n,E.join("|")),K.forEach(function(U){NC(yee($[U]),"_effect-".concat(U),B)})}}),M=He(k,3),T=M[0],A=M[1],R=M[2];return function(P){var O;return!g||D||!f?O=b.createElement(OCn,null):O=b.createElement("style",lt({},ye(ye({},kj,A),m0,R),{dangerouslySetInnerHTML:{__html:T}})),b.createElement(b.Fragment,null,O,P)}}var jCn=function(e,n,i){var r=He(e,6),o=r[0],s=r[1],a=r[2],l=r[3],c=r[4],u=r[5],d=i||{},h=d.plain;if(c)return null;var f=o,m={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return f=Nne(o,s,a,m,h),l&&Object.keys(l).forEach(function(p){if(!n[p]){n[p]=!0;var g=yee(l[p]),y=Nne(g,s,"_effect-".concat(p),m,h);p.startsWith("@layer")?f=y+f:f+=y}}),[u,a,f]},zCt="cssVar",FCn=function(e,n){var i=e.key,r=e.prefix,o=e.unitless,s=e.ignore,a=e.token,l=e.scope,c=l===void 0?"":l,u=b.useContext(Mj),d=u.cache.instanceId,h=u.container,f=a._tokenKey,m=[].concat(Ot(e.path),[i,c,f]),p=Oje(zCt,m,function(){var g=n(),y=DCt(g,i,{prefix:r,unitless:o,ignore:s,scope:c}),_=He(y,2),w=_[0],C=_[1],N=VCt(m,C);return[w,C,N,i]},function(g){var y=He(g,3),_=y[2];CEe&&Sz(_,{mark:m0})},function(g){var y=He(g,3),_=y[1],w=y[2];if(_){var C=NC(_,w,{mark:m0,prepend:"queue",attachTo:h,priority:-999});C[AE]=d,C.setAttribute(kj,i)}});return p},$Cn=function(e,n,i){var r=He(e,4),o=r[1],s=r[2],a=r[3],l=i||{},c=l.plain;if(!o)return null;var u=-999,d={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)},h=Nne(o,a,s,d,c);return[u,s,h]};ye(ye(ye({},BCt,jCn),kCt,dCn),zCt,$Cn);var so=function(){function t(e,n){Za(this,t),ye(this,"name",void 0),ye(this,"style",void 0),ye(this,"_keyframe",!0),this.name=e,this.style=n}return Qa(t,[{key:"getName",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return n?"".concat(n,"-").concat(this.name):this.name}}]),t}();function EP(t){return t.notSplit=!0,t}EP(["borderTop","borderBottom"]),EP(["borderTop"]),EP(["borderBottom"]),EP(["borderLeft","borderRight"]),EP(["borderLeft"]),EP(["borderRight"]);var kEe=function(t,e){return kEe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},kEe(t,e)};function Af(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");kEe(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Et=function(){return Et=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Et.apply(this,arguments)};function km(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function GO(t,e,n,i){function r(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{c(i.next(u))}catch(d){s(d)}}function l(u){try{c(i.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):r(u.value).then(a,l)}c((i=i.apply(t,e||[])).next())})}function JQe(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(i=1,r&&(o=c[0]&2?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,r=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(u){c=[6,u],r=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Ac(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),r,o=[],s;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return o}function VCn(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var i=Array(t),r=0,e=0;e<n;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i}function Zc(t,e,n){if(n||arguments.length===2)for(var i=0,r=e.length,o;i<r;i++)(o||!(i in e))&&(o||(o=Array.prototype.slice.call(e,0,i)),o[i]=e[i]);return t.concat(o||Array.prototype.slice.call(e))}var _ee="right-scroll-bar-position",xee="width-before-scroll-bar",BCn="with-scroll-bars-hidden",zCn="--removed-body-scroll-bar-size";function C_e(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function HCn(t,e){var n=b.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(i){var r=n.value;r!==i&&(n.value=i,n.callback(i,r))}}}})[0];return n.callback=e,n.facade}var WCn=typeof window<"u"?b.useLayoutEffect:b.useEffect,eJe=new WeakMap;function UCn(t,e){var n=HCn(null,function(i){return t.forEach(function(r){return C_e(r,i)})});return WCn(function(){var i=eJe.get(n);if(i){var r=new Set(i),o=new Set(t),s=n.current;r.forEach(function(a){o.has(a)||C_e(a,null)}),o.forEach(function(a){r.has(a)||C_e(a,s)})}eJe.set(n,t)},[t]),n}function KCn(t){return t}function qCn(t,e){e===void 0&&(e=KCn);var n=[],i=!1,r={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(o){var s=e(o,i);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(i=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){i=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var l=function(){var u=s;s=[],u.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){s.push(u),c()},filter:function(u){return s=s.filter(u),n}}}};return r}function GCn(t){t===void 0&&(t={});var e=qCn(null);return e.options=Et({async:!0,ssr:!1},t),e}var HCt=function(t){var e=t.sideCar,n=km(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=e.read();if(!i)throw new Error("Sidecar medium not found");return b.createElement(i,Et({},n))};HCt.isSideCarExport=!0;function YCn(t,e){return t.useMedium(e),HCt}var WCt=GCn(),S_e=function(){},tde=b.forwardRef(function(t,e){var n=b.useRef(null),i=b.useState({onScrollCapture:S_e,onWheelCapture:S_e,onTouchMoveCapture:S_e}),r=i[0],o=i[1],s=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,d=t.shards,h=t.sideCar,f=t.noIsolation,m=t.inert,p=t.allowPinchZoom,g=t.as,y=g===void 0?"div":g,_=t.gapMode,w=km(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=h,N=UCn([n,e]),E=Et(Et({},w),r);return b.createElement(b.Fragment,null,u&&b.createElement(C,{sideCar:WCt,removeScrollBar:c,shards:d,noIsolation:f,inert:m,setCallbacks:o,allowPinchZoom:!!p,lockRef:n,gapMode:_}),s?b.cloneElement(b.Children.only(a),Et(Et({},E),{ref:N})):b.createElement(y,Et({},E,{className:l,ref:N}),a))});tde.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};tde.classNames={fullWidth:xee,zeroRight:_ee};var XCn=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ZCn(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=XCn();return e&&t.setAttribute("nonce",e),t}function QCn(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function JCn(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var eSn=function(){var t=0,e=null;return{add:function(n){t==0&&(e=ZCn())&&(QCn(e,n),JCn(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},tSn=function(){var t=eSn();return function(e,n){b.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},UCt=function(){var t=tSn(),e=function(n){var i=n.styles,r=n.dynamic;return t(i,r),null};return e},nSn={left:0,top:0,right:0,gap:0},N_e=function(t){return parseInt(t||"",10)||0},iSn=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],i=e[t==="padding"?"paddingTop":"marginTop"],r=e[t==="padding"?"paddingRight":"marginRight"];return[N_e(n),N_e(i),N_e(r)]},rSn=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return nSn;var e=iSn(t),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,i-n+e[2]-e[0])}},oSn=UCt(),r3="data-scroll-locked",sSn=function(t,e,n,i){var r=t.left,o=t.top,s=t.right,a=t.gap;return n===void 0&&(n="margin"),`
  .`.concat(BCn,` {
   overflow: hidden `).concat(i,`;
   padding-right: `).concat(a,"px ").concat(i,`;
  }
  body[`).concat(r3,`] {
    overflow: hidden `).concat(i,`;
    overscroll-behavior: contain;
    `).concat([e&&"position: relative ".concat(i,";"),n==="margin"&&`
    padding-left: `.concat(r,`px;
    padding-top: `).concat(o,`px;
    padding-right: `).concat(s,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(a,"px ").concat(i,`;
    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(i,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(_ee,` {
    right: `).concat(a,"px ").concat(i,`;
  }
  
  .`).concat(xee,` {
    margin-right: `).concat(a,"px ").concat(i,`;
  }
  
  .`).concat(_ee," .").concat(_ee,` {
    right: 0 `).concat(i,`;
  }
  
  .`).concat(xee," .").concat(xee,` {
    margin-right: 0 `).concat(i,`;
  }
  
  body[`).concat(r3,`] {
    `).concat(zCn,": ").concat(a,`px;
  }
`)},tJe=function(){var t=parseInt(document.body.getAttribute(r3)||"0",10);return isFinite(t)?t:0},aSn=function(){b.useEffect(function(){return document.body.setAttribute(r3,(tJe()+1).toString()),function(){var t=tJe()-1;t<=0?document.body.removeAttribute(r3):document.body.setAttribute(r3,t.toString())}},[])},lSn=function(t){var e=t.noRelative,n=t.noImportant,i=t.gapMode,r=i===void 0?"margin":i;aSn();var o=b.useMemo(function(){return rSn(r)},[r]);return b.createElement(oSn,{styles:sSn(o,!e,r,n?"":"!important")})},MEe=!1;if(typeof window<"u")try{var fZ=Object.defineProperty({},"passive",{get:function(){return MEe=!0,!0}});window.addEventListener("test",fZ,fZ),window.removeEventListener("test",fZ,fZ)}catch{MEe=!1}var DP=MEe?{passive:!1}:!1,cSn=function(t){return t.tagName==="TEXTAREA"},KCt=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!cSn(t)&&n[e]==="visible")},uSn=function(t){return KCt(t,"overflowY")},dSn=function(t){return KCt(t,"overflowX")},nJe=function(t,e){var n=e.ownerDocument,i=e;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=qCt(t,i);if(r){var o=GCt(t,i),s=o[1],a=o[2];if(s>a)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},hSn=function(t){var e=t.scrollTop,n=t.scrollHeight,i=t.clientHeight;return[e,n,i]},fSn=function(t){var e=t.scrollLeft,n=t.scrollWidth,i=t.clientWidth;return[e,n,i]},qCt=function(t,e){return t==="v"?uSn(e):dSn(e)},GCt=function(t,e){return t==="v"?hSn(e):fSn(e)},mSn=function(t,e){return t==="h"&&e==="rtl"?-1:1},pSn=function(t,e,n,i,r){var o=mSn(t,window.getComputedStyle(e).direction),s=o*i,a=n.target,l=e.contains(a),c=!1,u=s>0,d=0,h=0;do{var f=GCt(t,a),m=f[0],p=f[1],g=f[2],y=p-g-o*m;(m||y)&&qCt(t,a)&&(d+=y,h+=m),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&(Math.abs(d)<1||!r)||!u&&(Math.abs(h)<1||!r))&&(c=!0),c},mZ=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},iJe=function(t){return[t.deltaX,t.deltaY]},rJe=function(t){return t&&"current"in t?t.current:t},gSn=function(t,e){return t[0]===e[0]&&t[1]===e[1]},bSn=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},vSn=0,kP=[];function ySn(t){var e=b.useRef([]),n=b.useRef([0,0]),i=b.useRef(),r=b.useState(vSn++)[0],o=b.useState(UCt)[0],s=b.useRef(t);b.useEffect(function(){s.current=t},[t]),b.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(r));var p=Zc([t.lockRef.current],(t.shards||[]).map(rJe),!0).filter(Boolean);return p.forEach(function(g){return g.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),p.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(r))})}}},[t.inert,t.lockRef.current,t.shards]);var a=b.useCallback(function(p,g){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!s.current.allowPinchZoom;var y=mZ(p),_=n.current,w="deltaX"in p?p.deltaX:_[0]-y[0],C="deltaY"in p?p.deltaY:_[1]-y[1],N,E=p.target,D=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in p&&D==="h"&&E.type==="range")return!1;var k=nJe(D,E);if(!k)return!0;if(k?N=D:(N=D==="v"?"h":"v",k=nJe(D,E)),!k)return!1;if(!i.current&&"changedTouches"in p&&(w||C)&&(i.current=N),!N)return!0;var M=i.current||N;return pSn(M,g,p,M==="h"?w:C,!0)},[]),l=b.useCallback(function(p){var g=p;if(!(!kP.length||kP[kP.length-1]!==o)){var y="deltaY"in g?iJe(g):mZ(g),_=e.current.filter(function(N){return N.name===g.type&&(N.target===g.target||g.target===N.shadowParent)&&gSn(N.delta,y)})[0];if(_&&_.should){g.cancelable&&g.preventDefault();return}if(!_){var w=(s.current.shards||[]).map(rJe).filter(Boolean).filter(function(N){return N.contains(g.target)}),C=w.length>0?a(g,w[0]):!s.current.noIsolation;C&&g.cancelable&&g.preventDefault()}}},[]),c=b.useCallback(function(p,g,y,_){var w={name:p,delta:g,target:y,should:_,shadowParent:_Sn(y)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(C){return C!==w})},1)},[]),u=b.useCallback(function(p){n.current=mZ(p),i.current=void 0},[]),d=b.useCallback(function(p){c(p.type,iJe(p),p.target,a(p,t.lockRef.current))},[]),h=b.useCallback(function(p){c(p.type,mZ(p),p.target,a(p,t.lockRef.current))},[]);b.useEffect(function(){return kP.push(o),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,DP),document.addEventListener("touchmove",l,DP),document.addEventListener("touchstart",u,DP),function(){kP=kP.filter(function(p){return p!==o}),document.removeEventListener("wheel",l,DP),document.removeEventListener("touchmove",l,DP),document.removeEventListener("touchstart",u,DP)}},[]);var f=t.removeScrollBar,m=t.inert;return b.createElement(b.Fragment,null,m?b.createElement(o,{styles:bSn(r)}):null,f?b.createElement(lSn,{gapMode:t.gapMode}):null)}function _Sn(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const xSn=YCn(WCt,ySn);var YCt=b.forwardRef(function(t,e){return b.createElement(tde,Et({},t,{ref:e,sideCar:xSn}))});YCt.classNames=tde.classNames;function Tu(t){return Object.keys(t)}function E_e(t){return t&&typeof t=="object"&&!Array.isArray(t)}function $je(t,e){const n={...t},i=e;return E_e(t)&&E_e(e)&&Object.keys(e).forEach(r=>{E_e(i[r])&&r in t?n[r]=$je(n[r],i[r]):n[r]=i[r]}),n}function wSn(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function CSn(t){var e;return typeof t!="string"||!t.includes("var(--mantine-scale)")?t:(e=t.match(/^calc\((.*?)\)$/))==null?void 0:e[1].split("*")[0].trim()}function Dz(t){const e=CSn(t);return typeof e=="number"?e:typeof e=="string"?e.includes("calc")||e.includes("var")?e:e.includes("px")?Number(e.replace("px","")):e.includes("rem")?Number(e.replace("rem",""))*16:e.includes("em")?Number(e.replace("em",""))*16:Number(e):NaN}function D_e(t){return t==="0rem"?"0rem":`calc(${t} * var(--mantine-scale))`}function XCt(t,{shouldScale:e=!1}={}){function n(i){if(i===0||i==="0")return`0${t}`;if(typeof i=="number"){const r=`${i/16}${t}`;return e?D_e(r):r}if(typeof i=="string"){if(i===""||i.startsWith("calc(")||i.startsWith("clamp(")||i.includes("rgba("))return i;if(i.includes(","))return i.split(",").map(o=>n(o)).join(",");if(i.includes(" "))return i.split(" ").map(o=>n(o)).join(" ");if(i.includes(t))return e?D_e(i):i;const r=i.replace("px","");if(!Number.isNaN(Number(r))){const o=`${Number(r)/16}${t}`;return e?D_e(o):o}}return i}return n}const sn=XCt("rem",{shouldScale:!0}),oJe=XCt("em");function Wk(t){return Object.keys(t).reduce((e,n)=>(t[n]!==void 0&&(e[n]=t[n]),e),{})}function ZCt(t){return typeof t=="number"?!0:typeof t=="string"?t.startsWith("calc(")||t.startsWith("var(")||t.includes(" ")&&t.trim()!==""?!0:/[0-9]/.test(t.trim().replace("-","")[0]):!1}function Nw(t){return Array.isArray(t)||t===null?!1:typeof t=="object"?t.type!==b.Fragment:!1}var QCt={exports:{}},wee={};/**
 * @license React
 * react-jsx-runtime.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(){var t=b,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),m=Symbol.iterator,p="@@iterator";function g($e){if($e===null||typeof $e!="object")return null;var We=m&&$e[m]||$e[p];return typeof We=="function"?We:null}var y=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _($e){{for(var We=arguments.length,tt=new Array(We>1?We-1:0),_t=1;_t<We;_t++)tt[_t-1]=arguments[_t];w("error",$e,tt)}}function w($e,We,tt){{var _t=y.ReactDebugCurrentFrame,ht=_t.getStackAddendum();ht!==""&&(We+="%s",tt=tt.concat([ht]));var qe=tt.map(function(ft){return String(ft)});qe.unshift("Warning: "+We),Function.prototype.apply.call(console[$e],console,qe)}}var C=!1,N=!1,E=!1,D=!1,k=!1,M;M=Symbol.for("react.module.reference");function T($e){return!!(typeof $e=="string"||typeof $e=="function"||$e===i||$e===o||k||$e===r||$e===c||$e===u||D||$e===f||C||N||E||typeof $e=="object"&&$e!==null&&($e.$$typeof===h||$e.$$typeof===d||$e.$$typeof===s||$e.$$typeof===a||$e.$$typeof===l||$e.$$typeof===M||$e.getModuleId!==void 0))}function A($e,We,tt){var _t=$e.displayName;if(_t)return _t;var ht=We.displayName||We.name||"";return ht!==""?tt+"("+ht+")":tt}function R($e){return $e.displayName||"Context"}function P($e){if($e==null)return null;if(typeof $e.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof $e=="function")return $e.displayName||$e.name||null;if(typeof $e=="string")return $e;switch($e){case i:return"Fragment";case n:return"Portal";case o:return"Profiler";case r:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof $e=="object")switch($e.$$typeof){case a:var We=$e;return R(We)+".Consumer";case s:var tt=$e;return R(tt._context)+".Provider";case l:return A($e,$e.render,"ForwardRef");case d:var _t=$e.displayName||null;return _t!==null?_t:P($e.type)||"Memo";case h:{var ht=$e,qe=ht._payload,ft=ht._init;try{return P(ft(qe))}catch{return null}}}return null}var O=Object.assign,V=0,F,$,B,z,H,K,q;function U(){}U.__reactDisabledLog=!0;function Y(){{if(V===0){F=console.log,$=console.info,B=console.warn,z=console.error,H=console.group,K=console.groupCollapsed,q=console.groupEnd;var $e={configurable:!0,enumerable:!0,value:U,writable:!0};Object.defineProperties(console,{info:$e,log:$e,warn:$e,error:$e,group:$e,groupCollapsed:$e,groupEnd:$e})}V++}}function J(){{if(V--,V===0){var $e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:O({},$e,{value:F}),info:O({},$e,{value:$}),warn:O({},$e,{value:B}),error:O({},$e,{value:z}),group:O({},$e,{value:H}),groupCollapsed:O({},$e,{value:K}),groupEnd:O({},$e,{value:q})})}V<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ae=y.ReactCurrentDispatcher,se;function oe($e,We,tt){{if(se===void 0)try{throw Error()}catch(ht){var _t=ht.stack.trim().match(/\n( *(at )?)/);se=_t&&_t[1]||""}return`
`+se+$e}}var fe=!1,de;{var ie=typeof WeakMap=="function"?WeakMap:Map;de=new ie}function Q($e,We){if(!$e||fe)return"";{var tt=de.get($e);if(tt!==void 0)return tt}var _t;fe=!0;var ht=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var qe;qe=ae.current,ae.current=null,Y();try{if(We){var ft=function(){throw Error()};if(Object.defineProperty(ft.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ft,[])}catch(oi){_t=oi}Reflect.construct($e,[],ft)}else{try{ft.call()}catch(oi){_t=oi}$e.call(ft.prototype)}}else{try{throw Error()}catch(oi){_t=oi}$e()}}catch(oi){if(oi&&_t&&typeof oi.stack=="string"){for(var Ct=oi.stack.split(`
`),Pt=_t.stack.split(`
`),an=Ct.length-1,_n=Pt.length-1;an>=1&&_n>=0&&Ct[an]!==Pt[_n];)_n--;for(;an>=1&&_n>=0;an--,_n--)if(Ct[an]!==Pt[_n]){if(an!==1||_n!==1)do if(an--,_n--,_n<0||Ct[an]!==Pt[_n]){var on=`
`+Ct[an].replace(" at new "," at ");return $e.displayName&&on.includes("<anonymous>")&&(on=on.replace("<anonymous>",$e.displayName)),typeof $e=="function"&&de.set($e,on),on}while(an>=1&&_n>=0);break}}}finally{fe=!1,ae.current=qe,J(),Error.prepareStackTrace=ht}var yn=$e?$e.displayName||$e.name:"",fi=yn?oe(yn):"";return typeof $e=="function"&&de.set($e,fi),fi}function be($e,We,tt){return Q($e,!1)}function le($e){var We=$e.prototype;return!!(We&&We.isReactComponent)}function Ne($e,We,tt){if($e==null)return"";if(typeof $e=="function")return Q($e,le($e));if(typeof $e=="string")return oe($e);switch($e){case c:return oe("Suspense");case u:return oe("SuspenseList")}if(typeof $e=="object")switch($e.$$typeof){case l:return be($e.render);case d:return Ne($e.type,We,tt);case h:{var _t=$e,ht=_t._payload,qe=_t._init;try{return Ne(qe(ht),We,tt)}catch{}}}return""}var Le=Object.prototype.hasOwnProperty,Te={},De=y.ReactDebugCurrentFrame;function Pe($e){if($e){var We=$e._owner,tt=Ne($e.type,$e._source,We?We.type:null);De.setExtraStackFrame(tt)}else De.setExtraStackFrame(null)}function ge($e,We,tt,_t,ht){{var qe=Function.call.bind(Le);for(var ft in $e)if(qe($e,ft)){var Ct=void 0;try{if(typeof $e[ft]!="function"){var Pt=Error((_t||"React class")+": "+tt+" type `"+ft+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof $e[ft]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Pt.name="Invariant Violation",Pt}Ct=$e[ft](We,ft,_t,tt,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(an){Ct=an}Ct&&!(Ct instanceof Error)&&(Pe(ht),_("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",_t||"React class",tt,ft,typeof Ct),Pe(null)),Ct instanceof Error&&!(Ct.message in Te)&&(Te[Ct.message]=!0,Pe(ht),_("Failed %s type: %s",tt,Ct.message),Pe(null))}}}var he=Array.isArray;function me($e){return he($e)}function X($e){{var We=typeof Symbol=="function"&&Symbol.toStringTag,tt=We&&$e[Symbol.toStringTag]||$e.constructor.name||"Object";return tt}}function re($e){try{return we($e),!1}catch{return!0}}function we($e){return""+$e}function ue($e){if(re($e))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",X($e)),we($e)}var Ce=y.ReactCurrentOwner,ze={key:!0,ref:!0,__self:!0,__source:!0},Ye,Ke,Xe;Xe={};function it($e){if(Le.call($e,"ref")){var We=Object.getOwnPropertyDescriptor($e,"ref").get;if(We&&We.isReactWarning)return!1}return $e.ref!==void 0}function ut($e){if(Le.call($e,"key")){var We=Object.getOwnPropertyDescriptor($e,"key").get;if(We&&We.isReactWarning)return!1}return $e.key!==void 0}function Ge($e,We){if(typeof $e.ref=="string"&&Ce.current&&We&&Ce.current.stateNode!==We){var tt=P(Ce.current.type);Xe[tt]||(_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',P(Ce.current.type),$e.ref),Xe[tt]=!0)}}function Ee($e,We){{var tt=function(){Ye||(Ye=!0,_("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",We))};tt.isReactWarning=!0,Object.defineProperty($e,"key",{get:tt,configurable:!0})}}function Se($e,We){{var tt=function(){Ke||(Ke=!0,_("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",We))};tt.isReactWarning=!0,Object.defineProperty($e,"ref",{get:tt,configurable:!0})}}var je=function($e,We,tt,_t,ht,qe,ft){var Ct={$$typeof:e,type:$e,key:We,ref:tt,props:ft,_owner:qe};return Ct._store={},Object.defineProperty(Ct._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ct,"_self",{configurable:!1,enumerable:!1,writable:!1,value:_t}),Object.defineProperty(Ct,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ht}),Object.freeze&&(Object.freeze(Ct.props),Object.freeze(Ct)),Ct};function nt($e,We,tt,_t,ht){{var qe,ft={},Ct=null,Pt=null;tt!==void 0&&(ue(tt),Ct=""+tt),ut(We)&&(ue(We.key),Ct=""+We.key),it(We)&&(Pt=We.ref,Ge(We,ht));for(qe in We)Le.call(We,qe)&&!ze.hasOwnProperty(qe)&&(ft[qe]=We[qe]);if($e&&$e.defaultProps){var an=$e.defaultProps;for(qe in an)ft[qe]===void 0&&(ft[qe]=an[qe])}if(Ct||Pt){var _n=typeof $e=="function"?$e.displayName||$e.name||"Unknown":$e;Ct&&Ee(ft,_n),Pt&&Se(ft,_n)}return je($e,Ct,Pt,ht,_t,Ce.current,ft)}}var rt=y.ReactCurrentOwner,St=y.ReactDebugCurrentFrame;function At($e){if($e){var We=$e._owner,tt=Ne($e.type,$e._source,We?We.type:null);St.setExtraStackFrame(tt)}else St.setExtraStackFrame(null)}var Nt;Nt=!1;function vt($e){return typeof $e=="object"&&$e!==null&&$e.$$typeof===e}function $t(){{if(rt.current){var $e=P(rt.current.type);if($e)return`

Check the render method of \``+$e+"`."}return""}}function ln($e){return""}var Jt={};function en($e){{var We=$t();if(!We){var tt=typeof $e=="string"?$e:$e.displayName||$e.name;tt&&(We=`

Check the top-level render call using <`+tt+">.")}return We}}function Ft($e,We){{if(!$e._store||$e._store.validated||$e.key!=null)return;$e._store.validated=!0;var tt=en(We);if(Jt[tt])return;Jt[tt]=!0;var _t="";$e&&$e._owner&&$e._owner!==rt.current&&(_t=" It was passed a child from "+P($e._owner.type)+"."),At($e),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',tt,_t),At(null)}}function dn($e,We){{if(typeof $e!="object")return;if(me($e))for(var tt=0;tt<$e.length;tt++){var _t=$e[tt];vt(_t)&&Ft(_t,We)}else if(vt($e))$e._store&&($e._store.validated=!0);else if($e){var ht=g($e);if(typeof ht=="function"&&ht!==$e.entries)for(var qe=ht.call($e),ft;!(ft=qe.next()).done;)vt(ft.value)&&Ft(ft.value,We)}}}function Ze($e){{var We=$e.type;if(We==null||typeof We=="string")return;var tt;if(typeof We=="function")tt=We.propTypes;else if(typeof We=="object"&&(We.$$typeof===l||We.$$typeof===d))tt=We.propTypes;else return;if(tt){var _t=P(We);ge(tt,$e.props,"prop",_t,$e)}else if(We.PropTypes!==void 0&&!Nt){Nt=!0;var ht=P(We);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ht||"Unknown")}typeof We.getDefaultProps=="function"&&!We.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function dt($e){{for(var We=Object.keys($e.props),tt=0;tt<We.length;tt++){var _t=We[tt];if(_t!=="children"&&_t!=="key"){At($e),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",_t),At(null);break}}$e.ref!==null&&(At($e),_("Invalid attribute `ref` supplied to `React.Fragment`."),At(null))}}var at={};function mt($e,We,tt,_t,ht,qe){{var ft=T($e);if(!ft){var Ct="";($e===void 0||typeof $e=="object"&&$e!==null&&Object.keys($e).length===0)&&(Ct+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Pt=ln();Pt?Ct+=Pt:Ct+=$t();var an;$e===null?an="null":me($e)?an="array":$e!==void 0&&$e.$$typeof===e?(an="<"+(P($e.type)||"Unknown")+" />",Ct=" Did you accidentally export a JSX literal instead of a component?"):an=typeof $e,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",an,Ct)}var _n=nt($e,We,tt,ht,qe);if(_n==null)return _n;if(ft){var on=We.children;if(on!==void 0)if(_t)if(me(on)){for(var yn=0;yn<on.length;yn++)dn(on[yn],$e);Object.freeze&&Object.freeze(on)}else _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else dn(on,$e)}if(Le.call(We,"key")){var fi=P($e),oi=Object.keys(We).filter(function(Vr){return Vr!=="key"}),Qi=oi.length>0?"{key: someKey, "+oi.join(": ..., ")+": ...}":"{key: someKey}";if(!at[fi+Qi]){var mi=oi.length>0?"{"+oi.join(": ..., ")+": ...}":"{}";_(`A props object containing a "key" prop is being spread into JSX:
  let props = %s;
  <%s {...props} />
React keys must be passed directly to JSX without using spread:
  let props = %s;
  <%s key={someKey} {...props} />`,Qi,fi,mi,fi),at[fi+Qi]=!0}}return $e===i?dt(_n):Ze(_n),_n}}function It($e,We,tt){return mt($e,We,tt,!0)}function Ve($e,We,tt){return mt($e,We,tt,!1)}var bt=Ve,wt=It;wee.Fragment=i,wee.jsx=bt,wee.jsxs=wt})();QCt.exports=wee;var ne=QCt.exports;function Uh(t){const e=b.createContext(null);return[({children:r,value:o})=>ne.jsx(e.Provider,{value:o,children:r}),()=>{const r=b.useContext(e);if(r===null)throw new Error(t);return r}]}function BF(t=null){const e=b.createContext(t);return[({children:r,value:o})=>ne.jsx(e.Provider,{value:o,children:r}),()=>b.useContext(e)]}function sJe(t,e){return n=>{if(typeof n!="string"||n.trim().length===0)throw new Error(e);return`${t}-${n}`}}function Ene(t,e){let n=t;for(;(n=n.parentElement)&&!n.matches(e););return n}function SSn(t,e,n){for(let i=t-1;i>=0;i-=1)if(!e[i].disabled)return i;if(n){for(let i=e.length-1;i>-1;i-=1)if(!e[i].disabled)return i}return t}function NSn(t,e,n){for(let i=t+1;i<e.length;i+=1)if(!e[i].disabled)return i;if(n){for(let i=0;i<e.length;i+=1)if(!e[i].disabled)return i}return t}function ESn(t,e,n){return Ene(t,n)===Ene(e,n)}function JCt({parentSelector:t,siblingSelector:e,onKeyDown:n,loop:i=!0,activateOnFocus:r=!1,dir:o="rtl",orientation:s}){return a=>{var m;n==null||n(a);const l=Array.from(((m=Ene(a.currentTarget,t))==null?void 0:m.querySelectorAll(e))||[]).filter(p=>ESn(a.currentTarget,p,t)),c=l.findIndex(p=>a.currentTarget===p),u=NSn(c,l,i),d=SSn(c,l,i),h=o==="rtl"?d:u,f=o==="rtl"?u:d;switch(a.key){case"ArrowRight":{s==="horizontal"&&(a.stopPropagation(),a.preventDefault(),l[h].focus(),r&&l[h].click());break}case"ArrowLeft":{s==="horizontal"&&(a.stopPropagation(),a.preventDefault(),l[f].focus(),r&&l[f].click());break}case"ArrowUp":{s==="vertical"&&(a.stopPropagation(),a.preventDefault(),l[d].focus(),r&&l[d].click());break}case"ArrowDown":{s==="vertical"&&(a.stopPropagation(),a.preventDefault(),l[u].focus(),r&&l[u].click());break}case"Home":{a.stopPropagation(),a.preventDefault(),!l[0].disabled&&l[0].focus();break}case"End":{a.stopPropagation(),a.preventDefault();const p=l.length-1;!l[p].disabled&&l[p].focus();break}}}}const DSn={app:100,modal:200,popover:300,overlay:400,max:9999};function gb(t){return DSn[t]}const kSn=()=>{};function MSn(t,e={active:!0}){return typeof t!="function"||!e.active?e.onKeyDown||kSn:n=>{var i;n.key==="Escape"&&(t(n),(i=e.onTrigger)==null||i.call(e))}}function Hr(t,e="size",n=!0){if(t!==void 0)return ZCt(t)?n?sn(t):t:`var(--${e}-${t})`}function Rc(t){return Hr(t,"mantine-spacing")}function Va(t){return t===void 0?"var(--mantine-radius-default)":Hr(t,"mantine-radius")}function hd(t){return Hr(t,"mantine-font-size")}function eSt(t){return Hr(t,"mantine-line-height",!1)}function Vje(t){if(t)return Hr(t,"mantine-shadow",!1)}function Bg(t,e){return n=>{t==null||t(n),e==null||e(n)}}function LSn(t,e){return t in e.breakpoints?Dz(e.breakpoints[t]):Dz(t)}function Bje(t,e){const n=t.map(i=>({value:i,px:LSn(i,e)}));return n.sort((i,r)=>i.px-r.px),n}function r0(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function TSn(t,e,n){var i;return n?Array.from(((i=Ene(n,e))==null?void 0:i.querySelectorAll(t))||[]).findIndex(r=>r===n):null}function ISn(){const[t,e]=b.useState(-1);return[t,{setHovered:e,resetHovered:()=>e(-1)}]}function av(t,e,n){return e===void 0&&n===void 0?t:e!==void 0&&n===void 0?Math.max(t,e):Math.min(e===void 0&&n!==void 0?t:Math.max(t,e),n)}function o3(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function aJe(t){return typeof t!="string"?"":t.charAt(0).toUpperCase()+t.slice(1)}function JL(t){const e=b.useRef(t);return b.useEffect(()=>{e.current=t}),b.useMemo(()=>(...n)=>{var i;return(i=e.current)==null?void 0:i.call(e,...n)},[])}function nde(t,e){const n=JL(t),i=b.useRef(0);return b.useEffect(()=>()=>window.clearTimeout(i.current),[]),b.useCallback((...r)=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>n(...r),e)},[n,e])}const lJe=["mousedown","touchstart"];function ASn(t,e,n){const i=b.useRef();return b.useEffect(()=>{const r=o=>{const{target:s}=o??{};if(Array.isArray(n)){const a=(s==null?void 0:s.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(s)&&s.tagName!=="HTML";n.every(c=>!!c&&!o.composedPath().includes(c))&&!a&&t()}else i.current&&!i.current.contains(s)&&t()};return(e||lJe).forEach(o=>document.addEventListener(o,r)),()=>{(e||lJe).forEach(o=>document.removeEventListener(o,r))}},[i,t,n]),i}function RSn({timeout:t=2e3}={}){const[e,n]=b.useState(null),[i,r]=b.useState(!1),[o,s]=b.useState(null),a=u=>{window.clearTimeout(o),s(window.setTimeout(()=>r(!1),t)),r(u)};return{copy:u=>{"clipboard"in navigator?navigator.clipboard.writeText(u).then(()=>a(!0)).catch(d=>n(d)):n(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{r(!1),n(null),window.clearTimeout(o)},error:e,copied:i}}function PSn(t,e){try{return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}catch{return t.addListener(e),()=>t.removeListener(e)}}function OSn(t,e){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(t).matches:!1}function EO(t,e,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[i,r]=b.useState(n?e:OSn(t)),o=b.useRef();return b.useEffect(()=>{if("matchMedia"in window)return o.current=window.matchMedia(t),r(o.current.matches),PSn(o.current,s=>r(s.matches))},[t]),i}function jSn(t,e,n={leading:!1}){const[i,r]=b.useState(t),o=b.useRef(!1),s=b.useRef(null),a=b.useRef(!1),l=()=>window.clearTimeout(s.current);return b.useEffect(()=>{o.current&&(!a.current&&n.leading?(a.current=!0,r(t)):(l(),s.current=window.setTimeout(()=>{a.current=!1,r(t)},e)))},[t,n.leading,e]),b.useEffect(()=>(o.current=!0,l),[]),[i,l]}const Uk=typeof document<"u"?b.useLayoutEffect:b.useEffect;function ide(t){Uk(()=>{typeof t=="string"&&t.trim().length>0&&(document.title=t.trim())},[t])}function Fp(t,e){const n=b.useRef(!1);b.useEffect(()=>()=>{n.current=!1},[]),b.useEffect(()=>{if(n.current)return t();n.current=!0},e)}function tSt({opened:t,shouldReturnFocus:e=!0}){const n=b.useRef(),i=()=>{var r;n.current&&"focus"in n.current&&typeof n.current.focus=="function"&&((r=n.current)==null||r.focus({preventScroll:!0}))};return Fp(()=>{let r=-1;const o=s=>{s.key==="Tab"&&window.clearTimeout(r)};return document.addEventListener("keydown",o),t?n.current=document.activeElement:e&&(r=window.setTimeout(i,10)),()=>{window.clearTimeout(r),document.removeEventListener("keydown",o)}},[t,e]),i}function FSn(t,e="body > :not(script)"){const n=o3(),i=Array.from(document.querySelectorAll(e)).map(r=>{var l;if((l=r==null?void 0:r.shadowRoot)!=null&&l.contains(t)||r.contains(t))return;const o=r.getAttribute("aria-hidden"),s=r.getAttribute("data-hidden"),a=r.getAttribute("data-focus-id");return r.setAttribute("data-focus-id",n),o===null||o==="false"?r.setAttribute("aria-hidden","true"):!s&&!a&&r.setAttribute("data-hidden",o),{node:r,ariaHidden:s||null}});return()=>{i.forEach(r=>{!r||n!==r.node.getAttribute("data-focus-id")||(r.ariaHidden===null?r.node.removeAttribute("aria-hidden"):r.node.setAttribute("aria-hidden",r.ariaHidden),r.node.removeAttribute("data-focus-id"),r.node.removeAttribute("data-hidden"))})}}const $Sn=/input|select|textarea|button|object/,nSt="a, input, select, textarea, button, object, [tabindex]";function VSn(t){return t.style.display==="none"}function BSn(t){if(t.getAttribute("aria-hidden")||t.getAttribute("hidden")||t.getAttribute("type")==="hidden")return!1;let n=t;for(;n&&!(n===document.body||n.nodeType===11);){if(VSn(n))return!1;n=n.parentNode}return!0}function iSt(t){let e=t.getAttribute("tabindex");return e===null&&(e=void 0),parseInt(e,10)}function LEe(t){const e=t.nodeName.toLowerCase(),n=!Number.isNaN(iSt(t));return($Sn.test(e)&&!t.disabled||t instanceof HTMLAnchorElement&&t.href||n)&&BSn(t)}function rSt(t){const e=iSt(t);return(Number.isNaN(e)||e>=0)&&LEe(t)}function zSn(t){return Array.from(t.querySelectorAll(nSt)).filter(rSt)}function HSn(t,e){const n=zSn(t);if(!n.length){e.preventDefault();return}const i=n[e.shiftKey?0:n.length-1],r=t.getRootNode();let o=i===r.activeElement||t===r.activeElement;const s=r.activeElement;if(s.tagName==="INPUT"&&s.getAttribute("type")==="radio"&&(o=n.filter(u=>u.getAttribute("type")==="radio"&&u.getAttribute("name")===s.getAttribute("name")).includes(i)),!o)return;e.preventDefault();const l=n[e.shiftKey?n.length-1:0];l&&l.focus()}function WSn(t=!0){const e=b.useRef(),n=b.useRef(null),i=o=>{let s=o.querySelector("[data-autofocus]");if(!s){const a=Array.from(o.querySelectorAll(nSt));s=a.find(rSt)||a.find(LEe)||null,!s&&LEe(o)&&(s=o)}s&&s.focus({preventScroll:!0})},r=b.useCallback(o=>{if(t){if(o===null){n.current&&(n.current(),n.current=null);return}n.current=FSn(o),e.current!==o&&(o?(setTimeout(()=>{o.getRootNode()&&i(o)}),e.current=o):e.current=null)}},[t]);return b.useEffect(()=>{if(!t)return;e.current&&setTimeout(()=>i(e.current));const o=s=>{s.key==="Tab"&&e.current&&HSn(e.current,s)};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),n.current&&n.current()}},[t]),r}const USn=t=>(t+1)%1e6;function KSn(){const[,t]=b.useReducer(USn,0);return t}const qSn=Z.useId||(()=>{});function GSn(){const t=qSn();return t?`mantine-${t.replace(/:/g,"")}`:""}function jm(t){const e=GSn(),[n,i]=b.useState(e);return Uk(()=>{i(o3())},[]),typeof t=="string"?t:typeof window>"u"?e:n}function oSt(t=[]){const[e,n]=b.useState(t);return[e,{setState:n,append:(...g)=>n(y=>[...y,...g]),prepend:(...g)=>n(y=>[...g,...y]),insert:(g,...y)=>n(_=>[..._.slice(0,g),...y,..._.slice(g)]),pop:()=>n(g=>{const y=[...g];return y.pop(),y}),shift:()=>n(g=>{const y=[...g];return y.shift(),y}),apply:g=>n(y=>y.map((_,w)=>g(_,w))),applyWhere:(g,y)=>n(_=>_.map((w,C)=>g(w,C)?y(w,C):w)),remove:(...g)=>n(y=>y.filter((_,w)=>!g.includes(w))),reorder:({from:g,to:y})=>n(_=>{const w=[..._],C=_[g];return w.splice(g,1),w.splice(y,0,C),w}),swap:({from:g,to:y})=>n(_=>{const w=[..._],C=w[g],N=w[y];return w.splice(y,1,C),w.splice(g,1,N),w}),setItem:(g,y)=>n(_=>{const w=[..._];return w[g]=y,w}),setItemProp:(g,y,_)=>n(w=>{const C=[...w];return C[g]={...C[g],[y]:_},C}),filter:g=>{n(y=>y.filter(g))}}]}function TEe(t,e,n){b.useEffect(()=>(window.addEventListener(t,e,n),()=>window.removeEventListener(t,e,n)),[t,e])}function YSn(t,e="use-local-storage"){try{return JSON.stringify(t)}catch{throw new Error(`@mantine/hooks ${e}: Failed to serialize the value`)}}function XSn(t){try{return t&&JSON.parse(t)}catch{return t}}function ZSn(t){return{getItem:r=>{try{return window[t].getItem(r)}catch{return console.warn("use-local-storage: Failed to get value from storage, localStorage is blocked"),null}},setItem:(r,o)=>{try{window[t].setItem(r,o)}catch{console.warn("use-local-storage: Failed to set value to storage, localStorage is blocked")}},removeItem:r=>{try{window[t].removeItem(r)}catch{console.warn("use-local-storage: Failed to remove value from storage, localStorage is blocked")}}}}function QSn(t,e){const n="mantine-local-storage",{getItem:i,setItem:r,removeItem:o}=ZSn(t);return function({key:a,defaultValue:l,getInitialValueInEffect:c=!0,deserialize:u=XSn,serialize:d=h=>YSn(h,e)}){const h=b.useCallback(y=>{let _;try{_=typeof window>"u"||!(t in window)||window[t]===null||!!y}catch{_=!0}if(_)return l;const w=i(a);return w!==null?u(w):l},[a,l]),[f,m]=b.useState(h(c)),p=b.useCallback(y=>{y instanceof Function?m(_=>{const w=y(_);return r(a,d(w)),window.dispatchEvent(new CustomEvent(n,{detail:{key:a,value:y(_)}})),w}):(r(a,d(y)),window.dispatchEvent(new CustomEvent(n,{detail:{key:a,value:y}})),m(y))},[a]),g=b.useCallback(()=>{o(a),window.dispatchEvent(new CustomEvent(n,{detail:{key:a,value:l}}))},[]);return TEe("storage",y=>{y.storageArea===window[t]&&y.key===a&&m(u(y.newValue??void 0))}),TEe(n,y=>{y.detail.key===a&&m(y.detail.value)}),b.useEffect(()=>{l!==void 0&&f===void 0&&p(l)},[l,f,p]),b.useEffect(()=>{const y=h();y!==void 0&&p(y)},[]),[f===void 0?l:f,p,g]}}function TA(t){return QSn("localStorage","use-local-storage")(t)}function SK(t,e){typeof t=="function"?t(e):typeof t=="object"&&t!==null&&"current"in t&&(t.current=e)}function sSt(...t){return e=>{t.forEach(n=>SK(n,e))}}function Bc(...t){return b.useCallback(sSt(...t),t)}function aSt(t){return{x:av(t.x,0,1),y:av(t.y,0,1)}}function zje(t,e,n="ltr"){const i=b.useRef(null),r=b.useRef(!1),o=b.useRef(!1),s=b.useRef(0),[a,l]=b.useState(!1);return b.useEffect(()=>{r.current=!0},[]),b.useEffect(()=>{var _,w;const c=({x:C,y:N})=>{cancelAnimationFrame(s.current),s.current=requestAnimationFrame(()=>{if(r.current&&i.current){i.current.style.userSelect="none";const E=i.current.getBoundingClientRect();if(E.width&&E.height){const D=av((C-E.left)/E.width,0,1);t({x:n==="ltr"?D:1-D,y:av((N-E.top)/E.height,0,1)})}}})},u=()=>{document.addEventListener("mousemove",p),document.addEventListener("mouseup",f),document.addEventListener("touchmove",y),document.addEventListener("touchend",f)},d=()=>{document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",f),document.removeEventListener("touchmove",y),document.removeEventListener("touchend",f)},h=()=>{!o.current&&r.current&&(o.current=!0,typeof(e==null?void 0:e.onScrubStart)=="function"&&e.onScrubStart(),l(!0),u())},f=()=>{o.current&&r.current&&(o.current=!1,l(!1),d(),setTimeout(()=>{typeof(e==null?void 0:e.onScrubEnd)=="function"&&e.onScrubEnd()},0))},m=C=>{h(),C.preventDefault(),p(C)},p=C=>c({x:C.clientX,y:C.clientY}),g=C=>{C.cancelable&&C.preventDefault(),h(),y(C)},y=C=>{C.cancelable&&C.preventDefault(),c({x:C.changedTouches[0].clientX,y:C.changedTouches[0].clientY})};return(_=i.current)==null||_.addEventListener("mousedown",m),(w=i.current)==null||w.addEventListener("touchstart",g,{passive:!1}),()=>{i.current&&(i.current.removeEventListener("mousedown",m),i.current.removeEventListener("touchstart",g))}},[n,t]),{ref:i,active:a}}function au({value:t,defaultValue:e,finalValue:n,onChange:i=()=>{}}){const[r,o]=b.useState(e!==void 0?e:n),s=(a,...l)=>{o(a),i==null||i(a,...l)};return t!==void 0?[t,i,!0]:[r,s,!1]}function MN(t,e){const n=e-t+1;return Array.from({length:n},(i,r)=>r+t)}const pZ="dots";function JSn({total:t,siblings:e=1,boundaries:n=1,page:i,initialPage:r=1,onChange:o}){const s=Math.max(Math.trunc(t),0),[a,l]=au({value:i,onChange:o,defaultValue:r,finalValue:r}),c=p=>{p<=0?l(1):p>s?l(s):l(p)},u=()=>c(a+1),d=()=>c(a-1),h=()=>c(1),f=()=>c(s);return{range:b.useMemo(()=>{if(e*2+3+n*2>=s)return MN(1,s);const g=Math.max(a-e,n),y=Math.min(a+e,s-n),_=g>n+2,w=y<s-(n+1);if(!_&&w){const C=e*2+n+2;return[...MN(1,C),pZ,...MN(s-(n-1),s)]}if(_&&!w){const C=n+1+2*e;return[...MN(1,n),pZ,...MN(s-C,s)]}return[...MN(1,n),pZ,...MN(g,y),pZ,...MN(s-n+1,s)]},[s,e,a]),active:a,setPage:c,next:u,previous:d,first:h,last:f}}function rde(t,e){return EO("(prefers-reduced-motion: reduce)",t,e)}function Pc(t=!1,e){const{onOpen:n,onClose:i}={},[r,o]=b.useState(t),s=b.useCallback(()=>{o(c=>c||(n==null||n(),!0))},[n]),a=b.useCallback(()=>{o(c=>c&&(i==null||i(),!1))},[i]),l=b.useCallback(()=>{r?a():s()},[a,s,r]);return[r,{open:s,close:a,toggle:l}]}function lSt(t,e,n={autoInvoke:!1}){const i=b.useRef(null),r=b.useCallback((...s)=>{i.current||(i.current=window.setTimeout(()=>{t(s),i.current=null},e))},[e]),o=b.useCallback(()=>{i.current&&(window.clearTimeout(i.current),i.current=null)},[]);return b.useEffect(()=>(n.autoInvoke&&r(),o),[o,r]),{start:r,clear:o}}function eNn(t){const e=b.useRef();return b.useEffect(()=>{e.current=t},[t]),e.current}function tNn(){return navigator.userAgent.includes("OPR")}function nNn(){const[t,e]=b.useState(!1);Uk(()=>{e(typeof window<"u"&&!tNn()&&"EyeDropper"in window)},[]);const n=b.useCallback((i={})=>t?new window.EyeDropper().open(i):Promise.resolve(void 0),[t]);return{supported:t,open:n}}function iNn(t,e,n){const i=b.useRef(),r=b.useRef(null);return b.useEffect(()=>{const o=typeof n=="function"?n():n;return(o||r.current)&&(i.current=new MutationObserver(t),i.current.observe(o||r.current,e)),()=>{var s;(s=i.current)==null||s.disconnect()}},[t,e]),r}function rNn(){const[t,e]=b.useState(!1);return b.useEffect(()=>e(!0),[]),t}function oNn(t,e){window.dispatchEvent(new CustomEvent(t,{detail:e}))}function sNn(t){function e(i){const r=Object.keys(i).reduce((o,s)=>(o[`${t}:${s}`]=a=>i[s](a.detail),o),{});Uk(()=>(Object.keys(r).forEach(o=>{window.removeEventListener(o,r[o]),window.addEventListener(o,r[o])}),()=>Object.keys(r).forEach(o=>{window.removeEventListener(o,r[o])})),[r])}function n(i){return(...r)=>oNn(`${t}:${String(i)}`,r[0])}return[e,n]}var aNn={};function cSt(){return typeof process<"u"&&aNn?"local":"development"}function uSt(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=uSt(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function Vt(){for(var t,e,n=0,i="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=uSt(t))&&(i&&(i+=" "),i+=e);return i}const lNn={};function cNn(t){const e={};return t.forEach(n=>{Object.entries(n).forEach(([i,r])=>{e[i]?e[i]=Vt(e[i],r):e[i]=r})}),e}function ode({theme:t,classNames:e,props:n,stylesCtx:i}){const o=(Array.isArray(e)?e:[e]).map(s=>typeof s=="function"?s(t,n,i):s||lNn);return cNn(o)}function Dne({theme:t,styles:e,props:n,stylesCtx:i}){return(Array.isArray(e)?e:[e]).reduce((o,s)=>typeof s=="function"?{...o,...s(t,n,i)}:{...o,...s},{})}const dSt=b.createContext(null);function IA(){const t=b.useContext(dSt);if(!t)throw new Error("[@mantine/core] MantineProvider was not found in tree");return t}function uNn(){return IA().cssVariablesResolver}function dNn(){return IA().classNamesPrefix}function Hje(){return IA().getStyleNonce}function hNn(){return IA().withStaticClasses}function fNn(){return IA().headless}function mNn(){var t;return(t=IA().stylesTransform)==null?void 0:t.sx}function pNn(){var t;return(t=IA().stylesTransform)==null?void 0:t.styles}function gNn(t){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(t)}function bNn(t){let e=t.replace("#","");if(e.length===3){const s=e.split("");e=[s[0],s[0],s[1],s[1],s[2],s[2]].join("")}if(e.length===8){const s=parseInt(e.slice(6,8),16)/255;return{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:s}}const n=parseInt(e,16),i=n>>16&255,r=n>>8&255,o=n&255;return{r:i,g:r,b:o,a:1}}function vNn(t){const[e,n,i,r]=t.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:e,g:n,b:i,a:r||1}}function yNn(t){const e=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,n=t.match(e);if(!n)return{r:0,g:0,b:0,a:1};const i=parseInt(n[1],10),r=parseInt(n[2],10)/100,o=parseInt(n[3],10)/100,s=n[5]?parseFloat(n[5]):void 0,a=(1-Math.abs(2*o-1))*r,l=i/60,c=a*(1-Math.abs(l%2-1)),u=o-a/2;let d,h,f;return l>=0&&l<1?(d=a,h=c,f=0):l>=1&&l<2?(d=c,h=a,f=0):l>=2&&l<3?(d=0,h=a,f=c):l>=3&&l<4?(d=0,h=c,f=a):l>=4&&l<5?(d=c,h=0,f=a):(d=a,h=0,f=c),{r:Math.round((d+u)*255),g:Math.round((h+u)*255),b:Math.round((f+u)*255),a:s||1}}function Wje(t){return gNn(t)?bNn(t):t.startsWith("rgb")?vNn(t):t.startsWith("hsl")?yNn(t):{r:0,g:0,b:0,a:1}}function gZ(t,e){if(t.startsWith("var("))return`color-mix(in srgb, ${t}, black ${e*100}%)`;const{r:n,g:i,b:r,a:o}=Wje(t),s=1-e,a=l=>Math.round(l*s);return`rgba(${a(n)}, ${a(i)}, ${a(r)}, ${o})`}function kz(t,e){return typeof t.primaryShade=="number"?t.primaryShade:e==="dark"?t.primaryShade.dark:t.primaryShade.light}function k_e(t){return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function _Nn(t){const e=t.match(/oklch\((.*?)%\s/);return e?parseFloat(e[1]):null}function xNn(t){if(t.startsWith("oklch("))return(_Nn(t)||0)/100;const{r:e,g:n,b:i}=Wje(t),r=e/255,o=n/255,s=i/255,a=k_e(r),l=k_e(o),c=k_e(s);return .2126*a+.7152*l+.0722*c}function xV(t,e=.179){return t.startsWith("var(")?!1:xNn(t)>e}function Kk({color:t,theme:e,colorScheme:n}){if(typeof t!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof t}`);if(t==="bright")return{color:t,value:n==="dark"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:xV(n==="dark"?e.white:e.black,e.luminanceThreshold),variable:"--mantine-color-bright"};if(t==="dimmed")return{color:t,value:n==="dark"?e.colors.dark[2]:e.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:xV(n==="dark"?e.colors.dark[2]:e.colors.gray[6],e.luminanceThreshold),variable:"--mantine-color-dimmed"};if(t==="white"||t==="black")return{color:t,value:t==="white"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:xV(t==="white"?e.white:e.black,e.luminanceThreshold),variable:`--mantine-color-${t}`};const[i,r]=t.split("."),o=r?Number(r):void 0,s=i in e.colors;if(s){const a=o!==void 0?e.colors[i][o]:e.colors[i][kz(e,n||"light")];return{color:i,value:a,shade:o,isThemeColor:s,isLight:xV(a,e.luminanceThreshold),variable:r?`--mantine-color-${i}-${o}`:`--mantine-color-${i}-filled`}}return{color:t,value:t,isThemeColor:s,isLight:xV(t,e.luminanceThreshold),shade:o,variable:void 0}}function Xa(t,e){const n=Kk({color:t||e.primaryColor,theme:e});return n.variable?`var(${n.variable})`:t}function IEe(t,e){const n={from:(t==null?void 0:t.from)||e.defaultGradient.from,to:(t==null?void 0:t.to)||e.defaultGradient.to,deg:(t==null?void 0:t.deg)||e.defaultGradient.deg||0},i=Xa(n.from,e),r=Xa(n.to,e);return`linear-gradient(${n.deg}deg, ${i} 0%, ${r} 100%)`}function Q_(t,e){if(typeof t!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";if(t.startsWith("var(")){const o=(1-e)*100;return`color-mix(in srgb, ${t}, transparent ${o}%)`}if(t.startsWith("oklch"))return t.includes("/")?t.replace(/\/\s*[\d.]+\s*\)/,`/ ${e})`):t.replace(")",` / ${e})`);const{r:n,g:i,b:r}=Wje(t);return`rgba(${n}, ${i}, ${r}, ${e})`}const MP=Q_,wNn=({color:t,theme:e,variant:n,gradient:i,autoContrast:r})=>{const o=Kk({color:t,theme:e}),s=typeof r=="boolean"?r:e.autoContrast;if(n==="filled"){const a=s&&o.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return o.isThemeColor?o.shade===void 0?{background:`var(--mantine-color-${t}-filled)`,hover:`var(--mantine-color-${t}-filled-hover)`,color:a,border:`${sn(1)} solid transparent`}:{background:`var(--mantine-color-${o.color}-${o.shade})`,hover:`var(--mantine-color-${o.color}-${o.shade===9?8:o.shade+1})`,color:a,border:`${sn(1)} solid transparent`}:{background:t,hover:gZ(t,.1),color:a,border:`${sn(1)} solid transparent`}}if(n==="light"){if(o.isThemeColor){if(o.shade===void 0)return{background:`var(--mantine-color-${t}-light)`,hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${sn(1)} solid transparent`};const a=e.colors[o.color][o.shade];return{background:Q_(a,.1),hover:Q_(a,.12),color:`var(--mantine-color-${o.color}-${Math.min(o.shade,6)})`,border:`${sn(1)} solid transparent`}}return{background:Q_(t,.1),hover:Q_(t,.12),color:t,border:`${sn(1)} solid transparent`}}if(n==="outline")return o.isThemeColor?o.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${t}-outline-hover)`,color:`var(--mantine-color-${t}-outline)`,border:`${sn(1)} solid var(--mantine-color-${t}-outline)`}:{background:"transparent",hover:Q_(e.colors[o.color][o.shade],.05),color:`var(--mantine-color-${o.color}-${o.shade})`,border:`${sn(1)} solid var(--mantine-color-${o.color}-${o.shade})`}:{background:"transparent",hover:Q_(t,.05),color:t,border:`${sn(1)} solid ${t}`};if(n==="subtle"){if(o.isThemeColor){if(o.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${sn(1)} solid transparent`};const a=e.colors[o.color][o.shade];return{background:"transparent",hover:Q_(a,.12),color:`var(--mantine-color-${o.color}-${Math.min(o.shade,6)})`,border:`${sn(1)} solid transparent`}}return{background:"transparent",hover:Q_(t,.12),color:t,border:`${sn(1)} solid transparent`}}return n==="transparent"?o.isThemeColor?o.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${t}-light-color)`,border:`${sn(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${o.color}-${Math.min(o.shade,6)})`,border:`${sn(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:t,border:`${sn(1)} solid transparent`}:n==="white"?o.isThemeColor?o.shade===void 0?{background:"var(--mantine-color-white)",hover:gZ(e.white,.01),color:`var(--mantine-color-${t}-filled)`,border:`${sn(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:gZ(e.white,.01),color:`var(--mantine-color-${o.color}-${o.shade})`,border:`${sn(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:gZ(e.white,.01),color:t,border:`${sn(1)} solid transparent`}:n==="gradient"?{background:IEe(i,e),hover:IEe(i,e),color:"var(--mantine-color-white)",border:"none"}:n==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${sn(1)} solid var(--mantine-color-default-border)`}:{}},CNn={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},cJe="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",sde={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:CNn,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:wNn,autoContrast:!1,luminanceThreshold:.3,fontFamily:cJe,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:cJe,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:sn(34),lineHeight:"1.3"},h2:{fontSize:sn(26),lineHeight:"1.35"},h3:{fontSize:sn(22),lineHeight:"1.4"},h4:{fontSize:sn(18),lineHeight:"1.45"},h5:{fontSize:sn(16),lineHeight:"1.5"},h6:{fontSize:sn(14),lineHeight:"1.5"}}},fontSizes:{xs:sn(12),sm:sn(14),md:sn(16),lg:sn(18),xl:sn(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:sn(2),sm:sn(4),md:sn(8),lg:sn(16),xl:sn(32)},spacing:{xs:sn(10),sm:sn(12),md:sn(16),lg:sn(20),xl:sn(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${sn(1)} ${sn(3)} rgba(0, 0, 0, 0.05), 0 ${sn(1)} ${sn(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${sn(1)} ${sn(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${sn(10)} ${sn(15)} ${sn(-5)}, rgba(0, 0, 0, 0.04) 0 ${sn(7)} ${sn(7)} ${sn(-5)}`,md:`0 ${sn(1)} ${sn(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${sn(20)} ${sn(25)} ${sn(-5)}, rgba(0, 0, 0, 0.04) 0 ${sn(10)} ${sn(10)} ${sn(-5)}`,lg:`0 ${sn(1)} ${sn(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${sn(28)} ${sn(23)} ${sn(-7)}, rgba(0, 0, 0, 0.04) 0 ${sn(12)} ${sn(12)} ${sn(-7)}`,xl:`0 ${sn(1)} ${sn(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${sn(36)} ${sn(28)} ${sn(-7)}, rgba(0, 0, 0, 0.04) 0 ${sn(17)} ${sn(17)} ${sn(-7)}`},other:{},components:{}};function uJe(t){return t==="auto"||t==="dark"||t==="light"}function SNn({key:t="mantine-color-scheme-value"}={}){let e;return{get:n=>{if(typeof window>"u")return n;try{const i=window.localStorage.getItem(t);return uJe(i)?i:n}catch{return n}},set:n=>{try{window.localStorage.setItem(t,n)}catch(i){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",i)}},subscribe:n=>{e=i=>{i.storageArea===window.localStorage&&i.key===t&&uJe(i.newValue)&&n(i.newValue)},window.addEventListener("storage",e)},unsubscribe:()=>{window.removeEventListener("storage",e)},clear:()=>{window.localStorage.removeItem(t)}}}const NNn="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",dJe="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function M_e(t){return t<0||t>9?!1:parseInt(t.toString(),10)===t}function hJe(t){if(!(t.primaryColor in t.colors))throw new Error(NNn);if(typeof t.primaryShade=="object"&&(!M_e(t.primaryShade.dark)||!M_e(t.primaryShade.light)))throw new Error(dJe);if(typeof t.primaryShade=="number"&&!M_e(t.primaryShade))throw new Error(dJe)}function hSt(t,e){var i;if(!e)return hJe(t),t;const n=$je(t,e);return e.fontFamily&&!((i=e.headings)!=null&&i.fontFamily)&&(n.headings.fontFamily=e.fontFamily),hJe(n),n}const Uje=b.createContext(null),ENn=()=>b.useContext(Uje)||sde;function zc(){const t=b.useContext(Uje);if(!t)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return t}function fSt({theme:t,children:e,inherit:n=!0}){const i=ENn(),r=b.useMemo(()=>hSt(n?i:sde,t),[t,i,n]);return ne.jsx(Uje.Provider,{value:r,children:e})}fSt.displayName="@mantine/core/MantineThemeProvider";function DNn(){const t=zc(),e=Hje(),n=Tu(t.breakpoints).reduce((i,r)=>{const o=t.breakpoints[r].includes("px"),s=Dz(t.breakpoints[r]),a=o?`${s-.1}px`:oJe(s-.1),l=o?`${s}px`:oJe(s);return`${i}@media (max-width: ${a}) {.mantine-visible-from-${r} {display: none !important;}}@media (min-width: ${l}) {.mantine-hidden-from-${r} {display: none !important;}}`},"");return ne.jsx("style",{"data-mantine-styles":"classes",nonce:e==null?void 0:e(),dangerouslySetInnerHTML:{__html:n}})}function L_e(t){return Object.entries(t).map(([e,n])=>`${e}: ${n};`).join("")}function wV(t,e){return(Array.isArray(t)?t:[t]).reduce((i,r)=>`${r}{${i}}`,e)}function kNn(t,e){const n=L_e(t.variables),i=n?wV(e,n):"",r=L_e(t.dark),o=L_e(t.light),s=r?wV(e===":host"?`${e}([data-mantine-color-scheme="dark"])`:`${e}[data-mantine-color-scheme="dark"]`,r):"",a=o?wV(e===":host"?`${e}([data-mantine-color-scheme="light"])`:`${e}[data-mantine-color-scheme="light"]`,o):"";return`${i}${s}${a}`}function zF({color:t,theme:e,autoContrast:n}){return(typeof n=="boolean"?n:e.autoContrast)&&Kk({color:t||e.primaryColor,theme:e}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function fJe(t,e){return zF({color:t.colors[t.primaryColor][kz(t,e)],theme:t,autoContrast:null})}function bZ({theme:t,color:e,colorScheme:n,name:i=e,withColorValues:r=!0}){if(!t.colors[e])return{};if(n==="light"){const a=kz(t,"light"),l={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-filled)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${a})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${a===9?8:a+1})`,[`--mantine-color-${i}-light`]:MP(t.colors[e][a],.1),[`--mantine-color-${i}-light-hover`]:MP(t.colors[e][a],.12),[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-${a})`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${a})`,[`--mantine-color-${i}-outline-hover`]:MP(t.colors[e][a],.05)};return r?{[`--mantine-color-${i}-0`]:t.colors[e][0],[`--mantine-color-${i}-1`]:t.colors[e][1],[`--mantine-color-${i}-2`]:t.colors[e][2],[`--mantine-color-${i}-3`]:t.colors[e][3],[`--mantine-color-${i}-4`]:t.colors[e][4],[`--mantine-color-${i}-5`]:t.colors[e][5],[`--mantine-color-${i}-6`]:t.colors[e][6],[`--mantine-color-${i}-7`]:t.colors[e][7],[`--mantine-color-${i}-8`]:t.colors[e][8],[`--mantine-color-${i}-9`]:t.colors[e][9],...l}:l}const o=kz(t,"dark"),s={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-4)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${o})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${o===9?8:o+1})`,[`--mantine-color-${i}-light`]:MP(t.colors[e][Math.max(0,o-2)],.15),[`--mantine-color-${i}-light-hover`]:MP(t.colors[e][Math.max(0,o-2)],.2),[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-${Math.max(o-5,0)})`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${Math.max(o-4,0)})`,[`--mantine-color-${i}-outline-hover`]:MP(t.colors[e][Math.max(o-4,0)],.05)};return r?{[`--mantine-color-${i}-0`]:t.colors[e][0],[`--mantine-color-${i}-1`]:t.colors[e][1],[`--mantine-color-${i}-2`]:t.colors[e][2],[`--mantine-color-${i}-3`]:t.colors[e][3],[`--mantine-color-${i}-4`]:t.colors[e][4],[`--mantine-color-${i}-5`]:t.colors[e][5],[`--mantine-color-${i}-6`]:t.colors[e][6],[`--mantine-color-${i}-7`]:t.colors[e][7],[`--mantine-color-${i}-8`]:t.colors[e][8],[`--mantine-color-${i}-9`]:t.colors[e][9],...s}:s}function MNn(t){return!!t&&typeof t=="object"&&"mantine-virtual-color"in t}function LP(t,e,n){Tu(e).forEach(i=>Object.assign(t,{[`--mantine-${n}-${i}`]:e[i]}))}const mSt=t=>{const e=kz(t,"light"),n=t.defaultRadius in t.radius?t.radius[t.defaultRadius]:sn(t.defaultRadius),i={variables:{"--mantine-scale":t.scale.toString(),"--mantine-cursor-type":t.cursorType,"--mantine-color-scheme":"light dark","--mantine-webkit-font-smoothing":t.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":t.fontSmoothing?"grayscale":"unset","--mantine-color-white":t.white,"--mantine-color-black":t.black,"--mantine-line-height":t.lineHeights.md,"--mantine-font-family":t.fontFamily,"--mantine-font-family-monospace":t.fontFamilyMonospace,"--mantine-font-family-headings":t.headings.fontFamily,"--mantine-heading-font-weight":t.headings.fontWeight,"--mantine-heading-text-wrap":t.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${t.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${t.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${t.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${t.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${t.primaryColor}-light-color)`},light:{"--mantine-primary-color-contrast":fJe(t,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":t.black,"--mantine-color-body":t.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-${e})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)"},dark:{"--mantine-primary-color-contrast":fJe(t,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)"}};LP(i.variables,t.breakpoints,"breakpoint"),LP(i.variables,t.spacing,"spacing"),LP(i.variables,t.fontSizes,"font-size"),LP(i.variables,t.lineHeights,"line-height"),LP(i.variables,t.shadows,"shadow"),LP(i.variables,t.radius,"radius"),t.colors[t.primaryColor].forEach((o,s)=>{i.variables[`--mantine-primary-color-${s}`]=`var(--mantine-color-${t.primaryColor}-${s})`}),Tu(t.colors).forEach(o=>{const s=t.colors[o];if(MNn(s)){Object.assign(i.light,bZ({theme:t,name:s.name,color:s.light,colorScheme:"light",withColorValues:!0})),Object.assign(i.dark,bZ({theme:t,name:s.name,color:s.dark,colorScheme:"dark",withColorValues:!0}));return}s.forEach((a,l)=>{i.variables[`--mantine-color-${o}-${l}`]=a}),Object.assign(i.light,bZ({theme:t,color:o,colorScheme:"light",withColorValues:!1})),Object.assign(i.dark,bZ({theme:t,color:o,colorScheme:"dark",withColorValues:!1}))});const r=t.headings.sizes;return Tu(r).forEach(o=>{i.variables[`--mantine-${o}-font-size`]=r[o].fontSize,i.variables[`--mantine-${o}-line-height`]=r[o].lineHeight,i.variables[`--mantine-${o}-font-weight`]=r[o].fontWeight||t.headings.fontWeight}),i};function LNn({theme:t,generator:e}){const n=mSt(t),i=e==null?void 0:e(t);return i?$je(n,i):n}const T_e=mSt(sde);function TNn(t){const e={variables:{},light:{},dark:{}};return Tu(t.variables).forEach(n=>{T_e.variables[n]!==t.variables[n]&&(e.variables[n]=t.variables[n])}),Tu(t.light).forEach(n=>{T_e.light[n]!==t.light[n]&&(e.light[n]=t.light[n])}),Tu(t.dark).forEach(n=>{T_e.dark[n]!==t.dark[n]&&(e.dark[n]=t.dark[n])}),e}function INn(t){return`
  ${t}[data-mantine-color-scheme="dark"] { --mantine-color-scheme: dark; }
  ${t}[data-mantine-color-scheme="light"] { --mantine-color-scheme: light; }
`}function pSt({cssVariablesSelector:t,deduplicateCssVariables:e}){const n=zc(),i=Hje(),r=uNn(),o=LNn({theme:n,generator:r}),s=t===":root"&&e,a=s?TNn(o):o,l=kNn(a,t);return l?ne.jsx("style",{"data-mantine-styles":!0,nonce:i==null?void 0:i(),dangerouslySetInnerHTML:{__html:`${l}${s?"":INn(t)}`}}):null}pSt.displayName="@mantine/CssVariables";function ANn(){const t=console.error;console.error=(...e)=>{e.length>1&&typeof e[0]=="string"&&e[0].toLowerCase().includes("extra attributes from the server")&&typeof e[1]=="string"&&e[1].toLowerCase().includes("data-mantine-color-scheme")||t(...e)}}function TP(t,e){var i;const n=t!=="auto"?t:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";(i=e())==null||i.setAttribute("data-mantine-color-scheme",n)}function RNn({manager:t,defaultColorScheme:e,getRootElement:n,forceColorScheme:i}){const r=b.useRef(),[o,s]=b.useState(()=>t.get(e)),a=i||o,l=b.useCallback(u=>{i||(TP(u,n),s(u),t.set(u))},[t.set,a,i]),c=b.useCallback(()=>{s(e),TP(e,n),t.clear()},[t.clear,e]);return b.useEffect(()=>(t.subscribe(l),t.unsubscribe),[t.subscribe,t.unsubscribe]),Uk(()=>{TP(t.get(e),n)},[]),b.useEffect(()=>{var d;if(i)return TP(i,n),()=>{};i===void 0&&TP(o,n),r.current=window.matchMedia("(prefers-color-scheme: dark)");const u=h=>{o==="auto"&&TP(h.matches?"dark":"light",n)};return(d=r.current)==null||d.addEventListener("change",u),()=>{var h;return(h=r.current)==null?void 0:h.removeEventListener("change",u)}},[o,i]),{colorScheme:a,setColorScheme:l,clearColorScheme:c}}function PNn({respectReducedMotion:t,getRootElement:e}){Uk(()=>{var n;t&&((n=e())==null||n.setAttribute("data-respect-reduced-motion","true"))},[t])}ANn();function gSt({theme:t,children:e,getStyleNonce:n,withStaticClasses:i=!0,withGlobalClasses:r=!0,deduplicateCssVariables:o=!0,withCssVariables:s=!0,cssVariablesSelector:a=":root",classNamesPrefix:l="mantine",colorSchemeManager:c=SNn(),defaultColorScheme:u="light",getRootElement:d=()=>document.documentElement,cssVariablesResolver:h,forceColorScheme:f,stylesTransform:m}){const{colorScheme:p,setColorScheme:g,clearColorScheme:y}=RNn({defaultColorScheme:u,forceColorScheme:f,manager:c,getRootElement:d});return PNn({respectReducedMotion:(t==null?void 0:t.respectReducedMotion)||!1,getRootElement:d}),ne.jsx(dSt.Provider,{value:{colorScheme:p,setColorScheme:g,clearColorScheme:y,getRootElement:d,classNamesPrefix:l,getStyleNonce:n,cssVariablesResolver:h,cssVariablesSelector:a,withStaticClasses:i,stylesTransform:m},children:ne.jsxs(fSt,{theme:t,children:[s&&ne.jsx(pSt,{cssVariablesSelector:a,deduplicateCssVariables:o}),r&&ne.jsx(DNn,{}),e]})})}gSt.displayName="@mantine/core/MantineProvider";function zv({classNames:t,styles:e,props:n,stylesCtx:i}){const r=zc();return{resolvedClassNames:ode({theme:r,classNames:t,props:n,stylesCtx:i||void 0}),resolvedStyles:Dne({theme:r,styles:e,props:n,stylesCtx:i||void 0})}}const ONn={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function jNn({theme:t,options:e,unstyled:n}){return Vt((e==null?void 0:e.focusable)&&!n&&(t.focusClassName||ONn[t.focusRing]),(e==null?void 0:e.active)&&!n&&t.activeClassName)}function FNn({selector:t,stylesCtx:e,options:n,props:i,theme:r}){return ode({theme:r,classNames:n==null?void 0:n.classNames,props:(n==null?void 0:n.props)||i,stylesCtx:e})[t]}function mJe({selector:t,stylesCtx:e,theme:n,classNames:i,props:r}){return ode({theme:n,classNames:i,props:r,stylesCtx:e})[t]}function $Nn({rootSelector:t,selector:e,className:n}){return t===e?n:void 0}function VNn({selector:t,classes:e,unstyled:n}){return n?void 0:e[t]}function BNn({themeName:t,classNamesPrefix:e,selector:n,withStaticClass:i}){return i===!1?[]:t.map(r=>`${e}-${r}-${n}`)}function zNn({themeName:t,theme:e,selector:n,props:i,stylesCtx:r}){return t.map(o=>{var s,a;return(a=ode({theme:e,classNames:(s=e.components[o])==null?void 0:s.classNames,props:i,stylesCtx:r}))==null?void 0:a[n]})}function HNn({options:t,classes:e,selector:n,unstyled:i}){return t!=null&&t.variant&&!i?e[`${n}--${t.variant}`]:void 0}function WNn({theme:t,options:e,themeName:n,selector:i,classNamesPrefix:r,classNames:o,classes:s,unstyled:a,className:l,rootSelector:c,props:u,stylesCtx:d,withStaticClasses:h,headless:f,transformedStyles:m}){return Vt(jNn({theme:t,options:e,unstyled:a||f}),zNn({theme:t,themeName:n,selector:i,props:u,stylesCtx:d}),HNn({options:e,classes:s,selector:i,unstyled:a}),mJe({selector:i,stylesCtx:d,theme:t,classNames:o,props:u}),mJe({selector:i,stylesCtx:d,theme:t,classNames:m,props:u}),FNn({selector:i,stylesCtx:d,options:e,props:u,theme:t}),$Nn({rootSelector:c,selector:i,className:l}),VNn({selector:i,classes:s,unstyled:a||f}),h&&!f&&BNn({themeName:n,classNamesPrefix:r,selector:i,withStaticClass:e==null?void 0:e.withStaticClass}),e==null?void 0:e.className)}function UNn({theme:t,themeName:e,props:n,stylesCtx:i,selector:r}){return e.map(o=>{var s;return Dne({theme:t,styles:(s=t.components[o])==null?void 0:s.styles,props:n,stylesCtx:i})[r]}).reduce((o,s)=>({...o,...s}),{})}function AEe({style:t,theme:e}){return Array.isArray(t)?[...t].reduce((n,i)=>({...n,...AEe({style:i,theme:e})}),{}):typeof t=="function"?t(e):t??{}}function KNn(t){return t.reduce((e,n)=>(n&&Object.keys(n).forEach(i=>{e[i]={...e[i],...Wk(n[i])}}),e),{})}function qNn({vars:t,varsResolver:e,theme:n,props:i,stylesCtx:r,selector:o,themeName:s,headless:a}){var l;return(l=KNn([a?{}:e==null?void 0:e(n,i,r),...s.map(c=>{var u,d,h;return(h=(d=(u=n.components)==null?void 0:u[c])==null?void 0:d.vars)==null?void 0:h.call(d,n,i,r)}),t==null?void 0:t(n,i,r)]))==null?void 0:l[o]}function GNn({theme:t,themeName:e,selector:n,options:i,props:r,stylesCtx:o,rootSelector:s,styles:a,style:l,vars:c,varsResolver:u,headless:d,withStylesTransform:h}){return{...!h&&UNn({theme:t,themeName:e,props:r,stylesCtx:o,selector:n}),...!h&&Dne({theme:t,styles:a,props:r,stylesCtx:o})[n],...!h&&Dne({theme:t,styles:i==null?void 0:i.styles,props:(i==null?void 0:i.props)||r,stylesCtx:o})[n],...qNn({theme:t,props:r,stylesCtx:o,vars:c,varsResolver:u,selector:n,themeName:e,headless:d}),...s===n?AEe({style:l,theme:t}):null,...AEe({style:i==null?void 0:i.style,theme:t})}}function YNn({props:t,stylesCtx:e,themeName:n}){var s;const i=zc(),r=(s=pNn())==null?void 0:s();return{getTransformedStyles:a=>r?[...a.map(c=>r(c,{props:t,theme:i,ctx:e})),...n.map(c=>{var u;return r((u=i.components[c])==null?void 0:u.styles,{props:t,theme:i,ctx:e})})].filter(Boolean):[],withStylesTransform:!!r}}function hi({name:t,classes:e,props:n,stylesCtx:i,className:r,style:o,rootSelector:s="root",unstyled:a,classNames:l,styles:c,vars:u,varsResolver:d}){const h=zc(),f=dNn(),m=hNn(),p=fNn(),g=(Array.isArray(t)?t:[t]).filter(w=>w),{withStylesTransform:y,getTransformedStyles:_}=YNn({props:n,stylesCtx:i,themeName:g});return(w,C)=>({className:WNn({theme:h,options:C,themeName:g,selector:w,classNamesPrefix:f,classNames:l,classes:e,unstyled:a,className:r,rootSelector:s,props:n,stylesCtx:i,withStaticClasses:m,headless:p,transformedStyles:_([C==null?void 0:C.styles,c])}),style:GNn({theme:h,themeName:g,selector:w,options:C,props:n,stylesCtx:i,rootSelector:s,styles:c,style:o,vars:u,varsResolver:d,headless:p,withStylesTransform:y})})}function ade(t,e){return typeof t=="boolean"?t:e.autoContrast}function Kt(t,e,n){var s;const i=zc(),r=(s=i.components[t])==null?void 0:s.defaultProps,o=typeof r=="function"?r(i):r;return{...e,...o,...Wk(n)}}const Cee=["xs","sm","md","lg","xl"];function XNn(t,e){if(!e)return t.base;let n=Cee.indexOf(e);for(;n>=0;){if(Cee[n]in t)return t[Cee[n]];n-=1}return t.base}function ZNn(t){return t.findLastIndex(e=>e)}function QNn(t,e){const n=zc(),i=EO(`(min-width: ${n.breakpoints.xs})`,!1,e),r=EO(`(min-width: ${n.breakpoints.sm})`,!1,e),o=EO(`(min-width: ${n.breakpoints.md})`,!1,e),s=EO(`(min-width: ${n.breakpoints.lg})`,!1,e),a=EO(`(min-width: ${n.breakpoints.xl})`,!1,e),c=ZNn([i,r,o,s,a]);return XNn(t,Cee[c])}function I_e(t){return Tu(t).reduce((e,n)=>t[n]!==void 0?`${e}${wSn(n)}:${t[n]};`:e,"").trim()}function JNn({selector:t,styles:e,media:n,container:i}){const r=e?I_e(e):"",o=Array.isArray(n)?n.map(a=>`@media${a.query}{${t}{${I_e(a.styles)}}}`):[],s=Array.isArray(i)?i.map(a=>`@container ${a.query}{${t}{${I_e(a.styles)}}}`):[];return`${r?`${t}{${r}}`:""}${o.join("")}${s.join("")}`.trim()}function HF(t){const e=Hje();return ne.jsx("style",{"data-mantine-styles":"inline",nonce:e==null?void 0:e(),dangerouslySetInnerHTML:{__html:JNn(t)}})}function WF(t){const{m:e,mx:n,my:i,mt:r,mb:o,ml:s,mr:a,me:l,ms:c,p:u,px:d,py:h,pt:f,pb:m,pl:p,pr:g,pe:y,ps:_,bd:w,bg:C,c:N,opacity:E,ff:D,fz:k,fw:M,lts:T,ta:A,lh:R,fs:P,tt:O,td:V,w:F,miw:$,maw:B,h:z,mih:H,mah:K,bgsz:q,bgp:U,bgr:Y,bga:J,pos:ae,top:se,left:oe,bottom:fe,right:de,inset:ie,display:Q,flex:be,hiddenFrom:le,visibleFrom:Ne,lightHidden:Le,darkHidden:Te,sx:De,...Pe}=t;return{styleProps:Wk({m:e,mx:n,my:i,mt:r,mb:o,ml:s,mr:a,me:l,ms:c,p:u,px:d,py:h,pt:f,pb:m,pl:p,pr:g,pe:y,ps:_,bd:w,bg:C,c:N,opacity:E,ff:D,fz:k,fw:M,lts:T,ta:A,lh:R,fs:P,tt:O,td:V,w:F,miw:$,maw:B,h:z,mih:H,mah:K,bgsz:q,bgp:U,bgr:Y,bga:J,pos:ae,top:se,left:oe,bottom:fe,right:de,inset:ie,display:Q,flex:be,hiddenFrom:le,visibleFrom:Ne,lightHidden:Le,darkHidden:Te,sx:De}),rest:Pe}}const eEn={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function Kje(t,e){const n=Kk({color:t,theme:e});return n.color==="dimmed"?"var(--mantine-color-dimmed)":n.color==="bright"?"var(--mantine-color-bright)":n.variable?`var(${n.variable})`:n.color}function tEn(t,e){const n=Kk({color:t,theme:e});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:Kje(t,e)}function nEn(t,e){if(typeof t=="number")return sn(t);if(typeof t=="string"){const[n,i,...r]=t.split(" ").filter(s=>s.trim()!=="");let o=`${sn(n)}`;return i&&(o+=` ${i}`),r.length>0&&(o+=` ${Kje(r.join(" "),e)}`),o.trim()}return t}const pJe={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function iEn(t){return typeof t=="string"&&t in pJe?pJe[t]:t}const rEn=["h1","h2","h3","h4","h5","h6"];function oEn(t,e){return typeof t=="string"&&t in e.fontSizes?`var(--mantine-font-size-${t})`:typeof t=="string"&&rEn.includes(t)?`var(--mantine-${t}-font-size)`:typeof t=="number"||typeof t=="string"?sn(t):t}function sEn(t){return t}const aEn=["h1","h2","h3","h4","h5","h6"];function lEn(t,e){return typeof t=="string"&&t in e.lineHeights?`var(--mantine-line-height-${t})`:typeof t=="string"&&aEn.includes(t)?`var(--mantine-${t}-line-height)`:t}function cEn(t){return typeof t=="number"?sn(t):t}function uEn(t,e){if(typeof t=="number")return sn(t);if(typeof t=="string"){const n=t.replace("-","");if(!(n in e.spacing))return sn(t);const i=`--mantine-spacing-${n}`;return t.startsWith("-")?`calc(var(${i}) * -1)`:`var(${i})`}return t}const A_e={color:Kje,textColor:tEn,fontSize:oEn,spacing:uEn,identity:sEn,size:cEn,lineHeight:lEn,fontFamily:iEn,border:nEn};function gJe(t){return t.replace("(min-width: ","").replace("em)","")}function dEn({media:t,...e}){const i=Object.keys(t).sort((r,o)=>Number(gJe(r))-Number(gJe(o))).map(r=>({query:r,styles:t[r]}));return{...e,media:i}}function hEn(t){if(typeof t!="object"||t===null)return!1;const e=Object.keys(t);return!(e.length===1&&e[0]==="base")}function fEn(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function mEn(t){return typeof t=="object"&&t!==null?Tu(t).filter(e=>e!=="base"):[]}function pEn(t,e){return typeof t=="object"&&t!==null&&e in t?t[e]:t}function bSt({styleProps:t,data:e,theme:n}){return dEn(Tu(t).reduce((i,r)=>{if(r==="hiddenFrom"||r==="visibleFrom"||r==="sx")return i;const o=e[r],s=Array.isArray(o.property)?o.property:[o.property],a=fEn(t[r]);if(!hEn(t[r]))return s.forEach(c=>{i.inlineStyles[c]=A_e[o.type](a,n)}),i;i.hasResponsiveStyles=!0;const l=mEn(t[r]);return s.forEach(c=>{a&&(i.styles[c]=A_e[o.type](a,n)),l.forEach(u=>{const d=`(min-width: ${n.breakpoints[u]})`;i.media[d]={...i.media[d],[c]:A_e[o.type](pEn(t[r],u),n)}})}),i},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function NK(){return`__m__-${b.useId().replace(/:/g,"")}`}function qje(t,e){return Array.isArray(t)?[...t].reduce((n,i)=>({...n,...qje(i,e)}),{}):typeof t=="function"?t(e):t??{}}function vSt(t){return t.startsWith("data-")?t:`data-${t}`}function gEn(t){return Object.keys(t).reduce((e,n)=>{const i=t[n];return i===void 0||i===""||i===!1||i===null||(e[vSt(n)]=t[n]),e},{})}function ySt(t){return t?typeof t=="string"?{[vSt(t)]:!0}:Array.isArray(t)?[...t].reduce((e,n)=>({...e,...ySt(n)}),{}):gEn(t):null}function REe(t,e){return Array.isArray(t)?[...t].reduce((n,i)=>({...n,...REe(i,e)}),{}):typeof t=="function"?t(e):t??{}}function bEn({theme:t,style:e,vars:n,styleProps:i}){const r=REe(e,t),o=REe(n,t);return{...r,...o,...i}}const _St=b.forwardRef(({component:t,style:e,__vars:n,className:i,variant:r,mod:o,size:s,hiddenFrom:a,visibleFrom:l,lightHidden:c,darkHidden:u,renderRoot:d,__size:h,...f},m)=>{var k;const p=zc(),g=t||"div",{styleProps:y,rest:_}=WF(f),w=mNn(),C=(k=w==null?void 0:w())==null?void 0:k(y.sx),N=NK(),E=bSt({styleProps:y,theme:p,data:eEn}),D={ref:m,style:bEn({theme:p,style:e,vars:n,styleProps:E.inlineStyles}),className:Vt(i,C,{[N]:E.hasResponsiveStyles,"mantine-light-hidden":c,"mantine-dark-hidden":u,[`mantine-hidden-from-${a}`]:a,[`mantine-visible-from-${l}`]:l}),"data-variant":r,"data-size":ZCt(s)?void 0:s||void 0,size:h,...ySt(o),..._};return ne.jsxs(ne.Fragment,{children:[E.hasResponsiveStyles&&ne.jsx(HF,{selector:`.${N}`,styles:E.styles,media:E.media}),typeof d=="function"?d(D):ne.jsx(g,{...D})]})});_St.displayName="@mantine/core/Box";const mn=_St;function xSt(t){return t}function vEn(t){const e=t;return n=>{const i=b.forwardRef((r,o)=>ne.jsx(e,{...n,...r,ref:o}));return i.extend=e.extend,i.displayName=`WithProps(${e.displayName})`,i}}function Dn(t){const e=b.forwardRef(t);return e.extend=xSt,e.withProps=n=>{const i=b.forwardRef((r,o)=>ne.jsx(e,{...n,...r,ref:o}));return i.extend=e.extend,i.displayName=`WithProps(${e.displayName})`,i},e}function Cd(t){const e=b.forwardRef(t);return e.withProps=n=>{const i=b.forwardRef((r,o)=>ne.jsx(e,{...n,...r,ref:o}));return i.extend=e.extend,i.displayName=`WithProps(${e.displayName})`,i},e.extend=xSt,e}const yEn=b.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function qk(){return b.useContext(yEn)}function _En(t){if(!t||typeof t=="string")return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function R_e(t){return t!=null&&t.current?t.current.scrollHeight:"auto"}const CV=typeof window<"u"&&window.requestAnimationFrame;function xEn({transitionDuration:t,transitionTimingFunction:e="ease",onTransitionEnd:n=()=>{},opened:i}){const r=b.useRef(null),o=0,s={display:"none",height:0,overflow:"hidden"},[a,l]=b.useState(i?{}:s),c=m=>{Fc.flushSync(()=>l(m))},u=m=>{c(p=>({...p,...m}))};function d(m){const p=t||_En(m);return{transition:`height ${p}ms ${e}, opacity ${p}ms ${e}`}}Fp(()=>{typeof CV=="function"&&CV(i?()=>{u({willChange:"height",display:"block",overflow:"hidden"}),CV(()=>{const m=R_e(r);u({...d(m),height:m})})}:()=>{const m=R_e(r);u({...d(m),willChange:"height",height:m}),CV(()=>u({height:o,overflow:"hidden"}))})},[i]);const h=m=>{if(!(m.target!==r.current||m.propertyName!=="height"))if(i){const p=R_e(r);p===a.height?c({}):u({height:p}),n()}else a.height===o&&(c(s),n())};function f({style:m={},refKey:p="ref",...g}={}){const y=g[p];return{"aria-hidden":!i,...g,[p]:sSt(r,y),onTransitionEnd:h,style:{boxSizing:"border-box",...m,...a}}}return f}const wEn={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},wSt=Dn((t,e)=>{const{children:n,in:i,transitionDuration:r,transitionTimingFunction:o,style:s,onTransitionEnd:a,animateOpacity:l,...c}=Kt("Collapse",wEn,t),u=zc(),d=rde(),f=(u.respectReducedMotion?d:!1)?0:r,m=xEn({opened:i,transitionDuration:f,transitionTimingFunction:o,onTransitionEnd:a});return f===0?i?ne.jsx(mn,{...c,children:n}):null:ne.jsx(mn,{...m({style:{opacity:i||!l?1:0,transition:l?`opacity ${f}ms ${o}`:"none",...qje(s,u)},ref:e,...c}),children:n})});wSt.displayName="@mantine/core/Collapse";const[CEn,Hv]=Uh("ScrollArea.Root component was not found in tree");function Aj(t,e){const n=JL(e);Uk(()=>{let i=0;if(t){const r=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(n)});return r.observe(t),()=>{window.cancelAnimationFrame(i),r.unobserve(t)}}},[t,n])}const SEn=b.forwardRef((t,e)=>{const{style:n,...i}=t,r=Hv(),[o,s]=b.useState(0),[a,l]=b.useState(0),c=!!(o&&a);return Aj(r.scrollbarX,()=>{var d;const u=((d=r.scrollbarX)==null?void 0:d.offsetHeight)||0;r.onCornerHeightChange(u),l(u)}),Aj(r.scrollbarY,()=>{var d;const u=((d=r.scrollbarY)==null?void 0:d.offsetWidth)||0;r.onCornerWidthChange(u),s(u)}),c?ne.jsx("div",{...i,ref:e,style:{...n,width:o,height:a}}):null}),NEn=b.forwardRef((t,e)=>{const n=Hv(),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&i?ne.jsx(SEn,{...t,ref:e}):null}),EEn={scrollHideDelay:1e3,type:"hover"},CSt=b.forwardRef((t,e)=>{const n=Kt("ScrollAreaRoot",EEn,t),{type:i,scrollHideDelay:r,scrollbars:o,...s}=n,[a,l]=b.useState(null),[c,u]=b.useState(null),[d,h]=b.useState(null),[f,m]=b.useState(null),[p,g]=b.useState(null),[y,_]=b.useState(0),[w,C]=b.useState(0),[N,E]=b.useState(!1),[D,k]=b.useState(!1),M=Bc(e,T=>l(T));return ne.jsx(CEn,{value:{type:i,scrollHideDelay:r,scrollArea:a,viewport:c,onViewportChange:u,content:d,onContentChange:h,scrollbarX:f,onScrollbarXChange:m,scrollbarXEnabled:N,onScrollbarXEnabledChange:E,scrollbarY:p,onScrollbarYChange:g,scrollbarYEnabled:D,onScrollbarYEnabledChange:k,onCornerWidthChange:_,onCornerHeightChange:C},children:ne.jsx(mn,{...s,ref:M,__vars:{"--sa-corner-width":o!=="xy"?"0px":`${y}px`,"--sa-corner-height":o!=="xy"?"0px":`${w}px`}})})});CSt.displayName="@mantine/core/ScrollAreaRoot";function SSt(t,e){const n=t/e;return Number.isNaN(n)?0:n}function lde(t){const e=SSt(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=(t.scrollbar.size-n)*e;return Math.max(i,18)}function NSt(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const i=(e[1]-e[0])/(t[1]-t[0]);return e[0]+i*(n-t[0])}}function DEn(t,[e,n]){return Math.min(n,Math.max(e,t))}function bJe(t,e,n="ltr"){const i=lde(e),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=e.scrollbar.size-r,s=e.content-e.viewport,a=o-i,l=n==="ltr"?[0,s]:[s*-1,0],c=DEn(t,l);return NSt([0,s],[0,a])(c)}function kEn(t,e,n,i="ltr"){const r=lde(n),o=r/2,s=e||o,a=r-s,l=n.scrollbar.paddingStart+s,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,u=n.content-n.viewport,d=i==="ltr"?[0,u]:[u*-1,0];return NSt([l,c],d)(t)}function ESt(t,e){return t>0&&t<e}function kne(t){return t?parseInt(t,10):0}function JT(t,e,{checkForDefaultPrevented:n=!0}={}){return i=>{t==null||t(i),(n===!1||!i.defaultPrevented)&&(e==null||e(i))}}const[MEn,DSt]=Uh("ScrollAreaScrollbar was not found in tree"),kSt=b.forwardRef((t,e)=>{const{sizes:n,hasThumb:i,onThumbChange:r,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:a,onDragScroll:l,onWheelScroll:c,onResize:u,...d}=t,h=Hv(),[f,m]=b.useState(null),p=Bc(e,k=>m(k)),g=b.useRef(null),y=b.useRef(""),{viewport:_}=h,w=n.content-n.viewport,C=JL(c),N=JL(a),E=nde(u,10),D=k=>{if(g.current){const M=k.clientX-g.current.left,T=k.clientY-g.current.top;l({x:M,y:T})}};return b.useEffect(()=>{const k=M=>{const T=M.target;(f==null?void 0:f.contains(T))&&C(M,w)};return document.addEventListener("wheel",k,{passive:!1}),()=>document.removeEventListener("wheel",k,{passive:!1})},[_,f,w,C]),b.useEffect(N,[n,N]),Aj(f,E),Aj(h.content,E),ne.jsx(MEn,{value:{scrollbar:f,hasThumb:i,onThumbChange:JL(r),onThumbPointerUp:JL(o),onThumbPositionChange:N,onThumbPointerDown:JL(s)},children:ne.jsx("div",{...d,ref:p,"data-mantine-scrollbar":!0,style:{position:"absolute",...d.style},onPointerDown:JT(t.onPointerDown,k=>{k.preventDefault(),k.button===0&&(k.target.setPointerCapture(k.pointerId),g.current=f.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",document.body.style.pointerEvents="none",D(k))}),onPointerMove:JT(t.onPointerMove,D),onPointerUp:JT(t.onPointerUp,k=>{k.preventDefault();const M=k.target;M.hasPointerCapture(k.pointerId)&&M.releasePointerCapture(k.pointerId),document.body.style.webkitUserSelect=y.current,document.body.style.pointerEvents="auto",g.current=null})})})}),LEn=b.forwardRef((t,e)=>{const{sizes:n,onSizesChange:i,style:r,...o}=t,s=Hv(),[a,l]=b.useState(),c=b.useRef(null),u=Bc(e,c,s.onScrollbarXChange);return b.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),ne.jsx(kSt,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{...r,"--sa-thumb-width":`${lde(n)}px`},onThumbPointerDown:d=>t.onThumbPointerDown(d.x),onDragScroll:d=>t.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(s.viewport){const f=s.viewport.scrollLeft+d.deltaX;t.onWheelScroll(f),ESt(f,h)&&d.preventDefault()}},onResize:()=>{c.current&&s.viewport&&a&&i({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:kne(a.paddingLeft),paddingEnd:kne(a.paddingRight)}})}})}),TEn=b.forwardRef((t,e)=>{const{sizes:n,onSizesChange:i,style:r,...o}=t,s=Hv(),[a,l]=b.useState(),c=b.useRef(null),u=Bc(e,c,s.onScrollbarYChange);return b.useEffect(()=>{c.current&&l(window.getComputedStyle(c.current))},[]),ne.jsx(kSt,{...o,"data-orientation":"vertical",ref:u,sizes:n,style:{"--sa-thumb-height":`${lde(n)}px`,...r},onThumbPointerDown:d=>t.onThumbPointerDown(d.y),onDragScroll:d=>t.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(s.viewport){const f=s.viewport.scrollTop+d.deltaY;t.onWheelScroll(f),ESt(f,h)&&d.preventDefault()}},onResize:()=>{c.current&&s.viewport&&a&&i({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:kne(a.paddingTop),paddingEnd:kne(a.paddingBottom)}})}})}),Gje=b.forwardRef((t,e)=>{const{orientation:n="vertical",...i}=t,{dir:r}=qk(),o=Hv(),s=b.useRef(null),a=b.useRef(0),[l,c]=b.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=SSt(l.viewport,l.content),d={...i,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>{s.current=f},onThumbPointerUp:()=>{a.current=0},onThumbPointerDown:f=>{a.current=f}},h=(f,m)=>kEn(f,a.current,l,m);return n==="horizontal"?ne.jsx(LEn,{...d,ref:e,onThumbPositionChange:()=>{if(o.viewport&&s.current){const f=o.viewport.scrollLeft,m=bJe(f,l,r);s.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=h(f,r))}}):n==="vertical"?ne.jsx(TEn,{...d,ref:e,onThumbPositionChange:()=>{if(o.viewport&&s.current){const f=o.viewport.scrollTop,m=bJe(f,l);l.scrollbar.size===0?s.current.style.opacity="0":s.current.style.opacity="1",s.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=h(f))}}):null}),MSt=b.forwardRef((t,e)=>{const n=Hv(),{forceMount:i,...r}=t,[o,s]=b.useState(!1),a=t.orientation==="horizontal",l=nde(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,u=n.viewport.offsetHeight<n.viewport.scrollHeight;s(a?c:u)}},10);return Aj(n.viewport,l),Aj(n.content,l),i||o?ne.jsx(Gje,{"data-state":o?"visible":"hidden",...r,ref:e}):null}),IEn=b.forwardRef((t,e)=>{const{forceMount:n,...i}=t,r=Hv(),[o,s]=b.useState(!1);return b.useEffect(()=>{const{scrollArea:a}=r;let l=0;if(a){const c=()=>{window.clearTimeout(l),s(!0)},u=()=>{l=window.setTimeout(()=>s(!1),r.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",u)}}},[r.scrollArea,r.scrollHideDelay]),n||o?ne.jsx(MSt,{"data-state":o?"visible":"hidden",...i,ref:e}):null}),AEn=b.forwardRef((t,e)=>{const{forceMount:n,...i}=t,r=Hv(),o=t.orientation==="horizontal",[s,a]=b.useState("hidden"),l=nde(()=>a("idle"),100);return b.useEffect(()=>{if(s==="idle"){const c=window.setTimeout(()=>a("hidden"),r.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,r.scrollHideDelay]),b.useEffect(()=>{const{viewport:c}=r,u=o?"scrollLeft":"scrollTop";if(c){let d=c[u];const h=()=>{const f=c[u];d!==f&&(a("scrolling"),l()),d=f};return c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[r.viewport,o,l]),n||s!=="hidden"?ne.jsx(Gje,{"data-state":s==="hidden"?"hidden":"visible",...i,ref:e,onPointerEnter:JT(t.onPointerEnter,()=>a("interacting")),onPointerLeave:JT(t.onPointerLeave,()=>a("idle"))}):null}),vJe=b.forwardRef((t,e)=>{const{forceMount:n,...i}=t,r=Hv(),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:s}=r,a=t.orientation==="horizontal";return b.useEffect(()=>(a?o(!0):s(!0),()=>{a?o(!1):s(!1)}),[a,o,s]),r.type==="hover"?ne.jsx(IEn,{...i,ref:e,forceMount:n}):r.type==="scroll"?ne.jsx(AEn,{...i,ref:e,forceMount:n}):r.type==="auto"?ne.jsx(MSt,{...i,ref:e,forceMount:n}):r.type==="always"?ne.jsx(Gje,{...i,ref:e}):null});function REn(t,e=()=>{}){let n={left:t.scrollLeft,top:t.scrollTop},i=0;return function r(){const o={left:t.scrollLeft,top:t.scrollTop},s=n.left!==o.left,a=n.top!==o.top;(s||a)&&e(),n=o,i=window.requestAnimationFrame(r)}(),()=>window.cancelAnimationFrame(i)}const PEn=b.forwardRef((t,e)=>{const{style:n,...i}=t,r=Hv(),o=DSt(),{onThumbPositionChange:s}=o,a=Bc(e,u=>o.onThumbChange(u)),l=b.useRef(),c=nde(()=>{l.current&&(l.current(),l.current=void 0)},100);return b.useEffect(()=>{const{viewport:u}=r;if(u){const d=()=>{if(c(),!l.current){const h=REn(u,s);l.current=h,s()}};return s(),u.addEventListener("scroll",d),()=>u.removeEventListener("scroll",d)}},[r.viewport,c,s]),ne.jsx("div",{"data-state":o.hasThumb?"visible":"hidden",...i,ref:a,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:JT(t.onPointerDownCapture,u=>{const h=u.target.getBoundingClientRect(),f=u.clientX-h.left,m=u.clientY-h.top;o.onThumbPointerDown({x:f,y:m})}),onPointerUp:JT(t.onPointerUp,o.onThumbPointerUp)})}),yJe=b.forwardRef((t,e)=>{const{forceMount:n,...i}=t,r=DSt();return n||r.hasThumb?ne.jsx(PEn,{ref:e,...i}):null}),LSt=b.forwardRef(({children:t,style:e,...n},i)=>{const r=Hv(),o=Bc(i,r.onViewportChange);return ne.jsx(mn,{...n,ref:o,style:{overflowX:r.scrollbarXEnabled?"scroll":"hidden",overflowY:r.scrollbarYEnabled?"scroll":"hidden",...e},children:ne.jsx("div",{style:{minWidth:"100%",display:"table"},ref:r.onContentChange,children:t})})});LSt.displayName="@mantine/core/ScrollAreaViewport";var Yje={root:"m_d57069b5",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};const TSt={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},OEn=(t,{scrollbarSize:e})=>({root:{"--scrollarea-scrollbar-size":sn(e)}}),UF=Dn((t,e)=>{const n=Kt("ScrollArea",TSt,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,scrollbarSize:l,vars:c,type:u,scrollHideDelay:d,viewportProps:h,viewportRef:f,onScrollPositionChange:m,children:p,offsetScrollbars:g,scrollbars:y,onBottomReached:_,onTopReached:w,...C}=n,[N,E]=b.useState(!1),D=hi({name:"ScrollArea",props:n,classes:Yje,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:c,varsResolver:OEn});return ne.jsxs(CSt,{type:u==="never"?"always":u,scrollHideDelay:d,ref:e,scrollbars:y,...D("root"),...C,children:[ne.jsx(LSt,{...h,...D("viewport",{style:h==null?void 0:h.style}),ref:f,"data-offset-scrollbars":g===!0?"xy":g||void 0,"data-scrollbars":y||void 0,onScroll:k=>{var R;(R=h==null?void 0:h.onScroll)==null||R.call(h,k),m==null||m({x:k.currentTarget.scrollLeft,y:k.currentTarget.scrollTop});const{scrollTop:M,scrollHeight:T,clientHeight:A}=k.currentTarget;M-(T-A)===0&&(_==null||_()),M===0&&(w==null||w())},children:p}),(y==="xy"||y==="x")&&ne.jsx(vJe,{...D("scrollbar"),orientation:"horizontal","data-hidden":u==="never"||void 0,forceMount:!0,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),children:ne.jsx(yJe,{...D("thumb")})}),(y==="xy"||y==="y")&&ne.jsx(vJe,{...D("scrollbar"),orientation:"vertical","data-hidden":u==="never"||void 0,forceMount:!0,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),children:ne.jsx(yJe,{...D("thumb")})}),ne.jsx(NEn,{...D("corner"),"data-hovered":N||void 0,"data-hidden":u==="never"||void 0})]})});UF.displayName="@mantine/core/ScrollArea";const Xje=Dn((t,e)=>{const{children:n,classNames:i,styles:r,scrollbarSize:o,scrollHideDelay:s,type:a,dir:l,offsetScrollbars:c,viewportRef:u,onScrollPositionChange:d,unstyled:h,variant:f,viewportProps:m,scrollbars:p,style:g,vars:y,..._}=Kt("ScrollAreaAutosize",TSt,t);return ne.jsx(mn,{..._,ref:e,style:[{display:"flex",overflow:"auto"},g],children:ne.jsx(mn,{style:{display:"flex",flexDirection:"column",flex:1},children:ne.jsx(UF,{classNames:i,styles:r,scrollHideDelay:s,scrollbarSize:o,type:a,dir:l,offsetScrollbars:c,viewportRef:u,onScrollPositionChange:d,unstyled:h,variant:f,viewportProps:m,vars:y,scrollbars:p,children:n})})})});UF.classes=Yje;Xje.displayName="@mantine/core/ScrollAreaAutosize";Xje.classes=Yje;UF.Autosize=Xje;var ISt={root:"m_87cf2631"};const jEn={__staticSelector:"UnstyledButton"},Lh=Cd((t,e)=>{const n=Kt("UnstyledButton",jEn,t),{className:i,component:r="button",__staticSelector:o,unstyled:s,classNames:a,styles:l,style:c,...u}=n,d=hi({name:o,props:n,classes:ISt,className:i,style:c,classNames:a,styles:l,unstyled:s});return ne.jsx(mn,{...d("root",{focusable:!0}),component:r,ref:e,type:r==="button"?"button":void 0,...u})});Lh.classes=ISt;Lh.displayName="@mantine/core/UnstyledButton";var ASt={root:"m_515a97f8"};const FEn={},Zje=Dn((t,e)=>{const n=Kt("VisuallyHidden",FEn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,...c}=n,u=hi({name:"VisuallyHidden",classes:ASt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a});return ne.jsx(mn,{component:"span",ref:e,...u("root"),...c})});Zje.classes=ASt;Zje.displayName="@mantine/core/VisuallyHidden";var RSt={root:"m_1b7284a3"};const $En={},VEn=(t,{radius:e,shadow:n})=>({root:{"--paper-radius":e===void 0?void 0:Va(e),"--paper-shadow":Vje(n)}}),Ew=Cd((t,e)=>{const n=Kt("Paper",$En,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,withBorder:l,vars:c,radius:u,shadow:d,variant:h,mod:f,...m}=n,p=hi({name:"Paper",props:n,classes:RSt,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:c,varsResolver:VEn});return ne.jsx(mn,{ref:e,mod:[{"data-with-border":l},f],...p("root"),variant:h,...m})});Ew.classes=RSt;Ew.displayName="@mantine/core/Paper";function cde(){return typeof window<"u"}function KF(t){return PSt(t)?(t.nodeName||"").toLowerCase():"#document"}function Dp(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Dw(t){var e;return(e=(PSt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function PSt(t){return cde()?t instanceof Node||t instanceof Dp(t).Node:!1}function El(t){return cde()?t instanceof Element||t instanceof Dp(t).Element:!1}function ob(t){return cde()?t instanceof HTMLElement||t instanceof Dp(t).HTMLElement:!1}function PEe(t){return!cde()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Dp(t).ShadowRoot}function EK(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=Nv(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(r)}function BEn(t){return["table","td","th"].includes(KF(t))}function ude(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Qje(t){const e=dde(),n=El(t)?Nv(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function zEn(t){let e=eS(t);for(;ob(e)&&!GD(e);){if(Qje(e))return e;if(ude(e))return null;e=eS(e)}return null}function dde(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function GD(t){return["html","body","#document"].includes(KF(t))}function Nv(t){return Dp(t).getComputedStyle(t)}function hde(t){return El(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function eS(t){if(KF(t)==="html")return t;const e=t.assignedSlot||t.parentNode||PEe(t)&&t.host||Dw(t);return PEe(e)?e.host:e}function OSt(t){const e=eS(t);return GD(e)?t.ownerDocument?t.ownerDocument.body:t.body:ob(e)&&EK(e)?e:OSt(e)}function EC(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=OSt(t),o=r===((i=t.ownerDocument)==null?void 0:i.body),s=Dp(r);if(o){const a=OEe(s);return e.concat(s,s.visualViewport||[],EK(r)?r:[],a&&n?EC(a):[])}return e.concat(r,EC(r,[],n))}function OEe(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function _Je(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function Mz(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&PEe(n)){let i=e;for(;i;){if(t===i)return!0;i=i.parentNode||i.host}}return!1}function jSt(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function FSt(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:i}=e;return n+"/"+i}).join(" "):navigator.userAgent}function HEn(t){return KEn()?!1:!xJe()&&t.width===0&&t.height===0||xJe()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function WEn(){return/apple/i.test(navigator.vendor)}function xJe(){const t=/android/i;return t.test(jSt())||t.test(FSt())}function UEn(){return jSt().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function KEn(){return FSt().includes("jsdom/")}function jEe(t,e){const n=["mouse","pen"];return n.push("",void 0),n.includes(t)}function qEn(t){return"nativeEvent"in t}function GEn(t){return t.matches("html,body")}function kT(t){return(t==null?void 0:t.ownerDocument)||document}function P_e(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function DO(t){return"composedPath"in t?t.composedPath()[0]:t.target}const YEn="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function XEn(t){return ob(t)&&t.matches(YEn)}const A0=Math.min,df=Math.max,Mne=Math.round,vZ=Math.floor,YD=t=>({x:t,y:t}),ZEn={left:"right",right:"left",bottom:"top",top:"bottom"},QEn={start:"end",end:"start"};function FEe(t,e,n){return df(t,A0(e,n))}function tS(t,e){return typeof t=="function"?t(e):t}function R0(t){return t.split("-")[0]}function qF(t){return t.split("-")[1]}function Jje(t){return t==="x"?"y":"x"}function e5e(t){return t==="y"?"height":"width"}function nS(t){return["top","bottom"].includes(R0(t))?"y":"x"}function t5e(t){return Jje(nS(t))}function JEn(t,e,n){n===void 0&&(n=!1);const i=qF(t),r=t5e(t),o=e5e(r);let s=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Lne(s)),[s,Lne(s)]}function eDn(t){const e=Lne(t);return[$Ee(t),e,$Ee(e)]}function $Ee(t){return t.replace(/start|end/g,e=>QEn[e])}function tDn(t,e,n){const i=["left","right"],r=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:i:e?i:r;case"left":case"right":return e?o:s;default:return[]}}function nDn(t,e,n,i){const r=qF(t);let o=tDn(R0(t),n==="start",i);return r&&(o=o.map(s=>s+"-"+r),e&&(o=o.concat(o.map($Ee)))),o}function Lne(t){return t.replace(/left|right|bottom|top/g,e=>ZEn[e])}function iDn(t){return{top:0,right:0,bottom:0,left:0,...t}}function n5e(t){return typeof t!="number"?iDn(t):{top:t,right:t,bottom:t,left:t}}function Rj(t){const{x:e,y:n,width:i,height:r}=t;return{width:i,height:r,top:n,left:e,right:e+i,bottom:n+r,x:e,y:n}}function wJe(t,e,n){let{reference:i,floating:r}=t;const o=nS(e),s=t5e(e),a=e5e(s),l=R0(e),c=o==="y",u=i.x+i.width/2-r.width/2,d=i.y+i.height/2-r.height/2,h=i[a]/2-r[a]/2;let f;switch(l){case"top":f={x:u,y:i.y-r.height};break;case"bottom":f={x:u,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:d};break;case"left":f={x:i.x-r.width,y:d};break;default:f={x:i.x,y:i.y}}switch(qF(e)){case"start":f[s]-=h*(n&&c?-1:1);break;case"end":f[s]+=h*(n&&c?-1:1);break}return f}const rDn=async(t,e,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:d}=wJe(c,i,l),h=i,f={},m=0;for(let p=0;p<a.length;p++){const{name:g,fn:y}=a[p],{x:_,y:w,data:C,reset:N}=await y({x:u,y:d,initialPlacement:i,placement:h,strategy:r,middlewareData:f,rects:c,platform:s,elements:{reference:t,floating:e}});u=_??u,d=w??d,f={...f,[g]:{...f[g],...C}},N&&m<=50&&(m++,typeof N=="object"&&(N.placement&&(h=N.placement),N.rects&&(c=N.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):N.rects),{x:u,y:d}=wJe(c,h,l)),p=-1)}return{x:u,y:d,placement:h,strategy:r,middlewareData:f}};async function i5e(t,e){var n;e===void 0&&(e={});const{x:i,y:r,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=tS(e,t),m=n5e(f),g=a[h?d==="floating"?"reference":"floating":d],y=Rj(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),_=d==="floating"?{x:i,y:r,width:s.floating.width,height:s.floating.height}:s.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),C=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},N=Rj(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:w,strategy:l}):_);return{top:(y.top-N.top+m.top)/C.y,bottom:(N.bottom-y.bottom+m.bottom)/C.y,left:(y.left-N.left+m.left)/C.x,right:(N.right-y.right+m.right)/C.x}}const oDn=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:r,rects:o,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=tS(t,e)||{};if(c==null)return{};const d=n5e(u),h={x:n,y:i},f=t5e(r),m=e5e(f),p=await s.getDimensions(c),g=f==="y",y=g?"top":"left",_=g?"bottom":"right",w=g?"clientHeight":"clientWidth",C=o.reference[m]+o.reference[f]-h[f]-o.floating[m],N=h[f]-o.reference[f],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let D=E?E[w]:0;(!D||!await(s.isElement==null?void 0:s.isElement(E)))&&(D=a.floating[w]||o.floating[m]);const k=C/2-N/2,M=D/2-p[m]/2-1,T=A0(d[y],M),A=A0(d[_],M),R=T,P=D-p[m]-A,O=D/2-p[m]/2+k,V=FEe(R,O,P),F=!l.arrow&&qF(r)!=null&&O!==V&&o.reference[m]/2-(O<R?T:A)-p[m]/2<0,$=F?O<R?O-R:O-P:0;return{[f]:h[f]+$,data:{[f]:V,centerOffset:O-V-$,...F&&{alignmentOffset:$}},reset:F}}}),sDn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:r,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...g}=tS(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=R0(r),_=nS(a),w=R0(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(c.floating)),N=h||(w||!p?[Lne(a)]:eDn(a)),E=m!=="none";!h&&E&&N.push(...nDn(a,p,m,C));const D=[a,...N],k=await i5e(e,g),M=[];let T=((i=o.flip)==null?void 0:i.overflows)||[];if(u&&M.push(k[y]),d){const O=JEn(r,s,C);M.push(k[O[0]],k[O[1]])}if(T=[...T,{placement:r,overflows:M}],!M.every(O=>O<=0)){var A,R;const O=(((A=o.flip)==null?void 0:A.index)||0)+1,V=D[O];if(V)return{data:{index:O,overflows:T},reset:{placement:V}};let F=(R=T.filter($=>$.overflows[0]<=0).sort(($,B)=>$.overflows[1]-B.overflows[1])[0])==null?void 0:R.placement;if(!F)switch(f){case"bestFit":{var P;const $=(P=T.filter(B=>{if(E){const z=nS(B.placement);return z===_||z==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(z=>z>0).reduce((z,H)=>z+H,0)]).sort((B,z)=>B[1]-z[1])[0])==null?void 0:P[0];$&&(F=$);break}case"initialPlacement":F=a;break}if(r!==F)return{reset:{placement:F}}}return{}}}};function $St(t){const e=A0(...t.map(o=>o.left)),n=A0(...t.map(o=>o.top)),i=df(...t.map(o=>o.right)),r=df(...t.map(o=>o.bottom));return{x:e,y:n,width:i-e,height:r-n}}function aDn(t){const e=t.slice().sort((r,o)=>r.y-o.y),n=[];let i=null;for(let r=0;r<e.length;r++){const o=e[r];!i||o.y-i.y>i.height/2?n.push([o]):n[n.length-1].push(o),i=o}return n.map(r=>Rj($St(r)))}const lDn=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:i,rects:r,platform:o,strategy:s}=e,{padding:a=2,x:l,y:c}=tS(t,e),u=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(i.reference))||[]),d=aDn(u),h=Rj($St(u)),f=n5e(a);function m(){if(d.length===2&&d[0].left>d[1].right&&l!=null&&c!=null)return d.find(g=>l>g.left-f.left&&l<g.right+f.right&&c>g.top-f.top&&c<g.bottom+f.bottom)||h;if(d.length>=2){if(nS(n)==="y"){const T=d[0],A=d[d.length-1],R=R0(n)==="top",P=T.top,O=A.bottom,V=R?T.left:A.left,F=R?T.right:A.right,$=F-V,B=O-P;return{top:P,bottom:O,left:V,right:F,width:$,height:B,x:V,y:P}}const g=R0(n)==="left",y=df(...d.map(T=>T.right)),_=A0(...d.map(T=>T.left)),w=d.filter(T=>g?T.left===_:T.right===y),C=w[0].top,N=w[w.length-1].bottom,E=_,D=y,k=D-E,M=N-C;return{top:C,bottom:N,left:E,right:D,width:k,height:M,x:E,y:C}}return h}const p=await o.getElementRects({reference:{getBoundingClientRect:m},floating:i.floating,strategy:s});return r.reference.x!==p.reference.x||r.reference.y!==p.reference.y||r.reference.width!==p.reference.width||r.reference.height!==p.reference.height?{reset:{rects:p}}:{}}}};async function cDn(t,e){const{placement:n,platform:i,elements:r}=t,o=await(i.isRTL==null?void 0:i.isRTL(r.floating)),s=R0(n),a=qF(n),l=nS(n)==="y",c=["left","top"].includes(s)?-1:1,u=o&&l?-1:1,d=tS(e,t);let{mainAxis:h,crossAxis:f,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof m=="number"&&(f=a==="end"?m*-1:m),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const uDn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:r,y:o,placement:s,middlewareData:a}=e,l=await cDn(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:s}}}}},dDn=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:r}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:y,y:_}=g;return{x:y,y:_}}},...l}=tS(t,e),c={x:n,y:i},u=await i5e(e,l),d=nS(R0(r)),h=Jje(d);let f=c[h],m=c[d];if(o){const g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",_=f+u[g],w=f-u[y];f=FEe(_,f,w)}if(s){const g=d==="y"?"top":"left",y=d==="y"?"bottom":"right",_=m+u[g],w=m-u[y];m=FEe(_,m,w)}const p=a.fn({...e,[h]:f,[d]:m});return{...p,data:{x:p.x-n,y:p.y-i,enabled:{[h]:o,[d]:s}}}}}},hDn=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:i,placement:r,rects:o,middlewareData:s}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=tS(t,e),u={x:n,y:i},d=nS(r),h=Jje(d);let f=u[h],m=u[d];const p=tS(a,e),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const w=h==="y"?"height":"width",C=o.reference[h]-o.floating[w]+g.mainAxis,N=o.reference[h]+o.reference[w]-g.mainAxis;f<C?f=C:f>N&&(f=N)}if(c){var y,_;const w=h==="y"?"width":"height",C=["top","left"].includes(R0(r)),N=o.reference[d]-o.floating[w]+(C&&((y=s.offset)==null?void 0:y[d])||0)+(C?0:g.crossAxis),E=o.reference[d]+o.reference[w]+(C?0:((_=s.offset)==null?void 0:_[d])||0)-(C?g.crossAxis:0);m<N?m=N:m>E&&(m=E)}return{[h]:f,[d]:m}}}},fDn=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:r,rects:o,platform:s,elements:a}=e,{apply:l=()=>{},...c}=tS(t,e),u=await i5e(e,c),d=R0(r),h=qF(r),f=nS(r)==="y",{width:m,height:p}=o.floating;let g,y;d==="top"||d==="bottom"?(g=d,y=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,g=h==="end"?"top":"bottom");const _=p-u.top-u.bottom,w=m-u.left-u.right,C=A0(p-u[g],_),N=A0(m-u[y],w),E=!e.middlewareData.shift;let D=C,k=N;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(k=w),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(D=_),E&&!h){const T=df(u.left,0),A=df(u.right,0),R=df(u.top,0),P=df(u.bottom,0);f?k=m-2*(T!==0||A!==0?T+A:df(u.left,u.right)):D=p-2*(R!==0||P!==0?R+P:df(u.top,u.bottom))}await l({...e,availableWidth:k,availableHeight:D});const M=await s.getDimensions(a.floating);return m!==M.width||p!==M.height?{reset:{rects:!0}}:{}}}};function VSt(t){const e=Nv(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=ob(t),o=r?t.offsetWidth:n,s=r?t.offsetHeight:i,a=Mne(n)!==o||Mne(i)!==s;return a&&(n=o,i=s),{width:n,height:i,$:a}}function r5e(t){return El(t)?t:t.contextElement}function s3(t){const e=r5e(t);if(!ob(e))return YD(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:o}=VSt(e);let s=(o?Mne(n.width):n.width)/i,a=(o?Mne(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const mDn=YD(0);function BSt(t){const e=Dp(t);return!dde()||!e.visualViewport?mDn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function pDn(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Dp(t)?!1:e}function E2(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),o=r5e(t);let s=YD(1);e&&(i?El(i)&&(s=s3(i)):s=s3(t));const a=pDn(o,n,i)?BSt(o):YD(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(o){const h=Dp(o),f=i&&El(i)?Dp(i):i;let m=h,p=OEe(m);for(;p&&i&&f!==m;){const g=s3(p),y=p.getBoundingClientRect(),_=Nv(p),w=y.left+(p.clientLeft+parseFloat(_.paddingLeft))*g.x,C=y.top+(p.clientTop+parseFloat(_.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=w,c+=C,m=Dp(p),p=OEe(m)}}return Rj({width:u,height:d,x:l,y:c})}function gDn(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t;const o=r==="fixed",s=Dw(i),a=e?ude(e.floating):!1;if(i===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=YD(1);const u=YD(0),d=ob(i);if((d||!d&&!o)&&((KF(i)!=="body"||EK(s))&&(l=hde(i)),ob(i))){const h=E2(i);c=s3(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function bDn(t){return Array.from(t.getClientRects())}function VEe(t,e){const n=hde(t).scrollLeft;return e?e.left+n:E2(Dw(t)).left+n}function vDn(t){const e=Dw(t),n=hde(t),i=t.ownerDocument.body,r=df(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=df(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let s=-n.scrollLeft+VEe(t);const a=-n.scrollTop;return Nv(i).direction==="rtl"&&(s+=df(e.clientWidth,i.clientWidth)-r),{width:r,height:o,x:s,y:a}}function yDn(t,e){const n=Dp(t),i=Dw(t),r=n.visualViewport;let o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;const c=dde();(!c||c&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a,y:l}}function _Dn(t,e){const n=E2(t,!0,e==="fixed"),i=n.top+t.clientTop,r=n.left+t.clientLeft,o=ob(t)?s3(t):YD(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=r*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function CJe(t,e,n){let i;if(e==="viewport")i=yDn(t,n);else if(e==="document")i=vDn(Dw(t));else if(El(e))i=_Dn(e,n);else{const r=BSt(t);i={...e,x:e.x-r.x,y:e.y-r.y}}return Rj(i)}function zSt(t,e){const n=eS(t);return n===e||!El(n)||GD(n)?!1:Nv(n).position==="fixed"||zSt(n,e)}function xDn(t,e){const n=e.get(t);if(n)return n;let i=EC(t,[],!1).filter(a=>El(a)&&KF(a)!=="body"),r=null;const o=Nv(t).position==="fixed";let s=o?eS(t):t;for(;El(s)&&!GD(s);){const a=Nv(s),l=Qje(s);!l&&a.position==="fixed"&&(r=null),(o?!l&&!r:!l&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||EK(s)&&!l&&zSt(t,s))?i=i.filter(u=>u!==s):r=a,s=eS(s)}return e.set(t,i),i}function wDn(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t;const s=[...n==="clippingAncestors"?ude(e)?[]:xDn(e,this._c):[].concat(n),i],a=s[0],l=s.reduce((c,u)=>{const d=CJe(e,u,r);return c.top=df(d.top,c.top),c.right=A0(d.right,c.right),c.bottom=A0(d.bottom,c.bottom),c.left=df(d.left,c.left),c},CJe(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function CDn(t){const{width:e,height:n}=VSt(t);return{width:e,height:n}}function SDn(t,e,n){const i=ob(e),r=Dw(e),o=n==="fixed",s=E2(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=YD(0);if(i||!i&&!o)if((KF(e)!=="body"||EK(r))&&(a=hde(e)),i){const f=E2(e,!0,o,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else r&&(l.x=VEe(r));let c=0,u=0;if(r&&!i&&!o){const f=r.getBoundingClientRect();u=f.top+a.scrollTop,c=f.left+a.scrollLeft-VEe(r,f)}const d=s.left+a.scrollLeft-l.x-c,h=s.top+a.scrollTop-l.y-u;return{x:d,y:h,width:s.width,height:s.height}}function O_e(t){return Nv(t).position==="static"}function SJe(t,e){if(!ob(t)||Nv(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Dw(t)===n&&(n=n.ownerDocument.body),n}function HSt(t,e){const n=Dp(t);if(ude(t))return n;if(!ob(t)){let r=eS(t);for(;r&&!GD(r);){if(El(r)&&!O_e(r))return r;r=eS(r)}return n}let i=SJe(t,e);for(;i&&BEn(i)&&O_e(i);)i=SJe(i,e);return i&&GD(i)&&O_e(i)&&!Qje(i)?n:i||zEn(t)||n}const NDn=async function(t){const e=this.getOffsetParent||HSt,n=this.getDimensions,i=await n(t.floating);return{reference:SDn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function EDn(t){return Nv(t).direction==="rtl"}const DDn={convertOffsetParentRelativeRectToViewportRelativeRect:gDn,getDocumentElement:Dw,getClippingRect:wDn,getOffsetParent:HSt,getElementRects:NDn,getClientRects:bDn,getDimensions:CDn,getScale:s3,isElement:El,isRTL:EDn};function kDn(t,e){let n=null,i;const r=Dw(t);function o(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const{left:c,top:u,width:d,height:h}=t.getBoundingClientRect();if(a||e(),!d||!h)return;const f=vZ(u),m=vZ(r.clientWidth-(c+d)),p=vZ(r.clientHeight-(u+h)),g=vZ(c),_={rootMargin:-f+"px "+-m+"px "+-p+"px "+-g+"px",threshold:df(0,A0(1,l))||1};let w=!0;function C(N){const E=N[0].intersectionRatio;if(E!==l){if(!w)return s();E?s(!1,E):i=setTimeout(()=>{s(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(C,{..._,root:r.ownerDocument})}catch{n=new IntersectionObserver(C,_)}n.observe(t)}return s(!0),o}function MDn(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=r5e(t),u=r||o?[...c?EC(c):[],...EC(e)]:[];u.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const d=c&&a?kDn(c,n):null;let h=-1,f=null;s&&(f=new ResizeObserver(y=>{let[_]=y;_&&_.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(e)})),n()}),c&&!l&&f.observe(c),f.observe(e));let m,p=l?E2(t):null;l&&g();function g(){const y=E2(t);p&&(y.x!==p.x||y.y!==p.y||y.width!==p.width||y.height!==p.height)&&n(),p=y,m=requestAnimationFrame(g)}return n(),()=>{var y;u.forEach(_=>{r&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),d==null||d(),(y=f)==null||y.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const LDn=uDn,TDn=dDn,IDn=sDn,ADn=fDn,NJe=oDn,RDn=lDn,PDn=hDn,ODn=(t,e,n)=>{const i=new Map,r={platform:DDn,...n},o={...r.platform,_c:i};return rDn(t,e,{...r,platform:o})};var See=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Tne(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,i,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(i=n;i--!==0;)if(!Tne(t[i],e[i]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(e,r[i]))return!1;for(i=n;i--!==0;){const o=r[i];if(!(o==="_owner"&&t.$$typeof)&&!Tne(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function WSt(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function EJe(t,e){const n=WSt(t);return Math.round(e*n)/n}function j_e(t){const e=b.useRef(t);return See(()=>{e.current=t}),e}function jDn(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,d]=b.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,f]=b.useState(i);Tne(h,i)||f(i);const[m,p]=b.useState(null),[g,y]=b.useState(null),_=b.useCallback(B=>{B!==E.current&&(E.current=B,p(B))},[]),w=b.useCallback(B=>{B!==D.current&&(D.current=B,y(B))},[]),C=o||m,N=s||g,E=b.useRef(null),D=b.useRef(null),k=b.useRef(u),M=l!=null,T=j_e(l),A=j_e(r),R=j_e(c),P=b.useCallback(()=>{if(!E.current||!D.current)return;const B={placement:e,strategy:n,middleware:h};A.current&&(B.platform=A.current),ODn(E.current,D.current,B).then(z=>{const H={...z,isPositioned:R.current!==!1};O.current&&!Tne(k.current,H)&&(k.current=H,Fc.flushSync(()=>{d(H)}))})},[h,e,n,A,R]);See(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(B=>({...B,isPositioned:!1})))},[c]);const O=b.useRef(!1);See(()=>(O.current=!0,()=>{O.current=!1}),[]),See(()=>{if(C&&(E.current=C),N&&(D.current=N),C&&N){if(T.current)return T.current(C,N,P);P()}},[C,N,P,T,M]);const V=b.useMemo(()=>({reference:E,floating:D,setReference:_,setFloating:w}),[_,w]),F=b.useMemo(()=>({reference:C,floating:N}),[C,N]),$=b.useMemo(()=>{const B={position:n,left:0,top:0};if(!F.floating)return B;const z=EJe(F.floating,u.x),H=EJe(F.floating,u.y);return a?{...B,transform:"translate("+z+"px, "+H+"px)",...WSt(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:H}},[n,a,F.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:P,refs:V,elements:F,floatingStyles:$}),[u,P,V,F,$])}const FDn=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:i,padding:r}=typeof t=="function"?t(n):t;return i&&e(i)?i.current!=null?NJe({element:i.current,padding:r}).fn(n):{}:i?NJe({element:i,padding:r}).fn(n):{}}}},USt=(t,e)=>({...LDn(t),options:[t,e]}),o5e=(t,e)=>({...TDn(t),options:[t,e]}),DJe=(t,e)=>({...PDn(t),options:[t,e]}),BEe=(t,e)=>({...IDn(t),options:[t,e]}),$Dn=(t,e)=>({...ADn(t),options:[t,e]}),zEe=(t,e)=>({...RDn(t),options:[t,e]}),KSt=(t,e)=>({...FDn(t),options:[t,e]}),qSt={...CF},VDn=qSt.useInsertionEffect,BDn=VDn||(t=>t());function yE(t){const e=b.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return BDn(()=>{e.current=t}),b.useCallback(function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.current==null?void 0:e.current(...i)},[])}var Vx=typeof document<"u"?b.useLayoutEffect:b.useEffect;let kJe=!1,zDn=0;const MJe=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+zDn++;function HDn(){const[t,e]=b.useState(()=>kJe?MJe():void 0);return Vx(()=>{t==null&&e(MJe())},[]),b.useEffect(()=>{kJe=!0},[]),t}const WDn=qSt.useId,GSt=WDn||HDn;let HEe;HEe=new Set;function UDn(){for(var t,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];const r="Floating UI: "+n.join(" ");if(!((t=HEe)!=null&&t.has(r))){var o;(o=HEe)==null||o.add(r),console.error(r)}}function KDn(){const t=new Map;return{emit(e,n){var i;(i=t.get(e))==null||i.forEach(r=>r(n))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var i;t.set(e,((i=t.get(e))==null?void 0:i.filter(r=>r!==n))||[])}}}const qDn=b.createContext(null),GDn=b.createContext(null),s5e=()=>{var t;return((t=b.useContext(qDn))==null?void 0:t.id)||null},a5e=()=>b.useContext(GDn);function l5e(t){return"data-floating-ui-"+t}function F_e(t){const e=b.useRef(t);return Vx(()=>{e.current=t}),e}const LJe=l5e("safe-polygon");function Nee(t,e,n){return n&&!jEe(n)?0:typeof t=="number"?t:t==null?void 0:t[e]}function YDn(t,e){e===void 0&&(e={});const{open:n,onOpenChange:i,dataRef:r,events:o,elements:s}=t,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:h=!0}=e,f=a5e(),m=s5e(),p=F_e(c),g=F_e(l),y=F_e(n),_=b.useRef(),w=b.useRef(-1),C=b.useRef(),N=b.useRef(-1),E=b.useRef(!0),D=b.useRef(!1),k=b.useRef(()=>{}),M=b.useRef(!1),T=b.useCallback(()=>{var F;const $=(F=r.current.openEvent)==null?void 0:F.type;return($==null?void 0:$.includes("mouse"))&&$!=="mousedown"},[r]);b.useEffect(()=>{if(!a)return;function F($){let{open:B}=$;B||(clearTimeout(w.current),clearTimeout(N.current),E.current=!0,M.current=!1)}return o.on("openchange",F),()=>{o.off("openchange",F)}},[a,o]),b.useEffect(()=>{if(!a||!p.current||!n)return;function F(B){T()&&i(!1,B,"hover")}const $=kT(s.floating).documentElement;return $.addEventListener("mouseleave",F),()=>{$.removeEventListener("mouseleave",F)}},[s.floating,n,i,a,p,T]);const A=b.useCallback(function(F,$,B){$===void 0&&($=!0),B===void 0&&(B="hover");const z=Nee(g.current,"close",_.current);z&&!C.current?(clearTimeout(w.current),w.current=window.setTimeout(()=>i(!1,F,B),z)):$&&(clearTimeout(w.current),i(!1,F,B))},[g,i]),R=yE(()=>{k.current(),C.current=void 0}),P=yE(()=>{if(D.current){const F=kT(s.floating).body;F.style.pointerEvents="",F.removeAttribute(LJe),D.current=!1}});b.useEffect(()=>{if(!a)return;function F(){return r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1}function $(K){if(clearTimeout(w.current),E.current=!1,u&&!jEe(_.current)||d>0&&!Nee(g.current,"open"))return;const q=Nee(g.current,"open",_.current);q?w.current=window.setTimeout(()=>{y.current||i(!0,K,"hover")},q):i(!0,K,"hover")}function B(K){if(F())return;k.current();const q=kT(s.floating);if(clearTimeout(N.current),M.current=!1,p.current&&r.current.floatingContext){n||clearTimeout(w.current),C.current=p.current({...r.current.floatingContext,tree:f,x:K.clientX,y:K.clientY,onClose(){P(),R(),A(K,!0,"safe-polygon")}});const Y=C.current;q.addEventListener("mousemove",Y),k.current=()=>{q.removeEventListener("mousemove",Y)};return}(_.current==="touch"?!Mz(s.floating,K.relatedTarget):!0)&&A(K)}function z(K){F()||r.current.floatingContext&&(p.current==null||p.current({...r.current.floatingContext,tree:f,x:K.clientX,y:K.clientY,onClose(){P(),R(),A(K)}})(K))}if(El(s.domReference)){var H;const K=s.domReference;return n&&K.addEventListener("mouseleave",z),(H=s.floating)==null||H.addEventListener("mouseleave",z),h&&K.addEventListener("mousemove",$,{once:!0}),K.addEventListener("mouseenter",$),K.addEventListener("mouseleave",B),()=>{var q;n&&K.removeEventListener("mouseleave",z),(q=s.floating)==null||q.removeEventListener("mouseleave",z),h&&K.removeEventListener("mousemove",$),K.removeEventListener("mouseenter",$),K.removeEventListener("mouseleave",B)}}},[s,a,t,u,d,h,A,R,P,i,n,y,f,g,p,r]),Vx(()=>{var F;if(a&&n&&(F=p.current)!=null&&F.__options.blockPointerEvents&&T()){D.current=!0;const B=s.floating;if(El(s.domReference)&&B){var $;const z=kT(s.floating).body;z.setAttribute(LJe,"");const H=s.domReference,K=f==null||($=f.nodesRef.current.find(q=>q.id===m))==null||($=$.context)==null?void 0:$.elements.floating;return K&&(K.style.pointerEvents=""),z.style.pointerEvents="none",H.style.pointerEvents="auto",B.style.pointerEvents="auto",()=>{z.style.pointerEvents="",H.style.pointerEvents="",B.style.pointerEvents=""}}}},[a,n,m,s,f,p,T]),Vx(()=>{n||(_.current=void 0,M.current=!1,R(),P())},[n,R,P]),b.useEffect(()=>()=>{R(),clearTimeout(w.current),clearTimeout(N.current),P()},[a,s.domReference,R,P]);const O=b.useMemo(()=>{function F($){_.current=$.pointerType}return{onPointerDown:F,onPointerEnter:F,onMouseMove($){const{nativeEvent:B}=$;function z(){!E.current&&!y.current&&i(!0,B,"hover")}u&&!jEe(_.current)||n||d===0||M.current&&$.movementX**2+$.movementY**2<2||(clearTimeout(N.current),_.current==="touch"?z():(M.current=!0,N.current=window.setTimeout(z,d)))}}},[u,i,n,y,d]),V=b.useMemo(()=>({onMouseEnter(){clearTimeout(w.current)},onMouseLeave(F){A(F.nativeEvent,!1)}}),[A]);return b.useMemo(()=>a?{reference:O,floating:V}:{},[a,O,V])}const WEe=()=>{},YSt=b.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:WEe,setState:WEe,isInstantPhase:!1}),XSt=()=>b.useContext(YSt);function XDn(t){const{children:e,delay:n,timeoutMs:i=0}=t,[r,o]=b.useReducer((l,c)=>({...l,...c}),{delay:n,timeoutMs:i,initialDelay:n,currentId:null,isInstantPhase:!1}),s=b.useRef(null),a=b.useCallback(l=>{o({currentId:l})},[]);return Vx(()=>{r.currentId?s.current===null?s.current=r.currentId:r.isInstantPhase||o({isInstantPhase:!0}):(r.isInstantPhase&&o({isInstantPhase:!1}),s.current=null)},[r.currentId,r.isInstantPhase]),b.createElement(YSt.Provider,{value:b.useMemo(()=>({...r,setState:o,setCurrentId:a}),[r,a])},e)}function ZDn(t,e){e===void 0&&(e={});const{open:n,onOpenChange:i,floatingId:r}=t,{id:o,enabled:s=!0}=e,a=o??r,l=XSt(),{currentId:c,setCurrentId:u,initialDelay:d,setState:h,timeoutMs:f}=l;return Vx(()=>{s&&c&&(h({delay:{open:1,close:Nee(d,"close")}}),c!==a&&i(!1))},[s,a,i,h,c,d]),Vx(()=>{function m(){i(!1),h({delay:d,currentId:null})}if(s&&c&&!n&&c===a){if(f){const p=window.setTimeout(m,f);return()=>{clearTimeout(p)}}m()}},[s,n,h,c,a,i,d,f]),Vx(()=>{s&&(u===WEe||!n||u(a))},[s,n,u,a]),l}function $_e(t,e){let n=t.filter(r=>{var o;return r.parentId===e&&((o=r.context)==null?void 0:o.open)}),i=n;for(;i.length;)i=t.filter(r=>{var o;return(o=i)==null?void 0:o.some(s=>{var a;return r.parentId===s.id&&((a=r.context)==null?void 0:a.open)})}),n=n.concat(i);return n}const QDn="data-floating-ui-focusable",JDn={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},ekn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},TJe=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t==null?void 0:t.outsidePress)!=null?n:!0}};function tkn(t,e){e===void 0&&(e={});const{open:n,onOpenChange:i,elements:r,dataRef:o}=t,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:m}=e,p=a5e(),g=yE(typeof l=="function"?l:()=>!1),y=typeof l=="function"?g:l,_=b.useRef(!1),w=b.useRef(!1),{escapeKey:C,outsidePress:N}=TJe(f),{escapeKey:E,outsidePress:D}=TJe(m),k=b.useRef(!1),M=yE(V=>{var F;if(!n||!s||!a||V.key!=="Escape"||k.current)return;const $=(F=o.current.floatingContext)==null?void 0:F.nodeId,B=p?$_e(p.nodesRef.current,$):[];if(!C&&(V.stopPropagation(),B.length>0)){let z=!0;if(B.forEach(H=>{var K;if((K=H.context)!=null&&K.open&&!H.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}i(!1,qEn(V)?V.nativeEvent:V,"escape-key")}),T=yE(V=>{var F;const $=()=>{var B;M(V),(B=DO(V))==null||B.removeEventListener("keydown",$)};(F=DO(V))==null||F.addEventListener("keydown",$)}),A=yE(V=>{var F;const $=_.current;_.current=!1;const B=w.current;if(w.current=!1,c==="click"&&B||$||typeof y=="function"&&!y(V))return;const z=DO(V),H="["+l5e("inert")+"]",K=kT(r.floating).querySelectorAll(H);let q=El(z)?z:null;for(;q&&!GD(q);){const ae=eS(q);if(GD(ae)||!El(ae))break;q=ae}if(K.length&&El(z)&&!GEn(z)&&!Mz(z,r.floating)&&Array.from(K).every(ae=>!Mz(q,ae)))return;if(ob(z)&&O){const ae=z.clientWidth>0&&z.scrollWidth>z.clientWidth,se=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let oe=se&&V.offsetX>z.clientWidth;if(se&&Nv(z).direction==="rtl"&&(oe=V.offsetX<=z.offsetWidth-z.clientWidth),oe||ae&&V.offsetY>z.clientHeight)return}const U=(F=o.current.floatingContext)==null?void 0:F.nodeId,Y=p&&$_e(p.nodesRef.current,U).some(ae=>{var se;return P_e(V,(se=ae.context)==null?void 0:se.elements.floating)});if(P_e(V,r.floating)||P_e(V,r.domReference)||Y)return;const J=p?$_e(p.nodesRef.current,U):[];if(J.length>0){let ae=!0;if(J.forEach(se=>{var oe;if((oe=se.context)!=null&&oe.open&&!se.context.dataRef.current.__outsidePressBubbles){ae=!1;return}}),!ae)return}i(!1,V,"outside-press")}),R=yE(V=>{var F;const $=()=>{var B;A(V),(B=DO(V))==null||B.removeEventListener(c,$)};(F=DO(V))==null||F.addEventListener(c,$)});b.useEffect(()=>{if(!n||!s)return;o.current.__escapeKeyBubbles=C,o.current.__outsidePressBubbles=N;let V=-1;function F(K){i(!1,K,"ancestor-scroll")}function $(){window.clearTimeout(V),k.current=!0}function B(){V=window.setTimeout(()=>{k.current=!1},dde()?5:0)}const z=kT(r.floating);a&&(z.addEventListener("keydown",E?T:M,E),z.addEventListener("compositionstart",$),z.addEventListener("compositionend",B)),y&&z.addEventListener(c,D?R:A,D);let H=[];return h&&(El(r.domReference)&&(H=EC(r.domReference)),El(r.floating)&&(H=H.concat(EC(r.floating))),!El(r.reference)&&r.reference&&r.reference.contextElement&&(H=H.concat(EC(r.reference.contextElement)))),H=H.filter(K=>{var q;return K!==((q=z.defaultView)==null?void 0:q.visualViewport)}),H.forEach(K=>{K.addEventListener("scroll",F,{passive:!0})}),()=>{a&&(z.removeEventListener("keydown",E?T:M,E),z.removeEventListener("compositionstart",$),z.removeEventListener("compositionend",B)),y&&z.removeEventListener(c,D?R:A,D),H.forEach(K=>{K.removeEventListener("scroll",F)}),window.clearTimeout(V)}},[o,r,a,y,c,n,i,h,s,C,N,M,E,T,A,D,R]),b.useEffect(()=>{_.current=!1},[y,c]);const P=b.useMemo(()=>({onKeyDown:M,[JDn[d]]:V=>{u&&i(!1,V.nativeEvent,"reference-press")}}),[M,i,u,d]),O=b.useMemo(()=>({onKeyDown:M,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[ekn[c]]:()=>{_.current=!0}}),[M,c]);return b.useMemo(()=>s?{reference:P,floating:O}:{},[s,P,O])}function nkn(t){const{open:e=!1,onOpenChange:n,elements:i}=t,r=GSt(),o=b.useRef({}),[s]=b.useState(()=>KDn()),a=s5e()!=null;{const f=i.reference;f&&!El(f)&&UDn("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=b.useState(i.reference),u=yE((f,m,p)=>{o.current.openEvent=f?m:void 0,s.emit("openchange",{open:f,event:m,reason:p,nested:a}),n==null||n(f,m,p)}),d=b.useMemo(()=>({setPositionReference:c}),[]),h=b.useMemo(()=>({reference:l||i.reference||null,floating:i.floating||null,domReference:i.reference}),[l,i.reference,i.floating]);return b.useMemo(()=>({dataRef:o,open:e,onOpenChange:u,elements:h,events:s,floatingId:r,refs:d}),[e,u,h,s,r,d])}function c5e(t){t===void 0&&(t={});const{nodeId:e}=t,n=nkn({...t,elements:{reference:null,floating:null,...t.elements}}),i=t.rootContext||n,r=i.elements,[o,s]=b.useState(null),[a,l]=b.useState(null),u=(r==null?void 0:r.reference)||o,d=b.useRef(null),h=a5e();Vx(()=>{u&&(d.current=u)},[u]);const f=jDn({...t,elements:{...r,...a&&{reference:a}}}),m=b.useCallback(w=>{const C=El(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;l(C),f.refs.setReference(C)},[f.refs]),p=b.useCallback(w=>{(El(w)||w===null)&&(d.current=w,s(w)),(El(f.refs.reference.current)||f.refs.reference.current===null||w!==null&&!El(w))&&f.refs.setReference(w)},[f.refs]),g=b.useMemo(()=>({...f.refs,setReference:p,setPositionReference:m,domReference:d}),[f.refs,p,m]),y=b.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),_=b.useMemo(()=>({...f,...i,refs:g,elements:y,nodeId:e}),[f,g,y,e,i]);return Vx(()=>{i.dataRef.current.floatingContext=_;const w=h==null?void 0:h.nodesRef.current.find(C=>C.id===e);w&&(w.context=_)}),b.useMemo(()=>({...f,context:_,refs:g,elements:y}),[f,g,y,_])}function ikn(t,e){e===void 0&&(e={});const{open:n,onOpenChange:i,events:r,dataRef:o,elements:s}=t,{enabled:a=!0,visibleOnly:l=!0}=e,c=b.useRef(!1),u=b.useRef(),d=b.useRef(!0);b.useEffect(()=>{if(!a)return;const f=Dp(s.domReference);function m(){!n&&ob(s.domReference)&&s.domReference===_Je(kT(s.domReference))&&(c.current=!0)}function p(){d.current=!0}return f.addEventListener("blur",m),f.addEventListener("keydown",p,!0),()=>{f.removeEventListener("blur",m),f.removeEventListener("keydown",p,!0)}},[s.domReference,n,a]),b.useEffect(()=>{if(!a)return;function f(m){let{reason:p}=m;(p==="reference-press"||p==="escape-key")&&(c.current=!0)}return r.on("openchange",f),()=>{r.off("openchange",f)}},[r,a]),b.useEffect(()=>()=>{clearTimeout(u.current)},[]);const h=b.useMemo(()=>({onPointerDown(f){HEn(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const m=DO(f.nativeEvent);if(l&&El(m))try{if(WEn()&&UEn())throw Error();if(!m.matches(":focus-visible"))return}catch{if(!d.current&&!XEn(m))return}i(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const m=f.relatedTarget,p=f.nativeEvent,g=El(m)&&m.hasAttribute(l5e("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const _=_Je(s.domReference?s.domReference.ownerDocument:document);!m&&_===s.domReference||Mz((y=o.current.floatingContext)==null?void 0:y.refs.floating.current,_)||Mz(s.domReference,_)||g||i(!1,p,"focus")})}}),[o,s.domReference,i,l]);return b.useMemo(()=>a?{reference:h}:{},[a,h])}const IJe="active",AJe="selected";function V_e(t,e,n){const i=new Map,r=n==="item";let o=t;if(r&&t){const{[IJe]:s,[AJe]:a,...l}=t;o=l}return{...n==="floating"&&{tabIndex:-1,[QDn]:""},...o,...e.map(s=>{const a=s?s[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(r&&[IJe,AJe].includes(c)))if(c.indexOf("on")===0){if(i.has(c)||i.set(c,[]),typeof u=="function"){var d;(d=i.get(c))==null||d.push(u),s[c]=function(){for(var h,f=arguments.length,m=new Array(f),p=0;p<f;p++)m[p]=arguments[p];return(h=i.get(c))==null?void 0:h.map(g=>g(...m)).find(g=>g!==void 0)}}}else s[c]=u}),s),{})}}function rkn(t){t===void 0&&(t=[]);const e=t.map(a=>a==null?void 0:a.reference),n=t.map(a=>a==null?void 0:a.floating),i=t.map(a=>a==null?void 0:a.item),r=b.useCallback(a=>V_e(a,t,"reference"),e),o=b.useCallback(a=>V_e(a,t,"floating"),n),s=b.useCallback(a=>V_e(a,t,"item"),i);return b.useMemo(()=>({getReferenceProps:r,getFloatingProps:o,getItemProps:s}),[r,o,s])}const okn=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function skn(t,e){var n;e===void 0&&(e={});const{open:i,floatingId:r}=t,{enabled:o=!0,role:s="dialog"}=e,a=(n=okn.get(s))!=null?n:s,l=GSt(),u=s5e()!=null,d=b.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="label"?"labelledby":"describedby")]:i?r:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":i?r:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,r,u,i,l,s]),h=b.useMemo(()=>{const m={id:r,...a&&{role:a}};return a==="tooltip"||s==="label"?m:{...m,...a==="menu"&&{"aria-labelledby":l}}},[a,r,l,s]),f=b.useCallback(m=>{let{active:p,selected:g}=m;const y={role:"option",...p&&{id:r+"-option"}};switch(s){case"select":return{...y,"aria-selected":p&&g};case"combobox":return{...y,...p&&{"aria-selected":!0}}}return{}},[r,s]);return b.useMemo(()=>o?{reference:d,floating:h,item:f}:{},[o,d,h,f])}function ZSt(t,e){if(t==="rtl"&&(e.includes("right")||e.includes("left"))){const[n,i]=e.split("-"),r=n==="right"?"left":"right";return i===void 0?r:`${r}-${i}`}return e}function RJe(t,e,n,i){return t==="center"||i==="center"?{top:e}:t==="end"?{bottom:n}:t==="start"?{top:n}:{}}function PJe(t,e,n,i,r){return t==="center"||i==="center"?{left:e}:t==="end"?{[r==="ltr"?"right":"left"]:n}:t==="start"?{[r==="ltr"?"left":"right"]:n}:{}}const akn={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function lkn({position:t,arrowSize:e,arrowOffset:n,arrowRadius:i,arrowPosition:r,arrowX:o,arrowY:s,dir:a}){const[l,c="center"]=t.split("-"),u={width:e,height:e,transform:"rotate(45deg)",position:"absolute",[akn[l]]:i},d=-e/2;return l==="left"?{...u,...RJe(c,s,n,r),right:d,borderLeftColor:"transparent",borderBottomColor:"transparent"}:l==="right"?{...u,...RJe(c,s,n,r),left:d,borderRightColor:"transparent",borderTopColor:"transparent"}:l==="top"?{...u,...PJe(c,o,n,r,a),bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent"}:l==="bottom"?{...u,...PJe(c,o,n,r,a),top:d,borderBottomColor:"transparent",borderRightColor:"transparent"}:{}}const u5e=b.forwardRef(({position:t,arrowSize:e,arrowOffset:n,arrowRadius:i,arrowPosition:r,visible:o,arrowX:s,arrowY:a,style:l,...c},u)=>{const{dir:d}=qk();return o?ne.jsx("div",{...c,ref:u,style:{...l,...lkn({position:t,arrowSize:e,arrowOffset:n,arrowRadius:i,arrowPosition:r,dir:d,arrowX:s,arrowY:a})}}):null});u5e.displayName="@mantine/core/FloatingArrow";const[ckn,QSt]=Uh("Popover component was not found in the tree");function fde({children:t,active:e=!0,refProp:n="ref",innerRef:i}){const r=WSn(e),o=Bc(r,i);return Nw(t)?b.cloneElement(t,{[n]:o}):t}function JSt(t){return ne.jsx(Zje,{tabIndex:-1,"data-autofocus":!0,...t})}fde.displayName="@mantine/core/FocusTrap";JSt.displayName="@mantine/core/FocusTrapInitialFocus";fde.InitialFocus=JSt;function ukn(t){const e=document.createElement("div");return e.setAttribute("data-portal","true"),typeof t.className=="string"&&e.classList.add(...t.className.split(" ").filter(Boolean)),typeof t.style=="object"&&Object.assign(e.style,t.style),typeof t.id=="string"&&e.setAttribute("id",t.id),e}const dkn={},eNt=b.forwardRef((t,e)=>{const{children:n,target:i,...r}=Kt("Portal",dkn,t),[o,s]=b.useState(!1),a=b.useRef(null);return Uk(()=>(s(!0),a.current=i?typeof i=="string"?document.querySelector(i):i:ukn(r),SK(e,a.current),!i&&a.current&&document.body.appendChild(a.current),()=>{!i&&a.current&&document.body.removeChild(a.current)}),[i]),!o||!a.current?null:Fc.createPortal(ne.jsx(ne.Fragment,{children:n}),a.current)});eNt.displayName="@mantine/core/Portal";function AA({withinPortal:t=!0,children:e,...n}){return t?ne.jsx(eNt,{...n,children:e}):ne.jsx(ne.Fragment,{children:e})}AA.displayName="@mantine/core/OptionalPortal";const SV=t=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${sn(t==="bottom"?10:-10)})`},transitionProperty:"transform, opacity"}),yZ={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:`translateY(${sn(30)}`},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:`translateY(${sn(-30)}`},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:`translateX(${sn(30)}`},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:`translateX(${sn(-30)}`},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${sn(-20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${sn(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${sn(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${sn(20)}) rotate(5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...SV("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...SV("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...SV("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...SV("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...SV("top"),common:{transformOrigin:"top right"}}},OJe={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function hkn({transition:t,state:e,duration:n,timingFunction:i}){const r={transitionDuration:`${n}ms`,transitionTimingFunction:i};return typeof t=="string"?t in yZ?{transitionProperty:yZ[t].transitionProperty,...r,...yZ[t].common,...yZ[t][OJe[e]]}:{}:{transitionProperty:t.transitionProperty,...r,...t.common,...t[OJe[e]]}}function fkn({duration:t,exitDuration:e,timingFunction:n,mounted:i,onEnter:r,onExit:o,onEntered:s,onExited:a,enterDelay:l,exitDelay:c}){const u=zc(),d=rde(),h=u.respectReducedMotion?d:!1,[f,m]=b.useState(h?0:t),[p,g]=b.useState(i?"entered":"exited"),y=b.useRef(-1),_=b.useRef(-1),w=b.useRef(-1),C=E=>{const D=E?r:o,k=E?s:a;window.clearTimeout(y.current);const M=h?0:E?t:e;m(M),M===0?(typeof D=="function"&&D(),typeof k=="function"&&k(),g(E?"entered":"exited")):w.current=requestAnimationFrame(()=>{sv.flushSync(()=>{g(E?"pre-entering":"pre-exiting")}),w.current=requestAnimationFrame(()=>{typeof D=="function"&&D(),g(E?"entering":"exiting"),y.current=window.setTimeout(()=>{typeof k=="function"&&k(),g(E?"entered":"exited")},M)})})},N=E=>{if(window.clearTimeout(_.current),typeof(E?l:c)!="number"){C(E);return}_.current=window.setTimeout(()=>{C(E)},E?l:c)};return Fp(()=>{N(i)},[i]),b.useEffect(()=>()=>{window.clearTimeout(y.current),cancelAnimationFrame(w.current)},[]),{transitionDuration:f,transitionStatus:p,transitionTimingFunction:n||"ease"}}function lu({keepMounted:t,transition:e="fade",duration:n=250,exitDuration:i=n,mounted:r,children:o,timingFunction:s="ease",onExit:a,onEntered:l,onEnter:c,onExited:u,enterDelay:d,exitDelay:h}){const{transitionDuration:f,transitionStatus:m,transitionTimingFunction:p}=fkn({mounted:r,exitDuration:i,duration:n,timingFunction:s,onExit:a,onEntered:l,onEnter:c,onExited:u,enterDelay:d,exitDelay:h});return f===0?r?ne.jsx(ne.Fragment,{children:o({})}):t?o({display:"none"}):null:m==="exited"?t?o({display:"none"}):null:ne.jsx(ne.Fragment,{children:o(hkn({transition:e,duration:f,state:m,timingFunction:p}))})}lu.displayName="@mantine/core/Transition";var tNt={dropdown:"m_38a85659",arrow:"m_a31dc6c1"};const mkn={},d5e=Dn((t,e)=>{var g,y,_,w;const n=Kt("PopoverDropdown",mkn,t),{className:i,style:r,vars:o,children:s,onKeyDownCapture:a,variant:l,classNames:c,styles:u,...d}=n,h=QSt(),f=tSt({opened:h.opened,shouldReturnFocus:h.returnFocus}),m=h.withRoles?{"aria-labelledby":h.getTargetId(),id:h.getDropdownId(),role:"dialog",tabIndex:-1}:{},p=Bc(e,h.floating);return h.disabled?null:ne.jsx(AA,{...h.portalProps,withinPortal:h.withinPortal,children:ne.jsx(lu,{mounted:h.opened,...h.transitionProps,transition:((g=h.transitionProps)==null?void 0:g.transition)||"fade",duration:((y=h.transitionProps)==null?void 0:y.duration)??150,keepMounted:h.keepMounted,exitDuration:typeof((_=h.transitionProps)==null?void 0:_.exitDuration)=="number"?h.transitionProps.exitDuration:(w=h.transitionProps)==null?void 0:w.duration,children:C=>ne.jsx(fde,{active:h.trapFocus,innerRef:p,children:ne.jsxs(mn,{...m,...d,variant:l,onKeyDownCapture:MSn(h.onClose,{active:h.closeOnEscape,onTrigger:f,onKeyDown:a}),"data-position":h.placement,"data-fixed":h.floatingStrategy==="fixed"||void 0,...h.getStyles("dropdown",{className:i,props:n,classNames:c,styles:u,style:[{...C,zIndex:h.zIndex,top:h.y??0,left:h.x??0,width:h.width==="target"?void 0:sn(h.width)},r]}),children:[s,ne.jsx(u5e,{ref:h.arrowRef,arrowX:h.arrowX,arrowY:h.arrowY,visible:h.withArrow,position:h.placement,arrowSize:h.arrowSize,arrowRadius:h.arrowRadius,arrowOffset:h.arrowOffset,arrowPosition:h.arrowPosition,...h.getStyles("arrow",{props:n,classNames:c,styles:u})})]})})})})});d5e.classes=tNt;d5e.displayName="@mantine/core/PopoverDropdown";const pkn={refProp:"ref",popupType:"dialog"},nNt=Dn((t,e)=>{const{children:n,refProp:i,popupType:r,...o}=Kt("PopoverTarget",pkn,t);if(!Nw(n))throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const s=o,a=QSt(),l=Bc(a.reference,n.ref,e),c=a.withRoles?{"aria-haspopup":r,"aria-expanded":a.opened,"aria-controls":a.getDropdownId(),id:a.getTargetId()}:{};return b.cloneElement(n,{...s,...c,...a.targetProps,className:Vt(a.targetProps.className,s.className,n.props.className),[i]:l,...a.controlled?null:{onClick:a.onToggle}})});nNt.displayName="@mantine/core/PopoverTarget";function iNt({opened:t,floating:e,position:n,positionDependencies:i}){const[r,o]=b.useState(0);b.useEffect(()=>{if(e.refs.reference.current&&e.refs.floating.current)return MDn(e.refs.reference.current,e.refs.floating.current,e.update)},[e.refs.reference.current,e.refs.floating.current,t,r,n]),Fp(()=>{e.update()},i),Fp(()=>{o(s=>s+1)},[t])}function gkn(t){if(t===void 0)return{shift:!0,flip:!0};const e={...t};return t.shift===void 0&&(e.shift=!0),t.flip===void 0&&(e.flip=!0),e}function bkn(t,e){const n=gkn(t.middlewares),i=[USt(t.offset)];return n.shift&&i.push(o5e(typeof n.shift=="boolean"?{limiter:DJe(),padding:5}:{limiter:DJe(),padding:5,...n.shift})),n.flip&&i.push(typeof n.flip=="boolean"?BEe():BEe(n.flip)),n.inline&&i.push(typeof n.inline=="boolean"?zEe():zEe(n.inline)),i.push(KSt({element:t.arrowRef,padding:t.arrowOffset})),(n.size||t.width==="target")&&i.push($Dn({...typeof n.size=="boolean"?{}:n.size,apply({rects:r,availableWidth:o,availableHeight:s,...a}){var u;const c=((u=e().refs.floating.current)==null?void 0:u.style)??{};n.size&&(typeof n.size=="object"&&n.size.apply?n.size.apply({rects:r,availableWidth:o,availableHeight:s,...a}):Object.assign(c,{maxWidth:`${o}px`,maxHeight:`${s}px`})),t.width==="target"&&Object.assign(c,{width:`${r.reference.width}px`})}})),i}function vkn(t){const[e,n]=au({value:t.opened,defaultValue:t.defaultOpened,finalValue:!1,onChange:t.onChange}),i=()=>{var s;e&&((s=t.onClose)==null||s.call(t),n(!1))},r=()=>{var s,a;e?((s=t.onClose)==null||s.call(t),n(!1)):((a=t.onOpen)==null||a.call(t),n(!0))},o=c5e({strategy:t.strategy,placement:t.position,middleware:bkn(t,()=>o)});return iNt({opened:t.opened,position:t.position,positionDependencies:t.positionDependencies||[],floating:o}),Fp(()=>{var s;(s=t.onPositionChange)==null||s.call(t,o.placement)},[o.placement]),Fp(()=>{var s,a;t.opened?(a=t.onOpen)==null||a.call(t):(s=t.onClose)==null||s.call(t)},[t.opened]),{floating:o,controlled:typeof t.opened=="boolean",opened:e,onClose:i,onToggle:r}}const ykn={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:gb("popover"),__staticSelector:"Popover",width:"max-content"},_kn=(t,{radius:e,shadow:n})=>({dropdown:{"--popover-radius":e===void 0?void 0:Va(e),"--popover-shadow":Vje(n)}});function Iu(t){var Te,De,Pe,ge,he,me;const e=Kt("Popover",ykn,t),{children:n,position:i,offset:r,onPositionChange:o,positionDependencies:s,opened:a,transitionProps:l,width:c,middlewares:u,withArrow:d,arrowSize:h,arrowOffset:f,arrowRadius:m,arrowPosition:p,unstyled:g,classNames:y,styles:_,closeOnClickOutside:w,withinPortal:C,portalProps:N,closeOnEscape:E,clickOutsideEvents:D,trapFocus:k,onClose:M,onOpen:T,onChange:A,zIndex:R,radius:P,shadow:O,id:V,defaultOpened:F,__staticSelector:$,withRoles:B,disabled:z,returnFocus:H,variant:K,keepMounted:q,vars:U,floatingStrategy:Y,...J}=e,ae=hi({name:$,props:e,classes:tNt,classNames:y,styles:_,unstyled:g,rootSelector:"dropdown",vars:U,varsResolver:_kn}),se=b.useRef(null),[oe,fe]=b.useState(null),[de,ie]=b.useState(null),{dir:Q}=qk(),be=jm(V),le=vkn({middlewares:u,width:c,position:ZSt(Q,i),offset:typeof r=="number"?r+(d?h/2:0):r,arrowRef:se,arrowOffset:f,onPositionChange:o,positionDependencies:s,opened:a,defaultOpened:F,onChange:A,onOpen:T,onClose:M,strategy:Y});ASn(()=>w&&le.onClose(),D,[oe,de]);const Ne=b.useCallback(X=>{fe(X),le.floating.refs.setReference(X)},[le.floating.refs.setReference]),Le=b.useCallback(X=>{ie(X),le.floating.refs.setFloating(X)},[le.floating.refs.setFloating]);return ne.jsx(ckn,{value:{returnFocus:H,disabled:z,controlled:le.controlled,reference:Ne,floating:Le,x:le.floating.x,y:le.floating.y,arrowX:(Pe=(De=(Te=le.floating)==null?void 0:Te.middlewareData)==null?void 0:De.arrow)==null?void 0:Pe.x,arrowY:(me=(he=(ge=le.floating)==null?void 0:ge.middlewareData)==null?void 0:he.arrow)==null?void 0:me.y,opened:le.opened,arrowRef:se,transitionProps:l,width:c,withArrow:d,arrowSize:h,arrowOffset:f,arrowRadius:m,arrowPosition:p,placement:le.floating.placement,trapFocus:k,withinPortal:C,portalProps:N,zIndex:R,radius:P,shadow:O,closeOnEscape:E,onClose:le.onClose,onToggle:le.onToggle,getTargetId:()=>`${be}-target`,getDropdownId:()=>`${be}-dropdown`,withRoles:B,targetProps:J,__staticSelector:$,classNames:y,styles:_,unstyled:g,variant:K,keepMounted:q,getStyles:ae,floatingStrategy:Y},children:n})}Iu.Target=nNt;Iu.Dropdown=d5e;Iu.displayName="@mantine/core/Popover";Iu.extend=t=>t;var o0={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const xkn=b.forwardRef(({className:t,...e},n)=>ne.jsxs(mn,{component:"span",className:Vt(o0.barsLoader,t),...e,ref:n,children:[ne.jsx("span",{className:o0.bar}),ne.jsx("span",{className:o0.bar}),ne.jsx("span",{className:o0.bar})]})),wkn=b.forwardRef(({className:t,...e},n)=>ne.jsxs(mn,{component:"span",className:Vt(o0.dotsLoader,t),...e,ref:n,children:[ne.jsx("span",{className:o0.dot}),ne.jsx("span",{className:o0.dot}),ne.jsx("span",{className:o0.dot})]})),Ckn=b.forwardRef(({className:t,...e},n)=>ne.jsx(mn,{component:"span",className:Vt(o0.ovalLoader,t),...e,ref:n})),rNt={bars:xkn,oval:Ckn,dots:wkn},Skn={loaders:rNt,type:"oval"},Nkn=(t,{size:e,color:n})=>({root:{"--loader-size":Hr(e,"loader-size"),"--loader-color":n?Xa(n,t):void 0}}),$p=Dn((t,e)=>{const n=Kt("Loader",Skn,t),{size:i,color:r,type:o,vars:s,className:a,style:l,classNames:c,styles:u,unstyled:d,loaders:h,variant:f,children:m,...p}=n,g=hi({name:"Loader",props:n,classes:o0,className:a,style:l,classNames:c,styles:u,unstyled:d,vars:s,varsResolver:Nkn});return m?ne.jsx(mn,{...g("root"),ref:e,...p,children:m}):ne.jsx(mn,{...g("root"),ref:e,component:h[o],variant:f,size:i,...p})});$p.defaultLoaders=rNt;$p.classes=o0;$p.displayName="@mantine/core/Loader";var mde={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21"};const jJe={orientation:"horizontal"},Ekn=(t,{borderWidth:e})=>({group:{"--ai-border-width":sn(e)}}),h5e=Dn((t,e)=>{const n=Kt("ActionIconGroup",jJe,t),{className:i,style:r,classNames:o,styles:s,unstyled:a,orientation:l,vars:c,borderWidth:u,variant:d,mod:h,...f}=Kt("ActionIconGroup",jJe,t),m=hi({name:"ActionIconGroup",props:n,classes:mde,className:i,style:r,classNames:o,styles:s,unstyled:a,vars:c,varsResolver:Ekn,rootSelector:"group"});return ne.jsx(mn,{...m("group"),ref:e,variant:d,mod:[{"data-orientation":l},h],role:"group",...f})});h5e.classes=mde;h5e.displayName="@mantine/core/ActionIconGroup";const Dkn={},kkn=(t,{size:e,radius:n,variant:i,gradient:r,color:o,autoContrast:s})=>{const a=t.variantColorResolver({color:o||t.primaryColor,theme:t,gradient:r,variant:i||"filled",autoContrast:s});return{root:{"--ai-size":Hr(e,"ai-size"),"--ai-radius":n===void 0?void 0:Va(n),"--ai-bg":o||i?a.background:void 0,"--ai-hover":o||i?a.hover:void 0,"--ai-hover-color":o||i?a.hoverColor:void 0,"--ai-color":a.color,"--ai-bd":o||i?a.border:void 0}}},Fr=Cd((t,e)=>{const n=Kt("ActionIcon",Dkn,t),{className:i,unstyled:r,variant:o,classNames:s,styles:a,style:l,loading:c,loaderProps:u,size:d,color:h,radius:f,__staticSelector:m,gradient:p,vars:g,children:y,disabled:_,"data-disabled":w,autoContrast:C,mod:N,...E}=n,D=hi({name:["ActionIcon",m],props:n,className:i,style:l,classes:mde,classNames:s,styles:a,unstyled:r,vars:g,varsResolver:kkn});return ne.jsxs(Lh,{...D("root",{active:!_&&!c&&!w}),...E,unstyled:r,variant:o,size:d,disabled:_||c,ref:e,mod:[{loading:c,disabled:_||w},N],children:[ne.jsx(lu,{mounted:!!c,transition:"slide-down",duration:150,children:k=>ne.jsx(mn,{component:"span",...D("loader",{style:k}),"aria-hidden":!0,children:ne.jsx($p,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...u})})}),ne.jsx(mn,{component:"span",mod:{loading:c},...D("icon"),children:y})]})});Fr.classes=mde;Fr.displayName="@mantine/core/ActionIcon";Fr.Group=h5e;const oNt=b.forwardRef(({size:t="var(--cb-icon-size, 70%)",style:e,...n},i)=>ne.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:t,height:t},ref:i,...n,children:ne.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}));oNt.displayName="@mantine/core/CloseIcon";var sNt={root:"m_86a44da5","root--subtle":"m_220c80f2"};const Mkn={variant:"subtle"},Lkn=(t,{size:e,radius:n,iconSize:i})=>({root:{"--cb-size":Hr(e,"cb-size"),"--cb-radius":n===void 0?void 0:Va(n),"--cb-icon-size":sn(i)}}),Gk=Cd((t,e)=>{const n=Kt("CloseButton",Mkn,t),{iconSize:i,children:r,vars:o,radius:s,className:a,classNames:l,style:c,styles:u,unstyled:d,"data-disabled":h,disabled:f,variant:m,icon:p,mod:g,...y}=n,_=hi({name:"CloseButton",props:n,className:a,style:c,classes:sNt,classNames:l,styles:u,unstyled:d,vars:o,varsResolver:Lkn});return ne.jsxs(Lh,{ref:e,...y,unstyled:d,variant:m,disabled:f,mod:[{disabled:f||h},g],..._("root",{variant:m,active:!f&&!h}),children:[p||ne.jsx(oNt,{}),r]})});Gk.classes=sNt;Gk.displayName="@mantine/core/CloseButton";function Tkn(t){return b.Children.toArray(t).filter(Boolean)}var aNt={root:"m_4081bf90"};const Ikn={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},Akn=(t,{grow:e,preventGrowOverflow:n,gap:i,align:r,justify:o,wrap:s},{childWidth:a})=>({root:{"--group-child-width":e&&n?a:void 0,"--group-gap":Rc(i),"--group-align":r,"--group-justify":o,"--group-wrap":s}}),un=Dn((t,e)=>{const n=Kt("Group",Ikn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,children:l,gap:c,align:u,justify:d,wrap:h,grow:f,preventGrowOverflow:m,vars:p,variant:g,__size:y,mod:_,...w}=n,C=Tkn(l),N=C.length,E=Rc(c??"md"),k={childWidth:`calc(${100/N}% - (${E} - ${E} / ${N}))`},M=hi({name:"Group",props:n,stylesCtx:k,className:r,style:o,classes:aNt,classNames:i,styles:s,unstyled:a,vars:p,varsResolver:Akn});return ne.jsx(mn,{...M("root"),ref:e,variant:g,mod:[{grow:f},_],size:y,...w,children:C})});un.classes=aNt;un.displayName="@mantine/core/Group";var lNt={root:"m_9814e45f"};const Rkn={zIndex:gb("modal")},Pkn=(t,{gradient:e,color:n,backgroundOpacity:i,blur:r,radius:o,zIndex:s})=>({root:{"--overlay-bg":e||(n!==void 0||i!==void 0)&&Q_(n||"#000",i??.6)||void 0,"--overlay-filter":r?`blur(${sn(r)})`:void 0,"--overlay-radius":o===void 0?void 0:Va(o),"--overlay-z-index":s==null?void 0:s.toString()}}),Lz=Cd((t,e)=>{const n=Kt("Overlay",Rkn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,fixed:c,center:u,children:d,radius:h,zIndex:f,gradient:m,blur:p,color:g,backgroundOpacity:y,mod:_,...w}=n,C=hi({name:"Overlay",props:n,classes:lNt,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:Pkn});return ne.jsx(mn,{ref:e,...C("root"),mod:[{center:u,fixed:c},_],...w,children:d})});Lz.classes=lNt;Lz.displayName="@mantine/core/Overlay";const[Okn,TS]=Uh("ModalBase component was not found in tree");function jkn({opened:t,transitionDuration:e}){const[n,i]=b.useState(t),r=b.useRef(),s=rde()?0:e;return b.useEffect(()=>(t?(i(!0),window.clearTimeout(r.current)):s===0?i(!1):r.current=window.setTimeout(()=>i(!1),s),()=>window.clearTimeout(r.current)),[t,s]),n}function Fkn({id:t,transitionProps:e,opened:n,trapFocus:i,closeOnEscape:r,onClose:o,returnFocus:s}){const a=jm(t),[l,c]=b.useState(!1),[u,d]=b.useState(!1),h=typeof(e==null?void 0:e.duration)=="number"?e==null?void 0:e.duration:200,f=jkn({opened:n,transitionDuration:h});return TEe("keydown",m=>{var p;m.key==="Escape"&&r&&n&&((p=m.target)==null?void 0:p.getAttribute("data-mantine-stop-propagation"))!=="true"&&o()},{capture:!0}),tSt({opened:n,shouldReturnFocus:i&&s}),{_id:a,titleMounted:l,bodyMounted:u,shouldLockScroll:f,setTitleMounted:c,setBodyMounted:d}}const cNt=b.forwardRef(({keepMounted:t,opened:e,onClose:n,id:i,transitionProps:r,trapFocus:o,closeOnEscape:s,returnFocus:a,closeOnClickOutside:l,withinPortal:c,portalProps:u,lockScroll:d,children:h,zIndex:f,shadow:m,padding:p,__vars:g,unstyled:y,removeScrollProps:_,...w},C)=>{const{_id:N,titleMounted:E,bodyMounted:D,shouldLockScroll:k,setTitleMounted:M,setBodyMounted:T}=Fkn({id:i,transitionProps:r,opened:e,trapFocus:o,closeOnEscape:s,onClose:n,returnFocus:a}),{key:A,...R}=_||{};return ne.jsx(AA,{...u,withinPortal:c,children:ne.jsx(Okn,{value:{opened:e,onClose:n,closeOnClickOutside:l,transitionProps:{...r,keepMounted:t},getTitleId:()=>`${N}-title`,getBodyId:()=>`${N}-body`,titleMounted:E,bodyMounted:D,setTitleMounted:M,setBodyMounted:T,trapFocus:o,closeOnEscape:s,zIndex:f,unstyled:y},children:ne.jsx(YCt,{enabled:k&&d,...R,children:ne.jsx(mn,{ref:C,...w,__vars:{...g,"--mb-z-index":(f||gb("modal")).toString(),"--mb-shadow":Vje(m),"--mb-padding":Rc(p)},children:h})},A)})})});function $kn(){const t=TS();return b.useEffect(()=>(t.setBodyMounted(!0),()=>t.setBodyMounted(!1)),[]),t.getBodyId()}var Pj={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};const f5e=b.forwardRef(({className:t,...e},n)=>{const i=$kn(),r=TS();return ne.jsx(mn,{ref:n,...e,id:i,className:Vt({[Pj.body]:!r.unstyled},t)})});f5e.displayName="@mantine/core/ModalBaseBody";const m5e=b.forwardRef(({className:t,onClick:e,...n},i)=>{const r=TS();return ne.jsx(Gk,{ref:i,...n,onClick:o=>{r.onClose(),e==null||e(o)},className:Vt({[Pj.close]:!r.unstyled},t),unstyled:r.unstyled})});m5e.displayName="@mantine/core/ModalBaseCloseButton";const uNt=b.forwardRef(({transitionProps:t,className:e,innerProps:n,onKeyDown:i,style:r,...o},s)=>{const a=TS();return ne.jsx(lu,{mounted:a.opened,transition:"pop",...a.transitionProps,...t,children:l=>ne.jsx("div",{...n,className:Vt({[Pj.inner]:!a.unstyled},n.className),children:ne.jsx(fde,{active:a.opened&&a.trapFocus,innerRef:s,children:ne.jsx(Ew,{...o,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":a.bodyMounted?a.getBodyId():void 0,"aria-labelledby":a.titleMounted?a.getTitleId():void 0,style:[r,l],className:Vt({[Pj.content]:!a.unstyled},e),unstyled:a.unstyled,children:o.children})})})})}),p5e=b.forwardRef(({className:t,...e},n)=>{const i=TS();return ne.jsx(mn,{component:"header",ref:n,className:Vt({[Pj.header]:!i.unstyled},t),...e})});p5e.displayName="@mantine/core/ModalBaseHeader";const Vkn={duration:200,timingFunction:"ease",transition:"fade"};function Bkn(t){const e=TS();return{...Vkn,...e.transitionProps,...t}}const g5e=b.forwardRef(({onClick:t,transitionProps:e,style:n,...i},r)=>{const o=TS(),s=Bkn(e);return ne.jsx(lu,{mounted:o.opened,...s,transition:"fade",children:a=>ne.jsx(Lz,{ref:r,fixed:!0,style:[n,a],zIndex:o.zIndex,unstyled:o.unstyled,onClick:l=>{t==null||t(l),o.closeOnClickOutside&&o.onClose()},...i})})});g5e.displayName="@mantine/core/ModalBaseOverlay";function zkn(){const t=TS();return b.useEffect(()=>(t.setTitleMounted(!0),()=>t.setTitleMounted(!1)),[]),t.getTitleId()}const b5e=b.forwardRef(({className:t,...e},n)=>{const i=zkn(),r=TS();return ne.jsx(mn,{component:"h2",ref:n,className:Vt({[Pj.title]:!r.unstyled},t),...e,id:i})});b5e.displayName="@mantine/core/ModalBaseTitle";function dNt({children:t}){return ne.jsx(ne.Fragment,{children:t})}const[Hkn,GF]=BF({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var Wv={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const FJe={},Wkn=(t,{size:e})=>({description:{"--input-description-size":e===void 0?void 0:`calc(${hd(e)} - ${sn(2)})`}}),pde=Dn((t,e)=>{const n=Kt("InputDescription",FJe,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,size:c,__staticSelector:u,__inheritStyles:d=!0,variant:h,...f}=Kt("InputDescription",FJe,n),m=GF(),p=hi({name:["InputWrapper",u],props:n,classes:Wv,className:r,style:o,classNames:i,styles:s,unstyled:a,rootSelector:"description",vars:l,varsResolver:Wkn}),g=d&&(m==null?void 0:m.getStyles)||p;return ne.jsx(mn,{component:"p",ref:e,variant:h,size:c,...g("description",m!=null&&m.getStyles?{className:r,style:o}:void 0),...f})});pde.classes=Wv;pde.displayName="@mantine/core/InputDescription";const Ukn={},Kkn=(t,{size:e})=>({error:{"--input-error-size":e===void 0?void 0:`calc(${hd(e)} - ${sn(2)})`}}),gde=Dn((t,e)=>{const n=Kt("InputError",Ukn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,size:c,__staticSelector:u,__inheritStyles:d=!0,variant:h,...f}=n,m=hi({name:["InputWrapper",u],props:n,classes:Wv,className:r,style:o,classNames:i,styles:s,unstyled:a,rootSelector:"error",vars:l,varsResolver:Kkn}),p=GF(),g=d&&(p==null?void 0:p.getStyles)||m;return ne.jsx(mn,{component:"p",ref:e,variant:h,size:c,...g("error",p!=null&&p.getStyles?{className:r,style:o}:void 0),...f})});gde.classes=Wv;gde.displayName="@mantine/core/InputError";const $Je={labelElement:"label"},qkn=(t,{size:e})=>({label:{"--input-label-size":hd(e),"--input-asterisk-color":void 0}}),bde=Dn((t,e)=>{const n=Kt("InputLabel",$Je,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,labelElement:c,size:u,required:d,htmlFor:h,onMouseDown:f,children:m,__staticSelector:p,variant:g,mod:y,..._}=Kt("InputLabel",$Je,n),w=hi({name:["InputWrapper",p],props:n,classes:Wv,className:r,style:o,classNames:i,styles:s,unstyled:a,rootSelector:"label",vars:l,varsResolver:qkn}),C=GF(),N=(C==null?void 0:C.getStyles)||w;return ne.jsxs(mn,{...N("label",C!=null&&C.getStyles?{className:r,style:o}:void 0),component:c,variant:g,size:u,ref:e,htmlFor:c==="label"?h:void 0,mod:[{required:d},y],onMouseDown:E=>{f==null||f(E),!E.defaultPrevented&&E.detail>1&&E.preventDefault()},..._,children:[m,d&&ne.jsx("span",{...N("required"),"aria-hidden":!0,children:" *"})]})});bde.classes=Wv;bde.displayName="@mantine/core/InputLabel";const VJe={},v5e=Dn((t,e)=>{const n=Kt("InputPlaceholder",VJe,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,__staticSelector:c,variant:u,error:d,mod:h,...f}=Kt("InputPlaceholder",VJe,n),m=hi({name:["InputPlaceholder",c],props:n,classes:Wv,className:r,style:o,classNames:i,styles:s,unstyled:a,rootSelector:"placeholder"});return ne.jsx(mn,{...m("placeholder"),mod:[{error:!!d},h],component:"span",variant:u,ref:e,...f})});v5e.classes=Wv;v5e.displayName="@mantine/core/InputPlaceholder";function Gkn(t,{hasDescription:e,hasError:n}){const i=t.findIndex(l=>l==="input"),r=t.slice(0,i),o=t.slice(i+1),s=e&&r.includes("description")||n&&r.includes("error");return{offsetBottom:e&&o.includes("description")||n&&o.includes("error"),offsetTop:s}}const Ykn={labelElement:"label",inputContainer:t=>t,inputWrapperOrder:["label","description","input","error"]},Xkn=(t,{size:e})=>({label:{"--input-label-size":hd(e),"--input-asterisk-color":void 0},error:{"--input-error-size":e===void 0?void 0:`calc(${hd(e)} - ${sn(2)})`},description:{"--input-description-size":e===void 0?void 0:`calc(${hd(e)} - ${sn(2)})`}}),y5e=Dn((t,e)=>{const n=Kt("InputWrapper",Ykn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,size:c,variant:u,__staticSelector:d,inputContainer:h,inputWrapperOrder:f,label:m,error:p,description:g,labelProps:y,descriptionProps:_,errorProps:w,labelElement:C,children:N,withAsterisk:E,id:D,required:k,__stylesApiProps:M,mod:T,...A}=n,R=hi({name:["InputWrapper",d],props:M||n,classes:Wv,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:Xkn}),P={size:c,variant:u,__staticSelector:d},O=jm(D),V=typeof E=="boolean"?E:k,F=(w==null?void 0:w.id)||`${O}-error`,$=(_==null?void 0:_.id)||`${O}-description`,B=O,z=!!p&&typeof p!="boolean",H=!!g,K=`${z?F:""} ${H?$:""}`,q=K.trim().length>0?K.trim():void 0,U=(y==null?void 0:y.id)||`${O}-label`,Y=m&&ne.jsx(bde,{labelElement:C,id:U,htmlFor:B,required:V,...P,...y,children:m},"label"),J=H&&ne.jsx(pde,{..._,...P,size:(_==null?void 0:_.size)||P.size,id:(_==null?void 0:_.id)||$,children:g},"description"),ae=ne.jsx(b.Fragment,{children:h(N)},"input"),se=z&&b.createElement(gde,{...w,...P,size:(w==null?void 0:w.size)||P.size,key:"error",id:(w==null?void 0:w.id)||F},p),oe=f.map(fe=>{switch(fe){case"label":return Y;case"input":return ae;case"description":return J;case"error":return se;default:return null}});return ne.jsx(Hkn,{value:{getStyles:R,describedBy:q,inputId:B,labelId:U,...Gkn(f,{hasDescription:H,hasError:z})},children:ne.jsx(mn,{ref:e,variant:u,size:c,mod:[{error:!!p},T],...R("root"),...A,children:oe})})});y5e.classes=Wv;y5e.displayName="@mantine/core/InputWrapper";const Zkn={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0},Qkn=(t,e,n)=>({wrapper:{"--input-margin-top":n.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":n.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":Hr(e.size,"input-height"),"--input-fz":hd(e.size),"--input-radius":e.radius===void 0?void 0:Va(e.radius),"--input-left-section-width":e.leftSectionWidth!==void 0?sn(e.leftSectionWidth):void 0,"--input-right-section-width":e.rightSectionWidth!==void 0?sn(e.rightSectionWidth):void 0,"--input-padding-y":e.multiline?Hr(e.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":e.leftSectionPointerEvents,"--input-right-section-pointer-events":e.rightSectionPointerEvents}}),ra=Cd((t,e)=>{const n=Kt("Input",Zkn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,required:l,__staticSelector:c,__stylesApiProps:u,size:d,wrapperProps:h,error:f,disabled:m,leftSection:p,leftSectionProps:g,leftSectionWidth:y,rightSection:_,rightSectionProps:w,rightSectionWidth:C,rightSectionPointerEvents:N,leftSectionPointerEvents:E,variant:D,vars:k,pointer:M,multiline:T,radius:A,id:R,withAria:P,withErrorStyles:O,mod:V,inputSize:F,...$}=n,{styleProps:B,rest:z}=WF($),H=GF(),K={offsetBottom:H==null?void 0:H.offsetBottom,offsetTop:H==null?void 0:H.offsetTop},q=hi({name:["Input",c],props:u||n,classes:Wv,className:r,style:o,classNames:i,styles:s,unstyled:a,stylesCtx:K,rootSelector:"wrapper",vars:k,varsResolver:Qkn}),U=P?{required:l,disabled:m,"aria-invalid":!!f,"aria-describedby":H==null?void 0:H.describedBy,id:(H==null?void 0:H.inputId)||R}:{};return ne.jsxs(mn,{...q("wrapper"),...B,...h,mod:[{error:!!f&&O,pointer:M,disabled:m,multiline:T,"data-with-right-section":!!_,"data-with-left-section":!!p},V],variant:D,size:d,children:[p&&ne.jsx("div",{...g,"data-position":"left",...q("section",{className:g==null?void 0:g.className,style:g==null?void 0:g.style}),children:p}),ne.jsx(mn,{component:"input",...z,...U,ref:e,required:l,mod:{disabled:m,error:!!f&&O},variant:D,__size:F,...q("input")}),_&&ne.jsx("div",{...w,"data-position":"right",...q("section",{className:w==null?void 0:w.className,style:w==null?void 0:w.style}),children:_})]})});ra.classes=Wv;ra.Wrapper=y5e;ra.Label=bde;ra.Error=gde;ra.Description=pde;ra.Placeholder=v5e;ra.displayName="@mantine/core/Input";function _5e(t,e,n){const i=Kt(t,e,n),{label:r,description:o,error:s,required:a,classNames:l,styles:c,className:u,unstyled:d,__staticSelector:h,__stylesApiProps:f,errorProps:m,labelProps:p,descriptionProps:g,wrapperProps:y,id:_,size:w,style:C,inputContainer:N,inputWrapperOrder:E,withAsterisk:D,variant:k,vars:M,mod:T,...A}=i,{styleProps:R,rest:P}=WF(A),O={label:r,description:o,error:s,required:a,classNames:l,className:u,__staticSelector:h,__stylesApiProps:f||i,errorProps:m,labelProps:p,descriptionProps:g,unstyled:d,styles:c,size:w,style:C,inputContainer:N,inputWrapperOrder:E,withAsterisk:D,variant:k,id:_,mod:T,...y};return{...P,classNames:l,styles:c,unstyled:d,wrapperProps:{...O,...R},inputProps:{required:a,classNames:l,styles:c,unstyled:d,size:w,__staticSelector:h,__stylesApiProps:f||i,error:s,variant:k,id:_}}}const Jkn={__staticSelector:"InputBase",withAria:!0},Qp=Cd((t,e)=>{const{inputProps:n,wrapperProps:i,...r}=_5e("InputBase",Jkn,t);return ne.jsx(ra.Wrapper,{...i,children:ne.jsx(ra,{...n,...r,ref:e})})});Qp.classes={...ra.classes,...ra.Wrapper.classes};Qp.displayName="@mantine/core/InputBase";const eMn={gap:{type:"spacing",property:"gap"},rowGap:{type:"spacing",property:"rowGap"},columnGap:{type:"spacing",property:"columnGap"},align:{type:"identity",property:"alignItems"},justify:{type:"identity",property:"justifyContent"},wrap:{type:"identity",property:"flexWrap"},direction:{type:"identity",property:"flexDirection"}};var hNt={root:"m_8bffd616"};const tMn={},uu=Cd((t,e)=>{const n=Kt("Flex",tMn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,gap:c,rowGap:u,columnGap:d,align:h,justify:f,wrap:m,direction:p,...g}=n,y=hi({name:"Flex",classes:hNt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l}),_=zc(),w=NK(),C=bSt({styleProps:{gap:c,rowGap:u,columnGap:d,align:h,justify:f,wrap:m,direction:p},theme:_,data:eMn});return ne.jsxs(ne.Fragment,{children:[C.hasResponsiveStyles&&ne.jsx(HF,{selector:`.${w}`,styles:C.styles,media:C.media}),ne.jsx(mn,{ref:e,...y("root",{className:w,style:Wk(C.inlineStyles)}),...g})]})});uu.classes=hNt;uu.displayName="@mantine/core/Flex";function nMn(t,e){if(!e||!t)return!1;let n=e.parentNode;for(;n!=null;){if(n===t)return!0;n=n.parentNode}return!1}function iMn({target:t,parent:e,ref:n,displayAfterTransitionEnd:i}){const r=b.useRef(),[o,s]=b.useState(!1),[a,l]=b.useState(typeof i=="boolean"?i:!1),c=()=>{if(!t||!e)return;const f=t.getBoundingClientRect(),m=e.getBoundingClientRect(),p={top:f.top-m.top,left:f.left-m.left,width:f.width,height:f.height};n.current&&(n.current.style.transform=`translateY(${p.top}px) translateX(${p.left}px)`,n.current.style.width=`${p.width}px`,n.current.style.height=`${p.height}px`)},u=()=>{window.clearTimeout(r.current),n.current&&(n.current.style.transitionDuration="0ms"),c(),r.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration="")},30)},d=b.useRef(),h=b.useRef();return b.useEffect(()=>{if(c(),t)return d.current=new ResizeObserver(u),d.current.observe(t),e&&(h.current=new ResizeObserver(u),h.current.observe(e)),()=>{var f,m;(f=d.current)==null||f.disconnect(),(m=h.current)==null||m.disconnect()}},[e,t]),b.useEffect(()=>{if(e){const f=m=>{nMn(m.target,e)&&(u(),l(!1))};return e.addEventListener("transitionend",f),()=>{e.removeEventListener("transitionend",f)}}},[e]),lSt(()=>{cSt()!=="test"&&s(!0)},20,{autoInvoke:!0}),iNn(f=>{f.forEach(m=>{m.type==="attributes"&&m.attributeName==="dir"&&u()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:o,hidden:a}}var fNt={root:"m_96b553a6"};const rMn={},oMn=(t,{transitionDuration:e})=>({root:{"--transition-duration":typeof e=="number"?`${e}ms`:e}}),x5e=Dn((t,e)=>{const n=Kt("FloatingIndicator",rMn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,target:c,parent:u,transitionDuration:d,mod:h,displayAfterTransitionEnd:f,...m}=n,p=hi({name:"FloatingIndicator",classes:fNt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:oMn}),g=b.useRef(null),{initialized:y,hidden:_}=iMn({target:c,parent:u,ref:g,displayAfterTransitionEnd:f}),w=Bc(e,g);return!c||!u?null:ne.jsx(mn,{ref:w,mod:[{initialized:y,hidden:_},h],...p("root"),...m})});x5e.displayName="@mantine/core/FloatingIndicator";x5e.classes=fNt;const[sMn,w5e]=Uh("Accordion component was not found in the tree");function Tz({style:t,size:e=16,...n}){return ne.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:sn(e),height:sn(e),display:"block"},...n,children:ne.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}Tz.displayName="@mantine/core/AccordionChevron";const[aMn,mNt]=Uh("Accordion.Item component was not found in the tree");var DK={root:"m_9bdbb667",panel:"m_df78851f",content:"m_4ba554d4",itemTitle:"m_8fa820a0",control:"m_4ba585b8","control--default":"m_6939a5e9","control--contained":"m_4271d21b",label:"m_df3ffa0f",chevron:"m_3f35ae96",icon:"m_9bd771fe",item:"m_9bd7b098","item--default":"m_fe19b709","item--contained":"m_1f921b3b","item--filled":"m_2cdf939a","item--separated":"m_9f59b069"};const lMn={},C5e=Dn((t,e)=>{const{classNames:n,className:i,style:r,styles:o,vars:s,chevron:a,icon:l,onClick:c,onKeyDown:u,children:d,disabled:h,mod:f,...m}=Kt("AccordionControl",lMn,t),{value:p}=mNt(),g=w5e(),y=g.isItemActive(p),_=typeof g.order=="number",w=`h${g.order}`,C=ne.jsxs(Lh,{...m,...g.getStyles("control",{className:i,classNames:n,style:r,styles:o,variant:g.variant}),unstyled:g.unstyled,mod:["accordion-control",{active:y,"chevron-position":g.chevronPosition,disabled:h},f],ref:e,onClick:N=>{c==null||c(N),g.onChange(p)},type:"button",disabled:h,"aria-expanded":y,"aria-controls":g.getRegionId(p),id:g.getControlId(p),onKeyDown:JCt({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:g.loop,orientation:"vertical",onKeyDown:u}),children:[ne.jsx(mn,{component:"span",mod:{rotate:!g.disableChevronRotation&&y,position:g.chevronPosition},...g.getStyles("chevron",{classNames:n,styles:o}),children:a||g.chevron}),ne.jsx("span",{...g.getStyles("label",{classNames:n,styles:o}),children:d}),l&&ne.jsx(mn,{component:"span",mod:{"chevron-position":g.chevronPosition},...g.getStyles("icon",{classNames:n,styles:o}),children:l})]});return _?ne.jsx(w,{...g.getStyles("itemTitle",{classNames:n,styles:o}),children:C}):C});C5e.displayName="@mantine/core/AccordionControl";C5e.classes=DK;const cMn={},S5e=Dn((t,e)=>{const{classNames:n,className:i,style:r,styles:o,vars:s,value:a,mod:l,...c}=Kt("AccordionItem",cMn,t),u=w5e();return ne.jsx(aMn,{value:{value:a},children:ne.jsx(mn,{ref:e,mod:[{active:u.isItemActive(a)},l],...u.getStyles("item",{className:i,classNames:n,styles:o,style:r,variant:u.variant}),...c})})});S5e.displayName="@mantine/core/AccordionItem";S5e.classes=DK;const uMn={},N5e=Dn((t,e)=>{const{classNames:n,className:i,style:r,styles:o,vars:s,children:a,...l}=Kt("AccordionPanel",uMn,t),{value:c}=mNt(),u=w5e();return ne.jsx(wSt,{ref:e,...u.getStyles("panel",{className:i,classNames:n,style:r,styles:o}),...l,in:u.isItemActive(c),transitionDuration:u.transitionDuration??200,role:"region",id:u.getRegionId(c),"aria-labelledby":u.getControlId(c),children:ne.jsx("div",{...u.getStyles("content",{classNames:n,styles:o}),children:a})})});N5e.displayName="@mantine/core/AccordionPanel";N5e.classes=DK;const dMn={multiple:!1,disableChevronRotation:!1,chevronPosition:"right",variant:"default",chevron:ne.jsx(Tz,{})},hMn=(t,{transitionDuration:e,chevronSize:n,radius:i})=>({root:{"--accordion-transition-duration":e===void 0?void 0:`${e}ms`,"--accordion-chevron-size":n===void 0?void 0:sn(n),"--accordion-radius":i===void 0?void 0:Va(i)}});function Wi(t){const e=Kt("Accordion",dMn,t),{classNames:n,className:i,style:r,styles:o,unstyled:s,vars:a,children:l,multiple:c,value:u,defaultValue:d,onChange:h,id:f,loop:m,transitionDuration:p,disableChevronRotation:g,chevronPosition:y,chevronSize:_,order:w,chevron:C,variant:N,radius:E,...D}=e,k=jm(f),[M,T]=au({value:u,defaultValue:d,finalValue:c?[]:null,onChange:h}),A=O=>Array.isArray(M)?M.includes(O):O===M,R=O=>{const V=Array.isArray(M)?M.includes(O)?M.filter(F=>F!==O):[...M,O]:O===M?null:O;T(V)},P=hi({name:"Accordion",classes:DK,props:e,className:i,style:r,classNames:n,styles:o,unstyled:s,vars:a,varsResolver:hMn});return ne.jsx(sMn,{value:{isItemActive:A,onChange:R,getControlId:sJe(`${k}-control`,"Accordion.Item component was rendered with invalid value or without value"),getRegionId:sJe(`${k}-panel`,"Accordion.Item component was rendered with invalid value or without value"),transitionDuration:p,disableChevronRotation:g,chevronPosition:y,order:w,chevron:C,loop:m,getStyles:P,variant:N,unstyled:s},children:ne.jsx(mn,{...P("root"),id:k,...D,variant:N,"data-accordion":!0,children:l})})}const fMn=t=>t;Wi.extend=fMn;Wi.withProps=vEn(Wi);Wi.classes=DK;Wi.displayName="@mantine/core/Accordion";Wi.Item=S5e;Wi.Panel=N5e;Wi.Control=C5e;Wi.Chevron=Tz;var pNt={root:"m_66836ed3",wrapper:"m_a5d60502",body:"m_667c2793",title:"m_6a03f287",label:"m_698f4f23",icon:"m_667f2a6a",message:"m_7fa78076",closeButton:"m_87f54839"};const mMn={},pMn=(t,{radius:e,color:n,variant:i,autoContrast:r})=>{const o=t.variantColorResolver({color:n||t.primaryColor,theme:t,variant:i||"light",autoContrast:r});return{root:{"--alert-radius":e===void 0?void 0:Va(e),"--alert-bg":n||i?o.background:void 0,"--alert-color":o.color,"--alert-bd":n||i?o.border:void 0}}},Yo=Dn((t,e)=>{const n=Kt("Alert",mMn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,radius:c,color:u,title:d,children:h,id:f,icon:m,withCloseButton:p,onClose:g,closeButtonLabel:y,variant:_,autoContrast:w,...C}=n,N=hi({name:"Alert",classes:pNt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:pMn}),E=jm(f),D=d&&`${E}-title`||void 0,k=`${E}-body`;return ne.jsx(mn,{id:E,...N("root",{variant:_}),variant:_,ref:e,...C,role:"alert","aria-describedby":k,"aria-labelledby":D,children:ne.jsxs("div",{...N("wrapper"),children:[m&&ne.jsx("div",{...N("icon"),children:m}),ne.jsxs("div",{...N("body"),children:[d&&ne.jsx("div",{...N("title"),"data-with-close-button":p||void 0,children:ne.jsx("span",{id:D,...N("label"),children:d})}),h&&ne.jsx("div",{id:k,...N("message"),"data-variant":_,children:h})]}),p&&ne.jsx(Gk,{...N("closeButton"),onClick:g,variant:"transparent",size:16,iconSize:16,"aria-label":y,unstyled:a})]})})});Yo.classes=pNt;Yo.displayName="@mantine/core/Alert";var gNt={root:"m_b6d8b162"};function gMn(t){if(t==="start")return"start";if(t==="end"||t)return"end"}const bMn={inherit:!1},vMn=(t,{variant:e,lineClamp:n,gradient:i,size:r,color:o})=>({root:{"--text-fz":hd(r),"--text-lh":eSt(r),"--text-gradient":e==="gradient"?IEe(i,t):void 0,"--text-line-clamp":typeof n=="number"?n.toString():void 0,"--text-color":o?Xa(o,t):void 0}}),Qe=Cd((t,e)=>{const n=Kt("Text",bMn,t),{lineClamp:i,truncate:r,inline:o,inherit:s,gradient:a,span:l,__staticSelector:c,vars:u,className:d,style:h,classNames:f,styles:m,unstyled:p,variant:g,mod:y,size:_,...w}=n,C=hi({name:["Text",c],props:n,classes:gNt,className:d,style:h,classNames:f,styles:m,unstyled:p,vars:u,varsResolver:vMn});return ne.jsx(mn,{...C("root",{focusable:!0}),ref:e,component:l?"span":"p",variant:g,mod:[{"data-truncate":gMn(r),"data-line-clamp":typeof i=="number","data-inline":o,"data-inherit":s},y],size:_,...w})});Qe.classes=gNt;Qe.displayName="@mantine/core/Text";var bNt={root:"m_849cf0da"};const yMn={underline:"hover"},E5e=Cd((t,e)=>{const{underline:n,className:i,unstyled:r,mod:o,...s}=Kt("Anchor",yMn,t);return ne.jsx(Qe,{component:"a",ref:e,className:Vt({[bNt.root]:!r},i),...s,mod:[{underline:n},o],__staticSelector:"Anchor",unstyled:r})});E5e.classes=bNt;E5e.displayName="@mantine/core/Anchor";function vNt(t){return typeof t=="string"?{value:t,label:t}:"value"in t&&!("label"in t)?{value:t.value,label:t.value,disabled:t.disabled}:typeof t=="number"?{value:t.toString(),label:t.toString()}:"group"in t?{group:t.group,items:t.items.map(e=>vNt(e))}:t}function yNt(t){return t?t.map(e=>vNt(e)):[]}function D5e(t){return t.reduce((e,n)=>"group"in n?{...e,...D5e(n.items)}:(e[n.value]=n,e),{})}var Vp={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2"};const _Mn={error:null},xMn=(t,{size:e})=>({chevron:{"--combobox-chevron-size":Hr(e,"combobox-chevron-size")}}),k5e=Dn((t,e)=>{const n=Kt("ComboboxChevron",_Mn,t),{size:i,error:r,style:o,className:s,classNames:a,styles:l,unstyled:c,vars:u,mod:d,...h}=n,f=hi({name:"ComboboxChevron",classes:Vp,props:n,style:o,className:s,classNames:a,styles:l,unstyled:c,vars:u,varsResolver:xMn,rootSelector:"chevron"});return ne.jsx(mn,{component:"svg",...h,...f("chevron"),size:i,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:r},d],ref:e,children:ne.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});k5e.classes=Vp;k5e.displayName="@mantine/core/ComboboxChevron";const[wMn,Uv]=Uh("Combobox component was not found in tree"),_Nt=b.forwardRef(({size:t,onMouseDown:e,onClick:n,onClear:i,...r},o)=>ne.jsx(Gk,{ref:o,size:t||"sm",variant:"transparent",tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:s=>{s.preventDefault(),e==null||e(s)},onClick:s=>{i(),n==null||n(s)}}));_Nt.displayName="@mantine/core/ComboboxClearButton";const CMn={},M5e=Dn((t,e)=>{const{classNames:n,styles:i,className:r,style:o,hidden:s,...a}=Kt("ComboboxDropdown",CMn,t),l=Uv();return ne.jsx(Iu.Dropdown,{...a,ref:e,role:"presentation","data-hidden":s||void 0,...l.getStyles("dropdown",{className:r,style:o,classNames:n,styles:i})})});M5e.classes=Vp;M5e.displayName="@mantine/core/ComboboxDropdown";const SMn={refProp:"ref"},xNt=Dn((t,e)=>{const{children:n,refProp:i}=Kt("ComboboxDropdownTarget",SMn,t);if(Uv(),!Nw(n))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return ne.jsx(Iu.Target,{ref:e,refProp:i,children:n})});xNt.displayName="@mantine/core/ComboboxDropdownTarget";const NMn={},L5e=Dn((t,e)=>{const{classNames:n,className:i,style:r,styles:o,vars:s,...a}=Kt("ComboboxEmpty",NMn,t),l=Uv();return ne.jsx(mn,{ref:e,...l.getStyles("empty",{className:i,classNames:n,styles:o,style:r}),...a})});L5e.classes=Vp;L5e.displayName="@mantine/core/ComboboxEmpty";function T5e({onKeyDown:t,withKeyboardNavigation:e,withAriaAttributes:n,withExpandedAttribute:i,targetType:r,autoComplete:o}){const s=Uv(),[a,l]=b.useState(null),c=d=>{if(t==null||t(d),!s.readOnly&&e){if(d.nativeEvent.isComposing)return;if(d.nativeEvent.code==="ArrowDown"&&(d.preventDefault(),s.store.dropdownOpened?l(s.store.selectNextOption()):(s.store.openDropdown("keyboard"),l(s.store.selectActiveOption()))),d.nativeEvent.code==="ArrowUp"&&(d.preventDefault(),s.store.dropdownOpened?l(s.store.selectPreviousOption()):(s.store.openDropdown("keyboard"),l(s.store.selectActiveOption()))),d.nativeEvent.code==="Enter"||d.nativeEvent.code==="NumpadEnter"){if(d.nativeEvent.keyCode===229)return;const h=s.store.getSelectedOptionIndex();s.store.dropdownOpened&&h!==-1?(d.preventDefault(),s.store.clickSelectedOption()):r==="button"&&(d.preventDefault(),s.store.openDropdown("keyboard"))}d.nativeEvent.code==="Escape"&&s.store.closeDropdown("keyboard"),d.nativeEvent.code==="Space"&&r==="button"&&(d.preventDefault(),s.store.toggleDropdown("keyboard"))}};return{...n?{"aria-haspopup":"listbox","aria-expanded":i&&!!(s.store.listId&&s.store.dropdownOpened)||void 0,"aria-controls":s.store.listId,"aria-activedescendant":s.store.dropdownOpened&&a||void 0,autoComplete:o,"data-expanded":s.store.dropdownOpened||void 0,"data-mantine-stop-propagation":s.store.dropdownOpened||void 0}:{},onKeyDown:c}}const EMn={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},wNt=Dn((t,e)=>{const{children:n,refProp:i,withKeyboardNavigation:r,withAriaAttributes:o,withExpandedAttribute:s,targetType:a,autoComplete:l,...c}=Kt("ComboboxEventsTarget",EMn,t);if(!Nw(n))throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const u=Uv(),d=T5e({targetType:a,withAriaAttributes:o,withKeyboardNavigation:r,withExpandedAttribute:s,onKeyDown:n.props.onKeyDown,autoComplete:l});return b.cloneElement(n,{...d,...c,[i]:Bc(e,u.store.targetRef,n==null?void 0:n.ref)})});wNt.displayName="@mantine/core/ComboboxEventsTarget";const DMn={},I5e=Dn((t,e)=>{const{classNames:n,className:i,style:r,styles:o,vars:s,...a}=Kt("ComboboxFooter",DMn,t),l=Uv();return ne.jsx(mn,{ref:e,...l.getStyles("footer",{className:i,classNames:n,style:r,styles:o}),...a,onMouseDown:c=>{c.preventDefault()}})});I5e.classes=Vp;I5e.displayName="@mantine/core/ComboboxFooter";const kMn={},A5e=Dn((t,e)=>{const{classNames:n,className:i,style:r,styles:o,vars:s,children:a,label:l,...c}=Kt("ComboboxGroup",kMn,t),u=Uv();return ne.jsxs(mn,{ref:e,...u.getStyles("group",{className:i,classNames:n,style:r,styles:o}),...c,children:[l&&ne.jsx("div",{...u.getStyles("groupLabel",{classNames:n,styles:o}),children:l}),a]})});A5e.classes=Vp;A5e.displayName="@mantine/core/ComboboxGroup";const MMn={},R5e=Dn((t,e)=>{const{classNames:n,className:i,style:r,styles:o,vars:s,...a}=Kt("ComboboxHeader",MMn,t),l=Uv();return ne.jsx(mn,{ref:e,...l.getStyles("header",{className:i,classNames:n,style:r,styles:o}),...a,onMouseDown:c=>{c.preventDefault()}})});R5e.classes=Vp;R5e.displayName="@mantine/core/ComboboxHeader";function CNt({value:t,valuesDivider:e=",",...n}){return ne.jsx("input",{type:"hidden",value:Array.isArray(t)?t.join(e):t||"",...n})}CNt.displayName="@mantine/core/ComboboxHiddenInput";const LMn={},P5e=Dn((t,e)=>{const n=Kt("ComboboxOption",LMn,t),{classNames:i,className:r,style:o,styles:s,vars:a,onClick:l,id:c,active:u,onMouseDown:d,onMouseOver:h,disabled:f,selected:m,mod:p,...g}=n,y=Uv(),_=b.useId(),w=c||_;return ne.jsx(mn,{...y.getStyles("option",{className:r,classNames:i,styles:s,style:o}),...g,ref:e,id:w,mod:["combobox-option",{"combobox-active":u,"combobox-disabled":f,"combobox-selected":m},p],role:"option",onClick:C=>{var N;f?C.preventDefault():((N=y.onOptionSubmit)==null||N.call(y,n.value,n),l==null||l(C))},onMouseDown:C=>{C.preventDefault(),d==null||d(C)},onMouseOver:C=>{y.resetSelectionOnOptionHover&&y.store.resetSelectedOption(),h==null||h(C)}})});P5e.classes=Vp;P5e.displayName="@mantine/core/ComboboxOption";const TMn={},O5e=Dn((t,e)=>{const n=Kt("ComboboxOptions",TMn,t),{classNames:i,className:r,style:o,styles:s,id:a,onMouseDown:l,labelledBy:c,...u}=n,d=Uv(),h=jm(a);return b.useEffect(()=>{d.store.setListId(h)},[h]),ne.jsx(mn,{ref:e,...d.getStyles("options",{className:r,style:o,classNames:i,styles:s}),...u,id:h,role:"listbox","aria-labelledby":c,onMouseDown:f=>{f.preventDefault(),l==null||l(f)}})});O5e.classes=Vp;O5e.displayName="@mantine/core/ComboboxOptions";const IMn={withAriaAttributes:!0,withKeyboardNavigation:!0},j5e=Dn((t,e)=>{const n=Kt("ComboboxSearch",IMn,t),{classNames:i,styles:r,unstyled:o,vars:s,withAriaAttributes:a,onKeyDown:l,withKeyboardNavigation:c,size:u,...d}=n,h=Uv(),f=h.getStyles("search"),m=T5e({targetType:"input",withAriaAttributes:a,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:l,autoComplete:"off"});return ne.jsx(ra,{ref:Bc(e,h.store.searchRef),classNames:[{input:f.className},i],styles:[{input:f.style},r],size:u||h.size,...m,...d,__staticSelector:"Combobox"})});j5e.classes=Vp;j5e.displayName="@mantine/core/ComboboxSearch";const AMn={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},SNt=Dn((t,e)=>{const{children:n,refProp:i,withKeyboardNavigation:r,withAriaAttributes:o,withExpandedAttribute:s,targetType:a,autoComplete:l,...c}=Kt("ComboboxTarget",AMn,t);if(!Nw(n))throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const u=Uv(),d=T5e({targetType:a,withAriaAttributes:o,withKeyboardNavigation:r,withExpandedAttribute:s,onKeyDown:n.props.onKeyDown,autoComplete:l}),h=b.cloneElement(n,{...d,...c});return ne.jsx(Iu.Target,{ref:Bc(e,u.store.targetRef),children:h})});SNt.displayName="@mantine/core/ComboboxTarget";function RMn(t,e,n){for(let i=t-1;i>=0;i-=1)if(!e[i].hasAttribute("data-combobox-disabled"))return i;if(n){for(let i=e.length-1;i>-1;i-=1)if(!e[i].hasAttribute("data-combobox-disabled"))return i}return t}function PMn(t,e,n){for(let i=t+1;i<e.length;i+=1)if(!e[i].hasAttribute("data-combobox-disabled"))return i;if(n){for(let i=0;i<e.length;i+=1)if(!e[i].hasAttribute("data-combobox-disabled"))return i}return t}function OMn(t){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute("data-combobox-disabled"))return e;return-1}function F5e({defaultOpened:t,opened:e,onOpenedChange:n,onDropdownClose:i,onDropdownOpen:r,loop:o=!0,scrollBehavior:s="instant"}={}){const[a,l]=au({value:e,defaultValue:t,finalValue:!1,onChange:n}),c=b.useRef(null),u=b.useRef(-1),d=b.useRef(null),h=b.useRef(null),f=b.useRef(-1),m=b.useRef(-1),p=b.useRef(-1),g=b.useCallback((F="unknown")=>{a||(l(!0),r==null||r(F))},[l,r,a]),y=b.useCallback((F="unknown")=>{a&&(l(!1),i==null||i(F))},[l,i,a]),_=b.useCallback((F="unknown")=>{a?y(F):g(F)},[y,g,a]),w=b.useCallback(()=>{const F=document.querySelector(`#${c.current} [data-combobox-selected]`);F==null||F.removeAttribute("data-combobox-selected"),F==null||F.removeAttribute("aria-selected")},[]),C=b.useCallback(F=>{const $=document.getElementById(c.current),B=$==null?void 0:$.querySelectorAll("[data-combobox-option]");if(!B)return null;const z=F>=B.length?0:F<0?B.length-1:F;return u.current=z,B!=null&&B[z]&&!B[z].hasAttribute("data-combobox-disabled")?(w(),B[z].setAttribute("data-combobox-selected","true"),B[z].setAttribute("aria-selected","true"),B[z].scrollIntoView({block:"nearest",behavior:s}),B[z].id):null},[s,w]),N=b.useCallback(()=>{const F=document.querySelector(`#${c.current} [data-combobox-active]`);if(F){const $=document.querySelectorAll(`#${c.current} [data-combobox-option]`),B=Array.from($).findIndex(z=>z===F);return C(B)}return C(0)},[C]),E=b.useCallback(()=>C(PMn(u.current,document.querySelectorAll(`#${c.current} [data-combobox-option]`),o)),[C,o]),D=b.useCallback(()=>C(RMn(u.current,document.querySelectorAll(`#${c.current} [data-combobox-option]`),o)),[C,o]),k=b.useCallback(()=>C(OMn(document.querySelectorAll(`#${c.current} [data-combobox-option]`))),[C]),M=b.useCallback((F="selected",$)=>{p.current=window.setTimeout(()=>{var H;const B=document.querySelectorAll(`#${c.current} [data-combobox-option]`),z=Array.from(B).findIndex(K=>K.hasAttribute(`data-combobox-${F}`));u.current=z,$!=null&&$.scrollIntoView&&((H=B[z])==null||H.scrollIntoView({block:"nearest",behavior:s}))},0)},[]),T=b.useCallback(()=>{u.current=-1,w()},[w]),A=b.useCallback(()=>{const F=document.querySelectorAll(`#${c.current} [data-combobox-option]`),$=F==null?void 0:F[u.current];$==null||$.click()},[]),R=b.useCallback(F=>{c.current=F},[]),P=b.useCallback(()=>{f.current=window.setTimeout(()=>d.current.focus(),0)},[]),O=b.useCallback(()=>{m.current=window.setTimeout(()=>h.current.focus(),0)},[]),V=b.useCallback(()=>u.current,[]);return b.useEffect(()=>()=>{window.clearTimeout(f.current),window.clearTimeout(m.current),window.clearTimeout(p.current)},[]),{dropdownOpened:a,openDropdown:g,closeDropdown:y,toggleDropdown:_,selectedOptionIndex:u.current,getSelectedOptionIndex:V,selectOption:C,selectFirstOption:k,selectActiveOption:N,selectNextOption:E,selectPreviousOption:D,resetSelectedOption:T,updateSelectedOptionIndex:M,listId:c.current,setListId:R,clickSelectedOption:A,searchRef:d,focusSearchInput:P,targetRef:h,focusTarget:O}}const jMn={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0}},FMn=(t,{size:e,dropdownPadding:n})=>({options:{"--combobox-option-fz":hd(e),"--combobox-option-padding":Hr(e,"combobox-option-padding")},dropdown:{"--combobox-padding":n===void 0?void 0:sn(n),"--combobox-option-fz":hd(e),"--combobox-option-padding":Hr(e,"combobox-option-padding")}});function Cs(t){const e=Kt("Combobox",jMn,t),{classNames:n,styles:i,unstyled:r,children:o,store:s,vars:a,onOptionSubmit:l,onClose:c,size:u,dropdownPadding:d,resetSelectionOnOptionHover:h,__staticSelector:f,readOnly:m,...p}=e,g=F5e(),y=s||g,_=hi({name:f||"Combobox",classes:Vp,props:e,classNames:n,styles:i,unstyled:r,vars:a,varsResolver:FMn}),w=()=>{c==null||c(),y.closeDropdown()};return ne.jsx(wMn,{value:{getStyles:_,store:y,onOptionSubmit:l,size:u,resetSelectionOnOptionHover:h,readOnly:m},children:ne.jsx(Iu,{opened:y.dropdownOpened,...p,onClose:w,withRoles:!1,unstyled:r,children:o})})}const $Mn=t=>t;Cs.extend=$Mn;Cs.classes=Vp;Cs.displayName="@mantine/core/Combobox";Cs.Target=SNt;Cs.Dropdown=M5e;Cs.Options=O5e;Cs.Option=P5e;Cs.Search=j5e;Cs.Empty=L5e;Cs.Chevron=k5e;Cs.Footer=I5e;Cs.Header=R5e;Cs.EventsTarget=wNt;Cs.DropdownTarget=xNt;Cs.Group=A5e;Cs.ClearButton=_Nt;Cs.HiddenInput=CNt;var NNt={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const VMn=NNt,$5e=b.forwardRef(({__staticSelector:t,__stylesApiProps:e,className:n,classNames:i,styles:r,unstyled:o,children:s,label:a,description:l,id:c,disabled:u,error:d,size:h,labelPosition:f="left",bodyElement:m="div",labelElement:p="label",variant:g,style:y,vars:_,mod:w,...C},N)=>{const E=hi({name:t,props:e,className:n,style:y,classes:NNt,classNames:i,styles:r,unstyled:o});return ne.jsx(mn,{...E("root"),ref:N,__vars:{"--label-fz":hd(h),"--label-lh":Hr(h,"label-lh")},mod:[{"label-position":f},w],variant:g,size:h,...C,children:ne.jsxs(mn,{component:m,htmlFor:m==="label"?c:void 0,...E("body"),children:[s,ne.jsxs("div",{...E("labelWrapper"),"data-disabled":u||void 0,children:[a&&ne.jsx(mn,{component:p,htmlFor:p==="label"?c:void 0,...E("label"),"data-disabled":u||void 0,children:a}),l&&ne.jsx(ra.Description,{size:h,__inheritStyles:!1,...E("description"),children:l}),d&&typeof d!="boolean"&&ne.jsx(ra.Error,{size:h,__inheritStyles:!1,...E("error"),children:d})]})]})})});$5e.displayName="@mantine/core/InlineInput";function ENt({children:t,role:e}){const n=GF();return n?ne.jsx("div",{role:e,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:t}):ne.jsx(ne.Fragment,{children:t})}function BMn({size:t,style:e,...n}){const i=t!==void 0?{width:sn(t),height:sn(t),...e}:e;return ne.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:i,"aria-hidden":!0,...n,children:ne.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function Oj(t){return"group"in t}function DNt({options:t,search:e,limit:n}){const i=e.trim().toLowerCase(),r=[];for(let o=0;o<t.length;o+=1){const s=t[o];if(r.length===n)return r;Oj(s)&&r.push({group:s.group,items:DNt({options:s.items,search:e,limit:n-r.length})}),Oj(s)||s.label.toLowerCase().includes(i)&&r.push(s)}return r}function zMn(t){if(t.length===0)return!0;for(const e of t)if(!("group"in e)||e.items.length>0)return!1;return!0}function kNt(t,e=new Set){if(Array.isArray(t))for(const n of t)if(Oj(n))kNt(n.items,e);else{if(typeof n.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof n.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof n.value}`);if(e.has(n.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);e.add(n.value)}}function HMn(t,e){return Array.isArray(t)?t.includes(e):t===e}function MNt({data:t,withCheckIcon:e,value:n,checkIconPosition:i,unstyled:r,renderOption:o}){if(!Oj(t)){const a=HMn(n,t.value),l=e&&a&&ne.jsx(BMn,{className:Vp.optionsDropdownCheckIcon}),c=ne.jsxs(ne.Fragment,{children:[i==="left"&&l,ne.jsx("span",{children:t.label}),i==="right"&&l]});return ne.jsx(Cs.Option,{value:t.value,disabled:t.disabled,className:Vt({[Vp.optionsDropdownOption]:!r}),"data-reverse":i==="right"||void 0,"data-checked":a||void 0,"aria-selected":a,active:a,children:typeof o=="function"?o({option:t,checked:a}):c})}const s=t.items.map(a=>ne.jsx(MNt,{data:a,value:n,unstyled:r,withCheckIcon:e,checkIconPosition:i,renderOption:o},a.value));return ne.jsx(Cs.Group,{label:t.group,children:s})}function LNt({data:t,hidden:e,hiddenWhenEmpty:n,filter:i,search:r,limit:o,maxDropdownHeight:s,withScrollArea:a=!0,filterOptions:l=!0,withCheckIcon:c=!1,value:u,checkIconPosition:d,nothingFoundMessage:h,unstyled:f,labelId:m,renderOption:p,scrollAreaProps:g,"aria-label":y}){kNt(t);const w=typeof r=="string"?(i||DNt)({options:t,search:l?r:"",limit:o??1/0}):t,C=zMn(w),N=w.map(E=>ne.jsx(MNt,{data:E,withCheckIcon:c,value:u,checkIconPosition:d,unstyled:f,renderOption:p},Oj(E)?E.group:E.value));return ne.jsx(Cs.Dropdown,{hidden:e||n&&C,children:ne.jsxs(Cs.Options,{labelledBy:m,"aria-label":y,children:[a?ne.jsx(UF.Autosize,{mah:s??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...g,children:N}):N,C&&h&&ne.jsx(Cs.Empty,{children:h})]})})}const TNt=b.createContext(null),WMn=TNt.Provider;function UMn(){return{withinGroup:!!b.useContext(TNt)}}var vde={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const KMn={},qMn=(t,{spacing:e})=>({group:{"--ag-spacing":Rc(e)}}),V5e=Dn((t,e)=>{const n=Kt("AvatarGroup",KMn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,spacing:c,...u}=n,d=hi({name:"AvatarGroup",classes:vde,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:qMn,rootSelector:"group"});return ne.jsx(WMn,{value:!0,children:ne.jsx(mn,{ref:e,...d("group"),...u})})});V5e.classes=vde;V5e.displayName="@mantine/core/AvatarGroup";function GMn(t){return ne.jsx("svg",{...t,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ne.jsx("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function INt(t,e=2){const n=t.split(" ");return n.length===1?t.slice(0,e).toUpperCase():n.map(i=>i[0]).slice(0,e).join("").toUpperCase()}function YMn(t){let e=0;for(let n=0;n<t.length;n+=1){const i=t.charCodeAt(n);e=(e<<5)-e+i,e|=0}return e}const XMn=["blue","cyan","grape","green","indigo","lime","orange","pink","red","teal","violet"];function ZMn(t,e=XMn){const n=YMn(INt(t)),i=Math.abs(n)%e.length;return e[i]}const QMn={},JMn=(t,{size:e,radius:n,variant:i,gradient:r,color:o,autoContrast:s,name:a,allowedInitialsColors:l})=>{const c=o==="initials"&&typeof a=="string"?ZMn(a,l):o,u=t.variantColorResolver({color:c||"gray",theme:t,gradient:r,variant:i||"light",autoContrast:s});return{root:{"--avatar-size":Hr(e,"avatar-size"),"--avatar-radius":n===void 0?void 0:Va(n),"--avatar-bg":c||i?u.background:void 0,"--avatar-color":c||i?u.color:void 0,"--avatar-bd":c||i?u.border:void 0}}},IS=Cd((t,e)=>{const n=Kt("Avatar",QMn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,src:c,alt:u,radius:d,color:h,gradient:f,imageProps:m,children:p,autoContrast:g,mod:y,name:_,allowedInitialsColors:w,...C}=n,N=UMn(),[E,D]=b.useState(!c),k=hi({name:"Avatar",props:n,classes:vde,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:JMn});return b.useEffect(()=>D(!c),[c]),ne.jsx(mn,{...k("root"),mod:[{"within-group":N.withinGroup},y],ref:e,...C,children:E?ne.jsx("span",{...k("placeholder"),title:u,children:p||typeof _=="string"&&INt(_)||ne.jsx(GMn,{})}):ne.jsx("img",{...m,...k("image"),src:c,alt:u,onError:M=>{var T;D(!0),(T=m==null?void 0:m.onError)==null||T.call(m,M)}})})});IS.classes=vde;IS.displayName="@mantine/core/Avatar";IS.Group=V5e;var ANt={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const eLn={},tLn=(t,{radius:e,color:n,gradient:i,variant:r,size:o,autoContrast:s})=>{const a=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:i,variant:r||"filled",autoContrast:s});return{root:{"--badge-height":Hr(o,"badge-height"),"--badge-padding-x":Hr(o,"badge-padding-x"),"--badge-fz":Hr(o,"badge-fz"),"--badge-radius":e===void 0?void 0:Va(e),"--badge-bg":n||r?a.background:void 0,"--badge-color":n||r?a.color:void 0,"--badge-bd":n||r?a.border:void 0,"--badge-dot-color":r==="dot"?Xa(n,t):void 0}}},jc=Cd((t,e)=>{const n=Kt("Badge",eLn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,radius:c,color:u,gradient:d,leftSection:h,rightSection:f,children:m,variant:p,fullWidth:g,autoContrast:y,circle:_,mod:w,...C}=n,N=hi({name:"Badge",props:n,classes:ANt,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:tLn});return ne.jsxs(mn,{variant:p,mod:[{block:g,circle:_},w],...N("root",{variant:p}),ref:e,...C,children:[h&&ne.jsx("span",{...N("section"),"data-position":"left",children:h}),ne.jsx("span",{...N("label"),children:m}),f&&ne.jsx("span",{...N("section"),"data-position":"right",children:f})]})});jc.classes=ANt;jc.displayName="@mantine/core/Badge";var RNt={root:"m_8b3717df",breadcrumb:"m_f678d540",separator:"m_3b8f2208"};const nLn={separator:"/"},iLn=(t,{separatorMargin:e})=>({root:{"--bc-separator-margin":Rc(e)}}),B5e=Dn((t,e)=>{const n=Kt("Breadcrumbs",nLn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,children:c,separator:u,separatorMargin:d,...h}=n,f=hi({name:"Breadcrumbs",classes:RNt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:iLn}),m=b.Children.toArray(c).reduce((p,g,y,_)=>{var C;const w=Nw(g)?b.cloneElement(g,{...f("breadcrumb",{className:(C=g.props)==null?void 0:C.className}),key:y}):b.createElement("div",{...f("breadcrumb"),key:y},g);return p.push(w),y!==_.length-1&&p.push(b.createElement(mn,{...f("separator"),key:`separator-${y}`},u)),p},[]);return ne.jsx(mn,{ref:e,...f("root"),...h,children:m})});B5e.classes=RNt;B5e.displayName="@mantine/core/Breadcrumbs";var yde={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844"};const BJe={orientation:"horizontal"},rLn=(t,{borderWidth:e})=>({group:{"--button-border-width":sn(e)}}),z5e=Dn((t,e)=>{const n=Kt("ButtonGroup",BJe,t),{className:i,style:r,classNames:o,styles:s,unstyled:a,orientation:l,vars:c,borderWidth:u,variant:d,mod:h,...f}=Kt("ButtonGroup",BJe,t),m=hi({name:"ButtonGroup",props:n,classes:yde,className:i,style:r,classNames:o,styles:s,unstyled:a,vars:c,varsResolver:rLn,rootSelector:"group"});return ne.jsx(mn,{...m("group"),ref:e,variant:d,mod:[{"data-orientation":l},h],role:"group",...f})});z5e.classes=yde;z5e.displayName="@mantine/core/ButtonGroup";const oLn={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${sn(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},sLn={},aLn=(t,{radius:e,color:n,gradient:i,variant:r,size:o,justify:s,autoContrast:a})=>{const l=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:i,variant:r||"filled",autoContrast:a});return{root:{"--button-justify":s,"--button-height":Hr(o,"button-height"),"--button-padding-x":Hr(o,"button-padding-x"),"--button-fz":o!=null&&o.includes("compact")?hd(o.replace("compact-","")):hd(o),"--button-radius":e===void 0?void 0:Va(e),"--button-bg":n||r?l.background:void 0,"--button-hover":n||r?l.hover:void 0,"--button-color":l.color,"--button-bd":n||r?l.border:void 0,"--button-hover-color":n||r?l.hoverColor:void 0}}},Nn=Cd((t,e)=>{const n=Kt("Button",sLn,t),{style:i,vars:r,className:o,color:s,disabled:a,children:l,leftSection:c,rightSection:u,fullWidth:d,variant:h,radius:f,loading:m,loaderProps:p,gradient:g,classNames:y,styles:_,unstyled:w,"data-disabled":C,autoContrast:N,mod:E,...D}=n,k=hi({name:"Button",props:n,classes:yde,className:o,style:i,classNames:y,styles:_,unstyled:w,vars:r,varsResolver:aLn}),M=!!c,T=!!u;return ne.jsxs(Lh,{ref:e,...k("root",{active:!a&&!m&&!C}),unstyled:w,variant:h,disabled:a||m,mod:[{disabled:a||C,loading:m,block:d,"with-left-section":M,"with-right-section":T},E],...D,children:[ne.jsx(lu,{mounted:!!m,transition:oLn,duration:150,children:A=>ne.jsx(mn,{component:"span",...k("loader",{style:A}),"aria-hidden":!0,children:ne.jsx($p,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...p})})}),ne.jsxs("span",{...k("inner"),children:[c&&ne.jsx(mn,{component:"span",...k("section"),mod:{position:"left"},children:c}),ne.jsx(mn,{component:"span",mod:{loading:m},...k("label"),children:l}),u&&ne.jsx(mn,{component:"span",...k("section"),mod:{position:"right"},children:u})]})]})});Nn.classes=yde;Nn.displayName="@mantine/core/Button";Nn.Group=z5e;const[lLn,cLn]=Uh("Card component was not found in tree");var H5e={root:"m_e615b15f",section:"m_599a2148"};const uLn={},_de=Cd((t,e)=>{const n=Kt("CardSection",uLn,t),{classNames:i,className:r,style:o,styles:s,vars:a,withBorder:l,inheritPadding:c,mod:u,...d}=n,h=cLn();return ne.jsx(mn,{ref:e,mod:[{"with-border":l,"inherit-padding":c},u],...h.getStyles("section",{className:r,style:o,styles:s,classNames:i}),...d})});_de.classes=H5e;_de.displayName="@mantine/core/CardSection";const dLn={},hLn=(t,{padding:e})=>({root:{"--card-padding":Rc(e)}}),or=Cd((t,e)=>{const n=Kt("Card",dLn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,children:c,padding:u,...d}=n,h=hi({name:"Card",props:n,classes:H5e,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:hLn}),f=b.Children.toArray(c),m=f.map((p,g)=>typeof p=="object"&&p&&"type"in p&&p.type===_de?b.cloneElement(p,{"data-first-section":g===0||void 0,"data-last-section":g===f.length-1||void 0}):p);return ne.jsx(lLn,{value:{getStyles:h},children:ne.jsx(Ew,{ref:e,unstyled:a,...h("root"),...d,children:m})})});or.classes=H5e;or.displayName="@mantine/core/Card";or.Section=_de;var PNt={root:"m_4451eb3a"};const fLn={},iw=Cd((t,e)=>{const n=Kt("Center",fLn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,inline:c,mod:u,...d}=n,h=hi({name:"Center",props:n,classes:PNt,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l});return ne.jsx(mn,{ref:e,mod:[{inline:c},u],...h("root"),...d})});iw.classes=PNt;iw.displayName="@mantine/core/Center";var ONt={root:"m_b183c0a2"};const mLn={},pLn=(t,{color:e})=>({root:{"--code-bg":e?Xa(e,t):void 0}}),rw=Dn((t,e)=>{const n=Kt("Code",mLn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,color:c,block:u,variant:d,mod:h,...f}=n,m=hi({name:"Code",props:n,classes:ONt,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:pLn});return ne.jsx(mn,{component:u?"pre":"code",variant:d,ref:e,mod:[{block:u},h],...m("root"),...f,dir:"ltr"})});rw.classes=ONt;rw.displayName="@mantine/core/Code";var jNt={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const zJe={withShadow:!0},gLn=(t,{radius:e,size:n})=>({root:{"--cs-radius":e===void 0?void 0:Va(e),"--cs-size":sn(n)}}),RA=Cd((t,e)=>{const n=Kt("ColorSwatch",zJe,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,color:c,size:u,radius:d,withShadow:h,children:f,variant:m,...p}=Kt("ColorSwatch",zJe,n),g=hi({name:"ColorSwatch",props:n,classes:jNt,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:gLn});return ne.jsxs(mn,{ref:e,variant:m,size:u,...g("root",{focusable:!0}),...p,children:[ne.jsx("span",{...g("alphaOverlay")}),h&&ne.jsx("span",{...g("shadowOverlay")}),ne.jsx("span",{...g("colorOverlay",{style:{backgroundColor:c}})}),ne.jsx("span",{...g("childrenOverlay"),children:f})]})});RA.classes=jNt;RA.displayName="@mantine/core/ColorSwatch";const[bLn,W5e]=BF(null),U5e=b.forwardRef(({position:t,...e},n)=>ne.jsx(mn,{ref:n,__vars:{"--thumb-y-offset":`${t.y*100}%`,"--thumb-x-offset":`${t.x*100}%`},...e}));U5e.displayName="@mantine/core/ColorPickerThumb";var K5e={wrapper:"m_fee9c77",preview:"m_9dddfbac",body:"m_bffecc3e",sliders:"m_3283bb96",thumb:"m_40d572ba",swatch:"m_d8ee6fd8",swatches:"m_5711e686",saturation:"m_202a296e",saturationOverlay:"m_11b3db02",slider:"m_d856d47d",sliderOverlay:"m_8f327113"};const vLn={},q5e=Dn((t,e)=>{var B;const n=Kt("ColorSlider",vLn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,onChange:c,onChangeEnd:u,maxValue:d,round:h,size:f="md",focusable:m=!0,value:p,overlays:g,thumbColor:y="transparent",onScrubStart:_,onScrubEnd:w,__staticSelector:C="ColorPicker",...N}=n,E=hi({name:C,classes:K5e,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a}),k=((B=W5e())==null?void 0:B.getStyles)||E,M=zc(),[T,A]=b.useState({y:0,x:p/d}),R=b.useRef(T),P=z=>h?Math.round(z*d):z*d,{ref:O}=zje(({x:z,y:H})=>{R.current={x:z,y:H},c==null||c(P(z))},{onScrubEnd:()=>{const{x:z}=R.current;u==null||u(P(z)),w==null||w()},onScrubStart:_});Fp(()=>{A({y:0,x:p/d})},[p]);const V=(z,H)=>{z.preventDefault();const K=aSt(H);c==null||c(P(K.x)),u==null||u(P(K.x))},F=z=>{switch(z.key){case"ArrowRight":{V(z,{x:T.x+.05,y:T.y});break}case"ArrowLeft":{V(z,{x:T.x-.05,y:T.y});break}}},$=g.map((z,H)=>b.createElement("div",{...k("sliderOverlay"),style:z,key:H}));return ne.jsxs(mn,{...N,ref:Bc(O,e),...k("slider"),role:"slider","aria-valuenow":p,"aria-valuemax":d,"aria-valuemin":0,tabIndex:m?0:-1,onKeyDown:F,"data-focus-ring":M.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${f})`},children:[$,ne.jsx(U5e,{position:T,...k("thumb",{style:{top:sn(1),background:y}})})]})});q5e.displayName="@mantine/core/ColorSlider";function lv(t,e=0,n=10**e){return Math.round(n*t)/n}function yLn({h:t,s:e,l:n,a:i}){const r=e*((n<50?n:100-n)/100);return{h:t,s:r>0?2*r/(n+r)*100:0,v:n+r,a:i}}const _Ln={grad:360/400,turn:360,rad:360/(Math.PI*2)};function xLn(t,e="deg"){return Number(t)*(_Ln[e]||1)}const wLn=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function HJe(t){const e=wLn.exec(t);return e?yLn({h:xLn(e[1],e[2]),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)}):{h:0,s:0,v:0,a:1}}function UEe({r:t,g:e,b:n,a:i}){const r=Math.max(t,e,n),o=r-Math.min(t,e,n),s=o?r===t?(e-n)/o:r===e?2+(n-t)/o:4+(t-e)/o:0;return{h:lv(60*(s<0?s+6:s),3),s:lv(r?o/r*100:0,3),v:lv(r/255*100,3),a:i}}function KEe(t){const e=t[0]==="#"?t.slice(1):t;return e.length===3?UEe({r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:1}):UEe({r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:1})}function CLn(t){const e=t[0]==="#"?t.slice(1):t,n=s=>lv(parseInt(s,16)/255,3);if(e.length===4){const s=e.slice(0,3),a=n(e[3]+e[3]);return{...KEe(s),a}}const i=e.slice(0,6),r=n(e.slice(6,8));return{...KEe(i),a:r}}const SLn=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function WJe(t){const e=SLn.exec(t);return e?UEe({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):{h:0,s:0,v:0,a:1}}const FNt={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},NLn={hex:KEe,hexa:CLn,rgb:WJe,rgba:WJe,hsl:HJe,hsla:HJe};function O7(t){for(const[,e]of Object.entries(FNt))if(e.test(t))return!0;return!1}function MT(t){if(typeof t!="string")return{h:0,s:0,v:0,a:1};if(t==="transparent")return{h:0,s:0,v:0,a:0};const e=t.trim();for(const[n,i]of Object.entries(FNt))if(i.test(e))return NLn[n](e);return{h:0,s:0,v:0,a:1}}const ELn={},$Nt=b.forwardRef((t,e)=>{const{value:n,onChange:i,onChangeEnd:r,color:o,...s}=Kt("AlphaSlider",ELn,t);return ne.jsx(q5e,{...s,ref:e,value:n,onChange:a=>i==null?void 0:i(lv(a,2)),onChangeEnd:a=>r==null?void 0:r(lv(a,2)),maxValue:1,round:!1,"data-alpha":!0,overlays:[{backgroundImage:"linear-gradient(45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)",backgroundSize:`${sn(8)} ${sn(8)}`,backgroundPosition:`0 0, 0 ${sn(4)}, ${sn(4)} ${sn(-4)}, ${sn(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${o})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${sn(1)} inset, rgb(0, 0, 0, .15) 0 0 ${sn(4)} inset`}]})});$Nt.displayName="@mantine/core/AlphaSlider";function VNt({h:t,s:e,v:n,a:i}){const r=t/360*6,o=e/100,s=n/100,a=Math.floor(r),l=s*(1-o),c=s*(1-(r-a)*o),u=s*(1-(1-r+a)*o),d=a%6;return{r:lv([s,c,l,l,u,s][d]*255),g:lv([u,s,s,c,l,l][d]*255),b:lv([l,l,u,s,s,c][d]*255),a:lv(i,2)}}function UJe(t,e){const{r:n,g:i,b:r,a:o}=VNt(t);return e?`rgba(${n}, ${i}, ${r}, ${lv(o,2)})`:`rgb(${n}, ${i}, ${r})`}function KJe({h:t,s:e,v:n,a:i},r){const o=(200-e)*n/100,s={h:Math.round(t),s:Math.round(o>0&&o<200?e*n/100/(o<=100?o:200-o)*100:0),l:Math.round(o/2)};return r?`hsla(${s.h}, ${s.s}%, ${s.l}%, ${lv(i,2)})`:`hsl(${s.h}, ${s.s}%, ${s.l}%)`}function Eee(t){const e=t.toString(16);return e.length<2?`0${e}`:e}function BNt(t){const{r:e,g:n,b:i}=VNt(t);return`#${Eee(e)}${Eee(n)}${Eee(i)}`}function DLn(t){const e=Math.round(t.a*255);return`${BNt(t)}${Eee(e)}`}const B_e={hex:BNt,hexa:t=>DLn(t),rgb:t=>UJe(t,!1),rgba:t=>UJe(t,!0),hsl:t=>KJe(t,!1),hsla:t=>KJe(t,!0)};function Oy(t,e){return e?t in B_e?B_e[t](e):B_e.hex(e):"#000000"}const zNt=b.forwardRef((t,e)=>{const{value:n,onChange:i,onChangeEnd:r,color:o,...s}=Kt("HueSlider",{},t);return ne.jsx(q5e,{...s,ref:e,value:n,onChange:i,onChangeEnd:r,maxValue:360,thumbColor:`hsl(${n}, 100%, 50%)`,round:!0,"data-hue":!0,overlays:[{backgroundImage:"linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))"},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${sn(1)} inset, rgb(0, 0, 0, .15) 0 0 ${sn(4)} inset`}]})});zNt.displayName="@mantine/core/HueSlider";function HNt({className:t,onChange:e,onChangeEnd:n,value:i,saturationLabel:r,focusable:o=!0,size:s,color:a,onScrubStart:l,onScrubEnd:c,...u}){const{getStyles:d}=W5e(),[h,f]=b.useState({x:i.s/100,y:1-i.v/100}),m=b.useRef(h),{ref:p}=zje(({x:_,y:w})=>{m.current={x:_,y:w},e({s:Math.round(_*100),v:Math.round((1-w)*100)})},{onScrubEnd:()=>{const{x:_,y:w}=m.current;n({s:Math.round(_*100),v:Math.round((1-w)*100)}),c==null||c()},onScrubStart:l});b.useEffect(()=>{f({x:i.s/100,y:1-i.v/100})},[i.s,i.v]);const g=(_,w)=>{_.preventDefault();const C=aSt(w);e({s:Math.round(C.x*100),v:Math.round((1-C.y)*100)}),n({s:Math.round(C.x*100),v:Math.round((1-C.y)*100)})},y=_=>{switch(_.key){case"ArrowUp":{g(_,{y:h.y-.05,x:h.x});break}case"ArrowDown":{g(_,{y:h.y+.05,x:h.x});break}case"ArrowRight":{g(_,{x:h.x+.05,y:h.y});break}case"ArrowLeft":{g(_,{x:h.x-.05,y:h.y});break}}};return ne.jsxs(mn,{...d("saturation"),ref:p,...u,role:"slider","aria-label":r,"aria-valuenow":h.x,"aria-valuetext":Oy("rgba",i),tabIndex:o?0:-1,onKeyDown:y,children:[ne.jsx("div",{...d("saturationOverlay",{style:{backgroundColor:`hsl(${i.h}, 100%, 50%)`}})}),ne.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),ne.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),ne.jsx(U5e,{position:h,...d("thumb",{style:{backgroundColor:a}})})]})}HNt.displayName="@mantine/core/Saturation";const WNt=b.forwardRef(({className:t,datatype:e,setValue:n,onChangeEnd:i,size:r,focusable:o,data:s,swatchesPerRow:a,...l},c)=>{const u=W5e(),d=s.map((h,f)=>b.createElement(RA,{...u.getStyles("swatch"),unstyled:u.unstyled,component:"button",type:"button",color:h,key:f,radius:"sm",onClick:()=>{n(h),i==null||i(h)},"aria-label":h,tabIndex:o?0:-1,"data-swatch":!0}));return ne.jsx(mn,{...u.getStyles("swatches"),ref:c,...l,children:d})});WNt.displayName="@mantine/core/Swatches";const kLn={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},MLn=(t,{size:e,swatchesPerRow:n})=>({wrapper:{"--cp-preview-size":Hr(e,"cp-preview-size"),"--cp-width":Hr(e,"cp-width"),"--cp-body-spacing":Rc(e),"--cp-swatch-size":`${100/n}%`,"--cp-thumb-size":Hr(e,"cp-thumb-size"),"--cp-saturation-height":Hr(e,"cp-saturation-height")}}),G5e=Dn((t,e)=>{const n=Kt("ColorPicker",kLn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,format:c,value:u,defaultValue:d,onChange:h,onChangeEnd:f,withPicker:m,size:p,saturationLabel:g,hueLabel:y,alphaLabel:_,focusable:w,swatches:C,swatchesPerRow:N,fullWidth:E,onColorSwatchClick:D,__staticSelector:k,mod:M,...T}=n,A=hi({name:k,props:n,classes:K5e,className:r,style:o,classNames:i,styles:s,unstyled:a,rootSelector:"wrapper",vars:l,varsResolver:MLn}),R=b.useRef(c),P=b.useRef(),O=b.useRef(-1),V=b.useRef(!1),F=c==="hexa"||c==="rgba"||c==="hsla",[$,B,z]=au({value:u,defaultValue:d,finalValue:"#FFFFFF",onChange:h}),[H,K]=b.useState(MT($)),q=()=>{window.clearTimeout(O.current),V.current=!0},U=()=>{window.clearTimeout(O.current),O.current=window.setTimeout(()=>{V.current=!1},200)},Y=J=>{K(ae=>{const se={...ae,...J};return P.current=Oy(R.current,se),se}),B(P.current)};return Fp(()=>{O7(u)&&!V.current&&K(MT(u))},[u]),Fp(()=>{R.current=c,B(Oy(c,H))},[c]),ne.jsx(bLn,{value:{getStyles:A,unstyled:a},children:ne.jsxs(mn,{ref:e,...A("wrapper"),size:p,mod:[{"full-width":E},M],...T,children:[m&&ne.jsxs(ne.Fragment,{children:[ne.jsx(HNt,{value:H,onChange:Y,onChangeEnd:({s:J,v:ae})=>f==null?void 0:f(Oy(R.current,{...H,s:J,v:ae})),color:$,size:p,focusable:w,saturationLabel:g,onScrubStart:q,onScrubEnd:U}),ne.jsxs("div",{...A("body"),children:[ne.jsxs("div",{...A("sliders"),children:[ne.jsx(zNt,{value:H.h,onChange:J=>Y({h:J}),onChangeEnd:J=>f==null?void 0:f(Oy(R.current,{...H,h:J})),size:p,focusable:w,"aria-label":y,onScrubStart:q,onScrubEnd:U}),F&&ne.jsx($Nt,{value:H.a,onChange:J=>Y({a:J}),onChangeEnd:J=>{f==null||f(Oy(R.current,{...H,a:J}))},size:p,color:Oy("hex",H),focusable:w,"aria-label":_,onScrubStart:q,onScrubEnd:U})]}),F&&ne.jsx(RA,{color:$,radius:"sm",size:"var(--cp-preview-size)",...A("preview")})]})]}),Array.isArray(C)&&ne.jsx(WNt,{data:C,swatchesPerRow:N,focusable:w,setValue:B,onChangeEnd:J=>{const ae=Oy(c,MT(J));D==null||D(ae),f==null||f(ae),z||K(MT(J))}})]})})});G5e.classes=K5e;G5e.displayName="@mantine/core/ColorPicker";function LLn({style:t,...e}){return ne.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:"var(--ci-eye-dropper-icon-size)",height:"var(--ci-eye-dropper-icon-size)",...t},viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[ne.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),ne.jsx("path",{d:"M11 7l6 6"}),ne.jsx("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]})}var qJe={eyeDropperIcon:"m_b077c2bc",colorPreview:"m_c5ccdcab",dropdown:"m_5ece2cd7"};const GJe={format:"hex",fixOnBlur:!0,withPreview:!0,swatchesPerRow:7,withPicker:!0,popoverProps:{transitionProps:{transition:"fade",duration:0}},withEyeDropper:!0},TLn=(t,{size:e})=>({eyeDropperIcon:{"--ci-eye-dropper-icon-size":Hr(e,"ci-eye-dropper-icon-size")},colorPreview:{"--ci-preview-size":Hr(e,"ci-preview-size")}}),Ine=Dn((t,e)=>{const n=Kt("ColorInput",GJe,t),{classNames:i,styles:r,unstyled:o,disallowInput:s,fixOnBlur:a,popoverProps:l,withPreview:c,withEyeDropper:u,eyeDropperIcon:d,closeOnColorSwatchClick:h,eyeDropperButtonProps:f,value:m,defaultValue:p,onChange:g,onChangeEnd:y,onClick:_,onFocus:w,onBlur:C,inputProps:N,format:E,wrapperProps:D,readOnly:k,withPicker:M,swatches:T,disabled:A,leftSection:R,rightSection:P,swatchesPerRow:O,...V}=_5e("ColorInput",GJe,t),F=hi({name:"ColorInput",props:n,classes:qJe,classNames:i,styles:r,unstyled:o,rootSelector:"wrapper",vars:n.vars,varsResolver:TLn}),{resolvedClassNames:$,resolvedStyles:B}=zv({classNames:i,styles:r,props:n}),[z,H]=b.useState(!1),[K,q]=b.useState(""),[U,Y]=au({value:m,defaultValue:p,finalValue:"",onChange:g}),{supported:J,open:ae}=nNn(),se=ne.jsx(Fr,{...f,...F("eyeDropperButton",{className:f==null?void 0:f.className,style:f==null?void 0:f.style}),variant:"subtle",color:"gray",size:N.size,unstyled:o,onClick:()=>ae().then(ie=>{if(ie!=null&&ie.sRGBHex){const Q=Oy(E,MT(ie.sRGBHex));Y(Q),y==null||y(Q)}}).catch(()=>{}),children:d||ne.jsx(LLn,{...F("eyeDropperIcon")})}),oe=ie=>{w==null||w(ie),H(!0)},fe=ie=>{a&&Y(K),C==null||C(ie),H(!1)},de=ie=>{_==null||_(ie),H(!0)};return b.useEffect(()=>{(O7(U)||U.trim()==="")&&q(U)},[U]),Fp(()=>{O7(U)&&Y(Oy(E,MT(U)))},[E]),ne.jsx(ra.Wrapper,{...D,classNames:$,styles:B,__staticSelector:"ColorInput",children:ne.jsxs(Iu,{__staticSelector:"ColorInput",position:"bottom-start",offset:5,...l,opened:z,classNames:$,styles:B,unstyled:o,withRoles:!1,disabled:k||M===!1&&(!Array.isArray(T)||T.length===0),children:[ne.jsx(Iu.Target,{children:ne.jsx(ra,{autoComplete:"off",...V,...N,classNames:$,styles:B,disabled:A,ref:e,__staticSelector:"ColorInput",onFocus:oe,onBlur:fe,onClick:de,spellCheck:!1,value:U,onChange:ie=>{const Q=ie.currentTarget.value;Y(Q),O7(Q)&&(y==null||y(Oy(E,MT(Q))))},leftSection:R||(c?ne.jsx(RA,{color:O7(U)?U:"#fff",size:"var(--ci-preview-size)",...F("colorPreview")}):null),readOnly:s||k,pointer:s,unstyled:o,rightSection:P||(u&&!A&&!k&&J?se:null)})}),ne.jsx(Iu.Dropdown,{onMouseDown:ie=>ie.preventDefault(),className:qJe.dropdown,children:ne.jsx(G5e,{__staticSelector:"ColorInput",value:U,onChange:Y,onChangeEnd:y,format:E,swatches:T,swatchesPerRow:O,withPicker:M,size:N.size,focusable:!1,unstyled:o,styles:B,classNames:$,onColorSwatchClick:()=>h&&H(!1)})})]})})});Ine.classes=Qp.classes;Ine.displayName="@mantine/core/ColorInput";const ILn={timeout:1e3};function Y5e(t){const{children:e,timeout:n,value:i,...r}=Kt("CopyButton",ILn,t),o=RSn({timeout:n}),s=()=>o.copy(i);return ne.jsx(ne.Fragment,{children:e({copy:s,copied:o.copied,...r})})}Y5e.displayName="@mantine/core/CopyButton";var UNt={root:"m_3eebeb36",label:"m_9e365f20"};const ALn={orientation:"horizontal"},RLn=(t,{color:e,variant:n,size:i})=>({root:{"--divider-color":e?Xa(e,t):void 0,"--divider-border-style":n,"--divider-size":Hr(i,"divider-size")}}),zl=Dn((t,e)=>{const n=Kt("Divider",ALn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,color:c,orientation:u,label:d,labelPosition:h,mod:f,...m}=n,p=hi({name:"Divider",classes:UNt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:RLn});return ne.jsx(mn,{ref:e,mod:[{orientation:u,"with-label":!!d},f],...p("root"),...m,role:"separator",children:d&&ne.jsx(mn,{component:"span",mod:{position:h},...p("label"),children:d})})});zl.classes=UNt;zl.displayName="@mantine/core/Divider";const[PLn,YF]=Uh("Drawer component was not found in tree");var AS={root:"m_f11b401e",header:"m_5a7c2c9",content:"m_b8a05bbd",inner:"m_31cd769a"};const OLn={},xde=Dn((t,e)=>{const n=Kt("DrawerBody",OLn,t),{classNames:i,className:r,style:o,styles:s,vars:a,...l}=n,c=YF();return ne.jsx(f5e,{ref:e,...c.getStyles("body",{classNames:i,style:o,styles:s,className:r}),...l})});xde.classes=AS;xde.displayName="@mantine/core/DrawerBody";const jLn={},wde=Dn((t,e)=>{const n=Kt("DrawerCloseButton",jLn,t),{classNames:i,className:r,style:o,styles:s,vars:a,...l}=n,c=YF();return ne.jsx(m5e,{ref:e,...c.getStyles("close",{classNames:i,style:o,styles:s,className:r}),...l})});wde.classes=AS;wde.displayName="@mantine/core/DrawerCloseButton";const FLn={},Cde=Dn((t,e)=>{const n=Kt("DrawerContent",FLn,t),{classNames:i,className:r,style:o,styles:s,vars:a,children:l,radius:c,...u}=n,d=YF(),h=d.scrollAreaComponent||dNt;return ne.jsx(uNt,{...d.getStyles("content",{className:r,style:o,styles:s,classNames:i}),innerProps:d.getStyles("inner",{className:r,style:o,styles:s,classNames:i}),ref:e,...u,radius:c||d.radius||0,children:ne.jsx(h,{style:{height:"calc(100vh - var(--drawer-offset) * 2)"},children:l})})});Cde.classes=AS;Cde.displayName="@mantine/core/DrawerContent";const $Ln={},Sde=Dn((t,e)=>{const n=Kt("DrawerHeader",$Ln,t),{classNames:i,className:r,style:o,styles:s,vars:a,...l}=n,c=YF();return ne.jsx(p5e,{ref:e,...c.getStyles("header",{classNames:i,style:o,styles:s,className:r}),...l})});Sde.classes=AS;Sde.displayName="@mantine/core/DrawerHeader";const VLn={},Nde=Dn((t,e)=>{const n=Kt("DrawerOverlay",VLn,t),{classNames:i,className:r,style:o,styles:s,vars:a,...l}=n,c=YF();return ne.jsx(g5e,{ref:e,...c.getStyles("overlay",{classNames:i,style:o,styles:s,className:r}),...l})});Nde.classes=AS;Nde.displayName="@mantine/core/DrawerOverlay";function BLn(t){switch(t){case"top":return"flex-start";case"bottom":return"flex-end";default:return}}function zLn(t){if(t==="top"||t==="bottom")return"0 0 calc(100% - var(--drawer-offset, 0rem) * 2)"}const HLn={top:"slide-down",bottom:"slide-up",left:"slide-right",right:"slide-left"},WLn={top:"slide-down",bottom:"slide-up",right:"slide-right",left:"slide-left"},ULn={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:gb("modal"),position:"left"},KLn=(t,{position:e,size:n,offset:i})=>({root:{"--drawer-size":Hr(n,"drawer-size"),"--drawer-flex":zLn(e),"--drawer-height":e==="left"||e==="right"?void 0:"var(--drawer-size)","--drawer-align":BLn(e),"--drawer-justify":e==="right"?"flex-end":void 0,"--drawer-offset":sn(i)}}),Ede=Dn((t,e)=>{const n=Kt("DrawerRoot",ULn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,scrollAreaComponent:c,position:u,transitionProps:d,radius:h,...f}=n,{dir:m}=qk(),p=hi({name:"Drawer",classes:AS,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:KLn}),g=(m==="rtl"?WLn:HLn)[u];return ne.jsx(PLn,{value:{scrollAreaComponent:c,getStyles:p,radius:h},children:ne.jsx(cNt,{ref:e,...p("root"),transitionProps:{transition:g,...d},unstyled:a,...f})})});Ede.classes=AS;Ede.displayName="@mantine/core/DrawerRoot";const qLn={},Dde=Dn((t,e)=>{const n=Kt("DrawerTitle",qLn,t),{classNames:i,className:r,style:o,styles:s,vars:a,...l}=n,c=YF();return ne.jsx(b5e,{ref:e,...c.getStyles("title",{classNames:i,style:o,styles:s,className:r}),...l})});Dde.classes=AS;Dde.displayName="@mantine/core/DrawerTitle";const GLn={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:gb("modal"),withOverlay:!0,withCloseButton:!0},kw=Dn((t,e)=>{const{title:n,withOverlay:i,overlayProps:r,withCloseButton:o,closeButtonProps:s,children:a,...l}=Kt("Drawer",GLn,t),c=!!n||o;return ne.jsxs(Ede,{ref:e,...l,children:[i&&ne.jsx(Nde,{...r}),ne.jsxs(Cde,{children:[c&&ne.jsxs(Sde,{children:[n&&ne.jsx(Dde,{children:n}),o&&ne.jsx(wde,{...s})]}),ne.jsx(xde,{children:a})]})]})});kw.classes=AS;kw.displayName="@mantine/core/Drawer";kw.Root=Ede;kw.Overlay=Nde;kw.Content=Cde;kw.Body=xde;kw.Header=Sde;kw.Title=Dde;kw.CloseButton=wde;function YLn({open:t,close:e,openDelay:n,closeDelay:i}){const r=b.useRef(-1),o=b.useRef(-1),s=()=>{window.clearTimeout(r.current),window.clearTimeout(o.current)},a=()=>{s(),n===0||n===void 0?t():r.current=window.setTimeout(t,n)},l=()=>{s(),i===0||i===void 0?e():o.current=window.setTimeout(e,i)};return b.useEffect(()=>s,[]),{openDropdown:a,closeDropdown:l}}const[XLn,KNt]=Uh("Grid component was not found in tree"),qEe=(t,e)=>t==="content"?"auto":t==="auto"?"0rem":t?`${100/(e/t)}%`:void 0,YJe=(t,e,n)=>n||t==="auto"?"100%":t==="content"?"unset":qEe(t,e),XJe=(t,e)=>{if(t)return t==="auto"||e?"1":"auto"},ZJe=(t,e)=>t===0?"0":t?`${100/(e/t)}%`:void 0;function ZLn({span:t,order:e,offset:n,selector:i}){var h;const r=zc(),o=KNt(),a=r0(t)===void 0?12:r0(t),l=Wk({"--col-order":(h=r0(e))==null?void 0:h.toString(),"--col-flex-grow":XJe(a,o.grow),"--col-flex-basis":qEe(a,o.columns),"--col-width":a==="content"?"auto":void 0,"--col-max-width":YJe(a,o.columns,o.grow),"--col-offset":ZJe(r0(n),o.columns)}),c=Tu(r.breakpoints).reduce((f,m)=>{var p;return f[m]||(f[m]={}),typeof e=="object"&&e[m]!==void 0&&(f[m]["--col-order"]=(p=e[m])==null?void 0:p.toString()),typeof t=="object"&&t[m]!==void 0&&(f[m]["--col-flex-grow"]=XJe(t[m],o.grow),f[m]["--col-flex-basis"]=qEe(t[m],o.columns),f[m]["--col-width"]=t[m]==="content"?"auto":void 0,f[m]["--col-max-width"]=YJe(t[m],o.columns,o.grow)),typeof n=="object"&&n[m]!==void 0&&(f[m]["--col-offset"]=ZJe(n[m],o.columns)),f},{}),d=Bje(Tu(c),r).filter(f=>Tu(c[f.value]).length>0).map(f=>({query:`(min-width: ${r.breakpoints[f.value]})`,styles:c[f.value]}));return ne.jsx(HF,{styles:l,media:d,selector:i})}var X5e={root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const QLn={span:12},Z5e=Dn((t,e)=>{const n=Kt("GridCol",QLn,t),{classNames:i,className:r,style:o,styles:s,vars:a,span:l,order:c,offset:u,...d}=n,h=KNt(),f=NK();return ne.jsxs(ne.Fragment,{children:[ne.jsx(ZLn,{selector:`.${f}`,span:l,order:c,offset:u}),ne.jsx(mn,{ref:e,...h.getStyles("col",{className:Vt(r,f),style:o,classNames:i,styles:s}),...d})]})});Z5e.classes=X5e;Z5e.displayName="@mantine/core/GridCol";function JLn({gutter:t,selector:e}){const n=zc(),i=Wk({"--grid-gutter":Rc(r0(t))}),r=Tu(n.breakpoints).reduce((a,l)=>(a[l]||(a[l]={}),typeof t=="object"&&t[l]!==void 0&&(a[l]["--grid-gutter"]=Rc(t[l])),a),{}),s=Bje(Tu(r),n).filter(a=>Tu(r[a.value]).length>0).map(a=>({query:`(min-width: ${n.breakpoints[a.value]})`,styles:r[a.value]}));return ne.jsx(HF,{styles:i,media:s,selector:e})}const eTn={gutter:"md",grow:!1,columns:12},tTn=(t,{justify:e,align:n,overflow:i})=>({root:{"--grid-justify":e,"--grid-align":n,"--grid-overflow":i}}),ad=Dn((t,e)=>{const n=Kt("Grid",eTn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,grow:c,gutter:u,columns:d,align:h,justify:f,children:m,...p}=n,g=hi({name:"Grid",classes:X5e,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:tTn}),y=NK();return ne.jsxs(XLn,{value:{getStyles:g,grow:c,columns:d},children:[ne.jsx(JLn,{selector:`.${y}`,...n}),ne.jsx(mn,{ref:e,...g("root",{className:y}),...p,children:ne.jsx("div",{...g("inner"),children:m})})]})});ad.classes=X5e;ad.displayName="@mantine/core/Grid";ad.Col=Z5e;var qNt={root:"m_9e117634"};const nTn={},iTn=(t,{radius:e,fit:n})=>({root:{"--image-radius":e===void 0?void 0:Va(e),"--image-object-fit":n}}),Q5e=Cd((t,e)=>{const n=Kt("Image",nTn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,onError:c,src:u,radius:d,fit:h,fallbackSrc:f,mod:m,...p}=n,[g,y]=b.useState(!u);b.useEffect(()=>y(!u),[u]);const _=hi({name:"Image",classes:qNt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:iTn});return g&&f?ne.jsx(mn,{component:"img",ref:e,src:f,..._("root"),onError:c,mod:["fallback",m],...p}):ne.jsx(mn,{component:"img",ref:e,..._("root"),src:u,onError:w=>{c==null||c(w),y(!0)},mod:m,...p})});Q5e.classes=qNt;Q5e.displayName="@mantine/core/Image";function rTn(t="top-end",e=0){const n={"--indicator-top":void 0,"--indicator-bottom":void 0,"--indicator-left":void 0,"--indicator-right":void 0,"--indicator-translate-x":void 0,"--indicator-translate-y":void 0},i=sn(e),[r,o]=t.split("-");return r==="top"&&(n["--indicator-top"]=i,n["--indicator-translate-y"]="-50%"),r==="middle"&&(n["--indicator-top"]="50%",n["--indicator-translate-y"]="-50%"),r==="bottom"&&(n["--indicator-bottom"]=i,n["--indicator-translate-y"]="50%"),o==="start"&&(n["--indicator-left"]=i,n["--indicator-translate-x"]="-50%"),o==="center"&&(n["--indicator-left"]="50%",n["--indicator-translate-x"]="-50%"),o==="end"&&(n["--indicator-right"]=i,n["--indicator-translate-x"]="50%"),n}var GNt={root:"m_e5262200",indicator:"m_760d1fb1",processing:"m_885901b1"};const oTn={position:"top-end",offset:0,inline:!1,withBorder:!1,disabled:!1,processing:!1},sTn=(t,{color:e,position:n,offset:i,size:r,radius:o,zIndex:s,autoContrast:a})=>({root:{"--indicator-color":e?Xa(e,t):void 0,"--indicator-text-color":ade(a,t)?zF({color:e,theme:t,autoContrast:a}):void 0,"--indicator-size":sn(r),"--indicator-radius":o===void 0?void 0:Va(o),"--indicator-z-index":s==null?void 0:s.toString(),...rTn(n,i)}}),kde=Dn((t,e)=>{const n=Kt("Indicator",oTn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,children:c,position:u,offset:d,inline:h,label:f,radius:m,color:p,withBorder:g,disabled:y,processing:_,zIndex:w,autoContrast:C,mod:N,...E}=n,D=hi({name:"Indicator",classes:GNt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:sTn});return ne.jsxs(mn,{ref:e,...D("root"),mod:[{inline:h},N],...E,children:[!y&&ne.jsx(ne.Fragment,{children:ne.jsx(mn,{mod:{"with-label":!!f,"with-border":g,processing:_},...D("indicator"),children:f})}),c]})});kde.classes=GNt;kde.displayName="@mantine/core/Indicator";var aTn=b.useLayoutEffect,lTn=function(e){var n=b.useRef(e);return aTn(function(){n.current=e}),n},QJe=function(e,n){if(typeof e=="function"){e(n);return}e.current=n},cTn=function(e,n){var i=b.useRef();return b.useCallback(function(r){e.current=r,i.current&&QJe(i.current,null),i.current=n,n&&QJe(n,r)},[n])},JJe={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},uTn=function(e){Object.keys(JJe).forEach(function(n){e.style.setProperty(n,JJe[n],"important")})},eet=uTn,Wf=null,tet=function(e,n){var i=e.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?i+n.borderSize:i-n.paddingSize};function dTn(t,e,n,i){n===void 0&&(n=1),i===void 0&&(i=1/0),Wf||(Wf=document.createElement("textarea"),Wf.setAttribute("tabindex","-1"),Wf.setAttribute("aria-hidden","true"),eet(Wf)),Wf.parentNode===null&&document.body.appendChild(Wf);var r=t.paddingSize,o=t.borderSize,s=t.sizingStyle,a=s.boxSizing;Object.keys(s).forEach(function(h){var f=h;Wf.style[f]=s[f]}),eet(Wf),Wf.value=e;var l=tet(Wf,t);Wf.value=e,l=tet(Wf,t),Wf.value="x";var c=Wf.scrollHeight-r,u=c*n;a==="border-box"&&(u=u+r+o),l=Math.max(u,l);var d=c*i;return a==="border-box"&&(d=d+r+o),l=Math.min(d,l),[l,c]}var net=function(){},hTn=function(e,n){return e.reduce(function(i,r){return i[r]=n[r],i},{})},fTn=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],mTn=!!document.documentElement.currentStyle,pTn=function(e){var n=window.getComputedStyle(e);if(n===null)return null;var i=hTn(fTn,n),r=i.boxSizing;if(r==="")return null;mTn&&r==="border-box"&&(i.width=parseFloat(i.width)+parseFloat(i.borderRightWidth)+parseFloat(i.borderLeftWidth)+parseFloat(i.paddingRight)+parseFloat(i.paddingLeft)+"px");var o=parseFloat(i.paddingBottom)+parseFloat(i.paddingTop),s=parseFloat(i.borderBottomWidth)+parseFloat(i.borderTopWidth);return{sizingStyle:i,paddingSize:o,borderSize:s}},gTn=pTn;function YNt(t,e,n){var i=lTn(n);b.useLayoutEffect(function(){var r=function(s){return i.current(s)};if(t)return t.addEventListener(e,r),function(){return t.removeEventListener(e,r)}},[])}var bTn=function(e){YNt(window,"resize",e)},vTn=function(e){YNt(document.fonts,"loadingdone",e)},yTn=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],_Tn=function(e,n){var i=e.cacheMeasurements,r=e.maxRows,o=e.minRows,s=e.onChange,a=s===void 0?net:s,l=e.onHeightChange,c=l===void 0?net:l,u=$F(e,yTn);if(u.style){if("maxHeight"in u.style)throw new Error("Using `style.maxHeight` for <TextareaAutosize/> is not supported. Please use `maxRows`.");if("minHeight"in u.style)throw new Error("Using `style.minHeight` for <TextareaAutosize/> is not supported. Please use `minRows`.")}var d=u.value!==void 0,h=b.useRef(null),f=cTn(h,n),m=b.useRef(0),p=b.useRef(),g=function(){var w=h.current,C=i&&p.current?p.current:gTn(w);if(C){p.current=C;var N=dTn(C,w.value||w.placeholder||"x",o,r),E=N[0],D=N[1];m.current!==E&&(m.current=E,w.style.setProperty("height",E+"px","important"),c(E,{rowHeight:D}))}},y=function(w){d||g(),a(w)};return b.useLayoutEffect(g),bTn(g),vTn(g),b.createElement("textarea",lt({},u,{onChange:y,ref:f}))},xTn=b.forwardRef(_Tn);const wTn={},Th=Dn((t,e)=>{const{autosize:n,maxRows:i,minRows:r,__staticSelector:o,resize:s,...a}=Kt("Textarea",wTn,t),l=n&&cSt()!=="test",c=l?{maxRows:i,minRows:r}:{};return ne.jsx(Qp,{component:l?xTn:"textarea",ref:e,...a,__staticSelector:o||"Textarea",multiline:!0,"data-no-overflow":n&&i===void 0||void 0,__vars:{"--input-resize":s},...c})});Th.classes=Qp.classes;Th.displayName="@mantine/core/Textarea";const[CTn,STn]=Uh("List component was not found in tree");var J5e={root:"m_abbac491",item:"m_abb6bec2",itemWrapper:"m_75cd9f71",itemIcon:"m_60f83e5b"};const NTn={},eFe=Dn((t,e)=>{const n=Kt("ListItem",NTn,t),{classNames:i,className:r,style:o,styles:s,vars:a,icon:l,children:c,mod:u,...d}=n,h=STn(),f=l||h.icon,m={classNames:i,styles:s};return ne.jsx(mn,{...h.getStyles("item",{...m,className:r,style:o}),component:"li",mod:[{"with-icon":!!f,centered:h.center},u],ref:e,...d,children:ne.jsxs("div",{...h.getStyles("itemWrapper",m),children:[f&&ne.jsx("span",{...h.getStyles("itemIcon",m),children:f}),ne.jsx("span",{...h.getStyles("itemLabel",m),children:c})]})})});eFe.classes=J5e;eFe.displayName="@mantine/core/ListItem";const ETn={type:"unordered"},DTn=(t,{size:e,spacing:n})=>({root:{"--list-fz":hd(e),"--list-lh":eSt(e),"--list-spacing":Rc(n)}}),mm=Dn((t,e)=>{const n=Kt("List",ETn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,children:c,type:u,withPadding:d,icon:h,spacing:f,center:m,listStyleType:p,mod:g,...y}=n,_=hi({name:"List",classes:J5e,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:DTn});return ne.jsx(CTn,{value:{center:m,icon:h,getStyles:_},children:ne.jsx(mn,{..._("root",{style:{listStyleType:p}}),component:u==="unordered"?"ul":"ol",mod:[{"with-padding":d},g],ref:e,...y,children:c})})});mm.classes=J5e;mm.displayName="@mantine/core/List";mm.Item=eFe;var XNt={root:"m_6e45937b",loader:"m_e8eb006c",overlay:"m_df587f17"};const iet={transitionProps:{transition:"fade",duration:0},overlayProps:{backgroundOpacity:.75},zIndex:gb("overlay")},kTn=(t,{zIndex:e})=>({root:{"--lo-z-index":e==null?void 0:e.toString()}}),tFe=Dn((t,e)=>{const n=Kt("LoadingOverlay",iet,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,transitionProps:c,loaderProps:u,overlayProps:d,visible:h,zIndex:f,...m}=n,p=zc(),g=hi({name:"LoadingOverlay",classes:XNt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:kTn}),y={...iet.overlayProps,...d};return ne.jsx(lu,{transition:"fade",...c,mounted:!!h,children:_=>ne.jsxs(mn,{...g("root",{style:_}),ref:e,...m,children:[ne.jsx($p,{...g("loader"),unstyled:a,...u}),ne.jsx(Lz,{...y,...g("overlay"),darkHidden:!0,unstyled:a,color:(d==null?void 0:d.color)||p.white}),ne.jsx(Lz,{...y,...g("overlay"),lightHidden:!0,unstyled:a,color:(d==null?void 0:d.color)||p.colors.dark[5]})]})})});tFe.classes=XNt;tFe.displayName="@mantine/core/LoadingOverlay";const[MTn,kK]=Uh("Menu component was not found in the tree");var XF={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504"};const LTn={},nFe=Dn((t,e)=>{const{classNames:n,className:i,style:r,styles:o,vars:s,...a}=Kt("MenuDivider",LTn,t),l=kK();return ne.jsx(mn,{ref:e,...l.getStyles("divider",{className:i,style:r,styles:o,classNames:n}),...a})});nFe.classes=XF;nFe.displayName="@mantine/core/MenuDivider";const TTn={},iFe=Dn((t,e)=>{const{classNames:n,className:i,style:r,styles:o,vars:s,onMouseEnter:a,onMouseLeave:l,children:c,...u}=Kt("MenuDropdown",TTn,t),d=b.useRef(null),h=kK(),f=g=>{var y,_;(g.key==="ArrowUp"||g.key==="ArrowDown")&&(g.preventDefault(),(_=(y=d.current)==null?void 0:y.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||_.focus())},m=Bg(a,()=>(h.trigger==="hover"||h.trigger==="click-hover")&&h.openDropdown()),p=Bg(l,()=>(h.trigger==="hover"||h.trigger==="click-hover")&&h.closeDropdown());return ne.jsxs(Iu.Dropdown,{...u,onMouseEnter:m,onMouseLeave:p,role:"menu","aria-orientation":"vertical",ref:Bc(e,d),...h.getStyles("dropdown",{className:i,style:r,styles:o,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:f,children:[ne.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,"aria-hidden":!0,style:{outline:0}}),c]})});iFe.classes=XF;iFe.displayName="@mantine/core/MenuDropdown";const ITn={},rFe=Cd((t,e)=>{const{classNames:n,className:i,style:r,styles:o,vars:s,color:a,closeMenuOnClick:l,leftSection:c,rightSection:u,children:d,disabled:h,...f}=Kt("MenuItem",ITn,t),m=kK(),p=zc(),{dir:g}=qk(),y=b.useRef(),_=m.getItemIndex(y.current),w=f,C=Bg(w.onMouseLeave,()=>m.setHovered(-1)),N=Bg(w.onMouseEnter,()=>m.setHovered(m.getItemIndex(y.current))),E=Bg(w.onClick,()=>{typeof l=="boolean"?l&&m.closeDropdownImmediately():m.closeOnItemClick&&m.closeDropdownImmediately()}),D=Bg(w.onFocus,()=>m.setHovered(m.getItemIndex(y.current))),k=a?p.variantColorResolver({color:a,theme:p,variant:"light"}):void 0,M=a?Kk({color:a,theme:p}):null;return ne.jsxs(Lh,{...f,unstyled:m.unstyled,tabIndex:m.menuItemTabIndex,onFocus:D,...m.getStyles("item",{className:i,style:r,styles:o,classNames:n}),ref:Bc(y,e),role:"menuitem",disabled:h,"data-menu-item":!0,"data-disabled":h||void 0,"data-hovered":m.hovered===_?!0:void 0,"data-mantine-stop-propagation":!0,onMouseEnter:N,onMouseLeave:C,onClick:E,onKeyDown:JCt({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:m.loop,dir:g,orientation:"vertical",onKeyDown:w.onKeydown}),__vars:{"--menu-item-color":M!=null&&M.isThemeColor&&(M==null?void 0:M.shade)===void 0?`var(--mantine-color-${M.color}-6)`:k==null?void 0:k.color,"--menu-item-hover":k==null?void 0:k.hover},children:[c&&ne.jsx("div",{...m.getStyles("itemSection",{styles:o,classNames:n}),"data-position":"left",children:c}),d&&ne.jsx("div",{...m.getStyles("itemLabel",{styles:o,classNames:n}),children:d}),u&&ne.jsx("div",{...m.getStyles("itemSection",{styles:o,classNames:n}),"data-position":"right",children:u})]})});rFe.classes=XF;rFe.displayName="@mantine/core/MenuItem";const ATn={},oFe=Dn((t,e)=>{const{classNames:n,className:i,style:r,styles:o,vars:s,...a}=Kt("MenuLabel",ATn,t),l=kK();return ne.jsx(mn,{ref:e,...l.getStyles("label",{className:i,style:r,styles:o,classNames:n}),...a})});oFe.classes=XF;oFe.displayName="@mantine/core/MenuLabel";const RTn={refProp:"ref"},ZNt=b.forwardRef((t,e)=>{const{children:n,refProp:i,...r}=Kt("MenuTarget",RTn,t);if(!Nw(n))throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const o=kK(),s=Bg(n.props.onClick,()=>{o.trigger==="click"?o.toggleDropdown():o.trigger==="click-hover"&&(o.setOpenedViaClick(!0),o.opened||o.openDropdown())}),a=Bg(n.props.onMouseEnter,()=>(o.trigger==="hover"||o.trigger==="click-hover")&&o.openDropdown()),l=Bg(n.props.onMouseLeave,()=>{(o.trigger==="hover"||o.trigger==="click-hover"&&!o.openedViaClick)&&o.closeDropdown()});return ne.jsx(Iu.Target,{refProp:i,popupType:"menu",ref:e,...r,children:b.cloneElement(n,{onClick:s,onMouseEnter:a,onMouseLeave:l,"data-expanded":o.opened?!0:void 0})})});ZNt.displayName="@mantine/core/MenuTarget";const PTn={trapFocus:!0,closeOnItemClick:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function Cu(t){const e=Kt("Menu",PTn,t),{children:n,onOpen:i,onClose:r,opened:o,defaultOpened:s,trapFocus:a,onChange:l,closeOnItemClick:c,loop:u,closeOnEscape:d,trigger:h,openDelay:f,closeDelay:m,classNames:p,styles:g,unstyled:y,variant:_,vars:w,menuItemTabIndex:C,keepMounted:N,...E}=e,D=hi({name:"Menu",classes:XF,props:e,classNames:p,styles:g,unstyled:y}),[k,{setHovered:M,resetHovered:T}]=ISn(),[A,R]=au({value:o,defaultValue:s,finalValue:!1,onChange:l}),[P,O]=b.useState(!1),V=()=>{R(!1),O(!1),A&&(r==null||r())},F=()=>{R(!0),!A&&(i==null||i())},$=()=>{A?V():F()},{openDropdown:B,closeDropdown:z}=YLn({open:F,close:V,closeDelay:m,openDelay:f}),H=U=>TSn("[data-menu-item]","[data-menu-dropdown]",U),{resolvedClassNames:K,resolvedStyles:q}=zv({classNames:p,styles:g,props:e});return Fp(()=>{T()},[A]),ne.jsx(MTn,{value:{getStyles:D,opened:A,toggleDropdown:$,getItemIndex:H,hovered:k,setHovered:M,openedViaClick:P,setOpenedViaClick:O,closeOnItemClick:c,closeDropdown:h==="click"?V:z,openDropdown:h==="click"?F:B,closeDropdownImmediately:V,loop:u,trigger:h,unstyled:y,menuItemTabIndex:C},children:ne.jsx(Iu,{...E,opened:A,onChange:$,defaultOpened:s,trapFocus:N?!1:a,closeOnEscape:d,__staticSelector:"Menu",classNames:K,styles:q,unstyled:y,variant:_,keepMounted:N,children:n})})}Cu.extend=t=>t;Cu.classes=XF;Cu.displayName="@mantine/core/Menu";Cu.Item=rFe;Cu.Label=oFe;Cu.Dropdown=iFe;Cu.Target=ZNt;Cu.Divider=nFe;const[OTn,ZF]=Uh("Modal component was not found in tree");var RS={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const jTn={},Mde=Dn((t,e)=>{const n=Kt("ModalBody",jTn,t),{classNames:i,className:r,style:o,styles:s,vars:a,...l}=n,c=ZF();return ne.jsx(f5e,{ref:e,...c.getStyles("body",{classNames:i,style:o,styles:s,className:r}),...l})});Mde.classes=RS;Mde.displayName="@mantine/core/ModalBody";const FTn={},Lde=Dn((t,e)=>{const n=Kt("ModalCloseButton",FTn,t),{classNames:i,className:r,style:o,styles:s,vars:a,...l}=n,c=ZF();return ne.jsx(m5e,{ref:e,...c.getStyles("close",{classNames:i,style:o,styles:s,className:r}),...l})});Lde.classes=RS;Lde.displayName="@mantine/core/ModalCloseButton";const $Tn={},Tde=Dn((t,e)=>{const n=Kt("ModalContent",$Tn,t),{classNames:i,className:r,style:o,styles:s,vars:a,children:l,...c}=n,u=ZF(),d=u.scrollAreaComponent||dNt;return ne.jsx(uNt,{...u.getStyles("content",{className:r,style:o,styles:s,classNames:i}),innerProps:u.getStyles("inner",{className:r,style:o,styles:s,classNames:i}),"data-full-screen":u.fullScreen||void 0,"data-modal-content":!0,ref:e,...c,children:ne.jsx(d,{style:{maxHeight:u.fullScreen?"100dvh":`calc(100dvh - (${sn(u.yOffset)} * 2))`},children:l})})});Tde.classes=RS;Tde.displayName="@mantine/core/ModalContent";const VTn={},Ide=Dn((t,e)=>{const n=Kt("ModalHeader",VTn,t),{classNames:i,className:r,style:o,styles:s,vars:a,...l}=n,c=ZF();return ne.jsx(p5e,{ref:e,...c.getStyles("header",{classNames:i,style:o,styles:s,className:r}),...l})});Ide.classes=RS;Ide.displayName="@mantine/core/ModalHeader";const BTn={},Ade=Dn((t,e)=>{const n=Kt("ModalOverlay",BTn,t),{classNames:i,className:r,style:o,styles:s,vars:a,...l}=n,c=ZF();return ne.jsx(g5e,{ref:e,...c.getStyles("overlay",{classNames:i,style:o,styles:s,className:r}),...l})});Ade.classes=RS;Ade.displayName="@mantine/core/ModalOverlay";const zTn={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:gb("modal"),transitionProps:{duration:200,transition:"pop"},yOffset:"5dvh"},HTn=(t,{radius:e,size:n,yOffset:i,xOffset:r})=>({root:{"--modal-radius":e===void 0?void 0:Va(e),"--modal-size":Hr(n,"modal-size"),"--modal-y-offset":sn(i),"--modal-x-offset":sn(r)}}),Rde=Dn((t,e)=>{const n=Kt("ModalRoot",zTn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,yOffset:c,scrollAreaComponent:u,radius:d,fullScreen:h,centered:f,xOffset:m,__staticSelector:p,...g}=n,y=hi({name:p,classes:RS,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:HTn});return ne.jsx(OTn,{value:{yOffset:c,scrollAreaComponent:u,getStyles:y,fullScreen:h},children:ne.jsx(cNt,{ref:e,...y("root"),"data-full-screen":h||void 0,"data-centered":f||void 0,unstyled:a,...g})})});Rde.classes=RS;Rde.displayName="@mantine/core/ModalRoot";const WTn={},Pde=Dn((t,e)=>{const n=Kt("ModalTitle",WTn,t),{classNames:i,className:r,style:o,styles:s,vars:a,...l}=n,c=ZF();return ne.jsx(b5e,{ref:e,...c.getStyles("title",{classNames:i,style:o,styles:s,className:r}),...l})});Pde.classes=RS;Pde.displayName="@mantine/core/ModalTitle";const UTn={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:gb("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},bl=Dn((t,e)=>{const{title:n,withOverlay:i,overlayProps:r,withCloseButton:o,closeButtonProps:s,children:a,radius:l,...c}=Kt("Modal",UTn,t),u=!!n||o;return ne.jsxs(Rde,{ref:e,radius:l,...c,children:[i&&ne.jsx(Ade,{...r}),ne.jsxs(Tde,{radius:l,children:[u&&ne.jsxs(Ide,{children:[n&&ne.jsx(Pde,{children:n}),o&&ne.jsx(Lde,{...s})]}),ne.jsx(Mde,{children:a})]})]})});bl.classes=RS;bl.displayName="@mantine/core/Modal";bl.Root=Rde;bl.Overlay=Ade;bl.Content=Tde;bl.Body=Mde;bl.Header=Ide;bl.Title=Pde;bl.CloseButton=Lde;const[KTn,sFe]=BF(),[qTn,GTn]=BF();var Ode={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const YTn={},XTn=(t,{gap:e},{size:n})=>({group:{"--pg-gap":e!==void 0?Hr(e):Hr(n,"pg-gap")}}),aFe=Dn((t,e)=>{const n=Kt("PillGroup",YTn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,size:c,disabled:u,...d}=n,h=sFe(),f=(h==null?void 0:h.size)||c||void 0,m=hi({name:"PillGroup",classes:Ode,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:XTn,stylesCtx:{size:f},rootSelector:"group"});return ne.jsx(qTn,{value:{size:f,disabled:u},children:ne.jsx(mn,{ref:e,size:f,...m("group"),...d})})});aFe.classes=Ode;aFe.displayName="@mantine/core/PillGroup";const ZTn={variant:"default"},QTn=(t,{radius:e},{size:n})=>({root:{"--pill-fz":Hr(n,"pill-fz"),"--pill-height":Hr(n,"pill-height"),"--pill-radius":e===void 0?void 0:Va(e)}}),Iz=Dn((t,e)=>{const n=Kt("Pill",ZTn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,variant:c,children:u,withRemoveButton:d,onRemove:h,removeButtonProps:f,radius:m,size:p,disabled:g,mod:y,..._}=n,w=GTn(),C=sFe(),N=p||(w==null?void 0:w.size)||void 0,E=(C==null?void 0:C.variant)==="filled"?"contrast":c||"default",D=hi({name:"Pill",classes:Ode,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:QTn,stylesCtx:{size:N}});return ne.jsxs(mn,{component:"span",ref:e,variant:E,size:N,...D("root",{variant:E}),mod:[{"with-remove":d&&!g,disabled:g||(w==null?void 0:w.disabled)},y],..._,children:[ne.jsx("span",{...D("label"),children:u}),d&&ne.jsx(Gk,{variant:"transparent",radius:m,tabIndex:-1,"aria-hidden":!0,unstyled:a,...f,...D("remove",{className:f==null?void 0:f.className,style:f==null?void 0:f.style}),onMouseDown:k=>{var M;k.preventDefault(),k.stopPropagation(),(M=f==null?void 0:f.onMouseDown)==null||M.call(f,k)},onClick:k=>{var M;k.stopPropagation(),h==null||h(),(M=f==null?void 0:f.onClick)==null||M.call(f,k)}})]})});Iz.classes=Ode;Iz.displayName="@mantine/core/Pill";Iz.Group=aFe;var QNt={field:"m_45c4369d"};const JTn={type:"visible"},lFe=Dn((t,e)=>{const n=Kt("PillsInputField",JTn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,type:c,disabled:u,id:d,pointer:h,mod:f,...m}=n,p=sFe(),g=GF(),y=hi({name:"PillsInputField",classes:QNt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,rootSelector:"field"}),_=u||(p==null?void 0:p.disabled);return ne.jsx(mn,{component:"input",ref:Bc(e,p==null?void 0:p.fieldRef),"data-type":c,disabled:_,mod:[{disabled:_,pointer:h},f],...y("field"),...m,id:(g==null?void 0:g.inputId)||d,"aria-invalid":p==null?void 0:p.hasError,"aria-describedby":g==null?void 0:g.describedBy,type:"text",onMouseDown:w=>!h&&w.stopPropagation()})});lFe.classes=QNt;lFe.displayName="@mantine/core/PillsInputField";const eIn={},Ane=Dn((t,e)=>{const n=Kt("PillsInput",eIn,t),{children:i,onMouseDown:r,onClick:o,size:s,disabled:a,__staticSelector:l,error:c,variant:u,...d}=n,h=b.useRef();return ne.jsx(KTn,{value:{fieldRef:h,size:s,disabled:a,hasError:!!c,variant:u},children:ne.jsx(Qp,{size:s,error:c,variant:u,component:"div",ref:e,onMouseDown:f=>{var m;f.preventDefault(),r==null||r(f),(m=h.current)==null||m.focus()},onClick:f=>{var m;f.preventDefault(),o==null||o(f),(m=h.current)==null||m.focus()},...d,multiline:!0,disabled:a,__staticSelector:l||"PillsInput",withAria:!1,children:i})})});Ane.displayName="@mantine/core/PillsInput";Ane.Field=lFe;function tIn({data:t,value:e}){const n=e.map(r=>r.trim().toLowerCase());return t.reduce((r,o)=>(Oj(o)?r.push({group:o.group,items:o.items.filter(s=>n.indexOf(s.value.toLowerCase().trim())===-1)}):n.indexOf(o.value.toLowerCase().trim())===-1&&r.push(o),r),[])}const nIn={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:","},PA=Dn((t,e)=>{const n=Kt("MultiSelect",nIn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,size:c,value:u,defaultValue:d,onChange:h,onKeyDown:f,variant:m,data:p,dropdownOpened:g,defaultDropdownOpened:y,onDropdownOpen:_,onDropdownClose:w,selectFirstOptionOnChange:C,onOptionSubmit:N,comboboxProps:E,filter:D,limit:k,withScrollArea:M,maxDropdownHeight:T,searchValue:A,defaultSearchValue:R,onSearchChange:P,readOnly:O,disabled:V,onFocus:F,onBlur:$,onPaste:B,radius:z,rightSection:H,rightSectionWidth:K,rightSectionPointerEvents:q,rightSectionProps:U,leftSection:Y,leftSectionWidth:J,leftSectionPointerEvents:ae,leftSectionProps:se,inputContainer:oe,inputWrapperOrder:fe,withAsterisk:de,labelProps:ie,descriptionProps:Q,errorProps:be,wrapperProps:le,description:Ne,label:Le,error:Te,maxValues:De,searchable:Pe,nothingFoundMessage:ge,withCheckIcon:he,checkIconPosition:me,hidePickedOptions:X,withErrorStyles:re,name:we,form:ue,id:Ce,clearable:ze,clearButtonProps:Ye,hiddenInputProps:Ke,placeholder:Xe,hiddenInputValuesDivider:it,required:ut,mod:Ge,renderOption:Ee,onRemove:Se,onClear:je,scrollAreaProps:nt,...rt}=n,St=jm(Ce),At=yNt(p),Nt=D5e(At),vt=F5e({opened:g,defaultOpened:y,onDropdownOpen:_,onDropdownClose:()=>{w==null||w(),vt.resetSelectedOption()}}),{styleProps:$t,rest:{type:ln,autoComplete:Jt,...en}}=WF(rt),[Ft,dn]=au({value:u,defaultValue:d,finalValue:[],onChange:h}),[Ze,dt]=au({value:A,defaultValue:R,finalValue:"",onChange:P}),at=hi({name:"MultiSelect",classes:{},props:n,classNames:i,styles:s,unstyled:a}),{resolvedClassNames:mt,resolvedStyles:It}=zv({props:n,styles:s,classNames:i}),Ve=We=>{f==null||f(We),We.key===" "&&!Pe&&(We.preventDefault(),vt.toggleDropdown()),We.key==="Backspace"&&Ze.length===0&&Ft.length>0&&(Se==null||Se(Ft[Ft.length-1]),dn(Ft.slice(0,Ft.length-1)))},bt=Ft.map((We,tt)=>{var _t,ht;return ne.jsx(Iz,{withRemoveButton:!O&&!((_t=Nt[We])!=null&&_t.disabled),onRemove:()=>{dn(Ft.filter(qe=>We!==qe)),Se==null||Se(We)},unstyled:a,disabled:V,...at("pill"),children:((ht=Nt[We])==null?void 0:ht.label)||We},`${We}-${tt}`)});b.useEffect(()=>{C&&vt.selectFirstOption()},[C,Ft]);const wt=ze&&Ft.length>0&&!V&&!O&&ne.jsx(Cs.ClearButton,{size:c,...Ye,onClear:()=>{je==null||je(),dn([]),dt("")}}),$e=tIn({data:At,value:Ft});return ne.jsxs(ne.Fragment,{children:[ne.jsxs(Cs,{store:vt,classNames:mt,styles:It,unstyled:a,size:c,readOnly:O,__staticSelector:"MultiSelect",onOptionSubmit:We=>{N==null||N(We),dt(""),vt.updateSelectedOptionIndex("selected"),Ft.includes(Nt[We].value)?(dn(Ft.filter(tt=>tt!==Nt[We].value)),Se==null||Se(Nt[We].value)):Ft.length<De&&dn([...Ft,Nt[We].value])},...E,children:[ne.jsx(Cs.DropdownTarget,{children:ne.jsx(Ane,{...$t,__staticSelector:"MultiSelect",classNames:mt,styles:It,unstyled:a,size:c,className:r,style:o,variant:m,disabled:V,radius:z,rightSection:H||wt||ne.jsx(Cs.Chevron,{size:c,error:Te,unstyled:a}),rightSectionPointerEvents:q||(wt?"all":"none"),rightSectionWidth:K,rightSectionProps:U,leftSection:Y,leftSectionWidth:J,leftSectionPointerEvents:ae,leftSectionProps:se,inputContainer:oe,inputWrapperOrder:fe,withAsterisk:de,labelProps:ie,descriptionProps:Q,errorProps:be,wrapperProps:le,description:Ne,label:Le,error:Te,multiline:!0,withErrorStyles:re,__stylesApiProps:{...n,rightSectionPointerEvents:q||(wt?"all":"none"),multiline:!0},pointer:!Pe,onClick:()=>Pe?vt.openDropdown():vt.toggleDropdown(),"data-expanded":vt.dropdownOpened||void 0,id:St,required:ut,mod:Ge,children:ne.jsxs(Iz.Group,{disabled:V,unstyled:a,...at("pillsList"),children:[bt,ne.jsx(Cs.EventsTarget,{autoComplete:Jt,children:ne.jsx(Ane.Field,{...en,ref:e,id:St,placeholder:Xe,type:!Pe&&!Xe?"hidden":"visible",...at("inputField"),unstyled:a,onFocus:We=>{F==null||F(We),Pe&&vt.openDropdown()},onBlur:We=>{$==null||$(We),vt.closeDropdown(),dt("")},onKeyDown:Ve,value:Ze,onChange:We=>{dt(We.currentTarget.value),Pe&&vt.openDropdown(),C&&vt.selectFirstOption()},disabled:V,readOnly:O||!Pe,pointer:!Pe})})]})})}),ne.jsx(LNt,{data:X?$e:At,hidden:O||V,filter:D,search:Ze,limit:k,hiddenWhenEmpty:!ge,withScrollArea:M,maxDropdownHeight:T,filterOptions:Pe,value:Ft,checkIconPosition:me,withCheckIcon:he,nothingFoundMessage:ge,unstyled:a,labelId:Le?`${St}-label`:void 0,"aria-label":Le?void 0:rt["aria-label"],renderOption:Ee,scrollAreaProps:nt})]}),ne.jsx(Cs.HiddenInput,{name:we,valuesDivider:it,value:Ft,form:ue,disabled:V,...Ke})]})});PA.classes={...Qp.classes,...Cs.classes};PA.displayName="@mantine/core/MultiSelect";var JNt={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const iIn={withCloseButton:!0},rIn=(t,{radius:e,color:n})=>({root:{"--notification-radius":e===void 0?void 0:Va(e),"--notification-color":n?Xa(n,t):void 0}}),cFe=Dn((t,e)=>{const n=Kt("Notification",iIn,t),{className:i,color:r,radius:o,loading:s,withCloseButton:a,withBorder:l,title:c,icon:u,children:d,onClose:h,closeButtonProps:f,classNames:m,style:p,styles:g,unstyled:y,variant:_,vars:w,mod:C,...N}=n,E=hi({name:"Notification",classes:JNt,props:n,className:i,style:p,classNames:m,styles:g,unstyled:y,vars:w,varsResolver:rIn});return ne.jsxs(mn,{...E("root"),mod:[{"data-with-icon":!!u||s,"data-with-border":l},C],ref:e,variant:_,...N,role:"alert",children:[u&&!s&&ne.jsx("div",{...E("icon"),children:u}),s&&ne.jsx($p,{size:28,color:r,...E("loader")}),ne.jsxs("div",{...E("body"),children:[c&&ne.jsx("div",{...E("title"),children:c}),ne.jsx(mn,{...E("description"),mod:{"data-with-title":!!c},children:d})]}),a&&ne.jsx(Gk,{iconSize:16,color:"gray",...f,unstyled:y,onClick:h,...E("closeButton")})]})});cFe.classes=JNt;cFe.displayName="@mantine/core/Notification";function eEt(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}var Az;(function(t){t.event="event",t.props="prop"})(Az||(Az={}));function _E(){}function oIn(t){var e,n=void 0;return function(){for(var i=[],r=arguments.length;r--;)i[r]=arguments[r];return e&&i.length===e.length&&i.every(function(o,s){return o===e[s]})||(e=i,n=t.apply(void 0,i)),n}}function Rz(t){return!!(t||"").match(/\d/)}function a3(t){return t==null}function sIn(t){return typeof t=="number"&&isNaN(t)}function tEt(t){return a3(t)||sIn(t)||typeof t=="number"&&!isFinite(t)}function nEt(t){return t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function aIn(t){switch(t){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function lIn(t,e,n){var i=aIn(n),r=t.search(/[1-9]/);return r=r===-1?t.length:r,t.substring(0,r)+t.substring(r,t.length).replace(i,"$1"+e)}function cIn(t){var e=b.useRef(t);e.current=t;var n=b.useRef(function(){for(var i=[],r=arguments.length;r--;)i[r]=arguments[r];return e.current.apply(e,i)});return n.current}function uFe(t,e){e===void 0&&(e=!0);var n=t[0]==="-",i=n&&e;t=t.replace("-","");var r=t.split("."),o=r[0],s=r[1]||"";return{beforeDecimal:o,afterDecimal:s,hasNegation:n,addNegation:i}}function uIn(t){if(!t)return t;var e=t[0]==="-";e&&(t=t.substring(1,t.length));var n=t.split("."),i=n[0].replace(/^0+/,"")||"0",r=n[1]||"";return(e?"-":"")+i+(r?"."+r:"")}function iEt(t,e,n){for(var i="",r=n?"0":"",o=0;o<=e-1;o++)i+=t[o]||r;return i}function ret(t,e){return Array(e+1).join(t)}function rEt(t){var e=t+"",n=e[0]==="-"?"-":"";n&&(e=e.substring(1));var i=e.split(/[eE]/g),r=i[0],o=i[1];if(o=Number(o),!o)return n+r;r=r.replace(".","");var s=1+o,a=r.length;return s<0?r="0."+ret("0",Math.abs(s))+r:s>=a?r=r+ret("0",s-a):r=(r.substring(0,s)||"0")+"."+r.substring(s),n+r}function oet(t,e,n){if(["","-"].indexOf(t)!==-1)return t;var i=(t.indexOf(".")!==-1||n)&&e,r=uFe(t),o=r.beforeDecimal,s=r.afterDecimal,a=r.hasNegation,l=parseFloat("0."+(s||"0")),c=s.length<=e?"0."+s:l.toFixed(e),u=c.split("."),d=o;o&&Number(u[0])&&(d=o.split("").reverse().reduce(function(p,g,y){return p.length>y?(Number(p[0])+Number(g)).toString()+p.substring(1,p.length):g+p},u[0]));var h=iEt(u[1]||"",e,n),f=a?"-":"",m=i?".":"";return""+f+d+m+h}function eT(t,e){if(t.value=t.value,t!==null){if(t.createTextRange){var n=t.createTextRange();return n.move("character",e),n.select(),!0}return t.selectionStart||t.selectionStart===0?(t.focus(),t.setSelectionRange(e,e),!0):(t.focus(),!1)}}var oEt=oIn(function(t,e){for(var n=0,i=0,r=t.length,o=e.length;t[n]===e[n]&&n<r;)n++;for(;t[r-1-i]===e[o-1-i]&&o-i>n&&r-i>n;)i++;return{from:{start:n,end:r-i},to:{start:n,end:o-i}}}),dIn=function(t,e){var n=Math.min(t.selectionStart,e);return{from:{start:n,end:t.selectionEnd},to:{start:n,end:e}}};function hIn(t,e,n){return Math.min(Math.max(t,e),n)}function z_e(t){return Math.max(t.selectionStart,t.selectionEnd)}function fIn(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function mIn(t){return{from:{start:0,end:0},to:{start:0,end:t.length},lastValue:""}}function pIn(t){var e=t.currentValue,n=t.formattedValue,i=t.currentValueIndex,r=t.formattedValueIndex;return e[i]===n[r]}function gIn(t,e,n,i,r,o,s){s===void 0&&(s=pIn);var a=r.findIndex(function(C){return C}),l=t.slice(0,a);!e&&!n.startsWith(l)&&(e=l,n=l+n,i=i+l.length);for(var c=n.length,u=t.length,d={},h=new Array(c),f=0;f<c;f++){h[f]=-1;for(var m=0,p=u;m<p;m++){var g=s({currentValue:n,lastValue:e,formattedValue:t,currentValueIndex:f,formattedValueIndex:m});if(g&&d[m]!==!0){h[f]=m,d[m]=!0;break}}}for(var y=i;y<c&&(h[y]===-1||!o(n[y]));)y++;var _=y===c||h[y]===-1?u:h[y];for(y=i-1;y>0&&h[y]===-1;)y--;var w=y===-1||h[y]===-1?0:h[y]+1;return w>_?_:i-w<_-i?w:_}function set(t,e,n,i){var r=t.length;if(e=hIn(e,0,r),i==="left"){for(;e>=0&&!n[e];)e--;e===-1&&(e=n.indexOf(!0))}else{for(;e<=r&&!n[e];)e++;e>r&&(e=n.lastIndexOf(!0))}return e===-1&&(e=r),e}function bIn(t){for(var e=Array.from({length:t.length+1}).map(function(){return!0}),n=0,i=e.length;n<i;n++)e[n]=!!(Rz(t[n])||Rz(t[n-1]));return e}function sEt(t,e,n,i,r,o){o===void 0&&(o=_E);var s=cIn(function(m,p){var g,y;return tEt(m)?(y="",g=""):typeof m=="number"||p?(y=typeof m=="number"?rEt(m):m,g=i(y)):(y=r(m,void 0),g=i(y)),{formattedValue:g,numAsString:y}}),a=b.useState(function(){return s(a3(t)?e:t,n)}),l=a[0],c=a[1],u=function(m,p){m.formattedValue!==l.formattedValue&&c({formattedValue:m.formattedValue,numAsString:m.value}),o(m,p)},d=t,h=n;a3(t)&&(d=l.numAsString,h=!0);var f=s(d,h);return b.useMemo(function(){c(f)},[f.formattedValue]),[l,u]}function vIn(t){return t.replace(/[^0-9]/g,"")}function yIn(t){return t}function _In(t){var e=t.type;e===void 0&&(e="text");var n=t.displayType;n===void 0&&(n="input");var i=t.customInput,r=t.renderText,o=t.getInputRef,s=t.format;s===void 0&&(s=yIn);var a=t.removeFormatting;a===void 0&&(a=vIn);var l=t.defaultValue,c=t.valueIsNumericString,u=t.onValueChange,d=t.isAllowed,h=t.onChange;h===void 0&&(h=_E);var f=t.onKeyDown;f===void 0&&(f=_E);var m=t.onMouseUp;m===void 0&&(m=_E);var p=t.onFocus;p===void 0&&(p=_E);var g=t.onBlur;g===void 0&&(g=_E);var y=t.value,_=t.getCaretBoundary;_===void 0&&(_=bIn);var w=t.isValidInputCharacter;w===void 0&&(w=Rz);var C=t.isCharacterSame,N=eEt(t,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),E=sEt(y,l,!!c,s,a,u),D=E[0],k=D.formattedValue,M=D.numAsString,T=E[1],A=b.useRef(),R=b.useRef({formattedValue:k,numAsString:M}),P=function(Te,De){R.current={formattedValue:Te.formattedValue,numAsString:Te.value},T(Te,De)},O=b.useState(!1),V=O[0],F=O[1],$=b.useRef(null),B=b.useRef({setCaretTimeout:null,focusTimeout:null});b.useEffect(function(){return F(!0),function(){clearTimeout(B.current.setCaretTimeout),clearTimeout(B.current.focusTimeout)}},[]);var z=s,H=function(Te,De){var Pe=parseFloat(De);return{formattedValue:Te,value:De,floatValue:isNaN(Pe)?void 0:Pe}},K=function(Te,De,Pe){Te.selectionStart===0&&Te.selectionEnd===Te.value.length||(eT(Te,De),B.current.setCaretTimeout=setTimeout(function(){Te.value===Pe&&Te.selectionStart!==De&&eT(Te,De)},0))},q=function(Te,De,Pe){return set(Te,De,_(Te),Pe)},U=function(Te,De,Pe){var ge=_(De),he=gIn(De,k,Te,Pe,ge,w,C);return he=set(De,he,ge),he},Y=function(Te){var De=Te.formattedValue;De===void 0&&(De="");var Pe=Te.input,ge=Te.source,he=Te.event,me=Te.numAsString,X;if(Pe){var re=Te.inputValue||Pe.value,we=z_e(Pe);Pe.value=De,X=U(re,De,we),X!==void 0&&K(Pe,X,De)}De!==k&&P(H(De,me),{event:he,source:ge})};b.useEffect(function(){var Te=R.current,De=Te.formattedValue,Pe=Te.numAsString;(k!==De||M!==Pe)&&P(H(k,M),{event:void 0,source:Az.props})},[k,M]);var J=$.current?z_e($.current):void 0,ae=typeof window<"u"?b.useLayoutEffect:b.useEffect;ae(function(){var Te=$.current;if(k!==R.current.formattedValue&&Te){var De=U(R.current.formattedValue,k,J);Te.value=k,K(Te,De,k)}},[k]);var se=function(Te,De,Pe){var ge=De.target,he=A.current?dIn(A.current,ge.selectionEnd):oEt(k,Te),me=Object.assign(Object.assign({},he),{lastValue:k}),X=a(Te,me),re=z(X);if(X=a(re,void 0),d&&!d(H(re,X))){var we=De.target,ue=z_e(we),Ce=U(Te,k,ue);return we.value=k,K(we,Ce,k),!1}return Y({formattedValue:re,numAsString:X,inputValue:Te,event:De,source:Pe,input:De.target}),!0},oe=function(Te,De){De===void 0&&(De=0);var Pe=Te.selectionStart,ge=Te.selectionEnd;A.current={selectionStart:Pe,selectionEnd:ge+De}},fe=function(Te){var De=Te.target,Pe=De.value,ge=se(Pe,Te,Az.event);ge&&h(Te),A.current=void 0},de=function(Te){var De=Te.target,Pe=Te.key,ge=De.selectionStart,he=De.selectionEnd,me=De.value;me===void 0&&(me="");var X;Pe==="ArrowLeft"||Pe==="Backspace"?X=Math.max(ge-1,0):Pe==="ArrowRight"?X=Math.min(ge+1,me.length):Pe==="Delete"&&(X=ge);var re=0;Pe==="Delete"&&ge===he&&(re=1);var we=Pe==="ArrowLeft"||Pe==="ArrowRight";if(X===void 0||ge!==he&&!we){f(Te),oe(De,re);return}var ue=X;if(we){var Ce=Pe==="ArrowLeft"?"left":"right";ue=q(me,X,Ce),ue!==X&&Te.preventDefault()}else Pe==="Delete"&&!w(me[X])?ue=q(me,X,"right"):Pe==="Backspace"&&!w(me[X])&&(ue=q(me,X,"left"));ue!==X&&K(De,ue,me),f(Te),oe(De,re)},ie=function(Te){var De=Te.target,Pe=function(){var ge=De.selectionStart,he=De.selectionEnd,me=De.value;if(me===void 0&&(me=""),ge===he){var X=q(me,ge);X!==ge&&K(De,X,me)}};Pe(),requestAnimationFrame(function(){Pe()}),m(Te),oe(De)},Q=function(Te){Te.persist&&Te.persist();var De=Te.target,Pe=Te.currentTarget;$.current=De,B.current.focusTimeout=setTimeout(function(){var ge=De.selectionStart,he=De.selectionEnd,me=De.value;me===void 0&&(me="");var X=q(me,ge);X!==ge&&!(ge===0&&he===me.length)&&K(De,X,me),p(Object.assign(Object.assign({},Te),{currentTarget:Pe}))},0)},be=function(Te){$.current=null,clearTimeout(B.current.focusTimeout),clearTimeout(B.current.setCaretTimeout),g(Te)},le=V&&fIn()?"numeric":void 0,Ne=Object.assign({inputMode:le},N,{type:e,value:k,onChange:fe,onKeyDown:de,onMouseUp:ie,onFocus:Q,onBlur:be});if(n==="text")return r?Z.createElement(Z.Fragment,null,r(k,N)||null):Z.createElement("span",Object.assign({},N,{ref:o}),k);if(i){var Le=i;return Z.createElement(Le,Object.assign({},Ne,{ref:o}))}return Z.createElement("input",Object.assign({},Ne,{ref:o}))}function aet(t,e){var n=e.decimalScale,i=e.fixedDecimalScale,r=e.prefix;r===void 0&&(r="");var o=e.suffix;o===void 0&&(o="");var s=e.allowNegative,a=e.thousandsGroupStyle;if(a===void 0&&(a="thousand"),t===""||t==="-")return t;var l=jde(e),c=l.thousandSeparator,u=l.decimalSeparator,d=n!==0&&t.indexOf(".")!==-1||n&&i,h=uFe(t,s),f=h.beforeDecimal,m=h.afterDecimal,p=h.addNegation;return n!==void 0&&(m=iEt(m,n,!!i)),c&&(f=lIn(f,c,a)),r&&(f=r+f),o&&(m=m+o),p&&(f="-"+f),t=f+(d&&u||"")+m,t}function jde(t){var e=t.decimalSeparator;e===void 0&&(e=".");var n=t.thousandSeparator,i=t.allowedDecimalSeparators;return n===!0&&(n=","),i||(i=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:i}}function xIn(t,e){t===void 0&&(t="");var n=new RegExp("(-)"),i=new RegExp("(-)(.)*(-)"),r=n.test(t),o=i.test(t);return t=t.replace(/-/g,""),r&&!o&&e&&(t="-"+t),t}function wIn(t,e){return new RegExp("(^-)|[0-9]|"+nEt(t),"g")}function CIn(t,e,n){return t===""?!0:!(e!=null&&e.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof t=="string"&&!isNaN(Number(t))}function SIn(t,e,n){var i;e===void 0&&(e=mIn(t));var r=n.allowNegative,o=n.prefix;o===void 0&&(o="");var s=n.suffix;s===void 0&&(s="");var a=n.decimalScale,l=e.from,c=e.to,u=c.start,d=c.end,h=jde(n),f=h.allowedDecimalSeparators,m=h.decimalSeparator,p=t[d]===m;if(Rz(t)&&(t===o||t===s)&&e.lastValue==="")return t;if(d-u===1&&f.indexOf(t[u])!==-1){var g=a===0?"":m;t=t.substring(0,u)+g+t.substring(u+1,t.length)}var y=function($,B,z){var H=!1,K=!1;o.startsWith("-")?H=!1:$.startsWith("--")?(H=!1,K=!0):s.startsWith("-")&&$.length===s.length?H=!1:$[0]==="-"&&(H=!0);var q=H?1:0;return K&&(q=2),q&&($=$.substring(q),B-=q,z-=q),{value:$,start:B,end:z,hasNegation:H}},_=y(t,u,d),w=_.hasNegation;i=_,t=i.value,u=i.start,d=i.end;var C=y(e.lastValue,l.start,l.end),N=C.start,E=C.end,D=C.value,k=t.substring(u,d);t.length&&D.length&&(N>D.length-s.length||E<o.length)&&!(k&&s.startsWith(k))&&(t=D);var M=0;t.startsWith(o)?M+=o.length:u<o.length&&(M=u),t=t.substring(M),d-=M;var T=t.length,A=t.length-s.length;t.endsWith(s)?T=A:(d>A||d>t.length-s.length)&&(T=d),t=t.substring(0,T),t=xIn(w?"-"+t:t,r),t=(t.match(wIn(m))||[]).join("");var R=t.indexOf(m);t=t.replace(new RegExp(nEt(m),"g"),function($,B){return B===R?".":""});var P=uFe(t,r),O=P.beforeDecimal,V=P.afterDecimal,F=P.addNegation;return c.end-c.start<l.end-l.start&&O===""&&p&&!parseFloat(V)&&(t=F?"-":""),t}function NIn(t,e){var n=e.prefix;n===void 0&&(n="");var i=e.suffix;i===void 0&&(i="");var r=Array.from({length:t.length+1}).map(function(){return!0}),o=t[0]==="-";r.fill(!1,0,n.length+(o?1:0));var s=t.length;return r.fill(!1,s-i.length+1,s+1),r}function EIn(t){var e=jde(t),n=e.thousandSeparator,i=e.decimalSeparator,r=t.prefix;r===void 0&&(r="");var o=t.allowNegative;if(o===void 0&&(o=!0),n===i)throw new Error(`
        Decimal separator can't be same as thousand separator.
        thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
        decimalSeparator: `+i+` (default value for decimalSeparator is .)
     `);return r.startsWith("-")&&o&&(console.error(`
      Prefix can't start with '-' when allowNegative is true.
      prefix: `+r+`
      allowNegative: `+o+`
    `),o=!1),Object.assign(Object.assign({},t),{allowNegative:o})}function DIn(t){t=EIn(t),t.decimalSeparator,t.allowedDecimalSeparators,t.thousandsGroupStyle;var e=t.suffix,n=t.allowNegative,i=t.allowLeadingZeros,r=t.onKeyDown;r===void 0&&(r=_E);var o=t.onBlur;o===void 0&&(o=_E);var s=t.thousandSeparator,a=t.decimalScale,l=t.fixedDecimalScale,c=t.prefix;c===void 0&&(c="");var u=t.defaultValue,d=t.value,h=t.valueIsNumericString,f=t.onValueChange,m=eEt(t,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),p=jde(t),g=p.decimalSeparator,y=p.allowedDecimalSeparators,_=function(F){return aet(F,t)},w=function(F,$){return SIn(F,$,t)},C=a3(d)?u:d,N=h??CIn(C,c,e);a3(d)?a3(u)||(N=N||typeof u=="number"):N=N||typeof d=="number";var E=function(F){return tEt(F)?F:(typeof F=="number"&&(F=rEt(F)),N&&typeof a=="number"?oet(F,a,!!l):F)},D=sEt(E(d),E(u),!!N,_,w,f),k=D[0],M=k.numAsString,T=k.formattedValue,A=D[1],R=function(F){var $=F.target,B=F.key,z=$.selectionStart,H=$.selectionEnd,K=$.value;if(K===void 0&&(K=""),(B==="Backspace"||B==="Delete")&&H<c.length){F.preventDefault();return}if(z!==H){r(F);return}B==="Backspace"&&K[0]==="-"&&z===c.length+1&&n&&eT($,1),a&&l&&(B==="Backspace"&&K[z-1]===g?(eT($,z-1),F.preventDefault()):B==="Delete"&&K[z]===g&&F.preventDefault()),y!=null&&y.includes(B)&&K[z]===g&&eT($,z+1);var q=s===!0?",":s;B==="Backspace"&&K[z-1]===q&&eT($,z-1),B==="Delete"&&K[z]===q&&eT($,z+1),r(F)},P=function(F){var $=M;if($.match(/\d/g)||($=""),i||($=uIn($)),l&&a&&($=oet($,a,l)),$!==M){var B=aet($,t);A({formattedValue:B,value:$,floatValue:parseFloat($)},{event:F,source:Az.event})}o(F)},O=function(F){return F===g?!0:Rz(F)},V=function(F){var $=F.currentValue,B=F.lastValue,z=F.formattedValue,H=F.currentValueIndex,K=F.formattedValueIndex,q=$[H],U=z[K],Y=oEt(B,$),J=Y.to,ae=function(se){return w(se).indexOf(".")+c.length};return d===0&&l&&a&&$[J.start]===g&&ae($)<H&&ae(z)>K?!1:H>=J.start&&H<J.end&&y&&y.includes(q)&&U===g?!0:q===U};return Object.assign(Object.assign({},m),{value:T,valueIsNumericString:!1,isValidInputCharacter:O,isCharacterSame:V,onValueChange:A,format:_,removeFormatting:w,getCaretBoundary:function(F){return NIn(F,t)},onKeyDown:R,onBlur:P})}function kIn(t){var e=DIn(t);return Z.createElement(_In,Object.assign({},e))}function cet({direction:t,style:e,...n}){return ne.jsx("svg",{style:{width:"var(--ni-chevron-size)",height:"var(--ni-chevron-size)",transform:t==="up"?"rotate(180deg)":void 0,...e},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:ne.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}var GEe={root:"m_e2f5cd4e",controls:"m_95e17d22",control:"m_80b4b171"};const MIn=/^(0\.0*|-0(\.0*)?)$/,LIn=/^-?0\d+(\.\d+)?\.?$/;function TIn(t){return(typeof t=="number"?t<Number.MAX_SAFE_INTEGER:!Number.isNaN(Number(t)))&&!Number.isNaN(t)}function uet(t,e,n){if(t===void 0)return!0;const i=e===void 0||t>=e,r=n===void 0||t<=n;return i&&r}const IIn={step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0},AIn=(t,{size:e})=>({controls:{"--ni-chevron-size":Hr(e,"ni-chevron-size")}}),Fde=Dn((t,e)=>{const n=Kt("NumberInput",IIn,t),{className:i,classNames:r,styles:o,unstyled:s,vars:a,onChange:l,onValueChange:c,value:u,defaultValue:d,max:h,min:f,step:m,hideControls:p,rightSection:g,isAllowed:y,clampBehavior:_,onBlur:w,allowDecimal:C,decimalScale:N,onKeyDown:E,onKeyDownCapture:D,handlersRef:k,startValue:M,disabled:T,rightSectionPointerEvents:A,allowNegative:R,readOnly:P,size:O,rightSectionWidth:V,stepHoldInterval:F,stepHoldDelay:$,allowLeadingZeros:B,withKeyboardEvents:z,trimLeadingZeroesOnBlur:H,...K}=n,q=hi({name:"NumberInput",classes:GEe,props:n,classNames:r,styles:o,unstyled:s,vars:a,varsResolver:AIn}),{resolvedClassNames:U,resolvedStyles:Y}=zv({classNames:r,styles:o,props:n}),[J,ae]=au({value:u,defaultValue:d,onChange:l}),se=$!==void 0&&F!==void 0,oe=b.useRef(null),fe=b.useRef(null),de=b.useRef(0),ie=(X,re)=>{re.source==="event"&&ae(TIn(X.floatValue)&&!MIn.test(X.value)&&!(B&&LIn.test(X.value))?X.floatValue:X.value),c==null||c(X,re)},Q=X=>{const re=String(X).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return re?Math.max(0,(re[1]?re[1].length:0)-(re[2]?+re[2]:0)):0},be=X=>{oe.current&&typeof X<"u"&&oe.current.setSelectionRange(X,X)},le=b.useRef();le.current=()=>{let X;const re=Q(J),we=Q(m),ue=Math.max(re,we),Ce=10**ue;if(typeof J!="number"||Number.isNaN(J))X=av(M,f,h);else if(h!==void 0){const Ye=(Math.round(J*Ce)+Math.round(m*Ce))/Ce;X=Ye<=h?Ye:h}else X=(Math.round(J*Ce)+Math.round(m*Ce))/Ce;const ze=X.toFixed(ue);ae(parseFloat(ze)),c==null||c({floatValue:parseFloat(ze),formattedValue:ze,value:ze},{source:"increment"}),setTimeout(()=>{var Ye;return be((Ye=oe.current)==null?void 0:Ye.value.length)},0)};const Ne=b.useRef();Ne.current=()=>{let X;const re=f!==void 0?f:R?Number.MIN_SAFE_INTEGER:0,we=Q(J),ue=Q(m),Ce=Math.max(we,ue),ze=10**Ce;if(typeof J!="number"||Number.isNaN(J))X=av(M,re,h);else{const Ke=(Math.round(J*ze)-Math.round(m*ze))/ze;X=re!==void 0&&Ke<re?re:Ke}const Ye=X.toFixed(Ce);ae(parseFloat(Ye)),c==null||c({floatValue:parseFloat(Ye),formattedValue:Ye,value:Ye},{source:"decrement"}),setTimeout(()=>{var Ke;return be((Ke=oe.current)==null?void 0:Ke.value.length)},0)};const Le=X=>{E==null||E(X),!(P||!z)&&(X.key==="ArrowUp"&&(X.preventDefault(),le.current()),X.key==="ArrowDown"&&(X.preventDefault(),Ne.current()))},Te=X=>{if(D==null||D(X),X.key==="Backspace"){const re=oe.current;re.selectionStart===0&&re.selectionStart===re.selectionEnd&&(X.preventDefault(),window.setTimeout(()=>be(0),0))}};SK(k,{increment:le.current,decrement:Ne.current});const De=X=>{X?le.current():Ne.current(),de.current+=1},Pe=X=>{if(De(X),se){const re=typeof F=="number"?F:F(de.current);fe.current=window.setTimeout(()=>Pe(X),re)}},ge=(X,re)=>{var we;X.preventDefault(),(we=oe.current)==null||we.focus(),De(re),se&&(fe.current=window.setTimeout(()=>Pe(re),$))},he=()=>{fe.current&&window.clearTimeout(fe.current),fe.current=null,de.current=0},me=ne.jsxs("div",{...q("controls"),children:[ne.jsx(Lh,{...q("control"),tabIndex:-1,"aria-hidden":!0,disabled:T||typeof J=="number"&&h!==void 0&&J>=h,mod:{direction:"up"},onMouseDown:X=>X.preventDefault(),onPointerDown:X=>{ge(X,!0)},onPointerUp:he,onPointerLeave:he,children:ne.jsx(cet,{direction:"up"})}),ne.jsx(Lh,{...q("control"),tabIndex:-1,"aria-hidden":!0,disabled:T||typeof J=="number"&&f!==void 0&&J<=f,mod:{direction:"down"},onMouseDown:X=>X.preventDefault(),onPointerDown:X=>{ge(X,!1)},onPointerUp:he,onPointerLeave:he,children:ne.jsx(cet,{direction:"down"})})]});return ne.jsx(Qp,{component:kIn,allowNegative:R,className:Vt(GEe.root,i),size:O,...K,readOnly:P,disabled:T,value:J,getInputRef:Bc(e,oe),onValueChange:ie,rightSection:p||P?g:g||me,classNames:U,styles:Y,unstyled:s,__staticSelector:"NumberInput",decimalScale:C?N:0,onKeyDown:Le,onKeyDownCapture:Te,rightSectionPointerEvents:A??(T?"none":void 0),rightSectionWidth:V??`var(--ni-right-section-width-${O||"sm"})`,allowLeadingZeros:B,onBlur:X=>{if(w==null||w(X),_==="blur"&&typeof J=="number"&&av(J,f,h)!==J&&ae(av(J,f,h)),H&&typeof J=="string"){const re=J.replace(/^0+/,""),we=parseFloat(re);ae(Number.isNaN(we)||we>Number.MAX_SAFE_INTEGER?re:we)}},isAllowed:X=>_==="strict"?y?y(X)&&uet(X.floatValue,f,h):uet(X.floatValue,f,h):y?y(X):!0})});Fde.classes={...Qp.classes,...GEe};Fde.displayName="@mantine/core/NumberInput";const[RIn,$de]=Uh("Pagination.Root component was not found in tree");var MK={root:"m_4addd315",control:"m_326d024a",dots:"m_4ad7767d"};const PIn={withPadding:!0},LK=Dn((t,e)=>{const n=Kt("PaginationControl",PIn,t),{classNames:i,className:r,style:o,styles:s,vars:a,active:l,disabled:c,withPadding:u,mod:d,...h}=n,f=$de(),m=c||f.disabled;return ne.jsx(Lh,{ref:e,disabled:m,mod:[{active:l,disabled:m,"with-padding":u},d],...f.getStyles("control",{className:r,style:o,classNames:i,styles:s,active:!m}),...h})});LK.classes=MK;LK.displayName="@mantine/core/PaginationControl";function TK({style:t,children:e,path:n,...i}){return ne.jsx("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)",...t},...i,children:ne.jsx("path",{d:n,fill:"currentColor"})})}const OIn=t=>ne.jsx(TK,{...t,path:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z"}),jIn=t=>ne.jsx(TK,{...t,path:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z"}),FIn=t=>ne.jsx(TK,{...t,path:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z"}),$In=t=>ne.jsx(TK,{...t,path:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z"}),VIn=t=>ne.jsx(TK,{...t,path:"M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z"}),BIn={icon:VIn},Vde=Dn((t,e)=>{const n=Kt("PaginationDots",BIn,t),{classNames:i,className:r,style:o,styles:s,vars:a,icon:l,...c}=n,u=$de(),d=l;return ne.jsx(mn,{ref:e,...u.getStyles("dots",{className:r,style:o,styles:s,classNames:i}),...c,children:ne.jsx(d,{style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)"}})})});Vde.classes=MK;Vde.displayName="@mantine/core/PaginationDots";function Bde({icon:t,name:e,action:n,type:i}){const r={icon:t},o=b.forwardRef((s,a)=>{const{icon:l,...c}=Kt(e,r,s),u=l,d=$de(),h=i==="next"?d.active===d.total:d.active===1;return ne.jsx(LK,{disabled:d.disabled||h,ref:a,onClick:d[n],withPadding:!1,...c,children:ne.jsx(u,{className:"mantine-rotate-rtl",style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)"}})})});return o.displayName=`@mantine/core/${e}`,o}const aEt=Bde({icon:OIn,name:"PaginationNext",action:"onNext",type:"next"}),lEt=Bde({icon:jIn,name:"PaginationPrevious",action:"onPrevious",type:"previous"}),cEt=Bde({icon:FIn,name:"PaginationFirst",action:"onFirst",type:"previous"}),uEt=Bde({icon:$In,name:"PaginationLast",action:"onLast",type:"next"});function dFe({dotsIcon:t}){const e=$de(),n=e.range.map((i,r)=>{var o;return i==="dots"?ne.jsx(Vde,{icon:t},r):ne.jsx(LK,{active:i===e.active,"aria-current":i===e.active?"page":void 0,onClick:()=>e.onChange(i),disabled:e.disabled,...(o=e.getItemProps)==null?void 0:o.call(e,i),children:i},r)});return ne.jsx(ne.Fragment,{children:n})}dFe.displayName="@mantine/core/PaginationItems";const zIn={siblings:1,boundaries:1},HIn=(t,{size:e,radius:n,color:i,autoContrast:r})=>({root:{"--pagination-control-radius":n===void 0?void 0:Va(n),"--pagination-control-size":Hr(e,"pagination-control-size"),"--pagination-control-fz":hd(e),"--pagination-active-bg":i?Xa(i,t):void 0,"--pagination-active-color":ade(r,t)?zF({color:i,theme:t,autoContrast:r}):void 0}}),zde=Dn((t,e)=>{const n=Kt("PaginationRoot",zIn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,total:c,value:u,defaultValue:d,onChange:h,disabled:f,siblings:m,boundaries:p,color:g,radius:y,onNextPage:_,onPreviousPage:w,onFirstPage:C,onLastPage:N,getItemProps:E,autoContrast:D,...k}=n,M=hi({name:"Pagination",classes:MK,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:HIn}),{range:T,setPage:A,next:R,previous:P,active:O,first:V,last:F}=JSn({page:u,initialPage:d,onChange:h,total:c,siblings:m,boundaries:p}),$=Bg(_,R),B=Bg(w,P),z=Bg(C,V),H=Bg(N,F);return ne.jsx(RIn,{value:{total:c,range:T,active:O,disabled:f,getItemProps:E,onChange:A,onNext:$,onPrevious:B,onFirst:z,onLast:H,getStyles:M},children:ne.jsx(mn,{ref:e,...M("root"),...k})})});zde.classes=MK;zde.displayName="@mantine/core/PaginationRoot";const WIn={withControls:!0,siblings:1,boundaries:1,gap:8},Kh=Dn((t,e)=>{const n=Kt("Pagination",WIn,t),{withEdges:i,withControls:r,getControlProps:o,nextIcon:s,previousIcon:a,lastIcon:l,firstIcon:c,dotsIcon:u,total:d,gap:h,hideWithOnePage:f,...m}=n;return d<=0||f&&d===1?null:ne.jsx(zde,{ref:e,total:d,...m,children:ne.jsxs(un,{gap:h,children:[i&&ne.jsx(cEt,{icon:c,...o==null?void 0:o("first")}),r&&ne.jsx(lEt,{icon:a,...o==null?void 0:o("previous")}),ne.jsx(dFe,{dotsIcon:u}),r&&ne.jsx(aEt,{icon:s,...o==null?void 0:o("next")}),i&&ne.jsx(uEt,{icon:l,...o==null?void 0:o("last")})]})})});Kh.classes=MK;Kh.displayName="@mantine/core/Pagination";Kh.Root=zde;Kh.Control=LK;Kh.Dots=Vde;Kh.First=cEt;Kh.Last=uEt;Kh.Next=aEt;Kh.Previous=lEt;Kh.Items=dFe;function IP(t,e){if(t<1)return[];const n=new Array(t).fill("");if(e){const i=e.trim().split("");for(let r=0;r<Math.min(t,i.length);r+=1)n[r]=i[r]===" "?"":i[r]}return n}var dEt={root:"m_f1cb205a",pinInput:"m_cb288ead"};const det={number:/^[0-9]+$/,alphanumeric:/^[a-zA-Z0-9]+$/i},hEt={gap:"sm",length:4,manageFocus:!0,oneTimeCode:!0,placeholder:"○",type:"alphanumeric",ariaLabel:"PinInput"},UIn=(t,{size:e})=>({root:{"--pin-input-size":Hr(e??hEt.size,"pin-input-size")}}),Hde=Dn((t,e)=>{const{name:n,form:i,className:r,value:o,defaultValue:s,variant:a,gap:l,style:c,size:u,classNames:d,styles:h,unstyled:f,length:m,onChange:p,onComplete:g,manageFocus:y,autoFocus:_,error:w,radius:C,disabled:N,oneTimeCode:E,placeholder:D,type:k,mask:M,readOnly:T,inputType:A,inputMode:R,ariaLabel:P,vars:O,id:V,hiddenInputProps:F,rootRef:$,getInputProps:B,...z}=Kt("PinInput",hEt,t),H=jm(V),K=hi({name:"PinInput",classes:dEt,props:t,className:r,style:c,classNames:d,styles:h,unstyled:f,vars:O,varsResolver:UIn}),{resolvedClassNames:q,resolvedStyles:U}=zv({classNames:d,styles:h,props:t}),[Y,J]=b.useState(-1),[ae,se]=au({value:o?IP(m??0,o):void 0,defaultValue:s==null?void 0:s.split("").slice(0,m??0),finalValue:IP(m??0,""),onChange:typeof p=="function"?De=>{p(De.join("").trim())}:void 0}),oe=ae.join("").trim(),fe=b.useRef([]),de=De=>{const Pe=k instanceof RegExp?k:k&&k in det?det[k]:null;return Pe==null?void 0:Pe.test(De)},ie=(De,Pe,ge)=>{if(!y){ge==null||ge.preventDefault();return}if(De==="next"){const he=Pe+1;he<(m??0)&&(ge==null||ge.preventDefault(),fe.current[he].focus())}if(De==="prev"){const he=Pe-1;he>-1&&(ge==null||ge.preventDefault(),fe.current[he].focus())}},Q=(De,Pe)=>{const ge=[...ae];ge[Pe]=De,se(ge)},be=(De,Pe)=>{const ge=De.target.value,he=ge.length===2?ge.split("")[ge.length-1]:ge,me=de(he);he.length<2?me?(Q(he,Pe),ie("next",Pe)):Q("",Pe):me&&se(IP(m??0,ge))},le=(De,Pe)=>{const{ctrlKey:ge,metaKey:he,key:me,shiftKey:X,target:re}=De,we=re.value;R==="numeric"&&(me==="Backspace"||me==="Tab"||me==="Control"||me==="Delete"||ge&&me==="v"||he&&me==="v"||!Number.isNaN(Number(me))||De.preventDefault()),me==="ArrowLeft"||X&&me==="Tab"?ie("prev",Pe,De):me==="ArrowRight"||me==="Tab"||me===" "?ie("next",Pe,De):me==="Delete"?Q("",Pe):me==="Backspace"?(Q("",Pe),m===Pe+1?De.target.value===""&&ie("prev",Pe,De):ie("prev",Pe,De)):we.length>0&&me===ae[Pe]&&ie("next",Pe,De)},Ne=(De,Pe)=>{De.target.select(),J(Pe)},Le=()=>{J(-1)},Te=De=>{De.preventDefault();const Pe=De.clipboardData.getData("text/plain").replace(/[\n\r\s]+/g,"");if(de(Pe.trim())){const he=IP(m??0,Pe);se(he),ie("next",he.length-2)}};return b.useEffect(()=>{oe.length===m&&(g==null||g(oe))},[m,oe]),b.useEffect(()=>{m!==ae.length&&se(IP(m??0,ae.join("")))},[m,ae]),b.useEffect(()=>{o===""&&se(IP(m??0,o))},[o]),b.useEffect(()=>{N&&J(-1)},[N]),ne.jsxs(ne.Fragment,{children:[ne.jsx(un,{...z,...K("root"),ref:$,role:"group",id:H,gap:l,unstyled:f,wrap:"nowrap",variant:a,__size:u,dir:"ltr",children:ae.map((De,Pe)=>b.createElement(ra,{component:"input",...K("pinInput",{style:{"--input-padding":"0","--input-text-align":"center"}}),classNames:q,styles:U,size:u,__staticSelector:"PinInput",id:`${H}-${Pe+1}`,key:`${H}-${Pe}`,inputMode:R||(k==="number"?"numeric":"text"),onChange:ge=>be(ge,Pe),onKeyDown:ge=>le(ge,Pe),onFocus:ge=>Ne(ge,Pe),onBlur:Le,onPaste:Te,type:A||(M?"password":k==="number"?"tel":"text"),radius:C,error:w,variant:a,disabled:N,ref:ge=>{Pe===0&&SK(e,ge),fe.current[Pe]=ge},autoComplete:E?"one-time-code":"off",placeholder:Y===Pe?"":D,value:De,autoFocus:_&&Pe===0,unstyled:f,"aria-label":P,readOnly:T,...B==null?void 0:B(Pe)}))}),ne.jsx("input",{type:"hidden",name:n,form:i,value:oe,...F})]})});Hde.classes={...dEt,...Qp.classes};Hde.displayName="@mantine/core/PinInput";const[KIn,fEt]=BF(),[qIn,GIn]=BF();var mEt={card:"m_9dc8ae12"};const YIn={withBorder:!0},XIn=(t,{radius:e})=>({card:{"--card-radius":Va(e)}}),hFe=Dn((t,e)=>{const n=Kt("RadioCard",YIn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,checked:c,mod:u,withBorder:d,value:h,onClick:f,name:m,onKeyDown:p,...g}=n,y=hi({name:"RadioCard",classes:mEt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:XIn,rootSelector:"card"}),{dir:_}=qk(),w=fEt(),C=typeof c=="boolean"?c:(w==null?void 0:w.value)===h||!1,N=m||(w==null?void 0:w.name),E=D=>{if(p==null||p(D),["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(D.nativeEvent.code)){D.preventDefault();const k=Array.from(document.querySelectorAll(`[role="radio"][name="${N||"__mantine"}"]`)),M=k.findIndex(R=>R===D.target),T=M+1>=k.length?0:M+1,A=M-1<0?k.length-1:M-1;D.nativeEvent.code==="ArrowDown"&&(k[T].focus(),k[T].click()),D.nativeEvent.code==="ArrowUp"&&(k[A].focus(),k[A].click()),D.nativeEvent.code==="ArrowLeft"&&(k[_==="ltr"?A:T].focus(),k[_==="ltr"?A:T].click()),D.nativeEvent.code==="ArrowRight"&&(k[_==="ltr"?T:A].focus(),k[_==="ltr"?T:A].click())}};return ne.jsx(qIn,{value:{checked:C},children:ne.jsx(Lh,{ref:e,mod:[{"with-border":d,checked:C},u],...y("card"),...g,role:"radio","aria-checked":C,name:N,onClick:D=>{f==null||f(D),w==null||w.onChange(h||"")},onKeyDown:E})})});hFe.displayName="@mantine/core/RadioCard";hFe.classes=mEt;const ZIn={},fFe=Dn((t,e)=>{const{value:n,defaultValue:i,onChange:r,size:o,wrapperProps:s,children:a,name:l,readOnly:c,...u}=Kt("RadioGroup",ZIn,t),d=jm(l),[h,f]=au({value:n,defaultValue:i,finalValue:"",onChange:r}),m=p=>!c&&f(typeof p=="string"?p:p.currentTarget.value);return ne.jsx(KIn,{value:{value:h,onChange:m,size:o,name:d},children:ne.jsx(ra.Wrapper,{size:o,ref:e,...s,...u,labelElement:"div",__staticSelector:"RadioGroup",children:ne.jsx(ENt,{role:"radiogroup",children:a})})})});fFe.classes=ra.Wrapper.classes;fFe.displayName="@mantine/core/RadioGroup";function pEt({size:t,style:e,...n}){return ne.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 5 5",style:{width:sn(t),height:sn(t),...e},"aria-hidden":!0,...n,children:ne.jsx("circle",{cx:"2.5",cy:"2.5",r:"2.5",fill:"currentColor"})})}var gEt={indicator:"m_717d7ff6",icon:"m_3e4da632","indicator--outline":"m_2980836c"};const QIn={icon:pEt},JIn=(t,{radius:e,color:n,size:i,iconColor:r,variant:o,autoContrast:s})=>{const a=Kk({color:n||t.primaryColor,theme:t}),l=a.isThemeColor&&a.shade===void 0?`var(--mantine-color-${a.color}-outline)`:a.color;return{indicator:{"--radio-size":Hr(i,"radio-size"),"--radio-radius":e===void 0?void 0:Va(e),"--radio-color":o==="outline"?l:Xa(n,t),"--radio-icon-size":Hr(i,"radio-icon-size"),"--radio-icon-color":r?Xa(r,t):ade(s,t)?zF({color:n,theme:t,autoContrast:s}):void 0}}},mFe=Dn((t,e)=>{const n=Kt("RadioIndicator",QIn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,icon:c,radius:u,color:d,iconColor:h,autoContrast:f,checked:m,mod:p,variant:g,disabled:y,..._}=n,w=c,C=hi({name:"RadioIndicator",classes:gEt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:JIn,rootSelector:"indicator"}),N=GIn(),E=typeof m=="boolean"?m:(N==null?void 0:N.checked)||!1;return ne.jsx(mn,{ref:e,...C("indicator",{variant:g}),variant:g,mod:[{checked:E,disabled:y},p],..._,children:ne.jsx(w,{...C("icon")})})});mFe.displayName="@mantine/core/RadioIndicator";mFe.classes=gEt;var bEt={root:"m_f3f1af94",inner:"m_89c4f5e4",icon:"m_f3ed6b2b",radio:"m_8a3dbb89","radio--outline":"m_1bfe9d39"};const e2n={labelPosition:"right"},t2n=(t,{size:e,radius:n,color:i,iconColor:r,variant:o,autoContrast:s})=>{const a=Kk({color:i||t.primaryColor,theme:t}),l=a.isThemeColor&&a.shade===void 0?`var(--mantine-color-${a.color}-outline)`:a.color;return{root:{"--radio-size":Hr(e,"radio-size"),"--radio-radius":n===void 0?void 0:Va(n),"--radio-color":o==="outline"?l:Xa(i,t),"--radio-icon-color":r?Xa(r,t):ade(s,t)?zF({color:i,theme:t,autoContrast:s}):void 0,"--radio-icon-size":Hr(e,"radio-icon-size")}}},g0=Dn((t,e)=>{const n=Kt("Radio",e2n,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,id:c,size:u,label:d,labelPosition:h,description:f,error:m,radius:p,color:g,variant:y,disabled:_,wrapperProps:w,icon:C=pEt,rootRef:N,iconColor:E,onChange:D,mod:k,...M}=n,T=hi({name:"Radio",classes:bEt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:t2n}),A=fEt(),R=(A==null?void 0:A.size)??u,P=n.size?u:R,{styleProps:O,rest:V}=WF(M),F=jm(c),$=A?{checked:A.value===V.value,name:V.name??A.name,onChange:B=>{A.onChange(B),D==null||D(B)}}:{};return ne.jsx($5e,{...T("root"),__staticSelector:"Radio",__stylesApiProps:n,id:F,size:P,labelPosition:h,label:d,description:f,error:m,disabled:_,classNames:i,styles:s,unstyled:a,"data-checked":$.checked||void 0,variant:y,ref:N,mod:k,...O,...w,children:ne.jsxs(mn,{...T("inner"),mod:{"label-position":h},children:[ne.jsx(mn,{...T("radio",{focusable:!0,variant:y}),onChange:D,...V,...$,component:"input",mod:{error:!!m},ref:e,id:F,disabled:_,type:"radio"}),ne.jsx(C,{...T("icon"),"aria-hidden":!0})]})})});g0.classes=bEt;g0.displayName="@mantine/core/Radio";g0.Group=fFe;g0.Card=hFe;g0.Indicator=mFe;const n2n={duration:100,transition:"fade"};function i2n(t,e){return{...n2n,...e,...t}}function r2n({offset:t,position:e,defaultOpened:n}){const[i,r]=b.useState(n),o=b.useRef(),{x:s,y:a,elements:l,refs:c,update:u,placement:d}=c5e({placement:e,middleware:[o5e({crossAxis:!0,padding:5,rootBoundary:"document"})]}),h=d.includes("right")?t:e.includes("left")?t*-1:0,f=d.includes("bottom")?t:e.includes("top")?t*-1:0,m=b.useCallback(({clientX:p,clientY:g})=>{c.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:p,y:g,left:p+h,top:g+f,right:p,bottom:g}}})},[l.reference]);return b.useEffect(()=>{if(c.floating.current){const p=o.current;p.addEventListener("mousemove",m);const g=EC(c.floating.current);return g.forEach(y=>{y.addEventListener("scroll",u)}),()=>{p.removeEventListener("mousemove",m),g.forEach(y=>{y.removeEventListener("scroll",u)})}}},[l.reference,c.floating.current,u,m,i]),{handleMouseMove:m,x:s,y:a,opened:i,setOpened:r,boundaryRef:o,floating:c.setFloating}}var Wde={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const o2n={refProp:"ref",withinPortal:!0,offset:10,defaultOpened:!1,position:"right",zIndex:gb("popover")},s2n=(t,{radius:e,color:n})=>({tooltip:{"--tooltip-radius":e===void 0?void 0:Va(e),"--tooltip-bg":n?Xa(n,t):void 0,"--tooltip-color":n?"var(--mantine-color-white)":void 0}}),pFe=Dn((t,e)=>{const n=Kt("TooltipFloating",o2n,t),{children:i,refProp:r,withinPortal:o,style:s,className:a,classNames:l,styles:c,unstyled:u,radius:d,color:h,label:f,offset:m,position:p,multiline:g,zIndex:y,disabled:_,defaultOpened:w,variant:C,vars:N,portalProps:E,...D}=n,k=zc(),M=hi({name:"TooltipFloating",props:n,classes:Wde,className:a,style:s,classNames:l,styles:c,unstyled:u,rootSelector:"tooltip",vars:N,varsResolver:s2n}),{handleMouseMove:T,x:A,y:R,opened:P,boundaryRef:O,floating:V,setOpened:F}=r2n({offset:m,position:p,defaultOpened:w});if(!Nw(i))throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const $=Bc(O,i.ref,e),B=H=>{var K,q;(q=(K=i.props).onMouseEnter)==null||q.call(K,H),T(H),F(!0)},z=H=>{var K,q;(q=(K=i.props).onMouseLeave)==null||q.call(K,H),F(!1)};return ne.jsxs(ne.Fragment,{children:[ne.jsx(AA,{...E,withinPortal:o,children:ne.jsx(mn,{...D,...M("tooltip",{style:{...qje(s,k),zIndex:y,display:!_&&P?"block":"none",top:(R&&Math.round(R))??"",left:(A&&Math.round(A))??""}}),variant:C,ref:V,mod:{multiline:g},children:f})}),b.cloneElement(i,{...i.props,[r]:$,onMouseEnter:B,onMouseLeave:z})]})});pFe.classes=Wde;pFe.displayName="@mantine/core/TooltipFloating";const vEt=b.createContext(!1),a2n=vEt.Provider,l2n=()=>b.useContext(vEt),c2n={openDelay:0,closeDelay:0};function gFe(t){const{openDelay:e,closeDelay:n,children:i}=Kt("TooltipGroup",c2n,t);return ne.jsx(a2n,{value:!0,children:ne.jsx(XDn,{delay:{open:e,close:n},children:i})})}gFe.displayName="@mantine/core/TooltipGroup";gFe.extend=t=>t;function u2n(t){var E,D,k;const[e,n]=b.useState(t.defaultOpened),r=typeof t.opened=="boolean"?t.opened:e,o=l2n(),s=jm(),{delay:a,currentId:l,setCurrentId:c}=XSt(),u=b.useCallback(M=>{n(M),M&&c(s)},[c,s]),{x:d,y:h,context:f,refs:m,update:p,placement:g,middlewareData:{arrow:{x:y,y:_}={}}}=c5e({strategy:t.strategy,placement:t.position,open:r,onOpenChange:u,middleware:[USt(t.offset),o5e({padding:8}),BEe(),KSt({element:t.arrowRef,padding:t.arrowOffset}),...t.inline?[zEe()]:[]]}),{getReferenceProps:w,getFloatingProps:C}=rkn([YDn(f,{enabled:(E=t.events)==null?void 0:E.hover,delay:o?a:{open:t.openDelay,close:t.closeDelay},mouseOnly:!((D=t.events)!=null&&D.touch)}),ikn(f,{enabled:(k=t.events)==null?void 0:k.focus,visibleOnly:!0}),skn(f,{role:"tooltip"}),tkn(f,{enabled:typeof t.opened>"u"}),ZDn(f,{id:s})]);iNt({opened:r,position:t.position,positionDependencies:t.positionDependencies,floating:{refs:m,update:p}}),Fp(()=>{var M;(M=t.onPositionChange)==null||M.call(t,g)},[g]);const N=r&&l&&l!==s;return{x:d,y:h,arrowX:y,arrowY:_,reference:m.setReference,floating:m.setFloating,getFloatingProps:C,getReferenceProps:w,isGroupPhase:N,opened:r,placement:g}}const het={position:"top",refProp:"ref",withinPortal:!0,inline:!1,defaultOpened:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:gb("popover"),positionDependencies:[]},d2n=(t,{radius:e,color:n})=>({tooltip:{"--tooltip-radius":e===void 0?void 0:Va(e),"--tooltip-bg":n?Xa(n,t):void 0,"--tooltip-color":n?"var(--mantine-color-white)":void 0}}),ir=Dn((t,e)=>{const n=Kt("Tooltip",het,t),{children:i,position:r,refProp:o,label:s,openDelay:a,closeDelay:l,onPositionChange:c,opened:u,defaultOpened:d,withinPortal:h,radius:f,color:m,classNames:p,styles:g,unstyled:y,style:_,className:w,withArrow:C,arrowSize:N,arrowOffset:E,arrowRadius:D,arrowPosition:k,offset:M,transitionProps:T,multiline:A,events:R,zIndex:P,disabled:O,positionDependencies:V,onClick:F,onMouseEnter:$,onMouseLeave:B,inline:z,variant:H,keepMounted:K,vars:q,portalProps:U,mod:Y,floatingStrategy:J,...ae}=Kt("Tooltip",het,n),{dir:se}=qk(),oe=b.useRef(null),fe=u2n({position:ZSt(se,r),closeDelay:l,openDelay:a,onPositionChange:c,opened:u,defaultOpened:d,events:R,arrowRef:oe,arrowOffset:E,offset:typeof M=="number"?M+(C?N/2:0):M,positionDependencies:[...V,i],inline:z,strategy:J}),de=hi({name:"Tooltip",props:n,classes:Wde,className:w,style:_,classNames:p,styles:g,unstyled:y,rootSelector:"tooltip",vars:q,varsResolver:d2n});if(!Nw(i))throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const ie=Bc(fe.reference,i.ref,e),Q=i2n(T,{duration:100,transition:"fade"});return ne.jsxs(ne.Fragment,{children:[ne.jsx(AA,{...U,withinPortal:h,children:ne.jsx(lu,{...Q,keepMounted:K,mounted:!O&&!!fe.opened,duration:fe.isGroupPhase?10:Q.duration,children:be=>ne.jsxs(mn,{...ae,"data-fixed":J==="fixed"||void 0,variant:H,mod:[{multiline:A},Y],...fe.getFloatingProps({ref:fe.floating,className:de("tooltip").className,style:{...de("tooltip").style,...be,zIndex:P,top:fe.y??0,left:fe.x??0}}),children:[s,ne.jsx(u5e,{ref:oe,arrowX:fe.arrowX,arrowY:fe.arrowY,visible:C,position:fe.placement,arrowSize:N,arrowOffset:E,arrowRadius:D,arrowPosition:k,...de("arrow")})]})})}),b.cloneElement(i,fe.getReferenceProps({onClick:F,onMouseEnter:$,onMouseLeave:B,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,[o]:ie,className:Vt(w,i.props.className),...i.props}))]})});ir.classes=Wde;ir.displayName="@mantine/core/Tooltip";ir.Floating=pFe;ir.Group=gFe;var yEt={root:"m_cf365364",indicator:"m_9e182ccd",label:"m_1738fcb2",input:"m_1714d588",control:"m_69686b9b",innerLabel:"m_78882f40"};const h2n={withItemsBorders:!0},f2n=(t,{radius:e,color:n,transitionDuration:i,size:r,transitionTimingFunction:o})=>({root:{"--sc-radius":e===void 0?void 0:Va(e),"--sc-color":n?Xa(n,t):void 0,"--sc-shadow":n?void 0:"var(--mantine-shadow-xs)","--sc-transition-duration":i===void 0?void 0:`${i}ms`,"--sc-transition-timing-function":o,"--sc-padding":Hr(r,"sc-padding"),"--sc-font-size":hd(r)}}),Yk=Dn((t,e)=>{var ae,se;const n=Kt("SegmentedControl",h2n,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,data:c,value:u,defaultValue:d,onChange:h,size:f,name:m,disabled:p,readOnly:g,fullWidth:y,orientation:_,radius:w,color:C,transitionDuration:N,transitionTimingFunction:E,variant:D,autoContrast:k,withItemsBorders:M,mod:T,...A}=n,R=hi({name:"SegmentedControl",props:n,classes:yEt,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:f2n}),P=zc(),O=c.map(oe=>typeof oe=="string"?{label:oe,value:oe}:oe),V=rNn(),[F,$]=b.useState(null),[B,z]=b.useState({}),H=(oe,fe)=>{B[fe]=oe,z(B)},[K,q]=au({value:u,defaultValue:d,finalValue:Array.isArray(c)?((ae=O.find(oe=>!oe.disabled))==null?void 0:ae.value)??((se=c[0])==null?void 0:se.value)??null:null,onChange:h}),U=jm(m),Y=O.map(oe=>b.createElement(mn,{...R("control"),mod:{active:K===oe.value,orientation:_},key:oe.value},b.createElement("input",{...R("input"),disabled:p||oe.disabled,type:"radio",name:U,value:oe.value,id:`${U}-${oe.value}`,checked:K===oe.value,onChange:()=>!g&&q(oe.value),"data-focus-ring":P.focusRing,key:`${oe.value}-input`}),b.createElement(mn,{component:"label",...R("label"),mod:{active:K===oe.value&&!(p||oe.disabled),disabled:p||oe.disabled,"read-only":g},htmlFor:`${U}-${oe.value}`,ref:fe=>H(fe,oe.value),__vars:{"--sc-label-color":C!==void 0?zF({color:C,theme:P,autoContrast:k}):void 0},key:`${oe.value}-label`},ne.jsx("span",{...R("innerLabel"),children:oe.label})))),J=Bc(e,oe=>$(oe));return c.length===0?null:ne.jsxs(mn,{...R("root"),variant:D,size:f,ref:J,mod:[{"full-width":y,orientation:_,initialized:V,"with-items-borders":M},T],...A,role:"radiogroup","data-disabled":p,children:[typeof K=="string"&&ne.jsx(x5e,{target:B[K],parent:F,component:"span",transitionDuration:"var(--sc-transition-duration)",...R("indicator")}),Y]})});Yk.classes=yEt;Yk.displayName="@mantine/core/SegmentedControl";const m2n={searchable:!1,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left"},Fm=Dn((t,e)=>{const n=Kt("Select",m2n,t),{classNames:i,styles:r,unstyled:o,vars:s,dropdownOpened:a,defaultDropdownOpened:l,onDropdownClose:c,onDropdownOpen:u,onFocus:d,onBlur:h,onClick:f,onChange:m,data:p,value:g,defaultValue:y,selectFirstOptionOnChange:_,onOptionSubmit:w,comboboxProps:C,readOnly:N,disabled:E,filter:D,limit:k,withScrollArea:M,maxDropdownHeight:T,size:A,searchable:R,rightSection:P,checkIconPosition:O,withCheckIcon:V,nothingFoundMessage:F,name:$,form:B,searchValue:z,defaultSearchValue:H,onSearchChange:K,allowDeselect:q,error:U,rightSectionPointerEvents:Y,id:J,clearable:ae,clearButtonProps:se,hiddenInputProps:oe,renderOption:fe,onClear:de,autoComplete:ie,scrollAreaProps:Q,...be}=n,le=b.useMemo(()=>yNt(p),[p]),Ne=b.useMemo(()=>D5e(le),[le]),Le=jm(J),[Te,De,Pe]=au({value:g,defaultValue:y,finalValue:null,onChange:m}),ge=typeof Te=="string"?Ne[Te]:void 0,he=eNn(ge),[me,X]=au({value:z,defaultValue:H,finalValue:ge?ge.label:"",onChange:K}),re=F5e({opened:a,defaultOpened:l,onDropdownOpen:()=>{u==null||u(),re.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{c==null||c(),re.resetSelectedOption()}}),{resolvedClassNames:we,resolvedStyles:ue}=zv({props:n,styles:r,classNames:i});b.useEffect(()=>{_&&re.selectFirstOption()},[_,Te]),b.useEffect(()=>{g===null&&X(""),typeof g=="string"&&ge&&((he==null?void 0:he.value)!==ge.value||(he==null?void 0:he.label)!==ge.label)&&X(ge.label)},[g,ge]);const Ce=ae&&!!Te&&!E&&!N&&ne.jsx(Cs.ClearButton,{size:A,...se,onClear:()=>{De(null,null),X(""),de==null||de()}});return ne.jsxs(ne.Fragment,{children:[ne.jsxs(Cs,{store:re,__staticSelector:"Select",classNames:we,styles:ue,unstyled:o,readOnly:N,onOptionSubmit:ze=>{w==null||w(ze);const Ye=q&&Ne[ze].value===Te?null:Ne[ze],Ke=Ye?Ye.value:null;Ke!==Te&&De(Ke,Ye),!Pe&&X(typeof Ke=="string"&&(Ye==null?void 0:Ye.label)||""),re.closeDropdown()},size:A,...C,children:[ne.jsx(Cs.Target,{targetType:R?"input":"button",autoComplete:ie,children:ne.jsx(Qp,{id:Le,ref:e,rightSection:P||Ce||ne.jsx(Cs.Chevron,{size:A,error:U,unstyled:o}),rightSectionPointerEvents:Y||(Ce?"all":"none"),...be,size:A,__staticSelector:"Select",disabled:E,readOnly:N||!R,value:me,onChange:ze=>{X(ze.currentTarget.value),re.openDropdown(),_&&re.selectFirstOption()},onFocus:ze=>{R&&re.openDropdown(),d==null||d(ze)},onBlur:ze=>{var Ye;R&&re.closeDropdown(),X(Te!=null&&((Ye=Ne[Te])==null?void 0:Ye.label)||""),h==null||h(ze)},onClick:ze=>{R?re.openDropdown():re.toggleDropdown(),f==null||f(ze)},classNames:we,styles:ue,unstyled:o,pointer:!R,error:U})}),ne.jsx(LNt,{data:le,hidden:N||E,filter:D,search:me,limit:k,hiddenWhenEmpty:!F,withScrollArea:M,maxDropdownHeight:T,filterOptions:R&&(ge==null?void 0:ge.label)!==me,value:Te,checkIconPosition:O,withCheckIcon:V,nothingFoundMessage:F,unstyled:o,labelId:be.label?`${Le}-label`:void 0,"aria-label":be.label?void 0:be["aria-label"],renderOption:fe,scrollAreaProps:Q})]}),ne.jsx(Cs.HiddenInput,{value:Te,name:$,form:B,disabled:E,...oe})]})});Fm.classes={...Qp.classes,...Cs.classes};Fm.displayName="@mantine/core/Select";function p2n({spacing:t,verticalSpacing:e,cols:n,selector:i}){var u;const r=zc(),o=e===void 0?t:e,s=Wk({"--sg-spacing-x":Rc(r0(t)),"--sg-spacing-y":Rc(r0(o)),"--sg-cols":(u=r0(n))==null?void 0:u.toString()}),a=Tu(r.breakpoints).reduce((d,h)=>(d[h]||(d[h]={}),typeof t=="object"&&t[h]!==void 0&&(d[h]["--sg-spacing-x"]=Rc(t[h])),typeof o=="object"&&o[h]!==void 0&&(d[h]["--sg-spacing-y"]=Rc(o[h])),typeof n=="object"&&n[h]!==void 0&&(d[h]["--sg-cols"]=n[h]),d),{}),c=Bje(Tu(a),r).filter(d=>Tu(a[d.value]).length>0).map(d=>({query:`(min-width: ${r.breakpoints[d.value]})`,styles:a[d.value]}));return ne.jsx(HF,{styles:s,media:c,selector:i})}function H_e(t){return typeof t=="object"&&t!==null?Tu(t):[]}function g2n(t){return t.sort((e,n)=>Dz(e)-Dz(n))}function b2n({spacing:t,verticalSpacing:e,cols:n}){const i=Array.from(new Set([...H_e(t),...H_e(e),...H_e(n)]));return g2n(i)}function v2n({spacing:t,verticalSpacing:e,cols:n,selector:i}){var c;const r=e===void 0?t:e,o=Wk({"--sg-spacing-x":Rc(r0(t)),"--sg-spacing-y":Rc(r0(r)),"--sg-cols":(c=r0(n))==null?void 0:c.toString()}),s=b2n({spacing:t,verticalSpacing:e,cols:n}),a=s.reduce((u,d)=>(u[d]||(u[d]={}),typeof t=="object"&&t[d]!==void 0&&(u[d]["--sg-spacing-x"]=Rc(t[d])),typeof r=="object"&&r[d]!==void 0&&(u[d]["--sg-spacing-y"]=Rc(r[d])),typeof n=="object"&&n[d]!==void 0&&(u[d]["--sg-cols"]=n[d]),u),{}),l=s.map(u=>({query:`simple-grid (min-width: ${u})`,styles:a[u]}));return ne.jsx(HF,{styles:o,container:l,selector:i})}var _Et={container:"m_925c2d2c",root:"m_2415a157"};const y2n={cols:1,spacing:"md",type:"media"},IK=Dn((t,e)=>{const n=Kt("SimpleGrid",y2n,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,cols:c,verticalSpacing:u,spacing:d,type:h,...f}=n,m=hi({name:"SimpleGrid",classes:_Et,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l}),p=NK();return h==="container"?ne.jsxs(ne.Fragment,{children:[ne.jsx(v2n,{...n,selector:`.${p}`}),ne.jsx("div",{...m("container"),children:ne.jsx(mn,{ref:e,...m("root",{className:p}),...f})})]}):ne.jsxs(ne.Fragment,{children:[ne.jsx(p2n,{...n,selector:`.${p}`}),ne.jsx(mn,{ref:e,...m("root",{className:p}),...f})]})});IK.classes=_Et;IK.displayName="@mantine/core/SimpleGrid";var xEt={root:"m_18320242","skeleton-fade":"m_299c329c"};const _2n={visible:!0,animate:!0},x2n=(t,{width:e,height:n,radius:i,circle:r})=>({root:{"--skeleton-height":sn(n),"--skeleton-width":sn(r?n:e),"--skeleton-radius":r?"1000px":i===void 0?void 0:Va(i)}}),li=Dn((t,e)=>{const n=Kt("Skeleton",_2n,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,width:c,height:u,circle:d,visible:h,radius:f,animate:m,mod:p,...g}=n,y=hi({name:"Skeleton",classes:xEt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:x2n});return ne.jsx(mn,{ref:e,...y("root"),mod:[{visible:h,animate:m},p],...g})});li.classes=xEt;li.displayName="@mantine/core/Skeleton";const[w2n,Ude]=Uh("SliderProvider was not found in tree"),wEt=b.forwardRef(({size:t,disabled:e,variant:n,color:i,thumbSize:r,radius:o,...s},a)=>{const{getStyles:l}=Ude();return ne.jsx(mn,{tabIndex:-1,variant:n,size:t,ref:a,...l("root"),...s})});wEt.displayName="@mantine/core/SliderRoot";const CEt=b.forwardRef(({max:t,min:e,value:n,position:i,label:r,dragging:o,onMouseDown:s,onKeyDownCapture:a,labelTransitionProps:l,labelAlwaysOn:c,thumbLabel:u,onFocus:d,onBlur:h,showLabelOnHover:f,isHovered:m,children:p=null,disabled:g},y)=>{const{getStyles:_}=Ude(),[w,C]=b.useState(!1),N=c||o||w||f&&m;return ne.jsxs(mn,{tabIndex:0,role:"slider","aria-label":u,"aria-valuemax":t,"aria-valuemin":e,"aria-valuenow":n,ref:y,__vars:{"--slider-thumb-offset":`${i}%`},..._("thumb",{focusable:!0}),mod:{dragging:o,disabled:g},onFocus:()=>{C(!0),typeof d=="function"&&d()},onBlur:()=>{C(!1),typeof h=="function"&&h()},onTouchStart:s,onMouseDown:s,onKeyDownCapture:a,onClick:E=>E.stopPropagation(),children:[p,ne.jsx(lu,{mounted:r!=null&&!!N,transition:"fade",duration:0,...l,children:E=>ne.jsx("div",{..._("label",{style:E}),children:r})})]})});CEt.displayName="@mantine/core/SliderThumb";function SEt({value:t,min:e,max:n}){const i=(t-e)/(n-e)*100;return Math.min(Math.max(i,0),100)}function C2n({mark:t,offset:e,value:n,inverted:i=!1}){return i?typeof e=="number"&&t.value<=e||t.value>=n:typeof e=="number"?t.value>=e&&t.value<=n:t.value<=n}function NEt({marks:t,min:e,max:n,disabled:i,value:r,offset:o,inverted:s}){const{getStyles:a}=Ude();if(!t)return null;const l=t.map((c,u)=>b.createElement(mn,{...a("markWrapper"),__vars:{"--mark-offset":`${SEt({value:c.value,min:e,max:n})}%`},key:u},ne.jsx(mn,{...a("mark"),mod:{filled:C2n({mark:c,value:r,offset:o,inverted:s}),disabled:i}}),c.label&&ne.jsx("div",{...a("markLabel"),children:c.label})));return ne.jsx("div",{children:l})}NEt.displayName="@mantine/core/SliderMarks";function EEt({filled:t,children:e,offset:n,disabled:i,marksOffset:r,inverted:o,containerProps:s,...a}){const{getStyles:l}=Ude();return ne.jsx(ne.Fragment,{children:ne.jsx(mn,{...l("trackContainer"),mod:{disabled:i},...s,children:ne.jsxs(mn,{...l("track"),mod:{inverted:o,disabled:i},children:[ne.jsx(mn,{mod:{inverted:o,disabled:i},__vars:{"--slider-bar-width":`calc(${t}% + var(--slider-size))`,"--slider-bar-offset":`calc(${n}% - var(--slider-size))`},...l("bar")}),e,ne.jsx(NEt,{...a,offset:r,disabled:i,inverted:o})]})})})}EEt.displayName="@mantine/core/SliderTrack";function S2n({value:t,containerWidth:e,min:n,max:i,step:r,precision:o}){const a=(e?Math.min(Math.max(t,0),e)/e:t)*(i-n),l=(a!==0?Math.round(a/r)*r:0)+n,c=Math.max(l,n);return o!==void 0?Number(c.toFixed(o)):c}function _Z(t,e){return parseFloat(t.toFixed(e))}function N2n(t){if(!t)return 0;const e=t.toString().split(".");return e.length>1?e[1].length:0}var DEt={root:"m_dd36362e",label:"m_c9357328",thumb:"m_c9a9a60a",trackContainer:"m_a8645c2",track:"m_c9ade57f",bar:"m_38aeed47",markWrapper:"m_b7b0423a",mark:"m_dd33bc19",markLabel:"m_68c77a5b"};const E2n={radius:"xl",min:0,max:100,step:1,marks:[],label:t=>t,labelTransitionProps:{transition:"fade",duration:0},labelAlwaysOn:!1,thumbLabel:"",showLabelOnHover:!0,disabled:!1,scale:t=>t},D2n=(t,{size:e,color:n,thumbSize:i,radius:r})=>({root:{"--slider-size":Hr(e,"slider-size"),"--slider-color":n?Xa(n,t):void 0,"--slider-radius":r===void 0?void 0:Va(r),"--slider-thumb-size":i!==void 0?sn(i):"calc(var(--slider-size) * 2)"}}),Kde=Dn((t,e)=>{const n=Kt("Slider",E2n,t),{classNames:i,styles:r,value:o,onChange:s,onChangeEnd:a,size:l,min:c,max:u,step:d,precision:h,defaultValue:f,name:m,marks:p,label:g,labelTransitionProps:y,labelAlwaysOn:_,thumbLabel:w,showLabelOnHover:C,thumbChildren:N,disabled:E,unstyled:D,scale:k,inverted:M,className:T,style:A,vars:R,hiddenInputProps:P,...O}=n,V=hi({name:"Slider",props:n,classes:DEt,classNames:i,className:T,styles:r,style:A,vars:R,varsResolver:D2n,unstyled:D}),{dir:F}=qk(),[$,B]=b.useState(!1),[z,H]=au({value:typeof o=="number"?av(o,c,u):o,defaultValue:typeof f=="number"?av(f,c,u):f,finalValue:av(0,c,u),onChange:s}),K=b.useRef(z),q=b.useRef(),U=b.useRef(),Y=SEt({value:z,min:c,max:u}),J=k(z),ae=typeof g=="function"?g(J):g,se=h??N2n(d),oe=b.useCallback(({x:Q})=>{if(!E){const be=S2n({value:Q,min:c,max:u,step:d,precision:se});H(be),K.current=be}},[E,c,u,d,se,H]),{ref:fe,active:de}=zje(oe,{onScrubEnd:()=>a==null?void 0:a(K.current)},F),ie=Q=>{var be,le,Ne,Le,Te,De;if(!E)switch(Q.key){case"ArrowUp":{Q.preventDefault(),(be=U.current)==null||be.focus();const Pe=_Z(Math.min(Math.max(z+d,c),u),se);H(Pe),a==null||a(Pe);break}case"ArrowRight":{Q.preventDefault(),(le=U.current)==null||le.focus();const Pe=_Z(Math.min(Math.max(F==="rtl"?z-d:z+d,c),u),se);H(Pe),a==null||a(Pe);break}case"ArrowDown":{Q.preventDefault(),(Ne=U.current)==null||Ne.focus();const Pe=_Z(Math.min(Math.max(z-d,c),u),se);H(Pe),a==null||a(Pe);break}case"ArrowLeft":{Q.preventDefault(),(Le=U.current)==null||Le.focus();const Pe=_Z(Math.min(Math.max(F==="rtl"?z+d:z-d,c),u),se);H(Pe),a==null||a(Pe);break}case"Home":{Q.preventDefault(),(Te=U.current)==null||Te.focus(),H(c),a==null||a(c);break}case"End":{Q.preventDefault(),(De=U.current)==null||De.focus(),H(u),a==null||a(u);break}}};return ne.jsx(w2n,{value:{getStyles:V},children:ne.jsxs(wEt,{...O,ref:Bc(e,q),onKeyDownCapture:ie,onMouseDownCapture:()=>{var Q;return(Q=q.current)==null?void 0:Q.focus()},size:l,disabled:E,children:[ne.jsx(EEt,{inverted:M,offset:0,filled:Y,marks:p,min:c,max:u,value:J,disabled:E,containerProps:{ref:fe,onMouseEnter:C?()=>B(!0):void 0,onMouseLeave:C?()=>B(!1):void 0},children:ne.jsx(CEt,{max:u,min:c,value:J,position:Y,dragging:de,label:ae,ref:U,labelTransitionProps:y,labelAlwaysOn:_,thumbLabel:w,showLabelOnHover:C,isHovered:$,disabled:E,children:N})}),ne.jsx("input",{type:"hidden",name:m,value:J,...P})]})})});Kde.classes=DEt;Kde.displayName="@mantine/core/Slider";var kEt={root:"m_6d731127"};const k2n={gap:"md",align:"stretch",justify:"flex-start"},M2n=(t,{gap:e,align:n,justify:i})=>({root:{"--stack-gap":Rc(e),"--stack-align":n,"--stack-justify":i}}),Gt=Dn((t,e)=>{const n=Kt("Stack",k2n,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,align:c,justify:u,gap:d,variant:h,...f}=n,m=hi({name:"Stack",props:n,classes:kEt,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:M2n});return ne.jsx(mn,{ref:e,...m("root"),variant:h,...f})});Gt.classes=kEt;Gt.displayName="@mantine/core/Stack";const MEt=b.createContext(null),L2n=MEt.Provider,T2n=()=>b.useContext(MEt),I2n={},bFe=Dn((t,e)=>{const{value:n,defaultValue:i,onChange:r,size:o,wrapperProps:s,children:a,readOnly:l,...c}=Kt("SwitchGroup",I2n,t),[u,d]=au({value:n,defaultValue:i,finalValue:[],onChange:r}),h=f=>{const m=f.currentTarget.value;!l&&d(u.includes(m)?u.filter(p=>p!==m):[...u,m])};return ne.jsx(L2n,{value:{value:u,onChange:h,size:o},children:ne.jsx(ra.Wrapper,{size:o,ref:e,...s,...c,labelElement:"div",__staticSelector:"SwitchGroup",children:ne.jsx(ENt,{role:"group",children:a})})})});bFe.classes=ra.Wrapper.classes;bFe.displayName="@mantine/core/SwitchGroup";var LEt={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};const A2n={labelPosition:"right"},R2n=(t,{radius:e,color:n,size:i})=>({root:{"--switch-radius":e===void 0?void 0:Va(e),"--switch-height":Hr(i,"switch-height"),"--switch-width":Hr(i,"switch-width"),"--switch-thumb-size":Hr(i,"switch-thumb-size"),"--switch-label-font-size":Hr(i,"switch-label-font-size"),"--switch-track-label-padding":Hr(i,"switch-track-label-padding"),"--switch-color":n?Xa(n,t):void 0}}),Du=Dn((t,e)=>{const n=Kt("Switch",A2n,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,color:c,label:u,offLabel:d,onLabel:h,id:f,size:m,radius:p,wrapperProps:g,children:y,thumbIcon:_,checked:w,defaultChecked:C,onChange:N,labelPosition:E,description:D,error:k,disabled:M,variant:T,rootRef:A,mod:R,...P}=n,O=T2n(),V=m||(O==null?void 0:O.size),F=hi({name:"Switch",props:n,classes:LEt,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:R2n}),{styleProps:$,rest:B}=WF(P),z=jm(f),H=O?{checked:O.value.includes(B.value),onChange:O.onChange}:{},[K,q]=au({value:H.checked??w,defaultValue:C,finalValue:!1});return ne.jsxs($5e,{...F("root"),__staticSelector:"Switch",__stylesApiProps:n,id:z,size:V,labelPosition:E,label:u,description:D,error:k,disabled:M,bodyElement:"label",labelElement:"span",classNames:i,styles:s,unstyled:a,"data-checked":H.checked||void 0,variant:T,ref:A,mod:R,...$,...g,children:[ne.jsx("input",{...B,disabled:M,checked:K,onChange:U=>{var Y;O?(Y=H.onChange)==null||Y.call(H,U):N==null||N(U),q(U.currentTarget.checked)},id:z,ref:e,type:"checkbox",role:"switch",...F("input")}),ne.jsxs(mn,{"aria-hidden":"true",mod:{error:k,"label-position":E,"without-labels":!h&&!d},...F("track"),children:[ne.jsx(mn,{component:"span",mod:"reduce-motion",...F("thumb"),children:_}),ne.jsx("span",{...F("trackLabel"),children:K?h:d})]})]})});Du.classes={...LEt,...VMn};Du.displayName="@mantine/core/Switch";Du.Group=bFe;const[P2n,O2n]=Uh("Table component was not found in the tree");var AK={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function j2n(t,e){if(!e)return;const n={};return e.columnBorder&&t.withColumnBorders&&(n["data-with-column-border"]=!0),e.rowBorder&&t.withRowBorders&&(n["data-with-row-border"]=!0),e.striped&&t.striped&&(n["data-striped"]=t.striped),e.highlightOnHover&&t.highlightOnHover&&(n["data-hover"]=!0),e.captionSide&&t.captionSide&&(n["data-side"]=t.captionSide),e.stickyHeader&&t.stickyHeader&&(n["data-sticky"]=!0),n}function OA(t,e){const n=`Table${t.charAt(0).toUpperCase()}${t.slice(1)}`,i=Dn((r,o)=>{const s=Kt(n,{},r),{classNames:a,className:l,style:c,styles:u,...d}=s,h=O2n();return ne.jsx(mn,{component:t,ref:o,...j2n(h,e),...h.getStyles(t,{className:l,classNames:a,style:c,styles:u,props:s}),...d})});return i.displayName=`@mantine/core/${n}`,i.classes=AK,i}const YEe=OA("th",{columnBorder:!0}),TEt=OA("td",{columnBorder:!0}),Dee=OA("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),IEt=OA("thead",{stickyHeader:!0}),AEt=OA("tbody"),REt=OA("tfoot"),PEt=OA("caption",{captionSide:!0});function vFe({data:t}){return ne.jsxs(ne.Fragment,{children:[t.caption&&ne.jsx(PEt,{children:t.caption}),t.head&&ne.jsx(IEt,{children:ne.jsx(Dee,{children:t.head.map((e,n)=>ne.jsx(YEe,{children:e},n))})}),t.body&&ne.jsx(AEt,{children:t.body.map((e,n)=>ne.jsx(Dee,{children:e.map((i,r)=>ne.jsx(TEt,{children:i},r))},n))}),t.foot&&ne.jsx(REt,{children:ne.jsx(Dee,{children:t.foot.map((e,n)=>ne.jsx(YEe,{children:e},n))})})]})}vFe.displayName="@mantine/core/TableDataRenderer";const F2n={type:"scrollarea"},$2n=(t,{minWidth:e,type:n})=>({scrollContainer:{"--table-min-width":sn(e),"--table-overflow":n==="native"?"auto":void 0}}),yFe=Dn((t,e)=>{const n=Kt("TableScrollContainer",F2n,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,children:c,minWidth:u,type:d,...h}=n,f=hi({name:"TableScrollContainer",classes:AK,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:$2n,rootSelector:"scrollContainer"});return ne.jsx(mn,{component:d==="scrollarea"?UF:"div",...d==="scrollarea"?{offsetScrollbars:"x"}:{},ref:e,...f("scrollContainer"),...h,children:ne.jsx("div",{...f("scrollContainerInner"),children:c})})});yFe.classes=AK;yFe.displayName="@mantine/core/TableScrollContainer";const V2n={withRowBorders:!0,verticalSpacing:7},B2n=(t,{layout:e,captionSide:n,horizontalSpacing:i,verticalSpacing:r,borderColor:o,stripedColor:s,highlightOnHoverColor:a,striped:l,highlightOnHover:c,stickyHeaderOffset:u,stickyHeader:d})=>({table:{"--table-layout":e,"--table-caption-side":n,"--table-horizontal-spacing":Rc(i),"--table-vertical-spacing":Rc(r),"--table-border-color":o?Xa(o,t):void 0,"--table-striped-color":l&&s?Xa(s,t):void 0,"--table-highlight-on-hover-color":c&&a?Xa(a,t):void 0,"--table-sticky-header-offset":d?sn(u):void 0}}),hn=Dn((t,e)=>{const n=Kt("Table",V2n,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,horizontalSpacing:c,verticalSpacing:u,captionSide:d,stripedColor:h,highlightOnHoverColor:f,striped:m,highlightOnHover:p,withColumnBorders:g,withRowBorders:y,withTableBorder:_,borderColor:w,layout:C,variant:N,data:E,children:D,stickyHeader:k,stickyHeaderOffset:M,mod:T,...A}=n,R=hi({name:"Table",props:n,className:r,style:o,classes:AK,classNames:i,styles:s,unstyled:a,rootSelector:"table",vars:l,varsResolver:B2n});return ne.jsx(P2n,{value:{getStyles:R,stickyHeader:k,striped:m===!0?"odd":m||void 0,highlightOnHover:p,withColumnBorders:g,withRowBorders:y,captionSide:d||"bottom"},children:ne.jsx(mn,{component:"table",variant:N,ref:e,mod:[{"data-with-table-border":_},T],...R("table"),...A,children:D||!!E&&ne.jsx(vFe,{data:E})})})});hn.classes=AK;hn.displayName="@mantine/core/Table";hn.Td=TEt;hn.Th=YEe;hn.Tr=Dee;hn.Thead=IEt;hn.Tbody=AEt;hn.Tfoot=REt;hn.Caption=PEt;hn.ScrollContainer=yFe;hn.DataRenderer=vFe;const z2n={},pa=Dn((t,e)=>{const n=Kt("TextInput",z2n,t);return ne.jsx(Qp,{component:"input",ref:e,...n,__staticSelector:"TextInput"})});pa.classes=Qp.classes;pa.displayName="@mantine/core/TextInput";var OEt={root:"m_7341320d"};const H2n={},W2n=(t,{size:e,radius:n,variant:i,gradient:r,color:o,autoContrast:s})=>{const a=t.variantColorResolver({color:o||t.primaryColor,theme:t,gradient:r,variant:i||"filled",autoContrast:s});return{root:{"--ti-size":Hr(e,"ti-size"),"--ti-radius":n===void 0?void 0:Va(n),"--ti-bg":o||i?a.background:void 0,"--ti-color":o||i?a.color:void 0,"--ti-bd":o||i?a.border:void 0}}},kp=Dn((t,e)=>{const n=Kt("ThemeIcon",H2n,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,autoContrast:c,...u}=n,d=hi({name:"ThemeIcon",classes:OEt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:W2n});return ne.jsx(mn,{ref:e,...d("root"),...u})});kp.classes=OEt;kp.displayName="@mantine/core/ThemeIcon";const U2n=["h1","h2","h3","h4","h5","h6"];function K2n(t,e){const n=e!==void 0?e:`h${t}`;return U2n.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:{fontSize:sn(n),fontWeight:`var(--mantine-h${t}-font-weight)`,lineHeight:`var(--mantine-h${t}-line-height)`}}var jEt={root:"m_8a5d1357"};const q2n={order:1},G2n=(t,{order:e,size:n,lineClamp:i,textWrap:r})=>{const o=K2n(e,n);return{root:{"--title-fw":o.fontWeight,"--title-lh":o.lineHeight,"--title-fz":o.fontSize,"--title-line-clamp":typeof i=="number"?i.toString():void 0,"--title-text-wrap":r}}},QF=Dn((t,e)=>{const n=Kt("Title",q2n,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,order:l,vars:c,size:u,variant:d,lineClamp:h,textWrap:f,mod:m,...p}=n,g=hi({name:"Title",props:n,classes:jEt,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:c,varsResolver:G2n});return[1,2,3,4,5,6].includes(l)?ne.jsx(mn,{...g("root"),component:`h${l}`,variant:d,ref:e,mod:[{order:l,"data-line-clamp":typeof h=="number"},m],size:u,...p}):null});QF.classes=jEt;QF.displayName="@mantine/core/Title";const _Fe=b.createContext(null);_Fe.displayName="@mantine/modals/ModalsContext";function Y2n(){const t=b.useContext(_Fe);if(!t)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return t}function X2n({id:t,cancelProps:e,confirmProps:n,labels:i={cancel:"",confirm:""},closeOnConfirm:r=!0,closeOnCancel:o=!0,groupProps:s,onCancel:a,onConfirm:l,children:c}){const{cancel:u,confirm:d}=i,h=Y2n(),f=p=>{typeof(e==null?void 0:e.onClick)=="function"&&(e==null||e.onClick(p)),typeof a=="function"&&a(),o&&h.closeModal(t)},m=p=>{typeof(n==null?void 0:n.onClick)=="function"&&(n==null||n.onClick(p)),typeof l=="function"&&l(),r&&h.closeModal(t)};return ne.jsxs(ne.Fragment,{children:[c&&ne.jsx(mn,{mb:"md",children:c}),ne.jsxs(un,{mt:c?0:"md",justify:"flex-end",...s,children:[ne.jsx(Nn,{variant:"default",...e,onClick:f,children:(e==null?void 0:e.children)||u}),ne.jsx(Nn,{...n,onClick:m,children:(n==null?void 0:n.children)||d})]})]})}const[Z2n,RK]=sNn("mantine-modals"),Q2n=RK("openModal"),J2n=RK("closeModal"),eAn=RK("closeAllModals"),tAn=RK("openConfirmModal"),nAn=t=>RK("openContextModal")(t),Ev={open:Q2n,close:J2n,closeAll:eAn,openConfirmModal:tAn,openContextModal:nAn};function fet(t,e){var n,i,r,o;e&&t.type==="confirm"&&((i=(n=t.props).onCancel)==null||i.call(n)),(o=(r=t.props).onClose)==null||o.call(r)}function iAn(t,e){switch(e.type){case"OPEN":return{current:e.modal,modals:[...t.modals,e.modal]};case"CLOSE":{const n=t.modals.find(r=>r.id===e.modalId);if(!n)return t;fet(n,e.canceled);const i=t.modals.filter(r=>r.id!==e.modalId);return{current:i[i.length-1]||t.current,modals:i}}case"CLOSE_ALL":return t.modals.length?(t.modals.concat().reverse().forEach(n=>{fet(n,e.canceled)}),{current:t.current,modals:[]}):t;default:return t}}function rAn(t){if(!t)return{confirmProps:{},modalProps:{}};const{id:e,children:n,onCancel:i,onConfirm:r,closeOnConfirm:o,closeOnCancel:s,cancelProps:a,confirmProps:l,groupProps:c,labels:u,...d}=t;return{confirmProps:{id:e,children:n,onCancel:i,onConfirm:r,closeOnConfirm:o,closeOnCancel:s,cancelProps:a,confirmProps:l,groupProps:c,labels:u},modalProps:{id:e,...d}}}function oAn({children:t,modalProps:e,labels:n,modals:i}){const[r,o]=b.useReducer(iAn,{modals:[],current:null}),s=b.useRef(r);s.current=r;const a=b.useCallback(g=>{o({type:"CLOSE_ALL",canceled:g})},[s,o]),l=b.useCallback(({modalId:g,...y})=>{const _=g||o3();return o({type:"OPEN",modal:{id:_,type:"content",props:y}}),_},[o]),c=b.useCallback(({modalId:g,...y})=>{const _=g||o3();return o({type:"OPEN",modal:{id:_,type:"confirm",props:y}}),_},[o]),u=b.useCallback((g,{modalId:y,..._})=>{const w=y||o3();return o({type:"OPEN",modal:{id:w,type:"context",props:_,ctx:g}}),w},[o]),d=b.useCallback((g,y)=>{o({type:"CLOSE",modalId:g,canceled:y})},[s,o]);Z2n({openModal:l,openConfirmModal:c,openContextModal:({modal:g,...y})=>u(g,y),closeModal:d,closeContextModal:d,closeAllModals:a});const h={modals:r.modals,openModal:l,openConfirmModal:c,openContextModal:u,closeModal:d,closeContextModal:d,closeAll:a},f=()=>{const g=s.current.current;switch(g==null?void 0:g.type){case"context":{const{innerProps:y,..._}=g.props,w=i[g.ctx];return{modalProps:_,content:ne.jsx(w,{innerProps:y,context:h,id:g.id})}}case"confirm":{const{modalProps:y,confirmProps:_}=rAn(g.props);return{modalProps:y,content:ne.jsx(X2n,{..._,id:g.id,labels:g.props.labels||n})}}case"content":{const{children:y,..._}=g.props;return{modalProps:_,content:y}}default:return{modalProps:{},content:null}}},{modalProps:m,content:p}=f();return ne.jsxs(_Fe.Provider,{value:h,children:[ne.jsx(bl,{zIndex:gb("modal")+1,...e,...m,opened:r.modals.length>0,onClose:()=>{var g;return d((g=r.current)==null?void 0:g.id)},children:p}),t]})}function sAn(t){let e=t,n=!1;const i=new Set;return{getState(){return e},updateState(r){e=typeof r=="function"?r(e):r},setState(r){this.updateState(r),i.forEach(o=>o(e))},initialize(r){n||(e=r,n=!0)},subscribe(r){return i.add(r),()=>i.delete(r)}}}function aAn(t){return b.useSyncExternalStore(t.subscribe,()=>t.getState(),()=>t.getState())}function lAn(t,e,n){const i=[],r=[],o={};for(const s of t){const a=s.position||e;o[a]=o[a]||0,o[a]+=1,o[a]<=n?r.push(s):i.push(s)}return{notifications:r,queue:i}}const cAn=()=>sAn({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),jA=cAn(),uAn=(t=jA)=>aAn(t);function JF(t,e){const n=t.getState(),i=e([...n.notifications,...n.queue]),r=lAn(i,n.defaultPosition,n.limit);t.setState({notifications:r.notifications,queue:r.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function dAn(t,e=jA){const n=t.id||o3();return JF(e,i=>t.id&&i.some(r=>r.id===t.id)?i:[...i,{...t,id:n}]),n}function FEt(t,e=jA){return JF(e,n=>n.filter(i=>{var r;return i.id===t?((r=i.onClose)==null||r.call(i,i),!1):!0})),t}function hAn(t,e=jA){return JF(e,n=>n.map(i=>i.id===t.id?{...i,...t}:i)),t.id}function fAn(t=jA){JF(t,()=>[])}function mAn(t=jA){JF(t,e=>e.slice(0,t.getState().limit))}const In={show:dAn,hide:FEt,update:hAn,clean:fAn,cleanQueue:mAn,updateState:JF};function $Et(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Lj(t,e)}var VEt={exports:{}};/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var met=Object.getOwnPropertySymbols,pAn=Object.prototype.hasOwnProperty,gAn=Object.prototype.propertyIsEnumerable;function bAn(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function vAn(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;var i=Object.getOwnPropertyNames(e).map(function(o){return e[o]});if(i.join("")!=="0123456789")return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(o){r[o]=o}),Object.keys(Object.assign({},r)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var yAn=vAn()?Object.assign:function(t,e){for(var n,i=bAn(t),r,o=1;o<arguments.length;o++){n=Object(arguments[o]);for(var s in n)pAn.call(n,s)&&(i[s]=n[s]);if(met){r=met(n);for(var a=0;a<r.length;a++)gAn.call(n,r[a])&&(i[r[a]]=n[r[a]])}}return i},_An="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",BEt=_An,zEt=Function.call.bind(Object.prototype.hasOwnProperty),XEe=function(){};{var xAn=BEt,ZEe={},wAn=zEt;XEe=function(t){var e="Warning: "+t;typeof console<"u"&&console.error(e);try{throw new Error(e)}catch{}}}function HEt(t,e,n,i,r){for(var o in t)if(wAn(t,o)){var s;try{if(typeof t[o]!="function"){var a=Error((i||"React class")+": "+n+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw a.name="Invariant Violation",a}s=t[o](e,o,i,n,null,xAn)}catch(c){s=c}if(s&&!(s instanceof Error)&&XEe((i||"React class")+": type specification of "+n+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in ZEe)){ZEe[s.message]=!0;var l=r?r():"";XEe("Failed "+n+" type: "+s.message+(l??""))}}}HEt.resetWarningCache=function(){ZEe={}};var CAn=HEt,SAn=rje,NAn=yAn,AP=BEt,W_e=zEt,pet=CAn,kO=function(){};kO=function(t){var e="Warning: "+t;typeof console<"u"&&console.error(e);try{throw new Error(e)}catch{}};function xZ(){return null}var EAn=function(t,e){var n=typeof Symbol=="function"&&Symbol.iterator,i="@@iterator";function r(P){var O=P&&(n&&P[n]||P[i]);if(typeof O=="function")return O}var o="<<anonymous>>",s={array:u("array"),bigint:u("bigint"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:d(),arrayOf:h,element:f(),elementType:m(),instanceOf:p,node:w(),objectOf:y,oneOf:g,oneOfType:_,shape:N,exact:E};function a(P,O){return P===O?P!==0||1/P===1/O:P!==P&&O!==O}function l(P,O){this.message=P,this.data=O&&typeof O=="object"?O:{},this.stack=""}l.prototype=Error.prototype;function c(P){var O={},V=0;function F(B,z,H,K,q,U,Y){if(K=K||o,U=U||H,Y!==AP){if(e){var J=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 J.name="Invariant Violation",J}else if(typeof console<"u"){var ae=K+":"+H;!O[ae]&&V<3&&(kO("You are manually calling a React.PropTypes validation function for the `"+U+"` prop on `"+K+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),O[ae]=!0,V++)}}return z[H]==null?B?z[H]===null?new l("The "+q+" `"+U+"` is marked as required "+("in `"+K+"`, but its value is `null`.")):new l("The "+q+" `"+U+"` is marked as required in "+("`"+K+"`, but its value is `undefined`.")):null:P(z,H,K,q,U)}var $=F.bind(null,!1);return $.isRequired=F.bind(null,!0),$}function u(P){function O(V,F,$,B,z,H){var K=V[F],q=M(K);if(q!==P){var U=T(K);return new l("Invalid "+B+" `"+z+"` of type "+("`"+U+"` supplied to `"+$+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return c(O)}function d(){return c(xZ)}function h(P){function O(V,F,$,B,z){if(typeof P!="function")return new l("Property `"+z+"` of component `"+$+"` has invalid PropType notation inside arrayOf.");var H=V[F];if(!Array.isArray(H)){var K=M(H);return new l("Invalid "+B+" `"+z+"` of type "+("`"+K+"` supplied to `"+$+"`, expected an array."))}for(var q=0;q<H.length;q++){var U=P(H,q,$,B,z+"["+q+"]",AP);if(U instanceof Error)return U}return null}return c(O)}function f(){function P(O,V,F,$,B){var z=O[V];if(!t(z)){var H=M(z);return new l("Invalid "+$+" `"+B+"` of type "+("`"+H+"` supplied to `"+F+"`, expected a single ReactElement."))}return null}return c(P)}function m(){function P(O,V,F,$,B){var z=O[V];if(!SAn.isValidElementType(z)){var H=M(z);return new l("Invalid "+$+" `"+B+"` of type "+("`"+H+"` supplied to `"+F+"`, expected a single ReactElement type."))}return null}return c(P)}function p(P){function O(V,F,$,B,z){if(!(V[F]instanceof P)){var H=P.name||o,K=R(V[F]);return new l("Invalid "+B+" `"+z+"` of type "+("`"+K+"` supplied to `"+$+"`, expected ")+("instance of `"+H+"`."))}return null}return c(O)}function g(P){if(!Array.isArray(P))return arguments.length>1?kO("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):kO("Invalid argument supplied to oneOf, expected an array."),xZ;function O(V,F,$,B,z){for(var H=V[F],K=0;K<P.length;K++)if(a(H,P[K]))return null;var q=JSON.stringify(P,function(Y,J){var ae=T(J);return ae==="symbol"?String(J):J});return new l("Invalid "+B+" `"+z+"` of value `"+String(H)+"` "+("supplied to `"+$+"`, expected one of "+q+"."))}return c(O)}function y(P){function O(V,F,$,B,z){if(typeof P!="function")return new l("Property `"+z+"` of component `"+$+"` has invalid PropType notation inside objectOf.");var H=V[F],K=M(H);if(K!=="object")return new l("Invalid "+B+" `"+z+"` of type "+("`"+K+"` supplied to `"+$+"`, expected an object."));for(var q in H)if(W_e(H,q)){var U=P(H,q,$,B,z+"."+q,AP);if(U instanceof Error)return U}return null}return c(O)}function _(P){if(!Array.isArray(P))return kO("Invalid argument supplied to oneOfType, expected an instance of array."),xZ;for(var O=0;O<P.length;O++){var V=P[O];if(typeof V!="function")return kO("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+A(V)+" at index "+O+"."),xZ}function F($,B,z,H,K){for(var q=[],U=0;U<P.length;U++){var Y=P[U],J=Y($,B,z,H,K,AP);if(J==null)return null;J.data&&W_e(J.data,"expectedType")&&q.push(J.data.expectedType)}var ae=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new l("Invalid "+H+" `"+K+"` supplied to "+("`"+z+"`"+ae+"."))}return c(F)}function w(){function P(O,V,F,$,B){return D(O[V])?null:new l("Invalid "+$+" `"+B+"` supplied to "+("`"+F+"`, expected a ReactNode."))}return c(P)}function C(P,O,V,F,$){return new l((P||"React class")+": "+O+" type `"+V+"."+F+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+$+"`.")}function N(P){function O(V,F,$,B,z){var H=V[F],K=M(H);if(K!=="object")return new l("Invalid "+B+" `"+z+"` of type `"+K+"` "+("supplied to `"+$+"`, expected `object`."));for(var q in P){var U=P[q];if(typeof U!="function")return C($,B,z,q,T(U));var Y=U(H,q,$,B,z+"."+q,AP);if(Y)return Y}return null}return c(O)}function E(P){function O(V,F,$,B,z){var H=V[F],K=M(H);if(K!=="object")return new l("Invalid "+B+" `"+z+"` of type `"+K+"` "+("supplied to `"+$+"`, expected `object`."));var q=NAn({},V[F],P);for(var U in q){var Y=P[U];if(W_e(P,U)&&typeof Y!="function")return C($,B,z,U,T(Y));if(!Y)return new l("Invalid "+B+" `"+z+"` key `"+U+"` supplied to `"+$+"`.\nBad object: "+JSON.stringify(V[F],null,"  ")+`
Valid keys: `+JSON.stringify(Object.keys(P),null,"  "));var J=Y(H,U,$,B,z+"."+U,AP);if(J)return J}return null}return c(O)}function D(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(D);if(P===null||t(P))return!0;var O=r(P);if(O){var V=O.call(P),F;if(O!==P.entries){for(;!(F=V.next()).done;)if(!D(F.value))return!1}else for(;!(F=V.next()).done;){var $=F.value;if($&&!D($[1]))return!1}}else return!1;return!0;default:return!1}}function k(P,O){return P==="symbol"?!0:O?O["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&O instanceof Symbol:!1}function M(P){var O=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":k(O,P)?"symbol":O}function T(P){if(typeof P>"u"||P===null)return""+P;var O=M(P);if(O==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return O}function A(P){var O=T(P);switch(O){case"array":case"object":return"an "+O;case"boolean":case"date":case"regexp":return"a "+O;default:return O}}function R(P){return!P.constructor||!P.constructor.name?o:P.constructor.name}return s.checkPropTypes=pet,s.resetWarningCache=pet.resetWarningCache,s.PropTypes=s,s};{var DAn=rje,kAn=!0;VEt.exports=EAn(DAn.isElement,kAn)}var MAn=VEt.exports;const Tn=ao(MAn),get={disabled:!1};var LAn=Tn.oneOfType([Tn.number,Tn.shape({enter:Tn.number,exit:Tn.number,appear:Tn.number}).isRequired]);Tn.oneOfType([Tn.string,Tn.shape({enter:Tn.string,exit:Tn.string,active:Tn.string}),Tn.shape({enter:Tn.string,enterDone:Tn.string,enterActive:Tn.string,exit:Tn.string,exitDone:Tn.string,exitActive:Tn.string})]);const Rne=Z.createContext(null);var TAn=function(e){return e.scrollTop},j7="unmounted",ML="exited",LL="entering",MO="entered",QEe="exiting",PS=function(t){$Et(e,t);function e(i,r){var o;o=t.call(this,i,r)||this;var s=r,a=s&&!s.isMounting?i.enter:i.appear,l;return o.appearStatus=null,i.in?a?(l=ML,o.appearStatus=LL):l=MO:i.unmountOnExit||i.mountOnEnter?l=j7:l=ML,o.state={status:l},o.nextCallback=null,o}e.getDerivedStateFromProps=function(r,o){var s=r.in;return s&&o.status===j7?{status:ML}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var o=null;if(r!==this.props){var s=this.state.status;this.props.in?s!==LL&&s!==MO&&(o=LL):(s===LL||s===MO)&&(o=QEe)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r=this.props.timeout,o,s,a;return o=s=a=r,r!=null&&typeof r!="number"&&(o=r.exit,s=r.enter,a=r.appear!==void 0?r.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(r,o){if(r===void 0&&(r=!1),o!==null)if(this.cancelNextCallback(),o===LL){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:sv.findDOMNode(this);s&&TAn(s)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ML&&this.setState({status:j7})},n.performEnter=function(r){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:r,l=this.props.nodeRef?[a]:[sv.findDOMNode(this),a],c=l[0],u=l[1],d=this.getTimeouts(),h=a?d.appear:d.enter;if(!r&&!s||get.disabled){this.safeSetState({status:MO},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:LL},function(){o.props.onEntering(c,u),o.onTransitionEnd(h,function(){o.safeSetState({status:MO},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var r=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:sv.findDOMNode(this);if(!o||get.disabled){this.safeSetState({status:ML},function(){r.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:QEe},function(){r.props.onExiting(a),r.onTransitionEnd(s.exit,function(){r.safeSetState({status:ML},function(){r.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,o){o=this.setNextCallback(o),this.setState(r,o)},n.setNextCallback=function(r){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,r(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(r,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:sv.findDOMNode(this),a=r==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}r!=null&&setTimeout(this.nextCallback,r)},n.render=function(){var r=this.state.status;if(r===j7)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=$F(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Z.createElement(Rne.Provider,{value:null},typeof s=="function"?s(r,a):Z.cloneElement(Z.Children.only(s),a))},e}(Z.Component);PS.contextType=Rne;PS.propTypes={nodeRef:Tn.shape({current:typeof Element>"u"?Tn.any:function(t,e,n,i,r,o){var s=t[e];return Tn.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(t,e,n,i,r,o)}}),children:Tn.oneOfType([Tn.func.isRequired,Tn.element.isRequired]).isRequired,in:Tn.bool,mountOnEnter:Tn.bool,unmountOnExit:Tn.bool,appear:Tn.bool,enter:Tn.bool,exit:Tn.bool,timeout:function(e){var n=LAn;e.addEndListener||(n=n.isRequired);for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];return n.apply(void 0,[e].concat(r))},addEndListener:Tn.func,onEnter:Tn.func,onEntering:Tn.func,onEntered:Tn.func,onExit:Tn.func,onExiting:Tn.func,onExited:Tn.func};function RP(){}PS.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:RP,onEntering:RP,onEntered:RP,onExit:RP,onExiting:RP,onExited:RP};PS.UNMOUNTED=j7;PS.EXITED=ML;PS.ENTERING=LL;PS.ENTERED=MO;PS.EXITING=QEe;function xFe(t,e){var n=function(o){return e&&b.isValidElement(o)?e(o):o},i=Object.create(null);return t&&b.Children.map(t,function(r){return r}).forEach(function(r){i[r.key]=n(r)}),i}function IAn(t,e){t=t||{},e=e||{};function n(u){return u in e?e[u]:t[u]}var i=Object.create(null),r=[];for(var o in t)o in e?r.length&&(i[o]=r,r=[]):r.push(o);var s,a={};for(var l in e){if(i[l])for(s=0;s<i[l].length;s++){var c=i[l][s];a[i[l][s]]=n(c)}a[l]=n(l)}for(s=0;s<r.length;s++)a[r[s]]=n(r[s]);return a}function LT(t,e,n){return n[e]!=null?n[e]:t.props[e]}function AAn(t,e){return xFe(t.children,function(n){return b.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:LT(n,"appear",t),enter:LT(n,"enter",t),exit:LT(n,"exit",t)})})}function RAn(t,e,n){var i=xFe(t.children),r=IAn(e,i);return Object.keys(r).forEach(function(o){var s=r[o];if(b.isValidElement(s)){var a=o in e,l=o in i,c=e[o],u=b.isValidElement(c)&&!c.props.in;l&&(!a||u)?r[o]=b.cloneElement(s,{onExited:n.bind(null,s),in:!0,exit:LT(s,"exit",t),enter:LT(s,"enter",t)}):!l&&a&&!u?r[o]=b.cloneElement(s,{in:!1}):l&&a&&b.isValidElement(c)&&(r[o]=b.cloneElement(s,{onExited:n.bind(null,s),in:c.props.in,exit:LT(s,"exit",t),enter:LT(s,"enter",t)}))}}),r}var PAn=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},OAn={component:"div",childFactory:function(e){return e}},oE=function(t){$Et(e,t);function e(i,r){var o;o=t.call(this,i,r)||this;var s=o.handleExited.bind(bn(o));return o.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},o}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(r,o){var s=o.children,a=o.handleExited,l=o.firstRender;return{children:l?AAn(r,a):RAn(r,s,a),firstRender:!1}},n.handleExited=function(r,o){var s=xFe(this.props.children);r.key in s||(r.props.onExited&&r.props.onExited(o),this.mounted&&this.setState(function(a){var l=lt({},a.children);return delete l[r.key],{children:l}}))},n.render=function(){var r=this.props,o=r.component,s=r.childFactory,a=$F(r,["component","childFactory"]),l=this.state.contextValue,c=PAn(this.state.children).map(s);return delete a.appear,delete a.enter,delete a.exit,o===null?Z.createElement(Rne.Provider,{value:l},c):Z.createElement(Rne.Provider,{value:l},Z.createElement(o,a,c))},e}(Z.Component);oE.propTypes={component:Tn.any,children:Tn.node,appear:Tn.bool,enter:Tn.bool,exit:Tn.bool,childFactory:Tn.func};oE.defaultProps=OAn;const WEt=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function jAn(t,e){return t.reduce((n,i)=>(n[i.position||e].push(i),n),WEt.reduce((n,i)=>(n[i]=[],n),{}))}const bet={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},FAn={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function $An({state:t,maxHeight:e,position:n,transitionDuration:i}){const[r,o]=n.split("-"),s=o==="center"?`${r}-center`:o,a={opacity:0,maxHeight:e,transform:bet[s],transitionDuration:`${i}ms, ${i}ms, ${i}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},l={opacity:1,transform:FAn[s]},c={opacity:0,maxHeight:0,transform:bet[s]};return{...a,...{entering:l,entered:l,exiting:c,exited:c}[t]}}function VAn(t,e){return typeof e=="number"?e:e===!1||t===!1?!1:t}const UEt=b.forwardRef(({data:t,onHide:e,autoClose:n,...i},r)=>{const{autoClose:o,message:s,...a}=t,l=VAn(n,t.autoClose),c=b.useRef(),u=()=>window.clearTimeout(c.current),d=()=>{e(t.id),u()},h=()=>{typeof l=="number"&&(c.current=window.setTimeout(d,l))};return b.useEffect(()=>{var f;(f=t.onOpen)==null||f.call(t,t)},[]),b.useEffect(()=>(h(),u),[l]),ne.jsx(cFe,{...i,...a,onClose:d,ref:r,onMouseEnter:u,onMouseLeave:h,children:s})});UEt.displayName="@mantine/notifications/NotificationContainer";var KEt={root:"m_b37d9ac7",notification:"m_5ed0edd0"};const BAn=PS,zAn={position:"bottom-right",autoClose:4e3,transitionDuration:250,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:gb("overlay"),store:jA,withinPortal:!0},HAn=(t,{zIndex:e,containerWidth:n})=>({root:{"--notifications-z-index":e==null?void 0:e.toString(),"--notifications-container-width":sn(n)}}),OS=Dn((t,e)=>{const n=Kt("Notifications",zAn,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,position:c,autoClose:u,transitionDuration:d,containerWidth:h,notificationMaxHeight:f,limit:m,zIndex:p,store:g,portalProps:y,withinPortal:_,...w}=n,C=zc(),N=uAn(g),E=KSn(),D=rde(),k=b.useRef({}),M=b.useRef(0),A=(C.respectReducedMotion?D:!1)?1:d,R=hi({name:"Notifications",classes:KEt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:HAn});b.useEffect(()=>{g==null||g.updateState(V=>({...V,limit:m||5,defaultPosition:c}))},[m,c]),Fp(()=>{N.notifications.length>M.current&&setTimeout(()=>E(),0),M.current=N.notifications.length},[N.notifications]);const P=jAn(N.notifications,c),O=WEt.reduce((V,F)=>(V[F]=P[F].map(({style:$,...B})=>ne.jsx(BAn,{timeout:A,onEnter:()=>k.current[B.id].offsetHeight,nodeRef:{current:k.current[B.id]},children:z=>ne.jsx(UEt,{ref:H=>{k.current[B.id]=H},data:B,onHide:H=>FEt(H,g),autoClose:u,...R("notification",{style:{...$An({state:z,position:F,transitionDuration:A,maxHeight:f}),...$}})})},B.id)),V),{});return ne.jsxs(AA,{withinPortal:_,...y,children:[ne.jsx(mn,{...R("root"),"data-position":"top-center",ref:e,...w,children:ne.jsx(oE,{children:O["top-center"]})}),ne.jsx(mn,{...R("root"),"data-position":"top-left",...w,children:ne.jsx(oE,{children:O["top-left"]})}),ne.jsx(mn,{...R("root"),"data-position":"top-right",...w,children:ne.jsx(oE,{children:O["top-right"]})}),ne.jsx(mn,{...R("root"),"data-position":"bottom-right",...w,children:ne.jsx(oE,{children:O["bottom-right"]})}),ne.jsx(mn,{...R("root"),"data-position":"bottom-left",...w,children:ne.jsx(oE,{children:O["bottom-left"]})}),ne.jsx(mn,{...R("root"),"data-position":"bottom-center",...w,children:ne.jsx(oE,{children:O["bottom-center"]})})]})});OS.classes=KEt;OS.displayName="@mantine/notifications/Notifications";OS.show=In.show;OS.hide=In.hide;OS.update=In.update;OS.clean=In.clean;OS.cleanQueue=In.cleanQueue;OS.updateState=In.updateState;class FA{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const n={listener:e};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Pz=typeof window>"u"||"Deno"in window;function Zb(){}function WAn(t,e){return typeof t=="function"?t(e):t}function JEe(t){return typeof t=="number"&&t>=0&&t!==1/0}function vet(t,e){return t.filter(n=>!e.includes(n))}function UAn(t,e,n){const i=t.slice(0);return i[e]=n,i}function qEt(t,e){return Math.max(t+(e||0)-Date.now(),0)}function YO(t,e,n){return PK(t)?typeof e=="function"?{...n,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function KAn(t,e,n){return PK(t)?{...e,mutationKey:t}:typeof t=="function"?{...e,mutationFn:t}:{...t}}function sE(t,e,n){return PK(t)?[{...e,queryKey:t},n]:[t||{},e]}function yet(t,e){const{type:n="all",exact:i,fetchStatus:r,predicate:o,queryKey:s,stale:a}=t;if(PK(s)){if(i){if(e.queryHash!==wFe(s,e.options))return!1}else if(!XO(e.queryKey,s))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||typeof r<"u"&&r!==e.state.fetchStatus||o&&!o(e))}function _et(t,e){const{exact:n,fetching:i,predicate:r,mutationKey:o}=t;if(PK(o)){if(!e.options.mutationKey)return!1;if(n){if(PE(e.options.mutationKey)!==PE(o))return!1}else if(!XO(e.options.mutationKey,o))return!1}return!(typeof i=="boolean"&&e.state.status==="loading"!==i||r&&!r(e))}function wFe(t,e){return((e==null?void 0:e.queryKeyHashFn)||PE)(t)}function PE(t){return JSON.stringify(t,(e,n)=>eDe(n)?Object.keys(n).sort().reduce((i,r)=>(i[r]=n[r],i),{}):n)}function XO(t,e){return GEt(t,e)}function GEt(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!GEt(t[n],e[n])):!1}function YEt(t,e){if(t===e)return t;const n=xet(t)&&xet(e);if(n||eDe(t)&&eDe(e)){const i=n?t.length:Object.keys(t).length,r=n?e:Object.keys(e),o=r.length,s=n?[]:{};let a=0;for(let l=0;l<o;l++){const c=n?l:r[l];s[c]=YEt(t[c],e[c]),s[c]===t[c]&&a++}return i===o&&a===i?t:s}return e}function Pne(t,e){if(t&&!e||e&&!t)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function xet(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function eDe(t){if(!wet(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!wet(n)||!n.hasOwnProperty("isPrototypeOf"))}function wet(t){return Object.prototype.toString.call(t)==="[object Object]"}function PK(t){return Array.isArray(t)}function XEt(t){return new Promise(e=>{setTimeout(e,t)})}function Cet(t){XEt(0).then(t)}function qAn(){if(typeof AbortController=="function")return new AbortController}function tDe(t,e,n){return n.isDataEqual!=null&&n.isDataEqual(t,e)?t:typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?YEt(t,e):e}class GAn extends FA{constructor(){super(),this.setup=e=>{if(!Pz&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var n;this.setup=e,(n=this.cleanup)==null||n.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const One=new GAn,Net=["online","offline"];class YAn extends FA{constructor(){super(),this.setup=e=>{if(!Pz&&window.addEventListener){const n=()=>e();return Net.forEach(i=>{window.addEventListener(i,n,!1)}),()=>{Net.forEach(i=>{window.removeEventListener(i,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var n;this.setup=e,(n=this.cleanup)==null||n.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setOnline(i):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const jne=new YAn;function XAn(t){return Math.min(1e3*2**t,3e4)}function qde(t){return(t??"online")==="online"?jne.isOnline():!0}class ZEt{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function kee(t){return t instanceof ZEt}function QEt(t){let e=!1,n=0,i=!1,r,o,s;const a=new Promise((g,y)=>{o=g,s=y}),l=g=>{i||(f(new ZEt(g)),t.abort==null||t.abort())},c=()=>{e=!0},u=()=>{e=!1},d=()=>!One.isFocused()||t.networkMode!=="always"&&!jne.isOnline(),h=g=>{i||(i=!0,t.onSuccess==null||t.onSuccess(g),r==null||r(),o(g))},f=g=>{i||(i=!0,t.onError==null||t.onError(g),r==null||r(),s(g))},m=()=>new Promise(g=>{r=y=>{const _=i||!d();return _&&g(y),_},t.onPause==null||t.onPause()}).then(()=>{r=void 0,i||t.onContinue==null||t.onContinue()}),p=()=>{if(i)return;let g;try{g=t.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(h).catch(y=>{var _,w;if(i)return;const C=(_=t.retry)!=null?_:3,N=(w=t.retryDelay)!=null?w:XAn,E=typeof N=="function"?N(n,y):N,D=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,y);if(e||!D){f(y);return}n++,t.onFail==null||t.onFail(n,y),XEt(E).then(()=>{if(d())return m()}).then(()=>{e?f(y):p()})})};return qde(t.networkMode)?p():m().then(p),{promise:a,cancel:l,continue:()=>(r==null?void 0:r())?a:Promise.resolve(),cancelRetry:c,continueRetry:u}}const CFe=console;function ZAn(){let t=[],e=0,n=u=>{u()},i=u=>{u()};const r=u=>{let d;e++;try{d=u()}finally{e--,e||a()}return d},o=u=>{e?t.push(u):Cet(()=>{n(u)})},s=u=>(...d)=>{o(()=>{u(...d)})},a=()=>{const u=t;t=[],u.length&&Cet(()=>{i(()=>{u.forEach(d=>{n(d)})})})};return{batch:r,batchCalls:s,schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{i=u}}}const Vl=ZAn();class JEt{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),JEe(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(Pz?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class QAn extends JEt{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||CFe,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||JAn(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,n){const i=tDe(this.state.data,e,this.options);return this.dispatch({data:i,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),i}setState(e,n){this.dispatch({type:"setState",state:e,setStateOptions:n})}cancel(e){var n;const i=this.promise;return(n=this.retryer)==null||n.cancel(e),i?i.then(Zb).catch(Zb):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!qEt(this.state.dataUpdatedAt,e)}onFocus(){var e;const n=this.observers.find(i=>i.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const n=this.observers.find(i=>i.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,n){var i,r;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var o;return(o=this.retryer)==null||o.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(m=>m.options.queryFn);f&&this.setOptions(f.options)}Array.isArray(this.options.queryKey)||this.logger.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']");const s=qAn(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};l(a);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),u={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(l(u),(i=this.options.behavior)==null||i.onFetch(u),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((r=u.fetchOptions)==null?void 0:r.meta)){var d;this.dispatch({type:"fetch",meta:(d=u.fetchOptions)==null?void 0:d.meta})}const h=f=>{if(kee(f)&&f.silent||this.dispatch({type:"error",error:f}),!kee(f)){var m,p,g,y;(m=(p=this.cache.config).onError)==null||m.call(p,f,this),(g=(y=this.cache.config).onSettled)==null||g.call(y,this.state.data,f,this),this.logger.error(f)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=QEt({fn:u.fetchFn,abort:s==null?void 0:s.abort.bind(s),onSuccess:f=>{var m,p,g,y;if(typeof f>"u"){this.logger.error("Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: "+this.queryHash),h(new Error(this.queryHash+" data is undefined"));return}this.setData(f),(m=(p=this.cache.config).onSuccess)==null||m.call(p,f,this),(g=(y=this.cache.config).onSettled)==null||g.call(y,f,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:h,onFail:(f,m)=>{this.dispatch({type:"failed",failureCount:f,error:m})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const n=i=>{var r,o;switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(r=e.meta)!=null?r:null,fetchStatus:qde(this.options.networkMode)?"fetching":"paused",...!i.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...i,data:e.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:(o=e.dataUpdatedAt)!=null?o:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return kee(s)&&s.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...i,error:s,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=n(this.state),Vl.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function JAn(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=typeof e<"u",i=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class eRn extends FA{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,n,i){var r;const o=n.queryKey,s=(r=n.queryHash)!=null?r:wFe(o,n);let a=this.get(s);return a||(a=new QAn({cache:this,logger:e.getLogger(),queryKey:o,queryHash:s,options:e.defaultQueryOptions(n),state:i,defaultOptions:e.getQueryDefaults(o)}),this.add(a)),a}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const n=this.queriesMap[e.queryHash];n&&(e.destroy(),this.queries=this.queries.filter(i=>i!==e),n===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){Vl.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,n){const[i]=sE(e,n);return typeof i.exact>"u"&&(i.exact=!0),this.queries.find(r=>yet(i,r))}findAll(e,n){const[i]=sE(e,n);return Object.keys(i).length>0?this.queries.filter(r=>yet(i,r)):this.queries}notify(e){Vl.batch(()=>{this.listeners.forEach(({listener:n})=>{n(e)})})}onFocus(){Vl.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){Vl.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class tRn extends JEt{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||CFe,this.observers=[],this.state=e.state||eDt(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(n=>n!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,n;return(e=(n=this.retryer)==null?void 0:n.continue())!=null?e:this.execute()}async execute(){const e=()=>{var D;return this.retryer=QEt({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(k,M)=>{this.dispatch({type:"failed",failureCount:k,error:M})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(D=this.options.retry)!=null?D:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var i,r,o,s,a,l,c,u;if(!n){var d,h,f,m;this.dispatch({type:"loading",variables:this.options.variables}),await((d=(h=this.mutationCache.config).onMutate)==null?void 0:d.call(h,this.state.variables,this));const k=await((f=(m=this.options).onMutate)==null?void 0:f.call(m,this.state.variables));k!==this.state.context&&this.dispatch({type:"loading",context:k,variables:this.state.variables})}const D=await e();return await((i=(r=this.mutationCache.config).onSuccess)==null?void 0:i.call(r,D,this.state.variables,this.state.context,this)),await((o=(s=this.options).onSuccess)==null?void 0:o.call(s,D,this.state.variables,this.state.context)),await((a=(l=this.mutationCache.config).onSettled)==null?void 0:a.call(l,D,null,this.state.variables,this.state.context,this)),await((c=(u=this.options).onSettled)==null?void 0:c.call(u,D,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:D}),D}catch(D){try{var p,g,y,_,w,C,N,E;throw await((p=(g=this.mutationCache.config).onError)==null?void 0:p.call(g,D,this.state.variables,this.state.context,this)),this.logger.error(D),await((y=(_=this.options).onError)==null?void 0:y.call(_,D,this.state.variables,this.state.context)),await((w=(C=this.mutationCache.config).onSettled)==null?void 0:w.call(C,void 0,D,this.state.variables,this.state.context,this)),await((N=(E=this.options).onSettled)==null?void 0:N.call(E,void 0,D,this.state.variables,this.state.context)),D}finally{this.dispatch({type:"error",error:D})}}}dispatch(e){const n=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"loading":return{...i,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!qde(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...i,...e.state}}};this.state=n(this.state),Vl.batch(()=>{this.observers.forEach(i=>{i.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function eDt(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class nRn extends FA{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,n,i){const r=new tRn({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(n),state:i,defaultOptions:n.mutationKey?e.getMutationDefaults(n.mutationKey):void 0});return this.add(r),r}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(n=>n!==e),this.notify({type:"removed",mutation:e})}clear(){Vl.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(n=>_et(e,n))}findAll(e){return this.mutations.filter(n=>_et(e,n))}notify(e){Vl.batch(()=>{this.listeners.forEach(({listener:n})=>{n(e)})})}resumePausedMutations(){var e;return this.resuming=((e=this.resuming)!=null?e:Promise.resolve()).then(()=>{const n=this.mutations.filter(i=>i.state.isPaused);return Vl.batch(()=>n.reduce((i,r)=>i.then(()=>r.continue().catch(Zb)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function nDe(){return{onFetch:t=>{t.fetchFn=()=>{var e,n,i,r,o,s;const a=(e=t.fetchOptions)==null||(n=e.meta)==null?void 0:n.refetchPage,l=(i=t.fetchOptions)==null||(r=i.meta)==null?void 0:r.fetchMore,c=l==null?void 0:l.pageParam,u=(l==null?void 0:l.direction)==="forward",d=(l==null?void 0:l.direction)==="backward",h=((o=t.state.data)==null?void 0:o.pages)||[],f=((s=t.state.data)==null?void 0:s.pageParams)||[];let m=f,p=!1;const g=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>{var D;if((D=t.signal)!=null&&D.aborted)p=!0;else{var k;(k=t.signal)==null||k.addEventListener("abort",()=>{p=!0})}return t.signal}})},y=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),_=(E,D,k,M)=>(m=M?[D,...m]:[...m,D],M?[k,...E]:[...E,k]),w=(E,D,k,M)=>{if(p)return Promise.reject("Cancelled");if(typeof k>"u"&&!D&&E.length)return Promise.resolve(E);const T={queryKey:t.queryKey,pageParam:k,meta:t.options.meta};g(T);const A=y(T);return Promise.resolve(A).then(P=>_(E,k,P,M))};let C;if(!h.length)C=w([]);else if(u){const E=typeof c<"u",D=E?c:iDe(t.options,h);C=w(h,E,D)}else if(d){const E=typeof c<"u",D=E?c:tDt(t.options,h);C=w(h,E,D,!0)}else{m=[];const E=typeof t.options.getNextPageParam>"u";C=(a&&h[0]?a(h[0],0,h):!0)?w([],E,f[0]):Promise.resolve(_([],f[0],h[0]));for(let k=1;k<h.length;k++)C=C.then(M=>{if(a&&h[k]?a(h[k],k,h):!0){const A=E?f[k]:iDe(t.options,M);return w(M,E,A)}return Promise.resolve(_(M,f[k],h[k]))})}return C.then(E=>({pages:E,pageParams:m}))}}}}function iDe(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function tDt(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}function iRn(t,e){if(t.getNextPageParam&&Array.isArray(e)){const n=iDe(t,e);return typeof n<"u"&&n!==null&&n!==!1}}function rRn(t,e){if(t.getPreviousPageParam&&Array.isArray(e)){const n=tDt(t,e);return typeof n<"u"&&n!==null&&n!==!1}}class oRn{constructor(e={}){this.queryCache=e.queryCache||new eRn,this.mutationCache=e.mutationCache||new nRn,this.logger=e.logger||CFe,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,e.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=One.subscribe(()=>{One.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=jne.subscribe(()=>{jne.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,n;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(e,n){const[i]=sE(e,n);return i.fetchStatus="fetching",this.queryCache.findAll(i).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,n){var i;return(i=this.queryCache.find(e,n))==null?void 0:i.state.data}ensureQueryData(e,n,i){const r=YO(e,n,i),o=this.getQueryData(r.queryKey);return o?Promise.resolve(o):this.fetchQuery(r)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:n,state:i})=>{const r=i.data;return[n,r]})}setQueryData(e,n,i){const r=this.queryCache.find(e),o=r==null?void 0:r.state.data,s=WAn(n,o);if(typeof s>"u")return;const a=YO(e),l=this.defaultQueryOptions(a);return this.queryCache.build(this,l).setData(s,{...i,manual:!0})}setQueriesData(e,n,i){return Vl.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,n,i)]))}getQueryState(e,n){var i;return(i=this.queryCache.find(e,n))==null?void 0:i.state}removeQueries(e,n){const[i]=sE(e,n),r=this.queryCache;Vl.batch(()=>{r.findAll(i).forEach(o=>{r.remove(o)})})}resetQueries(e,n,i){const[r,o]=sE(e,n,i),s=this.queryCache,a={type:"active",...r};return Vl.batch(()=>(s.findAll(r).forEach(l=>{l.reset()}),this.refetchQueries(a,o)))}cancelQueries(e,n,i){const[r,o={}]=sE(e,n,i);typeof o.revert>"u"&&(o.revert=!0);const s=Vl.batch(()=>this.queryCache.findAll(r).map(a=>a.cancel(o)));return Promise.all(s).then(Zb).catch(Zb)}invalidateQueries(e,n,i){const[r,o]=sE(e,n,i);return Vl.batch(()=>{var s,a;if(this.queryCache.findAll(r).forEach(c=>{c.invalidate()}),r.refetchType==="none")return Promise.resolve();const l={...r,type:(s=(a=r.refetchType)!=null?a:r.type)!=null?s:"active"};return this.refetchQueries(l,o)})}refetchQueries(e,n,i){const[r,o]=sE(e,n,i),s=Vl.batch(()=>this.queryCache.findAll(r).filter(l=>!l.isDisabled()).map(l=>{var c;return l.fetch(void 0,{...o,cancelRefetch:(c=o==null?void 0:o.cancelRefetch)!=null?c:!0,meta:{refetchPage:r.refetchPage}})}));let a=Promise.all(s).then(Zb);return o!=null&&o.throwOnError||(a=a.catch(Zb)),a}fetchQuery(e,n,i){const r=YO(e,n,i),o=this.defaultQueryOptions(r);typeof o.retry>"u"&&(o.retry=!1);const s=this.queryCache.build(this,o);return s.isStaleByTime(o.staleTime)?s.fetch(o):Promise.resolve(s.state.data)}prefetchQuery(e,n,i){return this.fetchQuery(e,n,i).then(Zb).catch(Zb)}fetchInfiniteQuery(e,n,i){const r=YO(e,n,i);return r.behavior=nDe(),this.fetchQuery(r)}prefetchInfiniteQuery(e,n,i){return this.fetchInfiniteQuery(e,n,i).then(Zb).catch(Zb)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,n){const i=this.queryDefaults.find(r=>PE(e)===PE(r.queryKey));i?i.defaultOptions=n:this.queryDefaults.push({queryKey:e,defaultOptions:n})}getQueryDefaults(e){if(!e)return;const n=this.queryDefaults.find(i=>XO(e,i.queryKey));return this.queryDefaults.filter(r=>XO(e,r.queryKey)).length>1&&this.logger.error("[QueryClient] Several query defaults match with key '"+JSON.stringify(e)+"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults."),n==null?void 0:n.defaultOptions}setMutationDefaults(e,n){const i=this.mutationDefaults.find(r=>PE(e)===PE(r.mutationKey));i?i.defaultOptions=n:this.mutationDefaults.push({mutationKey:e,defaultOptions:n})}getMutationDefaults(e){if(!e)return;const n=this.mutationDefaults.find(i=>XO(e,i.mutationKey));return this.mutationDefaults.filter(r=>XO(e,r.mutationKey)).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(e)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults."),n==null?void 0:n.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const n={...this.defaultOptions.queries,...this.getQueryDefaults(e==null?void 0:e.queryKey),...e,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=wFe(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e==null?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class SFe extends FA{constructor(e,n){super(),this.client=e,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),Eet(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return rDe(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return rDe(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,n){const i=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),typeof(e==null?void 0:e.isDataEqual)<"u"&&this.client.getLogger().error("The isDataEqual option has been deprecated and will be removed in the next major version. You can achieve the same functionality by passing a function as the structuralSharing option"),Pne(i,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=i.queryKey),this.updateQuery();const o=this.hasListeners();o&&Det(this.currentQuery,r,this.options,i)&&this.executeFetch(),this.updateResult(n),o&&(this.currentQuery!==r||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();o&&(this.currentQuery!==r||this.options.enabled!==i.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(e){const n=this.client.getQueryCache().build(this.client,e),i=this.createResult(n,e);return aRn(this,i,e)&&(this.currentResult=i,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),i}getCurrentResult(){return this.currentResult}trackResult(e){const n={};return Object.keys(e).forEach(i=>{Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(i),e[i])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...n}={}){return this.fetch({...n,meta:{refetchPage:e}})}fetchOptimistic(e){const n=this.client.defaultQueryOptions(e),i=this.client.getQueryCache().build(this.client,n);return i.isFetchingOptimistic=!0,i.fetch().then(()=>this.createResult(i,n))}fetch(e){var n;return this.executeFetch({...e,cancelRefetch:(n=e.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let n=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Zb)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Pz||this.currentResult.isStale||!JEe(this.options.staleTime))return;const n=qEt(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(Pz||this.options.enabled===!1||!JEe(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||One.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,n){const i=this.currentQuery,r=this.options,o=this.currentResult,s=this.currentResultState,a=this.currentResultOptions,l=e!==i,c=l?e.state:this.currentQueryInitialState,u=l?this.currentResult:this.previousQueryResult,{state:d}=e;let{dataUpdatedAt:h,error:f,errorUpdatedAt:m,fetchStatus:p,status:g}=d,y=!1,_=!1,w;if(n._optimisticResults){const k=this.hasListeners(),M=!k&&Eet(e,n),T=k&&Det(e,i,n,r);(M||T)&&(p=qde(e.options.networkMode)?"fetching":"paused",h||(g="loading")),n._optimisticResults==="isRestoring"&&(p="idle")}if(n.keepPreviousData&&!d.dataUpdatedAt&&u!=null&&u.isSuccess&&g!=="error")w=u.data,h=u.dataUpdatedAt,g=u.status,y=!0;else if(n.select&&typeof d.data<"u")if(o&&d.data===(s==null?void 0:s.data)&&n.select===this.selectFn)w=this.selectResult;else try{this.selectFn=n.select,w=n.select(d.data),w=tDe(o==null?void 0:o.data,w,n),this.selectResult=w,this.selectError=null}catch(k){this.client.getLogger().error(k),this.selectError=k}else w=d.data;if(typeof n.placeholderData<"u"&&typeof w>"u"&&g==="loading"){let k;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))k=o.data;else if(k=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof k<"u")try{k=n.select(k),this.selectError=null}catch(M){this.client.getLogger().error(M),this.selectError=M}typeof k<"u"&&(g="success",w=tDe(o==null?void 0:o.data,k,n),_=!0)}this.selectError&&(f=this.selectError,w=this.selectResult,m=Date.now(),g="error");const C=p==="fetching",N=g==="loading",E=g==="error";return{status:g,fetchStatus:p,isLoading:N,isSuccess:g==="success",isError:E,isInitialLoading:N&&C,data:w,dataUpdatedAt:h,error:f,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:C,isRefetching:C&&!N,isLoadingError:E&&d.dataUpdatedAt===0,isPaused:p==="paused",isPlaceholderData:_,isPreviousData:y,isRefetchError:E&&d.dataUpdatedAt!==0,isStale:NFe(e,n),refetch:this.refetch,remove:this.remove}}updateResult(e){const n=this.currentResult,i=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Pne(i,n))return;this.currentResult=i;const r={cache:!0},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!this.trackedProps.size)return!0;const l=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(c=>{const u=c;return this.currentResult[u]!==n[u]&&l.has(u)})};(e==null?void 0:e.listeners)!==!1&&o()&&(r.listeners=!0),this.notify({...r,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const n={};e.type==="success"?n.onSuccess=!e.manual:e.type==="error"&&!kee(e.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(e){Vl.batch(()=>{if(e.onSuccess){var n,i,r,o;(n=(i=this.options).onSuccess)==null||n.call(i,this.currentResult.data),(r=(o=this.options).onSettled)==null||r.call(o,this.currentResult.data,null)}else if(e.onError){var s,a,l,c;(s=(a=this.options).onError)==null||s.call(a,this.currentResult.error),(l=(c=this.options).onSettled)==null||l.call(c,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:u})=>{u(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function sRn(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Eet(t,e){return sRn(t,e)||t.state.dataUpdatedAt>0&&rDe(t,e,e.refetchOnMount)}function rDe(t,e,n){if(e.enabled!==!1){const i=typeof n=="function"?n(t):n;return i==="always"||i!==!1&&NFe(t,e)}return!1}function Det(t,e,n,i){return n.enabled!==!1&&(t!==e||i.enabled===!1)&&(!n.suspense||t.state.status!=="error")&&NFe(t,n)}function NFe(t,e){return t.isStaleByTime(e.staleTime)}function aRn(t,e,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?e.isPlaceholderData:!Pne(t.getCurrentResult(),e)}class lRn extends FA{constructor(e,n){super(),this.client=e,this.queries=[],this.result=[],this.observers=[],this.observersMap={},n&&this.setQueries(n)}onSubscribe(){this.listeners.size===1&&this.observers.forEach(e=>{e.subscribe(n=>{this.onUpdate(e,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.observers.forEach(e=>{e.destroy()})}setQueries(e,n){this.queries=e,Vl.batch(()=>{const i=this.observers,r=this.findMatchingObservers(this.queries);r.forEach(c=>c.observer.setOptions(c.defaultedQueryOptions,n));const o=r.map(c=>c.observer),s=Object.fromEntries(o.map(c=>[c.options.queryHash,c])),a=o.map(c=>c.getCurrentResult()),l=o.some((c,u)=>c!==i[u]);i.length===o.length&&!l||(this.observers=o,this.observersMap=s,this.result=a,this.hasListeners()&&(vet(i,o).forEach(c=>{c.destroy()}),vet(o,i).forEach(c=>{c.subscribe(u=>{this.onUpdate(c,u)})}),this.notify()))})}getCurrentResult(){return this.result}getQueries(){return this.observers.map(e=>e.getCurrentQuery())}getObservers(){return this.observers}getOptimisticResult(e){return this.findMatchingObservers(e).map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions))}findMatchingObservers(e){const n=this.observers,i=new Map(n.map(f=>[f.options.queryHash,f])),r=e.map(f=>this.client.defaultQueryOptions(f)),o=r.flatMap(f=>{const m=i.get(f.queryHash);return m!=null?[{defaultedQueryOptions:f,observer:m}]:[]}),s=new Set(o.map(f=>f.defaultedQueryOptions.queryHash)),a=r.filter(f=>!s.has(f.queryHash)),l=new Set(o.map(f=>f.observer)),c=n.filter(f=>!l.has(f)),u=f=>{const m=this.client.defaultQueryOptions(f),p=this.observersMap[m.queryHash];return p??new SFe(this.client,m)},d=a.map((f,m)=>{if(f.keepPreviousData){const p=c[m];if(p!==void 0)return{defaultedQueryOptions:f,observer:p}}return{defaultedQueryOptions:f,observer:u(f)}}),h=(f,m)=>r.indexOf(f.defaultedQueryOptions)-r.indexOf(m.defaultedQueryOptions);return o.concat(d).sort(h)}onUpdate(e,n){const i=this.observers.indexOf(e);i!==-1&&(this.result=UAn(this.result,i,n),this.notify())}notify(){Vl.batch(()=>{this.listeners.forEach(({listener:e})=>{e(this.result)})})}}class cRn extends SFe{constructor(e,n){super(e,n)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,n){super.setOptions({...e,behavior:nDe()},n)}getOptimisticResult(e){return e.behavior=nDe(),super.getOptimisticResult(e)}fetchNextPage({pageParam:e,...n}={}){return this.fetch({...n,meta:{fetchMore:{direction:"forward",pageParam:e}}})}fetchPreviousPage({pageParam:e,...n}={}){return this.fetch({...n,meta:{fetchMore:{direction:"backward",pageParam:e}}})}createResult(e,n){var i,r,o,s,a,l;const{state:c}=e,u=super.createResult(e,n),{isFetching:d,isRefetching:h}=u,f=d&&((i=c.fetchMeta)==null||(r=i.fetchMore)==null?void 0:r.direction)==="forward",m=d&&((o=c.fetchMeta)==null||(s=o.fetchMore)==null?void 0:s.direction)==="backward";return{...u,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:iRn(n,(a=c.data)==null?void 0:a.pages),hasPreviousPage:rRn(n,(l=c.data)==null?void 0:l.pages),isFetchingNextPage:f,isFetchingPreviousPage:m,isRefetching:h&&!f&&!m}}}let uRn=class extends FA{constructor(e,n){super(),this.client=e,this.setOptions(n),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var n;const i=this.options;this.options=this.client.defaultMutationOptions(e),Pne(i,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(n=this.currentMutation)==null||n.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.currentMutation)==null||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();const n={listeners:!0};e.type==="success"?n.onSuccess=!0:e.type==="error"&&(n.onError=!0),this.notify(n)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,n){return this.mutateOptions=n,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof e<"u"?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:eDt(),n={...e,isLoading:e.status==="loading",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=n}notify(e){Vl.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(e.onSuccess){var n,i,r,o;(n=(i=this.mutateOptions).onSuccess)==null||n.call(i,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(r=(o=this.mutateOptions).onSettled)==null||r.call(o,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var s,a,l,c;(s=(a=this.mutateOptions).onError)==null||s.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(l=(c=this.mutateOptions).onSettled)==null||l.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(({listener:u})=>{u(this.currentResult)})})}};var nDt={exports:{}},iDt={};/**
 * @license React
 * use-sync-external-store-shim.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=b,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(w){{for(var C=arguments.length,N=new Array(C>1?C-1:0),E=1;E<C;E++)N[E-1]=arguments[E];i("error",w,N)}}function i(w,C,N){{var E=e.ReactDebugCurrentFrame,D=E.getStackAddendum();D!==""&&(C+="%s",N=N.concat([D]));var k=N.map(function(M){return String(M)});k.unshift("Warning: "+C),Function.prototype.apply.call(console[w],console,k)}}function r(w,C){return w===C&&(w!==0||1/w===1/C)||w!==w&&C!==C}var o=typeof Object.is=="function"?Object.is:r,s=t.useState,a=t.useEffect,l=t.useLayoutEffect,c=t.useDebugValue,u=!1,d=!1;function h(w,C,N){u||t.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=C();if(!d){var D=C();o(E,D)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var k=s({inst:{value:E,getSnapshot:C}}),M=k[0].inst,T=k[1];return l(function(){M.value=E,M.getSnapshot=C,f(M)&&T({inst:M})},[w,E,C]),a(function(){f(M)&&T({inst:M});var A=function(){f(M)&&T({inst:M})};return w(A)},[w]),c(E),E}function f(w){var C=w.getSnapshot,N=w.value;try{var E=C();return!o(N,E)}catch{return!0}}function m(w,C,N){return C()}var p=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!p,y=g?m:h,_=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y;iDt.useSyncExternalStore=_,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})();nDt.exports=iDt;var EFe=nDt.exports;const DFe=EFe.useSyncExternalStore,ket=b.createContext(void 0),rDt=b.createContext(!1);function oDt(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=ket),window.ReactQueryClientContext):ket)}const Gde=({context:t}={})=>{const e=b.useContext(oDt(t,b.useContext(rDt)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},dRn=({client:t,children:e,context:n,contextSharing:i=!1})=>{b.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),i&&t.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const r=oDt(n,i);return b.createElement(rDt.Provider,{value:!n&&i},b.createElement(r.Provider,{value:t},e))},sDt=b.createContext(!1),aDt=()=>b.useContext(sDt);sDt.Provider;function hRn(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const fRn=b.createContext(hRn()),lDt=()=>b.useContext(fRn);function cDt(t,e){return typeof t=="function"?t(...e):!!t}const uDt=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},dDt=t=>{b.useEffect(()=>{t.clearReset()},[t])},hDt=({result:t,errorResetBoundary:e,useErrorBoundary:n,query:i})=>t.isError&&!e.isReset()&&!t.isFetching&&cDt(n,[t.error,i]),fDt=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},mDt=(t,e)=>t.isLoading&&t.isFetching&&!e,oDe=(t,e,n)=>(t==null?void 0:t.suspense)&&mDt(e,n),sDe=(t,e,n)=>e.fetchOptimistic(t).then(({data:i})=>{t.onSuccess==null||t.onSuccess(i),t.onSettled==null||t.onSettled(i,null)}).catch(i=>{n.clearReset(),t.onError==null||t.onError(i),t.onSettled==null||t.onSettled(void 0,i)});function mRn({queries:t,context:e}){const n=Gde({context:e}),i=aDt(),r=lDt(),o=b.useMemo(()=>t.map(h=>{const f=n.defaultQueryOptions(h);return f._optimisticResults=i?"isRestoring":"optimistic",f}),[t,n,i]);o.forEach(h=>{fDt(h),uDt(h,r)}),dDt(r);const[s]=b.useState(()=>new lRn(n,o)),a=s.getOptimisticResult(o);DFe(b.useCallback(h=>i?()=>{}:s.subscribe(Vl.batchCalls(h)),[s,i]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),b.useEffect(()=>{s.setQueries(o,{listeners:!1})},[o,s]);const c=a.some((h,f)=>oDe(o[f],h,i))?a.flatMap((h,f)=>{const m=o[f],p=s.getObservers()[f];if(m&&p){if(oDe(m,h,i))return sDe(m,p,r);mDt(h,i)&&sDe(m,p,r)}return[]}):[];if(c.length>0)throw Promise.all(c);const u=s.getQueries(),d=a.find((h,f)=>{var m,p;return hDt({result:h,errorResetBoundary:r,useErrorBoundary:(m=(p=o[f])==null?void 0:p.useErrorBoundary)!=null?m:!1,query:u[f]})});if(d!=null&&d.error)throw d.error;return a}function pDt(t,e){const n=Gde({context:t.context}),i=aDt(),r=lDt(),o=n.defaultQueryOptions(t);o._optimisticResults=i?"isRestoring":"optimistic",o.onError&&(o.onError=Vl.batchCalls(o.onError)),o.onSuccess&&(o.onSuccess=Vl.batchCalls(o.onSuccess)),o.onSettled&&(o.onSettled=Vl.batchCalls(o.onSettled)),fDt(o),uDt(o,r),dDt(r);const[s]=b.useState(()=>new e(n,o)),a=s.getOptimisticResult(o);if(DFe(b.useCallback(l=>{const c=i?()=>{}:s.subscribe(Vl.batchCalls(l));return s.updateResult(),c},[s,i]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),b.useEffect(()=>{s.setOptions(o,{listeners:!1})},[o,s]),oDe(o,a,i))throw sDe(o,s,r);if(hDt({result:a,errorResetBoundary:r,useErrorBoundary:o.useErrorBoundary,query:s.getCurrentQuery()}))throw a.error;return o.notifyOnChangeProps?a:s.trackResult(a)}function pRn(t,e,n){const i=YO(t,e,n);return pDt(i,SFe)}function gRn(t,e,n){const i=KAn(t,e),r=Gde({context:i.context}),[o]=b.useState(()=>new uRn(r,i));b.useEffect(()=>{o.setOptions(i)},[o,i]);const s=DFe(b.useCallback(l=>o.subscribe(Vl.batchCalls(l)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),a=b.useCallback((l,c)=>{o.mutate(l,c).catch(bRn)},[o]);if(s.error&&cDt(o.options.useErrorBoundary,[s.error]))throw s.error;return{...s,mutate:a,mutateAsync:s.mutate}}function bRn(){}function vRn(t,e,n){const i=YO(t,e,n);return pDt(i,cRn)}function yRn(t){return t}function _Rn(t){return t.length===0?yRn:t.length===1?t[0]:function(n){return t.reduce((i,r)=>r(i),n)}}function Yde(t){const e={subscribe(n){let i=null,r=!1,o=!1,s=!1;function a(){if(i===null){s=!0;return}o||(o=!0,typeof i=="function"?i():i&&i.unsubscribe())}return i=t({next(l){var c;r||(c=n.next)==null||c.call(n,l)},error(l){var c;r||(r=!0,(c=n.error)==null||c.call(n,l),a())},complete(){var l;r||(r=!0,(l=n.complete)==null||l.call(n),a())}}),s&&a(),{unsubscribe:a}},pipe(...n){return _Rn(n)(e)}};return e}function xRn(t){return e=>{let n=0,i=null;const r=[];function o(){i||(i=e.subscribe({next(a){var l;for(const c of r)(l=c.next)==null||l.call(c,a)},error(a){var l;for(const c of r)(l=c.error)==null||l.call(c,a)},complete(){var a;for(const l of r)(a=l.complete)==null||a.call(l)}}))}function s(){if(n===0&&i){const a=i;i=null,a.unsubscribe()}}return{subscribe(a){return n++,r.push(a),o(),{unsubscribe(){n--,s();const l=r.findIndex(c=>c===a);l>-1&&r.splice(l,1)}}}}}}class kFe extends Error{constructor(e){super(e),this.name="ObservableAbortError",Object.setPrototypeOf(this,kFe.prototype)}}function wRn(t){let e;return{promise:new Promise((i,r)=>{let o=!1;function s(){o||(o=!0,r(new kFe("This operation was aborted.")),a.unsubscribe())}const a=t.subscribe({next(l){o=!0,i(l),s()},error(l){o=!0,r(l),s()},complete(){o=!0,s()}});e=s}),abort:e}}function gDt(t){return Yde(e=>{function n(r=0,o=t.op){const s=t.links[r];if(!s)throw new Error("No more links to execute - did you forget to add an ending link?");return s({op:o,next(l){return n(r+1,l)}})}return n().subscribe(e)})}function Met(t){return Array.isArray(t)?t:[t]}function CRn(t){return e=>{const n=Met(t.true).map(r=>r(e)),i=Met(t.false).map(r=>r(e));return r=>Yde(o=>{const s=t.condition(r.op)?n:i;return gDt({op:r.op,links:s}).subscribe(o)})}}function bDt(t){const e=Object.create(null);for(const n in t){const i=t[n];e[i]=n}return e}const vDt={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,NOT_IMPLEMENTED:-32603,UNAUTHORIZED:-32001,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNPROCESSABLE_CONTENT:-32022,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099};bDt(vDt);bDt(vDt);const yDt=()=>{};function _Dt(t,e){return new Proxy(yDt,{get(i,r){if(!(typeof r!="string"||r==="then"))return _Dt(t,[...e,r])},apply(i,r,o){const s=e[e.length-1]==="apply";return t({args:s?o.length>=2?o[1]:[]:o,path:s?e.slice(0,-1):e})}})}const Xde=t=>_Dt(t,[]),MFe=t=>new Proxy(yDt,{get(e,n){if(!(typeof n!="string"||n==="then"))return t(n)}});function SRn(t){return!!t&&!Array.isArray(t)&&typeof t=="object"}class NRn extends Error{}function ERn(t){if(t instanceof Error)return t;const e=typeof t;if(!(e==="undefined"||e==="function"||t===null)){if(e!=="object")return new Error(String(t));if(SRn(t)){const n=new NRn;for(const i in t)n[i]=t[i];return n}}}function Fne(t){return!!t&&!Array.isArray(t)&&typeof t=="object"}function DRn(t,e){if("error"in t){const i=e.transformer.deserialize(t.error);return{ok:!1,error:{...t,error:i}}}return{ok:!0,result:{...t.result,...(!t.result.type||t.result.type==="data")&&{type:"data",data:e.transformer.deserialize(t.result.data)}}}}class U_e extends Error{constructor(){super("Unable to transform response from server")}}function xDt(t,e){let n;try{n=DRn(t,e)}catch{throw new U_e}if(!n.ok&&(!Fne(n.error.error)||typeof n.error.error.code!="number"))throw new U_e;if(n.ok&&!Fne(n.result))throw new U_e;return n}function kRn(t){return t instanceof cv||t instanceof Error&&t.name==="TRPCClientError"}function MRn(t){return Fne(t)&&Fne(t.error)&&typeof t.error.code=="number"&&typeof t.error.message=="string"}class cv extends Error{static from(e,n={}){const i=e;return kRn(i)?(n.meta&&(i.meta={...i.meta,...n.meta}),i):MRn(i)?new cv(i.error.message,{...n,result:i}):i instanceof Error?new cv(i.message,{...n,cause:ERn(i)}):new cv("Unknown error",{...n,cause:i})}constructor(e,n){var r,o;const i=n==null?void 0:n.cause;super(e,{cause:i}),this.meta=n==null?void 0:n.meta,this.cause=i,this.shape=(r=n==null?void 0:n.result)==null?void 0:r.error,this.data=(o=n==null?void 0:n.result)==null?void 0:o.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,cv.prototype)}}const Let=t=>typeof t=="function";function LRn(t){if(t)return t;if(typeof window<"u"&&Let(window.fetch))return window.fetch;if(typeof globalThis<"u"&&Let(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}function TRn(t){return t||(typeof window<"u"&&window.AbortController?window.AbortController:typeof globalThis<"u"&&globalThis.AbortController?globalThis.AbortController:null)}function IRn(t){return{url:t.url.toString().replace(/\/$/,""),fetch:t.fetch,AbortController:TRn(t.AbortController)}}function ARn(t){const e={};for(let n=0;n<t.length;n++){const i=t[n];e[n]=i}return e}const RRn={query:"GET",mutation:"POST"};function wDt(t){return"input"in t?t.runtime.transformer.serialize(t.input):ARn(t.inputs.map(e=>t.runtime.transformer.serialize(e)))}const CDt=t=>{let e=t.url+"/"+t.path;const n=[];if("inputs"in t&&n.push("batch=1"),t.type==="query"){const i=wDt(t);i!==void 0&&n.push(`input=${encodeURIComponent(JSON.stringify(i))}`)}return n.length&&(e+="?"+n.join("&")),e},PRn=t=>{if(t.type==="query")return;const e=wDt(t);return e!==void 0?JSON.stringify(e):void 0},ORn=t=>FRn({...t,contentTypeHeader:"application/json",getUrl:CDt,getBody:PRn});async function jRn(t,e){const n=t.getUrl(t),i=t.getBody(t),{type:r}=t,o=await t.headers();/* istanbul ignore if -- @preserve */if(r==="subscription")throw new Error("Subscriptions should use wsLink");const s={...t.contentTypeHeader?{"content-type":t.contentTypeHeader}:{},...t.batchModeHeader?{"trpc-batch-mode":t.batchModeHeader}:{},...o};return LRn(t.fetch)(n,{method:RRn[r],signal:e==null?void 0:e.signal,body:i,headers:s})}function FRn(t){const e=t.AbortController?new t.AbortController:null,n={};let i=!1;return{promise:new Promise((s,a)=>{jRn(t,e).then(l=>(n.response=l,i=!0,l.json())).then(l=>{n.responseJSON=l,s({json:l,meta:n})}).catch(l=>{i=!0,a(cv.from(l,{meta:n}))})}),cancel:()=>{i||e==null||e.abort()}}}const K_e=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function q_e(t){let e=null,n=null;const i=()=>{clearTimeout(n),n=null,e=null};function r(a){var u,d;const l=[[]];let c=0;for(;;){const h=a[c];if(!h)break;const f=l[l.length-1];if(h.aborted){(u=h.reject)==null||u.call(h,new Error("Aborted")),c++;continue}if(t.validate(f.concat(h).map(p=>p.key))){f.push(h),c++;continue}if(f.length===0){(d=h.reject)==null||d.call(h,new Error("Input is too big for a single dispatch")),c++;continue}l.push([])}return l}function o(){const a=r(e);i();for(const l of a){if(!l.length)continue;const c={items:l,cancel:K_e};for(const f of l)f.batch=c;const u=(f,m)=>{var g;const p=c.items[f];(g=p.resolve)==null||g.call(p,m),p.batch=null,p.reject=null,p.resolve=null},{promise:d,cancel:h}=t.fetch(c.items.map(f=>f.key),u);c.cancel=h,d.then(f=>{var m;for(let p=0;p<f.length;p++){const g=f[p];u(p,g)}for(const p of c.items)(m=p.reject)==null||m.call(p,new Error("Missing result")),p.batch=null}).catch(f=>{var m;for(const p of c.items)(m=p.reject)==null||m.call(p,f),p.batch=null})}}function s(a){const l={aborted:!1,key:a,batch:null,resolve:K_e,reject:K_e},c=new Promise((d,h)=>{l.reject=h,l.resolve=d,e||(e=[]),e.push(l)});return n||(n=setTimeout(o)),{promise:c,cancel:()=>{var d;l.aborted=!0,(d=l.batch)!=null&&d.items.every(h=>h.aborted)&&(l.batch.cancel(),l.batch=null)}}}return{load:s}}function $Rn(t){return function(n){const i=IRn(n),r=n.maxURLLength??1/0;return o=>{const s=d=>{const h=m=>{if(r===1/0)return!0;const p=m.map(_=>_.path).join(","),g=m.map(_=>_.input);return CDt({...i,runtime:o,type:d,path:p,inputs:g}).length<=r},f=t({...i,runtime:o,type:d,opts:n});return{validate:h,fetch:f}},a=q_e(s("query")),l=q_e(s("mutation")),c=q_e(s("subscription")),u={query:a,subscription:c,mutation:l};return({op:d})=>Yde(h=>{const f=u[d.type],{promise:m,cancel:p}=f.load(d);let g;return m.then(y=>{g=y;const _=xDt(y.json,o);if(!_.ok){h.error(cv.from(_.error,{meta:y.meta}));return}h.next({context:y.meta,result:_.result}),h.complete()}).catch(y=>{h.error(cv.from(y,{meta:g==null?void 0:g.meta}))}),()=>{p()}})}}}const VRn=t=>e=>{const n=e.map(s=>s.path).join(","),i=e.map(s=>s.input),{promise:r,cancel:o}=ORn({...t,path:n,inputs:i,headers(){return t.opts.headers?typeof t.opts.headers=="function"?t.opts.headers({opList:e}):t.opts.headers:{}}});return{promise:r.then(s=>(Array.isArray(s.json)?s.json:e.map(()=>s.json)).map(c=>({meta:s.meta,json:c}))),cancel:o}},BRn=$Rn(VRn);/* istanbul ignore next -- @preserve */const zRn=t=>t===0?0:Math.min(1e3*2**t,3e4);function HRn(t){const{url:e,WebSocket:n=WebSocket,retryDelayMs:i=zRn,onOpen:r,onClose:o}=t;/* istanbul ignore next -- @preserve */if(!n)throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");let s=[];const a=Object.create(null);let l=0,c=null,u=null,d=C(),h="connecting";function f(){h!=="open"||c||(c=setTimeout(()=>{c=null,s.length===1?d.send(JSON.stringify(s.pop())):d.send(JSON.stringify(s)),s=[]}))}function m(){if(u!==null||h==="closed")return;const E=i(l++);g(E)}function p(){h="connecting";const E=d;d=C(),y(E)}function g(E){u||(h="connecting",u=setTimeout(p,E))}function y(E){Object.values(a).some(k=>k.ws===E)||E.close()}function _(){Object.values(a).forEach(E=>{E.type==="subscription"&&E.callbacks.complete()})}function w(E){s.some(D=>D.id===E.op.id)||N(E.op,E.callbacks)}function C(){const E=typeof e=="function"?e():e,D=new n(E);clearTimeout(u),u=null,D.addEventListener("open",()=>{/* istanbul ignore next -- @preserve */D===d&&(l=0,h="open",r==null||r(),f())}),D.addEventListener("error",()=>{D===d&&m()});const k=T=>{if(T.method==="reconnect"&&D===d){h==="open"&&(o==null||o()),p();for(const A of Object.values(a))A.type==="subscription"&&w(A)}},M=T=>{var R,P;const A=T.id!==null&&a[T.id];if(A){if((P=(R=A.callbacks).next)==null||P.call(R,T),A.ws!==d&&D===d){const O=A.ws;A.ws=d,y(O)}"result"in T&&T.result.type==="stopped"&&D===d&&A.callbacks.complete()}};return D.addEventListener("message",({data:T})=>{const A=JSON.parse(T);"method"in A?k(A):M(A),(D!==d||h==="closed")&&y(D)}),D.addEventListener("close",({code:T})=>{var A,R,P,O;h==="open"&&(o==null||o({code:T})),d===D&&m();for(const[V,F]of Object.entries(a))if(F.ws===D){if(h==="closed"){delete a[V],(R=(A=F.callbacks).complete)==null||R.call(A);continue}F.type==="subscription"?w(F):(delete a[V],(O=(P=F.callbacks).error)==null||O.call(P,cv.from(new LFe("WebSocket closed prematurely"))))}}),D}function N(E,D){const{type:k,input:M,path:T,id:A}=E,R={id:A,method:k,params:{input:M,path:T}};return a[A]={ws:d,type:k,callbacks:D,op:E},s.push(R),f(),()=>{var O,V;const P=(O=a[A])==null?void 0:O.callbacks;delete a[A],s=s.filter(F=>F.id!==A),(V=P==null?void 0:P.complete)==null||V.call(P),d.readyState===n.OPEN&&E.type==="subscription"&&(s.push({id:A,method:"subscription.stop"}),f())}}return{close:()=>{h="closed",o==null||o(),_(),y(d),clearTimeout(u),u=null},request:N,getConnection(){return d}}}class LFe extends Error{constructor(e){super(e),this.name="TRPCWebSocketClosedError",Object.setPrototypeOf(this,LFe.prototype)}}function WRn(t){return e=>{const{client:n}=t;return({op:i})=>Yde(r=>{const{type:o,path:s,id:a,context:l}=i,c=e.transformer.serialize(i.input),u=n.request({type:o,path:s,input:c,id:a,context:l},{error(d){r.error(d),u()},complete(){r.complete()},next(d){const h=xDt(d,e);if(!h.ok){r.error(cv.from(h.error));return}r.next({result:h.result}),i.type!=="subscription"&&(u(),r.complete())}});return()=>{u()}})}}class URn{$request({type:e,input:n,path:i,context:r={}}){return gDt({links:this.links,op:{id:++this.requestId,type:e,path:i,input:n,context:r}}).pipe(xRn())}requestAsPromise(e){const n=this.$request(e),{promise:i,abort:r}=wRn(n);return new Promise((s,a)=>{var l;(l=e.signal)==null||l.addEventListener("abort",r),i.then(c=>{s(c.result.data)}).catch(c=>{a(cv.from(c))})})}query(e,n,i){return this.requestAsPromise({type:"query",path:e,input:n,context:i==null?void 0:i.context,signal:i==null?void 0:i.signal})}mutation(e,n,i){return this.requestAsPromise({type:"mutation",path:e,input:n,context:i==null?void 0:i.context,signal:i==null?void 0:i.signal})}subscription(e,n,i){return this.$request({type:"subscription",path:e,input:n,context:i==null?void 0:i.context}).subscribe({next(o){var s,a,l;o.result.type==="started"?(s=i.onStarted)==null||s.call(i):o.result.type==="stopped"?(a=i.onStopped)==null||a.call(i):(l=i.onData)==null||l.call(i,o.result.data)},error(o){var s;(s=i.onError)==null||s.call(i,o)},complete(){var o;(o=i.onComplete)==null||o.call(i)}})}constructor(e){this.requestId=0;const n=(()=>{const i=e.transformer;return i?"input"in i?e.transformer:{input:i,output:i}:{input:{serialize:r=>r,deserialize:r=>r},output:{serialize:r=>r,deserialize:r=>r}}})();this.runtime={transformer:{serialize:i=>n.input.serialize(i),deserialize:i=>n.output.deserialize(i)},combinedTransformer:n},this.links=e.links.map(i=>i(this.runtime))}}function KRn(t){return new URn(t)}const qRn={query:"query",mutate:"mutation",subscribe:"subscription"},GRn=t=>qRn[t];function YRn(t){return MFe(e=>t.hasOwnProperty(e)?t[e]:e==="__untypedClient"?t:Xde(({path:n,args:i})=>{const r=[e,...n],o=GRn(r.pop()),s=r.join(".");return t[o](s,...i)}))}var SDt={exports:{}};/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=r(o,i(a)))}return o}function i(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)e.call(o,a)&&o[a]&&(s=r(s,a));return s}function r(o,s){return s?o?o+" "+s:o+s:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(SDt);var XRn=SDt.exports;const Me=ao(XRn);var NDt={exports:{}},Aa={};/**
 * @license React
 * react-is.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(){var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),m=!1,p=!1,g=!1,y=!1,_=!1,w;w=Symbol.for("react.module.reference");function C(le){return!!(typeof le=="string"||typeof le=="function"||le===n||le===r||_||le===i||le===c||le===u||y||le===f||m||p||g||typeof le=="object"&&le!==null&&(le.$$typeof===h||le.$$typeof===d||le.$$typeof===o||le.$$typeof===s||le.$$typeof===l||le.$$typeof===w||le.getModuleId!==void 0))}function N(le){if(typeof le=="object"&&le!==null){var Ne=le.$$typeof;switch(Ne){case t:var Le=le.type;switch(Le){case n:case r:case i:case c:case u:return Le;default:var Te=Le&&Le.$$typeof;switch(Te){case a:case s:case l:case h:case d:case o:return Te;default:return Ne}}case e:return Ne}}}var E=s,D=o,k=t,M=l,T=n,A=h,R=d,P=e,O=r,V=i,F=c,$=u,B=!1,z=!1;function H(le){return B||(B=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function K(le){return z||(z=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function q(le){return N(le)===s}function U(le){return N(le)===o}function Y(le){return typeof le=="object"&&le!==null&&le.$$typeof===t}function J(le){return N(le)===l}function ae(le){return N(le)===n}function se(le){return N(le)===h}function oe(le){return N(le)===d}function fe(le){return N(le)===e}function de(le){return N(le)===r}function ie(le){return N(le)===i}function Q(le){return N(le)===c}function be(le){return N(le)===u}Aa.ContextConsumer=E,Aa.ContextProvider=D,Aa.Element=k,Aa.ForwardRef=M,Aa.Fragment=T,Aa.Lazy=A,Aa.Memo=R,Aa.Portal=P,Aa.Profiler=O,Aa.StrictMode=V,Aa.Suspense=F,Aa.SuspenseList=$,Aa.isAsyncMode=H,Aa.isConcurrentMode=K,Aa.isContextConsumer=q,Aa.isContextProvider=U,Aa.isElement=Y,Aa.isForwardRef=J,Aa.isFragment=ae,Aa.isLazy=se,Aa.isMemo=oe,Aa.isPortal=fe,Aa.isProfiler=de,Aa.isStrictMode=ie,Aa.isSuspense=Q,Aa.isSuspenseList=be,Aa.isValidElementType=C,Aa.typeOf=N})();NDt.exports=Aa;var DC=NDt.exports;function fc(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return Z.Children.forEach(t,function(i){i==null&&!e.keepEmpty||(Array.isArray(i)?n=n.concat(fc(i)):DC.isFragment(i)&&i.props?n=n.concat(fc(i.props.children,e)):n.push(i))}),n}function Oz(t){return t instanceof HTMLElement||t instanceof SVGElement}function TFe(t){return t&&Un(t)==="object"&&Oz(t.nativeElement)?t.nativeElement:Oz(t)?t:null}function M9(t){var e=TFe(t);if(e)return e;if(t instanceof Z.Component){var n;return(n=sv.findDOMNode)===null||n===void 0?void 0:n.call(sv,t)}return null}var jz=function(e,n){typeof e=="function"?e(n):Un(e)==="object"&&e&&"current"in e&&(e.current=n)},Vu=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];var r=n.filter(Boolean);return r.length<=1?r[0]:function(o){n.forEach(function(s){jz(s,o)})}},jS=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return Hk(function(){return Vu.apply(void 0,n)},n,function(r,o){return r.length!==o.length||r.every(function(s,a){return s!==o[a]})})},P0=function(e){var n,i,r=DC.isMemo(e)?e.type.type:e.type;return!(typeof r=="function"&&!((n=r.prototype)!==null&&n!==void 0&&n.render)&&r.$$typeof!==DC.ForwardRef||typeof e=="function"&&!((i=e.prototype)!==null&&i!==void 0&&i.render)&&e.$$typeof!==DC.ForwardRef)};function aDe(t){return b.isValidElement(t)&&!DC.isFragment(t)}var ZRn=function(e){return aDe(e)&&P0(e)};Number(b.version.split(".")[0])>=19;var lDe=b.createContext(null);function QRn(t){var e=t.children,n=t.onBatchResize,i=b.useRef(0),r=b.useRef([]),o=b.useContext(lDe),s=b.useCallback(function(a,l,c){i.current+=1;var u=i.current;r.current.push({size:a,element:l,data:c}),Promise.resolve().then(function(){u===i.current&&(n==null||n(r.current),r.current=[])}),o==null||o(a,l,c)},[n,o]);return b.createElement(lDe.Provider,{value:s},e)}var EDt=function(){if(typeof Map<"u")return Map;function t(e,n){var i=-1;return e.some(function(r,o){return r[0]===n?(i=o,!0):!1}),i}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var i=t(this.__entries__,n),r=this.__entries__[i];return r&&r[1]},e.prototype.set=function(n,i){var r=t(this.__entries__,n);~r?this.__entries__[r][1]=i:this.__entries__.push([n,i])},e.prototype.delete=function(n){var i=this.__entries__,r=t(i,n);~r&&i.splice(r,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,i){i===void 0&&(i=null);for(var r=0,o=this.__entries__;r<o.length;r++){var s=o[r];n.call(i,s[1],s[0])}},e}()}(),cDe=typeof window<"u"&&typeof document<"u"&&window.document===document,$ne=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),JRn=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind($ne):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),ePn=2;function tPn(t,e){var n=!1,i=!1,r=0;function o(){n&&(n=!1,t()),i&&a()}function s(){JRn(o)}function a(){var l=Date.now();if(n){if(l-r<ePn)return;i=!0}else n=!0,i=!1,setTimeout(s,e);r=l}return a}var nPn=20,iPn=["top","right","bottom","left","width","height","size","weight"],rPn=typeof MutationObserver<"u",oPn=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=tPn(this.refresh.bind(this),nPn)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var n=this.observers_,i=n.indexOf(e);~i&&n.splice(i,1),!n.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return e.forEach(function(n){return n.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!cDe||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),rPn?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!cDe||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,i=n===void 0?"":n,r=iPn.some(function(o){return!!~i.indexOf(o)});r&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),DDt=function(t,e){for(var n=0,i=Object.keys(e);n<i.length;n++){var r=i[n];Object.defineProperty(t,r,{value:e[r],enumerable:!1,writable:!1,configurable:!0})}return t},jj=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||$ne},kDt=Zde(0,0,0,0);function Vne(t){return parseFloat(t)||0}function Tet(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(i,r){var o=t["border-"+r+"-width"];return i+Vne(o)},0)}function sPn(t){for(var e=["top","right","bottom","left"],n={},i=0,r=e;i<r.length;i++){var o=r[i],s=t["padding-"+o];n[o]=Vne(s)}return n}function aPn(t){var e=t.getBBox();return Zde(0,0,e.width,e.height)}function lPn(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return kDt;var i=jj(t).getComputedStyle(t),r=sPn(i),o=r.left+r.right,s=r.top+r.bottom,a=Vne(i.width),l=Vne(i.height);if(i.boxSizing==="border-box"&&(Math.round(a+o)!==e&&(a-=Tet(i,"left","right")+o),Math.round(l+s)!==n&&(l-=Tet(i,"top","bottom")+s)),!uPn(t)){var c=Math.round(a+o)-e,u=Math.round(l+s)-n;Math.abs(c)!==1&&(a-=c),Math.abs(u)!==1&&(l-=u)}return Zde(r.left,r.top,a,l)}var cPn=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof jj(t).SVGGraphicsElement}:function(t){return t instanceof jj(t).SVGElement&&typeof t.getBBox=="function"}}();function uPn(t){return t===jj(t).document.documentElement}function dPn(t){return cDe?cPn(t)?aPn(t):lPn(t):kDt}function hPn(t){var e=t.x,n=t.y,i=t.width,r=t.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,s=Object.create(o.prototype);return DDt(s,{x:e,y:n,width:i,height:r,top:n,right:e+i,bottom:r+n,left:e}),s}function Zde(t,e,n,i){return{x:t,y:e,width:n,height:i}}var fPn=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Zde(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=dPn(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),mPn=function(){function t(e,n){var i=hPn(n);DDt(this,{target:e,contentRect:i})}return t}(),pPn=function(){function t(e,n,i){if(this.activeObservations_=[],this.observations_=new EDt,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=n,this.callbackCtx_=i}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof jj(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new fPn(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof jj(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(i){return new mPn(i.target,i.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),MDt=typeof WeakMap<"u"?new WeakMap:new EDt,LDt=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=oPn.getInstance(),i=new pPn(e,n,this);MDt.set(this,i)}return t}();["observe","unobserve","disconnect"].forEach(function(t){LDt.prototype[t]=function(){var e;return(e=MDt.get(this))[t].apply(e,arguments)}});var TDt=function(){return typeof $ne.ResizeObserver<"u"?$ne.ResizeObserver:LDt}(),OE=new Map;function gPn(t){t.forEach(function(e){var n,i=e.target;(n=OE.get(i))===null||n===void 0||n.forEach(function(r){return r(i)})})}var IDt=new TDt(gPn);function bPn(t,e){OE.has(t)||(OE.set(t,new Set),IDt.observe(t)),OE.get(t).add(e)}function vPn(t,e){OE.has(t)&&(OE.get(t).delete(e),OE.get(t).size||(IDt.unobserve(t),OE.delete(t)))}var yPn=function(t){Zp(n,t);var e=pb(n);function n(){return Za(this,n),e.apply(this,arguments)}return Qa(n,[{key:"render",value:function(){return this.props.children}}]),n}(b.Component);function _Pn(t,e){var n=t.children,i=t.disabled,r=b.useRef(null),o=b.useRef(null),s=b.useContext(lDe),a=typeof n=="function",l=a?n(r):n,c=b.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!a&&b.isValidElement(l)&&P0(l),d=u?l.ref:null,h=jS(d,r),f=function(){var y;return M9(r.current)||(r.current&&Un(r.current)==="object"?M9((y=r.current)===null||y===void 0?void 0:y.nativeElement):null)||M9(o.current)};b.useImperativeHandle(e,function(){return f()});var m=b.useRef(t);m.current=t;var p=b.useCallback(function(g){var y=m.current,_=y.onResize,w=y.data,C=g.getBoundingClientRect(),N=C.width,E=C.height,D=g.offsetWidth,k=g.offsetHeight,M=Math.floor(N),T=Math.floor(E);if(c.current.width!==M||c.current.height!==T||c.current.offsetWidth!==D||c.current.offsetHeight!==k){var A={width:M,height:T,offsetWidth:D,offsetHeight:k};c.current=A;var R=D===Math.round(N)?N:D,P=k===Math.round(E)?E:k,O=Ie(Ie({},A),{},{offsetWidth:R,offsetHeight:P});s==null||s(O,g,w),_&&Promise.resolve().then(function(){_(O,g)})}},[]);return b.useEffect(function(){var g=f();return g&&!i&&bPn(g,p),function(){return vPn(g,p)}},[r.current,i]),b.createElement(yPn,{ref:o},u?b.cloneElement(l,{ref:h}):l)}var ADt=b.forwardRef(_Pn);ADt.displayName="SingleObserver";var xPn="rc-observer-key";function wPn(t,e){var n=t.children,i=typeof n=="function"?[n]:fc(n);return i.length>1?I0(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):i.length===0&&I0(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),i.map(function(r,o){var s=(r==null?void 0:r.key)||"".concat(xPn,"-").concat(o);return b.createElement(ADt,lt({},t,{key:s,ref:o===0?e:void 0}),r)})}var Kd=b.forwardRef(wPn);Kd.displayName="ResizeObserver";Kd.Collection=QRn;function Zs(t,e){var n=Object.assign({},t);return Array.isArray(e)&&e.forEach(function(i){delete n[i]}),n}var RDt=function(e){return+setTimeout(e,16)},PDt=function(e){return clearTimeout(e)};typeof window<"u"&&"requestAnimationFrame"in window&&(RDt=function(e){return window.requestAnimationFrame(e)},PDt=function(e){return window.cancelAnimationFrame(e)});var Iet=0,Qde=new Map;function ODt(t){Qde.delete(t)}var Dr=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Iet+=1;var i=Iet;function r(o){if(o===0)ODt(i),e();else{var s=RDt(function(){r(o-1)});Qde.set(i,s)}}return r(n),i};Dr.cancel=function(t){var e=Qde.get(t);return ODt(t),PDt(e)};Dr.ids=function(){return Qde};var IFe=b.createContext({});function jDt(t){return gCt(t)||yCt(t)||Ije(t)||bCt()}function zg(t,e){for(var n=t,i=0;i<e.length;i+=1){if(n==null)return;n=n[e[i]]}return n}function FDt(t,e,n,i){if(!e.length)return n;var r=jDt(e),o=r[0],s=r.slice(1),a;return!t&&typeof o=="number"?a=[]:Array.isArray(t)?a=Ot(t):a=Ie({},t),i&&n===void 0&&s.length===1?delete a[o][s[0]]:a[o]=FDt(a[o],s,n,i),a}function jy(t,e,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return e.length&&i&&n===void 0&&!zg(t,e.slice(0,-1))?t:FDt(t,e,n,i)}function CPn(t){return Un(t)==="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}function Aet(t){return Array.isArray(t)?[]:{}}var SPn=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function ZO(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=Aet(e[0]);return e.forEach(function(r){function o(s,a){var l=new Set(a),c=zg(r,s),u=Array.isArray(c);if(u||CPn(c)){if(!l.has(c)){l.add(c);var d=zg(i,s);u?i=jy(i,s,[]):(!d||Un(d)!=="object")&&(i=jy(i,s,Aet(c))),SPn(c).forEach(function(h){o([].concat(Ot(s),[h]),l)})}}else i=jy(i,s,c)}o([])}),i}function NPn(){}let LN=null,FS=NPn;FS=(t,e,n)=>{ii(t,`[antd: ${e}] ${n}`)};const $Dt=b.createContext({}),Cr=t=>{const{strict:e}=b.useContext($Dt),n=(i,r,o)=>{if(!i)if(e===!1&&r==="deprecated"){const s=LN;LN||(LN={}),LN[t]=LN[t]||[],LN[t].includes(o||"")||LN[t].push(o||""),s||console.warn("[antd] There exists deprecated usage in your code:",LN)}else FS(i,t,o)};return n.deprecated=(i,r,o,s)=>{n(i,"deprecated",`\`${r}\` is deprecated. Please use \`${o}\` instead.${s?` ${s}`:""}`)},n},VDt=b.createContext(void 0);var BDt={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},zDt={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},EPn=Ie(Ie({},zDt),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const HDt={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},Bne={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},EPn),timePickerLocale:Object.assign({},HDt)},gg="${label} is not a valid ${type}",Dv={locale:"en",Pagination:BDt,DatePicker:Bne,TimePicker:HDt,Calendar:Bne,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:gg,method:gg,array:gg,object:gg,number:gg,date:gg,boolean:gg,integer:gg,float:gg,regexp:gg,email:gg,url:gg,hex:gg},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};let Mee=Object.assign({},Dv.Modal),Lee=[];const Ret=()=>Lee.reduce((t,e)=>Object.assign(Object.assign({},t),e),Dv.Modal);function DPn(t){if(t){const e=Object.assign({},t);return Lee.push(e),Mee=Ret(),()=>{Lee=Lee.filter(n=>n!==e),Mee=Ret()}}Mee=Object.assign({},Dv.Modal)}function WDt(){return Mee}const AFe=b.createContext(void 0),bb=(t,e)=>{const n=b.useContext(AFe),i=b.useMemo(()=>{var o;const s=e||Dv[t],a=(o=n==null?void 0:n[t])!==null&&o!==void 0?o:{};return Object.assign(Object.assign({},typeof s=="function"?s():s),a||{})},[t,e,n]),r=b.useMemo(()=>{const o=n==null?void 0:n.locale;return n!=null&&n.exist&&!o?Dv.locale:o},[n]);return[i,r]},UDt="internalMark",KDt=t=>{const{locale:e={},children:n,_ANT_MARK__:i}=t;Cr("LocaleProvider")(i===UDt,"deprecated","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale"),b.useEffect(()=>DPn(e==null?void 0:e.Modal),[e]);const r=b.useMemo(()=>Object.assign(Object.assign({},e),{exist:!0}),[e]);return b.createElement(AFe.Provider,{value:r},n)};KDt.displayName="LocaleProvider";function Ih(t,e){kPn(t)&&(t="100%");var n=MPn(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function wZ(t){return Math.min(1,Math.max(0,t))}function kPn(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function MPn(t){return typeof t=="string"&&t.indexOf("%")!==-1}function qDt(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function CZ(t){return t<=1?"".concat(Number(t)*100,"%"):t}function TT(t){return t.length===1?"0"+t:String(t)}function LPn(t,e,n){return{r:Ih(t,255)*255,g:Ih(e,255)*255,b:Ih(n,255)*255}}function Pet(t,e,n){t=Ih(t,255),e=Ih(e,255),n=Ih(n,255);var i=Math.max(t,e,n),r=Math.min(t,e,n),o=0,s=0,a=(i+r)/2;if(i===r)s=0,o=0;else{var l=i-r;switch(s=a>.5?l/(2-i-r):l/(i+r),i){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s,l:a}}function G_e(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*(6*n):n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function TPn(t,e,n){var i,r,o;if(t=Ih(t,360),e=Ih(e,100),n=Ih(n,100),e===0)r=n,o=n,i=n;else{var s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=G_e(a,s,t+1/3),r=G_e(a,s,t),o=G_e(a,s,t-1/3)}return{r:i*255,g:r*255,b:o*255}}function uDe(t,e,n){t=Ih(t,255),e=Ih(e,255),n=Ih(n,255);var i=Math.max(t,e,n),r=Math.min(t,e,n),o=0,s=i,a=i-r,l=i===0?0:a/i;if(i===r)o=0;else{switch(i){case t:o=(e-n)/a+(e<n?6:0);break;case e:o=(n-t)/a+2;break;case n:o=(t-e)/a+4;break}o/=6}return{h:o,s:l,v:s}}function IPn(t,e,n){t=Ih(t,360)*6,e=Ih(e,100),n=Ih(n,100);var i=Math.floor(t),r=t-i,o=n*(1-e),s=n*(1-r*e),a=n*(1-(1-r)*e),l=i%6,c=[n,s,o,o,a,n][l],u=[a,n,n,s,o,o][l],d=[o,o,a,n,n,s][l];return{r:c*255,g:u*255,b:d*255}}function dDe(t,e,n,i){var r=[TT(Math.round(t).toString(16)),TT(Math.round(e).toString(16)),TT(Math.round(n).toString(16))];return i&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function APn(t,e,n,i,r){var o=[TT(Math.round(t).toString(16)),TT(Math.round(e).toString(16)),TT(Math.round(n).toString(16)),TT(RPn(i))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function RPn(t){return Math.round(parseFloat(t)*255).toString(16)}function Oet(t){return Cg(t)/255}function Cg(t){return parseInt(t,16)}function PPn(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}var hDe={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function LO(t){var e={r:0,g:0,b:0},n=1,i=null,r=null,o=null,s=!1,a=!1;return typeof t=="string"&&(t=FPn(t)),typeof t=="object"&&(m1(t.r)&&m1(t.g)&&m1(t.b)?(e=LPn(t.r,t.g,t.b),s=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):m1(t.h)&&m1(t.s)&&m1(t.v)?(i=CZ(t.s),r=CZ(t.v),e=IPn(t.h,i,r),s=!0,a="hsv"):m1(t.h)&&m1(t.s)&&m1(t.l)&&(i=CZ(t.s),o=CZ(t.l),e=TPn(t.h,i,o),s=!0,a="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=qDt(n),{ok:s,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}var OPn="[-\\+]?\\d+%?",jPn="[-\\+]?\\d*\\.\\d+%?",jE="(?:".concat(jPn,")|(?:").concat(OPn,")"),Y_e="[\\s|\\(]+(".concat(jE,")[,|\\s]+(").concat(jE,")[,|\\s]+(").concat(jE,")\\s*\\)?"),X_e="[\\s|\\(]+(".concat(jE,")[,|\\s]+(").concat(jE,")[,|\\s]+(").concat(jE,")[,|\\s]+(").concat(jE,")\\s*\\)?"),wy={CSS_UNIT:new RegExp(jE),rgb:new RegExp("rgb"+Y_e),rgba:new RegExp("rgba"+X_e),hsl:new RegExp("hsl"+Y_e),hsla:new RegExp("hsla"+X_e),hsv:new RegExp("hsv"+Y_e),hsva:new RegExp("hsva"+X_e),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function FPn(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(hDe[t])t=hDe[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=wy.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=wy.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=wy.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=wy.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=wy.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=wy.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=wy.hex8.exec(t),n?{r:Cg(n[1]),g:Cg(n[2]),b:Cg(n[3]),a:Oet(n[4]),format:e?"name":"hex8"}:(n=wy.hex6.exec(t),n?{r:Cg(n[1]),g:Cg(n[2]),b:Cg(n[3]),format:e?"name":"hex"}:(n=wy.hex4.exec(t),n?{r:Cg(n[1]+n[1]),g:Cg(n[2]+n[2]),b:Cg(n[3]+n[3]),a:Oet(n[4]+n[4]),format:e?"name":"hex8"}:(n=wy.hex3.exec(t),n?{r:Cg(n[1]+n[1]),g:Cg(n[2]+n[2]),b:Cg(n[3]+n[3]),format:e?"name":"hex"}:!1)))))))))}function m1(t){return!!wy.CSS_UNIT.exec(String(t))}var ko=function(){function t(e,n){e===void 0&&(e=""),n===void 0&&(n={});var i;if(e instanceof t)return e;typeof e=="number"&&(e=PPn(e)),this.originalInput=e;var r=LO(e);this.originalInput=e,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(i=n.format)!==null&&i!==void 0?i:r.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),n,i,r,o=e.r/255,s=e.g/255,a=e.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*i+.0722*r},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=qDt(e),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},t.prototype.toHsv=function(){var e=uDe(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},t.prototype.toHsvString=function(){var e=uDe(this.r,this.g,this.b),n=Math.round(e.h*360),i=Math.round(e.s*100),r=Math.round(e.v*100);return this.a===1?"hsv(".concat(n,", ").concat(i,"%, ").concat(r,"%)"):"hsva(".concat(n,", ").concat(i,"%, ").concat(r,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=Pet(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},t.prototype.toHslString=function(){var e=Pet(this.r,this.g,this.b),n=Math.round(e.h*360),i=Math.round(e.s*100),r=Math.round(e.l*100);return this.a===1?"hsl(".concat(n,", ").concat(i,"%, ").concat(r,"%)"):"hsla(".concat(n,", ").concat(i,"%, ").concat(r,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),dDe(this.r,this.g,this.b,e)},t.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},t.prototype.toHex8=function(e){return e===void 0&&(e=!1),APn(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),n=Math.round(this.g),i=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(n,", ").concat(i,")"):"rgba(".concat(e,", ").concat(n,", ").concat(i,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(n){return"".concat(Math.round(Ih(n,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var e=function(n){return Math.round(Ih(n,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+dDe(this.r,this.g,this.b,!1),n=0,i=Object.entries(hDe);n<i.length;n++){var r=i[n],o=r[0],s=r[1];if(e===s)return o}return!1},t.prototype.toString=function(e){var n=!!e;e=e??this.format;var i=!1,r=this.a<1&&this.a>=0,o=!n&&r&&(e.startsWith("hex")||e==="name");return o?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(i=this.toRgbString()),e==="prgb"&&(i=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(i=this.toHexString()),e==="hex3"&&(i=this.toHexString(!0)),e==="hex4"&&(i=this.toHex8String(!0)),e==="hex8"&&(i=this.toHex8String()),e==="name"&&(i=this.toName()),e==="hsl"&&(i=this.toHslString()),e==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l+=e/100,n.l=wZ(n.l),new t(n)},t.prototype.brighten=function(e){e===void 0&&(e=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),new t(n)},t.prototype.darken=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l-=e/100,n.l=wZ(n.l),new t(n)},t.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},t.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},t.prototype.desaturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s-=e/100,n.s=wZ(n.s),new t(n)},t.prototype.saturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s+=e/100,n.s=wZ(n.s),new t(n)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var n=this.toHsl(),i=(n.h+e)%360;return n.h=i<0?360+i:i,new t(n)},t.prototype.mix=function(e,n){n===void 0&&(n=50);var i=this.toRgb(),r=new t(e).toRgb(),o=n/100,s={r:(r.r-i.r)*o+i.r,g:(r.g-i.g)*o+i.g,b:(r.b-i.b)*o+i.b,a:(r.a-i.a)*o+i.a};return new t(s)},t.prototype.analogous=function(e,n){e===void 0&&(e=6),n===void 0&&(n=30);var i=this.toHsl(),r=360/n,o=[this];for(i.h=(i.h-(r*e>>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(new t(i));return o},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var n=this.toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(new t({h:i,s:r,v:o})),o=(o+a)%1;return s},t.prototype.splitcomplement=function(){var e=this.toHsl(),n=e.h;return[this,new t({h:(n+72)%360,s:e.s,l:e.l}),new t({h:(n+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var n=this.toRgb(),i=new t(e).toRgb(),r=n.a+i.a*(1-n.a);return new t({r:(n.r*n.a+i.r*i.a*(1-n.a))/r,g:(n.g*n.a+i.g*i.a*(1-n.a))/r,b:(n.b*n.a+i.b*i.a*(1-n.a))/r,a:r})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var n=this.toHsl(),i=n.h,r=[this],o=360/e,s=1;s<e;s++)r.push(new t({h:(i+s*o)%360,s:n.s,l:n.l}));return r},t.prototype.equals=function(e){return this.toRgbString()===new t(e).toRgbString()},t}(),SZ=2,jet=.16,$Pn=.05,VPn=.05,BPn=.15,GDt=5,YDt=4,zPn=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Fet(t){var e=t.r,n=t.g,i=t.b,r=uDe(e,n,i);return{h:r.h*360,s:r.s,v:r.v}}function NZ(t){var e=t.r,n=t.g,i=t.b;return"#".concat(dDe(e,n,i,!1))}function HPn(t,e,n){var i=n/100,r={r:(e.r-t.r)*i+t.r,g:(e.g-t.g)*i+t.g,b:(e.b-t.b)*i+t.b};return r}function $et(t,e,n){var i;return Math.round(t.h)>=60&&Math.round(t.h)<=240?i=n?Math.round(t.h)-SZ*e:Math.round(t.h)+SZ*e:i=n?Math.round(t.h)+SZ*e:Math.round(t.h)-SZ*e,i<0?i+=360:i>=360&&(i-=360),i}function Vet(t,e,n){if(t.h===0&&t.s===0)return t.s;var i;return n?i=t.s-jet*e:e===YDt?i=t.s+jet:i=t.s+$Pn*e,i>1&&(i=1),n&&e===GDt&&i>.1&&(i=.1),i<.06&&(i=.06),Number(i.toFixed(2))}function Bet(t,e,n){var i;return n?i=t.v+VPn*e:i=t.v-BPn*e,i>1&&(i=1),Number(i.toFixed(2))}function Fz(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],i=LO(t),r=GDt;r>0;r-=1){var o=Fet(i),s=NZ(LO({h:$et(o,r,!0),s:Vet(o,r,!0),v:Bet(o,r,!0)}));n.push(s)}n.push(NZ(i));for(var a=1;a<=YDt;a+=1){var l=Fet(i),c=NZ(LO({h:$et(l,a),s:Vet(l,a),v:Bet(l,a)}));n.push(c)}return e.theme==="dark"?zPn.map(function(u){var d=u.index,h=u.opacity,f=NZ(HPn(LO(e.backgroundColor||"#141414"),LO(n[d]),h*100));return f}):n}var l3={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},fDe=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];fDe.primary=fDe[5];var mDe=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];mDe.primary=mDe[5];var pDe=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];pDe.primary=pDe[5];var zne=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];zne.primary=zne[5];var gDe=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];gDe.primary=gDe[5];var bDe=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];bDe.primary=bDe[5];var vDe=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];vDe.primary=vDe[5];var yDe=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];yDe.primary=yDe[5];var Fj=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Fj.primary=Fj[5];var _De=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];_De.primary=_De[5];var xDe=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];xDe.primary=xDe[5];var wDe=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];wDe.primary=wDe[5];var CDe=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];CDe.primary=CDe[5];var Z_e={red:fDe,volcano:mDe,orange:pDe,gold:zne,yellow:gDe,lime:bDe,green:vDe,cyan:yDe,blue:Fj,geekblue:_De,purple:xDe,magenta:wDe,grey:CDe};const XDt={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},$z=Object.assign(Object.assign({},XDt),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0});function WPn(t,e){let{generateColorPalettes:n,generateNeutralColorPalettes:i}=e;const{colorSuccess:r,colorWarning:o,colorError:s,colorInfo:a,colorPrimary:l,colorBgBase:c,colorTextBase:u}=t,d=n(l),h=n(r),f=n(o),m=n(s),p=n(a),g=i(c,u),y=t.colorLink||t.colorInfo,_=n(y),w=new ko(m[1]).mix(new ko(m[3]),50).toHexString();return Object.assign(Object.assign({},g),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:h[1],colorSuccessBgHover:h[2],colorSuccessBorder:h[3],colorSuccessBorderHover:h[4],colorSuccessHover:h[4],colorSuccess:h[6],colorSuccessActive:h[7],colorSuccessTextHover:h[8],colorSuccessText:h[9],colorSuccessTextActive:h[10],colorErrorBg:m[1],colorErrorBgHover:m[2],colorErrorBgFilledHover:w,colorErrorBgActive:m[3],colorErrorBorder:m[3],colorErrorBorderHover:m[4],colorErrorHover:m[5],colorError:m[6],colorErrorActive:m[7],colorErrorTextHover:m[8],colorErrorText:m[9],colorErrorTextActive:m[10],colorWarningBg:f[1],colorWarningBgHover:f[2],colorWarningBorder:f[3],colorWarningBorderHover:f[4],colorWarningHover:f[4],colorWarning:f[6],colorWarningActive:f[7],colorWarningTextHover:f[8],colorWarningText:f[9],colorWarningTextActive:f[10],colorInfoBg:p[1],colorInfoBgHover:p[2],colorInfoBorder:p[3],colorInfoBorderHover:p[4],colorInfoHover:p[4],colorInfo:p[6],colorInfoActive:p[7],colorInfoTextHover:p[8],colorInfoText:p[9],colorInfoTextActive:p[10],colorLinkHover:_[4],colorLink:_[6],colorLinkActive:_[7],colorBgMask:new ko("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const UPn=t=>{let e=t,n=t,i=t,r=t;return t<6&&t>=5?e=t+1:t<16&&t>=6?e=t+2:t>=16&&(e=16),t<7&&t>=5?n=4:t<8&&t>=7?n=5:t<14&&t>=8?n=6:t<16&&t>=14?n=7:t>=16&&(n=8),t<6&&t>=2?i=1:t>=6&&(i=2),t>4&&t<8?r=4:t>=8&&(r=6),{borderRadius:t,borderRadiusXS:i,borderRadiusSM:n,borderRadiusLG:e,borderRadiusOuter:r}};function KPn(t){const{motionUnit:e,motionBase:n,borderRadius:i,lineWidth:r}=t;return Object.assign({motionDurationFast:`${(n+e).toFixed(1)}s`,motionDurationMid:`${(n+e*2).toFixed(1)}s`,motionDurationSlow:`${(n+e*3).toFixed(1)}s`,lineWidthBold:r+1},UPn(i))}const qPn=t=>{const{controlHeight:e}=t;return{controlHeightSM:e*.75,controlHeightXS:e*.5,controlHeightLG:e*1.25}};function Tee(t){return(t+8)/t}function GPn(t){const e=new Array(10).fill(null).map((n,i)=>{const r=i-1,o=t*Math.pow(Math.E,r/5),s=i>1?Math.floor(o):Math.ceil(o);return Math.floor(s/2)*2});return e[1]=t,e.map(n=>({size:n,lineHeight:Tee(n)}))}const YPn=t=>{const e=GPn(t),n=e.map(u=>u.size),i=e.map(u=>u.lineHeight),r=n[1],o=n[0],s=n[2],a=i[1],l=i[0],c=i[2];return{fontSizeSM:o,fontSize:r,fontSizeLG:s,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:a,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(a*r),fontHeightLG:Math.round(c*s),fontHeightSM:Math.round(l*o),lineHeightHeading1:i[6],lineHeightHeading2:i[5],lineHeightHeading3:i[4],lineHeightHeading4:i[3],lineHeightHeading5:i[2]}};function XPn(t){const{sizeUnit:e,sizeStep:n}=t;return{sizeXXL:e*(n+8),sizeXL:e*(n+4),sizeLG:e*(n+2),sizeMD:e*(n+1),sizeMS:e*n,size:e*n,sizeSM:e*(n-1),sizeXS:e*(n-2),sizeXXS:e*(n-3)}}const Ab=(t,e)=>new ko(t).setAlpha(e).toRgbString(),NV=(t,e)=>new ko(t).darken(e).toHexString(),ZPn=t=>{const e=Fz(t);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},QPn=(t,e)=>{const n=t||"#fff",i=e||"#000";return{colorBgBase:n,colorTextBase:i,colorText:Ab(i,.88),colorTextSecondary:Ab(i,.65),colorTextTertiary:Ab(i,.45),colorTextQuaternary:Ab(i,.25),colorFill:Ab(i,.15),colorFillSecondary:Ab(i,.06),colorFillTertiary:Ab(i,.04),colorFillQuaternary:Ab(i,.02),colorBgSolid:Ab(i,1),colorBgSolidHover:Ab(i,.75),colorBgSolidActive:Ab(i,.95),colorBgLayout:NV(n,4),colorBgContainer:NV(n,0),colorBgElevated:NV(n,0),colorBgSpotlight:Ab(i,.85),colorBgBlur:"transparent",colorBorder:NV(n,15),colorBorderSecondary:NV(n,6)}};function JPn(t){l3.pink=l3.magenta,Z_e.pink=Z_e.magenta;const e=Object.keys(XDt).map(n=>{const i=t[n]===l3[n]?Z_e[n]:Fz(t[n]);return new Array(10).fill(1).reduce((r,o,s)=>(r[`${n}-${s+1}`]=i[s],r[`${n}${s+1}`]=i[s],r),{})}).reduce((n,i)=>(n=Object.assign(Object.assign({},n),i),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),e),WPn(t,{generateColorPalettes:ZPn,generateNeutralColorPalettes:QPn})),YPn(t.fontSize)),XPn(t)),qPn(t)),KPn(t))}const ZDt=wEe(JPn),SDe={token:$z,override:{override:$z},hashed:!0},QDt=Z.createContext(SDe),Vz="ant",RFe="anticon",eOn=["outlined","borderless","filled"],tOn=(t,e)=>e||(t?`${Vz}-${t}`:Vz),jn=b.createContext({getPrefixCls:tOn,iconPrefixCls:RFe}),nOn=`-ant-${Date.now()}-${Math.random()}`;function iOn(t,e){const n={},i=(s,a)=>{let l=s.clone();return l=(a==null?void 0:a(l))||l,l.toRgbString()},r=(s,a)=>{const l=new ko(s),c=Fz(l.toRgbString());n[`${a}-color`]=i(l),n[`${a}-color-disabled`]=c[1],n[`${a}-color-hover`]=c[4],n[`${a}-color-active`]=c[6],n[`${a}-color-outline`]=l.clone().setAlpha(.2).toRgbString(),n[`${a}-color-deprecated-bg`]=c[0],n[`${a}-color-deprecated-border`]=c[2]};if(e.primaryColor){r(e.primaryColor,"primary");const s=new ko(e.primaryColor),a=Fz(s.toRgbString());a.forEach((c,u)=>{n[`primary-${u+1}`]=c}),n["primary-color-deprecated-l-35"]=i(s,c=>c.lighten(35)),n["primary-color-deprecated-l-20"]=i(s,c=>c.lighten(20)),n["primary-color-deprecated-t-20"]=i(s,c=>c.tint(20)),n["primary-color-deprecated-t-50"]=i(s,c=>c.tint(50)),n["primary-color-deprecated-f-12"]=i(s,c=>c.setAlpha(c.getAlpha()*.12));const l=new ko(a[0]);n["primary-color-active-deprecated-f-30"]=i(l,c=>c.setAlpha(c.getAlpha()*.3)),n["primary-color-active-deprecated-d-02"]=i(l,c=>c.darken(2))}return e.successColor&&r(e.successColor,"success"),e.warningColor&&r(e.warningColor,"warning"),e.errorColor&&r(e.errorColor,"error"),e.infoColor&&r(e.infoColor,"info"),`
  :root {
    ${Object.keys(n).map(s=>`--${t}-${s}: ${n[s]};`).join(`
`)}
  }
  `.trim()}function rOn(t,e){const n=iOn(t,e);Lu()?NC(n,`${nOn}-dynamic-theme`):FS(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}const Yd=b.createContext(!1),PFe=t=>{let{children:e,disabled:n}=t;const i=b.useContext(Yd);return b.createElement(Yd.Provider,{value:n??i},e)},D2=b.createContext(void 0),oOn=t=>{let{children:e,size:n}=t;const i=b.useContext(D2);return b.createElement(D2.Provider,{value:n||i},e)};function sOn(){const t=b.useContext(Yd),e=b.useContext(D2);return{componentDisabled:t,componentSize:e}}var JDt=Qa(function t(){Za(this,t)}),ekt="CALC_UNIT",aOn=new RegExp(ekt,"g");function Q_e(t){return typeof t=="number"?"".concat(t).concat(ekt):t}var lOn=function(t){Zp(n,t);var e=pb(n);function n(i,r){var o;Za(this,n),o=e.call(this),ye(bn(o),"result",""),ye(bn(o),"unitlessCssVar",void 0),ye(bn(o),"lowPriority",void 0);var s=Un(i);return o.unitlessCssVar=r,i instanceof n?o.result="(".concat(i.result,")"):s==="number"?o.result=Q_e(i):s==="string"&&(o.result=i),o}return Qa(n,[{key:"add",value:function(r){return r instanceof n?this.result="".concat(this.result," + ").concat(r.getResult()):(typeof r=="number"||typeof r=="string")&&(this.result="".concat(this.result," + ").concat(Q_e(r))),this.lowPriority=!0,this}},{key:"sub",value:function(r){return r instanceof n?this.result="".concat(this.result," - ").concat(r.getResult()):(typeof r=="number"||typeof r=="string")&&(this.result="".concat(this.result," - ").concat(Q_e(r))),this.lowPriority=!0,this}},{key:"mul",value:function(r){return this.lowPriority&&(this.result="(".concat(this.result,")")),r instanceof n?this.result="".concat(this.result," * ").concat(r.getResult(!0)):(typeof r=="number"||typeof r=="string")&&(this.result="".concat(this.result," * ").concat(r)),this.lowPriority=!1,this}},{key:"div",value:function(r){return this.lowPriority&&(this.result="(".concat(this.result,")")),r instanceof n?this.result="".concat(this.result," / ").concat(r.getResult(!0)):(typeof r=="number"||typeof r=="string")&&(this.result="".concat(this.result," / ").concat(r)),this.lowPriority=!1,this}},{key:"getResult",value:function(r){return this.lowPriority||r?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(r){var o=this,s=r||{},a=s.unit,l=!0;return typeof a=="boolean"?l=a:Array.from(this.unitlessCssVar).some(function(c){return o.result.includes(c)})&&(l=!1),this.result=this.result.replace(aOn,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n}(JDt),cOn=function(t){Zp(n,t);var e=pb(n);function n(i){var r;return Za(this,n),r=e.call(this),ye(bn(r),"result",0),i instanceof n?r.result=i.result:typeof i=="number"&&(r.result=i),r}return Qa(n,[{key:"add",value:function(r){return r instanceof n?this.result+=r.result:typeof r=="number"&&(this.result+=r),this}},{key:"sub",value:function(r){return r instanceof n?this.result-=r.result:typeof r=="number"&&(this.result-=r),this}},{key:"mul",value:function(r){return r instanceof n?this.result*=r.result:typeof r=="number"&&(this.result*=r),this}},{key:"div",value:function(r){return r instanceof n?this.result/=r.result:typeof r=="number"&&(this.result/=r),this}},{key:"equal",value:function(){return this.result}}]),n}(JDt),uOn=function(e,n){var i=e==="css"?lOn:cOn;return function(r){return new i(r,n)}},zet=function(e,n){return"".concat([n,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function gr(t){var e=b.useRef();e.current=t;var n=b.useCallback(function(){for(var i,r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return(i=e.current)===null||i===void 0?void 0:i.call.apply(i,[e].concat(o))},[]);return n}function k2(t){var e=b.useRef(!1),n=b.useState(t),i=He(n,2),r=i[0],o=i[1];b.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]);function s(a,l){l&&e.current||o(a)}return[r,s]}function J_e(t){return t!==void 0}function ho(t,e){var n=e||{},i=n.defaultValue,r=n.value,o=n.onChange,s=n.postState,a=k2(function(){return J_e(r)?r:J_e(i)?typeof i=="function"?i():i:typeof t=="function"?t():t}),l=He(a,2),c=l[0],u=l[1],d=r!==void 0?r:c,h=s?s(d):d,f=gr(o),m=k2([d]),p=He(m,2),g=p[0],y=p[1];ZT(function(){var w=g[0];c!==w&&f(c,w)},[g]),ZT(function(){J_e(r)||u(r)},[r]);var _=gr(function(w,C){u(w,C),y([d],C)});return[h,_]}function Het(t,e,n,i){var r=Ie({},e[t]);if(i!=null&&i.deprecatedTokens){var o=i.deprecatedTokens;o.forEach(function(a){var l=He(a,2),c=l[0],u=l[1];if(ii(!(r!=null&&r[c]),"Component Token `".concat(String(c),"` of ").concat(String(t)," is deprecated. Please use `").concat(String(u),"` instead.")),r!=null&&r[c]||r!=null&&r[u]){var d;(d=r[u])!==null&&d!==void 0||(r[u]=r==null?void 0:r[c])}})}var s=Ie(Ie({},n),r);return Object.keys(s).forEach(function(a){s[a]===e[a]&&delete s[a]}),s}var NDe=!0;function mr(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];NDe=!1;var i={};return e.forEach(function(r){if(Un(r)==="object"){var o=Object.keys(r);o.forEach(function(s){Object.defineProperty(i,s,{configurable:!0,enumerable:!0,get:function(){return r[s]}})})}}),NDe=!0,i}var Wet={};function dOn(){}var hOn=function(e){var n,i=e,r=dOn;return typeof Proxy<"u"&&(n=new Set,i=new Proxy(e,{get:function(s,a){if(NDe){var l;(l=n)===null||l===void 0||l.add(a)}return s[a]}}),r=function(s,a){var l;Wet[s]={global:Array.from(n),component:Ie(Ie({},(l=Wet[s])===null||l===void 0?void 0:l.component),a)}}),{token:i,keys:n,flush:r}};function Uet(t,e,n){if(typeof n=="function"){var i;return n(mr(e,(i=e[t])!==null&&i!==void 0?i:{}))}return n??{}}function fOn(t){return t==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return"max(".concat(i.map(function(o){return xe(o)}).join(","),")")},min:function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return"min(".concat(i.map(function(o){return xe(o)}).join(","),")")}}}var mOn=1e3*60*10,pOn=function(){function t(){Za(this,t),ye(this,"map",new Map),ye(this,"objectIDMap",new WeakMap),ye(this,"nextID",0),ye(this,"lastAccessBeat",new Map),ye(this,"accessBeat",0)}return Qa(t,[{key:"set",value:function(n,i){this.clear();var r=this.getCompositeKey(n);this.map.set(r,i),this.lastAccessBeat.set(r,Date.now())}},{key:"get",value:function(n){var i=this.getCompositeKey(n),r=this.map.get(i);return this.lastAccessBeat.set(i,Date.now()),this.accessBeat+=1,r}},{key:"getCompositeKey",value:function(n){var i=this,r=n.map(function(o){return o&&Un(o)==="object"?"obj_".concat(i.getObjectID(o)):"".concat(Un(o),"_").concat(o)});return r.join("|")}},{key:"getObjectID",value:function(n){if(this.objectIDMap.has(n))return this.objectIDMap.get(n);var i=this.nextID;return this.objectIDMap.set(n,i),this.nextID+=1,i}},{key:"clear",value:function(){var n=this;if(this.accessBeat>1e4){var i=Date.now();this.lastAccessBeat.forEach(function(r,o){i-r>mOn&&(n.map.delete(o),n.lastAccessBeat.delete(o))}),this.accessBeat=0}}}]),t}(),Ket=new pOn;function gOn(t,e){return Z.useMemo(function(){var n=Ket.get(e);if(n)return n;var i=t();return Ket.set(e,i),i},e)}var bOn=function(){return{}};function vOn(t){var e=t.useCSP,n=e===void 0?bOn:e,i=t.useToken,r=t.usePrefix,o=t.getResetStyles,s=t.getCommonStyle,a=t.getCompUnitless;function l(h,f,m,p){var g=Array.isArray(h)?h[0]:h;function y(k){return"".concat(String(g)).concat(k.slice(0,1).toUpperCase()).concat(k.slice(1))}var _=(p==null?void 0:p.unitless)||{},w=typeof a=="function"?a(h):{},C=Ie(Ie({},w),{},ye({},y("zIndexPopup"),!0));Object.keys(_).forEach(function(k){C[y(k)]=_[k]});var N=Ie(Ie({},p),{},{unitless:C,prefixToken:y}),E=u(h,f,m,N),D=c(g,m,N);return function(k){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,T=E(k,M),A=He(T,2),R=A[1],P=D(M),O=He(P,2),V=O[0],F=O[1];return[V,R,F]}}function c(h,f,m){var p=m.unitless,g=m.injectStyle,y=g===void 0?!0:g,_=m.prefixToken,w=m.ignore,C=function(D){var k=D.rootCls,M=D.cssVar,T=M===void 0?{}:M,A=i(),R=A.realToken;return FCn({path:[h],prefix:T.prefix,key:T.key,unitless:p,ignore:w,token:R,scope:k},function(){var P=Uet(h,R,f),O=Het(h,R,P,{deprecatedTokens:m==null?void 0:m.deprecatedTokens});return Object.keys(P).forEach(function(V){O[_(V)]=O[V],delete O[V]}),O}),null},N=function(D){var k=i(),M=k.cssVar;return[function(T){return y&&M?Z.createElement(Z.Fragment,null,Z.createElement(C,{rootCls:D,cssVar:M,component:h}),T):T},M==null?void 0:M.key]};return N}function u(h,f,m){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=Array.isArray(h)?h:[h,h],y=He(g,1),_=y[0],w=g.join("-"),C=t.layer||{name:"antd"};return function(N){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:N,D=i(),k=D.theme,M=D.realToken,T=D.hashId,A=D.token,R=D.cssVar,P=r(),O=P.rootPrefixCls,V=P.iconPrefixCls,F=n(),$=R?"css":"js",B=gOn(function(){var Y=new Set;return R&&Object.keys(p.unitless||{}).forEach(function(J){Y.add(pee(J,R.prefix)),Y.add(pee(J,zet(_,R.prefix)))}),uOn($,Y)},[$,_,R==null?void 0:R.prefix]),z=fOn($),H=z.max,K=z.min,q={theme:k,token:A,hashId:T,nonce:function(){return F.nonce},clientOnly:p.clientOnly,layer:C,order:p.order||-999};DEe(Ie(Ie({},q),{},{clientOnly:!1,path:["Shared",O]}),function(){return typeof o=="function"?o(A):[]});var U=DEe(Ie(Ie({},q),{},{path:[w,N,V]}),function(){if(p.injectStyle===!1)return[];var Y=hOn(A),J=Y.token,ae=Y.flush,se=Uet(_,M,m),oe=".".concat(N),fe=Het(_,M,se,{deprecatedTokens:p.deprecatedTokens});R&&se&&Un(se)==="object"&&Object.keys(se).forEach(function(be){se[be]="var(".concat(pee(be,zet(_,R.prefix)),")")});var de=mr(J,{componentCls:oe,prefixCls:N,iconCls:".".concat(V),antCls:".".concat(O),calc:B,max:H,min:K},R?se:fe),ie=f(de,{hashId:T,prefixCls:N,rootPrefixCls:O,iconPrefixCls:V});ae(_,fe);var Q=typeof s=="function"?s(de,N,E,p.resetFont):null;return[p.resetStyle===!1?null:Q,ie]});return[U,T]}}function d(h,f,m){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=u(h,f,m,Ie({resetStyle:!1,order:-998},p)),y=function(w){var C=w.prefixCls,N=w.rootCls,E=N===void 0?C:N;return g(C,E),null};return y.displayName="SubStyle_".concat(String(Array.isArray(h)?h.join("."):h)),y}return{genStyleHooks:l,genSubStyleComponent:d,genComponentStyleHook:u}}const Bz=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],yOn="5.21.4";function exe(t){return t>=0&&t<=255}function EZ(t,e){const{r:n,g:i,b:r,a:o}=new ko(t).toRgb();if(o<1)return t;const{r:s,g:a,b:l}=new ko(e).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-s*(1-c))/c),d=Math.round((i-a*(1-c))/c),h=Math.round((r-l*(1-c))/c);if(exe(u)&&exe(d)&&exe(h))return new ko({r:u,g:d,b:h,a:Math.round(c*100)/100}).toRgbString()}return new ko({r:n,g:i,b:r,a:1}).toRgbString()}var _On=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};function tkt(t){const{override:e}=t,n=_On(t,["override"]),i=Object.assign({},e);Object.keys($z).forEach(h=>{delete i[h]});const r=Object.assign(Object.assign({},n),i),o=480,s=576,a=768,l=992,c=1200,u=1600;if(r.motion===!1){const h="0s";r.motionDurationFast=h,r.motionDurationMid=h,r.motionDurationSlow=h}return Object.assign(Object.assign(Object.assign({},r),{colorFillContent:r.colorFillSecondary,colorFillContentHover:r.colorFill,colorFillAlter:r.colorFillQuaternary,colorBgContainerDisabled:r.colorFillTertiary,colorBorderBg:r.colorBgContainer,colorSplit:EZ(r.colorBorderSecondary,r.colorBgContainer),colorTextPlaceholder:r.colorTextQuaternary,colorTextDisabled:r.colorTextQuaternary,colorTextHeading:r.colorText,colorTextLabel:r.colorTextSecondary,colorTextDescription:r.colorTextTertiary,colorTextLightSolid:r.colorWhite,colorHighlight:r.colorError,colorBgTextHover:r.colorFillSecondary,colorBgTextActive:r.colorFill,colorIcon:r.colorTextTertiary,colorIconHover:r.colorText,colorErrorOutline:EZ(r.colorErrorBg,r.colorBgContainer),colorWarningOutline:EZ(r.colorWarningBg,r.colorBgContainer),fontSizeIcon:r.fontSizeSM,lineWidthFocus:r.lineWidth*3,lineWidth:r.lineWidth,controlOutlineWidth:r.lineWidth*2,controlInteractiveSize:r.controlHeight/2,controlItemBgHover:r.colorFillTertiary,controlItemBgActive:r.colorPrimaryBg,controlItemBgActiveHover:r.colorPrimaryBgHover,controlItemBgActiveDisabled:r.colorFill,controlTmpOutline:r.colorFillQuaternary,controlOutline:EZ(r.colorPrimaryBg,r.colorBgContainer),lineType:r.lineType,borderRadius:r.borderRadius,borderRadiusXS:r.borderRadiusXS,borderRadiusSM:r.borderRadiusSM,borderRadiusLG:r.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:r.sizeXXS,paddingXS:r.sizeXS,paddingSM:r.sizeSM,padding:r.size,paddingMD:r.sizeMD,paddingLG:r.sizeLG,paddingXL:r.sizeXL,paddingContentHorizontalLG:r.sizeLG,paddingContentVerticalLG:r.sizeMS,paddingContentHorizontal:r.sizeMS,paddingContentVertical:r.sizeSM,paddingContentHorizontalSM:r.size,paddingContentVerticalSM:r.sizeXS,marginXXS:r.sizeXXS,marginXS:r.sizeXS,marginSM:r.sizeSM,margin:r.size,marginMD:r.sizeMD,marginLG:r.sizeLG,marginXL:r.sizeXL,marginXXL:r.sizeXXL,boxShadow:`
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,boxShadowSecondary:`
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,boxShadowTertiary:`
      0 1px 2px 0 rgba(0, 0, 0, 0.03),
      0 1px 6px -1px rgba(0, 0, 0, 0.02),
      0 2px 4px 0 rgba(0, 0, 0, 0.02)
    `,screenXS:o,screenXSMin:o,screenXSMax:s-1,screenSM:s,screenSMMin:s,screenSMMax:a-1,screenMD:a,screenMDMin:a,screenMDMax:l-1,screenLG:l,screenLGMin:l,screenLGMax:c-1,screenXL:c,screenXLMin:c,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
      0 1px 2px -2px ${new ko("rgba(0, 0, 0, 0.16)").toRgbString()},
      0 3px 6px 0 ${new ko("rgba(0, 0, 0, 0.12)").toRgbString()},
      0 5px 12px 4px ${new ko("rgba(0, 0, 0, 0.09)").toRgbString()}
    `,boxShadowDrawerRight:`
      -6px 0 16px 0 rgba(0, 0, 0, 0.08),
      -3px 0 6px -4px rgba(0, 0, 0, 0.12),
      -9px 0 28px 8px rgba(0, 0, 0, 0.05)
    `,boxShadowDrawerLeft:`
      6px 0 16px 0 rgba(0, 0, 0, 0.08),
      3px 0 6px -4px rgba(0, 0, 0, 0.12),
      9px 0 28px 8px rgba(0, 0, 0, 0.05)
    `,boxShadowDrawerUp:`
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,boxShadowDrawerDown:`
      0 -6px 16px 0 rgba(0, 0, 0, 0.08),
      0 -3px 6px -4px rgba(0, 0, 0, 0.12),
      0 -9px 28px 8px rgba(0, 0, 0, 0.05)
    `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),i)}var qet=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const nkt={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},xOn={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},wOn={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},ikt=(t,e,n)=>{const i=n.getDerivativeToken(t),{override:r}=e,o=qet(e,["override"]);let s=Object.assign(Object.assign({},i),{override:r});return s=tkt(s),o&&Object.entries(o).forEach(a=>{let[l,c]=a;const{theme:u}=c,d=qet(c,["theme"]);let h=d;u&&(h=ikt(Object.assign(Object.assign({},s),d),{override:d},u)),s[l]=h}),s};function Sd(){const{token:t,hashed:e,theme:n,override:i,cssVar:r}=Z.useContext(QDt),o=`${yOn}-${e||""}`,s=n||ZDt,[a,l,c]=uCn(s,[$z,t],{salt:o,override:i,getComputedToken:ikt,formatToken:tkt,cssVar:r&&{prefix:r.prefix,key:r.key,unitless:nkt,ignore:xOn,preserve:wOn}});return[s,c,e?l:"",a,r]}const Mm={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},fo=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return{boxSizing:"border-box",margin:0,padding:0,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,listStyle:"none",fontFamily:e?"inherit":t.fontFamily}},e6=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),O0=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),COn=t=>({a:{color:t.colorLink,textDecoration:t.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:t.colorLinkHover},"&:active":{color:t.colorLinkActive},"&:active, &:hover":{textDecoration:t.linkHoverDecoration,outline:0},"&:focus":{textDecoration:t.linkFocusDecoration,outline:0},"&[disabled]":{color:t.colorTextDisabled,cursor:"not-allowed"}}}),SOn=(t,e,n,i)=>{const r=`[class^="${e}"], [class*=" ${e}"]`,o=n?`.${n}`:r,s={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let a={};return i!==!1&&(a={fontFamily:t.fontFamily,fontSize:t.fontSize}),{[o]:Object.assign(Object.assign(Object.assign({},a),s),{[r]:s})}},iS=t=>({outline:`${xe(t.lineWidthFocus)} solid ${t.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),j0=t=>({"&:focus-visible":Object.assign({},iS(t))}),OFe=t=>Object.assign(Object.assign({color:t.colorLink,textDecoration:t.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},j0(t)),{"&:focus, &:hover":{color:t.colorLinkHover},"&:active":{color:t.colorLinkActive}}),rkt=(t,e)=>{const[n,i]=Sd();return DEe({theme:n,token:i,hashId:"",path:["ant-design-icons",t],nonce:()=>e==null?void 0:e.nonce,layer:{name:"antd"}},()=>[{[`.${t}`]:Object.assign(Object.assign({},e6()),{[`.${t} .${t}-icon`]:{display:"block"}})}])},{genStyleHooks:Jr,genComponentStyleHook:NOn,genSubStyleComponent:$A}=vOn({usePrefix:()=>{const{getPrefixCls:t,iconPrefixCls:e}=b.useContext(jn);return{rootPrefixCls:t(),iconPrefixCls:e}},useToken:()=>{const[t,e,n,i,r]=Sd();return{theme:t,realToken:e,hashId:n,token:i,cssVar:r}},useCSP:()=>{const{csp:t,iconPrefixCls:e}=b.useContext(jn);return rkt(e,t),t??{}},getResetStyles:t=>[{"&":COn(t)}],getCommonStyle:SOn,getCompUnitless:()=>nkt});function Jde(t,e){return Bz.reduce((n,i)=>{const r=t[`${i}1`],o=t[`${i}3`],s=t[`${i}6`],a=t[`${i}7`];return Object.assign(Object.assign({},n),e(i,{lightColor:r,lightBorderColor:o,darkColor:s,textColor:a}))},{})}const EOn=Object.assign({},CF),{useId:Get}=EOn,DOn=()=>"",kOn=typeof Get>"u"?DOn:Get;function MOn(t,e,n){var i,r;const o=Cr("ConfigProvider"),s=t||{},a=s.inherit===!1||!e?Object.assign(Object.assign({},SDe),{hashed:(i=e==null?void 0:e.hashed)!==null&&i!==void 0?i:SDe.hashed,cssVar:e==null?void 0:e.cssVar}):e,l=kOn();{const c=s.cssVar||a.cssVar,u=!!(typeof s.cssVar=="object"&&(!((r=s.cssVar)===null||r===void 0)&&r.key)||l);o(!c||u,"breaking","Missing key in `cssVar` config. Please upgrade to React 18 or set `cssVar.key` manually in each ConfigProvider inside `cssVar` enabled ConfigProvider.")}return Hk(()=>{var c,u;if(!t)return e;const d=Object.assign({},a.components);Object.keys(t.components||{}).forEach(m=>{d[m]=Object.assign(Object.assign({},d[m]),t.components[m])});const h=`css-var-${l.replace(/:/g,"")}`,f=((c=s.cssVar)!==null&&c!==void 0?c:a.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n==null?void 0:n.prefixCls},typeof a.cssVar=="object"?a.cssVar:{}),typeof s.cssVar=="object"?s.cssVar:{}),{key:typeof s.cssVar=="object"&&((u=s.cssVar)===null||u===void 0?void 0:u.key)||h});return Object.assign(Object.assign(Object.assign({},a),s),{token:Object.assign(Object.assign({},a.token),s.token),components:d,cssVar:f})},[s,a],(c,u)=>c.some((d,h)=>{const f=u[h];return!jp(d,f,!0)}))}var LOn=["children"],okt=b.createContext({});function TOn(t){var e=t.children,n=di(t,LOn);return b.createElement(okt.Provider,{value:n},e)}var IOn=function(t){Zp(n,t);var e=pb(n);function n(){return Za(this,n),e.apply(this,arguments)}return Qa(n,[{key:"render",value:function(){return this.props.children}}]),n}(b.Component);function AOn(t){var e=b.useReducer(function(a){return a+1},0),n=He(e,2),i=n[1],r=b.useRef(t),o=gr(function(){return r.current}),s=gr(function(a){r.current=typeof a=="function"?a(r.current):a,i()});return[o,s]}var KN="none",DZ="appear",kZ="enter",MZ="leave",Yet="none",Fy="prepare",QO="start",JO="active",jFe="end",skt="prepared";function Xet(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit".concat(t)]="webkit".concat(e),n["Moz".concat(t)]="moz".concat(e),n["ms".concat(t)]="MS".concat(e),n["O".concat(t)]="o".concat(e.toLowerCase()),n}function ROn(t,e){var n={animationend:Xet("Animation","AnimationEnd"),transitionend:Xet("Transition","TransitionEnd")};return t&&("AnimationEvent"in e||delete n.animationend.animation,"TransitionEvent"in e||delete n.transitionend.transition),n}var POn=ROn(Lu(),typeof window<"u"?window:{}),akt={};if(Lu()){var OOn=document.createElement("div");akt=OOn.style}var LZ={};function lkt(t){if(LZ[t])return LZ[t];var e=POn[t];if(e)for(var n=Object.keys(e),i=n.length,r=0;r<i;r+=1){var o=n[r];if(Object.prototype.hasOwnProperty.call(e,o)&&o in akt)return LZ[t]=e[o],LZ[t]}return""}var ckt=lkt("animationend"),ukt=lkt("transitionend"),dkt=!!(ckt&&ukt),Zet=ckt||"animationend",Qet=ukt||"transitionend";function Jet(t,e){if(!t)return null;if(Un(t)==="object"){var n=e.replace(/-\w/g,function(i){return i[1].toUpperCase()});return t[n]}return"".concat(t,"-").concat(e)}const jOn=function(t){var e=b.useRef();function n(r){r&&(r.removeEventListener(Qet,t),r.removeEventListener(Zet,t))}function i(r){e.current&&e.current!==r&&n(e.current),r&&r!==e.current&&(r.addEventListener(Qet,t),r.addEventListener(Zet,t),e.current=r)}return b.useEffect(function(){return function(){n(e.current)}},[]),[i,n]};var hkt=Lu()?b.useLayoutEffect:b.useEffect;const FOn=function(){var t=b.useRef(null);function e(){Dr.cancel(t.current)}function n(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;e();var o=Dr(function(){r<=1?i({isCanceled:function(){return o!==t.current}}):n(i,r-1)});t.current=o}return b.useEffect(function(){return function(){e()}},[]),[n,e]};var $On=[Fy,QO,JO,jFe],VOn=[Fy,skt],fkt=!1,BOn=!0;function mkt(t){return t===JO||t===jFe}const zOn=function(t,e,n){var i=k2(Yet),r=He(i,2),o=r[0],s=r[1],a=FOn(),l=He(a,2),c=l[0],u=l[1];function d(){s(Fy,!0)}var h=e?VOn:$On;return hkt(function(){if(o!==Yet&&o!==jFe){var f=h.indexOf(o),m=h[f+1],p=n(o);p===fkt?s(m,!0):m&&c(function(g){function y(){g.isCanceled()||s(m,!0)}p===!0?y():Promise.resolve(p).then(y)})}},[t,o]),b.useEffect(function(){return function(){u()}},[]),[d,o]};function HOn(t,e,n,i){var r=i.motionEnter,o=r===void 0?!0:r,s=i.motionAppear,a=s===void 0?!0:s,l=i.motionLeave,c=l===void 0?!0:l,u=i.motionDeadline,d=i.motionLeaveImmediately,h=i.onAppearPrepare,f=i.onEnterPrepare,m=i.onLeavePrepare,p=i.onAppearStart,g=i.onEnterStart,y=i.onLeaveStart,_=i.onAppearActive,w=i.onEnterActive,C=i.onLeaveActive,N=i.onAppearEnd,E=i.onEnterEnd,D=i.onLeaveEnd,k=i.onVisibleChanged,M=k2(),T=He(M,2),A=T[0],R=T[1],P=AOn(KN),O=He(P,2),V=O[0],F=O[1],$=k2(null),B=He($,2),z=B[0],H=B[1],K=V(),q=b.useRef(!1),U=b.useRef(null);function Y(){return n()}var J=b.useRef(!1);function ae(){F(KN),H(null,!0)}var se=gr(function(ge){var he=V();if(he!==KN){var me=Y();if(!(ge&&!ge.deadline&&ge.target!==me)){var X=J.current,re;he===DZ&&X?re=N==null?void 0:N(me,ge):he===kZ&&X?re=E==null?void 0:E(me,ge):he===MZ&&X&&(re=D==null?void 0:D(me,ge)),X&&re!==!1&&ae()}}}),oe=jOn(se),fe=He(oe,1),de=fe[0],ie=function(he){switch(he){case DZ:return ye(ye(ye({},Fy,h),QO,p),JO,_);case kZ:return ye(ye(ye({},Fy,f),QO,g),JO,w);case MZ:return ye(ye(ye({},Fy,m),QO,y),JO,C);default:return{}}},Q=b.useMemo(function(){return ie(K)},[K]),be=zOn(K,!t,function(ge){if(ge===Fy){var he=Q[Fy];return he?he(Y()):fkt}if(Le in Q){var me;H(((me=Q[Le])===null||me===void 0?void 0:me.call(Q,Y(),null))||null)}return Le===JO&&K!==KN&&(de(Y()),u>0&&(clearTimeout(U.current),U.current=setTimeout(function(){se({deadline:!0})},u))),Le===skt&&ae(),BOn}),le=He(be,2),Ne=le[0],Le=le[1],Te=mkt(Le);J.current=Te,hkt(function(){R(e);var ge=q.current;q.current=!0;var he;!ge&&e&&a&&(he=DZ),ge&&e&&o&&(he=kZ),(ge&&!e&&c||!ge&&d&&!e&&c)&&(he=MZ);var me=ie(he);he&&(t||me[Fy])?(F(he),Ne()):F(KN)},[e]),b.useEffect(function(){(K===DZ&&!a||K===kZ&&!o||K===MZ&&!c)&&F(KN)},[a,o,c]),b.useEffect(function(){return function(){q.current=!1,clearTimeout(U.current)}},[]);var De=b.useRef(!1);b.useEffect(function(){A&&(De.current=!0),A!==void 0&&K===KN&&((De.current||A)&&(k==null||k(A)),De.current=!0)},[A,K]);var Pe=z;return Q[Fy]&&Le===QO&&(Pe=Ie({transition:"none"},Pe)),[K,Le,Pe,A??e]}function WOn(t){var e=t;Un(t)==="object"&&(e=t.transitionSupport);function n(r,o){return!!(r.motionName&&e&&o!==!1)}var i=b.forwardRef(function(r,o){var s=r.visible,a=s===void 0?!0:s,l=r.removeOnLeave,c=l===void 0?!0:l,u=r.forceRender,d=r.children,h=r.motionName,f=r.leavedClassName,m=r.eventProps,p=b.useContext(okt),g=p.motion,y=n(r,g),_=b.useRef(),w=b.useRef();function C(){try{return _.current instanceof HTMLElement?_.current:M9(w.current)}catch{return null}}var N=HOn(y,a,C,r),E=He(N,4),D=E[0],k=E[1],M=E[2],T=E[3],A=b.useRef(T);T&&(A.current=!0);var R=b.useCallback(function(z){_.current=z,jz(o,z)},[o]),P,O=Ie(Ie({},m),{},{visible:a});if(!d)P=null;else if(D===KN)T?P=d(Ie({},O),R):!c&&A.current&&f?P=d(Ie(Ie({},O),{},{className:f}),R):u||!c&&!f?P=d(Ie(Ie({},O),{},{style:{display:"none"}}),R):P=null;else{var V;k===Fy?V="prepare":mkt(k)?V="active":k===QO&&(V="start");var F=Jet(h,"".concat(D,"-").concat(V));P=d(Ie(Ie({},O),{},{className:Me(Jet(h,D),ye(ye({},F,F&&V),h,typeof h=="string")),style:M}),R)}if(b.isValidElement(P)&&P0(P)){var $=P,B=$.ref;B||(P=b.cloneElement(P,{ref:R}))}return b.createElement(IOn,{ref:w},P)});return i.displayName="CSSMotion",i}const Ou=WOn(dkt);var EDe="add",DDe="keep",kDe="remove",txe="removed";function UOn(t){var e;return t&&Un(t)==="object"&&"key"in t?e=t:e={key:t},Ie(Ie({},e),{},{key:String(e.key)})}function MDe(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.map(UOn)}function KOn(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],i=0,r=e.length,o=MDe(t),s=MDe(e);o.forEach(function(c){for(var u=!1,d=i;d<r;d+=1){var h=s[d];if(h.key===c.key){i<d&&(n=n.concat(s.slice(i,d).map(function(f){return Ie(Ie({},f),{},{status:EDe})})),i=d),n.push(Ie(Ie({},h),{},{status:DDe})),i+=1,u=!0;break}}u||n.push(Ie(Ie({},c),{},{status:kDe}))}),i<r&&(n=n.concat(s.slice(i).map(function(c){return Ie(Ie({},c),{},{status:EDe})})));var a={};n.forEach(function(c){var u=c.key;a[u]=(a[u]||0)+1});var l=Object.keys(a).filter(function(c){return a[c]>1});return l.forEach(function(c){n=n.filter(function(u){var d=u.key,h=u.status;return d!==c||h!==kDe}),n.forEach(function(u){u.key===c&&(u.status=DDe)})}),n}var qOn=["component","children","onVisibleChanged","onAllRemoved"],GOn=["status"],YOn=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function XOn(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ou,n=function(i){Zp(o,i);var r=pb(o);function o(){var s;Za(this,o);for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return s=r.call.apply(r,[this].concat(l)),ye(bn(s),"state",{keyEntities:[]}),ye(bn(s),"removeKey",function(u){s.setState(function(d){var h=d.keyEntities.map(function(f){return f.key!==u?f:Ie(Ie({},f),{},{status:txe})});return{keyEntities:h}},function(){var d=s.state.keyEntities,h=d.filter(function(f){var m=f.status;return m!==txe}).length;h===0&&s.props.onAllRemoved&&s.props.onAllRemoved()})}),s}return Qa(o,[{key:"render",value:function(){var a=this,l=this.state.keyEntities,c=this.props,u=c.component,d=c.children,h=c.onVisibleChanged;c.onAllRemoved;var f=di(c,qOn),m=u||b.Fragment,p={};return YOn.forEach(function(g){p[g]=f[g],delete f[g]}),delete f.keys,b.createElement(m,f,l.map(function(g,y){var _=g.status,w=di(g,GOn),C=_===EDe||_===DDe;return b.createElement(e,lt({},p,{key:w.key,visible:C,eventProps:w,onVisibleChanged:function(E){h==null||h(E,{key:w.key}),E||a.removeKey(w.key)}}),function(N,E){return d(Ie(Ie({},N),{},{index:y}),E)})}))}}],[{key:"getDerivedStateFromProps",value:function(a,l){var c=a.keys,u=l.keyEntities,d=MDe(c),h=KOn(u,d);return{keyEntities:h.filter(function(f){var m=u.find(function(p){var g=p.key;return f.key===g});return!(m&&m.status===txe&&f.status===kDe)})}}}]),o}(b.Component);return ye(n,"defaultProps",{component:"div"}),n}const FFe=XOn(dkt);function ZOn(t){const{children:e}=t,[,n]=Sd(),{motion:i}=n,r=b.useRef(!1);return r.current=r.current||i===!1,r.current?b.createElement(TOn,{motion:i},e):e}const pkt=b.memo(t=>{let{dropdownMatchSelectWidth:e}=t;return Cr("ConfigProvider").deprecated(e===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null});pkt.displayName="PropWarning";const QOn=pkt;var JOn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};let LDe=!1;const gkt=t=>{FS(!LDe,t,"Static function can not consume context like dynamic theme. Please use 'App' component instead.")},e4n=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let Hne,bkt,vkt,ykt;function Iee(){return Hne||Vz}function t4n(){return bkt||RFe}function n4n(t){return Object.keys(t).some(e=>e.endsWith("Color"))}const i4n=t=>{const{prefixCls:e,iconPrefixCls:n,theme:i,holderRender:r}=t;e!==void 0&&(Hne=e),n!==void 0&&(bkt=n),"holderRender"in t&&(ykt=r),i&&(n4n(i)?(FS(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),rOn(Iee(),i)):vkt=i)},$Fe=()=>({getPrefixCls:(t,e)=>e||(t?`${Iee()}-${t}`:Iee()),getIconPrefixCls:t4n,getRootPrefixCls:()=>Hne||Iee(),getTheme:()=>vkt,holderRender:ykt}),r4n=t=>{const{children:e,csp:n,autoInsertSpaceInButton:i,alert:r,anchor:o,form:s,locale:a,componentSize:l,direction:c,space:u,splitter:d,virtual:h,dropdownMatchSelectWidth:f,popupMatchSelectWidth:m,popupOverflow:p,legacyLocale:g,parentContext:y,iconPrefixCls:_,theme:w,componentDisabled:C,segmented:N,statistic:E,spin:D,calendar:k,carousel:M,cascader:T,collapse:A,typography:R,checkbox:P,descriptions:O,divider:V,drawer:F,skeleton:$,steps:B,image:z,layout:H,list:K,mentions:q,modal:U,progress:Y,result:J,slider:ae,breadcrumb:se,menu:oe,pagination:fe,input:de,textArea:ie,empty:Q,badge:be,radio:le,rate:Ne,switch:Le,transfer:Te,avatar:De,message:Pe,tag:ge,table:he,card:me,tabs:X,timeline:re,timePicker:we,upload:ue,notification:Ce,tree:ze,colorPicker:Ye,datePicker:Ke,rangePicker:Xe,flex:it,wave:ut,dropdown:Ge,warning:Ee,tour:Se,floatButtonGroup:je,variant:nt,inputNumber:rt,treeSelect:St}=t,At=b.useCallback((at,mt)=>{const{prefixCls:It}=t;if(mt)return mt;const Ve=It||y.getPrefixCls("");return at?`${Ve}-${at}`:Ve},[y.getPrefixCls,t.prefixCls]),Nt=_||y.iconPrefixCls||RFe,vt=n||y.csp;rkt(Nt,vt);const $t=MOn(w,y.theme,{prefixCls:At("")});LDe=LDe||!!$t;const ln={csp:vt,autoInsertSpaceInButton:i,alert:r,anchor:o,locale:a||g,direction:c,space:u,splitter:d,virtual:h,popupMatchSelectWidth:m??f,popupOverflow:p,getPrefixCls:At,iconPrefixCls:Nt,theme:$t,segmented:N,statistic:E,spin:D,calendar:k,carousel:M,cascader:T,collapse:A,typography:R,checkbox:P,descriptions:O,divider:V,drawer:F,skeleton:$,steps:B,image:z,input:de,textArea:ie,layout:H,list:K,mentions:q,modal:U,progress:Y,result:J,slider:ae,breadcrumb:se,menu:oe,pagination:fe,empty:Q,badge:be,radio:le,rate:Ne,switch:Le,transfer:Te,avatar:De,message:Pe,tag:ge,table:he,card:me,tabs:X,timeline:re,timePicker:we,upload:ue,notification:Ce,tree:ze,colorPicker:Ye,datePicker:Ke,rangePicker:Xe,flex:it,wave:ut,dropdown:Ge,warning:Ee,tour:Se,floatButtonGroup:je,variant:nt,inputNumber:rt,treeSelect:St};Cr("ConfigProvider")(!("autoInsertSpaceInButton"in t),"deprecated","`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");const Jt=Object.assign({},y);Object.keys(ln).forEach(at=>{ln[at]!==void 0&&(Jt[at]=ln[at])}),e4n.forEach(at=>{const mt=t[at];mt&&(Jt[at]=mt)}),typeof i<"u"&&(Jt.button=Object.assign({autoInsertSpace:i},Jt.button));const en=Hk(()=>Jt,Jt,(at,mt)=>{const It=Object.keys(at),Ve=Object.keys(mt);return It.length!==Ve.length||It.some(bt=>at[bt]!==mt[bt])}),Ft=b.useMemo(()=>({prefixCls:Nt,csp:vt}),[Nt,vt]);let dn=b.createElement(b.Fragment,null,b.createElement(QOn,{dropdownMatchSelectWidth:f}),e);const Ze=b.useMemo(()=>{var at,mt,It,Ve;return ZO(((at=Dv.Form)===null||at===void 0?void 0:at.defaultValidateMessages)||{},((It=(mt=en.locale)===null||mt===void 0?void 0:mt.Form)===null||It===void 0?void 0:It.defaultValidateMessages)||{},((Ve=en.form)===null||Ve===void 0?void 0:Ve.validateMessages)||{},(s==null?void 0:s.validateMessages)||{})},[en,s==null?void 0:s.validateMessages]);Object.keys(Ze).length>0&&(dn=b.createElement(VDt.Provider,{value:Ze},dn)),a&&(dn=b.createElement(KDt,{locale:a,_ANT_MARK__:UDt},dn)),(Nt||vt)&&(dn=b.createElement(IFe.Provider,{value:Ft},dn)),l&&(dn=b.createElement(oOn,{size:l},dn)),dn=b.createElement(ZOn,null,dn);const dt=b.useMemo(()=>{const at=$t||{},{algorithm:mt,token:It,components:Ve,cssVar:bt}=at,wt=JOn(at,["algorithm","token","components","cssVar"]),$e=mt&&(!Array.isArray(mt)||mt.length>0)?wEe(mt):ZDt,We={};Object.entries(Ve||{}).forEach(_t=>{let[ht,qe]=_t;const ft=Object.assign({},qe);"algorithm"in ft&&(ft.algorithm===!0?ft.theme=$e:(Array.isArray(ft.algorithm)||typeof ft.algorithm=="function")&&(ft.theme=wEe(ft.algorithm)),delete ft.algorithm),We[ht]=ft});const tt=Object.assign(Object.assign({},$z),It);return Object.assign(Object.assign({},wt),{theme:$e,token:tt,components:We,override:Object.assign({override:tt},We),cssVar:bt})},[$t]);return w&&(dn=b.createElement(QDt.Provider,{value:dt},dn)),en.warning&&(dn=b.createElement($Dt.Provider,{value:en.warning},dn)),C!==void 0&&(dn=b.createElement(PFe,{disabled:C},dn)),b.createElement(jn.Provider,{value:en},dn)},Kv=t=>{const e=b.useContext(jn),n=b.useContext(AFe);return b.createElement(r4n,Object.assign({parentContext:e,legacyLocale:n},t))};Kv.ConfigContext=jn;Kv.SizeContext=D2;Kv.config=i4n;Kv.useConfig=sOn;Object.defineProperty(Kv,"SizeContext",{get:()=>(FS(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),D2)});Kv.displayName="ConfigProvider";var o4n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function _kt(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}function s4n(t){return _kt(t)instanceof ShadowRoot}function Wne(t){return s4n(t)?_kt(t):null}function a4n(t){return t.replace(/-(.)/g,function(e,n){return n.toUpperCase()})}function l4n(t,e){ii(t,"[@ant-design/icons] ".concat(e))}function ett(t){return Un(t)==="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(Un(t.icon)==="object"||typeof t.icon=="function")}function ttt(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(e,n){var i=t[n];switch(n){case"class":e.className=i,delete e.class;break;default:delete e[n],e[a4n(n)]=i}return e},{})}function TDe(t,e,n){return n?Z.createElement(t.tag,Ie(Ie({key:e},ttt(t.attrs)),n),(t.children||[]).map(function(i,r){return TDe(i,"".concat(e,"-").concat(t.tag,"-").concat(r))})):Z.createElement(t.tag,Ie({key:e},ttt(t.attrs)),(t.children||[]).map(function(i,r){return TDe(i,"".concat(e,"-").concat(t.tag,"-").concat(r))}))}function xkt(t){return Fz(t)[0]}function wkt(t){return t?Array.isArray(t)?t:[t]:[]}var c4n=`
.anticon {
  display: inline-flex;
  align-items: center;
  color: inherit;
  font-style: normal;
  line-height: 0;
  text-align: center;
  text-transform: none;
  vertical-align: -0.125em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.anticon > * {
  line-height: 1;
}

.anticon svg {
  display: inline-block;
}

.anticon::before {
  display: none;
}

.anticon .anticon-icon {
  display: block;
}

.anticon[tabindex] {
  cursor: pointer;
}

.anticon-spin::before,
.anticon-spin {
  display: inline-block;
  -webkit-animation: loadingCircle 1s infinite linear;
  animation: loadingCircle 1s infinite linear;
}

@-webkit-keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
`,u4n=function(e){var n=b.useContext(IFe),i=n.csp,r=n.prefixCls,o=c4n;r&&(o=o.replace(/anticon/g,r)),b.useEffect(function(){var s=e.current,a=Wne(s);NC(o,"@ant-design-icons",{prepend:!0,csp:i,attachTo:a})},[])},d4n=["icon","className","onClick","style","primaryColor","secondaryColor"],L9={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function h4n(t){var e=t.primaryColor,n=t.secondaryColor;L9.primaryColor=e,L9.secondaryColor=n||xkt(e),L9.calculated=!!n}function f4n(){return Ie({},L9)}var t6=function(e){var n=e.icon,i=e.className,r=e.onClick,o=e.style,s=e.primaryColor,a=e.secondaryColor,l=di(e,d4n),c=b.useRef(),u=L9;if(s&&(u={primaryColor:s,secondaryColor:a||xkt(s)}),u4n(c),l4n(ett(n),"icon should be icon definiton, but got ".concat(n)),!ett(n))return null;var d=n;return d&&typeof d.icon=="function"&&(d=Ie(Ie({},d),{},{icon:d.icon(u.primaryColor,u.secondaryColor)})),TDe(d.icon,"svg-".concat(d.name),Ie(Ie({className:i,onClick:r,style:o,"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:c}))};t6.displayName="IconReact";t6.getTwoToneColors=f4n;t6.setTwoToneColors=h4n;function Ckt(t){var e=wkt(t),n=He(e,2),i=n[0],r=n[1];return t6.setTwoToneColors({primaryColor:i,secondaryColor:r})}function m4n(){var t=t6.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var p4n=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];Ckt(Fj.primary);var Qn=b.forwardRef(function(t,e){var n=t.className,i=t.icon,r=t.spin,o=t.rotate,s=t.tabIndex,a=t.onClick,l=t.twoToneColor,c=di(t,p4n),u=b.useContext(IFe),d=u.prefixCls,h=d===void 0?"anticon":d,f=u.rootClassName,m=Me(f,h,ye(ye({},"".concat(h,"-").concat(i.name),!!i.name),"".concat(h,"-spin"),!!r||i.name==="loading"),n),p=s;p===void 0&&a&&(p=-1);var g=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,y=wkt(l),_=He(y,2),w=_[0],C=_[1];return b.createElement("span",lt({role:"img","aria-label":i.name},c,{ref:e,tabIndex:p,onClick:a,className:m}),b.createElement(t6,{icon:i,primaryColor:w,secondaryColor:C,style:g}))});Qn.displayName="AntdIcon";Qn.getTwoToneColor=m4n;Qn.setTwoToneColor=Ckt;var g4n=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:o4n}))},VA=b.forwardRef(g4n);VA.displayName="CheckCircleFilled";var b4n={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},v4n=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:b4n}))},$S=b.forwardRef(v4n);$S.displayName="CloseCircleFilled";var y4n={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},_4n=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:y4n}))},vb=b.forwardRef(_4n);vb.displayName="CloseOutlined";var x4n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},w4n=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:x4n}))},n6=b.forwardRef(w4n);n6.displayName="ExclamationCircleFilled";var C4n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},S4n=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:C4n}))},ehe=b.forwardRef(S4n);ehe.displayName="InfoCircleFilled";var N4n=`accept acceptCharset accessKey action allowFullScreen allowTransparency
    alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
    charSet checked classID className colSpan cols content contentEditable contextMenu
    controls coords crossOrigin data dateTime default defer dir disabled download draggable
    encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
    headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
    is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
    mediaGroup method min minLength multiple muted name noValidate nonce open
    optimum pattern placeholder poster preload radioGroup readOnly rel required
    reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
    shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
    summary tabIndex target title type useMap value width wmode wrap`,E4n=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
    onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
    onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
    onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
    onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
    onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
    onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,D4n="".concat(N4n," ").concat(E4n).split(/[\s\n]+/),k4n="aria-",M4n="data-";function ntt(t,e){return t.indexOf(e)===0}function Ll(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;e===!1?n={aria:!0,data:!0,attr:!0}:e===!0?n={aria:!0}:n=Ie({},e);var i={};return Object.keys(t).forEach(function(r){(n.aria&&(r==="role"||ntt(r,k4n))||n.data&&ntt(r,M4n)||n.attr&&D4n.includes(r))&&(i[r]=t[r])}),i}function Skt(t){return t&&Z.isValidElement(t)&&t.type===Z.Fragment}const VFe=(t,e,n)=>Z.isValidElement(t)?Z.cloneElement(t,typeof n=="function"?n(t.props||{}):n):e;function $c(t,e){return VFe(t,t,e)}const TZ=(t,e,n,i,r)=>({background:t,border:`${xe(i.lineWidth)} ${i.lineType} ${e}`,[`${r}-icon`]:{color:n}}),L4n=t=>{const{componentCls:e,motionDurationSlow:n,marginXS:i,marginSM:r,fontSize:o,fontSizeLG:s,lineHeight:a,borderRadiusLG:l,motionEaseInOutCirc:c,withDescriptionIconSize:u,colorText:d,colorTextHeading:h,withDescriptionPadding:f,defaultPadding:m}=t;return{[e]:Object.assign(Object.assign({},fo(t)),{position:"relative",display:"flex",alignItems:"center",padding:m,wordWrap:"break-word",borderRadius:l,[`&${e}-rtl`]:{direction:"rtl"},[`${e}-content`]:{flex:1,minWidth:0},[`${e}-icon`]:{marginInlineEnd:i,lineHeight:0},"&-description":{display:"none",fontSize:o,lineHeight:a},"&-message":{color:h},[`&${e}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c},
        padding-top ${n} ${c}, padding-bottom ${n} ${c},
        margin-bottom ${n} ${c}`},[`&${e}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${e}-with-description`]:{alignItems:"flex-start",padding:f,[`${e}-icon`]:{marginInlineEnd:r,fontSize:u,lineHeight:0},[`${e}-message`]:{display:"block",marginBottom:i,color:h,fontSize:s},[`${e}-description`]:{display:"block",color:d}},[`${e}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},T4n=t=>{const{componentCls:e,colorSuccess:n,colorSuccessBorder:i,colorSuccessBg:r,colorWarning:o,colorWarningBorder:s,colorWarningBg:a,colorError:l,colorErrorBorder:c,colorErrorBg:u,colorInfo:d,colorInfoBorder:h,colorInfoBg:f}=t;return{[e]:{"&-success":TZ(r,i,n,t,e),"&-info":TZ(f,h,d,t,e),"&-warning":TZ(a,s,o,t,e),"&-error":Object.assign(Object.assign({},TZ(u,c,l,t,e)),{[`${e}-description > pre`]:{margin:0,padding:0}})}}},I4n=t=>{const{componentCls:e,iconCls:n,motionDurationMid:i,marginXS:r,fontSizeIcon:o,colorIcon:s,colorIconHover:a}=t;return{[e]:{"&-action":{marginInlineStart:r},[`${e}-close-icon`]:{marginInlineStart:r,padding:0,overflow:"hidden",fontSize:o,lineHeight:xe(o),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:s,transition:`color ${i}`,"&:hover":{color:a}}},"&-close-text":{color:s,transition:`color ${i}`,"&:hover":{color:a}}}}},A4n=t=>({withDescriptionIconSize:t.fontSizeHeading3,defaultPadding:`${t.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${t.paddingMD}px ${t.paddingContentHorizontalLG}px`}),R4n=Jr("Alert",t=>[L4n(t),T4n(t),I4n(t)],A4n);var itt=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const P4n={success:VA,info:ehe,error:$S,warning:n6},O4n=t=>{const{icon:e,prefixCls:n,type:i}=t,r=P4n[i]||null;return e?VFe(e,b.createElement("span",{className:`${n}-icon`},e),()=>({className:Me(`${n}-icon`,{[e.props.className]:e.props.className})})):b.createElement(r,{className:`${n}-icon`})},j4n=t=>{const{isClosable:e,prefixCls:n,closeIcon:i,handleClose:r,ariaProps:o}=t,s=i===!0||i===void 0?b.createElement(vb,null):i;return e?b.createElement("button",Object.assign({type:"button",onClick:r,className:`${n}-close-icon`,tabIndex:0},o),s):null},BFe=b.forwardRef((t,e)=>{const{description:n,prefixCls:i,message:r,banner:o,className:s,rootClassName:a,style:l,onMouseEnter:c,onMouseLeave:u,onClick:d,afterClose:h,showIcon:f,closable:m,closeText:p,closeIcon:g,action:y,id:_}=t,w=itt(t,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action","id"]),[C,N]=b.useState(!1);Cr("Alert").deprecated(!p,"closeText","closable.closeIcon");const E=b.useRef(null);b.useImperativeHandle(e,()=>({nativeElement:E.current}));const{getPrefixCls:D,direction:k,alert:M}=b.useContext(jn),T=D("alert",i),[A,R,P]=R4n(T),O=q=>{var U;N(!0),(U=t.onClose)===null||U===void 0||U.call(t,q)},V=b.useMemo(()=>t.type!==void 0?t.type:o?"warning":"info",[t.type,o]),F=b.useMemo(()=>typeof m=="object"&&m.closeIcon||p?!0:typeof m=="boolean"?m:g!==!1&&g!==null&&g!==void 0?!0:!!(M!=null&&M.closable),[p,g,m,M==null?void 0:M.closable]),$=o&&f===void 0?!0:f,B=Me(T,`${T}-${V}`,{[`${T}-with-description`]:!!n,[`${T}-no-icon`]:!$,[`${T}-banner`]:!!o,[`${T}-rtl`]:k==="rtl"},M==null?void 0:M.className,s,a,P,R),z=Ll(w,{aria:!0,data:!0}),H=b.useMemo(()=>{var q,U;return typeof m=="object"&&m.closeIcon?m.closeIcon:p||(g!==void 0?g:typeof(M==null?void 0:M.closable)=="object"&&(!((q=M==null?void 0:M.closable)===null||q===void 0)&&q.closeIcon)?(U=M==null?void 0:M.closable)===null||U===void 0?void 0:U.closeIcon:M==null?void 0:M.closeIcon)},[g,m,p,M==null?void 0:M.closeIcon]),K=b.useMemo(()=>{const q=m??(M==null?void 0:M.closable);return typeof q=="object"?itt(q,["closeIcon"]):{}},[m,M==null?void 0:M.closable]);return A(b.createElement(Ou,{visible:!C,motionName:`${T}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:q=>({maxHeight:q.offsetHeight}),onLeaveEnd:h},(q,U)=>{let{className:Y,style:J}=q;return b.createElement("div",Object.assign({id:_,ref:Vu(E,U),"data-show":!C,className:Me(B,Y),style:Object.assign(Object.assign(Object.assign({},M==null?void 0:M.style),l),J),onMouseEnter:c,onMouseLeave:u,onClick:d,role:"alert"},z),$?b.createElement(O4n,{description:n,icon:t.icon,prefixCls:T,type:V}):null,b.createElement("div",{className:`${T}-content`},r?b.createElement("div",{className:`${T}-message`},r):null,n?b.createElement("div",{className:`${T}-description`},n):null),y?b.createElement("div",{className:`${T}-action`},y):null,b.createElement(j4n,{isClosable:F,prefixCls:T,closeIcon:H,handleClose:O,ariaProps:K}))}))});BFe.displayName="Alert";function F4n(t,e,n){return e=N2(e),NCt(t,Que()?Reflect.construct(e,n||[],N2(t).constructor):e.apply(t,n))}let $4n=function(t){function e(){var n;return Za(this,e),n=F4n(this,e,arguments),n.state={error:void 0,info:{componentStack:""}},n}return Zp(e,t),Qa(e,[{key:"componentDidCatch",value:function(i,r){this.setState({error:i,info:r})}},{key:"render",value:function(){const{message:i,description:r,id:o,children:s}=this.props,{error:a,info:l}=this.state,c=(l==null?void 0:l.componentStack)||null,u=typeof i>"u"?(a||"").toString():i,d=typeof r>"u"?c:r;return a?b.createElement(BFe,{id:o,type:"error",message:u,description:b.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},d)}):s}}])}(b.Component);const pl=BFe;pl.ErrorBoundary=$4n;const rtt=t=>typeof t=="object"&&t!=null&&t.nodeType===1,ott=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",nxe=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return ott(n.overflowY,e)||ott(n.overflowX,e)||(i=>{const r=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!r&&(r.clientHeight<i.scrollHeight||r.clientWidth<i.scrollWidth)})(t)}return!1},IZ=(t,e,n,i,r,o,s,a)=>o<t&&s>e||o>t&&s<e?0:o<=t&&a<=n||s>=e&&a>=n?o-t-i:s>e&&a<n||o<t&&a>n?s-e+r:0,V4n=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},stt=(t,e)=>{var n,i,r,o;if(typeof document>"u")return[];const{scrollMode:s,block:a,inline:l,boundary:c,skipOverflowHiddenElements:u}=e,d=typeof c=="function"?c:F=>F!==c;if(!rtt(t))throw new TypeError("Invalid target");const h=document.scrollingElement||document.documentElement,f=[];let m=t;for(;rtt(m)&&d(m);){if(m=V4n(m),m===h){f.push(m);break}m!=null&&m===document.body&&nxe(m)&&!nxe(document.documentElement)||m!=null&&nxe(m,u)&&f.push(m)}const p=(i=(n=window.visualViewport)==null?void 0:n.width)!=null?i:innerWidth,g=(o=(r=window.visualViewport)==null?void 0:r.height)!=null?o:innerHeight,{scrollX:y,scrollY:_}=window,{height:w,width:C,top:N,right:E,bottom:D,left:k}=t.getBoundingClientRect(),{top:M,right:T,bottom:A,left:R}=(F=>{const $=window.getComputedStyle(F);return{top:parseFloat($.scrollMarginTop)||0,right:parseFloat($.scrollMarginRight)||0,bottom:parseFloat($.scrollMarginBottom)||0,left:parseFloat($.scrollMarginLeft)||0}})(t);let P=a==="start"||a==="nearest"?N-M:a==="end"?D+A:N+w/2-M+A,O=l==="center"?k+C/2-R+T:l==="end"?E+T:k-R;const V=[];for(let F=0;F<f.length;F++){const $=f[F],{height:B,width:z,top:H,right:K,bottom:q,left:U}=$.getBoundingClientRect();if(s==="if-needed"&&N>=0&&k>=0&&D<=g&&E<=p&&N>=H&&D<=q&&k>=U&&E<=K)return V;const Y=getComputedStyle($),J=parseInt(Y.borderLeftWidth,10),ae=parseInt(Y.borderTopWidth,10),se=parseInt(Y.borderRightWidth,10),oe=parseInt(Y.borderBottomWidth,10);let fe=0,de=0;const ie="offsetWidth"in $?$.offsetWidth-$.clientWidth-J-se:0,Q="offsetHeight"in $?$.offsetHeight-$.clientHeight-ae-oe:0,be="offsetWidth"in $?$.offsetWidth===0?0:z/$.offsetWidth:0,le="offsetHeight"in $?$.offsetHeight===0?0:B/$.offsetHeight:0;if(h===$)fe=a==="start"?P:a==="end"?P-g:a==="nearest"?IZ(_,_+g,g,ae,oe,_+P,_+P+w,w):P-g/2,de=l==="start"?O:l==="center"?O-p/2:l==="end"?O-p:IZ(y,y+p,p,J,se,y+O,y+O+C,C),fe=Math.max(0,fe+_),de=Math.max(0,de+y);else{fe=a==="start"?P-H-ae:a==="end"?P-q+oe+Q:a==="nearest"?IZ(H,q,B,ae,oe+Q,P,P+w,w):P-(H+B/2)+Q/2,de=l==="start"?O-U-J:l==="center"?O-(U+z/2)+ie/2:l==="end"?O-K+se+ie:IZ(U,K,z,J,se+ie,O,O+C,C);const{scrollLeft:Ne,scrollTop:Le}=$;fe=le===0?0:Math.max(0,Math.min(Le+fe/le,$.scrollHeight-B/le+Q)),de=be===0?0:Math.max(0,Math.min(Ne+de/be,$.scrollWidth-z/be+ie)),P+=Le-fe,O+=Ne-de}V.push({el:$,top:fe,left:de})}return V},B4n=t=>t===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(t)?t:{block:"start",inline:"nearest"};function z4n(t,e){if(!t.isConnected||!(r=>{let o=r;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(t))return;const n=(r=>{const o=window.getComputedStyle(r);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(t);if((r=>typeof r=="object"&&typeof r.behavior=="function")(e))return e.behavior(stt(t,e));const i=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:r,top:o,left:s}of stt(t,B4n(e))){const a=o-n.top+n.bottom,l=s-n.left+n.right;r.scroll({top:a,left:l,behavior:i})}}function IDe(t){return t!=null&&t===t.window}const H4n=t=>{var e,n;if(typeof window>"u")return 0;let i=0;return IDe(t)?i=t.pageYOffset:t instanceof Document?i=t.documentElement.scrollTop:(t instanceof HTMLElement||t)&&(i=t.scrollTop),t&&!IDe(t)&&typeof i!="number"&&(i=(n=((e=t.ownerDocument)!==null&&e!==void 0?e:t).documentElement)===null||n===void 0?void 0:n.scrollTop),i};function W4n(t,e,n,i){const r=n-e;return t/=i/2,t<1?r/2*t*t*t+e:r/2*((t-=2)*t*t+2)+e}function U4n(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:n=()=>window,callback:i,duration:r=450}=e,o=n(),s=H4n(o),a=Date.now(),l=()=>{const u=Date.now()-a,d=W4n(u>r?r:u,s,t,r);IDe(o)?o.scrollTo(window.pageXOffset,d):o instanceof Document||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=d:o.scrollTop=d,u<r?Dr(l):typeof i=="function"&&i()};Dr(l)}const Il=t=>{const[,,,,e]=Sd();return e?`${t}-css-var`:""};var Wt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var n=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||n>=Wt.F1&&n<=Wt.F12)return!1;switch(n){case Wt.ALT:case Wt.CAPS_LOCK:case Wt.CONTEXT_MENU:case Wt.CTRL:case Wt.DOWN:case Wt.END:case Wt.ESC:case Wt.HOME:case Wt.INSERT:case Wt.LEFT:case Wt.MAC_FF_META:case Wt.META:case Wt.NUMLOCK:case Wt.NUM_CENTER:case Wt.PAGE_DOWN:case Wt.PAGE_UP:case Wt.PAUSE:case Wt.PRINT_SCREEN:case Wt.RIGHT:case Wt.SHIFT:case Wt.UP:case Wt.WIN_KEY:case Wt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=Wt.ZERO&&e<=Wt.NINE||e>=Wt.NUM_ZERO&&e<=Wt.NUM_MULTIPLY||e>=Wt.A&&e<=Wt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&e===0)return!0;switch(e){case Wt.SPACE:case Wt.QUESTION_MARK:case Wt.NUM_PLUS:case Wt.NUM_MINUS:case Wt.NUM_PERIOD:case Wt.NUM_DIVISION:case Wt.SEMICOLON:case Wt.DASH:case Wt.EQUALS:case Wt.COMMA:case Wt.PERIOD:case Wt.SLASH:case Wt.APOSTROPHE:case Wt.SINGLE_QUOTE:case Wt.OPEN_SQUARE_BRACKET:case Wt.BACKSLASH:case Wt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Nkt=b.forwardRef(function(t,e){var n=t.prefixCls,i=t.style,r=t.className,o=t.duration,s=o===void 0?4.5:o,a=t.showProgress,l=t.pauseOnHover,c=l===void 0?!0:l,u=t.eventKey,d=t.content,h=t.closable,f=t.closeIcon,m=f===void 0?"x":f,p=t.props,g=t.onClick,y=t.onNoticeClose,_=t.times,w=t.hovering,C=b.useState(!1),N=He(C,2),E=N[0],D=N[1],k=b.useState(0),M=He(k,2),T=M[0],A=M[1],R=b.useState(0),P=He(R,2),O=P[0],V=P[1],F=w||E,$=s>0&&a,B=function(){y(u)},z=function(J){(J.key==="Enter"||J.code==="Enter"||J.keyCode===Wt.ENTER)&&B()};b.useEffect(function(){if(!F&&s>0){var Y=Date.now()-O,J=setTimeout(function(){B()},s*1e3-O);return function(){c&&clearTimeout(J),V(Date.now()-Y)}}},[s,F,_]),b.useEffect(function(){if(!F&&$&&(c||O===0)){var Y=performance.now(),J,ae=function se(){cancelAnimationFrame(J),J=requestAnimationFrame(function(oe){var fe=oe+O-Y,de=Math.min(fe/(s*1e3),1);A(de*100),de<1&&se()})};return ae(),function(){c&&cancelAnimationFrame(J)}}},[s,O,F,$,_]);var H=b.useMemo(function(){return Un(h)==="object"&&h!==null?h:h?{closeIcon:m}:{}},[h,m]),K=Ll(H,!0),q=100-(!T||T<0?0:T>100?100:T),U="".concat(n,"-notice");return b.createElement("div",lt({},p,{ref:e,className:Me(U,r,ye({},"".concat(U,"-closable"),h)),style:i,onMouseEnter:function(J){var ae;D(!0),p==null||(ae=p.onMouseEnter)===null||ae===void 0||ae.call(p,J)},onMouseLeave:function(J){var ae;D(!1),p==null||(ae=p.onMouseLeave)===null||ae===void 0||ae.call(p,J)},onClick:g}),b.createElement("div",{className:"".concat(U,"-content")},d),h&&b.createElement("a",lt({tabIndex:0,className:"".concat(U,"-close"),onKeyDown:z,"aria-label":"Close"},K,{onClick:function(J){J.preventDefault(),J.stopPropagation(),B()}}),H.closeIcon),$&&b.createElement("progress",{className:"".concat(U,"-progress"),max:"100",value:q},q+"%"))}),Ekt=Z.createContext({}),K4n=function(e){var n=e.children,i=e.classNames;return Z.createElement(Ekt.Provider,{value:{classNames:i}},n)},att=8,ltt=3,ctt=16,q4n=function(e){var n={offset:att,threshold:ltt,gap:ctt};if(e&&Un(e)==="object"){var i,r,o;n.offset=(i=e.offset)!==null&&i!==void 0?i:att,n.threshold=(r=e.threshold)!==null&&r!==void 0?r:ltt,n.gap=(o=e.gap)!==null&&o!==void 0?o:ctt}return[!!e,n]},G4n=["className","style","classNames","styles"],Dkt=function(e){var n=e.configList,i=e.placement,r=e.prefixCls,o=e.className,s=e.style,a=e.motion,l=e.onAllNoticeRemoved,c=e.onNoticeClose,u=e.stack,d=b.useContext(Ekt),h=d.classNames,f=b.useRef({}),m=b.useState(null),p=He(m,2),g=p[0],y=p[1],_=b.useState([]),w=He(_,2),C=w[0],N=w[1],E=n.map(function(F){return{config:F,key:String(F.key)}}),D=q4n(u),k=He(D,2),M=k[0],T=k[1],A=T.offset,R=T.threshold,P=T.gap,O=M&&(C.length>0||E.length<=R),V=typeof a=="function"?a(i):a;return b.useEffect(function(){M&&C.length>1&&N(function(F){return F.filter(function($){return E.some(function(B){var z=B.key;return $===z})})})},[C,E,M]),b.useEffect(function(){var F;if(M&&f.current[(F=E[E.length-1])===null||F===void 0?void 0:F.key]){var $;y(f.current[($=E[E.length-1])===null||$===void 0?void 0:$.key])}},[E,M]),Z.createElement(FFe,lt({key:i,className:Me(r,"".concat(r,"-").concat(i),h==null?void 0:h.list,o,ye(ye({},"".concat(r,"-stack"),!!M),"".concat(r,"-stack-expanded"),O)),style:s,keys:E,motionAppear:!0},V,{onAllRemoved:function(){l(i)}}),function(F,$){var B=F.config,z=F.className,H=F.style,K=F.index,q=B,U=q.key,Y=q.times,J=String(U),ae=B,se=ae.className,oe=ae.style,fe=ae.classNames,de=ae.styles,ie=di(ae,G4n),Q=E.findIndex(function(re){return re.key===J}),be={};if(M){var le=E.length-1-(Q>-1?Q:K-1),Ne=i==="top"||i==="bottom"?"-50%":"0";if(le>0){var Le,Te,De;be.height=O?(Le=f.current[J])===null||Le===void 0?void 0:Le.offsetHeight:g==null?void 0:g.offsetHeight;for(var Pe=0,ge=0;ge<le;ge++){var he;Pe+=((he=f.current[E[E.length-1-ge].key])===null||he===void 0?void 0:he.offsetHeight)+P}var me=(O?Pe:le*A)*(i.startsWith("top")?1:-1),X=!O&&g!==null&&g!==void 0&&g.offsetWidth&&(Te=f.current[J])!==null&&Te!==void 0&&Te.offsetWidth?((g==null?void 0:g.offsetWidth)-A*2*(le<3?le:3))/((De=f.current[J])===null||De===void 0?void 0:De.offsetWidth):1;be.transform="translate3d(".concat(Ne,", ").concat(me,"px, 0) scaleX(").concat(X,")")}else be.transform="translate3d(".concat(Ne,", 0, 0)")}return Z.createElement("div",{ref:$,className:Me("".concat(r,"-notice-wrapper"),z,fe==null?void 0:fe.wrapper),style:Ie(Ie(Ie({},H),be),de==null?void 0:de.wrapper),onMouseEnter:function(){return N(function(we){return we.includes(J)?we:[].concat(Ot(we),[J])})},onMouseLeave:function(){return N(function(we){return we.filter(function(ue){return ue!==J})})}},Z.createElement(Nkt,lt({},ie,{ref:function(we){Q>-1?f.current[J]=we:delete f.current[J]},prefixCls:r,classNames:fe,styles:de,className:Me(se,h==null?void 0:h.notice),style:oe,times:Y,key:U,eventKey:U,onNoticeClose:c,hovering:M&&C.length>0})))})};Dkt.displayName="NoticeList";var kkt=b.forwardRef(function(t,e){var n=t.prefixCls,i=n===void 0?"rc-notification":n,r=t.container,o=t.motion,s=t.maxCount,a=t.className,l=t.style,c=t.onAllRemoved,u=t.stack,d=t.renderNotifications,h=b.useState([]),f=He(h,2),m=f[0],p=f[1],g=function(M){var T,A=m.find(function(R){return R.key===M});A==null||(T=A.onClose)===null||T===void 0||T.call(A),p(function(R){return R.filter(function(P){return P.key!==M})})};b.useImperativeHandle(e,function(){return{open:function(M){p(function(T){var A=Ot(T),R=A.findIndex(function(V){return V.key===M.key}),P=Ie({},M);if(R>=0){var O;P.times=(((O=T[R])===null||O===void 0?void 0:O.times)||0)+1,A[R]=P}else P.times=0,A.push(P);return s>0&&A.length>s&&(A=A.slice(-s)),A})},close:function(M){g(M)},destroy:function(){p([])}}});var y=b.useState({}),_=He(y,2),w=_[0],C=_[1];b.useEffect(function(){var k={};m.forEach(function(M){var T=M.placement,A=T===void 0?"topRight":T;A&&(k[A]=k[A]||[],k[A].push(M))}),Object.keys(w).forEach(function(M){k[M]=k[M]||[]}),C(k)},[m]);var N=function(M){C(function(T){var A=Ie({},T),R=A[M]||[];return R.length||delete A[M],A})},E=b.useRef(!1);if(b.useEffect(function(){Object.keys(w).length>0?E.current=!0:E.current&&(c==null||c(),E.current=!1)},[w]),!r)return null;var D=Object.keys(w);return Fc.createPortal(b.createElement(b.Fragment,null,D.map(function(k){var M=w[k],T=b.createElement(Dkt,{key:k,configList:M,placement:k,prefixCls:i,className:a==null?void 0:a(k),style:l==null?void 0:l(k),motion:o,onNoticeClose:g,onAllNoticeRemoved:N,stack:u});return d?d(T,{prefixCls:i,key:k}):T})),r)});kkt.displayName="Notifications";var Y4n=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],X4n=function(){return document.body},utt=0;function Z4n(){for(var t={},e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return n.forEach(function(r){r&&Object.keys(r).forEach(function(o){var s=r[o];s!==void 0&&(t[o]=s)})}),t}function Q4n(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.getContainer,n=e===void 0?X4n:e,i=t.motion,r=t.prefixCls,o=t.maxCount,s=t.className,a=t.style,l=t.onAllRemoved,c=t.stack,u=t.renderNotifications,d=di(t,Y4n),h=b.useState(),f=He(h,2),m=f[0],p=f[1],g=b.useRef(),y=b.createElement(kkt,{container:m,ref:g,prefixCls:r,motion:i,maxCount:o,className:s,style:a,onAllRemoved:l,stack:c,renderNotifications:u}),_=b.useState([]),w=He(_,2),C=w[0],N=w[1],E=b.useMemo(function(){return{open:function(k){var M=Z4n(d,k);(M.key===null||M.key===void 0)&&(M.key="rc-notification-".concat(utt),utt+=1),N(function(T){return[].concat(Ot(T),[{type:"open",config:M}])})},close:function(k){N(function(M){return[].concat(Ot(M),[{type:"close",key:k}])})},destroy:function(){N(function(k){return[].concat(Ot(k),[{type:"destroy"}])})}}},[]);return b.useEffect(function(){p(n())}),b.useEffect(function(){g.current&&C.length&&(C.forEach(function(D){switch(D.type){case"open":g.current.open(D.config);break;case"close":g.current.close(D.key);break;case"destroy":g.current.destroy();break}}),N(function(D){return D.filter(function(k){return!C.includes(k)})}))},[C]),[E,y]}var J4n={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},e3n=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:J4n}))},Xd=b.forwardRef(e3n);Xd.displayName="LoadingOutlined";const i6=Z.createContext(void 0);i6.displayName="zIndexContext";const I1=100,t3n=10,zFe=I1*t3n,n3n=zFe+I1,Mkt={Modal:I1,Drawer:I1,Popover:I1,Popconfirm:I1,Tooltip:I1,Tour:I1,FloatButton:I1},i3n={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function r3n(t){return t in Mkt}const Mw=(t,e)=>{const[,n]=Sd(),i=Z.useContext(i6),r=r3n(t);let o;if(e!==void 0)o=[e,e];else{let s=i??0;r?s+=(i?0:n.zIndexPopupBase)+Mkt[t]:s+=i3n[t],o=[i===void 0?e:s,s]}{const s=Cr(t),a=n.zIndexPopupBase+n3n,l=o[0]||0;s(e!==void 0||l<=a,"usage","`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.")}return o};function o3n(){const[t,e]=b.useState([]),n=b.useCallback(i=>(e(r=>[].concat(Ot(r),[i])),()=>{e(r=>r.filter(o=>o!==i))}),[]);return[t,n]}function ll(){ll=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,r=Object.defineProperty||function(F,$,B){F[$]=B.value},o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(F,$,B){return Object.defineProperty(F,$,{value:B,enumerable:!0,configurable:!0,writable:!0}),F[$]}try{c({},"")}catch{c=function(B,z,H){return B[z]=H}}function u(F,$,B,z){var H=$&&$.prototype instanceof y?$:y,K=Object.create(H.prototype),q=new O(z||[]);return r(K,"_invoke",{value:T(F,B,q)}),K}function d(F,$,B){try{return{type:"normal",arg:F.call($,B)}}catch(z){return{type:"throw",arg:z}}}e.wrap=u;var h="suspendedStart",f="suspendedYield",m="executing",p="completed",g={};function y(){}function _(){}function w(){}var C={};c(C,s,function(){return this});var N=Object.getPrototypeOf,E=N&&N(N(V([])));E&&E!==n&&i.call(E,s)&&(C=E);var D=w.prototype=y.prototype=Object.create(C);function k(F){["next","throw","return"].forEach(function($){c(F,$,function(B){return this._invoke($,B)})})}function M(F,$){function B(H,K,q,U){var Y=d(F[H],F,K);if(Y.type!=="throw"){var J=Y.arg,ae=J.value;return ae&&Un(ae)=="object"&&i.call(ae,"__await")?$.resolve(ae.__await).then(function(se){B("next",se,q,U)},function(se){B("throw",se,q,U)}):$.resolve(ae).then(function(se){J.value=se,q(J)},function(se){return B("throw",se,q,U)})}U(Y.arg)}var z;r(this,"_invoke",{value:function(K,q){function U(){return new $(function(Y,J){B(K,q,Y,J)})}return z=z?z.then(U,U):U()}})}function T(F,$,B){var z=h;return function(H,K){if(z===m)throw Error("Generator is already running");if(z===p){if(H==="throw")throw K;return{value:t,done:!0}}for(B.method=H,B.arg=K;;){var q=B.delegate;if(q){var U=A(q,B);if(U){if(U===g)continue;return U}}if(B.method==="next")B.sent=B._sent=B.arg;else if(B.method==="throw"){if(z===h)throw z=p,B.arg;B.dispatchException(B.arg)}else B.method==="return"&&B.abrupt("return",B.arg);z=m;var Y=d(F,$,B);if(Y.type==="normal"){if(z=B.done?p:f,Y.arg===g)continue;return{value:Y.arg,done:B.done}}Y.type==="throw"&&(z=p,B.method="throw",B.arg=Y.arg)}}}function A(F,$){var B=$.method,z=F.iterator[B];if(z===t)return $.delegate=null,B==="throw"&&F.iterator.return&&($.method="return",$.arg=t,A(F,$),$.method==="throw")||B!=="return"&&($.method="throw",$.arg=new TypeError("The iterator does not provide a '"+B+"' method")),g;var H=d(z,F.iterator,$.arg);if(H.type==="throw")return $.method="throw",$.arg=H.arg,$.delegate=null,g;var K=H.arg;return K?K.done?($[F.resultName]=K.value,$.next=F.nextLoc,$.method!=="return"&&($.method="next",$.arg=t),$.delegate=null,g):K:($.method="throw",$.arg=new TypeError("iterator result is not an object"),$.delegate=null,g)}function R(F){var $={tryLoc:F[0]};1 in F&&($.catchLoc=F[1]),2 in F&&($.finallyLoc=F[2],$.afterLoc=F[3]),this.tryEntries.push($)}function P(F){var $=F.completion||{};$.type="normal",delete $.arg,F.completion=$}function O(F){this.tryEntries=[{tryLoc:"root"}],F.forEach(R,this),this.reset(!0)}function V(F){if(F||F===""){var $=F[s];if($)return $.call(F);if(typeof F.next=="function")return F;if(!isNaN(F.length)){var B=-1,z=function H(){for(;++B<F.length;)if(i.call(F,B))return H.value=F[B],H.done=!1,H;return H.value=t,H.done=!0,H};return z.next=z}}throw new TypeError(Un(F)+" is not iterable")}return _.prototype=w,r(D,"constructor",{value:w,configurable:!0}),r(w,"constructor",{value:_,configurable:!0}),_.displayName=c(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(F){var $=typeof F=="function"&&F.constructor;return!!$&&($===_||($.displayName||$.name)==="GeneratorFunction")},e.mark=function(F){return Object.setPrototypeOf?Object.setPrototypeOf(F,w):(F.__proto__=w,c(F,l,"GeneratorFunction")),F.prototype=Object.create(D),F},e.awrap=function(F){return{__await:F}},k(M.prototype),c(M.prototype,a,function(){return this}),e.AsyncIterator=M,e.async=function(F,$,B,z,H){H===void 0&&(H=Promise);var K=new M(u(F,$,B,z),H);return e.isGeneratorFunction($)?K:K.next().then(function(q){return q.done?q.value:K.next()})},k(D),c(D,l,"Generator"),c(D,s,function(){return this}),c(D,"toString",function(){return"[object Generator]"}),e.keys=function(F){var $=Object(F),B=[];for(var z in $)B.push(z);return B.reverse(),function H(){for(;B.length;){var K=B.pop();if(K in $)return H.value=K,H.done=!1,H}return H.done=!0,H}},e.values=V,O.prototype={constructor:O,reset:function($){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!$)for(var B in this)B.charAt(0)==="t"&&i.call(this,B)&&!isNaN(+B.slice(1))&&(this[B]=t)},stop:function(){this.done=!0;var $=this.tryEntries[0].completion;if($.type==="throw")throw $.arg;return this.rval},dispatchException:function($){if(this.done)throw $;var B=this;function z(J,ae){return q.type="throw",q.arg=$,B.next=J,ae&&(B.method="next",B.arg=t),!!ae}for(var H=this.tryEntries.length-1;H>=0;--H){var K=this.tryEntries[H],q=K.completion;if(K.tryLoc==="root")return z("end");if(K.tryLoc<=this.prev){var U=i.call(K,"catchLoc"),Y=i.call(K,"finallyLoc");if(U&&Y){if(this.prev<K.catchLoc)return z(K.catchLoc,!0);if(this.prev<K.finallyLoc)return z(K.finallyLoc)}else if(U){if(this.prev<K.catchLoc)return z(K.catchLoc,!0)}else{if(!Y)throw Error("try statement without catch or finally");if(this.prev<K.finallyLoc)return z(K.finallyLoc)}}}},abrupt:function($,B){for(var z=this.tryEntries.length-1;z>=0;--z){var H=this.tryEntries[z];if(H.tryLoc<=this.prev&&i.call(H,"finallyLoc")&&this.prev<H.finallyLoc){var K=H;break}}K&&($==="break"||$==="continue")&&K.tryLoc<=B&&B<=K.finallyLoc&&(K=null);var q=K?K.completion:{};return q.type=$,q.arg=B,K?(this.method="next",this.next=K.finallyLoc,g):this.complete(q)},complete:function($,B){if($.type==="throw")throw $.arg;return $.type==="break"||$.type==="continue"?this.next=$.arg:$.type==="return"?(this.rval=this.arg=$.arg,this.method="return",this.next="end"):$.type==="normal"&&B&&(this.next=B),g},finish:function($){for(var B=this.tryEntries.length-1;B>=0;--B){var z=this.tryEntries[B];if(z.finallyLoc===$)return this.complete(z.completion,z.afterLoc),P(z),g}},catch:function($){for(var B=this.tryEntries.length-1;B>=0;--B){var z=this.tryEntries[B];if(z.tryLoc===$){var H=z.completion;if(H.type==="throw"){var K=H.arg;P(z)}return K}}throw Error("illegal catch attempt")},delegateYield:function($,B,z){return this.delegate={iterator:V($),resultName:B,nextLoc:z},this.method==="next"&&(this.arg=t),g}},e}function dtt(t,e,n,i,r,o,s){try{var a=t[o](s),l=a.value}catch(c){return void n(c)}a.done?e(l):Promise.resolve(l).then(i,r)}function Hg(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var o=t.apply(e,n);function s(l){dtt(o,i,r,s,a,"next",l)}function a(l){dtt(o,i,r,s,a,"throw",l)}s(void 0)})}}var OK=Ie({},Awt),s3n=OK.version,a3n=OK.render,l3n=OK.unmountComponentAtNode,the;try{var c3n=Number((s3n||"").split(".")[0]);c3n>=18&&(the=OK.createRoot)}catch{}function htt(t){var e=OK.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e&&Un(e)==="object"&&(e.usingClientEntryPoint=t)}var Une="__rc_react_root__";function u3n(t,e){htt(!0);var n=e[Une]||the(e);htt(!1),n.render(t),e[Une]=n}function d3n(t,e){a3n(t,e)}function HFe(t,e){if(the){u3n(t,e);return}d3n(t,e)}function h3n(t){return ADe.apply(this,arguments)}function ADe(){return ADe=Hg(ll().mark(function t(e){return ll().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",Promise.resolve().then(function(){var r;(r=e[Une])===null||r===void 0||r.unmount(),delete e[Une]}));case 1:case"end":return i.stop()}},t)})),ADe.apply(this,arguments)}function f3n(t){l3n(t)}function Lkt(t){return RDe.apply(this,arguments)}function RDe(){return RDe=Hg(ll().mark(function t(e){return ll().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(the===void 0){i.next=2;break}return i.abrupt("return",h3n(e));case 2:f3n(e);case 3:case"end":return i.stop()}},t)})),RDe.apply(this,arguments)}const ixe=()=>({height:0,opacity:0}),ftt=t=>{const{scrollHeight:e}=t;return{height:e,opacity:1}},m3n=t=>({height:t?t.offsetHeight:0}),rxe=(t,e)=>(e==null?void 0:e.deadline)===!0||e.propertyName==="height",$j=function(){return{motionName:`${arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vz}-motion-collapse`,onAppearStart:ixe,onEnterStart:ixe,onAppearActive:ftt,onEnterActive:ftt,onLeaveStart:m3n,onLeaveActive:ixe,onAppearEnd:rxe,onEnterEnd:rxe,onLeaveEnd:rxe,motionDeadline:500}},Bp=(t,e,n)=>n!==void 0?n:`${t}-${e}`,r6=function(t){if(!t)return!1;if(t instanceof Element){if(t.offsetParent)return!0;if(t.getBBox){var e=t.getBBox(),n=e.width,i=e.height;if(n||i)return!0}if(t.getBoundingClientRect){var r=t.getBoundingClientRect(),o=r.width,s=r.height;if(o||s)return!0}}return!1},p3n=t=>{const{componentCls:e,colorPrimary:n}=t;return{[e]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${t.motionEaseOutCirc}`,`opacity 2s ${t.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${t.motionDurationSlow} ${t.motionEaseInOut}`,`opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`].join(",")}}}}},g3n=NOn("Wave",t=>[p3n(t)]),nhe=`${Vz}-wave-target`;function oxe(t){return t&&t!=="#fff"&&t!=="#ffffff"&&t!=="rgb(255, 255, 255)"&&t!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(t)&&t!=="transparent"}function b3n(t){const{borderTopColor:e,borderColor:n,backgroundColor:i}=getComputedStyle(t);return oxe(e)?e:oxe(n)?n:oxe(i)?i:null}function sxe(t){return Number.isNaN(t)?0:t}const v3n=t=>{const{className:e,target:n,component:i}=t,r=b.useRef(null),[o,s]=b.useState(null),[a,l]=b.useState([]),[c,u]=b.useState(0),[d,h]=b.useState(0),[f,m]=b.useState(0),[p,g]=b.useState(0),[y,_]=b.useState(!1),w={left:c,top:d,width:f,height:p,borderRadius:a.map(E=>`${E}px`).join(" ")};o&&(w["--wave-color"]=o);function C(){const E=getComputedStyle(n);s(b3n(n));const D=E.position==="static",{borderLeftWidth:k,borderTopWidth:M}=E;u(D?n.offsetLeft:sxe(-parseFloat(k))),h(D?n.offsetTop:sxe(-parseFloat(M))),m(n.offsetWidth),g(n.offsetHeight);const{borderTopLeftRadius:T,borderTopRightRadius:A,borderBottomLeftRadius:R,borderBottomRightRadius:P}=E;l([T,A,P,R].map(O=>sxe(parseFloat(O))))}if(b.useEffect(()=>{if(n){const E=Dr(()=>{C(),_(!0)});let D;return typeof ResizeObserver<"u"&&(D=new ResizeObserver(C),D.observe(n)),()=>{Dr.cancel(E),D==null||D.disconnect()}}},[]),!y)return null;const N=(i==="Checkbox"||i==="Radio")&&(n==null?void 0:n.classList.contains(nhe));return b.createElement(Ou,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(E,D)=>{var k;if(D.deadline||D.propertyName==="opacity"){const M=(k=r.current)===null||k===void 0?void 0:k.parentElement;Lkt(M).then(()=>{M==null||M.remove()})}return!1}},(E,D)=>{let{className:k}=E;return b.createElement("div",{ref:Vu(r,D),className:Me(e,k,{"wave-quick":N}),style:w})})},y3n=(t,e)=>{var n;const{component:i}=e;if(i==="Checkbox"&&!(!((n=t.querySelector("input"))===null||n===void 0)&&n.checked))return;const r=document.createElement("div");r.style.position="absolute",r.style.left="0px",r.style.top="0px",t==null||t.insertBefore(r,t==null?void 0:t.firstChild),HFe(b.createElement(v3n,Object.assign({},e,{target:t})),r)},_3n=(t,e,n)=>{const{wave:i}=b.useContext(jn),[,r,o]=Sd(),s=gr(c=>{const u=t.current;if(i!=null&&i.disabled||!u)return;const d=u.querySelector(`.${nhe}`)||u,{showEffect:h}=i||{};(h||y3n)(d,{className:e,token:r,component:n,event:c,hashId:o})}),a=b.useRef();return c=>{Dr.cancel(a.current),a.current=Dr(()=>{s(c)})}},o6=t=>{const{children:e,disabled:n,component:i}=t,{getPrefixCls:r}=b.useContext(jn),o=b.useRef(null),s=r("wave"),[,a]=g3n(s),l=_3n(o,Me(s,a),i);if(Z.useEffect(()=>{const u=o.current;if(!u||u.nodeType!==1||n)return;const d=h=>{!r6(h.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")||u.className.includes("-leave")||l(h)};return u.addEventListener("click",d,!0),()=>{u.removeEventListener("click",d,!0)}},[n]),!Z.isValidElement(e))return e??null;const c=P0(e)?Vu(e.ref,o):o;return $c(e,{ref:c})};o6.displayName="Wave";const Hc=t=>{const e=Z.useContext(D2);return Z.useMemo(()=>t?typeof t=="string"?t??e:t instanceof Function?t(e):e:e,[t,e])},x3n=t=>{const{componentCls:e}=t;return{[e]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},w3n=t=>{const{componentCls:e,antCls:n}=t;return{[e]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${e}-item:empty`]:{display:"none"},[`${e}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},C3n=t=>{const{componentCls:e}=t;return{[e]:{"&-gap-row-small":{rowGap:t.spaceGapSmallSize},"&-gap-row-middle":{rowGap:t.spaceGapMiddleSize},"&-gap-row-large":{rowGap:t.spaceGapLargeSize},"&-gap-col-small":{columnGap:t.spaceGapSmallSize},"&-gap-col-middle":{columnGap:t.spaceGapMiddleSize},"&-gap-col-large":{columnGap:t.spaceGapLargeSize}}}},Tkt=Jr("Space",t=>{const e=mr(t,{spaceGapSmallSize:t.paddingXS,spaceGapMiddleSize:t.padding,spaceGapLargeSize:t.paddingLG});return[w3n(e),C3n(e),x3n(e)]},()=>({}),{resetStyle:!1});var Ikt=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const ihe=b.createContext(null),VS=(t,e)=>{const n=b.useContext(ihe),i=b.useMemo(()=>{if(!n)return"";const{compactDirection:r,isFirstItem:o,isLastItem:s}=n,a=r==="vertical"?"-vertical-":"-";return Me(`${t}-compact${a}item`,{[`${t}-compact${a}first-item`]:o,[`${t}-compact${a}last-item`]:s,[`${t}-compact${a}item-rtl`]:e==="rtl"})},[t,e,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:i}},S3n=t=>{let{children:e}=t;return b.createElement(ihe.Provider,{value:null},e)},N3n=t=>{var{children:e}=t,n=Ikt(t,["children"]);return b.createElement(ihe.Provider,{value:n},e)},E3n=t=>{const{getPrefixCls:e,direction:n}=b.useContext(jn),{size:i,direction:r,block:o,prefixCls:s,className:a,rootClassName:l,children:c}=t,u=Ikt(t,["size","direction","block","prefixCls","className","rootClassName","children"]),d=Hc(w=>i??w),h=e("space-compact",s),[f,m]=Tkt(h),p=Me(h,m,{[`${h}-rtl`]:n==="rtl",[`${h}-block`]:o,[`${h}-vertical`]:r==="vertical"},a,l),g=b.useContext(ihe),y=fc(c),_=b.useMemo(()=>y.map((w,C)=>{const N=(w==null?void 0:w.key)||`${h}-item-${C}`;return b.createElement(N3n,{key:N,compactSize:d,compactDirection:r,isFirstItem:C===0&&(!g||(g==null?void 0:g.isFirstItem)),isLastItem:C===y.length-1&&(!g||(g==null?void 0:g.isLastItem))},w)}),[i,y,g]);return y.length===0?null:f(b.createElement("div",Object.assign({className:p},u),_))};var D3n=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const Akt=b.createContext(void 0),k3n=t=>{const{getPrefixCls:e,direction:n}=b.useContext(jn),{prefixCls:i,size:r,className:o}=t,s=D3n(t,["prefixCls","size","className"]),a=e("btn-group",i),[,,l]=Sd();let c="";switch(r){case"large":c="lg";break;case"small":c="sm";break}Cr("Button.Group")(!r||["large","small","middle"].includes(r),"usage","Invalid prop `size`.");const u=Me(a,{[`${a}-${c}`]:c,[`${a}-rtl`]:n==="rtl"},o,l);return b.createElement(Akt.Provider,{value:r},b.createElement("div",Object.assign({},s,{className:u})))},mtt=/^[\u4E00-\u9FA5]{2}$/,PDe=mtt.test.bind(mtt);function Rkt(t){return t==="danger"?{danger:!0}:{type:t}}function ptt(t){return typeof t=="string"}function AZ(t){return t==="text"||t==="link"}function M3n(t,e){if(t==null)return;const n=e?" ":"";return typeof t!="string"&&typeof t!="number"&&ptt(t.type)&&PDe(t.props.children)?$c(t,{children:t.props.children.split("").join(n)}):ptt(t)?PDe(t)?Z.createElement("span",null,t.split("").join(n)):Z.createElement("span",null,t):Skt(t)?Z.createElement("span",null,t):t}function L3n(t,e){let n=!1;const i=[];return Z.Children.forEach(t,r=>{const o=typeof r,s=o==="string"||o==="number";if(n&&s){const a=i.length-1,l=i[a];i[a]=`${l}${r}`}else i.push(r);n=s}),Z.Children.map(i,r=>M3n(r,e))}const Pkt=b.forwardRef((t,e)=>{const{className:n,style:i,children:r,prefixCls:o}=t,s=Me(`${o}-icon`,n);return Z.createElement("span",{ref:e,className:s,style:i},r)}),gtt=b.forwardRef((t,e)=>{const{prefixCls:n,className:i,style:r,iconClassName:o}=t,s=Me(`${n}-loading-icon`,i);return Z.createElement(Pkt,{prefixCls:n,className:s,style:r,ref:e},Z.createElement(Xd,{className:o}))}),axe=()=>({width:0,opacity:0,transform:"scale(0)"}),lxe=t=>({width:t.scrollWidth,opacity:1,transform:"scale(1)"}),T3n=t=>{const{prefixCls:e,loading:n,existIcon:i,className:r,style:o}=t,s=!!n;return i?Z.createElement(gtt,{prefixCls:e,className:r,style:o}):Z.createElement(Ou,{visible:s,motionName:`${e}-loading-icon-motion`,motionLeave:s,removeOnLeave:!0,onAppearStart:axe,onAppearActive:lxe,onEnterStart:axe,onEnterActive:lxe,onLeaveStart:lxe,onLeaveActive:axe},(a,l)=>{let{className:c,style:u}=a;return Z.createElement(gtt,{prefixCls:e,className:r,style:Object.assign(Object.assign({},o),u),ref:l,iconClassName:c})})},btt=(t,e)=>({[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineEndColor:e}}},"&:not(:first-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineStartColor:e}}}}}),I3n=t=>{const{componentCls:e,fontSize:n,lineWidth:i,groupBorderColor:r,colorErrorHover:o}=t;return{[`${e}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:t.calc(i).mul(-1).equal(),[`&, & > ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[e]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${e}-icon-only`]:{fontSize:n}},btt(`${e}-primary`,r),btt(`${e}-danger`,o)]}},Id=Math.round;function cxe(t,e){const n=t.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],i=n.map(r=>parseFloat(r));for(let r=0;r<3;r+=1)i[r]=e(i[r]||0,n[r]||"",r);return n[3]?i[3]=n[3].includes("%")?i[3]/100:i[3]:i[3]=1,i}const vtt=(t,e,n)=>n===0?t:t/100;function EV(t,e){const n=e||255;return t>n?n:t<0?0:t}class rhe{constructor(e){ye(this,"isValid",!0),ye(this,"r",0),ye(this,"g",0),ye(this,"b",0),ye(this,"a",1),ye(this,"_h",void 0),ye(this,"_s",void 0),ye(this,"_l",void 0),ye(this,"_v",void 0),ye(this,"_max",void 0),ye(this,"_min",void 0),ye(this,"_brightness",void 0);function n(i){return i[0]in e&&i[1]in e&&i[2]in e}if(e)if(typeof e=="string"){let r=function(o){return i.startsWith(o)};const i=e.trim();/^#?[A-F\d]{3,8}$/i.test(i)?this.fromHexString(i):r("rgb")?this.fromRgbString(i):r("hsl")?this.fromHslString(i):(r("hsv")||r("hsb"))&&this.fromHsvString(i)}else if(e instanceof rhe)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(n("rgb"))this.r=EV(e.r),this.g=EV(e.g),this.b=EV(e.b),this.a=typeof e.a=="number"?EV(e.a,1):1;else if(n("hsl"))this.fromHsl(e);else if(n("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const n=this.toHsv();return n.h=e,this._c(n)}getLuminance(){function e(o){const s=o/255;return s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)}const n=e(this.r),i=e(this.g),r=e(this.b);return .2126*n+.7152*i+.0722*r}getHue(){if(typeof this._h>"u"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=Id(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const n=this.getHue(),i=this.getSaturation();let r=this.getLightness()-e/100;return r<0&&(r=0),this._c({h:n,s:i,l:r,a:this.a})}lighten(e=10){const n=this.getHue(),i=this.getSaturation();let r=this.getLightness()+e/100;return r>1&&(r=1),this._c({h:n,s:i,l:r,a:this.a})}mix(e,n=50){const i=this._c(e),r=n/100,o=a=>(i[a]-this[a])*r+this[a],s={r:Id(o("r")),g:Id(o("g")),b:Id(o("b")),a:Id(o("a")*100)/100};return this._c(s)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const n=this._c(e),i=this.a+n.a*(1-this.a),r=o=>Id((this[o]*this.a+n[o]*n.a*(1-this.a))/i);return this._c({r:r("r"),g:r("g"),b:r("b"),a:i})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const n=(this.r||0).toString(16);e+=n.length===2?n:"0"+n;const i=(this.g||0).toString(16);e+=i.length===2?i:"0"+i;const r=(this.b||0).toString(16);if(e+=r.length===2?r:"0"+r,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=Id(this.a*255).toString(16);e+=o.length===2?o:"0"+o}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),n=Id(this.getSaturation()*100),i=Id(this.getLightness()*100);return this.a!==1?`hsla(${e},${n}%,${i}%,${this.a})`:`hsl(${e},${n}%,${i}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,n,i){const r=this.clone();return r[e]=EV(n,i),r}_c(e){return new this.constructor(e)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const n=e.replace("#","");function i(r,o){return parseInt(n[r]+n[o||r],16)}n.length<6?(this.r=i(0),this.g=i(1),this.b=i(2),this.a=n[3]?i(3)/255:1):(this.r=i(0,1),this.g=i(2,3),this.b=i(4,5),this.a=n[6]?i(6,7)/255:1)}fromHsl({h:e,s:n,l:i,a:r}){if(this._h=e%360,this._s=n,this._l=i,this.a=typeof r=="number"?r:1,n<=0){const h=Id(i*255);this.r=h,this.g=h,this.b=h}let o=0,s=0,a=0;const l=e/60,c=(1-Math.abs(2*i-1))*n,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(o=c,s=u):l>=1&&l<2?(o=u,s=c):l>=2&&l<3?(s=c,a=u):l>=3&&l<4?(s=u,a=c):l>=4&&l<5?(o=u,a=c):l>=5&&l<6&&(o=c,a=u);const d=i-c/2;this.r=Id((o+d)*255),this.g=Id((s+d)*255),this.b=Id((a+d)*255)}fromHsv({h:e,s:n,v:i,a:r}){this._h=e%360,this._s=n,this._v=i,this.a=typeof r=="number"?r:1;const o=Id(i*255);if(this.r=o,this.g=o,this.b=o,n<=0)return;const s=e/60,a=Math.floor(s),l=s-a,c=Id(i*(1-n)*255),u=Id(i*(1-n*l)*255),d=Id(i*(1-n*(1-l))*255);switch(a){case 0:this.g=d,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=u;break;case 4:this.r=d,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(e){const n=cxe(e,vtt);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(e){const n=cxe(e,vtt);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(e){const n=cxe(e,(i,r)=>r.includes("%")?Id(i/100*255):i);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var A3n=["b"],R3n=["v"],uxe=function(e){return Math.round(Number(e||0))},P3n=function(e){if(e instanceof rhe)return e;if(e&&Un(e)==="object"&&"h"in e&&"b"in e){var n=e,i=n.b,r=di(n,A3n);return Ie(Ie({},r),{},{v:i})}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},F0=function(t){Zp(n,t);var e=pb(n);function n(i){return Za(this,n),e.call(this,P3n(i))}return Qa(n,[{key:"toHsbString",value:function(){var r=this.toHsb(),o=uxe(r.s*100),s=uxe(r.b*100),a=uxe(r.h),l=r.a,c="hsb(".concat(a,", ").concat(o,"%, ").concat(s,"%)"),u="hsba(".concat(a,", ").concat(o,"%, ").concat(s,"%, ").concat(l.toFixed(l===0?0:2),")");return l===1?c:u}},{key:"toHsb",value:function(){var r=this.toHsv(),o=r.v,s=di(r,R3n);return Ie(Ie({},s),{},{b:o,a:this.a})}}]),n}(rhe),O3n="rc-color-picker",c3=function(e){return e instanceof F0?e:new F0(e)},j3n=c3("#1677ff"),Okt=function(e){var n=e.offset,i=e.targetRef,r=e.containerRef,o=e.color,s=e.type,a=r.current.getBoundingClientRect(),l=a.width,c=a.height,u=i.current.getBoundingClientRect(),d=u.width,h=u.height,f=d/2,m=h/2,p=(n.x+f)/l,g=1-(n.y+m)/c,y=o.toHsb(),_=p,w=(n.x+f)/l*360;if(s)switch(s){case"hue":return c3(Ie(Ie({},y),{},{h:w<=0?0:w}));case"alpha":return c3(Ie(Ie({},y),{},{a:_<=0?0:_}))}return c3({h:y.h,s:p<=0?0:p,b:g>=1?1:g,a:y.a})},jkt=function(e,n){var i=e.toHsb();switch(n){case"hue":return{x:i.h/360*100,y:50};case"alpha":return{x:e.a*100,y:50};default:return{x:i.s*100,y:(1-i.b)*100}}},WFe=function(e){var n=e.color,i=e.prefixCls,r=e.className,o=e.style,s=e.onClick,a="".concat(i,"-color-block");return Z.createElement("div",{className:Me(a,r),style:o,onClick:s},Z.createElement("div",{className:"".concat(a,"-inner"),style:{background:n}}))};function F3n(t){var e="touches"in t?t.touches[0]:t,n=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,i=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return{pageX:e.pageX-n,pageY:e.pageY-i}}function Fkt(t){var e=t.targetRef,n=t.containerRef,i=t.direction,r=t.onDragChange,o=t.onDragChangeComplete,s=t.calculate,a=t.color,l=t.disabledDrag,c=b.useState({x:0,y:0}),u=He(c,2),d=u[0],h=u[1],f=b.useRef(null),m=b.useRef(null);b.useEffect(function(){h(s())},[a]),b.useEffect(function(){return function(){document.removeEventListener("mousemove",f.current),document.removeEventListener("mouseup",m.current),document.removeEventListener("touchmove",f.current),document.removeEventListener("touchend",m.current),f.current=null,m.current=null}},[]);var p=function(C){var N=F3n(C),E=N.pageX,D=N.pageY,k=n.current.getBoundingClientRect(),M=k.x,T=k.y,A=k.width,R=k.height,P=e.current.getBoundingClientRect(),O=P.width,V=P.height,F=O/2,$=V/2,B=Math.max(0,Math.min(E-M,A))-F,z=Math.max(0,Math.min(D-T,R))-$,H={x:B,y:i==="x"?d.y:z};if(O===0&&V===0||O!==V)return!1;r==null||r(H)},g=function(C){C.preventDefault(),p(C)},y=function(C){C.preventDefault(),document.removeEventListener("mousemove",f.current),document.removeEventListener("mouseup",m.current),document.removeEventListener("touchmove",f.current),document.removeEventListener("touchend",m.current),f.current=null,m.current=null,o==null||o()},_=function(C){document.removeEventListener("mousemove",f.current),document.removeEventListener("mouseup",m.current),!l&&(p(C),document.addEventListener("mousemove",g),document.addEventListener("mouseup",y),document.addEventListener("touchmove",g),document.addEventListener("touchend",y),f.current=g,m.current=y)};return[d,_]}var $kt=function(e){var n=e.size,i=n===void 0?"default":n,r=e.color,o=e.prefixCls;return Z.createElement("div",{className:Me("".concat(o,"-handler"),ye({},"".concat(o,"-handler-sm"),i==="small")),style:{backgroundColor:r}})},Vkt=function(e){var n=e.children,i=e.style,r=e.prefixCls;return Z.createElement("div",{className:"".concat(r,"-palette"),style:Ie({position:"relative"},i)},n)},Bkt=b.forwardRef(function(t,e){var n=t.children,i=t.x,r=t.y;return Z.createElement("div",{ref:e,style:{position:"absolute",left:"".concat(i,"%"),top:"".concat(r,"%"),zIndex:1,transform:"translate(-50%, -50%)"}},n)}),$3n=function(e){var n=e.color,i=e.onChange,r=e.prefixCls,o=e.onChangeComplete,s=e.disabled,a=b.useRef(),l=b.useRef(),c=b.useRef(n),u=gr(function(p){var g=Okt({offset:p,targetRef:l,containerRef:a,color:n});c.current=g,i(g)}),d=Fkt({color:n,containerRef:a,targetRef:l,calculate:function(){return jkt(n)},onDragChange:u,onDragChangeComplete:function(){return o==null?void 0:o(c.current)},disabledDrag:s}),h=He(d,2),f=h[0],m=h[1];return Z.createElement("div",{ref:a,className:"".concat(r,"-select"),onMouseDown:m,onTouchStart:m},Z.createElement(Vkt,{prefixCls:r},Z.createElement(Bkt,{x:f.x,y:f.y,ref:l},Z.createElement($kt,{color:n.toRgbString(),prefixCls:r})),Z.createElement("div",{className:"".concat(r,"-saturation"),style:{backgroundColor:"hsl(".concat(n.toHsb().h,",100%, 50%)"),backgroundImage:"linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))"}})))},V3n=function(e,n){var i=ho(e,{value:n}),r=He(i,2),o=r[0],s=r[1],a=b.useMemo(function(){return c3(o)},[o]);return[a,s]},B3n=function(e){var n=e.colors,i=e.children,r=e.direction,o=r===void 0?"to right":r,s=e.type,a=e.prefixCls,l=b.useMemo(function(){return n.map(function(c,u){var d=c3(c);return s==="alpha"&&u===n.length-1&&(d=new F0(d.setA(1))),d.toRgbString()}).join(",")},[n,s]);return Z.createElement("div",{className:"".concat(a,"-gradient"),style:{position:"absolute",inset:0,background:"linear-gradient(".concat(o,", ").concat(l,")")}},i)},z3n=function(e){var n=e.prefixCls,i=e.colors,r=e.disabled,o=e.onChange,s=e.onChangeComplete,a=e.color,l=e.type,c=b.useRef(),u=b.useRef(),d=b.useRef(a),h=function(N){return l==="hue"?N.getHue():N.a*100},f=gr(function(C){var N=Okt({offset:C,targetRef:u,containerRef:c,color:a,type:l});d.current=N,o(h(N))}),m=Fkt({color:a,targetRef:u,containerRef:c,calculate:function(){return jkt(a,l)},onDragChange:f,onDragChangeComplete:function(){s(h(d.current))},direction:"x",disabledDrag:r}),p=He(m,2),g=p[0],y=p[1],_=Z.useMemo(function(){if(l==="hue"){var C=a.toHsb();C.s=1,C.b=1,C.a=1;var N=new F0(C);return N}return a},[a,l]),w=Z.useMemo(function(){return i.map(function(C){return"".concat(C.color," ").concat(C.percent,"%")})},[i]);return Z.createElement("div",{ref:c,className:Me("".concat(n,"-slider"),"".concat(n,"-slider-").concat(l)),onMouseDown:y,onTouchStart:y},Z.createElement(Vkt,{prefixCls:n},Z.createElement(Bkt,{x:g.x,y:g.y,ref:u},Z.createElement($kt,{size:"small",color:_.toHexString(),prefixCls:n})),Z.createElement(B3n,{colors:w,type:l,prefixCls:n})))};function H3n(t){return b.useMemo(function(){var e=t||{},n=e.slider;return[n||z3n]},[t])}var W3n=[{color:"rgb(255, 0, 0)",percent:0},{color:"rgb(255, 255, 0)",percent:17},{color:"rgb(0, 255, 0)",percent:33},{color:"rgb(0, 255, 255)",percent:50},{color:"rgb(0, 0, 255)",percent:67},{color:"rgb(255, 0, 255)",percent:83},{color:"rgb(255, 0, 0)",percent:100}],zkt=b.forwardRef(function(t,e){var n=t.value,i=t.defaultValue,r=t.prefixCls,o=r===void 0?O3n:r,s=t.onChange,a=t.onChangeComplete,l=t.className,c=t.style,u=t.panelRender,d=t.disabledAlpha,h=d===void 0?!1:d,f=t.disabled,m=f===void 0?!1:f,p=t.components,g=H3n(p),y=He(g,1),_=y[0],w=V3n(i||j3n,n),C=He(w,2),N=C[0],E=C[1],D=b.useMemo(function(){return N.setA(1).toRgbString()},[N]),k=function(z,H){n||E(z),s==null||s(z,H)},M=function(z){return new F0(N.setHue(z))},T=function(z){return new F0(N.setA(z/100))},A=function(z){k(M(z),{type:"hue",value:z})},R=function(z){k(T(z),{type:"alpha",value:z})},P=function(z){a&&a(M(z))},O=function(z){a&&a(T(z))},V=Me("".concat(o,"-panel"),l,ye({},"".concat(o,"-panel-disabled"),m)),F={prefixCls:o,disabled:m,color:N},$=Z.createElement(Z.Fragment,null,Z.createElement($3n,lt({onChange:k},F,{onChangeComplete:a})),Z.createElement("div",{className:"".concat(o,"-slider-container")},Z.createElement("div",{className:Me("".concat(o,"-slider-group"),ye({},"".concat(o,"-slider-group-disabled-alpha"),h))},Z.createElement(_,lt({},F,{type:"hue",colors:W3n,min:0,max:359,value:N.getHue(),onChange:A,onChangeComplete:P})),!h&&Z.createElement(_,lt({},F,{type:"alpha",colors:[{percent:0,color:"rgba(255, 0, 4, 0)"},{percent:100,color:D}],min:0,max:100,value:N.a*100,onChange:R,onChangeComplete:O}))),Z.createElement(WFe,{color:N.toRgbString(),prefixCls:o})));return Z.createElement("div",{className:V,style:c,ref:e},typeof u=="function"?u($):$)});zkt.displayName="ColorPicker";const F7=(t,e)=>(t==null?void 0:t.replace(/[^\w/]/g,"").slice(0,e?8:6))||"",U3n=(t,e)=>t?F7(t,e):"";let Wg=function(){function t(e){Za(this,t);var n;if(this.cleared=!1,e instanceof t){this.metaColor=e.metaColor.clone(),this.colors=(n=e.colors)===null||n===void 0?void 0:n.map(r=>({color:new t(r.color),percent:r.percent})),this.cleared=e.cleared;return}const i=Array.isArray(e);i&&e.length?(this.colors=e.map(r=>{let{color:o,percent:s}=r;return{color:new t(o),percent:s}}),this.metaColor=new F0(this.colors[0].color.metaColor)):this.metaColor=new F0(i?"":e),(!e||i&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return Qa(t,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return U3n(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(r=>`${r.color.toRgbString()} ${r.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((i,r)=>{const o=n.colors[r];return i.percent===o.percent&&i.color.equals(o.color)}):this.toHexString()===n.toHexString()}}])}();var K3n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},q3n=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:K3n}))},XD=b.forwardRef(q3n);XD.displayName="RightOutlined";var Hkt=Z.forwardRef(function(t,e){var n=t.prefixCls,i=t.forceRender,r=t.className,o=t.style,s=t.children,a=t.isActive,l=t.role,c=t.classNames,u=t.styles,d=Z.useState(a||i),h=He(d,2),f=h[0],m=h[1];return Z.useEffect(function(){(i||a)&&m(!0)},[i,a]),f?Z.createElement("div",{ref:e,className:Me("".concat(n,"-content"),ye(ye({},"".concat(n,"-content-active"),a),"".concat(n,"-content-inactive"),!a),r),style:o,role:l},Z.createElement("div",{className:Me("".concat(n,"-content-box"),c==null?void 0:c.body),style:u==null?void 0:u.body},s)):null});Hkt.displayName="PanelContent";var G3n=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],Wkt=Z.forwardRef(function(t,e){var n=t.showArrow,i=n===void 0?!0:n,r=t.headerClass,o=t.isActive,s=t.onItemClick,a=t.forceRender,l=t.className,c=t.classNames,u=c===void 0?{}:c,d=t.styles,h=d===void 0?{}:d,f=t.prefixCls,m=t.collapsible,p=t.accordion,g=t.panelKey,y=t.extra,_=t.header,w=t.expandIcon,C=t.openMotion,N=t.destroyInactivePanel,E=t.children,D=di(t,G3n),k=m==="disabled",M=m==="header",T=m==="icon",A=y!=null&&typeof y!="boolean",R=function(){s==null||s(g)},P=function(z){(z.key==="Enter"||z.keyCode===Wt.ENTER||z.which===Wt.ENTER)&&R()},O=typeof w=="function"?w(t):Z.createElement("i",{className:"arrow"});O&&(O=Z.createElement("div",{className:"".concat(f,"-expand-icon"),onClick:["header","icon"].includes(m)?R:void 0},O));var V=Me(ye(ye(ye({},"".concat(f,"-item"),!0),"".concat(f,"-item-active"),o),"".concat(f,"-item-disabled"),k),l),F=Me(r,ye(ye(ye({},"".concat(f,"-header"),!0),"".concat(f,"-header-collapsible-only"),M),"".concat(f,"-icon-collapsible-only"),T),u.header),$={className:F,"aria-expanded":o,"aria-disabled":k,onKeyDown:P,style:h.header};return!M&&!T&&($.onClick=R,$.role=p?"tab":"button",$.tabIndex=k?-1:0),Z.createElement("div",lt({},D,{ref:e,className:V}),Z.createElement("div",$,i&&O,Z.createElement("span",{className:"".concat(f,"-header-text"),onClick:m==="header"?R:void 0},_),A&&Z.createElement("div",{className:"".concat(f,"-extra")},y)),Z.createElement(Ou,lt({visible:o,leavedClassName:"".concat(f,"-content-hidden")},C,{forceRender:a,removeOnLeave:N}),function(B,z){var H=B.className,K=B.style;return Z.createElement(Hkt,{ref:z,prefixCls:f,className:H,classNames:u,style:K,styles:h,isActive:o,forceRender:a,role:p?"tabpanel":void 0},E)}))}),Y3n=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],X3n=function(e,n){var i=n.prefixCls,r=n.accordion,o=n.collapsible,s=n.destroyInactivePanel,a=n.onItemClick,l=n.activeKey,c=n.openMotion,u=n.expandIcon;return e.map(function(d,h){var f=d.children,m=d.label,p=d.key,g=d.collapsible,y=d.onItemClick,_=d.destroyInactivePanel,w=di(d,Y3n),C=String(p??h),N=g??o,E=_??s,D=function(T){N!=="disabled"&&(a(T),y==null||y(T))},k=!1;return r?k=l[0]===C:k=l.indexOf(C)>-1,Z.createElement(Wkt,lt({},w,{prefixCls:i,key:C,panelKey:C,isActive:k,accordion:r,openMotion:c,expandIcon:u,header:m,collapsible:N,onItemClick:D,destroyInactivePanel:E}),f)})},Z3n=function(e,n,i){if(!e)return null;var r=i.prefixCls,o=i.accordion,s=i.collapsible,a=i.destroyInactivePanel,l=i.onItemClick,c=i.activeKey,u=i.openMotion,d=i.expandIcon,h=e.key||String(n),f=e.props,m=f.header,p=f.headerClass,g=f.destroyInactivePanel,y=f.collapsible,_=f.onItemClick,w=!1;o?w=c[0]===h:w=c.indexOf(h)>-1;var C=y??s,N=function(k){C!=="disabled"&&(l(k),_==null||_(k))},E={key:h,panelKey:h,header:m,headerClass:p,isActive:w,prefixCls:r,destroyInactivePanel:g??a,openMotion:u,accordion:o,children:e.props.children,onItemClick:N,expandIcon:d,collapsible:C};return typeof e.type=="string"?e:(Object.keys(E).forEach(function(D){typeof E[D]>"u"&&delete E[D]}),Z.cloneElement(e,E))};function Q3n(t,e,n){return Array.isArray(t)?X3n(t,n):fc(e).map(function(i,r){return Z3n(i,r,n)})}function J3n(t){var e=t;if(!Array.isArray(e)){var n=Un(e);e=n==="number"||n==="string"?[e]:[]}return e.map(function(i){return String(i)})}var ejn=Z.forwardRef(function(t,e){var n=t.prefixCls,i=n===void 0?"rc-collapse":n,r=t.destroyInactivePanel,o=r===void 0?!1:r,s=t.style,a=t.accordion,l=t.className,c=t.children,u=t.collapsible,d=t.openMotion,h=t.expandIcon,f=t.activeKey,m=t.defaultActiveKey,p=t.onChange,g=t.items,y=Me(i,l),_=ho([],{value:f,onChange:function(M){return p==null?void 0:p(M)},defaultValue:m,postState:J3n}),w=He(_,2),C=w[0],N=w[1],E=function(M){return N(function(){if(a)return C[0]===M?[]:[M];var T=C.indexOf(M),A=T>-1;return A?C.filter(function(R){return R!==M}):[].concat(Ot(C),[M])})};ii(!c,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var D=Q3n(g,c,{prefixCls:i,accordion:a,openMotion:d,expandIcon:h,collapsible:u,destroyInactivePanel:o,onItemClick:E,activeKey:C});return Z.createElement("div",lt({ref:e,className:y,style:s,role:a?"tablist":void 0},Ll(t,{aria:!0,data:!0})),D)});const UFe=Object.assign(ejn,{Panel:Wkt});UFe.Panel;const tjn=b.forwardRef((t,e)=>{Cr("Collapse.Panel").deprecated(!("disabled"in t),"disabled",'collapsible="disabled"');const{getPrefixCls:n}=b.useContext(jn),{prefixCls:i,className:r,showArrow:o=!0}=t,s=n("collapse",i),a=Me({[`${s}-no-arrow`]:!o},r);return b.createElement(UFe.Panel,Object.assign({ref:e},t,{prefixCls:s,className:a}))}),jK=t=>({[t.componentCls]:{[`${t.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${t.motionDurationMid} ${t.motionEaseInOut},
        opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}},[`${t.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${t.motionDurationMid} ${t.motionEaseInOut},
        opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}}}),njn=t=>({animationDuration:t,animationFillMode:"both"}),ijn=t=>({animationDuration:t,animationFillMode:"both"}),ohe=function(t,e,n,i){const o=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[`
      ${o}${t}-enter,
      ${o}${t}-appear
    `]:Object.assign(Object.assign({},njn(i)),{animationPlayState:"paused"}),[`${o}${t}-leave`]:Object.assign(Object.assign({},ijn(i)),{animationPlayState:"paused"}),[`
      ${o}${t}-enter${t}-enter-active,
      ${o}${t}-appear${t}-appear-active
    `]:{animationName:e,animationPlayState:"running"},[`${o}${t}-leave${t}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},rjn=new so("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),ojn=new so("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),KFe=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:n}=t,i=`${n}-fade`,r=e?"&":"";return[ohe(i,rjn,ojn,t.motionDurationMid,e),{[`
        ${r}${i}-enter,
        ${r}${i}-appear
      `]:{opacity:0,animationTimingFunction:"linear"},[`${r}${i}-leave`]:{animationTimingFunction:"linear"}}]},sjn=new so("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ajn=new so("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),ljn=new so("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),cjn=new so("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),ujn=new so("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),djn=new so("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),hjn=new so("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),fjn=new so("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),mjn={"move-up":{inKeyframes:hjn,outKeyframes:fjn},"move-down":{inKeyframes:sjn,outKeyframes:ajn},"move-left":{inKeyframes:ljn,outKeyframes:cjn},"move-right":{inKeyframes:ujn,outKeyframes:djn}},Vj=(t,e)=>{const{antCls:n}=t,i=`${n}-${e}`,{inKeyframes:r,outKeyframes:o}=mjn[e];return[ohe(i,r,o,t.motionDurationMid),{[`
        ${i}-enter,
        ${i}-appear
      `]:{opacity:0,animationTimingFunction:t.motionEaseOutCirc},[`${i}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},she=new so("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),ahe=new so("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),lhe=new so("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),che=new so("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),pjn=new so("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),gjn=new so("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),bjn=new so("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),vjn=new so("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),yjn={"slide-up":{inKeyframes:she,outKeyframes:ahe},"slide-down":{inKeyframes:lhe,outKeyframes:che},"slide-left":{inKeyframes:pjn,outKeyframes:gjn},"slide-right":{inKeyframes:bjn,outKeyframes:vjn}},ow=(t,e)=>{const{antCls:n}=t,i=`${n}-${e}`,{inKeyframes:r,outKeyframes:o}=yjn[e];return[ohe(i,r,o,t.motionDurationMid),{[`
      ${i}-enter,
      ${i}-appear
    `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:t.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${i}-leave`]:{animationTimingFunction:t.motionEaseInQuint}}]},qFe=new so("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),_jn=new so("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),ytt=new so("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),_tt=new so("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),xjn=new so("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),wjn=new so("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),Cjn=new so("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),Sjn=new so("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),Njn=new so("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),Ejn=new so("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),Djn=new so("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),kjn=new so("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),Mjn={zoom:{inKeyframes:qFe,outKeyframes:_jn},"zoom-big":{inKeyframes:ytt,outKeyframes:_tt},"zoom-big-fast":{inKeyframes:ytt,outKeyframes:_tt},"zoom-left":{inKeyframes:Cjn,outKeyframes:Sjn},"zoom-right":{inKeyframes:Njn,outKeyframes:Ejn},"zoom-up":{inKeyframes:xjn,outKeyframes:wjn},"zoom-down":{inKeyframes:Djn,outKeyframes:kjn}},s6=(t,e)=>{const{antCls:n}=t,i=`${n}-${e}`,{inKeyframes:r,outKeyframes:o}=Mjn[e];return[ohe(i,r,o,e==="zoom-big-fast"?t.motionDurationFast:t.motionDurationMid),{[`
        ${i}-enter,
        ${i}-appear
      `]:{transform:"scale(0)",opacity:0,animationTimingFunction:t.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${i}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},Ljn=t=>{const{componentCls:e,contentBg:n,padding:i,headerBg:r,headerPadding:o,collapseHeaderPaddingSM:s,collapseHeaderPaddingLG:a,collapsePanelBorderRadius:l,lineWidth:c,lineType:u,colorBorder:d,colorText:h,colorTextHeading:f,colorTextDisabled:m,fontSizeLG:p,lineHeight:g,lineHeightLG:y,marginSM:_,paddingSM:w,paddingLG:C,paddingXS:N,motionDurationSlow:E,fontSizeIcon:D,contentPadding:k,fontHeight:M,fontHeightLG:T}=t,A=`${xe(c)} ${u} ${d}`;return{[e]:Object.assign(Object.assign({},fo(t)),{backgroundColor:r,border:A,borderRadius:l,"&-rtl":{direction:"rtl"},[`& > ${e}-item`]:{borderBottom:A,"&:last-child":{[`
            &,
            & > ${e}-header`]:{borderRadius:`0 0 ${xe(l)} ${xe(l)}`}},[`> ${e}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:o,color:f,lineHeight:g,cursor:"pointer",transition:`all ${E}, visibility 0s`,[`> ${e}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${e}-expand-icon`]:{height:M,display:"flex",alignItems:"center",paddingInlineEnd:_},[`${e}-arrow`]:Object.assign(Object.assign({},e6()),{fontSize:D,transition:`transform ${E}`,svg:{transition:`transform ${E}`}}),[`${e}-header-text`]:{marginInlineEnd:"auto"}},[`${e}-icon-collapsible-only`]:{cursor:"unset",[`${e}-expand-icon`]:{cursor:"pointer"}}},[`${e}-content`]:{color:h,backgroundColor:n,borderTop:A,[`& > ${e}-content-box`]:{padding:k},"&-hidden":{display:"none"}},"&-small":{[`> ${e}-item`]:{[`> ${e}-header`]:{padding:s,paddingInlineStart:N,[`> ${e}-expand-icon`]:{marginInlineStart:t.calc(w).sub(N).equal()}},[`> ${e}-content > ${e}-content-box`]:{padding:w}}},"&-large":{[`> ${e}-item`]:{fontSize:p,lineHeight:y,[`> ${e}-header`]:{padding:a,paddingInlineStart:i,[`> ${e}-expand-icon`]:{height:T,marginInlineStart:t.calc(C).sub(i).equal()}},[`> ${e}-content > ${e}-content-box`]:{padding:C}}},[`${e}-item:last-child`]:{borderBottom:0,[`> ${e}-content`]:{borderRadius:`0 0 ${xe(l)} ${xe(l)}`}},[`& ${e}-item-disabled > ${e}-header`]:{"\n          &,\n          & > .arrow\n        ":{color:m,cursor:"not-allowed"}},[`&${e}-icon-position-end`]:{[`& > ${e}-item`]:{[`> ${e}-header`]:{[`${e}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:_}}}}})}},Tjn=t=>{const{componentCls:e}=t,n=`> ${e}-item > ${e}-header ${e}-arrow`;return{[`${e}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},Ijn=t=>{const{componentCls:e,headerBg:n,paddingXXS:i,colorBorder:r}=t;return{[`${e}-borderless`]:{backgroundColor:n,border:0,[`> ${e}-item`]:{borderBottom:`1px solid ${r}`},[`
        > ${e}-item:last-child,
        > ${e}-item:last-child ${e}-header
      `]:{borderRadius:0},[`> ${e}-item:last-child`]:{borderBottom:0},[`> ${e}-item > ${e}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${e}-item > ${e}-content > ${e}-content-box`]:{paddingTop:i}}}},Ajn=t=>{const{componentCls:e,paddingSM:n}=t;return{[`${e}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${e}-item`]:{borderBottom:0,[`> ${e}-content`]:{backgroundColor:"transparent",border:0,[`> ${e}-content-box`]:{paddingBlock:n}}}}}},Rjn=t=>({headerPadding:`${t.paddingSM}px ${t.padding}px`,headerBg:t.colorFillAlter,contentPadding:`${t.padding}px 16px`,contentBg:t.colorBgContainer}),Pjn=Jr("Collapse",t=>{const e=mr(t,{collapseHeaderPaddingSM:`${xe(t.paddingXS)} ${xe(t.paddingSM)}`,collapseHeaderPaddingLG:`${xe(t.padding)} ${xe(t.paddingLG)}`,collapsePanelBorderRadius:t.borderRadiusLG});return[Ljn(e),Ijn(e),Ajn(e),Tjn(e),jK(e)]},Rjn),Ukt=b.forwardRef((t,e)=>{const{getPrefixCls:n,direction:i,collapse:r}=b.useContext(jn),{prefixCls:o,className:s,rootClassName:a,style:l,bordered:c=!0,ghost:u,size:d,expandIconPosition:h="start",children:f,expandIcon:m}=t,p=Hc(A=>{var R;return(R=d??A)!==null&&R!==void 0?R:"middle"}),g=n("collapse",o),y=n(),[_,w,C]=Pjn(g);Cr("Collapse")(h!=="left"&&h!=="right","deprecated","`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead.");const N=b.useMemo(()=>h==="left"?"start":h==="right"?"end":h,[h]),E=m??(r==null?void 0:r.expandIcon),D=b.useCallback(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const R=typeof E=="function"?E(A):b.createElement(XD,{rotate:A.isActive?90:void 0,"aria-label":A.isActive?"expanded":"collapsed"});return $c(R,()=>{var P;return{className:Me((P=R==null?void 0:R.props)===null||P===void 0?void 0:P.className,`${g}-arrow`)}})},[E,g]),k=Me(`${g}-icon-position-${N}`,{[`${g}-borderless`]:!c,[`${g}-rtl`]:i==="rtl",[`${g}-ghost`]:!!u,[`${g}-${p}`]:p!=="middle"},r==null?void 0:r.className,s,a,w,C),M=Object.assign(Object.assign({},$j(y)),{motionAppear:!1,leavedClassName:`${g}-content-hidden`}),T=b.useMemo(()=>f?fc(f).map((A,R)=>{var P,O;if(!((P=A.props)===null||P===void 0)&&P.disabled){const V=(O=A.key)!==null&&O!==void 0?O:String(R),{disabled:F,collapsible:$}=A.props,B=Object.assign(Object.assign({},Zs(A.props,["disabled"])),{key:V,collapsible:$??(F?"disabled":void 0)});return $c(A,B)}return A}):null,[f]);return _(b.createElement(UFe,Object.assign({ref:e,openMotion:M},Zs(t,["rootClassName"]),{expandIcon:D,prefixCls:g,className:k,style:Object.assign(Object.assign({},r==null?void 0:r.style),l)}),T))});Ukt.displayName="Collapse";const Kkt=Object.assign(Ukt,{Panel:tjn}),Ef=t=>t instanceof Wg?t:new Wg(t),Aee=t=>Math.round(Number(t||0)),GFe=t=>Aee(t.toHsb().a*100),Ree=(t,e)=>{const n=t.toRgb();if(!n.r&&!n.g&&!n.b){const i=t.toHsb();return i.a=1,Ef(i)}return n.a=1,Ef(n)},qkt=(t,e)=>{const n=[{percent:0,color:t[0].color}].concat(Ot(t),[{percent:100,color:t[t.length-1].color}]);for(let i=0;i<n.length-1;i+=1){const r=n[i].percent,o=n[i+1].percent,s=n[i].color,a=n[i+1].color;if(r<=e&&e<=o){const l=o-r;if(l===0)return s;const c=(e-r)/l*100,u=new F0(s),d=new F0(a);return u.mix(d,c).toRgbString()}}return""},dxe=t=>t.map(e=>(e.colors=e.colors.map(Ef),e)),Gkt=(t,e)=>{const{r:n,g:i,b:r,a:o}=t.toRgb(),s=new F0(t.toRgbString()).onBackground(e).toHsv();return o<=.5?s.v>.5:n*.299+i*.587+r*.114>192},xtt=t=>{let{label:e}=t;return`panel-${e}`},Ojn=t=>{let{prefixCls:e,presets:n,value:i,onChange:r}=t;const[o]=bb("ColorPicker"),[,s]=Sd(),[a]=ho(dxe(n),{value:dxe(n),postState:dxe}),l=`${e}-presets`,c=b.useMemo(()=>a.reduce((h,f)=>{const{defaultOpen:m=!0}=f;return m&&h.push(xtt(f)),h},[]),[a]),u=h=>{r==null||r(h)},d=a.map(h=>{var f;return{key:xtt(h),label:Z.createElement("div",{className:`${l}-label`},h==null?void 0:h.label),children:Z.createElement("div",{className:`${l}-items`},Array.isArray(h==null?void 0:h.colors)&&((f=h.colors)===null||f===void 0?void 0:f.length)>0?h.colors.map((m,p)=>Z.createElement(WFe,{key:`preset-${p}-${m.toHexString()}`,color:Ef(m).toRgbString(),prefixCls:e,className:Me(`${l}-color`,{[`${l}-color-checked`]:m.toHexString()===(i==null?void 0:i.toHexString()),[`${l}-color-bright`]:Gkt(m,s.colorBgElevated)}),onClick:()=>u(m)})):Z.createElement("span",{className:`${l}-empty`},o.presetEmpty))}});return Z.createElement("div",{className:l},Z.createElement(Kkt,{defaultActiveKey:c,ghost:!0,items:d}))},Ykt=t=>{const{paddingInline:e,onlyIconSize:n,paddingBlock:i}=t;return mr(t,{buttonPaddingHorizontal:e,buttonPaddingVertical:i,buttonIconOnlyFontSize:n})},Xkt=t=>{var e,n,i,r,o,s;const a=(e=t.contentFontSize)!==null&&e!==void 0?e:t.fontSize,l=(n=t.contentFontSizeSM)!==null&&n!==void 0?n:t.fontSize,c=(i=t.contentFontSizeLG)!==null&&i!==void 0?i:t.fontSizeLG,u=(r=t.contentLineHeight)!==null&&r!==void 0?r:Tee(a),d=(o=t.contentLineHeightSM)!==null&&o!==void 0?o:Tee(l),h=(s=t.contentLineHeightLG)!==null&&s!==void 0?s:Tee(c),f=Gkt(new Wg(t.colorBgSolid),"#fff")?"#000":"#fff";return{fontWeight:400,defaultShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`,primaryShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`,dangerShadow:`0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`,primaryColor:t.colorTextLightSolid,dangerColor:t.colorTextLightSolid,borderColorDisabled:t.colorBorder,defaultGhostColor:t.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:t.colorBgContainer,paddingInline:t.paddingContentHorizontal-t.lineWidth,paddingInlineLG:t.paddingContentHorizontal-t.lineWidth,paddingInlineSM:8-t.lineWidth,onlyIconSize:t.fontSizeLG,onlyIconSizeSM:t.fontSizeLG-2,onlyIconSizeLG:t.fontSizeLG+2,groupBorderColor:t.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:t.colorText,textTextHoverColor:t.colorText,textTextActiveColor:t.colorText,textHoverBg:t.colorFillTertiary,defaultColor:t.colorText,defaultBg:t.colorBgContainer,defaultBorderColor:t.colorBorder,defaultBorderColorDisabled:t.colorBorder,defaultHoverBg:t.colorBgContainer,defaultHoverColor:t.colorPrimaryHover,defaultHoverBorderColor:t.colorPrimaryHover,defaultActiveBg:t.colorBgContainer,defaultActiveColor:t.colorPrimaryActive,defaultActiveBorderColor:t.colorPrimaryActive,solidTextColor:f,contentFontSize:a,contentFontSizeSM:l,contentFontSizeLG:c,contentLineHeight:u,contentLineHeightSM:d,contentLineHeightLG:h,paddingBlock:Math.max((t.controlHeight-a*u)/2-t.lineWidth,0),paddingBlockSM:Math.max((t.controlHeightSM-l*d)/2-t.lineWidth,0),paddingBlockLG:Math.max((t.controlHeightLG-c*h)/2-t.lineWidth,0)}},jjn=t=>{const{componentCls:e,iconCls:n,fontWeight:i}=t;return{[e]:{outline:"none",position:"relative",display:"inline-flex",gap:t.marginXS,alignItems:"center",justifyContent:"center",fontWeight:i,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${xe(t.lineWidth)} ${t.lineType} transparent`,cursor:"pointer",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:t.colorText,"&:disabled > *":{pointerEvents:"none"},"> span":{display:"inline-block"},[`${e}-icon`]:{lineHeight:1},"> a":{color:"currentColor"},"&:not(:disabled)":Object.assign({},j0(t)),[`&${e}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${e}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},"&-icon-end":{flexDirection:"row-reverse"}}}},Zkt=(t,e,n)=>({[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":e,"&:active":n}}),Fjn=t=>({minWidth:t.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),$jn=t=>({borderRadius:t.controlHeight,paddingInlineStart:t.calc(t.controlHeight).div(2).equal(),paddingInlineEnd:t.calc(t.controlHeight).div(2).equal()}),Vjn=t=>({cursor:"not-allowed",borderColor:t.borderColorDisabled,color:t.colorTextDisabled,background:t.colorBgContainerDisabled,boxShadow:"none"}),YFe=(t,e,n,i,r,o,s,a)=>({[`&${t}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:e,borderColor:i||void 0,boxShadow:"none"},Zkt(t,Object.assign({background:e},s),Object.assign({background:e},a))),{"&:disabled":{cursor:"not-allowed",color:r||void 0,borderColor:o||void 0}})}),Bjn=t=>({[`&:disabled, &${t.componentCls}-disabled`]:Object.assign({},Vjn(t))}),zjn=t=>({[`&:disabled, &${t.componentCls}-disabled`]:{cursor:"not-allowed",color:t.colorTextDisabled}}),uhe=(t,e,n,i)=>{const o=i&&["link","text"].includes(i)?zjn:Bjn;return Object.assign(Object.assign({},o(t)),Zkt(t.componentCls,e,n))},XFe=(t,e,n,i,r)=>({[`&${t.componentCls}-variant-solid`]:Object.assign({color:e,background:n},uhe(t,i,r))}),ZFe=(t,e,n,i,r)=>({[`&${t.componentCls}-variant-outlined, &${t.componentCls}-variant-dashed`]:Object.assign({borderColor:e,background:n},uhe(t,i,r))}),QFe=t=>({[`&${t.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),JFe=(t,e,n,i)=>({[`&${t.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:e},uhe(t,n,i))}),Bj=(t,e,n,i,r)=>({[`&${t.componentCls}-variant-${n}`]:Object.assign({color:e,boxShadow:"none"},uhe(t,i,r,n))}),Hjn=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.defaultColor,boxShadow:t.defaultShadow},XFe(t,t.solidTextColor,t.colorBgSolid,{background:t.colorBgSolidHover},{background:t.colorBgSolidActive})),QFe(t)),JFe(t,t.colorFillTertiary,{background:t.colorFillSecondary},{background:t.colorFill})),Bj(t,t.textTextColor,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),YFe(t.componentCls,t.ghostBg,t.defaultGhostColor,t.defaultGhostBorderColor,t.colorTextDisabled,t.colorBorder)),Wjn=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorPrimary,boxShadow:t.primaryShadow},ZFe(t,t.colorPrimary,t.colorBgContainer,{color:t.colorPrimaryTextHover,borderColor:t.colorPrimaryHover,background:t.colorBgContainer},{color:t.colorPrimaryTextActive,borderColor:t.colorPrimaryActive,background:t.colorBgContainer})),QFe(t)),JFe(t,t.colorPrimaryBg,{background:t.colorPrimaryBgHover},{background:t.colorPrimaryBorder})),Bj(t,t.colorLink,"text",{color:t.colorPrimaryTextHover,background:t.colorPrimaryBg},{color:t.colorPrimaryTextActive,background:t.colorPrimaryBorder})),YFe(t.componentCls,t.ghostBg,t.colorPrimary,t.colorPrimary,t.colorTextDisabled,t.colorBorder,{color:t.colorPrimaryHover,borderColor:t.colorPrimaryHover},{color:t.colorPrimaryActive,borderColor:t.colorPrimaryActive})),Ujn=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorError,boxShadow:t.dangerShadow},XFe(t,t.dangerColor,t.colorError,{background:t.colorErrorHover},{background:t.colorErrorActive})),ZFe(t,t.colorError,t.colorBgContainer,{color:t.colorErrorHover,borderColor:t.colorErrorBorderHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),QFe(t)),JFe(t,t.colorErrorBg,{background:t.colorErrorBgFilledHover},{background:t.colorErrorBgActive})),Bj(t,t.colorError,"text",{color:t.colorErrorHover,background:t.colorErrorBg},{color:t.colorErrorHover,background:t.colorErrorBgActive})),Bj(t,t.colorError,"link",{color:t.colorErrorHover},{color:t.colorErrorActive})),YFe(t.componentCls,t.ghostBg,t.colorError,t.colorError,t.colorTextDisabled,t.colorBorder,{color:t.colorErrorHover,borderColor:t.colorErrorHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),Kjn=t=>{const{componentCls:e}=t;return{[`${e}-color-default`]:Hjn(t),[`${e}-color-primary`]:Wjn(t),[`${e}-color-dangerous`]:Ujn(t)}},qjn=t=>Object.assign(Object.assign(Object.assign(Object.assign({},ZFe(t,t.defaultBorderColor,t.defaultBg,{color:t.defaultHoverColor,borderColor:t.defaultHoverBorderColor,background:t.defaultHoverBg},{color:t.defaultActiveColor,borderColor:t.defaultActiveBorderColor,background:t.defaultActiveBg})),Bj(t,t.textTextColor,"text",{color:t.textTextHoverColor,background:t.textHoverBg},{color:t.textTextActiveColor,background:t.colorBgTextActive})),XFe(t,t.primaryColor,t.colorPrimary,{background:t.colorPrimaryHover,color:t.primaryColor},{background:t.colorPrimaryActive,color:t.primaryColor})),Bj(t,t.colorLink,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),e6e=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:n,controlHeight:i,fontSize:r,lineHeight:o,borderRadius:s,buttonPaddingHorizontal:a,iconCls:l,buttonPaddingVertical:c}=t,u=`${n}-icon-only`;return[{[e]:{fontSize:r,lineHeight:o,height:i,padding:`${xe(c)} ${xe(a)}`,borderRadius:s,[`&${u}`]:{width:i,paddingInline:0,[`&${n}-compact-item`]:{flex:"none"},[`&${n}-round`]:{width:"auto"},[l]:{fontSize:t.buttonIconOnlyFontSize}},[`&${n}-loading`]:{opacity:t.opacityLoading,cursor:"default"},[`${n}-loading-icon`]:{transition:`width ${t.motionDurationSlow} ${t.motionEaseInOut}, opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`}}},{[`${n}${n}-circle${e}`]:Fjn(t)},{[`${n}${n}-round${e}`]:$jn(t)}]},Gjn=t=>{const e=mr(t,{fontSize:t.contentFontSize,lineHeight:t.contentLineHeight});return e6e(e,t.componentCls)},Yjn=t=>{const e=mr(t,{controlHeight:t.controlHeightSM,fontSize:t.contentFontSizeSM,lineHeight:t.contentLineHeightSM,padding:t.paddingXS,buttonPaddingHorizontal:t.paddingInlineSM,buttonPaddingVertical:t.paddingBlockSM,borderRadius:t.borderRadiusSM,buttonIconOnlyFontSize:t.onlyIconSizeSM});return e6e(e,`${t.componentCls}-sm`)},Xjn=t=>{const e=mr(t,{controlHeight:t.controlHeightLG,fontSize:t.contentFontSizeLG,lineHeight:t.contentLineHeightLG,buttonPaddingHorizontal:t.paddingInlineLG,buttonPaddingVertical:t.paddingBlockLG,borderRadius:t.borderRadiusLG,buttonIconOnlyFontSize:t.onlyIconSizeLG});return e6e(e,`${t.componentCls}-lg`)},Zjn=t=>{const{componentCls:e}=t;return{[e]:{[`&${e}-block`]:{width:"100%"}}}},Qjn=Jr("Button",t=>{const e=Ykt(t);return[jjn(e),Gjn(e),Yjn(e),Xjn(e),Zjn(e),Kjn(e),qjn(e),I3n(e)]},Xkt,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function Jjn(t,e,n){const{focusElCls:i,focus:r,borderElCls:o}=n,s=o?"> *":"",a=["hover",r?"focus":null,"active"].filter(Boolean).map(l=>`&:${l} ${s}`).join(",");return{[`&-item:not(${e}-last-item)`]:{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal()},"&-item":Object.assign(Object.assign({[a]:{zIndex:2}},i?{[`&${i}`]:{zIndex:2}}:{}),{[`&[disabled] ${s}`]:{zIndex:0}})}}function e5n(t,e,n){const{borderElCls:i}=n,r=i?`> ${i}`:"";return{[`&-item:not(${e}-first-item):not(${e}-last-item) ${r}`]:{borderRadius:0},[`&-item:not(${e}-last-item)${e}-first-item`]:{[`& ${r}, &${t}-sm ${r}, &${t}-lg ${r}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${e}-first-item)${e}-last-item`]:{[`& ${r}, &${t}-sm ${r}, &${t}-lg ${r}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function a6(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:n}=t,i=`${n}-compact`;return{[i]:Object.assign(Object.assign({},Jjn(t,i,e)),e5n(n,i,e))}}function t5n(t,e){return{[`&-item:not(${e}-last-item)`]:{marginBottom:t.calc(t.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function n5n(t,e){return{[`&-item:not(${e}-first-item):not(${e}-last-item)`]:{borderRadius:0},[`&-item${e}-first-item:not(${e}-last-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${e}-last-item:not(${e}-first-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function i5n(t){const e=`${t.componentCls}-compact-vertical`;return{[e]:Object.assign(Object.assign({},t5n(t,e)),n5n(t.componentCls,e))}}const r5n=t=>{const{componentCls:e,calc:n}=t;return{[e]:{[`&-compact-item${e}-primary`]:{[`&:not([disabled]) + ${e}-compact-item${e}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:n(t.lineWidth).mul(-1).equal(),insetInlineStart:n(t.lineWidth).mul(-1).equal(),display:"inline-block",width:t.lineWidth,height:`calc(100% + ${xe(t.lineWidth)} * 2)`,backgroundColor:t.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${e}-primary`]:{[`&:not([disabled]) + ${e}-compact-vertical-item${e}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:n(t.lineWidth).mul(-1).equal(),insetInlineStart:n(t.lineWidth).mul(-1).equal(),display:"inline-block",width:`calc(100% + ${xe(t.lineWidth)} * 2)`,height:t.lineWidth,backgroundColor:t.colorPrimaryHover,content:'""'}}}}}}},o5n=$A(["Button","compact"],t=>{const e=Ykt(t);return[a6(e),i5n(e),r5n(e)]},Xkt);var s5n=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};function a5n(t){if(typeof t=="object"&&t){let e=t==null?void 0:t.delay;return e=!Number.isNaN(e)&&typeof e=="number"?e:0,{loading:e<=0,delay:e}}return{loading:!!t,delay:0}}const l5n={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["primary","link"],text:["default","text"]},c5n=Z.forwardRef((t,e)=>{var n,i,r;const{loading:o=!1,prefixCls:s,color:a,variant:l,type:c,danger:u=!1,shape:d="default",size:h,styles:f,disabled:m,className:p,rootClassName:g,children:y,icon:_,iconPosition:w="start",ghost:C=!1,block:N=!1,htmlType:E="button",classNames:D,style:k={},autoInsertSpace:M}=t,T=s5n(t,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace"]),A=c||"default",[R,P]=b.useMemo(()=>{if(a&&l)return[a,l];const Ke=l5n[A]||[];return u?["danger",Ke[1]]:Ke},[c,a,l,u]),V=R==="danger"?"dangerous":R,{getPrefixCls:F,direction:$,button:B}=b.useContext(jn),z=(n=M??(B==null?void 0:B.autoInsertSpace))!==null&&n!==void 0?n:!0,H=F("btn",s),[K,q,U]=Qjn(H),Y=b.useContext(Yd),J=m??Y,ae=b.useContext(Akt),se=b.useMemo(()=>a5n(o),[o]),[oe,fe]=b.useState(se.loading),[de,ie]=b.useState(!1),be=Vu(e,b.createRef()),le=b.Children.count(y)===1&&!_&&!AZ(P);b.useEffect(()=>{let Ke=null;se.delay>0?Ke=setTimeout(()=>{Ke=null,fe(!0)},se.delay):fe(se.loading);function Xe(){Ke&&(clearTimeout(Ke),Ke=null)}return Xe},[se]),b.useEffect(()=>{if(!be||!be.current||!z)return;const Ke=be.current.textContent;le&&PDe(Ke)?de||ie(!0):de&&ie(!1)},[be]);const Ne=Ke=>{const{onClick:Xe}=t;if(oe||J){Ke.preventDefault();return}Xe==null||Xe(Ke)};{const Ke=Cr("Button");Ke(!(typeof _=="string"&&_.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${_}\` at https://ant.design/components/icon`),Ke(!(C&&AZ(P)),"usage","`link` or `text` button can't be a `ghost` button.")}const{compactSize:Le,compactItemClassnames:Te}=VS(H,$),De={large:"lg",small:"sm",middle:void 0},Pe=Hc(Ke=>{var Xe,it;return(it=(Xe=h??Le)!==null&&Xe!==void 0?Xe:ae)!==null&&it!==void 0?it:Ke}),ge=Pe&&De[Pe]||"",he=oe?"loading":_,me=Zs(T,["navigate"]),X=Me(H,q,U,{[`${H}-${d}`]:d!=="default"&&d,[`${H}-${A}`]:A,[`${H}-dangerous`]:u,[`${H}-color-${V}`]:V,[`${H}-variant-${P}`]:P,[`${H}-${ge}`]:ge,[`${H}-icon-only`]:!y&&y!==0&&!!he,[`${H}-background-ghost`]:C&&!AZ(P),[`${H}-loading`]:oe,[`${H}-two-chinese-chars`]:de&&z&&!oe,[`${H}-block`]:N,[`${H}-rtl`]:$==="rtl",[`${H}-icon-end`]:w==="end"},Te,p,g,B==null?void 0:B.className),re=Object.assign(Object.assign({},B==null?void 0:B.style),k),we=Me(D==null?void 0:D.icon,(i=B==null?void 0:B.classNames)===null||i===void 0?void 0:i.icon),ue=Object.assign(Object.assign({},(f==null?void 0:f.icon)||{}),((r=B==null?void 0:B.styles)===null||r===void 0?void 0:r.icon)||{}),Ce=_&&!oe?Z.createElement(Pkt,{prefixCls:H,className:we,style:ue},_):Z.createElement(T3n,{existIcon:!!_,prefixCls:H,loading:oe}),ze=y||y===0?L3n(y,le&&z):null;if(me.href!==void 0)return K(Z.createElement("a",Object.assign({},me,{className:Me(X,{[`${H}-disabled`]:J}),href:J?void 0:me.href,style:re,onClick:Ne,ref:be,tabIndex:J?-1:0}),Ce,ze));let Ye=Z.createElement("button",Object.assign({},T,{type:E,className:X,style:re,onClick:Ne,disabled:J,ref:be}),Ce,ze,!!Te&&Z.createElement(o5n,{key:"compact",prefixCls:H}));return AZ(P)||(Ye=Z.createElement(o6,{component:"Button",disabled:oe},Ye)),K(Ye)}),vn=c5n;vn.Group=k3n;vn.__ANT_BUTTON=!0;vn.displayName="Button";function hxe(t){return!!(t!=null&&t.then)}const Qkt=t=>{const{type:e,children:n,prefixCls:i,buttonProps:r,close:o,autoFocus:s,emitEvent:a,isSilent:l,quitOnNullishReturnValue:c,actionFn:u}=t,d=b.useRef(!1),h=b.useRef(null),[f,m]=k2(!1),p=function(){o==null||o.apply(void 0,arguments)};b.useEffect(()=>{let _=null;return s&&(_=setTimeout(()=>{var w;(w=h.current)===null||w===void 0||w.focus()})),()=>{_&&clearTimeout(_)}},[]);const g=_=>{hxe(_)&&(m(!0),_.then(function(){m(!1,!0),p.apply(void 0,arguments),d.current=!1},w=>{if(m(!1,!0),d.current=!1,!(l!=null&&l()))return Promise.reject(w)}))},y=_=>{if(d.current)return;if(d.current=!0,!u){p();return}let w;if(a){if(w=u(_),c&&!hxe(w)){d.current=!1,p(_);return}}else if(u.length)w=u(o),d.current=!1;else if(w=u(),!hxe(w)){p();return}g(w)};return b.createElement(vn,Object.assign({},Rkt(e),{onClick:y,loading:f,prefixCls:i},r,{ref:h}),n)},FK=Z.createContext({}),{Provider:Jkt}=FK,wtt=()=>{const{autoFocusButton:t,cancelButtonProps:e,cancelTextLocale:n,isSilent:i,mergedOkCancel:r,rootPrefixCls:o,close:s,onCancel:a,onConfirm:l}=b.useContext(FK);return r?Z.createElement(Qkt,{isSilent:i,actionFn:a,close:function(){s==null||s.apply(void 0,arguments),l==null||l(!1)},autoFocus:t==="cancel",buttonProps:e,prefixCls:`${o}-btn`},n):null},Ctt=()=>{const{autoFocusButton:t,close:e,isSilent:n,okButtonProps:i,rootPrefixCls:r,okTextLocale:o,okType:s,onConfirm:a,onOk:l}=b.useContext(FK);return Z.createElement(Qkt,{isSilent:n,type:s||"primary",actionFn:l,close:function(){e==null||e.apply(void 0,arguments),a==null||a(!0)},autoFocus:t==="ok",buttonProps:i,prefixCls:`${r}-btn`},o)};var eMt=b.createContext(null),Stt=[];function u5n(t,e){var n=b.useState(function(){if(!Lu())return null;var m=document.createElement("div");return e&&m.setAttribute("data-debug",e),m}),i=He(n,1),r=i[0],o=b.useRef(!1),s=b.useContext(eMt),a=b.useState(Stt),l=He(a,2),c=l[0],u=l[1],d=s||(o.current?void 0:function(m){u(function(p){var g=[m].concat(Ot(p));return g})});function h(){r.parentElement||document.body.appendChild(r),o.current=!0}function f(){var m;(m=r.parentElement)===null||m===void 0||m.removeChild(r),o.current=!1}return Lr(function(){return t?s?s(h):h():f(),f},[t]),Lr(function(){c.length&&(c.forEach(function(m){return m()}),u(Stt))},[c]),[r,d]}var fxe;function tMt(t){var e="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=e;var i=n.style;i.position="absolute",i.left="0",i.top="0",i.width="100px",i.height="100px",i.overflow="scroll";var r,o;if(t){var s=getComputedStyle(t);i.scrollbarColor=s.scrollbarColor,i.scrollbarWidth=s.scrollbarWidth;var a=getComputedStyle(t,"::-webkit-scrollbar"),l=parseInt(a.width,10),c=parseInt(a.height,10);try{var u=l?"width: ".concat(a.width,";"):"",d=c?"height: ".concat(a.height,";"):"";NC(`
#`.concat(e,`::-webkit-scrollbar {
`).concat(u,`
`).concat(d,`
}`),e)}catch(m){console.error(m),r=l,o=c}}document.body.appendChild(n);var h=t&&r&&!isNaN(r)?r:n.offsetWidth-n.clientWidth,f=t&&o&&!isNaN(o)?o:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),Sz(e),{width:h,height:f}}function Ntt(t){return typeof document>"u"?0:(fxe===void 0&&(fxe=tMt()),fxe.width)}function ODe(t){return typeof document>"u"||!t||!(t instanceof Element)?{width:0,height:0}:tMt(t)}function d5n(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var h5n="rc-util-locker-".concat(Date.now()),Ett=0;function f5n(t){var e=!!t,n=b.useState(function(){return Ett+=1,"".concat(h5n,"_").concat(Ett)}),i=He(n,1),r=i[0];Lr(function(){if(e){var o=ODe(document.body).width,s=d5n();NC(`
html body {
  overflow-y: hidden;
  `.concat(s?"width: calc(100% - ".concat(o,"px);"):"",`
}`),r)}else Sz(r);return function(){Sz(r)}},[e,r])}var m5n=!1;function p5n(t){return m5n}var Dtt=function(e){return e===!1?!1:!Lu()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e},l6=b.forwardRef(function(t,e){var n=t.open,i=t.autoLock,r=t.getContainer,o=t.debug,s=t.autoDestroy,a=s===void 0?!0:s,l=t.children,c=b.useState(n),u=He(c,2),d=u[0],h=u[1],f=d||n;ii(Lu()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),b.useEffect(function(){(a||n)&&h(n)},[n,a]);var m=b.useState(function(){return Dtt(r)}),p=He(m,2),g=p[0],y=p[1];b.useEffect(function(){var R=Dtt(r);y(R??null)});var _=u5n(f&&!g,o),w=He(_,2),C=w[0],N=w[1],E=g??C;f5n(i&&n&&Lu()&&(E===C||E===document.body));var D=null;if(l&&P0(l)&&e){var k=l;D=k.ref}var M=jS(D,e);if(!f||!Lu()||g===void 0)return null;var T=E===!1||p5n(),A=l;return e&&(A=b.cloneElement(l,{ref:M})),b.createElement(eMt.Provider,{value:N},T?A:Fc.createPortal(A,E))});l6.displayName="Portal";var nMt=b.createContext({});function g5n(){var t=Ie({},CF);return t.useId}var ktt=0,Mtt=g5n();const iMt=Mtt?function(e){var n=Mtt();return e||n}:function(e){var n=b.useState("ssr-id"),i=He(n,2),r=i[0],o=i[1];return b.useEffect(function(){var s=ktt;ktt+=1,o("rc_unique_".concat(s))},[]),e||r};function Ltt(t,e,n){var i=e;return!i&&n&&(i="".concat(t,"-").concat(n)),i}function Ttt(t,e){var n=t["page".concat(e?"Y":"X","Offset")],i="scroll".concat(e?"Top":"Left");if(typeof n!="number"){var r=t.document;n=r.documentElement[i],typeof n!="number"&&(n=r.body[i])}return n}function b5n(t){var e=t.getBoundingClientRect(),n={left:e.left,top:e.top},i=t.ownerDocument,r=i.defaultView||i.parentWindow;return n.left+=Ttt(r),n.top+=Ttt(r,!0),n}const v5n=b.memo(function(t){var e=t.children;return e},function(t,e){var n=e.shouldUpdate;return!n});var y5n={width:0,height:0,overflow:"hidden",outline:"none"},_5n={outline:"none"},t6e=Z.forwardRef(function(t,e){var n=t.prefixCls,i=t.className,r=t.style,o=t.title,s=t.ariaId,a=t.footer,l=t.closable,c=t.closeIcon,u=t.onClose,d=t.children,h=t.bodyStyle,f=t.bodyProps,m=t.modalRender,p=t.onMouseDown,g=t.onMouseUp,y=t.holderRef,_=t.visible,w=t.forceRender,C=t.width,N=t.height,E=t.classNames,D=t.styles,k=Z.useContext(nMt),M=k.panel,T=jS(y,M),A=b.useRef(),R=b.useRef();Z.useImperativeHandle(e,function(){return{focus:function(){var q;(q=A.current)===null||q===void 0||q.focus({preventScroll:!0})},changeActive:function(q){var U=document,Y=U.activeElement;q&&Y===R.current?A.current.focus({preventScroll:!0}):!q&&Y===A.current&&R.current.focus({preventScroll:!0})}}});var P={};C!==void 0&&(P.width=C),N!==void 0&&(P.height=N);var O=a?Z.createElement("div",{className:Me("".concat(n,"-footer"),E==null?void 0:E.footer),style:Ie({},D==null?void 0:D.footer)},a):null,V=o?Z.createElement("div",{className:Me("".concat(n,"-header"),E==null?void 0:E.header),style:Ie({},D==null?void 0:D.header)},Z.createElement("div",{className:"".concat(n,"-title"),id:s},o)):null,F=b.useMemo(function(){return Un(l)==="object"&&l!==null?l:l?{closeIcon:c??Z.createElement("span",{className:"".concat(n,"-close-x")})}:{}},[l,c,n]),$=Ll(F,!0),B=Un(l)==="object"&&l.disabled,z=l?Z.createElement("button",lt({type:"button",onClick:u,"aria-label":"Close"},$,{className:"".concat(n,"-close"),disabled:B}),F.closeIcon):null,H=Z.createElement("div",{className:Me("".concat(n,"-content"),E==null?void 0:E.content),style:D==null?void 0:D.content},z,V,Z.createElement("div",lt({className:Me("".concat(n,"-body"),E==null?void 0:E.body),style:Ie(Ie({},h),D==null?void 0:D.body)},f),d),O);return Z.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":o?s:null,"aria-modal":"true",ref:T,style:Ie(Ie({},r),P),className:Me(n,i),onMouseDown:p,onMouseUp:g},Z.createElement("div",{ref:A,tabIndex:0,style:_5n},Z.createElement(v5n,{shouldUpdate:_||w},m?m(H):H)),Z.createElement("div",{tabIndex:0,ref:R,style:y5n}))});t6e.displayName="Panel";var rMt=b.forwardRef(function(t,e){var n=t.prefixCls,i=t.title,r=t.style,o=t.className,s=t.visible,a=t.forceRender,l=t.destroyOnClose,c=t.motionName,u=t.ariaId,d=t.onVisibleChanged,h=t.mousePosition,f=b.useRef(),m=b.useState(),p=He(m,2),g=p[0],y=p[1],_={};g&&(_.transformOrigin=g);function w(){var C=b5n(f.current);y(h&&(h.x||h.y)?"".concat(h.x-C.left,"px ").concat(h.y-C.top,"px"):"")}return b.createElement(Ou,{visible:s,onVisibleChanged:d,onAppearPrepare:w,onEnterPrepare:w,forceRender:a,motionName:c,removeOnLeave:l,ref:f},function(C,N){var E=C.className,D=C.style;return b.createElement(t6e,lt({},t,{ref:e,title:i,ariaId:u,prefixCls:n,holderRef:N,style:Ie(Ie(Ie({},D),r),_),className:Me(o,E)}))})});rMt.displayName="Content";var x5n=function(e){var n=e.prefixCls,i=e.style,r=e.visible,o=e.maskProps,s=e.motionName,a=e.className;return b.createElement(Ou,{key:"mask",visible:r,motionName:s,leavedClassName:"".concat(n,"-mask-hidden")},function(l,c){var u=l.className,d=l.style;return b.createElement("div",lt({ref:c,style:Ie(Ie({},d),i),className:Me("".concat(n,"-mask"),u,a)},o))})},w5n=function(e){var n=e.prefixCls,i=n===void 0?"rc-dialog":n,r=e.zIndex,o=e.visible,s=o===void 0?!1:o,a=e.keyboard,l=a===void 0?!0:a,c=e.focusTriggerAfterClose,u=c===void 0?!0:c,d=e.wrapStyle,h=e.wrapClassName,f=e.wrapProps,m=e.onClose,p=e.afterOpenChange,g=e.afterClose,y=e.transitionName,_=e.animation,w=e.closable,C=w===void 0?!0:w,N=e.mask,E=N===void 0?!0:N,D=e.maskTransitionName,k=e.maskAnimation,M=e.maskClosable,T=M===void 0?!0:M,A=e.maskStyle,R=e.maskProps,P=e.rootClassName,O=e.classNames,V=e.styles;["wrapStyle","bodyStyle","maskStyle"].forEach(function(Ne){I0(!(Ne in e),"".concat(Ne," is deprecated, please use styles instead."))}),"wrapClassName"in e&&I0(!1,"wrapClassName is deprecated, please use classNames instead.");var F=b.useRef(),$=b.useRef(),B=b.useRef(),z=b.useState(s),H=He(z,2),K=H[0],q=H[1],U=iMt();function Y(){vEe($.current,document.activeElement)||(F.current=document.activeElement)}function J(){if(!vEe($.current,document.activeElement)){var Ne;(Ne=B.current)===null||Ne===void 0||Ne.focus()}}function ae(Ne){if(Ne)J();else{if(q(!1),E&&F.current&&u){try{F.current.focus({preventScroll:!0})}catch{}F.current=null}K&&(g==null||g())}p==null||p(Ne)}function se(Ne){m==null||m(Ne)}var oe=b.useRef(!1),fe=b.useRef(),de=function(){clearTimeout(fe.current),oe.current=!0},ie=function(){fe.current=setTimeout(function(){oe.current=!1})},Q=null;T&&(Q=function(Le){oe.current?oe.current=!1:$.current===Le.target&&se(Le)});function be(Ne){if(l&&Ne.keyCode===Wt.ESC){Ne.stopPropagation(),se(Ne);return}s&&Ne.keyCode===Wt.TAB&&B.current.changeActive(!Ne.shiftKey)}b.useEffect(function(){s&&(q(!0),Y())},[s]),b.useEffect(function(){return function(){clearTimeout(fe.current)}},[]);var le=Ie(Ie(Ie({zIndex:r},d),V==null?void 0:V.wrapper),{},{display:K?null:"none"});return b.createElement("div",lt({className:Me("".concat(i,"-root"),P)},Ll(e,{data:!0})),b.createElement(x5n,{prefixCls:i,visible:E&&s,motionName:Ltt(i,D,k),style:Ie(Ie({zIndex:r},A),V==null?void 0:V.mask),maskProps:R,className:O==null?void 0:O.mask}),b.createElement("div",lt({tabIndex:-1,onKeyDown:be,className:Me("".concat(i,"-wrap"),h,O==null?void 0:O.wrapper),ref:$,onClick:Q,style:le},f),b.createElement(rMt,lt({},e,{onMouseDown:de,onMouseUp:ie,ref:B,closable:C,ariaId:U,prefixCls:i,visible:s&&K,onClose:se,onVisibleChanged:ae,motionName:Ltt(i,y,_)}))))},n6e=function(e){var n=e.visible,i=e.getContainer,r=e.forceRender,o=e.destroyOnClose,s=o===void 0?!1:o,a=e.afterClose,l=e.panelRef,c=b.useState(n),u=He(c,2),d=u[0],h=u[1],f=b.useMemo(function(){return{panel:l}},[l]);return b.useEffect(function(){n&&h(!0)},[n]),!r&&s&&!d?null:b.createElement(nMt.Provider,{value:f},b.createElement(l6,{open:n||r||d,autoDestroy:!1,getContainer:i,autoLock:n||d},b.createElement(w5n,lt({},e,{destroyOnClose:s,afterClose:function(){a==null||a(),h(!1)}}))))};n6e.displayName="Dialog";var IT="RC_FORM_INTERNAL_HOOKS",Ba=function(){ii(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},M2=b.createContext({getFieldValue:Ba,getFieldsValue:Ba,getFieldError:Ba,getFieldWarning:Ba,getFieldsError:Ba,isFieldsTouched:Ba,isFieldTouched:Ba,isFieldValidating:Ba,isFieldsValidating:Ba,resetFields:Ba,setFields:Ba,setFieldValue:Ba,setFieldsValue:Ba,validateFields:Ba,submit:Ba,getInternalHooks:function(){return Ba(),{dispatch:Ba,initEntityValue:Ba,registerField:Ba,useSubscribe:Ba,setInitialValues:Ba,destroyForm:Ba,setCallbacks:Ba,registerWatch:Ba,getFields:Ba,setValidateMessages:Ba,setPreserve:Ba,getInitialValue:Ba}}}),zz=b.createContext(null);function jDe(t){return t==null?[]:Array.isArray(t)?t:[t]}function C5n(t){return t&&!!t._init}function FDe(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var $De=FDe();function S5n(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function N5n(t,e,n){if(Que())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,e);var r=new(t.bind.apply(t,i));return n&&Lj(r,n.prototype),r}function VDe(t){var e=typeof Map=="function"?new Map:void 0;return VDe=function(i){if(i===null||!S5n(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(i))return e.get(i);e.set(i,r)}function r(){return N5n(i,arguments,N2(this).constructor)}return r.prototype=Object.create(i.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Lj(r,i)},VDe(t)}var E5n={},D5n=/%[sdj%]/g,oMt=function(){};typeof process<"u"&&E5n&&typeof window<"u"&&typeof document<"u"&&(oMt=function(e,n){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&n.every(function(i){return typeof i=="string"})&&console.warn(e,n)});function BDe(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var i=n.field;e[i]=e[i]||[],e[i].push(n)}),e}function Ug(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];var r=0,o=n.length;if(typeof t=="function")return t.apply(null,n);if(typeof t=="string"){var s=t.replace(D5n,function(a){if(a==="%%")return"%";if(r>=o)return a;switch(a){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}break;default:return a}});return s}return t}function k5n(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function vd(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||k5n(e)&&typeof t=="string"&&!t)}function M5n(t,e,n){var i=[],r=0,o=t.length;function s(a){i.push.apply(i,Ot(a||[])),r++,r===o&&n(i)}t.forEach(function(a){e(a,s)})}function Itt(t,e,n){var i=0,r=t.length;function o(s){if(s&&s.length){n(s);return}var a=i;i=i+1,a<r?e(t[a],o):n([])}o([])}function L5n(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,Ot(t[n]||[]))}),e}var Att=function(t){Zp(n,t);var e=pb(n);function n(i,r){var o;return Za(this,n),o=e.call(this,"Async Validation Error"),ye(bn(o),"errors",void 0),ye(bn(o),"fields",void 0),o.errors=i,o.fields=r,o}return Qa(n)}(VDe(Error));function T5n(t,e,n,i,r){if(e.first){var o=new Promise(function(h,f){var m=function(y){return i(y),y.length?f(new Att(y,BDe(y))):h(r)},p=L5n(t);Itt(p,n,m)});return o.catch(function(h){return h}),o}var s=e.firstFields===!0?Object.keys(t):e.firstFields||[],a=Object.keys(t),l=a.length,c=0,u=[],d=new Promise(function(h,f){var m=function(g){if(u.push.apply(u,g),c++,c===l)return i(u),u.length?f(new Att(u,BDe(u))):h(r)};a.length||(i(u),h(r)),a.forEach(function(p){var g=t[p];s.indexOf(p)!==-1?Itt(g,n,m):M5n(g,n,m)})});return d.catch(function(h){return h}),d}function I5n(t){return!!(t&&t.message!==void 0)}function A5n(t,e){for(var n=t,i=0;i<e.length;i++){if(n==null)return n;n=n[e[i]]}return n}function Rtt(t,e){return function(n){var i;return t.fullFields?i=A5n(e,t.fullFields):i=e[n.field||t.fullField],I5n(n)?(n.field=n.field||t.fullField,n.fieldValue=i,n):{message:typeof n=="function"?n():n,fieldValue:i,field:n.field||t.fullField}}}function Ptt(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];Un(i)==="object"&&Un(t[n])==="object"?t[n]=Ie(Ie({},t[n]),i):t[n]=i}}return t}var PP="enum",R5n=function(e,n,i,r,o){e[PP]=Array.isArray(e[PP])?e[PP]:[],e[PP].indexOf(n)===-1&&r.push(Ug(o.messages[PP],e.fullField,e[PP].join(", ")))},P5n=function(e,n,i,r,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||r.push(Ug(o.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var s=new RegExp(e.pattern);s.test(n)||r.push(Ug(o.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},O5n=function(e,n,i,r,o){var s=typeof e.len=="number",a=typeof e.min=="number",l=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,h=typeof n=="number",f=typeof n=="string",m=Array.isArray(n);if(h?d="number":f?d="string":m&&(d="array"),!d)return!1;m&&(u=n.length),f&&(u=n.replace(c,"_").length),s?u!==e.len&&r.push(Ug(o.messages[d].len,e.fullField,e.len)):a&&!l&&u<e.min?r.push(Ug(o.messages[d].min,e.fullField,e.min)):l&&!a&&u>e.max?r.push(Ug(o.messages[d].max,e.fullField,e.max)):a&&l&&(u<e.min||u>e.max)&&r.push(Ug(o.messages[d].range,e.fullField,e.min,e.max))},sMt=function(e,n,i,r,o,s){e.required&&(!i.hasOwnProperty(e.field)||vd(n,s||e.type))&&r.push(Ug(o.messages.required,e.fullField))},RZ;const j5n=function(){if(RZ)return RZ;var t="[a-fA-F\\d:]",e=function(E){return E&&E.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(t,")|(?<=").concat(t,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",i="[a-fA-F\\d]{1,4}",r=["(?:".concat(i,":){7}(?:").concat(i,"|:)"),"(?:".concat(i,":){6}(?:").concat(n,"|:").concat(i,"|:)"),"(?:".concat(i,":){5}(?::").concat(n,"|(?::").concat(i,"){1,2}|:)"),"(?:".concat(i,":){4}(?:(?::").concat(i,"){0,1}:").concat(n,"|(?::").concat(i,"){1,3}|:)"),"(?:".concat(i,":){3}(?:(?::").concat(i,"){0,2}:").concat(n,"|(?::").concat(i,"){1,4}|:)"),"(?:".concat(i,":){2}(?:(?::").concat(i,"){0,3}:").concat(n,"|(?::").concat(i,"){1,5}|:)"),"(?:".concat(i,":){1}(?:(?::").concat(i,"){0,4}:").concat(n,"|(?::").concat(i,"){1,6}|:)"),"(?::(?:(?::".concat(i,"){0,5}:").concat(n,"|(?::").concat(i,"){1,7}|:))")],o="(?:%[0-9a-zA-Z]{1,})?",s="(?:".concat(r.join("|"),")").concat(o),a=new RegExp("(?:^".concat(n,"$)|(?:^").concat(s,"$)")),l=new RegExp("^".concat(n,"$")),c=new RegExp("^".concat(s,"$")),u=function(E){return E&&E.exact?a:new RegExp("(?:".concat(e(E)).concat(n).concat(e(E),")|(?:").concat(e(E)).concat(s).concat(e(E),")"),"g")};u.v4=function(N){return N&&N.exact?l:new RegExp("".concat(e(N)).concat(n).concat(e(N)),"g")},u.v6=function(N){return N&&N.exact?c:new RegExp("".concat(e(N)).concat(s).concat(e(N)),"g")};var d="(?:(?:[a-z]+:)?//)",h="(?:\\S+(?::\\S*)?@)?",f=u.v4().source,m=u.v6().source,p="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",g="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",y="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",_="(?::\\d{2,5})?",w='(?:[/?#][^\\s"]*)?',C="(?:".concat(d,"|www\\.)").concat(h,"(?:localhost|").concat(f,"|").concat(m,"|").concat(p).concat(g).concat(y,")").concat(_).concat(w);return RZ=new RegExp("(?:^".concat(C,"$)"),"i"),RZ};var Ott={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},$7={integer:function(e){return $7.number(e)&&parseInt(e,10)===e},float:function(e){return $7.number(e)&&!$7.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return Un(e)==="object"&&!$7.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(Ott.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(j5n())},hex:function(e){return typeof e=="string"&&!!e.match(Ott.hex)}},F5n=function(e,n,i,r,o){if(e.required&&n===void 0){sMt(e,n,i,r,o);return}var s=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=e.type;s.indexOf(a)>-1?$7[a](n)||r.push(Ug(o.messages.types[a],e.fullField,e.type)):a&&Un(n)!==e.type&&r.push(Ug(o.messages.types[a],e.fullField,e.type))},$5n=function(e,n,i,r,o){(/^\s+$/.test(n)||n==="")&&r.push(Ug(o.messages.whitespace,e.fullField))};const fs={required:sMt,whitespace:$5n,type:F5n,range:O5n,enum:R5n,pattern:P5n};var V5n=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(vd(n)&&!e.required)return i();fs.required(e,n,r,s,o)}i(s)},B5n=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(n==null&&!e.required)return i();fs.required(e,n,r,s,o,"array"),n!=null&&(fs.type(e,n,r,s,o),fs.range(e,n,r,s,o))}i(s)},z5n=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(vd(n)&&!e.required)return i();fs.required(e,n,r,s,o),n!==void 0&&fs.type(e,n,r,s,o)}i(s)},H5n=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(vd(n,"date")&&!e.required)return i();if(fs.required(e,n,r,s,o),!vd(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),fs.type(e,l,r,s,o),l&&fs.range(e,l.getTime(),r,s,o)}}i(s)},W5n="enum",U5n=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(vd(n)&&!e.required)return i();fs.required(e,n,r,s,o),n!==void 0&&fs[W5n](e,n,r,s,o)}i(s)},K5n=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(vd(n)&&!e.required)return i();fs.required(e,n,r,s,o),n!==void 0&&(fs.type(e,n,r,s,o),fs.range(e,n,r,s,o))}i(s)},q5n=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(vd(n)&&!e.required)return i();fs.required(e,n,r,s,o),n!==void 0&&(fs.type(e,n,r,s,o),fs.range(e,n,r,s,o))}i(s)},G5n=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(vd(n)&&!e.required)return i();fs.required(e,n,r,s,o),n!==void 0&&fs.type(e,n,r,s,o)}i(s)},Y5n=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(n===""&&(n=void 0),vd(n)&&!e.required)return i();fs.required(e,n,r,s,o),n!==void 0&&(fs.type(e,n,r,s,o),fs.range(e,n,r,s,o))}i(s)},X5n=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(vd(n)&&!e.required)return i();fs.required(e,n,r,s,o),n!==void 0&&fs.type(e,n,r,s,o)}i(s)},Z5n=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(vd(n,"string")&&!e.required)return i();fs.required(e,n,r,s,o),vd(n,"string")||fs.pattern(e,n,r,s,o)}i(s)},Q5n=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(vd(n)&&!e.required)return i();fs.required(e,n,r,s,o),vd(n)||fs.type(e,n,r,s,o)}i(s)},J5n=function(e,n,i,r,o){var s=[],a=Array.isArray(n)?"array":Un(n);fs.required(e,n,r,s,o,a),i(s)},eFn=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(vd(n,"string")&&!e.required)return i();fs.required(e,n,r,s,o,"string"),vd(n,"string")||(fs.type(e,n,r,s,o),fs.range(e,n,r,s,o),fs.pattern(e,n,r,s,o),e.whitespace===!0&&fs.whitespace(e,n,r,s,o))}i(s)},mxe=function(e,n,i,r,o){var s=e.type,a=[],l=e.required||!e.required&&r.hasOwnProperty(e.field);if(l){if(vd(n,s)&&!e.required)return i();fs.required(e,n,r,a,o,s),vd(n,s)||fs.type(e,n,r,a,o)}i(a)};const T9={string:eFn,method:G5n,number:Y5n,boolean:z5n,regexp:Q5n,integer:q5n,float:K5n,array:B5n,object:X5n,enum:U5n,pattern:Z5n,date:H5n,url:mxe,hex:mxe,email:mxe,required:J5n,any:V5n};var $K=function(){function t(e){Za(this,t),ye(this,"rules",null),ye(this,"_messages",$De),this.define(e)}return Qa(t,[{key:"define",value:function(n){var i=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(Un(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(r){var o=n[r];i.rules[r]=Array.isArray(o)?o:[o]})}},{key:"messages",value:function(n){return n&&(this._messages=Ptt(FDe(),n)),this._messages}},{key:"validate",value:function(n){var i=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},s=n,a=r,l=o;if(typeof a=="function"&&(l=a,a={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,s),Promise.resolve(s);function c(m){var p=[],g={};function y(w){if(Array.isArray(w)){var C;p=(C=p).concat.apply(C,Ot(w))}else p.push(w)}for(var _=0;_<m.length;_++)y(m[_]);p.length?(g=BDe(p),l(p,g)):l(null,s)}if(a.messages){var u=this.messages();u===$De&&(u=FDe()),Ptt(u,a.messages),a.messages=u}else a.messages=this.messages();var d={},h=a.keys||Object.keys(this.rules);h.forEach(function(m){var p=i.rules[m],g=s[m];p.forEach(function(y){var _=y;typeof _.transform=="function"&&(s===n&&(s=Ie({},s)),g=s[m]=_.transform(g),g!=null&&(_.type=_.type||(Array.isArray(g)?"array":Un(g)))),typeof _=="function"?_={validator:_}:_=Ie({},_),_.validator=i.getValidationMethod(_),_.validator&&(_.field=m,_.fullField=_.fullField||m,_.type=i.getType(_),d[m]=d[m]||[],d[m].push({rule:_,value:g,source:s,field:m}))})});var f={};return T5n(d,a,function(m,p){var g=m.rule,y=(g.type==="object"||g.type==="array")&&(Un(g.fields)==="object"||Un(g.defaultField)==="object");y=y&&(g.required||!g.required&&m.value),g.field=m.field;function _(D,k){return Ie(Ie({},k),{},{fullField:"".concat(g.fullField,".").concat(D),fullFields:g.fullFields?[].concat(Ot(g.fullFields),[D]):[D]})}function w(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],k=Array.isArray(D)?D:[D];!a.suppressWarning&&k.length&&t.warning("async-validator:",k),k.length&&g.message!==void 0&&(k=[].concat(g.message));var M=k.map(Rtt(g,s));if(a.first&&M.length)return f[g.field]=1,p(M);if(!y)p(M);else{if(g.required&&!m.value)return g.message!==void 0?M=[].concat(g.message).map(Rtt(g,s)):a.error&&(M=[a.error(g,Ug(a.messages.required,g.field))]),p(M);var T={};g.defaultField&&Object.keys(m.value).map(function(P){T[P]=g.defaultField}),T=Ie(Ie({},T),m.rule.fields);var A={};Object.keys(T).forEach(function(P){var O=T[P],V=Array.isArray(O)?O:[O];A[P]=V.map(_.bind(null,P))});var R=new t(A);R.messages(a.messages),m.rule.options&&(m.rule.options.messages=a.messages,m.rule.options.error=a.error),R.validate(m.value,m.rule.options||a,function(P){var O=[];M&&M.length&&O.push.apply(O,Ot(M)),P&&P.length&&O.push.apply(O,Ot(P)),p(O.length?O:null)})}}var C;if(g.asyncValidator)C=g.asyncValidator(g,m.value,w,m.source,a);else if(g.validator){try{C=g.validator(g,m.value,w,m.source,a)}catch(D){var N,E;(N=(E=console).error)===null||N===void 0||N.call(E,D),a.suppressValidatorError||setTimeout(function(){throw D},0),w(D.message)}C===!0?w():C===!1?w(typeof g.message=="function"?g.message(g.fullField||g.field):g.message||"".concat(g.fullField||g.field," fails")):C instanceof Array?w(C):C instanceof Error&&w(C.message)}C&&C.then&&C.then(function(){return w()},function(D){return w(D)})},function(m){c(m)},s)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!T9.hasOwnProperty(n.type))throw new Error(Ug("Unknown rule type %s",n.type));return n.type||"string"}},{key:"getValidationMethod",value:function(n){if(typeof n.validator=="function")return n.validator;var i=Object.keys(n),r=i.indexOf("message");return r!==-1&&i.splice(r,1),i.length===1&&i[0]==="required"?T9.required:T9[this.getType(n)]||void 0}}]),t}();ye($K,"register",function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");T9[e]=n});ye($K,"warning",oMt);ye($K,"messages",$De);ye($K,"validators",T9);var bg="'${name}' is not a valid ${type}",aMt={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:bg,method:bg,array:bg,object:bg,number:bg,date:bg,boolean:bg,integer:bg,float:bg,regexp:bg,email:bg,url:bg,hex:bg},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},jtt=$K;function tFn(t,e){return t.replace(/\\?\$\{\w+\}/g,function(n){if(n.startsWith("\\"))return n.slice(1);var i=n.slice(2,-1);return e[i]})}var Ftt="CODE_LOGIC_ERROR";function zDe(t,e,n,i,r){return HDe.apply(this,arguments)}function HDe(){return HDe=Hg(ll().mark(function t(e,n,i,r,o){var s,a,l,c,u,d,h,f,m;return ll().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return s=Ie({},i),delete s.ruleIndex,jtt.warning=function(){},s.validator&&(a=s.validator,s.validator=function(){try{return a.apply(void 0,arguments)}catch(y){return console.error(y),Promise.reject(Ftt)}}),l=null,s&&s.type==="array"&&s.defaultField&&(l=s.defaultField,delete s.defaultField),c=new jtt(ye({},e,[s])),u=ZO(aMt,r.validateMessages),c.messages(u),d=[],g.prev=10,g.next=13,Promise.resolve(c.validate(ye({},e,n),Ie({},r)));case 13:g.next=18;break;case 15:g.prev=15,g.t0=g.catch(10),g.t0.errors&&(d=g.t0.errors.map(function(y,_){var w=y.message,C=w===Ftt?u.default:w;return b.isValidElement(C)?b.cloneElement(C,{key:"error_".concat(_)}):C}));case 18:if(!(!d.length&&l)){g.next=23;break}return g.next=21,Promise.all(n.map(function(y,_){return zDe("".concat(e,".").concat(_),y,l,r,o)}));case 21:return h=g.sent,g.abrupt("return",h.reduce(function(y,_){return[].concat(Ot(y),Ot(_))},[]));case 23:return f=Ie(Ie({},i),{},{name:e,enum:(i.enum||[]).join(", ")},o),m=d.map(function(y){return typeof y=="string"?tFn(y,f):y}),g.abrupt("return",m);case 26:case"end":return g.stop()}},t,null,[[10,15]])})),HDe.apply(this,arguments)}function nFn(t,e,n,i,r,o){var s=t.join("."),a=n.map(function(u,d){var h=u.validator,f=Ie(Ie({},u),{},{ruleIndex:d});return h&&(f.validator=function(m,p,g){var y=!1,_=function(){for(var N=arguments.length,E=new Array(N),D=0;D<N;D++)E[D]=arguments[D];Promise.resolve().then(function(){ii(!y,"Your validator function has already return a promise. `callback` will be ignored."),y||g.apply(void 0,E)})},w=h(m,p,_);y=w&&typeof w.then=="function"&&typeof w.catch=="function",ii(y,"`callback` is deprecated. Please return a promise instead."),y&&w.then(function(){g()}).catch(function(C){g(C||" ")})}),f}).sort(function(u,d){var h=u.warningOnly,f=u.ruleIndex,m=d.warningOnly,p=d.ruleIndex;return!!h==!!m?f-p:h?1:-1}),l;if(r===!0)l=new Promise(function(){var u=Hg(ll().mark(function d(h,f){var m,p,g;return ll().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:m=0;case 1:if(!(m<a.length)){_.next=12;break}return p=a[m],_.next=5,zDe(s,e,p,i,o);case 5:if(g=_.sent,!g.length){_.next=9;break}return f([{errors:g,rule:p}]),_.abrupt("return");case 9:m+=1,_.next=1;break;case 12:h([]);case 13:case"end":return _.stop()}},d)}));return function(d,h){return u.apply(this,arguments)}}());else{var c=a.map(function(u){return zDe(s,e,u,i,o).then(function(d){return{errors:d,rule:u}})});l=(r?rFn(c):iFn(c)).then(function(u){return Promise.reject(u)})}return l.catch(function(u){return u}),l}function iFn(t){return WDe.apply(this,arguments)}function WDe(){return WDe=Hg(ll().mark(function t(e){return ll().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",Promise.all(e).then(function(r){var o,s=(o=[]).concat.apply(o,Ot(r));return s}));case 1:case"end":return i.stop()}},t)})),WDe.apply(this,arguments)}function rFn(t){return UDe.apply(this,arguments)}function UDe(){return UDe=Hg(ll().mark(function t(e){var n;return ll().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n=0,r.abrupt("return",new Promise(function(o){e.forEach(function(s){s.then(function(a){a.errors.length&&o([a]),n+=1,n===e.length&&o([])})})}));case 2:case"end":return r.stop()}},t)})),UDe.apply(this,arguments)}function Yc(t){return jDe(t)}function $tt(t,e){var n={};return e.forEach(function(i){var r=zg(t,i);n=jy(n,i,r)}),n}function u3(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return t&&t.some(function(i){return lMt(e,i,n)})}function lMt(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!t||!e||!n&&t.length!==e.length?!1:e.every(function(i,r){return t[r]===i})}function oFn(t,e){if(t===e)return!0;if(!t&&e||t&&!e||!t||!e||Un(t)!=="object"||Un(e)!=="object")return!1;var n=Object.keys(t),i=Object.keys(e),r=new Set([].concat(n,i));return Ot(r).every(function(o){var s=t[o],a=e[o];return typeof s=="function"&&typeof a=="function"?!0:s===a})}function sFn(t){var e=arguments.length<=1?void 0:arguments[1];return e&&e.target&&Un(e.target)==="object"&&t in e.target?e.target[t]:e}function Vtt(t,e,n){var i=t.length;if(e<0||e>=i||n<0||n>=i)return t;var r=t[e],o=e-n;return o>0?[].concat(Ot(t.slice(0,n)),[r],Ot(t.slice(n,e)),Ot(t.slice(e+1,i))):o<0?[].concat(Ot(t.slice(0,e)),Ot(t.slice(e+1,n+1)),[r],Ot(t.slice(n+1,i))):t}var aFn=["name"],Rb=[];function pxe(t,e,n,i,r,o){return typeof t=="function"?t(e,n,"source"in o?{source:o.source}:{}):i!==r}var i6e=function(t){Zp(n,t);var e=pb(n);function n(i){var r;if(Za(this,n),r=e.call(this,i),ye(bn(r),"state",{resetCount:0}),ye(bn(r),"cancelRegisterFunc",null),ye(bn(r),"mounted",!1),ye(bn(r),"touched",!1),ye(bn(r),"dirty",!1),ye(bn(r),"validatePromise",void 0),ye(bn(r),"prevValidating",void 0),ye(bn(r),"errors",Rb),ye(bn(r),"warnings",Rb),ye(bn(r),"cancelRegister",function(){var l=r.props,c=l.preserve,u=l.isListField,d=l.name;r.cancelRegisterFunc&&r.cancelRegisterFunc(u,c,Yc(d)),r.cancelRegisterFunc=null}),ye(bn(r),"getNamePath",function(){var l=r.props,c=l.name,u=l.fieldContext,d=u.prefixName,h=d===void 0?[]:d;return c!==void 0?[].concat(Ot(h),Ot(c)):[]}),ye(bn(r),"getRules",function(){var l=r.props,c=l.rules,u=c===void 0?[]:c,d=l.fieldContext;return u.map(function(h){return typeof h=="function"?h(d):h})}),ye(bn(r),"refresh",function(){r.mounted&&r.setState(function(l){var c=l.resetCount;return{resetCount:c+1}})}),ye(bn(r),"metaCache",null),ye(bn(r),"triggerMetaEvent",function(l){var c=r.props.onMetaChange;if(c){var u=Ie(Ie({},r.getMeta()),{},{destroy:l});jp(r.metaCache,u)||c(u),r.metaCache=u}else r.metaCache=null}),ye(bn(r),"onStoreChange",function(l,c,u){var d=r.props,h=d.shouldUpdate,f=d.dependencies,m=f===void 0?[]:f,p=d.onReset,g=u.store,y=r.getNamePath(),_=r.getValue(l),w=r.getValue(g),C=c&&u3(c,y);switch(u.type==="valueUpdate"&&u.source==="external"&&!jp(_,w)&&(r.touched=!0,r.dirty=!0,r.validatePromise=null,r.errors=Rb,r.warnings=Rb,r.triggerMetaEvent()),u.type){case"reset":if(!c||C){r.touched=!1,r.dirty=!1,r.validatePromise=void 0,r.errors=Rb,r.warnings=Rb,r.triggerMetaEvent(),p==null||p(),r.refresh();return}break;case"remove":{if(h&&pxe(h,l,g,_,w,u)){r.reRender();return}break}case"setField":{var N=u.data;if(C){"touched"in N&&(r.touched=N.touched),"validating"in N&&!("originRCField"in N)&&(r.validatePromise=N.validating?Promise.resolve([]):null),"errors"in N&&(r.errors=N.errors||Rb),"warnings"in N&&(r.warnings=N.warnings||Rb),r.dirty=!0,r.triggerMetaEvent(),r.reRender();return}else if("value"in N&&u3(c,y,!0)){r.reRender();return}if(h&&!y.length&&pxe(h,l,g,_,w,u)){r.reRender();return}break}case"dependenciesUpdate":{var E=m.map(Yc);if(E.some(function(D){return u3(u.relatedFields,D)})){r.reRender();return}break}default:if(C||(!m.length||y.length||h)&&pxe(h,l,g,_,w,u)){r.reRender();return}break}h===!0&&r.reRender()}),ye(bn(r),"validateRules",function(l){var c=r.getNamePath(),u=r.getValue(),d=l||{},h=d.triggerName,f=d.validateOnly,m=f===void 0?!1:f,p=Promise.resolve().then(Hg(ll().mark(function g(){var y,_,w,C,N,E,D;return ll().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(r.mounted){M.next=2;break}return M.abrupt("return",[]);case 2:if(y=r.props,_=y.validateFirst,w=_===void 0?!1:_,C=y.messageVariables,N=y.validateDebounce,E=r.getRules(),h&&(E=E.filter(function(T){return T}).filter(function(T){var A=T.validateTrigger;if(!A)return!0;var R=jDe(A);return R.includes(h)})),!(N&&h)){M.next=10;break}return M.next=8,new Promise(function(T){setTimeout(T,N)});case 8:if(r.validatePromise===p){M.next=10;break}return M.abrupt("return",[]);case 10:return D=nFn(c,u,E,l,w,C),D.catch(function(T){return T}).then(function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Rb;if(r.validatePromise===p){var A;r.validatePromise=null;var R=[],P=[];(A=T.forEach)===null||A===void 0||A.call(T,function(O){var V=O.rule.warningOnly,F=O.errors,$=F===void 0?Rb:F;V?P.push.apply(P,Ot($)):R.push.apply(R,Ot($))}),r.errors=R,r.warnings=P,r.triggerMetaEvent(),r.reRender()}}),M.abrupt("return",D);case 13:case"end":return M.stop()}},g)})));return m||(r.validatePromise=p,r.dirty=!0,r.errors=Rb,r.warnings=Rb,r.triggerMetaEvent(),r.reRender()),p}),ye(bn(r),"isFieldValidating",function(){return!!r.validatePromise}),ye(bn(r),"isFieldTouched",function(){return r.touched}),ye(bn(r),"isFieldDirty",function(){if(r.dirty||r.props.initialValue!==void 0)return!0;var l=r.props.fieldContext,c=l.getInternalHooks(IT),u=c.getInitialValue;return u(r.getNamePath())!==void 0}),ye(bn(r),"getErrors",function(){return r.errors}),ye(bn(r),"getWarnings",function(){return r.warnings}),ye(bn(r),"isListField",function(){return r.props.isListField}),ye(bn(r),"isList",function(){return r.props.isList}),ye(bn(r),"isPreserve",function(){return r.props.preserve}),ye(bn(r),"getMeta",function(){r.prevValidating=r.isFieldValidating();var l={touched:r.isFieldTouched(),validating:r.prevValidating,errors:r.errors,warnings:r.warnings,name:r.getNamePath(),validated:r.validatePromise===null};return l}),ye(bn(r),"getOnlyChild",function(l){if(typeof l=="function"){var c=r.getMeta();return Ie(Ie({},r.getOnlyChild(l(r.getControlled(),c,r.props.fieldContext))),{},{isFunction:!0})}var u=fc(l);return u.length!==1||!b.isValidElement(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),ye(bn(r),"getValue",function(l){var c=r.props.fieldContext.getFieldsValue,u=r.getNamePath();return zg(l||c(!0),u)}),ye(bn(r),"getControlled",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=r.props,u=c.name,d=c.trigger,h=c.validateTrigger,f=c.getValueFromEvent,m=c.normalize,p=c.valuePropName,g=c.getValueProps,y=c.fieldContext,_=h!==void 0?h:y.validateTrigger,w=r.getNamePath(),C=y.getInternalHooks,N=y.getFieldsValue,E=C(IT),D=E.dispatch,k=r.getValue(),M=g||function(O){return ye({},p,O)},T=l[d],A=u!==void 0?M(k):{};A&&Object.keys(A).forEach(function(O){ii(typeof A[O]!="function","It's not recommended to generate dynamic function prop by `getValueProps`. Please pass it to child component directly (prop: ".concat(O,")"))});var R=Ie(Ie({},l),A);R[d]=function(){r.touched=!0,r.dirty=!0,r.triggerMetaEvent();for(var O,V=arguments.length,F=new Array(V),$=0;$<V;$++)F[$]=arguments[$];f?O=f.apply(void 0,F):O=sFn.apply(void 0,[p].concat(F)),m&&(O=m(O,k,N(!0))),D({type:"updateValue",namePath:w,value:O}),T&&T.apply(void 0,F)};var P=jDe(_||[]);return P.forEach(function(O){var V=R[O];R[O]=function(){V&&V.apply(void 0,arguments);var F=r.props.rules;F&&F.length&&D({type:"validateField",namePath:w,triggerName:O})}}),R}),i.fieldContext){var o=i.fieldContext.getInternalHooks,s=o(IT),a=s.initEntityValue;a(bn(r))}return r}return Qa(n,[{key:"componentDidMount",value:function(){var r=this.props,o=r.shouldUpdate,s=r.fieldContext;if(this.mounted=!0,s){var a=s.getInternalHooks,l=a(IT),c=l.registerField;this.cancelRegisterFunc=c(this)}o===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var r=this.state.resetCount,o=this.props.children,s=this.getOnlyChild(o),a=s.child,l=s.isFunction,c;return l?c=a:b.isValidElement(a)?c=b.cloneElement(a,this.getControlled(a.props)):(ii(!a,"`children` of Field is not validate ReactElement."),c=a),b.createElement(b.Fragment,{key:r},c)}}]),n}(b.Component);ye(i6e,"contextType",M2);ye(i6e,"defaultProps",{trigger:"onChange",valuePropName:"value"});function r6e(t){var e=t.name,n=di(t,aFn),i=b.useContext(M2),r=b.useContext(zz),o=e!==void 0?Yc(e):void 0,s="keep";return n.isListField||(s="_".concat((o||[]).join("_"))),n.preserve===!1&&n.isListField&&o.length<=1&&ii(!1,"`preserve` should not apply on Form.List fields."),b.createElement(i6e,lt({key:s,name:o,isListField:!!r},n,{fieldContext:i}))}function cMt(t){var e=t.name,n=t.initialValue,i=t.children,r=t.rules,o=t.validateTrigger,s=t.isListField,a=b.useContext(M2),l=b.useContext(zz),c=b.useRef({keys:[],id:0}),u=c.current,d=b.useMemo(function(){var p=Yc(a.prefixName)||[];return[].concat(Ot(p),Ot(Yc(e)))},[a.prefixName,e]),h=b.useMemo(function(){return Ie(Ie({},a),{},{prefixName:d})},[a,d]),f=b.useMemo(function(){return{getKey:function(g){var y=d.length,_=g[y];return[u.keys[_],g.slice(y+1)]}}},[d]);if(typeof i!="function")return ii(!1,"Form.List only accepts function as children."),null;var m=function(g,y,_){var w=_.source;return w==="internal"?!1:g!==y};return b.createElement(zz.Provider,{value:f},b.createElement(M2.Provider,{value:h},b.createElement(r6e,{name:[],shouldUpdate:m,rules:r,validateTrigger:o,initialValue:n,isList:!0,isListField:s??!!l},function(p,g){var y=p.value,_=y===void 0?[]:y,w=p.onChange,C=a.getFieldValue,N=function(){var M=C(d||[]);return M||[]},E={add:function(M,T){var A=N();T>=0&&T<=A.length?(u.keys=[].concat(Ot(u.keys.slice(0,T)),[u.id],Ot(u.keys.slice(T))),w([].concat(Ot(A.slice(0,T)),[M],Ot(A.slice(T))))):((T<0||T>A.length)&&ii(!1,"The second parameter of the add function should be a valid positive number."),u.keys=[].concat(Ot(u.keys),[u.id]),w([].concat(Ot(A),[M]))),u.id+=1},remove:function(M){var T=N(),A=new Set(Array.isArray(M)?M:[M]);A.size<=0||(u.keys=u.keys.filter(function(R,P){return!A.has(P)}),w(T.filter(function(R,P){return!A.has(P)})))},move:function(M,T){if(M!==T){var A=N();M<0||M>=A.length||T<0||T>=A.length||(u.keys=Vtt(u.keys,M,T),w(Vtt(A,M,T)))}}},D=_||[];return Array.isArray(D)||(D=[],ii(!1,"Current value of '".concat(d.join(" > "),"' is not an array type."))),i(D.map(function(k,M){var T=u.keys[M];return T===void 0&&(u.keys[M]=u.id,T=u.keys[M],u.id+=1),{name:M,key:T,isListField:!0}}),E,g)})))}function lFn(t){var e=!1,n=t.length,i=[];return t.length?new Promise(function(r,o){t.forEach(function(s,a){s.catch(function(l){return e=!0,l}).then(function(l){n-=1,i[a]=l,!(n>0)&&(e&&o(i),r(i))})})}):Promise.resolve([])}var uMt="__@field_split__";function gxe(t){return t.map(function(e){return"".concat(Un(e),":").concat(e)}).join(uMt)}var OP=function(){function t(){Za(this,t),ye(this,"kvs",new Map)}return Qa(t,[{key:"set",value:function(n,i){this.kvs.set(gxe(n),i)}},{key:"get",value:function(n){return this.kvs.get(gxe(n))}},{key:"update",value:function(n,i){var r=this.get(n),o=i(r);o?this.set(n,o):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(gxe(n))}},{key:"map",value:function(n){return Ot(this.kvs.entries()).map(function(i){var r=He(i,2),o=r[0],s=r[1],a=o.split(uMt);return n({key:a.map(function(l){var c=l.match(/^([^:]*):(.*)$/),u=He(c,3),d=u[1],h=u[2];return d==="number"?Number(h):h}),value:s})})}},{key:"toJSON",value:function(){var n={};return this.map(function(i){var r=i.key,o=i.value;return n[r.join(".")]=o,null}),n}}]),t}(),cFn=["name"],uFn=Qa(function t(e){var n=this;Za(this,t),ye(this,"formHooked",!1),ye(this,"forceRootUpdate",void 0),ye(this,"subscribable",!0),ye(this,"store",{}),ye(this,"fieldEntities",[]),ye(this,"initialValues",{}),ye(this,"callbacks",{}),ye(this,"validateMessages",null),ye(this,"preserve",null),ye(this,"lastValidatePromise",null),ye(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),ye(this,"getInternalHooks",function(i){return i===IT?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(ii(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),ye(this,"useSubscribe",function(i){n.subscribable=i}),ye(this,"prevWithoutPreserves",null),ye(this,"setInitialValues",function(i,r){if(n.initialValues=i||{},r){var o,s=ZO(i,n.store);(o=n.prevWithoutPreserves)===null||o===void 0||o.map(function(a){var l=a.key;s=jy(s,l,zg(i,l))}),n.prevWithoutPreserves=null,n.updateStore(s)}}),ye(this,"destroyForm",function(i){if(i)n.updateStore({});else{var r=new OP;n.getFieldEntities(!0).forEach(function(o){n.isMergedPreserve(o.isPreserve())||r.set(o.getNamePath(),!0)}),n.prevWithoutPreserves=r}}),ye(this,"getInitialValue",function(i){var r=zg(n.initialValues,i);return i.length?ZO(r):r}),ye(this,"setCallbacks",function(i){n.callbacks=i}),ye(this,"setValidateMessages",function(i){n.validateMessages=i}),ye(this,"setPreserve",function(i){n.preserve=i}),ye(this,"watchList",[]),ye(this,"registerWatch",function(i){return n.watchList.push(i),function(){n.watchList=n.watchList.filter(function(r){return r!==i})}}),ye(this,"notifyWatch",function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var r=n.getFieldsValue(),o=n.getFieldsValue(!0);n.watchList.forEach(function(s){s(r,o,i)})}}),ye(this,"timeoutId",null),ye(this,"warningUnhooked",function(){!n.timeoutId&&typeof window<"u"&&(n.timeoutId=setTimeout(function(){n.timeoutId=null,n.formHooked||ii(!1,"Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?")}))}),ye(this,"updateStore",function(i){n.store=i}),ye(this,"getFieldEntities",function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return i?n.fieldEntities.filter(function(r){return r.getNamePath().length}):n.fieldEntities}),ye(this,"getFieldsMap",function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=new OP;return n.getFieldEntities(i).forEach(function(o){var s=o.getNamePath();r.set(s,o)}),r}),ye(this,"getFieldEntitiesForNamePathList",function(i){if(!i)return n.getFieldEntities(!0);var r=n.getFieldsMap(!0);return i.map(function(o){var s=Yc(o);return r.get(s)||{INVALIDATE_NAME_PATH:Yc(o)}})}),ye(this,"getFieldsValue",function(i,r){n.warningUnhooked();var o,s,a;if(i===!0||Array.isArray(i)?(o=i,s=r):i&&Un(i)==="object"&&(a=i.strict,s=i.filter),o===!0&&!s)return n.store;var l=n.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),c=[];return l.forEach(function(u){var d,h,f="INVALIDATE_NAME_PATH"in u?u.INVALIDATE_NAME_PATH:u.getNamePath();if(a){var m,p;if((m=(p=u).isList)!==null&&m!==void 0&&m.call(p))return}else if(!o&&(d=(h=u).isListField)!==null&&d!==void 0&&d.call(h))return;if(!s)c.push(f);else{var g="getMeta"in u?u.getMeta():null;s(g)&&c.push(f)}}),$tt(n.store,c.map(Yc))}),ye(this,"getFieldValue",function(i){n.warningUnhooked();var r=Yc(i);return zg(n.store,r)}),ye(this,"getFieldsError",function(i){n.warningUnhooked();var r=n.getFieldEntitiesForNamePathList(i);return r.map(function(o,s){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:Yc(i[s]),errors:[],warnings:[]}})}),ye(this,"getFieldError",function(i){n.warningUnhooked();var r=Yc(i),o=n.getFieldsError([r])[0];return o.errors}),ye(this,"getFieldWarning",function(i){n.warningUnhooked();var r=Yc(i),o=n.getFieldsError([r])[0];return o.warnings}),ye(this,"isFieldsTouched",function(){n.warningUnhooked();for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];var s=r[0],a=r[1],l,c=!1;r.length===0?l=null:r.length===1?Array.isArray(s)?(l=s.map(Yc),c=!1):(l=null,c=s):(l=s.map(Yc),c=a);var u=n.getFieldEntities(!0),d=function(g){return g.isFieldTouched()};if(!l)return c?u.every(function(p){return d(p)||p.isList()}):u.some(d);var h=new OP;l.forEach(function(p){h.set(p,[])}),u.forEach(function(p){var g=p.getNamePath();l.forEach(function(y){y.every(function(_,w){return g[w]===_})&&h.update(y,function(_){return[].concat(Ot(_),[p])})})});var f=function(g){return g.some(d)},m=h.map(function(p){var g=p.value;return g});return c?m.every(f):m.some(f)}),ye(this,"isFieldTouched",function(i){return n.warningUnhooked(),n.isFieldsTouched([i])}),ye(this,"isFieldsValidating",function(i){n.warningUnhooked();var r=n.getFieldEntities();if(!i)return r.some(function(s){return s.isFieldValidating()});var o=i.map(Yc);return r.some(function(s){var a=s.getNamePath();return u3(o,a)&&s.isFieldValidating()})}),ye(this,"isFieldValidating",function(i){return n.warningUnhooked(),n.isFieldsValidating([i])}),ye(this,"resetWithFieldInitialValue",function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=new OP,o=n.getFieldEntities(!0);o.forEach(function(l){var c=l.props.initialValue,u=l.getNamePath();if(c!==void 0){var d=r.get(u)||new Set;d.add({entity:l,value:c}),r.set(u,d)}});var s=function(c){c.forEach(function(u){var d=u.props.initialValue;if(d!==void 0){var h=u.getNamePath(),f=n.getInitialValue(h);if(f!==void 0)ii(!1,"Form already set 'initialValues' with path '".concat(h.join("."),"'. Field can not overwrite it."));else{var m=r.get(h);if(m&&m.size>1)ii(!1,"Multiple Field with path '".concat(h.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(m){var p=n.getFieldValue(h),g=u.isListField();!g&&(!i.skipExist||p===void 0)&&n.updateStore(jy(n.store,h,Ot(m)[0].value))}}}})},a;i.entities?a=i.entities:i.namePathList?(a=[],i.namePathList.forEach(function(l){var c=r.get(l);if(c){var u;(u=a).push.apply(u,Ot(Ot(c).map(function(d){return d.entity})))}})):a=o,s(a)}),ye(this,"resetFields",function(i){n.warningUnhooked();var r=n.store;if(!i){n.updateStore(ZO(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(r,null,{type:"reset"}),n.notifyWatch();return}var o=i.map(Yc);o.forEach(function(s){var a=n.getInitialValue(s);n.updateStore(jy(n.store,s,a))}),n.resetWithFieldInitialValue({namePathList:o}),n.notifyObservers(r,o,{type:"reset"}),n.notifyWatch(o)}),ye(this,"setFields",function(i){n.warningUnhooked();var r=n.store,o=[];i.forEach(function(s){var a=s.name,l=di(s,cFn),c=Yc(a);o.push(c),"value"in l&&n.updateStore(jy(n.store,c,l.value)),n.notifyObservers(r,[c],{type:"setField",data:s})}),n.notifyWatch(o)}),ye(this,"getFields",function(){var i=n.getFieldEntities(!0),r=i.map(function(o){var s=o.getNamePath(),a=o.getMeta(),l=Ie(Ie({},a),{},{name:s,value:n.getFieldValue(s)});return Object.defineProperty(l,"originRCField",{value:!0}),l});return r}),ye(this,"initEntityValue",function(i){var r=i.props.initialValue;if(r!==void 0){var o=i.getNamePath(),s=zg(n.store,o);s===void 0&&n.updateStore(jy(n.store,o,r))}}),ye(this,"isMergedPreserve",function(i){var r=i!==void 0?i:n.preserve;return r??!0}),ye(this,"registerField",function(i){n.fieldEntities.push(i);var r=i.getNamePath();if(n.notifyWatch([r]),i.props.initialValue!==void 0){var o=n.store;n.resetWithFieldInitialValue({entities:[i],skipExist:!0}),n.notifyObservers(o,[i.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(s,a){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(d){return d!==i}),!n.isMergedPreserve(a)&&(!s||l.length>1)){var c=s?void 0:n.getInitialValue(r);if(r.length&&n.getFieldValue(r)!==c&&n.fieldEntities.every(function(d){return!lMt(d.getNamePath(),r)})){var u=n.store;n.updateStore(jy(u,r,c,!0)),n.notifyObservers(u,[r],{type:"remove"}),n.triggerDependenciesUpdate(u,r)}}n.notifyWatch([r])}}),ye(this,"dispatch",function(i){switch(i.type){case"updateValue":{var r=i.namePath,o=i.value;n.updateValue(r,o);break}case"validateField":{var s=i.namePath,a=i.triggerName;n.validateFields([s],{triggerName:a});break}}}),ye(this,"notifyObservers",function(i,r,o){if(n.subscribable){var s=Ie(Ie({},o),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(a){var l=a.onStoreChange;l(i,r,s)})}else n.forceRootUpdate()}),ye(this,"triggerDependenciesUpdate",function(i,r){var o=n.getDependencyChildrenFields(r);return o.length&&n.validateFields(o),n.notifyObservers(i,o,{type:"dependenciesUpdate",relatedFields:[r].concat(Ot(o))}),o}),ye(this,"updateValue",function(i,r){var o=Yc(i),s=n.store;n.updateStore(jy(n.store,o,r)),n.notifyObservers(s,[o],{type:"valueUpdate",source:"internal"}),n.notifyWatch([o]);var a=n.triggerDependenciesUpdate(s,o),l=n.callbacks.onValuesChange;if(l){var c=$tt(n.store,[o]);l(c,n.getFieldsValue())}n.triggerOnFieldsChange([o].concat(Ot(a)))}),ye(this,"setFieldsValue",function(i){n.warningUnhooked();var r=n.store;if(i){var o=ZO(n.store,i);n.updateStore(o)}n.notifyObservers(r,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),ye(this,"setFieldValue",function(i,r){n.setFields([{name:i,value:r}])}),ye(this,"getDependencyChildrenFields",function(i){var r=new Set,o=[],s=new OP;n.getFieldEntities().forEach(function(l){var c=l.props.dependencies;(c||[]).forEach(function(u){var d=Yc(u);s.update(d,function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return h.add(l),h})})});var a=function l(c){var u=s.get(c)||new Set;u.forEach(function(d){if(!r.has(d)){r.add(d);var h=d.getNamePath();d.isFieldDirty()&&h.length&&(o.push(h),l(h))}})};return a(i),o}),ye(this,"triggerOnFieldsChange",function(i,r){var o=n.callbacks.onFieldsChange;if(o){var s=n.getFields();if(r){var a=new OP;r.forEach(function(c){var u=c.name,d=c.errors;a.set(u,d)}),s.forEach(function(c){c.errors=a.get(c.name)||c.errors})}var l=s.filter(function(c){var u=c.name;return u3(i,u)});l.length&&o(l,s)}}),ye(this,"validateFields",function(i,r){n.warningUnhooked();var o,s;Array.isArray(i)||typeof i=="string"||typeof r=="string"?(o=i,s=r):s=i;var a=!!o,l=a?o.map(Yc):[],c=[],u=String(Date.now()),d=new Set,h=s||{},f=h.recursive,m=h.dirty;n.getFieldEntities(!0).forEach(function(_){if(a||l.push(_.getNamePath()),!(!_.props.rules||!_.props.rules.length)&&!(m&&!_.isFieldDirty())){var w=_.getNamePath();if(d.add(w.join(u)),!a||u3(l,w,f)){var C=_.validateRules(Ie({validateMessages:Ie(Ie({},aMt),n.validateMessages)},s));c.push(C.then(function(){return{name:w,errors:[],warnings:[]}}).catch(function(N){var E,D=[],k=[];return(E=N.forEach)===null||E===void 0||E.call(N,function(M){var T=M.rule.warningOnly,A=M.errors;T?k.push.apply(k,Ot(A)):D.push.apply(D,Ot(A))}),D.length?Promise.reject({name:w,errors:D,warnings:k}):{name:w,errors:D,warnings:k}}))}}});var p=lFn(c);n.lastValidatePromise=p,p.catch(function(_){return _}).then(function(_){var w=_.map(function(C){var N=C.name;return N});n.notifyObservers(n.store,w,{type:"validateFinish"}),n.triggerOnFieldsChange(w,_)});var g=p.then(function(){return n.lastValidatePromise===p?Promise.resolve(n.getFieldsValue(l)):Promise.reject([])}).catch(function(_){var w=_.filter(function(C){return C&&C.errors.length});return Promise.reject({values:n.getFieldsValue(l),errorFields:w,outOfDate:n.lastValidatePromise!==p})});g.catch(function(_){return _});var y=l.filter(function(_){return d.has(_.join(u))});return n.triggerOnFieldsChange(y),g}),ye(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(i){var r=n.callbacks.onFinish;if(r)try{r(i)}catch(o){console.error(o)}}).catch(function(i){var r=n.callbacks.onFinishFailed;r&&r(i)})}),this.forceRootUpdate=e});function o6e(t){var e=b.useRef(),n=b.useState({}),i=He(n,2),r=i[1];if(!e.current)if(t)e.current=t;else{var o=function(){r({})},s=new uFn(o);e.current=s.getForm()}return[e.current]}var KDe=b.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),dMt=function(e){var n=e.validateMessages,i=e.onFormChange,r=e.onFormFinish,o=e.children,s=b.useContext(KDe),a=b.useRef({});return b.createElement(KDe.Provider,{value:Ie(Ie({},s),{},{validateMessages:Ie(Ie({},s.validateMessages),n),triggerFormChange:function(c,u){i&&i(c,{changedFields:u,forms:a.current}),s.triggerFormChange(c,u)},triggerFormFinish:function(c,u){r&&r(c,{values:u,forms:a.current}),s.triggerFormFinish(c,u)},registerForm:function(c,u){c&&(a.current=Ie(Ie({},a.current),{},ye({},c,u))),s.registerForm(c,u)},unregisterForm:function(c){var u=Ie({},a.current);delete u[c],a.current=u,s.unregisterForm(c)}})},o)},dFn=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],hFn=function(e,n){var i=e.name,r=e.initialValues,o=e.fields,s=e.form,a=e.preserve,l=e.children,c=e.component,u=c===void 0?"form":c,d=e.validateMessages,h=e.validateTrigger,f=h===void 0?"onChange":h,m=e.onValuesChange,p=e.onFieldsChange,g=e.onFinish,y=e.onFinishFailed,_=e.clearOnDestroy,w=di(e,dFn),C=b.useRef(null),N=b.useContext(KDe),E=o6e(s),D=He(E,1),k=D[0],M=k.getInternalHooks(IT),T=M.useSubscribe,A=M.setInitialValues,R=M.setCallbacks,P=M.setValidateMessages,O=M.setPreserve,V=M.destroyForm;b.useImperativeHandle(n,function(){return Ie(Ie({},k),{},{nativeElement:C.current})}),b.useEffect(function(){return N.registerForm(i,k),function(){N.unregisterForm(i)}},[N,k,i]),P(Ie(Ie({},N.validateMessages),d)),R({onValuesChange:m,onFieldsChange:function(Y){if(N.triggerFormChange(i,Y),p){for(var J=arguments.length,ae=new Array(J>1?J-1:0),se=1;se<J;se++)ae[se-1]=arguments[se];p.apply(void 0,[Y].concat(ae))}},onFinish:function(Y){N.triggerFormFinish(i,Y),g&&g(Y)},onFinishFailed:y}),O(a);var F=b.useRef(null);A(r,!F.current),F.current||(F.current=!0),b.useEffect(function(){return function(){return V(_)}},[]);var $,B=typeof l=="function";if(B){var z=k.getFieldsValue(!0);$=l(z,k)}else $=l;T(!B);var H=b.useRef();b.useEffect(function(){oFn(H.current||[],o||[])||k.setFields(o||[]),H.current=o},[o,k]);var K=b.useMemo(function(){return Ie(Ie({},k),{},{validateTrigger:f})},[k,f]),q=b.createElement(zz.Provider,{value:null},b.createElement(M2.Provider,{value:K},$));return u===!1?q:b.createElement(u,lt({},w,{ref:C,onSubmit:function(Y){Y.preventDefault(),Y.stopPropagation(),k.submit()},onReset:function(Y){var J;Y.preventDefault(),k.resetFields(),(J=w.onReset)===null||J===void 0||J.call(w,Y)}}),q)};function Btt(t){try{return JSON.stringify(t)}catch{return Math.random()}}var fFn=function(t){var e=t.join("__RC_FIELD_FORM_SPLIT__"),n=b.useRef(e);ii(n.current===e,"`useWatch` is not support dynamic `namePath`. Please provide static instead.")};function hMt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=e[0],r=e[1],o=r===void 0?{}:r,s=C5n(o)?{form:o}:o,a=s.form,l=b.useState(),c=He(l,2),u=c[0],d=c[1],h=b.useMemo(function(){return Btt(u)},[u]),f=b.useRef(h);f.current=h;var m=b.useContext(M2),p=a||m,g=p&&p._init;ii(e.length===2?a?g:!0:g,"useWatch requires a form instance since it can not auto detect from context.");var y=Yc(i),_=b.useRef(y);return _.current=y,fFn(y),b.useEffect(function(){if(g){var w=p.getFieldsValue,C=p.getInternalHooks,N=C(IT),E=N.registerWatch,D=function(A,R){var P=s.preserve?R:A;return typeof i=="function"?i(P):zg(P,_.current)},k=E(function(T,A){var R=D(T,A),P=Btt(R);f.current!==P&&(f.current=P,d(R))}),M=D(w(),w(!0));return u!==M&&d(M),k}},[g]),u}var mFn=b.forwardRef(hFn),c6=mFn;c6.FormProvider=dMt;c6.Field=r6e;c6.List=cMt;c6.useForm=o6e;c6.useWatch=hMt;const rS=b.createContext({labelAlign:"right",vertical:!1,itemRef:()=>{}}),fMt=b.createContext(null),mMt=t=>{const e=Zs(t,["prefixCls"]);return b.createElement(dMt,Object.assign({},e))},s6e=b.createContext({prefixCls:""}),ju=b.createContext({});ju.displayName="FormItemInputContext";const pFn=t=>{let{children:e,status:n,override:i}=t;const r=b.useContext(ju),o=b.useMemo(()=>{const s=Object.assign({},r);return i&&delete s.isFormItemInput,n&&(delete s.status,delete s.hasFeedback,delete s.feedbackIcon),s},[n,i,r]);return b.createElement(ju.Provider,{value:o},e)},pMt=b.createContext(void 0),$0=t=>{const{space:e,form:n,children:i}=t;if(i==null)return null;let r=i;return n&&(r=Z.createElement(pFn,{override:!0,status:!0},r)),e&&(r=Z.createElement(S3n,null,r)),r};function zj(t){if(t)return{closable:t.closable,closeIcon:t.closeIcon}}function ztt(t){const{closable:e,closeIcon:n}=t||{};return Z.useMemo(()=>{if(!e&&(e===!1||n===!1||n===null))return!1;if(e===void 0&&n===void 0)return null;let i={closeIcon:typeof n!="boolean"&&n!==null?n:void 0};return e&&typeof e=="object"&&(i=Object.assign(Object.assign({},i),e)),i},[e,n])}function Htt(){const t={};for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return n.forEach(r=>{r&&Object.keys(r).forEach(o=>{r[o]!==void 0&&(t[o]=r[o])})}),t}const gFn={};function a6e(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:gFn;const i=ztt(t),r=ztt(e),o=typeof i!="boolean"?!!(i!=null&&i.disabled):!1,s=Z.useMemo(()=>Object.assign({closeIcon:Z.createElement(vb,null)},n),[n]),a=Z.useMemo(()=>i===!1?!1:i?Htt(s,r,i):r===!1?!1:r?Htt(s,r):s.closable?s:!1,[i,r,s]);return Z.useMemo(()=>{if(a===!1)return[!1,null,o];const{closeIconRender:l}=s,{closeIcon:c}=a;let u=c;if(u!=null){l&&(u=l(c));const d=Ll(a,!0);Object.keys(d).length&&(u=Z.isValidElement(u)?Z.cloneElement(u,d):Z.createElement("span",Object.assign({},d),u))}return[!0,u,o]},[a,s])}var gMt=function(e){if(Lu()&&window.document.documentElement){var n=Array.isArray(e)?e:[e],i=window.document.documentElement;return n.some(function(r){return r in i.style})}return!1},bFn=function(e,n){if(!gMt(e))return!1;var i=document.createElement("div"),r=i.style[e];return i.style[e]=n,i.style[e]!==r};function qDe(t,e){return!Array.isArray(t)&&e!==void 0?bFn(t,e):gMt(t)}const vFn=()=>Lu()&&window.document.documentElement,dhe=t=>{const{prefixCls:e,className:n,style:i,size:r,shape:o}=t,s=Me({[`${e}-lg`]:r==="large",[`${e}-sm`]:r==="small"}),a=Me({[`${e}-circle`]:o==="circle",[`${e}-square`]:o==="square",[`${e}-round`]:o==="round"}),l=b.useMemo(()=>typeof r=="number"?{width:r,height:r,lineHeight:`${r}px`}:{},[r]);return b.createElement("span",{className:Me(e,s,a,n),style:Object.assign(Object.assign({},l),i)})},yFn=new so("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),hhe=t=>({height:t,lineHeight:xe(t)}),d3=t=>Object.assign({width:t},hhe(t)),_Fn=t=>({background:t.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:yFn,animationDuration:t.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),bxe=(t,e)=>Object.assign({width:e(t).mul(5).equal(),minWidth:e(t).mul(5).equal()},hhe(t)),xFn=t=>{const{skeletonAvatarCls:e,gradientFromColor:n,controlHeight:i,controlHeightLG:r,controlHeightSM:o}=t;return{[e]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},d3(i)),[`${e}${e}-circle`]:{borderRadius:"50%"},[`${e}${e}-lg`]:Object.assign({},d3(r)),[`${e}${e}-sm`]:Object.assign({},d3(o))}},wFn=t=>{const{controlHeight:e,borderRadiusSM:n,skeletonInputCls:i,controlHeightLG:r,controlHeightSM:o,gradientFromColor:s,calc:a}=t;return{[i]:Object.assign({display:"inline-block",verticalAlign:"top",background:s,borderRadius:n},bxe(e,a)),[`${i}-lg`]:Object.assign({},bxe(r,a)),[`${i}-sm`]:Object.assign({},bxe(o,a))}},Wtt=t=>Object.assign({width:t},hhe(t)),CFn=t=>{const{skeletonImageCls:e,imageSizeBase:n,gradientFromColor:i,borderRadiusSM:r,calc:o}=t;return{[e]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:i,borderRadius:r},Wtt(o(n).mul(2).equal())),{[`${e}-path`]:{fill:"#bfbfbf"},[`${e}-svg`]:Object.assign(Object.assign({},Wtt(n)),{maxWidth:o(n).mul(4).equal(),maxHeight:o(n).mul(4).equal()}),[`${e}-svg${e}-svg-circle`]:{borderRadius:"50%"}}),[`${e}${e}-circle`]:{borderRadius:"50%"}}},vxe=(t,e,n)=>{const{skeletonButtonCls:i}=t;return{[`${n}${i}-circle`]:{width:e,minWidth:e,borderRadius:"50%"},[`${n}${i}-round`]:{borderRadius:e}}},yxe=(t,e)=>Object.assign({width:e(t).mul(2).equal(),minWidth:e(t).mul(2).equal()},hhe(t)),SFn=t=>{const{borderRadiusSM:e,skeletonButtonCls:n,controlHeight:i,controlHeightLG:r,controlHeightSM:o,gradientFromColor:s,calc:a}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:s,borderRadius:e,width:a(i).mul(2).equal(),minWidth:a(i).mul(2).equal()},yxe(i,a))},vxe(t,i,n)),{[`${n}-lg`]:Object.assign({},yxe(r,a))}),vxe(t,r,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},yxe(o,a))}),vxe(t,o,`${n}-sm`))},NFn=t=>{const{componentCls:e,skeletonAvatarCls:n,skeletonTitleCls:i,skeletonParagraphCls:r,skeletonButtonCls:o,skeletonInputCls:s,skeletonImageCls:a,controlHeight:l,controlHeightLG:c,controlHeightSM:u,gradientFromColor:d,padding:h,marginSM:f,borderRadius:m,titleHeight:p,blockRadius:g,paragraphLiHeight:y,controlHeightXS:_,paragraphMarginTop:w}=t;return{[e]:{display:"table",width:"100%",[`${e}-header`]:{display:"table-cell",paddingInlineEnd:h,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:d},d3(l)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},d3(c)),[`${n}-sm`]:Object.assign({},d3(u))},[`${e}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[i]:{width:"100%",height:p,background:d,borderRadius:g,[`+ ${r}`]:{marginBlockStart:u}},[r]:{padding:0,"> li":{width:"100%",height:y,listStyle:"none",background:d,borderRadius:g,"+ li":{marginBlockStart:_}}},[`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${e}-content`]:{[`${i}, ${r} > li`]:{borderRadius:m}}},[`${e}-with-avatar ${e}-content`]:{[i]:{marginBlockStart:f,[`+ ${r}`]:{marginBlockStart:w}}},[`${e}${e}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},SFn(t)),xFn(t)),wFn(t)),CFn(t)),[`${e}${e}-block`]:{width:"100%",[o]:{width:"100%"},[s]:{width:"100%"}},[`${e}${e}-active`]:{[`
        ${i},
        ${r} > li,
        ${n},
        ${o},
        ${s},
        ${a}
      `]:Object.assign({},_Fn(t))}}},EFn=t=>{const{colorFillContent:e,colorFill:n}=t,i=e,r=n;return{color:i,colorGradientEnd:r,gradientFromColor:i,gradientToColor:r,titleHeight:t.controlHeight/2,blockRadius:t.borderRadiusSM,paragraphMarginTop:t.marginLG+t.marginXXS,paragraphLiHeight:t.controlHeight/2}},u6=Jr("Skeleton",t=>{const{componentCls:e,calc:n}=t,i=mr(t,{skeletonAvatarCls:`${e}-avatar`,skeletonTitleCls:`${e}-title`,skeletonParagraphCls:`${e}-paragraph`,skeletonButtonCls:`${e}-button`,skeletonInputCls:`${e}-input`,skeletonImageCls:`${e}-image`,imageSizeBase:n(t.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${t.gradientFromColor} 25%, ${t.gradientToColor} 37%, ${t.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[NFn(i)]},EFn,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),DFn=t=>{const{prefixCls:e,className:n,rootClassName:i,active:r,shape:o="circle",size:s="default"}=t,{getPrefixCls:a}=b.useContext(jn),l=a("skeleton",e),[c,u,d]=u6(l),h=Zs(t,["prefixCls","className"]),f=Me(l,`${l}-element`,{[`${l}-active`]:r},n,i,u,d);return c(b.createElement("div",{className:f},b.createElement(dhe,Object.assign({prefixCls:`${l}-avatar`,shape:o,size:s},h))))},kFn=t=>{const{prefixCls:e,className:n,rootClassName:i,active:r,block:o=!1,size:s="default"}=t,{getPrefixCls:a}=b.useContext(jn),l=a("skeleton",e),[c,u,d]=u6(l),h=Zs(t,["prefixCls"]),f=Me(l,`${l}-element`,{[`${l}-active`]:r,[`${l}-block`]:o},n,i,u,d);return c(b.createElement("div",{className:f},b.createElement(dhe,Object.assign({prefixCls:`${l}-button`,size:s},h))))},MFn="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",LFn=t=>{const{prefixCls:e,className:n,rootClassName:i,style:r,active:o}=t,{getPrefixCls:s}=b.useContext(jn),a=s("skeleton",e),[l,c,u]=u6(a),d=Me(a,`${a}-element`,{[`${a}-active`]:o},n,i,c,u);return l(b.createElement("div",{className:d},b.createElement("div",{className:Me(`${a}-image`,n),style:r},b.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${a}-image-svg`},b.createElement("title",null,"Image placeholder"),b.createElement("path",{d:MFn,className:`${a}-image-path`})))))},TFn=t=>{const{prefixCls:e,className:n,rootClassName:i,active:r,block:o,size:s="default"}=t,{getPrefixCls:a}=b.useContext(jn),l=a("skeleton",e),[c,u,d]=u6(l),h=Zs(t,["prefixCls"]),f=Me(l,`${l}-element`,{[`${l}-active`]:r,[`${l}-block`]:o},n,i,u,d);return c(b.createElement("div",{className:f},b.createElement(dhe,Object.assign({prefixCls:`${l}-input`,size:s},h))))},IFn=t=>{const{prefixCls:e,className:n,rootClassName:i,style:r,active:o,children:s}=t,{getPrefixCls:a}=b.useContext(jn),l=a("skeleton",e),[c,u,d]=u6(l),h=Me(l,`${l}-element`,{[`${l}-active`]:o},u,n,i,d);return c(b.createElement("div",{className:h},b.createElement("div",{className:Me(`${l}-image`,n),style:r},s)))},AFn=(t,e)=>{const{width:n,rows:i=2}=e;if(Array.isArray(n))return n[t];if(i-1===t)return n},RFn=t=>{const{prefixCls:e,className:n,style:i,rows:r}=t,o=Ot(new Array(r)).map((s,a)=>b.createElement("li",{key:a,style:{width:AFn(a,t)}}));return b.createElement("ul",{className:Me(e,n),style:i},o)},PFn=t=>{let{prefixCls:e,className:n,width:i,style:r}=t;return b.createElement("h3",{className:Me(e,n),style:Object.assign({width:i},r)})};function _xe(t){return t&&typeof t=="object"?t:{}}function OFn(t,e){return t&&!e?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function jFn(t,e){return!t&&e?{width:"38%"}:t&&e?{width:"50%"}:{}}function FFn(t,e){const n={};return(!t||!e)&&(n.width="61%"),!t&&e?n.rows=3:n.rows=2,n}const ja=t=>{const{prefixCls:e,loading:n,className:i,rootClassName:r,style:o,children:s,avatar:a=!1,title:l=!0,paragraph:c=!0,active:u,round:d}=t,{getPrefixCls:h,direction:f,skeleton:m}=b.useContext(jn),p=h("skeleton",e),[g,y,_]=u6(p);if(n||!("loading"in t)){const w=!!a,C=!!l,N=!!c;let E;if(w){const M=Object.assign(Object.assign({prefixCls:`${p}-avatar`},OFn(C,N)),_xe(a));E=b.createElement("div",{className:`${p}-header`},b.createElement(dhe,Object.assign({},M)))}let D;if(C||N){let M;if(C){const A=Object.assign(Object.assign({prefixCls:`${p}-title`},jFn(w,N)),_xe(l));M=b.createElement(PFn,Object.assign({},A))}let T;if(N){const A=Object.assign(Object.assign({prefixCls:`${p}-paragraph`},FFn(w,C)),_xe(c));T=b.createElement(RFn,Object.assign({},A))}D=b.createElement("div",{className:`${p}-content`},M,T)}const k=Me(p,{[`${p}-with-avatar`]:w,[`${p}-active`]:u,[`${p}-rtl`]:f==="rtl",[`${p}-round`]:d},m==null?void 0:m.className,i,r,y,_);return g(b.createElement("div",{className:k,style:Object.assign(Object.assign({},m==null?void 0:m.style),o)},E,D))}return s??null};ja.Button=kFn;ja.Avatar=DFn;ja.Input=TFn;ja.Image=LFn;ja.Node=IFn;ja.displayName="Skeleton";function Utt(){}const $Fn=b.createContext({add:Utt,remove:Utt});function bMt(t){const e=b.useContext($Fn),n=b.useRef();return gr(r=>{if(r){const o=t?r.querySelector(t):r;e.add(o),n.current=o}else e.remove(n.current)})}const Ktt=()=>{const{cancelButtonProps:t,cancelTextLocale:e,onCancel:n}=b.useContext(FK);return Z.createElement(vn,Object.assign({onClick:n},t),e)},qtt=()=>{const{confirmLoading:t,okButtonProps:e,okType:n,okTextLocale:i,onOk:r}=b.useContext(FK);return Z.createElement(vn,Object.assign({},Rkt(n),{loading:t,onClick:r},e),i)};function vMt(t,e){return Z.createElement("span",{className:`${t}-close-x`},e||Z.createElement(vb,{className:`${t}-close-icon`}))}const yMt=t=>{const{okText:e,okType:n="primary",cancelText:i,confirmLoading:r,onOk:o,onCancel:s,okButtonProps:a,cancelButtonProps:l,footer:c}=t,[u]=bb("Modal",WDt()),d=e||(u==null?void 0:u.okText),h=i||(u==null?void 0:u.cancelText),f={confirmLoading:r,okButtonProps:a,cancelButtonProps:l,okTextLocale:d,cancelTextLocale:h,okType:n,onOk:o,onCancel:s},m=Z.useMemo(()=>f,Ot(Object.values(f)));let p;return typeof c=="function"||typeof c>"u"?(p=Z.createElement(Z.Fragment,null,Z.createElement(Ktt,null),Z.createElement(qtt,null)),typeof c=="function"&&(p=c(p,{OkBtn:qtt,CancelBtn:Ktt})),p=Z.createElement(Jkt,{value:m},p)):p=c,Z.createElement(PFe,{disabled:!1},p)};function Gtt(t){return{position:t,inset:0}}const _Mt=t=>{const{componentCls:e,antCls:n}=t;return[{[`${e}-root`]:{[`${e}${n}-zoom-enter, ${e}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:t.motionDurationSlow,userSelect:"none"},[`${e}${n}-zoom-leave ${e}-content`]:{pointerEvents:"none"},[`${e}-mask`]:Object.assign(Object.assign({},Gtt("fixed")),{zIndex:t.zIndexPopupBase,height:"100%",backgroundColor:t.colorBgMask,pointerEvents:"none",[`${e}-hidden`]:{display:"none"}}),[`${e}-wrap`]:Object.assign(Object.assign({},Gtt("fixed")),{zIndex:t.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${e}-root`]:KFe(t)}]},VFn=t=>{const{componentCls:e}=t;return[{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl"},[`${e}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[e]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${t.screenSMMax}px)`]:{[e]:{maxWidth:"calc(100vw - 16px)",margin:`${xe(t.marginXS)} auto`},[`${e}-centered`]:{[e]:{flex:1}}}}},{[e]:Object.assign(Object.assign({},fo(t)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${xe(t.calc(t.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:t.paddingLG,[`${e}-title`]:{margin:0,color:t.titleColor,fontWeight:t.fontWeightStrong,fontSize:t.titleFontSize,lineHeight:t.titleLineHeight,wordWrap:"break-word"},[`${e}-content`]:{position:"relative",backgroundColor:t.contentBg,backgroundClip:"padding-box",border:0,borderRadius:t.borderRadiusLG,boxShadow:t.boxShadow,pointerEvents:"auto",padding:t.contentPadding},[`${e}-close`]:Object.assign({position:"absolute",top:t.calc(t.modalHeaderHeight).sub(t.modalCloseBtnSize).div(2).equal(),insetInlineEnd:t.calc(t.modalHeaderHeight).sub(t.modalCloseBtnSize).div(2).equal(),zIndex:t.calc(t.zIndexPopupBase).add(10).equal(),padding:0,color:t.modalCloseIconColor,fontWeight:t.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:t.borderRadiusSM,width:t.modalCloseBtnSize,height:t.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${t.motionDurationMid}, background-color ${t.motionDurationMid}`,"&-x":{display:"flex",fontSize:t.fontSizeLG,fontStyle:"normal",lineHeight:xe(t.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:t.modalCloseIconHoverColor,backgroundColor:t.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:t.colorBgTextActive}},j0(t)),[`${e}-header`]:{color:t.colorText,background:t.headerBg,borderRadius:`${xe(t.borderRadiusLG)} ${xe(t.borderRadiusLG)} 0 0`,marginBottom:t.headerMarginBottom,padding:t.headerPadding,borderBottom:t.headerBorderBottom},[`${e}-body`]:{fontSize:t.fontSize,lineHeight:t.lineHeight,wordWrap:"break-word",padding:t.bodyPadding,[`${e}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${xe(t.margin)} auto`}},[`${e}-footer`]:{textAlign:"end",background:t.footerBg,marginTop:t.footerMarginTop,padding:t.footerPadding,borderTop:t.footerBorderTop,borderRadius:t.footerBorderRadius,[`> ${t.antCls}-btn + ${t.antCls}-btn`]:{marginInlineStart:t.marginXS}},[`${e}-open`]:{overflow:"hidden"}})},{[`${e}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${e}-content,
          ${e}-body,
          ${e}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${e}-confirm-body`]:{marginBottom:"auto"}}}]},BFn=t=>{const{componentCls:e}=t;return{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl",[`${e}-confirm-body`]:{direction:"rtl"}}}}},xMt=t=>{const e=t.padding,n=t.fontSizeHeading5,i=t.lineHeightHeading5;return mr(t,{modalHeaderHeight:t.calc(t.calc(i).mul(n).equal()).add(t.calc(e).mul(2).equal()).equal(),modalFooterBorderColorSplit:t.colorSplit,modalFooterBorderStyle:t.lineType,modalFooterBorderWidth:t.lineWidth,modalCloseIconColor:t.colorIcon,modalCloseIconHoverColor:t.colorIconHover,modalCloseBtnSize:t.controlHeight,modalConfirmIconSize:t.fontHeight,modalTitleHeight:t.calc(t.titleFontSize).mul(t.titleLineHeight).equal()})},wMt=t=>({footerBg:"transparent",headerBg:t.colorBgElevated,titleLineHeight:t.lineHeightHeading5,titleFontSize:t.fontSizeHeading5,contentBg:t.colorBgElevated,titleColor:t.colorTextHeading,contentPadding:t.wireframe?0:`${xe(t.paddingMD)} ${xe(t.paddingContentHorizontalLG)}`,headerPadding:t.wireframe?`${xe(t.padding)} ${xe(t.paddingLG)}`:0,headerBorderBottom:t.wireframe?`${xe(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",headerMarginBottom:t.wireframe?0:t.marginXS,bodyPadding:t.wireframe?t.paddingLG:0,footerPadding:t.wireframe?`${xe(t.paddingXS)} ${xe(t.padding)}`:0,footerBorderTop:t.wireframe?`${xe(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",footerBorderRadius:t.wireframe?`0 0 ${xe(t.borderRadiusLG)} ${xe(t.borderRadiusLG)}`:0,footerMarginTop:t.wireframe?0:t.marginSM,confirmBodyPadding:t.wireframe?`${xe(t.padding*2)} ${xe(t.padding*2)} ${xe(t.paddingLG)}`:0,confirmIconMarginInlineEnd:t.wireframe?t.margin:t.marginSM,confirmBtnsMarginTop:t.wireframe?t.marginLG:t.marginSM}),CMt=Jr("Modal",t=>{const e=xMt(t);return[VFn(e),BFn(e),_Mt(e),s6(e,"zoom")]},wMt,{unitless:{titleLineHeight:!0}});var zFn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};let GDe;const HFn=t=>{GDe={x:t.pageX,y:t.pageY},setTimeout(()=>{GDe=null},100)};vFn()&&document.documentElement.addEventListener("click",HFn,!0);const SMt=t=>{var e;const{getPopupContainer:n,getPrefixCls:i,direction:r,modal:o}=b.useContext(jn),s=U=>{const{onCancel:Y}=t;Y==null||Y(U)},a=U=>{const{onOk:Y}=t;Y==null||Y(U)};{const U=Cr("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"]].forEach(Y=>{let[J,ae]=Y;U.deprecated(!(J in t),J,ae)})}const{prefixCls:l,className:c,rootClassName:u,open:d,wrapClassName:h,centered:f,getContainer:m,focusTriggerAfterClose:p=!0,style:g,visible:y,width:_=520,footer:w,classNames:C,styles:N,children:E,loading:D}=t,k=zFn(t,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading"]),M=i("modal",l),T=i(),A=Il(M),[R,P,O]=CMt(M,A),V=Me(h,{[`${M}-centered`]:!!f,[`${M}-wrap-rtl`]:r==="rtl"}),F=w!==null&&!D?b.createElement(yMt,Object.assign({},t,{onOk:a,onCancel:s})):null,[$,B,z]=a6e(zj(t),zj(o),{closable:!0,closeIcon:b.createElement(vb,{className:`${M}-close-icon`}),closeIconRender:U=>vMt(M,U)}),H=bMt(`.${M}-content`),[K,q]=Mw("Modal",k.zIndex);return R(b.createElement($0,{form:!0,space:!0},b.createElement(i6.Provider,{value:q},b.createElement(n6e,Object.assign({width:_},k,{zIndex:K,getContainer:m===void 0?n:m,prefixCls:M,rootClassName:Me(P,u,O,A),footer:F,visible:d??y,mousePosition:(e=k.mousePosition)!==null&&e!==void 0?e:GDe,onClose:s,closable:$&&{disabled:z,closeIcon:B},closeIcon:B,focusTriggerAfterClose:p,transitionName:Bp(T,"zoom",t.transitionName),maskTransitionName:Bp(T,"fade",t.maskTransitionName),className:Me(P,c,o==null?void 0:o.className),style:Object.assign(Object.assign({},o==null?void 0:o.style),g),classNames:Object.assign(Object.assign(Object.assign({},o==null?void 0:o.classNames),C),{wrapper:Me(V,C==null?void 0:C.wrapper)}),styles:Object.assign(Object.assign({},o==null?void 0:o.styles),N),panelRef:H}),D?b.createElement(ja,{active:!0,title:!1,paragraph:{rows:4},className:`${M}-body-skeleton`}):E))))},WFn=t=>{const{componentCls:e,titleFontSize:n,titleLineHeight:i,modalConfirmIconSize:r,fontSize:o,lineHeight:s,modalTitleHeight:a,fontHeight:l,confirmBodyPadding:c}=t,u=`${e}-confirm`;return{[u]:{"&-rtl":{direction:"rtl"},[`${t.antCls}-modal-header`]:{display:"none"},[`${u}-body-wrapper`]:Object.assign({},O0()),[`&${e} ${e}-body`]:{padding:c},[`${u}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t.iconCls}`]:{flex:"none",fontSize:r,marginInlineEnd:t.confirmIconMarginInlineEnd,marginTop:t.calc(t.calc(l).sub(r).equal()).div(2).equal()},[`&-has-title > ${t.iconCls}`]:{marginTop:t.calc(t.calc(a).sub(r).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:t.marginXS},[`${t.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${xe(t.calc(t.modalConfirmIconSize).add(t.marginSM).equal())})`},[`${u}-title`]:{color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:n,lineHeight:i},[`${u}-content`]:{color:t.colorText,fontSize:o,lineHeight:s},[`${u}-btns`]:{textAlign:"end",marginTop:t.confirmBtnsMarginTop,[`${t.antCls}-btn + ${t.antCls}-btn`]:{marginBottom:0,marginInlineStart:t.marginXS}}},[`${u}-error ${u}-body > ${t.iconCls}`]:{color:t.colorError},[`${u}-warning ${u}-body > ${t.iconCls},
        ${u}-confirm ${u}-body > ${t.iconCls}`]:{color:t.colorWarning},[`${u}-info ${u}-body > ${t.iconCls}`]:{color:t.colorInfo},[`${u}-success ${u}-body > ${t.iconCls}`]:{color:t.colorSuccess}}},UFn=$A(["Modal","confirm"],t=>{const e=xMt(t);return[WFn(e)]},wMt,{order:-1e3});var KFn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};function NMt(t){const{prefixCls:e,icon:n,okText:i,cancelText:r,confirmPrefixCls:o,type:s,okCancel:a,footer:l,locale:c}=t,u=KFn(t,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]);Cr("Modal")(!(typeof n=="string"&&n.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${n}\` at https://ant.design/components/icon`);let d=n;if(!n&&n!==null)switch(s){case"info":d=b.createElement(ehe,null);break;case"success":d=b.createElement(VA,null);break;case"error":d=b.createElement($S,null);break;default:d=b.createElement(n6,null)}const h=a??s==="confirm",f=t.autoFocusButton===null?!1:t.autoFocusButton||"ok",[m]=bb("Modal"),p=c||m,g=i||(h?p==null?void 0:p.okText:p==null?void 0:p.justOkText),y=r||(p==null?void 0:p.cancelText),_=Object.assign({autoFocusButton:f,cancelTextLocale:y,okTextLocale:g,mergedOkCancel:h},u),w=b.useMemo(()=>_,Ot(Object.values(_))),C=b.createElement(b.Fragment,null,b.createElement(wtt,null),b.createElement(Ctt,null)),N=t.title!==void 0&&t.title!==null,E=`${o}-body`;return b.createElement("div",{className:`${o}-body-wrapper`},b.createElement("div",{className:Me(E,{[`${E}-has-title`]:N})},d,b.createElement("div",{className:`${o}-paragraph`},N&&b.createElement("span",{className:`${o}-title`},t.title),b.createElement("div",{className:`${o}-content`},t.content))),l===void 0||typeof l=="function"?b.createElement(Jkt,{value:w},b.createElement("div",{className:`${o}-btns`},typeof l=="function"?l(C,{OkBtn:Ctt,CancelBtn:wtt}):C)):l,b.createElement(UFn,{prefixCls:e}))}const EMt=t=>{const{close:e,zIndex:n,afterClose:i,open:r,keyboard:o,centered:s,getContainer:a,maskStyle:l,direction:c,prefixCls:u,wrapClassName:d,rootPrefixCls:h,bodyStyle:f,closable:m=!1,closeIcon:p,modalRender:g,focusTriggerAfterClose:y,onConfirm:_,styles:w}=t;{const R=Cr("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"]].forEach(P=>{let[O,V]=P;R.deprecated(!(O in t),O,V)})}const C=`${u}-confirm`,N=t.width||416,E=t.style||{},D=t.mask===void 0?!0:t.mask,k=t.maskClosable===void 0?!1:t.maskClosable,M=Me(C,`${C}-${t.type}`,{[`${C}-rtl`]:c==="rtl"},t.className),[,T]=Sd(),A=b.useMemo(()=>n!==void 0?n:T.zIndexPopupBase+zFe,[n,T]);return b.createElement(SMt,{prefixCls:u,className:M,wrapClassName:Me({[`${C}-centered`]:!!t.centered},d),onCancel:()=>{e==null||e({triggerCancel:!0}),_==null||_(!1)},open:r,title:"",footer:null,transitionName:Bp(h||"","zoom",t.transitionName),maskTransitionName:Bp(h||"","fade",t.maskTransitionName),mask:D,maskClosable:k,style:E,styles:Object.assign({body:f,mask:l},w),width:N,zIndex:A,afterClose:i,keyboard:o,centered:s,getContainer:a,closable:m,closeIcon:p,modalRender:g,focusTriggerAfterClose:y},b.createElement(NMt,Object.assign({},t,{confirmPrefixCls:C})))},l6e=t=>{const{rootPrefixCls:e,iconPrefixCls:n,direction:i,theme:r}=t;return b.createElement(Kv,{prefixCls:e,iconPrefixCls:n,direction:i,theme:r},b.createElement(EMt,Object.assign({},t)))};EMt.displayName="ConfirmDialog",l6e.displayName="ConfirmDialogWrapper";const AT=[];let DMt="";function kMt(){return DMt}const qFn=t=>{var e,n;const{prefixCls:i,getContainer:r,direction:o}=t,s=WDt(),a=b.useContext(jn),l=kMt()||a.getPrefixCls(),c=i||`${l}-modal`;let u=r;return u===!1&&(u=void 0,FS(!1,"Modal","Static method not support `getContainer` to be `false` since it do not have context env.")),Z.createElement(l6e,Object.assign({},t,{rootPrefixCls:l,prefixCls:c,iconPrefixCls:a.iconPrefixCls,theme:a.theme,direction:o??a.direction,locale:(n=(e=a.locale)===null||e===void 0?void 0:e.Modal)!==null&&n!==void 0?n:s,getContainer:u}))};function VK(t){const e=$Fe();e.holderRender||gkt("Modal");const n=document.createDocumentFragment();let i=Object.assign(Object.assign({},t),{close:a,open:!0}),r;function o(){for(var c,u=arguments.length,d=new Array(u),h=0;h<u;h++)d[h]=arguments[h];if(d.some(p=>p==null?void 0:p.triggerCancel)){var m;(c=t.onCancel)===null||c===void 0||(m=c).call.apply(m,[t,()=>{}].concat(Ot(d.slice(1))))}for(let p=0;p<AT.length;p++)if(AT[p]===a){AT.splice(p,1);break}Lkt(n)}function s(c){clearTimeout(r),r=setTimeout(()=>{const u=e.getPrefixCls(void 0,kMt()),d=e.getIconPrefixCls(),h=e.getTheme(),f=Z.createElement(qFn,Object.assign({},c));HFe(Z.createElement(Kv,{prefixCls:u,iconPrefixCls:d,theme:h},e.holderRender?e.holderRender(f):f),n)})}function a(){for(var c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];i=Object.assign(Object.assign({},i),{open:!1,afterClose:()=>{typeof t.afterClose=="function"&&t.afterClose(),o.apply(this,u)}}),i.visible&&delete i.visible,s(i)}function l(c){typeof c=="function"?i=c(i):i=Object.assign(Object.assign({},i),c),s(i)}return s(i),AT.push(a),{destroy:a,update:l}}function MMt(t){return Object.assign(Object.assign({},t),{type:"warning"})}function LMt(t){return Object.assign(Object.assign({},t),{type:"info"})}function TMt(t){return Object.assign(Object.assign({},t),{type:"success"})}function IMt(t){return Object.assign(Object.assign({},t),{type:"error"})}function AMt(t){return Object.assign(Object.assign({},t),{type:"confirm"})}function GFn(t){let{rootPrefixCls:e}=t;FS(!1,"Modal","Modal.config is deprecated. Please use ConfigProvider.config instead."),DMt=e}var YFn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const XFn=(t,e)=>{var n,{afterClose:i,config:r}=t,o=YFn(t,["afterClose","config"]);const[s,a]=b.useState(!0),[l,c]=b.useState(r),{direction:u,getPrefixCls:d}=b.useContext(jn),h=d("modal"),f=d(),m=()=>{var _;i(),(_=l.afterClose)===null||_===void 0||_.call(l)},p=function(){var _;a(!1);for(var w=arguments.length,C=new Array(w),N=0;N<w;N++)C[N]=arguments[N];if(C.some(k=>k==null?void 0:k.triggerCancel)){var D;(_=l.onCancel)===null||_===void 0||(D=_).call.apply(D,[l,()=>{}].concat(Ot(C.slice(1))))}};b.useImperativeHandle(e,()=>({destroy:p,update:_=>{c(w=>Object.assign(Object.assign({},w),_))}}));const g=(n=l.okCancel)!==null&&n!==void 0?n:l.type==="confirm",[y]=bb("Modal",Dv.Modal);return b.createElement(l6e,Object.assign({prefixCls:h,rootPrefixCls:f},l,{close:p,open:s,afterClose:m,okText:l.okText||(g?y==null?void 0:y.okText:y==null?void 0:y.justOkText),direction:l.direction||u,cancelText:l.cancelText||(y==null?void 0:y.cancelText)},o))},ZFn=b.forwardRef(XFn);let Ytt=0;const QFn=b.memo(b.forwardRef((t,e)=>{const[n,i]=o3n();return b.useImperativeHandle(e,()=>({patchElement:i}),[]),b.createElement(b.Fragment,null,n)}));function JFn(){const t=b.useRef(null),[e,n]=b.useState([]);b.useEffect(()=>{e.length&&(Ot(e).forEach(s=>{s()}),n([]))},[e]);const i=b.useCallback(o=>function(a){var l;Ytt+=1;const c=b.createRef();let u;const d=new Promise(g=>{u=g});let h=!1,f;const m=b.createElement(ZFn,{key:`modal-${Ytt}`,config:o(a),ref:c,afterClose:()=>{f==null||f()},isSilent:()=>h,onConfirm:g=>{u(g)}});return f=(l=t.current)===null||l===void 0?void 0:l.patchElement(m),f&&AT.push(f),{destroy:()=>{function g(){var y;(y=c.current)===null||y===void 0||y.destroy()}c.current?g():n(y=>[].concat(Ot(y),[g]))},update:g=>{function y(){var _;(_=c.current)===null||_===void 0||_.update(g)}c.current?y():n(_=>[].concat(Ot(_),[y]))},then:g=>(h=!0,d.then(g))}},[]);return[b.useMemo(()=>({info:i(LMt),success:i(TMt),error:i(IMt),warning:i(MMt),confirm:i(AMt)}),[]),b.createElement(QFn,{key:"modal-holder",ref:t})]}const e6n=t=>{const{componentCls:e,notificationMarginEdge:n,animationMaxHeight:i}=t,r=`${e}-notice`,o=new so("antNotificationFadeIn",{"0%":{transform:"translate3d(100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}}),s=new so("antNotificationTopFadeIn",{"0%":{top:-i,opacity:0},"100%":{top:0,opacity:1}}),a=new so("antNotificationBottomFadeIn",{"0%":{bottom:t.calc(i).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),l=new so("antNotificationLeftFadeIn",{"0%":{transform:"translate3d(-100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}});return{[e]:{[`&${e}-top, &${e}-bottom`]:{marginInline:0,[r]:{marginInline:"auto auto"}},[`&${e}-top`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:s}},[`&${e}-bottom`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:a}},[`&${e}-topRight, &${e}-bottomRight`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:o}},[`&${e}-topLeft, &${e}-bottomLeft`]:{marginRight:{value:0,_skip_check_:!0},marginLeft:{value:n,_skip_check_:!0},[r]:{marginInlineEnd:"auto",marginInlineStart:0},[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:l}}}}},t6n=["top","topLeft","topRight","bottom","bottomLeft","bottomRight"],n6n={topLeft:"left",topRight:"right",bottomLeft:"left",bottomRight:"right",top:"left",bottom:"left"},i6n=(t,e)=>{const{componentCls:n}=t;return{[`${n}-${e}`]:{[`&${n}-stack > ${n}-notice-wrapper`]:{[e.startsWith("top")?"top":"bottom"]:0,[n6n[e]]:{value:0,_skip_check_:!0}}}}},r6n=t=>{const e={};for(let n=1;n<t.notificationStackLayer;n++)e[`&:nth-last-child(${n+1})`]={overflow:"hidden",[`& > ${t.componentCls}-notice`]:{opacity:0,transition:`opacity ${t.motionDurationMid}`}};return Object.assign({[`&:not(:nth-last-child(-n+${t.notificationStackLayer}))`]:{opacity:0,overflow:"hidden",color:"transparent",pointerEvents:"none"}},e)},o6n=t=>{const e={};for(let n=1;n<t.notificationStackLayer;n++)e[`&:nth-last-child(${n+1})`]={background:t.colorBgBlur,backdropFilter:"blur(10px)","-webkit-backdrop-filter":"blur(10px)"};return Object.assign({},e)},s6n=t=>{const{componentCls:e}=t;return Object.assign({[`${e}-stack`]:{[`& > ${e}-notice-wrapper`]:Object.assign({transition:`all ${t.motionDurationSlow}, backdrop-filter 0s`,position:"absolute"},r6n(t))},[`${e}-stack:not(${e}-stack-expanded)`]:{[`& > ${e}-notice-wrapper`]:Object.assign({},o6n(t))},[`${e}-stack${e}-stack-expanded`]:{[`& > ${e}-notice-wrapper`]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:"unset",color:"inherit",pointerEvents:"auto",[`& > ${t.componentCls}-notice`]:{opacity:1}},"&:after":{content:'""',position:"absolute",height:t.margin,width:"100%",insetInline:0,bottom:t.calc(t.margin).mul(-1).equal(),background:"transparent",pointerEvents:"auto"}}}},t6n.map(n=>i6n(t,n)).reduce((n,i)=>Object.assign(Object.assign({},n),i),{}))},RMt=t=>{const{iconCls:e,componentCls:n,boxShadow:i,fontSizeLG:r,notificationMarginBottom:o,borderRadiusLG:s,colorSuccess:a,colorInfo:l,colorWarning:c,colorError:u,colorTextHeading:d,notificationBg:h,notificationPadding:f,notificationMarginEdge:m,notificationProgressBg:p,notificationProgressHeight:g,fontSize:y,lineHeight:_,width:w,notificationIconSize:C,colorText:N}=t,E=`${n}-notice`;return{position:"relative",marginBottom:o,marginInlineStart:"auto",background:h,borderRadius:s,boxShadow:i,[E]:{padding:f,width:w,maxWidth:`calc(100vw - ${xe(t.calc(m).mul(2).equal())})`,overflow:"hidden",lineHeight:_,wordWrap:"break-word"},[`${E}-message`]:{marginBottom:t.marginXS,color:d,fontSize:r,lineHeight:t.lineHeightLG},[`${E}-description`]:{fontSize:y,color:N},[`${E}-closable ${E}-message`]:{paddingInlineEnd:t.paddingLG},[`${E}-with-icon ${E}-message`]:{marginBottom:t.marginXS,marginInlineStart:t.calc(t.marginSM).add(C).equal(),fontSize:r},[`${E}-with-icon ${E}-description`]:{marginInlineStart:t.calc(t.marginSM).add(C).equal(),fontSize:y},[`${E}-icon`]:{position:"absolute",fontSize:C,lineHeight:1,[`&-success${e}`]:{color:a},[`&-info${e}`]:{color:l},[`&-warning${e}`]:{color:c},[`&-error${e}`]:{color:u}},[`${E}-close`]:Object.assign({position:"absolute",top:t.notificationPaddingVertical,insetInlineEnd:t.notificationPaddingHorizontal,color:t.colorIcon,outline:"none",width:t.notificationCloseButtonSize,height:t.notificationCloseButtonSize,borderRadius:t.borderRadiusSM,transition:`background-color ${t.motionDurationMid}, color ${t.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:t.colorIconHover,backgroundColor:t.colorBgTextHover},"&:active":{backgroundColor:t.colorBgTextActive}},j0(t)),[`${E}-progress`]:{position:"absolute",display:"block",appearance:"none",WebkitAppearance:"none",inlineSize:`calc(100% - ${xe(s)} * 2)`,left:{_skip_check_:!0,value:s},right:{_skip_check_:!0,value:s},bottom:0,blockSize:g,border:0,"&, &::-webkit-progress-bar":{borderRadius:s,backgroundColor:"rgba(0, 0, 0, 0.04)"},"&::-moz-progress-bar":{background:p},"&::-webkit-progress-value":{borderRadius:s,background:p}},[`${E}-btn`]:{float:"right",marginTop:t.marginSM}}},a6n=t=>{const{componentCls:e,notificationMarginBottom:n,notificationMarginEdge:i,motionDurationMid:r,motionEaseInOut:o}=t,s=`${e}-notice`,a=new so("antNotificationFadeOut",{"0%":{maxHeight:t.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[e]:Object.assign(Object.assign({},fo(t)),{position:"fixed",zIndex:t.zIndexPopup,marginRight:{value:i,_skip_check_:!0},[`${e}-hook-holder`]:{position:"relative"},[`${e}-fade-appear-prepare`]:{opacity:"0 !important"},[`${e}-fade-enter, ${e}-fade-appear`]:{animationDuration:t.motionDurationMid,animationTimingFunction:o,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${e}-fade-leave`]:{animationTimingFunction:o,animationFillMode:"both",animationDuration:r,animationPlayState:"paused"},[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationPlayState:"running"},[`${e}-fade-leave${e}-fade-leave-active`]:{animationName:a,animationPlayState:"running"},"&-rtl":{direction:"rtl",[`${s}-btn`]:{float:"left"}}})},{[e]:{[`${s}-wrapper`]:Object.assign({},RMt(t))}}]},PMt=t=>({zIndexPopup:t.zIndexPopupBase+zFe+50,width:384}),OMt=t=>{const e=t.paddingMD,n=t.paddingLG;return mr(t,{notificationBg:t.colorBgElevated,notificationPaddingVertical:e,notificationPaddingHorizontal:n,notificationIconSize:t.calc(t.fontSizeLG).mul(t.lineHeightLG).equal(),notificationCloseButtonSize:t.calc(t.controlHeightLG).mul(.55).equal(),notificationMarginBottom:t.margin,notificationPadding:`${xe(t.paddingMD)} ${xe(t.paddingContentHorizontalLG)}`,notificationMarginEdge:t.marginLG,animationMaxHeight:150,notificationStackLayer:3,notificationProgressHeight:2,notificationProgressBg:`linear-gradient(90deg, ${t.colorPrimaryBorderHover}, ${t.colorPrimary})`})},jMt=Jr("Notification",t=>{const e=OMt(t);return[a6n(e),e6n(e),s6n(e)]},PMt),l6n=$A(["Notification","PurePanel"],t=>{const e=`${t.componentCls}-notice`,n=OMt(t);return{[`${e}-pure-panel`]:Object.assign(Object.assign({},RMt(n)),{width:n.width,maxWidth:`calc(100vw - ${xe(t.calc(n.notificationMarginEdge).mul(2).equal())})`,margin:0})}},PMt);var c6n=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};function c6e(t,e){return e===null||e===!1?null:e||b.createElement(vb,{className:`${t}-close-icon`})}const u6n={success:VA,info:ehe,error:$S,warning:n6},FMt=t=>{const{prefixCls:e,icon:n,type:i,message:r,description:o,btn:s,role:a="alert"}=t;let l=null;return n?l=b.createElement("span",{className:`${e}-icon`},n):i&&(l=b.createElement(u6n[i]||null,{className:Me(`${e}-icon`,`${e}-icon-${i}`)})),b.createElement("div",{className:Me({[`${e}-with-icon`]:l}),role:a},l,b.createElement("div",{className:`${e}-message`},r),b.createElement("div",{className:`${e}-description`},o),s&&b.createElement("div",{className:`${e}-btn`},s))},d6n=t=>{const{prefixCls:e,className:n,icon:i,type:r,message:o,description:s,btn:a,closable:l=!0,closeIcon:c,className:u}=t,d=c6n(t,["prefixCls","className","icon","type","message","description","btn","closable","closeIcon","className"]),{getPrefixCls:h}=b.useContext(jn),f=e||h("notification"),m=`${f}-notice`,p=Il(f),[g,y,_]=jMt(f,p);return g(b.createElement("div",{className:Me(`${m}-pure-panel`,y,n,_,p)},b.createElement(l6n,{prefixCls:f}),b.createElement(Nkt,Object.assign({},d,{prefixCls:f,eventKey:"pure",duration:null,closable:l,className:Me({notificationClassName:u}),closeIcon:c6e(f,c),content:b.createElement(FMt,{prefixCls:m,icon:i,type:r,message:o,description:s,btn:a})}))))};function h6n(t,e,n){let i;switch(t){case"top":i={left:"50%",transform:"translateX(-50%)",right:"auto",top:e,bottom:"auto"};break;case"topLeft":i={left:0,top:e,bottom:"auto"};break;case"topRight":i={right:0,top:e,bottom:"auto"};break;case"bottom":i={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":i={left:0,top:"auto",bottom:n};break;default:i={right:0,top:"auto",bottom:n};break}return i}function f6n(t){return{motionName:`${t}-fade`}}var m6n=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const Xtt=24,p6n=4.5,g6n="topRight",b6n=t=>{let{children:e,prefixCls:n}=t;const i=Il(n),[r,o,s]=jMt(n,i);return r(Z.createElement(K4n,{classNames:{list:Me(o,s,i)}},e))},v6n=(t,e)=>{let{prefixCls:n,key:i}=e;return Z.createElement(b6n,{prefixCls:n,key:i},t)},y6n=Z.forwardRef((t,e)=>{const{top:n,bottom:i,prefixCls:r,getContainer:o,maxCount:s,rtl:a,onAllRemoved:l,stack:c,duration:u,pauseOnHover:d=!0,showProgress:h}=t,{getPrefixCls:f,getPopupContainer:m,notification:p,direction:g}=b.useContext(jn),[,y]=Sd(),_=r||f("notification"),w=k=>h6n(k,n??Xtt,i??Xtt),C=()=>Me({[`${_}-rtl`]:a??g==="rtl"}),N=()=>f6n(_),[E,D]=Q4n({prefixCls:_,style:w,className:C,motion:N,closable:!0,closeIcon:c6e(_),duration:u??p6n,getContainer:()=>(o==null?void 0:o())||(m==null?void 0:m())||document.body,maxCount:s,pauseOnHover:d,showProgress:h,onAllRemoved:l,renderNotifications:v6n,stack:c===!1?!1:{threshold:typeof c=="object"?c==null?void 0:c.threshold:void 0,offset:8,gap:y.margin}});return Z.useImperativeHandle(e,()=>Object.assign(Object.assign({},E),{prefixCls:_,notification:p})),D});function $Mt(t){const e=Z.useRef(null),n=Cr("Notification");return[Z.useMemo(()=>{const r=l=>{var c;if(!e.current){n(!1,"usage","You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.");return}const{open:u,prefixCls:d,notification:h}=e.current,f=`${d}-notice`,{message:m,description:p,icon:g,type:y,btn:_,className:w,style:C,role:N="alert",closeIcon:E,closable:D}=l,k=m6n(l,["message","description","icon","type","btn","className","style","role","closeIcon","closable"]),M=c6e(f,typeof E<"u"?E:h==null?void 0:h.closeIcon);return u(Object.assign(Object.assign({placement:(c=t==null?void 0:t.placement)!==null&&c!==void 0?c:g6n},k),{content:Z.createElement(FMt,{prefixCls:f,icon:g,type:y,message:m,description:p,btn:_,role:N}),className:Me(y&&`${f}-${y}`,w,h==null?void 0:h.className),style:Object.assign(Object.assign({},h==null?void 0:h.style),C),closeIcon:M,closable:D??!!M}))},s={open:r,destroy:l=>{var c,u;l!==void 0?(c=e.current)===null||c===void 0||c.close(l):(u=e.current)===null||u===void 0||u.destroy()}};return["success","info","warning","error"].forEach(l=>{s[l]=c=>r(Object.assign(Object.assign({},c),{type:l}))}),s},[]),Z.createElement(y6n,Object.assign({key:"notification-holder"},t,{ref:e}))]}function _6n(t){return $Mt(t)}const x6n=Z.createContext({});function VMt(t){return e=>b.createElement(Kv,{theme:{token:{motion:!1,zIndexPopupBase:0}}},b.createElement(t,Object.assign({},e)))}const BK=(t,e,n,i)=>VMt(o=>{const{prefixCls:s,style:a}=o,l=b.useRef(null),[c,u]=b.useState(0),[d,h]=b.useState(0),[f,m]=ho(!1,{value:o.open}),{getPrefixCls:p}=b.useContext(jn),g=p(e||"select",s);b.useEffect(()=>{if(m(!0),typeof ResizeObserver<"u"){const w=new ResizeObserver(N=>{const E=N[0].target;u(E.offsetHeight+8),h(E.offsetWidth)}),C=setInterval(()=>{var N;const E=n?`.${n(g)}`:`.${g}-dropdown`,D=(N=l.current)===null||N===void 0?void 0:N.querySelector(E);D&&(clearInterval(C),w.observe(D))},10);return()=>{clearInterval(C),w.disconnect()}}},[]);let y=Object.assign(Object.assign({},o),{style:Object.assign(Object.assign({},a),{margin:0}),open:f,visible:f,getPopupContainer:()=>l.current});i&&(y=i(y));const _={paddingBottom:c,position:"relative",minWidth:d};return b.createElement("div",{ref:l,style:_},b.createElement(t,Object.assign({},y)))}),fhe=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t==null?void 0:t.substr(0,4))};var mhe=function(e){var n=e.className,i=e.customizeIcon,r=e.customizeIconProps,o=e.children,s=e.onMouseDown,a=e.onClick,l=typeof i=="function"?i(r):i;return b.createElement("span",{className:n,onMouseDown:function(u){u.preventDefault(),s==null||s(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:a,"aria-hidden":!0},l!==void 0?l:b.createElement("span",{className:Me(n.split(/\s+/).map(function(c){return"".concat(c,"-icon")}))},o))},w6n=function(e,n,i,r,o){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,c=Z.useMemo(function(){if(Un(r)==="object")return r.clearIcon;if(o)return o},[r,o]),u=Z.useMemo(function(){return!!(!s&&r&&(i.length||a)&&!(l==="combobox"&&a===""))},[r,s,i.length,a,l]);return{allowClear:u,clearIcon:Z.createElement(mhe,{className:"".concat(e,"-clear"),onMouseDown:n,customizeIcon:c},"×")}},BMt=b.createContext(null);function C6n(){return b.useContext(BMt)}function S6n(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,e=b.useState(!1),n=He(e,2),i=n[0],r=n[1],o=b.useRef(null),s=function(){window.clearTimeout(o.current)};b.useEffect(function(){return s},[]);var a=function(c,u){s(),o.current=window.setTimeout(function(){r(c),u&&u()},t)};return[i,a,s]}function zMt(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,e=b.useRef(null),n=b.useRef(null);b.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function i(r){(r||e.current===null)&&(e.current=r),window.clearTimeout(n.current),n.current=window.setTimeout(function(){e.current=null},t)}return[function(){return e.current},i]}function N6n(t,e,n,i){var r=b.useRef(null);r.current={open:e,triggerOpen:n,customizedTrigger:i},b.useEffect(function(){function o(s){var a;if(!((a=r.current)!==null&&a!==void 0&&a.customizedTrigger)){var l=s.target;l.shadowRoot&&s.composed&&(l=s.composedPath()[0]||l),r.current.open&&t().filter(function(c){return c}).every(function(c){return!c.contains(l)&&c!==l})&&r.current.triggerOpen(!1)}}return window.addEventListener("mousedown",o),function(){return window.removeEventListener("mousedown",o)}},[])}function E6n(t){return![Wt.ESC,Wt.SHIFT,Wt.BACKSPACE,Wt.TAB,Wt.WIN_KEY,Wt.ALT,Wt.META,Wt.WIN_KEY_RIGHT,Wt.CTRL,Wt.SEMICOLON,Wt.EQUALS,Wt.CAPS_LOCK,Wt.CONTEXT_MENU,Wt.F1,Wt.F2,Wt.F3,Wt.F4,Wt.F5,Wt.F6,Wt.F7,Wt.F8,Wt.F9,Wt.F10,Wt.F11,Wt.F12].includes(t)}var D6n=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],jP=void 0;function k6n(t,e){var n=t.prefixCls,i=t.invalidate,r=t.item,o=t.renderItem,s=t.responsive,a=t.responsiveDisabled,l=t.registerSize,c=t.itemKey,u=t.className,d=t.style,h=t.children,f=t.display,m=t.order,p=t.component,g=p===void 0?"div":p,y=di(t,D6n),_=s&&!f;function w(k){l(c,k)}b.useEffect(function(){return function(){w(null)}},[]);var C=o&&r!==jP?o(r):h,N;i||(N={opacity:_?0:1,height:_?0:jP,overflowY:_?"hidden":jP,order:s?m:jP,pointerEvents:_?"none":jP,position:_?"absolute":jP});var E={};_&&(E["aria-hidden"]=!0);var D=b.createElement(g,lt({className:Me(!i&&n,u),style:Ie(Ie({},N),d)},E,y,{ref:e}),C);return s&&(D=b.createElement(Kd,{onResize:function(M){var T=M.offsetWidth;w(T)},disabled:a},D)),D}var I9=b.forwardRef(k6n);I9.displayName="Item";function M6n(t){if(typeof MessageChannel>"u")Dr(t);else{var e=new MessageChannel;e.port1.onmessage=function(){return t()},e.port2.postMessage(void 0)}}function L6n(){var t=b.useRef(null),e=function(i){t.current||(t.current=[],M6n(function(){Fc.unstable_batchedUpdates(function(){t.current.forEach(function(r){r()}),t.current=null})})),t.current.push(i)};return e}function DV(t,e){var n=b.useState(e),i=He(n,2),r=i[0],o=i[1],s=gr(function(a){t(function(){o(a)})});return[r,s]}var Kne=Z.createContext(null),T6n=["component"],I6n=["className"],A6n=["className"],R6n=function(e,n){var i=b.useContext(Kne);if(!i){var r=e.component,o=r===void 0?"div":r,s=di(e,T6n);return b.createElement(o,lt({},s,{ref:n}))}var a=i.className,l=di(i,I6n),c=e.className,u=di(e,A6n);return b.createElement(Kne.Provider,{value:null},b.createElement(I9,lt({ref:n,className:Me(a,c)},l,u)))},HMt=b.forwardRef(R6n);HMt.displayName="RawItem";var P6n=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],WMt="responsive",UMt="invalidate";function O6n(t){return"+ ".concat(t.length," ...")}function j6n(t,e){var n=t.prefixCls,i=n===void 0?"rc-overflow":n,r=t.data,o=r===void 0?[]:r,s=t.renderItem,a=t.renderRawItem,l=t.itemKey,c=t.itemWidth,u=c===void 0?10:c,d=t.ssr,h=t.style,f=t.className,m=t.maxCount,p=t.renderRest,g=t.renderRawRest,y=t.suffix,_=t.component,w=_===void 0?"div":_,C=t.itemComponent,N=t.onVisibleChange,E=di(t,P6n),D=d==="full",k=L6n(),M=DV(k,null),T=He(M,2),A=T[0],R=T[1],P=A||0,O=DV(k,new Map),V=He(O,2),F=V[0],$=V[1],B=DV(k,0),z=He(B,2),H=z[0],K=z[1],q=DV(k,0),U=He(q,2),Y=U[0],J=U[1],ae=DV(k,0),se=He(ae,2),oe=se[0],fe=se[1],de=b.useState(null),ie=He(de,2),Q=ie[0],be=ie[1],le=b.useState(null),Ne=He(le,2),Le=Ne[0],Te=Ne[1],De=b.useMemo(function(){return Le===null&&D?Number.MAX_SAFE_INTEGER:Le||0},[Le,A]),Pe=b.useState(!1),ge=He(Pe,2),he=ge[0],me=ge[1],X="".concat(i,"-item"),re=Math.max(H,Y),we=m===WMt,ue=o.length&&we,Ce=m===UMt,ze=ue||typeof m=="number"&&o.length>m,Ye=b.useMemo(function(){var en=o;return ue?A===null&&D?en=o:en=o.slice(0,Math.min(o.length,P/u)):typeof m=="number"&&(en=o.slice(0,m)),en},[o,u,A,m,ue]),Ke=b.useMemo(function(){return ue?o.slice(De+1):o.slice(Ye.length)},[o,Ye,ue,De]),Xe=b.useCallback(function(en,Ft){var dn;return typeof l=="function"?l(en):(dn=l&&(en==null?void 0:en[l]))!==null&&dn!==void 0?dn:Ft},[l]),it=b.useCallback(s||function(en){return en},[s]);function ut(en,Ft,dn){Le===en&&(Ft===void 0||Ft===Q)||(Te(en),dn||(me(en<o.length-1),N==null||N(en)),Ft!==void 0&&be(Ft))}function Ge(en,Ft){R(Ft.clientWidth)}function Ee(en,Ft){$(function(dn){var Ze=new Map(dn);return Ft===null?Ze.delete(en):Ze.set(en,Ft),Ze})}function Se(en,Ft){J(Ft),K(Y)}function je(en,Ft){fe(Ft)}function nt(en){return F.get(Xe(Ye[en],en))}Lr(function(){if(P&&typeof re=="number"&&Ye){var en=oe,Ft=Ye.length,dn=Ft-1;if(!Ft){ut(0,null);return}for(var Ze=0;Ze<Ft;Ze+=1){var dt=nt(Ze);if(D&&(dt=dt||0),dt===void 0){ut(Ze-1,void 0,!0);break}if(en+=dt,dn===0&&en<=P||Ze===dn-1&&en+nt(dn)<=P){ut(dn,null);break}else if(en+re>P){ut(Ze-1,en-dt-oe+Y);break}}y&&nt(0)+oe>P&&be(null)}},[P,F,Y,oe,Xe,Ye]);var rt=he&&!!Ke.length,St={};Q!==null&&ue&&(St={position:"absolute",left:Q,top:0});var At={prefixCls:X,responsive:ue,component:C,invalidate:Ce},Nt=a?function(en,Ft){var dn=Xe(en,Ft);return b.createElement(Kne.Provider,{key:dn,value:Ie(Ie({},At),{},{order:Ft,item:en,itemKey:dn,registerSize:Ee,display:Ft<=De})},a(en,Ft))}:function(en,Ft){var dn=Xe(en,Ft);return b.createElement(I9,lt({},At,{order:Ft,key:dn,item:en,renderItem:it,itemKey:dn,registerSize:Ee,display:Ft<=De}))},vt,$t={order:rt?De:Number.MAX_SAFE_INTEGER,className:"".concat(X,"-rest"),registerSize:Se,display:rt};if(g)g&&(vt=b.createElement(Kne.Provider,{value:Ie(Ie({},At),$t)},g(Ke)));else{var ln=p||O6n;vt=b.createElement(I9,lt({},At,$t),typeof ln=="function"?ln(Ke):ln)}var Jt=b.createElement(w,lt({className:Me(!Ce&&i,f),style:h,ref:e},E),Ye.map(Nt),ze?vt:null,y&&b.createElement(I9,lt({},At,{responsive:we,responsiveDisabled:!ue,order:De,className:"".concat(X,"-suffix"),registerSize:je,display:!0,style:St}),y));return we&&(Jt=b.createElement(Kd,{onResize:Ge,disabled:!ue},Jt)),Jt}var b0=b.forwardRef(j6n);b0.displayName="Overflow";b0.Item=HMt;b0.RESPONSIVE=WMt;b0.INVALIDATE=UMt;var F6n=function(e,n){var i,r=e.prefixCls,o=e.id,s=e.inputElement,a=e.disabled,l=e.tabIndex,c=e.autoFocus,u=e.autoComplete,d=e.editable,h=e.activeDescendantId,f=e.value,m=e.maxLength,p=e.onKeyDown,g=e.onMouseDown,y=e.onChange,_=e.onPaste,w=e.onCompositionStart,C=e.onCompositionEnd,N=e.open,E=e.attrs,D=s||b.createElement("input",null),k=D,M=k.ref,T=k.props,A=T.onKeyDown,R=T.onChange,P=T.onMouseDown,O=T.onCompositionStart,V=T.onCompositionEnd,F=T.style;return I0(!("maxLength"in D.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),D=b.cloneElement(D,Ie(Ie(Ie({type:"search"},T),{},{id:o,ref:Vu(n,M),disabled:a,tabIndex:l,autoComplete:u||"off",autoFocus:c,className:Me("".concat(r,"-selection-search-input"),(i=D)===null||i===void 0||(i=i.props)===null||i===void 0?void 0:i.className),role:"combobox","aria-expanded":N||!1,"aria-haspopup":"listbox","aria-owns":"".concat(o,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(o,"_list"),"aria-activedescendant":N?h:void 0},E),{},{value:d?f:"",maxLength:m,readOnly:!d,unselectable:d?null:"on",style:Ie(Ie({},F),{},{opacity:d?null:0}),onKeyDown:function(B){p(B),A&&A(B)},onMouseDown:function(B){g(B),P&&P(B)},onChange:function(B){y(B),R&&R(B)},onCompositionStart:function(B){w(B),O&&O(B)},onCompositionEnd:function(B){C(B),V&&V(B)},onPaste:_})),D},u6e=b.forwardRef(F6n);u6e.displayName="Input";function d6e(t){return Array.isArray(t)?t:t!==void 0?[t]:[]}var $6n=typeof window<"u"&&window.document&&window.document.documentElement,V6n=$6n;function B6n(t){return t!=null}function z6n(t){return!t&&t!==0}function Ztt(t){return["string","number"].includes(Un(t))}function KMt(t){var e=void 0;return t&&(Ztt(t.title)?e=t.title.toString():Ztt(t.label)&&(e=t.label.toString())),e}function H6n(t,e){V6n?b.useLayoutEffect(t,e):b.useEffect(t,e)}function W6n(t){var e;return(e=t.key)!==null&&e!==void 0?e:t.value}var Qtt=function(e){e.preventDefault(),e.stopPropagation()},U6n=function(e){var n=e.id,i=e.prefixCls,r=e.values,o=e.open,s=e.searchValue,a=e.autoClearSearchValue,l=e.inputRef,c=e.placeholder,u=e.disabled,d=e.mode,h=e.showSearch,f=e.autoFocus,m=e.autoComplete,p=e.activeDescendantId,g=e.tabIndex,y=e.removeIcon,_=e.maxTagCount,w=e.maxTagTextLength,C=e.maxTagPlaceholder,N=C===void 0?function(be){return"+ ".concat(be.length," ...")}:C,E=e.tagRender,D=e.onToggleOpen,k=e.onRemove,M=e.onInputChange,T=e.onInputPaste,A=e.onInputKeyDown,R=e.onInputMouseDown,P=e.onInputCompositionStart,O=e.onInputCompositionEnd,V=b.useRef(null),F=b.useState(0),$=He(F,2),B=$[0],z=$[1],H=b.useState(!1),K=He(H,2),q=K[0],U=K[1],Y="".concat(i,"-selection"),J=o||d==="multiple"&&a===!1||d==="tags"?s:"",ae=d==="tags"||d==="multiple"&&a===!1||h&&(o||q);H6n(function(){z(V.current.scrollWidth)},[J]);var se=function(le,Ne,Le,Te,De){return b.createElement("span",{title:KMt(le),className:Me("".concat(Y,"-item"),ye({},"".concat(Y,"-item-disabled"),Le))},b.createElement("span",{className:"".concat(Y,"-item-content")},Ne),Te&&b.createElement(mhe,{className:"".concat(Y,"-item-remove"),onMouseDown:Qtt,onClick:De,customizeIcon:y},"×"))},oe=function(le,Ne,Le,Te,De,Pe){var ge=function(me){Qtt(me),D(!o)};return b.createElement("span",{onMouseDown:ge},E({label:Ne,value:le,disabled:Le,closable:Te,onClose:De,isMaxTag:!!Pe}))},fe=function(le){var Ne=le.disabled,Le=le.label,Te=le.value,De=!u&&!Ne,Pe=Le;if(typeof w=="number"&&(typeof Le=="string"||typeof Le=="number")){var ge=String(Pe);ge.length>w&&(Pe="".concat(ge.slice(0,w),"..."))}var he=function(X){X&&X.stopPropagation(),k(le)};return typeof E=="function"?oe(Te,Pe,Ne,De,he):se(le,Pe,Ne,De,he)},de=function(le){var Ne=typeof N=="function"?N(le):N;return typeof E=="function"?oe(void 0,Ne,!1,!1,void 0,!0):se({title:Ne},Ne,!1)},ie=b.createElement("div",{className:"".concat(Y,"-search"),style:{width:B},onFocus:function(){U(!0)},onBlur:function(){U(!1)}},b.createElement(u6e,{ref:l,open:o,prefixCls:i,id:n,inputElement:null,disabled:u,autoFocus:f,autoComplete:m,editable:ae,activeDescendantId:p,value:J,onKeyDown:A,onMouseDown:R,onChange:M,onPaste:T,onCompositionStart:P,onCompositionEnd:O,tabIndex:g,attrs:Ll(e,!0)}),b.createElement("span",{ref:V,className:"".concat(Y,"-search-mirror"),"aria-hidden":!0},J," ")),Q=b.createElement(b0,{prefixCls:"".concat(Y,"-overflow"),data:r,renderItem:fe,renderRest:de,suffix:ie,itemKey:W6n,maxCount:_});return b.createElement(b.Fragment,null,Q,!r.length&&!J&&b.createElement("span",{className:"".concat(Y,"-placeholder")},c))},K6n=function(e){var n=e.inputElement,i=e.prefixCls,r=e.id,o=e.inputRef,s=e.disabled,a=e.autoFocus,l=e.autoComplete,c=e.activeDescendantId,u=e.mode,d=e.open,h=e.values,f=e.placeholder,m=e.tabIndex,p=e.showSearch,g=e.searchValue,y=e.activeValue,_=e.maxLength,w=e.onInputKeyDown,C=e.onInputMouseDown,N=e.onInputChange,E=e.onInputPaste,D=e.onInputCompositionStart,k=e.onInputCompositionEnd,M=e.title,T=b.useState(!1),A=He(T,2),R=A[0],P=A[1],O=u==="combobox",V=O||p,F=h[0],$=g||"";O&&y&&!R&&($=y),b.useEffect(function(){O&&P(!1)},[O,y]);var B=u!=="combobox"&&!d&&!p?!1:!!$,z=M===void 0?KMt(F):M,H=b.useMemo(function(){return F?null:b.createElement("span",{className:"".concat(i,"-selection-placeholder"),style:B?{visibility:"hidden"}:void 0},f)},[F,B,f,i]);return b.createElement(b.Fragment,null,b.createElement("span",{className:"".concat(i,"-selection-search")},b.createElement(u6e,{ref:o,prefixCls:i,id:r,open:d,inputElement:n,disabled:s,autoFocus:a,autoComplete:l,editable:V,activeDescendantId:c,value:$,onKeyDown:w,onMouseDown:C,onChange:function(q){P(!0),N(q)},onPaste:E,onCompositionStart:D,onCompositionEnd:k,tabIndex:m,attrs:Ll(e,!0),maxLength:O?_:void 0})),!O&&F?b.createElement("span",{className:"".concat(i,"-selection-item"),title:z,style:B?{visibility:"hidden"}:void 0},F.label):null,H)},q6n=function(e,n){var i=b.useRef(null),r=b.useRef(!1),o=e.prefixCls,s=e.open,a=e.mode,l=e.showSearch,c=e.tokenWithEnter,u=e.disabled,d=e.autoClearSearchValue,h=e.onSearch,f=e.onSearchSubmit,m=e.onToggleOpen,p=e.onInputKeyDown,g=e.domRef;b.useImperativeHandle(n,function(){return{focus:function(B){i.current.focus(B)},blur:function(){i.current.blur()}}});var y=zMt(0),_=He(y,2),w=_[0],C=_[1],N=function(B){var z=B.which;(z===Wt.UP||z===Wt.DOWN)&&B.preventDefault(),p&&p(B),z===Wt.ENTER&&a==="tags"&&!r.current&&!s&&(f==null||f(B.target.value)),E6n(z)&&m(!0)},E=function(){C(!0)},D=b.useRef(null),k=function(B){h(B,!0,r.current)!==!1&&m(!0)},M=function(){r.current=!0},T=function(B){r.current=!1,a!=="combobox"&&k(B.target.value)},A=function(B){var z=B.target.value;if(c&&D.current&&/[\r\n]/.test(D.current)){var H=D.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");z=z.replace(H,D.current)}D.current=null,k(z)},R=function(B){var z=B.clipboardData,H=z==null?void 0:z.getData("text");D.current=H||""},P=function(B){var z=B.target;if(z!==i.current){var H=document.body.style.msTouchAction!==void 0;H?setTimeout(function(){i.current.focus()}):i.current.focus()}},O=function(B){var z=w();B.target!==i.current&&!z&&!(a==="combobox"&&u)&&B.preventDefault(),(a!=="combobox"&&(!l||!z)||!s)&&(s&&d!==!1&&h("",!0,!1),m())},V={inputRef:i,onInputKeyDown:N,onInputMouseDown:E,onInputChange:A,onInputPaste:R,onInputCompositionStart:M,onInputCompositionEnd:T},F=a==="multiple"||a==="tags"?b.createElement(U6n,lt({},e,V)):b.createElement(K6n,lt({},e,V));return b.createElement("div",{ref:g,className:"".concat(o,"-selector"),onClick:P,onMouseDown:O},F)},qMt=b.forwardRef(q6n);qMt.displayName="Selector";function G6n(t){var e=t.prefixCls,n=t.align,i=t.arrow,r=t.arrowPos,o=i||{},s=o.className,a=o.content,l=r.x,c=l===void 0?0:l,u=r.y,d=u===void 0?0:u,h=b.useRef();if(!n||!n.points)return null;var f={position:"absolute"};if(n.autoArrow!==!1){var m=n.points[0],p=n.points[1],g=m[0],y=m[1],_=p[0],w=p[1];g===_||!["t","b"].includes(g)?f.top=d:g==="t"?f.top=0:f.bottom=0,y===w||!["l","r"].includes(y)?f.left=c:y==="l"?f.left=0:f.right=0}return b.createElement("div",{ref:h,className:Me("".concat(e,"-arrow"),s),style:f},a)}function Y6n(t){var e=t.prefixCls,n=t.open,i=t.zIndex,r=t.mask,o=t.motion;return r?b.createElement(Ou,lt({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(s){var a=s.className;return b.createElement("div",{style:{zIndex:i},className:Me("".concat(e,"-mask"),a)})}):null}var GMt=b.memo(function(t){var e=t.children;return e},function(t,e){return e.cache});GMt.displayName="PopupContent";var YMt=b.forwardRef(function(t,e){var n=t.popup,i=t.className,r=t.prefixCls,o=t.style,s=t.target,a=t.onVisibleChanged,l=t.open,c=t.keepDom,u=t.fresh,d=t.onClick,h=t.mask,f=t.arrow,m=t.arrowPos,p=t.align,g=t.motion,y=t.maskMotion,_=t.forceRender,w=t.getPopupContainer,C=t.autoDestroy,N=t.portal,E=t.zIndex,D=t.onMouseEnter,k=t.onMouseLeave,M=t.onPointerEnter,T=t.ready,A=t.offsetX,R=t.offsetY,P=t.offsetR,O=t.offsetB,V=t.onAlign,F=t.onPrepare,$=t.stretch,B=t.targetWidth,z=t.targetHeight,H=typeof n=="function"?n():n,K=l||c,q=(w==null?void 0:w.length)>0,U=b.useState(!w||!q),Y=He(U,2),J=Y[0],ae=Y[1];if(Lr(function(){!J&&q&&s&&ae(!0)},[J,q,s]),!J)return null;var se="auto",oe={left:"-1000vw",top:"-1000vh",right:se,bottom:se};if(T||!l){var fe,de=p.points,ie=p.dynamicInset||((fe=p._experimental)===null||fe===void 0?void 0:fe.dynamicInset),Q=ie&&de[0][1]==="r",be=ie&&de[0][0]==="b";Q?(oe.right=P,oe.left=se):(oe.left=A,oe.right=se),be?(oe.bottom=O,oe.top=se):(oe.top=R,oe.bottom=se)}var le={};return $&&($.includes("height")&&z?le.height=z:$.includes("minHeight")&&z&&(le.minHeight=z),$.includes("width")&&B?le.width=B:$.includes("minWidth")&&B&&(le.minWidth=B)),l||(le.pointerEvents="none"),b.createElement(N,{open:_||K,getContainer:w&&function(){return w(s)},autoDestroy:C},b.createElement(Y6n,{prefixCls:r,open:l,zIndex:E,mask:h,motion:y}),b.createElement(Kd,{onResize:V,disabled:!l},function(Ne){return b.createElement(Ou,lt({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:_,leavedClassName:"".concat(r,"-hidden")},g,{onAppearPrepare:F,onEnterPrepare:F,visible:l,onVisibleChanged:function(Te){var De;g==null||(De=g.onVisibleChanged)===null||De===void 0||De.call(g,Te),a(Te)}}),function(Le,Te){var De=Le.className,Pe=Le.style,ge=Me(r,De,i);return b.createElement("div",{ref:Vu(Ne,e,Te),className:ge,style:Ie(Ie(Ie(Ie({"--arrow-x":"".concat(m.x||0,"px"),"--arrow-y":"".concat(m.y||0,"px")},oe),le),Pe),{},{boxSizing:"border-box",zIndex:E},o),onMouseEnter:D,onMouseLeave:k,onPointerEnter:M,onClick:d},f&&b.createElement(G6n,{prefixCls:r,arrow:f,arrowPos:m,align:p}),b.createElement(GMt,{cache:!l&&!u},H))})}))});YMt.displayName="Popup";var XMt=b.forwardRef(function(t,e){var n=t.children,i=t.getTriggerDOMNode,r=P0(n),o=b.useCallback(function(a){jz(e,i?i(a):a)},[i]),s=jS(o,n.ref);return r?b.cloneElement(n,{ref:s}):n});XMt.displayName="TriggerWrapper";var Jtt=b.createContext(null);function ent(t){return t?Array.isArray(t)?t:[t]:[]}function X6n(t,e,n,i){return b.useMemo(function(){var r=ent(n??e),o=ent(i??e),s=new Set(r),a=new Set(o);return t&&(s.has("hover")&&(s.delete("hover"),s.add("click")),a.has("hover")&&(a.delete("hover"),a.add("click"))),[s,a]},[t,e,n,i])}function Z6n(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function Q6n(t,e,n,i){for(var r=n.points,o=Object.keys(t),s=0;s<o.length;s+=1){var a,l=o[s];if(Z6n((a=t[l])===null||a===void 0?void 0:a.points,r,i))return"".concat(e,"-placement-").concat(l)}return""}function tnt(t,e,n,i){return e||(n?{motionName:"".concat(t,"-").concat(n)}:i?{motionName:i}:null)}function zK(t){return t.ownerDocument.defaultView}function YDe(t){for(var e=[],n=t==null?void 0:t.parentElement,i=["hidden","scroll","clip","auto"];n;){var r=zK(n).getComputedStyle(n),o=r.overflowX,s=r.overflowY,a=r.overflow;[o,s,a].some(function(l){return i.includes(l)})&&e.push(n),n=n.parentElement}return e}function Hz(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(t)?e:t}function kV(t){return Hz(parseFloat(t),0)}function nnt(t,e){var n=Ie({},t);return(e||[]).forEach(function(i){if(!(i instanceof HTMLBodyElement||i instanceof HTMLHtmlElement)){var r=zK(i).getComputedStyle(i),o=r.overflow,s=r.overflowClipMargin,a=r.borderTopWidth,l=r.borderBottomWidth,c=r.borderLeftWidth,u=r.borderRightWidth,d=i.getBoundingClientRect(),h=i.offsetHeight,f=i.clientHeight,m=i.offsetWidth,p=i.clientWidth,g=kV(a),y=kV(l),_=kV(c),w=kV(u),C=Hz(Math.round(d.width/m*1e3)/1e3),N=Hz(Math.round(d.height/h*1e3)/1e3),E=(m-p-_-w)*C,D=(h-f-g-y)*N,k=g*N,M=y*N,T=_*C,A=w*C,R=0,P=0;if(o==="clip"){var O=kV(s);R=O*C,P=O*N}var V=d.x+T-R,F=d.y+k-P,$=V+d.width+2*R-T-A-E,B=F+d.height+2*P-k-M-D;n.left=Math.max(n.left,V),n.top=Math.max(n.top,F),n.right=Math.min(n.right,$),n.bottom=Math.min(n.bottom,B)}}),n}function int(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(e),i=n.match(/^(.*)\%$/);return i?t*(parseFloat(i[1])/100):parseFloat(n)}function rnt(t,e){var n=e||[],i=He(n,2),r=i[0],o=i[1];return[int(t.width,r),int(t.height,o)]}function ont(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[t[0],t[1]]}function FP(t,e){var n=e[0],i=e[1],r,o;return n==="t"?o=t.y:n==="b"?o=t.y+t.height:o=t.y+t.height/2,i==="l"?r=t.x:i==="r"?r=t.x+t.width:r=t.x+t.width/2,{x:r,y:o}}function TN(t,e){var n={t:"b",b:"t",l:"r",r:"l"};return t.map(function(i,r){return r===e?n[i]||"c":i}).join("")}function J6n(t,e,n,i,r,o,s){var a=b.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:r[i]||{}}),l=He(a,2),c=l[0],u=l[1],d=b.useRef(0),h=b.useMemo(function(){return e?YDe(e):[]},[e]),f=b.useRef({}),m=function(){f.current={}};t||m();var p=gr(function(){if(e&&n&&t){let Pr=function(zu,Ms){var Jl=arguments.length>2&&arguments[2]!==void 0?arguments[2]:re,Hu=Y.x+zu,sg=Y.y+Ms,yc=Hu+be,nl=sg+Q,Vi=Math.max(Hu,Jl.left),tr=Math.max(sg,Jl.top),Uo=Math.min(yc,Jl.right),Js=Math.min(nl,Jl.bottom);return Math.max(0,(Uo-Vi)*(Js-tr))},bi=function(){ht=Y.y+dn,qe=ht+Q,ft=Y.x+Ft,Ct=ft+be};var _,w,C,N,E=e,D=E.ownerDocument,k=zK(E),M=k.getComputedStyle(E),T=M.width,A=M.height,R=M.position,P=E.style.left,O=E.style.top,V=E.style.right,F=E.style.bottom,$=E.style.overflow,B=Ie(Ie({},r[i]),o),z=D.createElement("div");(_=E.parentElement)===null||_===void 0||_.appendChild(z),z.style.left="".concat(E.offsetLeft,"px"),z.style.top="".concat(E.offsetTop,"px"),z.style.position=R,z.style.height="".concat(E.offsetHeight,"px"),z.style.width="".concat(E.offsetWidth,"px"),E.style.left="0",E.style.top="0",E.style.right="auto",E.style.bottom="auto",E.style.overflow="hidden";var H;if(Array.isArray(n))H={x:n[0],y:n[1],width:0,height:0};else{var K,q,U=n.getBoundingClientRect();U.x=(K=U.x)!==null&&K!==void 0?K:U.left,U.y=(q=U.y)!==null&&q!==void 0?q:U.top,H={x:U.x,y:U.y,width:U.width,height:U.height}}var Y=E.getBoundingClientRect();Y.x=(w=Y.x)!==null&&w!==void 0?w:Y.left,Y.y=(C=Y.y)!==null&&C!==void 0?C:Y.top;var J=D.documentElement,ae=J.clientWidth,se=J.clientHeight,oe=J.scrollWidth,fe=J.scrollHeight,de=J.scrollTop,ie=J.scrollLeft,Q=Y.height,be=Y.width,le=H.height,Ne=H.width,Le={left:0,top:0,right:ae,bottom:se},Te={left:-ie,top:-de,right:oe-ie,bottom:fe-de},De=B.htmlRegion,Pe="visible",ge="visibleFirst";De!=="scroll"&&De!==ge&&(De=Pe);var he=De===ge,me=nnt(Te,h),X=nnt(Le,h),re=De===Pe?X:me,we=he?X:re;E.style.left="auto",E.style.top="auto",E.style.right="0",E.style.bottom="0";var ue=E.getBoundingClientRect();E.style.left=P,E.style.top=O,E.style.right=V,E.style.bottom=F,E.style.overflow=$,(N=E.parentElement)===null||N===void 0||N.removeChild(z);var Ce=Hz(Math.round(be/parseFloat(T)*1e3)/1e3),ze=Hz(Math.round(Q/parseFloat(A)*1e3)/1e3);if(Ce===0||ze===0||Oz(n)&&!r6(n))return;var Ye=B.offset,Ke=B.targetOffset,Xe=rnt(Y,Ye),it=He(Xe,2),ut=it[0],Ge=it[1],Ee=rnt(H,Ke),Se=He(Ee,2),je=Se[0],nt=Se[1];H.x-=je,H.y-=nt;var rt=B.points||[],St=He(rt,2),At=St[0],Nt=St[1],vt=ont(Nt),$t=ont(At),ln=FP(H,vt),Jt=FP(Y,$t),en=Ie({},B),Ft=ln.x-Jt.x+ut,dn=ln.y-Jt.y+Ge,Ze=Pr(Ft,dn),dt=Pr(Ft,dn,X),at=FP(H,["t","l"]),mt=FP(Y,["t","l"]),It=FP(H,["b","r"]),Ve=FP(Y,["b","r"]),bt=B.overflow||{},wt=bt.adjustX,$e=bt.adjustY,We=bt.shiftX,tt=bt.shiftY,_t=function(Ms){return typeof Ms=="boolean"?Ms:Ms>=0},ht,qe,ft,Ct;bi();var Pt=_t($e),an=$t[0]===vt[0];if(Pt&&$t[0]==="t"&&(qe>we.bottom||f.current.bt)){var _n=dn;an?_n-=Q-le:_n=at.y-Ve.y-Ge;var on=Pr(Ft,_n),yn=Pr(Ft,_n,X);on>Ze||on===Ze&&(!he||yn>=dt)?(f.current.bt=!0,dn=_n,Ge=-Ge,en.points=[TN($t,0),TN(vt,0)]):f.current.bt=!1}if(Pt&&$t[0]==="b"&&(ht<we.top||f.current.tb)){var fi=dn;an?fi+=Q-le:fi=It.y-mt.y-Ge;var oi=Pr(Ft,fi),Qi=Pr(Ft,fi,X);oi>Ze||oi===Ze&&(!he||Qi>=dt)?(f.current.tb=!0,dn=fi,Ge=-Ge,en.points=[TN($t,0),TN(vt,0)]):f.current.tb=!1}var mi=_t(wt),Vr=$t[1]===vt[1];if(mi&&$t[1]==="l"&&(Ct>we.right||f.current.rl)){var _i=Ft;Vr?_i-=be-Ne:_i=at.x-Ve.x-ut;var ur=Pr(_i,dn),si=Pr(_i,dn,X);ur>Ze||ur===Ze&&(!he||si>=dt)?(f.current.rl=!0,Ft=_i,ut=-ut,en.points=[TN($t,1),TN(vt,1)]):f.current.rl=!1}if(mi&&$t[1]==="r"&&(ft<we.left||f.current.lr)){var Ii=Ft;Vr?Ii+=be-Ne:Ii=It.x-mt.x-ut;var Si=Pr(Ii,dn),To=Pr(Ii,dn,X);Si>Ze||Si===Ze&&(!he||To>=dt)?(f.current.lr=!0,Ft=Ii,ut=-ut,en.points=[TN($t,1),TN(vt,1)]):f.current.lr=!1}bi();var ts=We===!0?0:We;typeof ts=="number"&&(ft<X.left&&(Ft-=ft-X.left-ut,H.x+Ne<X.left+ts&&(Ft+=H.x-X.left+Ne-ts)),Ct>X.right&&(Ft-=Ct-X.right-ut,H.x>X.right-ts&&(Ft+=H.x-X.right+ts)));var La=tt===!0?0:tt;typeof La=="number"&&(ht<X.top&&(dn-=ht-X.top-Ge,H.y+le<X.top+La&&(dn+=H.y-X.top+le-La)),qe>X.bottom&&(dn-=qe-X.bottom-Ge,H.y>X.bottom-La&&(dn+=H.y-X.bottom+La)));var pc=Y.x+Ft,gc=pc+be,ca=Y.y+dn,Nr=ca+Q,$i=H.x,us=$i+Ne,fr=H.y,Gi=fr+le,zn=Math.max(pc,$i),pi=Math.min(gc,us),Tr=(zn+pi)/2,vs=Tr-pc,ua=Math.max(ca,fr),Al=Math.min(Nr,Gi),bc=(ua+Al)/2,vc=bc-ca;s==null||s(e,en);var Hn=ue.right-Y.x-(Ft+Y.width),cn=ue.bottom-Y.y-(dn+Y.height);Ce===1&&(Ft=Math.round(Ft),Hn=Math.round(Hn)),ze===1&&(dn=Math.round(dn),cn=Math.round(cn));var Ui={ready:!0,offsetX:Ft/Ce,offsetY:dn/ze,offsetR:Hn/Ce,offsetB:cn/ze,arrowX:vs/Ce,arrowY:vc/ze,scaleX:Ce,scaleY:ze,align:en};u(Ui)}}),g=function(){d.current+=1;var w=d.current;Promise.resolve().then(function(){d.current===w&&p()})},y=function(){u(function(w){return Ie(Ie({},w),{},{ready:!1})})};return Lr(y,[i]),Lr(function(){t||y()},[t]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,g]}function e$n(t,e,n,i,r){Lr(function(){if(t&&e&&n){let d=function(){i(),r()};var o=e,s=n,a=YDe(o),l=YDe(s),c=zK(s),u=new Set([c].concat(Ot(a),Ot(l)));return u.forEach(function(h){h.addEventListener("scroll",d,{passive:!0})}),c.addEventListener("resize",d,{passive:!0}),i(),function(){u.forEach(function(h){h.removeEventListener("scroll",d),c.removeEventListener("resize",d)})}}},[t,e,n])}function t$n(t,e,n,i,r,o,s,a){var l=b.useRef(t);l.current=t,b.useEffect(function(){if(e&&i&&(!r||o)){var c=function(y){var _;l.current&&!s(((_=y.composedPath)===null||_===void 0||(_=_.call(y))===null||_===void 0?void 0:_[0])||y.target)&&a(!1)},u=zK(i);u.addEventListener("mousedown",c,!0),u.addEventListener("contextmenu",c,!0);var d=Wne(n);d&&(d.addEventListener("mousedown",c,!0),d.addEventListener("contextmenu",c,!0));{var h,f,m=n==null||(h=n.getRootNode)===null||h===void 0?void 0:h.call(n),p=(f=i.getRootNode)===null||f===void 0?void 0:f.call(i);I0(m===p,"trigger element and popup element should in same shadow root.")}return function(){u.removeEventListener("mousedown",c,!0),u.removeEventListener("contextmenu",c,!0),d&&(d.removeEventListener("mousedown",c,!0),d.removeEventListener("contextmenu",c,!0))}}},[e,n,i,r,o])}var n$n=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function i$n(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:l6,e=b.forwardRef(function(n,i){var r=n.prefixCls,o=r===void 0?"rc-trigger-popup":r,s=n.children,a=n.action,l=a===void 0?"hover":a,c=n.showAction,u=n.hideAction,d=n.popupVisible,h=n.defaultPopupVisible,f=n.onPopupVisibleChange,m=n.afterPopupVisibleChange,p=n.mouseEnterDelay,g=n.mouseLeaveDelay,y=g===void 0?.1:g,_=n.focusDelay,w=n.blurDelay,C=n.mask,N=n.maskClosable,E=N===void 0?!0:N,D=n.getPopupContainer,k=n.forceRender,M=n.autoDestroy,T=n.destroyPopupOnHide,A=n.popup,R=n.popupClassName,P=n.popupStyle,O=n.popupPlacement,V=n.builtinPlacements,F=V===void 0?{}:V,$=n.popupAlign,B=n.zIndex,z=n.stretch,H=n.getPopupClassNameFromAlign,K=n.fresh,q=n.alignPoint,U=n.onPopupClick,Y=n.onPopupAlign,J=n.arrow,ae=n.popupMotion,se=n.maskMotion,oe=n.popupTransitionName,fe=n.popupAnimation,de=n.maskTransitionName,ie=n.maskAnimation,Q=n.className,be=n.getTriggerDOMNode,le=di(n,n$n),Ne=M||T||!1,Le=b.useState(!1),Te=He(Le,2),De=Te[0],Pe=Te[1];Lr(function(){Pe(fhe())},[]);var ge=b.useRef({}),he=b.useContext(Jtt),me=b.useMemo(function(){return{registerSubPopup:function(tr,Uo){ge.current[tr]=Uo,he==null||he.registerSubPopup(tr,Uo)}}},[he]),X=iMt(),re=b.useState(null),we=He(re,2),ue=we[0],Ce=we[1],ze=b.useRef(null),Ye=gr(function(Vi){ze.current=Vi,Oz(Vi)&&ue!==Vi&&Ce(Vi),he==null||he.registerSubPopup(X,Vi)}),Ke=b.useState(null),Xe=He(Ke,2),it=Xe[0],ut=Xe[1],Ge=b.useRef(null),Ee=gr(function(Vi){Oz(Vi)&&it!==Vi&&(ut(Vi),Ge.current=Vi)}),Se=b.Children.only(s),je=(Se==null?void 0:Se.props)||{},nt={},rt=gr(function(Vi){var tr,Uo,Js=it;return(Js==null?void 0:Js.contains(Vi))||((tr=Wne(Js))===null||tr===void 0?void 0:tr.host)===Vi||Vi===Js||(ue==null?void 0:ue.contains(Vi))||((Uo=Wne(ue))===null||Uo===void 0?void 0:Uo.host)===Vi||Vi===ue||Object.values(ge.current).some(function(vl){return(vl==null?void 0:vl.contains(Vi))||Vi===vl})}),St=tnt(o,ae,fe,oe),At=tnt(o,se,ie,de),Nt=b.useState(h||!1),vt=He(Nt,2),$t=vt[0],ln=vt[1],Jt=d??$t,en=gr(function(Vi){d===void 0&&ln(Vi)});Lr(function(){ln(d||!1)},[d]);var Ft=b.useRef(Jt);Ft.current=Jt;var dn=b.useRef([]);dn.current=[];var Ze=gr(function(Vi){var tr;en(Vi),((tr=dn.current[dn.current.length-1])!==null&&tr!==void 0?tr:Jt)!==Vi&&(dn.current.push(Vi),f==null||f(Vi))}),dt=b.useRef(),at=function(){clearTimeout(dt.current)},mt=function(tr){var Uo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;at(),Uo===0?Ze(tr):dt.current=setTimeout(function(){Ze(tr)},Uo*1e3)};b.useEffect(function(){return at},[]);var It=b.useState(!1),Ve=He(It,2),bt=Ve[0],wt=Ve[1];Lr(function(Vi){(!Vi||Jt)&&wt(!0)},[Jt]);var $e=b.useState(null),We=He($e,2),tt=We[0],_t=We[1],ht=b.useState(null),qe=He(ht,2),ft=qe[0],Ct=qe[1],Pt=function(tr){Ct([tr.clientX,tr.clientY])},an=J6n(Jt,ue,q&&ft!==null?ft:it,O,F,$,Y),_n=He(an,11),on=_n[0],yn=_n[1],fi=_n[2],oi=_n[3],Qi=_n[4],mi=_n[5],Vr=_n[6],_i=_n[7],ur=_n[8],si=_n[9],Ii=_n[10],Si=X6n(De,l,c,u),To=He(Si,2),ts=To[0],La=To[1],pc=ts.has("click"),gc=La.has("click")||La.has("contextMenu"),ca=gr(function(){bt||Ii()}),Nr=function(){Ft.current&&q&&gc&&mt(!1)};e$n(Jt,it,ue,ca,Nr),Lr(function(){ca()},[ft,O]),Lr(function(){Jt&&!(F!=null&&F[O])&&ca()},[JSON.stringify($)]);var $i=b.useMemo(function(){var Vi=Q6n(F,o,si,q);return Me(Vi,H==null?void 0:H(si))},[si,H,F,o,q]);b.useImperativeHandle(i,function(){return{nativeElement:Ge.current,popupElement:ze.current,forceAlign:ca}});var us=b.useState(0),fr=He(us,2),Gi=fr[0],zn=fr[1],pi=b.useState(0),Tr=He(pi,2),vs=Tr[0],ua=Tr[1],Al=function(){if(z&&it){var tr=it.getBoundingClientRect();zn(tr.width),ua(tr.height)}},bc=function(){Al(),ca()},vc=function(tr){wt(!1),Ii(),m==null||m(tr)},Hn=function(){return new Promise(function(tr){Al(),_t(function(){return tr})})};Lr(function(){tt&&(Ii(),tt(),_t(null))},[tt]);function cn(Vi,tr,Uo,Js){nt[Vi]=function(vl){var ty;Js==null||Js(vl),mt(tr,Uo);for(var ny=arguments.length,TM=new Array(ny>1?ny-1:0),ag=1;ag<ny;ag++)TM[ag-1]=arguments[ag];(ty=je[Vi])===null||ty===void 0||ty.call.apply(ty,[je,vl].concat(TM))}}(pc||gc)&&(nt.onClick=function(Vi){var tr;Ft.current&&gc?mt(!1):!Ft.current&&pc&&(Pt(Vi),mt(!0));for(var Uo=arguments.length,Js=new Array(Uo>1?Uo-1:0),vl=1;vl<Uo;vl++)Js[vl-1]=arguments[vl];(tr=je.onClick)===null||tr===void 0||tr.call.apply(tr,[je,Vi].concat(Js))}),t$n(Jt,gc,it,ue,C,E,rt,mt);var Ui=ts.has("hover"),Pr=La.has("hover"),bi,zu;Ui&&(cn("onMouseEnter",!0,p,function(Vi){Pt(Vi)}),cn("onPointerEnter",!0,p,function(Vi){Pt(Vi)}),bi=function(tr){(Jt||bt)&&ue!==null&&ue!==void 0&&ue.contains(tr.target)&&mt(!0,p)},q&&(nt.onMouseMove=function(Vi){var tr;(tr=je.onMouseMove)===null||tr===void 0||tr.call(je,Vi)})),Pr&&(cn("onMouseLeave",!1,y),cn("onPointerLeave",!1,y),zu=function(){mt(!1,y)}),ts.has("focus")&&cn("onFocus",!0,_),La.has("focus")&&cn("onBlur",!1,w),ts.has("contextMenu")&&(nt.onContextMenu=function(Vi){var tr;Ft.current&&La.has("contextMenu")?mt(!1):(Pt(Vi),mt(!0)),Vi.preventDefault();for(var Uo=arguments.length,Js=new Array(Uo>1?Uo-1:0),vl=1;vl<Uo;vl++)Js[vl-1]=arguments[vl];(tr=je.onContextMenu)===null||tr===void 0||tr.call.apply(tr,[je,Vi].concat(Js))}),Q&&(nt.className=Me(je.className,Q));var Ms=Ie(Ie({},je),nt),Jl={},Hu=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Hu.forEach(function(Vi){le[Vi]&&(Jl[Vi]=function(){for(var tr,Uo=arguments.length,Js=new Array(Uo),vl=0;vl<Uo;vl++)Js[vl]=arguments[vl];(tr=Ms[Vi])===null||tr===void 0||tr.call.apply(tr,[Ms].concat(Js)),le[Vi].apply(le,Js)})});var sg=b.cloneElement(Se,Ie(Ie({},Ms),Jl)),yc={x:mi,y:Vr},nl=J?Ie({},J!==!0?J:{}):null;return b.createElement(b.Fragment,null,b.createElement(Kd,{disabled:!Jt,ref:Ee,onResize:bc},b.createElement(XMt,{getTriggerDOMNode:be},sg)),b.createElement(Jtt.Provider,{value:me},b.createElement(YMt,{portal:t,ref:Ye,prefixCls:o,popup:A,className:Me(R,$i),style:P,target:it,onMouseEnter:bi,onMouseLeave:zu,onPointerEnter:bi,zIndex:B,open:Jt,keepDom:bt,fresh:K,onClick:U,mask:C,motion:St,maskMotion:At,onVisibleChanged:vc,onPrepare:Hn,forceRender:k,autoDestroy:Ne,getPopupContainer:D,align:si,arrow:nl,arrowPos:yc,ready:on,offsetX:yn,offsetY:fi,offsetR:oi,offsetB:Qi,onAlign:ca,stretch:z,targetWidth:Gi/_i,targetHeight:vs/ur})))});return e.displayName="Trigger",e}const HK=i$n(l6);var r$n=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],o$n=function(e){var n=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"}}},s$n=function(e,n){var i=e.prefixCls;e.disabled;var r=e.visible,o=e.children,s=e.popupElement,a=e.animation,l=e.transitionName,c=e.dropdownStyle,u=e.dropdownClassName,d=e.direction,h=d===void 0?"ltr":d,f=e.placement,m=e.builtinPlacements,p=e.dropdownMatchSelectWidth,g=e.dropdownRender,y=e.dropdownAlign,_=e.getPopupContainer,w=e.empty,C=e.getTriggerDOMNode,N=e.onPopupVisibleChange,E=e.onPopupMouseEnter,D=di(e,r$n),k="".concat(i,"-dropdown"),M=s;g&&(M=g(s));var T=b.useMemo(function(){return m||o$n(p)},[m,p]),A=a?"".concat(k,"-").concat(a):l,R=typeof p=="number",P=b.useMemo(function(){return R?null:p===!1?"minWidth":"width"},[p,R]),O=c;R&&(O=Ie(Ie({},O),{},{width:p}));var V=b.useRef(null);return b.useImperativeHandle(n,function(){return{getPopupElement:function(){var $;return($=V.current)===null||$===void 0?void 0:$.popupElement}}}),b.createElement(HK,lt({},D,{showAction:N?["click"]:[],hideAction:N?["click"]:[],popupPlacement:f||(h==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:T,prefixCls:k,popupTransitionName:A,popup:b.createElement("div",{onMouseEnter:E},M),ref:V,stretch:P,popupAlign:y,popupVisible:r,getPopupContainer:_,popupClassName:Me(u,ye({},"".concat(k,"-empty"),w)),popupStyle:O,getTriggerDOMNode:C,onPopupVisibleChange:N}),o)},ZMt=b.forwardRef(s$n);ZMt.displayName="SelectTrigger";function snt(t,e){var n=t.key,i;return"value"in t&&(i=t.value),n??(i!==void 0?i:"rc-index-key-".concat(e))}function XDe(t){return typeof t<"u"&&!Number.isNaN(t)}function QMt(t,e){var n=t||{},i=n.label,r=n.value,o=n.options,s=n.groupLabel,a=i||(e?"children":"label");return{label:a,value:r||"value",options:o||"options",groupLabel:s||a}}function a$n(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.fieldNames,i=e.childrenAsData,r=[],o=QMt(n,!1),s=o.label,a=o.value,l=o.options,c=o.groupLabel;function u(d,h){Array.isArray(d)&&d.forEach(function(f){if(h||!(l in f)){var m=f[a];r.push({key:snt(f,r.length),groupOption:h,data:f,label:f[s],value:m})}else{var p=f[c];p===void 0&&i&&(p=f.label),r.push({key:snt(f,r.length),group:!0,data:f,label:p}),u(f[l],!0)}})}return u(t,!1),r}function ZDe(t){var e=Ie({},t);return"props"in e||Object.defineProperty(e,"props",{get:function(){return ii(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),e}}),e}var l$n=function(e,n,i){if(!n||!n.length)return null;var r=!1,o=function a(l,c){var u=jDt(c),d=u[0],h=u.slice(1);if(!d)return[l];var f=l.split(d);return r=r||f.length>1,f.reduce(function(m,p){return[].concat(Ot(m),Ot(a(p,h)))},[]).filter(Boolean)},s=o(e,n);return r?typeof i<"u"?s.slice(0,i):s:null},h6e=b.createContext(null);function c$n(t){var e=t.visible,n=t.values;if(!e)return null;var i=50;return b.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,i).map(function(r){var o=r.label,s=r.value;return["number","string"].includes(Un(o))?o:s}).join(", ")),n.length>i?", ...":null)}var u$n=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],d$n=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],qne=function(e){return e==="tags"||e==="multiple"},JMt=b.forwardRef(function(t,e){var n,i=t.id,r=t.prefixCls,o=t.className,s=t.showSearch,a=t.tagRender,l=t.direction,c=t.omitDomProps,u=t.displayValues,d=t.onDisplayValuesChange,h=t.emptyOptions,f=t.notFoundContent,m=f===void 0?"Not Found":f,p=t.onClear,g=t.mode,y=t.disabled,_=t.loading,w=t.getInputElement,C=t.getRawInputElement,N=t.open,E=t.defaultOpen,D=t.onDropdownVisibleChange,k=t.activeValue,M=t.onActiveValueChange,T=t.activeDescendantId,A=t.searchValue,R=t.autoClearSearchValue,P=t.onSearch,O=t.onSearchSplit,V=t.tokenSeparators,F=t.allowClear,$=t.suffixIcon,B=t.clearIcon,z=t.OptionList,H=t.animation,K=t.transitionName,q=t.dropdownStyle,U=t.dropdownClassName,Y=t.dropdownMatchSelectWidth,J=t.dropdownRender,ae=t.dropdownAlign,se=t.placement,oe=t.builtinPlacements,fe=t.getPopupContainer,de=t.showAction,ie=de===void 0?[]:de,Q=t.onFocus,be=t.onBlur,le=t.onKeyUp,Ne=t.onKeyDown,Le=t.onMouseDown,Te=di(t,u$n),De=qne(g),Pe=(s!==void 0?s:De)||g==="combobox",ge=Ie({},Te);d$n.forEach(function(Nr){delete ge[Nr]}),c==null||c.forEach(function(Nr){delete ge[Nr]});var he=b.useState(!1),me=He(he,2),X=me[0],re=me[1];b.useEffect(function(){re(fhe())},[]);var we=b.useRef(null),ue=b.useRef(null),Ce=b.useRef(null),ze=b.useRef(null),Ye=b.useRef(null),Ke=b.useRef(!1),Xe=S6n(),it=He(Xe,3),ut=it[0],Ge=it[1],Ee=it[2];b.useImperativeHandle(e,function(){var Nr,$i;return{focus:(Nr=ze.current)===null||Nr===void 0?void 0:Nr.focus,blur:($i=ze.current)===null||$i===void 0?void 0:$i.blur,scrollTo:function(fr){var Gi;return(Gi=Ye.current)===null||Gi===void 0?void 0:Gi.scrollTo(fr)},nativeElement:we.current||ue.current}});var Se=b.useMemo(function(){var Nr;if(g!=="combobox")return A;var $i=(Nr=u[0])===null||Nr===void 0?void 0:Nr.value;return typeof $i=="string"||typeof $i=="number"?String($i):""},[A,g,u]),je=g==="combobox"&&typeof w=="function"&&w()||null,nt=typeof C=="function"&&C(),rt=jS(ue,nt==null||(n=nt.props)===null||n===void 0?void 0:n.ref),St=b.useState(!1),At=He(St,2),Nt=At[0],vt=At[1];Lr(function(){vt(!0)},[]);var $t=ho(!1,{defaultValue:E,value:N}),ln=He($t,2),Jt=ln[0],en=ln[1],Ft=Nt?Jt:!1,dn=!m&&h;(y||dn&&Ft&&g==="combobox")&&(Ft=!1);var Ze=dn?!1:Ft,dt=b.useCallback(function(Nr){var $i=Nr!==void 0?Nr:!Ft;y||(en($i),Ft!==$i&&(D==null||D($i)))},[y,Ft,en,D]),at=b.useMemo(function(){return(V||[]).some(function(Nr){return[`
`,`\r
`].includes(Nr)})},[V]),mt=b.useContext(h6e)||{},It=mt.maxCount,Ve=mt.rawValues,bt=function($i,us,fr){if(!(De&&XDe(It)&&(Ve==null?void 0:Ve.size)>=It)){var Gi=!0,zn=$i;M==null||M(null);var pi=l$n($i,V,XDe(It)?It-Ve.size:void 0),Tr=fr?null:pi;return g!=="combobox"&&Tr&&(zn="",O==null||O(Tr),dt(!1),Gi=!1),P&&Se!==zn&&P(zn,{source:us?"typing":"effect"}),Gi}},wt=function($i){!$i||!$i.trim()||P($i,{source:"submit"})};b.useEffect(function(){!Ft&&!De&&g!=="combobox"&&bt("",!1,!1)},[Ft]),b.useEffect(function(){Jt&&y&&en(!1),y&&!Ke.current&&Ge(!1)},[y]);var $e=zMt(),We=He($e,2),tt=We[0],_t=We[1],ht=b.useRef(!1),qe=function($i){var us=tt(),fr=$i.key,Gi=fr==="Enter";if(Gi&&(g!=="combobox"&&$i.preventDefault(),Ft||dt(!0)),_t(!!Se),fr==="Backspace"&&!us&&De&&!Se&&u.length){for(var zn=Ot(u),pi=null,Tr=zn.length-1;Tr>=0;Tr-=1){var vs=zn[Tr];if(!vs.disabled){zn.splice(Tr,1),pi=vs;break}}pi&&d(zn,{type:"remove",values:[pi]})}for(var ua=arguments.length,Al=new Array(ua>1?ua-1:0),bc=1;bc<ua;bc++)Al[bc-1]=arguments[bc];if(Ft&&(!Gi||!ht.current)){var vc;(vc=Ye.current)===null||vc===void 0||vc.onKeyDown.apply(vc,[$i].concat(Al))}Gi&&(ht.current=!0),Ne==null||Ne.apply(void 0,[$i].concat(Al))},ft=function($i){for(var us=arguments.length,fr=new Array(us>1?us-1:0),Gi=1;Gi<us;Gi++)fr[Gi-1]=arguments[Gi];if(Ft){var zn;(zn=Ye.current)===null||zn===void 0||zn.onKeyUp.apply(zn,[$i].concat(fr))}$i.key==="Enter"&&(ht.current=!1),le==null||le.apply(void 0,[$i].concat(fr))},Ct=function($i){var us=u.filter(function(fr){return fr!==$i});d(us,{type:"remove",values:[$i]})},Pt=b.useRef(!1),an=function(){Ge(!0),y||(Q&&!Pt.current&&Q.apply(void 0,arguments),ie.includes("focus")&&dt(!0)),Pt.current=!0},_n=function(){Ke.current=!0,Ge(!1,function(){Pt.current=!1,Ke.current=!1,dt(!1)}),!y&&(Se&&(g==="tags"?P(Se,{source:"submit"}):g==="multiple"&&P("",{source:"blur"})),be&&be.apply(void 0,arguments))},on=[];b.useEffect(function(){return function(){on.forEach(function(Nr){return clearTimeout(Nr)}),on.splice(0,on.length)}},[]);var yn=function($i){var us,fr=$i.target,Gi=(us=Ce.current)===null||us===void 0?void 0:us.getPopupElement();if(Gi&&Gi.contains(fr)){var zn=setTimeout(function(){var ua=on.indexOf(zn);if(ua!==-1&&on.splice(ua,1),Ee(),!X&&!Gi.contains(document.activeElement)){var Al;(Al=ze.current)===null||Al===void 0||Al.focus()}});on.push(zn)}for(var pi=arguments.length,Tr=new Array(pi>1?pi-1:0),vs=1;vs<pi;vs++)Tr[vs-1]=arguments[vs];Le==null||Le.apply(void 0,[$i].concat(Tr))},fi=b.useState({}),oi=He(fi,2),Qi=oi[1];function mi(){Qi({})}var Vr;nt&&(Vr=function($i){dt($i)}),N6n(function(){var Nr;return[we.current,(Nr=Ce.current)===null||Nr===void 0?void 0:Nr.getPopupElement()]},Ze,dt,!!nt);var _i=b.useMemo(function(){return Ie(Ie({},t),{},{notFoundContent:m,open:Ft,triggerOpen:Ze,id:i,showSearch:Pe,multiple:De,toggleOpen:dt})},[t,m,Ze,Ft,i,Pe,De,dt]),ur=!!$||_,si;ur&&(si=b.createElement(mhe,{className:Me("".concat(r,"-arrow"),ye({},"".concat(r,"-arrow-loading"),_)),customizeIcon:$,customizeIconProps:{loading:_,searchValue:Se,open:Ft,focused:ut,showSearch:Pe}}));var Ii=function(){var $i;p==null||p(),($i=ze.current)===null||$i===void 0||$i.focus(),d([],{type:"clear",values:u}),bt("",!1,!1)},Si=w6n(r,Ii,u,F,B,y,Se,g),To=Si.allowClear,ts=Si.clearIcon,La=b.createElement(z,{ref:Ye}),pc=Me(r,o,ye(ye(ye(ye(ye(ye(ye(ye(ye(ye({},"".concat(r,"-focused"),ut),"".concat(r,"-multiple"),De),"".concat(r,"-single"),!De),"".concat(r,"-allow-clear"),F),"".concat(r,"-show-arrow"),ur),"".concat(r,"-disabled"),y),"".concat(r,"-loading"),_),"".concat(r,"-open"),Ft),"".concat(r,"-customize-input"),je),"".concat(r,"-show-search"),Pe)),gc=b.createElement(ZMt,{ref:Ce,disabled:y,prefixCls:r,visible:Ze,popupElement:La,animation:H,transitionName:K,dropdownStyle:q,dropdownClassName:U,direction:l,dropdownMatchSelectWidth:Y,dropdownRender:J,dropdownAlign:ae,placement:se,builtinPlacements:oe,getPopupContainer:fe,empty:h,getTriggerDOMNode:function($i){return ue.current||$i},onPopupVisibleChange:Vr,onPopupMouseEnter:mi},nt?b.cloneElement(nt,{ref:rt}):b.createElement(qMt,lt({},t,{domRef:ue,prefixCls:r,inputElement:je,ref:ze,id:i,showSearch:Pe,autoClearSearchValue:R,mode:g,activeDescendantId:T,tagRender:a,values:u,open:Ft,onToggleOpen:dt,activeValue:k,searchValue:Se,onSearch:bt,onSearchSubmit:wt,onRemove:Ct,tokenWithEnter:at}))),ca;return nt?ca=gc:ca=b.createElement("div",lt({className:pc},ge,{ref:we,onMouseDown:yn,onKeyDown:qe,onKeyUp:ft,onFocus:an,onBlur:_n}),b.createElement(c$n,{visible:ut&&!Ft,values:u}),gc,si,To&&ts),b.createElement(BMt.Provider,{value:_i},ca)});JMt.displayName="BaseSelect";var f6e=function(){return null};f6e.isSelectOptGroup=!0;var m6e=function(){return null};m6e.isSelectOption=!0;var eLt=b.forwardRef(function(t,e){var n=t.height,i=t.offsetY,r=t.offsetX,o=t.children,s=t.prefixCls,a=t.onInnerResize,l=t.innerProps,c=t.rtl,u=t.extra,d={},h={display:"flex",flexDirection:"column"};return i!==void 0&&(d={height:n,position:"relative",overflow:"hidden"},h=Ie(Ie({},h),{},ye(ye(ye(ye(ye({transform:"translateY(".concat(i,"px)")},c?"marginRight":"marginLeft",-r),"position","absolute"),"left",0),"right",0),"top",0))),b.createElement("div",{style:d},b.createElement(Kd,{onResize:function(m){var p=m.offsetHeight;p&&a&&a()}},b.createElement("div",lt({style:h,className:Me(ye({},"".concat(s,"-holder-inner"),s)),ref:e},l),o,u)))});eLt.displayName="Filler";function h$n(t){var e=t.children,n=t.setRef,i=b.useCallback(function(r){n(r)},[]);return b.cloneElement(e,{ref:i})}function f$n(t,e,n,i,r,o,s,a){var l=a.getKey;return t.slice(e,n+1).map(function(c,u){var d=e+u,h=s(c,d,{style:{width:i},offsetX:r}),f=l(c);return b.createElement(h$n,{key:f,setRef:function(p){return o(c,p)}},h)})}function m$n(t,e,n){var i=t.length,r=e.length,o,s;if(i===0&&r===0)return null;i<r?(o=t,s=e):(o=e,s=t);var a={__EMPTY_ITEM__:!0};function l(m){return m!==void 0?n(m):a}for(var c=null,u=Math.abs(i-r)!==1,d=0;d<s.length;d+=1){var h=l(o[d]),f=l(s[d]);if(h!==f){c=d,u=u||h!==l(s[d+1]);break}}return c===null?null:{index:c,multiple:u}}function p$n(t,e,n){var i=b.useState(t),r=He(i,2),o=r[0],s=r[1],a=b.useState(null),l=He(a,2),c=l[0],u=l[1];return b.useEffect(function(){var d=m$n(o||[],t||[],e);(d==null?void 0:d.index)!==void 0&&u(t[d.index]),s(t)},[t]),[c]}var ant=(typeof navigator>"u"?"undefined":Un(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const tLt=function(t,e,n,i){var r=b.useRef(!1),o=b.useRef(null);function s(){clearTimeout(o.current),r.current=!0,o.current=setTimeout(function(){r.current=!1},50)}var a=b.useRef({top:t,bottom:e,left:n,right:i});return a.current.top=t,a.current.bottom=e,a.current.left=n,a.current.right=i,function(l,c){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=l?c<0&&a.current.left||c>0&&a.current.right:c<0&&a.current.top||c>0&&a.current.bottom;return u&&d?(clearTimeout(o.current),r.current=!1):(!d||r.current)&&s(),!r.current&&d}};function g$n(t,e,n,i,r,o,s){var a=b.useRef(0),l=b.useRef(null),c=b.useRef(null),u=b.useRef(!1),d=tLt(e,n,i,r);function h(_,w){if(Dr.cancel(l.current),!d(!1,w)){var C=_;if(!C._virtualHandled)C._virtualHandled=!0;else return;a.current+=w,c.current=w,ant||C.preventDefault(),l.current=Dr(function(){var N=u.current?10:1;s(a.current*N,!1),a.current=0})}}function f(_,w){s(w,!0),ant||_.preventDefault()}var m=b.useRef(null),p=b.useRef(null);function g(_){if(t){Dr.cancel(p.current),p.current=Dr(function(){m.current=null},2);var w=_.deltaX,C=_.deltaY,N=_.shiftKey,E=w,D=C;(m.current==="sx"||!m.current&&N&&C&&!w)&&(E=C,D=0,m.current="sx");var k=Math.abs(E),M=Math.abs(D);m.current===null&&(m.current=o&&k>M?"x":"y"),m.current==="y"?h(_,D):f(_,E)}}function y(_){t&&(u.current=_.detail===c.current)}return[g,y]}function b$n(t,e,n,i){var r=b.useMemo(function(){return[new Map,[]]},[t,n.id,i]),o=He(r,2),s=o[0],a=o[1],l=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,h=s.get(u),f=s.get(d);if(h===void 0||f===void 0)for(var m=t.length,p=a.length;p<m;p+=1){var g,y=t[p],_=e(y);s.set(_,p);var w=(g=n.get(_))!==null&&g!==void 0?g:i;if(a[p]=(a[p-1]||0)+w,_===u&&(h=p),_===d&&(f=p),h!==void 0&&f!==void 0)break}return{top:a[h-1]||0,bottom:a[f]}};return l}var v$n=function(){function t(){Za(this,t),ye(this,"maps",void 0),ye(this,"id",0),this.maps=Object.create(null)}return Qa(t,[{key:"set",value:function(n,i){this.maps[n]=i,this.id+=1}},{key:"get",value:function(n){return this.maps[n]}}]),t}();function y$n(t,e,n){var i=b.useState(0),r=He(i,2),o=r[0],s=r[1],a=b.useRef(new Map),l=b.useRef(new v$n),c=b.useRef();function u(){Dr.cancel(c.current)}function d(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;u();var m=function(){a.current.forEach(function(g,y){if(g&&g.offsetParent){var _=M9(g),w=_.offsetHeight;l.current.get(y)!==w&&l.current.set(y,_.offsetHeight)}}),s(function(g){return g+1})};f?m():c.current=Dr(m)}function h(f,m){var p=t(f);a.current.get(p),m?(a.current.set(p,m),d()):a.current.delete(p)}return b.useEffect(function(){return u},[]),[h,d,l.current,o]}var lnt=14/15;function _$n(t,e,n){var i=b.useRef(!1),r=b.useRef(0),o=b.useRef(0),s=b.useRef(null),a=b.useRef(null),l,c=function(f){if(i.current){var m=Math.ceil(f.touches[0].pageX),p=Math.ceil(f.touches[0].pageY),g=r.current-m,y=o.current-p,_=Math.abs(g)>Math.abs(y);_?r.current=m:o.current=p;var w=n(_,_?g:y,!1,f);w&&f.preventDefault(),clearInterval(a.current),w&&(a.current=setInterval(function(){_?g*=lnt:y*=lnt;var C=Math.floor(_?g:y);(!n(_,C,!0)||Math.abs(C)<=.1)&&clearInterval(a.current)},16))}},u=function(){i.current=!1,l()},d=function(f){l(),f.touches.length===1&&!i.current&&(i.current=!0,r.current=Math.ceil(f.touches[0].pageX),o.current=Math.ceil(f.touches[0].pageY),s.current=f.target,s.current.addEventListener("touchmove",c,{passive:!1}),s.current.addEventListener("touchend",u,{passive:!0}))};l=function(){s.current&&(s.current.removeEventListener("touchmove",c),s.current.removeEventListener("touchend",u))},Lr(function(){return t&&e.current.addEventListener("touchstart",d,{passive:!0}),function(){var h;(h=e.current)===null||h===void 0||h.removeEventListener("touchstart",d),l(),clearInterval(a.current)}},[t])}var cnt=10;function x$n(t,e,n,i,r,o,s,a){var l=b.useRef(),c=b.useState(null),u=He(c,2),d=u[0],h=u[1];return Lr(function(){if(d&&d.times<cnt){if(!t.current){h(function(z){return Ie({},z)});return}o();var f=d.targetAlign,m=d.originAlign,p=d.index,g=d.offset,y=t.current.clientHeight,_=!1,w=f,C=null;if(y){for(var N=f||m,E=0,D=0,k=0,M=Math.min(e.length-1,p),T=0;T<=M;T+=1){var A=r(e[T]);D=E;var R=n.get(A);k=D+(R===void 0?i:R),E=k}for(var P=N==="top"?g:y-g,O=M;O>=0;O-=1){var V=r(e[O]),F=n.get(V);if(F===void 0){_=!0;break}if(P-=F,P<=0)break}switch(N){case"top":C=D-g;break;case"bottom":C=k-y+g;break;default:{var $=t.current.scrollTop,B=$+y;D<$?w="top":k>B&&(w="bottom")}}C!==null&&s(C),C!==d.lastTop&&(_=!0)}_&&h(Ie(Ie({},d),{},{times:d.times+1,targetAlign:w,lastTop:C}))}else(d==null?void 0:d.times)===cnt&&ii(!1,"Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.")},[d,t.current]),function(f){if(f==null){a();return}if(Dr.cancel(l.current),typeof f=="number")s(f);else if(f&&Un(f)==="object"){var m,p=f.align;"index"in f?m=f.index:m=e.findIndex(function(_){return r(_)===f.key});var g=f.offset,y=g===void 0?0:g;h({times:0,index:m,offset:y,originAlign:p})}}}function unt(t,e){var n="touches"in t?t.touches[0]:t;return n[e?"pageX":"pageY"]}var QDe=b.forwardRef(function(t,e){var n=t.prefixCls,i=t.rtl,r=t.scrollOffset,o=t.scrollRange,s=t.onStartMove,a=t.onStopMove,l=t.onScroll,c=t.horizontal,u=t.spinSize,d=t.containerSize,h=t.style,f=t.thumbStyle,m=b.useState(!1),p=He(m,2),g=p[0],y=p[1],_=b.useState(null),w=He(_,2),C=w[0],N=w[1],E=b.useState(null),D=He(E,2),k=D[0],M=D[1],T=!i,A=b.useRef(),R=b.useRef(),P=b.useState(!1),O=He(P,2),V=O[0],F=O[1],$=b.useRef(),B=function(){clearTimeout($.current),F(!0),$.current=setTimeout(function(){F(!1)},3e3)},z=o-d||0,H=d-u||0,K=b.useMemo(function(){if(r===0||z===0)return 0;var de=r/z;return de*H},[r,z,H]),q=function(ie){ie.stopPropagation(),ie.preventDefault()},U=b.useRef({top:K,dragging:g,pageY:C,startTop:k});U.current={top:K,dragging:g,pageY:C,startTop:k};var Y=function(ie){y(!0),N(unt(ie,c)),M(U.current.top),s(),ie.stopPropagation(),ie.preventDefault()};b.useEffect(function(){var de=function(le){le.preventDefault()},ie=A.current,Q=R.current;return ie.addEventListener("touchstart",de,{passive:!1}),Q.addEventListener("touchstart",Y,{passive:!1}),function(){ie.removeEventListener("touchstart",de),Q.removeEventListener("touchstart",Y)}},[]);var J=b.useRef();J.current=z;var ae=b.useRef();ae.current=H,b.useEffect(function(){if(g){var de,ie=function(le){var Ne=U.current,Le=Ne.dragging,Te=Ne.pageY,De=Ne.startTop;Dr.cancel(de);var Pe=A.current.getBoundingClientRect(),ge=d/(c?Pe.width:Pe.height);if(Le){var he=(unt(le,c)-Te)*ge,me=De;!T&&c?me-=he:me+=he;var X=J.current,re=ae.current,we=re?me/re:0,ue=Math.ceil(we*X);ue=Math.max(ue,0),ue=Math.min(ue,X),de=Dr(function(){l(ue,c)})}},Q=function(){y(!1),a()};return window.addEventListener("mousemove",ie,{passive:!0}),window.addEventListener("touchmove",ie,{passive:!0}),window.addEventListener("mouseup",Q,{passive:!0}),window.addEventListener("touchend",Q,{passive:!0}),function(){window.removeEventListener("mousemove",ie),window.removeEventListener("touchmove",ie),window.removeEventListener("mouseup",Q),window.removeEventListener("touchend",Q),Dr.cancel(de)}}},[g]),b.useEffect(function(){return B(),function(){clearTimeout($.current)}},[r]),b.useImperativeHandle(e,function(){return{delayHidden:B}});var se="".concat(n,"-scrollbar"),oe={position:"absolute",visibility:V?null:"hidden"},fe={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return c?(oe.height=8,oe.left=0,oe.right=0,oe.bottom=0,fe.height="100%",fe.width=u,T?fe.left=K:fe.right=K):(oe.width=8,oe.top=0,oe.bottom=0,T?oe.right=0:oe.left=0,fe.width="100%",fe.height=u,fe.top=K),b.createElement("div",{ref:A,className:Me(se,ye(ye(ye({},"".concat(se,"-horizontal"),c),"".concat(se,"-vertical"),!c),"".concat(se,"-visible"),V)),style:Ie(Ie({},oe),h),onMouseDown:q,onMouseMove:B},b.createElement("div",{ref:R,className:Me("".concat(se,"-thumb"),ye({},"".concat(se,"-thumb-moving"),g)),style:Ie(Ie({},fe),f),onMouseDown:Y}))});QDe.displayName="ScrollBar";var w$n=20;function dnt(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=t/e*t;return isNaN(n)&&(n=0),n=Math.max(n,w$n),Math.floor(n)}var C$n=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],S$n=[],N$n={overflowY:"auto",overflowAnchor:"none"};function E$n(t,e){var n=t.prefixCls,i=n===void 0?"rc-virtual-list":n,r=t.className,o=t.height,s=t.itemHeight,a=t.fullHeight,l=a===void 0?!0:a,c=t.style,u=t.data,d=t.children,h=t.itemKey,f=t.virtual,m=t.direction,p=t.scrollWidth,g=t.component,y=g===void 0?"div":g,_=t.onScroll,w=t.onVirtualScroll,C=t.onVisibleChange,N=t.innerProps,E=t.extraRender,D=t.styles,k=di(t,C$n),M=b.useCallback(function(Pt){return typeof h=="function"?h(Pt):Pt==null?void 0:Pt[h]},[h]),T=y$n(M),A=He(T,4),R=A[0],P=A[1],O=A[2],V=A[3],F=!!(f!==!1&&o&&s),$=b.useMemo(function(){return Object.values(O.maps).reduce(function(Pt,an){return Pt+an},0)},[O.id,O.maps]),B=F&&u&&(Math.max(s*u.length,$)>o||!!p),z=m==="rtl",H=Me(i,ye({},"".concat(i,"-rtl"),z),r),K=u||S$n,q=b.useRef(),U=b.useRef(),Y=b.useRef(),J=b.useState(0),ae=He(J,2),se=ae[0],oe=ae[1],fe=b.useState(0),de=He(fe,2),ie=de[0],Q=de[1],be=b.useState(!1),le=He(be,2),Ne=le[0],Le=le[1],Te=function(){Le(!0)},De=function(){Le(!1)},Pe={getKey:M};function ge(Pt){oe(function(an){var _n;typeof Pt=="function"?_n=Pt(an):_n=Pt;var on=Nt(_n);return q.current.scrollTop=on,on})}var he=b.useRef({start:0,end:K.length}),me=b.useRef(),X=p$n(K,M),re=He(X,1),we=re[0];me.current=we;var ue=b.useMemo(function(){if(!F)return{scrollHeight:void 0,start:0,end:K.length-1,offset:void 0};if(!B){var Pt;return{scrollHeight:((Pt=U.current)===null||Pt===void 0?void 0:Pt.offsetHeight)||0,start:0,end:K.length-1,offset:void 0}}for(var an=0,_n,on,yn,fi=K.length,oi=0;oi<fi;oi+=1){var Qi=K[oi],mi=M(Qi),Vr=O.get(mi),_i=an+(Vr===void 0?s:Vr);_i>=se&&_n===void 0&&(_n=oi,on=an),_i>se+o&&yn===void 0&&(yn=oi),an=_i}return _n===void 0&&(_n=0,on=0,yn=Math.ceil(o/s)),yn===void 0&&(yn=K.length-1),yn=Math.min(yn+1,K.length-1),{scrollHeight:an,start:_n,end:yn,offset:on}},[B,F,se,K,V,o]),Ce=ue.scrollHeight,ze=ue.start,Ye=ue.end,Ke=ue.offset;he.current.start=ze,he.current.end=Ye;var Xe=b.useState({width:0,height:o}),it=He(Xe,2),ut=it[0],Ge=it[1],Ee=function(an){Ge({width:an.offsetWidth,height:an.offsetHeight})},Se=b.useRef(),je=b.useRef(),nt=b.useMemo(function(){return dnt(ut.width,p)},[ut.width,p]),rt=b.useMemo(function(){return dnt(ut.height,Ce)},[ut.height,Ce]),St=Ce-o,At=b.useRef(St);At.current=St;function Nt(Pt){var an=Pt;return Number.isNaN(At.current)||(an=Math.min(an,At.current)),an=Math.max(an,0),an}var vt=se<=0,$t=se>=St,ln=ie<=0,Jt=ie>=p,en=tLt(vt,$t,ln,Jt),Ft=function(){return{x:z?-ie:ie,y:se}},dn=b.useRef(Ft()),Ze=gr(function(Pt){if(w){var an=Ie(Ie({},Ft()),Pt);(dn.current.x!==an.x||dn.current.y!==an.y)&&(w(an),dn.current=an)}});function dt(Pt,an){var _n=Pt;an?(Fc.flushSync(function(){Q(_n)}),Ze()):ge(_n)}function at(Pt){var an=Pt.currentTarget.scrollTop;an!==se&&ge(an),_==null||_(Pt),Ze()}var mt=function(an){var _n=an,on=p?p-ut.width:0;return _n=Math.max(_n,0),_n=Math.min(_n,on),_n},It=gr(function(Pt,an){an?(Fc.flushSync(function(){Q(function(_n){var on=_n+(z?-Pt:Pt);return mt(on)})}),Ze()):ge(function(_n){var on=_n+Pt;return on})}),Ve=g$n(F,vt,$t,ln,Jt,!!p,It),bt=He(Ve,2),wt=bt[0],$e=bt[1];_$n(F,q,function(Pt,an,_n,on){var yn=on;return en(Pt,an,_n)?!1:!yn||!yn._virtualHandled?(yn&&(yn._virtualHandled=!0),wt({preventDefault:function(){},deltaX:Pt?an:0,deltaY:Pt?0:an}),!0):!1}),Lr(function(){function Pt(_n){var on=vt&&_n.detail<0,yn=$t&&_n.detail>0;F&&!on&&!yn&&_n.preventDefault()}var an=q.current;return an.addEventListener("wheel",wt,{passive:!1}),an.addEventListener("DOMMouseScroll",$e,{passive:!0}),an.addEventListener("MozMousePixelScroll",Pt,{passive:!1}),function(){an.removeEventListener("wheel",wt),an.removeEventListener("DOMMouseScroll",$e),an.removeEventListener("MozMousePixelScroll",Pt)}},[F,vt,$t]),Lr(function(){if(p){var Pt=mt(ie);Q(Pt),Ze({x:Pt})}},[ut.width,p]);var We=function(){var an,_n;(an=Se.current)===null||an===void 0||an.delayHidden(),(_n=je.current)===null||_n===void 0||_n.delayHidden()},tt=x$n(q,K,O,s,M,function(){return P(!0)},ge,We);b.useImperativeHandle(e,function(){return{nativeElement:Y.current,getScrollInfo:Ft,scrollTo:function(an){function _n(on){return on&&Un(on)==="object"&&("left"in on||"top"in on)}_n(an)?(an.left!==void 0&&Q(mt(an.left)),tt(an.top)):tt(an)}}}),Lr(function(){if(C){var Pt=K.slice(ze,Ye+1);C(Pt,K)}},[ze,Ye,K]);var _t=b$n(K,M,O,s),ht=E==null?void 0:E({start:ze,end:Ye,virtual:B,offsetX:ie,offsetY:Ke,rtl:z,getSize:_t}),qe=f$n(K,ze,Ye,p,ie,R,d,Pe),ft=null;o&&(ft=Ie(ye({},l?"height":"maxHeight",o),N$n),F&&(ft.overflowY="hidden",p&&(ft.overflowX="hidden"),Ne&&(ft.pointerEvents="none")));var Ct={};return z&&(Ct.dir="rtl"),b.createElement("div",lt({ref:Y,style:Ie(Ie({},c),{},{position:"relative"}),className:H},Ct,k),b.createElement(Kd,{onResize:Ee},b.createElement(y,{className:"".concat(i,"-holder"),style:ft,ref:q,onScroll:at,onMouseEnter:We},b.createElement(eLt,{prefixCls:i,height:Ce,offsetX:ie,offsetY:Ke,scrollWidth:p,onInnerResize:P,ref:U,innerProps:N,rtl:z,extra:ht},qe))),B&&Ce>o&&b.createElement(QDe,{ref:Se,prefixCls:i,scrollOffset:se,scrollRange:Ce,rtl:z,onScroll:dt,onStartMove:Te,onStopMove:De,spinSize:rt,containerSize:ut.height,style:D==null?void 0:D.verticalScrollBar,thumbStyle:D==null?void 0:D.verticalScrollBarThumb}),B&&p>ut.width&&b.createElement(QDe,{ref:je,prefixCls:i,scrollOffset:ie,scrollRange:p,rtl:z,onScroll:dt,onStartMove:Te,onStopMove:De,spinSize:nt,containerSize:ut.width,horizontal:!0,style:D==null?void 0:D.horizontalScrollBar,thumbStyle:D==null?void 0:D.horizontalScrollBarThumb}))}var phe=b.forwardRef(E$n);phe.displayName="List";function D$n(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var k$n=["disabled","title","children","style","className"];function hnt(t){return typeof t=="string"||typeof t=="number"}var M$n=function(e,n){var i=C6n(),r=i.prefixCls,o=i.id,s=i.open,a=i.multiple,l=i.mode,c=i.searchValue,u=i.toggleOpen,d=i.notFoundContent,h=i.onPopupScroll,f=b.useContext(h6e),m=f.maxCount,p=f.flattenOptions,g=f.onActiveValue,y=f.defaultActiveFirstOption,_=f.onSelect,w=f.menuItemSelectedIcon,C=f.rawValues,N=f.fieldNames,E=f.virtual,D=f.direction,k=f.listHeight,M=f.listItemHeight,T=f.optionRender,A="".concat(r,"-item"),R=Hk(function(){return p},[s,p],function(de,ie){return ie[0]&&de[1]!==ie[1]}),P=b.useRef(null),O=b.useMemo(function(){return a&&XDe(m)&&(C==null?void 0:C.size)>=m},[a,m,C==null?void 0:C.size]),V=function(ie){ie.preventDefault()},F=function(ie){var Q;(Q=P.current)===null||Q===void 0||Q.scrollTo(typeof ie=="number"?{index:ie}:ie)},$=function(ie){for(var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,be=R.length,le=0;le<be;le+=1){var Ne=(ie+le*Q+be)%be,Le=R[Ne]||{},Te=Le.group,De=Le.data;if(!Te&&!(De!=null&&De.disabled)&&!O)return Ne}return-1},B=b.useState(function(){return $(0)}),z=He(B,2),H=z[0],K=z[1],q=function(ie){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;K(ie);var be={source:Q?"keyboard":"mouse"},le=R[ie];if(!le){g(null,-1,be);return}g(le.value,ie,be)};b.useEffect(function(){q(y!==!1?$(0):-1)},[R.length,c]);var U=b.useCallback(function(de){return C.has(de)&&l!=="combobox"},[l,Ot(C).toString(),C.size]);b.useEffect(function(){var de=setTimeout(function(){if(!a&&s&&C.size===1){var Q=Array.from(C)[0],be=R.findIndex(function(le){var Ne=le.data;return Ne.value===Q});be!==-1&&(q(be),F(be))}});if(s){var ie;(ie=P.current)===null||ie===void 0||ie.scrollTo(void 0)}return function(){return clearTimeout(de)}},[s,c]);var Y=function(ie){ie!==void 0&&_(ie,{selected:!C.has(ie)}),a||u(!1)};if(b.useImperativeHandle(n,function(){return{onKeyDown:function(ie){var Q=ie.which,be=ie.ctrlKey;switch(Q){case Wt.N:case Wt.P:case Wt.UP:case Wt.DOWN:{var le=0;if(Q===Wt.UP?le=-1:Q===Wt.DOWN?le=1:D$n()&&be&&(Q===Wt.N?le=1:Q===Wt.P&&(le=-1)),le!==0){var Ne=$(H+le,le);F(Ne),q(Ne,!0)}break}case Wt.ENTER:{var Le,Te=R[H];Te&&!(Te!=null&&(Le=Te.data)!==null&&Le!==void 0&&Le.disabled)&&!O?Y(Te.value):Y(void 0),s&&ie.preventDefault();break}case Wt.ESC:u(!1),s&&ie.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ie){F(ie)}}}),R.length===0)return b.createElement("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(A,"-empty"),onMouseDown:V},d);var J=Object.keys(N).map(function(de){return N[de]}),ae=function(ie){return ie.label};function se(de,ie){var Q=de.group;return{role:Q?"presentation":"option",id:"".concat(o,"_list_").concat(ie)}}var oe=function(ie){var Q=R[ie];if(!Q)return null;var be=Q.data||{},le=be.value,Ne=Q.group,Le=Ll(be,!0),Te=ae(Q);return Q?b.createElement("div",lt({"aria-label":typeof Te=="string"&&!Ne?Te:null},Le,{key:ie},se(Q,ie),{"aria-selected":U(le)}),le):null},fe={role:"listbox",id:"".concat(o,"_list")};return b.createElement(b.Fragment,null,E&&b.createElement("div",lt({},fe,{style:{height:0,width:0,overflow:"hidden"}}),oe(H-1),oe(H),oe(H+1)),b.createElement(phe,{itemKey:"key",ref:P,data:R,height:k,itemHeight:M,fullHeight:!1,onMouseDown:V,onScroll:h,virtual:E,direction:D,innerProps:E?null:fe},function(de,ie){var Q=de.group,be=de.groupOption,le=de.data,Ne=de.label,Le=de.value,Te=le.key;if(Q){var De,Pe=(De=le.title)!==null&&De!==void 0?De:hnt(Ne)?Ne.toString():void 0;return b.createElement("div",{className:Me(A,"".concat(A,"-group"),le.className),title:Pe},Ne!==void 0?Ne:Te)}var ge=le.disabled,he=le.title;le.children;var me=le.style,X=le.className,re=di(le,k$n),we=Zs(re,J),ue=U(Le),Ce=ge||!ue&&O,ze="".concat(A,"-option"),Ye=Me(A,ze,X,ye(ye(ye(ye({},"".concat(ze,"-grouped"),be),"".concat(ze,"-active"),H===ie&&!Ce),"".concat(ze,"-disabled"),Ce),"".concat(ze,"-selected"),ue)),Ke=ae(de),Xe=!w||typeof w=="function"||ue,it=typeof Ke=="number"?Ke:Ke||Le,ut=hnt(it)?it.toString():void 0;return he!==void 0&&(ut=he),b.createElement("div",lt({},Ll(we),E?{}:se(de,ie),{"aria-selected":ue,className:Ye,title:ut,onMouseMove:function(){H===ie||Ce||q(ie)},onClick:function(){Ce||Y(Le)},style:me}),b.createElement("div",{className:"".concat(ze,"-content")},typeof T=="function"?T(de,{index:ie}):it),b.isValidElement(w)||ue,Xe&&b.createElement(mhe,{className:"".concat(A,"-option-state"),customizeIcon:w,customizeIconProps:{value:Le,disabled:Ce,isSelected:ue}},ue?"✓":null))}))},nLt=b.forwardRef(M$n);nLt.displayName="OptionList";const L$n=function(t,e){var n=b.useRef({values:new Map,options:new Map}),i=b.useMemo(function(){var o=n.current,s=o.values,a=o.options,l=t.map(function(d){if(d.label===void 0){var h;return Ie(Ie({},d),{},{label:(h=s.get(d.value))===null||h===void 0?void 0:h.label})}return d}),c=new Map,u=new Map;return l.forEach(function(d){c.set(d.value,d),u.set(d.value,e.get(d.value)||a.get(d.value))}),n.current.values=c,n.current.options=u,l},[t,e]),r=b.useCallback(function(o){return e.get(o)||n.current.options.get(o)},[e]);return[i,r]};function xxe(t,e){return d6e(t).join("").toUpperCase().includes(e)}const T$n=function(t,e,n,i,r){return b.useMemo(function(){if(!n||i===!1)return t;var o=e.options,s=e.label,a=e.value,l=[],c=typeof i=="function",u=n.toUpperCase(),d=c?i:function(f,m){return r?xxe(m[r],u):m[o]?xxe(m[s!=="children"?s:"label"],u):xxe(m[a],u)},h=c?function(f){return ZDe(f)}:function(f){return f};return t.forEach(function(f){if(f[o]){var m=d(n,h(f));if(m)l.push(f);else{var p=f[o].filter(function(g){return d(n,h(g))});p.length&&l.push(Ie(Ie({},f),{},ye({},o,p)))}return}d(n,h(f))&&l.push(f)}),l},[t,i,r,n,e])};var fnt=0,I$n=Lu();function A$n(){var t;return I$n?(t=fnt,fnt+=1):t="TEST_OR_SSR",t}function R$n(t){var e=b.useState(),n=He(e,2),i=n[0],r=n[1];return b.useEffect(function(){r("rc_select_".concat(A$n()))},[]),t||i}var P$n=["children","value"],O$n=["children"];function j$n(t){var e=t,n=e.key,i=e.props,r=i.children,o=i.value,s=di(i,P$n);return Ie({key:n,value:o!==void 0?o:n,children:r},s)}function p6e(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return fc(t).map(function(n,i){if(!b.isValidElement(n)||!n.type)return null;var r=n,o=r.type.isSelectOptGroup,s=r.key,a=r.props,l=a.children,c=di(a,O$n);return e||!o?j$n(n):Ie(Ie({key:"__RC_SELECT_GRP__".concat(s===null?i:s,"__"),label:s},c),{},{options:p6e(l)})}).filter(function(n){return n})}var F$n=function(e,n,i,r,o){return b.useMemo(function(){var s=e,a=!e;a&&(s=p6e(n));var l=new Map,c=new Map,u=function(f,m,p){p&&typeof p=="string"&&f.set(m[p],m)},d=function h(f){for(var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p=0;p<f.length;p+=1){var g=f[p];!g[i.options]||m?(l.set(g[i.value],g),u(c,g,i.label),u(c,g,r),u(c,g,o)):h(g[i.options],!0)}};return d(s),{options:s,valueOptions:l,labelOptions:c}},[e,n,i,r,o])};function mnt(t){var e=b.useRef();e.current=t;var n=b.useCallback(function(){return e.current.apply(e,arguments)},[]);return n}function $$n(t){var e=t.mode,n=t.options,i=t.children,r=t.backfill,o=t.allowClear,s=t.placeholder,a=t.getInputElement,l=t.showSearch,c=t.onSearch,u=t.defaultOpen,d=t.autoFocus,h=t.labelInValue,f=t.value,m=t.inputValue,p=t.optionLabelProp,g=qne(e),y=l!==void 0?l:g||e==="combobox",_=n||p6e(i);if(ii(e!=="tags"||_.every(function(E){return!E.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),e==="tags"||e==="combobox"){var w=_.some(function(E){return E.options?E.options.some(function(D){return typeof("value"in D?D.value:D.key)=="number"}):typeof("value"in E?E.value:E.key)=="number"});ii(!w,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(ii(e!=="combobox"||!p,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),ii(e==="combobox"||!r,"`backfill` only works with `combobox` mode."),ii(e==="combobox"||!a,"`getInputElement` only work with `combobox` mode."),Sne(e!=="combobox"||!a||!o||!s,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),c&&!y&&e!=="combobox"&&e!=="tags"&&ii(!1,"`onSearch` should work with `showSearch` instead of use alone."),Sne(!u||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),f!=null){var C=d6e(f);ii(!h||C.every(function(E){return Un(E)==="object"&&("key"in E||"value"in E)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),ii(!g||Array.isArray(f),"`value` should be array when `mode` is `multiple` or `tags`")}if(i){var N=null;fc(i).some(function(E){if(!b.isValidElement(E)||!E.type)return!1;var D=E,k=D.type;if(k.isSelectOption)return!1;if(k.isSelectOptGroup){var M=fc(E.props.children).every(function(T){return!b.isValidElement(T)||!E.type||T.type.isSelectOption?!0:(N=T.type,!1)});return!M}return N=k,!0}),N&&ii(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(N.displayName||N.name||N,"`.")),ii(m===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function V$n(t,e){if(t){var n=function i(r){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=0;s<r.length;s++){var a=r[s];if(a[e==null?void 0:e.value]===null)return ii(!1,"`value` in Select options should not be `null`."),!0;if(!o&&Array.isArray(a[e==null?void 0:e.options])&&i(a[e==null?void 0:e.options],!0))break}};n(t)}}var B$n=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],z$n=["inputValue"];function H$n(t){return!t||Un(t)!=="object"}var iLt=b.forwardRef(function(t,e){var n=t.id,i=t.mode,r=t.prefixCls,o=r===void 0?"rc-select":r,s=t.backfill,a=t.fieldNames,l=t.inputValue,c=t.searchValue,u=t.onSearch,d=t.autoClearSearchValue,h=d===void 0?!0:d,f=t.onSelect,m=t.onDeselect,p=t.dropdownMatchSelectWidth,g=p===void 0?!0:p,y=t.filterOption,_=t.filterSort,w=t.optionFilterProp,C=t.optionLabelProp,N=t.options,E=t.optionRender,D=t.children,k=t.defaultActiveFirstOption,M=t.menuItemSelectedIcon,T=t.virtual,A=t.direction,R=t.listHeight,P=R===void 0?200:R,O=t.listItemHeight,V=O===void 0?20:O,F=t.labelRender,$=t.value,B=t.defaultValue,z=t.labelInValue,H=t.onChange,K=t.maxCount,q=di(t,B$n),U=R$n(n),Y=qne(i),J=!!(!N&&D),ae=b.useMemo(function(){return y===void 0&&i==="combobox"?!1:y},[y,i]),se=b.useMemo(function(){return QMt(a,J)},[JSON.stringify(a),J]),oe=ho("",{value:c!==void 0?c:l,postState:function(mt){return mt||""}}),fe=He(oe,2),de=fe[0],ie=fe[1],Q=F$n(N,D,se,w,C),be=Q.valueOptions,le=Q.labelOptions,Ne=Q.options,Le=b.useCallback(function(at){var mt=d6e(at);return mt.map(function(It){var Ve,bt,wt,$e,We;if(H$n(It))Ve=It;else{var tt;wt=It.key,bt=It.label,Ve=(tt=It.value)!==null&&tt!==void 0?tt:wt}var _t=be.get(Ve);if(_t){var ht;if(bt===void 0&&(bt=_t==null?void 0:_t[C||se.label]),wt===void 0&&(wt=(ht=_t==null?void 0:_t.key)!==null&&ht!==void 0?ht:Ve),$e=_t==null?void 0:_t.disabled,We=_t==null?void 0:_t.title,!C){var qe=_t==null?void 0:_t[se.label];qe!==void 0&&!b.isValidElement(qe)&&!b.isValidElement(bt)&&qe!==bt&&ii(!1,"`label` of `value` is not same as `label` in Select options.")}}return{label:bt,value:Ve,key:wt,disabled:$e,title:We}})},[se,C,be]),Te=ho(B,{value:$}),De=He(Te,2),Pe=De[0],ge=De[1],he=b.useMemo(function(){var at,mt=Y&&Pe===null?[]:Pe,It=Le(mt);return i==="combobox"&&z6n((at=It[0])===null||at===void 0?void 0:at.value)?[]:It},[Pe,Le,i,Y]),me=L$n(he,be),X=He(me,2),re=X[0],we=X[1],ue=b.useMemo(function(){if(!i&&re.length===1){var at=re[0];if(at.value===null&&(at.label===null||at.label===void 0))return[]}return re.map(function(mt){var It;return Ie(Ie({},mt),{},{label:(It=typeof F=="function"?F(mt):mt.label)!==null&&It!==void 0?It:mt.value})})},[i,re,F]),Ce=b.useMemo(function(){return new Set(re.map(function(at){return at.value}))},[re]);b.useEffect(function(){if(i==="combobox"){var at,mt=(at=re[0])===null||at===void 0?void 0:at.value;ie(B6n(mt)?String(mt):"")}},[re]);var ze=mnt(function(at,mt){var It=mt??at;return ye(ye({},se.value,at),se.label,It)}),Ye=b.useMemo(function(){if(i!=="tags")return Ne;var at=Ot(Ne),mt=function(Ve){return be.has(Ve)};return Ot(re).sort(function(It,Ve){return It.value<Ve.value?-1:1}).forEach(function(It){var Ve=It.value;mt(Ve)||at.push(ze(Ve,It.label))}),at},[ze,Ne,be,re,i]),Ke=T$n(Ye,se,de,ae,w),Xe=b.useMemo(function(){return i!=="tags"||!de||Ke.some(function(at){return at[w||"value"]===de})||Ke.some(function(at){return at[se.value]===de})?Ke:[ze(de)].concat(Ot(Ke))},[ze,w,i,Ke,de,se]),it=function at(mt){var It=Ot(mt).sort(function(Ve,bt){return _(Ve,bt,{searchValue:de})});return It.map(function(Ve){return Array.isArray(Ve.options)?Ie(Ie({},Ve),{},{options:Ve.options.length>0?at(Ve.options):Ve.options}):Ve})},ut=b.useMemo(function(){return _?it(Xe):Xe},[Xe,_,de]),Ge=b.useMemo(function(){return a$n(ut,{fieldNames:se,childrenAsData:J})},[ut,se,J]),Ee=function(mt){var It=Le(mt);if(ge(It),H&&(It.length!==re.length||It.some(function(wt,$e){var We;return((We=re[$e])===null||We===void 0?void 0:We.value)!==(wt==null?void 0:wt.value)}))){var Ve=z?It:It.map(function(wt){return wt.value}),bt=It.map(function(wt){return ZDe(we(wt.value))});H(Y?Ve:Ve[0],Y?bt:bt[0])}},Se=b.useState(null),je=He(Se,2),nt=je[0],rt=je[1],St=b.useState(0),At=He(St,2),Nt=At[0],vt=At[1],$t=k!==void 0?k:i!=="combobox",ln=b.useCallback(function(at,mt){var It=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ve=It.source,bt=Ve===void 0?"keyboard":Ve;vt(mt),s&&i==="combobox"&&at!==null&&bt==="keyboard"&&rt(String(at))},[s,i]),Jt=function(mt,It,Ve){var bt=function(){var Pt,an=we(mt);return[z?{label:an==null?void 0:an[se.label],value:mt,key:(Pt=an==null?void 0:an.key)!==null&&Pt!==void 0?Pt:mt}:mt,ZDe(an)]};if(It&&f){var wt=bt(),$e=He(wt,2),We=$e[0],tt=$e[1];f(We,tt)}else if(!It&&m&&Ve!=="clear"){var _t=bt(),ht=He(_t,2),qe=ht[0],ft=ht[1];m(qe,ft)}},en=mnt(function(at,mt){var It,Ve=Y?mt.selected:!0;Ve?It=Y?[].concat(Ot(re),[at]):[at]:It=re.filter(function(bt){return bt.value!==at}),Ee(It),Jt(at,Ve),i==="combobox"?rt(""):(!qne||h)&&(ie(""),rt(""))}),Ft=function(mt,It){Ee(mt);var Ve=It.type,bt=It.values;(Ve==="remove"||Ve==="clear")&&bt.forEach(function(wt){Jt(wt.value,!1,Ve)})},dn=function(mt,It){if(ie(mt),rt(null),It.source==="submit"){var Ve=(mt||"").trim();if(Ve){var bt=Array.from(new Set([].concat(Ot(Ce),[Ve])));Ee(bt),Jt(Ve,!0),ie("")}return}It.source!=="blur"&&(i==="combobox"&&Ee(mt),u==null||u(mt))},Ze=function(mt){var It=mt;i!=="tags"&&(It=mt.map(function(bt){var wt=le.get(bt);return wt==null?void 0:wt.value}).filter(function(bt){return bt!==void 0}));var Ve=Array.from(new Set([].concat(Ot(Ce),Ot(It))));Ee(Ve),Ve.forEach(function(bt){Jt(bt,!0)})},dt=b.useMemo(function(){var at=T!==!1&&g!==!1;return Ie(Ie({},Q),{},{flattenOptions:Ge,onActiveValue:ln,defaultActiveFirstOption:$t,onSelect:en,menuItemSelectedIcon:M,rawValues:Ce,fieldNames:se,virtual:at,direction:A,listHeight:P,listItemHeight:V,childrenAsData:J,maxCount:K,optionRender:E})},[K,Q,Ge,ln,$t,en,M,Ce,se,T,g,A,P,V,J,E]);return $$n(t),V$n(Ne,se),b.createElement(h6e.Provider,{value:dt},b.createElement(JMt,lt({},q,{id:U,prefixCls:o,ref:e,omitDomProps:z$n,mode:i,displayValues:ue,onDisplayValuesChange:Ft,direction:A,searchValue:de,onSearch:dn,autoClearSearchValue:h,onSearchSplit:Ze,dropdownMatchSelectWidth:g,OptionList:nLt,emptyOptions:!Ge.length,activeValue:nt,activeDescendantId:"".concat(U,"_list_").concat(Nt)})))});iLt.displayName="Select";var g6e=iLt;g6e.Option=m6e;g6e.OptGroup=f6e;function oS(t,e,n){return Me({[`${t}-status-success`]:e==="success",[`${t}-status-warning`]:e==="warning",[`${t}-status-error`]:e==="error",[`${t}-status-validating`]:e==="validating",[`${t}-has-feedback`]:n})}const BA=(t,e)=>e||t,rLt=()=>{const[,t]=Sd(),n=new ko(t.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return b.createElement("svg",{style:n,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},b.createElement("title",null,"empty image"),b.createElement("g",{fill:"none",fillRule:"evenodd"},b.createElement("g",{transform:"translate(24 31.67)"},b.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),b.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),b.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),b.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),b.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),b.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),b.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},b.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),b.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))};rLt.displayName="EmptyImage";const oLt=()=>{const[,t]=Sd(),{colorFill:e,colorFillTertiary:n,colorFillQuaternary:i,colorBgContainer:r}=t,{borderColor:o,shadowColor:s,contentColor:a}=b.useMemo(()=>({borderColor:new ko(e).onBackground(r).toHexShortString(),shadowColor:new ko(n).onBackground(r).toHexShortString(),contentColor:new ko(i).onBackground(r).toHexShortString()}),[e,n,i,r]);return b.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},b.createElement("title",null,"Simple Empty"),b.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},b.createElement("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),b.createElement("g",{fillRule:"nonzero",stroke:o},b.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),b.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:a}))))};oLt.displayName="SimpleImage";const W$n=t=>{const{componentCls:e,margin:n,marginXS:i,marginXL:r,fontSize:o,lineHeight:s}=t;return{[e]:{marginInline:i,fontSize:o,lineHeight:s,textAlign:"center",[`${e}-image`]:{height:t.emptyImgHeight,marginBottom:i,opacity:t.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${e}-description`]:{color:t.colorTextDescription},[`${e}-footer`]:{marginTop:n},"&-normal":{marginBlock:r,color:t.colorTextDescription,[`${e}-description`]:{color:t.colorTextDescription},[`${e}-image`]:{height:t.emptyImgHeightMD}},"&-small":{marginBlock:i,color:t.colorTextDescription,[`${e}-image`]:{height:t.emptyImgHeightSM}}}}},U$n=Jr("Empty",t=>{const{componentCls:e,controlHeightLG:n,calc:i}=t,r=mr(t,{emptyImgCls:`${e}-img`,emptyImgHeight:i(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:i(n).mul(.875).equal()});return[W$n(r)]});var K$n=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const sLt=b.createElement(rLt,null),aLt=b.createElement(oLt,null),wh=t=>{var{className:e,rootClassName:n,prefixCls:i,image:r=sLt,description:o,children:s,imageStyle:a,style:l}=t,c=K$n(t,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:u,direction:d,empty:h}=b.useContext(jn),f=u("empty",i),[m,p,g]=U$n(f),[y]=bb("Empty"),_=typeof o<"u"?o:y==null?void 0:y.description,w=typeof _=="string"?_:"empty";let C=null;return typeof r=="string"?C=b.createElement("img",{alt:w,src:r}):C=r,m(b.createElement("div",Object.assign({className:Me(p,g,f,h==null?void 0:h.className,{[`${f}-normal`]:r===aLt,[`${f}-rtl`]:d==="rtl"},e,n),style:Object.assign(Object.assign({},h==null?void 0:h.style),l)},c),b.createElement("div",{className:`${f}-image`,style:a},C),_&&b.createElement("div",{className:`${f}-description`},_),s&&b.createElement("div",{className:`${f}-footer`},s)))};wh.PRESENTED_IMAGE_DEFAULT=sLt;wh.PRESENTED_IMAGE_SIMPLE=aLt;wh.displayName="Empty";const lLt=t=>{const{componentName:e}=t,{getPrefixCls:n}=b.useContext(jn),i=n("empty");switch(e){case"Table":case"List":return Z.createElement(wh,{image:wh.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return Z.createElement(wh,{image:wh.PRESENTED_IMAGE_SIMPLE,className:`${i}-small`});case"Table.filter":return null;default:return Z.createElement(wh,null)}},d6=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var i,r;const{variant:o,[t]:s}=b.useContext(jn),a=b.useContext(pMt),l=s==null?void 0:s.variant;let c;typeof e<"u"?c=e:n===!1?c="borderless":c=(r=(i=a??l)!==null&&i!==void 0?i:o)!==null&&r!==void 0?r:"outlined";const u=eOn.includes(c);return[c,u]},q$n=t=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:t==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},n),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},n),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},n),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},n),{points:["br","tr"],offset:[0,-4]})}};function G$n(t,e){return t||q$n(e)}const pnt=t=>{const{optionHeight:e,optionFontSize:n,optionLineHeight:i,optionPadding:r}=t;return{position:"relative",display:"block",minHeight:e,padding:r,color:t.colorText,fontWeight:"normal",fontSize:n,lineHeight:i,boxSizing:"border-box"}},Y$n=t=>{const{antCls:e,componentCls:n}=t,i=`${n}-item`,r=`&${e}-slide-up-enter${e}-slide-up-enter-active`,o=`&${e}-slide-up-appear${e}-slide-up-appear-active`,s=`&${e}-slide-up-leave${e}-slide-up-leave-active`,a=`${n}-dropdown-placement-`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},fo(t)),{position:"absolute",top:-9999,zIndex:t.zIndexPopup,boxSizing:"border-box",padding:t.paddingXXS,overflow:"hidden",fontSize:t.fontSize,fontVariant:"initial",backgroundColor:t.colorBgElevated,borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,[`
          ${r}${a}bottomLeft,
          ${o}${a}bottomLeft
        `]:{animationName:she},[`
          ${r}${a}topLeft,
          ${o}${a}topLeft,
          ${r}${a}topRight,
          ${o}${a}topRight
        `]:{animationName:lhe},[`${s}${a}bottomLeft`]:{animationName:ahe},[`
          ${s}${a}topLeft,
          ${s}${a}topRight
        `]:{animationName:che},"&-hidden":{display:"none"},[i]:Object.assign(Object.assign({},pnt(t)),{cursor:"pointer",transition:`background ${t.motionDurationSlow} ease`,borderRadius:t.borderRadiusSM,"&-group":{color:t.colorTextDescription,fontSize:t.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Mm),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${i}-option-disabled)`]:{backgroundColor:t.optionActiveBg},[`&-selected:not(${i}-option-disabled)`]:{color:t.optionSelectedColor,fontWeight:t.optionSelectedFontWeight,backgroundColor:t.optionSelectedBg,[`${i}-option-state`]:{color:t.colorPrimary},[`&:has(+ ${i}-option-selected:not(${i}-option-disabled))`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${i}-option-selected:not(${i}-option-disabled)`]:{borderStartStartRadius:0,borderStartEndRadius:0}}},"&-disabled":{[`&${i}-option-selected`]:{backgroundColor:t.colorBgContainerDisabled},color:t.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:t.calc(t.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},pnt(t)),{color:t.colorTextDisabled})}),"&-rtl":{direction:"rtl"}})},ow(t,"slide-up"),ow(t,"slide-down"),Vj(t,"move-up"),Vj(t,"move-down")]},cLt=t=>{const{multipleSelectItemHeight:e,paddingXXS:n,lineWidth:i,INTERNAL_FIXED_ITEM_MARGIN:r}=t,o=t.max(t.calc(n).sub(i).equal(),0),s=t.max(t.calc(o).sub(r).equal(),0);return{basePadding:o,containerPadding:s,itemHeight:xe(e),itemLineHeight:xe(t.calc(e).sub(t.calc(t.lineWidth).mul(2)).equal())}},X$n=t=>{const{multipleSelectItemHeight:e,selectHeight:n,lineWidth:i}=t;return t.calc(n).sub(e).div(2).sub(i).equal()},uLt=t=>{const{componentCls:e,iconCls:n,borderRadiusSM:i,motionDurationSlow:r,paddingXS:o,multipleItemColorDisabled:s,multipleItemBorderColorDisabled:a,colorIcon:l,colorIconHover:c,INTERNAL_FIXED_ITEM_MARGIN:u}=t;return{[`${e}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"},[`${e}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:u,borderRadius:i,cursor:"default",transition:`font-size ${r}, line-height ${r}, height ${r}`,marginInlineEnd:t.calc(u).mul(2).equal(),paddingInlineStart:o,paddingInlineEnd:t.calc(o).div(2).equal(),[`${e}-disabled&`]:{color:s,borderColor:a,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:t.calc(o).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},e6()),{display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}})}}}},Z$n=(t,e)=>{const{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:i}=t,r=`${n}-selection-overflow`,o=t.multipleSelectItemHeight,s=X$n(t),a=e?`${n}-${e}`:"",l=cLt(t);return{[`${n}-multiple${a}`]:Object.assign(Object.assign({},uLt(t)),{[`${n}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",height:"100%",paddingInline:l.basePadding,paddingBlock:l.containerPadding,borderRadius:t.borderRadius,[`${n}-disabled&`]:{background:t.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${xe(i)} 0`,lineHeight:xe(o),visibility:"hidden",content:'"\\a0"'}},[`${n}-selection-item`]:{height:l.itemHeight,lineHeight:xe(l.itemLineHeight)},[`${r}-item + ${r}-item`]:{[`${n}-selection-search`]:{marginInlineStart:0}},[`${r}-item-suffix`]:{height:"100%"},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(s).equal(),"\n          &-input,\n          &-mirror\n        ":{height:o,fontFamily:t.fontFamily,lineHeight:xe(o),transition:`all ${t.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:t.inputPaddingHorizontalBase,insetInlineEnd:t.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${t.motionDurationSlow}`}})}};function wxe(t,e){const{componentCls:n}=t,i=e?`${n}-${e}`:"",r={[`${n}-multiple${i}`]:{fontSize:t.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:"text"}},[`
        &${n}-show-arrow ${n}-selector,
        &${n}-allow-clear ${n}-selector
      `]:{paddingInlineEnd:t.calc(t.fontSizeIcon).add(t.controlPaddingHorizontal).equal()}}};return[Z$n(t,e),r]}const Q$n=t=>{const{componentCls:e}=t,n=mr(t,{selectHeight:t.controlHeightSM,multipleSelectItemHeight:t.multipleItemHeightSM,borderRadius:t.borderRadiusSM,borderRadiusSM:t.borderRadiusXS}),i=mr(t,{fontSize:t.fontSizeLG,selectHeight:t.controlHeightLG,multipleSelectItemHeight:t.multipleItemHeightLG,borderRadius:t.borderRadiusLG,borderRadiusSM:t.borderRadius});return[wxe(t),wxe(n,"sm"),{[`${e}-multiple${e}-sm`]:{[`${e}-selection-placeholder`]:{insetInline:t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal()},[`${e}-selection-search`]:{marginInlineStart:2}}},wxe(i,"lg")]};function Cxe(t,e){const{componentCls:n,inputPaddingHorizontalBase:i,borderRadius:r,fontSizeIcon:o}=t,s=t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),a=t.calc(i).add(o).equal(),l=e?`${n}-${e}`:"";return{[`${n}-single${l}`]:{fontSize:t.fontSize,height:t.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},fo(t,!0)),{display:"flex",borderRadius:r,[`${n}-selection-search`]:{position:"absolute",top:0,insetInlineStart:i,insetInlineEnd:xe(a),bottom:0,"&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
          ${n}-selection-item,
          ${n}-selection-placeholder
        `]:{padding:0,lineHeight:xe(s),transition:`all ${t.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${n}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${n}-selection-item:empty:after`,`${n}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
        &${n}-show-arrow ${n}-selection-item,
        &${n}-show-arrow ${n}-selection-placeholder
      `]:{paddingInlineEnd:t.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:t.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:"100%",padding:`0 ${xe(i)}`,[`${n}-selection-search-input`]:{height:s},"&:after":{lineHeight:xe(s)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${xe(i)}`,"&:after":{display:"none"}}}}}}}function J$n(t){const{componentCls:e}=t,n=t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal();return[Cxe(t),Cxe(mr(t,{controlHeight:t.controlHeightSM,borderRadius:t.borderRadiusSM}),"sm"),{[`${e}-single${e}-sm`]:{[`&:not(${e}-customize-input)`]:{[`${e}-selection-search`]:{insetInlineStart:n,insetInlineEnd:n},[`${e}-selector`]:{padding:`0 ${xe(n)}`},[`&${e}-show-arrow ${e}-selection-search`]:{insetInlineEnd:t.calc(n).add(t.calc(t.fontSize).mul(1.5)).equal()},[`
            &${e}-show-arrow ${e}-selection-item,
            &${e}-show-arrow ${e}-selection-placeholder
          `]:{paddingInlineEnd:t.calc(t.fontSize).mul(1.5).equal()}}}},Cxe(mr(t,{controlHeight:t.singleItemHeightLG,fontSize:t.fontSizeLG,borderRadius:t.borderRadiusLG}),"lg")]}const e8n=t=>{const{fontSize:e,lineHeight:n,lineWidth:i,controlHeight:r,controlHeightSM:o,controlHeightLG:s,paddingXXS:a,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:h,controlItemBgHover:f,colorBgContainer:m,colorFillSecondary:p,colorBgContainerDisabled:g,colorTextDisabled:y,colorPrimaryHover:_,colorPrimary:w,controlOutline:C}=t,N=a*2,E=i*2,D=Math.min(r-N,r-E),k=Math.min(o-N,o-E),M=Math.min(s-N,s-E);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(a/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:h,optionActiveBg:f,optionPadding:`${(r-e*n)/2}px ${l}px`,optionFontSize:e,optionLineHeight:n,optionHeight:r,selectorBg:m,clearBg:m,singleItemHeightLG:s,multipleItemBg:p,multipleItemBorderColor:"transparent",multipleItemHeight:D,multipleItemHeightSM:k,multipleItemHeightLG:M,multipleSelectorBgDisabled:g,multipleItemColorDisabled:y,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(t.fontSize*1.25),hoverBorderColor:_,activeBorderColor:w,activeOutlineColor:C}},dLt=(t,e)=>{const{componentCls:n,antCls:i,controlOutlineWidth:r}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${xe(t.lineWidth)} ${t.lineType} ${e.borderColor}`,background:t.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${i}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:e.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:e.activeBorderColor,boxShadow:`0 0 0 ${xe(r)} ${e.activeOutlineColor}`,outline:0}}}},gnt=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},dLt(t,e))}),t8n=t=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},dLt(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor})),gnt(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline})),gnt(t,{status:"warning",borderColor:t.colorWarning,hoverBorderHover:t.colorWarningHover,activeBorderColor:t.colorWarning,activeOutlineColor:t.colorWarningOutline})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${xe(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),hLt=(t,e)=>{const{componentCls:n,antCls:i}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:e.bg,border:`${xe(t.lineWidth)} ${t.lineType} transparent`,color:e.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${i}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:e.hoverBg},[`${n}-focused& ${n}-selector`]:{background:t.selectorBg,borderColor:e.activeBorderColor,outline:0}}}},bnt=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},hLt(t,e))}),n8n=t=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},hLt(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor,color:t.colorText})),bnt(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,color:t.colorError})),bnt(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{borderColor:t.colorBorder,background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.colorBgContainer,border:`${xe(t.lineWidth)} ${t.lineType} ${t.colorSplit}`}})}),i8n=t=>({"&-borderless":{[`${t.componentCls}-selector`]:{background:"transparent",borderColor:"transparent"},[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${xe(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`},[`&${t.componentCls}-status-error`]:{[`${t.componentCls}-selection-item`]:{color:t.colorError}},[`&${t.componentCls}-status-warning`]:{[`${t.componentCls}-selection-item`]:{color:t.colorWarning}}}}),r8n=t=>({[t.componentCls]:Object.assign(Object.assign(Object.assign({},t8n(t)),n8n(t)),i8n(t))}),o8n=t=>{const{componentCls:e}=t;return{position:"relative",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,input:{cursor:"pointer"},[`${e}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${e}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},s8n=t=>{const{componentCls:e}=t;return{[`${e}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},a8n=t=>{const{antCls:e,componentCls:n,inputPaddingHorizontalBase:i,iconCls:r}=t;return{[n]:Object.assign(Object.assign({},fo(t)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},o8n(t)),s8n(t)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},Mm),{[`> ${e}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},Mm),{flex:1,color:t.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},e6()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:i,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${t.motionDurationSlow} ease`,[r]:{verticalAlign:"top",transition:`transform ${t.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:i,zIndex:1,display:"inline-block",width:t.fontSizeIcon,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${t.motionDurationMid} ease, opacity ${t.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:t.colorTextTertiary}},[`&:hover ${n}-clear`]:{opacity:1,background:t.colorBgBase,borderRadius:"50%"}}),[`${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:t.calc(i).add(t.fontSize).add(t.paddingXS).equal()}}}},l8n=t=>{const{componentCls:e}=t;return[{[e]:{[`&${e}-in-form-item`]:{width:"100%"}}},a8n(t),J$n(t),Q$n(t),Y$n(t),{[`${e}-rtl`]:{direction:"rtl"}},a6(t,{borderElCls:`${e}-selector`,focusElCls:`${e}-focused`})]},c8n=Jr("Select",(t,e)=>{let{rootPrefixCls:n}=e;const i=mr(t,{rootPrefixCls:n,inputPaddingHorizontalBase:t.calc(t.paddingSM).sub(1).equal(),multipleSelectItemHeight:t.multipleItemHeight,selectHeight:t.controlHeight});return[l8n(i),r8n(i)]},e8n,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var u8n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},d8n=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:u8n}))},Xk=b.forwardRef(d8n);Xk.displayName="CheckOutlined";var h8n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},f8n=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:h8n}))},h6=b.forwardRef(f8n);h6.displayName="DownOutlined";var m8n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},p8n=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:m8n}))},ghe=b.forwardRef(p8n);ghe.displayName="SearchOutlined";function fLt(t){let{suffixIcon:e,clearIcon:n,menuItemSelectedIcon:i,removeIcon:r,loading:o,multiple:s,hasFeedback:a,prefixCls:l,showSuffixIcon:c,feedbackIcon:u,showArrow:d,componentName:h}=t;Cr(h).deprecated(!n,"clearIcon","allowClear={{ clearIcon: React.ReactNode }}");const f=n??b.createElement($S,null),m=_=>e===null&&!a&&!d?null:b.createElement(b.Fragment,null,c!==!1&&_,a&&u);let p=null;if(e!==void 0)p=m(e);else if(o)p=m(b.createElement(Xd,{spin:!0}));else{const _=`${l}-suffix`;p=w=>{let{open:C,showSearch:N}=w;return m(C&&N?b.createElement(ghe,{className:_}):b.createElement(h6,{className:_}))}}let g=null;i!==void 0?g=i:s?g=b.createElement(Xk,null):g=null;let y=null;return r!==void 0?y=r:y=b.createElement(vb,null),{clearIcon:f,suffixIcon:p,itemIcon:g,removeIcon:y}}function g8n(t,e){return e!==void 0?e:t!==null}var b8n=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const mLt="SECRET_COMBOBOX_MODE_DO_NOT_USE",pLt=(t,e)=>{var n;const{prefixCls:i,bordered:r,className:o,rootClassName:s,getPopupContainer:a,popupClassName:l,dropdownClassName:c,listHeight:u=256,placement:d,listItemHeight:h,size:f,disabled:m,notFoundContent:p,status:g,builtinPlacements:y,dropdownMatchSelectWidth:_,popupMatchSelectWidth:w,direction:C,style:N,allowClear:E,variant:D,dropdownStyle:k,transitionName:M,tagRender:T,maxCount:A}=t,R=b8n(t,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount"]),{getPopupContainer:P,getPrefixCls:O,renderEmpty:V,direction:F,virtual:$,popupMatchSelectWidth:B,popupOverflow:z,select:H}=b.useContext(jn),[,K]=Sd(),q=h??(K==null?void 0:K.controlHeight),U=O("select",i),Y=O(),J=C??F,{compactSize:ae,compactItemClassnames:se}=VS(U,J),[oe,fe]=d6("select",D,r),de=Il(U),[ie,Q,be]=c8n(U,de),le=b.useMemo(()=>{const{mode:je}=t;if(je!=="combobox")return je===mLt?"combobox":je},[t.mode]),Ne=le==="multiple"||le==="tags",Le=g8n(t.suffixIcon,t.showArrow),Te=(n=w??_)!==null&&n!==void 0?n:B,{status:De,hasFeedback:Pe,isFormItemInput:ge,feedbackIcon:he}=b.useContext(ju),me=BA(De,g);let X;p!==void 0?X=p:le==="combobox"?X=null:X=(V==null?void 0:V("Select"))||b.createElement(lLt,{componentName:"Select"});const{suffixIcon:re,itemIcon:we,removeIcon:ue,clearIcon:Ce}=fLt(Object.assign(Object.assign({},R),{multiple:Ne,hasFeedback:Pe,feedbackIcon:he,showSuffixIcon:Le,prefixCls:U,componentName:"Select"})),ze=E===!0?{clearIcon:Ce}:E,Ye=Zs(R,["suffixIcon","itemIcon"]),Ke=Me(l||c,{[`${U}-dropdown-${J}`]:J==="rtl"},s,be,de,Q),Xe=Hc(je=>{var nt;return(nt=f??ae)!==null&&nt!==void 0?nt:je}),it=b.useContext(Yd),ut=m??it,Ge=Me({[`${U}-lg`]:Xe==="large",[`${U}-sm`]:Xe==="small",[`${U}-rtl`]:J==="rtl",[`${U}-${oe}`]:fe,[`${U}-in-form-item`]:ge},oS(U,me,Pe),se,H==null?void 0:H.className,o,s,be,de,Q),Ee=b.useMemo(()=>d!==void 0?d:J==="rtl"?"bottomRight":"bottomLeft",[d,J]);{const je=Cr("Select");je.deprecated(!c,"dropdownClassName","popupClassName"),je.deprecated(_===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),je(!("showArrow"in t),"deprecated","`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."),je.deprecated(!("bordered"in t),"bordered","variant"),je(!(typeof A<"u"&&!Ne),"usage","`maxCount` only works with mode `multiple` or `tags`")}const[Se]=Mw("SelectLike",k==null?void 0:k.zIndex);return ie(b.createElement(g6e,Object.assign({ref:e,virtual:$,showSearch:H==null?void 0:H.showSearch},Ye,{style:Object.assign(Object.assign({},H==null?void 0:H.style),N),dropdownMatchSelectWidth:Te,transitionName:Bp(Y,"slide-up",M),builtinPlacements:G$n(y,z),listHeight:u,listItemHeight:q,mode:le,prefixCls:U,placement:Ee,direction:J,suffixIcon:re,menuItemSelectedIcon:we,removeIcon:ue,allowClear:ze,notFoundContent:X,className:Ge,getPopupContainer:a||P,dropdownClassName:Ke,disabled:ut,dropdownStyle:Object.assign(Object.assign({},k),{zIndex:Se}),maxCount:Ne?A:void 0,tagRender:Ne?T:void 0})))};pLt.displayName="Select";const Lo=b.forwardRef(pLt),v8n=BK(Lo);Lo.SECRET_COMBOBOX_MODE_DO_NOT_USE=mLt;Lo.Option=m6e;Lo.OptGroup=f6e;Lo._InternalPanelDoNotUseOrYouWillBeFired=v8n;Lo.displayName="Select";const L2=["xxl","xl","lg","md","sm","xs"],y8n=t=>({xs:`(max-width: ${t.screenXSMax}px)`,sm:`(min-width: ${t.screenSM}px)`,md:`(min-width: ${t.screenMD}px)`,lg:`(min-width: ${t.screenLG}px)`,xl:`(min-width: ${t.screenXL}px)`,xxl:`(min-width: ${t.screenXXL}px)`}),_8n=t=>{const e=t,n=[].concat(L2).reverse();return n.forEach((i,r)=>{const o=i.toUpperCase(),s=`screen${o}Min`,a=`screen${o}`;if(!(e[s]<=e[a]))throw new Error(`${s}<=${a} fails : !(${e[s]}<=${e[a]})`);if(r<n.length-1){const l=`screen${o}Max`;if(!(e[a]<=e[l]))throw new Error(`${a}<=${l} fails : !(${e[a]}<=${e[l]})`);const u=`screen${n[r+1].toUpperCase()}Min`;if(!(e[l]<=e[u]))throw new Error(`${l}<=${u} fails : !(${e[l]}<=${e[u]})`)}}),t};function gLt(){const[,t]=Sd(),e=y8n(_8n(t));return Z.useMemo(()=>{const n=new Map;let i=-1,r={};return{matchHandlers:{},dispatch(o){return r=o,n.forEach(s=>s(r)),n.size>=1},subscribe(o){return n.size||this.register(),i+=1,n.set(i,o),o(r),i},unsubscribe(o){n.delete(o),n.size||this.unregister()},unregister(){Object.keys(e).forEach(o=>{const s=e[o],a=this.matchHandlers[s];a==null||a.mql.removeListener(a==null?void 0:a.listener)}),n.clear()},register(){Object.keys(e).forEach(o=>{const s=e[o],a=c=>{let{matches:u}=c;this.dispatch(Object.assign(Object.assign({},r),{[o]:u}))},l=window.matchMedia(s);l.addListener(a),this.matchHandlers[s]={mql:l,listener:a},a(l)})},responsiveMap:e}},[t])}const bLt=(t,e)=>{if(e&&typeof e=="object")for(let n=0;n<L2.length;n++){const i=L2[n];if(t[i]&&e[i]!==void 0)return e[i]}};function bhe(){const[,t]=b.useReducer(e=>e+1,0);return t}function vhe(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const e=b.useRef({}),n=bhe(),i=gLt();return Lr(()=>{const r=i.subscribe(o=>{e.current=o,t&&n()});return()=>i.unsubscribe(r)},[]),e.current}const Gne=t=>t?typeof t=="function"?t():t:null;function b6e(t){var e=t.children,n=t.prefixCls,i=t.id,r=t.overlayInnerStyle,o=t.className,s=t.style;return b.createElement("div",{className:Me("".concat(n,"-content"),o),style:s},b.createElement("div",{className:"".concat(n,"-inner"),id:i,role:"tooltip",style:r},typeof e=="function"?e():e))}var $P={shiftX:64,adjustY:1},VP={adjustX:1,shiftY:!0},Pb=[0,0],x8n={left:{points:["cr","cl"],overflow:VP,offset:[-4,0],targetOffset:Pb},right:{points:["cl","cr"],overflow:VP,offset:[4,0],targetOffset:Pb},top:{points:["bc","tc"],overflow:$P,offset:[0,-4],targetOffset:Pb},bottom:{points:["tc","bc"],overflow:$P,offset:[0,4],targetOffset:Pb},topLeft:{points:["bl","tl"],overflow:$P,offset:[0,-4],targetOffset:Pb},leftTop:{points:["tr","tl"],overflow:VP,offset:[-4,0],targetOffset:Pb},topRight:{points:["br","tr"],overflow:$P,offset:[0,-4],targetOffset:Pb},rightTop:{points:["tl","tr"],overflow:VP,offset:[4,0],targetOffset:Pb},bottomRight:{points:["tr","br"],overflow:$P,offset:[0,4],targetOffset:Pb},rightBottom:{points:["bl","br"],overflow:VP,offset:[4,0],targetOffset:Pb},bottomLeft:{points:["tl","bl"],overflow:$P,offset:[0,4],targetOffset:Pb},leftBottom:{points:["br","bl"],overflow:VP,offset:[-4,0],targetOffset:Pb}},w8n=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],C8n=function(e,n){var i=e.overlayClassName,r=e.trigger,o=r===void 0?["hover"]:r,s=e.mouseEnterDelay,a=s===void 0?0:s,l=e.mouseLeaveDelay,c=l===void 0?.1:l,u=e.overlayStyle,d=e.prefixCls,h=d===void 0?"rc-tooltip":d,f=e.children,m=e.onVisibleChange,p=e.afterVisibleChange,g=e.transitionName,y=e.animation,_=e.motion,w=e.placement,C=w===void 0?"right":w,N=e.align,E=N===void 0?{}:N,D=e.destroyTooltipOnHide,k=D===void 0?!1:D,M=e.defaultVisible,T=e.getTooltipContainer,A=e.overlayInnerStyle;e.arrowContent;var R=e.overlay,P=e.id,O=e.showArrow,V=O===void 0?!0:O,F=di(e,w8n),$=b.useRef(null);b.useImperativeHandle(n,function(){return $.current});var B=Ie({},F);"visible"in e&&(B.popupVisible=e.visible);var z=function(){return b.createElement(b6e,{key:"content",prefixCls:h,id:P,overlayInnerStyle:A},R)};return b.createElement(HK,lt({popupClassName:i,prefixCls:h,popup:z,action:o,builtinPlacements:x8n,popupPlacement:C,ref:$,popupAlign:E,getPopupContainer:T,onPopupVisibleChange:m,afterPopupVisibleChange:p,popupTransitionName:g,popupAnimation:y,popupMotion:_,defaultPopupVisible:M,autoDestroy:k,mouseLeaveDelay:c,popupStyle:u,mouseEnterDelay:a,arrow:V},B),f)};const S8n=b.forwardRef(C8n);function yhe(t){const{sizePopupArrow:e,borderRadiusXS:n,borderRadiusOuter:i}=t,r=e/2,o=0,s=r,a=i*1/Math.sqrt(2),l=r-i*(1-1/Math.sqrt(2)),c=r-n*(1/Math.sqrt(2)),u=i*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),d=2*r-c,h=u,f=2*r-a,m=l,p=2*r-o,g=s,y=r*Math.sqrt(2)+i*(Math.sqrt(2)-2),_=i*(Math.sqrt(2)-1),w=`polygon(${_}px 100%, 50% ${_}px, ${2*r-_}px 100%, ${_}px 100%)`,C=`path('M ${o} ${s} A ${i} ${i} 0 0 0 ${a} ${l} L ${c} ${u} A ${n} ${n} 0 0 1 ${d} ${h} L ${f} ${m} A ${i} ${i} 0 0 0 ${p} ${g} Z')`;return{arrowShadowWidth:y,arrowPath:C,arrowPolygon:w}}const vLt=(t,e,n)=>{const{sizePopupArrow:i,arrowPolygon:r,arrowPath:o,arrowShadowWidth:s,borderRadiusXS:a,calc:l}=t;return{pointerEvents:"none",width:i,height:i,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:i,height:l(i).div(2).equal(),background:e,clipPath:{_multi_value_:!0,value:[r,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:s,height:s,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${xe(a)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},yLt=8;function _he(t){const{contentRadius:e,limitVerticalRadius:n}=t,i=e>12?e+2:12;return{arrowOffsetHorizontal:i,arrowOffsetVertical:n?yLt:i}}function PZ(t,e){return t?e:{}}function v6e(t,e,n){const{componentCls:i,boxShadowPopoverArrow:r,arrowOffsetVertical:o,arrowOffsetHorizontal:s}=t,{arrowDistance:a=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[i]:Object.assign(Object.assign(Object.assign(Object.assign({[`${i}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},vLt(t,e,r)),{"&:before":{background:e}})]},PZ(!!l.top,{[[`&-placement-top > ${i}-arrow`,`&-placement-topLeft > ${i}-arrow`,`&-placement-topRight > ${i}-arrow`].join(",")]:{bottom:a,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${i}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":s,[`> ${i}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${xe(s)})`,[`> ${i}-arrow`]:{right:{_skip_check_:!0,value:s}}}})),PZ(!!l.bottom,{[[`&-placement-bottom > ${i}-arrow`,`&-placement-bottomLeft > ${i}-arrow`,`&-placement-bottomRight > ${i}-arrow`].join(",")]:{top:a,transform:"translateY(-100%)"},[`&-placement-bottom > ${i}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":s,[`> ${i}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${xe(s)})`,[`> ${i}-arrow`]:{right:{_skip_check_:!0,value:s}}}})),PZ(!!l.left,{[[`&-placement-left > ${i}-arrow`,`&-placement-leftTop > ${i}-arrow`,`&-placement-leftBottom > ${i}-arrow`].join(",")]:{right:{_skip_check_:!0,value:a},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${i}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${i}-arrow`]:{top:o},[`&-placement-leftBottom > ${i}-arrow`]:{bottom:o}})),PZ(!!l.right,{[[`&-placement-right > ${i}-arrow`,`&-placement-rightTop > ${i}-arrow`,`&-placement-rightBottom > ${i}-arrow`].join(",")]:{left:{_skip_check_:!0,value:a},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${i}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${i}-arrow`]:{top:o},[`&-placement-rightBottom > ${i}-arrow`]:{bottom:o}}))}}function N8n(t,e,n,i){if(i===!1)return{adjustX:!1,adjustY:!1};const r=i&&typeof i=="object"?i:{},o={};switch(t){case"top":case"bottom":o.shiftX=e.arrowOffsetHorizontal*2+n,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=e.arrowOffsetVertical*2+n,o.shiftX=!0,o.adjustX=!0;break}const s=Object.assign(Object.assign({},o),r);return s.shiftX||(s.adjustX=!0),s.shiftY||(s.adjustY=!0),s}const vnt={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},E8n={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},D8n=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function _Lt(t){const{arrowWidth:e,autoAdjustOverflow:n,arrowPointAtCenter:i,offset:r,borderRadius:o,visibleFirst:s}=t,a=e/2,l={};return Object.keys(vnt).forEach(c=>{const u=i&&E8n[c]||vnt[c],d=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(l[c]=d,D8n.has(c)&&(d.autoArrow=!1),c){case"top":case"topLeft":case"topRight":d.offset[1]=-a-r;break;case"bottom":case"bottomLeft":case"bottomRight":d.offset[1]=a+r;break;case"left":case"leftTop":case"leftBottom":d.offset[0]=-a-r;break;case"right":case"rightTop":case"rightBottom":d.offset[0]=a+r;break}const h=_he({contentRadius:o,limitVerticalRadius:!0});if(i)switch(c){case"topLeft":case"bottomLeft":d.offset[0]=-h.arrowOffsetHorizontal-a;break;case"topRight":case"bottomRight":d.offset[0]=h.arrowOffsetHorizontal+a;break;case"leftTop":case"rightTop":d.offset[1]=-h.arrowOffsetHorizontal*2+a;break;case"leftBottom":case"rightBottom":d.offset[1]=h.arrowOffsetHorizontal*2-a;break}d.overflow=N8n(c,h,e,n),s&&(d.htmlRegion="visibleFirst")}),l}const k8n=t=>{const{componentCls:e,tooltipMaxWidth:n,tooltipColor:i,tooltipBg:r,tooltipBorderRadius:o,zIndexPopup:s,controlHeight:a,boxShadowSecondary:l,paddingSM:c,paddingXS:u}=t;return[{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},fo(t)),{position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:n,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":r,[`${e}-inner`]:{minWidth:"1em",minHeight:a,padding:`${xe(t.calc(c).div(2).equal())} ${xe(u)}`,color:i,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:r,borderRadius:o,boxShadow:l,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${e}-inner`]:{borderRadius:t.min(o,yLt)}},[`${e}-content`]:{position:"relative"}}),Jde(t,(d,h)=>{let{darkColor:f}=h;return{[`&${e}-${d}`]:{[`${e}-inner`]:{backgroundColor:f},[`${e}-arrow`]:{"--antd-arrow-background-color":f}}}})),{"&-rtl":{direction:"rtl"}})},v6e(t,"var(--antd-arrow-background-color)"),{[`${e}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow}}]},M8n=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+70},_he({contentRadius:t.borderRadius,limitVerticalRadius:!0})),yhe(mr(t,{borderRadiusOuter:Math.min(t.borderRadiusOuter,4)}))),xLt=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Jr("Tooltip",i=>{const{borderRadius:r,colorTextLightSolid:o,colorBgSpotlight:s}=i,a=mr(i,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:r,tooltipBg:s});return[k8n(a),s6(i,"zoom-big-fast")]},M8n,{resetStyle:!1,injectStyle:e})(t)},L8n=Bz.map(t=>`${t}-inverse`),T8n=["success","processing","error","default","warning"];function xhe(t){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat(Ot(L8n),Ot(Bz)).includes(t):Bz.includes(t)}function I8n(t){return T8n.includes(t)}function wLt(t,e){const n=xhe(e),i=Me({[`${t}-${e}`]:e&&n}),r={},o={};return e&&!n&&(r.background=e,o["--antd-arrow-background-color"]=e),{className:i,overlayStyle:r,arrowStyle:o}}const A8n=t=>{const{prefixCls:e,className:n,placement:i="top",title:r,color:o,overlayInnerStyle:s}=t,{getPrefixCls:a}=b.useContext(jn),l=a("tooltip",e),[c,u,d]=xLt(l),h=wLt(l,o),f=h.arrowStyle,m=Object.assign(Object.assign({},s),h.overlayStyle),p=Me(u,d,l,`${l}-pure`,`${l}-placement-${i}`,n,h.className);return c(b.createElement("div",{className:p,style:f},b.createElement("div",{className:`${l}-arrow`}),b.createElement(b6e,Object.assign({},t,{className:u,prefixCls:l,overlayInnerStyle:m}),r)))};var R8n=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const P8n=b.forwardRef((t,e)=>{var n,i;const{prefixCls:r,openClassName:o,getTooltipContainer:s,overlayClassName:a,color:l,overlayInnerStyle:c,children:u,afterOpenChange:d,afterVisibleChange:h,destroyTooltipOnHide:f,arrow:m=!0,title:p,overlay:g,builtinPlacements:y,arrowPointAtCenter:_=!1,autoAdjustOverflow:w=!0}=t,C=!!m,[,N]=Sd(),{getPopupContainer:E,getPrefixCls:D,direction:k}=b.useContext(jn),M=Cr("Tooltip"),T=b.useRef(null),A=()=>{var X;(X=T.current)===null||X===void 0||X.forceAlign()};b.useImperativeHandle(e,()=>{var X;return{forceAlign:A,forcePopupAlign:()=>{M.deprecated(!1,"forcePopupAlign","forceAlign"),A()},nativeElement:(X=T.current)===null||X===void 0?void 0:X.nativeElement}}),[["visible","open"],["defaultVisible","defaultOpen"],["onVisibleChange","onOpenChange"],["afterVisibleChange","afterOpenChange"],["arrowPointAtCenter","arrow={{ pointAtCenter: true }}"]].forEach(X=>{let[re,we]=X;M.deprecated(!(re in t),re,we)}),M(!f||typeof f=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."),M(!m||typeof m=="boolean"||!("arrowPointAtCenter"in m),"deprecated","`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead.");const[R,P]=ho(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(i=t.defaultOpen)!==null&&i!==void 0?i:t.defaultVisible}),O=!p&&!g&&p!==0,V=X=>{var re,we;P(O?!1:X),O||((re=t.onOpenChange)===null||re===void 0||re.call(t,X),(we=t.onVisibleChange)===null||we===void 0||we.call(t,X))},F=b.useMemo(()=>{var X,re;let we=_;return typeof m=="object"&&(we=(re=(X=m.pointAtCenter)!==null&&X!==void 0?X:m.arrowPointAtCenter)!==null&&re!==void 0?re:_),y||_Lt({arrowPointAtCenter:we,autoAdjustOverflow:w,arrowWidth:C?N.sizePopupArrow:0,borderRadius:N.borderRadius,offset:N.marginXXS,visibleFirst:!0})},[_,m,y,N]),$=b.useMemo(()=>p===0?p:g||p||"",[g,p]),B=b.createElement($0,{space:!0},typeof $=="function"?$():$),{getPopupContainer:z,placement:H="top",mouseEnterDelay:K=.1,mouseLeaveDelay:q=.1,overlayStyle:U,rootClassName:Y}=t,J=R8n(t,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),ae=D("tooltip",r),se=D(),oe=t["data-popover-inject"];let fe=R;!("open"in t)&&!("visible"in t)&&O&&(fe=!1);const de=b.isValidElement(u)&&!Skt(u)?u:b.createElement("span",null,u),ie=de.props,Q=!ie.className||typeof ie.className=="string"?Me(ie.className,o||`${ae}-open`):ie.className,[be,le,Ne]=xLt(ae,!oe),Le=wLt(ae,l),Te=Le.arrowStyle,De=Object.assign(Object.assign({},c),Le.overlayStyle),Pe=Me(a,{[`${ae}-rtl`]:k==="rtl"},Le.className,Y,le,Ne),[ge,he]=Mw("Tooltip",J.zIndex),me=b.createElement(S8n,Object.assign({},J,{zIndex:ge,showArrow:C,placement:H,mouseEnterDelay:K,mouseLeaveDelay:q,prefixCls:ae,overlayClassName:Pe,overlayStyle:Object.assign(Object.assign({},Te),U),getTooltipContainer:z||s||E,ref:T,builtinPlacements:F,overlay:B,visible:fe,onVisibleChange:V,afterVisibleChange:d??h,overlayInnerStyle:De,arrowContent:b.createElement("span",{className:`${ae}-arrow-content`}),motion:{motionName:Bp(se,"zoom-big-fast",t.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!f}),fe?$c(de,{className:Q}):de);return be(b.createElement(i6.Provider,{value:he},me))}),Vs=P8n;Vs.displayName="Tooltip";Vs._InternalPanelDoNotUseOrYouWillBeFired=A8n;const O8n=t=>{const{componentCls:e,popoverColor:n,titleMinWidth:i,fontWeightStrong:r,innerPadding:o,boxShadowSecondary:s,colorTextHeading:a,borderRadiusLG:l,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:d,popoverBg:h,titleBorderBottom:f,innerContentPadding:m,titlePadding:p}=t;return[{[e]:Object.assign(Object.assign({},fo(t)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":d,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${e}-content`]:{position:"relative"},[`${e}-inner`]:{backgroundColor:h,backgroundClip:"padding-box",borderRadius:l,boxShadow:s,padding:o},[`${e}-title`]:{minWidth:i,marginBottom:u,color:a,fontWeight:r,borderBottom:f,padding:p},[`${e}-inner-content`]:{color:n,padding:m}})},v6e(t,"var(--antd-arrow-background-color)"),{[`${e}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow,display:"inline-block",[`${e}-content`]:{display:"inline-block"}}}]},j8n=t=>{const{componentCls:e}=t;return{[e]:Bz.map(n=>{const i=t[`${n}6`];return{[`&${e}-${n}`]:{"--antd-arrow-background-color":i,[`${e}-inner`]:{backgroundColor:i},[`${e}-arrow`]:{background:"transparent"}}}})}},F8n=t=>{const{lineWidth:e,controlHeight:n,fontHeight:i,padding:r,wireframe:o,zIndexPopupBase:s,borderRadiusLG:a,marginXS:l,lineType:c,colorSplit:u,paddingSM:d}=t,h=n-i,f=h/2,m=h/2-e,p=r;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:s+30},yhe(t)),_he({contentRadius:a,limitVerticalRadius:!0})),{innerPadding:o?0:12,titleMarginBottom:o?0:l,titlePadding:o?`${f}px ${p}px ${m}px`:0,titleBorderBottom:o?`${e}px ${c} ${u}`:"none",innerContentPadding:o?`${d}px ${p}px`:0})},CLt=Jr("Popover",t=>{const{colorBgElevated:e,colorText:n}=t,i=mr(t,{popoverBg:e,popoverColor:n});return[O8n(i),j8n(i),s6(i,"zoom-big")]},F8n,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var $8n=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const SLt=t=>{let{title:e,content:n,prefixCls:i}=t;return!e&&!n?null:b.createElement(b.Fragment,null,e&&b.createElement("div",{className:`${i}-title`},e),n&&b.createElement("div",{className:`${i}-inner-content`},n))},V8n=t=>{const{hashId:e,prefixCls:n,className:i,style:r,placement:o="top",title:s,content:a,children:l}=t,c=Gne(s),u=Gne(a),d=Me(e,n,`${n}-pure`,`${n}-placement-${o}`,i);return b.createElement("div",{className:d,style:r},b.createElement("div",{className:`${n}-arrow`}),b.createElement(b6e,Object.assign({},t,{className:e,prefixCls:n}),l||b.createElement(SLt,{prefixCls:n,title:c,content:u})))},B8n=t=>{const{prefixCls:e,className:n}=t,i=$8n(t,["prefixCls","className"]),{getPrefixCls:r}=b.useContext(jn),o=r("popover",e),[s,a,l]=CLt(o);return s(b.createElement(V8n,Object.assign({},i,{prefixCls:o,hashId:a,className:Me(n,l)})))};var z8n=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const H8n=b.forwardRef((t,e)=>{var n,i;const{prefixCls:r,title:o,content:s,overlayClassName:a,placement:l="top",trigger:c="hover",children:u,mouseEnterDelay:d=.1,mouseLeaveDelay:h=.1,onOpenChange:f,overlayStyle:m={}}=t,p=z8n(t,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle"]),{getPrefixCls:g}=b.useContext(jn),y=g("popover",r),[_,w,C]=CLt(y),N=g(),E=Me(a,w,C),[D,k]=ho(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(i=t.defaultOpen)!==null&&i!==void 0?i:t.defaultVisible}),M=(O,V)=>{k(O,!0),f==null||f(O,V)},T=O=>{O.keyCode===Wt.ESC&&M(!1,O)},A=O=>{M(O)},R=Gne(o),P=Gne(s);return _(b.createElement(Vs,Object.assign({placement:l,trigger:c,mouseEnterDelay:d,mouseLeaveDelay:h,overlayStyle:m},p,{prefixCls:y,overlayClassName:E,ref:e,open:D,onOpenChange:A,overlay:R||P?b.createElement(SLt,{prefixCls:y,title:R,content:P}):null,transitionName:Bp(N,"zoom-big",p.transitionName),"data-popover-inject":!0}),$c(u,{onKeyDown:O=>{var V,F;b.isValidElement(u)&&((F=u==null?void 0:(V=u.props).onKeyDown)===null||F===void 0||F.call(V,O)),T(O)}})))}),y6e=H8n;y6e._InternalPanelDoNotUseOrYouWillBeFired=B8n;y6e.displayName="Popover";const W8n=new so("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),U8n=new so("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),K8n=new so("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),q8n=new so("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),G8n=new so("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),Y8n=new so("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),X8n=t=>{const{componentCls:e,iconCls:n,antCls:i,badgeShadowSize:r,textFontSize:o,textFontSizeSM:s,statusSize:a,dotSize:l,textFontWeight:c,indicatorHeight:u,indicatorHeightSM:d,marginXS:h,calc:f}=t,m=`${i}-scroll-number`,p=Jde(t,(g,y)=>{let{darkColor:_}=y;return{[`&${e} ${e}-color-${g}`]:{background:_,[`&:not(${e}-count)`]:{color:_},"a:hover &":{background:_}}}});return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},fo(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${e}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:t.indicatorZIndex,minWidth:u,height:u,color:t.badgeTextColor,fontWeight:c,fontSize:o,lineHeight:xe(u),whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:f(u).div(2).equal(),boxShadow:`0 0 0 ${xe(r)} ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${e}-count-sm`]:{minWidth:d,height:d,fontSize:s,lineHeight:xe(d),borderRadius:f(d).div(2).equal()},[`${e}-multiple-words`]:{padding:`0 ${xe(t.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${e}-dot`]:{zIndex:t.indicatorZIndex,width:l,minWidth:l,height:l,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${xe(r)} ${t.badgeShadowColor}`},[`${e}-count, ${e}-dot, ${m}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${n}-spin`]:{animationName:Y8n,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${e}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${e}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:a,height:a,verticalAlign:"middle",borderRadius:"50%"},[`${e}-status-success`]:{backgroundColor:t.colorSuccess},[`${e}-status-processing`]:{overflow:"visible",color:t.colorInfo,backgroundColor:t.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:r,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:W8n,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${e}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${e}-status-error`]:{backgroundColor:t.colorError},[`${e}-status-warning`]:{backgroundColor:t.colorWarning},[`${e}-status-text`]:{marginInlineStart:h,color:t.colorText,fontSize:t.fontSize}}}),p),{[`${e}-zoom-appear, ${e}-zoom-enter`]:{animationName:U8n,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${e}-zoom-leave`]:{animationName:K8n,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${e}-not-a-wrapper`]:{[`${e}-zoom-appear, ${e}-zoom-enter`]:{animationName:q8n,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${e}-zoom-leave`]:{animationName:G8n,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${e}-status)`]:{verticalAlign:"middle"},[`${m}-custom-component, ${e}-count`]:{transform:"none"},[`${m}-custom-component, ${m}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[m]:{overflow:"hidden",transition:`all ${t.motionDurationMid} ${t.motionEaseOutBack}`,[`${m}-only`]:{position:"relative",display:"inline-block",height:u,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${m}-only-unit`]:{height:u,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${m}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${e}-count, ${e}-dot, ${m}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}},NLt=t=>{const{fontHeight:e,lineWidth:n,marginXS:i,colorBorderBg:r}=t,o=e,s=n,a=t.colorBgContainer,l=t.colorError,c=t.colorErrorHover;return mr(t,{badgeFontHeight:o,badgeShadowSize:s,badgeTextColor:a,badgeColor:l,badgeColorHover:c,badgeShadowColor:r,badgeProcessingDuration:"1.2s",badgeRibbonOffset:i,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},ELt=t=>{const{fontSize:e,lineHeight:n,fontSizeSM:i,lineWidth:r}=t;return{indicatorZIndex:"auto",indicatorHeight:Math.round(e*n)-2*r,indicatorHeightSM:e,dotSize:i/2,textFontSize:i,textFontSizeSM:i,textFontWeight:"normal",statusSize:i/2}},Z8n=Jr("Badge",t=>{const e=NLt(t);return X8n(e)},ELt),Q8n=t=>{const{antCls:e,badgeFontHeight:n,marginXS:i,badgeRibbonOffset:r,calc:o}=t,s=`${e}-ribbon`,a=`${e}-ribbon-wrapper`,l=Jde(t,(c,u)=>{let{darkColor:d}=u;return{[`&${s}-color-${c}`]:{background:d,color:d}}});return{[a]:{position:"relative"},[s]:Object.assign(Object.assign(Object.assign(Object.assign({},fo(t)),{position:"absolute",top:i,padding:`0 ${xe(t.paddingXS)}`,color:t.colorPrimary,lineHeight:xe(n),whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${s}-text`]:{color:t.colorTextLightSolid},[`${s}-corner`]:{position:"absolute",top:"100%",width:r,height:r,color:"currentcolor",border:`${xe(o(r).div(2).equal())} solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),l),{[`&${s}-placement-end`]:{insetInlineEnd:o(r).mul(-1).equal(),borderEndEndRadius:0,[`${s}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${s}-placement-start`]:{insetInlineStart:o(r).mul(-1).equal(),borderEndStartRadius:0,[`${s}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},J8n=Jr(["Badge","Ribbon"],t=>{const e=NLt(t);return Q8n(e)},ELt),DLt=t=>{const{className:e,prefixCls:n,style:i,color:r,children:o,text:s,placement:a="end",rootClassName:l}=t,{getPrefixCls:c,direction:u}=b.useContext(jn),d=c("ribbon",n),h=`${d}-wrapper`,[f,m,p]=J8n(d,h),g=xhe(r,!1),y=Me(d,`${d}-placement-${a}`,{[`${d}-rtl`]:u==="rtl",[`${d}-color-${r}`]:g},e),_={},w={};return r&&!g&&(_.background=r,w.color=r),f(b.createElement("div",{className:Me(h,l,m,p)},o,b.createElement("div",{className:Me(y,m),style:Object.assign(Object.assign({},_),i)},b.createElement("span",{className:`${d}-text`},s),b.createElement("div",{className:`${d}-corner`,style:w}))))};DLt.displayName="Ribbon";const ynt=t=>{const{prefixCls:e,value:n,current:i,offset:r=0}=t;let o;return r&&(o={position:"absolute",top:`${r}00%`,left:0}),b.createElement("span",{style:o,className:Me(`${e}-only-unit`,{current:i})},n)};function eVn(t,e,n){let i=t,r=0;for(;(i+10)%10!==e;)i+=n,r+=n;return r}const tVn=t=>{const{prefixCls:e,count:n,value:i}=t,r=Number(i),o=Math.abs(n),[s,a]=b.useState(r),[l,c]=b.useState(o),u=()=>{a(r),c(o)};b.useEffect(()=>{const f=setTimeout(u,1e3);return()=>clearTimeout(f)},[r]);let d,h;if(s===r||Number.isNaN(r)||Number.isNaN(s))d=[b.createElement(ynt,Object.assign({},t,{key:r,current:!0}))],h={transition:"none"};else{d=[];const f=r+10,m=[];for(let y=r;y<=f;y+=1)m.push(y);const p=m.findIndex(y=>y%10===s);d=m.map((y,_)=>{const w=y%10;return b.createElement(ynt,Object.assign({},t,{key:y,value:w,offset:_-p,current:_===p}))});const g=l<o?1:-1;h={transform:`translateY(${-eVn(s,r,g)}00%)`}}return b.createElement("span",{className:`${e}-only`,style:h,onTransitionEnd:u},d)};var nVn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const iVn=b.forwardRef((t,e)=>{const{prefixCls:n,count:i,className:r,motionClassName:o,style:s,title:a,show:l,component:c="sup",children:u}=t,d=nVn(t,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:h}=b.useContext(jn),f=h("scroll-number",n),m=Object.assign(Object.assign({},d),{"data-show":l,style:s,className:Me(f,r,o),title:a});let p=i;if(i&&Number(i)%1===0){const g=String(i).split("");p=b.createElement("bdi",null,g.map((y,_)=>b.createElement(tVn,{prefixCls:f,count:Number(i),value:y,key:g.length-_})))}return s!=null&&s.borderColor&&(m.style=Object.assign(Object.assign({},s),{boxShadow:`0 0 0 1px ${s.borderColor} inset`})),u?$c(u,g=>({className:Me(`${f}-custom-component`,g==null?void 0:g.className,o)})):b.createElement(c,Object.assign({},m,{ref:e}),p)});var rVn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const oVn=b.forwardRef((t,e)=>{var n,i,r,o,s;const{prefixCls:a,scrollNumberPrefixCls:l,children:c,status:u,text:d,color:h,count:f=null,overflowCount:m=99,dot:p=!1,size:g="default",title:y,offset:_,style:w,className:C,rootClassName:N,classNames:E,styles:D,showZero:k=!1}=t,M=rVn(t,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:T,direction:A,badge:R}=b.useContext(jn),P=T("badge",a),[O,V,F]=Z8n(P),$=f>m?`${m}+`:f,B=$==="0"||$===0,z=f===null||B&&!k,H=(u!=null||h!=null)&&z,K=p&&!B,q=K?"":$,U=b.useMemo(()=>(q==null||q===""||B&&!k)&&!K,[q,B,k,K]),Y=b.useRef(f);U||(Y.current=f);const J=Y.current,ae=b.useRef(q);U||(ae.current=q);const se=ae.current,oe=b.useRef(K);U||(oe.current=K);const fe=b.useMemo(()=>{if(!_)return Object.assign(Object.assign({},R==null?void 0:R.style),w);const Te={marginTop:_[1]};return A==="rtl"?Te.left=parseInt(_[0],10):Te.right=-parseInt(_[0],10),Object.assign(Object.assign(Object.assign({},Te),R==null?void 0:R.style),w)},[A,_,w,R==null?void 0:R.style]),de=y??(typeof J=="string"||typeof J=="number"?J:void 0),ie=U||!d?null:b.createElement("span",{className:`${P}-status-text`},d),Q=!J||typeof J!="object"?void 0:$c(J,Te=>({style:Object.assign(Object.assign({},fe),Te.style)})),be=xhe(h,!1),le=Me(E==null?void 0:E.indicator,(n=R==null?void 0:R.classNames)===null||n===void 0?void 0:n.indicator,{[`${P}-status-dot`]:H,[`${P}-status-${u}`]:!!u,[`${P}-color-${h}`]:be}),Ne={};h&&!be&&(Ne.color=h,Ne.background=h);const Le=Me(P,{[`${P}-status`]:H,[`${P}-not-a-wrapper`]:!c,[`${P}-rtl`]:A==="rtl"},C,N,R==null?void 0:R.className,(i=R==null?void 0:R.classNames)===null||i===void 0?void 0:i.root,E==null?void 0:E.root,V,F);if(!c&&H){const Te=fe.color;return O(b.createElement("span",Object.assign({},M,{className:Le,style:Object.assign(Object.assign(Object.assign({},D==null?void 0:D.root),(r=R==null?void 0:R.styles)===null||r===void 0?void 0:r.root),fe)}),b.createElement("span",{className:le,style:Object.assign(Object.assign(Object.assign({},D==null?void 0:D.indicator),(o=R==null?void 0:R.styles)===null||o===void 0?void 0:o.indicator),Ne)}),d&&b.createElement("span",{style:{color:Te},className:`${P}-status-text`},d)))}return O(b.createElement("span",Object.assign({ref:e},M,{className:Le,style:Object.assign(Object.assign({},(s=R==null?void 0:R.styles)===null||s===void 0?void 0:s.root),D==null?void 0:D.root)}),c,b.createElement(Ou,{visible:!U,motionName:`${P}-zoom`,motionAppear:!1,motionDeadline:1e3},Te=>{let{className:De}=Te;var Pe,ge;const he=T("scroll-number",l),me=oe.current,X=Me(E==null?void 0:E.indicator,(Pe=R==null?void 0:R.classNames)===null||Pe===void 0?void 0:Pe.indicator,{[`${P}-dot`]:me,[`${P}-count`]:!me,[`${P}-count-sm`]:g==="small",[`${P}-multiple-words`]:!me&&se&&se.toString().length>1,[`${P}-status-${u}`]:!!u,[`${P}-color-${h}`]:be});let re=Object.assign(Object.assign(Object.assign({},D==null?void 0:D.indicator),(ge=R==null?void 0:R.styles)===null||ge===void 0?void 0:ge.indicator),fe);return h&&!be&&(re=re||{},re.background=h),b.createElement(iVn,{prefixCls:he,show:!U,motionClassName:De,className:X,count:se,title:de,style:re,key:"scrollNumber"},Q)}),ie))}),_6e=oVn;_6e.Ribbon=DLt;_6e.displayName="Badge";var sVn=Wt.ESC,aVn=Wt.TAB;function lVn(t){var e=t.visible,n=t.triggerRef,i=t.onVisibleChange,r=t.autoFocus,o=t.overlayRef,s=b.useRef(!1),a=function(){if(e){var d,h;(d=n.current)===null||d===void 0||(h=d.focus)===null||h===void 0||h.call(d),i==null||i(!1)}},l=function(){var d;return(d=o.current)!==null&&d!==void 0&&d.focus?(o.current.focus(),s.current=!0,!0):!1},c=function(d){switch(d.keyCode){case sVn:a();break;case aVn:{var h=!1;s.current||(h=l()),h?d.preventDefault():a();break}}};b.useEffect(function(){return e?(window.addEventListener("keydown",c),r&&Dr(l,3),function(){window.removeEventListener("keydown",c),s.current=!1}):function(){s.current=!1}},[e])}var cVn=b.forwardRef(function(t,e){var n=t.overlay,i=t.arrow,r=t.prefixCls,o=b.useMemo(function(){var a;return typeof n=="function"?a=n():a=n,a},[n]),s=Vu(e,o==null?void 0:o.ref);return Z.createElement(Z.Fragment,null,i&&Z.createElement("div",{className:"".concat(r,"-arrow")}),Z.cloneElement(o,{ref:P0(o)?s:void 0}))}),BP={adjustX:1,adjustY:1},zP=[0,0],uVn={topLeft:{points:["bl","tl"],overflow:BP,offset:[0,-4],targetOffset:zP},top:{points:["bc","tc"],overflow:BP,offset:[0,-4],targetOffset:zP},topRight:{points:["br","tr"],overflow:BP,offset:[0,-4],targetOffset:zP},bottomLeft:{points:["tl","bl"],overflow:BP,offset:[0,4],targetOffset:zP},bottom:{points:["tc","bc"],overflow:BP,offset:[0,4],targetOffset:zP},bottomRight:{points:["tr","br"],overflow:BP,offset:[0,4],targetOffset:zP}},dVn=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function hVn(t,e){var n,i=t.arrow,r=i===void 0?!1:i,o=t.prefixCls,s=o===void 0?"rc-dropdown":o,a=t.transitionName,l=t.animation,c=t.align,u=t.placement,d=u===void 0?"bottomLeft":u,h=t.placements,f=h===void 0?uVn:h,m=t.getPopupContainer,p=t.showAction,g=t.hideAction,y=t.overlayClassName,_=t.overlayStyle,w=t.visible,C=t.trigger,N=C===void 0?["hover"]:C,E=t.autoFocus,D=t.overlay,k=t.children,M=t.onVisibleChange,T=di(t,dVn),A=Z.useState(),R=He(A,2),P=R[0],O=R[1],V="visible"in t?w:P,F=Z.useRef(null),$=Z.useRef(null),B=Z.useRef(null);Z.useImperativeHandle(e,function(){return F.current});var z=function(oe){O(oe),M==null||M(oe)};lVn({visible:V,triggerRef:B,onVisibleChange:z,autoFocus:E,overlayRef:$});var H=function(oe){var fe=t.onOverlayClick;O(!1),fe&&fe(oe)},K=function(){return Z.createElement(cVn,{ref:$,overlay:D,prefixCls:s,arrow:r})},q=function(){return typeof D=="function"?K:K()},U=function(){var oe=t.minOverlayWidthMatchTrigger,fe=t.alignPoint;return"minOverlayWidthMatchTrigger"in t?oe:!fe},Y=function(){var oe=t.openClassName;return oe!==void 0?oe:"".concat(s,"-open")},J=Z.cloneElement(k,{className:Me((n=k.props)===null||n===void 0?void 0:n.className,V&&Y()),ref:P0(k)?Vu(B,k.ref):void 0}),ae=g;return!ae&&N.indexOf("contextMenu")!==-1&&(ae=["click"]),Z.createElement(HK,lt({builtinPlacements:f},T,{prefixCls:s,ref:F,popupClassName:Me(y,ye({},"".concat(s,"-show-arrow"),r)),popupStyle:_,action:N,showAction:p,hideAction:ae,popupPlacement:d,popupAlign:c,popupTransitionName:a,popupAnimation:l,popupVisible:V,stretch:U()?"minWidth":"",popup:q(),onPopupVisibleChange:z,onPopupClick:H,getPopupContainer:m}),J)}const kLt=Z.forwardRef(hVn);var MLt=b.createContext(null);function LLt(t,e){return t===void 0?null:"".concat(t,"-").concat(e)}function TLt(t){var e=b.useContext(MLt);return LLt(e,t)}var fVn=["children","locked"],V0=b.createContext(null);function mVn(t,e){var n=Ie({},t);return Object.keys(e).forEach(function(i){var r=e[i];r!==void 0&&(n[i]=r)}),n}function Wz(t){var e=t.children,n=t.locked,i=di(t,fVn),r=b.useContext(V0),o=Hk(function(){return mVn(r,i)},[r,i],function(s,a){return!n&&(s[0]!==a[0]||!jp(s[1],a[1],!0))});return b.createElement(V0.Provider,{value:o},e)}var pVn=[],ILt=b.createContext(null);function whe(){return b.useContext(ILt)}var ALt=b.createContext(pVn);function f6(t){var e=b.useContext(ALt);return b.useMemo(function(){return t!==void 0?[].concat(Ot(e),[t]):e},[e,t])}var RLt=b.createContext(null),x6e=b.createContext({});function _nt(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r6(t)){var n=t.nodeName.toLowerCase(),i=["input","select","textarea","button"].includes(n)||t.isContentEditable||n==="a"&&!!t.getAttribute("href"),r=t.getAttribute("tabindex"),o=Number(r),s=null;return r&&!Number.isNaN(o)?s=o:i&&s===null&&(s=0),i&&t.disabled&&(s=null),s!==null&&(s>=0||e&&s<0)}return!1}function gVn(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Ot(t.querySelectorAll("*")).filter(function(i){return _nt(i,e)});return _nt(t,e)&&n.unshift(t),n}var JDe=Wt.LEFT,eke=Wt.RIGHT,tke=Wt.UP,Pee=Wt.DOWN,Oee=Wt.ENTER,PLt=Wt.ESC,MV=Wt.HOME,LV=Wt.END,xnt=[tke,Pee,JDe,eke];function bVn(t,e,n,i){var r,o="prev",s="next",a="children",l="parent";if(t==="inline"&&i===Oee)return{inlineTrigger:!0};var c=ye(ye({},tke,o),Pee,s),u=ye(ye(ye(ye({},JDe,n?s:o),eke,n?o:s),Pee,a),Oee,a),d=ye(ye(ye(ye(ye(ye({},tke,o),Pee,s),Oee,a),PLt,l),JDe,n?a:l),eke,n?l:a),h={inline:c,horizontal:u,vertical:d,inlineSub:c,horizontalSub:d,verticalSub:d},f=(r=h["".concat(t).concat(e?"":"Sub")])===null||r===void 0?void 0:r[i];switch(f){case o:return{offset:-1,sibling:!0};case s:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case a:return{offset:1,sibling:!1};default:return null}}function vVn(t){for(var e=t;e;){if(e.getAttribute("data-menu-list"))return e;e=e.parentElement}return null}function yVn(t,e){for(var n=t||document.activeElement;n;){if(e.has(n))return n;n=n.parentElement}return null}function w6e(t,e){var n=gVn(t,!0);return n.filter(function(i){return e.has(i)})}function wnt(t,e,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!t)return null;var r=w6e(t,e),o=r.length,s=r.findIndex(function(a){return n===a});return i<0?s===-1?s=o-1:s-=1:i>0&&(s+=1),s=(s+o)%o,r[s]}var nke=function(e,n){var i=new Set,r=new Map,o=new Map;return e.forEach(function(s){var a=document.querySelector("[data-menu-id='".concat(LLt(n,s),"']"));a&&(i.add(a),o.set(a,s),r.set(s,a))}),{elements:i,key2element:r,element2key:o}};function _Vn(t,e,n,i,r,o,s,a,l,c){var u=b.useRef(),d=b.useRef();d.current=e;var h=function(){Dr.cancel(u.current)};return b.useEffect(function(){return function(){h()}},[]),function(f){var m=f.which;if([].concat(xnt,[Oee,PLt,MV,LV]).includes(m)){var p=o(),g=nke(p,i),y=g,_=y.elements,w=y.key2element,C=y.element2key,N=w.get(e),E=yVn(N,_),D=C.get(E),k=bVn(t,s(D,!0).length===1,n,m);if(!k&&m!==MV&&m!==LV)return;(xnt.includes(m)||[MV,LV].includes(m))&&f.preventDefault();var M=function($){if($){var B=$,z=$.querySelector("a");z!=null&&z.getAttribute("href")&&(B=z);var H=C.get($);a(H),h(),u.current=Dr(function(){d.current===H&&B.focus()})}};if([MV,LV].includes(m)||k.sibling||!E){var T;!E||t==="inline"?T=r.current:T=vVn(E);var A,R=w6e(T,_);m===MV?A=R[0]:m===LV?A=R[R.length-1]:A=wnt(T,_,E,k.offset),M(A)}else if(k.inlineTrigger)l(D);else if(k.offset>0)l(D,!0),h(),u.current=Dr(function(){g=nke(p,i);var F=E.getAttribute("aria-controls"),$=document.getElementById(F),B=wnt($,g.elements);M(B)},5);else if(k.offset<0){var P=s(D,!0),O=P[P.length-2],V=w.get(O);l(O,!1),M(V)}}c==null||c(f)}}function xVn(t){Promise.resolve().then(t)}var C6e="__RC_UTIL_PATH_SPLIT__",Cnt=function(e){return e.join(C6e)},wVn=function(e){return e.split(C6e)},ike="rc-menu-more";function CVn(){var t=b.useState({}),e=He(t,2),n=e[1],i=b.useRef(new Map),r=b.useRef(new Map),o=b.useState([]),s=He(o,2),a=s[0],l=s[1],c=b.useRef(0),u=b.useRef(!1),d=function(){u.current||n({})},h=b.useCallback(function(w,C){ii(!i.current.has(w),"Duplicated key '".concat(w,"' used in Menu by path [").concat(C.join(" > "),"]"));var N=Cnt(C);r.current.set(N,w),i.current.set(w,N),c.current+=1;var E=c.current;xVn(function(){E===c.current&&d()})},[]),f=b.useCallback(function(w,C){var N=Cnt(C);r.current.delete(N),i.current.delete(w)},[]),m=b.useCallback(function(w){l(w)},[]),p=b.useCallback(function(w,C){var N=i.current.get(w)||"",E=wVn(N);return C&&a.includes(E[0])&&E.unshift(ike),E},[a]),g=b.useCallback(function(w,C){return w.filter(function(N){return N!==void 0}).some(function(N){var E=p(N,!0);return E.includes(C)})},[p]),y=function(){var C=Ot(i.current.keys());return a.length&&C.push(ike),C},_=b.useCallback(function(w){var C="".concat(i.current.get(w)).concat(C6e),N=new Set;return Ot(r.current.keys()).forEach(function(E){E.startsWith(C)&&N.add(r.current.get(E))}),N},[]);return b.useEffect(function(){return function(){u.current=!0}},[]),{registerPath:h,unregisterPath:f,refreshOverflowKeys:m,isSubPathKey:g,getKeyPath:p,getKeys:y,getSubPathKeys:_}}function V7(t){var e=b.useRef(t);e.current=t;var n=b.useCallback(function(){for(var i,r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return(i=e.current)===null||i===void 0?void 0:i.call.apply(i,[e].concat(o))},[]);return t?n:void 0}var SVn=Math.random().toFixed(5).toString().slice(2),Snt=0;function NVn(t){var e=ho(t,{value:t}),n=He(e,2),i=n[0],r=n[1];return b.useEffect(function(){Snt+=1;var o="".concat(SVn,"-").concat(Snt);r("rc-menu-uuid-".concat(o))},[]),i}function OLt(t,e,n,i){var r=b.useContext(V0),o=r.activeKey,s=r.onActive,a=r.onInactive,l={active:o===t};return e||(l.onMouseEnter=function(c){n==null||n({key:t,domEvent:c}),s(t)},l.onMouseLeave=function(c){i==null||i({key:t,domEvent:c}),a(t)}),l}function jLt(t){var e=b.useContext(V0),n=e.mode,i=e.rtl,r=e.inlineIndent;if(n!=="inline")return null;var o=t;return i?{paddingRight:o*r}:{paddingLeft:o*r}}function FLt(t){var e=t.icon,n=t.props,i=t.children,r;return e===null||e===!1?null:(typeof e=="function"?r=b.createElement(e,Ie({},n)):typeof e!="boolean"&&(r=e),r||i||null)}var EVn=["item"];function Yne(t){var e=t.item,n=di(t,EVn);return Object.defineProperty(n,"item",{get:function(){return ii(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e}}),n}var DVn=["title","attribute","elementRef"],kVn=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],MVn=["active"],LVn=function(t){Zp(n,t);var e=pb(n);function n(){return Za(this,n),e.apply(this,arguments)}return Qa(n,[{key:"render",value:function(){var r=this.props,o=r.title,s=r.attribute,a=r.elementRef,l=di(r,DVn),c=Zs(l,["eventKey","popupClassName","popupOffset","onTitleClick"]);return ii(!s,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),b.createElement(b0.Item,lt({},s,{title:typeof o=="string"?o:void 0},c,{ref:a}))}}]),n}(b.Component),TVn=b.forwardRef(function(t,e){var n=t.style,i=t.className,r=t.eventKey,o=t.warnKey,s=t.disabled,a=t.itemIcon,l=t.children,c=t.role,u=t.onMouseEnter,d=t.onMouseLeave,h=t.onClick,f=t.onKeyDown,m=t.onFocus,p=di(t,kVn),g=TLt(r),y=b.useContext(V0),_=y.prefixCls,w=y.onItemClick,C=y.disabled,N=y.overflowDisabled,E=y.itemIcon,D=y.selectedKeys,k=y.onActive,M=b.useContext(x6e),T=M._internalRenderMenuItem,A="".concat(_,"-item"),R=b.useRef(),P=b.useRef(),O=C||s,V=jS(e,P),F=f6(r);o&&ii(!1,"MenuItem should not leave undefined `key`.");var $=function(de){return{key:r,keyPath:Ot(F).reverse(),item:R.current,domEvent:de}},B=a||E,z=OLt(r,O,u,d),H=z.active,K=di(z,MVn),q=D.includes(r),U=jLt(F.length),Y=function(de){if(!O){var ie=$(de);h==null||h(Yne(ie)),w(ie)}},J=function(de){if(f==null||f(de),de.which===Wt.ENTER){var ie=$(de);h==null||h(Yne(ie)),w(ie)}},ae=function(de){k(r),m==null||m(de)},se={};t.role==="option"&&(se["aria-selected"]=q);var oe=b.createElement(LVn,lt({ref:R,elementRef:V,role:c===null?"none":c||"menuitem",tabIndex:s?null:-1,"data-menu-id":N&&g?null:g},p,K,se,{component:"li","aria-disabled":s,style:Ie(Ie({},U),n),className:Me(A,ye(ye(ye({},"".concat(A,"-active"),H),"".concat(A,"-selected"),q),"".concat(A,"-disabled"),O),i),onClick:Y,onKeyDown:J,onFocus:ae}),l,b.createElement(FLt,{props:Ie(Ie({},t),{},{isSelected:q}),icon:B}));return T&&(oe=T(oe,t,{selected:q})),oe});function IVn(t,e){var n=t.eventKey,i=whe(),r=f6(n);return b.useEffect(function(){if(i)return i.registerPath(n,r),function(){i.unregisterPath(n,r)}},[r]),i?null:b.createElement(TVn,lt({},t,{ref:e}))}const WK=b.forwardRef(IVn);var AVn=["className","children"],RVn=function(e,n){var i=e.className,r=e.children,o=di(e,AVn),s=b.useContext(V0),a=s.prefixCls,l=s.mode,c=s.rtl;return b.createElement("ul",lt({className:Me(a,c&&"".concat(a,"-rtl"),"".concat(a,"-sub"),"".concat(a,"-").concat(l==="inline"?"inline":"vertical"),i),role:"menu"},o,{"data-menu-list":!0,ref:n}),r)},S6e=b.forwardRef(RVn);S6e.displayName="SubMenuList";function N6e(t,e){return fc(t).map(function(n,i){if(b.isValidElement(n)){var r,o,s=n.key,a=(r=(o=n.props)===null||o===void 0?void 0:o.eventKey)!==null&&r!==void 0?r:s,l=a==null;l&&(a="tmp_key-".concat([].concat(Ot(e),[i]).join("-")));var c={key:a,eventKey:a};return l&&(c.warnKey=!0),b.cloneElement(n,c)}return n})}var cf={adjustX:1,adjustY:1},PVn={topLeft:{points:["bl","tl"],overflow:cf},topRight:{points:["br","tr"],overflow:cf},bottomLeft:{points:["tl","bl"],overflow:cf},bottomRight:{points:["tr","br"],overflow:cf},leftTop:{points:["tr","tl"],overflow:cf},leftBottom:{points:["br","bl"],overflow:cf},rightTop:{points:["tl","tr"],overflow:cf},rightBottom:{points:["bl","br"],overflow:cf}},OVn={topLeft:{points:["bl","tl"],overflow:cf},topRight:{points:["br","tr"],overflow:cf},bottomLeft:{points:["tl","bl"],overflow:cf},bottomRight:{points:["tr","br"],overflow:cf},rightTop:{points:["tr","tl"],overflow:cf},rightBottom:{points:["br","bl"],overflow:cf},leftTop:{points:["tl","tr"],overflow:cf},leftBottom:{points:["bl","br"],overflow:cf}};function $Lt(t,e,n){if(e)return e;if(n)return n[t]||n.other}var jVn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function FVn(t){var e=t.prefixCls,n=t.visible,i=t.children,r=t.popup,o=t.popupStyle,s=t.popupClassName,a=t.popupOffset,l=t.disabled,c=t.mode,u=t.onVisibleChange,d=b.useContext(V0),h=d.getPopupContainer,f=d.rtl,m=d.subMenuOpenDelay,p=d.subMenuCloseDelay,g=d.builtinPlacements,y=d.triggerSubMenuAction,_=d.forceSubMenuRender,w=d.rootClassName,C=d.motion,N=d.defaultMotions,E=b.useState(!1),D=He(E,2),k=D[0],M=D[1],T=Ie(f?Ie({},OVn):Ie({},PVn),g),A=jVn[c],R=$Lt(c,C,N),P=b.useRef(R);c!=="inline"&&(P.current=R);var O=Ie(Ie({},P.current),{},{leavedClassName:"".concat(e,"-hidden"),removeOnLeave:!1,motionAppear:!0}),V=b.useRef();return b.useEffect(function(){return V.current=Dr(function(){M(n)}),function(){Dr.cancel(V.current)}},[n]),b.createElement(HK,{prefixCls:e,popupClassName:Me("".concat(e,"-popup"),ye({},"".concat(e,"-rtl"),f),s,w),stretch:c==="horizontal"?"minWidth":null,getPopupContainer:h,builtinPlacements:T,popupPlacement:A,popupVisible:k,popup:r,popupStyle:o,popupAlign:a&&{offset:a},action:l?[]:[y],mouseEnterDelay:m,mouseLeaveDelay:p,onPopupVisibleChange:u,forceRender:_,popupMotion:O,fresh:!0},i)}function $Vn(t){var e=t.id,n=t.open,i=t.keyPath,r=t.children,o="inline",s=b.useContext(V0),a=s.prefixCls,l=s.forceSubMenuRender,c=s.motion,u=s.defaultMotions,d=s.mode,h=b.useRef(!1);h.current=d===o;var f=b.useState(!h.current),m=He(f,2),p=m[0],g=m[1],y=h.current?n:!1;b.useEffect(function(){h.current&&g(!1)},[d]);var _=Ie({},$Lt(o,c,u));i.length>1&&(_.motionAppear=!1);var w=_.onVisibleChanged;return _.onVisibleChanged=function(C){return!h.current&&!C&&g(!0),w==null?void 0:w(C)},p?null:b.createElement(Wz,{mode:o,locked:!h.current},b.createElement(Ou,lt({visible:y},_,{forceRender:l,removeOnLeave:!1,leavedClassName:"".concat(a,"-hidden")}),function(C){var N=C.className,E=C.style;return b.createElement(S6e,{id:e,className:N,style:E},r)}))}var VVn=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],BVn=["active"],zVn=b.forwardRef(function(t,e){var n=t.style,i=t.className,r=t.title,o=t.eventKey,s=t.warnKey,a=t.disabled,l=t.internalPopupClose,c=t.children,u=t.itemIcon,d=t.expandIcon,h=t.popupClassName,f=t.popupOffset,m=t.popupStyle,p=t.onClick,g=t.onMouseEnter,y=t.onMouseLeave,_=t.onTitleClick,w=t.onTitleMouseEnter,C=t.onTitleMouseLeave,N=di(t,VVn),E=TLt(o),D=b.useContext(V0),k=D.prefixCls,M=D.mode,T=D.openKeys,A=D.disabled,R=D.overflowDisabled,P=D.activeKey,O=D.selectedKeys,V=D.itemIcon,F=D.expandIcon,$=D.onItemClick,B=D.onOpenChange,z=D.onActive,H=b.useContext(x6e),K=H._internalRenderSubMenuItem,q=b.useContext(RLt),U=q.isSubPathKey,Y=f6(),J="".concat(k,"-submenu"),ae=A||a,se=b.useRef(),oe=b.useRef();s&&ii(!1,"SubMenu should not leave undefined `key`.");var fe=u??V,de=d??F,ie=T.includes(o),Q=!R&&ie,be=U(O,o),le=OLt(o,ae,w,C),Ne=le.active,Le=di(le,BVn),Te=b.useState(!1),De=He(Te,2),Pe=De[0],ge=De[1],he=function(Se){ae||ge(Se)},me=function(Se){he(!0),g==null||g({key:o,domEvent:Se})},X=function(Se){he(!1),y==null||y({key:o,domEvent:Se})},re=b.useMemo(function(){return Ne||(M!=="inline"?Pe||U([P],o):!1)},[M,Ne,P,Pe,o,U]),we=jLt(Y.length),ue=function(Se){ae||(_==null||_({key:o,domEvent:Se}),M==="inline"&&B(o,!ie))},Ce=V7(function(Ee){p==null||p(Yne(Ee)),$(Ee)}),ze=function(Se){M!=="inline"&&B(o,Se)},Ye=function(){z(o)},Ke=E&&"".concat(E,"-popup"),Xe=b.createElement("div",lt({role:"menuitem",style:we,className:"".concat(J,"-title"),tabIndex:ae?null:-1,ref:se,title:typeof r=="string"?r:null,"data-menu-id":R&&E?null:E,"aria-expanded":Q,"aria-haspopup":!0,"aria-controls":Ke,"aria-disabled":ae,onClick:ue,onFocus:Ye},Le),r,b.createElement(FLt,{icon:M!=="horizontal"?de:void 0,props:Ie(Ie({},t),{},{isOpen:Q,isSubMenu:!0})},b.createElement("i",{className:"".concat(J,"-arrow")}))),it=b.useRef(M);if(M!=="inline"&&Y.length>1?it.current="vertical":it.current=M,!R){var ut=it.current;Xe=b.createElement(FVn,{mode:ut,prefixCls:J,visible:!l&&Q&&M!=="inline",popupClassName:h,popupOffset:f,popupStyle:m,popup:b.createElement(Wz,{mode:ut==="horizontal"?"vertical":ut},b.createElement(S6e,{id:Ke,ref:oe},c)),disabled:ae,onVisibleChange:ze},Xe)}var Ge=b.createElement(b0.Item,lt({ref:e,role:"none"},N,{component:"li",style:n,className:Me(J,"".concat(J,"-").concat(M),i,ye(ye(ye(ye({},"".concat(J,"-open"),Q),"".concat(J,"-active"),re),"".concat(J,"-selected"),be),"".concat(J,"-disabled"),ae)),onMouseEnter:me,onMouseLeave:X}),Xe,!R&&b.createElement($Vn,{id:Ke,open:Q,keyPath:Y},c));return K&&(Ge=K(Ge,t,{selected:be,active:re,open:Q,disabled:ae})),b.createElement(Wz,{onItemClick:Ce,mode:M==="horizontal"?"vertical":M,itemIcon:fe,expandIcon:de},Ge)}),UK=b.forwardRef(function(t,e){var n=t.eventKey,i=t.children,r=f6(n),o=N6e(i,r),s=whe();b.useEffect(function(){if(s)return s.registerPath(n,r),function(){s.unregisterPath(n,r)}},[r]);var a;return s?a=o:a=b.createElement(zVn,lt({ref:e},t),o),b.createElement(ALt.Provider,{value:r},a)});UK.displayName="SubMenu";function E6e(t){var e=t.className,n=t.style,i=b.useContext(V0),r=i.prefixCls,o=whe();return o?null:b.createElement("li",{role:"separator",className:Me("".concat(r,"-item-divider"),e),style:n})}var HVn=["className","title","eventKey","children"],WVn=b.forwardRef(function(t,e){var n=t.className,i=t.title;t.eventKey;var r=t.children,o=di(t,HVn),s=b.useContext(V0),a=s.prefixCls,l="".concat(a,"-item-group");return b.createElement("li",lt({ref:e,role:"presentation"},o,{onClick:function(u){return u.stopPropagation()},className:Me(l,n)}),b.createElement("div",{role:"presentation",className:"".concat(l,"-title"),title:typeof i=="string"?i:void 0},i),b.createElement("ul",{role:"group",className:"".concat(l,"-list")},r))}),Che=b.forwardRef(function(t,e){var n=t.eventKey,i=t.children,r=f6(n),o=N6e(i,r),s=whe();return s?o:b.createElement(WVn,lt({ref:e},Zs(t,["warnKey"])),o)});Che.displayName="MenuItemGroup";var UVn=["label","children","key","type","extra"];function rke(t,e,n){var i=e.item,r=e.group,o=e.submenu,s=e.divider;return(t||[]).map(function(a,l){if(a&&Un(a)==="object"){var c=a,u=c.label,d=c.children,h=c.key,f=c.type,m=c.extra,p=di(c,UVn),g=h??"tmp-".concat(l);return d||f==="group"?f==="group"?b.createElement(r,lt({key:g},p,{title:u}),rke(d,e,n)):b.createElement(o,lt({key:g},p,{title:u}),rke(d,e,n)):f==="divider"?b.createElement(s,lt({key:g},p)):b.createElement(i,lt({key:g},p),u,(!!m||m===0)&&b.createElement("span",{className:"".concat(n,"-item-extra")},m))}return null}).filter(function(a){return a})}function Nnt(t,e,n,i,r){var o=t,s=Ie({divider:E6e,item:WK,group:Che,submenu:UK},i);return e&&(o=rke(e,s,r)),N6e(o,n)}var KVn=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],aL=[],qVn=b.forwardRef(function(t,e){var n,i=t,r=i.prefixCls,o=r===void 0?"rc-menu":r,s=i.rootClassName,a=i.style,l=i.className,c=i.tabIndex,u=c===void 0?0:c,d=i.items,h=i.children,f=i.direction,m=i.id,p=i.mode,g=p===void 0?"vertical":p,y=i.inlineCollapsed,_=i.disabled,w=i.disabledOverflow,C=i.subMenuOpenDelay,N=C===void 0?.1:C,E=i.subMenuCloseDelay,D=E===void 0?.1:E,k=i.forceSubMenuRender,M=i.defaultOpenKeys,T=i.openKeys,A=i.activeKey,R=i.defaultActiveFirst,P=i.selectable,O=P===void 0?!0:P,V=i.multiple,F=V===void 0?!1:V,$=i.defaultSelectedKeys,B=i.selectedKeys,z=i.onSelect,H=i.onDeselect,K=i.inlineIndent,q=K===void 0?24:K,U=i.motion,Y=i.defaultMotions,J=i.triggerSubMenuAction,ae=J===void 0?"hover":J,se=i.builtinPlacements,oe=i.itemIcon,fe=i.expandIcon,de=i.overflowedIndicator,ie=de===void 0?"...":de,Q=i.overflowedIndicatorPopupClassName,be=i.getPopupContainer,le=i.onClick,Ne=i.onOpenChange,Le=i.onKeyDown,Te=i.openAnimation,De=i.openTransitionName,Pe=i._internalRenderMenuItem,ge=i._internalRenderSubMenuItem,he=i._internalComponents,me=di(i,KVn),X=b.useMemo(function(){return[Nnt(h,d,aL,he,o),Nnt(h,d,aL,{},o)]},[h,d,he]),re=He(X,2),we=re[0],ue=re[1],Ce=b.useState(!1),ze=He(Ce,2),Ye=ze[0],Ke=ze[1],Xe=b.useRef(),it=NVn(m),ut=f==="rtl";ii(!Te&&!De,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");var Ge=ho(M,{value:T,postState:function(Gi){return Gi||aL}}),Ee=He(Ge,2),Se=Ee[0],je=Ee[1],nt=function(Gi){var zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function pi(){je(Gi),Ne==null||Ne(Gi)}zn?Fc.flushSync(pi):pi()},rt=b.useState(Se),St=He(rt,2),At=St[0],Nt=St[1],vt=b.useRef(!1),$t=b.useMemo(function(){return(g==="inline"||g==="vertical")&&y?["vertical",y]:[g,!1]},[g,y]),ln=He($t,2),Jt=ln[0],en=ln[1],Ft=Jt==="inline",dn=b.useState(Jt),Ze=He(dn,2),dt=Ze[0],at=Ze[1],mt=b.useState(en),It=He(mt,2),Ve=It[0],bt=It[1];b.useEffect(function(){at(Jt),bt(en),vt.current&&(Ft?je(At):nt(aL))},[Jt,en]);var wt=b.useState(0),$e=He(wt,2),We=$e[0],tt=$e[1],_t=We>=we.length-1||dt!=="horizontal"||w;b.useEffect(function(){Ft&&Nt(Se)},[Se]),b.useEffect(function(){return vt.current=!0,function(){vt.current=!1}},[]);var ht=CVn(),qe=ht.registerPath,ft=ht.unregisterPath,Ct=ht.refreshOverflowKeys,Pt=ht.isSubPathKey,an=ht.getKeyPath,_n=ht.getKeys,on=ht.getSubPathKeys,yn=b.useMemo(function(){return{registerPath:qe,unregisterPath:ft}},[qe,ft]),fi=b.useMemo(function(){return{isSubPathKey:Pt}},[Pt]);b.useEffect(function(){Ct(_t?aL:we.slice(We+1).map(function(fr){return fr.key}))},[We,_t]);var oi=ho(A||R&&((n=we[0])===null||n===void 0?void 0:n.key),{value:A}),Qi=He(oi,2),mi=Qi[0],Vr=Qi[1],_i=V7(function(fr){Vr(fr)}),ur=V7(function(){Vr(void 0)});b.useImperativeHandle(e,function(){return{list:Xe.current,focus:function(Gi){var zn,pi=_n(),Tr=nke(pi,it),vs=Tr.elements,ua=Tr.key2element,Al=Tr.element2key,bc=w6e(Xe.current,vs),vc=mi??(bc[0]?Al.get(bc[0]):(zn=we.find(function(Ui){return!Ui.props.disabled}))===null||zn===void 0?void 0:zn.key),Hn=ua.get(vc);if(vc&&Hn){var cn;Hn==null||(cn=Hn.focus)===null||cn===void 0||cn.call(Hn,Gi)}}}});var si=ho($||[],{value:B,postState:function(Gi){return Array.isArray(Gi)?Gi:Gi==null?aL:[Gi]}}),Ii=He(si,2),Si=Ii[0],To=Ii[1],ts=function(Gi){if(O){var zn=Gi.key,pi=Si.includes(zn),Tr;F?pi?Tr=Si.filter(function(ua){return ua!==zn}):Tr=[].concat(Ot(Si),[zn]):Tr=[zn],To(Tr);var vs=Ie(Ie({},Gi),{},{selectedKeys:Tr});pi?H==null||H(vs):z==null||z(vs)}!F&&Se.length&&dt!=="inline"&&nt(aL)},La=V7(function(fr){le==null||le(Yne(fr)),ts(fr)}),pc=V7(function(fr,Gi){var zn=Se.filter(function(Tr){return Tr!==fr});if(Gi)zn.push(fr);else if(dt!=="inline"){var pi=on(fr);zn=zn.filter(function(Tr){return!pi.has(Tr)})}jp(Se,zn,!0)||nt(zn,!0)}),gc=function(Gi,zn){var pi=zn??!Se.includes(Gi);pc(Gi,pi)},ca=_Vn(dt,mi,ut,it,Xe,_n,an,Vr,gc,Le);b.useEffect(function(){Ke(!0)},[]);var Nr=b.useMemo(function(){return{_internalRenderMenuItem:Pe,_internalRenderSubMenuItem:ge}},[Pe,ge]),$i=dt!=="horizontal"||w?we:we.map(function(fr,Gi){return b.createElement(Wz,{key:fr.key,overflowDisabled:Gi>We},fr)}),us=b.createElement(b0,lt({id:m,ref:Xe,prefixCls:"".concat(o,"-overflow"),component:"ul",itemComponent:WK,className:Me(o,"".concat(o,"-root"),"".concat(o,"-").concat(dt),l,ye(ye({},"".concat(o,"-inline-collapsed"),Ve),"".concat(o,"-rtl"),ut),s),dir:f,style:a,role:"menu",tabIndex:u,data:$i,renderRawItem:function(Gi){return Gi},renderRawRest:function(Gi){var zn=Gi.length,pi=zn?we.slice(-zn):null;return b.createElement(UK,{eventKey:ike,title:ie,disabled:_t,internalPopupClose:zn===0,popupClassName:Q},pi)},maxCount:dt!=="horizontal"||w?b0.INVALIDATE:b0.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Gi){tt(Gi)},onKeyDown:ca},me));return b.createElement(x6e.Provider,{value:Nr},b.createElement(MLt.Provider,{value:it},b.createElement(Wz,{prefixCls:o,rootClassName:s,mode:dt,openKeys:Se,rtl:ut,disabled:_,motion:Ye?U:null,defaultMotions:Ye?Y:null,activeKey:mi,onActive:_i,onInactive:ur,selectedKeys:Si,inlineIndent:q,subMenuOpenDelay:N,subMenuCloseDelay:D,forceSubMenuRender:k,builtinPlacements:se,triggerSubMenuAction:ae,getPopupContainer:be,itemIcon:oe,expandIcon:fe,onItemClick:La,onOpenChange:pc},b.createElement(RLt.Provider,{value:fi},us),b.createElement("div",{style:{display:"none"},"aria-hidden":!0},b.createElement(ILt.Provider,{value:yn},ue)))))}),m6=qVn;m6.Item=WK;m6.SubMenu=UK;m6.ItemGroup=Che;m6.Divider=E6e;var GVn={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},YVn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:GVn}))},VLt=b.forwardRef(YVn);VLt.displayName="BarsOutlined";var XVn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},ZVn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:XVn}))},Hj=b.forwardRef(ZVn);Hj.displayName="LeftOutlined";const QVn=t=>!isNaN(parseFloat(t))&&isFinite(t),BLt=b.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),JVn=t=>{const{antCls:e,componentCls:n,colorText:i,footerBg:r,headerHeight:o,headerPadding:s,headerColor:a,footerPadding:l,fontSize:c,bodyBg:u,headerBg:d}=t;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:u,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${n}-header`]:{height:o,padding:s,color:a,lineHeight:xe(o),background:d,[`${e}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:l,color:i,fontSize:c,background:r},[`${n}-content`]:{flex:"auto",color:i,minHeight:0}}},zLt=t=>{const{colorBgLayout:e,controlHeight:n,controlHeightLG:i,colorText:r,controlHeightSM:o,marginXXS:s,colorTextLightSolid:a,colorBgContainer:l}=t,c=i*1.25;return{colorBgHeader:"#001529",colorBgBody:e,colorBgTrigger:"#002140",bodyBg:e,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${c}px`,headerColor:r,footerPadding:`${o}px ${c}px`,footerBg:e,siderBg:"#001529",triggerHeight:i+s*2,triggerBg:"#002140",triggerColor:a,zeroTriggerWidth:i,zeroTriggerHeight:i,lightSiderBg:l,lightTriggerBg:l,lightTriggerColor:r}},HLt=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]],WLt=Jr("Layout",t=>[JVn(t)],zLt,{deprecatedTokens:HLt}),e7n=t=>{const{componentCls:e,siderBg:n,motionDurationMid:i,motionDurationSlow:r,antCls:o,triggerHeight:s,triggerColor:a,triggerBg:l,headerHeight:c,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadius:h,lightSiderBg:f,lightTriggerColor:m,lightTriggerBg:p,bodyBg:g}=t;return{[e]:{position:"relative",minWidth:0,background:n,transition:`all ${i}, background 0s`,"&-has-trigger":{paddingBottom:s},"&-right":{order:1},[`${e}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${o}-menu${o}-menu-inline-collapsed`]:{width:"auto"}},[`${e}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:s,color:a,lineHeight:xe(s),textAlign:"center",background:l,cursor:"pointer",transition:`all ${i}`},"&-zero-width":{"> *":{overflow:"hidden"},[`${e}-trigger`]:{position:"absolute",top:c,insetInlineEnd:t.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:a,fontSize:t.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderStartStartRadius:0,borderStartEndRadius:h,borderEndEndRadius:h,borderEndStartRadius:0,cursor:"pointer",transition:`background ${r} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${r}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:t.calc(u).mul(-1).equal(),borderStartStartRadius:h,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:h}}},"&-light":{background:f,[`${e}-trigger`]:{color:m,background:p},[`${e}-zero-width-trigger`]:{color:m,background:p,border:`1px solid ${g}`,borderInlineStart:0}}}}},t7n=Jr(["Layout","Sider"],t=>[e7n(t)],zLt,{deprecatedTokens:HLt});var n7n=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const Ent={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},She=b.createContext({}),i7n=(()=>{let t=0;return function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t+=1,`${e}${t}`}})(),D6e=b.forwardRef((t,e)=>{const{prefixCls:n,className:i,trigger:r,children:o,defaultCollapsed:s=!1,theme:a="dark",style:l={},collapsible:c=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:h=80,zeroWidthTriggerStyle:f,breakpoint:m,onCollapse:p,onBreakpoint:g}=t,y=n7n(t,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:_}=b.useContext(BLt),[w,C]=b.useState("collapsed"in t?t.collapsed:s),[N,E]=b.useState(!1);b.useEffect(()=>{"collapsed"in t&&C(t.collapsed)},[t.collapsed]);const D=($,B)=>{"collapsed"in t||C($),p==null||p($,B)},{getPrefixCls:k}=b.useContext(jn),M=k("layout-sider",n),[T,A,R]=t7n(M),P=b.useRef();P.current=$=>{E($.matches),g==null||g($.matches),w!==$.matches&&D($.matches,"responsive")},b.useEffect(()=>{function $(z){return P.current(z)}let B;if(typeof window<"u"){const{matchMedia:z}=window;if(z&&m&&m in Ent){B=z(`screen and (max-width: ${Ent[m]})`);try{B.addEventListener("change",$)}catch{B.addListener($)}$(B)}}return()=>{try{B==null||B.removeEventListener("change",$)}catch{B==null||B.removeListener($)}}},[m]),b.useEffect(()=>{const $=i7n("ant-sider-");return _.addSider($),()=>_.removeSider($)},[]);const O=()=>{D(!w,"clickTrigger")},V=()=>{const $=Zs(y,["collapsed"]),B=w?h:d,z=QVn(B)?`${B}px`:String(B),H=parseFloat(String(h||0))===0?b.createElement("span",{onClick:O,className:Me(`${M}-zero-width-trigger`,`${M}-zero-width-trigger-${u?"right":"left"}`),style:f},r||b.createElement(VLt,null)):null,U={expanded:u?b.createElement(XD,null):b.createElement(Hj,null),collapsed:u?b.createElement(Hj,null):b.createElement(XD,null)}[w?"collapsed":"expanded"],Y=r!==null?H||b.createElement("div",{className:`${M}-trigger`,onClick:O,style:{width:z}},r||U):null,J=Object.assign(Object.assign({},l),{flex:`0 0 ${z}`,maxWidth:z,minWidth:z,width:z}),ae=Me(M,`${M}-${a}`,{[`${M}-collapsed`]:!!w,[`${M}-has-trigger`]:c&&r!==null&&!H,[`${M}-below`]:!!N,[`${M}-zero-width`]:parseFloat(z)===0},i,A,R);return b.createElement("aside",Object.assign({className:ae},$,{style:J,ref:e}),b.createElement("div",{className:`${M}-children`},o),c||N&&H?Y:null)},F=b.useMemo(()=>({siderCollapsed:w}),[w]);return T(b.createElement(She.Provider,{value:F},V()))});D6e.displayName="Sider";var r7n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},o7n=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:r7n}))},Nhe=b.forwardRef(o7n);Nhe.displayName="EllipsisOutlined";const Xne=b.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var s7n=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const ULt=t=>{const{prefixCls:e,className:n,dashed:i}=t,r=s7n(t,["prefixCls","className","dashed"]),{getPrefixCls:o}=b.useContext(jn),s=o("menu",e),a=Me({[`${s}-item-divider-dashed`]:!!i},n);return b.createElement(E6e,Object.assign({className:a},r))},KLt=t=>{var e;const{className:n,children:i,icon:r,title:o,danger:s}=t,{prefixCls:a,firstLevel:l,direction:c,disableMenuItemTitleTooltip:u,inlineCollapsed:d}=b.useContext(Xne),h=_=>{const w=i==null?void 0:i[0],C=b.createElement("span",{className:`${a}-title-content`},i);return(!r||b.isValidElement(i)&&i.type==="span")&&i&&_&&l&&typeof w=="string"?b.createElement("div",{className:`${a}-inline-collapsed-noicon`},w.charAt(0)):C},{siderCollapsed:f}=b.useContext(She);let m=o;typeof o>"u"?m=l?i:"":o===!1&&(m="");const p={title:m};!f&&!d&&(p.title=null,p.open=!1);const g=fc(i).length;let y=b.createElement(WK,Object.assign({},Zs(t,["title","icon","danger"]),{className:Me({[`${a}-item-danger`]:s,[`${a}-item-only-child`]:(r?g+1:g)===1},n),title:typeof o=="string"?o:void 0}),$c(r,{className:Me(b.isValidElement(r)?(e=r.props)===null||e===void 0?void 0:e.className:"",`${a}-item-icon`)}),h(d));return u||(y=b.createElement(Vs,Object.assign({},p,{placement:c==="rtl"?"left":"right",overlayClassName:`${a}-inline-collapsed-tooltip`}),y)),y};var a7n=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const Zne=b.createContext(null),qLt=b.forwardRef((t,e)=>{const{children:n}=t,i=a7n(t,["children"]),r=b.useContext(Zne),o=b.useMemo(()=>Object.assign(Object.assign({},r),i),[r,i.prefixCls,i.mode,i.selectable,i.rootClassName]),s=ZRn(n),a=jS(e,s?n.ref:null);return b.createElement(Zne.Provider,{value:o},b.createElement($0,{space:!0},s?b.cloneElement(n,{ref:a}):n))}),l7n=t=>{const{componentCls:e,motionDurationSlow:n,horizontalLineHeight:i,colorSplit:r,lineWidth:o,lineType:s,itemPaddingInline:a}=t;return{[`${e}-horizontal`]:{lineHeight:i,border:0,borderBottom:`${xe(o)} ${s} ${r}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${e}-item, ${e}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:a},[`> ${e}-item:hover,
        > ${e}-item-active,
        > ${e}-submenu ${e}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${e}-item, ${e}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${e}-submenu-arrow`]:{display:"none"}}}},c7n=t=>{let{componentCls:e,menuArrowOffset:n,calc:i}=t;return{[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
    ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${xe(i(n).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${xe(n)})`}}}}},Dnt=t=>Object.assign({},iS(t)),knt=(t,e)=>{const{componentCls:n,itemColor:i,itemSelectedColor:r,groupTitleColor:o,itemBg:s,subMenuItemBg:a,itemSelectedBg:l,activeBarHeight:c,activeBarWidth:u,activeBarBorderWidth:d,motionDurationSlow:h,motionEaseInOut:f,motionEaseOut:m,itemPaddingInline:p,motionDurationMid:g,itemHoverColor:y,lineType:_,colorSplit:w,itemDisabledColor:C,dangerItemColor:N,dangerItemHoverColor:E,dangerItemSelectedColor:D,dangerItemActiveBg:k,dangerItemSelectedBg:M,popupBg:T,itemHoverBg:A,itemActiveBg:R,menuSubMenuBg:P,horizontalItemSelectedColor:O,horizontalItemSelectedBg:V,horizontalItemBorderRadius:F,horizontalItemHoverBg:$}=t;return{[`${n}-${e}, ${n}-${e} > ${n}`]:{color:i,background:s,[`&${n}-root:focus-visible`]:Object.assign({},Dnt(t)),[`${n}-item-group-title`]:{color:o},[`${n}-submenu-selected`]:{[`> ${n}-submenu-title`]:{color:r}},[`${n}-item, ${n}-submenu-title`]:{color:i,[`&:not(${n}-item-disabled):focus-visible`]:Object.assign({},Dnt(t))},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${C} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:y}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:A},"&:active":{backgroundColor:R}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:A},"&:active":{backgroundColor:R}}},[`${n}-item-danger`]:{color:N,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:E}},[`&${n}-item:active`]:{background:k}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:r,[`&${n}-item-danger`]:{color:D},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:l,[`&${n}-item-danger`]:{backgroundColor:M}},[`&${n}-submenu > ${n}`]:{backgroundColor:P},[`&${n}-popup > ${n}`]:{backgroundColor:T},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:T},[`&${n}-horizontal`]:Object.assign(Object.assign({},e==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:d,marginTop:t.calc(d).mul(-1).equal(),marginBottom:0,borderRadius:F,"&::after":{position:"absolute",insetInline:p,bottom:0,borderBottom:`${xe(c)} solid transparent`,transition:`border-color ${h} ${f}`,content:'""'},"&:hover, &-active, &-open":{background:$,"&::after":{borderBottomWidth:c,borderBottomColor:O}},"&-selected":{color:O,backgroundColor:V,"&:hover":{backgroundColor:V},"&::after":{borderBottomWidth:c,borderBottomColor:O}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${xe(d)} ${_} ${w}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:a},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${xe(u)} solid ${r}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${g} ${m}`,`opacity ${g} ${m}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:D}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${g} ${f}`,`opacity ${g} ${f}`].join(",")}}}}}},Mnt=t=>{const{componentCls:e,itemHeight:n,itemMarginInline:i,padding:r,menuArrowSize:o,marginXS:s,itemMarginBlock:a,itemWidth:l,itemPaddingInline:c}=t,u=t.calc(o).add(r).add(s).equal();return{[`${e}-item`]:{position:"relative",overflow:"hidden"},[`${e}-item, ${e}-submenu-title`]:{height:n,lineHeight:xe(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:i,marginBlock:a,width:l},[`> ${e}-item,
            > ${e}-submenu > ${e}-submenu-title`]:{height:n,lineHeight:xe(n)},[`${e}-item-group-list ${e}-submenu-title,
            ${e}-submenu-title`]:{paddingInlineEnd:u}}},u7n=t=>{const{componentCls:e,iconCls:n,itemHeight:i,colorTextLightSolid:r,dropdownWidth:o,controlHeightLG:s,motionEaseOut:a,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:h,paddingXS:f,boxShadowSecondary:m,collapsedWidth:p,collapsedIconSize:g}=t,y={height:i,lineHeight:xe(i),listStylePosition:"inside",listStyleType:"disc"};return[{[e]:{"&-inline, &-vertical":Object.assign({[`&${e}-root`]:{boxShadow:"none"}},Mnt(t))},[`${e}-submenu-popup`]:{[`${e}-vertical`]:Object.assign(Object.assign({},Mnt(t)),{boxShadow:m})}},{[`${e}-submenu-popup ${e}-vertical${e}-sub`]:{minWidth:o,maxHeight:`calc(100vh - ${xe(t.calc(s).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${e}-inline`]:{width:"100%",[`&${e}-root`]:{[`${e}-item, ${e}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${h}`,`background ${h}`,`padding ${d} ${a}`].join(","),[`> ${e}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${e}-sub${e}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${e}-submenu > ${e}-submenu-title`]:y,[`& ${e}-item-group-title`]:{paddingInlineStart:l}},[`${e}-item`]:y}},{[`${e}-inline-collapsed`]:{width:p,[`&${e}-root`]:{[`${e}-item, ${e}-submenu ${e}-submenu-title`]:{[`> ${e}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center"}}},[`> ${e}-item,
          > ${e}-item-group > ${e}-item-group-list > ${e}-item,
          > ${e}-item-group > ${e}-item-group-list > ${e}-submenu > ${e}-submenu-title,
          > ${e}-submenu > ${e}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${xe(t.calc(u).div(2).equal())} - ${xe(c)})`,textOverflow:"clip",[`
            ${e}-submenu-arrow,
            ${e}-submenu-expand-icon
          `]:{opacity:0},[`${e}-item-icon, ${n}`]:{margin:0,fontSize:g,lineHeight:xe(i),"+ span":{display:"inline-block",opacity:0}}},[`${e}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${e}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:r}},[`${e}-item-group-title`]:Object.assign(Object.assign({},Mm),{paddingInline:f})}}]},Lnt=t=>{const{componentCls:e,motionDurationSlow:n,motionDurationMid:i,motionEaseInOut:r,motionEaseOut:o,iconCls:s,iconSize:a,iconMarginInlineEnd:l}=t;return{[`${e}-item, ${e}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding calc(${n} + 0.1s) ${r}`].join(","),[`${e}-item-icon, ${s}`]:{minWidth:a,fontSize:a,transition:[`font-size ${i} ${o}`,`margin ${n} ${r}`,`color ${n}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${n} ${r}`,`margin ${n}`,`color ${n}`].join(",")}},[`${e}-item-icon`]:Object.assign({},e6()),[`&${e}-item-only-child`]:{[`> ${s}, > ${e}-item-icon`]:{marginInlineEnd:0}}},[`${e}-item-disabled, ${e}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${e}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Tnt=t=>{const{componentCls:e,motionDurationSlow:n,motionEaseInOut:i,borderRadius:r,menuArrowSize:o,menuArrowOffset:s}=t;return{[`${e}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:t.margin,width:o,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${i}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:t.calc(o).mul(.6).equal(),height:t.calc(o).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:r,transition:[`background ${n} ${i}`,`transform ${n} ${i}`,`top ${n} ${i}`,`color ${n} ${i}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${xe(t.calc(s).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${xe(s)})`}}}}},d7n=t=>{const{antCls:e,componentCls:n,fontSize:i,motionDurationSlow:r,motionDurationMid:o,motionEaseInOut:s,paddingXS:a,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:h,subMenuItemBorderRadius:f,menuArrowSize:m,menuArrowOffset:p,lineType:g,groupTitleLineHeight:y,groupTitleFontSize:_}=t;return[{"":{[n]:Object.assign(Object.assign({},O0()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},fo(t)),O0()),{marginBottom:0,paddingInlineStart:0,fontSize:i,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${r} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:t.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${xe(a)} ${xe(l)}`,fontSize:_,lineHeight:y,transition:`all ${r}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${r} ${s}`,`background ${r} ${s}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${r} ${s}`,`background ${r} ${s}`,`padding ${o} ${s}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${r} ${s}`,`padding ${r} ${s}`].join(",")},[`${n}-title-content`]:{display:"inline-flex",alignItems:"center",transition:`color ${r}`,"> a:first-child":{flexGrow:1},[`> ${e}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:t.padding,fontSize:t.fontSizeSM,color:t.colorTextDescription}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:g,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Lnt(t)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${xe(t.calc(i).mul(2).equal())} ${xe(l)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:h,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:Object.assign(Object.assign(Object.assign({borderRadius:h},Lnt(t)),Tnt(t)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:f},[`${n}-submenu-title::after`]:{transition:`transform ${r} ${s}`}})},"\n          &-placement-leftTop,\n          &-placement-bottomRight,\n          ":{transformOrigin:"100% 0"},"\n          &-placement-leftBottom,\n          &-placement-topRight,\n          ":{transformOrigin:"100% 100%"},"\n          &-placement-rightBottom,\n          &-placement-topLeft,\n          ":{transformOrigin:"0 100%"},"\n          &-placement-bottomLeft,\n          &-placement-rightTop,\n          ":{transformOrigin:"0 0"},"\n          &-placement-leftTop,\n          &-placement-leftBottom\n          ":{paddingInlineEnd:t.paddingXS},"\n          &-placement-rightTop,\n          &-placement-rightBottom\n          ":{paddingInlineStart:t.paddingXS},"\n          &-placement-topRight,\n          &-placement-topLeft\n          ":{paddingBottom:t.paddingXS},"\n          &-placement-bottomRight,\n          &-placement-bottomLeft\n          ":{paddingTop:t.paddingXS}}}),Tnt(t)),{[`&-inline-collapsed ${n}-submenu-arrow,
        &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${xe(p)})`},"&::after":{transform:`rotate(45deg) translateX(${xe(t.calc(p).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${xe(t.calc(m).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${xe(t.calc(p).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${xe(p)})`}}})},{[`${e}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},h7n=t=>{var e,n,i;const{colorPrimary:r,colorError:o,colorTextDisabled:s,colorErrorBg:a,colorText:l,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:h,lineWidth:f,lineWidthBold:m,controlItemBgActive:p,colorBgTextHover:g,controlHeightLG:y,lineHeight:_,colorBgElevated:w,marginXXS:C,padding:N,fontSize:E,controlHeightSM:D,fontSizeLG:k,colorTextLightSolid:M,colorErrorHover:T}=t,A=(e=t.activeBarWidth)!==null&&e!==void 0?e:0,R=(n=t.activeBarBorderWidth)!==null&&n!==void 0?n:f,P=(i=t.itemMarginInline)!==null&&i!==void 0?i:t.marginXXS,O=new ko(M).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:t.zIndexPopupBase+50,radiusItem:t.borderRadiusLG,itemBorderRadius:t.borderRadiusLG,radiusSubMenuItem:t.borderRadiusSM,subMenuItemBorderRadius:t.borderRadiusSM,colorItemText:l,itemColor:l,colorItemTextHover:l,itemHoverColor:l,colorItemTextHoverHorizontal:r,horizontalItemHoverColor:r,colorGroupTitle:c,groupTitleColor:c,colorItemTextSelected:r,itemSelectedColor:r,colorItemTextSelectedHorizontal:r,horizontalItemSelectedColor:r,colorItemBg:u,itemBg:u,colorItemBgHover:g,itemHoverBg:g,colorItemBgActive:h,itemActiveBg:p,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:p,itemSelectedBg:p,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:A,colorActiveBarHeight:m,activeBarHeight:m,colorActiveBarBorderSize:f,activeBarBorderWidth:R,colorItemTextDisabled:s,itemDisabledColor:s,colorDangerItemText:o,dangerItemColor:o,colorDangerItemTextHover:o,dangerItemHoverColor:o,colorDangerItemTextSelected:o,dangerItemSelectedColor:o,colorDangerItemBgActive:a,dangerItemActiveBg:a,colorDangerItemBgSelected:a,dangerItemSelectedBg:a,itemMarginInline:P,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:y,groupTitleLineHeight:_,collapsedWidth:y*2,popupBg:w,itemMarginBlock:C,itemPaddingInline:N,horizontalLineHeight:`${y*1.15}px`,iconSize:E,iconMarginInlineEnd:D-E,collapsedIconSize:k,groupTitleFontSize:E,darkItemDisabledColor:new ko(M).setAlpha(.25).toRgbString(),darkItemColor:O,darkDangerItemColor:o,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:M,darkItemSelectedBg:r,darkDangerItemSelectedBg:o,darkItemHoverBg:"transparent",darkGroupTitleColor:O,darkItemHoverColor:M,darkDangerItemHoverColor:T,darkDangerItemSelectedColor:M,darkDangerItemActiveBg:o,itemWidth:A?`calc(100% + ${R}px)`:`calc(100% - ${P*2}px)`}},f7n=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return Jr("Menu",r=>{const{colorBgElevated:o,controlHeightLG:s,fontSize:a,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:h,darkItemSelectedBg:f,darkDangerItemSelectedBg:m,darkItemHoverBg:p,darkGroupTitleColor:g,darkItemHoverColor:y,darkItemDisabledColor:_,darkDangerItemHoverColor:w,darkDangerItemSelectedColor:C,darkDangerItemActiveBg:N,popupBg:E,darkPopupBg:D}=r,k=r.calc(a).div(7).mul(5).equal(),M=mr(r,{menuArrowSize:k,menuHorizontalHeight:r.calc(s).mul(1.15).equal(),menuArrowOffset:r.calc(k).mul(.25).equal(),menuSubMenuBg:o,calc:r.calc,popupBg:E}),T=mr(M,{itemColor:l,itemHoverColor:y,groupTitleColor:g,itemSelectedColor:h,itemBg:u,popupBg:D,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:f,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:p,itemDisabledColor:_,dangerItemColor:c,dangerItemHoverColor:w,dangerItemSelectedColor:C,dangerItemActiveBg:N,dangerItemSelectedBg:m,menuSubMenuBg:d,horizontalItemSelectedColor:h,horizontalItemSelectedBg:f});return[d7n(M),l7n(M),u7n(M),knt(M,"light"),knt(T,"dark"),c7n(M),jK(M),ow(M,"slide-up"),ow(M,"slide-down"),s6(M,"zoom-big")]},h7n,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(t,e)},GLt=t=>{var e;const{popupClassName:n,icon:i,title:r,theme:o}=t,s=b.useContext(Xne),{prefixCls:a,inlineCollapsed:l,theme:c}=s,u=f6();let d;if(!i)d=l&&!u.length&&r&&typeof r=="string"?b.createElement("div",{className:`${a}-inline-collapsed-noicon`},r.charAt(0)):b.createElement("span",{className:`${a}-title-content`},r);else{const m=b.isValidElement(r)&&r.type==="span";d=b.createElement(b.Fragment,null,$c(i,{className:Me(b.isValidElement(i)?(e=i.props)===null||e===void 0?void 0:e.className:"",`${a}-item-icon`)}),m?r:b.createElement("span",{className:`${a}-title-content`},r))}const h=b.useMemo(()=>Object.assign(Object.assign({},s),{firstLevel:!1}),[s]),[f]=Mw("Menu");return b.createElement(Xne.Provider,{value:h},b.createElement(UK,Object.assign({},Zs(t,["icon"]),{title:d,popupClassName:Me(a,n,`${a}-${o||c}`),popupStyle:Object.assign({zIndex:f},t.popupStyle)})))};var m7n=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};function Sxe(t){return t===null||t===!1}const p7n={item:KLt,submenu:GLt,divider:ULt},g7n=b.forwardRef((t,e)=>{var n;const i=b.useContext(Zne),r=i||{},{getPrefixCls:o,getPopupContainer:s,direction:a,menu:l}=b.useContext(jn),c=o(),{prefixCls:u,className:d,style:h,theme:f="light",expandIcon:m,_internalDisableMenuItemTitleTooltip:p,inlineCollapsed:g,siderCollapsed:y,rootClassName:_,mode:w,selectable:C,onClick:N,overflowedIndicatorPopupClassName:E}=t,D=m7n(t,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),k=Zs(D,["collapsedWidth"]);{const q=Cr("Menu");q(!("inlineCollapsed"in t&&w!=="inline"),"usage","`inlineCollapsed` should only be used when `mode` is inline."),q(!(t.siderCollapsed!==void 0&&"inlineCollapsed"in t),"usage","`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead."),q.deprecated("items"in t&&!t.children,"children","items")}(n=r.validator)===null||n===void 0||n.call(r,{mode:w});const M=gr(function(){var q;N==null||N.apply(void 0,arguments),(q=r.onClick)===null||q===void 0||q.call(r)}),T=r.mode||w,A=C??r.selectable,R=b.useMemo(()=>y!==void 0?y:g,[g,y]),P={horizontal:{motionName:`${c}-slide-up`},inline:$j(c),other:{motionName:`${c}-zoom-big`}},O=o("menu",u||r.prefixCls),V=Il(O),[F,$,B]=f7n(O,V,!i),z=Me(`${O}-${f}`,l==null?void 0:l.className,d),H=b.useMemo(()=>{var q,U;if(typeof m=="function"||Sxe(m))return m||null;if(typeof r.expandIcon=="function"||Sxe(r.expandIcon))return r.expandIcon||null;if(typeof(l==null?void 0:l.expandIcon)=="function"||Sxe(l==null?void 0:l.expandIcon))return(l==null?void 0:l.expandIcon)||null;const Y=(q=m??(r==null?void 0:r.expandIcon))!==null&&q!==void 0?q:l==null?void 0:l.expandIcon;return $c(Y,{className:Me(`${O}-submenu-expand-icon`,b.isValidElement(Y)?(U=Y.props)===null||U===void 0?void 0:U.className:void 0)})},[m,r==null?void 0:r.expandIcon,l==null?void 0:l.expandIcon,O]),K=b.useMemo(()=>({prefixCls:O,inlineCollapsed:R||!1,direction:a,firstLevel:!0,theme:f,mode:T,disableMenuItemTitleTooltip:p}),[O,R,a,p,f]);return F(b.createElement(Zne.Provider,{value:null},b.createElement(Xne.Provider,{value:K},b.createElement(m6,Object.assign({getPopupContainer:s,overflowedIndicator:b.createElement(Nhe,null),overflowedIndicatorPopupClassName:Me(O,`${O}-${f}`,E),mode:T,selectable:A,onClick:M},k,{inlineCollapsed:R,style:Object.assign(Object.assign({},l==null?void 0:l.style),h),className:z,prefixCls:O,direction:a,defaultMotions:P,expandIcon:H,ref:e,rootClassName:Me(_,$,r.rootClassName,B,V),_internalComponents:p7n})))))}),sS=b.forwardRef((t,e)=>{const n=b.useRef(null),i=b.useContext(She);return b.useImperativeHandle(e,()=>({menu:n.current,focus:r=>{var o;(o=n.current)===null||o===void 0||o.focus(r)}})),b.createElement(g7n,Object.assign({ref:n},t,i))});sS.Item=KLt;sS.SubMenu=GLt;sS.Divider=ULt;sS.ItemGroup=Che;sS.displayName="Menu";const b7n=t=>{const{componentCls:e,menuCls:n,colorError:i,colorTextLightSolid:r}=t,o=`${n}-item`;return{[`${e}, ${e}-menu-submenu`]:{[`${n} ${o}`]:{[`&${o}-danger:not(${o}-disabled)`]:{color:i,"&:hover":{color:r,backgroundColor:i}}}}}},v7n=t=>{const{componentCls:e,menuCls:n,zIndexPopup:i,dropdownArrowDistance:r,sizePopupArrow:o,antCls:s,iconCls:a,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:h,fontSizeIcon:f,controlPaddingHorizontal:m,colorBgElevated:p}=t;return[{[e]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:i,display:"block","&::before":{position:"absolute",insetBlock:t.calc(o).div(2).sub(r).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${s}-btn`]:{[`& > ${a}-down, & > ${s}-btn-icon > ${a}-down`]:{fontSize:f}},[`${e}-wrap`]:{position:"relative",[`${s}-btn > ${a}-down`]:{fontSize:f},[`${a}-down::before`]:{transition:`transform ${l}`}},[`${e}-wrap-open`]:{[`${a}-down::before`]:{transform:"rotate(180deg)"}},"\n        &-hidden,\n        &-menu-hidden,\n        &-menu-submenu-hidden\n      ":{display:"none"},[`&${s}-slide-down-enter${s}-slide-down-enter-active${e}-placement-bottomLeft,
          &${s}-slide-down-appear${s}-slide-down-appear-active${e}-placement-bottomLeft,
          &${s}-slide-down-enter${s}-slide-down-enter-active${e}-placement-bottom,
          &${s}-slide-down-appear${s}-slide-down-appear-active${e}-placement-bottom,
          &${s}-slide-down-enter${s}-slide-down-enter-active${e}-placement-bottomRight,
          &${s}-slide-down-appear${s}-slide-down-appear-active${e}-placement-bottomRight`]:{animationName:she},[`&${s}-slide-up-enter${s}-slide-up-enter-active${e}-placement-topLeft,
          &${s}-slide-up-appear${s}-slide-up-appear-active${e}-placement-topLeft,
          &${s}-slide-up-enter${s}-slide-up-enter-active${e}-placement-top,
          &${s}-slide-up-appear${s}-slide-up-appear-active${e}-placement-top,
          &${s}-slide-up-enter${s}-slide-up-enter-active${e}-placement-topRight,
          &${s}-slide-up-appear${s}-slide-up-appear-active${e}-placement-topRight`]:{animationName:lhe},[`&${s}-slide-down-leave${s}-slide-down-leave-active${e}-placement-bottomLeft,
          &${s}-slide-down-leave${s}-slide-down-leave-active${e}-placement-bottom,
          &${s}-slide-down-leave${s}-slide-down-leave-active${e}-placement-bottomRight`]:{animationName:ahe},[`&${s}-slide-up-leave${s}-slide-up-leave-active${e}-placement-topLeft,
          &${s}-slide-up-leave${s}-slide-up-leave-active${e}-placement-top,
          &${s}-slide-up-leave${s}-slide-up-leave-active${e}-placement-topRight`]:{animationName:che}}},v6e(t,p,{arrowPlacement:{top:!0,bottom:!0}}),{[`${e} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:i,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${e}, ${e}-menu-submenu`]:Object.assign(Object.assign({},fo(t)),{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:p,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary},j0(t)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${xe(c)} ${xe(m)}`,color:t.colorTextDescription,transition:`all ${l}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:t.marginXS,fontSize:t.fontSizeSM},[`${n}-title-content`]:{display:"flex",alignItems:"center",flex:"auto","> a":{color:"inherit",transition:`all ${l}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:t.padding,marginInlineStart:"auto",fontSize:t.fontSizeSM,color:t.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${xe(c)} ${xe(m)}`,color:t.colorText,fontWeight:"normal",fontSize:u,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:t.borderRadiusSM,"&:hover, &-active":{backgroundColor:t.controlItemBgHover}},j0(t)),{"&-selected":{color:t.colorPrimary,backgroundColor:t.controlItemBgActive,"&:hover, &-active":{backgroundColor:t.controlItemBgActiveHover}},"&-disabled":{color:h,cursor:"not-allowed","&:hover":{color:h,backgroundColor:p,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${xe(t.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:t.colorSplit},[`${e}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:t.paddingXS,[`${e}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:t.colorTextDescription,fontSize:f,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${xe(t.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:t.calc(m).add(t.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${e}-menu-submenu-title`]:{[`&, ${e}-menu-submenu-arrow-icon`]:{color:h,backgroundColor:p,cursor:"not-allowed"}},[`${n}-submenu-selected ${e}-menu-submenu-title`]:{color:t.colorPrimary}})})},[ow(t,"slide-up"),ow(t,"slide-down"),Vj(t,"move-up"),Vj(t,"move-down"),s6(t,"zoom-big")]]},y7n=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+50,paddingBlock:(t.controlHeight-t.fontSize*t.lineHeight)/2},_he({contentRadius:t.borderRadiusLG,limitVerticalRadius:!0})),yhe(t)),_7n=Jr("Dropdown",t=>{const{marginXXS:e,sizePopupArrow:n,paddingXXS:i,componentCls:r}=t,o=mr(t,{menuCls:`${r}-menu`,dropdownArrowDistance:t.calc(n).div(2).add(e).equal(),dropdownEdgeChildPadding:i});return[v7n(o),b7n(o)]},y7n,{resetStyle:!1}),KK=t=>{var e;const{menu:n,arrow:i,prefixCls:r,children:o,trigger:s,disabled:a,dropdownRender:l,getPopupContainer:c,overlayClassName:u,rootClassName:d,overlayStyle:h,open:f,onOpenChange:m,visible:p,onVisibleChange:g,mouseEnterDelay:y=.15,mouseLeaveDelay:_=.1,autoAdjustOverflow:w=!0,placement:C="",overlay:N,transitionName:E}=t,{getPopupContainer:D,getPrefixCls:k,direction:M,dropdown:T}=b.useContext(jn),A=Cr("Dropdown");[["visible","open"],["onVisibleChange","onOpenChange"]].forEach(le=>{let[Ne,Le]=le;A.deprecated(!(Ne in t),Ne,Le)}),A.deprecated(!("overlay"in t),"overlay","menu");const R=b.useMemo(()=>{const le=k();return E!==void 0?E:C.includes("top")?`${le}-slide-down`:`${le}-slide-up`},[k,C,E]),P=b.useMemo(()=>C?C.includes("Center")?C.slice(0,C.indexOf("Center")):C:M==="rtl"?"bottomRight":"bottomLeft",[C,M]);{if(C.includes("Center")){const le=C.slice(0,C.indexOf("Center"));A(!C.includes("Center"),"deprecated",`You are using '${C}' placement in Dropdown, which is deprecated. Try to use '${le}' instead.`)}[["visible","open"],["onVisibleChange","onOpenChange"]].forEach(le=>{let[Ne,Le]=le;A.deprecated(!(Ne in t),Ne,Le)})}const O=k("dropdown",r),V=Il(O),[F,$,B]=_7n(O,V),[,z]=Sd(),H=b.Children.only(o),K=$c(H,{className:Me(`${O}-trigger`,{[`${O}-rtl`]:M==="rtl"},H.props.className),disabled:(e=H.props.disabled)!==null&&e!==void 0?e:a}),q=a?[]:s,U=!!(q!=null&&q.includes("contextMenu")),[Y,J]=ho(!1,{value:f??p}),ae=gr(le=>{m==null||m(le,{source:"trigger"}),g==null||g(le),J(le)}),se=Me(u,d,$,B,V,T==null?void 0:T.className,{[`${O}-rtl`]:M==="rtl"}),oe=_Lt({arrowPointAtCenter:typeof i=="object"&&i.pointAtCenter,autoAdjustOverflow:w,offset:z.marginXXS,arrowWidth:i?z.sizePopupArrow:0,borderRadius:z.borderRadius}),fe=b.useCallback(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(m==null||m(!1,{source:"menu"}),J(!1))},[n==null?void 0:n.selectable,n==null?void 0:n.multiple]),de=()=>{let le;return n!=null&&n.items?le=b.createElement(sS,Object.assign({},n)):typeof N=="function"?le=N():le=N,l&&(le=l(le)),le=b.Children.only(typeof le=="string"?b.createElement("span",null,le):le),b.createElement(qLt,{prefixCls:`${O}-menu`,rootClassName:Me(B,V),expandIcon:b.createElement("span",{className:`${O}-menu-submenu-arrow`},b.createElement(XD,{className:`${O}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:fe,validator:Ne=>{let{mode:Le}=Ne;A(!Le||Le==="vertical","usage",`mode="${Le}" is not supported for Dropdown's Menu.`)}},le)},[ie,Q]=Mw("Dropdown",h==null?void 0:h.zIndex);let be=b.createElement(kLt,Object.assign({alignPoint:U},Zs(t,["rootClassName"]),{mouseEnterDelay:y,mouseLeaveDelay:_,visible:Y,builtinPlacements:oe,arrow:!!i,overlayClassName:se,prefixCls:O,getPopupContainer:c||D,transitionName:R,trigger:q,overlay:de,placement:P,onVisibleChange:ae,overlayStyle:Object.assign(Object.assign(Object.assign({},T==null?void 0:T.style),h),{zIndex:ie})}),K);return ie&&(be=b.createElement(i6.Provider,{value:Q},be)),F(be)};function x7n(t){return Object.assign(Object.assign({},t),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const w7n=BK(KK,"dropdown",t=>t,x7n),C7n=t=>b.createElement(w7n,Object.assign({},t),b.createElement("span",null));KK._InternalPanelDoNotUseOrYouWillBeFired=C7n;KK.displayName="Dropdown";var YLt={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Bl,function(){var n=1e3,i=6e4,r=36e5,o="millisecond",s="second",a="minute",l="hour",c="day",u="week",d="month",h="quarter",f="year",m="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(O){var V=["th","st","nd","rd"],F=O%100;return"["+O+(V[(F-20)%10]||V[F]||V[0])+"]"}},w=function(O,V,F){var $=String(O);return!$||$.length>=V?O:""+Array(V+1-$.length).join(F)+O},C={s:w,z:function(O){var V=-O.utcOffset(),F=Math.abs(V),$=Math.floor(F/60),B=F%60;return(V<=0?"+":"-")+w($,2,"0")+":"+w(B,2,"0")},m:function O(V,F){if(V.date()<F.date())return-O(F,V);var $=12*(F.year()-V.year())+(F.month()-V.month()),B=V.clone().add($,d),z=F-B<0,H=V.clone().add($+(z?-1:1),d);return+(-($+(F-B)/(z?B-H:H-B))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:d,y:f,w:u,d:c,D:m,h:l,m:a,s,ms:o,Q:h}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},N="en",E={};E[N]=_;var D="$isDayjsObject",k=function(O){return O instanceof R||!(!O||!O[D])},M=function O(V,F,$){var B;if(!V)return N;if(typeof V=="string"){var z=V.toLowerCase();E[z]&&(B=z),F&&(E[z]=F,B=z);var H=V.split("-");if(!B&&H.length>1)return O(H[0])}else{var K=V.name;E[K]=V,B=K}return!$&&B&&(N=B),B||!$&&N},T=function(O,V){if(k(O))return O.clone();var F=typeof V=="object"?V:{};return F.date=O,F.args=arguments,new R(F)},A=C;A.l=M,A.i=k,A.w=function(O,V){return T(O,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var R=function(){function O(F){this.$L=M(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[D]=!0}var V=O.prototype;return V.parse=function(F){this.$d=function($){var B=$.date,z=$.utc;if(B===null)return new Date(NaN);if(A.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var H=B.match(g);if(H){var K=H[2]-1||0,q=(H[7]||"0").substring(0,3);return z?new Date(Date.UTC(H[1],K,H[3]||1,H[4]||0,H[5]||0,H[6]||0,q)):new Date(H[1],K,H[3]||1,H[4]||0,H[5]||0,H[6]||0,q)}}return new Date(B)}(F),this.init()},V.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},V.$utils=function(){return A},V.isValid=function(){return this.$d.toString()!==p},V.isSame=function(F,$){var B=T(F);return this.startOf($)<=B&&B<=this.endOf($)},V.isAfter=function(F,$){return T(F)<this.startOf($)},V.isBefore=function(F,$){return this.endOf($)<T(F)},V.$g=function(F,$,B){return A.u(F)?this[$]:this.set(B,F)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(F,$){var B=this,z=!!A.u($)||$,H=A.p(F),K=function(fe,de){var ie=A.w(B.$u?Date.UTC(B.$y,de,fe):new Date(B.$y,de,fe),B);return z?ie:ie.endOf(c)},q=function(fe,de){return A.w(B.toDate()[fe].apply(B.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(de)),B)},U=this.$W,Y=this.$M,J=this.$D,ae="set"+(this.$u?"UTC":"");switch(H){case f:return z?K(1,0):K(31,11);case d:return z?K(1,Y):K(0,Y+1);case u:var se=this.$locale().weekStart||0,oe=(U<se?U+7:U)-se;return K(z?J-oe:J+(6-oe),Y);case c:case m:return q(ae+"Hours",0);case l:return q(ae+"Minutes",1);case a:return q(ae+"Seconds",2);case s:return q(ae+"Milliseconds",3);default:return this.clone()}},V.endOf=function(F){return this.startOf(F,!1)},V.$set=function(F,$){var B,z=A.p(F),H="set"+(this.$u?"UTC":""),K=(B={},B[c]=H+"Date",B[m]=H+"Date",B[d]=H+"Month",B[f]=H+"FullYear",B[l]=H+"Hours",B[a]=H+"Minutes",B[s]=H+"Seconds",B[o]=H+"Milliseconds",B)[z],q=z===c?this.$D+($-this.$W):$;if(z===d||z===f){var U=this.clone().set(m,1);U.$d[K](q),U.init(),this.$d=U.set(m,Math.min(this.$D,U.daysInMonth())).$d}else K&&this.$d[K](q);return this.init(),this},V.set=function(F,$){return this.clone().$set(F,$)},V.get=function(F){return this[A.p(F)]()},V.add=function(F,$){var B,z=this;F=Number(F);var H=A.p($),K=function(Y){var J=T(z);return A.w(J.date(J.date()+Math.round(Y*F)),z)};if(H===d)return this.set(d,this.$M+F);if(H===f)return this.set(f,this.$y+F);if(H===c)return K(1);if(H===u)return K(7);var q=(B={},B[a]=i,B[l]=r,B[s]=n,B)[H]||1,U=this.$d.getTime()+F*q;return A.w(U,this)},V.subtract=function(F,$){return this.add(-1*F,$)},V.format=function(F){var $=this,B=this.$locale();if(!this.isValid())return B.invalidDate||p;var z=F||"YYYY-MM-DDTHH:mm:ssZ",H=A.z(this),K=this.$H,q=this.$m,U=this.$M,Y=B.weekdays,J=B.months,ae=B.meridiem,se=function(de,ie,Q,be){return de&&(de[ie]||de($,z))||Q[ie].slice(0,be)},oe=function(de){return A.s(K%12||12,de,"0")},fe=ae||function(de,ie,Q){var be=de<12?"AM":"PM";return Q?be.toLowerCase():be};return z.replace(y,function(de,ie){return ie||function(Q){switch(Q){case"YY":return String($.$y).slice(-2);case"YYYY":return A.s($.$y,4,"0");case"M":return U+1;case"MM":return A.s(U+1,2,"0");case"MMM":return se(B.monthsShort,U,J,3);case"MMMM":return se(J,U);case"D":return $.$D;case"DD":return A.s($.$D,2,"0");case"d":return String($.$W);case"dd":return se(B.weekdaysMin,$.$W,Y,2);case"ddd":return se(B.weekdaysShort,$.$W,Y,3);case"dddd":return Y[$.$W];case"H":return String(K);case"HH":return A.s(K,2,"0");case"h":return oe(1);case"hh":return oe(2);case"a":return fe(K,q,!0);case"A":return fe(K,q,!1);case"m":return String(q);case"mm":return A.s(q,2,"0");case"s":return String($.$s);case"ss":return A.s($.$s,2,"0");case"SSS":return A.s($.$ms,3,"0");case"Z":return H}return null}(de)||H.replace(":","")})},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(F,$,B){var z,H=this,K=A.p($),q=T(F),U=(q.utcOffset()-this.utcOffset())*i,Y=this-q,J=function(){return A.m(H,q)};switch(K){case f:z=J()/12;break;case d:z=J();break;case h:z=J()/3;break;case u:z=(Y-U)/6048e5;break;case c:z=(Y-U)/864e5;break;case l:z=Y/r;break;case a:z=Y/i;break;case s:z=Y/n;break;default:z=Y}return B?z:A.a(z)},V.daysInMonth=function(){return this.endOf(d).$D},V.$locale=function(){return E[this.$L]},V.locale=function(F,$){if(!F)return this.$L;var B=this.clone(),z=M(F,$,!0);return z&&(B.$L=z),B},V.clone=function(){return A.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},O}(),P=R.prototype;return T.prototype=P,[["$ms",o],["$s",s],["$m",a],["$H",l],["$W",c],["$M",d],["$y",f],["$D",m]].forEach(function(O){P[O[1]]=function(V){return this.$g(V,O[0],O[1])}}),T.extend=function(O,V){return O.$i||(O(V,R,T),O.$i=!0),T},T.locale=M,T.isDayjs=k,T.unix=function(O){return T(1e3*O)},T.en=E[N],T.Ls=E,T.p={},T})})(YLt);var S7n=YLt.exports;const An=ao(S7n);var XLt={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Bl,function(){return function(n,i){i.prototype.weekday=function(r){var o=this.$locale().weekStart||0,s=this.$W,a=(s<o?s+7:s)-o;return this.$utils().u(r)?a:this.subtract(a,"day").add(r,"day")}}})})(XLt);var N7n=XLt.exports;const ZLt=ao(N7n);var QLt={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Bl,function(){return function(n,i,r){var o=i.prototype,s=function(d){return d&&(d.indexOf?d:d.s)},a=function(d,h,f,m,p){var g=d.name?d:d.$locale(),y=s(g[h]),_=s(g[f]),w=y||_.map(function(N){return N.slice(0,m)});if(!p)return w;var C=g.weekStart;return w.map(function(N,E){return w[(E+(C||0))%7]})},l=function(){return r.Ls[r.locale()]},c=function(d,h){return d.formats[h]||function(f){return f.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(m,p,g){return p||g.slice(1)})}(d.formats[h.toUpperCase()])},u=function(){var d=this;return{months:function(h){return h?h.format("MMMM"):a(d,"months")},monthsShort:function(h){return h?h.format("MMM"):a(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):a(d,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):a(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):a(d,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return c(d.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return u.bind(this)()},r.localeData=function(){var d=l();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return r.weekdays()},weekdaysShort:function(){return r.weekdaysShort()},weekdaysMin:function(){return r.weekdaysMin()},months:function(){return r.months()},monthsShort:function(){return r.monthsShort()},longDateFormat:function(h){return c(d,h)},meridiem:d.meridiem,ordinal:d.ordinal}},r.months=function(){return a(l(),"months")},r.monthsShort=function(){return a(l(),"monthsShort","months",3)},r.weekdays=function(d){return a(l(),"weekdays",null,null,d)},r.weekdaysShort=function(d){return a(l(),"weekdaysShort","weekdays",3,d)},r.weekdaysMin=function(d){return a(l(),"weekdaysMin","weekdays",2,d)}}})})(QLt);var E7n=QLt.exports;const D7n=ao(E7n);var JLt={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Bl,function(){var n="week",i="year";return function(r,o,s){var a=o.prototype;a.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=s(this).startOf(i).add(1,i).date(c),d=s(this).endOf(n);if(u.isBefore(d))return 1}var h=s(this).startOf(i).date(c).startOf(n).subtract(1,"millisecond"),f=this.diff(h,n,!0);return f<0?s(this).startOf("week").week():Math.ceil(f)},a.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})})(JLt);var k7n=JLt.exports;const M7n=ao(k7n);var eTt={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Bl,function(){return function(n,i){i.prototype.weekYear=function(){var r=this.month(),o=this.week(),s=this.year();return o===1&&r===11?s+1:r===0&&o>=52?s-1:s}}})})(eTt);var L7n=eTt.exports;const T7n=ao(L7n);var tTt={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Bl,function(){return function(n,i){var r=i.prototype,o=r.format;r.format=function(s){var a=this,l=this.$locale();if(!this.isValid())return o.bind(this)(s);var c=this.$utils(),u=(s||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return l.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return l.ordinal(a.week(),"W");case"w":case"ww":return c.s(a.week(),d==="w"?1:2,"0");case"W":case"WW":return c.s(a.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return c.s(String(a.$H===0?24:a.$H),d==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return d}});return o.bind(this)(u)}}})})(tTt);var I7n=tTt.exports;const A7n=ao(I7n);var nTt={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Bl,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,o=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},c=function(g){return(g=+g)+(g>68?1900:2e3)},u=function(g){return function(y){this[g]=+y}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function(y){if(!y||y==="Z")return 0;var _=y.match(/([+-]|\d\d)/g),w=60*_[1]+(+_[2]||0);return w===0?0:_[0]==="+"?-w:w}(g)}],h=function(g){var y=l[g];return y&&(y.indexOf?y:y.s.concat(y.f))},f=function(g,y){var _,w=l.meridiem;if(w){for(var C=1;C<=24;C+=1)if(g.indexOf(w(C,0,y))>-1){_=C>12;break}}else _=g===(y?"pm":"PM");return _},m={A:[a,function(g){this.afternoon=f(g,!1)}],a:[a,function(g){this.afternoon=f(g,!0)}],Q:[r,function(g){this.month=3*(g-1)+1}],S:[r,function(g){this.milliseconds=100*+g}],SS:[o,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[s,u("seconds")],ss:[s,u("seconds")],m:[s,u("minutes")],mm:[s,u("minutes")],H:[s,u("hours")],h:[s,u("hours")],HH:[s,u("hours")],hh:[s,u("hours")],D:[s,u("day")],DD:[o,u("day")],Do:[a,function(g){var y=l.ordinal,_=g.match(/\d+/);if(this.day=_[0],y)for(var w=1;w<=31;w+=1)y(w).replace(/\[|\]/g,"")===g&&(this.day=w)}],w:[s,u("week")],ww:[o,u("week")],M:[s,u("month")],MM:[o,u("month")],MMM:[a,function(g){var y=h("months"),_=(h("monthsShort")||y.map(function(w){return w.slice(0,3)})).indexOf(g)+1;if(_<1)throw new Error;this.month=_%12||_}],MMMM:[a,function(g){var y=h("months").indexOf(g)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(g){this.year=c(g)}],YYYY:[/\d{4}/,u("year")],Z:d,ZZ:d};function p(g){var y,_;y=g,_=l&&l.formats;for(var w=(g=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(T,A,R){var P=R&&R.toUpperCase();return A||_[R]||n[R]||_[P].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(O,V,F){return V||F.slice(1)})})).match(i),C=w.length,N=0;N<C;N+=1){var E=w[N],D=m[E],k=D&&D[0],M=D&&D[1];w[N]=M?{regex:k,parser:M}:E.replace(/^\[|\]$/g,"")}return function(T){for(var A={},R=0,P=0;R<C;R+=1){var O=w[R];if(typeof O=="string")P+=O.length;else{var V=O.regex,F=O.parser,$=T.slice(P),B=V.exec($)[0];F.call(A,B),T=T.replace(B,"")}}return function(z){var H=z.afternoon;if(H!==void 0){var K=z.hours;H?K<12&&(z.hours+=12):K===12&&(z.hours=0),delete z.afternoon}}(A),A}}return function(g,y,_){_.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(c=g.parseTwoDigitYear);var w=y.prototype,C=w.parse;w.parse=function(N){var E=N.date,D=N.utc,k=N.args;this.$u=D;var M=k[1];if(typeof M=="string"){var T=k[2]===!0,A=k[3]===!0,R=T||A,P=k[2];A&&(P=k[2]),l=this.$locale(),!T&&P&&(l=_.Ls[P]),this.$d=function($,B,z,H){try{if(["x","X"].indexOf(B)>-1)return new Date((B==="X"?1e3:1)*$);var K=p(B)($),q=K.year,U=K.month,Y=K.day,J=K.hours,ae=K.minutes,se=K.seconds,oe=K.milliseconds,fe=K.zone,de=K.week,ie=new Date,Q=Y||(q||U?1:ie.getDate()),be=q||ie.getFullYear(),le=0;q&&!U||(le=U>0?U-1:ie.getMonth());var Ne,Le=J||0,Te=ae||0,De=se||0,Pe=oe||0;return fe?new Date(Date.UTC(be,le,Q,Le,Te,De,Pe+60*fe.offset*1e3)):z?new Date(Date.UTC(be,le,Q,Le,Te,De,Pe)):(Ne=new Date(be,le,Q,Le,Te,De,Pe),de&&(Ne=H(Ne).week(de).toDate()),Ne)}catch{return new Date("")}}(E,M,D,_),this.init(),P&&P!==!0&&(this.$L=this.locale(P).$L),R&&E!=this.format(M)&&(this.$d=new Date("")),l={}}else if(M instanceof Array)for(var O=M.length,V=1;V<=O;V+=1){k[1]=M[V-1];var F=_.apply(this,k);if(F.isValid()){this.$d=F.$d,this.$L=F.$L,this.init();break}V===O&&(this.$d=new Date(""))}else C.call(this,N)}}})})(nTt);var R7n=nTt.exports;const P7n=ao(R7n);An.extend(P7n);An.extend(A7n);An.extend(ZLt);An.extend(D7n);An.extend(M7n);An.extend(T7n);An.extend(function(t,e){var n=e.prototype,i=n.format;n.format=function(o){var s=(o||"").replace("Wo","wo");return i.bind(this)(s)}});var O7n={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},lL=function(e){var n=O7n[e];return n||e.split("_")[0]},Int=function(){Sne(!1,"Not match any format. Please help to fire a issue about this.")},j7n={getNow:function(){var e=An();return typeof e.tz=="function"?e.tz():e},getFixedDate:function(e){return An(e,["YYYY-M-DD","YYYY-MM-DD"])},getEndDate:function(e){return e.endOf("month")},getWeekDay:function(e){var n=e.locale("en");return n.weekday()+n.localeData().firstDayOfWeek()},getYear:function(e){return e.year()},getMonth:function(e){return e.month()},getDate:function(e){return e.date()},getHour:function(e){return e.hour()},getMinute:function(e){return e.minute()},getSecond:function(e){return e.second()},getMillisecond:function(e){return e.millisecond()},addYear:function(e,n){return e.add(n,"year")},addMonth:function(e,n){return e.add(n,"month")},addDate:function(e,n){return e.add(n,"day")},setYear:function(e,n){return e.year(n)},setMonth:function(e,n){return e.month(n)},setDate:function(e,n){return e.date(n)},setHour:function(e,n){return e.hour(n)},setMinute:function(e,n){return e.minute(n)},setSecond:function(e,n){return e.second(n)},setMillisecond:function(e,n){return e.millisecond(n)},isAfter:function(e,n){return e.isAfter(n)},isValidate:function(e){return e.isValid()},locale:{getWeekFirstDay:function(e){return An().locale(lL(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,n){return n.locale(lL(e)).weekday(0)},getWeek:function(e,n){return n.locale(lL(e)).week()},getShortWeekDays:function(e){return An().locale(lL(e)).localeData().weekdaysMin()},getShortMonths:function(e){return An().locale(lL(e)).localeData().monthsShort()},format:function(e,n,i){return n.locale(lL(e)).format(i)},parse:function(e,n,i){for(var r=lL(e),o=0;o<i.length;o+=1){var s=i[o],a=n;if(s.includes("wo")||s.includes("Wo")){for(var l=a.split("-")[0],c=a.split("-")[1],u=An(l,"YYYY").startOf("year").locale(r),d=0;d<=52;d+=1){var h=u.add(d,"week");if(h.format("Wo")===c)return h}return Int(),null}var f=An(a,s,!0).locale(r);if(f.isValid())return f}return n&&Int(),null}}};function Ehe(t,e){return t!==void 0?t:e?"bottomRight":"bottomLeft"}function iTt(t,e){var n=Ehe(t,e),i=n==null?void 0:n.toLowerCase().endsWith("right"),r=i?"insetInlineEnd":"insetInlineStart";return e&&(r=["insetInlineStart","insetInlineEnd"].find(function(o){return o!==r})),r}var a_=b.createContext(null),F7n={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};function rTt(t){var e=t.popupElement,n=t.popupStyle,i=t.popupClassName,r=t.popupAlign,o=t.transitionName,s=t.getPopupContainer,a=t.children,l=t.range,c=t.placement,u=t.builtinPlacements,d=u===void 0?F7n:u,h=t.direction,f=t.visible,m=t.onClose,p=b.useContext(a_),g=p.prefixCls,y="".concat(g,"-dropdown"),_=Ehe(c,h==="rtl");return b.createElement(HK,{showAction:[],hideAction:["click"],popupPlacement:_,builtinPlacements:d,prefixCls:y,popupTransitionName:o,popup:e,popupAlign:r,popupVisible:f,popupClassName:Me(i,ye(ye({},"".concat(y,"-range"),l),"".concat(y,"-rtl"),h==="rtl")),popupStyle:n,stretch:"minWidth",getPopupContainer:s,onPopupVisibleChange:function(C){C||m()}},a)}function k6e(t,e){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0",i=String(t);i.length<e;)i="".concat(n).concat(i);return i}function zA(t){return t==null?[]:Array.isArray(t)?t:[t]}function A9(t,e,n){var i=Ot(t);return i[e]=n,i}function Dhe(t,e){var n={},i=e||Object.keys(t);return i.forEach(function(r){t[r]!==void 0&&(n[r]=t[r])}),n}function oTt(t,e,n){if(n)return n;switch(t){case"time":return e.fieldTimeFormat;case"datetime":return e.fieldDateTimeFormat;case"month":return e.fieldMonthFormat;case"year":return e.fieldYearFormat;case"quarter":return e.fieldQuarterFormat;case"week":return e.fieldWeekFormat;default:return e.fieldDateFormat}}function sTt(t,e,n){var i=n!==void 0?n:e[e.length-1],r=e.find(function(o){return t[o]});return i!==r?t[r]:void 0}function aTt(t){return Dhe(t,["placement","builtinPlacements","popupAlign","getPopupContainer","transitionName","direction"])}function M6e(t,e,n,i){ii(!e,"'dateRender' is deprecated. Please use 'cellRender' instead."),ii(!n,"'monthCellRender' is deprecated. Please use 'cellRender' instead.");var r=b.useMemo(function(){return t||function(s,a){var l=s;return e&&a.type==="date"?e(l,a.today):n&&a.type==="month"?n(l,a.locale):a.originNode}},[t,n,e]),o=b.useCallback(function(s,a){return r(s,Ie(Ie({},a),{},{range:i}))},[r,i]);return o}function lTt(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],i=b.useState([!1,!1]),r=He(i,2),o=r[0],s=r[1],a=function(u,d){s(function(h){return A9(h,d,u)})},l=b.useMemo(function(){return o.map(function(c,u){if(c)return!0;var d=t[u];return d?!!(!n[u]&&!d||d&&e(d,{activeIndex:u})):!1})},[t,o,e,n]);return[l,a]}function cTt(t,e,n,i,r){var o="",s=[];return t&&s.push(r?"hh":"HH"),e&&s.push("mm"),n&&s.push("ss"),o=s.join(":"),i&&(o+=".SSS"),r&&(o+=" A"),o}function $7n(t,e,n,i,r,o){var s=t.fieldDateTimeFormat,a=t.fieldDateFormat,l=t.fieldTimeFormat,c=t.fieldMonthFormat,u=t.fieldYearFormat,d=t.fieldWeekFormat,h=t.fieldQuarterFormat,f=t.yearFormat,m=t.cellYearFormat,p=t.cellQuarterFormat,g=t.dayFormat,y=t.cellDateFormat,_=cTt(e,n,i,r,o);return Ie(Ie({},t),{},{fieldDateTimeFormat:s||"YYYY-MM-DD ".concat(_),fieldDateFormat:a||"YYYY-MM-DD",fieldTimeFormat:l||_,fieldMonthFormat:c||"YYYY-MM",fieldYearFormat:u||"YYYY",fieldWeekFormat:d||"gggg-wo",fieldQuarterFormat:h||"YYYY-[Q]Q",yearFormat:f||"YYYY",cellYearFormat:m||"YYYY",cellQuarterFormat:p||"[Q]Q",cellDateFormat:y||g||"D"})}function uTt(t,e){var n=e.showHour,i=e.showMinute,r=e.showSecond,o=e.showMillisecond,s=e.use12Hours;return Z.useMemo(function(){return $7n(t,n,i,r,o,s)},[t,n,i,r,o,s])}function TV(t,e,n){return n??e.some(function(i){return t.includes(i)})}var V7n=["showNow","showHour","showMinute","showSecond","showMillisecond","use12Hours","hourStep","minuteStep","secondStep","millisecondStep","hideDisabledOptions","defaultValue","disabledHours","disabledMinutes","disabledSeconds","disabledMilliseconds","disabledTime","changeOnScroll","defaultOpenValue"];function B7n(t){var e=Dhe(t,V7n),n=t.format,i=t.picker,r=null;return n&&(r=n,Array.isArray(r)&&(r=r[0]),r=Un(r)==="object"?r.format:r),i==="time"&&(e.format=r),[e,r]}function z7n(t){return t&&typeof t=="string"}function dTt(t,e,n,i){return[t,e,n,i].some(function(r){return r!==void 0})}function hTt(t,e,n,i,r){var o=e,s=n,a=i;if(!t&&!o&&!s&&!a&&!r)o=!0,s=!0,a=!0;else if(t){var l,c,u,d=[o,s,a].some(function(m){return m===!1}),h=[o,s,a].some(function(m){return m===!0}),f=d?!0:!h;o=(l=o)!==null&&l!==void 0?l:f,s=(c=s)!==null&&c!==void 0?c:f,a=(u=a)!==null&&u!==void 0?u:f}return[o,s,a,r]}function fTt(t){var e=t.showTime,n=B7n(t),i=He(n,2),r=i[0],o=i[1],s=e&&Un(e)==="object"?e:{},a=Ie(Ie({defaultOpenValue:s.defaultOpenValue||s.defaultValue},r),s),l=a.showMillisecond,c=a.showHour,u=a.showMinute,d=a.showSecond,h=dTt(c,u,d,l),f=hTt(h,c,u,d,l),m=He(f,3);return c=m[0],u=m[1],d=m[2],[a,Ie(Ie({},a),{},{showHour:c,showMinute:u,showSecond:d,showMillisecond:l}),a.format,o]}function mTt(t,e,n,i,r){var o=t==="time";if(t==="datetime"||o){for(var s=i,a=oTt(t,r,null),l=a,c=[e,n],u=0;u<c.length;u+=1){var d=zA(c[u])[0];if(z7n(d)){l=d;break}}var h=s.showHour,f=s.showMinute,m=s.showSecond,p=s.showMillisecond,g=s.use12Hours,y=TV(l,["a","A","LT","LLL","LTS"],g),_=dTt(h,f,m,p);_||(h=TV(l,["H","h","k","LT","LLL"]),f=TV(l,["m","LT","LLL"]),m=TV(l,["s","LTS"]),p=TV(l,["SSS"]));var w=hTt(_,h,f,m,p),C=He(w,3);h=C[0],f=C[1],m=C[2];var N=e||cTt(h,f,m,p,y);return Ie(Ie({},s),{},{format:N,showHour:h,showMinute:f,showSecond:m,showMillisecond:p,use12Hours:y})}return null}function H7n(t,e,n){if(n&&ii(!1,"`clearIcon` will be removed in future. Please use `allowClear` instead."),e===!1)return null;var i=e&&Un(e)==="object"?e:{};return i.clearIcon||n||b.createElement("span",{className:"".concat(t,"-clear-btn")})}var Nxe=7;function Zk(t,e,n){return!t&&!e||t===e?!0:!t||!e?!1:n()}function oke(t,e,n){return Zk(e,n,function(){var i=Math.floor(t.getYear(e)/10),r=Math.floor(t.getYear(n)/10);return i===r})}function T2(t,e,n){return Zk(e,n,function(){return t.getYear(e)===t.getYear(n)})}function Ant(t,e){var n=Math.floor(t.getMonth(e)/3);return n+1}function W7n(t,e,n){return Zk(e,n,function(){return T2(t,e,n)&&Ant(t,e)===Ant(t,n)})}function L6e(t,e,n){return Zk(e,n,function(){return T2(t,e,n)&&t.getMonth(e)===t.getMonth(n)})}function T6e(t,e,n){return Zk(e,n,function(){return T2(t,e,n)&&L6e(t,e,n)&&t.getDate(e)===t.getDate(n)})}function pTt(t,e,n){return Zk(e,n,function(){return t.getHour(e)===t.getHour(n)&&t.getMinute(e)===t.getMinute(n)&&t.getSecond(e)===t.getSecond(n)})}function gTt(t,e,n){return Zk(e,n,function(){return T6e(t,e,n)&&pTt(t,e,n)&&t.getMillisecond(e)===t.getMillisecond(n)})}function B7(t,e,n,i){return Zk(n,i,function(){var r=t.locale.getWeekFirstDate(e,n),o=t.locale.getWeekFirstDate(e,i);return T2(t,r,o)&&t.locale.getWeek(e,n)===t.locale.getWeek(e,i)})}function _f(t,e,n,i,r){switch(r){case"date":return T6e(t,n,i);case"week":return B7(t,e.locale,n,i);case"month":return L6e(t,n,i);case"quarter":return W7n(t,n,i);case"year":return T2(t,n,i);case"decade":return oke(t,n,i);case"time":return pTt(t,n,i);default:return gTt(t,n,i)}}function khe(t,e,n,i){return!e||!n||!i?!1:t.isAfter(i,e)&&t.isAfter(n,i)}function OZ(t,e,n,i,r){return _f(t,e,n,i,r)?!0:t.isAfter(n,i)}function U7n(t,e,n){var i=e.locale.getWeekFirstDay(t),r=e.setDate(n,1),o=e.getWeekDay(r),s=e.addDate(r,i-o);return e.getMonth(s)===e.getMonth(n)&&e.getDate(s)>1&&(s=e.addDate(s,-7)),s}function cd(t,e){var n=e.generateConfig,i=e.locale,r=e.format;return t?typeof r=="function"?r(t):n.locale.format(i.locale,t,r):""}function Qne(t,e,n){var i=e,r=["getHour","getMinute","getSecond","getMillisecond"],o=["setHour","setMinute","setSecond","setMillisecond"];return o.forEach(function(s,a){n?i=t[s](i,t[r[a]](n)):i=t[s](i,0)}),i}function K7n(t,e,n,i,r){var o=gr(function(s,a){return!!(n&&n(s,a)||i&&t.isAfter(i,s)&&!_f(t,e,i,s,a.type)||r&&t.isAfter(s,r)&&!_f(t,e,r,s,a.type))});return o}function q7n(t,e,n){return b.useMemo(function(){var i=oTt(t,e,n),r=zA(i),o=r[0],s=Un(o)==="object"&&o.type==="mask"?o.format:null;return[r.map(function(a){return typeof a=="string"||typeof a=="function"?a:a.format}),s]},[t,e,n])}function G7n(t,e,n){return typeof t[0]=="function"||n?!0:e}function Y7n(t,e,n,i){var r=gr(function(o,s){var a=Ie({type:e},s);if(delete a.activeIndex,!t.isValidate(o)||n&&n(o,a))return!0;if((e==="date"||e==="time")&&i){var l,c=s&&s.activeIndex===1?"end":"start",u=((l=i.disabledTime)===null||l===void 0?void 0:l.call(i,o,c,{from:a.from}))||{},d=u.disabledHours,h=u.disabledMinutes,f=u.disabledSeconds,m=u.disabledMilliseconds,p=i.disabledHours,g=i.disabledMinutes,y=i.disabledSeconds,_=d||p,w=h||g,C=f||y,N=t.getHour(o),E=t.getMinute(o),D=t.getSecond(o),k=t.getMillisecond(o);if(_&&_().includes(N)||w&&w(N).includes(E)||C&&C(N,E).includes(D)||m&&m(N,E,D).includes(k))return!0}return!1});return r}function jZ(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=b.useMemo(function(){var i=t&&zA(t);return e&&i&&(i[1]=i[1]||i[0]),i},[t,e]);return n}function bTt(t,e){var n=t.generateConfig,i=t.locale,r=t.picker,o=r===void 0?"date":r,s=t.prefixCls,a=s===void 0?"rc-picker":s,l=t.styles,c=l===void 0?{}:l,u=t.classNames,d=u===void 0?{}:u,h=t.order,f=h===void 0?!0:h,m=t.components,p=m===void 0?{}:m,g=t.inputRender,y=t.allowClear,_=t.clearIcon,w=t.needConfirm,C=t.multiple,N=t.format,E=t.inputReadOnly,D=t.disabledDate,k=t.minDate,M=t.maxDate,T=t.showTime,A=t.value,R=t.defaultValue,P=t.pickerValue,O=t.defaultPickerValue,V=jZ(A),F=jZ(R),$=jZ(P),B=jZ(O),z=o==="date"&&T?"datetime":o,H=z==="time"||z==="datetime",K=H||C,q=w??H,U=fTt(t),Y=He(U,4),J=Y[0],ae=Y[1],se=Y[2],oe=Y[3],fe=uTt(i,ae),de=b.useMemo(function(){return mTt(z,se,oe,J,fe)},[z,se,oe,J,fe]);o==="time"&&["disabledHours","disabledMinutes","disabledSeconds"].some(function(ge){return t[ge]})&&ii(!1,"'disabledHours', 'disabledMinutes', 'disabledSeconds' will be removed in the next major version, please use 'disabledTime' instead.");var ie=b.useMemo(function(){return Ie(Ie({},t),{},{prefixCls:a,locale:fe,picker:o,styles:c,classNames:d,order:f,components:Ie({input:g},p),clearIcon:H7n(a,y,_),showTime:de,value:V,defaultValue:F,pickerValue:$,defaultPickerValue:B},e==null?void 0:e())},[t]),Q=q7n(z,fe,N),be=He(Q,2),le=be[0],Ne=be[1],Le=G7n(le,E,C),Te=K7n(n,i,D,k,M),De=Y7n(n,o,Te,de),Pe=b.useMemo(function(){return Ie(Ie({},ie),{},{needConfirm:q,inputReadOnly:Le,disabledDate:Te})},[ie,q,Le,Te]);return[Pe,z,K,le,Ne,De]}function X7n(t,e,n){var i=ho(e,{value:t}),r=He(i,2),o=r[0],s=r[1],a=Z.useRef(t),l=Z.useRef(),c=function(){Dr.cancel(l.current)},u=gr(function(){s(a.current),n&&o!==a.current&&n(a.current)}),d=gr(function(h,f){c(),a.current=h,h||f?u():l.current=Dr(u)});return Z.useEffect(function(){return c},[]),[o,d]}function vTt(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],i=arguments.length>3?arguments[3]:void 0,r=n.every(function(u){return u})?!1:t,o=X7n(r,e||!1,i),s=He(o,2),a=s[0],l=s[1];function c(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!d.inherit||a)&&l(u,d.force)}return[a,c]}function yTt(t){var e=b.useRef();return b.useImperativeHandle(t,function(){var n;return{nativeElement:(n=e.current)===null||n===void 0?void 0:n.nativeElement,focus:function(r){var o;(o=e.current)===null||o===void 0||o.focus(r)},blur:function(){var r;(r=e.current)===null||r===void 0||r.blur()}}}),e}function _Tt(t,e){return b.useMemo(function(){return t||(e?(ii(!1,"`ranges` is deprecated. Please use `presets` instead."),Object.entries(e).map(function(n){var i=He(n,2),r=i[0],o=i[1];return{label:r,value:o}})):[])},[t,e])}function I6e(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=b.useRef(e);i.current=e,ZT(function(){if(t)i.current(t);else{var r=Dr(function(){i.current(t)},n);return function(){Dr.cancel(r)}}},[t])}function xTt(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=b.useState(0),r=He(i,2),o=r[0],s=r[1],a=b.useState(!1),l=He(a,2),c=l[0],u=l[1],d=b.useRef([]),h=b.useRef(null),f=function(y){u(y)},m=function(y){return y&&(h.current=y),h.current},p=function(y){var _=d.current,w=new Set(_.filter(function(N){return y[N]||e[N]})),C=_[_.length-1]===0?1:0;return w.size>=2||t[C]?null:C};return I6e(c||n,function(){c||(d.current=[])}),b.useEffect(function(){c&&d.current.push(o)},[c,o]),[c,f,m,o,s,p,d.current]}function Z7n(t,e,n,i,r,o){var s=n[n.length-1],a=function(c,u){var d=He(t,2),h=d[0],f=d[1],m=Ie(Ie({},u),{},{from:sTt(t,n)});return s===1&&e[0]&&h&&!_f(i,r,h,c,m.type)&&i.isAfter(h,c)||s===0&&e[1]&&f&&!_f(i,r,f,c,m.type)&&i.isAfter(c,f)?!0:o==null?void 0:o(c,m)};return a}function z7(t,e,n,i){switch(e){case"date":case"week":return t.addMonth(n,i);case"month":case"quarter":return t.addYear(n,i);case"year":return t.addYear(n,i*10);case"decade":return t.addYear(n,i*100);default:return n}}var Exe=[];function wTt(t,e,n,i,r,o,s,a){var l=arguments.length>8&&arguments[8]!==void 0?arguments[8]:Exe,c=arguments.length>9&&arguments[9]!==void 0?arguments[9]:Exe,u=arguments.length>10&&arguments[10]!==void 0?arguments[10]:Exe,d=arguments.length>11?arguments[11]:void 0,h=arguments.length>12?arguments[12]:void 0,f=arguments.length>13?arguments[13]:void 0,m=s==="time",p=o||0,g=function($){var B=t.getNow();return m&&(B=Qne(t,B)),l[$]||n[$]||B},y=He(c,2),_=y[0],w=y[1],C=ho(function(){return g(0)},{value:_}),N=He(C,2),E=N[0],D=N[1],k=ho(function(){return g(1)},{value:w}),M=He(k,2),T=M[0],A=M[1],R=b.useMemo(function(){var F=[E,T][p];return m?F:Qne(t,F,u[p])},[m,E,T,p,t,u]),P=function($){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"panel",z=[D,A][p];z($);var H=[E,T];H[p]=$,d&&(!_f(t,e,E,H[0],s)||!_f(t,e,T,H[1],s))&&d(H,{source:B,range:p===1?"end":"start",mode:i})},O=function($,B){if(a){var z={date:"month",week:"month",month:"year",quarter:"year"},H=z[s];if(H&&!_f(t,e,$,B,H))return z7(t,s,B,-1);if(s==="year"&&$){var K=Math.floor(t.getYear($)/10),q=Math.floor(t.getYear(B)/10);if(K!==q)return z7(t,s,B,-1)}}return B},V=b.useRef(null);return Lr(function(){if(r&&!l[p]){var F=m?null:t.getNow();if(V.current!==null&&V.current!==p?F=[E,T][p^1]:n[p]?F=p===0?n[0]:O(n[0],n[1]):n[p^1]&&(F=n[p^1]),F){h&&t.isAfter(h,F)&&(F=h);var $=a?z7(t,s,F,1):F;f&&t.isAfter($,f)&&(F=a?z7(t,s,f,-1):f),P(F,"reset")}}},[r,p,n[p]]),b.useEffect(function(){r?V.current=p:V.current=null},[r,p]),Lr(function(){r&&l&&l[p]&&P(l[p],"reset")},[r,p]),[R,P]}function CTt(t,e){var n=b.useRef(t),i=b.useState({}),r=He(i,2),o=r[1],s=function(c){return c&&e!==void 0?e:n.current},a=function(c){n.current=c,o({})};return[s,a,s(!0)]}var Q7n=[];function STt(t,e,n){var i=function(s){return s.map(function(a){return cd(a,{generateConfig:t,locale:e,format:n[0]})})},r=function(s,a){for(var l=Math.max(s.length,a.length),c=-1,u=0;u<l;u+=1){var d=s[u]||null,h=a[u]||null;if(d!==h&&!gTt(t,d,h)){c=u;break}}return[c<0,c!==0]};return[i,r]}function NTt(t,e){return Ot(t).sort(function(n,i){return e.isAfter(n,i)?1:-1})}function J7n(t){var e=CTt(t),n=He(e,2),i=n[0],r=n[1],o=gr(function(){r(t)});return b.useEffect(function(){o()},[t]),[i,r]}function ETt(t,e,n,i,r,o,s,a,l){var c=ho(o,{value:s}),u=He(c,2),d=u[0],h=u[1],f=d||Q7n,m=J7n(f),p=He(m,2),g=p[0],y=p[1],_=STt(t,e,n),w=He(_,2),C=w[0],N=w[1],E=gr(function(k){var M=Ot(k);if(i)for(var T=0;T<2;T+=1)M[T]=M[T]||null;else r&&(M=NTt(M.filter(function(F){return F}),t));var A=N(g(),M),R=He(A,2),P=R[0],O=R[1];if(!P&&(y(M),a)){var V=C(M);a(M,V,{range:O?"end":"start"})}}),D=function(){l&&l(g())};return[f,h,g,E,D]}function DTt(t,e,n,i,r,o,s,a,l,c){var u=t.generateConfig,d=t.locale,h=t.picker,f=t.onChange,m=t.allowEmpty,p=t.order,g=o.some(function(P){return P})?!1:p,y=STt(u,d,s),_=He(y,2),w=_[0],C=_[1],N=CTt(e),E=He(N,2),D=E[0],k=E[1],M=gr(function(){k(e)});b.useEffect(function(){M()},[e]);var T=gr(function(P){var O=P===null,V=Ot(P||D());if(O)for(var F=Math.max(o.length,V.length),$=0;$<F;$+=1)o[$]||(V[$]=null);g&&V[0]&&V[1]&&(V=NTt(V,u)),r(V);var B=V,z=He(B,2),H=z[0],K=z[1],q=!H,U=!K,Y=m?(!q||m[0])&&(!U||m[1]):!0,J=!p||q||U||_f(u,d,H,K,h)||u.isAfter(K,H),ae=(!H||!c(H,{activeIndex:0}))&&(!K||!c(K,{from:H,activeIndex:1})),se=O||Y&&J&&ae;if(se){n(V);var oe=C(V,e),fe=He(oe,1),de=fe[0];f&&!de&&f(O&&V.every(function(ie){return!ie})?null:V,w(V))}return se}),A=gr(function(P,O){var V=A9(D(),P,i()[P]);k(V),O&&T()}),R=!a&&!l;return I6e(!R,function(){R&&(T(),r(e),M())},2),[A,T]}function kTt(t,e,n,i,r){return e!=="date"&&e!=="time"?!1:n!==void 0?n:i!==void 0?i:!r&&(t==="date"||t==="time")}function e9n(t,e,n,i,r,o){var s=t;function a(d,h,f){var m=o[d](s),p=f.find(function(w){return w.value===m});if(!p||p.disabled){var g=f.filter(function(w){return!w.disabled}),y=Ot(g).reverse(),_=y.find(function(w){return w.value<=m})||g[0];_&&(m=_.value,s=o[h](s,m))}return m}var l=a("getHour","setHour",e()),c=a("getMinute","setMinute",n(l)),u=a("getSecond","setSecond",i(l,c));return a("getMillisecond","setMillisecond",r(l,c,u)),s}function FZ(){return[]}function $Z(t,e){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,s=[],a=n>=1?n|0:1,l=t;l<=e;l+=a){var c=r.includes(l);(!c||!i)&&s.push({label:k6e(l,o),value:l,disabled:c})}return s}function A6e(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=e||{},r=i.use12Hours,o=i.hourStep,s=o===void 0?1:o,a=i.minuteStep,l=a===void 0?1:a,c=i.secondStep,u=c===void 0?1:c,d=i.millisecondStep,h=d===void 0?100:d,f=i.hideDisabledOptions,m=i.disabledTime,p=i.disabledHours,g=i.disabledMinutes,y=i.disabledSeconds,_=b.useMemo(function(){return n||t.getNow()},[n,t]);{var w=24%s===0,C=60%l===0,N=60%u===0;ii(w,"`hourStep` ".concat(s," is invalid. It should be a factor of 24.")),ii(C,"`minuteStep` ".concat(l," is invalid. It should be a factor of 60.")),ii(N,"`secondStep` ".concat(u," is invalid. It should be a factor of 60."))}var E=b.useCallback(function(K){var q=(m==null?void 0:m(K))||{};return[q.disabledHours||p||FZ,q.disabledMinutes||g||FZ,q.disabledSeconds||y||FZ,q.disabledMilliseconds||FZ]},[m,p,g,y]),D=b.useMemo(function(){return E(_)},[_,E]),k=He(D,4),M=k[0],T=k[1],A=k[2],R=k[3],P=b.useCallback(function(K,q,U,Y){var J=$Z(0,23,s,f,K()),ae=r?J.map(function(de){return Ie(Ie({},de),{},{label:k6e(de.value%12||12,2)})}):J,se=function(ie){return $Z(0,59,l,f,q(ie))},oe=function(ie,Q){return $Z(0,59,u,f,U(ie,Q))},fe=function(ie,Q,be){return $Z(0,999,h,f,Y(ie,Q,be),3)};return[ae,se,oe,fe]},[f,s,r,h,l,u]),O=b.useMemo(function(){return P(M,T,A,R)},[P,M,T,A,R]),V=He(O,4),F=V[0],$=V[1],B=V[2],z=V[3],H=function(q,U){var Y=function(){return F},J=$,ae=B,se=z;if(U){var oe=E(U),fe=He(oe,4),de=fe[0],ie=fe[1],Q=fe[2],be=fe[3],le=P(de,ie,Q,be),Ne=He(le,4),Le=Ne[0],Te=Ne[1],De=Ne[2],Pe=Ne[3];Y=function(){return Le},J=Te,ae=De,se=Pe}var ge=e9n(q,Y,J,ae,se,t);return ge};return[H,F,$,B,z]}function t9n(t){var e=t.mode,n=t.internalMode,i=t.renderExtraFooter,r=t.showNow,o=t.showTime,s=t.onSubmit,a=t.onNow,l=t.invalid,c=t.needConfirm,u=t.generateConfig,d=t.disabledDate,h=b.useContext(a_),f=h.prefixCls,m=h.locale,p=h.button,g=p===void 0?"button":p,y=u.getNow(),_=A6e(u,o,y),w=He(_,1),C=w[0],N=i==null?void 0:i(e),E=d(y,{type:e}),D=function(){if(!E){var O=C(y);a(O)}},k="".concat(f,"-now"),M="".concat(k,"-btn"),T=r&&b.createElement("li",{className:k},b.createElement("a",{className:Me(M,E&&"".concat(M,"-disabled")),"aria-disabled":E,onClick:D},n==="date"?m.today:m.now)),A=c&&b.createElement("li",{className:"".concat(f,"-ok")},b.createElement(g,{disabled:l,onClick:s},m.ok)),R=(T||A)&&b.createElement("ul",{className:"".concat(f,"-ranges")},T,A);return!N&&!R?null:b.createElement("div",{className:"".concat(f,"-footer")},N&&b.createElement("div",{className:"".concat(f,"-footer-extra")},N),R)}function MTt(t,e,n){function i(r,o){var s=r.findIndex(function(l){return _f(t,e,l,o,n)});if(s===-1)return[].concat(Ot(r),[o]);var a=Ot(r);return a.splice(s,1),a}return i}var HA=b.createContext(null);function Mhe(){return b.useContext(HA)}function p6(t,e){var n=t.prefixCls,i=t.generateConfig,r=t.locale,o=t.disabledDate,s=t.minDate,a=t.maxDate,l=t.cellRender,c=t.hoverValue,u=t.hoverRangeValue,d=t.onHover,h=t.values,f=t.pickerValue,m=t.onSelect,p=t.prevIcon,g=t.nextIcon,y=t.superPrevIcon,_=t.superNextIcon,w=i.getNow(),C={now:w,values:h,pickerValue:f,prefixCls:n,disabledDate:o,minDate:s,maxDate:a,cellRender:l,hoverValue:c,hoverRangeValue:u,onHover:d,locale:r,generateConfig:i,onSelect:m,panelType:e,prevIcon:p,nextIcon:g,superPrevIcon:y,superNextIcon:_};return[C,w]}var kC=b.createContext({});kC.displayName="PickerHackContext";function qK(t){for(var e=t.rowNum,n=t.colNum,i=t.baseDate,r=t.getCellDate,o=t.prefixColumn,s=t.rowClassName,a=t.titleFormat,l=t.getCellText,c=t.getCellClassName,u=t.headerCells,d=t.cellSelection,h=d===void 0?!0:d,f=t.disabledDate,m=Mhe(),p=m.prefixCls,g=m.panelType,y=m.now,_=m.disabledDate,w=m.cellRender,C=m.onHover,N=m.hoverValue,E=m.hoverRangeValue,D=m.generateConfig,k=m.values,M=m.locale,T=m.onSelect,A=f||_,R="".concat(p,"-cell"),P=b.useContext(kC),O=P.onCellDblClick,V=function(U){return k.some(function(Y){return Y&&_f(D,M,U,Y,g)})},F=[],$=0;$<e;$+=1){for(var B=[],z=void 0,H=function(){var U=$*n+K,Y=r(i,U),J=A==null?void 0:A(Y,{type:g});K===0&&(z=Y,o&&B.push(o(z)));var ae=!1,se=!1,oe=!1;if(h&&E){var fe=He(E,2),de=fe[0],ie=fe[1];ae=khe(D,de,ie,Y),se=_f(D,M,Y,de,g),oe=_f(D,M,Y,ie,g)}var Q=a?cd(Y,{locale:M,format:a,generateConfig:D}):void 0,be=b.createElement("div",{className:"".concat(R,"-inner")},l(Y));B.push(b.createElement("td",{key:K,title:Q,className:Me(R,Ie(ye(ye(ye(ye(ye(ye({},"".concat(R,"-disabled"),J),"".concat(R,"-hover"),(N||[]).some(function(le){return _f(D,M,Y,le,g)})),"".concat(R,"-in-range"),ae&&!se&&!oe),"".concat(R,"-range-start"),se),"".concat(R,"-range-end"),oe),"".concat(p,"-cell-selected"),!E&&g!=="week"&&V(Y)),c(Y))),onClick:function(){J||T(Y)},onDoubleClick:function(){!J&&O&&O()},onMouseEnter:function(){J||C==null||C(Y)},onMouseLeave:function(){J||C==null||C(null)}},w?w(Y,{prefixCls:p,originNode:be,today:y,type:g,locale:M}):be))},K=0;K<n;K+=1)H();F.push(b.createElement("tr",{key:$,className:s==null?void 0:s(z)},B))}return b.createElement("div",{className:"".concat(p,"-body")},b.createElement("table",{className:"".concat(p,"-content")},u&&b.createElement("thead",null,b.createElement("tr",null,u)),b.createElement("tbody",null,F)))}var VZ={visibility:"hidden"};function g6(t){var e=t.offset,n=t.superOffset,i=t.onChange,r=t.getStart,o=t.getEnd,s=t.children,a=Mhe(),l=a.prefixCls,c=a.prevIcon,u=c===void 0?"‹":c,d=a.nextIcon,h=d===void 0?"›":d,f=a.superPrevIcon,m=f===void 0?"«":f,p=a.superNextIcon,g=p===void 0?"»":p,y=a.minDate,_=a.maxDate,w=a.generateConfig,C=a.locale,N=a.pickerValue,E=a.panelType,D="".concat(l,"-header"),k=b.useContext(kC),M=k.hidePrev,T=k.hideNext,A=k.hideHeader,R=b.useMemo(function(){if(!y||!e||!o)return!1;var q=o(e(-1,N));return!OZ(w,C,q,y,E)},[y,e,N,o,w,C,E]),P=b.useMemo(function(){if(!y||!n||!o)return!1;var q=o(n(-1,N));return!OZ(w,C,q,y,E)},[y,n,N,o,w,C,E]),O=b.useMemo(function(){if(!_||!e||!r)return!1;var q=r(e(1,N));return!OZ(w,C,_,q,E)},[_,e,N,r,w,C,E]),V=b.useMemo(function(){if(!_||!n||!r)return!1;var q=r(n(1,N));return!OZ(w,C,_,q,E)},[_,n,N,r,w,C,E]),F=function(U){e&&i(e(U,N))},$=function(U){n&&i(n(U,N))};if(A)return null;var B="".concat(D,"-prev-btn"),z="".concat(D,"-next-btn"),H="".concat(D,"-super-prev-btn"),K="".concat(D,"-super-next-btn");return b.createElement("div",{className:D},n&&b.createElement("button",{type:"button","aria-label":"super-prev-year",onClick:function(){return $(-1)},tabIndex:-1,className:Me(H,P&&"".concat(H,"-disabled")),disabled:P,style:M?VZ:{}},m),e&&b.createElement("button",{type:"button","aria-label":"prev-year",onClick:function(){return F(-1)},tabIndex:-1,className:Me(B,R&&"".concat(B,"-disabled")),disabled:R,style:M?VZ:{}},u),b.createElement("div",{className:"".concat(D,"-view")},s),e&&b.createElement("button",{type:"button","aria-label":"next-year",onClick:function(){return F(1)},tabIndex:-1,className:Me(z,O&&"".concat(z,"-disabled")),disabled:O,style:T?VZ:{}},h),n&&b.createElement("button",{type:"button","aria-label":"super-next-year",onClick:function(){return $(1)},tabIndex:-1,className:Me(K,V&&"".concat(K,"-disabled")),disabled:V,style:T?VZ:{}},g))}function Lhe(t){var e=t.prefixCls,n=t.panelName,i=n===void 0?"date":n,r=t.locale,o=t.generateConfig,s=t.pickerValue,a=t.onPickerValueChange,l=t.onModeChange,c=t.mode,u=c===void 0?"date":c,d=t.disabledDate,h=t.onSelect,f=t.onHover,m=t.showWeek,p="".concat(e,"-").concat(i,"-panel"),g="".concat(e,"-cell"),y=u==="week",_=p6(t,u),w=He(_,2),C=w[0],N=w[1],E=o.locale.getWeekFirstDay(r.locale),D=o.setDate(s,1),k=U7n(r.locale,o,D),M=o.getMonth(s),T=m===void 0?y:m,A=T?function(q){var U=d==null?void 0:d(q,{type:"week"});return b.createElement("td",{key:"week",className:Me(g,"".concat(g,"-week"),ye({},"".concat(g,"-disabled"),U)),onClick:function(){U||h(q)},onMouseEnter:function(){U||f==null||f(q)},onMouseLeave:function(){U||f==null||f(null)}},b.createElement("div",{className:"".concat(g,"-inner")},o.locale.getWeek(r.locale,q)))}:null,R=[],P=r.shortWeekDays||(o.locale.getShortWeekDays?o.locale.getShortWeekDays(r.locale):[]);A&&R.push(b.createElement("th",{key:"empty","aria-label":"empty cell"}));for(var O=0;O<Nxe;O+=1)R.push(b.createElement("th",{key:O},P[(O+E)%Nxe]));var V=function(U,Y){return o.addDate(U,Y)},F=function(U){return cd(U,{locale:r,format:r.cellDateFormat,generateConfig:o})},$=function(U){var Y=ye(ye({},"".concat(e,"-cell-in-view"),L6e(o,U,s)),"".concat(e,"-cell-today"),T6e(o,U,N));return Y},B=r.shortMonths||(o.locale.getShortMonths?o.locale.getShortMonths(r.locale):[]),z=b.createElement("button",{type:"button","aria-label":"year panel",key:"year",onClick:function(){l("year",s)},tabIndex:-1,className:"".concat(e,"-year-btn")},cd(s,{locale:r,format:r.yearFormat,generateConfig:o})),H=b.createElement("button",{type:"button","aria-label":"month panel",key:"month",onClick:function(){l("month",s)},tabIndex:-1,className:"".concat(e,"-month-btn")},r.monthFormat?cd(s,{locale:r,format:r.monthFormat,generateConfig:o}):B[M]),K=r.monthBeforeYear?[H,z]:[z,H];return b.createElement(HA.Provider,{value:C},b.createElement("div",{className:Me(p,m&&"".concat(p,"-show-week"))},b.createElement(g6,{offset:function(U){return o.addMonth(s,U)},superOffset:function(U){return o.addYear(s,U)},onChange:a,getStart:function(U){return o.setDate(U,1)},getEnd:function(U){var Y=o.setDate(U,1);return Y=o.addMonth(Y,1),o.addDate(Y,-1)}},K),b.createElement(qK,lt({titleFormat:r.fieldDateFormat},t,{colNum:Nxe,rowNum:6,baseDate:k,headerCells:R,getCellDate:V,getCellText:F,getCellClassName:$,prefixColumn:A,cellSelection:!y}))))}var n9n=1/3;function i9n(t,e){var n=b.useRef(!1),i=b.useRef(null),r=b.useRef(null),o=function(){return n.current},s=function(){Dr.cancel(i.current),n.current=!1},a=b.useRef(),l=function(){var d=t.current;if(r.current=null,a.current=0,d){var h=d.querySelector('[data-value="'.concat(e,'"]')),f=d.querySelector("li"),m=function p(){s(),n.current=!0,a.current+=1;var g=d.scrollTop,y=f.offsetTop,_=h.offsetTop,w=_-y;if(_===0&&h!==f||!r6(d)){a.current<=5&&(i.current=Dr(p));return}var C=g+(w-g)*n9n,N=Math.abs(w-C);if(r.current!==null&&r.current<N){s();return}if(r.current=N,N<=1){d.scrollTop=w,s();return}d.scrollTop=C,i.current=Dr(p)};h&&f&&m()}},c=gr(l);return[c,s,o]}var r9n=300;function IV(t){var e=t.units,n=t.value,i=t.optionalValue,r=t.type,o=t.onChange,s=t.onHover,a=t.onDblClick,l=t.changeOnScroll,c=Mhe(),u=c.prefixCls,d=c.cellRender,h=c.now,f=c.locale,m="".concat(u,"-time-panel"),p="".concat(u,"-time-panel-cell"),g=b.useRef(null),y=b.useRef(),_=function(){clearTimeout(y.current)},w=i9n(g,n??i),C=He(w,3),N=C[0],E=C[1],D=C[2];Lr(function(){return N(),_(),function(){E(),_()}},[n,i,e]);var k=function(A){_();var R=A.target;!D()&&l&&(y.current=setTimeout(function(){var P=g.current,O=P.querySelector("li").offsetTop,V=Array.from(P.querySelectorAll("li")),F=V.map(function(K){return K.offsetTop-O}),$=F.map(function(K,q){return e[q].disabled?Number.MAX_SAFE_INTEGER:Math.abs(K-R.scrollTop)}),B=Math.min.apply(Math,Ot($)),z=$.findIndex(function(K){return K===B}),H=e[z];H&&!H.disabled&&o(H.value)},r9n))},M="".concat(m,"-column");return b.createElement("ul",{className:M,ref:g,"data-type":r,onScroll:k},e.map(function(T){var A=T.label,R=T.value,P=T.disabled,O=b.createElement("div",{className:"".concat(p,"-inner")},A);return b.createElement("li",{key:R,className:Me(p,ye(ye({},"".concat(p,"-selected"),n===R),"".concat(p,"-disabled"),P)),onClick:function(){P||o(R)},onDoubleClick:function(){!P&&a&&a()},onMouseEnter:function(){s(R)},onMouseLeave:function(){s(null)},"data-value":R},d?d(R,{prefixCls:u,originNode:O,today:h,type:"time",subType:r,locale:f}):O)}))}function IN(t){return t<12}function o9n(t){var e=t.showHour,n=t.showMinute,i=t.showSecond,r=t.showMillisecond,o=t.use12Hours,s=t.changeOnScroll,a=Mhe(),l=a.prefixCls,c=a.values,u=a.generateConfig,d=a.locale,h=a.onSelect,f=a.onHover,m=f===void 0?function(){}:f,p=a.pickerValue,g=(c==null?void 0:c[0])||null,y=b.useContext(kC),_=y.onCellDblClick,w=A6e(u,t,g),C=He(w,5),N=C[0],E=C[1],D=C[2],k=C[3],M=C[4],T=function(nt){var rt=g&&u[nt](g),St=p&&u[nt](p);return[rt,St]},A=T("getHour"),R=He(A,2),P=R[0],O=R[1],V=T("getMinute"),F=He(V,2),$=F[0],B=F[1],z=T("getSecond"),H=He(z,2),K=H[0],q=H[1],U=T("getMillisecond"),Y=He(U,2),J=Y[0],ae=Y[1],se=P===null?null:IN(P)?"am":"pm",oe=b.useMemo(function(){return o?IN(P)?E.filter(function(je){return IN(je.value)}):E.filter(function(je){return!IN(je.value)}):E},[P,E,o]),fe=function(nt,rt){var St,At=nt.filter(function(Nt){return!Nt.disabled});return rt??(At==null||(St=At[0])===null||St===void 0?void 0:St.value)},de=fe(E,P),ie=b.useMemo(function(){return D(de)},[D,de]),Q=fe(ie,$),be=b.useMemo(function(){return k(de,Q)},[k,de,Q]),le=fe(be,K),Ne=b.useMemo(function(){return M(de,Q,le)},[M,de,Q,le]),Le=fe(Ne,J),Te=b.useMemo(function(){if(!o)return[];var je=u.getNow(),nt=u.setHour(je,6),rt=u.setHour(je,18),St=function(Nt,vt){var $t=d.cellMeridiemFormat;return $t?cd(Nt,{generateConfig:u,locale:d,format:$t}):vt};return[{label:St(nt,"AM"),value:"am",disabled:E.every(function(At){return At.disabled||!IN(At.value)})},{label:St(rt,"PM"),value:"pm",disabled:E.every(function(At){return At.disabled||IN(At.value)})}]},[E,o,u,d]),De=function(nt){var rt=N(nt);h(rt)},Pe=b.useMemo(function(){var je=g||p||u.getNow(),nt=function(St){return St!=null};return nt(P)?(je=u.setHour(je,P),je=u.setMinute(je,$),je=u.setSecond(je,K),je=u.setMillisecond(je,J)):nt(O)?(je=u.setHour(je,O),je=u.setMinute(je,B),je=u.setSecond(je,q),je=u.setMillisecond(je,ae)):nt(de)&&(je=u.setHour(je,de),je=u.setMinute(je,Q),je=u.setSecond(je,le),je=u.setMillisecond(je,Le)),je},[g,p,P,$,K,J,de,Q,le,Le,O,B,q,ae,u]),ge=function(nt,rt){return nt===null?null:u[rt](Pe,nt)},he=function(nt){return ge(nt,"setHour")},me=function(nt){return ge(nt,"setMinute")},X=function(nt){return ge(nt,"setSecond")},re=function(nt){return ge(nt,"setMillisecond")},we=function(nt){return nt===null?null:nt==="am"&&!IN(P)?u.setHour(Pe,P-12):nt==="pm"&&IN(P)?u.setHour(Pe,P+12):Pe},ue=function(nt){De(he(nt))},Ce=function(nt){De(me(nt))},ze=function(nt){De(X(nt))},Ye=function(nt){De(re(nt))},Ke=function(nt){De(we(nt))},Xe=function(nt){m(he(nt))},it=function(nt){m(me(nt))},ut=function(nt){m(X(nt))},Ge=function(nt){m(re(nt))},Ee=function(nt){m(we(nt))},Se={onDblClick:_,changeOnScroll:s};return b.createElement("div",{className:"".concat(l,"-content")},e&&b.createElement(IV,lt({units:oe,value:P,optionalValue:O,type:"hour",onChange:ue,onHover:Xe},Se)),n&&b.createElement(IV,lt({units:ie,value:$,optionalValue:B,type:"minute",onChange:Ce,onHover:it},Se)),i&&b.createElement(IV,lt({units:be,value:K,optionalValue:q,type:"second",onChange:ze,onHover:ut},Se)),r&&b.createElement(IV,lt({units:Ne,value:J,optionalValue:ae,type:"millisecond",onChange:Ye,onHover:Ge},Se)),o&&b.createElement(IV,lt({units:Te,value:se,type:"meridiem",onChange:Ke,onHover:Ee},Se)))}function LTt(t){var e=t.prefixCls,n=t.value,i=t.locale,r=t.generateConfig,o=t.showTime,s=o||{},a=s.format,l="".concat(e,"-time-panel"),c=p6(t,"time"),u=He(c,1),d=u[0];return b.createElement(HA.Provider,{value:d},b.createElement("div",{className:Me(l)},b.createElement(g6,null,n?cd(n,{locale:i,format:a,generateConfig:r}):" "),b.createElement(o9n,o)))}function s9n(t){var e=t.prefixCls,n=t.generateConfig,i=t.showTime,r=t.onSelect,o=t.value,s=t.pickerValue,a=t.onHover,l="".concat(e,"-datetime-panel"),c=A6e(n,i),u=He(c,1),d=u[0],h=function(g){return o?Qne(n,g,o):Qne(n,g,s)},f=function(g){a==null||a(g&&h(g))},m=function(g){var y=h(g);r(d(y,y))};return b.createElement("div",{className:l},b.createElement(Lhe,lt({},t,{onSelect:m,onHover:f})),b.createElement(LTt,t))}function a9n(t){var e=t.prefixCls,n=t.locale,i=t.generateConfig,r=t.pickerValue,o=t.disabledDate,s=t.onPickerValueChange,a="".concat(e,"-decade-panel"),l=p6(t,"decade"),c=He(l,1),u=c[0],d=function(E){var D=Math.floor(i.getYear(r)/100)*100;return i.setYear(E,D)},h=function(E){var D=d(E);return i.addYear(D,99)},f=d(r),m=h(r),p=i.addYear(f,-10),g=function(E,D){return i.addYear(E,D*10)},y=function(E){var D=n.cellYearFormat,k=cd(E,{locale:n,format:D,generateConfig:i}),M=cd(i.addYear(E,9),{locale:n,format:D,generateConfig:i});return"".concat(k,"-").concat(M)},_=function(E){return ye({},"".concat(e,"-cell-in-view"),oke(i,E,f)||oke(i,E,m)||khe(i,f,m,E))},w=o?function(N,E){var D=i.setDate(N,1),k=i.setMonth(D,0),M=i.setYear(k,Math.floor(i.getYear(k)/10)*10),T=i.addYear(M,10),A=i.addDate(T,-1);return o(M,E)&&o(A,E)}:null,C="".concat(cd(f,{locale:n,format:n.yearFormat,generateConfig:i}),"-").concat(cd(m,{locale:n,format:n.yearFormat,generateConfig:i}));return b.createElement(HA.Provider,{value:u},b.createElement("div",{className:a},b.createElement(g6,{superOffset:function(E){return i.addYear(r,E*100)},onChange:s,getStart:d,getEnd:h},C),b.createElement(qK,lt({},t,{disabledDate:w,colNum:3,rowNum:4,baseDate:p,getCellDate:g,getCellText:y,getCellClassName:_}))))}function l9n(t){var e=t.prefixCls,n=t.locale,i=t.generateConfig,r=t.pickerValue,o=t.disabledDate,s=t.onPickerValueChange,a=t.onModeChange,l="".concat(e,"-month-panel"),c=p6(t,"month"),u=He(c,1),d=u[0],h=i.setMonth(r,0),f=n.shortMonths||(i.locale.getShortMonths?i.locale.getShortMonths(n.locale):[]),m=function(C,N){return i.addMonth(C,N)},p=function(C){var N=i.getMonth(C);return n.monthFormat?cd(C,{locale:n,format:n.monthFormat,generateConfig:i}):f[N]},g=function(){return ye({},"".concat(e,"-cell-in-view"),!0)},y=o?function(w,C){var N=i.setDate(w,1),E=i.setMonth(N,i.getMonth(N)+1),D=i.addDate(E,-1);return o(N,C)&&o(D,C)}:null,_=b.createElement("button",{type:"button",key:"year","aria-label":"year panel",onClick:function(){a("year")},tabIndex:-1,className:"".concat(e,"-year-btn")},cd(r,{locale:n,format:n.yearFormat,generateConfig:i}));return b.createElement(HA.Provider,{value:d},b.createElement("div",{className:l},b.createElement(g6,{superOffset:function(C){return i.addYear(r,C)},onChange:s,getStart:function(C){return i.setMonth(C,0)},getEnd:function(C){return i.setMonth(C,11)}},_),b.createElement(qK,lt({},t,{disabledDate:y,titleFormat:n.fieldMonthFormat,colNum:3,rowNum:4,baseDate:h,getCellDate:m,getCellText:p,getCellClassName:g}))))}function c9n(t){var e=t.prefixCls,n=t.locale,i=t.generateConfig,r=t.pickerValue,o=t.onPickerValueChange,s=t.onModeChange,a="".concat(e,"-quarter-panel"),l=p6(t,"quarter"),c=He(l,1),u=c[0],d=i.setMonth(r,0),h=function(y,_){return i.addMonth(y,_*3)},f=function(y){return cd(y,{locale:n,format:n.cellQuarterFormat,generateConfig:i})},m=function(){return ye({},"".concat(e,"-cell-in-view"),!0)},p=b.createElement("button",{type:"button",key:"year","aria-label":"year panel",onClick:function(){s("year")},tabIndex:-1,className:"".concat(e,"-year-btn")},cd(r,{locale:n,format:n.yearFormat,generateConfig:i}));return b.createElement(HA.Provider,{value:u},b.createElement("div",{className:a},b.createElement(g6,{superOffset:function(y){return i.addYear(r,y)},onChange:o,getStart:function(y){return i.setMonth(y,0)},getEnd:function(y){return i.setMonth(y,11)}},p),b.createElement(qK,lt({},t,{titleFormat:n.fieldQuarterFormat,colNum:4,rowNum:1,baseDate:d,getCellDate:h,getCellText:f,getCellClassName:m}))))}function u9n(t){var e=t.prefixCls,n=t.generateConfig,i=t.locale,r=t.value,o=t.hoverValue,s=t.hoverRangeValue,a=i.locale,l="".concat(e,"-week-panel-row"),c=function(d){var h={};if(s){var f=He(s,2),m=f[0],p=f[1],g=B7(n,a,m,d),y=B7(n,a,p,d);h["".concat(l,"-range-start")]=g,h["".concat(l,"-range-end")]=y,h["".concat(l,"-range-hover")]=!g&&!y&&khe(n,m,p,d)}return o&&(h["".concat(l,"-hover")]=o.some(function(_){return B7(n,a,d,_)})),Me(l,ye({},"".concat(l,"-selected"),!s&&B7(n,a,r,d)),h)};return b.createElement(Lhe,lt({},t,{mode:"week",panelName:"week",rowClassName:c}))}function d9n(t){var e=t.prefixCls,n=t.locale,i=t.generateConfig,r=t.pickerValue,o=t.disabledDate,s=t.onPickerValueChange,a=t.onModeChange,l="".concat(e,"-year-panel"),c=p6(t,"year"),u=He(c,1),d=u[0],h=function(D){var k=Math.floor(i.getYear(r)/10)*10;return i.setYear(D,k)},f=function(D){var k=h(D);return i.addYear(k,9)},m=h(r),p=f(r),g=i.addYear(m,-1),y=function(D,k){return i.addYear(D,k)},_=function(D){return cd(D,{locale:n,format:n.cellYearFormat,generateConfig:i})},w=function(D){return ye({},"".concat(e,"-cell-in-view"),T2(i,D,m)||T2(i,D,p)||khe(i,m,p,D))},C=o?function(E,D){var k=i.setMonth(E,0),M=i.setDate(k,1),T=i.addYear(M,1),A=i.addDate(T,-1);return o(M,D)&&o(A,D)}:null,N=b.createElement("button",{type:"button",key:"decade","aria-label":"decade panel",onClick:function(){a("decade")},tabIndex:-1,className:"".concat(e,"-decade-btn")},cd(m,{locale:n,format:n.yearFormat,generateConfig:i}),"-",cd(p,{locale:n,format:n.yearFormat,generateConfig:i}));return b.createElement(HA.Provider,{value:d},b.createElement("div",{className:l},b.createElement(g6,{superOffset:function(D){return i.addYear(r,D*10)},onChange:s,getStart:h,getEnd:f},N),b.createElement(qK,lt({},t,{disabledDate:C,titleFormat:n.fieldYearFormat,colNum:3,rowNum:4,baseDate:g,getCellDate:y,getCellText:_,getCellClassName:w}))))}var h9n={date:Lhe,datetime:s9n,week:u9n,month:l9n,quarter:c9n,year:d9n,decade:a9n,time:LTt};function f9n(t,e){var n,i=t.locale,r=t.generateConfig,o=t.direction,s=t.prefixCls,a=t.tabIndex,l=a===void 0?0:a,c=t.multiple,u=t.defaultValue,d=t.value,h=t.onChange,f=t.onSelect,m=t.defaultPickerValue,p=t.pickerValue,g=t.onPickerValueChange,y=t.mode,_=t.onPanelChange,w=t.picker,C=w===void 0?"date":w,N=t.showTime,E=t.hoverValue,D=t.hoverRangeValue,k=t.cellRender,M=t.dateRender,T=t.monthCellRender,A=t.components,R=A===void 0?{}:A,P=t.hideHeader,O=((n=b.useContext(a_))===null||n===void 0?void 0:n.prefixCls)||s||"rc-picker",V=b.useRef();b.useImperativeHandle(e,function(){return{nativeElement:V.current}});var F=fTt(t),$=He(F,4),B=$[0],z=$[1],H=$[2],K=$[3],q=uTt(i,z),U=C==="date"&&N?"datetime":C,Y=b.useMemo(function(){return mTt(U,H,K,B,q)},[U,H,K,B,q]),J=r.getNow(),ae=ho(C,{value:y,postState:function(Ee){return Ee||"date"}}),se=He(ae,2),oe=se[0],fe=se[1],de=oe==="date"&&Y?"datetime":oe,ie=MTt(r,i,U),Q=ho(u,{value:d}),be=He(Q,2),le=be[0],Ne=be[1],Le=b.useMemo(function(){var Ge=zA(le).filter(function(Ee){return Ee});return c?Ge:Ge.slice(0,1)},[le,c]),Te=gr(function(Ge){Ne(Ge),h&&(Ge===null||Le.length!==Ge.length||Le.some(function(Ee,Se){return!_f(r,i,Ee,Ge[Se],U)}))&&(h==null||h(c?Ge:Ge[0]))}),De=gr(function(Ge){if(f==null||f(Ge),oe===C){var Ee=c?ie(Le,Ge):[Ge];Te(Ee)}}),Pe=ho(m||Le[0]||J,{value:p}),ge=He(Pe,2),he=ge[0],me=ge[1];b.useEffect(function(){Le[0]&&!p&&me(Le[0])},[Le[0]]);var X=function(Ee,Se){_==null||_(Ee||p,Se||oe)},re=function(Ee){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;me(Ee),g==null||g(Ee),Se&&X(Ee)},we=function(Ee,Se){fe(Ee),Se&&re(Se),X(Se,Ee)},ue=function(Ee){if(De(Ee),re(Ee),oe!==C){var Se=["decade","year"],je=[].concat(Se,["month"]),nt={quarter:[].concat(Se,["quarter"]),week:[].concat(Ot(je),["week"]),date:[].concat(Ot(je),["date"])},rt=nt[C]||je,St=rt.indexOf(oe),At=rt[St+1];At&&we(At,Ee)}},Ce=b.useMemo(function(){var Ge,Ee;if(Array.isArray(D)){var Se=He(D,2);Ge=Se[0],Ee=Se[1]}else Ge=D;return!Ge&&!Ee?null:(Ge=Ge||Ee,Ee=Ee||Ge,r.isAfter(Ge,Ee)?[Ee,Ge]:[Ge,Ee])},[D,r]),ze=M6e(k,M,T),Ye=R[de]||h9n[de]||Lhe,Ke=b.useContext(kC),Xe=b.useMemo(function(){return Ie(Ie({},Ke),{},{hideHeader:P})},[Ke,P]);ii(!Le||Le.every(function(Ge){return r.isValidate(Ge)}),"Invalidate date pass to `value` or `defaultValue`.");var it="".concat(O,"-panel"),ut=Dhe(t,["showWeek","prevIcon","nextIcon","superPrevIcon","superNextIcon","disabledDate","minDate","maxDate","onHover"]);return b.createElement(kC.Provider,{value:Xe},b.createElement("div",{ref:V,tabIndex:l,className:Me(it,ye({},"".concat(it,"-rtl"),o==="rtl"))},b.createElement(Ye,lt({},ut,{showTime:Y,prefixCls:O,locale:q,generateConfig:r,onModeChange:we,pickerValue:he,onPickerValueChange:function(Ee){re(Ee,!0)},value:Le[0],onSelect:ue,values:Le,cellRender:ze,hoverRangeValue:Ce,hoverValue:E}))))}var jee=b.memo(b.forwardRef(f9n));jee.displayName="PanelPicker";function m9n(t){var e=t.picker,n=t.multiplePanel,i=t.pickerValue,r=t.onPickerValueChange,o=t.needConfirm,s=t.onSubmit,a=t.range,l=t.hoverValue,c=b.useContext(a_),u=c.prefixCls,d=c.generateConfig,h=b.useCallback(function(_,w){return z7(d,e,_,w)},[d,e]),f=b.useMemo(function(){return h(i,1)},[i,h]),m=function(w){r(h(w,-1))},p={onCellDblClick:function(){o&&s()}},g=e==="time",y=Ie(Ie({},t),{},{hoverValue:null,hoverRangeValue:null,hideHeader:g});return a?y.hoverRangeValue=l:y.hoverValue=l,n?b.createElement("div",{className:"".concat(u,"-panels")},b.createElement(kC.Provider,{value:Ie(Ie({},p),{},{hideNext:!0})},b.createElement(jee,y)),b.createElement(kC.Provider,{value:Ie(Ie({},p),{},{hidePrev:!0})},b.createElement(jee,lt({},y,{pickerValue:f,onPickerValueChange:m})))):b.createElement(kC.Provider,{value:Ie({},p)},b.createElement(jee,y))}function Rnt(t){return typeof t=="function"?t():t}function p9n(t){var e=t.prefixCls,n=t.presets,i=t.onClick,r=t.onHover;return n.length?b.createElement("div",{className:"".concat(e,"-presets")},b.createElement("ul",null,n.map(function(o,s){var a=o.label,l=o.value;return b.createElement("li",{key:s,onClick:function(){i(Rnt(l))},onMouseEnter:function(){r(Rnt(l))},onMouseLeave:function(){r(null)}},a)}))):null}function TTt(t){var e=t.panelRender,n=t.internalMode,i=t.picker,r=t.showNow,o=t.range,s=t.multiple,a=t.activeOffset,l=a===void 0?0:a,c=t.placement,u=t.presets,d=t.onPresetHover,h=t.onPresetSubmit,f=t.onFocus,m=t.onBlur,p=t.onPanelMouseDown,g=t.direction,y=t.value,_=t.onSelect,w=t.isInvalid,C=t.defaultOpenValue,N=t.onOk,E=t.onSubmit,D=b.useContext(a_),k=D.prefixCls,M="".concat(k,"-panel"),T=g==="rtl",A=b.useRef(null),R=b.useRef(null),P=b.useState(0),O=He(P,2),V=O[0],F=O[1],$=b.useState(0),B=He($,2),z=B[0],H=B[1],K=function(Te){Te.offsetWidth&&F(Te.offsetWidth)};b.useEffect(function(){if(o){var Le,Te=((Le=A.current)===null||Le===void 0?void 0:Le.offsetWidth)||0,De=V-Te;l<=De?H(0):H(l+Te-V)}},[V,l,o]);function q(Le){return Le.filter(function(Te){return Te})}var U=b.useMemo(function(){return q(zA(y))},[y]),Y=i==="time"&&!U.length,J=b.useMemo(function(){return Y?q([C]):U},[Y,U,C]),ae=Y?C:U,se=b.useMemo(function(){return J.length?J.some(function(Le){return w(Le)}):!0},[J,w]),oe=function(){Y&&_(C),N(),E()},fe=b.createElement("div",{className:"".concat(k,"-panel-layout")},b.createElement(p9n,{prefixCls:k,presets:u,onClick:h,onHover:d}),b.createElement("div",null,b.createElement(m9n,lt({},t,{value:ae})),b.createElement(t9n,lt({},t,{showNow:s?!1:r,invalid:se,onSubmit:oe}))));e&&(fe=e(fe));var de="".concat(M,"-container"),ie="marginLeft",Q="marginRight",be=b.createElement("div",{onMouseDown:p,tabIndex:-1,className:Me(de,"".concat(k,"-").concat(n,"-panel-container")),style:ye(ye({},T?Q:ie,z),T?ie:Q,"auto"),onFocus:f,onBlur:m},fe);if(o){var le=Ehe(c,T),Ne=iTt(le,T);be=b.createElement("div",{onMouseDown:p,ref:R,className:Me("".concat(k,"-range-wrapper"),"".concat(k,"-").concat(i,"-range-wrapper"))},b.createElement("div",{ref:A,className:"".concat(k,"-range-arrow"),style:ye({},Ne,l)}),b.createElement(Kd,{onResize:K},be))}return be}function ITt(t,e){var n=t.format,i=t.maskFormat,r=t.generateConfig,o=t.locale,s=t.preserveInvalidOnBlur,a=t.inputReadOnly,l=t.required,c=t["aria-required"],u=t.onSubmit,d=t.onFocus,h=t.onBlur,f=t.onInputChange,m=t.onInvalid,p=t.open,g=t.onOpenChange,y=t.onKeyDown,_=t.onChange,w=t.activeHelp,C=t.name,N=t.autoComplete,E=t.id,D=t.value,k=t.invalid,M=t.placeholder,T=t.disabled,A=t.activeIndex,R=t.allHelp,P=t.picker,O=function(q,U){var Y=r.locale.parse(o.locale,q,[U]);return Y&&r.isValidate(Y)?Y:null},V=n[0],F=b.useCallback(function(K){return cd(K,{locale:o,format:V,generateConfig:r})},[o,r,V]),$=b.useMemo(function(){return D.map(F)},[D,F]),B=b.useMemo(function(){var K=P==="time"?8:10,q=typeof V=="function"?V(r.getNow()).length:V.length;return Math.max(K,q)+2},[V,P,r]),z=function(q){for(var U=0;U<n.length;U+=1){var Y=n[U];if(typeof Y=="string"){var J=O(q,Y);if(J)return J}}return!1},H=function(q){function U(ae){return q!==void 0?ae[q]:ae}var Y=Ll(t,{aria:!0,data:!0}),J=Ie(Ie({},Y),{},{format:i,validateFormat:function(se){return!!z(se)},preserveInvalidOnBlur:s,readOnly:a,required:l,"aria-required":c,name:C,autoComplete:N,size:B,id:U(E),value:U($)||"",invalid:U(k),placeholder:U(M),active:A===q,helped:R||w&&A===q,disabled:U(T),onFocus:function(se){d(se,q)},onBlur:function(se){h(se,q)},onSubmit:u,onChange:function(se){f();var oe=z(se);if(oe){m(!1,q),_(oe,q);return}m(!!se,q)},onHelp:function(){g(!0,{index:q})},onKeyDown:function(se){var oe=!1;if(y==null||y(se,function(){ii(!1,"`preventDefault` callback is deprecated. Please call `event.preventDefault` directly."),oe=!0}),!se.defaultPrevented&&!oe)switch(se.key){case"Escape":g(!1,{index:q});break;case"Enter":p||g(!0);break}}},e==null?void 0:e({valueTexts:$}));return Object.keys(J).forEach(function(ae){J[ae]===void 0&&delete J[ae]}),J};return[H,F]}var g9n=["onMouseEnter","onMouseLeave"];function ATt(t){return b.useMemo(function(){return Dhe(t,g9n)},[t])}var b9n=["icon","type"],v9n=["onClear"];function The(t){var e=t.icon,n=t.type,i=di(t,b9n),r=b.useContext(a_),o=r.prefixCls;return e?b.createElement("span",lt({className:"".concat(o,"-").concat(n)},i),e):null}function ske(t){var e=t.onClear,n=di(t,v9n);return b.createElement(The,lt({},n,{type:"clear",role:"button",onMouseDown:function(r){r.preventDefault()},onClick:function(r){r.stopPropagation(),e()}}))}var Dxe=["YYYY","MM","DD","HH","mm","ss","SSS"],Pnt="顧",y9n=function(){function t(e){Za(this,t),ye(this,"format",void 0),ye(this,"maskFormat",void 0),ye(this,"cells",void 0),ye(this,"maskCells",void 0),this.format=e;var n=Dxe.map(function(a){return"(".concat(a,")")}).join("|"),i=new RegExp(n,"g");this.maskFormat=e.replace(i,function(a){return Pnt.repeat(a.length)});var r=new RegExp("(".concat(Dxe.join("|"),")")),o=(e.split(r)||[]).filter(function(a){return a}),s=0;this.cells=o.map(function(a){var l=Dxe.includes(a),c=s,u=s+a.length;return s=u,{text:a,mask:l,start:c,end:u}}),this.maskCells=this.cells.filter(function(a){return a.mask})}return Qa(t,[{key:"getSelection",value:function(n){var i=this.maskCells[n]||{},r=i.start,o=i.end;return[r||0,o||0]}},{key:"match",value:function(n){for(var i=0;i<this.maskFormat.length;i+=1){var r=this.maskFormat[i],o=n[i];if(!o||r!==Pnt&&r!==o)return!1}return!0}},{key:"size",value:function(){return this.maskCells.length}},{key:"getMaskCellIndex",value:function(n){for(var i=Number.MAX_SAFE_INTEGER,r=0,o=0;o<this.maskCells.length;o+=1){var s=this.maskCells[o],a=s.start,l=s.end;if(n>=a&&n<=l)return o;var c=Math.min(Math.abs(n-a),Math.abs(n-l));c<i&&(i=c,r=o)}return r}}]),t}();function _9n(t){var e={YYYY:[0,9999,new Date().getFullYear()],MM:[1,12],DD:[1,31],HH:[0,23],mm:[0,59],ss:[0,59],SSS:[0,999]};return e[t]}var x9n=["active","showActiveCls","suffixIcon","format","validateFormat","onChange","onInput","helped","onHelp","onSubmit","onKeyDown","preserveInvalidOnBlur","invalid","clearIcon"],Jne=b.forwardRef(function(t,e){var n=t.active,i=t.showActiveCls,r=i===void 0?!0:i,o=t.suffixIcon,s=t.format,a=t.validateFormat,l=t.onChange;t.onInput;var c=t.helped,u=t.onHelp,d=t.onSubmit,h=t.onKeyDown,f=t.preserveInvalidOnBlur,m=f===void 0?!1:f,p=t.invalid,g=t.clearIcon,y=di(t,x9n),_=t.value,w=t.onFocus,C=t.onBlur,N=t.onMouseUp,E=b.useContext(a_),D=E.prefixCls,k=E.input,M=k===void 0?"input":k,T="".concat(D,"-input"),A=b.useState(!1),R=He(A,2),P=R[0],O=R[1],V=b.useState(_),F=He(V,2),$=F[0],B=F[1],z=b.useState(""),H=He(z,2),K=H[0],q=H[1],U=b.useState(null),Y=He(U,2),J=Y[0],ae=Y[1],se=b.useState(null),oe=He(se,2),fe=oe[0],de=oe[1],ie=$||"";b.useEffect(function(){B(_)},[_]);var Q=b.useRef(),be=b.useRef();b.useImperativeHandle(e,function(){return{nativeElement:Q.current,inputElement:be.current,focus:function(Ge){be.current.focus(Ge)},blur:function(){be.current.blur()}}});var le=b.useMemo(function(){return new y9n(s||"")},[s]),Ne=b.useMemo(function(){return c?[0,0]:le.getSelection(J)},[le,J,c]),Le=He(Ne,2),Te=Le[0],De=Le[1],Pe=function(Ge){Ge&&Ge!==s&&Ge!==_&&u()},ge=gr(function(ut){a(ut)&&l(ut),B(ut),Pe(ut)}),he=function(Ge){if(!s){var Ee=Ge.target.value;Pe(Ee),B(Ee),l(Ee)}},me=function(Ge){var Ee=Ge.clipboardData.getData("text");a(Ee)&&ge(Ee)},X=b.useRef(!1),re=function(){X.current=!0},we=function(Ge){var Ee=Ge.target,Se=Ee.selectionStart,je=le.getMaskCellIndex(Se);ae(je),de({}),N==null||N(Ge),X.current=!1},ue=function(Ge){O(!0),ae(0),q(""),w(Ge)},Ce=function(Ge){C(Ge)},ze=function(Ge){O(!1),Ce(Ge)};I6e(n,function(){!n&&!m&&B(_)});var Ye=function(Ge){Ge.key==="Enter"&&a(ie)&&d(),h==null||h(Ge)},Ke=function(Ge){Ye(Ge);var Ee=Ge.key,Se=null,je=null,nt=De-Te,rt=s.slice(Te,De),St=function($t){ae(function(ln){var Jt=ln+$t;return Jt=Math.max(Jt,0),Jt=Math.min(Jt,le.size()-1),Jt})},At=function($t){var ln=_9n(rt),Jt=He(ln,3),en=Jt[0],Ft=Jt[1],dn=Jt[2],Ze=ie.slice(Te,De),dt=Number(Ze);if(isNaN(dt))return String(dn||($t>0?en:Ft));var at=dt+$t,mt=Ft-en+1;return String(en+(mt+at-en)%mt)};switch(Ee){case"Backspace":case"Delete":Se="",je=rt;break;case"ArrowLeft":Se="",St(-1);break;case"ArrowRight":Se="",St(1);break;case"ArrowUp":Se="",je=At(1);break;case"ArrowDown":Se="",je=At(-1);break;default:isNaN(Number(Ee))||(Se=K+Ee,je=Se);break}if(Se!==null&&(q(Se),Se.length>=nt&&(St(1),q(""))),je!==null){var Nt=ie.slice(0,Te)+k6e(je,nt)+ie.slice(De);ge(Nt.slice(0,s.length))}de({})},Xe=b.useRef();Lr(function(){if(!(!P||!s||X.current)){if(!le.match(ie)){ge(s);return}return be.current.setSelectionRange(Te,De),Xe.current=Dr(function(){be.current.setSelectionRange(Te,De)}),function(){Dr.cancel(Xe.current)}}},[le,s,P,ie,J,Te,De,fe,ge]);var it=s?{onFocus:ue,onBlur:ze,onKeyDown:Ke,onMouseDown:re,onMouseUp:we,onPaste:me}:{};return b.createElement("div",{ref:Q,className:Me(T,ye(ye({},"".concat(T,"-active"),n&&r),"".concat(T,"-placeholder"),c))},b.createElement(M,lt({ref:be,"aria-invalid":p,autoComplete:"off"},y,{onKeyDown:Ye,onBlur:Ce},it,{value:ie,onChange:he})),b.createElement(The,{type:"suffix",icon:o}),g)});Jne.displayName="Input";var w9n=["id","clearIcon","suffixIcon","separator","activeIndex","activeHelp","allHelp","focused","onFocus","onBlur","onKeyDown","locale","generateConfig","placeholder","className","style","onClick","onClear","value","onChange","onSubmit","onInputChange","format","maskFormat","preserveInvalidOnBlur","onInvalid","disabled","invalid","inputReadOnly","direction","onOpenChange","onActiveOffset","placement","onMouseDown","required","aria-required","autoFocus"],C9n=["index"];function S9n(t,e){var n=t.id,i=t.clearIcon,r=t.suffixIcon,o=t.separator,s=o===void 0?"~":o,a=t.activeIndex;t.activeHelp,t.allHelp;var l=t.focused;t.onFocus,t.onBlur,t.onKeyDown,t.locale,t.generateConfig;var c=t.placeholder,u=t.className,d=t.style,h=t.onClick,f=t.onClear,m=t.value;t.onChange,t.onSubmit,t.onInputChange,t.format,t.maskFormat,t.preserveInvalidOnBlur,t.onInvalid;var p=t.disabled,g=t.invalid;t.inputReadOnly;var y=t.direction;t.onOpenChange;var _=t.onActiveOffset,w=t.placement,C=t.onMouseDown;t.required,t["aria-required"];var N=t.autoFocus,E=di(t,w9n),D=y==="rtl",k=b.useContext(a_),M=k.prefixCls,T=b.useMemo(function(){if(typeof n=="string")return[n];var ie=n||{};return[ie.start,ie.end]},[n]),A=b.useRef(),R=b.useRef(),P=b.useRef(),O=function(Q){var be;return(be=[R,P][Q])===null||be===void 0?void 0:be.current};b.useImperativeHandle(e,function(){return{nativeElement:A.current,focus:function(Q){if(Un(Q)==="object"){var be,le=Q||{},Ne=le.index,Le=Ne===void 0?0:Ne,Te=di(le,C9n);(be=O(Le))===null||be===void 0||be.focus(Te)}else{var De;(De=O(Q??0))===null||De===void 0||De.focus()}},blur:function(){var Q,be;(Q=O(0))===null||Q===void 0||Q.blur(),(be=O(1))===null||be===void 0||be.blur()}}});var V=ATt(E),F=b.useMemo(function(){return Array.isArray(c)?c:[c,c]},[c]),$=ITt(Ie(Ie({},t),{},{id:T,placeholder:F})),B=He($,1),z=B[0],H=Ehe(w,D),K=iTt(H,D),q=H==null?void 0:H.toLowerCase().endsWith("right"),U=b.useState({position:"absolute",width:0}),Y=He(U,2),J=Y[0],ae=Y[1],se=gr(function(){var ie=O(a);if(ie){var Q=ie.nativeElement,be=Q.offsetWidth,le=Q.offsetLeft,Ne=Q.offsetParent,Le=(Ne==null?void 0:Ne.offsetWidth)||0,Te=q?Le-be-le:le;ae(function(De){return Ie(Ie({},De),{},ye({width:be},K,Te))}),_(Te)}});b.useEffect(function(){se()},[a]);var oe=i&&(m[0]&&!p[0]||m[1]&&!p[1]),fe=N&&!p[0],de=N&&!fe&&!p[1];return b.createElement(Kd,{onResize:se},b.createElement("div",lt({},V,{className:Me(M,"".concat(M,"-range"),ye(ye(ye(ye({},"".concat(M,"-focused"),l),"".concat(M,"-disabled"),p.every(function(ie){return ie})),"".concat(M,"-invalid"),g.some(function(ie){return ie})),"".concat(M,"-rtl"),D),u),style:d,ref:A,onClick:h,onMouseDown:function(Q){var be=Q.target;be!==R.current.inputElement&&be!==P.current.inputElement&&Q.preventDefault(),C==null||C(Q)}}),b.createElement(Jne,lt({ref:R},z(0),{autoFocus:fe,"date-range":"start"})),b.createElement("div",{className:"".concat(M,"-range-separator")},s),b.createElement(Jne,lt({ref:P},z(1),{autoFocus:de,"date-range":"end"})),b.createElement("div",{className:"".concat(M,"-active-bar"),style:J}),b.createElement(The,{type:"suffix",icon:r}),oe&&b.createElement(ske,{icon:i,onClear:f})))}var RTt=b.forwardRef(S9n);RTt.displayName="RangeSelector";function Ont(t,e){var n=t??e;return Array.isArray(n)?n:[n,n]}function BZ(t){return t===1?"end":"start"}function N9n(t,e){var n=bTt(t,function(){var Hn=t.disabled,cn=t.allowEmpty,Ui=Ont(Hn,!1),Pr=Ont(cn,!1);return{disabled:Ui,allowEmpty:Pr}}),i=He(n,6),r=i[0],o=i[1],s=i[2],a=i[3],l=i[4],c=i[5],u=r.prefixCls,d=r.styles,h=r.classNames,f=r.placement,m=r.defaultValue,p=r.value,g=r.needConfirm,y=r.onKeyDown,_=r.disabled,w=r.allowEmpty,C=r.disabledDate,N=r.minDate,E=r.maxDate,D=r.defaultOpen,k=r.open,M=r.onOpenChange,T=r.locale,A=r.generateConfig,R=r.picker,P=r.showNow,O=r.showToday,V=r.showTime,F=r.mode,$=r.onPanelChange,B=r.onCalendarChange,z=r.onOk,H=r.defaultPickerValue,K=r.pickerValue,q=r.onPickerValueChange,U=r.inputReadOnly,Y=r.suffixIcon,J=r.onFocus,ae=r.onBlur,se=r.presets,oe=r.ranges,fe=r.components,de=r.cellRender,ie=r.dateRender,Q=r.monthCellRender,be=r.onClick,le=yTt(e),Ne=vTt(k,D,_,M),Le=He(Ne,2),Te=Le[0],De=Le[1],Pe=function(cn,Ui){(_.some(function(Pr){return!Pr})||!cn)&&De(cn,Ui)},ge=ETt(A,T,a,!0,!1,m,p,B,z),he=He(ge,5),me=he[0],X=he[1],re=he[2],we=he[3],ue=he[4],Ce=re(),ze=xTt(_,w,Te),Ye=He(ze,7),Ke=Ye[0],Xe=Ye[1],it=Ye[2],ut=Ye[3],Ge=Ye[4],Ee=Ye[5],Se=Ye[6],je=function(cn,Ui){Xe(!0),J==null||J(cn,{range:BZ(Ui??ut)})},nt=function(cn,Ui){Xe(!1),ae==null||ae(cn,{range:BZ(Ui??ut)})},rt=b.useMemo(function(){if(!V)return null;var Hn=V.disabledTime,cn=Hn?function(Ui){var Pr=BZ(ut),bi=sTt(Ce,Se,ut);return Hn(Ui,Pr,{from:bi})}:void 0;return Ie(Ie({},V),{},{disabledTime:cn})},[V,ut,Ce,Se]),St=ho([R,R],{value:F}),At=He(St,2),Nt=At[0],vt=At[1],$t=Nt[ut]||R,ln=$t==="date"&&rt?"datetime":$t,Jt=ln===R&&ln!=="time",en=kTt(R,$t,P,O,!0),Ft=DTt(r,me,X,re,we,_,a,Ke,Te,c),dn=He(Ft,2),Ze=dn[0],dt=dn[1],at=Z7n(Ce,_,Se,A,T,C),mt=lTt(Ce,c,w),It=He(mt,2),Ve=It[0],bt=It[1],wt=wTt(A,T,Ce,Nt,Te,ut,o,Jt,H,K,rt==null?void 0:rt.defaultOpenValue,q,N,E),$e=He(wt,2),We=$e[0],tt=$e[1],_t=gr(function(Hn,cn,Ui){var Pr=A9(Nt,ut,cn);if((Pr[0]!==Nt[0]||Pr[1]!==Nt[1])&&vt(Pr),$&&Ui!==!1){var bi=Ot(Ce);Hn&&(bi[ut]=Hn),$(bi,Pr)}}),ht=function(cn,Ui){return A9(Ce,Ui,cn)},qe=function(cn,Ui){var Pr=Ce;cn&&(Pr=ht(cn,ut));var bi=Ee(Pr);we(Pr),Ze(ut,bi===null),bi===null?Pe(!1,{force:!0}):Ui||le.current.focus({index:bi})},ft=function(cn){var Ui,Pr=cn.target.getRootNode();if(!le.current.nativeElement.contains((Ui=Pr.activeElement)!==null&&Ui!==void 0?Ui:document.activeElement)){var bi=_.findIndex(function(zu){return!zu});bi>=0&&le.current.focus({index:bi})}Pe(!0),be==null||be(cn)},Ct=function(){dt(null),Pe(!1,{force:!0})},Pt=b.useState(null),an=He(Pt,2),_n=an[0],on=an[1],yn=b.useState(null),fi=He(yn,2),oi=fi[0],Qi=fi[1],mi=b.useMemo(function(){return oi||Ce},[Ce,oi]);b.useEffect(function(){Te||Qi(null)},[Te]);var Vr=b.useState(0),_i=He(Vr,2),ur=_i[0],si=_i[1],Ii=_Tt(se,oe),Si=function(cn){Qi(cn),on("preset")},To=function(cn){var Ui=dt(cn);Ui&&Pe(!1,{force:!0})},ts=function(cn){qe(cn)},La=function(cn){Qi(cn?ht(cn,ut):null),on("cell")},pc=function(cn){Pe(!0),je(cn)},gc=function(){it("panel")},ca=function(cn){var Ui=A9(Ce,ut,cn);we(Ui),!g&&!s&&o===ln&&qe(cn)},Nr=function(){Pe(!1)},$i=M6e(de,ie,Q,BZ(ut)),us=Ce[ut]||null,fr=gr(function(Hn){return c(Hn,{activeIndex:ut})}),Gi=b.useMemo(function(){var Hn=Ll(r,!1),cn=Zs(r,[].concat(Ot(Object.keys(Hn)),["onChange","onCalendarChange","style","className","onPanelChange","disabledTime"]));return cn},[r]),zn=b.createElement(TTt,lt({},Gi,{showNow:en,showTime:rt,range:!0,multiplePanel:Jt,activeOffset:ur,placement:f,disabledDate:at,onFocus:pc,onBlur:nt,onPanelMouseDown:gc,picker:R,mode:$t,internalMode:ln,onPanelChange:_t,format:l,value:us,isInvalid:fr,onChange:null,onSelect:ca,pickerValue:We,defaultOpenValue:zA(V==null?void 0:V.defaultOpenValue)[ut],onPickerValueChange:tt,hoverValue:mi,onHover:La,needConfirm:g,onSubmit:qe,onOk:ue,presets:Ii,onPresetHover:Si,onPresetSubmit:To,onNow:ts,cellRender:$i})),pi=function(cn,Ui){var Pr=ht(cn,Ui);we(Pr)},Tr=function(){it("input")},vs=function(cn,Ui){it("input"),Pe(!0,{inherit:!0}),ut!==Ui&&Te&&!g&&s&&qe(null,!0),Ge(Ui),je(cn,Ui)},ua=function(cn,Ui){if(Pe(!1),!g&&it()==="input"){var Pr=Ee(Ce);Ze(ut,Pr===null)}nt(cn,Ui)},Al=function(cn,Ui){cn.key==="Tab"&&qe(null,!0),y==null||y(cn,Ui)},bc=b.useMemo(function(){return{prefixCls:u,locale:T,generateConfig:A,button:fe.button,input:fe.input}},[u,T,A,fe.button,fe.input]);Lr(function(){Te&&ut!==void 0&&_t(null,R,!1)},[Te,ut,R]),Lr(function(){var Hn=it();!Te&&Hn==="input"&&(Pe(!1),qe(null,!0)),!Te&&s&&!g&&Hn==="panel"&&(Pe(!0),qe())},[Te]);{var vc=function(cn){return!(p!=null&&p[cn])&&!(m!=null&&m[cn])};_.some(function(Hn,cn){return Hn&&vc(cn)&&!w[cn]})&&ii(!1,"`disabled` should not set with empty `value`. You should set `allowEmpty` or `value` instead.")}return b.createElement(a_.Provider,{value:bc},b.createElement(rTt,lt({},aTt(r),{popupElement:zn,popupStyle:d.popup,popupClassName:h.popup,visible:Te,onClose:Nr,range:!0}),b.createElement(RTt,lt({},r,{ref:le,suffixIcon:Y,activeIndex:Ke||Te?ut:null,activeHelp:!!oi,allHelp:!!oi&&_n==="preset",focused:Ke,onFocus:vs,onBlur:ua,onKeyDown:Al,onSubmit:qe,value:mi,maskFormat:l,onChange:pi,onInputChange:Tr,format:a,inputReadOnly:U,disabled:_,open:Te,onOpenChange:Pe,onClick:ft,onClear:Ct,invalid:Ve,onInvalid:bt,onActiveOffset:si}))))}var PTt=b.forwardRef(N9n);PTt.displayName="RefRangePicker";function E9n(t){var e=t.prefixCls,n=t.value,i=t.onRemove,r=t.removeIcon,o=r===void 0?"×":r,s=t.formatDate,a=t.disabled,l=t.maxTagCount,c=t.placeholder,u="".concat(e,"-selector"),d="".concat(e,"-selection"),h="".concat(d,"-overflow");function f(g,y){return b.createElement("span",{className:Me("".concat(d,"-item")),title:typeof g=="string"?g:null},b.createElement("span",{className:"".concat(d,"-item-content")},g),!a&&y&&b.createElement("span",{onMouseDown:function(w){w.preventDefault()},onClick:y,className:"".concat(d,"-item-remove")},o))}function m(g){var y=s(g),_=function(C){C&&C.stopPropagation(),i(g)};return f(y,_)}function p(g){var y="+ ".concat(g.length," ...");return f(y)}return b.createElement("div",{className:u},b.createElement(b0,{prefixCls:h,data:n,renderItem:m,renderRest:p,itemKey:function(y){return s(y)},maxCount:l}),!n.length&&b.createElement("span",{className:"".concat(e,"-selection-placeholder")},c))}var D9n=["id","open","clearIcon","suffixIcon","activeHelp","allHelp","focused","onFocus","onBlur","onKeyDown","locale","generateConfig","placeholder","className","style","onClick","onClear","internalPicker","value","onChange","onSubmit","onInputChange","multiple","maxTagCount","format","maskFormat","preserveInvalidOnBlur","onInvalid","disabled","invalid","inputReadOnly","direction","onOpenChange","onMouseDown","required","aria-required","autoFocus","removeIcon"];function k9n(t,e){t.id;var n=t.open,i=t.clearIcon,r=t.suffixIcon;t.activeHelp,t.allHelp;var o=t.focused;t.onFocus,t.onBlur,t.onKeyDown;var s=t.locale,a=t.generateConfig,l=t.placeholder,c=t.className,u=t.style,d=t.onClick,h=t.onClear,f=t.internalPicker,m=t.value,p=t.onChange,g=t.onSubmit;t.onInputChange;var y=t.multiple,_=t.maxTagCount;t.format,t.maskFormat,t.preserveInvalidOnBlur,t.onInvalid;var w=t.disabled,C=t.invalid;t.inputReadOnly;var N=t.direction;t.onOpenChange;var E=t.onMouseDown;t.required,t["aria-required"];var D=t.autoFocus,k=t.removeIcon,M=di(t,D9n),T=N==="rtl",A=b.useContext(a_),R=A.prefixCls,P=b.useRef(),O=b.useRef();b.useImperativeHandle(e,function(){return{nativeElement:P.current,focus:function(J){var ae;(ae=O.current)===null||ae===void 0||ae.focus(J)},blur:function(){var J;(J=O.current)===null||J===void 0||J.blur()}}});var V=ATt(M),F=function(J){p([J])},$=function(J){var ae=m.filter(function(se){return se&&!_f(a,s,se,J,f)});p(ae),n||g()},B=ITt(Ie(Ie({},t),{},{onChange:F}),function(Y){var J=Y.valueTexts;return{value:J[0]||"",active:o}}),z=He(B,2),H=z[0],K=z[1],q=!!(i&&m.length&&!w),U=y?b.createElement(b.Fragment,null,b.createElement(E9n,{prefixCls:R,value:m,onRemove:$,formatDate:K,maxTagCount:_,disabled:w,removeIcon:k,placeholder:l}),b.createElement("input",{className:"".concat(R,"-multiple-input"),value:m.map(K).join(","),ref:O,readOnly:!0,autoFocus:D}),b.createElement(The,{type:"suffix",icon:r}),q&&b.createElement(ske,{icon:i,onClear:h})):b.createElement(Jne,lt({ref:O},H(),{autoFocus:D,suffixIcon:r,clearIcon:q&&b.createElement(ske,{icon:i,onClear:h}),showActiveCls:!1}));return b.createElement("div",lt({},V,{className:Me(R,ye(ye(ye(ye(ye({},"".concat(R,"-multiple"),y),"".concat(R,"-focused"),o),"".concat(R,"-disabled"),w),"".concat(R,"-invalid"),C),"".concat(R,"-rtl"),T),c),style:u,ref:P,onClick:d,onMouseDown:function(J){var ae,se=J.target;se!==((ae=O.current)===null||ae===void 0?void 0:ae.inputElement)&&J.preventDefault(),E==null||E(J)}}),U)}var OTt=b.forwardRef(k9n);OTt.displayName="SingleSelector";function M9n(t,e){var n=bTt(t),i=He(n,6),r=i[0],o=i[1],s=i[2],a=i[3],l=i[4],c=i[5],u=r,d=u.prefixCls,h=u.styles,f=u.classNames,m=u.order,p=u.defaultValue,g=u.value,y=u.needConfirm,_=u.onChange,w=u.onKeyDown,C=u.disabled,N=u.disabledDate,E=u.minDate,D=u.maxDate,k=u.defaultOpen,M=u.open,T=u.onOpenChange,A=u.locale,R=u.generateConfig,P=u.picker,O=u.showNow,V=u.showToday,F=u.showTime,$=u.mode,B=u.onPanelChange,z=u.onCalendarChange,H=u.onOk,K=u.multiple,q=u.defaultPickerValue,U=u.pickerValue,Y=u.onPickerValueChange,J=u.inputReadOnly,ae=u.suffixIcon,se=u.removeIcon,oe=u.onFocus,fe=u.onBlur,de=u.presets,ie=u.components,Q=u.cellRender,be=u.dateRender,le=u.monthCellRender,Ne=u.onClick,Le=yTt(e);function Te(zn){return zn===null?null:K?zn:zn[0]}var De=MTt(R,A,o),Pe=vTt(M,k,[C],T),ge=He(Pe,2),he=ge[0],me=ge[1],X=function(pi,Tr,vs){if(z){var ua=Ie({},vs);delete ua.range,z(Te(pi),Te(Tr),ua)}},re=function(pi){H==null||H(Te(pi))},we=ETt(R,A,a,!1,m,p,g,X,re),ue=He(we,5),Ce=ue[0],ze=ue[1],Ye=ue[2],Ke=ue[3],Xe=ue[4],it=Ye(),ut=xTt([C]),Ge=He(ut,4),Ee=Ge[0],Se=Ge[1],je=Ge[2],nt=Ge[3],rt=function(pi){Se(!0),oe==null||oe(pi,{})},St=function(pi){Se(!1),fe==null||fe(pi,{})},At=ho(P,{value:$}),Nt=He(At,2),vt=Nt[0],$t=Nt[1],ln=vt==="date"&&F?"datetime":vt,Jt=kTt(P,vt,O,V),en=_&&function(zn,pi){_(Te(zn),Te(pi))},Ft=DTt(Ie(Ie({},r),{},{onChange:en}),Ce,ze,Ye,Ke,[],a,Ee,he,c),dn=He(Ft,2),Ze=dn[1],dt=lTt(it,c),at=He(dt,2),mt=at[0],It=at[1],Ve=b.useMemo(function(){return mt.some(function(zn){return zn})},[mt]),bt=function(pi,Tr){if(Y){var vs=Ie(Ie({},Tr),{},{mode:Tr.mode[0]});delete vs.range,Y(pi[0],vs)}},wt=wTt(R,A,it,[vt],he,nt,o,!1,q,U,zA(F==null?void 0:F.defaultOpenValue),bt,E,D),$e=He(wt,2),We=$e[0],tt=$e[1],_t=gr(function(zn,pi,Tr){if($t(pi),B&&Tr!==!1){var vs=zn||it[it.length-1];B(vs,pi)}}),ht=function(){Ze(Ye()),me(!1,{force:!0})},qe=function(pi){!C&&!Le.current.nativeElement.contains(document.activeElement)&&Le.current.focus(),me(!0),Ne==null||Ne(pi)},ft=function(){Ze(null),me(!1,{force:!0})},Ct=b.useState(null),Pt=He(Ct,2),an=Pt[0],_n=Pt[1],on=b.useState(null),yn=He(on,2),fi=yn[0],oi=yn[1],Qi=b.useMemo(function(){var zn=[fi].concat(Ot(it)).filter(function(pi){return pi});return K?zn:zn.slice(0,1)},[it,fi,K]),mi=b.useMemo(function(){return!K&&fi?[fi]:it.filter(function(zn){return zn})},[it,fi,K]);b.useEffect(function(){he||oi(null)},[he]);var Vr=_Tt(de),_i=function(pi){oi(pi),_n("preset")},ur=function(pi){var Tr=K?De(Ye(),pi):[pi],vs=Ze(Tr);vs&&!K&&me(!1,{force:!0})},si=function(pi){ur(pi)},Ii=function(pi){oi(pi),_n("cell")},Si=function(pi){me(!0),rt(pi)},To=function(pi){je("panel");var Tr=K?De(Ye(),pi):[pi];Ke(Tr),!y&&!s&&o===ln&&ht()},ts=function(){me(!1)},La=M6e(Q,be,le),pc=b.useMemo(function(){var zn=Ll(r,!1),pi=Zs(r,[].concat(Ot(Object.keys(zn)),["onChange","onCalendarChange","style","className","onPanelChange"]));return Ie(Ie({},pi),{},{multiple:r.multiple})},[r]),gc=b.createElement(TTt,lt({},pc,{showNow:Jt,showTime:F,disabledDate:N,onFocus:Si,onBlur:St,picker:P,mode:vt,internalMode:ln,onPanelChange:_t,format:l,value:it,isInvalid:c,onChange:null,onSelect:To,pickerValue:We,defaultOpenValue:F==null?void 0:F.defaultOpenValue,onPickerValueChange:tt,hoverValue:Qi,onHover:Ii,needConfirm:y,onSubmit:ht,onOk:Xe,presets:Vr,onPresetHover:_i,onPresetSubmit:ur,onNow:si,cellRender:La})),ca=function(pi){Ke(pi)},Nr=function(){je("input")},$i=function(pi){je("input"),me(!0,{inherit:!0}),rt(pi)},us=function(pi){me(!1),St(pi)},fr=function(pi,Tr){pi.key==="Tab"&&ht(),w==null||w(pi,Tr)},Gi=b.useMemo(function(){return{prefixCls:d,locale:A,generateConfig:R,button:ie.button,input:ie.input}},[d,A,R,ie.button,ie.input]);return Lr(function(){he&&nt!==void 0&&_t(null,P,!1)},[he,nt,P]),Lr(function(){var zn=je();!he&&zn==="input"&&(me(!1),ht()),!he&&s&&!y&&zn==="panel"&&(me(!0),ht())},[he]),b.createElement(a_.Provider,{value:Gi},b.createElement(rTt,lt({},aTt(r),{popupElement:gc,popupStyle:h.popup,popupClassName:f.popup,visible:he,onClose:ts}),b.createElement(OTt,lt({},r,{ref:Le,suffixIcon:ae,removeIcon:se,activeHelp:!!fi,allHelp:!!fi&&an==="preset",focused:Ee,onFocus:$i,onBlur:us,onKeyDown:fr,onSubmit:ht,value:mi,maskFormat:l,onChange:ca,onInputChange:Nr,internalPicker:o,format:a,inputReadOnly:J,disabled:C,open:he,onOpenChange:me,onClick:qe,onClear:ft,invalid:Ve,onInvalid:function(pi){It(pi,0)}}))))}var jTt=b.forwardRef(M9n);jTt.displayName="RefPicker";const FTt=b.createContext(null),L9n=FTt.Provider,$Tt=b.createContext(null),T9n=$Tt.Provider;var I9n=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],VTt=b.forwardRef(function(t,e){var n=t.prefixCls,i=n===void 0?"rc-checkbox":n,r=t.className,o=t.style,s=t.checked,a=t.disabled,l=t.defaultChecked,c=l===void 0?!1:l,u=t.type,d=u===void 0?"checkbox":u,h=t.title,f=t.onChange,m=di(t,I9n),p=b.useRef(null),g=b.useRef(null),y=ho(c,{value:s}),_=He(y,2),w=_[0],C=_[1];b.useImperativeHandle(e,function(){return{focus:function(k){var M;(M=p.current)===null||M===void 0||M.focus(k)},blur:function(){var k;(k=p.current)===null||k===void 0||k.blur()},input:p.current,nativeElement:g.current}});var N=Me(i,r,ye(ye({},"".concat(i,"-checked"),w),"".concat(i,"-disabled"),a)),E=function(k){a||("checked"in t||C(k.target.checked),f==null||f({target:Ie(Ie({},t),{},{type:d,checked:k.target.checked}),stopPropagation:function(){k.stopPropagation()},preventDefault:function(){k.preventDefault()},nativeEvent:k.nativeEvent}))};return b.createElement("span",{className:N,title:h,style:o,ref:g},b.createElement("input",lt({},m,{className:"".concat(i,"-input"),ref:p,onChange:E,disabled:a,checked:!!w,type:d})),b.createElement("span",{className:"".concat(i,"-inner")}))});const A9n=t=>{const{componentCls:e,antCls:n}=t,i=`${e}-group`;return{[i]:Object.assign(Object.assign({},fo(t)),{display:"inline-block",fontSize:0,[`&${i}-rtl`]:{direction:"rtl"},[`&${i}-block`]:{display:"flex"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},R9n=t=>{const{componentCls:e,wrapperMarginInlineEnd:n,colorPrimary:i,radioSize:r,motionDurationSlow:o,motionDurationMid:s,motionEaseInOutCirc:a,colorBgContainer:l,colorBorder:c,lineWidth:u,colorBgContainerDisabled:d,colorTextDisabled:h,paddingXS:f,dotColorDisabled:m,lineType:p,radioColor:g,radioBgColor:y,calc:_}=t,w=`${e}-inner`,N=_(r).sub(_(4).mul(2)),E=_(1).mul(r).equal({unit:!0});return{[`${e}-wrapper`]:Object.assign(Object.assign({},fo(t)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer",[`&${e}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:t.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${e}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${xe(u)} ${p} ${i}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[e]:Object.assign(Object.assign({},fo(t)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${e}-wrapper:hover &,
        &:hover ${w}`]:{borderColor:i},[`${e}-input:focus-visible + ${w}`]:Object.assign({},iS(t)),[`${e}:hover::after, ${e}-wrapper:hover &::after`]:{visibility:"visible"},[`${e}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:E,height:E,marginBlockStart:_(1).mul(r).div(-2).equal({unit:!0}),marginInlineStart:_(1).mul(r).div(-2).equal({unit:!0}),backgroundColor:g,borderBlockStart:0,borderInlineStart:0,borderRadius:E,transform:"scale(0)",opacity:0,transition:`all ${o} ${a}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:E,height:E,backgroundColor:l,borderColor:c,borderStyle:"solid",borderWidth:u,borderRadius:"50%",transition:`all ${s}`},[`${e}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${e}-checked`]:{[w]:{borderColor:i,backgroundColor:y,"&::after":{transform:`scale(${t.calc(t.dotSize).div(r).equal()})`,opacity:1,transition:`all ${o} ${a}`}}},[`${e}-disabled`]:{cursor:"not-allowed",[w]:{backgroundColor:d,borderColor:c,cursor:"not-allowed","&::after":{backgroundColor:m}},[`${e}-input`]:{cursor:"not-allowed"},[`${e}-disabled + span`]:{color:h,cursor:"not-allowed"},[`&${e}-checked`]:{[w]:{"&::after":{transform:`scale(${_(N).div(r).equal()})`}}}},[`span${e} + *`]:{paddingInlineStart:f,paddingInlineEnd:f}})}},P9n=t=>{const{buttonColor:e,controlHeight:n,componentCls:i,lineWidth:r,lineType:o,colorBorder:s,motionDurationSlow:a,motionDurationMid:l,buttonPaddingInline:c,fontSize:u,buttonBg:d,fontSizeLG:h,controlHeightLG:f,controlHeightSM:m,paddingXS:p,borderRadius:g,borderRadiusSM:y,borderRadiusLG:_,buttonCheckedBg:w,buttonSolidCheckedColor:C,colorTextDisabled:N,colorBgContainerDisabled:E,buttonCheckedBgDisabled:D,buttonCheckedColorDisabled:k,colorPrimary:M,colorPrimaryHover:T,colorPrimaryActive:A,buttonSolidCheckedBg:R,buttonSolidCheckedHoverBg:P,buttonSolidCheckedActiveBg:O,calc:V}=t;return{[`${i}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:c,paddingBlock:0,color:e,fontSize:u,lineHeight:xe(V(n).sub(V(r).mul(2)).equal()),background:d,border:`${xe(r)} ${o} ${s}`,borderBlockStartWidth:V(r).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:r,cursor:"pointer",transition:[`color ${l}`,`background ${l}`,`box-shadow ${l}`].join(","),a:{color:e},[`> ${i}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:V(r).mul(-1).equal(),insetInlineStart:V(r).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:r,paddingInline:0,backgroundColor:s,transition:`background-color ${a}`,content:'""'}},"&:first-child":{borderInlineStart:`${xe(r)} ${o} ${s}`,borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g},"&:first-child:last-child":{borderRadius:g},[`${i}-group-large &`]:{height:f,fontSize:h,lineHeight:xe(V(f).sub(V(r).mul(2)).equal()),"&:first-child":{borderStartStartRadius:_,borderEndStartRadius:_},"&:last-child":{borderStartEndRadius:_,borderEndEndRadius:_}},[`${i}-group-small &`]:{height:m,paddingInline:V(p).sub(r).equal(),paddingBlock:0,lineHeight:xe(V(m).sub(V(r).mul(2)).equal()),"&:first-child":{borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y}},"&:hover":{position:"relative",color:M},"&:has(:focus-visible)":Object.assign({},iS(t)),[`${i}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${i}-button-wrapper-disabled)`]:{zIndex:1,color:M,background:w,borderColor:M,"&::before":{backgroundColor:M},"&:first-child":{borderColor:M},"&:hover":{color:T,borderColor:T,"&::before":{backgroundColor:T}},"&:active":{color:A,borderColor:A,"&::before":{backgroundColor:A}}},[`${i}-group-solid &-checked:not(${i}-button-wrapper-disabled)`]:{color:C,background:R,borderColor:R,"&:hover":{color:C,background:P,borderColor:P},"&:active":{color:C,background:O,borderColor:O}},"&-disabled":{color:N,backgroundColor:E,borderColor:s,cursor:"not-allowed","&:first-child, &:hover":{color:N,backgroundColor:E,borderColor:s}},[`&-disabled${i}-button-wrapper-checked`]:{color:k,backgroundColor:D,borderColor:s,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},O9n=t=>{const{wireframe:e,padding:n,marginXS:i,lineWidth:r,fontSizeLG:o,colorText:s,colorBgContainer:a,colorTextDisabled:l,controlItemBgActiveDisabled:c,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:h,colorPrimaryActive:f,colorWhite:m}=t,p=4,g=o,y=e?g-p*2:g-(p+r)*2;return{radioSize:g,dotSize:y,dotColorDisabled:l,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:h,buttonSolidCheckedActiveBg:f,buttonBg:a,buttonCheckedBg:a,buttonColor:s,buttonCheckedBgDisabled:c,buttonCheckedColorDisabled:l,buttonPaddingInline:n-r,wrapperMarginInlineEnd:i,radioColor:e?d:m,radioBgColor:e?a:d}},BTt=Jr("Radio",t=>{const{controlOutline:e,controlOutlineWidth:n}=t,i=`0 0 0 ${xe(n)} ${e}`,o=mr(t,{radioFocusShadow:i,radioButtonFocusShadow:i});return[A9n(o),R9n(o),P9n(o)]},O9n,{unitless:{radioSize:!0,dotSize:!0}});var j9n=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const F9n=(t,e)=>{var n,i;const r=b.useContext(FTt),o=b.useContext($Tt),{getPrefixCls:s,direction:a,radio:l}=b.useContext(jn),c=b.useRef(null),u=Vu(e,c),{isFormItemInput:d}=b.useContext(ju);Cr("Radio")(!("optionType"in t),"usage","`optionType` is only support in Radio.Group.");const h=O=>{var V,F;(V=t.onChange)===null||V===void 0||V.call(t,O),(F=r==null?void 0:r.onChange)===null||F===void 0||F.call(r,O)},{prefixCls:f,className:m,rootClassName:p,children:g,style:y,title:_}=t,w=j9n(t,["prefixCls","className","rootClassName","children","style","title"]),C=s("radio",f),N=((r==null?void 0:r.optionType)||o)==="button",E=N?`${C}-button`:C,D=Il(C),[k,M,T]=BTt(C,D),A=Object.assign({},w),R=b.useContext(Yd);r&&(A.name=r.name,A.onChange=h,A.checked=t.value===r.value,A.disabled=(n=A.disabled)!==null&&n!==void 0?n:r.disabled),A.disabled=(i=A.disabled)!==null&&i!==void 0?i:R;const P=Me(`${E}-wrapper`,{[`${E}-wrapper-checked`]:A.checked,[`${E}-wrapper-disabled`]:A.disabled,[`${E}-wrapper-rtl`]:a==="rtl",[`${E}-wrapper-in-form-item`]:d,[`${E}-wrapper-block`]:!!(r!=null&&r.block)},l==null?void 0:l.className,m,p,M,T,D);return k(b.createElement(o6,{component:"Radio",disabled:A.disabled},b.createElement("label",{className:P,style:Object.assign(Object.assign({},l==null?void 0:l.style),y),onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,title:_},b.createElement(VTt,Object.assign({},A,{className:Me(A.className,{[nhe]:!N}),type:"radio",prefixCls:E,ref:u})),g!==void 0?b.createElement("span",null,g):null)))},Uz=b.forwardRef(F9n);Uz.displayName="Radio";const $9n=b.forwardRef((t,e)=>{const{getPrefixCls:n,direction:i}=b.useContext(jn),{prefixCls:r,className:o,rootClassName:s,options:a,buttonStyle:l="outline",disabled:c,children:u,size:d,style:h,id:f,optionType:m,name:p,defaultValue:g,value:y,block:_=!1,onChange:w,onMouseEnter:C,onMouseLeave:N,onFocus:E,onBlur:D}=t,[k,M]=ho(g,{value:y}),T=b.useCallback(K=>{const q=k,U=K.target.value;"value"in t||M(U),U!==q&&(w==null||w(K))},[k,M,w]),A=n("radio",r),R=`${A}-group`,P=Il(A),[O,V,F]=BTt(A,P);let $=u;a&&a.length>0&&($=a.map(K=>typeof K=="string"||typeof K=="number"?b.createElement(Uz,{key:K.toString(),prefixCls:A,disabled:c,value:K,checked:k===K},K):b.createElement(Uz,{key:`radio-group-value-options-${K.value}`,prefixCls:A,disabled:K.disabled||c,value:K.value,checked:k===K.value,title:K.title,style:K.style,id:K.id,required:K.required},K.label)));const B=Hc(d),z=Me(R,`${R}-${l}`,{[`${R}-${B}`]:B,[`${R}-rtl`]:i==="rtl",[`${R}-block`]:_},o,s,V,F,P),H=b.useMemo(()=>({onChange:T,value:k,disabled:c,name:p,optionType:m,block:_}),[T,k,c,p,m,_]);return O(b.createElement("div",Object.assign({},Ll(t,{aria:!0,data:!0}),{className:z,style:h,onMouseEnter:C,onMouseLeave:N,onFocus:E,onBlur:D,id:f,ref:e}),b.createElement(L9n,{value:H},$)))}),V9n=b.memo($9n);var B9n=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const z9n=(t,e)=>{const{getPrefixCls:n}=b.useContext(jn),{prefixCls:i}=t,r=B9n(t,["prefixCls"]),o=n("radio",i);return b.createElement(T9n,{value:"button"},b.createElement(Uz,Object.assign({prefixCls:o},r,{type:"radio",ref:e})))},H9n=b.forwardRef(z9n),Mc=Uz;Mc.Button=H9n;Mc.Group=V9n;Mc.__ANT_RADIO=!0;function GK(t){return mr(t,{inputAffixPadding:t.paddingXXS})}const YK=t=>{const{controlHeight:e,fontSize:n,lineHeight:i,lineWidth:r,controlHeightSM:o,controlHeightLG:s,fontSizeLG:a,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:h,colorPrimaryHover:f,colorPrimary:m,controlOutlineWidth:p,controlOutline:g,colorErrorOutline:y,colorWarningOutline:_,colorBgContainer:w}=t;return{paddingBlock:Math.max(Math.round((e-n*i)/2*10)/10-r,0),paddingBlockSM:Math.max(Math.round((o-n*i)/2*10)/10-r,0),paddingBlockLG:Math.ceil((s-a*l)/2*10)/10-r,paddingInline:c-r,paddingInlineSM:u-r,paddingInlineLG:d-r,addonBg:h,activeBorderColor:m,hoverBorderColor:f,activeShadow:`0 0 0 ${p}px ${g}`,errorActiveShadow:`0 0 0 ${p}px ${y}`,warningActiveShadow:`0 0 0 ${p}px ${_}`,hoverBg:w,activeBg:w,inputFontSize:n,inputFontSizeLG:a,inputFontSizeSM:n}},W9n=t=>({borderColor:t.hoverBorderColor,backgroundColor:t.hoverBg}),Ihe=t=>({color:t.colorTextDisabled,backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},W9n(mr(t,{hoverBorderColor:t.colorBorder,hoverBg:t.colorBgContainerDisabled})))}),R6e=(t,e)=>({background:t.colorBgContainer,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:e.borderColor,"&:hover":{borderColor:e.hoverBorderColor,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:e.activeBorderColor,boxShadow:e.activeShadow,outline:0,backgroundColor:t.activeBg}}),jnt=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},R6e(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:e.borderColor}}),P6e=(t,e)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},R6e(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},Ihe(t))}),jnt(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),jnt(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),Fnt=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{borderColor:e.addonBorderColor,color:e.addonColor}}}),zTt=t=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group`]:{"&-addon":{background:t.addonBg,border:`${xe(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},Fnt(t,{status:"error",addonBorderColor:t.colorError,addonColor:t.colorErrorText})),Fnt(t,{status:"warning",addonBorderColor:t.colorWarning,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group-addon`]:Object.assign({},Ihe(t))}})}),O6e=(t,e)=>{const{componentCls:n}=t;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:t.colorTextDisabled},[`&${n}-status-error`]:{"&, & input, & textarea":{color:t.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:t.colorWarning}}},e)}},HTt=(t,e)=>({background:e.bg,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:e==null?void 0:e.inputColor},"&:hover":{background:e.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:e.activeBorderColor,backgroundColor:t.activeBg}}),$nt=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},HTt(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}})}),j6e=(t,e)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},HTt(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},Ihe(t))}),$nt(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,inputColor:t.colorErrorText,affixColor:t.colorError})),$nt(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,inputColor:t.colorWarningText,affixColor:t.colorWarning})),e)}),Vnt=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{background:e.addonBg,color:e.addonColor}}}),WTt=t=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group`]:{"&-addon":{background:t.colorFillTertiary},[`${t.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${xe(t.lineWidth)} ${t.lineType} ${t.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${xe(t.lineWidth)} ${t.lineType} ${t.colorSplit}`}}}},Vnt(t,{status:"error",addonBg:t.colorErrorBg,addonColor:t.colorErrorText})),Vnt(t,{status:"warning",addonBg:t.colorWarningBg,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group`]:{"&-addon":{background:t.colorFillTertiary,color:t.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${xe(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${xe(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${xe(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${xe(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${xe(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${xe(t.lineWidth)} ${t.lineType} ${t.colorBorder}`}}}})}),F6e=t=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:t,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),UTt=t=>{const{paddingBlockLG:e,lineHeightLG:n,borderRadiusLG:i,paddingInlineLG:r}=t;return{padding:`${xe(e)} ${xe(r)}`,fontSize:t.inputFontSizeLG,lineHeight:n,borderRadius:i}},$6e=t=>({padding:`${xe(t.paddingBlockSM)} ${xe(t.paddingInlineSM)}`,fontSize:t.inputFontSizeSM,borderRadius:t.borderRadiusSM}),XK=t=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${xe(t.paddingBlock)} ${xe(t.paddingInline)}`,color:t.colorText,fontSize:t.inputFontSize,lineHeight:t.lineHeight,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid}`},F6e(t.colorTextPlaceholder)),{"textarea&":{maxWidth:"100%",height:"auto",minHeight:t.controlHeight,lineHeight:t.lineHeight,verticalAlign:"bottom",transition:`all ${t.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},UTt(t)),"&-sm":Object.assign({},$6e(t)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),KTt=t=>{const{componentCls:e,antCls:n}=t;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:t.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${e}, &-lg > ${e}-group-addon`]:Object.assign({},UTt(t)),[`&-sm ${e}, &-sm > ${e}-group-addon`]:Object.assign({},$6e(t)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:t.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:t.controlHeightSM},[`> ${e}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${e}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${xe(t.paddingInline)}`,color:t.colorText,fontWeight:"normal",fontSize:t.inputFontSize,textAlign:"center",borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${xe(t.calc(t.paddingBlock).add(1).mul(-1).equal())} ${xe(t.calc(t.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${xe(t.lineWidth)} ${t.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${xe(t.calc(t.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[e]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${e}-search-with-button &`]:{zIndex:0}}},[`> ${e}:first-child, ${e}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}-affix-wrapper`]:{[`&:not(:first-child) ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}:last-child, ${e}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${e}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${e}-search &`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius}},[`&:not(:first-child), ${e}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${e}-group-compact`]:Object.assign(Object.assign({display:"block"},O0()),{[`${e}-group-addon, ${e}-group-wrap, > ${e}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:t.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
        & > ${e}-affix-wrapper,
        & > ${e}-number-affix-wrapper,
        & > ${n}-picker-range
      `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal(),borderInlineEndWidth:t.lineWidth},[e]:{float:"none"},[`& > ${n}-select > ${n}-select-selector,
      & > ${n}-select-auto-complete ${e},
      & > ${n}-cascader-picker ${e},
      & > ${e}-group-wrapper ${e}`]:{borderInlineEndWidth:t.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child,
      & > ${n}-select:first-child > ${n}-select-selector,
      & > ${n}-select-auto-complete:first-child ${e},
      & > ${n}-cascader-picker:first-child ${e}`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius},[`& > *:last-child,
      & > ${n}-select:last-child > ${n}-select-selector,
      & > ${n}-cascader-picker:last-child ${e},
      & > ${n}-cascader-picker-focused:last-child ${e}`]:{borderInlineEndWidth:t.lineWidth,borderStartEndRadius:t.borderRadius,borderEndEndRadius:t.borderRadius},[`& > ${n}-select-auto-complete ${e}`]:{verticalAlign:"top"},[`${e}-group-wrapper + ${e}-group-wrapper`]:{marginInlineStart:t.calc(t.lineWidth).mul(-1).equal(),[`${e}-affix-wrapper`]:{borderRadius:0}},[`${e}-group-wrapper:not(:last-child)`]:{[`&${e}-search > ${e}-group`]:{[`& > ${e}-group-addon > ${e}-search-button`]:{borderRadius:0},[`& > ${e}`]:{borderStartStartRadius:t.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:t.borderRadius}}}})}},U9n=t=>{const{componentCls:e,controlHeightSM:n,lineWidth:i,calc:r}=t,s=r(n).sub(r(i).mul(2)).sub(16).div(2).equal();return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},fo(t)),XK(t)),P6e(t)),j6e(t)),O6e(t)),{'&[type="color"]':{height:t.controlHeight,[`&${e}-lg`]:{height:t.controlHeightLG},[`&${e}-sm`]:{height:n,paddingTop:s,paddingBottom:s}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},K9n=t=>{const{componentCls:e}=t;return{[`${e}-clear-icon`]:{margin:0,color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"&:hover":{color:t.colorTextTertiary},"&:active":{color:t.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${xe(t.inputAffixPadding)}`}}}},q9n=t=>{const{componentCls:e,inputAffixPadding:n,colorTextDescription:i,motionDurationSlow:r,colorIcon:o,colorIconHover:s,iconCls:a}=t,l=`${e}-affix-wrapper`,c=`${e}-affix-wrapper-disabled`;return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},XK(t)),{display:"inline-flex",[`&:not(${e}-disabled):hover`]:{zIndex:1,[`${e}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${e}`]:{padding:0},[`> input${e}, > textarea${e}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[e]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:t.paddingXS}},"&-show-count-suffix":{color:i},"&-show-count-has-suffix":{marginInlineEnd:t.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),K9n(t)),{[`${a}${e}-password-icon`]:{color:o,cursor:"pointer",transition:`all ${r}`,"&:hover":{color:s}}}),[c]:{[`${a}${e}-password-icon`]:{color:o,cursor:"not-allowed","&:hover":{color:o}}}}},G9n=t=>{const{componentCls:e,borderRadiusLG:n,borderRadiusSM:i}=t;return{[`${e}-group`]:Object.assign(Object.assign(Object.assign({},fo(t)),KTt(t)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${e}-group-addon`]:{borderRadius:n,fontSize:t.inputFontSizeLG}},"&-sm":{[`${e}-group-addon`]:{borderRadius:i}}},zTt(t)),WTt(t)),{[`&:not(${e}-compact-first-item):not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}, ${e}-group-addon`]:{borderRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-first-item`]:{[`${e}, ${e}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-last-item`]:{[`${e}, ${e}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}}})})}},Y9n=t=>{const{componentCls:e,antCls:n}=t,i=`${e}-search`;return{[i]:{[e]:{"&:hover, &:focus":{[`+ ${e}-group-addon ${i}-button:not(${n}-btn-primary)`]:{borderInlineStartColor:t.colorPrimaryHover}}},[`${e}-affix-wrapper`]:{height:t.controlHeight,borderRadius:0},[`${e}-lg`]:{lineHeight:t.calc(t.lineHeightLG).sub(2e-4).equal()},[`> ${e}-group`]:{[`> ${e}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${i}-button`]:{marginInlineEnd:-1,paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${i}-button:not(${n}-btn-primary)`]:{color:t.colorTextDescription,"&:hover":{color:t.colorPrimaryHover},"&:active":{color:t.colorPrimaryActive},[`&${n}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${i}-button`]:{height:t.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${e}-affix-wrapper, ${i}-button`]:{height:t.controlHeightLG}},"&-small":{[`${e}-affix-wrapper, ${i}-button`]:{height:t.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${e}-compact-item`]:{[`&:not(${e}-compact-last-item)`]:{[`${e}-group-addon`]:{[`${e}-search-button`]:{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${e}-compact-first-item)`]:{[`${e},${e}-affix-wrapper`]:{borderRadius:0}},[`> ${e}-group-addon ${e}-search-button,
        > ${e},
        ${e}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${e}-affix-wrapper-focused`]:{zIndex:2}}}}},X9n=t=>{const{componentCls:e,paddingLG:n}=t,i=`${e}-textarea`;return{[i]:{position:"relative","&-show-count":{[`> ${e}`]:{height:"100%"},[`${e}-data-count`]:{position:"absolute",bottom:t.calc(t.fontSize).mul(t.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:t.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
        &-allow-clear > ${e},
        &-affix-wrapper${i}-has-feedback ${e}
      `]:{paddingInlineEnd:n},[`&-affix-wrapper${e}-affix-wrapper`]:{padding:0,[`> textarea${e}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent","&:focus":{boxShadow:"none !important"}},[`${e}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${e}-clear-icon`]:{position:"absolute",insetInlineEnd:t.paddingInline,insetBlockStart:t.paddingXS},[`${i}-suffix`]:{position:"absolute",top:0,insetInlineEnd:t.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${e}-affix-wrapper-sm`]:{[`${e}-suffix`]:{[`${e}-clear-icon`]:{insetInlineEnd:t.paddingInlineSM}}}}}},Z9n=t=>{const{componentCls:e}=t;return{[`${e}-out-of-range`]:{[`&, & input, & textarea, ${e}-show-count-suffix, ${e}-data-count`]:{color:t.colorError}}}},V6e=Jr("Input",t=>{const e=mr(t,GK(t));return[U9n(e),X9n(e),q9n(e),G9n(e),Y9n(e),Z9n(e),a6(e)]},YK,{resetFont:!1}),kxe=(t,e)=>{const{componentCls:n,controlHeight:i}=t,r=e?`${n}-${e}`:"",o=cLt(t);return[{[`${n}-multiple${r}`]:{paddingBlock:o.containerPadding,paddingInlineStart:o.basePadding,minHeight:i,[`${n}-selection-item`]:{height:o.itemHeight,lineHeight:xe(o.itemLineHeight)}}}]},Q9n=t=>{const{componentCls:e,calc:n,lineWidth:i}=t,r=mr(t,{fontHeight:t.fontSize,selectHeight:t.controlHeightSM,multipleSelectItemHeight:t.multipleItemHeightSM,borderRadius:t.borderRadiusSM,borderRadiusSM:t.borderRadiusXS,controlHeight:t.controlHeightSM}),o=mr(t,{fontHeight:n(t.multipleItemHeightLG).sub(n(i).mul(2).equal()).equal(),fontSize:t.fontSizeLG,selectHeight:t.controlHeightLG,multipleSelectItemHeight:t.multipleItemHeightLG,borderRadius:t.borderRadiusLG,borderRadiusSM:t.borderRadius,controlHeight:t.controlHeightLG});return[kxe(r,"small"),kxe(t),kxe(o,"large"),{[`${e}${e}-multiple`]:Object.assign(Object.assign({width:"100%",cursor:"text",[`${e}-selector`]:{flex:"auto",padding:0,position:"relative","&:after":{margin:0},[`${e}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:t.inputPaddingHorizontalBase,insetInlineEnd:0,transform:"translateY(-50%)",transition:`all ${t.motionDurationSlow}`,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",flex:1,color:t.colorTextPlaceholder,pointerEvents:"none"}}},uLt(t)),{[`${e}-multiple-input`]:{width:0,height:0,border:0,visibility:"hidden",position:"absolute",zIndex:-1}})}]},J9n=t=>{const{pickerCellCls:e,pickerCellInnerCls:n,cellHeight:i,borderRadiusSM:r,motionDurationMid:o,cellHoverBg:s,lineWidth:a,lineType:l,colorPrimary:c,cellActiveWithRangeBg:u,colorTextLightSolid:d,colorTextDisabled:h,cellBgDisabled:f,colorFillSecondary:m}=t;return{"&::before":{position:"absolute",top:"50%",insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:i,transform:"translateY(-50%)",content:'""'},[n]:{position:"relative",zIndex:2,display:"inline-block",minWidth:i,height:i,lineHeight:xe(i),borderRadius:r,transition:`background ${o}`},[`&:hover:not(${e}-in-view),
    &:hover:not(${e}-selected):not(${e}-range-start):not(${e}-range-end)`]:{[n]:{background:s}},[`&-in-view${e}-today ${n}`]:{"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:`${xe(a)} ${l} ${c}`,borderRadius:r,content:'""'}},[`&-in-view${e}-in-range,
      &-in-view${e}-range-start,
      &-in-view${e}-range-end`]:{position:"relative",[`&:not(${e}-disabled):before`]:{background:u}},[`&-in-view${e}-selected,
      &-in-view${e}-range-start,
      &-in-view${e}-range-end`]:{[`&:not(${e}-disabled) ${n}`]:{color:d,background:c},[`&${e}-disabled ${n}`]:{background:m}},[`&-in-view${e}-range-start:not(${e}-disabled):before`]:{insetInlineStart:"50%"},[`&-in-view${e}-range-end:not(${e}-disabled):before`]:{insetInlineEnd:"50%"},[`&-in-view${e}-range-start:not(${e}-range-end) ${n}`]:{borderStartStartRadius:r,borderEndStartRadius:r,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${e}-range-end:not(${e}-range-start) ${n}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:r,borderEndEndRadius:r},"&-disabled":{color:h,pointerEvents:"none",[n]:{background:"transparent"},"&::before":{background:f}},[`&-disabled${e}-today ${n}::before`]:{borderColor:h}}},eBn=t=>{const{componentCls:e,pickerCellCls:n,pickerCellInnerCls:i,pickerYearMonthCellWidth:r,pickerControlIconSize:o,cellWidth:s,paddingSM:a,paddingXS:l,paddingXXS:c,colorBgContainer:u,lineWidth:d,lineType:h,borderRadiusLG:f,colorPrimary:m,colorTextHeading:p,colorSplit:g,pickerControlIconBorderWidth:y,colorIcon:_,textHeight:w,motionDurationMid:C,colorIconHover:N,fontWeightStrong:E,cellHeight:D,pickerCellPaddingVertical:k,colorTextDisabled:M,colorText:T,fontSize:A,motionDurationSlow:R,withoutTimeCellHeight:P,pickerQuarterPanelContentHeight:O,borderRadiusSM:V,colorTextLightSolid:F,cellHoverBg:$,timeColumnHeight:B,timeColumnWidth:z,timeCellHeight:H,controlItemBgActive:K,marginXXS:q,pickerDatePanelPaddingHorizontal:U,pickerControlIconMargin:Y}=t,J=t.calc(s).mul(7).add(t.calc(U).mul(2)).equal();return{[e]:{"&-panel":{display:"inline-flex",flexDirection:"column",textAlign:"center",background:u,borderRadius:f,outline:"none","&-focused":{borderColor:m},"&-rtl":{[`${e}-prev-icon,
              ${e}-super-prev-icon`]:{transform:"rotate(45deg)"},[`${e}-next-icon,
              ${e}-super-next-icon`]:{transform:"rotate(-135deg)"},[`${e}-time-panel`]:{[`${e}-content`]:{direction:"ltr","> *":{direction:"rtl"}}}}},"&-decade-panel,\n        &-year-panel,\n        &-quarter-panel,\n        &-month-panel,\n        &-week-panel,\n        &-date-panel,\n        &-time-panel":{display:"flex",flexDirection:"column",width:J},"&-header":{display:"flex",padding:`0 ${xe(l)}`,color:p,borderBottom:`${xe(d)} ${h} ${g}`,"> *":{flex:"none"},button:{padding:0,color:_,lineHeight:xe(w),background:"transparent",border:0,cursor:"pointer",transition:`color ${C}`,fontSize:"inherit",display:"inline-flex",alignItems:"center",justifyContent:"center"},"> button":{minWidth:"1.6em",fontSize:A,"&:hover":{color:N},"&:disabled":{opacity:.25,pointerEvents:"none"}},"&-view":{flex:"auto",fontWeight:E,lineHeight:xe(w),"> button":{color:"inherit",fontWeight:"inherit","&:not(:first-child)":{marginInlineStart:l},"&:hover":{color:m}}}},"&-prev-icon,\n        &-next-icon,\n        &-super-prev-icon,\n        &-super-next-icon":{position:"relative",width:o,height:o,"&::before":{position:"absolute",top:0,insetInlineStart:0,width:o,height:o,border:"0 solid currentcolor",borderBlockWidth:`${xe(y)} 0`,borderInlineWidth:`${xe(y)} 0`,content:'""'}},"&-super-prev-icon,\n        &-super-next-icon":{"&::after":{position:"absolute",top:Y,insetInlineStart:Y,display:"inline-block",width:o,height:o,border:"0 solid currentcolor",borderBlockWidth:`${xe(y)} 0`,borderInlineWidth:`${xe(y)} 0`,content:'""'}},"&-prev-icon, &-super-prev-icon":{transform:"rotate(-45deg)"},"&-next-icon, &-super-next-icon":{transform:"rotate(135deg)"},"&-content":{width:"100%",tableLayout:"fixed",borderCollapse:"collapse","th, td":{position:"relative",minWidth:D,fontWeight:"normal"},th:{height:t.calc(D).add(t.calc(k).mul(2)).equal(),color:T,verticalAlign:"middle"}},"&-cell":Object.assign({padding:`${xe(k)} 0`,color:M,cursor:"pointer","&-in-view":{color:T}},J9n(t)),"&-decade-panel,\n        &-year-panel,\n        &-quarter-panel,\n        &-month-panel":{[`${e}-content`]:{height:t.calc(P).mul(4).equal()},[i]:{padding:`0 ${xe(l)}`}},"&-quarter-panel":{[`${e}-content`]:{height:O}},"&-decade-panel":{[i]:{padding:`0 ${xe(t.calc(l).div(2).equal())}`},[`${e}-cell::before`]:{display:"none"}},"&-year-panel,\n        &-quarter-panel,\n        &-month-panel":{[`${e}-body`]:{padding:`0 ${xe(l)}`},[i]:{width:r}},"&-date-panel":{[`${e}-body`]:{padding:`${xe(l)} ${xe(U)}`},[`${e}-content th`]:{boxSizing:"border-box",padding:0}},"&-week-panel":{[`${e}-cell`]:{[`&:hover ${i},
            &-selected ${i},
            ${i}`]:{background:"transparent !important"}},"&-row":{td:{"&:before":{transition:`background ${C}`},"&:first-child:before":{borderStartStartRadius:V,borderEndStartRadius:V},"&:last-child:before":{borderStartEndRadius:V,borderEndEndRadius:V}},"&:hover td":{"&:before":{background:$}},"&-range-start td, &-range-end td, &-selected td, &-hover td":{[`&${n}`]:{"&:before":{background:m},[`&${e}-cell-week`]:{color:new ko(F).setAlpha(.5).toHexString()},[i]:{color:F}}},"&-range-hover td:before":{background:K}}},"&-week-panel, &-date-panel-show-week":{[`${e}-body`]:{padding:`${xe(l)} ${xe(a)}`},[`${e}-content th`]:{width:"auto"}},"&-datetime-panel":{display:"flex",[`${e}-time-panel`]:{borderInlineStart:`${xe(d)} ${h} ${g}`},[`${e}-date-panel,
          ${e}-time-panel`]:{transition:`opacity ${R}`},"&-active":{[`${e}-date-panel,
            ${e}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:"auto",minWidth:"auto",[`${e}-content`]:{display:"flex",flex:"auto",height:B},"&-column":{flex:"1 0 auto",width:z,margin:`${xe(c)} 0`,padding:0,overflowY:"hidden",textAlign:"start",listStyle:"none",transition:`background ${C}`,overflowX:"hidden","&::-webkit-scrollbar":{width:8,backgroundColor:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:t.colorTextTertiary,borderRadius:t.borderRadiusSM},"&":{scrollbarWidth:"thin",scrollbarColor:`${t.colorTextTertiary} transparent`},"&::after":{display:"block",height:t.calc("100%").sub(H).equal(),content:'""'},"&:not(:first-child)":{borderInlineStart:`${xe(d)} ${h} ${g}`},"&-active":{background:new ko(K).setAlpha(.2).toHexString()},"&:hover":{overflowY:"auto"},"> li":{margin:0,padding:0,[`&${e}-time-panel-cell`]:{marginInline:q,[`${e}-time-panel-cell-inner`]:{display:"block",width:t.calc(z).sub(t.calc(q).mul(2)).equal(),height:H,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:t.calc(z).sub(H).div(2).equal(),color:T,lineHeight:xe(H),borderRadius:V,cursor:"pointer",transition:`background ${C}`,"&:hover":{background:$}},"&-selected":{[`${e}-time-panel-cell-inner`]:{background:K}},"&-disabled":{[`${e}-time-panel-cell-inner`]:{color:M,background:"transparent",cursor:"not-allowed"}}}}}}}}},tBn=t=>{const{componentCls:e,textHeight:n,lineWidth:i,paddingSM:r,antCls:o,colorPrimary:s,cellActiveWithRangeBg:a,colorPrimaryBorder:l,lineType:c,colorSplit:u}=t;return{[`${e}-dropdown`]:{[`${e}-footer`]:{borderTop:`${xe(i)} ${c} ${u}`,"&-extra":{padding:`0 ${xe(r)}`,lineHeight:xe(t.calc(n).sub(t.calc(i).mul(2)).equal()),textAlign:"start","&:not(:last-child)":{borderBottom:`${xe(i)} ${c} ${u}`}}},[`${e}-panels + ${e}-footer ${e}-ranges`]:{justifyContent:"space-between"},[`${e}-ranges`]:{marginBlock:0,paddingInline:xe(r),overflow:"hidden",textAlign:"start",listStyle:"none",display:"flex",justifyContent:"center",alignItems:"center","> li":{lineHeight:xe(t.calc(n).sub(t.calc(i).mul(2)).equal()),display:"inline-block"},[`${e}-now-btn-disabled`]:{pointerEvents:"none",color:t.colorTextDisabled},[`${e}-preset > ${o}-tag-blue`]:{color:s,background:a,borderColor:l,cursor:"pointer"},[`${e}-ok`]:{paddingBlock:t.calc(i).mul(2).equal(),marginInlineStart:"auto"}}}}},nBn=t=>{const{componentCls:e,controlHeightLG:n,paddingXXS:i,padding:r}=t;return{pickerCellCls:`${e}-cell`,pickerCellInnerCls:`${e}-cell-inner`,pickerYearMonthCellWidth:t.calc(n).mul(1.5).equal(),pickerQuarterPanelContentHeight:t.calc(n).mul(1.4).equal(),pickerCellPaddingVertical:t.calc(i).add(t.calc(i).div(2)).equal(),pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconMargin:4,pickerControlIconBorderWidth:1.5,pickerDatePanelPaddingHorizontal:t.calc(r).add(t.calc(i).div(2)).equal()}},iBn=t=>{const{colorBgContainerDisabled:e,controlHeight:n,controlHeightSM:i,controlHeightLG:r,paddingXXS:o,lineWidth:s}=t,a=o*2,l=s*2,c=Math.min(n-a,n-l),u=Math.min(i-a,i-l),d=Math.min(r-a,r-l);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(o/2),cellHoverBg:t.controlItemBgHover,cellActiveWithRangeBg:t.controlItemBgActive,cellHoverWithRangeBg:new ko(t.colorPrimary).lighten(35).toHexString(),cellRangeBorderColor:new ko(t.colorPrimary).lighten(20).toHexString(),cellBgDisabled:e,timeColumnWidth:r*1.4,timeColumnHeight:28*8,timeCellHeight:28,cellWidth:i*1.5,cellHeight:i,textHeight:r,withoutTimeCellHeight:r*1.65,multipleItemBg:t.colorFillSecondary,multipleItemBorderColor:"transparent",multipleItemHeight:c,multipleItemHeightSM:u,multipleItemHeightLG:d,multipleSelectorBgDisabled:e,multipleItemColorDisabled:t.colorTextDisabled,multipleItemBorderColorDisabled:"transparent"}},rBn=t=>Object.assign(Object.assign(Object.assign(Object.assign({},YK(t)),iBn(t)),yhe(t)),{presetsWidth:120,presetsMaxWidth:200,zIndexPopup:t.zIndexPopupBase+50}),oBn=t=>{const{componentCls:e}=t;return{[e]:[Object.assign(Object.assign(Object.assign({},P6e(t)),j6e(t)),O6e(t)),{"&-outlined":{[`&${e}-multiple ${e}-selection-item`]:{background:t.multipleItemBg,border:`${xe(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}},"&-filled":{[`&${e}-multiple ${e}-selection-item`]:{background:t.colorBgContainer,border:`${xe(t.lineWidth)} ${t.lineType} ${t.colorSplit}`}},"&-borderless":{[`&${e}-multiple ${e}-selection-item`]:{background:t.multipleItemBg,border:`${xe(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}}}]}},Mxe=(t,e,n,i)=>{const r=t.calc(n).add(2).equal(),o=t.max(t.calc(e).sub(r).div(2).equal(),0),s=t.max(t.calc(e).sub(r).sub(o).equal(),0);return{padding:`${xe(o)} ${xe(i)} ${xe(s)}`}},sBn=t=>{const{componentCls:e,colorError:n,colorWarning:i}=t;return{[`${e}:not(${e}-disabled):not([disabled])`]:{[`&${e}-status-error`]:{[`${e}-active-bar`]:{background:n}},[`&${e}-status-warning`]:{[`${e}-active-bar`]:{background:i}}}}},aBn=t=>{const{componentCls:e,antCls:n,controlHeight:i,paddingInline:r,lineWidth:o,lineType:s,colorBorder:a,borderRadius:l,motionDurationMid:c,colorTextDisabled:u,colorTextPlaceholder:d,controlHeightLG:h,fontSizeLG:f,controlHeightSM:m,paddingInlineSM:p,paddingXS:g,marginXS:y,colorTextDescription:_,lineWidthBold:w,colorPrimary:C,motionDurationSlow:N,zIndexPopup:E,paddingXXS:D,sizePopupArrow:k,colorBgElevated:M,borderRadiusLG:T,boxShadowSecondary:A,borderRadiusSM:R,colorSplit:P,cellHoverBg:O,presetsWidth:V,presetsMaxWidth:F,boxShadowPopoverArrow:$,fontHeight:B,fontHeightLG:z,lineHeightLG:H}=t;return[{[e]:Object.assign(Object.assign(Object.assign({},fo(t)),Mxe(t,i,B,r)),{position:"relative",display:"inline-flex",alignItems:"center",lineHeight:1,borderRadius:l,transition:`border ${c}, box-shadow ${c}, background ${c}`,[`${e}-input`]:{position:"relative",display:"inline-flex",alignItems:"center",width:"100%","> input":Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",color:"inherit",fontSize:t.fontSize,lineHeight:t.lineHeight,transition:`all ${c}`},F6e(d)),{flex:"auto",minWidth:1,height:"auto",padding:0,background:"transparent",border:0,fontFamily:"inherit","&:focus":{boxShadow:"none",outline:0},"&[disabled]":{background:"transparent",color:u,cursor:"not-allowed"}}),"&-placeholder":{"> input":{color:d}}},"&-large":Object.assign(Object.assign({},Mxe(t,h,z,r)),{[`${e}-input > input`]:{fontSize:f,lineHeight:H}}),"&-small":Object.assign({},Mxe(t,m,B,p)),[`${e}-suffix`]:{display:"flex",flex:"none",alignSelf:"center",marginInlineStart:t.calc(g).div(2).equal(),color:u,lineHeight:1,pointerEvents:"none",transition:`opacity ${c}, color ${c}`,"> *":{verticalAlign:"top","&:not(:last-child)":{marginInlineEnd:y}}},[`${e}-clear`]:{position:"absolute",top:"50%",insetInlineEnd:0,color:u,lineHeight:1,transform:"translateY(-50%)",cursor:"pointer",opacity:0,transition:`opacity ${c}, color ${c}`,"> *":{verticalAlign:"top"},"&:hover":{color:_}},"&:hover":{[`${e}-clear`]:{opacity:1},[`${e}-suffix:not(:last-child)`]:{opacity:0}},[`${e}-separator`]:{position:"relative",display:"inline-block",width:"1em",height:f,color:u,fontSize:f,verticalAlign:"top",cursor:"default",[`${e}-focused &`]:{color:_},[`${e}-range-separator &`]:{[`${e}-disabled &`]:{cursor:"not-allowed"}}},"&-range":{position:"relative",display:"inline-flex",[`${e}-active-bar`]:{bottom:t.calc(o).mul(-1).equal(),height:w,background:C,opacity:0,transition:`all ${N} ease-out`,pointerEvents:"none"},[`&${e}-focused`]:{[`${e}-active-bar`]:{opacity:1}},[`${e}-range-separator`]:{alignItems:"center",padding:`0 ${xe(g)}`,lineHeight:1}},"&-range, &-multiple":{[`${e}-clear`]:{insetInlineEnd:r},[`&${e}-small`]:{[`${e}-clear`]:{insetInlineEnd:p}}},"&-dropdown":Object.assign(Object.assign(Object.assign({},fo(t)),eBn(t)),{pointerEvents:"none",position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:E,[`&${e}-dropdown-hidden`]:{display:"none"},"&-rtl":{direction:"rtl"},[`&${e}-dropdown-placement-bottomLeft,
            &${e}-dropdown-placement-bottomRight`]:{[`${e}-range-arrow`]:{top:0,display:"block",transform:"translateY(-100%)"}},[`&${e}-dropdown-placement-topLeft,
            &${e}-dropdown-placement-topRight`]:{[`${e}-range-arrow`]:{bottom:0,display:"block",transform:"translateY(100%) rotate(180deg)"}},[`&${n}-slide-up-enter${n}-slide-up-enter-active${e}-dropdown-placement-topLeft,
          &${n}-slide-up-enter${n}-slide-up-enter-active${e}-dropdown-placement-topRight,
          &${n}-slide-up-appear${n}-slide-up-appear-active${e}-dropdown-placement-topLeft,
          &${n}-slide-up-appear${n}-slide-up-appear-active${e}-dropdown-placement-topRight`]:{animationName:lhe},[`&${n}-slide-up-enter${n}-slide-up-enter-active${e}-dropdown-placement-bottomLeft,
          &${n}-slide-up-enter${n}-slide-up-enter-active${e}-dropdown-placement-bottomRight,
          &${n}-slide-up-appear${n}-slide-up-appear-active${e}-dropdown-placement-bottomLeft,
          &${n}-slide-up-appear${n}-slide-up-appear-active${e}-dropdown-placement-bottomRight`]:{animationName:she},[`&${n}-slide-up-leave ${e}-panel-container`]:{pointerEvents:"none"},[`&${n}-slide-up-leave${n}-slide-up-leave-active${e}-dropdown-placement-topLeft,
          &${n}-slide-up-leave${n}-slide-up-leave-active${e}-dropdown-placement-topRight`]:{animationName:che},[`&${n}-slide-up-leave${n}-slide-up-leave-active${e}-dropdown-placement-bottomLeft,
          &${n}-slide-up-leave${n}-slide-up-leave-active${e}-dropdown-placement-bottomRight`]:{animationName:ahe},[`${e}-panel > ${e}-time-panel`]:{paddingTop:D},[`${e}-range-wrapper`]:{display:"flex",position:"relative"},[`${e}-range-arrow`]:Object.assign(Object.assign({position:"absolute",zIndex:1,display:"none",paddingInline:t.calc(r).mul(1.5).equal(),boxSizing:"content-box",transition:`all ${N} ease-out`},vLt(t,M,$)),{"&:before":{insetInlineStart:t.calc(r).mul(1.5).equal()}}),[`${e}-panel-container`]:{overflow:"hidden",verticalAlign:"top",background:M,borderRadius:T,boxShadow:A,transition:`margin ${N}`,display:"inline-block",pointerEvents:"auto",[`${e}-panel-layout`]:{display:"flex",flexWrap:"nowrap",alignItems:"stretch"},[`${e}-presets`]:{display:"flex",flexDirection:"column",minWidth:V,maxWidth:F,ul:{height:0,flex:"auto",listStyle:"none",overflow:"auto",margin:0,padding:g,borderInlineEnd:`${xe(o)} ${s} ${P}`,li:Object.assign(Object.assign({},Mm),{borderRadius:R,paddingInline:g,paddingBlock:t.calc(m).sub(B).div(2).equal(),cursor:"pointer",transition:`all ${N}`,"+ li":{marginTop:y},"&:hover":{background:O}})}},[`${e}-panels`]:{display:"inline-flex",flexWrap:"nowrap","&:last-child":{[`${e}-panel`]:{borderWidth:0}}},[`${e}-panel`]:{verticalAlign:"top",background:"transparent",borderRadius:0,borderWidth:0,[`${e}-content, table`]:{textAlign:"center"},"&-focused":{borderColor:a}}}}),"&-dropdown-range":{padding:`${xe(t.calc(k).mul(2).div(3).equal())} 0`,"&-hidden":{display:"none"}},"&-rtl":{direction:"rtl",[`${e}-separator`]:{transform:"rotate(180deg)"},[`${e}-footer`]:{"&-extra":{direction:"rtl"}}}})},ow(t,"slide-up"),ow(t,"slide-down"),Vj(t,"move-up"),Vj(t,"move-down")]},qTt=Jr("DatePicker",t=>{const e=mr(GK(t),nBn(t),{inputPaddingHorizontalBase:t.calc(t.paddingSM).sub(1).equal(),multipleSelectItemHeight:t.multipleItemHeight,selectHeight:t.controlHeight});return[tBn(e),aBn(e),oBn(e),sBn(e),Q9n(e),a6(t,{focusElCls:`${t.componentCls}-focused`})]},rBn);var lBn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},cBn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:lBn}))},B6e=b.forwardRef(cBn);B6e.displayName="PlusOutlined";const Ahe=b.createContext(null);var uBn=function(e){var n=e.activeTabOffset,i=e.horizontal,r=e.rtl,o=e.indicator,s=o===void 0?{}:o,a=s.size,l=s.align,c=l===void 0?"center":l,u=b.useState(),d=He(u,2),h=d[0],f=d[1],m=b.useRef(),p=Z.useCallback(function(y){return typeof a=="function"?a(y):typeof a=="number"?a:y},[a]);function g(){Dr.cancel(m.current)}return b.useEffect(function(){var y={};if(n)if(i){y.width=p(n.width);var _=r?"right":"left";c==="start"&&(y[_]=n[_]),c==="center"&&(y[_]=n[_]+n.width/2,y.transform=r?"translateX(50%)":"translateX(-50%)"),c==="end"&&(y[_]=n[_]+n.width,y.transform="translateX(-100%)")}else y.height=p(n.height),c==="start"&&(y.top=n.top),c==="center"&&(y.top=n.top+n.height/2,y.transform="translateY(-50%)"),c==="end"&&(y.top=n.top+n.height,y.transform="translateY(-100%)");return g(),m.current=Dr(function(){f(y)}),g},[n,i,r,c,p]),{style:h}},Bnt={width:0,height:0,left:0,top:0};function dBn(t,e,n){return b.useMemo(function(){for(var i,r=new Map,o=e.get((i=t[0])===null||i===void 0?void 0:i.key)||Bnt,s=o.left+o.width,a=0;a<t.length;a+=1){var l=t[a].key,c=e.get(l);if(!c){var u;c=e.get((u=t[a-1])===null||u===void 0?void 0:u.key)||Bnt}var d=r.get(l)||Ie({},c);d.right=s-d.left-d.width,r.set(l,d)}return r},[t.map(function(i){return i.key}).join("_"),e,n])}function znt(t,e){var n=b.useRef(t),i=b.useState({}),r=He(i,2),o=r[1];function s(a){var l=typeof a=="function"?a(n.current):a;l!==n.current&&e(l,n.current),n.current=l,o({})}return[n.current,s]}var hBn=.1,Hnt=.01,Fee=20,Wnt=Math.pow(.995,Fee);function fBn(t,e){var n=b.useState(),i=He(n,2),r=i[0],o=i[1],s=b.useState(0),a=He(s,2),l=a[0],c=a[1],u=b.useState(0),d=He(u,2),h=d[0],f=d[1],m=b.useState(),p=He(m,2),g=p[0],y=p[1],_=b.useRef();function w(M){var T=M.touches[0],A=T.screenX,R=T.screenY;o({x:A,y:R}),window.clearInterval(_.current)}function C(M){if(r){var T=M.touches[0],A=T.screenX,R=T.screenY;o({x:A,y:R});var P=A-r.x,O=R-r.y;e(P,O);var V=Date.now();c(V),f(V-l),y({x:P,y:O})}}function N(){if(r&&(o(null),y(null),g)){var M=g.x/h,T=g.y/h,A=Math.abs(M),R=Math.abs(T);if(Math.max(A,R)<hBn)return;var P=M,O=T;_.current=window.setInterval(function(){if(Math.abs(P)<Hnt&&Math.abs(O)<Hnt){window.clearInterval(_.current);return}P*=Wnt,O*=Wnt,e(P*Fee,O*Fee)},Fee)}}var E=b.useRef();function D(M){var T=M.deltaX,A=M.deltaY,R=0,P=Math.abs(T),O=Math.abs(A);P===O?R=E.current==="x"?T:A:P>O?(R=T,E.current="x"):(R=A,E.current="y"),e(-R,-R)&&M.preventDefault()}var k=b.useRef(null);k.current={onTouchStart:w,onTouchMove:C,onTouchEnd:N,onWheel:D},b.useEffect(function(){function M(P){k.current.onTouchStart(P)}function T(P){k.current.onTouchMove(P)}function A(P){k.current.onTouchEnd(P)}function R(P){k.current.onWheel(P)}return document.addEventListener("touchmove",T,{passive:!1}),document.addEventListener("touchend",A,{passive:!0}),t.current.addEventListener("touchstart",M,{passive:!0}),t.current.addEventListener("wheel",R,{passive:!1}),function(){document.removeEventListener("touchmove",T),document.removeEventListener("touchend",A)}},[])}function GTt(t){var e=b.useState(0),n=He(e,2),i=n[0],r=n[1],o=b.useRef(0),s=b.useRef();return s.current=t,ZT(function(){var a;(a=s.current)===null||a===void 0||a.call(s)},[i]),function(){o.current===i&&(o.current+=1,r(o.current))}}function mBn(t){var e=b.useRef([]),n=b.useState({}),i=He(n,2),r=i[1],o=b.useRef(typeof t=="function"?t():t),s=GTt(function(){var l=o.current;e.current.forEach(function(c){l=c(l)}),e.current=[],o.current=l,r({})});function a(l){e.current.push(l),s()}return[o.current,a]}var Unt={width:0,height:0,left:0,top:0,right:0};function pBn(t,e,n,i,r,o,s){var a=s.tabs,l=s.tabPosition,c=s.rtl,u,d,h;return["top","bottom"].includes(l)?(u="width",d=c?"right":"left",h=Math.abs(n)):(u="height",d="top",h=-n),b.useMemo(function(){if(!a.length)return[0,0];for(var f=a.length,m=f,p=0;p<f;p+=1){var g=t.get(a[p].key)||Unt;if(Math.floor(g[d]+g[u])>Math.floor(h+e)){m=p-1;break}}for(var y=0,_=f-1;_>=0;_-=1){var w=t.get(a[_].key)||Unt;if(w[d]<h){y=_+1;break}}return y>=m?[0,0]:[y,m]},[t,e,i,r,o,h,l,a.map(function(f){return f.key}).join("_"),c])}function Knt(t){var e;return t instanceof Map?(e={},t.forEach(function(n,i){e[i]=n})):e=t,JSON.stringify(e)}var gBn="TABS_DQ";function YTt(t){return String(t).replace(/"/g,gBn)}function XTt(t,e,n,i){return!(!n||i||t===!1||t===void 0&&(e===!1||e===null))}var ZTt=b.forwardRef(function(t,e){var n=t.prefixCls,i=t.editable,r=t.locale,o=t.style;return!i||i.showAdd===!1?null:b.createElement("button",{ref:e,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(r==null?void 0:r.addAriaLabel)||"Add tab",onClick:function(a){i.onEdit("add",{event:a})}},i.addIcon||"+")}),ake=b.forwardRef(function(t,e){var n=t.position,i=t.prefixCls,r=t.extra;if(!r)return null;var o,s={};return Un(r)==="object"&&!b.isValidElement(r)?s=r:s.right=r,n==="right"&&(o=s.right),n==="left"&&(o=s.left),o?b.createElement("div",{className:"".concat(i,"-extra-content"),ref:e},o):null});ake.displayName="ExtraContent";var bBn=b.forwardRef(function(t,e){var n=t.prefixCls,i=t.id,r=t.tabs,o=t.locale,s=t.mobile,a=t.more,l=a===void 0?{}:a,c=t.style,u=t.className,d=t.editable,h=t.tabBarGutter,f=t.rtl,m=t.removeAriaLabel,p=t.onTabClick,g=t.getPopupContainer,y=t.popupClassName,_=b.useState(!1),w=He(_,2),C=w[0],N=w[1],E=b.useState(null),D=He(E,2),k=D[0],M=D[1],T=l.icon,A=T===void 0?"More":T,R="".concat(i,"-more-popup"),P="".concat(n,"-dropdown"),O=k!==null?"".concat(R,"-").concat(k):null,V=o==null?void 0:o.dropdownAriaLabel;function F(U,Y){U.preventDefault(),U.stopPropagation(),d.onEdit("remove",{key:Y,event:U})}var $=b.createElement(m6,{onClick:function(Y){var J=Y.key,ae=Y.domEvent;p(J,ae),N(!1)},prefixCls:"".concat(P,"-menu"),id:R,tabIndex:-1,role:"listbox","aria-activedescendant":O,selectedKeys:[k],"aria-label":V!==void 0?V:"expanded dropdown"},r.map(function(U){var Y=U.closable,J=U.disabled,ae=U.closeIcon,se=U.key,oe=U.label,fe=XTt(Y,ae,d,J);return b.createElement(WK,{key:se,id:"".concat(R,"-").concat(se),role:"option","aria-controls":i&&"".concat(i,"-panel-").concat(se),disabled:J},b.createElement("span",null,oe),fe&&b.createElement("button",{type:"button","aria-label":m||"remove",tabIndex:0,className:"".concat(P,"-menu-item-remove"),onClick:function(ie){ie.stopPropagation(),F(ie,se)}},ae||d.removeIcon||"×"))}));function B(U){for(var Y=r.filter(function(fe){return!fe.disabled}),J=Y.findIndex(function(fe){return fe.key===k})||0,ae=Y.length,se=0;se<ae;se+=1){J=(J+U+ae)%ae;var oe=Y[J];if(!oe.disabled){M(oe.key);return}}}function z(U){var Y=U.which;if(!C){[Wt.DOWN,Wt.SPACE,Wt.ENTER].includes(Y)&&(N(!0),U.preventDefault());return}switch(Y){case Wt.UP:B(-1),U.preventDefault();break;case Wt.DOWN:B(1),U.preventDefault();break;case Wt.ESC:N(!1);break;case Wt.SPACE:case Wt.ENTER:k!==null&&p(k,U);break}}b.useEffect(function(){var U=document.getElementById(O);U&&U.scrollIntoView&&U.scrollIntoView(!1)},[k]),b.useEffect(function(){C||M(null)},[C]);var H=ye({},f?"marginRight":"marginLeft",h);r.length||(H.visibility="hidden",H.order=1);var K=Me(ye({},"".concat(P,"-rtl"),f)),q=s?null:b.createElement(kLt,lt({prefixCls:P,overlay:$,visible:r.length?C:!1,onVisibleChange:N,overlayClassName:Me(K,y),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:g},l),b.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:H,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":R,id:"".concat(i,"-more"),"aria-expanded":C,onKeyDown:z},A));return b.createElement("div",{className:Me("".concat(n,"-nav-operations"),u),style:c,ref:e},q,b.createElement(ZTt,{prefixCls:n,locale:o,editable:d}))});const vBn=b.memo(bBn,function(t,e){return e.tabMoving});var yBn=function(e){var n=e.prefixCls,i=e.id,r=e.active,o=e.tab,s=o.key,a=o.label,l=o.disabled,c=o.closeIcon,u=o.icon,d=e.closable,h=e.renderWrapper,f=e.removeAriaLabel,m=e.editable,p=e.onClick,g=e.onFocus,y=e.style,_="".concat(n,"-tab"),w=XTt(d,c,m,l);function C(k){l||p(k)}function N(k){k.preventDefault(),k.stopPropagation(),m.onEdit("remove",{key:s,event:k})}var E=b.useMemo(function(){return u&&typeof a=="string"?b.createElement("span",null,a):a},[a,u]),D=b.createElement("div",{key:s,"data-node-key":YTt(s),className:Me(_,ye(ye(ye({},"".concat(_,"-with-remove"),w),"".concat(_,"-active"),r),"".concat(_,"-disabled"),l)),style:y,onClick:C},b.createElement("div",{role:"tab","aria-selected":r,id:i&&"".concat(i,"-tab-").concat(s),className:"".concat(_,"-btn"),"aria-controls":i&&"".concat(i,"-panel-").concat(s),"aria-disabled":l,tabIndex:l?null:0,onClick:function(M){M.stopPropagation(),C(M)},onKeyDown:function(M){[Wt.SPACE,Wt.ENTER].includes(M.which)&&(M.preventDefault(),C(M))},onFocus:g},u&&b.createElement("span",{className:"".concat(_,"-icon")},u),a&&E),w&&b.createElement("button",{type:"button","aria-label":f||"remove",tabIndex:0,className:"".concat(_,"-remove"),onClick:function(M){M.stopPropagation(),N(M)}},c||m.removeIcon||"×"));return h?h(D):D},_Bn=function(e,n){var i=e.offsetWidth,r=e.offsetHeight,o=e.offsetTop,s=e.offsetLeft,a=e.getBoundingClientRect(),l=a.width,c=a.height,u=a.left,d=a.top;return Math.abs(l-i)<1?[l,c,u-n.left,d-n.top]:[i,r,s,o]},HP=function(e){var n=e.current||{},i=n.offsetWidth,r=i===void 0?0:i,o=n.offsetHeight,s=o===void 0?0:o;if(e.current){var a=e.current.getBoundingClientRect(),l=a.width,c=a.height;if(Math.abs(l-r)<1)return[l,c]}return[r,s]},zZ=function(e,n){return e[n?0:1]},qnt=b.forwardRef(function(t,e){var n=t.className,i=t.style,r=t.id,o=t.animated,s=t.activeKey,a=t.rtl,l=t.extra,c=t.editable,u=t.locale,d=t.tabPosition,h=t.tabBarGutter,f=t.children,m=t.onTabClick,p=t.onTabScroll,g=t.indicator,y=b.useContext(Ahe),_=y.prefixCls,w=y.tabs,C=b.useRef(null),N=b.useRef(null),E=b.useRef(null),D=b.useRef(null),k=b.useRef(null),M=b.useRef(null),T=b.useRef(null),A=d==="top"||d==="bottom",R=znt(0,function(We,tt){A&&p&&p({direction:We>tt?"left":"right"})}),P=He(R,2),O=P[0],V=P[1],F=znt(0,function(We,tt){!A&&p&&p({direction:We>tt?"top":"bottom"})}),$=He(F,2),B=$[0],z=$[1],H=b.useState([0,0]),K=He(H,2),q=K[0],U=K[1],Y=b.useState([0,0]),J=He(Y,2),ae=J[0],se=J[1],oe=b.useState([0,0]),fe=He(oe,2),de=fe[0],ie=fe[1],Q=b.useState([0,0]),be=He(Q,2),le=be[0],Ne=be[1],Le=mBn(new Map),Te=He(Le,2),De=Te[0],Pe=Te[1],ge=dBn(w,De,ae[0]),he=zZ(q,A),me=zZ(ae,A),X=zZ(de,A),re=zZ(le,A),we=Math.floor(he)<Math.floor(me+X),ue=we?he-re:he-X,Ce="".concat(_,"-nav-operations-hidden"),ze=0,Ye=0;A&&a?(ze=0,Ye=Math.max(0,me-ue)):(ze=Math.min(0,ue-me),Ye=0);function Ke(We){return We<ze?ze:We>Ye?Ye:We}var Xe=b.useRef(null),it=b.useState(),ut=He(it,2),Ge=ut[0],Ee=ut[1];function Se(){Ee(Date.now())}function je(){Xe.current&&clearTimeout(Xe.current)}fBn(D,function(We,tt){function _t(ht,qe){ht(function(ft){var Ct=Ke(ft+qe);return Ct})}return we?(A?_t(V,We):_t(z,tt),je(),Se(),!0):!1}),b.useEffect(function(){return je(),Ge&&(Xe.current=setTimeout(function(){Ee(0)},100)),je},[Ge]);var nt=pBn(ge,ue,A?O:B,me,X,re,Ie(Ie({},t),{},{tabs:w})),rt=He(nt,2),St=rt[0],At=rt[1],Nt=gr(function(){var We=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s,tt=ge.get(We)||{width:0,height:0,left:0,right:0,top:0};if(A){var _t=O;a?tt.right<O?_t=tt.right:tt.right+tt.width>O+ue&&(_t=tt.right+tt.width-ue):tt.left<-O?_t=-tt.left:tt.left+tt.width>-O+ue&&(_t=-(tt.left+tt.width-ue)),z(0),V(Ke(_t))}else{var ht=B;tt.top<-B?ht=-tt.top:tt.top+tt.height>-B+ue&&(ht=-(tt.top+tt.height-ue)),V(0),z(Ke(ht))}}),vt={};d==="top"||d==="bottom"?vt[a?"marginRight":"marginLeft"]=h:vt.marginTop=h;var $t=w.map(function(We,tt){var _t=We.key;return b.createElement(yBn,{id:r,prefixCls:_,key:_t,tab:We,style:tt===0?void 0:vt,closable:We.closable,editable:c,active:_t===s,renderWrapper:f,removeAriaLabel:u==null?void 0:u.removeAriaLabel,onClick:function(qe){m(_t,qe)},onFocus:function(){Nt(_t),Se(),D.current&&(a||(D.current.scrollLeft=0),D.current.scrollTop=0)}})}),ln=function(){return Pe(function(){var tt,_t=new Map,ht=(tt=k.current)===null||tt===void 0?void 0:tt.getBoundingClientRect();return w.forEach(function(qe){var ft,Ct=qe.key,Pt=(ft=k.current)===null||ft===void 0?void 0:ft.querySelector('[data-node-key="'.concat(YTt(Ct),'"]'));if(Pt){var an=_Bn(Pt,ht),_n=He(an,4),on=_n[0],yn=_n[1],fi=_n[2],oi=_n[3];_t.set(Ct,{width:on,height:yn,left:fi,top:oi})}}),_t})};b.useEffect(function(){ln()},[w.map(function(We){return We.key}).join("_")]);var Jt=GTt(function(){var We=HP(C),tt=HP(N),_t=HP(E);U([We[0]-tt[0]-_t[0],We[1]-tt[1]-_t[1]]);var ht=HP(T);ie(ht);var qe=HP(M);Ne(qe);var ft=HP(k);se([ft[0]-ht[0],ft[1]-ht[1]]),ln()}),en=w.slice(0,St),Ft=w.slice(At+1),dn=[].concat(Ot(en),Ot(Ft)),Ze=ge.get(s),dt=uBn({activeTabOffset:Ze,horizontal:A,indicator:g,rtl:a}),at=dt.style;b.useEffect(function(){Nt()},[s,ze,Ye,Knt(Ze),Knt(ge),A]),b.useEffect(function(){Jt()},[a]);var mt=!!dn.length,It="".concat(_,"-nav-wrap"),Ve,bt,wt,$e;return A?a?(bt=O>0,Ve=O!==Ye):(Ve=O<0,bt=O!==ze):(wt=B<0,$e=B!==ze),b.createElement(Kd,{onResize:Jt},b.createElement("div",{ref:jS(e,C),role:"tablist",className:Me("".concat(_,"-nav"),n),style:i,onKeyDown:function(){Se()}},b.createElement(ake,{ref:N,position:"left",extra:l,prefixCls:_}),b.createElement(Kd,{onResize:Jt},b.createElement("div",{className:Me(It,ye(ye(ye(ye({},"".concat(It,"-ping-left"),Ve),"".concat(It,"-ping-right"),bt),"".concat(It,"-ping-top"),wt),"".concat(It,"-ping-bottom"),$e)),ref:D},b.createElement(Kd,{onResize:Jt},b.createElement("div",{ref:k,className:"".concat(_,"-nav-list"),style:{transform:"translate(".concat(O,"px, ").concat(B,"px)"),transition:Ge?"none":void 0}},$t,b.createElement(ZTt,{ref:T,prefixCls:_,locale:u,editable:c,style:Ie(Ie({},$t.length===0?void 0:vt),{},{visibility:mt?"hidden":null})}),b.createElement("div",{className:Me("".concat(_,"-ink-bar"),ye({},"".concat(_,"-ink-bar-animated"),o.inkBar)),style:at}))))),b.createElement(vBn,lt({},t,{removeAriaLabel:u==null?void 0:u.removeAriaLabel,ref:M,prefixCls:_,tabs:dn,className:!mt&&Ce,tabMoving:!!Ge})),b.createElement(ake,{ref:E,position:"right",extra:l,prefixCls:_})))}),z6e=b.forwardRef(function(t,e){var n=t.prefixCls,i=t.className,r=t.style,o=t.id,s=t.active,a=t.tabKey,l=t.children;return b.createElement("div",{id:o&&"".concat(o,"-panel-").concat(a),role:"tabpanel",tabIndex:s?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(a),"aria-hidden":!s,style:r,className:Me(n,s&&"".concat(n,"-active"),i),ref:e},l)});z6e.displayName="TabPane";var xBn=["renderTabBar"],wBn=["label","key"],QTt=function(e){var n=e.renderTabBar,i=di(e,xBn),r=b.useContext(Ahe),o=r.tabs;if(n){var s=Ie(Ie({},i),{},{panes:o.map(function(a){var l=a.label,c=a.key,u=di(a,wBn);return b.createElement(z6e,lt({tab:l,key:c,tabKey:c},u))})});return n(s,qnt)}return b.createElement(qnt,i)};QTt.displayName="TabNavListWrapper";var CBn=["key","forceRender","style","className","destroyInactiveTabPane"],SBn=function(e){var n=e.id,i=e.activeKey,r=e.animated,o=e.tabPosition,s=e.destroyInactiveTabPane,a=b.useContext(Ahe),l=a.prefixCls,c=a.tabs,u=r.tabPane,d="".concat(l,"-tabpane");return b.createElement("div",{className:Me("".concat(l,"-content-holder"))},b.createElement("div",{className:Me("".concat(l,"-content"),"".concat(l,"-content-").concat(o),ye({},"".concat(l,"-content-animated"),u))},c.map(function(h){var f=h.key,m=h.forceRender,p=h.style,g=h.className,y=h.destroyInactiveTabPane,_=di(h,CBn),w=f===i;return b.createElement(Ou,lt({key:f,visible:w,forceRender:m,removeOnLeave:!!(s||y),leavedClassName:"".concat(d,"-hidden")},r.tabPaneMotion),function(C,N){var E=C.style,D=C.className;return b.createElement(z6e,lt({},_,{prefixCls:d,id:n,tabKey:f,animated:u,active:w,style:Ie(Ie({},p),E),className:Me(g,D),ref:N}))})})))};function NBn(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},e;return t===!1?e={inkBar:!1,tabPane:!1}:t===!0?e={inkBar:!0,tabPane:!1}:e=Ie({inkBar:!0},Un(t)==="object"?t:{}),e.tabPaneMotion&&e.tabPane===void 0&&(e.tabPane=!0),!e.tabPaneMotion&&e.tabPane&&(ii(!1,"`animated.tabPane` is true but `animated.tabPaneMotion` is not provided. Motion will not work."),e.tabPane=!1),e}var EBn=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],Gnt=0,JTt=b.forwardRef(function(t,e){var n=t.id,i=t.prefixCls,r=i===void 0?"rc-tabs":i,o=t.className,s=t.items,a=t.direction,l=t.activeKey,c=t.defaultActiveKey,u=t.editable,d=t.animated,h=t.tabPosition,f=h===void 0?"top":h,m=t.tabBarGutter,p=t.tabBarStyle,g=t.tabBarExtraContent,y=t.locale,_=t.more,w=t.destroyInactiveTabPane,C=t.renderTabBar,N=t.onChange,E=t.onTabClick,D=t.onTabScroll,k=t.getPopupContainer,M=t.popupClassName,T=t.indicator,A=di(t,EBn),R=b.useMemo(function(){return(s||[]).filter(function(le){return le&&Un(le)==="object"&&"key"in le})},[s]),P=a==="rtl",O=NBn(d),V=b.useState(!1),F=He(V,2),$=F[0],B=F[1];b.useEffect(function(){B(fhe())},[]);var z=ho(function(){var le;return(le=R[0])===null||le===void 0?void 0:le.key},{value:l,defaultValue:c}),H=He(z,2),K=H[0],q=H[1],U=b.useState(function(){return R.findIndex(function(le){return le.key===K})}),Y=He(U,2),J=Y[0],ae=Y[1];b.useEffect(function(){var le=R.findIndex(function(Le){return Le.key===K});if(le===-1){var Ne;le=Math.max(0,Math.min(J,R.length-1)),q((Ne=R[le])===null||Ne===void 0?void 0:Ne.key)}ae(le)},[R.map(function(le){return le.key}).join("_"),K,J]);var se=ho(null,{value:n}),oe=He(se,2),fe=oe[0],de=oe[1];b.useEffect(function(){n||(de("rc-tabs-".concat(Gnt)),Gnt+=1)},[]);function ie(le,Ne){E==null||E(le,Ne);var Le=le!==K;q(le),Le&&(N==null||N(le))}var Q={id:fe,activeKey:K,animated:O,tabPosition:f,rtl:P,mobile:$},be=Ie(Ie({},Q),{},{editable:u,locale:y,more:_,tabBarGutter:m,onTabClick:ie,onTabScroll:D,extra:g,style:p,panes:null,getPopupContainer:k,popupClassName:M,indicator:T});return b.createElement(Ahe.Provider,{value:{tabs:R,prefixCls:r}},b.createElement("div",lt({ref:e,id:n,className:Me(r,"".concat(r,"-").concat(f),ye(ye(ye({},"".concat(r,"-mobile"),$),"".concat(r,"-editable"),u),"".concat(r,"-rtl"),P),o)},A),b.createElement(QTt,lt({},be,{renderTabBar:C})),b.createElement(SBn,lt({destroyInactiveTabPane:w},Q,{animated:O}))))});JTt.displayName="Tabs";const DBn={motionAppear:!1,motionEnter:!0,motionLeave:!0};function kBn(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},n;return e===!1?n={inkBar:!1,tabPane:!1}:e===!0?n={inkBar:!0,tabPane:!0}:n=Object.assign({inkBar:!0},typeof e=="object"?e:{}),n.tabPane&&(n.tabPaneMotion=Object.assign(Object.assign({},DBn),{motionName:Bp(t,"switch")})),n}var MBn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};function LBn(t){return t.filter(e=>e)}function TBn(t,e){if(Cr("Tabs").deprecated(!e,"Tabs.TabPane","items"),t)return t;const n=fc(e).map(i=>{if(b.isValidElement(i)){const{key:r,props:o}=i,s=o||{},{tab:a}=s,l=MBn(s,["tab"]);return Object.assign(Object.assign({key:String(r)},l),{label:a})}return null});return LBn(n)}const IBn=t=>{const{componentCls:e,motionDurationSlow:n}=t;return[{[e]:{[`${e}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[ow(t,"slide-up"),ow(t,"slide-down")]]},ABn=t=>{const{componentCls:e,tabsCardPadding:n,cardBg:i,cardGutter:r,colorBorderSecondary:o,itemSelectedColor:s}=t;return{[`${e}-card`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{margin:0,padding:n,background:i,border:`${xe(t.lineWidth)} ${t.lineType} ${o}`,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOut}`},[`${e}-tab-active`]:{color:s,background:t.colorBgContainer},[`${e}-ink-bar`]:{visibility:"hidden"}},[`&${e}-top, &${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginLeft:{_skip_check_:!0,value:xe(r)}}}},[`&${e}-top`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:`${xe(t.borderRadiusLG)} ${xe(t.borderRadiusLG)} 0 0`},[`${e}-tab-active`]:{borderBottomColor:t.colorBgContainer}}},[`&${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:`0 0 ${xe(t.borderRadiusLG)} ${xe(t.borderRadiusLG)}`},[`${e}-tab-active`]:{borderTopColor:t.colorBgContainer}}},[`&${e}-left, &${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginTop:xe(r)}}},[`&${e}-left`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`${xe(t.borderRadiusLG)} 0 0 ${xe(t.borderRadiusLG)}`}},[`${e}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:t.colorBgContainer}}}},[`&${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${xe(t.borderRadiusLG)} ${xe(t.borderRadiusLG)} 0`}},[`${e}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:t.colorBgContainer}}}}}}},RBn=t=>{const{componentCls:e,itemHoverColor:n,dropdownEdgeChildVerticalPadding:i}=t;return{[`${e}-dropdown`]:Object.assign(Object.assign({},fo(t)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:t.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${e}-dropdown-menu`]:{maxHeight:t.tabsDropdownHeight,margin:0,padding:`${xe(i)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:t.colorBgContainer,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,"&-item":Object.assign(Object.assign({},Mm),{display:"flex",alignItems:"center",minWidth:t.tabsDropdownWidth,margin:0,padding:`${xe(t.paddingXXS)} ${xe(t.paddingSM)}`,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${t.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:t.marginSM},color:t.colorTextDescription,fontSize:t.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:t.controlItemBgHover},"&-disabled":{"&, &:hover":{color:t.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},PBn=t=>{const{componentCls:e,margin:n,colorBorderSecondary:i,horizontalMargin:r,verticalItemPadding:o,verticalItemMargin:s,calc:a}=t;return{[`${e}-top, ${e}-bottom`]:{flexDirection:"column",[`> ${e}-nav, > div > ${e}-nav`]:{margin:r,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${xe(t.lineWidth)} ${t.lineType} ${i}`,content:"''"},[`${e}-ink-bar`]:{height:t.lineWidthBold,"&-animated":{transition:`width ${t.motionDurationSlow}, left ${t.motionDurationSlow},
            right ${t.motionDurationSlow}`}},[`${e}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:t.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:t.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:t.boxShadowTabsOverflowRight},[`&${e}-nav-wrap-ping-left::before`]:{opacity:1},[`&${e}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${e}-top`]:{[`> ${e}-nav,
        > div > ${e}-nav`]:{"&::before":{bottom:0},[`${e}-ink-bar`]:{bottom:0}}},[`${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${e}-ink-bar`]:{top:0}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{order:0}},[`${e}-left, ${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{flexDirection:"column",minWidth:a(t.controlHeight).mul(1.25).equal(),[`${e}-tab`]:{padding:o,textAlign:"center"},[`${e}-tab + ${e}-tab`]:{margin:s},[`${e}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:t.controlHeight},"&::before":{top:0,boxShadow:t.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:t.boxShadowTabsOverflowBottom},[`&${e}-nav-wrap-ping-top::before`]:{opacity:1},[`&${e}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${e}-ink-bar`]:{width:t.lineWidthBold,"&-animated":{transition:`height ${t.motionDurationSlow}, top ${t.motionDurationSlow}`}},[`${e}-nav-list, ${e}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${e}-left`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{marginLeft:{_skip_check_:!0,value:xe(a(t.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${xe(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},[`> ${e}-content > ${e}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:t.paddingLG}}}},[`${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{order:1,[`${e}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:a(t.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${xe(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},[`> ${e}-content > ${e}-tabpane`]:{paddingRight:{_skip_check_:!0,value:t.paddingLG}}}}}},OBn=t=>{const{componentCls:e,cardPaddingSM:n,cardPaddingLG:i,horizontalItemPaddingSM:r,horizontalItemPaddingLG:o}=t;return{[e]:{"&-small":{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:r,fontSize:t.titleFontSizeSM}}},"&-large":{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:o,fontSize:t.titleFontSizeLG}}}},[`${e}-card`]:{[`&${e}-small`]:{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:n}},[`&${e}-bottom`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:`0 0 ${xe(t.borderRadius)} ${xe(t.borderRadius)}`}},[`&${e}-top`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:`${xe(t.borderRadius)} ${xe(t.borderRadius)} 0 0`}},[`&${e}-right`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${xe(t.borderRadius)} ${xe(t.borderRadius)} 0`}}},[`&${e}-left`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`${xe(t.borderRadius)} 0 0 ${xe(t.borderRadius)}`}}}},[`&${e}-large`]:{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:i}}}}}},jBn=t=>{const{componentCls:e,itemActiveColor:n,itemHoverColor:i,iconCls:r,tabsHorizontalItemMargin:o,horizontalItemPadding:s,itemSelectedColor:a,itemColor:l}=t,c=`${e}-tab`;return{[c]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:s,fontSize:t.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:l,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:n}},j0(t)),"&-btn":{outline:"none",transition:`all ${t.motionDurationSlow}`,[`${c}-icon:not(:last-child)`]:{marginInlineEnd:t.marginSM}},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:t.calc(t.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:t.marginXS},color:t.colorTextDescription,fontSize:t.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}`,"&:hover":{color:t.colorTextHeading}},"&:hover":{color:i},[`&${c}-active ${c}-btn`]:{color:a,textShadow:t.tabsActiveTextShadow},[`&${c}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed"},[`&${c}-disabled ${c}-btn, &${c}-disabled ${e}-remove`]:{"&:focus, &:active":{color:t.colorTextDisabled}},[`& ${c}-remove ${r}`]:{margin:0},[`${r}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:t.marginSM}}},[`${c} + ${c}`]:{margin:{_skip_check_:!0,value:o}}}},FBn=t=>{const{componentCls:e,tabsHorizontalItemMarginRTL:n,iconCls:i,cardGutter:r,calc:o}=t;return{[`${e}-rtl`]:{direction:"rtl",[`${e}-nav`]:{[`${e}-tab`]:{margin:{_skip_check_:!0,value:n},[`${e}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[i]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:xe(t.marginSM)}},[`${e}-tab-remove`]:{marginRight:{_skip_check_:!0,value:xe(t.marginXS)},marginLeft:{_skip_check_:!0,value:xe(o(t.marginXXS).mul(-1).equal())},[i]:{margin:0}}}},[`&${e}-left`]:{[`> ${e}-nav`]:{order:1},[`> ${e}-content-holder`]:{order:0}},[`&${e}-right`]:{[`> ${e}-nav`]:{order:0},[`> ${e}-content-holder`]:{order:1}},[`&${e}-card${e}-top, &${e}-card${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginRight:{_skip_check_:!0,value:r},marginLeft:{_skip_check_:!0,value:0}}}}},[`${e}-dropdown-rtl`]:{direction:"rtl"},[`${e}-menu-item`]:{[`${e}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},$Bn=t=>{const{componentCls:e,tabsCardPadding:n,cardHeight:i,cardGutter:r,itemHoverColor:o,itemActiveColor:s,colorBorderSecondary:a}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},fo(t)),{display:"flex",[`> ${e}-nav, > div > ${e}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${e}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${t.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${e}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${t.motionDurationSlow}`},[`${e}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${e}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${e}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,color:t.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:t.calc(t.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${e}-nav-add`]:Object.assign({minWidth:i,minHeight:i,marginLeft:{_skip_check_:!0,value:r},padding:`0 ${xe(t.paddingXS)}`,background:"transparent",border:`${xe(t.lineWidth)} ${t.lineType} ${a}`,borderRadius:`${xe(t.borderRadiusLG)} ${xe(t.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:t.colorText,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:s}},j0(t))},[`${e}-extra-content`]:{flex:"none"},[`${e}-ink-bar`]:{position:"absolute",background:t.inkBarColor,pointerEvents:"none"}}),jBn(t)),{[`${e}-content`]:{position:"relative",width:"100%"},[`${e}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${e}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${e}-centered`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-nav-wrap`]:{[`&:not([class*='${e}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}},VBn=t=>{const e=t.controlHeightLG;return{zIndexPopup:t.zIndexPopupBase+50,cardBg:t.colorFillAlter,cardHeight:e,cardPadding:`${(e-Math.round(t.fontSize*t.lineHeight))/2-t.lineWidth}px ${t.padding}px`,cardPaddingSM:`${t.paddingXXS*1.5}px ${t.padding}px`,cardPaddingLG:`${t.paddingXS}px ${t.padding}px ${t.paddingXXS*1.5}px`,titleFontSize:t.fontSize,titleFontSizeLG:t.fontSizeLG,titleFontSizeSM:t.fontSize,inkBarColor:t.colorPrimary,horizontalMargin:`0 0 ${t.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${t.paddingSM}px 0`,horizontalItemPaddingSM:`${t.paddingXS}px 0`,horizontalItemPaddingLG:`${t.padding}px 0`,verticalItemPadding:`${t.paddingXS}px ${t.paddingLG}px`,verticalItemMargin:`${t.margin}px 0 0 0`,itemColor:t.colorText,itemSelectedColor:t.colorPrimary,itemHoverColor:t.colorPrimaryHover,itemActiveColor:t.colorPrimaryActive,cardGutter:t.marginXXS/2}},BBn=Jr("Tabs",t=>{const e=mr(t,{tabsCardPadding:t.cardPadding,dropdownEdgeChildVerticalPadding:t.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${xe(t.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${xe(t.horizontalItemGutter)}`});return[OBn(e),FBn(e),PBn(e),RBn(e),ABn(e),$Bn(e),IBn(e)]},VBn),eIt=()=>null;eIt.displayName="DeprecatedTabPane";var zBn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const Rhe=t=>{var e,n,i,r,o,s,a,l,c,u,d;const{type:h,className:f,rootClassName:m,size:p,onEdit:g,hideAdd:y,centered:_,addIcon:w,removeIcon:C,moreIcon:N,more:E,popupClassName:D,children:k,items:M,animated:T,style:A,indicatorSize:R,indicator:P}=t,O=zBn(t,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator"]),{prefixCls:V}=O,{direction:F,tabs:$,getPrefixCls:B,getPopupContainer:z}=b.useContext(jn),H=B("tabs",V),K=Il(H),[q,U,Y]=BBn(H,K);let J;h==="editable-card"&&(J={onEdit:(Q,be)=>{let{key:le,event:Ne}=be;g==null||g(Q==="add"?Ne:le,Q)},removeIcon:(e=C??($==null?void 0:$.removeIcon))!==null&&e!==void 0?e:b.createElement(vb,null),addIcon:(w??($==null?void 0:$.addIcon))||b.createElement(B6e,null),showAdd:y!==!0});const ae=B();{const Q=Cr("Tabs");Q(!("onPrevClick"in t)&&!("onNextClick"in t),"breaking","`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead."),Q(!(R||$!=null&&$.indicatorSize),"deprecated","`indicatorSize` has been deprecated. Please use `indicator={{ size: ... }}` instead.")}const se=Hc(p),oe=TBn(M,k),fe=kBn(H,T),de=Object.assign(Object.assign({},$==null?void 0:$.style),A),ie={align:(n=P==null?void 0:P.align)!==null&&n!==void 0?n:(i=$==null?void 0:$.indicator)===null||i===void 0?void 0:i.align,size:(a=(o=(r=P==null?void 0:P.size)!==null&&r!==void 0?r:R)!==null&&o!==void 0?o:(s=$==null?void 0:$.indicator)===null||s===void 0?void 0:s.size)!==null&&a!==void 0?a:$==null?void 0:$.indicatorSize};return q(b.createElement(JTt,Object.assign({direction:F,getPopupContainer:z},O,{items:oe,className:Me({[`${H}-${se}`]:se,[`${H}-card`]:["card","editable-card"].includes(h),[`${H}-editable-card`]:h==="editable-card",[`${H}-centered`]:_},$==null?void 0:$.className,f,m,U,Y,K),popupClassName:Me(D,U,Y,K),style:de,editable:J,more:Object.assign({icon:(d=(u=(c=(l=$==null?void 0:$.more)===null||l===void 0?void 0:l.icon)!==null&&c!==void 0?c:$==null?void 0:$.moreIcon)!==null&&u!==void 0?u:N)!==null&&d!==void 0?d:b.createElement(Nhe,null),transitionName:`${ae}-slide-up`},E),prefixCls:H,animated:fe,indicator:ie})))};Rhe.TabPane=eIt;Rhe.displayName="Tabs";var HBn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const tIt=t=>{var{prefixCls:e,className:n,hoverable:i=!0}=t,r=HBn(t,["prefixCls","className","hoverable"]);const{getPrefixCls:o}=b.useContext(jn),s=o("card",e),a=Me(`${s}-grid`,n,{[`${s}-grid-hoverable`]:i});return b.createElement("div",Object.assign({},r,{className:a}))},WBn=t=>{const{antCls:e,componentCls:n,headerHeight:i,cardPaddingBase:r,tabsMarginBottom:o}=t;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:i,marginBottom:-1,padding:`0 ${xe(r)}`,color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.headerFontSize,background:t.headerBg,borderBottom:`${xe(t.lineWidth)} ${t.lineType} ${t.colorBorderSecondary}`,borderRadius:`${xe(t.borderRadiusLG)} ${xe(t.borderRadiusLG)} 0 0`},O0()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},Mm),{[`
          > ${n}-typography,
          > ${n}-typography-edit-content
        `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${e}-tabs-top`]:{clear:"both",marginBottom:o,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,"&-bar":{borderBottom:`${xe(t.lineWidth)} ${t.lineType} ${t.colorBorderSecondary}`}}})},UBn=t=>{const{cardPaddingBase:e,colorBorderSecondary:n,cardShadow:i,lineWidth:r}=t;return{width:"33.33%",padding:e,border:0,borderRadius:0,boxShadow:`
      ${xe(r)} 0 0 0 ${n},
      0 ${xe(r)} 0 0 ${n},
      ${xe(r)} ${xe(r)} 0 0 ${n},
      ${xe(r)} 0 0 0 ${n} inset,
      0 ${xe(r)} 0 0 ${n} inset;
    `,transition:`all ${t.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:i}}},KBn=t=>{const{componentCls:e,iconCls:n,actionsLiMargin:i,cardActionsIconSize:r,colorBorderSecondary:o,actionsBg:s}=t;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:s,borderTop:`${xe(t.lineWidth)} ${t.lineType} ${o}`,display:"flex",borderRadius:`0 0 ${xe(t.borderRadiusLG)} ${xe(t.borderRadiusLG)}`},O0()),{"& > li":{margin:i,color:t.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:t.calc(t.cardActionsIconSize).mul(2).equal(),fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer","&:hover":{color:t.colorPrimary,transition:`color ${t.motionDurationMid}`},[`a:not(${e}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:t.colorTextDescription,lineHeight:xe(t.fontHeight),transition:`color ${t.motionDurationMid}`,"&:hover":{color:t.colorPrimary}},[`> ${n}`]:{fontSize:r,lineHeight:xe(t.calc(r).mul(t.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${xe(t.lineWidth)} ${t.lineType} ${o}`}}})},qBn=t=>Object.assign(Object.assign({margin:`${xe(t.calc(t.marginXXS).mul(-1).equal())} 0`,display:"flex"},O0()),{"&-avatar":{paddingInlineEnd:t.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:t.marginXS}},"&-title":Object.assign({color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.fontSizeLG},Mm),"&-description":{color:t.colorTextDescription}}),GBn=t=>{const{componentCls:e,cardPaddingBase:n,colorFillAlter:i}=t;return{[`${e}-head`]:{padding:`0 ${xe(n)}`,background:i,"&-title":{fontSize:t.fontSize}},[`${e}-body`]:{padding:`${xe(t.padding)} ${xe(n)}`}}},YBn=t=>{const{componentCls:e}=t;return{overflow:"hidden",[`${e}-body`]:{userSelect:"none"}}},XBn=t=>{const{componentCls:e,cardShadow:n,cardHeadPadding:i,colorBorderSecondary:r,boxShadowTertiary:o,cardPaddingBase:s,extraColor:a}=t;return{[e]:Object.assign(Object.assign({},fo(t)),{position:"relative",background:t.colorBgContainer,borderRadius:t.borderRadiusLG,[`&:not(${e}-bordered)`]:{boxShadow:o},[`${e}-head`]:WBn(t),[`${e}-extra`]:{marginInlineStart:"auto",color:a,fontWeight:"normal",fontSize:t.fontSize},[`${e}-body`]:Object.assign({padding:s,borderRadius:`0 0 ${xe(t.borderRadiusLG)} ${xe(t.borderRadiusLG)}`},O0()),[`${e}-grid`]:UBn(t),[`${e}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${xe(t.borderRadiusLG)} ${xe(t.borderRadiusLG)} 0 0`}},[`${e}-actions`]:KBn(t),[`${e}-meta`]:qBn(t)}),[`${e}-bordered`]:{border:`${xe(t.lineWidth)} ${t.lineType} ${r}`,[`${e}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${e}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${t.motionDurationMid}, border-color ${t.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${e}-contain-grid`]:{borderRadius:`${xe(t.borderRadiusLG)} ${xe(t.borderRadiusLG)} 0 0 `,[`${e}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${e}-loading) ${e}-body`]:{marginBlockStart:t.calc(t.lineWidth).mul(-1).equal(),marginInlineStart:t.calc(t.lineWidth).mul(-1).equal(),padding:0}},[`${e}-contain-tabs`]:{[`> div${e}-head`]:{minHeight:0,[`${e}-head-title, ${e}-extra`]:{paddingTop:i}}},[`${e}-type-inner`]:GBn(t),[`${e}-loading`]:YBn(t),[`${e}-rtl`]:{direction:"rtl"}}},ZBn=t=>{const{componentCls:e,cardPaddingSM:n,headerHeightSM:i,headerFontSizeSM:r}=t;return{[`${e}-small`]:{[`> ${e}-head`]:{minHeight:i,padding:`0 ${xe(n)}`,fontSize:r,[`> ${e}-head-wrapper`]:{[`> ${e}-extra`]:{fontSize:t.fontSize}}},[`> ${e}-body`]:{padding:n}},[`${e}-small${e}-contain-tabs`]:{[`> ${e}-head`]:{[`${e}-head-title, ${e}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}},QBn=t=>({headerBg:"transparent",headerFontSize:t.fontSizeLG,headerFontSizeSM:t.fontSize,headerHeight:t.fontSizeLG*t.lineHeightLG+t.padding*2,headerHeightSM:t.fontSize*t.lineHeight+t.paddingXS*2,actionsBg:t.colorBgContainer,actionsLiMargin:`${t.paddingSM}px 0`,tabsMarginBottom:-t.padding-t.lineWidth,extraColor:t.colorText}),JBn=Jr("Card",t=>{const e=mr(t,{cardShadow:t.boxShadowCard,cardHeadPadding:t.padding,cardPaddingBase:t.paddingLG,cardActionsIconSize:t.fontSize,cardPaddingSM:12});return[XBn(e),ZBn(e)]},QBn);var Ynt=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const ezn=t=>{const{actionClasses:e,actions:n=[],actionStyle:i}=t;return b.createElement("ul",{className:e,style:i},n.map((r,o)=>{const s=`action-${o}`;return b.createElement("li",{style:{width:`${100/n.length}%`},key:s},b.createElement("span",null,r))}))},tzn=b.forwardRef((t,e)=>{const{prefixCls:n,className:i,rootClassName:r,style:o,extra:s,headStyle:a={},bodyStyle:l={},title:c,loading:u,bordered:d=!0,size:h,type:f,cover:m,actions:p,tabList:g,children:y,activeTabKey:_,defaultActiveTabKey:w,tabBarExtraContent:C,hoverable:N,tabProps:E={},classNames:D,styles:k}=t,M=Ynt(t,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:T,direction:A,card:R}=b.useContext(jn);{const De=Cr("Card");[["headStyle","styles.header"],["bodyStyle","styles.body"]].forEach(Pe=>{let[ge,he]=Pe;De.deprecated(!(ge in t),ge,he)})}const P=De=>{var Pe;(Pe=t.onTabChange)===null||Pe===void 0||Pe.call(t,De)},O=De=>{var Pe;return Me((Pe=R==null?void 0:R.classNames)===null||Pe===void 0?void 0:Pe[De],D==null?void 0:D[De])},V=De=>{var Pe;return Object.assign(Object.assign({},(Pe=R==null?void 0:R.styles)===null||Pe===void 0?void 0:Pe[De]),k==null?void 0:k[De])},F=b.useMemo(()=>{let De=!1;return b.Children.forEach(y,Pe=>{(Pe==null?void 0:Pe.type)===tIt&&(De=!0)}),De},[y]),$=T("card",n),[B,z,H]=JBn($),K=b.createElement(ja,{loading:!0,active:!0,paragraph:{rows:4},title:!1},y),q=_!==void 0,U=Object.assign(Object.assign({},E),{[q?"activeKey":"defaultActiveKey"]:q?_:w,tabBarExtraContent:C});let Y;const J=Hc(h),ae=!J||J==="default"?"large":J,se=g?b.createElement(Rhe,Object.assign({size:ae},U,{className:`${$}-head-tabs`,onChange:P,items:g.map(De=>{var{tab:Pe}=De,ge=Ynt(De,["tab"]);return Object.assign({label:Pe},ge)})})):null;if(c||s||se){const De=Me(`${$}-head`,O("header")),Pe=Me(`${$}-head-title`,O("title")),ge=Me(`${$}-extra`,O("extra")),he=Object.assign(Object.assign({},a),V("header"));Y=b.createElement("div",{className:De,style:he},b.createElement("div",{className:`${$}-head-wrapper`},c&&b.createElement("div",{className:Pe,style:V("title")},c),s&&b.createElement("div",{className:ge,style:V("extra")},s)),se)}const oe=Me(`${$}-cover`,O("cover")),fe=m?b.createElement("div",{className:oe,style:V("cover")},m):null,de=Me(`${$}-body`,O("body")),ie=Object.assign(Object.assign({},l),V("body")),Q=b.createElement("div",{className:de,style:ie},u?K:y),be=Me(`${$}-actions`,O("actions")),le=p!=null&&p.length?b.createElement(ezn,{actionClasses:be,actionStyle:V("actions"),actions:p}):null,Ne=Zs(M,["onTabChange"]),Le=Me($,R==null?void 0:R.className,{[`${$}-loading`]:u,[`${$}-bordered`]:d,[`${$}-hoverable`]:N,[`${$}-contain-grid`]:F,[`${$}-contain-tabs`]:g==null?void 0:g.length,[`${$}-${J}`]:J,[`${$}-type-${f}`]:!!f,[`${$}-rtl`]:A==="rtl"},i,r,z,H),Te=Object.assign(Object.assign({},R==null?void 0:R.style),o);return B(b.createElement("div",Object.assign({ref:e},Ne,{className:Le,style:Te}),Y,fe,Q,le))});var nzn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const izn=t=>{const{prefixCls:e,className:n,avatar:i,title:r,description:o}=t,s=nzn(t,["prefixCls","className","avatar","title","description"]),{getPrefixCls:a}=b.useContext(jn),l=a("card",e),c=Me(`${l}-meta`,n),u=i?b.createElement("div",{className:`${l}-meta-avatar`},i):null,d=r?b.createElement("div",{className:`${l}-meta-title`},r):null,h=o?b.createElement("div",{className:`${l}-meta-description`},o):null,f=d||h?b.createElement("div",{className:`${l}-meta-detail`},d,h):null;return b.createElement("div",Object.assign({},s,{className:c}),u,f)},uo=tzn;uo.Grid=tIt;uo.Meta=izn;uo.displayName="Card";function rzn(t,e,n){var i=n||{},r=i.noTrailing,o=r===void 0?!1:r,s=i.noLeading,a=s===void 0?!1:s,l=i.debounceMode,c=l===void 0?void 0:l,u,d=!1,h=0;function f(){u&&clearTimeout(u)}function m(g){var y=g||{},_=y.upcomingOnly,w=_===void 0?!1:_;f(),d=!w}function p(){for(var g=arguments.length,y=new Array(g),_=0;_<g;_++)y[_]=arguments[_];var w=this,C=Date.now()-h;if(d)return;function N(){h=Date.now(),e.apply(w,y)}function E(){u=void 0}!a&&c&&!u&&N(),f(),c===void 0&&C>t?a?(h=Date.now(),o||(u=setTimeout(c?E:N,t))):N():o!==!0&&(u=setTimeout(c?E:N,c===void 0?t-C:t))}return p.cancel=m,p}function ozn(t,e,n){var i={},r=i.atBegin,o=r===void 0?!1:r;return rzn(t,e,{debounceMode:o!==!1})}function dp(t,e){return t[e]}var szn=["children"];function nIt(t,e){return"".concat(t,"-").concat(e)}function azn(t){return t&&t.type&&t.type.isTreeNode}function ZK(t,e){return t??e}function Wj(t){var e=t||{},n=e.title,i=e._title,r=e.key,o=e.children,s=n||"title";return{title:s,_title:i||[s],key:r||"key",children:o||"children"}}function lzn(t,e){var n=new Map;function i(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(r||[]).forEach(function(s){var a=s[e.key],l=s[e.children];ii(a!=null,"Tree node must have a certain key: [".concat(o).concat(a,"]"));var c=String(a);ii(!n.has(c)||a===null||a===void 0,"Same 'key' exist in the Tree: ".concat(c)),n.set(c,!0),i(l,"".concat(o).concat(c," > "))})}i(t)}function iIt(t){function e(n){var i=fc(n);return i.map(function(r){if(!azn(r))return ii(!r,"Tree/TreeNode can only accept TreeNode as children."),null;var o=r.key,s=r.props,a=s.children,l=di(s,szn),c=Ie({key:o},l),u=e(a);return u.length&&(c.children=u),c}).filter(function(r){return r})}return e(t)}function Lxe(t,e,n){var i=Wj(n),r=i._title,o=i.key,s=i.children,a=new Set(e===!0?[]:e),l=[];function c(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return u.map(function(h,f){for(var m=nIt(d?d.pos:"0",f),p=ZK(h[o],m),g,y=0;y<r.length;y+=1){var _=r[y];if(h[_]!==void 0){g=h[_];break}}var w=Object.assign(Zs(h,[].concat(Ot(r),[o,s])),{title:g,key:p,parent:d,pos:m,children:null,data:h,isStart:[].concat(Ot(d?d.isStart:[]),[f===0]),isEnd:[].concat(Ot(d?d.isEnd:[]),[f===u.length-1])});return l.push(w),e===!0||a.has(p)?w.children=c(h[s]||[],w):w.children=[],w})}return c(t),l}function czn(t,e,n){var i={};Un(n)==="object"?i=n:i={externalGetKey:n},i=i||{};var r=i,o=r.childrenPropName,s=r.externalGetKey,a=r.fieldNames,l=Wj(a),c=l.key,u=l.children,d=o||u,h;s?typeof s=="string"?h=function(p){return p[s]}:typeof s=="function"&&(h=function(p){return s(p)}):h=function(p,g){return ZK(p[c],g)};function f(m,p,g,y){var _=m?m[d]:t,w=m?nIt(g.pos,p):"0",C=m?[].concat(Ot(y),[m]):[];if(m){var N=h(m,w),E={node:m,index:p,pos:w,key:N,parentPos:g.node?g.pos:null,level:g.level+1,nodes:C};e(E)}_&&_.forEach(function(D,k){f(D,k,{node:m,pos:w,level:g?g.level+1:-1},C)})}f(null)}function H6e(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.initWrapper,i=e.processEntity,r=e.onProcessFinished,o=e.externalGetKey,s=e.childrenPropName,a=e.fieldNames,l=arguments.length>2?arguments[2]:void 0,c=o||l,u={},d={},h={posEntities:u,keyEntities:d};return n&&(h=n(h)||h),czn(t,function(f){var m=f.node,p=f.index,g=f.pos,y=f.key,_=f.parentPos,w=f.level,C=f.nodes,N={node:m,nodes:C,index:p,key:y,pos:g,level:w},E=ZK(y,g);u[g]=N,d[E]=N,N.parent=u[_],N.parent&&(N.parent.children=N.parent.children||[],N.parent.children.push(N)),i&&i(N,h)},{externalGetKey:c,childrenPropName:s,fieldNames:a}),r&&r(h),h}function R9(t,e){var n=e.expandedKeys,i=e.selectedKeys,r=e.loadedKeys,o=e.loadingKeys,s=e.checkedKeys,a=e.halfCheckedKeys,l=e.dragOverNodeKey,c=e.dropPosition,u=e.keyEntities,d=dp(u,t),h={eventKey:t,expanded:n.indexOf(t)!==-1,selected:i.indexOf(t)!==-1,loaded:r.indexOf(t)!==-1,loading:o.indexOf(t)!==-1,checked:s.indexOf(t)!==-1,halfChecked:a.indexOf(t)!==-1,pos:String(d?d.pos:""),dragOver:l===t&&c===0,dragOverGapTop:l===t&&c===-1,dragOverGapBottom:l===t&&c===1};return h}function _u(t){var e=t.data,n=t.expanded,i=t.selected,r=t.checked,o=t.loaded,s=t.loading,a=t.halfChecked,l=t.dragOver,c=t.dragOverGapTop,u=t.dragOverGapBottom,d=t.pos,h=t.active,f=t.eventKey,m=Ie(Ie({},e),{},{expanded:n,selected:i,checked:r,loaded:o,loading:s,halfChecked:a,dragOver:l,dragOverGapTop:c,dragOverGapBottom:u,pos:d,active:h,key:f});return"props"in m||Object.defineProperty(m,"props",{get:function(){return ii(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),t}}),m}function rIt(t,e){var n=new Set;return t.forEach(function(i){e.has(i)||n.add(i)}),n}function uzn(t){var e=t||{},n=e.disabled,i=e.disableCheckbox,r=e.checkable;return!!(n||i)||r===!1}function dzn(t,e,n,i){for(var r=new Set(t),o=new Set,s=0;s<=n;s+=1){var a=e.get(s)||new Set;a.forEach(function(d){var h=d.key,f=d.node,m=d.children,p=m===void 0?[]:m;r.has(h)&&!i(f)&&p.filter(function(g){return!i(g.node)}).forEach(function(g){r.add(g.key)})})}for(var l=new Set,c=n;c>=0;c-=1){var u=e.get(c)||new Set;u.forEach(function(d){var h=d.parent,f=d.node;if(!(i(f)||!d.parent||l.has(d.parent.key))){if(i(d.parent.node)){l.add(h.key);return}var m=!0,p=!1;(h.children||[]).filter(function(g){return!i(g.node)}).forEach(function(g){var y=g.key,_=r.has(y);m&&!_&&(m=!1),!p&&(_||o.has(y))&&(p=!0)}),m&&r.add(h.key),p&&o.add(h.key),l.add(h.key)}})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(rIt(o,r))}}function hzn(t,e,n,i,r){for(var o=new Set(t),s=new Set(e),a=0;a<=i;a+=1){var l=n.get(a)||new Set;l.forEach(function(h){var f=h.key,m=h.node,p=h.children,g=p===void 0?[]:p;!o.has(f)&&!s.has(f)&&!r(m)&&g.filter(function(y){return!r(y.node)}).forEach(function(y){o.delete(y.key)})})}s=new Set;for(var c=new Set,u=i;u>=0;u-=1){var d=n.get(u)||new Set;d.forEach(function(h){var f=h.parent,m=h.node;if(!(r(m)||!h.parent||c.has(h.parent.key))){if(r(h.parent.node)){c.add(f.key);return}var p=!0,g=!1;(f.children||[]).filter(function(y){return!r(y.node)}).forEach(function(y){var _=y.key,w=o.has(_);p&&!w&&(p=!1),!g&&(w||s.has(_))&&(g=!0)}),p||o.delete(f.key),g&&s.add(f.key),c.add(f.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(rIt(s,o))}}function h3(t,e,n,i){var r=[],o;i?o=i:o=uzn;var s=new Set(t.filter(function(u){var d=!!dp(n,u);return d||r.push(u),d})),a=new Map,l=0;Object.keys(n).forEach(function(u){var d=n[u],h=d.level,f=a.get(h);f||(f=new Set,a.set(h,f)),f.add(d),l=Math.max(l,h)}),ii(!r.length,"Tree missing follow keys: ".concat(r.slice(0,100).map(function(u){return"'".concat(u,"'")}).join(", ")));var c;return e===!0?c=dzn(s,a,l,o):c=hzn(s,e.halfCheckedKeys,a,l,o),c}const fzn=t=>{const{checkboxCls:e}=t,n=`${e}-wrapper`;return[{[`${e}-group`]:Object.assign(Object.assign({},fo(t)),{display:"inline-flex",flexWrap:"wrap",columnGap:t.marginXS,[`> ${t.antCls}-row`]:{flex:1}}),[n]:Object.assign(Object.assign({},fo(t)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[e]:Object.assign(Object.assign({},fo(t)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:t.borderRadiusSM,alignSelf:"center",[`${e}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${e}-inner`]:Object.assign({},iS(t))},[`${e}-inner`]:{boxSizing:"border-box",display:"block",width:t.checkboxSize,height:t.checkboxSize,direction:"ltr",backgroundColor:t.colorBgContainer,border:`${xe(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusSM,borderCollapse:"separate",transition:`all ${t.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:t.calc(t.checkboxSize).div(14).mul(5).equal(),height:t.calc(t.checkboxSize).div(14).mul(8).equal(),border:`${xe(t.lineWidthBold)} solid ${t.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${t.motionDurationFast} ${t.motionEaseInBack}, opacity ${t.motionDurationFast}`}},"& + span":{paddingInlineStart:t.paddingXS,paddingInlineEnd:t.paddingXS}})},{[`
        ${n}:not(${n}-disabled),
        ${e}:not(${e}-disabled)
      `]:{[`&:hover ${e}-inner`]:{borderColor:t.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${e}-checked:not(${e}-disabled) ${e}-inner`]:{backgroundColor:t.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${e}-checked:not(${e}-disabled):after`]:{borderColor:t.colorPrimaryHover}}},{[`${e}-checked`]:{[`${e}-inner`]:{backgroundColor:t.colorPrimary,borderColor:t.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${t.motionDurationMid} ${t.motionEaseOutBack} ${t.motionDurationFast}`}}},[`
        ${n}-checked:not(${n}-disabled),
        ${e}-checked:not(${e}-disabled)
      `]:{[`&:hover ${e}-inner`]:{backgroundColor:t.colorPrimaryHover,borderColor:"transparent"}}},{[e]:{"&-indeterminate":{[`${e}-inner`]:{backgroundColor:`${t.colorBgContainer} !important`,borderColor:`${t.colorBorder} !important`,"&:after":{top:"50%",insetInlineStart:"50%",width:t.calc(t.fontSizeLG).div(2).equal(),height:t.calc(t.fontSizeLG).div(2).equal(),backgroundColor:t.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${e}-inner`]:{backgroundColor:`${t.colorBgContainer} !important`,borderColor:`${t.colorPrimary} !important`}}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${e}-disabled`]:{[`&, ${e}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${e}-inner`]:{background:t.colorBgContainerDisabled,borderColor:t.colorBorder,"&:after":{borderColor:t.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:t.colorTextDisabled},[`&${e}-indeterminate ${e}-inner::after`]:{background:t.colorTextDisabled}}}]};function oIt(t,e){const n=mr(e,{checkboxCls:`.${t}`,checkboxSize:e.controlInteractiveSize});return[fzn(n)]}const sIt=Jr("Checkbox",(t,e)=>{let{prefixCls:n}=e;return[oIt(n,t)]}),aIt=Z.createContext(null);var mzn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const pzn=(t,e)=>{var n;const{prefixCls:i,className:r,rootClassName:o,children:s,indeterminate:a=!1,style:l,onMouseEnter:c,onMouseLeave:u,skipGroup:d=!1,disabled:h}=t,f=mzn(t,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:m,direction:p,checkbox:g}=b.useContext(jn),y=b.useContext(aIt),{isFormItemInput:_}=b.useContext(ju),w=b.useContext(Yd),C=(n=(y==null?void 0:y.disabled)||h)!==null&&n!==void 0?n:w,N=b.useRef(f.value);Cr("Checkbox")("checked"in f||!!y||!("value"in f),"usage","`value` is not a valid prop, do you mean `checked`?"),b.useEffect(()=>{y==null||y.registerValue(f.value)},[]),b.useEffect(()=>{if(!d)return f.value!==N.current&&(y==null||y.cancelValue(N.current),y==null||y.registerValue(f.value),N.current=f.value),()=>y==null?void 0:y.cancelValue(f.value)},[f.value]);const E=m("checkbox",i),D=Il(E),[k,M,T]=sIt(E,D),A=Object.assign({},f);y&&!d&&(A.onChange=function(){f.onChange&&f.onChange.apply(f,arguments),y.toggleOption&&y.toggleOption({label:s,value:f.value})},A.name=y.name,A.checked=y.value.includes(f.value));const R=Me(`${E}-wrapper`,{[`${E}-rtl`]:p==="rtl",[`${E}-wrapper-checked`]:A.checked,[`${E}-wrapper-disabled`]:C,[`${E}-wrapper-in-form-item`]:_},g==null?void 0:g.className,r,o,T,D,M),P=Me({[`${E}-indeterminate`]:a},nhe,M),O=a?"mixed":void 0;return k(b.createElement(o6,{component:"Checkbox",disabled:C},b.createElement("label",{className:R,style:Object.assign(Object.assign({},g==null?void 0:g.style),l),onMouseEnter:c,onMouseLeave:u},b.createElement(VTt,Object.assign({"aria-checked":O},A,{prefixCls:E,className:P,disabled:C,ref:e})),s!==void 0&&b.createElement("span",null,s))))},W6e=b.forwardRef(pzn);W6e.displayName="Checkbox";var gzn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const bzn=b.forwardRef((t,e)=>{const{defaultValue:n,children:i,options:r=[],prefixCls:o,className:s,rootClassName:a,style:l,onChange:c}=t,u=gzn(t,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:d,direction:h}=b.useContext(jn),[f,m]=b.useState(u.value||n||[]),[p,g]=b.useState([]);b.useEffect(()=>{"value"in u&&m(u.value||[])},[u.value]);const y=b.useMemo(()=>r.map(V=>typeof V=="string"||typeof V=="number"?{label:V,value:V}:V),[r]),_=V=>{g(F=>F.filter($=>$!==V))},w=V=>{g(F=>[].concat(Ot(F),[V]))},C=V=>{const F=f.indexOf(V.value),$=Ot(f);F===-1?$.push(V.value):$.splice(F,1),"value"in u||m($),c==null||c($.filter(B=>p.includes(B)).sort((B,z)=>{const H=y.findIndex(q=>q.value===B),K=y.findIndex(q=>q.value===z);return H-K}))},N=d("checkbox",o),E=`${N}-group`,D=Il(N),[k,M,T]=sIt(N,D),A=Zs(u,["value","disabled"]),R=r.length?y.map(V=>b.createElement(W6e,{prefixCls:N,key:V.value.toString(),disabled:"disabled"in V?V.disabled:u.disabled,value:V.value,checked:f.includes(V.value),onChange:V.onChange,className:`${E}-item`,style:V.style,title:V.title,id:V.id,required:V.required},V.label)):i,P={toggleOption:C,value:f,disabled:u.disabled,name:u.name,registerValue:w,cancelValue:_},O=Me(E,{[`${E}-rtl`]:h==="rtl"},s,a,T,D,M);return k(b.createElement("div",Object.assign({className:O,style:l},A,{ref:e}),b.createElement(aIt.Provider,{value:P},R)))}),I2=W6e;I2.Group=bzn;I2.__ANT_CHECKBOX=!0;I2.displayName="Checkbox";const lIt=b.createContext({}),vzn=t=>{const{componentCls:e}=t;return{[e]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},yzn=t=>{const{componentCls:e}=t;return{[e]:{position:"relative",maxWidth:"100%",minHeight:1}}},_zn=(t,e)=>{const{prefixCls:n,componentCls:i,gridColumns:r}=t,o={};for(let s=r;s>=0;s--)s===0?(o[`${i}${e}-${s}`]={display:"none"},o[`${i}-push-${s}`]={insetInlineStart:"auto"},o[`${i}-pull-${s}`]={insetInlineEnd:"auto"},o[`${i}${e}-push-${s}`]={insetInlineStart:"auto"},o[`${i}${e}-pull-${s}`]={insetInlineEnd:"auto"},o[`${i}${e}-offset-${s}`]={marginInlineStart:0},o[`${i}${e}-order-${s}`]={order:0}):(o[`${i}${e}-${s}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${s/r*100}%`,maxWidth:`${s/r*100}%`}],o[`${i}${e}-push-${s}`]={insetInlineStart:`${s/r*100}%`},o[`${i}${e}-pull-${s}`]={insetInlineEnd:`${s/r*100}%`},o[`${i}${e}-offset-${s}`]={marginInlineStart:`${s/r*100}%`},o[`${i}${e}-order-${s}`]={order:s});return o[`${i}${e}-flex`]={flex:`var(--${n}${e}-flex)`},o},lke=(t,e)=>_zn(t,e),xzn=(t,e,n)=>({[`@media (min-width: ${xe(e)})`]:Object.assign({},lke(t,n))}),wzn=()=>({}),Czn=()=>({}),Szn=Jr("Grid",vzn,wzn),Nzn=Jr("Grid",t=>{const e=mr(t,{gridColumns:24}),n={"-sm":e.screenSMMin,"-md":e.screenMDMin,"-lg":e.screenLGMin,"-xl":e.screenXLMin,"-xxl":e.screenXXLMin};return[yzn(e),lke(e,""),lke(e,"-xs"),Object.keys(n).map(i=>xzn(e,n[i],i)).reduce((i,r)=>Object.assign(Object.assign({},i),r),{})]},Czn);var Ezn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};function Xnt(t){return typeof t=="number"?`${t} ${t} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(t)?`0 0 ${t}`:t}const Dzn=["xs","sm","md","lg","xl","xxl"],U6e=b.forwardRef((t,e)=>{const{getPrefixCls:n,direction:i}=b.useContext(jn),{gutter:r,wrap:o}=b.useContext(lIt),{prefixCls:s,span:a,order:l,offset:c,push:u,pull:d,className:h,children:f,flex:m,style:p}=t,g=Ezn(t,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),y=n("col",s),[_,w,C]=Nzn(y),N={};let E={};Dzn.forEach(M=>{let T={};const A=t[M];typeof A=="number"?T.span=A:typeof A=="object"&&(T=A||{}),delete g[M],E=Object.assign(Object.assign({},E),{[`${y}-${M}-${T.span}`]:T.span!==void 0,[`${y}-${M}-order-${T.order}`]:T.order||T.order===0,[`${y}-${M}-offset-${T.offset}`]:T.offset||T.offset===0,[`${y}-${M}-push-${T.push}`]:T.push||T.push===0,[`${y}-${M}-pull-${T.pull}`]:T.pull||T.pull===0,[`${y}-rtl`]:i==="rtl"}),T.flex&&(E[`${y}-${M}-flex`]=!0,N[`--${y}-${M}-flex`]=Xnt(T.flex))});const D=Me(y,{[`${y}-${a}`]:a!==void 0,[`${y}-order-${l}`]:l,[`${y}-offset-${c}`]:c,[`${y}-push-${u}`]:u,[`${y}-pull-${d}`]:d},h,E,w,C),k={};if(r&&r[0]>0){const M=r[0]/2;k.paddingLeft=M,k.paddingRight=M}return m&&(k.flex=Xnt(m),o===!1&&!k.minWidth&&(k.minWidth=0)),_(b.createElement("div",Object.assign({},g,{style:Object.assign(Object.assign(Object.assign({},k),p),N),className:D,ref:e}),f))});U6e.displayName="Col";var kzn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};function Znt(t,e){const[n,i]=b.useState(typeof t=="string"?t:""),r=()=>{if(typeof t=="string"&&i(t),typeof t=="object")for(let o=0;o<L2.length;o++){const s=L2[o];if(!e[s])continue;const a=t[s];if(a!==void 0){i(a);return}}};return b.useEffect(()=>{r()},[JSON.stringify(t),e]),n}const cIt=b.forwardRef((t,e)=>{const{prefixCls:n,justify:i,align:r,className:o,style:s,children:a,gutter:l=0,wrap:c}=t,u=kzn(t,["prefixCls","justify","align","className","style","children","gutter","wrap"]),{getPrefixCls:d,direction:h}=b.useContext(jn),[f,m]=b.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),[p,g]=b.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),y=Znt(r,p),_=Znt(i,p),w=b.useRef(l),C=gLt();b.useEffect(()=>{const $=C.subscribe(B=>{g(B);const z=w.current||0;(!Array.isArray(z)&&typeof z=="object"||Array.isArray(z)&&(typeof z[0]=="object"||typeof z[1]=="object"))&&m(B)});return()=>C.unsubscribe($)},[]);const N=()=>{const $=[void 0,void 0];return(Array.isArray(l)?l:[l,void 0]).forEach((z,H)=>{if(typeof z=="object")for(let K=0;K<L2.length;K++){const q=L2[K];if(f[q]&&z[q]!==void 0){$[H]=z[q];break}}else $[H]=z}),$},E=d("row",n),[D,k,M]=Szn(E),T=N(),A=Me(E,{[`${E}-no-wrap`]:c===!1,[`${E}-${_}`]:_,[`${E}-${y}`]:y,[`${E}-rtl`]:h==="rtl"},o,k,M),R={},P=T[0]!=null&&T[0]>0?T[0]/-2:void 0;P&&(R.marginLeft=P,R.marginRight=P);const[O,V]=T;R.rowGap=V;const F=b.useMemo(()=>({gutter:[O,V],wrap:c}),[O,V,c]);return D(b.createElement(lIt.Provider,{value:F},b.createElement("div",Object.assign({},u,{className:A,style:Object.assign(Object.assign({},R),s),ref:e}),a)))});cIt.displayName="Row";const Mzn=t=>{const{componentCls:e,sizePaddingEdgeHorizontal:n,colorSplit:i,lineWidth:r,textPaddingInline:o,orientationMargin:s,verticalMarginInline:a}=t;return{[e]:Object.assign(Object.assign({},fo(t)),{borderBlockStart:`${xe(r)} solid ${i}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:a,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${xe(r)} solid ${i}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${xe(t.dividerHorizontalGutterMargin)} 0`},[`&-horizontal${e}-with-text`]:{display:"flex",alignItems:"center",margin:`${xe(t.dividerHorizontalWithTextGutterMargin)} 0`,color:t.colorTextHeading,fontWeight:500,fontSize:t.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${i}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${xe(r)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${e}-with-text-left`]:{"&::before":{width:`calc(${s} * 100%)`},"&::after":{width:`calc(100% - ${s} * 100%)`}},[`&-horizontal${e}-with-text-right`]:{"&::before":{width:`calc(100% - ${s} * 100%)`},"&::after":{width:`calc(${s} * 100%)`}},[`${e}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:i,borderStyle:"dashed",borderWidth:`${xe(r)} 0 0`},[`&-horizontal${e}-with-text${e}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${e}-dashed`]:{borderInlineStartWidth:r,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:i,borderStyle:"dotted",borderWidth:`${xe(r)} 0 0`},[`&-horizontal${e}-with-text${e}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${e}-dotted`]:{borderInlineStartWidth:r,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${e}-with-text`]:{color:t.colorText,fontWeight:"normal",fontSize:t.fontSize},[`&-horizontal${e}-with-text-left${e}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${e}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${e}-with-text-right${e}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${e}-inner-text`]:{paddingInlineEnd:n}}})}},Lzn=t=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:t.marginXS}),Tzn=Jr("Divider",t=>{const e=mr(t,{dividerHorizontalWithTextGutterMargin:t.margin,dividerHorizontalGutterMargin:t.marginLG,sizePaddingEdgeHorizontal:0});return[Mzn(e)]},Lzn,{unitless:{orientationMargin:!0}});var Izn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const ZD=t=>{const{getPrefixCls:e,direction:n,divider:i}=b.useContext(jn),{prefixCls:r,type:o="horizontal",orientation:s="center",orientationMargin:a,className:l,rootClassName:c,children:u,dashed:d,variant:h="solid",plain:f,style:m}=t,p=Izn(t,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style"]),g=e("divider",r),[y,_,w]=Tzn(g),C=!!u,N=s==="left"&&a!=null,E=s==="right"&&a!=null,D=Me(g,i==null?void 0:i.className,_,w,`${g}-${o}`,{[`${g}-with-text`]:C,[`${g}-with-text-${s}`]:C,[`${g}-dashed`]:!!d,[`${g}-${h}`]:h!=="solid",[`${g}-plain`]:!!f,[`${g}-rtl`]:n==="rtl",[`${g}-no-default-orientation-margin-left`]:N,[`${g}-no-default-orientation-margin-right`]:E},l,c),k=b.useMemo(()=>typeof a=="number"?a:/^\d+$/.test(a)?Number(a):a,[a]),M=Object.assign(Object.assign({},N&&{marginLeft:k}),E&&{marginRight:k});return Cr("Divider")(!u||o!=="vertical","usage","`children` not working in `vertical` mode."),y(b.createElement("div",Object.assign({className:D,style:Object.assign(Object.assign({},i==null?void 0:i.style),m)},p,{role:"separator"}),u&&o!=="vertical"&&b.createElement("span",{className:`${g}-inner-text`,style:M},u)))};ZD.displayName="Divider";var Qnt=function(e,n){if(!e)return null;var i={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return n?{left:0,right:0,width:0,top:i.top,bottom:i.bottom,height:i.height}:{left:i.left,right:i.right,width:i.width,top:0,bottom:0,height:0}},R_=function(e){return e!==void 0?"".concat(e,"px"):void 0};function Azn(t){var e=t.prefixCls,n=t.containerRef,i=t.value,r=t.getValueIndex,o=t.motionName,s=t.onMotionStart,a=t.onMotionEnd,l=t.direction,c=t.vertical,u=c===void 0?!1:c,d=b.useRef(null),h=b.useState(i),f=He(h,2),m=f[0],p=f[1],g=function(V){var F,$=r(V),B=(F=n.current)===null||F===void 0?void 0:F.querySelectorAll(".".concat(e,"-item"))[$];return(B==null?void 0:B.offsetParent)&&B},y=b.useState(null),_=He(y,2),w=_[0],C=_[1],N=b.useState(null),E=He(N,2),D=E[0],k=E[1];Lr(function(){if(m!==i){var O=g(m),V=g(i),F=Qnt(O,u),$=Qnt(V,u);p(i),C(F),k($),O&&V?s():a()}},[i]);var M=b.useMemo(function(){if(u){var O;return R_((O=w==null?void 0:w.top)!==null&&O!==void 0?O:0)}return R_(l==="rtl"?-(w==null?void 0:w.right):w==null?void 0:w.left)},[u,l,w]),T=b.useMemo(function(){if(u){var O;return R_((O=D==null?void 0:D.top)!==null&&O!==void 0?O:0)}return R_(l==="rtl"?-(D==null?void 0:D.right):D==null?void 0:D.left)},[u,l,D]),A=function(){return u?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"}},R=function(){return u?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"}},P=function(){C(null),k(null),a()};return!w||!D?null:b.createElement(Ou,{visible:!0,motionName:o,motionAppear:!0,onAppearStart:A,onAppearActive:R,onVisibleChanged:P},function(O,V){var F=O.className,$=O.style,B=Ie(Ie({},$),{},{"--thumb-start-left":M,"--thumb-start-width":R_(w==null?void 0:w.width),"--thumb-active-left":T,"--thumb-active-width":R_(D==null?void 0:D.width),"--thumb-start-top":M,"--thumb-start-height":R_(w==null?void 0:w.height),"--thumb-active-top":T,"--thumb-active-height":R_(D==null?void 0:D.height)}),z={ref:Vu(d,V),style:B,className:Me("".concat(e,"-thumb"),F)};return b.createElement("div",z)})}var Rzn=["prefixCls","direction","vertical","options","disabled","defaultValue","value","onChange","className","motionName"];function Pzn(t){if(typeof t.title<"u")return t.title;if(Un(t.label)!=="object"){var e;return(e=t.label)===null||e===void 0?void 0:e.toString()}}function Ozn(t){return t.map(function(e){if(Un(e)==="object"&&e!==null){var n=Pzn(e);return Ie(Ie({},e),{},{title:n})}return{label:e==null?void 0:e.toString(),title:e==null?void 0:e.toString(),value:e}})}var jzn=function(e){var n=e.prefixCls,i=e.className,r=e.disabled,o=e.checked,s=e.label,a=e.title,l=e.value,c=e.onChange,u=function(h){r||c(h,l)};return b.createElement("label",{className:Me(i,ye({},"".concat(n,"-item-disabled"),r))},b.createElement("input",{className:"".concat(n,"-item-input"),type:"radio",disabled:r,checked:o,onChange:u}),b.createElement("div",{className:"".concat(n,"-item-label"),title:a,role:"option","aria-selected":o},s))},uIt=b.forwardRef(function(t,e){var n,i,r=t.prefixCls,o=r===void 0?"rc-segmented":r,s=t.direction,a=t.vertical,l=t.options,c=l===void 0?[]:l,u=t.disabled,d=t.defaultValue,h=t.value,f=t.onChange,m=t.className,p=m===void 0?"":m,g=t.motionName,y=g===void 0?"thumb-motion":g,_=di(t,Rzn),w=b.useRef(null),C=b.useMemo(function(){return Vu(w,e)},[w,e]),N=b.useMemo(function(){return Ozn(c)},[c]),E=ho((n=N[0])===null||n===void 0?void 0:n.value,{value:h,defaultValue:d}),D=He(E,2),k=D[0],M=D[1],T=b.useState(!1),A=He(T,2),R=A[0],P=A[1],O=function($,B){u||(M(B),f==null||f(B))},V=Zs(_,["children"]);return b.createElement("div",lt({role:"listbox","aria-label":"segmented control"},V,{className:Me(o,(i={},ye(i,"".concat(o,"-rtl"),s==="rtl"),ye(i,"".concat(o,"-disabled"),u),ye(i,"".concat(o,"-vertical"),a),i),p),ref:C}),b.createElement("div",{className:"".concat(o,"-group")},b.createElement(Azn,{vertical:a,prefixCls:o,value:k,containerRef:w,motionName:"".concat(o,"-").concat(y),direction:s,getValueIndex:function($){return N.findIndex(function(B){return B.value===$})},onMotionStart:function(){P(!0)},onMotionEnd:function(){P(!1)}}),N.map(function(F){return b.createElement(jzn,lt({},F,{key:F.value,prefixCls:o,className:Me(F.className,"".concat(o,"-item"),ye({},"".concat(o,"-item-selected"),F.value===k&&!R)),checked:F.value===k,onChange:O,disabled:!!u||!!F.disabled}))})))});uIt.displayName="Segmented";var Fzn=uIt;function Jnt(t,e){return{[`${t}, ${t}:hover, ${t}:focus`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}}function eit(t){return{backgroundColor:t.itemSelectedBg,boxShadow:t.boxShadowTertiary}}const $zn=Object.assign({overflow:"hidden"},Mm),Vzn=t=>{const{componentCls:e}=t,n=t.calc(t.controlHeight).sub(t.calc(t.trackPadding).mul(2)).equal(),i=t.calc(t.controlHeightLG).sub(t.calc(t.trackPadding).mul(2)).equal(),r=t.calc(t.controlHeightSM).sub(t.calc(t.trackPadding).mul(2)).equal();return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},fo(t)),{display:"inline-block",padding:t.trackPadding,color:t.itemColor,background:t.trackBg,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,[`${e}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${e}-rtl`]:{direction:"rtl"},[`&${e}-vertical`]:{[`${e}-group`]:{flexDirection:"column"},[`${e}-thumb`]:{width:"100%",height:0,padding:`0 ${xe(t.paddingXXS)}`}},[`&${e}-block`]:{display:"flex"},[`&${e}-block ${e}-item`]:{flex:1,minWidth:0},[`${e}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${t.motionDurationMid} ${t.motionEaseInOut}`,borderRadius:t.borderRadiusSM,transform:"translateZ(0)","&-selected":Object.assign(Object.assign({},eit(t)),{color:t.itemSelectedColor}),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",transition:`background-color ${t.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${e}-item-selected):not(${e}-item-disabled)`]:{color:t.itemHoverColor,"&::after":{backgroundColor:t.itemHoverBg}},[`&:active:not(${e}-item-selected):not(${e}-item-disabled)`]:{color:t.itemHoverColor,"&::after":{backgroundColor:t.itemActiveBg}},"&-label":Object.assign({minHeight:n,lineHeight:xe(n),padding:`0 ${xe(t.segmentedPaddingHorizontal)}`},$zn),"&-icon + *":{marginInlineStart:t.calc(t.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${e}-thumb`]:Object.assign(Object.assign({},eit(t)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${xe(t.paddingXXS)} 0`,borderRadius:t.borderRadiusSM,transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOut}, height ${t.motionDurationSlow} ${t.motionEaseInOut}`,[`& ~ ${e}-item:not(${e}-item-selected):not(${e}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${e}-lg`]:{borderRadius:t.borderRadiusLG,[`${e}-item-label`]:{minHeight:i,lineHeight:xe(i),padding:`0 ${xe(t.segmentedPaddingHorizontal)}`,fontSize:t.fontSizeLG},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadius}},[`&${e}-sm`]:{borderRadius:t.borderRadiusSM,[`${e}-item-label`]:{minHeight:r,lineHeight:xe(r),padding:`0 ${xe(t.segmentedPaddingHorizontalSM)}`},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadiusXS}}}),Jnt(`&-disabled ${e}-item`,t)),Jnt(`${e}-item-disabled`,t)),{[`${e}-thumb-motion-appear-active`]:{transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOut}, width ${t.motionDurationSlow} ${t.motionEaseInOut}`,willChange:"transform, width"}})}},Bzn=t=>{const{colorTextLabel:e,colorText:n,colorFillSecondary:i,colorBgElevated:r,colorFill:o,lineWidthBold:s,colorBgLayout:a}=t;return{trackPadding:s,trackBg:a,itemColor:e,itemHoverColor:n,itemHoverBg:i,itemSelectedBg:r,itemActiveBg:o,itemSelectedColor:n}},zzn=Jr("Segmented",t=>{const{lineWidth:e,calc:n}=t,i=mr(t,{segmentedPaddingHorizontal:n(t.controlPaddingHorizontal).sub(e).equal(),segmentedPaddingHorizontalSM:n(t.controlPaddingHorizontalSM).sub(e).equal()});return[Vzn(i)]},Bzn);var tit=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};function Hzn(t){return typeof t=="object"&&!!(t!=null&&t.icon)}const Wzn=b.forwardRef((t,e)=>{const{prefixCls:n,className:i,rootClassName:r,block:o,options:s=[],size:a="middle",style:l,vertical:c}=t,u=tit(t,["prefixCls","className","rootClassName","block","options","size","style","vertical"]),{getPrefixCls:d,direction:h,segmented:f}=b.useContext(jn),m=d("segmented",n),[p,g,y]=zzn(m),_=Hc(a),w=b.useMemo(()=>s.map(E=>{if(Hzn(E)){const{icon:D,label:k}=E,M=tit(E,["icon","label"]);return Object.assign(Object.assign({},M),{label:b.createElement(b.Fragment,null,b.createElement("span",{className:`${m}-item-icon`},D),k&&b.createElement("span",null,k))})}return E}),[s,m]),C=Me(i,r,f==null?void 0:f.className,{[`${m}-block`]:o,[`${m}-sm`]:_==="small",[`${m}-lg`]:_==="large",[`${m}-vertical`]:c},g,y),N=Object.assign(Object.assign({},f==null?void 0:f.style),l);return p(b.createElement(Fzn,Object.assign({},u,{className:C,style:N,options:w,ref:e,prefixCls:m,direction:h,vertical:c})))}),dIt=Wzn;dIt.displayName="Segmented";const hIt=Z.createContext({}),fIt=Z.createContext({}),mIt=t=>{let{prefixCls:e,value:n,onChange:i}=t;const r=()=>{if(i&&n&&!n.cleared){const o=n.toHsb();o.a=0;const s=Ef(o);s.cleared=!0,i(s)}};return Z.createElement("div",{className:`${e}-clear`,onClick:r})};var hD;(function(t){t.hex="hex",t.rgb="rgb",t.hsb="hsb"})(hD||(hD={}));var Uzn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},Kzn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:Uzn}))},Phe=b.forwardRef(Kzn);Phe.displayName="UpOutlined";function cke(){return typeof BigInt=="function"}function pIt(t){return!t&&t!==0&&!Number.isNaN(t)||!String(t).trim()}function eI(t){var e=t.trim(),n=e.startsWith("-");n&&(e=e.slice(1)),e=e.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),e.startsWith(".")&&(e="0".concat(e));var i=e||"0",r=i.split("."),o=r[0]||"0",s=r[1]||"0";o==="0"&&s==="0"&&(n=!1);var a=n?"-":"";return{negative:n,negativeStr:a,trimStr:i,integerStr:o,decimalStr:s,fullStr:"".concat(a).concat(i)}}function K6e(t){var e=String(t);return!Number.isNaN(Number(e))&&e.includes("e")}function RT(t){var e=String(t);if(K6e(t)){var n=Number(e.slice(e.indexOf("e-")+2)),i=e.match(/\.(\d+)/);return i!=null&&i[1]&&(n+=i[1].length),n}return e.includes(".")&&q6e(e)?e.length-e.indexOf(".")-1:0}function Ohe(t){var e=String(t);if(K6e(t)){if(t>Number.MAX_SAFE_INTEGER)return String(cke()?BigInt(t).toString():Number.MAX_SAFE_INTEGER);if(t<Number.MIN_SAFE_INTEGER)return String(cke()?BigInt(t).toString():Number.MIN_SAFE_INTEGER);e=t.toFixed(RT(e))}return eI(e).fullStr}function q6e(t){return typeof t=="number"?!Number.isNaN(t):t?/^\s*-?\d+(\.\d+)?\s*$/.test(t)||/^\s*-?\d+\.\s*$/.test(t)||/^\s*-?\.\d+\s*$/.test(t):!1}var qzn=function(){function t(e){if(Za(this,t),ye(this,"origin",""),ye(this,"negative",void 0),ye(this,"integer",void 0),ye(this,"decimal",void 0),ye(this,"decimalLen",void 0),ye(this,"empty",void 0),ye(this,"nan",void 0),pIt(e)){this.empty=!0;return}if(this.origin=String(e),e==="-"||Number.isNaN(e)){this.nan=!0;return}var n=e;if(K6e(n)&&(n=Number(n)),n=typeof n=="string"?n:Ohe(n),q6e(n)){var i=eI(n);this.negative=i.negative;var r=i.trimStr.split(".");this.integer=BigInt(r[0]);var o=r[1]||"0";this.decimal=BigInt(o),this.decimalLen=o.length}else this.nan=!0}return Qa(t,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(n){var i="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(n,"0"));return BigInt(i)}},{key:"negate",value:function(){var n=new t(this.toString());return n.negative=!n.negative,n}},{key:"cal",value:function(n,i,r){var o=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),s=this.alignDecimal(o),a=n.alignDecimal(o),l=i(s,a).toString(),c=r(o),u=eI(l),d=u.negativeStr,h=u.trimStr,f="".concat(d).concat(h.padStart(c+1,"0"));return new t("".concat(f.slice(0,-c),".").concat(f.slice(-c)))}},{key:"add",value:function(n){if(this.isInvalidate())return new t(n);var i=new t(n);return i.isInvalidate()?this:this.cal(i,function(r,o){return r+o},function(r){return r})}},{key:"multi",value:function(n){var i=new t(n);return this.isInvalidate()||i.isInvalidate()?new t(NaN):this.cal(i,function(r,o){return r*o},function(r){return r*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toString()===(n==null?void 0:n.toString())}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":eI("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),t}(),Gzn=function(){function t(e){if(Za(this,t),ye(this,"origin",""),ye(this,"number",void 0),ye(this,"empty",void 0),pIt(e)){this.empty=!0;return}this.origin=String(e),this.number=Number(e)}return Qa(t,[{key:"negate",value:function(){return new t(-this.toNumber())}},{key:"add",value:function(n){if(this.isInvalidate())return new t(n);var i=Number(n);if(Number.isNaN(i))return this;var r=this.number+i;if(r>Number.MAX_SAFE_INTEGER)return new t(Number.MAX_SAFE_INTEGER);if(r<Number.MIN_SAFE_INTEGER)return new t(Number.MIN_SAFE_INTEGER);var o=Math.max(RT(this.number),RT(i));return new t(r.toFixed(o))}},{key:"multi",value:function(n){var i=Number(n);if(this.isInvalidate()||Number.isNaN(i))return new t(NaN);var r=this.number*i;if(r>Number.MAX_SAFE_INTEGER)return new t(Number.MAX_SAFE_INTEGER);if(r<Number.MIN_SAFE_INTEGER)return new t(Number.MIN_SAFE_INTEGER);var o=Math.max(RT(this.number),RT(i));return new t(r.toFixed(o))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toNumber()===(n==null?void 0:n.toNumber())}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":Ohe(this.number):this.origin}}]),t}();function ky(t){return cke()?new qzn(t):new Gzn(t)}function $ee(t,e,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t==="")return"";var r=eI(t),o=r.negativeStr,s=r.integerStr,a=r.decimalStr,l="".concat(e).concat(a),c="".concat(o).concat(s);if(n>=0){var u=Number(a[n]);if(u>=5&&!i){var d=ky(t).add("".concat(o,"0.").concat("0".repeat(n)).concat(10-u));return $ee(d.toString(),e,n,i)}return n===0?c:"".concat(c).concat(e).concat(a.padEnd(n,"0").slice(0,n))}return l===".0"?c:"".concat(c).concat(l)}function Yzn(t){return!!(t.addonBefore||t.addonAfter)}function Xzn(t){return!!(t.prefix||t.suffix||t.allowClear)}function nit(t,e,n){var i=e.cloneNode(!0),r=Object.create(t,{target:{value:i},currentTarget:{value:i}});return i.value=n,typeof e.selectionStart=="number"&&typeof e.selectionEnd=="number"&&(i.selectionStart=e.selectionStart,i.selectionEnd=e.selectionEnd),i.setSelectionRange=function(){e.setSelectionRange.apply(e,arguments)},r}function eie(t,e,n,i){if(n){var r=e;if(e.type==="click"){r=nit(e,t,""),n(r);return}if(t.type!=="file"&&i!==void 0){r=nit(e,t,i),n(r);return}n(r)}}function gIt(t,e){if(t){t.focus(e);var n=e||{},i=n.cursor;if(i){var r=t.value.length;switch(i){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(r,r);break;default:t.setSelectionRange(0,r)}}}}var G6e=Z.forwardRef(function(t,e){var n,i,r=t.inputElement,o=t.children,s=t.prefixCls,a=t.prefix,l=t.suffix,c=t.addonBefore,u=t.addonAfter,d=t.className,h=t.style,f=t.disabled,m=t.readOnly,p=t.focused,g=t.triggerFocus,y=t.allowClear,_=t.value,w=t.handleReset,C=t.hidden,N=t.classes,E=t.classNames,D=t.dataAttrs,k=t.styles,M=t.components,T=t.onClear,A=o??r,R=(M==null?void 0:M.affixWrapper)||"span",P=(M==null?void 0:M.groupWrapper)||"span",O=(M==null?void 0:M.wrapper)||"span",V=(M==null?void 0:M.groupAddon)||"span",F=b.useRef(null),$=function(le){var Ne;(Ne=F.current)!==null&&Ne!==void 0&&Ne.contains(le.target)&&(g==null||g())},B=Xzn(t),z=b.cloneElement(A,{value:_,className:Me(A.props.className,!B&&(E==null?void 0:E.variant))||null}),H=b.useRef(null);if(Z.useImperativeHandle(e,function(){return{nativeElement:H.current||F.current}}),B){var K=null;if(y){var q=!f&&!m&&_,U="".concat(s,"-clear-icon"),Y=Un(y)==="object"&&y!==null&&y!==void 0&&y.clearIcon?y.clearIcon:"✖";K=Z.createElement("span",{onClick:function(le){w==null||w(le),T==null||T()},onMouseDown:function(le){return le.preventDefault()},className:Me(U,ye(ye({},"".concat(U,"-hidden"),!q),"".concat(U,"-has-suffix"),!!l)),role:"button",tabIndex:-1},Y)}var J="".concat(s,"-affix-wrapper"),ae=Me(J,ye(ye(ye(ye(ye({},"".concat(s,"-disabled"),f),"".concat(J,"-disabled"),f),"".concat(J,"-focused"),p),"".concat(J,"-readonly"),m),"".concat(J,"-input-with-clear-btn"),l&&y&&_),N==null?void 0:N.affixWrapper,E==null?void 0:E.affixWrapper,E==null?void 0:E.variant),se=(l||y)&&Z.createElement("span",{className:Me("".concat(s,"-suffix"),E==null?void 0:E.suffix),style:k==null?void 0:k.suffix},K,l);z=Z.createElement(R,lt({className:ae,style:k==null?void 0:k.affixWrapper,onClick:$},D==null?void 0:D.affixWrapper,{ref:F}),a&&Z.createElement("span",{className:Me("".concat(s,"-prefix"),E==null?void 0:E.prefix),style:k==null?void 0:k.prefix},a),z,se)}if(Yzn(t)){var oe="".concat(s,"-group"),fe="".concat(oe,"-addon"),de="".concat(oe,"-wrapper"),ie=Me("".concat(s,"-wrapper"),oe,N==null?void 0:N.wrapper,E==null?void 0:E.wrapper),Q=Me(de,ye({},"".concat(de,"-disabled"),f),N==null?void 0:N.group,E==null?void 0:E.groupWrapper);z=Z.createElement(P,{className:Q,ref:H},Z.createElement(O,{className:ie},c&&Z.createElement(V,{className:fe},c),z,u&&Z.createElement(V,{className:fe},u)))}return Z.cloneElement(z,{className:Me((n=z.props)===null||n===void 0?void 0:n.className,d)||null,style:Ie(Ie({},(i=z.props)===null||i===void 0?void 0:i.style),h),hidden:C})}),Zzn=["show"];function bIt(t,e){return b.useMemo(function(){var n={};e&&(n.show=Un(e)==="object"&&e.formatter?e.formatter:!!e),n=Ie(Ie({},n),t);var i=n,r=i.show,o=di(i,Zzn);return Ie(Ie({},o),{},{show:!!r,showFormatter:typeof r=="function"?r:void 0,strategy:o.strategy||function(s){return s.length}})},[t,e])}var Qzn=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],Jzn=b.forwardRef(function(t,e){var n=t.autoComplete,i=t.onChange,r=t.onFocus,o=t.onBlur,s=t.onPressEnter,a=t.onKeyDown,l=t.onKeyUp,c=t.prefixCls,u=c===void 0?"rc-input":c,d=t.disabled,h=t.htmlSize,f=t.className,m=t.maxLength,p=t.suffix,g=t.showCount,y=t.count,_=t.type,w=_===void 0?"text":_,C=t.classes,N=t.classNames,E=t.styles,D=t.onCompositionStart,k=t.onCompositionEnd,M=di(t,Qzn),T=b.useState(!1),A=He(T,2),R=A[0],P=A[1],O=b.useRef(!1),V=b.useRef(!1),F=b.useRef(null),$=b.useRef(null),B=function(re){F.current&&gIt(F.current,re)},z=ho(t.defaultValue,{value:t.value}),H=He(z,2),K=H[0],q=H[1],U=K==null?"":String(K),Y=b.useState(null),J=He(Y,2),ae=J[0],se=J[1],oe=bIt(y,g),fe=oe.max||m,de=oe.strategy(U),ie=!!fe&&de>fe;b.useImperativeHandle(e,function(){var X;return{focus:B,blur:function(){var we;(we=F.current)===null||we===void 0||we.blur()},setSelectionRange:function(we,ue,Ce){var ze;(ze=F.current)===null||ze===void 0||ze.setSelectionRange(we,ue,Ce)},select:function(){var we;(we=F.current)===null||we===void 0||we.select()},input:F.current,nativeElement:((X=$.current)===null||X===void 0?void 0:X.nativeElement)||F.current}}),b.useEffect(function(){P(function(X){return X&&d?!1:X})},[d]);var Q=function(re,we,ue){var Ce=we;if(!O.current&&oe.exceedFormatter&&oe.max&&oe.strategy(we)>oe.max){if(Ce=oe.exceedFormatter(we,{max:oe.max}),we!==Ce){var ze,Ye;se([((ze=F.current)===null||ze===void 0?void 0:ze.selectionStart)||0,((Ye=F.current)===null||Ye===void 0?void 0:Ye.selectionEnd)||0])}}else if(ue.source==="compositionEnd")return;q(Ce),F.current&&eie(F.current,re,i,Ce)};b.useEffect(function(){if(ae){var X;(X=F.current)===null||X===void 0||X.setSelectionRange.apply(X,Ot(ae))}},[ae]);var be=function(re){Q(re,re.target.value,{source:"change"})},le=function(re){O.current=!1,Q(re,re.currentTarget.value,{source:"compositionEnd"}),k==null||k(re)},Ne=function(re){s&&re.key==="Enter"&&!V.current&&(V.current=!0,s(re)),a==null||a(re)},Le=function(re){re.key==="Enter"&&(V.current=!1),l==null||l(re)},Te=function(re){P(!0),r==null||r(re)},De=function(re){P(!1),o==null||o(re)},Pe=function(re){q(""),B(),F.current&&eie(F.current,re,i)},ge=ie&&"".concat(u,"-out-of-range"),he=function(){var re=Zs(t,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return Z.createElement("input",lt({autoComplete:n},re,{onChange:be,onFocus:Te,onBlur:De,onKeyDown:Ne,onKeyUp:Le,className:Me(u,ye({},"".concat(u,"-disabled"),d),N==null?void 0:N.input),style:E==null?void 0:E.input,ref:F,size:h,type:w,onCompositionStart:function(ue){O.current=!0,D==null||D(ue)},onCompositionEnd:le}))},me=function(){var re=Number(fe)>0;if(p||oe.show){var we=oe.showFormatter?oe.showFormatter({value:U,count:de,maxLength:fe}):"".concat(de).concat(re?" / ".concat(fe):"");return Z.createElement(Z.Fragment,null,oe.show&&Z.createElement("span",{className:Me("".concat(u,"-show-count-suffix"),ye({},"".concat(u,"-show-count-has-suffix"),!!p),N==null?void 0:N.count),style:Ie({},E==null?void 0:E.count)},we),p)}return null};return Z.createElement(G6e,lt({},M,{prefixCls:u,className:Me(f,ge),handleReset:Pe,value:U,focused:R,triggerFocus:B,suffix:me(),disabled:d,classes:C,classNames:N,styles:E}),he())});function eHn(t,e){return typeof Proxy<"u"&&t?new Proxy(t,{get:function(i,r){if(e[r])return e[r];var o=i[r];return typeof o=="function"?o.bind(i):o}}):t}function tHn(t,e){var n=b.useRef(null);function i(){try{var o=t.selectionStart,s=t.selectionEnd,a=t.value,l=a.substring(0,o),c=a.substring(s);n.current={start:o,end:s,value:a,beforeTxt:l,afterTxt:c}}catch{}}function r(){if(t&&n.current&&e)try{var o=t.value,s=n.current,a=s.beforeTxt,l=s.afterTxt,c=s.start,u=o.length;if(o.startsWith(a))u=a.length;else if(o.endsWith(l))u=o.length-n.current.afterTxt.length;else{var d=a[c-1],h=o.indexOf(d,c-1);h!==-1&&(u=h+1)}t.setSelectionRange(u,u)}catch(f){ii(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(f.message))}}return[i,r]}var nHn=function(){var e=b.useState(!1),n=He(e,2),i=n[0],r=n[1];return Lr(function(){r(fhe())},[]),i},iHn=200,rHn=600;function oHn(t){var e=t.prefixCls,n=t.upNode,i=t.downNode,r=t.upDisabled,o=t.downDisabled,s=t.onStep,a=b.useRef(),l=b.useRef([]),c=b.useRef();c.current=s;var u=function(){clearTimeout(a.current)},d=function(w,C){w.preventDefault(),u(),c.current(C);function N(){c.current(C),a.current=setTimeout(N,iHn)}a.current=setTimeout(N,rHn)};b.useEffect(function(){return function(){u(),l.current.forEach(function(_){return Dr.cancel(_)})}},[]);var h=nHn();if(h)return null;var f="".concat(e,"-handler"),m=Me(f,"".concat(f,"-up"),ye({},"".concat(f,"-up-disabled"),r)),p=Me(f,"".concat(f,"-down"),ye({},"".concat(f,"-down-disabled"),o)),g=function(){return l.current.push(Dr(u))},y={unselectable:"on",role:"button",onMouseUp:g,onMouseLeave:g};return b.createElement("div",{className:"".concat(f,"-wrap")},b.createElement("span",lt({},y,{onMouseDown:function(w){d(w,!0)},"aria-label":"Increase Value","aria-disabled":r,className:m}),n||b.createElement("span",{unselectable:"on",className:"".concat(e,"-handler-up-inner")})),b.createElement("span",lt({},y,{onMouseDown:function(w){d(w,!1)},"aria-label":"Decrease Value","aria-disabled":o,className:p}),i||b.createElement("span",{unselectable:"on",className:"".concat(e,"-handler-down-inner")})))}function iit(t){var e=typeof t=="number"?Ohe(t):eI(t).fullStr,n=e.includes(".");return n?eI(e.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:t+"0"}const sHn=function(){var t=b.useRef(0),e=function(){Dr.cancel(t.current)};return b.useEffect(function(){return e},[]),function(n){e(),t.current=Dr(function(){n()})}};var aHn=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],lHn=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],rit=function(e,n){return e||n.isEmpty()?n.toString():n.toNumber()},oit=function(e){var n=ky(e);return n.isInvalidate()?null:n},cHn=b.forwardRef(function(t,e){var n=t.prefixCls,i=t.className,r=t.style,o=t.min,s=t.max,a=t.step,l=a===void 0?1:a,c=t.defaultValue,u=t.value,d=t.disabled,h=t.readOnly,f=t.upHandler,m=t.downHandler,p=t.keyboard,g=t.changeOnWheel,y=g===void 0?!1:g,_=t.controls,w=_===void 0?!0:_;t.classNames;var C=t.stringMode,N=t.parser,E=t.formatter,D=t.precision,k=t.decimalSeparator,M=t.onChange,T=t.onInput,A=t.onPressEnter,R=t.onStep,P=t.changeOnBlur,O=P===void 0?!0:P,V=t.domRef,F=di(t,aHn),$="".concat(n,"-input"),B=b.useRef(null),z=b.useState(!1),H=He(z,2),K=H[0],q=H[1],U=b.useRef(!1),Y=b.useRef(!1),J=b.useRef(!1),ae=b.useState(function(){return ky(u??c)}),se=He(ae,2),oe=se[0],fe=se[1];function de(Nt){u===void 0&&fe(Nt)}var ie=b.useCallback(function(Nt,vt){if(!vt)return D>=0?D:Math.max(RT(Nt),RT(l))},[D,l]),Q=b.useCallback(function(Nt){var vt=String(Nt);if(N)return N(vt);var $t=vt;return k&&($t=$t.replace(k,".")),$t.replace(/[^\w.-]+/g,"")},[N,k]),be=b.useRef(""),le=b.useCallback(function(Nt,vt){if(E)return E(Nt,{userTyping:vt,input:String(be.current)});var $t=typeof Nt=="number"?Ohe(Nt):Nt;if(!vt){var ln=ie($t,vt);if(q6e($t)&&(k||ln>=0)){var Jt=k||".";$t=$ee($t,Jt,ln)}}return $t},[E,ie,k]),Ne=b.useState(function(){var Nt=c??u;return oe.isInvalidate()&&["string","number"].includes(Un(Nt))?Number.isNaN(Nt)?"":Nt:le(oe.toString(),!1)}),Le=He(Ne,2),Te=Le[0],De=Le[1];be.current=Te;function Pe(Nt,vt){De(le(Nt.isInvalidate()?Nt.toString(!1):Nt.toString(!vt),vt))}var ge=b.useMemo(function(){return oit(s)},[s,D]),he=b.useMemo(function(){return oit(o)},[o,D]),me=b.useMemo(function(){return!ge||!oe||oe.isInvalidate()?!1:ge.lessEquals(oe)},[ge,oe]),X=b.useMemo(function(){return!he||!oe||oe.isInvalidate()?!1:oe.lessEquals(he)},[he,oe]),re=tHn(B.current,K),we=He(re,2),ue=we[0],Ce=we[1],ze=function(vt){return ge&&!vt.lessEquals(ge)?ge:he&&!he.lessEquals(vt)?he:null},Ye=function(vt){return!ze(vt)},Ke=function(vt,$t){var ln=vt,Jt=Ye(ln)||ln.isEmpty();if(!ln.isEmpty()&&!$t&&(ln=ze(ln)||ln,Jt=!0),!h&&!d&&Jt){var en=ln.toString(),Ft=ie(en,$t);return Ft>=0&&(ln=ky($ee(en,".",Ft)),Ye(ln)||(ln=ky($ee(en,".",Ft,!0)))),ln.equals(oe)||(de(ln),M==null||M(ln.isEmpty()?null:rit(C,ln)),u===void 0&&Pe(ln,$t)),ln}return oe},Xe=sHn(),it=function Nt(vt){if(ue(),be.current=vt,De(vt),!Y.current){var $t=Q(vt),ln=ky($t);ln.isNaN()||Ke(ln,!0)}T==null||T(vt),Xe(function(){var Jt=vt;N||(Jt=vt.replace(/。/g,".")),Jt!==vt&&Nt(Jt)})},ut=function(){Y.current=!0},Ge=function(){Y.current=!1,it(B.current.value)},Ee=function(vt){it(vt.target.value)},Se=function(vt){var $t;if(!(vt&&me||!vt&&X)){U.current=!1;var ln=ky(J.current?iit(l):l);vt||(ln=ln.negate());var Jt=(oe||ky(0)).add(ln.toString()),en=Ke(Jt,!1);R==null||R(rit(C,en),{offset:J.current?iit(l):l,type:vt?"up":"down"}),($t=B.current)===null||$t===void 0||$t.focus()}},je=function(vt){var $t=ky(Q(Te)),ln;$t.isNaN()?ln=Ke(oe,vt):ln=Ke($t,vt),u!==void 0?Pe(oe,!1):ln.isNaN()||Pe(ln,!1)},nt=function(){U.current=!0},rt=function(vt){var $t=vt.key,ln=vt.shiftKey;U.current=!0,J.current=ln,$t==="Enter"&&(Y.current||(U.current=!1),je(!1),A==null||A(vt)),p!==!1&&!Y.current&&["Up","ArrowUp","Down","ArrowDown"].includes($t)&&(Se($t==="Up"||$t==="ArrowUp"),vt.preventDefault())},St=function(){U.current=!1,J.current=!1};b.useEffect(function(){if(y&&K){var Nt=function(ln){Se(ln.deltaY<0),ln.preventDefault()},vt=B.current;if(vt)return vt.addEventListener("wheel",Nt,{passive:!1}),function(){return vt.removeEventListener("wheel",Nt)}}});var At=function(){O&&je(!1),q(!1),U.current=!1};return ZT(function(){oe.isInvalidate()||Pe(oe,!1)},[D,E]),ZT(function(){var Nt=ky(u);fe(Nt);var vt=ky(Q(Te));(!Nt.equals(vt)||!U.current||E)&&Pe(Nt,U.current)},[u]),ZT(function(){E&&Ce()},[Te]),b.createElement("div",{ref:V,className:Me(n,i,ye(ye(ye(ye(ye({},"".concat(n,"-focused"),K),"".concat(n,"-disabled"),d),"".concat(n,"-readonly"),h),"".concat(n,"-not-a-number"),oe.isNaN()),"".concat(n,"-out-of-range"),!oe.isInvalidate()&&!Ye(oe))),style:r,onFocus:function(){q(!0)},onBlur:At,onKeyDown:rt,onKeyUp:St,onCompositionStart:ut,onCompositionEnd:Ge,onBeforeInput:nt},w&&b.createElement(oHn,{prefixCls:n,upNode:f,downNode:m,upDisabled:me,downDisabled:X,onStep:Se}),b.createElement("div",{className:"".concat($,"-wrap")},b.createElement("input",lt({autoComplete:"off",role:"spinbutton","aria-valuemin":o,"aria-valuemax":s,"aria-valuenow":oe.isInvalidate()?null:oe.toString(),step:l},F,{ref:Vu(B,e),className:$,value:Te,onChange:Ee,disabled:d,readOnly:h}))))}),vIt=b.forwardRef(function(t,e){var n=t.disabled,i=t.style,r=t.prefixCls,o=r===void 0?"rc-input-number":r,s=t.value,a=t.prefix,l=t.suffix,c=t.addonBefore,u=t.addonAfter,d=t.className,h=t.classNames,f=di(t,lHn),m=b.useRef(null),p=b.useRef(null),g=b.useRef(null),y=function(w){g.current&&gIt(g.current,w)};return b.useImperativeHandle(e,function(){return eHn(g.current,{nativeElement:m.current.nativeElement||p.current})}),b.createElement(G6e,{className:d,triggerFocus:y,prefixCls:o,value:s,disabled:n,style:i,prefix:a,suffix:l,addonAfter:u,addonBefore:c,classNames:h,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:m},b.createElement(cHn,lt({prefixCls:o,disabled:n,ref:g,domRef:p,className:h==null?void 0:h.input},f)))});vIt.displayName="InputNumber";const uHn=t=>{var e;const n=(e=t.handleVisible)!==null&&e!==void 0?e:"auto";return Object.assign(Object.assign({},YK(t)),{controlWidth:90,handleWidth:t.controlHeightSM-t.lineWidth*2,handleFontSize:t.fontSize/2,handleVisible:n,handleActiveBg:t.colorFillAlter,handleBg:t.colorBgContainer,filledHandleBg:new ko(t.colorFillSecondary).onBackground(t.colorBgContainer).toHexString(),handleHoverColor:t.colorPrimary,handleBorderColor:t.colorBorder,handleOpacity:n===!0?1:0})},sit=(t,e)=>{let{componentCls:n,borderRadiusSM:i,borderRadiusLG:r}=t;const o=e==="lg"?r:i;return{[`&-${e}`]:{[`${n}-handler-wrap`]:{borderStartEndRadius:o,borderEndEndRadius:o},[`${n}-handler-up`]:{borderStartEndRadius:o},[`${n}-handler-down`]:{borderEndEndRadius:o}}}},dHn=t=>{const{componentCls:e,lineWidth:n,lineType:i,borderRadius:r,inputFontSizeSM:o,inputFontSizeLG:s,controlHeightLG:a,controlHeightSM:l,colorError:c,paddingInlineSM:u,paddingBlockSM:d,paddingBlockLG:h,paddingInlineLG:f,colorTextDescription:m,motionDurationMid:p,handleHoverColor:g,handleOpacity:y,paddingInline:_,paddingBlock:w,handleBg:C,handleActiveBg:N,colorTextDisabled:E,borderRadiusSM:D,borderRadiusLG:k,controlWidth:M,handleBorderColor:T,filledHandleBg:A,lineHeightLG:R,calc:P}=t;return[{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},fo(t)),XK(t)),{display:"inline-block",width:M,margin:0,padding:0,borderRadius:r}),P6e(t,{[`${e}-handler-wrap`]:{background:C,[`${e}-handler-down`]:{borderBlockStart:`${xe(n)} ${i} ${T}`}}})),j6e(t,{[`${e}-handler-wrap`]:{background:A,[`${e}-handler-down`]:{borderBlockStart:`${xe(n)} ${i} ${T}`}},"&:focus-within":{[`${e}-handler-wrap`]:{background:C}}})),O6e(t)),{"&-rtl":{direction:"rtl",[`${e}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:s,lineHeight:R,borderRadius:k,[`input${e}-input`]:{height:P(a).sub(P(n).mul(2)).equal(),padding:`${xe(h)} ${xe(f)}`}},"&-sm":{padding:0,fontSize:o,borderRadius:D,[`input${e}-input`]:{height:P(l).sub(P(n).mul(2)).equal(),padding:`${xe(d)} ${xe(u)}`}},"&-out-of-range":{[`${e}-input-wrap`]:{input:{color:c}}},"&-group":Object.assign(Object.assign(Object.assign({},fo(t)),KTt(t)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${e}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${e}-group-addon`]:{borderRadius:k,fontSize:t.fontSizeLG}},"&-sm":{[`${e}-group-addon`]:{borderRadius:D}}},zTt(t)),WTt(t)),{[`&:not(${e}-compact-first-item):not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}, ${e}-group-addon`]:{borderRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-first-item`]:{[`${e}, ${e}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-last-item`]:{[`${e}, ${e}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),[`&-disabled ${e}-input`]:{cursor:"not-allowed"},[e]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},fo(t)),{width:"100%",padding:`${xe(w)} ${xe(_)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:r,outline:0,transition:`all ${p} linear`,appearance:"textfield",fontSize:"inherit"}),F6e(t.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})},[`&:hover ${e}-handler-wrap, &-focused ${e}-handler-wrap`]:{width:t.handleWidth,opacity:1}})},{[e]:Object.assign(Object.assign(Object.assign({[`${e}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:0,opacity:y,height:"100%",borderStartStartRadius:0,borderStartEndRadius:r,borderEndEndRadius:r,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${p}`,overflow:"hidden",[`${e}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
              ${e}-handler-up-inner,
              ${e}-handler-down-inner
            `]:{marginInlineEnd:0,fontSize:t.handleFontSize}}},[`${e}-handler`]:{height:"50%",overflow:"hidden",color:m,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${xe(n)} ${i} ${T}`,transition:`all ${p} linear`,"&:active":{background:N},"&:hover":{height:"60%",[`
              ${e}-handler-up-inner,
              ${e}-handler-down-inner
            `]:{color:g}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},e6()),{color:m,transition:`all ${p} linear`,userSelect:"none"})},[`${e}-handler-up`]:{borderStartEndRadius:r},[`${e}-handler-down`]:{borderEndEndRadius:r}},sit(t,"lg")),sit(t,"sm")),{"&-disabled, &-readonly":{[`${e}-handler-wrap`]:{display:"none"},[`${e}-input`]:{color:"inherit"}},[`
          ${e}-handler-up-disabled,
          ${e}-handler-down-disabled
        `]:{cursor:"not-allowed"},[`
          ${e}-handler-up-disabled:hover &-handler-up-inner,
          ${e}-handler-down-disabled:hover &-handler-down-inner
        `]:{color:E}})}]},hHn=t=>{const{componentCls:e,paddingBlock:n,paddingInline:i,inputAffixPadding:r,controlWidth:o,borderRadiusLG:s,borderRadiusSM:a,paddingInlineLG:l,paddingInlineSM:c,paddingBlockLG:u,paddingBlockSM:d,motionDurationMid:h}=t;return{[`${e}-affix-wrapper`]:Object.assign(Object.assign({[`input${e}-input`]:{padding:`${xe(n)} 0`}},XK(t)),{position:"relative",display:"inline-flex",alignItems:"center",width:o,padding:0,paddingInlineStart:i,"&-lg":{borderRadius:s,paddingInlineStart:l,[`input${e}-input`]:{padding:`${xe(u)} 0`}},"&-sm":{borderRadius:a,paddingInlineStart:c,[`input${e}-input`]:{padding:`${xe(d)} 0`}},[`&:not(${e}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${e}-disabled`]:{background:"transparent"},[`> div${e}`]:{width:"100%",border:"none",outline:"none",[`&${e}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${e}-handler-wrap`]:{zIndex:2},[e]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:r},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:i,marginInlineStart:r,transition:`margin ${h}`}},[`&:hover ${e}-handler-wrap, &-focused ${e}-handler-wrap`]:{width:t.handleWidth,opacity:1},[`&:not(${e}-affix-wrapper-without-controls):hover ${e}-suffix`]:{marginInlineEnd:t.calc(t.handleWidth).add(i).equal()}})}},fHn=Jr("InputNumber",t=>{const e=mr(t,GK(t));return[dHn(e),hHn(e),a6(e)]},uHn,{unitless:{handleOpacity:!0}});var mHn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const yIt=b.forwardRef((t,e)=>{{const oe=Cr("InputNumber");oe.deprecated(!("bordered"in t),"bordered","variant"),oe(!(t.type==="number"&&t.changeOnWheel),"usage","When `type=number` is used together with `changeOnWheel`, changeOnWheel may not work properly. Please delete `type=number` if it is not necessary.")}const{getPrefixCls:n,direction:i}=b.useContext(jn),r=b.useRef(null);b.useImperativeHandle(e,()=>r.current);const{className:o,rootClassName:s,size:a,disabled:l,prefixCls:c,addonBefore:u,addonAfter:d,prefix:h,suffix:f,bordered:m,readOnly:p,status:g,controls:y,variant:_}=t,w=mHn(t,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),C=n("input-number",c),N=Il(C),[E,D,k]=fHn(C,N),{compactSize:M,compactItemClassnames:T}=VS(C,i);let A=b.createElement(Phe,{className:`${C}-handler-up-inner`}),R=b.createElement(h6,{className:`${C}-handler-down-inner`});const P=typeof y=="boolean"?y:void 0;typeof y=="object"&&(A=typeof y.upIcon>"u"?A:b.createElement("span",{className:`${C}-handler-up-inner`},y.upIcon),R=typeof y.downIcon>"u"?R:b.createElement("span",{className:`${C}-handler-down-inner`},y.downIcon));const{hasFeedback:O,status:V,isFormItemInput:F,feedbackIcon:$}=b.useContext(ju),B=BA(V,g),z=Hc(oe=>{var fe;return(fe=a??M)!==null&&fe!==void 0?fe:oe}),H=b.useContext(Yd),K=l??H,[q,U]=d6("inputNumber",_,m),Y=O&&b.createElement(b.Fragment,null,$),J=Me({[`${C}-lg`]:z==="large",[`${C}-sm`]:z==="small",[`${C}-rtl`]:i==="rtl",[`${C}-in-form-item`]:F},D),ae=`${C}-group`,se=b.createElement(vIt,Object.assign({ref:r,disabled:K,className:Me(k,N,o,s,T),upHandler:A,downHandler:R,prefixCls:C,readOnly:p,controls:P,prefix:h,suffix:Y||f,addonBefore:u&&b.createElement($0,{form:!0,space:!0},u),addonAfter:d&&b.createElement($0,{form:!0,space:!0},d),classNames:{input:J,variant:Me({[`${C}-${q}`]:U},oS(C,B,O)),affixWrapper:Me({[`${C}-affix-wrapper-sm`]:z==="small",[`${C}-affix-wrapper-lg`]:z==="large",[`${C}-affix-wrapper-rtl`]:i==="rtl",[`${C}-affix-wrapper-without-controls`]:y===!1},D),wrapper:Me({[`${ae}-rtl`]:i==="rtl"},D),groupWrapper:Me({[`${C}-group-wrapper-sm`]:z==="small",[`${C}-group-wrapper-lg`]:z==="large",[`${C}-group-wrapper-rtl`]:i==="rtl",[`${C}-group-wrapper-${q}`]:U},oS(`${C}-group-wrapper`,B,O),D)}},w));return E(se)}),Y6e=yIt,pHn=t=>b.createElement(Kv,{theme:{components:{InputNumber:{handleVisible:!0}}}},b.createElement(yIt,Object.assign({},t)));Y6e.displayName="InputNumber";Y6e._InternalPanelDoNotUseOrYouWillBeFired=pHn;const tI=t=>{let{prefixCls:e,min:n=0,max:i=100,value:r,onChange:o,className:s,formatter:a}=t;const l=`${e}-steppers`,[c,u]=b.useState(r);return b.useEffect(()=>{Number.isNaN(r)||u(r)},[r]),Z.createElement(Y6e,{className:Me(l,s),min:n,max:i,value:c,formatter:a,size:"small",onChange:d=>{r||u(d||0),o==null||o(d)}})},gHn=t=>{let{prefixCls:e,value:n,onChange:i}=t;const r=`${e}-alpha-input`,[o,s]=b.useState(Ef(n||"#000"));b.useEffect(()=>{n&&s(n)},[n]);const a=l=>{const c=o.toHsb();c.a=(l||0)/100;const u=Ef(c);n||s(u),i==null||i(u)};return Z.createElement(tI,{value:GFe(o),prefixCls:e,formatter:l=>`${l}%`,className:r,onChange:a})},bHn=t=>{const{getPrefixCls:e,direction:n}=b.useContext(jn),{prefixCls:i,className:r}=t,o=e("input-group",i),s=e("input"),[a,l]=V6e(s),c=Me(o,{[`${o}-lg`]:t.size==="large",[`${o}-sm`]:t.size==="small",[`${o}-compact`]:t.compact,[`${o}-rtl`]:n==="rtl"},l,r),u=b.useContext(ju),d=b.useMemo(()=>Object.assign(Object.assign({},u),{isFormItemInput:!1}),[u]);return Cr("Input.Group").deprecated(!1,"Input.Group","Space.Compact"),a(b.createElement("span",{className:c,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur},b.createElement(ju.Provider,{value:d},t.children)))},_It=t=>{let e;return typeof t=="object"&&(t!=null&&t.clearIcon)?e=t:t&&(e={clearIcon:Z.createElement($S,null)}),e};function xIt(t,e){const n=b.useRef([]),i=()=>{n.current.push(setTimeout(()=>{var r,o,s,a;!((r=t.current)===null||r===void 0)&&r.input&&((o=t.current)===null||o===void 0?void 0:o.input.getAttribute("type"))==="password"&&(!((s=t.current)===null||s===void 0)&&s.input.hasAttribute("value"))&&((a=t.current)===null||a===void 0||a.input.removeAttribute("value"))}))};return b.useEffect(()=>(e&&i(),()=>n.current.forEach(r=>{r&&clearTimeout(r)})),[]),i}function vHn(t){return!!(t.prefix||t.suffix||t.allowClear||t.showCount)}var yHn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};function _Hn(t,e){if(!t)return;t.focus(e);const{cursor:n}=e||{};if(n){const i=t.value.length;switch(n){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(i,i);break;default:t.setSelectionRange(0,i)}}}const QK=b.forwardRef((t,e)=>{var n;const{prefixCls:i,bordered:r=!0,status:o,size:s,disabled:a,onBlur:l,onFocus:c,suffix:u,allowClear:d,addonAfter:h,addonBefore:f,className:m,style:p,styles:g,rootClassName:y,onChange:_,classNames:w,variant:C}=t,N=yHn(t,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]);{const{deprecated:le}=Cr("Input");le(!("bordered"in t),"bordered","variant")}const{getPrefixCls:E,direction:D,input:k}=Z.useContext(jn),M=E("input",i),T=b.useRef(null),A=Il(M),[R,P,O]=V6e(M,A),{compactSize:V,compactItemClassnames:F}=VS(M,D),$=Hc(le=>{var Ne;return(Ne=s??V)!==null&&Ne!==void 0?Ne:le}),B=Z.useContext(Yd),z=a??B,{status:H,hasFeedback:K,feedbackIcon:q}=b.useContext(ju),U=BA(H,o),Y=vHn(t)||!!K,J=b.useRef(Y);{const le=Cr("Input");b.useEffect(()=>{var Ne;Y&&!J.current&&le(document.activeElement===((Ne=T.current)===null||Ne===void 0?void 0:Ne.input),"usage","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),J.current=Y},[Y])}const ae=xIt(T,!0),se=le=>{ae(),l==null||l(le)},oe=le=>{ae(),c==null||c(le)},fe=le=>{ae(),_==null||_(le)},de=(K||u)&&Z.createElement(Z.Fragment,null,u,K&&q),ie=_It(d??(k==null?void 0:k.allowClear)),[Q,be]=d6("input",C,r);return R(Z.createElement(Jzn,Object.assign({ref:Vu(e,T),prefixCls:M,autoComplete:k==null?void 0:k.autoComplete},N,{disabled:z,onBlur:se,onFocus:oe,style:Object.assign(Object.assign({},k==null?void 0:k.style),p),styles:Object.assign(Object.assign({},k==null?void 0:k.styles),g),suffix:de,allowClear:ie,className:Me(m,y,O,A,F,k==null?void 0:k.className),onChange:fe,addonBefore:f&&Z.createElement($0,{form:!0,space:!0},f),addonAfter:h&&Z.createElement($0,{form:!0,space:!0},h),classNames:Object.assign(Object.assign(Object.assign({},w),k==null?void 0:k.classNames),{input:Me({[`${M}-sm`]:$==="small",[`${M}-lg`]:$==="large",[`${M}-rtl`]:D==="rtl"},w==null?void 0:w.input,(n=k==null?void 0:k.classNames)===null||n===void 0?void 0:n.input,P),variant:Me({[`${M}-${Q}`]:be},oS(M,U)),affixWrapper:Me({[`${M}-affix-wrapper-sm`]:$==="small",[`${M}-affix-wrapper-lg`]:$==="large",[`${M}-affix-wrapper-rtl`]:D==="rtl"},P),wrapper:Me({[`${M}-group-rtl`]:D==="rtl"},P),groupWrapper:Me({[`${M}-group-wrapper-sm`]:$==="small",[`${M}-group-wrapper-lg`]:$==="large",[`${M}-group-wrapper-rtl`]:D==="rtl",[`${M}-group-wrapper-${Q}`]:be},oS(`${M}-group-wrapper`,U,K),P)})})))});QK.displayName="Input";const xHn=t=>{const{componentCls:e,paddingXS:n}=t;return{[e]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,"&-rtl":{direction:"rtl"},[`${e}-input`]:{textAlign:"center",paddingInline:t.paddingXXS},[`&${e}-sm ${e}-input`]:{paddingInline:t.calc(t.paddingXXS).div(2).equal()},[`&${e}-lg ${e}-input`]:{paddingInline:t.paddingXS}}}},wHn=Jr(["Input","OTP"],t=>{const e=mr(t,GK(t));return[xHn(e)]},YK);var CHn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const SHn=b.forwardRef((t,e)=>{const{value:n,onChange:i,onActiveChange:r,index:o,mask:s}=t,a=CHn(t,["value","onChange","onActiveChange","index","mask"]),l=n&&typeof s=="string"?s:n,c=m=>{i(o,m.target.value)},u=b.useRef(null);b.useImperativeHandle(e,()=>u.current);const d=()=>{Dr(()=>{var m;const p=(m=u.current)===null||m===void 0?void 0:m.input;document.activeElement===p&&p&&p.select()})},h=m=>{let{key:p}=m;p==="ArrowLeft"?r(o-1):p==="ArrowRight"&&r(o+1),d()},f=m=>{m.key==="Backspace"&&!n&&r(o-1),d()};return b.createElement(QK,Object.assign({type:s===!0?"password":"text"},a,{ref:u,value:l,onInput:c,onFocus:d,onKeyDown:h,onKeyUp:f,onMouseDown:d,onMouseUp:d}))});var NHn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};function HZ(t){return(t||"").split("")}const EHn=b.forwardRef((t,e)=>{const{prefixCls:n,length:i=6,size:r,defaultValue:o,value:s,onChange:a,formatter:l,variant:c,disabled:u,status:d,autoFocus:h,mask:f,type:m}=t,p=NHn(t,["prefixCls","length","size","defaultValue","value","onChange","formatter","variant","disabled","status","autoFocus","mask","type"]);Cr("Input.OTP")(!(typeof f=="string"&&f.length>1),"usage","`mask` prop should be a single character.");const{getPrefixCls:g,direction:y}=b.useContext(jn),_=g("otp",n),w=Ll(p,{aria:!0,data:!0,attr:!0}),C=Il(_),[N,E,D]=wHn(_,C),k=Hc(q=>r??q),M=b.useContext(ju),T=BA(M.status,d),A=b.useMemo(()=>Object.assign(Object.assign({},M),{status:T,hasFeedback:!1,feedbackIcon:null}),[M,T]),R=b.useRef(null),P=b.useRef({});b.useImperativeHandle(e,()=>({focus:()=>{var q;(q=P.current[0])===null||q===void 0||q.focus()},blur:()=>{var q;for(let U=0;U<i;U+=1)(q=P.current[U])===null||q===void 0||q.blur()},nativeElement:R.current}));const O=q=>l?l(q):q,[V,F]=b.useState(HZ(O(o||"")));b.useEffect(()=>{s!==void 0&&F(HZ(s))},[s]);const $=gr(q=>{F(q),a&&q.length===i&&q.every(U=>U)&&q.some((U,Y)=>V[Y]!==U)&&a(q.join(""))}),B=gr((q,U)=>{let Y=Ot(V);for(let ae=0;ae<q;ae+=1)Y[ae]||(Y[ae]="");U.length<=1?Y[q]=U:Y=Y.slice(0,q).concat(HZ(U)),Y=Y.slice(0,i);for(let ae=Y.length-1;ae>=0&&!Y[ae];ae-=1)Y.pop();const J=O(Y.map(ae=>ae||" ").join(""));return Y=HZ(J).map((ae,se)=>ae===" "&&!Y[se]?Y[se]:ae),Y}),z=(q,U)=>{var Y;const J=B(q,U),ae=Math.min(q+U.length,i-1);ae!==q&&((Y=P.current[ae])===null||Y===void 0||Y.focus()),$(J)},H=q=>{var U;(U=P.current[q])===null||U===void 0||U.focus()},K={variant:c,disabled:u,status:T,mask:f,type:m};return N(b.createElement("div",Object.assign({},w,{ref:R,className:Me(_,{[`${_}-sm`]:k==="small",[`${_}-lg`]:k==="large",[`${_}-rtl`]:y==="rtl"},D,E)}),b.createElement(ju.Provider,{value:A},Array.from({length:i}).map((q,U)=>{const Y=`otp-${U}`,J=V[U]||"";return b.createElement(SHn,Object.assign({ref:ae=>{P.current[U]=ae},key:Y,index:U,size:k,htmlSize:1,className:`${_}-input`,onChange:z,value:J,onActiveChange:H,autoFocus:U===0&&h},K))}))))});var DHn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},kHn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:DHn}))},jhe=b.forwardRef(kHn);jhe.displayName="EyeInvisibleOutlined";var MHn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},LHn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:MHn}))},JK=b.forwardRef(LHn);JK.displayName="EyeOutlined";var THn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const IHn=t=>t?b.createElement(JK,null):b.createElement(jhe,null),AHn={click:"onClick",hover:"onMouseOver"},wIt=b.forwardRef((t,e)=>{const{disabled:n,action:i="click",visibilityToggle:r=!0,iconRender:o=IHn}=t,s=b.useContext(Yd),a=n??s,l=typeof r=="object"&&r.visible!==void 0,[c,u]=b.useState(()=>l?r.visible:!1),d=b.useRef(null);b.useEffect(()=>{l&&u(r.visible)},[l,r]);const h=xIt(d),f=()=>{a||(c&&h(),u(T=>{var A;const R=!T;return typeof r=="object"&&((A=r.onVisibleChange)===null||A===void 0||A.call(r,R)),R}))},m=T=>{const A=AHn[i]||"",R=o(c),P={[A]:f,className:`${T}-icon`,key:"passwordIcon",onMouseDown:O=>{O.preventDefault()},onMouseUp:O=>{O.preventDefault()}};return b.cloneElement(b.isValidElement(R)?R:b.createElement("span",null,R),P)},{className:p,prefixCls:g,inputPrefixCls:y,size:_}=t,w=THn(t,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:C}=b.useContext(jn),N=C("input",y),E=C("input-password",g),D=r&&m(E),k=Me(E,p,{[`${E}-${_}`]:!!_}),M=Object.assign(Object.assign({},Zs(w,["suffix","iconRender","visibilityToggle"])),{type:c?"text":"password",className:k,prefixCls:N,suffix:D});return _&&(M.size=_),b.createElement(QK,Object.assign({ref:Vu(e,d)},M))});wIt.displayName="Input.Password";var RHn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const CIt=b.forwardRef((t,e)=>{const{prefixCls:n,inputPrefixCls:i,className:r,size:o,suffix:s,enterButton:a=!1,addonAfter:l,loading:c,disabled:u,onSearch:d,onChange:h,onCompositionStart:f,onCompositionEnd:m}=t,p=RHn(t,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:g,direction:y}=b.useContext(jn),_=b.useRef(!1),w=g("input-search",n),C=g("input",i),{compactSize:N}=VS(w,y),E=Hc(H=>{var K;return(K=o??N)!==null&&K!==void 0?K:H}),D=b.useRef(null),k=H=>{H!=null&&H.target&&H.type==="click"&&d&&d(H.target.value,H,{source:"clear"}),h==null||h(H)},M=H=>{var K;document.activeElement===((K=D.current)===null||K===void 0?void 0:K.input)&&H.preventDefault()},T=H=>{var K,q;d&&d((q=(K=D.current)===null||K===void 0?void 0:K.input)===null||q===void 0?void 0:q.value,H,{source:"input"})},A=H=>{_.current||c||T(H)},R=typeof a=="boolean"?b.createElement(ghe,null):null,P=`${w}-button`;let O;const V=a||{},F=V.type&&V.type.__ANT_BUTTON===!0;F||V.type==="button"?O=$c(V,Object.assign({onMouseDown:M,onClick:H=>{var K,q;(q=(K=V==null?void 0:V.props)===null||K===void 0?void 0:K.onClick)===null||q===void 0||q.call(K,H),T(H)},key:"enterButton"},F?{className:P,size:E}:{})):O=b.createElement(vn,{className:P,type:a?"primary":void 0,size:E,disabled:u,key:"enterButton",onMouseDown:M,onClick:T,loading:c,icon:R},a),l&&(O=[O,$c(l,{key:"addonAfter"})]);const $=Me(w,{[`${w}-rtl`]:y==="rtl",[`${w}-${E}`]:!!E,[`${w}-with-button`]:!!a},r),B=H=>{_.current=!0,f==null||f(H)},z=H=>{_.current=!1,m==null||m(H)};return b.createElement(QK,Object.assign({ref:Vu(D,e),onPressEnter:A},p,{size:E,onCompositionStart:B,onCompositionEnd:z,prefixCls:C,addonAfter:O,suffix:s,onChange:k,className:$,disabled:u}))});CIt.displayName="Search";var PHn=`
  min-height:0 !important;
  max-height:none !important;
  height:0 !important;
  visibility:hidden !important;
  overflow:hidden !important;
  position:absolute !important;
  z-index:-1000 !important;
  top:0 !important;
  right:0 !important;
  pointer-events: none !important;
`,OHn=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Txe={},vg;function jHn(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&Txe[n])return Txe[n];var i=window.getComputedStyle(t),r=i.getPropertyValue("box-sizing")||i.getPropertyValue("-moz-box-sizing")||i.getPropertyValue("-webkit-box-sizing"),o=parseFloat(i.getPropertyValue("padding-bottom"))+parseFloat(i.getPropertyValue("padding-top")),s=parseFloat(i.getPropertyValue("border-bottom-width"))+parseFloat(i.getPropertyValue("border-top-width")),a=OHn.map(function(c){return"".concat(c,":").concat(i.getPropertyValue(c))}).join(";"),l={sizingStyle:a,paddingSize:o,borderSize:s,boxSizing:r};return e&&n&&(Txe[n]=l),l}function FHn(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;vg||(vg=document.createElement("textarea"),vg.setAttribute("tab-index","-1"),vg.setAttribute("aria-hidden","true"),vg.setAttribute("name","hiddenTextarea"),document.body.appendChild(vg)),t.getAttribute("wrap")?vg.setAttribute("wrap",t.getAttribute("wrap")):vg.removeAttribute("wrap");var r=jHn(t,e),o=r.paddingSize,s=r.borderSize,a=r.boxSizing,l=r.sizingStyle;vg.setAttribute("style","".concat(l,";").concat(PHn)),vg.value=t.value||t.placeholder||"";var c=void 0,u=void 0,d,h=vg.scrollHeight;if(a==="border-box"?h+=s:a==="content-box"&&(h-=o),n!==null||i!==null){vg.value=" ";var f=vg.scrollHeight-o;n!==null&&(c=f*n,a==="border-box"&&(c=c+o+s),h=Math.max(c,h)),i!==null&&(u=f*i,a==="border-box"&&(u=u+o+s),d=h>u?"":"hidden",h=Math.min(u,h))}var m={height:h,overflowY:d,resize:"none"};return c&&(m.minHeight=c),u&&(m.maxHeight=u),m}var $Hn=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ixe=0,Axe=1,Rxe=2,VHn=b.forwardRef(function(t,e){var n=t,i=n.prefixCls,r=n.defaultValue,o=n.value,s=n.autoSize,a=n.onResize,l=n.className,c=n.style,u=n.disabled,d=n.onChange;n.onInternalAutoSize;var h=di(n,$Hn),f=ho(r,{value:o,postState:function(Y){return Y??""}}),m=He(f,2),p=m[0],g=m[1],y=function(Y){g(Y.target.value),d==null||d(Y)},_=b.useRef();b.useImperativeHandle(e,function(){return{textArea:_.current}});var w=b.useMemo(function(){return s&&Un(s)==="object"?[s.minRows,s.maxRows]:[]},[s]),C=He(w,2),N=C[0],E=C[1],D=!!s,k=function(){try{if(document.activeElement===_.current){var Y=_.current,J=Y.selectionStart,ae=Y.selectionEnd,se=Y.scrollTop;_.current.setSelectionRange(J,ae),_.current.scrollTop=se}}catch{}},M=b.useState(Rxe),T=He(M,2),A=T[0],R=T[1],P=b.useState(),O=He(P,2),V=O[0],F=O[1],$=function(){R(Ixe)};Lr(function(){D&&$()},[o,N,E,D]),Lr(function(){if(A===Ixe)R(Axe);else if(A===Axe){var U=FHn(_.current,!1,N,E);R(Rxe),F(U)}else k()},[A]);var B=b.useRef(),z=function(){Dr.cancel(B.current)},H=function(Y){A===Rxe&&(a==null||a(Y),s&&(z(),B.current=Dr(function(){$()})))};b.useEffect(function(){return z},[]);var K=D?V:null,q=Ie(Ie({},c),K);return(A===Ixe||A===Axe)&&(q.overflowY="hidden",q.overflowX="hidden"),b.createElement(Kd,{onResize:H,disabled:!(s||a)},b.createElement("textarea",lt({},h,{ref:_,style:q,className:Me(i,l,ye({},"".concat(i,"-disabled"),u)),disabled:u,value:p,onChange:y})))}),BHn=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],zHn=Z.forwardRef(function(t,e){var n,i=t.defaultValue,r=t.value,o=t.onFocus,s=t.onBlur,a=t.onChange,l=t.allowClear,c=t.maxLength,u=t.onCompositionStart,d=t.onCompositionEnd,h=t.suffix,f=t.prefixCls,m=f===void 0?"rc-textarea":f,p=t.showCount,g=t.count,y=t.className,_=t.style,w=t.disabled,C=t.hidden,N=t.classNames,E=t.styles,D=t.onResize,k=t.onClear,M=t.onPressEnter,T=t.readOnly,A=t.autoSize,R=t.onKeyDown,P=di(t,BHn),O=ho(i,{value:r,defaultValue:i}),V=He(O,2),F=V[0],$=V[1],B=F==null?"":String(F),z=Z.useState(!1),H=He(z,2),K=H[0],q=H[1],U=Z.useRef(!1),Y=Z.useState(null),J=He(Y,2),ae=J[0],se=J[1],oe=b.useRef(null),fe=b.useRef(null),de=function(){var Ge;return(Ge=fe.current)===null||Ge===void 0?void 0:Ge.textArea},ie=function(){de().focus()};b.useImperativeHandle(e,function(){var ut;return{resizableTextArea:fe.current,focus:ie,blur:function(){de().blur()},nativeElement:((ut=oe.current)===null||ut===void 0?void 0:ut.nativeElement)||de()}}),b.useEffect(function(){q(function(ut){return!w&&ut})},[w]);var Q=Z.useState(null),be=He(Q,2),le=be[0],Ne=be[1];Z.useEffect(function(){if(le){var ut;(ut=de()).setSelectionRange.apply(ut,Ot(le))}},[le]);var Le=bIt(g,p),Te=(n=Le.max)!==null&&n!==void 0?n:c,De=Number(Te)>0,Pe=Le.strategy(B),ge=!!Te&&Pe>Te,he=function(Ge,Ee){var Se=Ee;!U.current&&Le.exceedFormatter&&Le.max&&Le.strategy(Ee)>Le.max&&(Se=Le.exceedFormatter(Ee,{max:Le.max}),Ee!==Se&&Ne([de().selectionStart||0,de().selectionEnd||0])),$(Se),eie(Ge.currentTarget,Ge,a,Se)},me=function(Ge){U.current=!0,u==null||u(Ge)},X=function(Ge){U.current=!1,he(Ge,Ge.currentTarget.value),d==null||d(Ge)},re=function(Ge){he(Ge,Ge.target.value)},we=function(Ge){Ge.key==="Enter"&&M&&M(Ge),R==null||R(Ge)},ue=function(Ge){q(!0),o==null||o(Ge)},Ce=function(Ge){q(!1),s==null||s(Ge)},ze=function(Ge){$(""),ie(),eie(de(),Ge,a)},Ye=h,Ke;Le.show&&(Le.showFormatter?Ke=Le.showFormatter({value:B,count:Pe,maxLength:Te}):Ke="".concat(Pe).concat(De?" / ".concat(Te):""),Ye=Z.createElement(Z.Fragment,null,Ye,Z.createElement("span",{className:Me("".concat(m,"-data-count"),N==null?void 0:N.count),style:E==null?void 0:E.count},Ke)));var Xe=function(Ge){var Ee;D==null||D(Ge),(Ee=de())!==null&&Ee!==void 0&&Ee.style.height&&se(!0)},it=!A&&!p&&!l;return Z.createElement(G6e,{ref:oe,value:B,allowClear:l,handleReset:ze,suffix:Ye,prefixCls:m,classNames:Ie(Ie({},N),{},{affixWrapper:Me(N==null?void 0:N.affixWrapper,ye(ye({},"".concat(m,"-show-count"),p),"".concat(m,"-textarea-allow-clear"),l))}),disabled:w,focused:K,className:Me(y,ge&&"".concat(m,"-out-of-range")),style:Ie(Ie({},_),ae&&!it?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ke=="string"?Ke:void 0}},hidden:C,readOnly:T,onClear:k},Z.createElement(VHn,lt({},P,{autoSize:A,maxLength:c,onKeyDown:we,onChange:re,onFocus:ue,onBlur:Ce,onCompositionStart:me,onCompositionEnd:X,className:Me(N==null?void 0:N.textarea),style:Ie(Ie({},E==null?void 0:E.textarea),{},{resize:_==null?void 0:_.resize}),disabled:w,prefixCls:m,onResize:Xe,ref:fe,readOnly:T})))}),HHn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const SIt=b.forwardRef((t,e)=>{var n,i;const{prefixCls:r,bordered:o=!0,size:s,disabled:a,status:l,allowClear:c,classNames:u,rootClassName:d,className:h,style:f,styles:m,variant:p}=t,g=HHn(t,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant"]);{const{deprecated:H}=Cr("TextArea");H(!("bordered"in t),"bordered","variant")}const{getPrefixCls:y,direction:_,textArea:w}=b.useContext(jn),C=Hc(s),N=b.useContext(Yd),E=a??N,{status:D,hasFeedback:k,feedbackIcon:M}=b.useContext(ju),T=BA(D,l),A=b.useRef(null);b.useImperativeHandle(e,()=>{var H;return{resizableTextArea:(H=A.current)===null||H===void 0?void 0:H.resizableTextArea,focus:K=>{var q,U;_Hn((U=(q=A.current)===null||q===void 0?void 0:q.resizableTextArea)===null||U===void 0?void 0:U.textArea,K)},blur:()=>{var K;return(K=A.current)===null||K===void 0?void 0:K.blur()}}});const R=y("input",r),P=Il(R),[O,V,F]=V6e(R,P),[$,B]=d6("textArea",p,o),z=_It(c??(w==null?void 0:w.allowClear));return O(b.createElement(zHn,Object.assign({autoComplete:w==null?void 0:w.autoComplete},g,{style:Object.assign(Object.assign({},w==null?void 0:w.style),f),styles:Object.assign(Object.assign({},w==null?void 0:w.styles),m),disabled:E,allowClear:z,className:Me(F,P,h,d,w==null?void 0:w.className),classNames:Object.assign(Object.assign(Object.assign({},u),w==null?void 0:w.classNames),{textarea:Me({[`${R}-sm`]:C==="small",[`${R}-lg`]:C==="large"},V,u==null?void 0:u.textarea,(n=w==null?void 0:w.classNames)===null||n===void 0?void 0:n.textarea),variant:Me({[`${R}-${$}`]:B},oS(R,T)),affixWrapper:Me(`${R}-textarea-affix-wrapper`,{[`${R}-affix-wrapper-rtl`]:_==="rtl",[`${R}-affix-wrapper-sm`]:C==="small",[`${R}-affix-wrapper-lg`]:C==="large",[`${R}-textarea-show-count`]:t.showCount||((i=t.count)===null||i===void 0?void 0:i.show)},V)}),prefixCls:R,suffix:k&&b.createElement("span",{className:`${R}-textarea-suffix`},M),ref:A})))}),es=QK;es.Group=bHn;es.Search=CIt;es.TextArea=SIt;es.Password=wIt;es.OTP=EHn;const WHn=/(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i,UHn=t=>WHn.test(`#${t}`),KHn=t=>{let{prefixCls:e,value:n,onChange:i}=t;const r=`${e}-hex-input`,[o,s]=b.useState(()=>n?F7(n.toHexString()):void 0);b.useEffect(()=>{n&&s(F7(n.toHexString()))},[n]);const a=l=>{const c=l.target.value;s(F7(c)),UHn(F7(c,!0))&&(i==null||i(Ef(c)))};return Z.createElement(es,{className:r,value:o,prefix:"#",onChange:a,size:"small"})},qHn=t=>{let{prefixCls:e,value:n,onChange:i}=t;const r=`${e}-hsb-input`,[o,s]=b.useState(Ef(n||"#000"));b.useEffect(()=>{n&&s(n)},[n]);const a=(l,c)=>{const u=o.toHsb();u[c]=c==="h"?l:(l||0)/100;const d=Ef(u);n||s(d),i==null||i(d)};return Z.createElement("div",{className:r},Z.createElement(tI,{max:360,min:0,value:Number(o.toHsb().h),prefixCls:e,className:r,formatter:l=>Aee(l||0).toString(),onChange:l=>a(Number(l),"h")}),Z.createElement(tI,{max:100,min:0,value:Number(o.toHsb().s)*100,prefixCls:e,className:r,formatter:l=>`${Aee(l||0)}%`,onChange:l=>a(Number(l),"s")}),Z.createElement(tI,{max:100,min:0,value:Number(o.toHsb().b)*100,prefixCls:e,className:r,formatter:l=>`${Aee(l||0)}%`,onChange:l=>a(Number(l),"b")}))},GHn=t=>{let{prefixCls:e,value:n,onChange:i}=t;const r=`${e}-rgb-input`,[o,s]=b.useState(Ef(n||"#000"));b.useEffect(()=>{n&&s(n)},[n]);const a=(l,c)=>{const u=o.toRgb();u[c]=l||0;const d=Ef(u);n||s(d),i==null||i(d)};return Z.createElement("div",{className:r},Z.createElement(tI,{max:255,min:0,value:Number(o.toRgb().r),prefixCls:e,className:r,onChange:l=>a(Number(l),"r")}),Z.createElement(tI,{max:255,min:0,value:Number(o.toRgb().g),prefixCls:e,className:r,onChange:l=>a(Number(l),"g")}),Z.createElement(tI,{max:255,min:0,value:Number(o.toRgb().b),prefixCls:e,className:r,onChange:l=>a(Number(l),"b")}))},YHn=[hD.hex,hD.hsb,hD.rgb].map(t=>({value:t,label:t.toLocaleUpperCase()})),XHn=t=>{const{prefixCls:e,format:n,value:i,disabledAlpha:r,onFormatChange:o,onChange:s}=t,[a,l]=ho(hD.hex,{value:n,onChange:o}),c=`${e}-input`,u=h=>{l(h)},d=b.useMemo(()=>{const h={value:i,prefixCls:e,onChange:s};switch(a){case hD.hsb:return Z.createElement(qHn,Object.assign({},h));case hD.rgb:return Z.createElement(GHn,Object.assign({},h));default:return Z.createElement(KHn,Object.assign({},h))}},[a,e,i,s]);return Z.createElement("div",{className:`${c}-container`},Z.createElement(Lo,{value:a,variant:"borderless",getPopupContainer:h=>h,popupMatchSelectWidth:68,placement:"bottomRight",onChange:u,className:`${e}-format-select`,size:"small",options:YHn}),Z.createElement("div",{className:c},d),!r&&Z.createElement(gHn,{prefixCls:e,value:i,onChange:s}))};function uke(t,e,n){return(t-e)/(n-e)}function X6e(t,e,n,i){var r=uke(e,n,i),o={};switch(t){case"rtl":o.right="".concat(r*100,"%"),o.transform="translateX(50%)";break;case"btt":o.bottom="".concat(r*100,"%"),o.transform="translateY(50%)";break;case"ttb":o.top="".concat(r*100,"%"),o.transform="translateY(-50%)";break;default:o.left="".concat(r*100,"%"),o.transform="translateX(-50%)";break}return o}function e4(t,e){return Array.isArray(t)?t[e]:t}var WA=b.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),NIt=b.createContext({}),ZHn=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],dke=b.forwardRef(function(t,e){var n=t.prefixCls,i=t.value,r=t.valueIndex,o=t.onStartMove,s=t.onDelete,a=t.style,l=t.render,c=t.dragging,u=t.draggingDelete,d=t.onOffsetChange,h=t.onChangeComplete,f=t.onFocus,m=t.onMouseEnter,p=di(t,ZHn),g=b.useContext(WA),y=g.min,_=g.max,w=g.direction,C=g.disabled,N=g.keyboard,E=g.range,D=g.tabIndex,k=g.ariaLabelForHandle,M=g.ariaLabelledByForHandle,T=g.ariaValueTextFormatterForHandle,A=g.styles,R=g.classNames,P="".concat(n,"-handle"),O=function(Y){C||o(Y,r)},V=function(Y){f==null||f(Y,r)},F=function(Y){m(Y,r)},$=function(Y){if(!C&&N){var J=null;switch(Y.which||Y.keyCode){case Wt.LEFT:J=w==="ltr"||w==="btt"?-1:1;break;case Wt.RIGHT:J=w==="ltr"||w==="btt"?1:-1;break;case Wt.UP:J=w!=="ttb"?1:-1;break;case Wt.DOWN:J=w!=="ttb"?-1:1;break;case Wt.HOME:J="min";break;case Wt.END:J="max";break;case Wt.PAGE_UP:J=2;break;case Wt.PAGE_DOWN:J=-2;break;case Wt.BACKSPACE:case Wt.DELETE:s(r);break}J!==null&&(Y.preventDefault(),d(J,r))}},B=function(Y){switch(Y.which||Y.keyCode){case Wt.LEFT:case Wt.RIGHT:case Wt.UP:case Wt.DOWN:case Wt.HOME:case Wt.END:case Wt.PAGE_UP:case Wt.PAGE_DOWN:h==null||h();break}},z=X6e(w,i,y,_),H={};if(r!==null){var K;H={tabIndex:C?null:e4(D,r),role:"slider","aria-valuemin":y,"aria-valuemax":_,"aria-valuenow":i,"aria-disabled":C,"aria-label":e4(k,r),"aria-labelledby":e4(M,r),"aria-valuetext":(K=e4(T,r))===null||K===void 0?void 0:K(i),"aria-orientation":w==="ltr"||w==="rtl"?"horizontal":"vertical",onMouseDown:O,onTouchStart:O,onFocus:V,onMouseEnter:F,onKeyDown:$,onKeyUp:B}}var q=b.createElement("div",lt({ref:e,className:Me(P,ye(ye(ye({},"".concat(P,"-").concat(r+1),r!==null&&E),"".concat(P,"-dragging"),c),"".concat(P,"-dragging-delete"),u),R.handle),style:Ie(Ie(Ie({},z),a),A.handle)},H,p));return l&&(q=l(q,{index:r,prefixCls:n,value:i,dragging:c,draggingDelete:u})),q});dke.displayName="Handle";var QHn=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"],EIt=b.forwardRef(function(t,e){var n=t.prefixCls,i=t.style,r=t.onStartMove,o=t.onOffsetChange,s=t.values,a=t.handleRender,l=t.activeHandleRender,c=t.draggingIndex,u=t.draggingDelete,d=t.onFocus,h=di(t,QHn),f=b.useRef({}),m=b.useState(!1),p=He(m,2),g=p[0],y=p[1],_=b.useState(-1),w=He(_,2),C=w[0],N=w[1],E=function(A){N(A),y(!0)},D=function(A,R){E(R),d==null||d(A)},k=function(A,R){E(R)};b.useImperativeHandle(e,function(){return{focus:function(A){var R;(R=f.current[A])===null||R===void 0||R.focus()},hideHelp:function(){Fc.flushSync(function(){y(!1)})}}});var M=Ie({prefixCls:n,onStartMove:r,onOffsetChange:o,render:a,onFocus:D,onMouseEnter:k},h);return b.createElement(b.Fragment,null,s.map(function(T,A){var R=c===A;return b.createElement(dke,lt({ref:function(O){O?f.current[A]=O:delete f.current[A]},dragging:R,draggingDelete:R&&u,style:e4(i,A),key:A,value:T,valueIndex:A},M))}),l&&g&&b.createElement(dke,lt({key:"a11y"},M,{value:s[C],valueIndex:null,dragging:c!==-1,draggingDelete:u,render:l,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))});EIt.displayName="Handles";var JHn=function(e){var n=e.prefixCls,i=e.style,r=e.children,o=e.value,s=e.onClick,a=b.useContext(WA),l=a.min,c=a.max,u=a.direction,d=a.includedStart,h=a.includedEnd,f=a.included,m="".concat(n,"-text"),p=X6e(u,o,l,c);return b.createElement("span",{className:Me(m,ye({},"".concat(m,"-active"),f&&d<=o&&o<=h)),style:Ie(Ie({},p),i),onMouseDown:function(y){y.stopPropagation()},onClick:function(){s(o)}},r)},eWn=function(e){var n=e.prefixCls,i=e.marks,r=e.onClick,o="".concat(n,"-mark");return i.length?b.createElement("div",{className:o},i.map(function(s){var a=s.value,l=s.style,c=s.label;return b.createElement(JHn,{key:a,prefixCls:o,style:l,value:a,onClick:r},c)})):null},tWn=function(e){var n=e.prefixCls,i=e.value,r=e.style,o=e.activeStyle,s=b.useContext(WA),a=s.min,l=s.max,c=s.direction,u=s.included,d=s.includedStart,h=s.includedEnd,f="".concat(n,"-dot"),m=u&&d<=i&&i<=h,p=Ie(Ie({},X6e(c,i,a,l)),typeof r=="function"?r(i):r);return m&&(p=Ie(Ie({},p),typeof o=="function"?o(i):o)),b.createElement("span",{className:Me(f,ye({},"".concat(f,"-active"),m)),style:p})},nWn=function(e){var n=e.prefixCls,i=e.marks,r=e.dots,o=e.style,s=e.activeStyle,a=b.useContext(WA),l=a.min,c=a.max,u=a.step,d=b.useMemo(function(){var h=new Set;if(i.forEach(function(m){h.add(m.value)}),r&&u!==null)for(var f=l;f<=c;)h.add(f),f+=u;return Array.from(h)},[l,c,u,r,i]);return b.createElement("div",{className:"".concat(n,"-step")},d.map(function(h){return b.createElement(tWn,{prefixCls:n,key:h,value:h,style:o,activeStyle:s})}))},ait=function(e){var n=e.prefixCls,i=e.style,r=e.start,o=e.end,s=e.index,a=e.onStartMove,l=e.replaceCls,c=b.useContext(WA),u=c.direction,d=c.min,h=c.max,f=c.disabled,m=c.range,p=c.classNames,g="".concat(n,"-track"),y=uke(r,d,h),_=uke(o,d,h),w=function(D){!f&&a&&a(D,-1)},C={};switch(u){case"rtl":C.right="".concat(y*100,"%"),C.width="".concat(_*100-y*100,"%");break;case"btt":C.bottom="".concat(y*100,"%"),C.height="".concat(_*100-y*100,"%");break;case"ttb":C.top="".concat(y*100,"%"),C.height="".concat(_*100-y*100,"%");break;default:C.left="".concat(y*100,"%"),C.width="".concat(_*100-y*100,"%")}var N=l||Me(g,ye(ye({},"".concat(g,"-").concat(s+1),s!==null&&m),"".concat(n,"-track-draggable"),a),p.track);return b.createElement("div",{className:N,style:Ie(Ie({},C),i),onMouseDown:w,onTouchStart:w})},iWn=function(e){var n=e.prefixCls,i=e.style,r=e.values,o=e.startPoint,s=e.onStartMove,a=b.useContext(WA),l=a.included,c=a.range,u=a.min,d=a.styles,h=a.classNames,f=b.useMemo(function(){if(!c){if(r.length===0)return[];var p=o??u,g=r[0];return[{start:Math.min(p,g),end:Math.max(p,g)}]}for(var y=[],_=0;_<r.length-1;_+=1)y.push({start:r[_],end:r[_+1]});return y},[r,c,o,u]);if(!l)return null;var m=h.tracks||d.tracks?b.createElement(ait,{index:null,prefixCls:n,start:f[0].start,end:f[f.length-1].end,replaceCls:Me(h.tracks,"".concat(n,"-tracks")),style:d.tracks}):null;return b.createElement(b.Fragment,null,m,f.map(function(p,g){var y=p.start,_=p.end;return b.createElement(ait,{index:g,prefixCls:n,style:Ie(Ie({},e4(i,g)),d.track),start:y,end:_,key:g,onStartMove:s})}))},rWn=130;function lit(t){var e="targetTouches"in t?t.targetTouches[0]:t;return{pageX:e.pageX,pageY:e.pageY}}function oWn(t,e,n,i,r,o,s,a,l,c,u){var d=b.useState(null),h=He(d,2),f=h[0],m=h[1],p=b.useState(-1),g=He(p,2),y=g[0],_=g[1],w=b.useState(!1),C=He(w,2),N=C[0],E=C[1],D=b.useState(n),k=He(D,2),M=k[0],T=k[1],A=b.useState(n),R=He(A,2),P=R[0],O=R[1],V=b.useRef(null),F=b.useRef(null),$=b.useRef(null),B=b.useContext(NIt),z=B.onDragStart,H=B.onDragChange;Lr(function(){y===-1&&T(n)},[n,y]),b.useEffect(function(){return function(){document.removeEventListener("mousemove",V.current),document.removeEventListener("mouseup",F.current),$.current&&($.current.removeEventListener("touchmove",V.current),$.current.removeEventListener("touchend",F.current))}},[]);var K=function(ae,se,oe){se!==void 0&&m(se),T(ae);var fe=ae;oe&&(fe=ae.filter(function(de,ie){return ie!==y})),s(fe),H&&H({rawValues:ae,deleteIndex:oe?y:-1,draggingIndex:y,draggingValue:se})},q=gr(function(J,ae,se){if(J===-1){var oe=P[0],fe=P[P.length-1],de=i-oe,ie=r-fe,Q=ae*(r-i);Q=Math.max(Q,de),Q=Math.min(Q,ie);var be=o(oe+Q);Q=be-oe;var le=P.map(function(De){return De+Q});K(le)}else{var Ne=(r-i)*ae,Le=Ot(M);Le[J]=P[J];var Te=l(Le,Ne,J,"dist");K(Te.values,Te.value,se)}}),U=function(ae,se,oe){ae.stopPropagation();var fe=oe||n,de=fe[se];_(se),m(de),O(fe),T(fe),E(!1);var ie=lit(ae),Q=ie.pageX,be=ie.pageY,le=!1;z&&z({rawValues:fe,draggingIndex:se,draggingValue:de});var Ne=function(De){De.preventDefault();var Pe=lit(De),ge=Pe.pageX,he=Pe.pageY,me=ge-Q,X=he-be,re=t.current.getBoundingClientRect(),we=re.width,ue=re.height,Ce,ze;switch(e){case"btt":Ce=-X/ue,ze=me;break;case"ttb":Ce=X/ue,ze=me;break;case"rtl":Ce=-me/we,ze=X;break;default:Ce=me/we,ze=X}le=c?Math.abs(ze)>rWn&&u<M.length:!1,E(le),q(se,Ce,le)},Le=function Te(De){De.preventDefault(),document.removeEventListener("mouseup",Te),document.removeEventListener("mousemove",Ne),$.current&&($.current.removeEventListener("touchmove",V.current),$.current.removeEventListener("touchend",F.current)),V.current=null,F.current=null,$.current=null,a(le),_(-1),E(!1)};document.addEventListener("mouseup",Le),document.addEventListener("mousemove",Ne),ae.currentTarget.addEventListener("touchend",Le),ae.currentTarget.addEventListener("touchmove",Ne),V.current=Ne,F.current=Le,$.current=ae.currentTarget},Y=b.useMemo(function(){var J=Ot(n).sort(function(de,ie){return de-ie}),ae=Ot(M).sort(function(de,ie){return de-ie}),se={};ae.forEach(function(de){se[de]=(se[de]||0)+1}),J.forEach(function(de){se[de]=(se[de]||0)-1});var oe=c?1:0,fe=Object.values(se).reduce(function(de,ie){return de+Math.abs(ie)},0);return fe<=oe?M:n},[n,M,c]);return[y,f,N,Y,U]}function sWn(t,e,n,i,r,o){var s=b.useCallback(function(f){return Math.max(t,Math.min(e,f))},[t,e]),a=b.useCallback(function(f){if(n!==null){var m=t+Math.round((s(f)-t)/n)*n,p=function(w){return(String(w).split(".")[1]||"").length},g=Math.max(p(n),p(e),p(t)),y=Number(m.toFixed(g));return t<=y&&y<=e?y:null}return null},[n,t,e,s]),l=b.useCallback(function(f){var m=s(f),p=i.map(function(_){return _.value});n!==null&&p.push(a(f)),p.push(t,e);var g=p[0],y=e-t;return p.forEach(function(_){var w=Math.abs(m-_);w<=y&&(g=_,y=w)}),g},[t,e,i,n,s,a]),c=function f(m,p,g){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof p=="number"){var _,w=m[g],C=w+p,N=[];i.forEach(function(T){N.push(T.value)}),N.push(t,e),N.push(a(w));var E=p>0?1:-1;y==="unit"?N.push(a(w+E*n)):N.push(a(C)),N=N.filter(function(T){return T!==null}).filter(function(T){return p<0?T<=w:T>=w}),y==="unit"&&(N=N.filter(function(T){return T!==w}));var D=y==="unit"?w:C;_=N[0];var k=Math.abs(_-D);if(N.forEach(function(T){var A=Math.abs(T-D);A<k&&(_=T,k=A)}),_===void 0)return p<0?t:e;if(y==="dist")return _;if(Math.abs(p)>1){var M=Ot(m);return M[g]=_,f(M,p-E,g,y)}return _}else{if(p==="min")return t;if(p==="max")return e}},u=function(m,p,g){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",_=m[g],w=c(m,p,g,y);return{value:w,changed:w!==_}},d=function(m){return o===null&&m===0||typeof o=="number"&&m<o},h=function(m,p,g){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",_=m.map(l),w=_[g],C=c(_,p,g,y);if(_[g]=C,r===!1){var N=o||0;g>0&&_[g-1]!==w&&(_[g]=Math.max(_[g],_[g-1]+N)),g<_.length-1&&_[g+1]!==w&&(_[g]=Math.min(_[g],_[g+1]-N))}else if(typeof o=="number"||o===null){for(var E=g+1;E<_.length;E+=1)for(var D=!0;d(_[E]-_[E-1])&&D;){var k=u(_,1,E);_[E]=k.value,D=k.changed}for(var M=g;M>0;M-=1)for(var T=!0;d(_[M]-_[M-1])&&T;){var A=u(_,-1,M-1);_[M-1]=A.value,T=A.changed}for(var R=_.length-1;R>0;R-=1)for(var P=!0;d(_[R]-_[R-1])&&P;){var O=u(_,-1,R-1);_[R-1]=O.value,P=O.changed}for(var V=0;V<_.length-1;V+=1)for(var F=!0;d(_[V+1]-_[V])&&F;){var $=u(_,1,V+1);_[V+1]=$.value,F=$.changed}}return{value:_[g],values:_}};return[l,h]}function aWn(t){return b.useMemo(function(){if(t===!0||!t)return[!!t,!1,!1,0];var e=t.editable,n=t.draggableTrack,i=t.minCount,r=t.maxCount;return I0(!e||!n,"`editable` can not work with `draggableTrack`."),[!0,e,!e&&n,i||0,r]},[t])}var DIt=b.forwardRef(function(t,e){var n=t.prefixCls,i=n===void 0?"rc-slider":n,r=t.className,o=t.style,s=t.classNames,a=t.styles,l=t.id,c=t.disabled,u=c===void 0?!1:c,d=t.keyboard,h=d===void 0?!0:d,f=t.autoFocus,m=t.onFocus,p=t.onBlur,g=t.min,y=g===void 0?0:g,_=t.max,w=_===void 0?100:_,C=t.step,N=C===void 0?1:C,E=t.value,D=t.defaultValue,k=t.range,M=t.count,T=t.onChange,A=t.onBeforeChange,R=t.onAfterChange,P=t.onChangeComplete,O=t.allowCross,V=O===void 0?!0:O,F=t.pushable,$=F===void 0?!1:F,B=t.reverse,z=t.vertical,H=t.included,K=H===void 0?!0:H,q=t.startPoint,U=t.trackStyle,Y=t.handleStyle,J=t.railStyle,ae=t.dotStyle,se=t.activeDotStyle,oe=t.marks,fe=t.dots,de=t.handleRender,ie=t.activeHandleRender,Q=t.track,be=t.tabIndex,le=be===void 0?0:be,Ne=t.ariaLabelForHandle,Le=t.ariaLabelledByForHandle,Te=t.ariaValueTextFormatterForHandle,De=b.useRef(null),Pe=b.useRef(null),ge=b.useMemo(function(){return z?B?"ttb":"btt":B?"rtl":"ltr"},[B,z]),he=aWn(k),me=He(he,5),X=me[0],re=me[1],we=me[2],ue=me[3],Ce=me[4],ze=b.useMemo(function(){return isFinite(y)?y:0},[y]),Ye=b.useMemo(function(){return isFinite(w)?w:100},[w]),Ke=b.useMemo(function(){return N!==null&&N<=0?1:N},[N]),Xe=b.useMemo(function(){return typeof $=="boolean"?$?Ke:!1:$>=0?$:!1},[$,Ke]),it=b.useMemo(function(){return Object.keys(oe||{}).map(function(on){var yn=oe[on],fi={value:Number(on)};return yn&&Un(yn)==="object"&&!b.isValidElement(yn)&&("label"in yn||"style"in yn)?(fi.style=yn.style,fi.label=yn.label):fi.label=yn,fi}).filter(function(on){var yn=on.label;return yn||typeof yn=="number"}).sort(function(on,yn){return on.value-yn.value})},[oe]),ut=sWn(ze,Ye,Ke,it,V,Xe),Ge=He(ut,2),Ee=Ge[0],Se=Ge[1],je=ho(D,{value:E}),nt=He(je,2),rt=nt[0],St=nt[1],At=b.useMemo(function(){var on=rt==null?[]:Array.isArray(rt)?rt:[rt],yn=He(on,1),fi=yn[0],oi=fi===void 0?ze:fi,Qi=rt===null?[]:[oi];if(X){if(Qi=Ot(on),M||rt===void 0){var mi=M>=0?M+1:2;for(Qi=Qi.slice(0,mi);Qi.length<mi;){var Vr;Qi.push((Vr=Qi[Qi.length-1])!==null&&Vr!==void 0?Vr:ze)}}Qi.sort(function(_i,ur){return _i-ur})}return Qi.forEach(function(_i,ur){Qi[ur]=Ee(_i)}),Qi},[rt,X,ze,M,Ee]),Nt=function(yn){return X?yn:yn[0]},vt=gr(function(on){var yn=Ot(on).sort(function(fi,oi){return fi-oi});T&&!jp(yn,At,!0)&&T(Nt(yn)),St(yn)}),$t=gr(function(on){on&&De.current.hideHelp();var yn=Nt(At);R==null||R(yn),ii(!R,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),P==null||P(yn)}),ln=function(yn){if(!(u||!re||At.length<=ue)){var fi=Ot(At);fi.splice(yn,1),A==null||A(Nt(fi)),vt(fi);var oi=Math.max(0,yn-1);De.current.hideHelp(),De.current.focus(oi)}},Jt=oWn(Pe,ge,At,ze,Ye,Ee,vt,$t,Se,re,ue),en=He(Jt,5),Ft=en[0],dn=en[1],Ze=en[2],dt=en[3],at=en[4],mt=function(yn,fi){if(!u){var oi=Ot(At),Qi=0,mi=0,Vr=Ye-ze;At.forEach(function(Si,To){var ts=Math.abs(yn-Si);ts<=Vr&&(Vr=ts,Qi=To),Si<yn&&(mi=To)});var _i=Qi;re&&Vr!==0&&(!Ce||At.length<Ce)?(oi.splice(mi+1,0,yn),_i=mi+1):oi[Qi]=yn,X&&!At.length&&M===void 0&&oi.push(yn);var ur=Nt(oi);if(A==null||A(ur),vt(oi),fi){var si,Ii;(si=document.activeElement)===null||si===void 0||(Ii=si.blur)===null||Ii===void 0||Ii.call(si),De.current.focus(_i),at(fi,_i,oi)}else R==null||R(ur),ii(!R,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),P==null||P(ur)}},It=function(yn){yn.preventDefault();var fi=Pe.current.getBoundingClientRect(),oi=fi.width,Qi=fi.height,mi=fi.left,Vr=fi.top,_i=fi.bottom,ur=fi.right,si=yn.clientX,Ii=yn.clientY,Si;switch(ge){case"btt":Si=(_i-Ii)/Qi;break;case"ttb":Si=(Ii-Vr)/Qi;break;case"rtl":Si=(ur-si)/oi;break;default:Si=(si-mi)/oi}var To=ze+Si*(Ye-ze);mt(Ee(To),yn)},Ve=b.useState(null),bt=He(Ve,2),wt=bt[0],$e=bt[1],We=function(yn,fi){if(!u){var oi=Se(At,yn,fi);A==null||A(Nt(At)),vt(oi.values),$e(oi.value)}};b.useEffect(function(){if(wt!==null){var on=At.indexOf(wt);on>=0&&De.current.focus(on)}$e(null)},[wt]);var tt=b.useMemo(function(){return we&&Ke===null?(ii(!1,"`draggableTrack` is not supported when `step` is `null`."),!1):we},[we,Ke]),_t=gr(function(on,yn){at(on,yn),A==null||A(Nt(At))}),ht=Ft!==-1;b.useEffect(function(){if(!ht){var on=At.lastIndexOf(dn);De.current.focus(on)}},[ht]);var qe=b.useMemo(function(){return Ot(dt).sort(function(on,yn){return on-yn})},[dt]),ft=b.useMemo(function(){return X?[qe[0],qe[qe.length-1]]:[ze,qe[0]]},[qe,X,ze]),Ct=He(ft,2),Pt=Ct[0],an=Ct[1];b.useImperativeHandle(e,function(){return{focus:function(){De.current.focus(0)},blur:function(){var yn,fi=document,oi=fi.activeElement;(yn=Pe.current)!==null&&yn!==void 0&&yn.contains(oi)&&(oi==null||oi.blur())}}}),b.useEffect(function(){f&&De.current.focus(0)},[]);var _n=b.useMemo(function(){return{min:ze,max:Ye,direction:ge,disabled:u,keyboard:h,step:Ke,included:K,includedStart:Pt,includedEnd:an,range:X,tabIndex:le,ariaLabelForHandle:Ne,ariaLabelledByForHandle:Le,ariaValueTextFormatterForHandle:Te,styles:a||{},classNames:s||{}}},[ze,Ye,ge,u,h,Ke,K,Pt,an,X,le,Ne,Le,Te,a,s]);return b.createElement(WA.Provider,{value:_n},b.createElement("div",{ref:Pe,className:Me(i,r,ye(ye(ye(ye({},"".concat(i,"-disabled"),u),"".concat(i,"-vertical"),z),"".concat(i,"-horizontal"),!z),"".concat(i,"-with-marks"),it.length)),style:o,onMouseDown:It,id:l},b.createElement("div",{className:Me("".concat(i,"-rail"),s==null?void 0:s.rail),style:Ie(Ie({},J),a==null?void 0:a.rail)}),Q!==!1&&b.createElement(iWn,{prefixCls:i,style:U,values:At,startPoint:q,onStartMove:tt?_t:void 0}),b.createElement(nWn,{prefixCls:i,marks:it,dots:fe,style:ae,activeStyle:se}),b.createElement(EIt,{ref:De,prefixCls:i,style:Y,values:dt,draggingIndex:Ft,draggingDelete:Ze,onStartMove:_t,onOffsetChange:We,onFocus:m,onBlur:p,handleRender:de,activeHandleRender:ie,onChangeComplete:$t,onDelete:re?ln:void 0}),b.createElement(eWn,{prefixCls:i,marks:it,onClick:mt})))});DIt.displayName="Slider";const hke=b.forwardRef((t,e)=>{const{open:n,draggingDelete:i}=t,r=b.useRef(null),o=n&&!i,s=b.useRef(null);function a(){Dr.cancel(s.current),s.current=null}function l(){s.current=Dr(()=>{var c;(c=r.current)===null||c===void 0||c.forceAlign(),s.current=null})}return b.useEffect(()=>(o?l():a(),a),[o,t.title]),b.createElement(Vs,Object.assign({ref:Vu(r,e)},t,{open:o}))});hke.displayName="SliderTooltip";const lWn=t=>{const{componentCls:e,antCls:n,controlSize:i,dotSize:r,marginFull:o,marginPart:s,colorFillContentHover:a,handleColorDisabled:l,calc:c,handleSize:u,handleSizeHover:d,handleActiveColor:h,handleActiveOutlineColor:f,handleLineWidth:m,handleLineWidthHover:p,motionDurationMid:g}=t;return{[e]:Object.assign(Object.assign({},fo(t)),{position:"relative",height:i,margin:`${xe(s)} ${xe(o)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${xe(o)} ${xe(s)}`},[`${e}-rail`]:{position:"absolute",backgroundColor:t.railBg,borderRadius:t.borderRadiusXS,transition:`background-color ${g}`},[`${e}-track,${e}-tracks`]:{position:"absolute",transition:`background-color ${g}`},[`${e}-track`]:{backgroundColor:t.trackBg,borderRadius:t.borderRadiusXS},[`${e}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${e}-rail`]:{backgroundColor:t.railHoverBg},[`${e}-track`]:{backgroundColor:t.trackHoverBg},[`${e}-dot`]:{borderColor:a},[`${e}-handle::after`]:{boxShadow:`0 0 0 ${xe(m)} ${t.colorPrimaryBorderHover}`},[`${e}-dot-active`]:{borderColor:t.dotActiveBorderColor}},[`${e}-handle`]:{position:"absolute",width:u,height:u,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0},"&::before":{content:'""',position:"absolute",insetInlineStart:c(m).mul(-1).equal(),insetBlockStart:c(m).mul(-1).equal(),width:c(u).add(c(m).mul(2)).equal(),height:c(u).add(c(m).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:u,height:u,backgroundColor:t.colorBgElevated,boxShadow:`0 0 0 ${xe(m)} ${t.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:`
            inset-inline-start ${g},
            inset-block-start ${g},
            width ${g},
            height ${g},
            box-shadow ${g},
            outline ${g}
          `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:c(d).sub(u).div(2).add(p).mul(-1).equal(),insetBlockStart:c(d).sub(u).div(2).add(p).mul(-1).equal(),width:c(d).add(c(p).mul(2)).equal(),height:c(d).add(c(p).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${xe(p)} ${h}`,outline:`6px solid ${f}`,width:d,height:d,insetInlineStart:t.calc(u).sub(d).div(2).equal(),insetBlockStart:t.calc(u).sub(d).div(2).equal()}}},[`&-lock ${e}-handle`]:{"&::before, &::after":{transition:"none"}},[`${e}-mark`]:{position:"absolute",fontSize:t.fontSize},[`${e}-mark-text`]:{position:"absolute",display:"inline-block",color:t.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:t.colorText}},[`${e}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${e}-dot`]:{position:"absolute",width:r,height:r,backgroundColor:t.colorBgElevated,border:`${xe(m)} solid ${t.dotBorderColor}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${t.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:t.dotActiveBorderColor}},[`&${e}-disabled`]:{cursor:"not-allowed",[`${e}-rail`]:{backgroundColor:`${t.railBg} !important`},[`${e}-track`]:{backgroundColor:`${t.trackBgDisabled} !important`},[`
          ${e}-dot
        `]:{backgroundColor:t.colorBgElevated,borderColor:t.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${e}-handle::after`]:{backgroundColor:t.colorBgElevated,cursor:"not-allowed",width:u,height:u,boxShadow:`0 0 0 ${xe(m)} ${l}`,insetInlineStart:0,insetBlockStart:0},[`
          ${e}-mark-text,
          ${e}-dot
        `]:{cursor:"not-allowed !important"}},[`&-tooltip ${n}-tooltip-inner`]:{minWidth:"unset"}})}},kIt=(t,e)=>{const{componentCls:n,railSize:i,handleSize:r,dotSize:o,marginFull:s,calc:a}=t,l=e?"paddingBlock":"paddingInline",c=e?"width":"height",u=e?"height":"width",d=e?"insetBlockStart":"insetInlineStart",h=e?"top":"insetInlineStart",f=a(i).mul(3).sub(r).div(2).equal(),m=a(r).sub(i).div(2).equal(),p=e?{borderWidth:`${xe(m)} 0`,transform:`translateY(${xe(a(m).mul(-1).equal())})`}:{borderWidth:`0 ${xe(m)}`,transform:`translateX(${xe(t.calc(m).mul(-1).equal())})`};return{[l]:i,[u]:a(i).mul(3).equal(),[`${n}-rail`]:{[c]:"100%",[u]:i},[`${n}-track,${n}-tracks`]:{[u]:i},[`${n}-track-draggable`]:Object.assign({},p),[`${n}-handle`]:{[d]:f},[`${n}-mark`]:{insetInlineStart:0,top:0,[h]:a(i).mul(3).add(e?0:s).equal(),[c]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[h]:i,[c]:"100%",[u]:i},[`${n}-dot`]:{position:"absolute",[d]:a(i).sub(o).div(2).equal()}}},cWn=t=>{const{componentCls:e,marginPartWithMark:n}=t;return{[`${e}-horizontal`]:Object.assign(Object.assign({},kIt(t,!0)),{[`&${e}-with-marks`]:{marginBottom:n}})}},uWn=t=>{const{componentCls:e}=t;return{[`${e}-vertical`]:Object.assign(Object.assign({},kIt(t,!1)),{height:"100%"})}},dWn=t=>{const n=t.controlHeightLG/4,i=t.controlHeightSM/2,r=t.lineWidth+1,o=t.lineWidth+1*1.5,s=t.colorPrimary,a=new ko(s).setAlpha(.2).toRgbString();return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:i,dotSize:8,handleLineWidth:r,handleLineWidthHover:o,railBg:t.colorFillTertiary,railHoverBg:t.colorFillSecondary,trackBg:t.colorPrimaryBorder,trackHoverBg:t.colorPrimaryBorderHover,handleColor:t.colorPrimaryBorder,handleActiveColor:s,handleActiveOutlineColor:a,handleColorDisabled:new ko(t.colorTextDisabled).onBackground(t.colorBgContainer).toHexShortString(),dotBorderColor:t.colorBorderSecondary,dotActiveBorderColor:t.colorPrimaryBorder,trackBgDisabled:t.colorBgContainerDisabled}},hWn=Jr("Slider",t=>{const e=mr(t,{marginPart:t.calc(t.controlHeight).sub(t.controlSize).div(2).equal(),marginFull:t.calc(t.controlSize).div(2).equal(),marginPartWithMark:t.calc(t.controlHeightLG).sub(t.controlSize).equal()});return[lWn(e),cWn(e),uWn(e)]},dWn),MIt=b.createContext({});function Pxe(){const[t,e]=b.useState(!1),n=b.useRef(),i=()=>{Dr.cancel(n.current)},r=o=>{i(),o?e(o):n.current=Dr(()=>{e(o)})};return b.useEffect(()=>i,[]),[t,r]}var fWn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};function mWn(t,e){return t||t===null?t:e||e===null?e:n=>typeof n=="number"?n.toString():""}const MC=Z.forwardRef((t,e)=>{const{prefixCls:n,range:i,className:r,rootClassName:o,style:s,disabled:a,tooltipPrefixCls:l,tipFormatter:c,tooltipVisible:u,getTooltipPopupContainer:d,tooltipPlacement:h,tooltip:f={},onChangeComplete:m}=t,p=fWn(t,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete"]),{vertical:g}=t,{direction:y,slider:_,getPrefixCls:w,getPopupContainer:C}=Z.useContext(jn),N=Z.useContext(Yd),E=a??N,{handleRender:D,direction:k}=Z.useContext(MIt),T=(k||y)==="rtl",[A,R]=Pxe(),[P,O]=Pxe(),V=Object.assign({},f),{open:F,placement:$,getPopupContainer:B,prefixCls:z,formatter:H}=V,K=F??u,q=(A||P)&&K!==!1,U=mWn(H,c),[Y,J]=Pxe(),ae=Te=>{m==null||m(Te),J(!1)},se=(Te,De)=>Te||(De?T?"left":"right":"top"),oe=w("slider",n),[fe,de,ie]=hWn(oe),Q=Me(r,_==null?void 0:_.className,o,{[`${oe}-rtl`]:T,[`${oe}-lock`]:Y},de,ie);T&&!p.vertical&&(p.reverse=!p.reverse);{const Te=Cr("Slider");[["tooltipPrefixCls","prefixCls"],["getTooltipPopupContainer","getPopupContainer"],["tipFormatter","formatter"],["tooltipPlacement","placement"],["tooltipVisible","open"]].forEach(De=>{let[Pe,ge]=De;Te.deprecated(!(Pe in t),Pe,`tooltip.${ge}`)})}Z.useEffect(()=>{const Te=()=>{Dr(()=>{O(!1)},1)};return document.addEventListener("mouseup",Te),()=>{document.removeEventListener("mouseup",Te)}},[]);const be=i&&!K,le=D||((Te,De)=>{const{index:Pe}=De,ge=Te.props;function he(we,ue,Ce){var ze,Ye,Ke,Xe;Ce&&((Ye=(ze=p)[we])===null||Ye===void 0||Ye.call(ze,ue)),(Xe=(Ke=ge)[we])===null||Xe===void 0||Xe.call(Ke,ue)}const me=Object.assign(Object.assign({},ge),{onMouseEnter:we=>{R(!0),he("onMouseEnter",we)},onMouseLeave:we=>{R(!1),he("onMouseLeave",we)},onMouseDown:we=>{O(!0),J(!0),he("onMouseDown",we)},onFocus:we=>{var ue;O(!0),(ue=p.onFocus)===null||ue===void 0||ue.call(p,we),he("onFocus",we,!0)},onBlur:we=>{var ue;O(!1),(ue=p.onBlur)===null||ue===void 0||ue.call(p,we),he("onBlur",we,!0)}}),X=Z.cloneElement(Te,me),re=(!!K||q)&&U!==null;return be?X:Z.createElement(hke,Object.assign({},V,{prefixCls:w("tooltip",z??l),title:U?U(De.value):"",open:re,placement:se($??h,g),key:Pe,overlayClassName:`${oe}-tooltip`,getPopupContainer:B||d||C}),X)}),Ne=be?(Te,De)=>{const Pe=Z.cloneElement(Te,{style:Object.assign(Object.assign({},Te.props.style),{visibility:"hidden"})});return Z.createElement(hke,Object.assign({},V,{prefixCls:w("tooltip",z??l),title:U?U(De.value):"",open:U!==null&&q,placement:se($??h,g),key:"tooltip",overlayClassName:`${oe}-tooltip`,getPopupContainer:B||d||C,draggingDelete:De.draggingDelete}),Pe)}:void 0,Le=Object.assign(Object.assign({},_==null?void 0:_.style),s);return fe(Z.createElement(DIt,Object.assign({},p,{step:p.step,range:i,className:Q,style:Le,disabled:E,ref:e,prefixCls:oe,handleRender:le,activeHandleRender:Ne,onChangeComplete:ae})))});MC.displayName="Slider";var pWn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const LIt=t=>{const{prefixCls:e,colors:n,type:i,color:r,range:o=!1,className:s,activeIndex:a,onActive:l,onDragStart:c,onDragChange:u,onKeyDelete:d}=t,h=pWn(t,["prefixCls","colors","type","color","range","className","activeIndex","onActive","onDragStart","onDragChange","onKeyDelete"]),f=Object.assign(Object.assign({},h),{track:!1}),m=b.useMemo(()=>`linear-gradient(90deg, ${n.map(E=>`${E.color} ${E.percent}%`).join(", ")})`,[n]),p=b.useMemo(()=>!r||!i?null:i==="alpha"?r.toRgbString():`hsl(${r.toHsb().h}, 100%, 50%)`,[r,i]),g=gr(c),y=gr(u),_=b.useMemo(()=>({onDragStart:g,onDragChange:y}),[]),w=gr((N,E)=>{const{onFocus:D,style:k,className:M,onKeyDown:T}=N.props,A=Object.assign({},k);return i==="gradient"&&(A.background=qkt(n,E.value)),b.cloneElement(N,{onFocus:R=>{l==null||l(E.index),D==null||D(R)},style:A,className:Me(M,{[`${e}-slider-handle-active`]:a===E.index}),onKeyDown:R=>{(R.key==="Delete"||R.key==="Backspace")&&d&&d(E.index),T==null||T(R)}})}),C=b.useMemo(()=>({direction:"ltr",handleRender:w}),[]);return b.createElement(MIt.Provider,{value:C},b.createElement(NIt.Provider,{value:_},b.createElement(MC,Object.assign({},f,{className:Me(s,`${e}-slider`),tooltip:{open:!1},range:{editable:o,minCount:2},styles:{rail:{background:m},handle:p?{background:p}:{}},classNames:{rail:`${e}-slider-rail`,handle:`${e}-slider-handle`}}))))},gWn=t=>{const{value:e,onChange:n,onChangeComplete:i}=t,r=s=>n(s[0]),o=s=>i(s[0]);return b.createElement(LIt,Object.assign({},t,{value:[e],onChange:r,onChangeComplete:o}))};function cit(t){return Ot(t).sort((e,n)=>e.percent-n.percent)}const bWn=t=>{const{prefixCls:e,mode:n,onChange:i,onChangeComplete:r,onActive:o,activeIndex:s,onGradientDragging:a,colors:l}=t,c=n==="gradient",u=b.useMemo(()=>l.map(y=>({percent:y.percent,color:y.color.toRgbString()})),[l]),d=b.useMemo(()=>u.map(y=>y.percent),[u]),h=b.useRef(u),f=y=>{let{rawValues:_,draggingIndex:w,draggingValue:C}=y;if(_.length>u.length){const N=qkt(u,C),E=Ot(u);E.splice(w,0,{percent:C,color:N}),h.current=E}else h.current=u;a(!0),i(new Wg(cit(h.current)),!0)},m=y=>{let{deleteIndex:_,draggingIndex:w,draggingValue:C}=y,N=Ot(h.current);_!==-1?N.splice(_,1):(N[w]=Object.assign(Object.assign({},N[w]),{percent:C}),N=cit(N)),i(new Wg(N),!0)},p=y=>{const _=Ot(u);_.splice(y,1);const w=new Wg(_);i(w),r(w)},g=y=>{r(new Wg(u)),s>=y.length&&o(y.length-1),a(!1)};return c?b.createElement(LIt,{min:0,max:100,prefixCls:e,className:`${e}-gradient-slider`,colors:u,color:null,value:d,range:!0,onChangeComplete:g,disabled:!1,type:"gradient",activeIndex:s,onActive:o,onDragStart:f,onDragChange:m,onKeyDelete:p}):null},vWn=b.memo(bWn);var yWn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const _Wn={slider:gWn},uit=()=>{const t=b.useContext(hIt),{mode:e,onModeChange:n,modeOptions:i,prefixCls:r,allowClear:o,value:s,disabledAlpha:a,onChange:l,onClear:c,onChangeComplete:u,activeIndex:d,gradientDragging:h}=t,f=yWn(t,["mode","onModeChange","modeOptions","prefixCls","allowClear","value","disabledAlpha","onChange","onClear","onChangeComplete","activeIndex","gradientDragging"]),m=Z.useMemo(()=>s.cleared?[{percent:0,color:new Wg("")},{percent:100,color:new Wg("")}]:s.getColors(),[s]),p=!s.isGradient(),[g,y]=Z.useState(s);Lr(()=>{var O;p||y((O=m[d])===null||O===void 0?void 0:O.color)},[h,d]);const _=Z.useMemo(()=>{var O;return p?s:h?g:(O=m[d])===null||O===void 0?void 0:O.color},[s,d,p,g,h]),[w,C]=Z.useState(_),[N,E]=Z.useState(0),D=w!=null&&w.equals(_)?_:w;Lr(()=>{C(_)},[N,_==null?void 0:_.toHexString()]);const k=(O,V)=>{let F=Ef(O);if(s.cleared){const B=F.toRgb();if(!B.r&&!B.g&&!B.b&&V){const{type:z,value:H=0}=V;F=new Wg({h:z==="hue"?H:0,s:1,b:1,a:z==="alpha"?H/100:1})}else F=Ree(F)}if(e==="single")return F;const $=Ot(m);return $[d]=Object.assign(Object.assign({},$[d]),{color:F}),new Wg($)},M=(O,V,F)=>{const $=k(O,F);C($.isGradient()?$.getColors()[d].color:$),l($,V)},T=(O,V)=>{u(k(O,V)),E(F=>F+1)},A=O=>{l(k(O))};let R=null;const P=i.length>1;return(o||P)&&(R=Z.createElement("div",{className:`${r}-operation`},P&&Z.createElement(dIt,{size:"small",options:i,value:e,onChange:n}),Z.createElement(mIt,Object.assign({prefixCls:r,value:s,onChange:O=>{l(O),c==null||c()}},f)))),Z.createElement(Z.Fragment,null,R,Z.createElement(vWn,Object.assign({},t,{colors:m})),Z.createElement(zkt,{prefixCls:r,value:D==null?void 0:D.toHsb(),disabledAlpha:a,onChange:(O,V)=>{M(O,!0,V)},onChangeComplete:(O,V)=>{T(O,V)},components:_Wn}),Z.createElement(XHn,Object.assign({value:_,onChange:A,prefixCls:r,disabledAlpha:a},f)))},dit=()=>{const{prefixCls:t,value:e,presets:n,onChange:i}=b.useContext(fIt);return Array.isArray(n)?Z.createElement(Ojn,{value:e,presets:n,prefixCls:t,onChange:i}):null},TIt=t=>{const{prefixCls:e,presets:n,panelRender:i,value:r,onChange:o,onClear:s,allowClear:a,disabledAlpha:l,mode:c,onModeChange:u,modeOptions:d,onChangeComplete:h,activeIndex:f,onActive:m,format:p,onFormatChange:g,gradientDragging:y,onGradientDragging:_}=t,w=`${e}-inner`,C=Z.useMemo(()=>({prefixCls:e,value:r,onChange:o,onClear:s,allowClear:a,disabledAlpha:l,mode:c,onModeChange:u,modeOptions:d,onChangeComplete:h,activeIndex:f,onActive:m,format:p,onFormatChange:g,gradientDragging:y,onGradientDragging:_}),[e,r,o,s,a,l,c,u,d,h,f,m,p,g,y,_]),N=Z.useMemo(()=>({prefixCls:e,value:r,presets:n,onChange:o}),[e,r,n,o]),E=Z.createElement("div",{className:`${w}-content`},Z.createElement(uit,null),Array.isArray(n)&&Z.createElement(ZD,null),Z.createElement(dit,null));return Z.createElement(hIt.Provider,{value:C},Z.createElement(fIt.Provider,{value:N},Z.createElement("div",{className:w},typeof i=="function"?i(E,{components:{Picker:uit,Presets:dit}}):E)))};TIt.displayName="ColorPickerPanel";var xWn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const wWn=b.forwardRef((t,e)=>{const{color:n,prefixCls:i,open:r,disabled:o,format:s,className:a,showText:l,activeIndex:c}=t,u=xWn(t,["color","prefixCls","open","disabled","format","className","showText","activeIndex"]),d=`${i}-trigger`,h=`${d}-text`,f=`${h}-cell`,[m]=bb("ColorPicker"),p=Z.useMemo(()=>{if(!l)return"";if(typeof l=="function")return l(n);if(n.cleared)return m.transparent;if(n.isGradient())return n.getColors().map((w,C)=>{const N=c!==-1&&c!==C;return Z.createElement("span",{key:C,className:Me(f,N&&`${f}-inactive`)},w.color.toRgbString()," ",w.percent,"%")});const y=n.toHexString().toUpperCase(),_=GFe(n);switch(s){case"rgb":return n.toRgbString();case"hsb":return n.toHsbString();default:return _<100?`${y.slice(0,7)},${_}%`:y}},[n,s,l,c]),g=b.useMemo(()=>n.cleared?Z.createElement(mIt,{prefixCls:i}):Z.createElement(WFe,{prefixCls:i,color:n.toCssString()}),[n,i]);return Z.createElement("div",Object.assign({ref:e,className:Me(d,a,{[`${d}-active`]:r,[`${d}-disabled`]:o})},Ll(u)),g,l&&Z.createElement("div",{className:h},p))});function CWn(t,e,n){const[i]=bb("ColorPicker"),[r,o]=ho(t,{value:e}),[s,a]=b.useState("single"),[l,c]=b.useMemo(()=>{const p=(Array.isArray(n)?n:[n]).filter(w=>w);p.length||p.push("single");const g=new Set(p),y=[],_=(w,C)=>{g.has(w)&&y.push({label:C,value:w})};return _("single",i.singleColor),_("gradient",i.gradientColor),[y,g]},[n]),[u,d]=b.useState(null),h=gr(p=>{d(p),o(p)}),f=b.useMemo(()=>{const p=Ef(r||"");return p.equals(u)?u:p},[r,u]),m=b.useMemo(()=>{var p;return c.has(s)?s:(p=l[0])===null||p===void 0?void 0:p.value},[c,s,l]);return b.useEffect(()=>{a(f.isGradient()?"gradient":"single")},[f]),[f,h,m,a,l]}const IIt=(t,e)=>({backgroundImage:`conic-gradient(${e} 0 25%, transparent 0 50%, ${e} 0 75%, transparent 0)`,backgroundSize:`${t} ${t}`}),hit=(t,e)=>{const{componentCls:n,borderRadiusSM:i,colorPickerInsetShadow:r,lineWidth:o,colorFillSecondary:s}=t;return{[`${n}-color-block`]:Object.assign(Object.assign({position:"relative",borderRadius:i,width:e,height:e,boxShadow:r,flex:"none"},IIt("50%",t.colorFillSecondary)),{[`${n}-color-block-inner`]:{width:"100%",height:"100%",boxShadow:`inset 0 0 0 ${xe(o)} ${s}`,borderRadius:"inherit"}})}},SWn=t=>{const{componentCls:e,antCls:n,fontSizeSM:i,lineHeightSM:r,colorPickerAlphaInputWidth:o,marginXXS:s,paddingXXS:a,controlHeightSM:l,marginXS:c,fontSizeIcon:u,paddingXS:d,colorTextPlaceholder:h,colorPickerInputNumberHandleWidth:f,lineWidth:m}=t;return{[`${e}-input-container`]:{display:"flex",[`${e}-steppers${n}-input-number`]:{fontSize:i,lineHeight:r,[`${n}-input-number-input`]:{paddingInlineStart:a,paddingInlineEnd:0},[`${n}-input-number-handler-wrap`]:{width:f}},[`${e}-steppers${e}-alpha-input`]:{flex:`0 0 ${xe(o)}`,marginInlineStart:s},[`${e}-format-select${n}-select`]:{marginInlineEnd:c,width:"auto","&-single":{[`${n}-select-selector`]:{padding:0,border:0},[`${n}-select-arrow`]:{insetInlineEnd:0},[`${n}-select-selection-item`]:{paddingInlineEnd:t.calc(u).add(s).equal(),fontSize:i,lineHeight:xe(l)},[`${n}-select-item-option-content`]:{fontSize:i,lineHeight:r},[`${n}-select-dropdown`]:{[`${n}-select-item`]:{minHeight:"auto"}}}},[`${e}-input`]:{gap:s,alignItems:"center",flex:1,width:0,[`${e}-hsb-input,${e}-rgb-input`]:{display:"flex",gap:s,alignItems:"center"},[`${e}-steppers`]:{flex:1},[`${e}-hex-input${n}-input-affix-wrapper`]:{flex:1,padding:`0 ${xe(d)}`,[`${n}-input`]:{fontSize:i,textTransform:"uppercase",lineHeight:xe(t.calc(l).sub(t.calc(m).mul(2)).equal())},[`${n}-input-prefix`]:{color:h}}}}}},NWn=t=>{const{componentCls:e,controlHeightLG:n,borderRadiusSM:i,colorPickerInsetShadow:r,marginSM:o,colorBgElevated:s,colorFillSecondary:a,lineWidthBold:l,colorPickerHandlerSize:c}=t;return{userSelect:"none",[`${e}-select`]:{[`${e}-palette`]:{minHeight:t.calc(n).mul(4).equal(),overflow:"hidden",borderRadius:i},[`${e}-saturation`]:{position:"absolute",borderRadius:"inherit",boxShadow:r,inset:0},marginBottom:o},[`${e}-handler`]:{width:c,height:c,border:`${xe(l)} solid ${s}`,position:"relative",borderRadius:"50%",cursor:"pointer",boxShadow:`${r}, 0 0 0 1px ${a}`}}},EWn=t=>{const{componentCls:e,antCls:n,colorTextQuaternary:i,paddingXXS:r,colorPickerPresetColorSize:o,fontSizeSM:s,colorText:a,lineHeightSM:l,lineWidth:c,borderRadius:u,colorFill:d,colorWhite:h,marginXXS:f,paddingXS:m,fontHeightSM:p}=t;return{[`${e}-presets`]:{[`${n}-collapse-item > ${n}-collapse-header`]:{padding:0,[`${n}-collapse-expand-icon`]:{height:p,color:i,paddingInlineEnd:r}},[`${n}-collapse`]:{display:"flex",flexDirection:"column",gap:f},[`${n}-collapse-item > ${n}-collapse-content > ${n}-collapse-content-box`]:{padding:`${xe(m)} 0`},"&-label":{fontSize:s,color:a,lineHeight:l},"&-items":{display:"flex",flexWrap:"wrap",gap:t.calc(f).mul(1.5).equal(),[`${e}-presets-color`]:{position:"relative",cursor:"pointer",width:o,height:o,"&::before":{content:'""',pointerEvents:"none",width:t.calc(o).add(t.calc(c).mul(4)).equal(),height:t.calc(o).add(t.calc(c).mul(4)).equal(),position:"absolute",top:t.calc(c).mul(-2).equal(),insetInlineStart:t.calc(c).mul(-2).equal(),borderRadius:u,border:`${xe(c)} solid transparent`,transition:`border-color ${t.motionDurationMid} ${t.motionEaseInBack}`},"&:hover::before":{borderColor:d},"&::after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:t.calc(o).div(13).mul(5).equal(),height:t.calc(o).div(13).mul(8).equal(),border:`${xe(t.lineWidthBold)} solid ${t.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${t.motionDurationFast} ${t.motionEaseInBack}, opacity ${t.motionDurationFast}`},[`&${e}-presets-color-checked`]:{"&::after":{opacity:1,borderColor:h,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`transform ${t.motionDurationMid} ${t.motionEaseOutBack} ${t.motionDurationFast}`},[`&${e}-presets-color-bright`]:{"&::after":{borderColor:"rgba(0, 0, 0, 0.45)"}}}}},"&-empty":{fontSize:s,color:i}}}},DWn=t=>{const{componentCls:e,colorPickerInsetShadow:n,colorBgElevated:i,colorFillSecondary:r,lineWidthBold:o,colorPickerHandlerSizeSM:s,colorPickerSliderHeight:a,marginSM:l,marginXS:c}=t,u=t.calc(s).sub(t.calc(o).mul(2).equal()).equal(),d=t.calc(s).add(t.calc(o).mul(2).equal()).equal(),h={"&:after":{transform:"scale(1)",boxShadow:`${n}, 0 0 0 1px ${t.colorPrimaryActive}`}};return{[`${e}-slider`]:[IIt(xe(a),t.colorFillSecondary),{margin:0,padding:0,height:a,borderRadius:t.calc(a).div(2).equal(),"&-rail":{height:a,borderRadius:t.calc(a).div(2).equal(),boxShadow:n},[`& ${e}-slider-handle`]:{width:u,height:u,top:0,borderRadius:"100%","&:before":{display:"block",position:"absolute",background:"transparent",left:{_skip_check_:!0,value:"50%"},top:"50%",transform:"translate(-50%, -50%)",width:d,height:d,borderRadius:"100%"},"&:after":{width:s,height:s,border:`${xe(o)} solid ${i}`,boxShadow:`${n}, 0 0 0 1px ${r}`,outline:"none",insetInlineStart:t.calc(o).mul(-1).equal(),top:t.calc(o).mul(-1).equal(),background:"transparent",transition:"none"},"&:focus":h}}],[`${e}-slider-container`]:{display:"flex",gap:l,marginBottom:l,[`${e}-slider-group`]:{flex:1,flexDirection:"column",justifyContent:"space-between",display:"flex","&-disabled-alpha":{justifyContent:"center"}}},[`${e}-gradient-slider`]:{marginBottom:c,[`& ${e}-slider-handle`]:{"&:after":{transform:"scale(0.8)"},"&-active, &:focus":h}}}},fke=(t,e,n)=>({borderInlineEndWidth:t.lineWidth,borderColor:e,boxShadow:`0 0 0 ${xe(t.controlOutlineWidth)} ${n}`,outline:0}),kWn=t=>{const{componentCls:e}=t;return{"&-rtl":{[`${e}-presets-color`]:{"&::after":{direction:"ltr"}},[`${e}-clear`]:{"&::after":{direction:"ltr"}}}}},fit=(t,e,n)=>{const{componentCls:i,borderRadiusSM:r,lineWidth:o,colorSplit:s,colorBorder:a,red6:l}=t;return{[`${i}-clear`]:Object.assign(Object.assign({width:e,height:e,borderRadius:r,border:`${xe(o)} solid ${s}`,position:"relative",overflow:"hidden",cursor:"inherit",transition:`all ${t.motionDurationFast}`},n),{"&::after":{content:'""',position:"absolute",insetInlineEnd:t.calc(o).mul(-1).equal(),top:t.calc(o).mul(-1).equal(),display:"block",width:40,height:2,transformOrigin:"calc(100% - 1px) 1px",transform:"rotate(-45deg)",backgroundColor:l},"&:hover":{borderColor:a}})}},MWn=t=>{const{componentCls:e,colorError:n,colorWarning:i,colorErrorHover:r,colorWarningHover:o,colorErrorOutline:s,colorWarningOutline:a}=t;return{[`&${e}-status-error`]:{borderColor:n,"&:hover":{borderColor:r},[`&${e}-trigger-active`]:Object.assign({},fke(t,n,s))},[`&${e}-status-warning`]:{borderColor:i,"&:hover":{borderColor:o},[`&${e}-trigger-active`]:Object.assign({},fke(t,i,a))}}},LWn=t=>{const{componentCls:e,controlHeightLG:n,controlHeightSM:i,controlHeight:r,controlHeightXS:o,borderRadius:s,borderRadiusSM:a,borderRadiusXS:l,borderRadiusLG:c,fontSizeLG:u}=t;return{[`&${e}-lg`]:{minWidth:n,minHeight:n,borderRadius:c,[`${e}-color-block, ${e}-clear`]:{width:r,height:r,borderRadius:s},[`${e}-trigger-text`]:{fontSize:u}},[`&${e}-sm`]:{minWidth:i,minHeight:i,borderRadius:a,[`${e}-color-block, ${e}-clear`]:{width:o,height:o,borderRadius:l},[`${e}-trigger-text`]:{lineHeight:xe(o)}}}},TWn=t=>{const{antCls:e,componentCls:n,colorPickerWidth:i,colorPrimary:r,motionDurationMid:o,colorBgElevated:s,colorTextDisabled:a,colorText:l,colorBgContainerDisabled:c,borderRadius:u,marginXS:d,marginSM:h,controlHeight:f,controlHeightSM:m,colorBgTextActive:p,colorPickerPresetColorSize:g,colorPickerPreviewSize:y,lineWidth:_,colorBorder:w,paddingXXS:C,fontSize:N,colorPrimaryHover:E,controlOutline:D}=t;return[{[n]:Object.assign({[`${n}-inner`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"&-content":{display:"flex",flexDirection:"column",width:i,[`& > ${e}-divider`]:{margin:`${xe(h)} 0 ${xe(d)}`}},[`${n}-panel`]:Object.assign({},NWn(t))},DWn(t)),hit(t,y)),SWn(t)),EWn(t)),fit(t,g,{marginInlineStart:"auto"})),{[`${n}-operation`]:{display:"flex",justifyContent:"space-between",marginBottom:d}}),"&-trigger":Object.assign(Object.assign(Object.assign(Object.assign({minWidth:f,minHeight:f,borderRadius:u,border:`${xe(_)} solid ${w}`,cursor:"pointer",display:"inline-flex",alignItems:"flex-start",justifyContent:"center",transition:`all ${o}`,background:s,padding:t.calc(C).sub(_).equal(),[`${n}-trigger-text`]:{marginInlineStart:d,marginInlineEnd:t.calc(d).sub(t.calc(C).sub(_)).equal(),fontSize:N,color:l,alignSelf:"center","&-cell":{"&:not(:last-child):after":{content:'", "'},"&-inactive":{color:a}}},"&:hover":{borderColor:E},[`&${n}-trigger-active`]:Object.assign({},fke(t,r,D)),"&-disabled":{color:a,background:c,cursor:"not-allowed","&:hover":{borderColor:p},[`${n}-trigger-text`]:{color:a}}},fit(t,m)),hit(t,m)),MWn(t)),LWn(t))},kWn(t))},a6(t,{focusElCls:`${n}-trigger-active`})]},IWn=Jr("ColorPicker",t=>{const{colorTextQuaternary:e,marginSM:n}=t,i=8,r=mr(t,{colorPickerWidth:234,colorPickerHandlerSize:16,colorPickerHandlerSizeSM:12,colorPickerAlphaInputWidth:44,colorPickerInputNumberHandleWidth:16,colorPickerPresetColorSize:24,colorPickerInsetShadow:`inset 0 0 1px 0 ${e}`,colorPickerSliderHeight:i,colorPickerPreviewSize:t.calc(i).mul(2).add(n).equal()});return[TWn(r)]});var AWn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const Fhe=t=>{const{mode:e,value:n,defaultValue:i,format:r,defaultFormat:o,allowClear:s=!1,presets:a,children:l,trigger:c="click",open:u,disabled:d,placement:h="bottomLeft",arrow:f=!0,panelRender:m,showText:p,style:g,className:y,size:_,rootClassName:w,prefixCls:C,styles:N,disabledAlpha:E=!1,onFormatChange:D,onChange:k,onClear:M,onOpenChange:T,onChangeComplete:A,getPopupContainer:R,autoAdjustOverflow:P=!0,destroyTooltipOnHide:O}=t,V=AWn(t,["mode","value","defaultValue","format","defaultFormat","allowClear","presets","children","trigger","open","disabled","placement","arrow","panelRender","showText","style","className","size","rootClassName","prefixCls","styles","disabledAlpha","onFormatChange","onChange","onClear","onOpenChange","onChangeComplete","getPopupContainer","autoAdjustOverflow","destroyTooltipOnHide"]),{getPrefixCls:F,direction:$,colorPicker:B}=b.useContext(jn),z=b.useContext(Yd),H=d??z,[K,q]=ho(!1,{value:u,postState:Ee=>!H&&Ee,onChange:T}),[U,Y]=ho(r,{value:r,defaultValue:o,onChange:D}),J=F("color-picker",C),[ae,se,oe,fe,de]=CWn(i,n,e),ie=b.useMemo(()=>GFe(ae)<100,[ae]),[Q,be]=Z.useState(null),le=Ee=>{if(A){let Se=Ef(Ee);E&&ie&&(Se=Ree(Ee)),A(Se)}},Ne=(Ee,Se)=>{let je=Ef(Ee);E&&ie&&(je=Ree(je)),se(je),be(null),k&&k(je,je.toCssString()),Se||le(je)},[Le,Te]=Z.useState(0),[De,Pe]=Z.useState(!1),ge=Ee=>{if(fe(Ee),Ee==="single"&&ae.isGradient())Te(0),Ne(new Wg(ae.getColors()[0].color)),be(ae);else if(Ee==="gradient"&&!ae.isGradient()){const Se=ie?Ree(ae):ae;Ne(new Wg(Q||[{percent:0,color:Se},{percent:100,color:Se}]))}},{status:he}=Z.useContext(ju),{compactSize:me,compactItemClassnames:X}=VS(J,$),re=Hc(Ee=>{var Se;return(Se=_??me)!==null&&Se!==void 0?Se:Ee}),we=Il(J),[ue,Ce,ze]=IWn(J,we),Ye={[`${J}-rtl`]:$},Ke=Me(w,ze,we,Ye),Xe=Me(oS(J,he),{[`${J}-sm`]:re==="small",[`${J}-lg`]:re==="large"},X,B==null?void 0:B.className,Ke,y,Ce),it=Me(J,Ke);Cr("ColorPicker")(!(E&&ie),"usage","`disabledAlpha` will make the alpha to be 100% when use alpha color.");const ut={open:K,trigger:c,placement:h,arrow:f,rootClassName:w,getPopupContainer:R,autoAdjustOverflow:P,destroyTooltipOnHide:O},Ge=Object.assign(Object.assign({},B==null?void 0:B.style),g);return ue(Z.createElement(y6e,Object.assign({style:N==null?void 0:N.popup,overlayInnerStyle:N==null?void 0:N.popupOverlayInner,onOpenChange:Ee=>{(!Ee||!H)&&q(Ee)},content:Z.createElement($0,{form:!0},Z.createElement(TIt,{mode:oe,onModeChange:ge,modeOptions:de,prefixCls:J,value:ae,allowClear:s,disabled:H,disabledAlpha:E,presets:a,panelRender:m,format:U,onFormatChange:Y,onChange:Ne,onChangeComplete:le,onClear:M,activeIndex:Le,onActive:Te,gradientDragging:De,onGradientDragging:Pe})),overlayClassName:it},ut),l||Z.createElement(wWn,Object.assign({activeIndex:K?Le:-1,open:K,className:Xe,style:Ge,prefixCls:J,disabled:H,showText:p,format:U},V,{color:ae}))))};Fhe.displayName="ColorPicker";const RWn=BK(Fhe,"color-picker",t=>t,t=>Object.assign(Object.assign({},t),{placement:"bottom",autoAdjustOverflow:!1}));Fhe._InternalPanelDoNotUseOrYouWillBeFired=RWn;var PWn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},OWn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:PWn}))},Z6e=b.forwardRef(OWn);Z6e.displayName="CalendarOutlined";var jWn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},FWn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:jWn}))},Q6e=b.forwardRef(FWn);Q6e.displayName="ClockCircleOutlined";var $Wn={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z"}}]},name:"swap-right",theme:"outlined"},VWn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:$Wn}))},AIt=b.forwardRef(VWn);AIt.displayName="SwapRightOutlined";function BWn(t,e,n){return n!==void 0?n:e==="year"&&t.lang.yearPlaceholder?t.lang.yearPlaceholder:e==="quarter"&&t.lang.quarterPlaceholder?t.lang.quarterPlaceholder:e==="month"&&t.lang.monthPlaceholder?t.lang.monthPlaceholder:e==="week"&&t.lang.weekPlaceholder?t.lang.weekPlaceholder:e==="time"&&t.timePickerLocale.placeholder?t.timePickerLocale.placeholder:t.lang.placeholder}function zWn(t,e,n){return n!==void 0?n:e==="year"&&t.lang.yearPlaceholder?t.lang.rangeYearPlaceholder:e==="quarter"&&t.lang.quarterPlaceholder?t.lang.rangeQuarterPlaceholder:e==="month"&&t.lang.monthPlaceholder?t.lang.rangeMonthPlaceholder:e==="week"&&t.lang.weekPlaceholder?t.lang.rangeWeekPlaceholder:e==="time"&&t.timePickerLocale.placeholder?t.timePickerLocale.rangePlaceholder:t.lang.rangePlaceholder}function J6e(t,e){const n={adjustX:1,adjustY:1};switch(e){case"bottomLeft":return{points:["tl","bl"],offset:[0,4],overflow:n};case"bottomRight":return{points:["tr","br"],offset:[0,4],overflow:n};case"topLeft":return{points:["bl","tl"],offset:[0,-4],overflow:n};case"topRight":return{points:["br","tr"],offset:[0,-4],overflow:n};default:return{points:t==="rtl"?["tr","br"]:["tl","bl"],offset:[0,4],overflow:n}}}function RIt(t,e){const{allowClear:n=!0}=t,{clearIcon:i,removeIcon:r}=fLt(Object.assign(Object.assign({},t),{prefixCls:e,componentName:"DatePicker"}));return[b.useMemo(()=>n===!1?!1:Object.assign({clearIcon:i},n===!0?{}:n),[n,i]),r]}const[HWn,WWn]=["week","WeekPicker"],[UWn,KWn]=["month","MonthPicker"],[qWn,GWn]=["year","YearPicker"],[YWn,XWn]=["quarter","QuarterPicker"],[PIt,mit]=["time","TimePicker"],ZWn=t=>b.createElement(vn,Object.assign({size:"small",type:"primary"},t));function OIt(t){return b.useMemo(()=>Object.assign({button:ZWn},t),[t])}var QWn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const JWn=t=>{const e=b.forwardRef((n,i)=>{var r;const{prefixCls:o,getPopupContainer:s,components:a,className:l,style:c,placement:u,size:d,disabled:h,bordered:f=!0,placeholder:m,popupClassName:p,dropdownClassName:g,status:y,rootClassName:_,variant:w,picker:C}=n,N=QWn(n,["prefixCls","getPopupContainer","components","className","style","placement","size","disabled","bordered","placeholder","popupClassName","dropdownClassName","status","rootClassName","variant","picker"]),E=b.useRef(null),{getPrefixCls:D,direction:k,getPopupContainer:M,rangePicker:T}=b.useContext(jn),A=D("picker",o),{compactSize:R,compactItemClassnames:P}=VS(A,k),O=D(),[V,F]=d6("rangePicker",w,f),$=Il(A),[B,z,H]=qTt(A,$);{const le=Cr("DatePicker.RangePicker");le.deprecated(!g,"dropdownClassName","popupClassName"),le.deprecated(!("bordered"in n),"bordered","variant")}const[K]=RIt(n,A),q=OIt(a),U=Hc(le=>{var Ne;return(Ne=d??R)!==null&&Ne!==void 0?Ne:le}),Y=b.useContext(Yd),J=h??Y,ae=b.useContext(ju),{hasFeedback:se,status:oe,feedbackIcon:fe}=ae,de=b.createElement(b.Fragment,null,C===PIt?b.createElement(Q6e,null):b.createElement(Z6e,null),se&&fe);b.useImperativeHandle(i,()=>E.current);const[ie]=bb("Calendar",Bne),Q=Object.assign(Object.assign({},ie),n.locale),[be]=Mw("DatePicker",(r=n.popupStyle)===null||r===void 0?void 0:r.zIndex);return B(b.createElement($0,{space:!0},b.createElement(PTt,Object.assign({separator:b.createElement("span",{"aria-label":"to",className:`${A}-separator`},b.createElement(AIt,null)),disabled:J,ref:E,popupAlign:J6e(k,u),placement:u,placeholder:zWn(Q,C,m),suffixIcon:de,prevIcon:b.createElement("span",{className:`${A}-prev-icon`}),nextIcon:b.createElement("span",{className:`${A}-next-icon`}),superPrevIcon:b.createElement("span",{className:`${A}-super-prev-icon`}),superNextIcon:b.createElement("span",{className:`${A}-super-next-icon`}),transitionName:`${O}-slide-up`,picker:C},N,{className:Me({[`${A}-${U}`]:U,[`${A}-${V}`]:F},oS(A,BA(oe,y),se),z,P,l,T==null?void 0:T.className,H,$,_),style:Object.assign(Object.assign({},T==null?void 0:T.style),c),locale:Q.lang,prefixCls:A,getPopupContainer:s||M,generateConfig:t,components:q,direction:k,classNames:{popup:Me(z,p||g,H,$,_)},styles:{popup:Object.assign(Object.assign({},n.popupStyle),{zIndex:be})},allowClear:K}))))});return e.displayName="RangePicker",e};var eUn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const tUn=t=>{const e=(l,c)=>{const u=c===mit?"timePicker":"datePicker",d=b.forwardRef((h,f)=>{var m;const{prefixCls:p,getPopupContainer:g,components:y,style:_,className:w,rootClassName:C,size:N,bordered:E,placement:D,placeholder:k,popupClassName:M,dropdownClassName:T,disabled:A,status:R,variant:P,onCalendarChange:O}=h,V=eUn(h,["prefixCls","getPopupContainer","components","style","className","rootClassName","size","bordered","placement","placeholder","popupClassName","dropdownClassName","disabled","status","variant","onCalendarChange"]),{getPrefixCls:F,direction:$,getPopupContainer:B,[u]:z}=b.useContext(jn),H=F("picker",p),{compactSize:K,compactItemClassnames:q}=VS(H,$),U=b.useRef(null),[Y,J]=d6("datePicker",P,E),ae=Il(H),[se,oe,fe]=qTt(H,ae);b.useImperativeHandle(f,()=>U.current);const de={showToday:!0},ie=l||h.picker,Q=F(),{onSelect:be,multiple:le}=V,Ne=be&&l==="time"&&!le,Le=(Xe,it,ut)=>{O==null||O(Xe,it,ut),Ne&&be(Xe)};{const Xe=Cr(c||"DatePicker");Xe(l!=="quarter","deprecated",`DatePicker.${c} is legacy usage. Please use DatePicker[picker='${l}'] directly.`),Xe.deprecated(!T,"dropdownClassName","popupClassName"),Xe.deprecated(!("bordered"in h),"bordered","variant"),Xe.deprecated(!Ne,"onSelect","onCalendarChange")}const[Te,De]=RIt(h,H),Pe=OIt(y),ge=Hc(Xe=>{var it;return(it=N??K)!==null&&it!==void 0?it:Xe}),he=b.useContext(Yd),me=A??he,X=b.useContext(ju),{hasFeedback:re,status:we,feedbackIcon:ue}=X,Ce=b.createElement(b.Fragment,null,ie==="time"?b.createElement(Q6e,null):b.createElement(Z6e,null),re&&ue),[ze]=bb("DatePicker",Bne),Ye=Object.assign(Object.assign({},ze),h.locale),[Ke]=Mw("DatePicker",(m=h.popupStyle)===null||m===void 0?void 0:m.zIndex);return se(b.createElement($0,{space:!0},b.createElement(jTt,Object.assign({ref:U,placeholder:BWn(Ye,ie,k),suffixIcon:Ce,dropdownAlign:J6e($,D),placement:D,prevIcon:b.createElement("span",{className:`${H}-prev-icon`}),nextIcon:b.createElement("span",{className:`${H}-next-icon`}),superPrevIcon:b.createElement("span",{className:`${H}-super-prev-icon`}),superNextIcon:b.createElement("span",{className:`${H}-super-next-icon`}),transitionName:`${Q}-slide-up`,picker:l,onCalendarChange:Le},de,V,{locale:Ye.lang,className:Me({[`${H}-${ge}`]:ge,[`${H}-${Y}`]:J},oS(H,BA(we,R),re),oe,q,z==null?void 0:z.className,w,fe,ae,C),style:Object.assign(Object.assign({},z==null?void 0:z.style),_),prefixCls:H,getPopupContainer:g||B,generateConfig:t,components:Pe,direction:$,disabled:me,classNames:{popup:Me(oe,fe,ae,C,M||T)},styles:{popup:Object.assign(Object.assign({},h.popupStyle),{zIndex:Ke})},allowClear:Te,removeIcon:De}))))});return c&&(d.displayName=c),d},n=e(),i=e(HWn,WWn),r=e(UWn,KWn),o=e(qWn,GWn),s=e(YWn,XWn),a=e(PIt,mit);return{DatePicker:n,WeekPicker:i,MonthPicker:r,YearPicker:o,TimePicker:a,QuarterPicker:s}},jIt=t=>{const{DatePicker:e,WeekPicker:n,MonthPicker:i,YearPicker:r,TimePicker:o,QuarterPicker:s}=tUn(t),a=JWn(t),l=e;return l.WeekPicker=n,l.MonthPicker=i,l.YearPicker=r,l.RangePicker=a,l.TimePicker=o,l.QuarterPicker=s,l.displayName="DatePicker",l},Qk=jIt(j7n);function FIt(t){const e=J6e(t.direction,t.placement);return e.overflow.adjustY=!1,e.overflow.adjustX=!1,Object.assign(Object.assign({},t),{dropdownAlign:e})}const nUn=BK(Qk,"picker",null,FIt);Qk._InternalPanelDoNotUseOrYouWillBeFired=nUn;const iUn=BK(Qk.RangePicker,"picker",null,FIt);Qk._InternalRangePanelDoNotUseOrYouWillBeFired=iUn;Qk.generatePicker=jIt;const rUn={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},$It=Z.createContext({});var oUn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const sUn=t=>fc(t).map(e=>Object.assign(Object.assign({},e==null?void 0:e.props),{key:e.key}));function aUn(t,e,n){const i=b.useMemo(()=>e||sUn(n),[e,n]);return b.useMemo(()=>i.map(o=>{var{span:s}=o,a=oUn(o,["span"]);return Object.assign(Object.assign({},a),{span:typeof s=="number"?s:bLt(t,s)})}),[i,t])}function pit(t,e,n){let i=t,r=!1;return(n===void 0||n>e)&&(i=Object.assign(Object.assign({},t),{span:e}),r=n!==void 0),[i,r]}function lUn(t,e){const n=[];let i=[],r=e,o=!1;return t.filter(s=>s).forEach((s,a)=>{const l=s==null?void 0:s.span,c=l||1;if(a===t.length-1){const[u,d]=pit(s,r,l);o=o||d,i.push(u),n.push(i);return}if(c<r)r-=c,i.push(s);else{const[u,d]=pit(s,r,c);o=o||d,i.push(u),n.push(i),r=e,i=[]}}),[n,o]}const cUn=(t,e)=>{const[n,i]=b.useMemo(()=>lUn(e,t),[e,t]);return Cr("Descriptions")(!i,"usage","Sum of column `span` in a line not match `column` of Descriptions."),n},uUn=t=>{let{children:e}=t;return e};function git(t){return t!=null}const Oxe=t=>{const{itemPrefixCls:e,component:n,span:i,className:r,style:o,labelStyle:s,contentStyle:a,bordered:l,label:c,content:u,colon:d,type:h}=t,f=n;return l?b.createElement(f,{className:Me({[`${e}-item-label`]:h==="label",[`${e}-item-content`]:h==="content"},r),style:o,colSpan:i},git(c)&&b.createElement("span",{style:s},c),git(u)&&b.createElement("span",{style:a},u)):b.createElement(f,{className:Me(`${e}-item`,r),style:o,colSpan:i},b.createElement("div",{className:`${e}-item-container`},(c||c===0)&&b.createElement("span",{className:Me(`${e}-item-label`,{[`${e}-item-no-colon`]:!d}),style:s},c),(u||u===0)&&b.createElement("span",{className:Me(`${e}-item-content`),style:a},u)))};function jxe(t,e,n){let{colon:i,prefixCls:r,bordered:o}=e,{component:s,type:a,showLabel:l,showContent:c,labelStyle:u,contentStyle:d}=n;return t.map((h,f)=>{let{label:m,children:p,prefixCls:g=r,className:y,style:_,labelStyle:w,contentStyle:C,span:N=1,key:E}=h;return typeof s=="string"?b.createElement(Oxe,{key:`${a}-${E||f}`,className:y,style:_,labelStyle:Object.assign(Object.assign({},u),w),contentStyle:Object.assign(Object.assign({},d),C),span:N,colon:i,component:s,itemPrefixCls:g,bordered:o,label:l?m:null,content:c?p:null,type:a}):[b.createElement(Oxe,{key:`label-${E||f}`,className:y,style:Object.assign(Object.assign(Object.assign({},u),_),w),span:1,colon:i,component:s[0],itemPrefixCls:g,bordered:o,label:m,type:"label"}),b.createElement(Oxe,{key:`content-${E||f}`,className:y,style:Object.assign(Object.assign(Object.assign({},d),_),C),span:N*2-1,component:s[1],itemPrefixCls:g,bordered:o,content:p,type:"content"})]})}const dUn=t=>{const e=b.useContext($It),{prefixCls:n,vertical:i,row:r,index:o,bordered:s}=t;return i?b.createElement(b.Fragment,null,b.createElement("tr",{key:`label-${o}`,className:`${n}-row`},jxe(r,t,Object.assign({component:"th",type:"label",showLabel:!0},e))),b.createElement("tr",{key:`content-${o}`,className:`${n}-row`},jxe(r,t,Object.assign({component:"td",type:"content",showContent:!0},e)))):b.createElement("tr",{key:o,className:`${n}-row`},jxe(r,t,Object.assign({component:s?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},e)))},hUn=t=>{const{componentCls:e,labelBg:n}=t;return{[`&${e}-bordered`]:{[`> ${e}-view`]:{border:`${xe(t.lineWidth)} ${t.lineType} ${t.colorSplit}`,"> table":{tableLayout:"auto"},[`${e}-row`]:{borderBottom:`${xe(t.lineWidth)} ${t.lineType} ${t.colorSplit}`,"&:last-child":{borderBottom:"none"},[`> ${e}-item-label, > ${e}-item-content`]:{padding:`${xe(t.padding)} ${xe(t.paddingLG)}`,borderInlineEnd:`${xe(t.lineWidth)} ${t.lineType} ${t.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${e}-item-label`]:{color:t.colorTextSecondary,backgroundColor:n,"&::after":{display:"none"}}}},[`&${e}-middle`]:{[`${e}-row`]:{[`> ${e}-item-label, > ${e}-item-content`]:{padding:`${xe(t.paddingSM)} ${xe(t.paddingLG)}`}}},[`&${e}-small`]:{[`${e}-row`]:{[`> ${e}-item-label, > ${e}-item-content`]:{padding:`${xe(t.paddingXS)} ${xe(t.padding)}`}}}}}},fUn=t=>{const{componentCls:e,extraColor:n,itemPaddingBottom:i,itemPaddingEnd:r,colonMarginRight:o,colonMarginLeft:s,titleMarginBottom:a}=t;return{[e]:Object.assign(Object.assign(Object.assign({},fo(t)),hUn(t)),{"&-rtl":{direction:"rtl"},[`${e}-header`]:{display:"flex",alignItems:"center",marginBottom:a},[`${e}-title`]:Object.assign(Object.assign({},Mm),{flex:"auto",color:t.titleColor,fontWeight:t.fontWeightStrong,fontSize:t.fontSizeLG,lineHeight:t.lineHeightLG}),[`${e}-extra`]:{marginInlineStart:"auto",color:n,fontSize:t.fontSize},[`${e}-view`]:{width:"100%",borderRadius:t.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${e}-row`]:{"> th, > td":{paddingBottom:i,paddingInlineEnd:r},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${e}-item-label`]:{color:t.colorTextTertiary,fontWeight:"normal",fontSize:t.fontSize,lineHeight:t.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${xe(s)} ${xe(o)}`},[`&${e}-item-no-colon::after`]:{content:'""'}},[`${e}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${e}-item-content`]:{display:"table-cell",flex:1,color:t.contentColor,fontSize:t.fontSize,lineHeight:t.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${e}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${e}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${e}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${e}-row`]:{"> th, > td":{paddingBottom:t.paddingSM}}},"&-small":{[`${e}-row`]:{"> th, > td":{paddingBottom:t.paddingXS}}}})}},mUn=t=>({labelBg:t.colorFillAlter,titleColor:t.colorText,titleMarginBottom:t.fontSizeSM*t.lineHeightSM,itemPaddingBottom:t.padding,itemPaddingEnd:t.padding,colonMarginRight:t.marginXS,colonMarginLeft:t.marginXXS/2,contentColor:t.colorText,extraColor:t.colorText}),pUn=Jr("Descriptions",t=>{const e=mr(t,{});return fUn(e)},mUn);var gUn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const $he=t=>{const{prefixCls:e,title:n,extra:i,column:r,colon:o=!0,bordered:s,layout:a,children:l,className:c,rootClassName:u,style:d,size:h,labelStyle:f,contentStyle:m,items:p}=t,g=gUn(t,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","items"]),{getPrefixCls:y,direction:_,descriptions:w}=b.useContext(jn),C=y("descriptions",e),N=vhe(),E=b.useMemo(()=>{var O;return typeof r=="number"?r:(O=bLt(N,Object.assign(Object.assign({},rUn),r)))!==null&&O!==void 0?O:3},[N,r]),D=aUn(N,p,l),k=Hc(h),M=cUn(E,D),[T,A,R]=pUn(C),P=b.useMemo(()=>({labelStyle:f,contentStyle:m}),[f,m]);return T(b.createElement($It.Provider,{value:P},b.createElement("div",Object.assign({className:Me(C,w==null?void 0:w.className,{[`${C}-${k}`]:k&&k!=="default",[`${C}-bordered`]:!!s,[`${C}-rtl`]:_==="rtl"},c,u,A,R),style:Object.assign(Object.assign({},w==null?void 0:w.style),d)},g),(n||i)&&b.createElement("div",{className:`${C}-header`},n&&b.createElement("div",{className:`${C}-title`},n),i&&b.createElement("div",{className:`${C}-extra`},i)),b.createElement("div",{className:`${C}-view`},b.createElement("table",null,b.createElement("tbody",null,M.map((O,V)=>b.createElement(dUn,{key:V,index:V,colon:o,prefixCls:C,vertical:a==="vertical",bordered:s,row:O}))))))))};$he.displayName="Descriptions";$he.Item=uUn;var bit=b.createContext(null),VIt=b.createContext({}),bUn=["prefixCls","className","containerRef"],BIt=function(e){var n=e.prefixCls,i=e.className,r=e.containerRef,o=di(e,bUn),s=b.useContext(VIt),a=s.panel,l=jS(a,r);return b.createElement("div",lt({className:Me("".concat(n,"-content"),i),role:"dialog",ref:l},Ll(e,{aria:!0}),{"aria-modal":"true"},o))};BIt.displayName="DrawerPanel";function vit(t){return typeof t=="string"&&String(Number(t))===t?(ii(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(t)):t}function vUn(t){ii(!("wrapperClassName"in t),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),ii(Lu()||!t.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var yit={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function yUn(t,e){var n,i,r,o=t.prefixCls,s=t.open,a=t.placement,l=t.inline,c=t.push,u=t.forceRender,d=t.autoFocus,h=t.keyboard,f=t.classNames,m=t.rootClassName,p=t.rootStyle,g=t.zIndex,y=t.className,_=t.id,w=t.style,C=t.motion,N=t.width,E=t.height,D=t.children,k=t.mask,M=t.maskClosable,T=t.maskMotion,A=t.maskClassName,R=t.maskStyle,P=t.afterOpenChange,O=t.onClose,V=t.onMouseEnter,F=t.onMouseOver,$=t.onMouseLeave,B=t.onClick,z=t.onKeyDown,H=t.onKeyUp,K=t.styles,q=t.drawerRender,U=b.useRef(),Y=b.useRef(),J=b.useRef();b.useImperativeHandle(e,function(){return U.current});var ae=function(me){var X=me.keyCode,re=me.shiftKey;switch(X){case Wt.TAB:{if(X===Wt.TAB){if(!re&&document.activeElement===J.current){var we;(we=Y.current)===null||we===void 0||we.focus({preventScroll:!0})}else if(re&&document.activeElement===Y.current){var ue;(ue=J.current)===null||ue===void 0||ue.focus({preventScroll:!0})}}break}case Wt.ESC:{O&&h&&(me.stopPropagation(),O(me));break}}};b.useEffect(function(){if(s&&d){var he;(he=U.current)===null||he===void 0||he.focus({preventScroll:!0})}},[s]);var se=b.useState(!1),oe=He(se,2),fe=oe[0],de=oe[1],ie=b.useContext(bit),Q;typeof c=="boolean"?Q=c?{}:{distance:0}:Q=c||{};var be=(n=(i=(r=Q)===null||r===void 0?void 0:r.distance)!==null&&i!==void 0?i:ie==null?void 0:ie.pushDistance)!==null&&n!==void 0?n:180,le=b.useMemo(function(){return{pushDistance:be,push:function(){de(!0)},pull:function(){de(!1)}}},[be]);b.useEffect(function(){if(s){var he;ie==null||(he=ie.push)===null||he===void 0||he.call(ie)}else{var me;ie==null||(me=ie.pull)===null||me===void 0||me.call(ie)}},[s]),b.useEffect(function(){return function(){var he;ie==null||(he=ie.pull)===null||he===void 0||he.call(ie)}},[]);var Ne=k&&b.createElement(Ou,lt({key:"mask"},T,{visible:s}),function(he,me){var X=he.className,re=he.style;return b.createElement("div",{className:Me("".concat(o,"-mask"),X,f==null?void 0:f.mask,A),style:Ie(Ie(Ie({},re),R),K==null?void 0:K.mask),onClick:M&&s?O:void 0,ref:me})}),Le=typeof C=="function"?C(a):C,Te={};if(fe&&be)switch(a){case"top":Te.transform="translateY(".concat(be,"px)");break;case"bottom":Te.transform="translateY(".concat(-be,"px)");break;case"left":Te.transform="translateX(".concat(be,"px)");break;default:Te.transform="translateX(".concat(-be,"px)");break}a==="left"||a==="right"?Te.width=vit(N):Te.height=vit(E);var De={onMouseEnter:V,onMouseOver:F,onMouseLeave:$,onClick:B,onKeyDown:z,onKeyUp:H},Pe=b.createElement(Ou,lt({key:"panel"},Le,{visible:s,forceRender:u,onVisibleChanged:function(me){P==null||P(me)},removeOnLeave:!1,leavedClassName:"".concat(o,"-content-wrapper-hidden")}),function(he,me){var X=he.className,re=he.style,we=b.createElement(BIt,lt({id:_,containerRef:me,prefixCls:o,className:Me(y,f==null?void 0:f.content),style:Ie(Ie({},w),K==null?void 0:K.content)},Ll(t,{aria:!0}),De),D);return b.createElement("div",lt({className:Me("".concat(o,"-content-wrapper"),f==null?void 0:f.wrapper,X),style:Ie(Ie(Ie({},Te),re),K==null?void 0:K.wrapper)},Ll(t,{data:!0})),q?q(we):we)}),ge=Ie({},p);return g&&(ge.zIndex=g),b.createElement(bit.Provider,{value:le},b.createElement("div",{className:Me(o,"".concat(o,"-").concat(a),m,ye(ye({},"".concat(o,"-open"),s),"".concat(o,"-inline"),l)),style:ge,tabIndex:-1,ref:U,onKeyDown:ae},Ne,b.createElement("div",{tabIndex:0,ref:Y,style:yit,"aria-hidden":"true","data-sentinel":"start"}),Pe,b.createElement("div",{tabIndex:0,ref:J,style:yit,"aria-hidden":"true","data-sentinel":"end"})))}var zIt=b.forwardRef(yUn);zIt.displayName="DrawerPopup";var HIt=function(e){var n=e.open,i=n===void 0?!1:n,r=e.prefixCls,o=r===void 0?"rc-drawer":r,s=e.placement,a=s===void 0?"right":s,l=e.autoFocus,c=l===void 0?!0:l,u=e.keyboard,d=u===void 0?!0:u,h=e.width,f=h===void 0?378:h,m=e.mask,p=m===void 0?!0:m,g=e.maskClosable,y=g===void 0?!0:g,_=e.getContainer,w=e.forceRender,C=e.afterOpenChange,N=e.destroyOnClose,E=e.onMouseEnter,D=e.onMouseOver,k=e.onMouseLeave,M=e.onClick,T=e.onKeyDown,A=e.onKeyUp,R=e.panelRef,P=b.useState(!1),O=He(P,2),V=O[0],F=O[1];vUn(e);var $=b.useState(!1),B=He($,2),z=B[0],H=B[1];Lr(function(){H(!0)},[]);var K=z?i:!1,q=b.useRef(),U=b.useRef();Lr(function(){K&&(U.current=document.activeElement)},[K]);var Y=function(fe){var de;if(F(fe),C==null||C(fe),!fe&&U.current&&!((de=q.current)!==null&&de!==void 0&&de.contains(U.current))){var ie;(ie=U.current)===null||ie===void 0||ie.focus({preventScroll:!0})}},J=b.useMemo(function(){return{panel:R}},[R]);if(!w&&!V&&!K&&N)return null;var ae={onMouseEnter:E,onMouseOver:D,onMouseLeave:k,onClick:M,onKeyDown:T,onKeyUp:A},se=Ie(Ie({},e),{},{open:K,prefixCls:o,placement:a,autoFocus:c,keyboard:d,width:f,mask:p,maskClosable:y,inline:_===!1,afterOpenChange:Y,ref:q},ae);return b.createElement(VIt.Provider,{value:J},b.createElement(l6,{open:K||w||V,autoDestroy:!1,getContainer:_,autoLock:p&&(K||V)},b.createElement(zIt,se)))};HIt.displayName="Drawer";const WIt=t=>{var e,n;const{prefixCls:i,title:r,footer:o,extra:s,loading:a,onClose:l,headerStyle:c,bodyStyle:u,footerStyle:d,children:h,classNames:f,styles:m}=t,{drawer:p}=b.useContext(jn),g=b.useCallback(N=>b.createElement("button",{type:"button",onClick:l,"aria-label":"Close",className:`${i}-close`},N),[l]),[y,_]=a6e(zj(t),zj(p),{closable:!0,closeIconRender:g}),w=b.useMemo(()=>{var N,E;return!r&&!y?null:b.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(N=p==null?void 0:p.styles)===null||N===void 0?void 0:N.header),c),m==null?void 0:m.header),className:Me(`${i}-header`,{[`${i}-header-close-only`]:y&&!r&&!s},(E=p==null?void 0:p.classNames)===null||E===void 0?void 0:E.header,f==null?void 0:f.header)},b.createElement("div",{className:`${i}-header-title`},_,r&&b.createElement("div",{className:`${i}-title`},r)),s&&b.createElement("div",{className:`${i}-extra`},s))},[y,_,s,c,i,r]),C=b.useMemo(()=>{var N,E;if(!o)return null;const D=`${i}-footer`;return b.createElement("div",{className:Me(D,(N=p==null?void 0:p.classNames)===null||N===void 0?void 0:N.footer,f==null?void 0:f.footer),style:Object.assign(Object.assign(Object.assign({},(E=p==null?void 0:p.styles)===null||E===void 0?void 0:E.footer),d),m==null?void 0:m.footer)},o)},[o,d,i]);return b.createElement(b.Fragment,null,w,b.createElement("div",{className:Me(`${i}-body`,f==null?void 0:f.body,(e=p==null?void 0:p.classNames)===null||e===void 0?void 0:e.body),style:Object.assign(Object.assign(Object.assign({},(n=p==null?void 0:p.styles)===null||n===void 0?void 0:n.body),u),m==null?void 0:m.body)},a?b.createElement(ja,{active:!0,title:!1,paragraph:{rows:5},className:`${i}-body-skeleton`}):h),C)},_Un=t=>{const e="100%";return{left:`translateX(-${e})`,right:`translateX(${e})`,top:`translateY(-${e})`,bottom:`translateY(${e})`}[t]},UIt=(t,e)=>({"&-enter, &-appear":Object.assign(Object.assign({},t),{"&-active":e}),"&-leave":Object.assign(Object.assign({},e),{"&-active":t})}),KIt=(t,e)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${e}`}}},UIt({opacity:t},{opacity:1})),xUn=(t,e)=>[KIt(.7,e),UIt({transform:_Un(t)},{transform:"none"})],wUn=t=>{const{componentCls:e,motionDurationSlow:n}=t;return{[e]:{[`${e}-mask-motion`]:KIt(0,n),[`${e}-panel-motion`]:["left","right","top","bottom"].reduce((i,r)=>Object.assign(Object.assign({},i),{[`&-${r}`]:xUn(r,n)}),{})}}},CUn=t=>{const{borderRadiusSM:e,componentCls:n,zIndexPopup:i,colorBgMask:r,colorBgElevated:o,motionDurationSlow:s,motionDurationMid:a,paddingXS:l,padding:c,paddingLG:u,fontSizeLG:d,lineHeightLG:h,lineWidth:f,lineType:m,colorSplit:p,marginXS:g,colorIcon:y,colorIconHover:_,colorBgTextHover:w,colorBgTextActive:C,colorText:N,fontWeightStrong:E,footerPaddingBlock:D,footerPaddingInline:k,calc:M}=t,T=`${n}-content-wrapper`;return{[n]:{position:"fixed",inset:0,zIndex:i,pointerEvents:"none",color:N,"&-pure":{position:"relative",background:o,display:"flex",flexDirection:"column",[`&${n}-left`]:{boxShadow:t.boxShadowDrawerLeft},[`&${n}-right`]:{boxShadow:t.boxShadowDrawerRight},[`&${n}-top`]:{boxShadow:t.boxShadowDrawerUp},[`&${n}-bottom`]:{boxShadow:t.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${n}-mask`]:{position:"absolute",inset:0,zIndex:i,background:r,pointerEvents:"auto"},[T]:{position:"absolute",zIndex:i,maxWidth:"100vw",transition:`all ${s}`,"&-hidden":{display:"none"}},[`&-left > ${T}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:t.boxShadowDrawerLeft},[`&-right > ${T}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:t.boxShadowDrawerRight},[`&-top > ${T}`]:{top:0,insetInline:0,boxShadow:t.boxShadowDrawerUp},[`&-bottom > ${T}`]:{bottom:0,insetInline:0,boxShadow:t.boxShadowDrawerDown},[`${n}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:o,pointerEvents:"auto"},[`${n}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${xe(c)} ${xe(u)}`,fontSize:d,lineHeight:h,borderBottom:`${xe(f)} ${m} ${p}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${n}-extra`]:{flex:"none"},[`${n}-close`]:Object.assign({display:"inline-flex",width:M(d).add(l).equal(),height:M(d).add(l).equal(),borderRadius:e,justifyContent:"center",alignItems:"center",marginInlineEnd:g,color:y,fontWeight:E,fontSize:d,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${a}`,textRendering:"auto","&:hover":{color:_,backgroundColor:w,textDecoration:"none"},"&:active":{backgroundColor:C}},j0(t)),[`${n}-title`]:{flex:1,margin:0,fontWeight:t.fontWeightStrong,fontSize:d,lineHeight:h},[`${n}-body`]:{flex:1,minWidth:0,minHeight:0,padding:u,overflow:"auto",[`${n}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${n}-footer`]:{flexShrink:0,padding:`${xe(D)} ${xe(k)}`,borderTop:`${xe(f)} ${m} ${p}`},"&-rtl":{direction:"rtl"}}}},SUn=t=>({zIndexPopup:t.zIndexPopupBase,footerPaddingBlock:t.paddingXS,footerPaddingInline:t.padding}),qIt=Jr("Drawer",t=>{const e=mr(t,{});return[CUn(e),wUn(e)]},SUn);var GIt=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const NUn={distance:180},e$e=t=>{var e;const{rootClassName:n,width:i,height:r,size:o="default",mask:s=!0,push:a=NUn,open:l,afterOpenChange:c,onClose:u,prefixCls:d,getContainer:h,style:f,className:m,visible:p,afterVisibleChange:g,maskStyle:y,drawerStyle:_,contentWrapperStyle:w}=t,C=GIt(t,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle"]),{getPopupContainer:N,getPrefixCls:E,direction:D,drawer:k}=b.useContext(jn),M=E("drawer",d),[T,A,R]=qIt(M),P=h===void 0&&N?()=>N(document.body):h,O=Me({"no-mask":!s,[`${M}-rtl`]:D==="rtl"},n,A,R);{const ae=Cr("Drawer");[["visible","open"],["afterVisibleChange","afterOpenChange"],["headerStyle","styles.header"],["bodyStyle","styles.body"],["footerStyle","styles.footer"],["contentWrapperStyle","styles.wrapper"],["maskStyle","styles.mask"],["drawerStyle","styles.content"]].forEach(se=>{let[oe,fe]=se;ae.deprecated(!(oe in t),oe,fe)}),P!==void 0&&((e=t.style)===null||e===void 0?void 0:e.position)==="absolute"&&ae(!1,"breaking","`style` is replaced by `rootStyle` in v5. Please check that `position: absolute` is necessary.")}const V=b.useMemo(()=>i??(o==="large"?736:378),[i,o]),F=b.useMemo(()=>r??(o==="large"?736:378),[r,o]),$={motionName:Bp(M,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},B=ae=>({motionName:Bp(M,`panel-motion-${ae}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),z=bMt(),[H,K]=Mw("Drawer",C.zIndex),{classNames:q={},styles:U={}}=C,{classNames:Y={},styles:J={}}=k||{};return T(b.createElement($0,{form:!0,space:!0},b.createElement(i6.Provider,{value:K},b.createElement(HIt,Object.assign({prefixCls:M,onClose:u,maskMotion:$,motion:B},C,{classNames:{mask:Me(q.mask,Y.mask),content:Me(q.content,Y.content),wrapper:Me(q.wrapper,Y.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},U.mask),y),J.mask),content:Object.assign(Object.assign(Object.assign({},U.content),_),J.content),wrapper:Object.assign(Object.assign(Object.assign({},U.wrapper),w),J.wrapper)},open:l??p,mask:s,push:a,width:V,height:F,style:Object.assign(Object.assign({},k==null?void 0:k.style),f),className:Me(k==null?void 0:k.className,m),rootClassName:O,getContainer:P,afterOpenChange:c??g,panelRef:z,zIndex:H}),b.createElement(WIt,Object.assign({prefixCls:M},C,{onClose:u}))))))},EUn=t=>{const{prefixCls:e,style:n,className:i,placement:r="right"}=t,o=GIt(t,["prefixCls","style","className","placement"]),{getPrefixCls:s}=b.useContext(jn),a=s("drawer",e),[l,c,u]=qIt(a),d=Me(a,`${a}-pure`,`${a}-${r}`,c,u,i);return l(b.createElement("div",{className:d,style:n},b.createElement(WIt,Object.assign({prefixCls:a},o))))};e$e._InternalPanelDoNotUseOrYouWillBeFired=EUn;e$e.displayName="Drawer";function tie(t){return["small","middle","large"].includes(t)}function _it(t){return t?typeof t=="number"&&!Number.isNaN(t):!1}const YIt=Z.createContext({latestIndex:0}),DUn=YIt.Provider,kUn=t=>{let{className:e,index:n,children:i,split:r,style:o}=t;const{latestIndex:s}=b.useContext(YIt);return i==null?null:b.createElement(b.Fragment,null,b.createElement("div",{className:e,style:o},i),n<s&&r&&b.createElement("span",{className:`${e}-split`},r))};var MUn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const LUn=b.forwardRef((t,e)=>{var n,i,r;const{getPrefixCls:o,space:s,direction:a}=b.useContext(jn),{size:l=(n=s==null?void 0:s.size)!==null&&n!==void 0?n:"small",align:c,className:u,rootClassName:d,children:h,direction:f="horizontal",prefixCls:m,split:p,style:g,wrap:y=!1,classNames:_,styles:w}=t,C=MUn(t,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[N,E]=Array.isArray(l)?l:[l,l],D=tie(E),k=tie(N),M=_it(E),T=_it(N),A=fc(h,{keepEmpty:!0}),R=c===void 0&&f==="horizontal"?"center":c,P=o("space",m),[O,V,F]=Tkt(P),$=Me(P,s==null?void 0:s.className,V,`${P}-${f}`,{[`${P}-rtl`]:a==="rtl",[`${P}-align-${R}`]:R,[`${P}-gap-row-${E}`]:D,[`${P}-gap-col-${N}`]:k},u,d,F),B=Me(`${P}-item`,(i=_==null?void 0:_.item)!==null&&i!==void 0?i:(r=s==null?void 0:s.classNames)===null||r===void 0?void 0:r.item);let z=0;const H=A.map((U,Y)=>{var J,ae;U!=null&&(z=Y);const se=(U==null?void 0:U.key)||`${B}-${Y}`;return b.createElement(kUn,{className:B,key:se,index:Y,split:p,style:(J=w==null?void 0:w.item)!==null&&J!==void 0?J:(ae=s==null?void 0:s.styles)===null||ae===void 0?void 0:ae.item},U)}),K=b.useMemo(()=>({latestIndex:z}),[z]);if(A.length===0)return null;const q={};return y&&(q.flexWrap="wrap"),!k&&T&&(q.columnGap=N),!D&&M&&(q.rowGap=E),O(b.createElement("div",Object.assign({ref:e,className:$,style:Object.assign(Object.assign(Object.assign({},q),s==null?void 0:s.style),g)},C),b.createElement(DUn,{value:K},H)))}),aS=LUn;aS.Compact=E3n;aS.displayName="Space";var TUn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const XIt=t=>{const{getPopupContainer:e,getPrefixCls:n,direction:i}=b.useContext(jn),{prefixCls:r,type:o="default",danger:s,disabled:a,loading:l,onClick:c,htmlType:u,children:d,className:h,menu:f,arrow:m,autoFocus:p,overlay:g,trigger:y,align:_,open:w,onOpenChange:C,placement:N,getPopupContainer:E,href:D,icon:k=b.createElement(Nhe,null),title:M,buttonsRender:T=oe=>oe,mouseEnterDelay:A,mouseLeaveDelay:R,overlayClassName:P,overlayStyle:O,destroyPopupOnHide:V,dropdownRender:F}=t,$=TUn(t,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),B=n("dropdown",r),z=`${B}-button`,H={menu:f,arrow:m,autoFocus:p,align:_,disabled:a,trigger:a?[]:y,onOpenChange:C,getPopupContainer:E||e,mouseEnterDelay:A,mouseLeaveDelay:R,overlayClassName:P,overlayStyle:O,destroyPopupOnHide:V,dropdownRender:F},{compactSize:K,compactItemClassnames:q}=VS(B,i),U=Me(z,q,h);"overlay"in t&&(H.overlay=g),"open"in t&&(H.open=w),"placement"in t?H.placement=N:H.placement=i==="rtl"?"bottomLeft":"bottomRight";const Y=b.createElement(vn,{type:o,danger:s,disabled:a,loading:l,onClick:c,htmlType:u,href:D,title:M},d),J=b.createElement(vn,{type:o,danger:s,icon:k}),[ae,se]=T([Y,J]);return b.createElement(aS.Compact,Object.assign({className:U,size:K,block:!0},$),ae,b.createElement(KK,Object.assign({},H),se))};XIt.__ANT_BUTTON=!0;const b6=KK;b6.Button=XIt;const ZIt=["wrap","nowrap","wrap-reverse"],QIt=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],JIt=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],IUn=(t,e)=>{const n=e.wrap===!0?"wrap":e.wrap;return{[`${t}-wrap-${n}`]:n&&ZIt.includes(n)}},AUn=(t,e)=>{const n={};return JIt.forEach(i=>{n[`${t}-align-${i}`]=e.align===i}),n[`${t}-align-stretch`]=!e.align&&!!e.vertical,n},RUn=(t,e)=>{const n={};return QIt.forEach(i=>{n[`${t}-justify-${i}`]=e.justify===i}),n};function PUn(t,e){return Me(Object.assign(Object.assign(Object.assign({},IUn(t,e)),AUn(t,e)),RUn(t,e)))}const OUn=t=>{const{componentCls:e}=t;return{[e]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},jUn=t=>{const{componentCls:e}=t;return{[e]:{"&-gap-small":{gap:t.flexGapSM},"&-gap-middle":{gap:t.flexGap},"&-gap-large":{gap:t.flexGapLG}}}},FUn=t=>{const{componentCls:e}=t,n={};return ZIt.forEach(i=>{n[`${e}-wrap-${i}`]={flexWrap:i}}),n},$Un=t=>{const{componentCls:e}=t,n={};return JIt.forEach(i=>{n[`${e}-align-${i}`]={alignItems:i}}),n},VUn=t=>{const{componentCls:e}=t,n={};return QIt.forEach(i=>{n[`${e}-justify-${i}`]={justifyContent:i}}),n},BUn=()=>({}),zUn=Jr("Flex",t=>{const{paddingXS:e,padding:n,paddingLG:i}=t,r=mr(t,{flexGapSM:e,flexGap:n,flexGapLG:i});return[OUn(r),jUn(r),FUn(r),$Un(r),VUn(r)]},BUn,{resetStyle:!1});var HUn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const Vhe=Z.forwardRef((t,e)=>{const{prefixCls:n,rootClassName:i,className:r,style:o,flex:s,gap:a,children:l,vertical:c=!1,component:u="div"}=t,d=HUn(t,["prefixCls","rootClassName","className","style","flex","gap","children","vertical","component"]),{flex:h,direction:f,getPrefixCls:m}=Z.useContext(jn),p=m("flex",n),[g,y,_]=zUn(p),w=c??(h==null?void 0:h.vertical),C=Me(r,i,h==null?void 0:h.className,p,y,_,PUn(p,t),{[`${p}-rtl`]:f==="rtl",[`${p}-gap-${a}`]:tie(a),[`${p}-vertical`]:w}),N=Object.assign(Object.assign({},h==null?void 0:h.style),o);return s&&(N.flex=s),a&&!tie(a)&&(N.gap=a),g(Z.createElement(u,Object.assign({ref:e,className:C,style:N},Zs(d,["justify","wrap","align"])),l))});Vhe.displayName="Flex";var WUn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},UUn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:WUn}))},e2t=b.forwardRef(UUn);e2t.displayName="FileTextOutlined";function nie(t){const[e,n]=b.useState(t);return b.useEffect(()=>{const i=setTimeout(()=>{n(t)},t.length?0:10);return()=>{clearTimeout(i)}},[t]),e}const KUn=t=>{const{componentCls:e}=t,n=`${e}-show-help`,i=`${e}-show-help-item`;return{[n]:{transition:`opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[i]:{overflow:"hidden",transition:`height ${t.motionDurationSlow} ${t.motionEaseInOut},
                     opacity ${t.motionDurationSlow} ${t.motionEaseInOut},
                     transform ${t.motionDurationSlow} ${t.motionEaseInOut} !important`,[`&${i}-appear, &${i}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${i}-leave-active`]:{transform:"translateY(-5px)"}}}}},qUn=t=>({legend:{display:"block",width:"100%",marginBottom:t.marginLG,padding:0,color:t.colorTextDescription,fontSize:t.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${xe(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n  input[type='radio']:focus,\n  input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${xe(t.controlOutlineWidth)} ${t.controlOutline}`},output:{display:"block",paddingTop:15,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight}}),xit=(t,e)=>{const{formItemCls:n}=t;return{[n]:{[`${n}-label > label`]:{height:e},[`${n}-control-input`]:{minHeight:e}}}},GUn=t=>{const{componentCls:e}=t;return{[t.componentCls]:Object.assign(Object.assign(Object.assign({},fo(t)),qUn(t)),{[`${e}-text`]:{display:"inline-block",paddingInlineEnd:t.paddingSM},"&-small":Object.assign({},xit(t,t.controlHeightSM)),"&-large":Object.assign({},xit(t,t.controlHeightLG))})}},YUn=t=>{const{formItemCls:e,iconCls:n,componentCls:i,rootPrefixCls:r,antCls:o,labelRequiredMarkColor:s,labelColor:a,labelFontSize:l,labelHeight:c,labelColonMarginInlineStart:u,labelColonMarginInlineEnd:d,itemMarginBottom:h}=t;return{[e]:Object.assign(Object.assign({},fo(t)),{marginBottom:h,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
        &-hidden${o}-row`]:{display:"none"},"&-has-warning":{[`${e}-split`]:{color:t.colorError}},"&-has-error":{[`${e}-split`]:{color:t.colorWarning}},[`${e}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:t.lineHeight,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:c,color:a,fontSize:l,[`> ${n}`]:{fontSize:t.fontSize,verticalAlign:"top"},[`&${e}-required:not(${e}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:t.marginXXS,color:s,fontSize:t.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${i}-hide-required-mark &`]:{display:"none"}},[`${e}-optional`]:{display:"inline-block",marginInlineStart:t.marginXXS,color:t.colorTextDescription,[`${i}-hide-required-mark &`]:{display:"none"}},[`${e}-tooltip`]:{color:t.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:t.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:u,marginInlineEnd:d},[`&${e}-no-colon::after`]:{content:'"\\a0"'}}},[`${e}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:t.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[e]:{"&-explain, &-extra":{clear:"both",color:t.colorTextDescription,fontSize:t.fontSize,lineHeight:t.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:t.controlHeightSM,transition:`color ${t.motionDurationMid} ${t.motionEaseOut}`},"&-explain":{"&-error":{color:t.colorError},"&-warning":{color:t.colorWarning}}},[`&-with-help ${e}-explain`]:{height:"auto",opacity:1},[`${e}-feedback-icon`]:{fontSize:t.fontSize,textAlign:"center",visibility:"visible",animationName:qFe,animationDuration:t.motionDurationMid,animationTimingFunction:t.motionEaseOutBack,pointerEvents:"none","&-success":{color:t.colorSuccess},"&-error":{color:t.colorError},"&-warning":{color:t.colorWarning},"&-validating":{color:t.colorPrimary}}})}},wit=(t,e)=>{const{formItemCls:n}=t;return{[`${e}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:"1 1 0",minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:"unset"}}}}},XUn=t=>{const{componentCls:e,formItemCls:n,inlineItemMarginBottom:i}=t;return{[`${e}-inline`]:{display:"flex",flexWrap:"wrap",[n]:{flex:"none",marginInlineEnd:t.margin,marginBottom:i,"&-row":{flexWrap:"nowrap"},[`> ${n}-label,
        > ${n}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${n}-label`]:{flex:"none"},[`${e}-text`]:{display:"inline-block"},[`${n}-has-feedback`]:{display:"inline-block"}}}}},e0=t=>({padding:t.verticalLabelPadding,margin:t.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),t2t=t=>{const{componentCls:e,formItemCls:n,rootPrefixCls:i}=t;return{[`${n} ${n}-label`]:e0(t),[`${e}:not(${e}-inline)`]:{[n]:{flexWrap:"wrap",[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${i}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},ZUn=t=>{const{componentCls:e,formItemCls:n,antCls:i}=t;return{[`${e}-vertical`]:{[`${n}:not(${n}-horizontal)`]:{[`${n}-row`]:{flexDirection:"column"},[`${n}-label > label`]:{height:"auto"},[`${n}-control`]:{width:"100%"},[`${n}-label,
        ${i}-col-24${n}-label,
        ${i}-col-xl-24${n}-label`]:e0(t)}},[`@media (max-width: ${xe(t.screenXSMax)})`]:[t2t(t),{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${i}-col-xs-24${n}-label`]:e0(t)}}}],[`@media (max-width: ${xe(t.screenSMMax)})`]:{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${i}-col-sm-24${n}-label`]:e0(t)}}},[`@media (max-width: ${xe(t.screenMDMax)})`]:{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${i}-col-md-24${n}-label`]:e0(t)}}},[`@media (max-width: ${xe(t.screenLGMax)})`]:{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${i}-col-lg-24${n}-label`]:e0(t)}}}}},QUn=t=>{const{formItemCls:e,antCls:n}=t;return{[`${e}-vertical`]:{[`${e}-row`]:{flexDirection:"column"},[`${e}-label > label`]:{height:"auto"},[`${e}-control`]:{width:"100%"}},[`${e}-vertical ${e}-label,
      ${n}-col-24${e}-label,
      ${n}-col-xl-24${e}-label`]:e0(t),[`@media (max-width: ${xe(t.screenXSMax)})`]:[t2t(t),{[e]:{[`${n}-col-xs-24${e}-label`]:e0(t)}}],[`@media (max-width: ${xe(t.screenSMMax)})`]:{[e]:{[`${n}-col-sm-24${e}-label`]:e0(t)}},[`@media (max-width: ${xe(t.screenMDMax)})`]:{[e]:{[`${n}-col-md-24${e}-label`]:e0(t)}},[`@media (max-width: ${xe(t.screenLGMax)})`]:{[e]:{[`${n}-col-lg-24${e}-label`]:e0(t)}}}},JUn=t=>({labelRequiredMarkColor:t.colorError,labelColor:t.colorTextHeading,labelFontSize:t.fontSize,labelHeight:t.controlHeight,labelColonMarginInlineStart:t.marginXXS/2,labelColonMarginInlineEnd:t.marginXS,itemMarginBottom:t.marginLG,verticalLabelPadding:`0 0 ${t.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),n2t=(t,e)=>mr(t,{formItemCls:`${t.componentCls}-item`,rootPrefixCls:e}),t$e=Jr("Form",(t,e)=>{let{rootPrefixCls:n}=e;const i=n2t(t,n);return[GUn(i),YUn(i),KUn(i),wit(i,i.componentCls),wit(i,i.formItemCls),XUn(i),ZUn(i),QUn(i),jK(i),qFe]},JUn,{order:-1e3}),Cit=[];function Fxe(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof t=="string"?t:`${e}-${i}`,error:t,errorStatus:n}}const i2t=t=>{let{help:e,helpStatus:n,errors:i=Cit,warnings:r=Cit,className:o,fieldId:s,onVisibleChanged:a}=t;const{prefixCls:l}=b.useContext(s6e),c=`${l}-item-explain`,u=Il(l),[d,h,f]=t$e(l,u),m=b.useMemo(()=>$j(l),[l]),p=nie(i),g=nie(r),y=b.useMemo(()=>e!=null?[Fxe(e,"help",n)]:[].concat(Ot(p.map((w,C)=>Fxe(w,"error","error",C))),Ot(g.map((w,C)=>Fxe(w,"warning","warning",C)))),[e,n,p,g]),_={};return s&&(_.id=`${s}_help`),d(b.createElement(Ou,{motionDeadline:m.motionDeadline,motionName:`${l}-show-help`,visible:!!y.length,onVisibleChanged:a},w=>{const{className:C,style:N}=w;return b.createElement("div",Object.assign({},_,{className:Me(c,C,f,u,o,h),style:N,role:"alert"}),b.createElement(FFe,Object.assign({keys:y},$j(l),{motionName:`${l}-show-help-item`,component:!1}),E=>{const{key:D,error:k,errorStatus:M,className:T,style:A}=E;return b.createElement("div",{key:D,className:Me(T,{[`${c}-${M}`]:M}),style:A},k)}))}))},eKn=["parentNode"],tKn="form_item";function P9(t){return t===void 0||t===!1?[]:Array.isArray(t)?t:[t]}function r2t(t,e){if(!t.length)return;const n=t.join("_");return e?`${e}_${n}`:eKn.includes(n)?`${tKn}_${n}`:n}function o2t(t,e,n,i,r,o){let s=i;return o!==void 0?s=o:n.validating?s="validating":t.length?s="error":e.length?s="warning":(n.touched||r&&n.validated)&&(s="success"),s}function Sit(t){return P9(t).join("_")}function nKn(t,e){const n=e.getFieldInstance(t),i=TFe(n);if(i)return i;const r=r2t(P9(t),e.__INTERNAL__.name);if(r)return document.getElementById(r)}function n$e(t){const[e]=o6e(),n=b.useRef({}),i=b.useMemo(()=>t??Object.assign(Object.assign({},e),{__INTERNAL__:{itemRef:r=>o=>{const s=Sit(r);o?n.current[s]=o:delete n.current[s]}},scrollToField:function(r){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=nKn(r,i);s&&z4n(s,Object.assign({scrollMode:"if-needed",block:"nearest"},o))},getFieldInstance:r=>{const o=Sit(r);return n.current[o]}}),[t,e]);return[i]}const WZ={};function iKn(t){let{name:e}=t;const n=Cr("Form");b.useEffect(()=>{if(e)return WZ[e]=(WZ[e]||0)+1,n(WZ[e]<=1,"usage","There exist multiple Form with same `name`."),()=>{WZ[e]-=1}},[e])}var rKn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const oKn=(t,e)=>{const n=b.useContext(Yd),{getPrefixCls:i,direction:r,form:o}=b.useContext(jn),{prefixCls:s,className:a,rootClassName:l,size:c,disabled:u=n,form:d,colon:h,labelAlign:f,labelWrap:m,labelCol:p,wrapperCol:g,hideRequiredMark:y,layout:_="horizontal",scrollToFirstError:w,requiredMark:C,onFinishFailed:N,name:E,style:D,feedbackIcons:k,variant:M}=t,T=rKn(t,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),A=Hc(c),R=b.useContext(VDt);iKn(t);const P=b.useMemo(()=>C!==void 0?C:y?!1:o&&o.requiredMark!==void 0?o.requiredMark:!0,[y,C,o]),O=h??(o==null?void 0:o.colon),V=i("form",s),F=Il(V),[$,B,z]=t$e(V,F),H=Me(V,`${V}-${_}`,{[`${V}-hide-required-mark`]:P===!1,[`${V}-rtl`]:r==="rtl",[`${V}-${A}`]:A},z,F,B,o==null?void 0:o.className,a,l),[K]=n$e(d),{__INTERNAL__:q}=K;q.name=E;const U=b.useMemo(()=>({name:E,labelAlign:f,labelCol:p,labelWrap:m,wrapperCol:g,vertical:_==="vertical",colon:O,requiredMark:P,itemRef:q.itemRef,form:K,feedbackIcons:k}),[E,f,p,g,_,O,P,K,k]),Y=b.useRef(null);b.useImperativeHandle(e,()=>{var se;return Object.assign(Object.assign({},K),{nativeElement:(se=Y.current)===null||se===void 0?void 0:se.nativeElement})});const J=(se,oe)=>{if(se){let fe={block:"nearest"};typeof se=="object"&&(fe=se),K.scrollToField(oe,fe)}},ae=se=>{if(N==null||N(se),se.errorFields.length){const oe=se.errorFields[0].name;if(w!==void 0){J(w,oe);return}o&&o.scrollToFirstError!==void 0&&J(o.scrollToFirstError,oe)}};return $(b.createElement(pMt.Provider,{value:M},b.createElement(PFe,{disabled:u},b.createElement(D2.Provider,{value:A},b.createElement(mMt,{validateMessages:R},b.createElement(rS.Provider,{value:U},b.createElement(c6,Object.assign({id:E},T,{name:E,onFinishFailed:ae,form:K,ref:Y,style:Object.assign(Object.assign({},o==null?void 0:o.style),D),className:H}))))))))},s2t=b.forwardRef(oKn);s2t.displayName="Form";function sKn(t){if(typeof t=="function")return t;const e=fc(t);return e.length<=1?e[0]:e}const a2t=()=>{const{status:t,errors:e=[],warnings:n=[]}=b.useContext(ju);return Cr("Form.Item")(t!==void 0,"usage","Form.Item.useStatus should be used under Form.Item component. For more information: https://u.ant.design/form-item-usestatus"),{status:t,errors:e,warnings:n}};a2t.Context=ju;function aKn(t){const[e,n]=b.useState(t),i=b.useRef(null),r=b.useRef([]),o=b.useRef(!1);b.useEffect(()=>(o.current=!1,()=>{o.current=!0,Dr.cancel(i.current),i.current=null}),[]);function s(a){o.current||(i.current===null&&(r.current=[],i.current=Dr(()=>{i.current=null,n(l=>{let c=l;return r.current.forEach(u=>{c=u(c)}),c})})),r.current.push(a))}return[e,s]}function lKn(){const{itemRef:t}=b.useContext(rS),e=b.useRef({});function n(i,r){const o=r&&typeof r=="object"&&r.ref,s=i.join("_");return(e.current.name!==s||e.current.originRef!==o)&&(e.current.name=s,e.current.originRef=o,e.current.ref=Vu(t(i),o)),e.current.ref}return n}const cKn=t=>{const{formItemCls:e}=t;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${e}-control`]:{display:"flex"}}}},uKn=$A(["Form","item-item"],(t,e)=>{let{rootPrefixCls:n}=e;const i=n2t(t,n);return[cKn(i)]}),dKn=t=>{const{prefixCls:e,status:n,wrapperCol:i,children:r,errors:o,warnings:s,_internalItemRender:a,extra:l,help:c,fieldId:u,marginBottom:d,onErrorVisibleChanged:h}=t,f=`${e}-item`,m=b.useContext(rS),p=i||m.wrapperCol||{},g=Me(`${f}-control`,p.className),y=b.useMemo(()=>Object.assign({},m),[m]);delete y.labelCol,delete y.wrapperCol;const _=b.createElement("div",{className:`${f}-control-input`},b.createElement("div",{className:`${f}-control-input-content`},r)),w=b.useMemo(()=>({prefixCls:e,status:n}),[e,n]),C=d!==null||o.length||s.length?b.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},b.createElement(s6e.Provider,{value:w},b.createElement(i2t,{fieldId:u,errors:o,warnings:s,help:c,helpStatus:n,className:`${f}-explain-connected`,onVisibleChanged:h})),!!d&&b.createElement("div",{style:{width:0,height:d}})):null,N={};u&&(N.id=`${u}_extra`);const E=l?b.createElement("div",Object.assign({},N,{className:`${f}-extra`}),l):null,D=a&&a.mark==="pro_table_render"&&a.render?a.render(t,{input:_,errorList:C,extra:E}):b.createElement(b.Fragment,null,_,C,E);return b.createElement(rS.Provider,{value:y},b.createElement(U6e,Object.assign({},p,{className:g}),D),b.createElement(uKn,{prefixCls:e}))};var hKn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},fKn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:hKn}))},Bhe=b.forwardRef(fKn);Bhe.displayName="QuestionCircleOutlined";var mKn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};function pKn(t){return t?typeof t=="object"&&!b.isValidElement(t)?t:{title:t}:null}const gKn=t=>{let{prefixCls:e,label:n,htmlFor:i,labelCol:r,labelAlign:o,colon:s,required:a,requiredMark:l,tooltip:c,vertical:u}=t;var d;const[h]=bb("Form"),{labelAlign:f,labelCol:m,labelWrap:p,colon:g}=b.useContext(rS);if(!n)return null;const y=r||m||{},_=o||f,w=`${e}-item-label`,C=Me(w,_==="left"&&`${w}-left`,y.className,{[`${w}-wrap`]:!!p});let N=n;const E=s===!0||g!==!1&&s!==!1;E&&!u&&typeof n=="string"&&n.trim()&&(N=n.replace(/[:|：]\s*$/,""));const k=pKn(c);if(k){const{icon:R=b.createElement(Bhe,null)}=k,P=mKn(k,["icon"]),O=b.createElement(Vs,Object.assign({},P),b.cloneElement(R,{className:`${e}-item-tooltip`,title:"",onClick:V=>{V.preventDefault()},tabIndex:null}));N=b.createElement(b.Fragment,null,N,O)}const M=l==="optional",T=typeof l=="function";T?N=l(N,{required:!!a}):M&&!a&&(N=b.createElement(b.Fragment,null,N,b.createElement("span",{className:`${e}-item-optional`,title:""},(h==null?void 0:h.optional)||((d=Dv.Form)===null||d===void 0?void 0:d.optional))));const A=Me({[`${e}-item-required`]:a,[`${e}-item-required-mark-optional`]:M||T,[`${e}-item-no-colon`]:!E});return b.createElement(U6e,Object.assign({},y,{className:C}),b.createElement("label",{htmlFor:i,className:A,title:typeof n=="string"?n:""},N))},bKn={success:VA,warning:n6,error:$S,validating:Xd};function l2t(t){let{children:e,errors:n,warnings:i,hasFeedback:r,validateStatus:o,prefixCls:s,meta:a,noStyle:l}=t;const c=`${s}-item`,{feedbackIcons:u}=b.useContext(rS),d=o2t(n,i,a,null,!!r,o),{isFormItemInput:h,status:f,hasFeedback:m,feedbackIcon:p}=b.useContext(ju),g=b.useMemo(()=>{var y;let _;if(r){const C=r!==!0&&r.icons||u,N=d&&((y=C==null?void 0:C({status:d,errors:n,warnings:i}))===null||y===void 0?void 0:y[d]),E=d&&bKn[d];_=N!==!1&&E?b.createElement("span",{className:Me(`${c}-feedback-icon`,`${c}-feedback-icon-${d}`)},N||b.createElement(E,null)):null}const w={status:d||"",errors:n,warnings:i,hasFeedback:!!r,feedbackIcon:_,isFormItemInput:!0};return l&&(w.status=(d??f)||"",w.isFormItemInput=h,w.hasFeedback=!!(r??m),w.feedbackIcon=r!==void 0?w.feedbackIcon:p),w},[d,r,l,h,f]);return b.createElement(ju.Provider,{value:g},e)}var vKn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};function yKn(t){const{prefixCls:e,className:n,rootClassName:i,style:r,help:o,errors:s,warnings:a,validateStatus:l,meta:c,hasFeedback:u,hidden:d,children:h,fieldId:f,required:m,isRequired:p,onSubItemMetaChange:g,layout:y}=t,_=vKn(t,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","layout"]),w=`${e}-item`,{requiredMark:C,vertical:N}=b.useContext(rS),E=N||y==="vertical",D=b.useRef(null),k=nie(s),M=nie(a),T=o!=null,A=!!(T||s.length||a.length),R=!!D.current&&r6(D.current),[P,O]=b.useState(null);Lr(()=>{if(A&&D.current){const z=getComputedStyle(D.current);O(parseInt(z.marginBottom,10))}},[A,R]);const V=z=>{z||O(null)},$=function(){let z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const H=z?k:c.errors,K=z?M:c.warnings;return o2t(H,K,c,"",!!u,l)}(),B=Me(w,n,i,{[`${w}-with-help`]:T||k.length||M.length,[`${w}-has-feedback`]:$&&u,[`${w}-has-success`]:$==="success",[`${w}-has-warning`]:$==="warning",[`${w}-has-error`]:$==="error",[`${w}-is-validating`]:$==="validating",[`${w}-hidden`]:d,[`${w}-${y}`]:y});return b.createElement("div",{className:B,style:r,ref:D},b.createElement(cIt,Object.assign({className:`${w}-row`},Zs(_,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),b.createElement(gKn,Object.assign({htmlFor:f},t,{requiredMark:C,required:m??p,prefixCls:e,vertical:E})),b.createElement(dKn,Object.assign({},t,c,{errors:k,warnings:M,prefixCls:e,status:$,help:o,marginBottom:P,onErrorVisibleChanged:V}),b.createElement(fMt.Provider,{value:g},b.createElement(l2t,{prefixCls:e,meta:c,errors:c.errors,warnings:c.warnings,hasFeedback:u,validateStatus:$},h)))),!!P&&b.createElement("div",{className:`${w}-margin-offset`,style:{marginBottom:-P}}))}const _Kn="__SPLIT__";function xKn(t,e){const n=Object.keys(t),i=Object.keys(e);return n.length===i.length&&n.every(r=>{const o=t[r],s=e[r];return o===s||typeof o=="function"||typeof s=="function"})}const wKn=b.memo(t=>{let{children:e}=t;return e},(t,e)=>xKn(t.control,e.control)&&t.update===e.update&&t.childProps.length===e.childProps.length&&t.childProps.every((n,i)=>n===e.childProps[i]));function Nit(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function CKn(t){const{name:e,noStyle:n,className:i,dependencies:r,prefixCls:o,shouldUpdate:s,rules:a,children:l,required:c,label:u,messageVariables:d,trigger:h="onChange",validateTrigger:f,hidden:m,help:p,layout:g}=t,{getPrefixCls:y}=b.useContext(jn),{name:_}=b.useContext(rS),w=sKn(l),C=typeof w=="function",N=b.useContext(fMt),{validateTrigger:E}=b.useContext(M2),D=f!==void 0?f:E,k=e!=null,M=y("form",o),T=Il(M),[A,R,P]=t$e(M,T),O=Cr("Form.Item");O(e!==null,"usage","`null` is passed as `name` property");const V=b.useContext(zz),F=b.useRef(),[$,B]=aKn({}),[z,H]=k2(()=>Nit()),K=oe=>{const fe=V==null?void 0:V.getKey(oe.name);if(H(oe.destroy?Nit():oe,!0),n&&p!==!1&&N){let de=oe.name;if(oe.destroy)de=F.current||de;else if(fe!==void 0){const[ie,Q]=fe;de=[ie].concat(Ot(Q)),F.current=de}N(oe,de)}},q=(oe,fe)=>{B(de=>{const ie=Object.assign({},de),be=[].concat(Ot(oe.name.slice(0,-1)),Ot(fe)).join(_Kn);return oe.destroy?delete ie[be]:ie[be]=oe,ie})},[U,Y]=b.useMemo(()=>{const oe=Ot(z.errors),fe=Ot(z.warnings);return Object.values($).forEach(de=>{oe.push.apply(oe,Ot(de.errors||[])),fe.push.apply(fe,Ot(de.warnings||[]))}),[oe,fe]},[$,z.errors,z.warnings]),J=lKn();function ae(oe,fe,de){return n&&!m?b.createElement(l2t,{prefixCls:M,hasFeedback:t.hasFeedback,validateStatus:t.validateStatus,meta:z,errors:U,warnings:Y,noStyle:!0},oe):b.createElement(yKn,Object.assign({key:"row"},t,{className:Me(i,P,T,R),prefixCls:M,fieldId:fe,isRequired:de,errors:U,warnings:Y,meta:z,onSubItemMetaChange:q,layout:g}),oe)}if(!k&&!C&&!r)return A(ae(w));let se={};return typeof u=="string"?se.label=u:e&&(se.label=String(e)),d&&(se=Object.assign(Object.assign({},se),d)),A(b.createElement(r6e,Object.assign({},t,{messageVariables:se,trigger:h,validateTrigger:D,onMetaChange:K}),(oe,fe,de)=>{const ie=P9(e).length&&fe?fe.name:[],Q=r2t(ie,_),be=c!==void 0?c:!!(a!=null&&a.some(Le=>{if(Le&&typeof Le=="object"&&Le.required&&!Le.warningOnly)return!0;if(typeof Le=="function"){const Te=Le(de);return(Te==null?void 0:Te.required)&&!(Te!=null&&Te.warningOnly)}return!1})),le=Object.assign({},oe);let Ne=null;if(O(!(s&&r),"usage","`shouldUpdate` and `dependencies` shouldn't be used together. See https://u.ant.design/form-deps."),Array.isArray(w)&&k)O(!1,"usage","A `Form.Item` with a `name` prop must have a single child element. For information on how to render more complex form items, see https://u.ant.design/complex-form-item."),Ne=w;else if(C&&(!(s||r)||k))O(!!(s||r),"usage","A `Form.Item` with a render function must have either `shouldUpdate` or `dependencies`."),O(!k,"usage","A `Form.Item` with a render function cannot be a field, and thus cannot have a `name` prop.");else if(r&&!C&&!k)O(!1,"usage","Must set `name` or use a render function when `dependencies` is set.");else if(b.isValidElement(w)){O(w.props.defaultValue===void 0,"usage","`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.");const Le=Object.assign(Object.assign({},w.props),le);if(Le.id||(Le.id=Q),p||U.length>0||Y.length>0||t.extra){const Pe=[];(p||U.length>0)&&Pe.push(`${Q}_help`),t.extra&&Pe.push(`${Q}_extra`),Le["aria-describedby"]=Pe.join(" ")}U.length>0&&(Le["aria-invalid"]="true"),be&&(Le["aria-required"]="true"),P0(w)&&(Le.ref=J(ie,w)),new Set([].concat(Ot(P9(h)),Ot(P9(D)))).forEach(Pe=>{Le[Pe]=function(){for(var ge,he,me,X,re,we=arguments.length,ue=new Array(we),Ce=0;Ce<we;Ce++)ue[Ce]=arguments[Ce];(me=le[Pe])===null||me===void 0||(ge=me).call.apply(ge,[le].concat(ue)),(re=(X=w.props)[Pe])===null||re===void 0||(he=re).call.apply(he,[X].concat(ue))}});const De=[Le["aria-required"],Le["aria-invalid"],Le["aria-describedby"]];Ne=b.createElement(wKn,{control:le,update:w,childProps:De},$c(w,Le))}else C&&(s||r)&&!k?Ne=w(de):(O(!ie.length||!!n,"usage","`name` is only used for validate React element. If you are using Form.Item as layout display, please remove `name` instead."),Ne=w);return ae(Ne,Q,be)}))}const c2t=CKn;c2t.useStatus=a2t;var SKn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const NKn=t=>{var{prefixCls:e,children:n}=t,i=SKn(t,["prefixCls","children"]);Cr("Form.List")(typeof i.name=="number"||(Array.isArray(i.name)?!!i.name.length:!!i.name),"usage","Miss `name` prop.");const{getPrefixCls:r}=b.useContext(jn),o=r("form",e),s=b.useMemo(()=>({prefixCls:o,status:"error"}),[o]);return b.createElement(cMt,Object.assign({},i),(a,l,c)=>b.createElement(s6e.Provider,{value:s},n(a.map(u=>Object.assign(Object.assign({},u),{fieldKey:u.key})),l,{errors:c.errors,warnings:c.warnings})))};function EKn(){const{form:t}=b.useContext(rS);return t}const Ut=s2t;Ut.Item=c2t;Ut.List=NKn;Ut.ErrorList=i2t;Ut.useForm=n$e;Ut.useFormInstance=EKn;Ut.useWatch=hMt;Ut.Provider=mMt;Ut.create=()=>{FS(!1,"Form","antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.")};function u2t(){var t=document.documentElement.clientWidth,e=window.innerHeight||document.documentElement.clientHeight;return{width:t,height:e}}function mke(t){var e=t.getBoundingClientRect(),n=document.documentElement;return{left:e.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:e.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}function Ax(t,e,n,i){var r=sv.unstable_batchedUpdates?function(s){sv.unstable_batchedUpdates(n,s)}:n;return t!=null&&t.addEventListener&&t.addEventListener(e,r,i),{remove:function(){t!=null&&t.removeEventListener&&t.removeEventListener(e,r,i)}}}var eq=b.createContext(null),DKn=function(e){var n=e.visible,i=e.maskTransitionName,r=e.getContainer,o=e.prefixCls,s=e.rootClassName,a=e.icons,l=e.countRender,c=e.showSwitch,u=e.showProgress,d=e.current,h=e.transform,f=e.count,m=e.scale,p=e.minScale,g=e.maxScale,y=e.closeIcon,_=e.onActive,w=e.onClose,C=e.onZoomIn,N=e.onZoomOut,E=e.onRotateRight,D=e.onRotateLeft,k=e.onFlipX,M=e.onFlipY,T=e.onReset,A=e.toolbarRender,R=e.zIndex,P=e.image,O=b.useContext(eq),V=a.rotateLeft,F=a.rotateRight,$=a.zoomIn,B=a.zoomOut,z=a.close,H=a.left,K=a.right,q=a.flipX,U=a.flipY,Y="".concat(o,"-operations-operation");b.useEffect(function(){var Le=function(De){De.keyCode===Wt.ESC&&w()};return n&&window.addEventListener("keydown",Le),function(){window.removeEventListener("keydown",Le)}},[n]);var J=function(Te,De){Te.preventDefault(),Te.stopPropagation(),_(De)},ae=b.useCallback(function(Le){var Te=Le.type,De=Le.disabled,Pe=Le.onClick,ge=Le.icon;return b.createElement("div",{key:Te,className:Me(Y,"".concat(o,"-operations-operation-").concat(Te),ye({},"".concat(o,"-operations-operation-disabled"),!!De)),onClick:Pe},ge)},[Y,o]),se=c?ae({icon:H,onClick:function(Te){return J(Te,-1)},type:"prev",disabled:d===0}):void 0,oe=c?ae({icon:K,onClick:function(Te){return J(Te,1)},type:"next",disabled:d===f-1}):void 0,fe=ae({icon:U,onClick:M,type:"flipY"}),de=ae({icon:q,onClick:k,type:"flipX"}),ie=ae({icon:V,onClick:D,type:"rotateLeft"}),Q=ae({icon:F,onClick:E,type:"rotateRight"}),be=ae({icon:B,onClick:N,type:"zoomOut",disabled:m<=p}),le=ae({icon:$,onClick:C,type:"zoomIn",disabled:m===g}),Ne=b.createElement("div",{className:"".concat(o,"-operations")},fe,de,ie,Q,be,le);return b.createElement(Ou,{visible:n,motionName:i},function(Le){var Te=Le.className,De=Le.style;return b.createElement(l6,{open:!0,getContainer:r??document.body},b.createElement("div",{className:Me("".concat(o,"-operations-wrapper"),Te,s),style:Ie(Ie({},De),{},{zIndex:R})},y===null?null:b.createElement("button",{className:"".concat(o,"-close"),onClick:w},y||z),c&&b.createElement(b.Fragment,null,b.createElement("div",{className:Me("".concat(o,"-switch-left"),ye({},"".concat(o,"-switch-left-disabled"),d===0)),onClick:function(ge){return J(ge,-1)}},H),b.createElement("div",{className:Me("".concat(o,"-switch-right"),ye({},"".concat(o,"-switch-right-disabled"),d===f-1)),onClick:function(ge){return J(ge,1)}},K)),b.createElement("div",{className:"".concat(o,"-footer")},u&&b.createElement("div",{className:"".concat(o,"-progress")},l?l(d+1,f):"".concat(d+1," / ").concat(f)),A?A(Ne,Ie(Ie({icons:{prevIcon:se,nextIcon:oe,flipYIcon:fe,flipXIcon:de,rotateLeftIcon:ie,rotateRightIcon:Q,zoomOutIcon:be,zoomInIcon:le},actions:{onActive:_,onFlipY:M,onFlipX:k,onRotateLeft:D,onRotateRight:E,onZoomOut:N,onZoomIn:C,onReset:T,onClose:w},transform:h},O?{current:d,total:f}:{}),{},{image:P})):Ne)))})},UZ={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function kKn(t,e,n,i){var r=b.useRef(null),o=b.useRef([]),s=b.useState(UZ),a=He(s,2),l=a[0],c=a[1],u=function(m){c(UZ),jp(UZ,l)||i==null||i({transform:UZ,action:m})},d=function(m,p){r.current===null&&(o.current=[],r.current=Dr(function(){c(function(g){var y=g;return o.current.forEach(function(_){y=Ie(Ie({},y),_)}),r.current=null,i==null||i({transform:y,action:p}),y})})),o.current.push(Ie(Ie({},l),m))},h=function(m,p,g,y,_){var w=t.current,C=w.width,N=w.height,E=w.offsetWidth,D=w.offsetHeight,k=w.offsetLeft,M=w.offsetTop,T=m,A=l.scale*m;A>n?(A=n,T=n/l.scale):A<e&&(A=_?A:e,T=A/l.scale);var R=g??innerWidth/2,P=y??innerHeight/2,O=T-1,V=O*C*.5,F=O*N*.5,$=O*(R-l.x-k),B=O*(P-l.y-M),z=l.x-($-V),H=l.y-(B-F);if(m<1&&A===1){var K=E*A,q=D*A,U=u2t(),Y=U.width,J=U.height;K<=Y&&q<=J&&(z=0,H=0)}d({x:z,y:H,scale:A},p)};return{transform:l,resetTransform:u,updateTransform:d,dispatchZoomChange:h}}function Eit(t,e,n,i){var r=e+n,o=(n-i)/2;if(n>i){if(e>0)return ye({},t,o);if(e<0&&r<i)return ye({},t,-o)}else if(e<0||r>i)return ye({},t,e<0?o:-o);return{}}function d2t(t,e,n,i){var r=u2t(),o=r.width,s=r.height,a=null;return t<=o&&e<=s?a={x:0,y:0}:(t>o||e>s)&&(a=Ie(Ie({},Eit("x",n,t,o)),Eit("y",i,e,s))),a}var t4=1,MKn=1;function LKn(t,e,n,i,r,o,s){var a=r.rotate,l=r.scale,c=r.x,u=r.y,d=b.useState(!1),h=He(d,2),f=h[0],m=h[1],p=b.useRef({diffX:0,diffY:0,transformX:0,transformY:0}),g=function(N){!e||N.button!==0||(N.preventDefault(),N.stopPropagation(),p.current={diffX:N.pageX-c,diffY:N.pageY-u,transformX:c,transformY:u},m(!0))},y=function(N){n&&f&&o({x:N.pageX-p.current.diffX,y:N.pageY-p.current.diffY},"move")},_=function(){if(n&&f){m(!1);var N=p.current,E=N.transformX,D=N.transformY,k=c!==E&&u!==D;if(!k)return;var M=t.current.offsetWidth*l,T=t.current.offsetHeight*l,A=t.current.getBoundingClientRect(),R=A.left,P=A.top,O=a%180!==0,V=d2t(O?T:M,O?M:T,R,P);V&&o(Ie({},V),"dragRebound")}},w=function(N){if(!(!n||N.deltaY==0)){var E=Math.abs(N.deltaY/100),D=Math.min(E,MKn),k=t4+D*i;N.deltaY>0&&(k=t4/k),s(k,"wheel",N.clientX,N.clientY)}};return b.useEffect(function(){var C,N,E,D;if(e){E=Ax(window,"mouseup",_,!1),D=Ax(window,"mousemove",y,!1);try{window.top!==window.self&&(C=Ax(window.top,"mouseup",_,!1),N=Ax(window.top,"mousemove",y,!1))}catch(k){I0(!1,"[rc-image] ".concat(k))}}return function(){var k,M,T,A;(k=E)===null||k===void 0||k.remove(),(M=D)===null||M===void 0||M.remove(),(T=C)===null||T===void 0||T.remove(),(A=N)===null||A===void 0||A.remove()}},[n,f,c,u,a,e]),{isMoving:f,onMouseDown:g,onMouseMove:y,onMouseUp:_,onWheel:w}}function TKn(t){return new Promise(function(e){var n=document.createElement("img");n.onerror=function(){return e(!1)},n.onload=function(){return e(!0)},n.src=t})}function h2t(t){var e=t.src,n=t.isCustomPlaceholder,i=t.fallback,r=b.useState(n?"loading":"normal"),o=He(r,2),s=o[0],a=o[1],l=b.useRef(!1),c=s==="error";b.useEffect(function(){var f=!0;return TKn(e).then(function(m){!m&&f&&a("error")}),function(){f=!1}},[e]),b.useEffect(function(){n&&!l.current?a("loading"):c&&a("normal")},[e]);var u=function(){a("normal")},d=function(m){l.current=!1,s==="loading"&&m!==null&&m!==void 0&&m.complete&&(m.naturalWidth||m.naturalHeight)&&(l.current=!0,u())},h=c&&i?{src:i}:{onLoad:u,src:e};return[d,h,s]}function iie(t,e){var n=t.x-e.x,i=t.y-e.y;return Math.hypot(n,i)}function IKn(t,e,n,i){var r=iie(t,n),o=iie(e,i);if(r===0&&o===0)return[t.x,t.y];var s=r/(r+o),a=t.x+s*(e.x-t.x),l=t.y+s*(e.y-t.y);return[a,l]}function AKn(t,e,n,i,r,o,s){var a=r.rotate,l=r.scale,c=r.x,u=r.y,d=b.useState(!1),h=He(d,2),f=h[0],m=h[1],p=b.useRef({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),g=function(N){p.current=Ie(Ie({},p.current),N)},y=function(N){if(e){N.stopPropagation(),m(!0);var E=N.touches,D=E===void 0?[]:E;D.length>1?g({point1:{x:D[0].clientX,y:D[0].clientY},point2:{x:D[1].clientX,y:D[1].clientY},eventType:"touchZoom"}):g({point1:{x:D[0].clientX-c,y:D[0].clientY-u},eventType:"move"})}},_=function(N){var E=N.touches,D=E===void 0?[]:E,k=p.current,M=k.point1,T=k.point2,A=k.eventType;if(D.length>1&&A==="touchZoom"){var R={x:D[0].clientX,y:D[0].clientY},P={x:D[1].clientX,y:D[1].clientY},O=IKn(M,T,R,P),V=He(O,2),F=V[0],$=V[1],B=iie(R,P)/iie(M,T);s(B,"touchZoom",F,$,!0),g({point1:R,point2:P,eventType:"touchZoom"})}else A==="move"&&(o({x:D[0].clientX-M.x,y:D[0].clientY-M.y},"move"),g({eventType:"move"}))},w=function(){if(n){if(f&&m(!1),g({eventType:"none"}),i>l)return o({x:0,y:0,scale:i},"touchZoom");var N=t.current.offsetWidth*l,E=t.current.offsetHeight*l,D=t.current.getBoundingClientRect(),k=D.left,M=D.top,T=a%180!==0,A=d2t(T?E:N,T?N:E,k,M);A&&o(Ie({},A),"dragRebound")}};return b.useEffect(function(){var C;return n&&e&&(C=Ax(window,"touchmove",function(N){return N.preventDefault()},{passive:!1})),function(){var N;(N=C)===null||N===void 0||N.remove()}},[n,e]),{isTouching:f,onTouchStart:y,onTouchMove:_,onTouchEnd:w}}var RKn=["fallback","src","imgRef"],PKn=["prefixCls","src","alt","imageInfo","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],OKn=function(e){var n=e.fallback,i=e.src,r=e.imgRef,o=di(e,RKn),s=h2t({src:i,fallback:n}),a=He(s,2),l=a[0],c=a[1];return Z.createElement("img",lt({ref:function(d){r.current=d,l(d)}},o,c))},f2t=function(e){var n=e.prefixCls,i=e.src,r=e.alt,o=e.imageInfo,s=e.fallback,a=e.movable,l=a===void 0?!0:a,c=e.onClose,u=e.visible,d=e.icons,h=d===void 0?{}:d,f=e.rootClassName,m=e.closeIcon,p=e.getContainer,g=e.current,y=g===void 0?0:g,_=e.count,w=_===void 0?1:_,C=e.countRender,N=e.scaleStep,E=N===void 0?.5:N,D=e.minScale,k=D===void 0?1:D,M=e.maxScale,T=M===void 0?50:M,A=e.transitionName,R=A===void 0?"zoom":A,P=e.maskTransitionName,O=P===void 0?"fade":P,V=e.imageRender,F=e.imgCommonProps,$=e.toolbarRender,B=e.onTransform,z=e.onChange,H=di(e,PKn),K=b.useRef(),q=b.useContext(eq),U=q&&w>1,Y=q&&w>=1,J=b.useState(!0),ae=He(J,2),se=ae[0],oe=ae[1],fe=kKn(K,k,T,B),de=fe.transform,ie=fe.resetTransform,Q=fe.updateTransform,be=fe.dispatchZoomChange,le=LKn(K,l,u,E,de,Q,be),Ne=le.isMoving,Le=le.onMouseDown,Te=le.onWheel,De=AKn(K,l,u,k,de,Q,be),Pe=De.isTouching,ge=De.onTouchStart,he=De.onTouchMove,me=De.onTouchEnd,X=de.rotate,re=de.scale,we=Me(ye({},"".concat(n,"-moving"),Ne));b.useEffect(function(){se||oe(!0)},[se]);var ue=function(){ie("close")},Ce=function(){be(t4+E,"zoomIn")},ze=function(){be(t4/(t4+E),"zoomOut")},Ye=function(){Q({rotate:X+90},"rotateRight")},Ke=function(){Q({rotate:X-90},"rotateLeft")},Xe=function(){Q({flipX:!de.flipX},"flipX")},it=function(){Q({flipY:!de.flipY},"flipY")},ut=function(){ie("reset")},Ge=function(St){var At=y+St;!Number.isInteger(At)||At<0||At>w-1||(oe(!1),ie(St<0?"prev":"next"),z==null||z(At,y))},Ee=function(St){!u||!U||(St.keyCode===Wt.LEFT?Ge(-1):St.keyCode===Wt.RIGHT&&Ge(1))},Se=function(St){u&&(re!==1?Q({x:0,y:0,scale:1},"doubleClick"):be(t4+E,"doubleClick",St.clientX,St.clientY))};b.useEffect(function(){var rt=Ax(window,"keydown",Ee,!1);return function(){rt.remove()}},[u,U,y]);var je=Z.createElement(OKn,lt({},F,{width:e.width,height:e.height,imgRef:K,className:"".concat(n,"-img"),alt:r,style:{transform:"translate3d(".concat(de.x,"px, ").concat(de.y,"px, 0) scale3d(").concat(de.flipX?"-":"").concat(re,", ").concat(de.flipY?"-":"").concat(re,", 1) rotate(").concat(X,"deg)"),transitionDuration:(!se||Pe)&&"0s"},fallback:s,src:i,onWheel:Te,onMouseDown:Le,onDoubleClick:Se,onTouchStart:ge,onTouchMove:he,onTouchEnd:me,onTouchCancel:me})),nt=Ie({url:i,alt:r},o);return Z.createElement(Z.Fragment,null,Z.createElement(n6e,lt({transitionName:R,maskTransitionName:O,closable:!1,keyboard:!0,prefixCls:n,onClose:c,visible:u,classNames:{wrapper:we},rootClassName:f,getContainer:p},H,{afterClose:ue}),Z.createElement("div",{className:"".concat(n,"-img-wrapper")},V?V(je,Ie({transform:de,image:nt},q?{current:y}:{})):je)),Z.createElement(DKn,{visible:u,transform:de,maskTransitionName:O,closeIcon:m,getContainer:p,prefixCls:n,rootClassName:f,icons:h,countRender:C,showSwitch:U,showProgress:Y,current:y,count:w,scale:re,minScale:k,maxScale:T,toolbarRender:$,onActive:Ge,onZoomIn:Ce,onZoomOut:ze,onRotateRight:Ye,onRotateLeft:Ke,onFlipX:Xe,onFlipY:it,onClose:c,onReset:ut,zIndex:H.zIndex!==void 0?H.zIndex+1:void 0,image:nt}))},pke=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function jKn(t){var e=b.useState({}),n=He(e,2),i=n[0],r=n[1],o=b.useCallback(function(a,l){return r(function(c){return Ie(Ie({},c),{},ye({},a,l))}),function(){r(function(c){var u=Ie({},c);return delete u[a],u})}},[]),s=b.useMemo(function(){return t?t.map(function(a){if(typeof a=="string")return{data:{src:a}};var l={};return Object.keys(a).forEach(function(c){["src"].concat(Ot(pke)).includes(c)&&(l[c]=a[c])}),{data:l}}):Object.keys(i).reduce(function(a,l){var c=i[l],u=c.canPreview,d=c.data;return u&&a.push({data:d,id:l}),a},[])},[t,i]);return[s,o,!!t]}var FKn=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],$Kn=["src"],VKn=function(e){var n,i=e.previewPrefixCls,r=i===void 0?"rc-image-preview":i,o=e.children,s=e.icons,a=s===void 0?{}:s,l=e.items,c=e.preview,u=e.fallback,d=Un(c)==="object"?c:{},h=d.visible,f=d.onVisibleChange,m=d.getContainer,p=d.current,g=d.movable,y=d.minScale,_=d.maxScale,w=d.countRender,C=d.closeIcon,N=d.onChange,E=d.onTransform,D=d.toolbarRender,k=d.imageRender,M=di(d,FKn),T=jKn(l),A=He(T,3),R=A[0],P=A[1],O=A[2],V=ho(0,{value:p}),F=He(V,2),$=F[0],B=F[1],z=b.useState(!1),H=He(z,2),K=H[0],q=H[1],U=((n=R[$])===null||n===void 0?void 0:n.data)||{},Y=U.src,J=di(U,$Kn),ae=ho(!!h,{value:h,onChange:function(Pe,ge){f==null||f(Pe,ge,$)}}),se=He(ae,2),oe=se[0],fe=se[1],de=b.useState(null),ie=He(de,2),Q=ie[0],be=ie[1],le=b.useCallback(function(De,Pe,ge,he){var me=O?R.findIndex(function(X){return X.data.src===Pe}):R.findIndex(function(X){return X.id===De});B(me<0?0:me),fe(!0),be({x:ge,y:he}),q(!0)},[R,O]);b.useEffect(function(){oe?K||B(0):q(!1)},[oe]);var Ne=function(Pe,ge){B(Pe),N==null||N(Pe,ge)},Le=function(){fe(!1),be(null)},Te=b.useMemo(function(){return{register:P,onPreview:le}},[P,le]);return b.createElement(eq.Provider,{value:Te},o,b.createElement(f2t,lt({"aria-hidden":!oe,movable:g,visible:oe,prefixCls:r,closeIcon:C,onClose:Le,mousePosition:Q,imgCommonProps:J,src:Y,fallback:u,icons:a,minScale:y,maxScale:_,getContainer:m,current:$,count:R.length,countRender:w,onTransform:E,toolbarRender:D,imageRender:k,onChange:Ne},M)))},Dit=0;function BKn(t,e){var n=b.useState(function(){return Dit+=1,String(Dit)}),i=He(n,1),r=i[0],o=b.useContext(eq),s={data:e,canPreview:t};return b.useEffect(function(){if(o)return o.register(r,s)},[]),b.useEffect(function(){o&&o.register(r,s)},[t,e]),r}var zKn=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],HKn=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],zhe=function(e){var n=e.src,i=e.alt,r=e.onPreviewClose,o=e.prefixCls,s=o===void 0?"rc-image":o,a=e.previewPrefixCls,l=a===void 0?"".concat(s,"-preview"):a,c=e.placeholder,u=e.fallback,d=e.width,h=e.height,f=e.style,m=e.preview,p=m===void 0?!0:m,g=e.className,y=e.onClick,_=e.onError,w=e.wrapperClassName,C=e.wrapperStyle,N=e.rootClassName,E=di(e,zKn),D=c&&c!==!0,k=Un(p)==="object"?p:{},M=k.src,T=k.visible,A=T===void 0?void 0:T,R=k.onVisibleChange,P=R===void 0?r:R,O=k.getContainer,V=O===void 0?void 0:O,F=k.mask,$=k.maskClassName,B=k.movable,z=k.icons,H=k.scaleStep,K=k.minScale,q=k.maxScale,U=k.imageRender,Y=k.toolbarRender,J=di(k,HKn),ae=M??n,se=ho(!!A,{value:A,onChange:P}),oe=He(se,2),fe=oe[0],de=oe[1],ie=h2t({src:n,isCustomPlaceholder:D,fallback:u}),Q=He(ie,3),be=Q[0],le=Q[1],Ne=Q[2],Le=b.useState(null),Te=He(Le,2),De=Te[0],Pe=Te[1],ge=b.useContext(eq),he=!!p,me=function(){de(!1),Pe(null)},X=Me(s,w,N,ye({},"".concat(s,"-error"),Ne==="error")),re=b.useMemo(function(){var ze={};return pke.forEach(function(Ye){e[Ye]!==void 0&&(ze[Ye]=e[Ye])}),ze},pke.map(function(ze){return e[ze]})),we=b.useMemo(function(){return Ie(Ie({},re),{},{src:ae})},[ae,re]),ue=BKn(he,we),Ce=function(Ye){var Ke=mke(Ye.target),Xe=Ke.left,it=Ke.top;ge?ge.onPreview(ue,ae,Xe,it):(Pe({x:Xe,y:it}),de(!0)),y==null||y(Ye)};return b.createElement(b.Fragment,null,b.createElement("div",lt({},E,{className:X,onClick:he?Ce:y,style:Ie({width:d,height:h},C)}),b.createElement("img",lt({},re,{className:Me("".concat(s,"-img"),ye({},"".concat(s,"-img-placeholder"),c===!0),g),style:Ie({height:h},f),ref:be},le,{width:d,height:h,onError:_})),Ne==="loading"&&b.createElement("div",{"aria-hidden":"true",className:"".concat(s,"-placeholder")},c),F&&he&&b.createElement("div",{className:Me("".concat(s,"-mask"),$),style:{display:(f==null?void 0:f.display)==="none"?"none":void 0}},F)),!ge&&he&&b.createElement(f2t,lt({"aria-hidden":!fe,visible:fe,prefixCls:l,onClose:me,mousePosition:De,src:ae,alt:i,imageInfo:{width:d,height:h},fallback:u,getContainer:V,icons:z,movable:B,scaleStep:H,minScale:K,maxScale:q,rootClassName:N,imageRender:U,imgCommonProps:re,toolbarRender:Y},J)))};zhe.PreviewGroup=VKn;zhe.displayName="Image";var WKn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"},UKn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:WKn}))},m2t=b.forwardRef(UKn);m2t.displayName="RotateLeftOutlined";var KKn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"},qKn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:KKn}))},p2t=b.forwardRef(qKn);p2t.displayName="RotateRightOutlined";var GKn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},YKn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:GKn}))},gke=b.forwardRef(YKn);gke.displayName="SwapOutlined";var XKn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"},ZKn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:XKn}))},g2t=b.forwardRef(ZKn);g2t.displayName="ZoomInOutlined";var QKn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"},JKn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:QKn}))},b2t=b.forwardRef(JKn);b2t.displayName="ZoomOutOutlined";const bke=t=>({position:t||"absolute",inset:0}),eqn=t=>{const{iconCls:e,motionDurationSlow:n,paddingXXS:i,marginXXS:r,prefixCls:o,colorTextLightSolid:s}=t;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:s,background:new ko("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${n}`,[`.${o}-mask-info`]:Object.assign(Object.assign({},Mm),{padding:`0 ${xe(i)}`,[e]:{marginInlineEnd:r,svg:{verticalAlign:"baseline"}}})}},tqn=t=>{const{previewCls:e,modalMaskBg:n,paddingSM:i,marginXL:r,margin:o,paddingLG:s,previewOperationColorDisabled:a,previewOperationHoverColor:l,motionDurationSlow:c,iconCls:u,colorTextLightSolid:d}=t,h=new ko(n).setAlpha(.1),f=h.clone().setAlpha(.2);return{[`${e}-footer`]:{position:"fixed",bottom:r,left:{_skip_check_:!0,value:"50%"},display:"flex",flexDirection:"column",alignItems:"center",color:t.previewOperationColor,transform:"translateX(-50%)"},[`${e}-progress`]:{marginBottom:o},[`${e}-close`]:{position:"fixed",top:r,right:{_skip_check_:!0,value:r},display:"flex",color:d,backgroundColor:h.toRgbString(),borderRadius:"50%",padding:i,outline:0,border:0,cursor:"pointer",transition:`all ${c}`,"&:hover":{backgroundColor:f.toRgbString()},[`& > ${u}`]:{fontSize:t.previewOperationSize}},[`${e}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${xe(s)}`,backgroundColor:h.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:i,padding:i,cursor:"pointer",transition:`all ${c}`,userSelect:"none",[`&:not(${e}-operations-operation-disabled):hover > ${u}`]:{color:l},"&-disabled":{color:a,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${u}`]:{fontSize:t.previewOperationSize}}}}},nqn=t=>{const{modalMaskBg:e,iconCls:n,previewOperationColorDisabled:i,previewCls:r,zIndexPopup:o,motionDurationSlow:s}=t,a=new ko(e).setAlpha(.1),l=a.clone().setAlpha(.2);return{[`${r}-switch-left, ${r}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:t.calc(o).add(1).equal(),display:"flex",alignItems:"center",justifyContent:"center",width:t.imagePreviewSwitchSize,height:t.imagePreviewSwitchSize,marginTop:t.calc(t.imagePreviewSwitchSize).mul(-1).div(2).equal(),color:t.previewOperationColor,background:a.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${s}`,userSelect:"none","&:hover":{background:l.toRgbString()},"&-disabled":{"&, &:hover":{color:i,background:"transparent",cursor:"not-allowed",[`> ${n}`]:{cursor:"not-allowed"}}},[`> ${n}`]:{fontSize:t.previewOperationSize}},[`${r}-switch-left`]:{insetInlineStart:t.marginSM},[`${r}-switch-right`]:{insetInlineEnd:t.marginSM}}},iqn=t=>{const{motionEaseOut:e,previewCls:n,motionDurationSlow:i,componentCls:r}=t;return[{[`${r}-preview-root`]:{[n]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${n}-body`]:Object.assign(Object.assign({},bke()),{overflow:"hidden"}),[`${n}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${i} ${e} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},bke()),{transition:`transform ${i} ${e} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${n}-moving`]:{[`${n}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${r}-preview-root`]:{[`${n}-wrap`]:{zIndex:t.zIndexPopup}}},{[`${r}-preview-operations-wrapper`]:{position:"fixed",zIndex:t.calc(t.zIndexPopup).add(1).equal()},"&":[tqn(t),nqn(t)]}]},rqn=t=>{const{componentCls:e}=t;return{[e]:{position:"relative",display:"inline-block",[`${e}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${e}-img-placeholder`]:{backgroundColor:t.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${e}-mask`]:Object.assign({},eqn(t)),[`${e}-mask:hover`]:{opacity:1},[`${e}-placeholder`]:Object.assign({},bke())}}},oqn=t=>{const{previewCls:e}=t;return{[`${e}-root`]:s6(t,"zoom"),"&":KFe(t,!0)}},sqn=t=>({zIndexPopup:t.zIndexPopupBase+80,previewOperationColor:new ko(t.colorTextLightSolid).setAlpha(.65).toRgbString(),previewOperationHoverColor:new ko(t.colorTextLightSolid).setAlpha(.85).toRgbString(),previewOperationColorDisabled:new ko(t.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:t.fontSizeIcon*1.5}),v2t=Jr("Image",t=>{const e=`${t.componentCls}-preview`,n=mr(t,{previewCls:e,modalMaskBg:new ko("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:t.controlHeightLG});return[rqn(n),iqn(n),_Mt(mr(n,{componentCls:e})),oqn(n)]},sqn);var aqn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const y2t={rotateLeft:b.createElement(m2t,null),rotateRight:b.createElement(p2t,null),zoomIn:b.createElement(g2t,null),zoomOut:b.createElement(b2t,null),close:b.createElement(vb,null),left:b.createElement(Hj,null),right:b.createElement(XD,null),flipX:b.createElement(gke,null),flipY:b.createElement(gke,{rotate:90})},lqn=t=>{var{previewPrefixCls:e,preview:n}=t,i=aqn(t,["previewPrefixCls","preview"]);const{getPrefixCls:r}=b.useContext(jn),o=r("image",e),s=`${o}-preview`,a=r(),l=Il(o),[c,u,d]=v2t(o,l),[h]=Mw("ImagePreview",typeof n=="object"?n.zIndex:void 0),f=b.useMemo(()=>{var m;if(n===!1)return n;const p=typeof n=="object"?n:{},g=Me(u,d,l,(m=p.rootClassName)!==null&&m!==void 0?m:"");return Object.assign(Object.assign({},p),{transitionName:Bp(a,"zoom",p.transitionName),maskTransitionName:Bp(a,"fade",p.maskTransitionName),rootClassName:g,zIndex:h})},[n]);return c(b.createElement(zhe.PreviewGroup,Object.assign({preview:f,previewPrefixCls:s,icons:y2t},i)))};var kit=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const BS=t=>{var e;const{prefixCls:n,preview:i,className:r,rootClassName:o,style:s}=t,a=kit(t,["prefixCls","preview","className","rootClassName","style"]),{getPrefixCls:l,locale:c=Dv,getPopupContainer:u,image:d}=b.useContext(jn),h=l("image",n),f=l(),m=c.Image||Dv.Image,p=Il(h),[g,y,_]=v2t(h,p),w=Me(o,y,_,p),C=Me(r,y,d==null?void 0:d.className),[N]=Mw("ImagePreview",typeof i=="object"?i.zIndex:void 0),E=b.useMemo(()=>{var k;if(i===!1)return i;const M=typeof i=="object"?i:{},{getContainer:T,closeIcon:A}=M,R=kit(M,["getContainer","closeIcon"]);return Object.assign(Object.assign({mask:b.createElement("div",{className:`${h}-mask-info`},b.createElement(JK,null),m==null?void 0:m.preview),icons:y2t},R),{getContainer:T??u,transitionName:Bp(f,"zoom",M.transitionName),maskTransitionName:Bp(f,"fade",M.maskTransitionName),zIndex:N,closeIcon:A??((k=d==null?void 0:d.preview)===null||k===void 0?void 0:k.closeIcon)})},[i,m,(e=d==null?void 0:d.preview)===null||e===void 0?void 0:e.closeIcon]),D=Object.assign(Object.assign({},d==null?void 0:d.style),s);return g(b.createElement(zhe,Object.assign({prefixCls:h,preview:E,rootClassName:w,className:C,style:D},a)))};BS.PreviewGroup=lqn;BS.displayName="Image";function cqn(t,e,n){return typeof n=="boolean"?n:t.length?!0:fc(e).some(r=>r.type===D6e)}var _2t=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};function Hhe(t){let{suffixCls:e,tagName:n,displayName:i}=t;return r=>{const o=b.forwardRef((s,a)=>b.createElement(r,Object.assign({ref:a,suffixCls:e,tagName:n},s)));return o.displayName=i,o}}const i$e=b.forwardRef((t,e)=>{const{prefixCls:n,suffixCls:i,className:r,tagName:o}=t,s=_2t(t,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:a}=b.useContext(jn),l=a("layout",n),[c,u,d]=WLt(l),h=i?`${l}-${i}`:l;return c(b.createElement(o,Object.assign({className:Me(n||h,r,u,d),ref:e},s)))}),uqn=b.forwardRef((t,e)=>{const{direction:n}=b.useContext(jn),[i,r]=b.useState([]),{prefixCls:o,className:s,rootClassName:a,children:l,hasSider:c,tagName:u,style:d}=t,h=_2t(t,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),f=Zs(h,["suffixCls"]),{getPrefixCls:m,layout:p}=b.useContext(jn),g=m("layout",o),y=cqn(i,l,c),[_,w,C]=WLt(g),N=Me(g,{[`${g}-has-sider`]:y,[`${g}-rtl`]:n==="rtl"},p==null?void 0:p.className,s,a,w,C),E=b.useMemo(()=>({siderHook:{addSider:D=>{r(k=>[].concat(Ot(k),[D]))},removeSider:D=>{r(k=>k.filter(M=>M!==D))}}}),[]);return _(b.createElement(BLt.Provider,{value:E},b.createElement(u,Object.assign({ref:e,className:N,style:Object.assign(Object.assign({},p==null?void 0:p.style),d)},f),l)))}),dqn=Hhe({tagName:"div",displayName:"Layout"})(uqn),hqn=Hhe({suffixCls:"header",tagName:"header",displayName:"Header"})(i$e),fqn=Hhe({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(i$e),mqn=Hhe({suffixCls:"content",tagName:"main",displayName:"Content"})(i$e),Ps=dqn;Ps.Header=hqn;Ps.Footer=fqn;Ps.Content=mqn;Ps.Sider=D6e;Ps._InternalSiderContext=She;const pqn=function(){const t=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let e=1;e<arguments.length;e++){const n=e<0||arguments.length<=e?void 0:arguments[e];n&&Object.keys(n).forEach(i=>{const r=n[i];r!==void 0&&(t[i]=r)})}return t};var gqn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},bqn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:gqn}))},vke=b.forwardRef(bqn);vke.displayName="DoubleLeftOutlined";var vqn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},yqn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:vqn}))},yke=b.forwardRef(yqn);yke.displayName="DoubleRightOutlined";var _qn={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},xqn=["10","20","50","100"],x2t=function(e){var n=e.pageSizeOptions,i=n===void 0?xqn:n,r=e.locale,o=e.changeSize,s=e.pageSize,a=e.goButton,l=e.quickGo,c=e.rootPrefixCls,u=e.selectComponentClass,d=e.selectPrefixCls,h=e.disabled,f=e.buildOptionText,m=e.showSizeChanger,p=Z.useState(""),g=He(p,2),y=g[0],_=g[1],w=function(){return!y||Number.isNaN(y)?void 0:Number(y)},C=typeof f=="function"?f:function(B){return"".concat(B," ").concat(r.items_per_page)},N=function(z,H){if(o==null||o(Number(z)),Un(m)==="object"){var K;(K=m.onChange)===null||K===void 0||K.call(m,z,H)}},E=function(z){_(z.target.value)},D=function(z){a||y===""||(_(""),!(z.relatedTarget&&(z.relatedTarget.className.indexOf("".concat(c,"-item-link"))>=0||z.relatedTarget.className.indexOf("".concat(c,"-item"))>=0))&&(l==null||l(w())))},k=function(z){y!==""&&(z.keyCode===Wt.ENTER||z.type==="click")&&(_(""),l==null||l(w()))},M=function(){return i.some(function(z){return z.toString()===s.toString()})?i:i.concat([s.toString()]).sort(function(z,H){var K=Number.isNaN(Number(z))?0:Number(z),q=Number.isNaN(Number(H))?0:Number(H);return K-q})},T="".concat(c,"-options");if(!m&&!l)return null;var A=null,R=null,P=null;if(m&&u){var O=Un(m)==="object"?m:{},V=O.options,F=O.className,$=V?void 0:M().map(function(B,z){return Z.createElement(u.Option,{key:z,value:B.toString()},C(B))});A=Z.createElement(u,lt({disabled:h,prefixCls:d,showSearch:!1,optionLabelProp:V?"label":"children",popupMatchSelectWidth:!1,value:(s||i[0]).toString(),getPopupContainer:function(z){return z.parentNode},"aria-label":r.page_size,defaultOpen:!1},Un(m)==="object"?m:null,{className:Me("".concat(T,"-size-changer"),F),options:V,onChange:N}),$)}return l&&(a&&(P=typeof a=="boolean"?Z.createElement("button",{type:"button",onClick:k,onKeyUp:k,disabled:h,className:"".concat(T,"-quick-jumper-button")},r.jump_to_confirm):Z.createElement("span",{onClick:k,onKeyUp:k},a)),R=Z.createElement("div",{className:"".concat(T,"-quick-jumper")},r.jump_to,Z.createElement("input",{disabled:h,type:"text",value:y,onChange:E,onKeyUp:k,onBlur:D,"aria-label":r.page}),r.page,P)),Z.createElement("li",{className:T},A,R)};x2t.displayName="Options";var TO=function(e){var n=e.rootPrefixCls,i=e.page,r=e.active,o=e.className,s=e.showTitle,a=e.onClick,l=e.onKeyPress,c=e.itemRender,u="".concat(n,"-item"),d=Me(u,"".concat(u,"-").concat(i),ye(ye({},"".concat(u,"-active"),r),"".concat(u,"-disabled"),!i),o),h=function(){a(i)},f=function(g){l(g,a,i)},m=c(i,"page",Z.createElement("a",{rel:"nofollow"},i));return m?Z.createElement("li",{title:s?String(i):null,className:d,onClick:h,onKeyDown:f,tabIndex:0},m):null};TO.displayName="Pager";var wqn=function(e,n,i){return i};function $xe(){}function Mit(t){var e=Number(t);return typeof e=="number"&&!Number.isNaN(e)&&isFinite(e)&&Math.floor(e)===e}function cL(t,e,n){var i=typeof t>"u"?e:t;return Math.floor((n-1)/i)+1}var w2t=function(e){var n=e.prefixCls,i=n===void 0?"rc-pagination":n,r=e.selectPrefixCls,o=r===void 0?"rc-select":r,s=e.className,a=e.selectComponentClass,l=e.current,c=e.defaultCurrent,u=c===void 0?1:c,d=e.total,h=d===void 0?0:d,f=e.pageSize,m=e.defaultPageSize,p=m===void 0?10:m,g=e.onChange,y=g===void 0?$xe:g,_=e.hideOnSinglePage,w=e.align,C=e.showPrevNextJumpers,N=C===void 0?!0:C,E=e.showQuickJumper,D=e.showLessItems,k=e.showTitle,M=k===void 0?!0:k,T=e.onShowSizeChange,A=T===void 0?$xe:T,R=e.locale,P=R===void 0?_qn:R,O=e.style,V=e.totalBoundaryShowSizeChanger,F=V===void 0?50:V,$=e.disabled,B=e.simple,z=e.showTotal,H=e.showSizeChanger,K=H===void 0?h>F:H,q=e.pageSizeOptions,U=e.itemRender,Y=U===void 0?wqn:U,J=e.jumpPrevIcon,ae=e.jumpNextIcon,se=e.prevIcon,oe=e.nextIcon,fe=Z.useRef(null),de=ho(10,{value:f,defaultValue:p}),ie=He(de,2),Q=ie[0],be=ie[1],le=ho(1,{value:l,defaultValue:u,postState:function(Ii){return Math.max(1,Math.min(Ii,cL(void 0,Q,h)))}}),Ne=He(le,2),Le=Ne[0],Te=Ne[1],De=Z.useState(Le),Pe=He(De,2),ge=Pe[0],he=Pe[1];b.useEffect(function(){he(Le)},[Le]);var me=y!==$xe,X="current"in e;ii(X?me:!0,"You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var re=Math.max(1,Le-(D?3:5)),we=Math.min(cL(void 0,Q,h),Le+(D?3:5));function ue(si,Ii){var Si=si||Z.createElement("button",{type:"button","aria-label":Ii,className:"".concat(i,"-item-link")});return typeof si=="function"&&(Si=Z.createElement(si,Ie({},e))),Si}function Ce(si){var Ii=si.target.value,Si=cL(void 0,Q,h),To;return Ii===""?To=Ii:Number.isNaN(Number(Ii))?To=ge:Ii>=Si?To=Si:To=Number(Ii),To}function ze(si){return Mit(si)&&si!==Le&&Mit(h)&&h>0}var Ye=h>Q?E:!1;function Ke(si){(si.keyCode===Wt.UP||si.keyCode===Wt.DOWN)&&si.preventDefault()}function Xe(si){var Ii=Ce(si);switch(Ii!==ge&&he(Ii),si.keyCode){case Wt.ENTER:Ge(Ii);break;case Wt.UP:Ge(Ii-1);break;case Wt.DOWN:Ge(Ii+1);break}}function it(si){Ge(Ce(si))}function ut(si){var Ii=cL(si,Q,h),Si=Le>Ii&&Ii!==0?Ii:Le;be(si),he(Si),A==null||A(Le,si),Te(Si),y==null||y(Si,si)}function Ge(si){if(ze(si)&&!$){var Ii=cL(void 0,Q,h),Si=si;return si>Ii?Si=Ii:si<1&&(Si=1),Si!==ge&&he(Si),Te(Si),y==null||y(Si,Q),Si}return Le}var Ee=Le>1,Se=Le<cL(void 0,Q,h);function je(){Ee&&Ge(Le-1)}function nt(){Se&&Ge(Le+1)}function rt(){Ge(re)}function St(){Ge(we)}function At(si,Ii){if(si.key==="Enter"||si.charCode===Wt.ENTER||si.keyCode===Wt.ENTER){for(var Si=arguments.length,To=new Array(Si>2?Si-2:0),ts=2;ts<Si;ts++)To[ts-2]=arguments[ts];Ii.apply(void 0,To)}}function Nt(si){At(si,je)}function vt(si){At(si,nt)}function $t(si){At(si,rt)}function ln(si){At(si,St)}function Jt(si){var Ii=Y(si,"prev",ue(se,"prev page"));return Z.isValidElement(Ii)?Z.cloneElement(Ii,{disabled:!Ee}):Ii}function en(si){var Ii=Y(si,"next",ue(oe,"next page"));return Z.isValidElement(Ii)?Z.cloneElement(Ii,{disabled:!Se}):Ii}function Ft(si){(si.type==="click"||si.keyCode===Wt.ENTER)&&Ge(ge)}var dn=null,Ze=Ll(e,{aria:!0,data:!0}),dt=z&&Z.createElement("li",{className:"".concat(i,"-total-text")},z(h,[h===0?0:(Le-1)*Q+1,Le*Q>h?h:Le*Q])),at=null,mt=cL(void 0,Q,h);if(_&&h<=Q)return null;var It=[],Ve={rootPrefixCls:i,onClick:Ge,onKeyPress:At,showTitle:M,itemRender:Y,page:-1},bt=Le-1>0?Le-1:0,wt=Le+1<mt?Le+1:mt,$e=E&&E.goButton,We=Un(B)==="object"?B.readOnly:!B,tt=$e,_t=null;B&&($e&&(typeof $e=="boolean"?tt=Z.createElement("button",{type:"button",onClick:Ft,onKeyUp:Ft},P.jump_to_confirm):tt=Z.createElement("span",{onClick:Ft,onKeyUp:Ft},$e),tt=Z.createElement("li",{title:M?"".concat(P.jump_to).concat(Le,"/").concat(mt):null,className:"".concat(i,"-simple-pager")},tt)),_t=Z.createElement("li",{title:M?"".concat(Le,"/").concat(mt):null,className:"".concat(i,"-simple-pager")},We?ge:Z.createElement("input",{type:"text",value:ge,disabled:$,onKeyDown:Ke,onKeyUp:Xe,onChange:Xe,onBlur:it,size:3}),Z.createElement("span",{className:"".concat(i,"-slash")},"/"),mt));var ht=D?1:2;if(mt<=3+ht*2){mt||It.push(Z.createElement(TO,lt({},Ve,{key:"noPager",page:1,className:"".concat(i,"-item-disabled")})));for(var qe=1;qe<=mt;qe+=1)It.push(Z.createElement(TO,lt({},Ve,{key:qe,page:qe,active:Le===qe})))}else{var ft=D?P.prev_3:P.prev_5,Ct=D?P.next_3:P.next_5,Pt=Y(re,"jump-prev",ue(J,"prev page")),an=Y(we,"jump-next",ue(ae,"next page"));N&&(dn=Pt?Z.createElement("li",{title:M?ft:null,key:"prev",onClick:rt,tabIndex:0,onKeyDown:$t,className:Me("".concat(i,"-jump-prev"),ye({},"".concat(i,"-jump-prev-custom-icon"),!!J))},Pt):null,at=an?Z.createElement("li",{title:M?Ct:null,key:"next",onClick:St,tabIndex:0,onKeyDown:ln,className:Me("".concat(i,"-jump-next"),ye({},"".concat(i,"-jump-next-custom-icon"),!!ae))},an):null);var _n=Math.max(1,Le-ht),on=Math.min(Le+ht,mt);Le-1<=ht&&(on=1+ht*2),mt-Le<=ht&&(_n=mt-ht*2);for(var yn=_n;yn<=on;yn+=1)It.push(Z.createElement(TO,lt({},Ve,{key:yn,page:yn,active:Le===yn})));if(Le-1>=ht*2&&Le!==3&&(It[0]=Z.cloneElement(It[0],{className:Me("".concat(i,"-item-after-jump-prev"),It[0].props.className)}),It.unshift(dn)),mt-Le>=ht*2&&Le!==mt-2){var fi=It[It.length-1];It[It.length-1]=Z.cloneElement(fi,{className:Me("".concat(i,"-item-before-jump-next"),fi.props.className)}),It.push(at)}_n!==1&&It.unshift(Z.createElement(TO,lt({},Ve,{key:1,page:1}))),on!==mt&&It.push(Z.createElement(TO,lt({},Ve,{key:mt,page:mt})))}var oi=Jt(bt);if(oi){var Qi=!Ee||!mt;oi=Z.createElement("li",{title:M?P.prev_page:null,onClick:je,tabIndex:Qi?null:0,onKeyDown:Nt,className:Me("".concat(i,"-prev"),ye({},"".concat(i,"-disabled"),Qi)),"aria-disabled":Qi},oi)}var mi=en(wt);if(mi){var Vr,_i;B?(Vr=!Se,_i=Ee?0:null):(Vr=!Se||!mt,_i=Vr?null:0),mi=Z.createElement("li",{title:M?P.next_page:null,onClick:nt,tabIndex:_i,onKeyDown:vt,className:Me("".concat(i,"-next"),ye({},"".concat(i,"-disabled"),Vr)),"aria-disabled":Vr},mi)}var ur=Me(i,s,ye(ye(ye(ye(ye({},"".concat(i,"-start"),w==="start"),"".concat(i,"-center"),w==="center"),"".concat(i,"-end"),w==="end"),"".concat(i,"-simple"),B),"".concat(i,"-disabled"),$));return Z.createElement("ul",lt({className:ur,style:O,ref:fe},Ze),dt,oi,B?_t:It,mi,Z.createElement(x2t,{locale:P,rootPrefixCls:i,disabled:$,selectComponentClass:a,selectPrefixCls:o,changeSize:ut,pageSize:Q,pageSizeOptions:q,quickGo:Ye?Ge:null,goButton:tt,showSizeChanger:K}))};w2t.displayName="Pagination";const C2t=t=>b.createElement(Lo,Object.assign({},t,{showSearch:!0,size:"small"})),S2t=t=>b.createElement(Lo,Object.assign({},t,{showSearch:!0,size:"middle"}));C2t.Option=Lo.Option;S2t.Option=Lo.Option;const Cqn=t=>{const{componentCls:e}=t;return{[`${e}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${e}-item-link`]:{color:t.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${e}-item-link`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}},[`&${e}-disabled`]:{cursor:"not-allowed",[`${e}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:t.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:t.colorBorder,backgroundColor:t.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:t.itemActiveBgDisabled},a:{color:t.itemActiveColorDisabled}}},[`${e}-item-link`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${e}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${e}-simple-pager`]:{color:t.colorTextDisabled},[`${e}-jump-prev, ${e}-jump-next`]:{[`${e}-item-link-icon`]:{opacity:0},[`${e}-item-ellipsis`]:{opacity:1}}},[`&${e}-simple`]:{[`${e}-prev, ${e}-next`]:{[`&${e}-disabled ${e}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Sqn=t=>{const{componentCls:e}=t;return{[`&${e}-mini ${e}-total-text, &${e}-mini ${e}-simple-pager`]:{height:t.itemSizeSM,lineHeight:xe(t.itemSizeSM)},[`&${e}-mini ${e}-item`]:{minWidth:t.itemSizeSM,height:t.itemSizeSM,margin:0,lineHeight:xe(t.calc(t.itemSizeSM).sub(2).equal())},[`&${e}-mini:not(${e}-disabled) ${e}-item:not(${e}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:t.colorBgTextHover},"&:active":{backgroundColor:t.colorBgTextActive}},[`&${e}-mini ${e}-prev, &${e}-mini ${e}-next`]:{minWidth:t.itemSizeSM,height:t.itemSizeSM,margin:0,lineHeight:xe(t.itemSizeSM)},[`&${e}-mini:not(${e}-disabled)`]:{[`${e}-prev, ${e}-next`]:{[`&:hover ${e}-item-link`]:{backgroundColor:t.colorBgTextHover},[`&:active ${e}-item-link`]:{backgroundColor:t.colorBgTextActive},[`&${e}-disabled:hover ${e}-item-link`]:{backgroundColor:"transparent"}}},[`
    &${e}-mini ${e}-prev ${e}-item-link,
    &${e}-mini ${e}-next ${e}-item-link
    `]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:t.itemSizeSM,lineHeight:xe(t.itemSizeSM)}},[`&${e}-mini ${e}-jump-prev, &${e}-mini ${e}-jump-next`]:{height:t.itemSizeSM,marginInlineEnd:0,lineHeight:xe(t.itemSizeSM)},[`&${e}-mini ${e}-options`]:{marginInlineStart:t.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:t.miniOptionsSizeChangerTop},"&-quick-jumper":{height:t.itemSizeSM,lineHeight:xe(t.itemSizeSM),input:Object.assign(Object.assign({},$6e(t)),{width:t.paginationMiniQuickJumperInputWidth,height:t.controlHeightSM})}}}},Nqn=t=>{const{componentCls:e}=t;return{[`
    &${e}-simple ${e}-prev,
    &${e}-simple ${e}-next
    `]:{height:t.itemSizeSM,lineHeight:xe(t.itemSizeSM),verticalAlign:"top",[`${e}-item-link`]:{height:t.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:t.colorBgTextHover},"&:active":{backgroundColor:t.colorBgTextActive},"&::after":{height:t.itemSizeSM,lineHeight:xe(t.itemSizeSM)}}},[`&${e}-simple ${e}-simple-pager`]:{display:"inline-block",height:t.itemSizeSM,marginInlineEnd:t.marginXS,input:{boxSizing:"border-box",height:"100%",padding:`0 ${xe(t.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:t.itemInputBg,border:`${xe(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadius,outline:"none",transition:`border-color ${t.motionDurationMid}`,color:"inherit","&:hover":{borderColor:t.colorPrimary},"&:focus":{borderColor:t.colorPrimaryHover,boxShadow:`${xe(t.inputOutlineOffset)} 0 ${xe(t.controlOutlineWidth)} ${t.controlOutline}`},"&[disabled]":{color:t.colorTextDisabled,backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,cursor:"not-allowed"}}}}},Eqn=t=>{const{componentCls:e}=t;return{[`${e}-jump-prev, ${e}-jump-next`]:{outline:0,[`${e}-item-container`]:{position:"relative",[`${e}-item-link-icon`]:{color:t.colorPrimary,fontSize:t.fontSizeSM,opacity:0,transition:`all ${t.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${e}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:t.colorTextDisabled,letterSpacing:t.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:t.paginationEllipsisTextIndent,opacity:1,transition:`all ${t.motionDurationMid}`}},"&:hover":{[`${e}-item-link-icon`]:{opacity:1},[`${e}-item-ellipsis`]:{opacity:0}}},[`
    ${e}-prev,
    ${e}-jump-prev,
    ${e}-jump-next
    `]:{marginInlineEnd:t.marginXS},[`
    ${e}-prev,
    ${e}-next,
    ${e}-jump-prev,
    ${e}-jump-next
    `]:{display:"inline-block",minWidth:t.itemSize,height:t.itemSize,color:t.colorText,fontFamily:t.fontFamily,lineHeight:xe(t.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}`},[`${e}-prev, ${e}-next`]:{outline:0,button:{color:t.colorText,cursor:"pointer",userSelect:"none"},[`${e}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:t.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${xe(t.lineWidth)} ${t.lineType} transparent`,borderRadius:t.borderRadius,outline:"none",transition:`all ${t.motionDurationMid}`},[`&:hover ${e}-item-link`]:{backgroundColor:t.colorBgTextHover},[`&:active ${e}-item-link`]:{backgroundColor:t.colorBgTextActive},[`&${e}-disabled:hover`]:{[`${e}-item-link`]:{backgroundColor:"transparent"}}},[`${e}-slash`]:{marginInlineEnd:t.paginationSlashMarginInlineEnd,marginInlineStart:t.paginationSlashMarginInlineStart},[`${e}-options`]:{display:"inline-block",marginInlineStart:t.margin,verticalAlign:"middle","&-size-changer":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:t.controlHeight,marginInlineStart:t.marginXS,lineHeight:xe(t.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},XK(t)),R6e(t,{borderColor:t.colorBorder,hoverBorderColor:t.colorPrimaryHover,activeBorderColor:t.colorPrimary,activeShadow:t.activeShadow})),{"&[disabled]":Object.assign({},Ihe(t)),width:t.calc(t.controlHeightLG).mul(1.25).equal(),height:t.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:t.marginXS,marginInlineEnd:t.marginXS})}}}},Dqn=t=>{const{componentCls:e}=t;return{[`${e}-item`]:{display:"inline-block",minWidth:t.itemSize,height:t.itemSize,marginInlineEnd:t.marginXS,fontFamily:t.fontFamily,lineHeight:xe(t.calc(t.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:t.itemBg,border:`${xe(t.lineWidth)} ${t.lineType} transparent`,borderRadius:t.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${xe(t.paginationItemPaddingInline)}`,color:t.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${e}-item-active)`]:{"&:hover":{transition:`all ${t.motionDurationMid}`,backgroundColor:t.colorBgTextHover},"&:active":{backgroundColor:t.colorBgTextActive}},"&-active":{fontWeight:t.fontWeightStrong,backgroundColor:t.itemActiveBg,borderColor:t.colorPrimary,a:{color:t.colorPrimary},"&:hover":{borderColor:t.colorPrimaryHover},"&:hover a":{color:t.colorPrimaryHover}}}}},kqn=t=>{const{componentCls:e}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},fo(t)),{display:"flex","&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${e}-total-text`]:{display:"inline-block",height:t.itemSize,marginInlineEnd:t.marginXS,lineHeight:xe(t.calc(t.itemSize).sub(2).equal()),verticalAlign:"middle"}}),Dqn(t)),Eqn(t)),Nqn(t)),Sqn(t)),Cqn(t)),{[`@media only screen and (max-width: ${t.screenLG}px)`]:{[`${e}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${t.screenSM}px)`]:{[`${e}-options`]:{display:"none"}}}),[`&${t.componentCls}-rtl`]:{direction:"rtl"}}},Mqn=t=>{const{componentCls:e}=t;return{[`${e}:not(${e}-disabled)`]:{[`${e}-item`]:Object.assign({},j0(t)),[`${e}-jump-prev, ${e}-jump-next`]:{"&:focus-visible":Object.assign({[`${e}-item-link-icon`]:{opacity:1},[`${e}-item-ellipsis`]:{opacity:0}},iS(t))},[`${e}-prev, ${e}-next`]:{[`&:focus-visible ${e}-item-link`]:Object.assign({},iS(t))}}}},N2t=t=>Object.assign({itemBg:t.colorBgContainer,itemSize:t.controlHeight,itemSizeSM:t.controlHeightSM,itemActiveBg:t.colorBgContainer,itemLinkBg:t.colorBgContainer,itemActiveColorDisabled:t.colorTextDisabled,itemActiveBgDisabled:t.controlItemBgActiveDisabled,itemInputBg:t.colorBgContainer,miniOptionsSizeChangerTop:0},YK(t)),E2t=t=>mr(t,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:t.calc(t.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:t.calc(t.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:t.calc(t.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:t.calc(t.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:t.marginSM,paginationSlashMarginInlineEnd:t.marginSM,paginationEllipsisTextIndent:"0.13em"},GK(t)),Lqn=Jr("Pagination",t=>{const e=E2t(t);return[kqn(e),Mqn(e)]},N2t),Tqn=t=>{const{componentCls:e}=t;return{[`${e}${e}-bordered${e}-disabled:not(${e}-mini)`]:{"&, &:hover":{[`${e}-item-link`]:{borderColor:t.colorBorder}},"&:focus-visible":{[`${e}-item-link`]:{borderColor:t.colorBorder}},[`${e}-item, ${e}-item-link`]:{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,[`&:hover:not(${e}-item-active)`]:{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,a:{color:t.colorTextDisabled}},[`&${e}-item-active`]:{backgroundColor:t.itemActiveBgDisabled}},[`${e}-prev, ${e}-next`]:{"&:hover button":{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,color:t.colorTextDisabled},[`${e}-item-link`]:{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder}}},[`${e}${e}-bordered:not(${e}-mini)`]:{[`${e}-prev, ${e}-next`]:{"&:hover button":{borderColor:t.colorPrimaryHover,backgroundColor:t.itemBg},[`${e}-item-link`]:{backgroundColor:t.itemLinkBg,borderColor:t.colorBorder},[`&:hover ${e}-item-link`]:{borderColor:t.colorPrimary,backgroundColor:t.itemBg,color:t.colorPrimary},[`&${e}-disabled`]:{[`${e}-item-link`]:{borderColor:t.colorBorder,color:t.colorTextDisabled}}},[`${e}-item`]:{backgroundColor:t.itemBg,border:`${xe(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,[`&:hover:not(${e}-item-active)`]:{borderColor:t.colorPrimary,backgroundColor:t.itemBg,a:{color:t.colorPrimary}},"&-active":{borderColor:t.colorPrimary}}}}},Iqn=$A(["Pagination","bordered"],t=>{const e=E2t(t);return[Tqn(e)]},N2t);var Aqn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const D2t=t=>{const{align:e,prefixCls:n,selectPrefixCls:i,className:r,rootClassName:o,style:s,size:a,locale:l,selectComponentClass:c,responsive:u,showSizeChanger:d}=t,h=Aqn(t,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:f}=vhe(u),[,m]=Sd(),{getPrefixCls:p,direction:g,pagination:y={}}=b.useContext(jn),_=p("pagination",n),[w,C,N]=Lqn(_),E=d??y.showSizeChanger,D=b.useMemo(()=>{const V=b.createElement("span",{className:`${_}-item-ellipsis`},"•••"),F=b.createElement("button",{className:`${_}-item-link`,type:"button",tabIndex:-1},g==="rtl"?b.createElement(XD,null):b.createElement(Hj,null)),$=b.createElement("button",{className:`${_}-item-link`,type:"button",tabIndex:-1},g==="rtl"?b.createElement(Hj,null):b.createElement(XD,null)),B=b.createElement("a",{className:`${_}-item-link`},b.createElement("div",{className:`${_}-item-container`},g==="rtl"?b.createElement(yke,{className:`${_}-item-link-icon`}):b.createElement(vke,{className:`${_}-item-link-icon`}),V)),z=b.createElement("a",{className:`${_}-item-link`},b.createElement("div",{className:`${_}-item-container`},g==="rtl"?b.createElement(vke,{className:`${_}-item-link-icon`}):b.createElement(yke,{className:`${_}-item-link-icon`}),V));return{prevIcon:F,nextIcon:$,jumpPrevIcon:B,jumpNextIcon:z}},[g,_]),[k]=bb("Pagination",BDt),M=Object.assign(Object.assign({},k),l),T=Hc(a),A=T==="small"||!!(f&&!T&&u),R=p("select",i),P=Me({[`${_}-${e}`]:!!e,[`${_}-mini`]:A,[`${_}-rtl`]:g==="rtl",[`${_}-bordered`]:m.wireframe},y==null?void 0:y.className,r,o,C,N),O=Object.assign(Object.assign({},y==null?void 0:y.style),s);return w(b.createElement(b.Fragment,null,m.wireframe&&b.createElement(Iqn,{prefixCls:_}),b.createElement(w2t,Object.assign({},D,h,{style:O,prefixCls:_,selectPrefixCls:R,className:P,selectComponentClass:c||(A?C2t:S2t),locale:M,showSizeChanger:E}))))};D2t.displayName="Pagination";const rie=100,k2t=rie/5,M2t=rie/2-k2t/2,Vxe=M2t*2*Math.PI,Lit=50,Tit=t=>{const{dotClassName:e,style:n,hasCircleCls:i}=t;return b.createElement("circle",{className:Me(`${e}-circle`,{[`${e}-circle-bg`]:i}),r:M2t,cx:Lit,cy:Lit,strokeWidth:k2t,style:n})},Rqn=t=>{let{percent:e,prefixCls:n}=t;const i=`${n}-dot`,r=`${i}-holder`,o=`${r}-hidden`,[s,a]=b.useState(!1);Lr(()=>{e!==0&&a(!0)},[e!==0]);const l=Math.max(Math.min(e,100),0);if(!s)return null;const c={strokeDashoffset:`${Vxe/4}`,strokeDasharray:`${Vxe*l/100} ${Vxe*(100-l)/100}`};return b.createElement("span",{className:Me(r,`${i}-progress`,l<=0&&o)},b.createElement("svg",{viewBox:`0 0 ${rie} ${rie}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":l},b.createElement(Tit,{dotClassName:i,hasCircleCls:!0}),b.createElement(Tit,{dotClassName:i,style:c})))};function Pqn(t){const{prefixCls:e,percent:n=0}=t,i=`${e}-dot`,r=`${i}-holder`,o=`${r}-hidden`;return b.createElement(b.Fragment,null,b.createElement("span",{className:Me(r,n>0&&o)},b.createElement("span",{className:Me(i,`${e}-dot-spin`)},[1,2,3,4].map(s=>b.createElement("i",{className:`${e}-dot-item`,key:s})))),b.createElement(Rqn,{prefixCls:e,percent:n}))}function Oqn(t){const{prefixCls:e,indicator:n,percent:i}=t,r=`${e}-dot`;return n&&b.isValidElement(n)?$c(n,{className:Me(n.props.className,r),percent:i}):b.createElement(Pqn,{prefixCls:e,percent:i})}const jqn=new so("antSpinMove",{to:{opacity:1}}),Fqn=new so("antRotate",{to:{transform:"rotate(405deg)"}}),$qn=t=>{const{componentCls:e,calc:n}=t;return{[e]:Object.assign(Object.assign({},fo(t)),{position:"absolute",display:"none",color:t.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${e}-text`]:{fontSize:t.fontSize,paddingTop:n(n(t.dotSize).sub(t.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:t.colorBgMask,zIndex:t.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${t.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[e]:{[`${e}-dot-holder`]:{color:t.colorWhite},[`${e}-text`]:{color:t.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${e}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:t.contentHeight,[`${e}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(t.dotSize).mul(-1).div(2).equal()},[`${e}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${t.colorBgContainer}`},[`&${e}-show-text ${e}-dot`]:{marginTop:n(t.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${e}-dot`]:{margin:n(t.dotSizeSM).mul(-1).div(2).equal()},[`${e}-text`]:{paddingTop:n(n(t.dotSizeSM).sub(t.fontSize)).div(2).add(2).equal()},[`&${e}-show-text ${e}-dot`]:{marginTop:n(t.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${e}-dot`]:{margin:n(t.dotSizeLG).mul(-1).div(2).equal()},[`${e}-text`]:{paddingTop:n(n(t.dotSizeLG).sub(t.fontSize)).div(2).add(2).equal()},[`&${e}-show-text ${e}-dot`]:{marginTop:n(t.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${e}-container`]:{position:"relative",transition:`opacity ${t.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:t.colorBgContainer,opacity:0,transition:`all ${t.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${e}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:t.spinDotDefault},[`${e}-dot-holder`]:{width:"1em",height:"1em",fontSize:t.dotSize,display:"inline-block",transition:`transform ${t.motionDurationSlow} ease, opacity ${t.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:t.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${e}-dot-progress`]:{position:"absolute",top:"50%",transform:"translate(-50%, -50%)",insetInlineStart:"50%"},[`${e}-dot`]:{position:"relative",display:"inline-block",fontSize:t.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:n(t.dotSize).sub(n(t.marginXXS).div(2)).div(2).equal(),height:n(t.dotSize).sub(n(t.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:jqn,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:Fqn,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(i=>`${i} ${t.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:t.colorFillSecondary}},[`&-sm ${e}-dot`]:{"&, &-holder":{fontSize:t.dotSizeSM}},[`&-sm ${e}-dot-holder`]:{i:{width:n(n(t.dotSizeSM).sub(n(t.marginXXS).div(2))).div(2).equal(),height:n(n(t.dotSizeSM).sub(n(t.marginXXS).div(2))).div(2).equal()}},[`&-lg ${e}-dot`]:{"&, &-holder":{fontSize:t.dotSizeLG}},[`&-lg ${e}-dot-holder`]:{i:{width:n(n(t.dotSizeLG).sub(t.marginXXS)).div(2).equal(),height:n(n(t.dotSizeLG).sub(t.marginXXS)).div(2).equal()}},[`&${e}-show-text ${e}-text`]:{display:"block"}})}},Vqn=t=>{const{controlHeightLG:e,controlHeight:n}=t;return{contentHeight:400,dotSize:e/2,dotSizeSM:e*.35,dotSizeLG:n}},Bqn=Jr("Spin",t=>{const e=mr(t,{spinDotDefault:t.colorTextDescription});return[$qn(e)]},Vqn),zqn=200,Iit=[[30,.05],[70,.03],[96,.01]];function Hqn(t,e){const[n,i]=b.useState(0),r=b.useRef(),o=e==="auto";return b.useEffect(()=>(o&&t&&(i(0),r.current=setInterval(()=>{i(s=>{const a=100-s;for(let l=0;l<Iit.length;l+=1){const[c,u]=Iit[l];if(s<=c)return s+a*u}return s})},zqn)),()=>{clearInterval(r.current)}),[o,t]),o?n:e}var Wqn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};let L2t;function Uqn(t,e){return!!t&&!!e&&!isNaN(Number(e))}const zS=t=>{var e;const{prefixCls:n,spinning:i=!0,delay:r=0,className:o,rootClassName:s,size:a="default",tip:l,wrapperClassName:c,style:u,children:d,fullscreen:h=!1,indicator:f,percent:m}=t,p=Wqn(t,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:g,direction:y,spin:_}=b.useContext(jn),w=g("spin",n),[C,N,E]=Bqn(w),[D,k]=b.useState(()=>i&&!Uqn(i,r)),M=Hqn(D,m);b.useEffect(()=>{if(i){const F=ozn(r,()=>{k(!0)});return F(),()=>{var $;($=F==null?void 0:F.cancel)===null||$===void 0||$.call(F)}}k(!1)},[r,i]);const T=b.useMemo(()=>typeof d<"u"&&!h,[d,h]);Cr("Spin")(!l||T||h,"usage","`tip` only work in nest or fullscreen pattern.");const A=Me(w,_==null?void 0:_.className,{[`${w}-sm`]:a==="small",[`${w}-lg`]:a==="large",[`${w}-spinning`]:D,[`${w}-show-text`]:!!l,[`${w}-rtl`]:y==="rtl"},o,!h&&s,N,E),R=Me(`${w}-container`,{[`${w}-blur`]:D}),P=(e=f??(_==null?void 0:_.indicator))!==null&&e!==void 0?e:L2t,O=Object.assign(Object.assign({},_==null?void 0:_.style),u),V=b.createElement("div",Object.assign({},p,{style:O,className:A,"aria-live":"polite","aria-busy":D}),b.createElement(Oqn,{prefixCls:w,indicator:P,percent:M}),l&&(T||h)?b.createElement("div",{className:`${w}-text`},l):null);return C(T?b.createElement("div",Object.assign({},p,{className:Me(`${w}-nested-loading`,c,N,E)}),D&&b.createElement("div",{key:"loading"},V),b.createElement("div",{className:R,key:"container"},d)):h?b.createElement("div",{className:Me(`${w}-fullscreen`,{[`${w}-fullscreen-show`]:D},s,N,E)},V):V)};zS.setDefaultIndicator=t=>{L2t=t};zS.displayName="Spin";function Kqn(t){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)&&t==null?[]:Array.isArray(t)?t:[t]}var qqn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const Gqn=t=>{const{prefixCls:e,className:n,closeIcon:i,closable:r,type:o,title:s,children:a,footer:l}=t,c=qqn(t,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:u}=b.useContext(jn),d=u(),h=e||u("modal"),f=Il(d),[m,p,g]=CMt(h,f),y=`${h}-confirm`;let _={};return o?_={closable:r??!1,title:"",footer:"",children:b.createElement(NMt,Object.assign({},t,{prefixCls:h,confirmPrefixCls:y,rootPrefixCls:d,content:a}))}:_={closable:r??!0,title:s,footer:l!==null&&b.createElement(yMt,Object.assign({},t)),children:a},m(b.createElement(t6e,Object.assign({prefixCls:h,className:Me(p,`${h}-pure-panel`,o&&y,o&&`${y}-${o}`,n,g,f)},c,{closeIcon:vMt(h,i),closable:r},_)))},Yqn=VMt(Gqn);function T2t(t){return VK(MMt(t))}const Ma=SMt;Ma.useModal=JFn;Ma.info=function(e){return VK(LMt(e))};Ma.success=function(e){return VK(TMt(e))};Ma.error=function(e){return VK(IMt(e))};Ma.warning=T2t;Ma.warn=T2t;Ma.confirm=function(e){return VK(AMt(e))};Ma.destroyAll=function(){for(;AT.length;){const e=AT.pop();e&&e()}};Ma.config=GFn;Ma._InternalPanelDoNotUseOrYouWillBeFired=Yqn;Ma.displayName="Modal";let $y=null,Vee=t=>t(),oie=[],Kz={};function Ait(){const{getContainer:t,rtl:e,maxCount:n,top:i,bottom:r,showProgress:o,pauseOnHover:s}=Kz,a=(t==null?void 0:t())||document.body;return{getContainer:()=>a,rtl:e,maxCount:n,top:i,bottom:r,showProgress:o,pauseOnHover:s}}const Xqn=Z.forwardRef((t,e)=>{const{notificationConfig:n,sync:i}=t,{getPrefixCls:r}=b.useContext(jn),o=Kz.prefixCls||r("notification"),s=b.useContext(x6n),[a,l]=$Mt(Object.assign(Object.assign(Object.assign({},n),{prefixCls:o}),s.notification));return Z.useEffect(i,[]),Z.useImperativeHandle(e,()=>{const c=Object.assign({},a);return Object.keys(c).forEach(u=>{c[u]=function(){return i(),a[u].apply(a,arguments)}}),{instance:c,sync:i}}),l}),Zqn=Z.forwardRef((t,e)=>{const[n,i]=Z.useState(Ait),r=()=>{i(Ait)};Z.useEffect(r,[]);const o=$Fe(),s=o.getRootPrefixCls(),a=o.getIconPrefixCls(),l=o.getTheme(),c=Z.createElement(Xqn,{ref:e,sync:r,notificationConfig:n});return Z.createElement(Kv,{prefixCls:s,iconPrefixCls:a,theme:l},o.holderRender?o.holderRender(c):c)});function r$e(){if(!$y){const t=document.createDocumentFragment(),e={fragment:t};$y=e,Vee(()=>{HFe(Z.createElement(Zqn,{ref:n=>{const{instance:i,sync:r}=n||{};Promise.resolve().then(()=>{!e.instance&&i&&(e.instance=i,e.sync=r,r$e())})}}),t)});return}$y.instance&&(oie.forEach(t=>{switch(t.type){case"open":{Vee(()=>{$y.instance.open(Object.assign(Object.assign({},Kz),t.config))});break}case"destroy":Vee(()=>{$y==null||$y.instance.destroy(t.key)});break}}),oie=[])}function Qqn(t){Kz=Object.assign(Object.assign({},Kz),t),Vee(()=>{var e;(e=$y==null?void 0:$y.sync)===null||e===void 0||e.call($y)})}function I2t(t){$Fe().holderRender||gkt("notification"),oie.push({type:"open",config:t}),r$e()}const Jqn=t=>{oie.push({type:"destroy",key:t}),r$e()},eGn=["success","info","warning","error"],tGn={open:I2t,destroy:Jqn,config:Qqn,useNotification:_6n,_InternalPanelDoNotUseOrYouWillBeFired:d6n},Ei=tGn;eGn.forEach(t=>{Ei[t]=e=>I2t(Object.assign(Object.assign({},e),{type:t}))});var nGn={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},iGn=function(){var e=b.useRef([]),n=b.useRef(null);return b.useEffect(function(){var i=Date.now(),r=!1;e.current.forEach(function(o){if(o){r=!0;var s=o.style;s.transitionDuration=".3s, .3s, .3s, .06s",n.current&&i-n.current<100&&(s.transitionDuration="0s, 0s")}}),r&&(n.current=Date.now())}),e.current},Rit=0,rGn=Lu();function oGn(){var t;return rGn?(t=Rit,Rit+=1):t="TEST_OR_SSR",t}const sGn=function(t){var e=b.useState(),n=He(e,2),i=n[0],r=n[1];return b.useEffect(function(){r("rc_progress_".concat(oGn()))},[]),t||i};var Pit=function(e){var n=e.bg,i=e.children;return b.createElement("div",{style:{width:"100%",height:"100%",background:n}},i)};function Oit(t,e){return Object.keys(t).map(function(n){var i=parseFloat(n),r="".concat(Math.floor(i*e),"%");return"".concat(t[n]," ").concat(r)})}var A2t=b.forwardRef(function(t,e){var n=t.prefixCls,i=t.color,r=t.gradientId,o=t.radius,s=t.style,a=t.ptg,l=t.strokeLinecap,c=t.strokeWidth,u=t.size,d=t.gapDegree,h=i&&Un(i)==="object",f=h?"#FFF":void 0,m=u/2,p=b.createElement("circle",{className:"".concat(n,"-circle-path"),r:o,cx:m,cy:m,stroke:f,strokeLinecap:l,strokeWidth:c,opacity:a===0?0:1,style:s,ref:e});if(!h)return p;var g="".concat(r,"-conic"),y=d?"".concat(180+d/2,"deg"):"0deg",_=Oit(i,(360-d)/360),w=Oit(i,1),C="conic-gradient(from ".concat(y,", ").concat(_.join(", "),")"),N="linear-gradient(to ".concat(d?"bottom":"top",", ").concat(w.join(", "),")");return b.createElement(b.Fragment,null,b.createElement("mask",{id:g},p),b.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(g,")")},b.createElement(Pit,{bg:N},b.createElement(Pit,{bg:C}))))});A2t.displayName="PtgCircle";var H7=100,Bxe=function(e,n,i,r,o,s,a,l,c,u){var d=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,h=i/100*360*((360-s)/360),f=s===0?0:{bottom:0,top:180,left:90,right:-90}[a],m=(100-r)/100*n;c==="round"&&r!==100&&(m+=u/2,m>=n&&(m=n-.01));var p=H7/2;return{stroke:typeof l=="string"?l:void 0,strokeDasharray:"".concat(n,"px ").concat(e),strokeDashoffset:m+d,transform:"rotate(".concat(o+h+f,"deg)"),transformOrigin:"".concat(p,"px ").concat(p,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},aGn=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function jit(t){var e=t??[];return Array.isArray(e)?e:[e]}var R2t=function(e){var n=Ie(Ie({},nGn),e),i=n.id,r=n.prefixCls,o=n.steps,s=n.strokeWidth,a=n.trailWidth,l=n.gapDegree,c=l===void 0?0:l,u=n.gapPosition,d=n.trailColor,h=n.strokeLinecap,f=n.style,m=n.className,p=n.strokeColor,g=n.percent,y=di(n,aGn),_=H7/2,w=sGn(i),C="".concat(w,"-gradient"),N=_-s/2,E=Math.PI*2*N,D=c>0?90+c/2:-90,k=E*((360-c)/360),M=Un(o)==="object"?o:{count:o,gap:2},T=M.count,A=M.gap,R=jit(g),P=jit(p),O=P.find(function(K){return K&&Un(K)==="object"}),V=O&&Un(O)==="object",F=V?"butt":h,$=Bxe(E,k,0,100,D,c,u,d,F,s),B=iGn(),z=function(){var q=0;return R.map(function(U,Y){var J=P[Y]||P[P.length-1],ae=Bxe(E,k,q,U,D,c,u,J,F,s);return q+=U,b.createElement(A2t,{key:Y,color:J,ptg:U,radius:N,prefixCls:r,gradientId:C,style:ae,strokeLinecap:F,strokeWidth:s,gapDegree:c,ref:function(oe){B[Y]=oe},size:H7})}).reverse()},H=function(){var q=Math.round(T*(R[0]/100)),U=100/T,Y=0;return new Array(T).fill(null).map(function(J,ae){var se=ae<=q-1?P[0]:d,oe=se&&Un(se)==="object"?"url(#".concat(C,")"):void 0,fe=Bxe(E,k,Y,U,D,c,u,se,"butt",s,A);return Y+=(k-fe.strokeDashoffset+A)*100/k,b.createElement("circle",{key:ae,className:"".concat(r,"-circle-path"),r:N,cx:_,cy:_,stroke:oe,strokeWidth:s,opacity:1,style:fe,ref:function(ie){B[ae]=ie}})})};return b.createElement("svg",lt({className:Me("".concat(r,"-circle"),m),viewBox:"0 0 ".concat(H7," ").concat(H7),style:f,id:i,role:"presentation"},y),!T&&b.createElement("circle",{className:"".concat(r,"-circle-trail"),r:N,cx:_,cy:_,stroke:d,strokeLinecap:F,strokeWidth:a||s,style:$}),T?H():z())};R2t.displayName="Circle";function fD(t){return!t||t<0?0:t>100?100:t}function sie(t){let{success:e,successPercent:n}=t,i=n;return e&&"progress"in e&&(i=e.progress),e&&"percent"in e&&(i=e.percent),i}const lGn=t=>{let{percent:e,success:n,successPercent:i}=t;const r=fD(sie({success:n,successPercent:i}));return[r,fD(fD(e)-r)]},cGn=t=>{let{success:e={},strokeColor:n}=t;const{strokeColor:i}=e;return[i||l3.green,n||null]},Whe=(t,e,n)=>{var i,r,o,s;let a=-1,l=-1;if(e==="step"){const c=n.steps,u=n.strokeWidth;typeof t=="string"||typeof t>"u"?(a=t==="small"?2:14,l=u??8):typeof t=="number"?[a,l]=[t,t]:[a=14,l=8]=Array.isArray(t)?t:[t.width,t.height],a*=c}else if(e==="line"){const c=n==null?void 0:n.strokeWidth;typeof t=="string"||typeof t>"u"?l=c||(t==="small"?6:8):typeof t=="number"?[a,l]=[t,t]:[a=-1,l=8]=Array.isArray(t)?t:[t.width,t.height]}else(e==="circle"||e==="dashboard")&&(typeof t=="string"||typeof t>"u"?[a,l]=t==="small"?[60,60]:[120,120]:typeof t=="number"?[a,l]=[t,t]:Array.isArray(t)&&(a=(r=(i=t[0])!==null&&i!==void 0?i:t[1])!==null&&r!==void 0?r:120,l=(s=(o=t[0])!==null&&o!==void 0?o:t[1])!==null&&s!==void 0?s:120));return[a,l]},uGn=3,dGn=t=>uGn/t*100,hGn=t=>{const{prefixCls:e,trailColor:n=null,strokeLinecap:i="round",gapPosition:r,gapDegree:o,width:s=120,type:a,children:l,success:c,size:u=s,steps:d}=t,[h,f]=Whe(u,"circle");let{strokeWidth:m}=t;m===void 0&&(m=Math.max(dGn(h),6));const p={width:h,height:f,fontSize:h*.15+6},g=b.useMemo(()=>{if(o||o===0)return o;if(a==="dashboard")return 75},[o,a]),y=lGn(t),_=r||a==="dashboard"&&"bottom"||void 0,w=Object.prototype.toString.call(t.strokeColor)==="[object Object]",C=cGn({success:c,strokeColor:t.strokeColor}),N=Me(`${e}-inner`,{[`${e}-circle-gradient`]:w}),E=b.createElement(R2t,{steps:d,percent:d?y[1]:y,strokeWidth:m,trailWidth:m,strokeColor:d?C[1]:C,strokeLinecap:i,trailColor:n,prefixCls:e,gapDegree:g,gapPosition:_}),D=h<=20,k=b.createElement("div",{className:N,style:p},E,!D&&l);return D?b.createElement(Vs,{title:l},k):k},aie="--progress-line-stroke-color",P2t="--progress-percent",Fit=t=>{const e=t?"100%":"-100%";return new so(`antProgress${t?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${e}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${e}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},fGn=t=>{const{componentCls:e,iconCls:n}=t;return{[e]:Object.assign(Object.assign({},fo(t)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:t.fontSize},[`${e}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${e}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:t.remainingColor,borderRadius:t.lineBorderRadius},[`${e}-inner:not(${e}-circle-gradient)`]:{[`${e}-circle-path`]:{stroke:t.defaultColor}},[`${e}-success-bg, ${e}-bg`]:{position:"relative",background:t.defaultColor,borderRadius:t.lineBorderRadius,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`},[`${e}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${e}-text`]:{width:"max-content",marginInlineStart:0,marginTop:t.marginXXS}},[`${e}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${aie})`]},height:"100%",width:`calc(1 / var(${P2t}) * 100%)`,display:"block"},[`&${e}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${e}-text-inner`]:{color:t.colorWhite,[`&${e}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${e}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:t.colorSuccess},[`${e}-text`]:{display:"inline-block",marginInlineStart:t.marginXS,color:t.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[n]:{fontSize:t.fontSize},[`&${e}-text-outer`]:{width:"max-content"},[`&${e}-text-outer${e}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:t.marginXS}},[`${e}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${xe(t.paddingXXS)}`,[`&${e}-text-start`]:{justifyContent:"start"},[`&${e}-text-end`]:{justifyContent:"end"}},[`&${e}-status-active`]:{[`${e}-bg::before`]:{position:"absolute",inset:0,backgroundColor:t.colorBgContainer,borderRadius:t.lineBorderRadius,opacity:0,animationName:Fit(),animationDuration:t.progressActiveMotionDuration,animationTimingFunction:t.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${e}-rtl${e}-status-active`]:{[`${e}-bg::before`]:{animationName:Fit(!0)}},[`&${e}-status-exception`]:{[`${e}-bg`]:{backgroundColor:t.colorError},[`${e}-text`]:{color:t.colorError}},[`&${e}-status-exception ${e}-inner:not(${e}-circle-gradient)`]:{[`${e}-circle-path`]:{stroke:t.colorError}},[`&${e}-status-success`]:{[`${e}-bg`]:{backgroundColor:t.colorSuccess},[`${e}-text`]:{color:t.colorSuccess}},[`&${e}-status-success ${e}-inner:not(${e}-circle-gradient)`]:{[`${e}-circle-path`]:{stroke:t.colorSuccess}}})}},mGn=t=>{const{componentCls:e,iconCls:n}=t;return{[e]:{[`${e}-circle-trail`]:{stroke:t.remainingColor},[`&${e}-circle ${e}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${e}-circle ${e}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:t.circleTextColor,fontSize:t.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[n]:{fontSize:t.circleIconFontSize}},[`${e}-circle&-status-exception`]:{[`${e}-text`]:{color:t.colorError}},[`${e}-circle&-status-success`]:{[`${e}-text`]:{color:t.colorSuccess}}},[`${e}-inline-circle`]:{lineHeight:1,[`${e}-inner`]:{verticalAlign:"bottom"}}}},pGn=t=>{const{componentCls:e}=t;return{[e]:{[`${e}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:t.progressStepMinWidth,marginInlineEnd:t.progressStepMarginInlineEnd,backgroundColor:t.remainingColor,transition:`all ${t.motionDurationSlow}`,"&-active":{backgroundColor:t.defaultColor}}}}}},gGn=t=>{const{componentCls:e,iconCls:n}=t;return{[e]:{[`${e}-small&-line, ${e}-small&-line ${e}-text ${n}`]:{fontSize:t.fontSizeSM}}}},bGn=t=>({circleTextColor:t.colorText,defaultColor:t.colorInfo,remainingColor:t.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${t.fontSize/t.fontSizeSM}em`}),vGn=Jr("Progress",t=>{const e=t.calc(t.marginXXS).div(2).equal(),n=mr(t,{progressStepMarginInlineEnd:e,progressStepMinWidth:e,progressActiveMotionDuration:"2.4s"});return[fGn(n),mGn(n),pGn(n),gGn(n)]},bGn);var yGn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const _Gn=t=>{let e=[];return Object.keys(t).forEach(n=>{const i=parseFloat(n.replace(/%/g,""));isNaN(i)||e.push({key:i,value:t[n]})}),e=e.sort((n,i)=>n.key-i.key),e.map(n=>{let{key:i,value:r}=n;return`${r} ${i}%`}).join(", ")},xGn=(t,e)=>{const{from:n=l3.blue,to:i=l3.blue,direction:r=e==="rtl"?"to left":"to right"}=t,o=yGn(t,["from","to","direction"]);if(Object.keys(o).length!==0){const a=_Gn(o),l=`linear-gradient(${r}, ${a})`;return{background:l,[aie]:l}}const s=`linear-gradient(${r}, ${n}, ${i})`;return{background:s,[aie]:s}},wGn=t=>{const{prefixCls:e,direction:n,percent:i,size:r,strokeWidth:o,strokeColor:s,strokeLinecap:a="round",children:l,trailColor:c=null,percentPosition:u,success:d}=t,{align:h,type:f}=u,m=s&&typeof s!="string"?xGn(s,n):{[aie]:s,background:s},p=a==="square"||a==="butt"?0:void 0,g=r??[-1,o||(r==="small"?6:8)],[y,_]=Whe(g,"line",{strokeWidth:o});Cr("Progress").deprecated(!("strokeWidth"in t),"strokeWidth","size");const w={backgroundColor:c||void 0,borderRadius:p},C=Object.assign(Object.assign({width:`${fD(i)}%`,height:_,borderRadius:p},m),{[P2t]:fD(i)/100}),N=sie(t),E={width:`${fD(N)}%`,height:_,borderRadius:p,backgroundColor:d==null?void 0:d.strokeColor},D={width:y<0?"100%":y},k=b.createElement("div",{className:`${e}-inner`,style:w},b.createElement("div",{className:Me(`${e}-bg`,`${e}-bg-${f}`),style:C},f==="inner"&&l),N!==void 0&&b.createElement("div",{className:`${e}-success-bg`,style:E})),M=f==="outer"&&h==="start",T=f==="outer"&&h==="end";return f==="outer"&&h==="center"?b.createElement("div",{className:`${e}-layout-bottom`},k,l):b.createElement("div",{className:`${e}-outer`,style:D},M&&l,k,T&&l)},CGn=t=>{const{size:e,steps:n,percent:i=0,strokeWidth:r=8,strokeColor:o,trailColor:s=null,prefixCls:a,children:l}=t,c=Math.round(n*(i/100)),d=e??[e==="small"?2:14,r],[h,f]=Whe(d,"step",{steps:n,strokeWidth:r}),m=h/n,p=new Array(n);for(let g=0;g<n;g++){const y=Array.isArray(o)?o[g]:o;p[g]=b.createElement("div",{key:g,className:Me(`${a}-steps-item`,{[`${a}-steps-item-active`]:g<=c-1}),style:{backgroundColor:g<=c-1?y:s,width:m,height:f}})}return b.createElement("div",{className:`${a}-steps-outer`},p,l)};var SGn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const NGn=["normal","exception","active","success"],Uj=b.forwardRef((t,e)=>{const{prefixCls:n,className:i,rootClassName:r,steps:o,strokeColor:s,percent:a=0,size:l="default",showInfo:c=!0,type:u="line",status:d,format:h,style:f,percentPosition:m={}}=t,p=SGn(t,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:g="end",type:y="outer"}=m,_=Array.isArray(s)?s[0]:s,w=typeof s=="string"||Array.isArray(s)?s:void 0,C=b.useMemo(()=>{if(_){const z=typeof _=="string"?_:Object.values(_)[0];return new ko(z).isLight()}return!1},[s]),N=b.useMemo(()=>{var z,H;const K=sie(t);return parseInt(K!==void 0?(z=K??0)===null||z===void 0?void 0:z.toString():(H=a??0)===null||H===void 0?void 0:H.toString(),10)},[a,t.success,t.successPercent]),E=b.useMemo(()=>!NGn.includes(d)&&N>=100?"success":d||"normal",[d,N]),{getPrefixCls:D,direction:k,progress:M}=b.useContext(jn),T=D("progress",n),[A,R,P]=vGn(T),O=u==="line",V=O&&!o,F=b.useMemo(()=>{if(!c)return null;const z=sie(t);let H;const K=h||(U=>`${U}%`),q=O&&C&&y==="inner";return y==="inner"||h||E!=="exception"&&E!=="success"?H=K(fD(a),fD(z)):E==="exception"?H=O?b.createElement($S,null):b.createElement(vb,null):E==="success"&&(H=O?b.createElement(VA,null):b.createElement(Xk,null)),b.createElement("span",{className:Me(`${T}-text`,{[`${T}-text-bright`]:q,[`${T}-text-${g}`]:V,[`${T}-text-${y}`]:V}),title:typeof H=="string"?H:void 0},H)},[c,a,N,E,u,T,h]);{const z=Cr("Progress");z.deprecated(!("successPercent"in t),"successPercent","success.percent"),z.deprecated(!("width"in t),"width","size"),(u==="circle"||u==="dashboard")&&(Array.isArray(l)?z(!1,"usage",'Type "circle" and "dashboard" do not accept array as `size`, please use number or preset size instead.'):typeof l=="object"&&z(!1,"usage",'Type "circle" and "dashboard" do not accept object as `size`, please use number or preset size instead.')),t.success&&"progress"in t.success&&z.deprecated(!1,"success.progress","success.percent")}let $;u==="line"?$=o?b.createElement(CGn,Object.assign({},t,{strokeColor:w,prefixCls:T,steps:typeof o=="object"?o.count:o}),F):b.createElement(wGn,Object.assign({},t,{strokeColor:_,prefixCls:T,direction:k,percentPosition:{align:g,type:y}}),F):(u==="circle"||u==="dashboard")&&($=b.createElement(hGn,Object.assign({},t,{strokeColor:_,prefixCls:T,progressStatus:E}),F));const B=Me(T,`${T}-status-${E}`,{[`${T}-${u==="dashboard"&&"circle"||u}`]:u!=="line",[`${T}-inline-circle`]:u==="circle"&&Whe(l,"circle")[0]<=20,[`${T}-line`]:V,[`${T}-line-align-${g}`]:V,[`${T}-line-position-${y}`]:V,[`${T}-steps`]:o,[`${T}-show-info`]:c,[`${T}-${l}`]:typeof l=="string",[`${T}-rtl`]:k==="rtl"},M==null?void 0:M.className,i,r,R,P);return A(b.createElement("div",Object.assign({ref:e,style:Object.assign(Object.assign({},M==null?void 0:M.style),f),className:B,role:"progressbar","aria-valuenow":N,"aria-valuemin":0,"aria-valuemax":100},Zs(p,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),$))});Uj.displayName="Progress";var EGn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"},DGn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:EGn}))},O2t=b.forwardRef(DGn);O2t.displayName="AppstoreAddOutlined";var kGn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"},MGn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:kGn}))},j2t=b.forwardRef(MGn);j2t.displayName="AppstoreOutlined";var LGn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]},name:"arrow-down",theme:"outlined"},TGn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:LGn}))},o$e=b.forwardRef(TGn);o$e.displayName="ArrowDownOutlined";var IGn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},AGn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:IGn}))},s$e=b.forwardRef(AGn);s$e.displayName="ArrowLeftOutlined";var RGn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z"}}]},name:"arrow-right",theme:"outlined"},PGn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:RGn}))},F2t=b.forwardRef(PGn);F2t.displayName="ArrowRightOutlined";var OGn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z"}}]},name:"bank",theme:"outlined"},jGn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:OGn}))},$2t=b.forwardRef(jGn);$2t.displayName="BankOutlined";var FGn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z"}}]},name:"book",theme:"outlined"},$Gn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:FGn}))},a$e=b.forwardRef($Gn);a$e.displayName="BookOutlined";var VGn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1a184.31 184.31 0 00-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9a184.31 184.31 0 00-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8a63 63 0 01-63 63H232a63 63 0 01-63-63c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5.2 13 .7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7a273 273 0 0022.7 49c24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2a281.38 281.38 0 00123.2-149.5A120 120 0 01836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7.4-6.4.7-12.8.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3C584 874.3 548.8 884 512 884s-72-9.7-102.9-27.8c-30.3-17.7-55.6-43-73.3-73.3A202.75 202.75 0 01308 680V412h408v268z"}}]},name:"bug",theme:"outlined"},BGn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:VGn}))},V2t=b.forwardRef(BGn);V2t.displayName="BugOutlined";var zGn={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},HGn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:zGn}))},B2t=b.forwardRef(HGn);B2t.displayName="CaretDownFilled";var WGn={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},UGn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:WGn}))},z2t=b.forwardRef(UGn);z2t.displayName="CaretDownOutlined";var KGn={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},qGn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:KGn}))},H2t=b.forwardRef(qGn);H2t.displayName="CaretUpOutlined";var GGn={icon:function(e,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z",fill:e}},{tag:"path",attrs:{d:"M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm193.4 225.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.3 0 19.9 5 25.9 13.3l71.2 98.8 157.2-218c6-8.4 15.7-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.4 12.7z",fill:n}},{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z",fill:e}}]}},name:"check-circle",theme:"twotone"},YGn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:GGn}))},W2t=b.forwardRef(YGn);W2t.displayName="CheckCircleTwoTone";var XGn={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"},ZGn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:XGn}))},Uhe=b.forwardRef(ZGn);Uhe.displayName="CloseCircleOutlined";var QGn={icon:function(e,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z",fill:e}},{tag:"path",attrs:{d:"M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm171.8 527.1c1.2 1.5 1.9 3.3 1.9 5.2 0 4.5-3.6 8-8 8l-66-.3-99.3-118.4-99.3 118.5-66.1.3c-4.4 0-8-3.6-8-8 0-1.9.7-3.7 1.9-5.2L471 512.3l-130.1-155a8.32 8.32 0 01-1.9-5.2c0-4.5 3.6-8 8-8l66.1.3 99.3 118.4 99.4-118.5 66-.3c4.4 0 8 3.6 8 8 0 1.9-.6 3.8-1.8 5.2l-130.1 155 129.9 154.9z",fill:n}},{tag:"path",attrs:{d:"M685.8 352c0-4.4-3.6-8-8-8l-66 .3-99.4 118.5-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155-130.1 154.9a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3 99.3-118.5L611.7 680l66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.9 512.2l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z",fill:e}}]}},name:"close-circle",theme:"twotone"},JGn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:QGn}))},U2t=b.forwardRef(JGn);U2t.displayName="CloseCircleTwoTone";var eYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},tYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:eYn}))},lie=b.forwardRef(tYn);lie.displayName="CodeOutlined";var nYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},iYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:nYn}))},K2t=b.forwardRef(iYn);K2t.displayName="CopyOutlined";var rYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"},oYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:rYn}))},q2t=b.forwardRef(oYn);q2t.displayName="CreditCardOutlined";var sYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z"}}]},name:"dashboard",theme:"outlined"},aYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:sYn}))},Khe=b.forwardRef(aYn);Khe.displayName="DashboardOutlined";var lYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"},cYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:lYn}))},qhe=b.forwardRef(cYn);qhe.displayName="DatabaseOutlined";var uYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},dYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:uYn}))},l$e=b.forwardRef(dYn);l$e.displayName="DeleteOutlined";var hYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M476 399.1c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1V484h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H420v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V540h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H476v-84.9zM560.5 704h-225c-4.1 0-7.5 3.2-7.5 7v42c0 3.8 3.4 7 7.5 7h225c4.1 0 7.5-3.2 7.5-7v-42c0-3.8-3.4-7-7.5-7zm-7.1-502.6c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v704c0 17.7 14.3 32 32 32h512c17.7 0 32-14.3 32-32V397.3c0-8.5-3.4-16.6-9.4-22.6L553.4 201.4zM664 888H232V264h282.2L664 413.8V888zm190.2-581.4L611.3 72.9c-6-5.7-13.9-8.9-22.2-8.9H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h277l219 210.6V824c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V329.6c0-8.7-3.5-17-9.8-23z"}}]},name:"diff",theme:"outlined"},fYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:hYn}))},_ke=b.forwardRef(fYn);_ke.displayName="DiffOutlined";var mYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.9 490.3c3.6-12 5.4-24.4 5.4-37 0-28.3-9.3-55.5-26.1-77.7 3.6-12 5.4-24.4 5.4-37 0-28.3-9.3-55.5-26.1-77.7 3.6-12 5.4-24.4 5.4-37 0-51.6-30.7-98.1-78.3-118.4a66.1 66.1 0 00-26.5-5.4H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h129.3l85.8 310.8C372.9 889 418.9 924 470.9 924c29.7 0 57.4-11.8 77.9-33.4 20.5-21.5 31-49.7 29.5-79.4l-6-122.9h239.9c12.1 0 23.9-3.2 34.3-9.3 40.4-23.5 65.5-66.1 65.5-111 0-28.3-9.3-55.5-26.1-77.7zM184 456V172h81v284h-81zm627.2 160.4H496.8l9.6 198.4c.6 11.9-4.7 23.1-14.6 30.5-6.1 4.5-13.6 6.8-21.1 6.7a44.28 44.28 0 01-42.2-32.3L329 459.2V172h415.4a56.85 56.85 0 0133.6 51.8c0 9.7-2.3 18.9-6.9 27.3l-13.9 25.4 21.9 19a56.76 56.76 0 0119.6 43c0 9.7-2.3 18.9-6.9 27.3l-13.9 25.4 21.9 19a56.76 56.76 0 0119.6 43c0 9.7-2.3 18.9-6.9 27.3l-14 25.5 21.9 19a56.76 56.76 0 0119.6 43c0 19.1-11 37.5-28.8 48.4z"}}]},name:"dislike",theme:"outlined"},pYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:mYn}))},Ghe=b.forwardRef(pYn);Ghe.displayName="DislikeOutlined";var gYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},bYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:gYn}))},c$e=b.forwardRef(bYn);c$e.displayName="DownloadOutlined";var vYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},yYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:vYn}))},u$e=b.forwardRef(yYn);u$e.displayName="EditOutlined";var _Yn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},xYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:_Yn}))},G2t=b.forwardRef(xYn);G2t.displayName="EnterOutlined";var wYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},CYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:wYn}))},xke=b.forwardRef(CYn);xke.displayName="ExclamationCircleOutlined";var SYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M925.9 804l-24-199.2c-.8-6.6-8.9-9.4-13.6-4.7L829 659.5 557.7 388.3c-6.3-6.2-16.4-6.2-22.6 0L433.3 490 156.6 213.3a8.03 8.03 0 00-11.3 0l-45 45.2a8.03 8.03 0 000 11.3L422 591.7c6.2 6.3 16.4 6.3 22.6 0L546.4 490l226.1 226-59.3 59.3a8.01 8.01 0 004.7 13.6l199.2 24c5.1.7 9.5-3.7 8.8-8.9z"}}]},name:"fall",theme:"outlined"},NYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:SYn}))},Y2t=b.forwardRef(NYn);Y2t.displayName="FallOutlined";var EYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM544 472c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V644h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V472z"}}]},name:"file-add",theme:"outlined"},DYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:EYn}))},X2t=b.forwardRef(DYn);X2t.displayName="FileAddOutlined";var kYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},MYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:kYn}))},d$e=b.forwardRef(MYn);d$e.displayName="FileOutlined";var LYn={icon:function(e,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:n}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:e}}]}},name:"file",theme:"twotone"},TYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:LYn}))},Z2t=b.forwardRef(TYn);Z2t.displayName="FileTwoTone";var IYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},AYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:IYn}))},Q2t=b.forwardRef(AYn);Q2t.displayName="FilterFilled";var RYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"},PYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:RYn}))},J2t=b.forwardRef(PYn);J2t.displayName="FilterOutlined";var OYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},jYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:OYn}))},eAt=b.forwardRef(jYn);eAt.displayName="FolderOpenOutlined";var FYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},$Yn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:FYn}))},tAt=b.forwardRef($Yn);tAt.displayName="FolderOutlined";var VYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"},BYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:VYn}))},nAt=b.forwardRef(BYn);nAt.displayName="FormOutlined";var zYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z"}}]},name:"history",theme:"outlined"},HYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:zYn}))},h$e=b.forwardRef(HYn);h$e.displayName="HistoryOutlined";var WYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},UYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:WYn}))},iAt=b.forwardRef(UYn);iAt.displayName="HolderOutlined";var KYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},qYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:KYn}))},rAt=b.forwardRef(qYn);rAt.displayName="InfoCircleOutlined";var GYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z"}}]},name:"like",theme:"outlined"},YYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:GYn}))},Yhe=b.forwardRef(YYn);Yhe.displayName="LikeOutlined";var XYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z"}}]},name:"line-chart",theme:"outlined"},ZYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:XYn}))},oAt=b.forwardRef(ZYn);oAt.displayName="LineChartOutlined";var QYn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},JYn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:QYn}))},sAt=b.forwardRef(JYn);sAt.displayName="MinusSquareOutlined";var eXn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M456 231a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"more",theme:"outlined"},tXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:eXn}))},aAt=b.forwardRef(tXn);aAt.displayName="MoreOutlined";var nXn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},iXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:nXn}))},lAt=b.forwardRef(iXn);lAt.displayName="PaperClipOutlined";var rXn={icon:function(e,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:e}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:n}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:n}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:n}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:e}}]}},name:"picture",theme:"twotone"},oXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:rXn}))},cAt=b.forwardRef(oXn);cAt.displayName="PictureTwoTone";var sXn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},aXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:sXn}))},uAt=b.forwardRef(aXn);uAt.displayName="PlusCircleOutlined";var lXn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},cXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:lXn}))},dAt=b.forwardRef(cXn);dAt.displayName="PlusSquareOutlined";var uXn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 00-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"}}]},name:"question-circle",theme:"filled"},dXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:uXn}))},hAt=b.forwardRef(dXn);hAt.displayName="QuestionCircleFilled";var hXn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z"}}]},name:"redo",theme:"outlined"},fXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:hXn}))},fAt=b.forwardRef(fXn);fAt.displayName="RedoOutlined";var mXn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917 211.1l-199.2 24c-6.6.8-9.4 8.9-4.7 13.6l59.3 59.3-226 226-101.8-101.7c-6.3-6.3-16.4-6.2-22.6 0L100.3 754.1a8.03 8.03 0 000 11.3l45 45.2c3.1 3.1 8.2 3.1 11.3 0L433.3 534 535 635.7c6.3 6.2 16.4 6.2 22.6 0L829 364.5l59.3 59.3a8.01 8.01 0 0013.6-4.7l24-199.2c.7-5.1-3.7-9.5-8.9-8.8z"}}]},name:"rise",theme:"outlined"},pXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:mXn}))},mAt=b.forwardRef(pXn);mAt.displayName="RiseOutlined";var gXn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M793 242H366v-74c0-6.7-7.7-10.4-12.9-6.3l-142 112a8 8 0 000 12.6l142 112c5.2 4.1 12.9.4 12.9-6.3v-74h415v470H175c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-28.7 64-64V306c0-35.3-28.7-64-64-64z"}}]},name:"rollback",theme:"outlined"},bXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:gXn}))},pAt=b.forwardRef(bXn);pAt.displayName="RollbackOutlined";var vXn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},yXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:vXn}))},Xhe=b.forwardRef(yXn);Xhe.displayName="SettingOutlined";var _Xn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M752 664c-28.5 0-54.8 10-75.4 26.7L469.4 540.8a160.68 160.68 0 000-57.6l207.2-149.9C697.2 350 723.5 360 752 360c66.2 0 120-53.8 120-120s-53.8-120-120-120-120 53.8-120 120c0 11.6 1.6 22.7 4.7 33.3L439.9 415.8C410.7 377.1 364.3 352 312 352c-88.4 0-160 71.6-160 160s71.6 160 160 160c52.3 0 98.7-25.1 127.9-63.8l196.8 142.5c-3.1 10.6-4.7 21.8-4.7 33.3 0 66.2 53.8 120 120 120s120-53.8 120-120-53.8-120-120-120zm0-476c28.7 0 52 23.3 52 52s-23.3 52-52 52-52-23.3-52-52 23.3-52 52-52zM312 600c-48.5 0-88-39.5-88-88s39.5-88 88-88 88 39.5 88 88-39.5 88-88 88zm440 236c-28.7 0-52-23.3-52-52s23.3-52 52-52 52 23.3 52 52-23.3 52-52 52z"}}]},name:"share-alt",theme:"outlined"},xXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:_Xn}))},gAt=b.forwardRef(xXn);gAt.displayName="ShareAltOutlined";var wXn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z"}}]},name:"solution",theme:"outlined"},CXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:wXn}))},bAt=b.forwardRef(CXn);bAt.displayName="SolutionOutlined";var SXn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"},NXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:SXn}))},vAt=b.forwardRef(NXn);vAt.displayName="SyncOutlined";var EXn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"},DXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:EXn}))},yAt=b.forwardRef(DXn);yAt.displayName="TeamOutlined";var kXn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zm-40 376H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"unlock",theme:"outlined"},MXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:kXn}))},_At=b.forwardRef(MXn);_At.displayName="UnlockOutlined";var LXn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},TXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:LXn}))},f$e=b.forwardRef(TXn);f$e.displayName="UserOutlined";var IXn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"warning",theme:"filled"},AXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:IXn}))},xAt=b.forwardRef(AXn);xAt.displayName="WarningFilled";var RXn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"}}]},name:"warning",theme:"outlined"},PXn=function(e,n){return b.createElement(Qn,lt({},e,{ref:n,icon:RXn}))},wAt=b.forwardRef(PXn);wAt.displayName="WarningOutlined";const OXn=()=>b.createElement("svg",{width:"252",height:"294"},b.createElement("title",null,"No Found"),b.createElement("defs",null,b.createElement("path",{d:"M0 .387h251.772v251.772H0z"})),b.createElement("g",{fill:"none",fillRule:"evenodd"},b.createElement("g",{transform:"translate(0 .012)"},b.createElement("mask",{fill:"#fff"}),b.createElement("path",{d:"M0 127.32v-2.095C0 56.279 55.892.387 124.838.387h2.096c68.946 0 124.838 55.892 124.838 124.838v2.096c0 68.946-55.892 124.838-124.838 124.838h-2.096C55.892 252.16 0 196.267 0 127.321",fill:"#E4EBF7",mask:"url(#b)"})),b.createElement("path",{d:"M39.755 130.84a8.276 8.276 0 1 1-16.468-1.66 8.276 8.276 0 0 1 16.468 1.66",fill:"#FFF"}),b.createElement("path",{d:"M36.975 134.297l10.482 5.943M48.373 146.508l-12.648 10.788",stroke:"#FFF",strokeWidth:"2"}),b.createElement("path",{d:"M39.875 159.352a5.667 5.667 0 1 1-11.277-1.136 5.667 5.667 0 0 1 11.277 1.136M57.588 143.247a5.708 5.708 0 1 1-11.358-1.145 5.708 5.708 0 0 1 11.358 1.145M99.018 26.875l29.82-.014a4.587 4.587 0 1 0-.003-9.175l-29.82.013a4.587 4.587 0 1 0 .003 9.176M110.424 45.211l29.82-.013a4.588 4.588 0 0 0-.004-9.175l-29.82.013a4.587 4.587 0 1 0 .004 9.175",fill:"#FFF"}),b.createElement("path",{d:"M112.798 26.861v-.002l15.784-.006a4.588 4.588 0 1 0 .003 9.175l-15.783.007v-.002a4.586 4.586 0 0 0-.004-9.172M184.523 135.668c-.553 5.485-5.447 9.483-10.931 8.93-5.485-.553-9.483-5.448-8.93-10.932.552-5.485 5.447-9.483 10.932-8.93 5.485.553 9.483 5.447 8.93 10.932",fill:"#FFF"}),b.createElement("path",{d:"M179.26 141.75l12.64 7.167M193.006 156.477l-15.255 13.011",stroke:"#FFF",strokeWidth:"2"}),b.createElement("path",{d:"M184.668 170.057a6.835 6.835 0 1 1-13.6-1.372 6.835 6.835 0 0 1 13.6 1.372M203.34 153.325a6.885 6.885 0 1 1-13.7-1.382 6.885 6.885 0 0 1 13.7 1.382",fill:"#FFF"}),b.createElement("path",{d:"M151.931 192.324a2.222 2.222 0 1 1-4.444 0 2.222 2.222 0 0 1 4.444 0zM225.27 116.056a2.222 2.222 0 1 1-4.445 0 2.222 2.222 0 0 1 4.444 0zM216.38 151.08a2.223 2.223 0 1 1-4.446-.001 2.223 2.223 0 0 1 4.446 0zM176.917 107.636a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM195.291 92.165a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM202.058 180.711a2.223 2.223 0 1 1-4.446 0 2.223 2.223 0 0 1 4.446 0z",stroke:"#FFF",strokeWidth:"2"}),b.createElement("path",{stroke:"#FFF",strokeWidth:"2",d:"M214.404 153.302l-1.912 20.184-10.928 5.99M173.661 174.792l-6.356 9.814h-11.36l-4.508 6.484M174.941 125.168v-15.804M220.824 117.25l-12.84 7.901-15.31-7.902V94.39"}),b.createElement("path",{d:"M166.588 65.936h-3.951a4.756 4.756 0 0 1-4.743-4.742 4.756 4.756 0 0 1 4.743-4.743h3.951a4.756 4.756 0 0 1 4.743 4.743 4.756 4.756 0 0 1-4.743 4.742",fill:"#FFF"}),b.createElement("path",{d:"M174.823 30.03c0-16.281 13.198-29.48 29.48-29.48 16.28 0 29.48 13.199 29.48 29.48 0 16.28-13.2 29.48-29.48 29.48-16.282 0-29.48-13.2-29.48-29.48",fill:"#1677ff"}),b.createElement("path",{d:"M205.952 38.387c.5.5.785 1.142.785 1.928s-.286 1.465-.785 1.964c-.572.5-1.214.75-2 .75-.785 0-1.429-.285-1.929-.785-.572-.5-.82-1.143-.82-1.929s.248-1.428.82-1.928c.5-.5 1.144-.75 1.93-.75.785 0 1.462.25 1.999.75m4.285-19.463c1.428 1.249 2.143 2.963 2.143 5.142 0 1.712-.427 3.13-1.219 4.25-.067.096-.137.18-.218.265-.416.429-1.41 1.346-2.956 2.699a5.07 5.07 0 0 0-1.428 1.75 5.207 5.207 0 0 0-.536 2.357v.5h-4.107v-.5c0-1.357.215-2.536.714-3.5.464-.964 1.857-2.464 4.178-4.536l.43-.5c.643-.785.964-1.643.964-2.535 0-1.18-.358-2.108-1-2.785-.678-.68-1.643-1.001-2.858-1.001-1.536 0-2.642.464-3.357 1.43-.37.5-.621 1.135-.76 1.904a1.999 1.999 0 0 1-1.971 1.63h-.004c-1.277 0-2.257-1.183-1.98-2.43.337-1.518 1.02-2.78 2.073-3.784 1.536-1.5 3.607-2.25 6.25-2.25 2.32 0 4.214.607 5.642 1.894",fill:"#FFF"}),b.createElement("path",{d:"M52.04 76.131s21.81 5.36 27.307 15.945c5.575 10.74-6.352 9.26-15.73 4.935-10.86-5.008-24.7-11.822-11.577-20.88",fill:"#FFB594"}),b.createElement("path",{d:"M90.483 67.504l-.449 2.893c-.753.49-4.748-2.663-4.748-2.663l-1.645.748-1.346-5.684s6.815-4.589 8.917-5.018c2.452-.501 9.884.94 10.7 2.278 0 0 1.32.486-2.227.69-3.548.203-5.043.447-6.79 3.132-1.747 2.686-2.412 3.624-2.412 3.624",fill:"#FFC6A0"}),b.createElement("path",{d:"M128.055 111.367c-2.627-7.724-6.15-13.18-8.917-15.478-3.5-2.906-9.34-2.225-11.366-4.187-1.27-1.231-3.215-1.197-3.215-1.197s-14.98-3.158-16.828-3.479c-2.37-.41-2.124-.714-6.054-1.405-1.57-1.907-2.917-1.122-2.917-1.122l-7.11-1.383c-.853-1.472-2.423-1.023-2.423-1.023l-2.468-.897c-1.645 9.976-7.74 13.796-7.74 13.796 1.795 1.122 15.703 8.3 15.703 8.3l5.107 37.11s-3.321 5.694 1.346 9.109c0 0 19.883-3.743 34.921-.329 0 0 3.047-2.546.972-8.806.523-3.01 1.394-8.263 1.736-11.622.385.772 2.019 1.918 3.14 3.477 0 0 9.407-7.365 11.052-14.012-.832-.723-1.598-1.585-2.267-2.453-.567-.736-.358-2.056-.765-2.717-.669-1.084-1.804-1.378-1.907-1.682",fill:"#FFF"}),b.createElement("path",{d:"M101.09 289.998s4.295 2.041 7.354 1.021c2.821-.94 4.53.668 7.08 1.178 2.55.51 6.874 1.1 11.686-1.26-.103-5.51-6.889-3.98-11.96-6.713-2.563-1.38-3.784-4.722-3.598-8.799h-9.402s-1.392 10.52-1.16 14.573",fill:"#CBD1D1"}),b.createElement("path",{d:"M101.067 289.826s2.428 1.271 6.759.653c3.058-.437 3.712.481 7.423 1.031 3.712.55 10.724-.069 11.823-.894.413 1.1-.343 2.063-.343 2.063s-1.512.603-4.812.824c-2.03.136-5.8.291-7.607-.503-1.787-1.375-5.247-1.903-5.728-.241-3.918.95-7.355-.286-7.355-.286l-.16-2.647z",fill:"#2B0849"}),b.createElement("path",{d:"M108.341 276.044h3.094s-.103 6.702 4.536 8.558c-4.64.618-8.558-2.303-7.63-8.558",fill:"#A4AABA"}),b.createElement("path",{d:"M57.542 272.401s-2.107 7.416-4.485 12.306c-1.798 3.695-4.225 7.492 5.465 7.492 6.648 0 8.953-.48 7.423-6.599-1.53-6.12.266-13.199.266-13.199h-8.669z",fill:"#CBD1D1"}),b.createElement("path",{d:"M51.476 289.793s2.097 1.169 6.633 1.169c6.083 0 8.249-1.65 8.249-1.65s.602 1.114-.619 2.165c-.993.855-3.597 1.591-7.39 1.546-4.145-.048-5.832-.566-6.736-1.168-.825-.55-.687-1.58-.137-2.062",fill:"#2B0849"}),b.createElement("path",{d:"M58.419 274.304s.033 1.519-.314 2.93c-.349 1.42-1.078 3.104-1.13 4.139-.058 1.151 4.537 1.58 5.155.034.62-1.547 1.294-6.427 1.913-7.252.619-.825-4.903-2.119-5.624.15",fill:"#A4AABA"}),b.createElement("path",{d:"M99.66 278.514l13.378.092s1.298-54.52 1.853-64.403c.554-9.882 3.776-43.364 1.002-63.128l-12.547-.644-22.849.78s-.434 3.966-1.195 9.976c-.063.496-.682.843-.749 1.365-.075.585.423 1.354.32 1.966-2.364 14.08-6.377 33.104-8.744 46.677-.116.666-1.234 1.009-1.458 2.691-.04.302.211 1.525.112 1.795-6.873 18.744-10.949 47.842-14.277 61.885l14.607-.014s2.197-8.57 4.03-16.97c2.811-12.886 23.111-85.01 23.111-85.01l3.016-.521 1.043 46.35s-.224 1.234.337 2.02c.56.785-.56 1.123-.392 2.244l.392 1.794s-.449 7.178-.898 11.89c-.448 4.71-.092 39.165-.092 39.165",fill:"#7BB2F9"}),b.createElement("path",{d:"M76.085 221.626c1.153.094 4.038-2.019 6.955-4.935M106.36 225.142s2.774-1.11 6.103-3.883",stroke:"#648BD8",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M107.275 222.1s2.773-1.11 6.102-3.884",stroke:"#648BD8",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M74.74 224.767s2.622-.591 6.505-3.365M86.03 151.634c-.27 3.106.3 8.525-4.336 9.123M103.625 149.88s.11 14.012-1.293 15.065c-2.219 1.664-2.99 1.944-2.99 1.944M99.79 150.438s.035 12.88-1.196 24.377M93.673 175.911s7.212-1.664 9.431-1.664M74.31 205.861a212.013 212.013 0 0 1-.979 4.56s-1.458 1.832-1.009 3.776c.449 1.944-.947 2.045-4.985 15.355-1.696 5.59-4.49 18.591-6.348 27.597l-.231 1.12M75.689 197.807a320.934 320.934 0 0 1-.882 4.754M82.591 152.233L81.395 162.7s-1.097.15-.5 2.244c.113 1.346-2.674 15.775-5.18 30.43M56.12 274.418h13.31",stroke:"#648BD8",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M116.241 148.22s-17.047-3.104-35.893.2c.158 2.514-.003 4.15-.003 4.15s14.687-2.818 35.67-.312c.252-2.355.226-4.038.226-4.038",fill:"#192064"}),b.createElement("path",{d:"M106.322 151.165l.003-4.911a.81.81 0 0 0-.778-.815c-2.44-.091-5.066-.108-7.836-.014a.818.818 0 0 0-.789.815l-.003 4.906a.81.81 0 0 0 .831.813c2.385-.06 4.973-.064 7.73.017a.815.815 0 0 0 .842-.81",fill:"#FFF"}),b.createElement("path",{d:"M105.207 150.233l.002-3.076a.642.642 0 0 0-.619-.646 94.321 94.321 0 0 0-5.866-.01.65.65 0 0 0-.63.647v3.072a.64.64 0 0 0 .654.644 121.12 121.12 0 0 1 5.794.011c.362.01.665-.28.665-.642",fill:"#192064"}),b.createElement("path",{d:"M100.263 275.415h12.338M101.436 270.53c.006 3.387.042 5.79.111 6.506M101.451 264.548a915.75 915.75 0 0 0-.015 4.337M100.986 174.965l.898 44.642s.673 1.57-.225 2.692c-.897 1.122 2.468.673.898 2.243-1.57 1.57.897 1.122 0 3.365-.596 1.489-.994 21.1-1.096 35.146",stroke:"#648BD8",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M46.876 83.427s-.516 6.045 7.223 5.552c11.2-.712 9.218-9.345 31.54-21.655-.786-2.708-2.447-4.744-2.447-4.744s-11.068 3.11-22.584 8.046c-6.766 2.9-13.395 6.352-13.732 12.801M104.46 91.057l.941-5.372-8.884-11.43-5.037 5.372-1.74 7.834a.321.321 0 0 0 .108.32c.965.8 6.5 5.013 14.347 3.544a.332.332 0 0 0 .264-.268",fill:"#FFC6A0"}),b.createElement("path",{d:"M93.942 79.387s-4.533-2.853-2.432-6.855c1.623-3.09 4.513 1.133 4.513 1.133s.52-3.642 3.121-3.642c.52-1.04 1.561-4.162 1.561-4.162s11.445 2.601 13.526 3.121c0 5.203-2.304 19.424-7.84 19.861-8.892.703-12.449-9.456-12.449-9.456",fill:"#FFC6A0"}),b.createElement("path",{d:"M113.874 73.446c2.601-2.081 3.47-9.722 3.47-9.722s-2.479-.49-6.64-2.05c-4.683-2.081-12.798-4.747-17.48.976-9.668 3.223-2.05 19.823-2.05 19.823l2.713-3.021s-3.935-3.287-2.08-6.243c2.17-3.462 3.92 1.073 3.92 1.073s.637-2.387 3.581-3.342c.355-.71 1.036-2.674 1.432-3.85a1.073 1.073 0 0 1 1.263-.704c2.4.558 8.677 2.019 11.356 2.662.522.125.871.615.82 1.15l-.305 3.248z",fill:"#520038"}),b.createElement("path",{d:"M104.977 76.064c-.103.61-.582 1.038-1.07.956-.489-.083-.801-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.644.698 1.254M112.132 77.694c-.103.61-.582 1.038-1.07.956-.488-.083-.8-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.643.698 1.254",fill:"#552950"}),b.createElement("path",{stroke:"#DB836E",strokeWidth:"1.118",strokeLinecap:"round",strokeLinejoin:"round",d:"M110.13 74.84l-.896 1.61-.298 4.357h-2.228"}),b.createElement("path",{d:"M110.846 74.481s1.79-.716 2.506.537",stroke:"#5C2552",strokeWidth:"1.118",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M92.386 74.282s.477-1.114 1.113-.716c.637.398 1.274 1.433.558 1.99-.717.556.159 1.67.159 1.67",stroke:"#DB836E",strokeWidth:"1.118",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M103.287 72.93s1.83 1.113 4.137.954",stroke:"#5C2552",strokeWidth:"1.118",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M103.685 81.762s2.227 1.193 4.376 1.193M104.64 84.308s.954.398 1.511.318M94.693 81.205s2.308 7.4 10.424 7.639",stroke:"#DB836E",strokeWidth:"1.118",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M81.45 89.384s.45 5.647-4.935 12.787M69 82.654s-.726 9.282-8.204 14.206",stroke:"#E4EBF7",strokeWidth:"1.101",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M129.405 122.865s-5.272 7.403-9.422 10.768",stroke:"#E4EBF7",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M119.306 107.329s.452 4.366-2.127 32.062",stroke:"#E4EBF7",strokeWidth:"1.101",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M150.028 151.232h-49.837a1.01 1.01 0 0 1-1.01-1.01v-31.688c0-.557.452-1.01 1.01-1.01h49.837c.558 0 1.01.453 1.01 1.01v31.688a1.01 1.01 0 0 1-1.01 1.01",fill:"#F2D7AD"}),b.createElement("path",{d:"M150.29 151.232h-19.863v-33.707h20.784v32.786a.92.92 0 0 1-.92.92",fill:"#F4D19D"}),b.createElement("path",{d:"M123.554 127.896H92.917a.518.518 0 0 1-.425-.816l6.38-9.113c.193-.277.51-.442.85-.442h31.092l-7.26 10.371z",fill:"#F2D7AD"}),b.createElement("path",{fill:"#CC9B6E",d:"M123.689 128.447H99.25v-.519h24.169l7.183-10.26.424.298z"}),b.createElement("path",{d:"M158.298 127.896h-18.669a2.073 2.073 0 0 1-1.659-.83l-7.156-9.541h19.965c.49 0 .95.23 1.244.622l6.69 8.92a.519.519 0 0 1-.415.83",fill:"#F4D19D"}),b.createElement("path",{fill:"#CC9B6E",d:"M157.847 128.479h-19.384l-7.857-10.475.415-.31 7.7 10.266h19.126zM130.554 150.685l-.032-8.177.519-.002.032 8.177z"}),b.createElement("path",{fill:"#CC9B6E",d:"M130.511 139.783l-.08-21.414.519-.002.08 21.414zM111.876 140.932l-.498-.143 1.479-5.167.498.143zM108.437 141.06l-2.679-2.935 2.665-3.434.41.318-2.397 3.089 2.384 2.612zM116.607 141.06l-.383-.35 2.383-2.612-2.397-3.089.41-.318 2.665 3.434z"}),b.createElement("path",{d:"M154.316 131.892l-3.114-1.96.038 3.514-1.043.092c-1.682.115-3.634.23-4.789.23-1.902 0-2.693 2.258 2.23 2.648l-2.645-.596s-2.168 1.317.504 2.3c0 0-1.58 1.217.561 2.58-.584 3.504 5.247 4.058 7.122 3.59 1.876-.47 4.233-2.359 4.487-5.16.28-3.085-.89-5.432-3.35-7.238",fill:"#FFC6A0"}),b.createElement("path",{d:"M153.686 133.577s-6.522.47-8.36.372c-1.836-.098-1.904 2.19 2.359 2.264 3.739.15 5.451-.044 5.451-.044",stroke:"#DB836E",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M145.16 135.877c-1.85 1.346.561 2.355.561 2.355s3.478.898 6.73.617",stroke:"#DB836E",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M151.89 141.71s-6.28.111-6.73-2.132c-.223-1.346.45-1.402.45-1.402M146.114 140.868s-1.103 3.16 5.44 3.533M151.202 129.932v3.477M52.838 89.286c3.533-.337 8.423-1.248 13.582-7.754",stroke:"#DB836E",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M168.567 248.318a6.647 6.647 0 0 1-6.647-6.647v-66.466a6.647 6.647 0 1 1 13.294 0v66.466a6.647 6.647 0 0 1-6.647 6.647",fill:"#5BA02E"}),b.createElement("path",{d:"M176.543 247.653a6.647 6.647 0 0 1-6.646-6.647v-33.232a6.647 6.647 0 1 1 13.293 0v33.232a6.647 6.647 0 0 1-6.647 6.647",fill:"#92C110"}),b.createElement("path",{d:"M186.443 293.613H158.92a3.187 3.187 0 0 1-3.187-3.187v-46.134a3.187 3.187 0 0 1 3.187-3.187h27.524a3.187 3.187 0 0 1 3.187 3.187v46.134a3.187 3.187 0 0 1-3.187 3.187",fill:"#F2D7AD"}),b.createElement("path",{d:"M88.979 89.48s7.776 5.384 16.6 2.842",stroke:"#E4EBF7",strokeWidth:"1.101",strokeLinecap:"round",strokeLinejoin:"round"}))),jXn=()=>b.createElement("svg",{width:"254",height:"294"},b.createElement("title",null,"Server Error"),b.createElement("defs",null,b.createElement("path",{d:"M0 .335h253.49v253.49H0z"}),b.createElement("path",{d:"M0 293.665h253.49V.401H0z"})),b.createElement("g",{fill:"none",fillRule:"evenodd"},b.createElement("g",{transform:"translate(0 .067)"},b.createElement("mask",{fill:"#fff"}),b.createElement("path",{d:"M0 128.134v-2.11C0 56.608 56.273.334 125.69.334h2.11c69.416 0 125.69 56.274 125.69 125.69v2.11c0 69.417-56.274 125.69-125.69 125.69h-2.11C56.273 253.824 0 197.551 0 128.134",fill:"#E4EBF7",mask:"url(#b)"})),b.createElement("path",{d:"M39.989 132.108a8.332 8.332 0 1 1-16.581-1.671 8.332 8.332 0 0 1 16.58 1.671",fill:"#FFF"}),b.createElement("path",{d:"M37.19 135.59l10.553 5.983M48.665 147.884l-12.734 10.861",stroke:"#FFF",strokeWidth:"2"}),b.createElement("path",{d:"M40.11 160.816a5.706 5.706 0 1 1-11.354-1.145 5.706 5.706 0 0 1 11.354 1.145M57.943 144.6a5.747 5.747 0 1 1-11.436-1.152 5.747 5.747 0 0 1 11.436 1.153M99.656 27.434l30.024-.013a4.619 4.619 0 1 0-.004-9.238l-30.024.013a4.62 4.62 0 0 0 .004 9.238M111.14 45.896l30.023-.013a4.62 4.62 0 1 0-.004-9.238l-30.024.013a4.619 4.619 0 1 0 .004 9.238",fill:"#FFF"}),b.createElement("path",{d:"M113.53 27.421v-.002l15.89-.007a4.619 4.619 0 1 0 .005 9.238l-15.892.007v-.002a4.618 4.618 0 0 0-.004-9.234M150.167 70.091h-3.979a4.789 4.789 0 0 1-4.774-4.775 4.788 4.788 0 0 1 4.774-4.774h3.979a4.789 4.789 0 0 1 4.775 4.774 4.789 4.789 0 0 1-4.775 4.775",fill:"#FFF"}),b.createElement("path",{d:"M171.687 30.234c0-16.392 13.289-29.68 29.681-29.68 16.392 0 29.68 13.288 29.68 29.68 0 16.393-13.288 29.681-29.68 29.681s-29.68-13.288-29.68-29.68",fill:"#FF603B"}),b.createElement("path",{d:"M203.557 19.435l-.676 15.035a1.514 1.514 0 0 1-3.026 0l-.675-15.035a2.19 2.19 0 1 1 4.377 0m-.264 19.378c.513.477.77 1.1.77 1.87s-.257 1.393-.77 1.907c-.55.476-1.21.733-1.943.733a2.545 2.545 0 0 1-1.87-.77c-.55-.514-.806-1.136-.806-1.87 0-.77.256-1.393.806-1.87.513-.513 1.137-.733 1.87-.733.77 0 1.43.22 1.943.733",fill:"#FFF"}),b.createElement("path",{d:"M119.3 133.275c4.426-.598 3.612-1.204 4.079-4.778.675-5.18-3.108-16.935-8.262-25.118-1.088-10.72-12.598-11.24-12.598-11.24s4.312 4.895 4.196 16.199c1.398 5.243.804 14.45.804 14.45s5.255 11.369 11.78 10.487",fill:"#FFB594"}),b.createElement("path",{d:"M100.944 91.61s1.463-.583 3.211.582c8.08 1.398 10.368 6.706 11.3 11.368 1.864 1.282 1.864 2.33 1.864 3.496.365.777 1.515 3.03 1.515 3.03s-7.225 1.748-10.954 6.758c-1.399-6.41-6.936-25.235-6.936-25.235",fill:"#FFF"}),b.createElement("path",{d:"M94.008 90.5l1.019-5.815-9.23-11.874-5.233 5.581-2.593 9.863s8.39 5.128 16.037 2.246",fill:"#FFB594"}),b.createElement("path",{d:"M82.931 78.216s-4.557-2.868-2.445-6.892c1.632-3.107 4.537 1.139 4.537 1.139s.524-3.662 3.139-3.662c.523-1.046 1.569-4.184 1.569-4.184s11.507 2.615 13.6 3.138c-.001 5.23-2.317 19.529-7.884 19.969-8.94.706-12.516-9.508-12.516-9.508",fill:"#FFC6A0"}),b.createElement("path",{d:"M102.971 72.243c2.616-2.093 3.489-9.775 3.489-9.775s-2.492-.492-6.676-2.062c-4.708-2.092-12.867-4.771-17.575.982-9.54 4.41-2.062 19.93-2.062 19.93l2.729-3.037s-3.956-3.304-2.092-6.277c2.183-3.48 3.943 1.08 3.943 1.08s.64-2.4 3.6-3.36c.356-.714 1.04-2.69 1.44-3.872a1.08 1.08 0 0 1 1.27-.707c2.41.56 8.723 2.03 11.417 2.676.524.126.876.619.825 1.156l-.308 3.266z",fill:"#520038"}),b.createElement("path",{d:"M101.22 76.514c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.961.491.083.805.647.702 1.26M94.26 75.074c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.96.491.082.805.646.702 1.26",fill:"#552950"}),b.createElement("path",{stroke:"#DB836E",strokeWidth:"1.063",strokeLinecap:"round",strokeLinejoin:"round",d:"M99.206 73.644l-.9 1.62-.3 4.38h-2.24"}),b.createElement("path",{d:"M99.926 73.284s1.8-.72 2.52.54",stroke:"#5C2552",strokeWidth:"1.117",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M81.367 73.084s.48-1.12 1.12-.72c.64.4 1.28 1.44.56 2s.16 1.68.16 1.68",stroke:"#DB836E",strokeWidth:"1.117",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M92.326 71.724s1.84 1.12 4.16.96",stroke:"#5C2552",strokeWidth:"1.117",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M92.726 80.604s2.24 1.2 4.4 1.2M93.686 83.164s.96.4 1.52.32M83.687 80.044s1.786 6.547 9.262 7.954",stroke:"#DB836E",strokeWidth:"1.063",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M95.548 91.663s-1.068 2.821-8.298 2.105c-7.23-.717-10.29-5.044-10.29-5.044",stroke:"#E4EBF7",strokeWidth:"1.136",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M78.126 87.478s6.526 4.972 16.47 2.486c0 0 9.577 1.02 11.536 5.322 5.36 11.77.543 36.835 0 39.962 3.496 4.055-.466 8.483-.466 8.483-15.624-3.548-35.81-.6-35.81-.6-4.849-3.546-1.223-9.044-1.223-9.044L62.38 110.32c-2.485-15.227.833-19.803 3.549-20.743 3.03-1.049 8.04-1.282 8.04-1.282.496-.058 1.08-.076 1.37-.233 2.36-1.282 2.787-.583 2.787-.583",fill:"#FFF"}),b.createElement("path",{d:"M65.828 89.81s-6.875.465-7.59 8.156c-.466 8.857 3.03 10.954 3.03 10.954s6.075 22.102 16.796 22.957c8.39-2.176 4.758-6.702 4.661-11.42-.233-11.304-7.108-16.897-7.108-16.897s-4.212-13.75-9.789-13.75",fill:"#FFC6A0"}),b.createElement("path",{d:"M71.716 124.225s.855 11.264 9.828 6.486c4.765-2.536 7.581-13.828 9.789-22.568 1.456-5.768 2.58-12.197 2.58-12.197l-4.973-1.709s-2.408 5.516-7.769 12.275c-4.335 5.467-9.144 11.11-9.455 17.713",fill:"#FFC6A0"}),b.createElement("path",{d:"M108.463 105.191s1.747 2.724-2.331 30.535c2.376 2.216 1.053 6.012-.233 7.51",stroke:"#E4EBF7",strokeWidth:"1.085",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M123.262 131.527s-.427 2.732-11.77 1.981c-15.187-1.006-25.326-3.25-25.326-3.25l.933-5.8s.723.215 9.71-.068c11.887-.373 18.714-6.07 24.964-1.022 4.039 3.263 1.489 8.16 1.489 8.16",fill:"#FFC6A0"}),b.createElement("path",{d:"M70.24 90.974s-5.593-4.739-11.054 2.68c-3.318 7.223.517 15.284 2.664 19.578-.31 3.729 2.33 4.311 2.33 4.311s.108.895 1.516 2.68c4.078-7.03 6.72-9.166 13.711-12.546-.328-.656-1.877-3.265-1.825-3.767.175-1.69-1.282-2.623-1.282-2.623s-.286-.156-1.165-2.738c-.788-2.313-2.036-5.177-4.895-7.575",fill:"#FFF"}),b.createElement("path",{d:"M90.232 288.027s4.855 2.308 8.313 1.155c3.188-1.063 5.12.755 8.002 1.331 2.881.577 7.769 1.243 13.207-1.424-.117-6.228-7.786-4.499-13.518-7.588-2.895-1.56-4.276-5.336-4.066-9.944H91.544s-1.573 11.89-1.312 16.47",fill:"#CBD1D1"}),b.createElement("path",{d:"M90.207 287.833s2.745 1.437 7.639.738c3.456-.494 3.223.66 7.418 1.282 4.195.621 13.092-.194 14.334-1.126.466 1.242-.388 2.33-.388 2.33s-1.709.682-5.438.932c-2.295.154-8.098.276-10.14-.621-2.02-1.554-4.894-1.515-6.06-.234-4.427 1.075-7.184-.31-7.184-.31l-.181-2.991z",fill:"#2B0849"}),b.createElement("path",{d:"M98.429 272.257h3.496s-.117 7.574 5.127 9.671c-5.244.7-9.672-2.602-8.623-9.671",fill:"#A4AABA"}),b.createElement("path",{d:"M44.425 272.046s-2.208 7.774-4.702 12.899c-1.884 3.874-4.428 7.854 5.729 7.854 6.97 0 9.385-.503 7.782-6.917-1.604-6.415.279-13.836.279-13.836h-9.088z",fill:"#CBD1D1"}),b.createElement("path",{d:"M38.066 290.277s2.198 1.225 6.954 1.225c6.376 0 8.646-1.73 8.646-1.73s.63 1.168-.649 2.27c-1.04.897-3.77 1.668-7.745 1.621-4.347-.05-6.115-.593-7.062-1.224-.864-.577-.72-1.657-.144-2.162",fill:"#2B0849"}),b.createElement("path",{d:"M45.344 274.041s.035 1.592-.329 3.07c-.365 1.49-1.13 3.255-1.184 4.34-.061 1.206 4.755 1.657 5.403.036.65-1.622 1.357-6.737 2.006-7.602.648-.865-5.14-2.222-5.896.156",fill:"#A4AABA"}),b.createElement("path",{d:"M89.476 277.57l13.899.095s1.349-56.643 1.925-66.909c.576-10.267 3.923-45.052 1.042-65.585l-13.037-.669-23.737.81s-.452 4.12-1.243 10.365c-.065.515-.708.874-.777 1.417-.078.608.439 1.407.332 2.044-2.455 14.627-5.797 32.736-8.256 46.837-.121.693-1.282 1.048-1.515 2.796-.042.314.22 1.584.116 1.865-7.14 19.473-12.202 52.601-15.66 67.19l15.176-.015s2.282-10.145 4.185-18.871c2.922-13.389 24.012-88.32 24.012-88.32l3.133-.954-.158 48.568s-.233 1.282.35 2.098c.583.815-.581 1.167-.408 2.331l.408 1.864s-.466 7.458-.932 12.352c-.467 4.895 1.145 40.69 1.145 40.69",fill:"#7BB2F9"}),b.createElement("path",{d:"M64.57 218.881c1.197.099 4.195-2.097 7.225-5.127M96.024 222.534s2.881-1.152 6.34-4.034",stroke:"#648BD8",strokeWidth:"1.085",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M96.973 219.373s2.882-1.153 6.34-4.034",stroke:"#648BD8",strokeWidth:"1.032",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M63.172 222.144s2.724-.614 6.759-3.496M74.903 146.166c-.281 3.226.31 8.856-4.506 9.478M93.182 144.344s.115 14.557-1.344 15.65c-2.305 1.73-3.107 2.02-3.107 2.02M89.197 144.923s.269 13.144-1.01 25.088M83.525 170.71s6.81-1.051 9.116-1.051M46.026 270.045l-.892 4.538M46.937 263.289l-.815 4.157M62.725 202.503c-.33 1.618-.102 1.904-.449 3.438 0 0-2.756 1.903-2.29 3.923.466 2.02-.31 3.424-4.505 17.252-1.762 5.807-4.233 18.922-6.165 28.278-.03.144-.521 2.646-1.14 5.8M64.158 194.136c-.295 1.658-.6 3.31-.917 4.938M71.33 146.787l-1.244 10.877s-1.14.155-.519 2.33c.117 1.399-2.778 16.39-5.382 31.615M44.242 273.727H58.07",stroke:"#648BD8",strokeWidth:"1.085",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M106.18 142.117c-3.028-.489-18.825-2.744-36.219.2a.625.625 0 0 0-.518.644c.063 1.307.044 2.343.015 2.995a.617.617 0 0 0 .716.636c3.303-.534 17.037-2.412 35.664-.266.347.04.66-.214.692-.56.124-1.347.16-2.425.17-3.029a.616.616 0 0 0-.52-.62",fill:"#192064"}),b.createElement("path",{d:"M96.398 145.264l.003-5.102a.843.843 0 0 0-.809-.847 114.104 114.104 0 0 0-8.141-.014.85.85 0 0 0-.82.847l-.003 5.097c0 .476.388.857.864.845 2.478-.064 5.166-.067 8.03.017a.848.848 0 0 0 .876-.843",fill:"#FFF"}),b.createElement("path",{d:"M95.239 144.296l.002-3.195a.667.667 0 0 0-.643-.672c-1.9-.061-3.941-.073-6.094-.01a.675.675 0 0 0-.654.672l-.002 3.192c0 .376.305.677.68.669 1.859-.042 3.874-.043 6.02.012.376.01.69-.291.691-.668",fill:"#192064"}),b.createElement("path",{d:"M90.102 273.522h12.819M91.216 269.761c.006 3.519-.072 5.55 0 6.292M90.923 263.474c-.009 1.599-.016 2.558-.016 4.505M90.44 170.404l.932 46.38s.7 1.631-.233 2.796c-.932 1.166 2.564.7.932 2.33-1.63 1.633.933 1.166 0 3.497-.618 1.546-1.031 21.921-1.138 36.513",stroke:"#648BD8",strokeWidth:"1.085",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M73.736 98.665l2.214 4.312s2.098.816 1.865 2.68l.816 2.214M64.297 116.611c.233-.932 2.176-7.147 12.585-10.488M77.598 90.042s7.691 6.137 16.547 2.72",stroke:"#E4EBF7",strokeWidth:"1.085",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M91.974 86.954s5.476-.816 7.574-4.545c1.297-.345.72 2.212-.33 3.671-.7.971-1.01 1.554-1.01 1.554s.194.31.155.816c-.053.697-.175.653-.272 1.048-.081.335.108.657 0 1.049-.046.17-.198.5-.382.878-.12.249-.072.687-.2.948-.231.469-1.562 1.87-2.622 2.855-3.826 3.554-5.018 1.644-6.001-.408-.894-1.865-.661-5.127-.874-6.875-.35-2.914-2.622-3.03-1.923-4.429.343-.685 2.87.69 3.263 1.748.757 2.04 2.952 1.807 2.622 1.69",fill:"#FFC6A0"}),b.createElement("path",{d:"M99.8 82.429c-.465.077-.35.272-.97 1.243-.622.971-4.817 2.932-6.39 3.224-2.589.48-2.278-1.56-4.254-2.855-1.69-1.107-3.562-.638-1.398 1.398.99.932.932 1.107 1.398 3.205.335 1.506-.64 3.67.7 5.593",stroke:"#DB836E",strokeWidth:".774",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M79.543 108.673c-2.1 2.926-4.266 6.175-5.557 8.762",stroke:"#E59788",strokeWidth:".774",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M87.72 124.768s-2.098-1.942-5.127-2.719c-3.03-.777-3.574-.155-5.516.078-1.942.233-3.885-.932-3.652.7.233 1.63 5.05 1.01 5.206 2.097.155 1.087-6.37 2.796-8.313 2.175-.777.777.466 1.864 2.02 2.175.233 1.554 2.253 1.554 2.253 1.554s.699 1.01 2.641 1.088c2.486 1.32 8.934-.7 10.954-1.554 2.02-.855-.466-5.594-.466-5.594",fill:"#FFC6A0"}),b.createElement("path",{d:"M73.425 122.826s.66 1.127 3.167 1.418c2.315.27 2.563.583 2.563.583s-2.545 2.894-9.07 2.272M72.416 129.274s3.826.097 4.933-.718M74.98 130.75s1.961.136 3.36-.505M77.232 131.916s1.748.019 2.914-.505M73.328 122.321s-.595-1.032 1.262-.427c1.671.544 2.833.055 5.128.155 1.389.061 3.067-.297 3.982.15 1.606.784 3.632 2.181 3.632 2.181s10.526 1.204 19.033-1.127M78.864 108.104s-8.39 2.758-13.168 12.12",stroke:"#E59788",strokeWidth:".774",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M109.278 112.533s3.38-3.613 7.575-4.662",stroke:"#E4EBF7",strokeWidth:"1.085",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M107.375 123.006s9.697-2.745 11.445-.88",stroke:"#E59788",strokeWidth:".774",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M194.605 83.656l3.971-3.886M187.166 90.933l3.736-3.655M191.752 84.207l-4.462-4.56M198.453 91.057l-4.133-4.225M129.256 163.074l3.718-3.718M122.291 170.039l3.498-3.498M126.561 163.626l-4.27-4.27M132.975 170.039l-3.955-3.955",stroke:"#BFCDDD",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M190.156 211.779h-1.604a4.023 4.023 0 0 1-4.011-4.011V175.68a4.023 4.023 0 0 1 4.01-4.01h1.605a4.023 4.023 0 0 1 4.011 4.01v32.088a4.023 4.023 0 0 1-4.01 4.01",fill:"#A3B4C6"}),b.createElement("path",{d:"M237.824 212.977a4.813 4.813 0 0 1-4.813 4.813h-86.636a4.813 4.813 0 0 1 0-9.626h86.636a4.813 4.813 0 0 1 4.813 4.813",fill:"#A3B4C6"}),b.createElement("mask",{fill:"#fff"}),b.createElement("path",{fill:"#A3B4C6",mask:"url(#d)",d:"M154.098 190.096h70.513v-84.617h-70.513z"}),b.createElement("path",{d:"M224.928 190.096H153.78a3.219 3.219 0 0 1-3.208-3.209V167.92a3.219 3.219 0 0 1 3.208-3.21h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.219 3.219 0 0 1-3.21 3.209M224.928 130.832H153.78a3.218 3.218 0 0 1-3.208-3.208v-18.968a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.218 3.218 0 0 1-3.21 3.208",fill:"#BFCDDD",mask:"url(#d)"}),b.createElement("path",{d:"M159.563 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 120.546h-22.461a.802.802 0 0 1-.802-.802v-3.208c0-.443.359-.803.802-.803h22.46c.444 0 .803.36.803.803v3.208c0 .443-.36.802-.802.802",fill:"#FFF",mask:"url(#d)"}),b.createElement("path",{d:"M224.928 160.464H153.78a3.218 3.218 0 0 1-3.208-3.209v-18.967a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.209v18.967a3.218 3.218 0 0 1-3.21 3.209",fill:"#BFCDDD",mask:"url(#d)"}),b.createElement("path",{d:"M173.455 130.832h49.301M164.984 130.832h6.089M155.952 130.832h6.75M173.837 160.613h49.3M165.365 160.613h6.089M155.57 160.613h6.751",stroke:"#7C90A5",strokeWidth:"1.124",strokeLinecap:"round",strokeLinejoin:"round",mask:"url(#d)"}),b.createElement("path",{d:"M159.563 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M166.98 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M174.397 151.038a2.407 2.407 0 1 1 .001-4.814 2.407 2.407 0 0 1 0 4.814M222.539 151.038h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802M159.563 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 179.987h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802",fill:"#FFF",mask:"url(#d)"}),b.createElement("path",{d:"M203.04 221.108h-27.372a2.413 2.413 0 0 1-2.406-2.407v-11.448a2.414 2.414 0 0 1 2.406-2.407h27.372a2.414 2.414 0 0 1 2.407 2.407V218.7a2.413 2.413 0 0 1-2.407 2.407",fill:"#BFCDDD",mask:"url(#d)"}),b.createElement("path",{d:"M177.259 207.217v11.52M201.05 207.217v11.52",stroke:"#A3B4C6",strokeWidth:"1.124",strokeLinecap:"round",strokeLinejoin:"round",mask:"url(#d)"}),b.createElement("path",{d:"M162.873 267.894a9.422 9.422 0 0 1-9.422-9.422v-14.82a9.423 9.423 0 0 1 18.845 0v14.82a9.423 9.423 0 0 1-9.423 9.422",fill:"#5BA02E",mask:"url(#d)"}),b.createElement("path",{d:"M171.22 267.83a9.422 9.422 0 0 1-9.422-9.423v-3.438a9.423 9.423 0 0 1 18.845 0v3.438a9.423 9.423 0 0 1-9.422 9.423",fill:"#92C110",mask:"url(#d)"}),b.createElement("path",{d:"M181.31 293.666h-27.712a3.209 3.209 0 0 1-3.209-3.21V269.79a3.209 3.209 0 0 1 3.209-3.21h27.711a3.209 3.209 0 0 1 3.209 3.21v20.668a3.209 3.209 0 0 1-3.209 3.209",fill:"#F2D7AD",mask:"url(#d)"}))),FXn=t=>{const{componentCls:e,lineHeightHeading3:n,iconCls:i,padding:r,paddingXL:o,paddingXS:s,paddingLG:a,marginXS:l,lineHeight:c}=t;return{[e]:{padding:`${xe(t.calc(a).mul(2).equal())} ${xe(o)}`,"&-rtl":{direction:"rtl"}},[`${e} ${e}-image`]:{width:t.imageWidth,height:t.imageHeight,margin:"auto"},[`${e} ${e}-icon`]:{marginBottom:a,textAlign:"center",[`& > ${i}`]:{fontSize:t.iconFontSize}},[`${e} ${e}-title`]:{color:t.colorTextHeading,fontSize:t.titleFontSize,lineHeight:n,marginBlock:l,textAlign:"center"},[`${e} ${e}-subtitle`]:{color:t.colorTextDescription,fontSize:t.subtitleFontSize,lineHeight:c,textAlign:"center"},[`${e} ${e}-content`]:{marginTop:a,padding:`${xe(a)} ${xe(t.calc(r).mul(2.5).equal())}`,backgroundColor:t.colorFillAlter},[`${e} ${e}-extra`]:{margin:t.extraMargin,textAlign:"center","& > *":{marginInlineEnd:s,"&:last-child":{marginInlineEnd:0}}}}},$Xn=t=>{const{componentCls:e,iconCls:n}=t;return{[`${e}-success ${e}-icon > ${n}`]:{color:t.resultSuccessIconColor},[`${e}-error ${e}-icon > ${n}`]:{color:t.resultErrorIconColor},[`${e}-info ${e}-icon > ${n}`]:{color:t.resultInfoIconColor},[`${e}-warning ${e}-icon > ${n}`]:{color:t.resultWarningIconColor}}},VXn=t=>[FXn(t),$Xn(t)],BXn=t=>VXn(t),zXn=t=>({titleFontSize:t.fontSizeHeading3,subtitleFontSize:t.fontSize,iconFontSize:t.fontSizeHeading3*3,extraMargin:`${t.paddingLG}px 0 0 0`}),HXn=Jr("Result",t=>{const e=t.colorInfo,n=t.colorError,i=t.colorSuccess,r=t.colorWarning,o=mr(t,{resultInfoIconColor:e,resultErrorIconColor:n,resultSuccessIconColor:i,resultWarningIconColor:r,imageWidth:250,imageHeight:295});return[BXn(o)]},zXn),WXn=()=>b.createElement("svg",{width:"251",height:"294"},b.createElement("title",null,"Unauthorized"),b.createElement("g",{fill:"none",fillRule:"evenodd"},b.createElement("path",{d:"M0 129.023v-2.084C0 58.364 55.591 2.774 124.165 2.774h2.085c68.574 0 124.165 55.59 124.165 124.165v2.084c0 68.575-55.59 124.166-124.165 124.166h-2.085C55.591 253.189 0 197.598 0 129.023",fill:"#E4EBF7"}),b.createElement("path",{d:"M41.417 132.92a8.231 8.231 0 1 1-16.38-1.65 8.231 8.231 0 0 1 16.38 1.65",fill:"#FFF"}),b.createElement("path",{d:"M38.652 136.36l10.425 5.91M49.989 148.505l-12.58 10.73",stroke:"#FFF",strokeWidth:"2"}),b.createElement("path",{d:"M41.536 161.28a5.636 5.636 0 1 1-11.216-1.13 5.636 5.636 0 0 1 11.216 1.13M59.154 145.261a5.677 5.677 0 1 1-11.297-1.138 5.677 5.677 0 0 1 11.297 1.138M100.36 29.516l29.66-.013a4.562 4.562 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 0 0 .005 9.126M111.705 47.754l29.659-.013a4.563 4.563 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 1 0 .005 9.126",fill:"#FFF"}),b.createElement("path",{d:"M114.066 29.503V29.5l15.698-.007a4.563 4.563 0 1 0 .004 9.126l-15.698.007v-.002a4.562 4.562 0 0 0-.004-9.122M185.405 137.723c-.55 5.455-5.418 9.432-10.873 8.882-5.456-.55-9.432-5.418-8.882-10.873.55-5.455 5.418-9.432 10.873-8.882 5.455.55 9.432 5.418 8.882 10.873",fill:"#FFF"}),b.createElement("path",{d:"M180.17 143.772l12.572 7.129M193.841 158.42L178.67 171.36",stroke:"#FFF",strokeWidth:"2"}),b.createElement("path",{d:"M185.55 171.926a6.798 6.798 0 1 1-13.528-1.363 6.798 6.798 0 0 1 13.527 1.363M204.12 155.285a6.848 6.848 0 1 1-13.627-1.375 6.848 6.848 0 0 1 13.626 1.375",fill:"#FFF"}),b.createElement("path",{d:"M152.988 194.074a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0zM225.931 118.217a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM217.09 153.051a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.42 0zM177.84 109.842a2.21 2.21 0 1 1-4.422 0 2.21 2.21 0 0 1 4.421 0zM196.114 94.454a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM202.844 182.523a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0z",stroke:"#FFF",strokeWidth:"2"}),b.createElement("path",{stroke:"#FFF",strokeWidth:"2",d:"M215.125 155.262l-1.902 20.075-10.87 5.958M174.601 176.636l-6.322 9.761H156.98l-4.484 6.449M175.874 127.28V111.56M221.51 119.404l-12.77 7.859-15.228-7.86V96.668"}),b.createElement("path",{d:"M180.68 29.32C180.68 13.128 193.806 0 210 0c16.193 0 29.32 13.127 29.32 29.32 0 16.194-13.127 29.322-29.32 29.322-16.193 0-29.32-13.128-29.32-29.321",fill:"#A26EF4"}),b.createElement("path",{d:"M221.45 41.706l-21.563-.125a1.744 1.744 0 0 1-1.734-1.754l.071-12.23a1.744 1.744 0 0 1 1.754-1.734l21.562.125c.964.006 1.74.791 1.735 1.755l-.071 12.229a1.744 1.744 0 0 1-1.754 1.734",fill:"#FFF"}),b.createElement("path",{d:"M215.106 29.192c-.015 2.577-2.049 4.654-4.543 4.64-2.494-.014-4.504-2.115-4.489-4.693l.04-6.925c.016-2.577 2.05-4.654 4.543-4.64 2.494.015 4.504 2.116 4.49 4.693l-.04 6.925zm-4.53-14.074a6.877 6.877 0 0 0-6.916 6.837l-.043 7.368a6.877 6.877 0 0 0 13.754.08l.042-7.368a6.878 6.878 0 0 0-6.837-6.917zM167.566 68.367h-3.93a4.73 4.73 0 0 1-4.717-4.717 4.73 4.73 0 0 1 4.717-4.717h3.93a4.73 4.73 0 0 1 4.717 4.717 4.73 4.73 0 0 1-4.717 4.717",fill:"#FFF"}),b.createElement("path",{d:"M168.214 248.838a6.611 6.611 0 0 1-6.61-6.611v-66.108a6.611 6.611 0 0 1 13.221 0v66.108a6.611 6.611 0 0 1-6.61 6.61",fill:"#5BA02E"}),b.createElement("path",{d:"M176.147 248.176a6.611 6.611 0 0 1-6.61-6.61v-33.054a6.611 6.611 0 1 1 13.221 0v33.053a6.611 6.611 0 0 1-6.61 6.611",fill:"#92C110"}),b.createElement("path",{d:"M185.994 293.89h-27.376a3.17 3.17 0 0 1-3.17-3.17v-45.887a3.17 3.17 0 0 1 3.17-3.17h27.376a3.17 3.17 0 0 1 3.17 3.17v45.886a3.17 3.17 0 0 1-3.17 3.17",fill:"#F2D7AD"}),b.createElement("path",{d:"M81.972 147.673s6.377-.927 17.566-1.28c11.729-.371 17.57 1.086 17.57 1.086s3.697-3.855.968-8.424c1.278-12.077 5.982-32.827.335-48.273-1.116-1.339-3.743-1.512-7.536-.62-1.337.315-7.147-.149-7.983-.1l-15.311-.347s-3.487-.17-8.035-.508c-1.512-.113-4.227-1.683-5.458-.338-.406.443-2.425 5.669-1.97 16.077l8.635 35.642s-3.141 3.61 1.219 7.085",fill:"#FFF"}),b.createElement("path",{d:"M75.768 73.325l-.9-6.397 11.982-6.52s7.302-.118 8.038 1.205c.737 1.324-5.616.993-5.616.993s-1.836 1.388-2.615 2.5c-1.654 2.363-.986 6.471-8.318 5.986-1.708.284-2.57 2.233-2.57 2.233",fill:"#FFC6A0"}),b.createElement("path",{d:"M52.44 77.672s14.217 9.406 24.973 14.444c1.061.497-2.094 16.183-11.892 11.811-7.436-3.318-20.162-8.44-21.482-14.496-.71-3.258 2.543-7.643 8.401-11.76M141.862 80.113s-6.693 2.999-13.844 6.876c-3.894 2.11-10.137 4.704-12.33 7.988-6.224 9.314 3.536 11.22 12.947 7.503 6.71-2.651 28.999-12.127 13.227-22.367",fill:"#FFB594"}),b.createElement("path",{d:"M76.166 66.36l3.06 3.881s-2.783 2.67-6.31 5.747c-7.103 6.195-12.803 14.296-15.995 16.44-3.966 2.662-9.754 3.314-12.177-.118-3.553-5.032.464-14.628 31.422-25.95",fill:"#FFC6A0"}),b.createElement("path",{d:"M64.674 85.116s-2.34 8.413-8.912 14.447c.652.548 18.586 10.51 22.144 10.056 5.238-.669 6.417-18.968 1.145-20.531-.702-.208-5.901-1.286-8.853-2.167-.87-.26-1.611-1.71-3.545-.936l-1.98-.869zM128.362 85.826s5.318 1.956 7.325 13.734c-.546.274-17.55 12.35-21.829 7.805-6.534-6.94-.766-17.393 4.275-18.61 4.646-1.121 5.03-1.37 10.23-2.929",fill:"#FFF"}),b.createElement("path",{d:"M78.18 94.656s.911 7.41-4.914 13.078",stroke:"#E4EBF7",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M87.397 94.68s3.124 2.572 10.263 2.572c7.14 0 9.074-3.437 9.074-3.437",stroke:"#E4EBF7",strokeWidth:".932",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M117.184 68.639l-6.781-6.177s-5.355-4.314-9.223-.893c-3.867 3.422 4.463 2.083 5.653 4.165 1.19 2.082.848 1.143-2.083.446-5.603-1.331-2.082.893 2.975 5.355 2.091 1.845 6.992.955 6.992.955l2.467-3.851z",fill:"#FFC6A0"}),b.createElement("path",{d:"M105.282 91.315l-.297-10.937-15.918-.027-.53 10.45c-.026.403.17.788.515.999 2.049 1.251 9.387 5.093 15.799.424.287-.21.443-.554.431-.91",fill:"#FFB594"}),b.createElement("path",{d:"M107.573 74.24c.817-1.147.982-9.118 1.015-11.928a1.046 1.046 0 0 0-.965-1.055l-4.62-.365c-7.71-1.044-17.071.624-18.253 6.346-5.482 5.813-.421 13.244-.421 13.244s1.963 3.566 4.305 6.791c.756 1.041.398-3.731 3.04-5.929 5.524-4.594 15.899-7.103 15.899-7.103",fill:"#5C2552"}),b.createElement("path",{d:"M88.426 83.206s2.685 6.202 11.602 6.522c7.82.28 8.973-7.008 7.434-17.505l-.909-5.483c-6.118-2.897-15.478.54-15.478.54s-.576 2.044-.19 5.504c-2.276 2.066-1.824 5.618-1.824 5.618s-.905-1.922-1.98-2.321c-.86-.32-1.897.089-2.322 1.98-1.04 4.632 3.667 5.145 3.667 5.145",fill:"#FFC6A0"}),b.createElement("path",{stroke:"#DB836E",strokeWidth:"1.145",strokeLinecap:"round",strokeLinejoin:"round",d:"M100.843 77.099l1.701-.928-1.015-4.324.674-1.406"}),b.createElement("path",{d:"M105.546 74.092c-.022.713-.452 1.279-.96 1.263-.51-.016-.904-.607-.882-1.32.021-.713.452-1.278.96-1.263.51.016.904.607.882 1.32M97.592 74.349c-.022.713-.452 1.278-.961 1.263-.509-.016-.904-.607-.882-1.32.022-.713.452-1.279.961-1.263.51.016.904.606.882 1.32",fill:"#552950"}),b.createElement("path",{d:"M91.132 86.786s5.269 4.957 12.679 2.327",stroke:"#DB836E",strokeWidth:"1.145",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M99.776 81.903s-3.592.232-1.44-2.79c1.59-1.496 4.897-.46 4.897-.46s1.156 3.906-3.457 3.25",fill:"#DB836E"}),b.createElement("path",{d:"M102.88 70.6s2.483.84 3.402.715M93.883 71.975s2.492-1.144 4.778-1.073",stroke:"#5C2552",strokeWidth:"1.526",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M86.32 77.374s.961.879 1.458 2.106c-.377.48-1.033 1.152-.236 1.809M99.337 83.719s1.911.151 2.509-.254",stroke:"#DB836E",strokeWidth:"1.145",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M87.782 115.821l15.73-3.012M100.165 115.821l10.04-2.008",stroke:"#E4EBF7",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M66.508 86.763s-1.598 8.83-6.697 14.078",stroke:"#E4EBF7",strokeWidth:"1.114",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M128.31 87.934s3.013 4.121 4.06 11.785",stroke:"#E4EBF7",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M64.09 84.816s-6.03 9.912-13.607 9.903",stroke:"#DB836E",strokeWidth:".795",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M112.366 65.909l-.142 5.32s5.993 4.472 11.945 9.202c4.482 3.562 8.888 7.455 10.985 8.662 4.804 2.766 8.9 3.355 11.076 1.808 4.071-2.894 4.373-9.878-8.136-15.263-4.271-1.838-16.144-6.36-25.728-9.73",fill:"#FFC6A0"}),b.createElement("path",{d:"M130.532 85.488s4.588 5.757 11.619 6.214",stroke:"#DB836E",strokeWidth:".75",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M121.708 105.73s-.393 8.564-1.34 13.612",stroke:"#E4EBF7",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M115.784 161.512s-3.57-1.488-2.678-7.14",stroke:"#648BD8",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M101.52 290.246s4.326 2.057 7.408 1.03c2.842-.948 4.564.673 7.132 1.186 2.57.514 6.925 1.108 11.772-1.269-.104-5.551-6.939-4.01-12.048-6.763-2.582-1.39-3.812-4.757-3.625-8.863h-9.471s-1.402 10.596-1.169 14.68",fill:"#CBD1D1"}),b.createElement("path",{d:"M101.496 290.073s2.447 1.281 6.809.658c3.081-.44 3.74.485 7.479 1.039 3.739.554 10.802-.07 11.91-.9.415 1.108-.347 2.077-.347 2.077s-1.523.608-4.847.831c-2.045.137-5.843.293-7.663-.507-1.8-1.385-5.286-1.917-5.77-.243-3.947.958-7.41-.288-7.41-.288l-.16-2.667z",fill:"#2B0849"}),b.createElement("path",{d:"M108.824 276.19h3.116s-.103 6.751 4.57 8.62c-4.673.624-8.62-2.32-7.686-8.62",fill:"#A4AABA"}),b.createElement("path",{d:"M57.65 272.52s-2.122 7.47-4.518 12.396c-1.811 3.724-4.255 7.548 5.505 7.548 6.698 0 9.02-.483 7.479-6.648-1.541-6.164.268-13.296.268-13.296H57.65z",fill:"#CBD1D1"}),b.createElement("path",{d:"M51.54 290.04s2.111 1.178 6.682 1.178c6.128 0 8.31-1.662 8.31-1.662s.605 1.122-.624 2.18c-1 .862-3.624 1.603-7.444 1.559-4.177-.049-5.876-.57-6.786-1.177-.831-.554-.692-1.593-.138-2.078",fill:"#2B0849"}),b.createElement("path",{d:"M58.533 274.438s.034 1.529-.315 2.95c-.352 1.431-1.087 3.127-1.139 4.17-.058 1.16 4.57 1.592 5.194.035.623-1.559 1.303-6.475 1.927-7.306.622-.831-4.94-2.135-5.667.15",fill:"#A4AABA"}),b.createElement("path",{d:"M100.885 277.015l13.306.092s1.291-54.228 1.843-64.056c.552-9.828 3.756-43.13.997-62.788l-12.48-.64-22.725.776s-.433 3.944-1.19 9.921c-.062.493-.677.838-.744 1.358-.075.582.42 1.347.318 1.956-2.35 14.003-6.343 32.926-8.697 46.425-.116.663-1.227 1.004-1.45 2.677-.04.3.21 1.516.112 1.785-6.836 18.643-10.89 47.584-14.2 61.551l14.528-.014s2.185-8.524 4.008-16.878c2.796-12.817 22.987-84.553 22.987-84.553l3-.517 1.037 46.1s-.223 1.228.334 2.008c.558.782-.556 1.117-.39 2.233l.39 1.784s-.446 7.14-.892 11.826c-.446 4.685-.092 38.954-.092 38.954",fill:"#7BB2F9"}),b.createElement("path",{d:"M77.438 220.434c1.146.094 4.016-2.008 6.916-4.91M107.55 223.931s2.758-1.103 6.069-3.862",stroke:"#648BD8",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M108.459 220.905s2.759-1.104 6.07-3.863",stroke:"#648BD8",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M76.099 223.557s2.608-.587 6.47-3.346M87.33 150.82c-.27 3.088.297 8.478-4.315 9.073M104.829 149.075s.11 13.936-1.286 14.983c-2.207 1.655-2.975 1.934-2.975 1.934M101.014 149.63s.035 12.81-1.19 24.245M94.93 174.965s7.174-1.655 9.38-1.655M75.671 204.754c-.316 1.55-.64 3.067-.973 4.535 0 0-1.45 1.822-1.003 3.756.446 1.934-.943 2.034-4.96 15.273-1.686 5.559-4.464 18.49-6.313 27.447-.078.38-4.018 18.06-4.093 18.423M77.043 196.743a313.269 313.269 0 0 1-.877 4.729M83.908 151.414l-1.19 10.413s-1.091.148-.496 2.23c.111 1.34-2.66 15.692-5.153 30.267M57.58 272.94h13.238",stroke:"#648BD8",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),b.createElement("path",{d:"M117.377 147.423s-16.955-3.087-35.7.199c.157 2.501-.002 4.128-.002 4.128s14.607-2.802 35.476-.31c.251-2.342.226-4.017.226-4.017",fill:"#192064"}),b.createElement("path",{d:"M107.511 150.353l.004-4.885a.807.807 0 0 0-.774-.81c-2.428-.092-5.04-.108-7.795-.014a.814.814 0 0 0-.784.81l-.003 4.88c0 .456.371.82.827.808a140.76 140.76 0 0 1 7.688.017.81.81 0 0 0 .837-.806",fill:"#FFF"}),b.createElement("path",{d:"M106.402 149.426l.002-3.06a.64.64 0 0 0-.616-.643 94.135 94.135 0 0 0-5.834-.009.647.647 0 0 0-.626.643l-.001 3.056c0 .36.291.648.651.64 1.78-.04 3.708-.041 5.762.012.36.009.662-.279.662-.64",fill:"#192064"}),b.createElement("path",{d:"M101.485 273.933h12.272M102.652 269.075c.006 3.368.04 5.759.11 6.47M102.667 263.125c-.009 1.53-.015 2.98-.016 4.313M102.204 174.024l.893 44.402s.669 1.561-.224 2.677c-.892 1.116 2.455.67.893 2.231-1.562 1.562.893 1.116 0 3.347-.592 1.48-.988 20.987-1.09 34.956",stroke:"#648BD8",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}))),UXn={success:VA,error:$S,info:n6,warning:xAt},tq={404:OXn,500:jXn,403:WXn},KXn=Object.keys(tq),qXn=t=>{let{prefixCls:e,icon:n,status:i}=t;const r=Me(`${e}-icon`);if(Cr("Result")(!(typeof n=="string"&&n.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${n}\` at https://ant.design/components/icon`),KXn.includes(`${i}`)){const s=tq[i];return b.createElement("div",{className:`${r} ${e}-image`},b.createElement(s,null))}const o=b.createElement(UXn[i]);return n===null||n===!1?null:b.createElement("div",{className:r},n||o)},GXn=t=>{let{prefixCls:e,extra:n}=t;return n?b.createElement("div",{className:`${e}-extra`},n):null},fd=t=>{let{prefixCls:e,className:n,rootClassName:i,subTitle:r,title:o,style:s,children:a,status:l="info",icon:c,extra:u}=t;const{getPrefixCls:d,direction:h,result:f}=b.useContext(jn),m=d("result",e),[p,g,y]=HXn(m),_=Me(m,`${m}-${l}`,n,f==null?void 0:f.className,i,{[`${m}-rtl`]:h==="rtl"},g,y),w=Object.assign(Object.assign({},f==null?void 0:f.style),s);return p(b.createElement("div",{className:_,style:w},b.createElement(qXn,{prefixCls:m,status:l,icon:c}),b.createElement("div",{className:`${m}-title`},o),r&&b.createElement("div",{className:`${m}-subtitle`},r),b.createElement(GXn,{prefixCls:m,extra:u}),a&&b.createElement("div",{className:`${m}-content`},a)))};fd.PRESENTED_IMAGE_403=tq[403];fd.PRESENTED_IMAGE_404=tq[404];fd.PRESENTED_IMAGE_500=tq[500];fd.displayName="Result";const YXn=t=>{const{value:e,formatter:n,precision:i,decimalSeparator:r,groupSeparator:o="",prefixCls:s}=t;let a;if(typeof n=="function")a=n(e);else{const l=String(e),c=l.match(/^(-?)(\d*)(\.(\d+))?$/);if(!c||l==="-")a=l;else{const u=c[1];let d=c[2]||"0",h=c[4]||"";d=d.replace(/\B(?=(\d{3})+(?!\d))/g,o),typeof i=="number"&&(h=h.padEnd(i,"0").slice(0,i>0?i:0)),h&&(h=`${r}${h}`),a=[b.createElement("span",{key:"int",className:`${s}-content-value-int`},u,d),h&&b.createElement("span",{key:"decimal",className:`${s}-content-value-decimal`},h)]}}return b.createElement("span",{className:`${s}-content-value`},a)},XXn=t=>{const{componentCls:e,marginXXS:n,padding:i,colorTextDescription:r,titleFontSize:o,colorTextHeading:s,contentFontSize:a,fontFamily:l}=t;return{[e]:Object.assign(Object.assign({},fo(t)),{[`${e}-title`]:{marginBottom:n,color:r,fontSize:o},[`${e}-skeleton`]:{paddingTop:i},[`${e}-content`]:{color:s,fontSize:a,fontFamily:l,[`${e}-content-value`]:{display:"inline-block",direction:"ltr"},[`${e}-content-prefix, ${e}-content-suffix`]:{display:"inline-block"},[`${e}-content-prefix`]:{marginInlineEnd:n},[`${e}-content-suffix`]:{marginInlineStart:n}}})}},ZXn=t=>{const{fontSizeHeading3:e,fontSize:n}=t;return{titleFontSize:n,contentFontSize:e}},QXn=Jr("Statistic",t=>{const e=mr(t,{});return[XXn(e)]},ZXn);var JXn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const gv=t=>{const{prefixCls:e,className:n,rootClassName:i,style:r,valueStyle:o,value:s=0,title:a,valueRender:l,prefix:c,suffix:u,loading:d=!1,formatter:h,precision:f,decimalSeparator:m=".",groupSeparator:p=",",onMouseEnter:g,onMouseLeave:y}=t,_=JXn(t,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:w,direction:C,statistic:N}=b.useContext(jn),E=w("statistic",e),[D,k,M]=QXn(E),T=b.createElement(YXn,{decimalSeparator:m,groupSeparator:p,prefixCls:E,formatter:h,precision:f,value:s}),A=Me(E,{[`${E}-rtl`]:C==="rtl"},N==null?void 0:N.className,n,i,k,M),R=Ll(_,{aria:!0,data:!0});return D(b.createElement("div",Object.assign({},R,{className:A,style:Object.assign(Object.assign({},N==null?void 0:N.style),r),onMouseEnter:g,onMouseLeave:y}),a&&b.createElement("div",{className:`${E}-title`},a),b.createElement(ja,{paragraph:!1,loading:d,className:`${E}-skeleton`},b.createElement("div",{style:o,className:`${E}-content`},c&&b.createElement("span",{className:`${E}-content-prefix`},c),l?l(T):T,u&&b.createElement("span",{className:`${E}-content-suffix`},u)))))};gv.displayName="Statistic";const eZn=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function tZn(t,e){let n=t;const i=/\[[^\]]*]/g,r=(e.match(i)||[]).map(l=>l.slice(1,-1)),o=e.replace(i,"[]"),s=eZn.reduce((l,c)=>{let[u,d]=c;if(l.includes(u)){const h=Math.floor(n/d);return n-=h*d,l.replace(new RegExp(`${u}+`,"g"),f=>{const m=f.length;return h.toString().padStart(m,"0")})}return l},o);let a=0;return s.replace(i,()=>{const l=r[a];return a+=1,l})}function nZn(t,e){const{format:n=""}=e,i=new Date(t).getTime(),r=Date.now(),o=Math.max(i-r,0);return tZn(o,n)}var iZn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const rZn=1e3/30;function oZn(t){return new Date(t).getTime()}const sZn=t=>{const{value:e,format:n="HH:mm:ss",onChange:i,onFinish:r}=t,o=iZn(t,["value","format","onChange","onFinish"]),s=bhe(),a=b.useRef(null),l=()=>{r==null||r(),a.current&&(clearInterval(a.current),a.current=null)},c=()=>{const h=oZn(e);h>=Date.now()&&(a.current=setInterval(()=>{s(),i==null||i(h-Date.now()),h<Date.now()&&l()},rZn))};b.useEffect(()=>(c(),()=>{a.current&&(clearInterval(a.current),a.current=null)}),[e]);const u=(h,f)=>nZn(h,Object.assign(Object.assign({},f),{format:n})),d=h=>$c(h,{title:void 0});return b.createElement(gv,Object.assign({},o,{value:e,valueRender:d,formatter:u}))},aZn=b.memo(sZn);gv.Countdown=aZn;var lZn=["className","prefixCls","style","active","status","iconPrefix","icon","wrapperStyle","stepNumber","disabled","description","title","subTitle","progressDot","stepIcon","tailContent","icons","stepIndex","onStepClick","onClick","render"];function $it(t){return typeof t=="string"}function CAt(t){var e,n=t.className,i=t.prefixCls,r=t.style,o=t.active,s=t.status,a=t.iconPrefix,l=t.icon;t.wrapperStyle;var c=t.stepNumber,u=t.disabled,d=t.description,h=t.title,f=t.subTitle,m=t.progressDot,p=t.stepIcon,g=t.tailContent,y=t.icons,_=t.stepIndex,w=t.onStepClick,C=t.onClick,N=t.render,E=di(t,lZn),D=!!w&&!u,k={};D&&(k.role="button",k.tabIndex=0,k.onClick=function(O){C==null||C(O),w(_)},k.onKeyDown=function(O){var V=O.which;(V===Wt.ENTER||V===Wt.SPACE)&&w(_)});var M=function(){var V,F,$=Me("".concat(i,"-icon"),"".concat(a,"icon"),(V={},ye(V,"".concat(a,"icon-").concat(l),l&&$it(l)),ye(V,"".concat(a,"icon-check"),!l&&s==="finish"&&(y&&!y.finish||!y)),ye(V,"".concat(a,"icon-cross"),!l&&s==="error"&&(y&&!y.error||!y)),V)),B=b.createElement("span",{className:"".concat(i,"-icon-dot")});return m?typeof m=="function"?F=b.createElement("span",{className:"".concat(i,"-icon")},m(B,{index:c-1,status:s,title:h,description:d})):F=b.createElement("span",{className:"".concat(i,"-icon")},B):l&&!$it(l)?F=b.createElement("span",{className:"".concat(i,"-icon")},l):y&&y.finish&&s==="finish"?F=b.createElement("span",{className:"".concat(i,"-icon")},y.finish):y&&y.error&&s==="error"?F=b.createElement("span",{className:"".concat(i,"-icon")},y.error):l||s==="finish"||s==="error"?F=b.createElement("span",{className:$}):F=b.createElement("span",{className:"".concat(i,"-icon")},c),p&&(F=p({index:c-1,status:s,title:h,description:d,node:F})),F},T=s||"wait",A=Me("".concat(i,"-item"),"".concat(i,"-item-").concat(T),n,(e={},ye(e,"".concat(i,"-item-custom"),l),ye(e,"".concat(i,"-item-active"),o),ye(e,"".concat(i,"-item-disabled"),u===!0),e)),R=Ie({},r),P=b.createElement("div",lt({},E,{className:A,style:R}),b.createElement("div",lt({onClick:C},k,{className:"".concat(i,"-item-container")}),b.createElement("div",{className:"".concat(i,"-item-tail")},g),b.createElement("div",{className:"".concat(i,"-item-icon")},M()),b.createElement("div",{className:"".concat(i,"-item-content")},b.createElement("div",{className:"".concat(i,"-item-title")},h,f&&b.createElement("div",{title:typeof f=="string"?f:void 0,className:"".concat(i,"-item-subtitle")},f)),d&&b.createElement("div",{className:"".concat(i,"-item-description")},d))));return N&&(P=N(P)||null),P}var cZn=["prefixCls","style","className","children","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","stepIcon","initial","icons","onChange","itemRender","items"];function m$e(t){var e,n=t.prefixCls,i=n===void 0?"rc-steps":n,r=t.style,o=r===void 0?{}:r,s=t.className;t.children;var a=t.direction,l=a===void 0?"horizontal":a,c=t.type,u=c===void 0?"default":c,d=t.labelPlacement,h=d===void 0?"horizontal":d,f=t.iconPrefix,m=f===void 0?"rc":f,p=t.status,g=p===void 0?"process":p,y=t.size,_=t.current,w=_===void 0?0:_,C=t.progressDot,N=C===void 0?!1:C,E=t.stepIcon,D=t.initial,k=D===void 0?0:D,M=t.icons,T=t.onChange,A=t.itemRender,R=t.items,P=R===void 0?[]:R,O=di(t,cZn),V=u==="navigation",F=u==="inline",$=F||N,B=F?"horizontal":l,z=F?void 0:y,H=$?"vertical":h,K=Me(i,"".concat(i,"-").concat(B),s,(e={},ye(e,"".concat(i,"-").concat(z),z),ye(e,"".concat(i,"-label-").concat(H),B==="horizontal"),ye(e,"".concat(i,"-dot"),!!$),ye(e,"".concat(i,"-navigation"),V),ye(e,"".concat(i,"-inline"),F),e)),q=function(J){T&&w!==J&&T(J)},U=function(J,ae){var se=Ie({},J),oe=k+ae;return g==="error"&&ae===w-1&&(se.className="".concat(i,"-next-error")),se.status||(oe===w?se.status=g:oe<w?se.status="finish":se.status="wait"),F&&(se.icon=void 0,se.subTitle=void 0),!se.render&&A&&(se.render=function(fe){return A(se,fe)}),Z.createElement(CAt,lt({},se,{active:oe===w,stepNumber:oe+1,stepIndex:oe,key:oe,prefixCls:i,iconPrefix:m,wrapperStyle:o,progressDot:$,stepIcon:E,icons:M,onStepClick:T&&q}))};return Z.createElement("div",lt({className:K,style:o},O),P.filter(function(Y){return Y}).map(U))}m$e.Step=CAt;const uZn=t=>{const{componentCls:e,customIconTop:n,customIconSize:i,customIconFontSize:r}=t;return{[`${e}-item-custom`]:{[`> ${e}-item-container > ${e}-item-icon`]:{height:"auto",background:"none",border:0,[`> ${e}-icon`]:{top:n,width:i,height:i,fontSize:r,lineHeight:xe(i)}}},[`&:not(${e}-vertical)`]:{[`${e}-item-custom`]:{[`${e}-item-icon`]:{width:"auto",background:"none"}}}}},dZn=t=>{const{componentCls:e}=t,n=`${e}-item`;return{[`${e}-horizontal`]:{[`${n}-tail`]:{transform:"translateY(-50%)"}}}},hZn=t=>{const{componentCls:e,inlineDotSize:n,inlineTitleColor:i,inlineTailColor:r}=t,o=t.calc(t.paddingXS).add(t.lineWidth).equal(),s={[`${e}-item-container ${e}-item-content ${e}-item-title`]:{color:i}};return{[`&${e}-inline`]:{width:"auto",display:"inline-flex",[`${e}-item`]:{flex:"none","&-container":{padding:`${xe(o)} ${xe(t.paddingXXS)} 0`,margin:`0 ${xe(t.calc(t.marginXXS).div(2).equal())}`,borderRadius:t.borderRadiusSM,cursor:"pointer",transition:`background-color ${t.motionDurationMid}`,"&:hover":{background:t.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:n,height:n,marginInlineStart:`calc(50% - ${xe(t.calc(n).div(2).equal())})`,[`> ${e}-icon`]:{top:0},[`${e}-icon-dot`]:{borderRadius:t.calc(t.fontSizeSM).div(4).equal(),"&::after":{display:"none"}}},"&-content":{width:"auto",marginTop:t.calc(t.marginXS).sub(t.lineWidth).equal()},"&-title":{color:i,fontSize:t.fontSizeSM,lineHeight:t.lineHeightSM,fontWeight:"normal",marginBottom:t.calc(t.marginXXS).div(2).equal()},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:t.calc(n).div(2).add(o).equal(),transform:"translateY(-50%)","&:after":{width:"100%",height:t.lineWidth,borderRadius:0,marginInlineStart:0,background:r}},[`&:first-child ${e}-item-tail`]:{width:"50%",marginInlineStart:"50%"},[`&:last-child ${e}-item-tail`]:{display:"block",width:"50%"},"&-wait":Object.assign({[`${e}-item-icon ${e}-icon ${e}-icon-dot`]:{backgroundColor:t.colorBorderBg,border:`${xe(t.lineWidth)} ${t.lineType} ${r}`}},s),"&-finish":Object.assign({[`${e}-item-tail::after`]:{backgroundColor:r},[`${e}-item-icon ${e}-icon ${e}-icon-dot`]:{backgroundColor:r,border:`${xe(t.lineWidth)} ${t.lineType} ${r}`}},s),"&-error":s,"&-active, &-process":Object.assign({[`${e}-item-icon`]:{width:n,height:n,marginInlineStart:`calc(50% - ${xe(t.calc(n).div(2).equal())})`,top:0}},s),[`&:not(${e}-item-active) > ${e}-item-container[role='button']:hover`]:{[`${e}-item-title`]:{color:i}}}}}},fZn=t=>{const{componentCls:e,iconSize:n,lineHeight:i,iconSizeSM:r}=t;return{[`&${e}-label-vertical`]:{[`${e}-item`]:{overflow:"visible","&-tail":{marginInlineStart:t.calc(n).div(2).add(t.controlHeightLG).equal(),padding:`0 ${xe(t.paddingLG)}`},"&-content":{display:"block",width:t.calc(n).div(2).add(t.controlHeightLG).mul(2).equal(),marginTop:t.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:t.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:t.marginXXS,marginInlineStart:0,lineHeight:i}},[`&${e}-small:not(${e}-dot)`]:{[`${e}-item`]:{"&-icon":{marginInlineStart:t.calc(n).sub(r).div(2).add(t.controlHeightLG).equal()}}}}}},mZn=t=>{const{componentCls:e,navContentMaxWidth:n,navArrowColor:i,stepsNavActiveColor:r,motionDurationSlow:o}=t;return{[`&${e}-navigation`]:{paddingTop:t.paddingSM,[`&${e}-small`]:{[`${e}-item`]:{"&-container":{marginInlineStart:t.calc(t.marginSM).mul(-1).equal()}}},[`${e}-item`]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:t.calc(t.margin).mul(-1).equal(),paddingBottom:t.paddingSM,textAlign:"start",transition:`opacity ${o}`,[`${e}-item-content`]:{maxWidth:n},[`${e}-item-title`]:Object.assign(Object.assign({maxWidth:"100%",paddingInlineEnd:0},Mm),{"&::after":{display:"none"}})},[`&:not(${e}-item-active)`]:{[`${e}-item-container[role='button']`]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:`calc(50% - ${xe(t.calc(t.paddingSM).div(2).equal())})`,insetInlineStart:"100%",display:"inline-block",width:t.fontSizeIcon,height:t.fontSizeIcon,borderTop:`${xe(t.lineWidth)} ${t.lineType} ${i}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${xe(t.lineWidth)} ${t.lineType} ${i}`,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:t.lineWidthBold,backgroundColor:r,transition:`width ${o}, inset-inline-start ${o}`,transitionTimingFunction:"ease-out",content:'""'}},[`${e}-item${e}-item-active::before`]:{insetInlineStart:0,width:"100%"}},[`&${e}-navigation${e}-vertical`]:{[`> ${e}-item`]:{marginInlineEnd:0,"&::before":{display:"none"},[`&${e}-item-active::before`]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:t.calc(t.lineWidth).mul(3).equal(),height:`calc(100% - ${xe(t.marginLG)})`},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:t.calc(t.controlHeight).mul(.25).equal(),height:t.calc(t.controlHeight).mul(.25).equal(),marginBottom:t.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},"&:last-child":{"&::after":{display:"none"}},[`> ${e}-item-container > ${e}-item-tail`]:{visibility:"hidden"}}},[`&${e}-navigation${e}-horizontal`]:{[`> ${e}-item > ${e}-item-container > ${e}-item-tail`]:{visibility:"hidden"}}}},pZn=t=>{const{antCls:e,componentCls:n,iconSize:i,iconSizeSM:r,processIconColor:o,marginXXS:s,lineWidthBold:a,lineWidth:l,paddingXXS:c}=t,u=t.calc(i).add(t.calc(a).mul(4).equal()).equal(),d=t.calc(r).add(t.calc(t.lineWidth).mul(4).equal()).equal();return{[`&${n}-with-progress`]:{[`${n}-item`]:{paddingTop:c,[`&-process ${n}-item-container ${n}-item-icon ${n}-icon`]:{color:o}},[`&${n}-vertical > ${n}-item `]:{paddingInlineStart:c,[`> ${n}-item-container > ${n}-item-tail`]:{top:s,insetInlineStart:t.calc(i).div(2).sub(l).add(c).equal()}},[`&, &${n}-small`]:{[`&${n}-horizontal ${n}-item:first-child`]:{paddingBottom:c,paddingInlineStart:c}},[`&${n}-small${n}-vertical > ${n}-item > ${n}-item-container > ${n}-item-tail`]:{insetInlineStart:t.calc(r).div(2).sub(l).add(c).equal()},[`&${n}-label-vertical ${n}-item ${n}-item-tail`]:{top:t.calc(i).div(2).add(c).equal()},[`${n}-item-icon`]:{position:"relative",[`${e}-progress`]:{position:"absolute",insetInlineStart:"50%",top:"50%",transform:"translate(-50%, -50%)","&-inner":{width:`${xe(u)} !important`,height:`${xe(u)} !important`}}},[`&${n}-small`]:{[`&${n}-label-vertical ${n}-item ${n}-item-tail`]:{top:t.calc(r).div(2).add(c).equal()},[`${n}-item-icon ${e}-progress-inner`]:{width:`${xe(d)} !important`,height:`${xe(d)} !important`}}}}},gZn=t=>{const{componentCls:e,descriptionMaxWidth:n,lineHeight:i,dotCurrentSize:r,dotSize:o,motionDurationSlow:s}=t;return{[`&${e}-dot, &${e}-dot${e}-small`]:{[`${e}-item`]:{"&-title":{lineHeight:i},"&-tail":{top:t.calc(t.dotSize).sub(t.calc(t.lineWidth).mul(3).equal()).div(2).equal(),width:"100%",marginTop:0,marginBottom:0,marginInline:`${xe(t.calc(n).div(2).equal())} 0`,padding:0,"&::after":{width:`calc(100% - ${xe(t.calc(t.marginSM).mul(2).equal())})`,height:t.calc(t.lineWidth).mul(3).equal(),marginInlineStart:t.marginSM}},"&-icon":{width:o,height:o,marginInlineStart:t.calc(t.descriptionMaxWidth).sub(o).div(2).equal(),paddingInlineEnd:0,lineHeight:xe(o),background:"transparent",border:0,[`${e}-icon-dot`]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:`all ${s}`,"&::after":{position:"absolute",top:t.calc(t.marginSM).mul(-1).equal(),insetInlineStart:t.calc(o).sub(t.calc(t.controlHeightLG).mul(1.5).equal()).div(2).equal(),width:t.calc(t.controlHeightLG).mul(1.5).equal(),height:t.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:n},[`&-process ${e}-item-icon`]:{position:"relative",top:t.calc(o).sub(r).div(2).equal(),width:r,height:r,lineHeight:xe(r),background:"none",marginInlineStart:t.calc(t.descriptionMaxWidth).sub(r).div(2).equal()},[`&-process ${e}-icon`]:{[`&:first-child ${e}-icon-dot`]:{insetInlineStart:0}}}},[`&${e}-vertical${e}-dot`]:{[`${e}-item-icon`]:{marginTop:t.calc(t.controlHeight).sub(o).div(2).equal(),marginInlineStart:0,background:"none"},[`${e}-item-process ${e}-item-icon`]:{marginTop:t.calc(t.controlHeight).sub(r).div(2).equal(),top:0,insetInlineStart:t.calc(o).sub(r).div(2).equal(),marginInlineStart:0},[`${e}-item > ${e}-item-container > ${e}-item-tail`]:{top:t.calc(t.controlHeight).sub(o).div(2).equal(),insetInlineStart:0,margin:0,padding:`${xe(t.calc(o).add(t.paddingXS).equal())} 0 ${xe(t.paddingXS)}`,"&::after":{marginInlineStart:t.calc(o).sub(t.lineWidth).div(2).equal()}},[`&${e}-small`]:{[`${e}-item-icon`]:{marginTop:t.calc(t.controlHeightSM).sub(o).div(2).equal()},[`${e}-item-process ${e}-item-icon`]:{marginTop:t.calc(t.controlHeightSM).sub(r).div(2).equal()},[`${e}-item > ${e}-item-container > ${e}-item-tail`]:{top:t.calc(t.controlHeightSM).sub(o).div(2).equal()}},[`${e}-item:first-child ${e}-icon-dot`]:{insetInlineStart:0},[`${e}-item-content`]:{width:"inherit"}}}},bZn=t=>{const{componentCls:e}=t;return{[`&${e}-rtl`]:{direction:"rtl",[`${e}-item`]:{"&-subtitle":{float:"left"}},[`&${e}-navigation`]:{[`${e}-item::after`]:{transform:"rotate(-45deg)"}},[`&${e}-vertical`]:{[`> ${e}-item`]:{"&::after":{transform:"rotate(225deg)"},[`${e}-item-icon`]:{float:"right"}}},[`&${e}-dot`]:{[`${e}-item-icon ${e}-icon-dot, &${e}-small ${e}-item-icon ${e}-icon-dot`]:{float:"right"}}}}},vZn=t=>{const{componentCls:e,iconSizeSM:n,fontSizeSM:i,fontSize:r,colorTextDescription:o}=t;return{[`&${e}-small`]:{[`&${e}-horizontal:not(${e}-label-vertical) ${e}-item`]:{paddingInlineStart:t.paddingSM,"&:first-child":{paddingInlineStart:0}},[`${e}-item-icon`]:{width:n,height:n,marginTop:0,marginBottom:0,marginInline:`0 ${xe(t.marginXS)}`,fontSize:i,lineHeight:xe(n),textAlign:"center",borderRadius:n},[`${e}-item-title`]:{paddingInlineEnd:t.paddingSM,fontSize:r,lineHeight:xe(n),"&::after":{top:t.calc(n).div(2).equal()}},[`${e}-item-description`]:{color:o,fontSize:r},[`${e}-item-tail`]:{top:t.calc(n).div(2).sub(t.paddingXXS).equal()},[`${e}-item-custom ${e}-item-icon`]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,[`> ${e}-icon`]:{fontSize:n,lineHeight:xe(n),transform:"none"}}}}},yZn=t=>{const{componentCls:e,iconSizeSM:n,iconSize:i}=t;return{[`&${e}-vertical`]:{display:"flex",flexDirection:"column",[`> ${e}-item`]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",[`${e}-item-icon`]:{float:"left",marginInlineEnd:t.margin},[`${e}-item-content`]:{display:"block",minHeight:t.calc(t.controlHeight).mul(1.5).equal(),overflow:"hidden"},[`${e}-item-title`]:{lineHeight:xe(i)},[`${e}-item-description`]:{paddingBottom:t.paddingSM}},[`> ${e}-item > ${e}-item-container > ${e}-item-tail`]:{position:"absolute",top:0,insetInlineStart:t.calc(i).div(2).sub(t.lineWidth).equal(),width:t.lineWidth,height:"100%",padding:`${xe(t.calc(t.marginXXS).mul(1.5).add(i).equal())} 0 ${xe(t.calc(t.marginXXS).mul(1.5).equal())}`,"&::after":{width:t.lineWidth,height:"100%"}},[`> ${e}-item:not(:last-child) > ${e}-item-container > ${e}-item-tail`]:{display:"block"},[` > ${e}-item > ${e}-item-container > ${e}-item-content > ${e}-item-title`]:{"&::after":{display:"none"}},[`&${e}-small ${e}-item-container`]:{[`${e}-item-tail`]:{position:"absolute",top:0,insetInlineStart:t.calc(n).div(2).sub(t.lineWidth).equal(),padding:`${xe(t.calc(t.marginXXS).mul(1.5).add(n).equal())} 0 ${xe(t.calc(t.marginXXS).mul(1.5).equal())}`},[`${e}-item-title`]:{lineHeight:xe(n)}}}}},_Zn="wait",xZn="process",wZn="finish",CZn="error",KZ=(t,e)=>{const n=`${e.componentCls}-item`,i=`${t}IconColor`,r=`${t}TitleColor`,o=`${t}DescriptionColor`,s=`${t}TailColor`,a=`${t}IconBgColor`,l=`${t}IconBorderColor`,c=`${t}DotColor`;return{[`${n}-${t} ${n}-icon`]:{backgroundColor:e[a],borderColor:e[l],[`> ${e.componentCls}-icon`]:{color:e[i],[`${e.componentCls}-icon-dot`]:{background:e[c]}}},[`${n}-${t}${n}-custom ${n}-icon`]:{[`> ${e.componentCls}-icon`]:{color:e[c]}},[`${n}-${t} > ${n}-container > ${n}-content > ${n}-title`]:{color:e[r],"&::after":{backgroundColor:e[s]}},[`${n}-${t} > ${n}-container > ${n}-content > ${n}-description`]:{color:e[o]},[`${n}-${t} > ${n}-container > ${n}-tail::after`]:{backgroundColor:e[s]}}},SZn=t=>{const{componentCls:e,motionDurationSlow:n}=t,i=`${e}-item`,r=`${i}-icon`;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[i]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",[`> ${i}-container > ${i}-tail, > ${i}-container >  ${i}-content > ${i}-title::after`]:{display:"none"}}},[`${i}-container`]:{outline:"none","&:focus-visible":{[r]:Object.assign({},iS(t))}},[`${r}, ${i}-content`]:{display:"inline-block",verticalAlign:"top"},[r]:{width:t.iconSize,height:t.iconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:t.marginXS,fontSize:t.iconFontSize,fontFamily:t.fontFamily,lineHeight:xe(t.iconSize),textAlign:"center",borderRadius:t.iconSize,border:`${xe(t.lineWidth)} ${t.lineType} transparent`,transition:`background-color ${n}, border-color ${n}`,[`${e}-icon`]:{position:"relative",top:t.iconTop,color:t.colorPrimary,lineHeight:1}},[`${i}-tail`]:{position:"absolute",top:t.calc(t.iconSize).div(2).equal(),insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:t.lineWidth,background:t.colorSplit,borderRadius:t.lineWidth,transition:`background ${n}`,content:'""'}},[`${i}-title`]:{position:"relative",display:"inline-block",paddingInlineEnd:t.padding,color:t.colorText,fontSize:t.fontSizeLG,lineHeight:xe(t.titleLineHeight),"&::after":{position:"absolute",top:t.calc(t.titleLineHeight).div(2).equal(),insetInlineStart:"100%",display:"block",width:9999,height:t.lineWidth,background:t.processTailColor,content:'""'}},[`${i}-subtitle`]:{display:"inline",marginInlineStart:t.marginXS,color:t.colorTextDescription,fontWeight:"normal",fontSize:t.fontSize},[`${i}-description`]:{color:t.colorTextDescription,fontSize:t.fontSize}},KZ(_Zn,t)),KZ(xZn,t)),{[`${i}-process > ${i}-container > ${i}-title`]:{fontWeight:t.fontWeightStrong}}),KZ(wZn,t)),KZ(CZn,t)),{[`${i}${e}-next-error > ${e}-item-title::after`]:{background:t.colorError},[`${i}-disabled`]:{cursor:"not-allowed"}})},NZn=t=>{const{componentCls:e,motionDurationSlow:n}=t;return{[`& ${e}-item`]:{[`&:not(${e}-item-active)`]:{[`& > ${e}-item-container[role='button']`]:{cursor:"pointer",[`${e}-item`]:{[`&-title, &-subtitle, &-description, &-icon ${e}-icon`]:{transition:`color ${n}`}},"&:hover":{[`${e}-item`]:{"&-title, &-subtitle, &-description":{color:t.colorPrimary}}}},[`&:not(${e}-item-process)`]:{[`& > ${e}-item-container[role='button']:hover`]:{[`${e}-item`]:{"&-icon":{borderColor:t.colorPrimary,[`${e}-icon`]:{color:t.colorPrimary}}}}}}},[`&${e}-horizontal:not(${e}-label-vertical)`]:{[`${e}-item`]:{paddingInlineStart:t.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},[`&:last-child ${e}-item-title`]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:t.descriptionMaxWidth,whiteSpace:"normal"}}}}},EZn=t=>{const{componentCls:e}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},fo(t)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),SZn(t)),NZn(t)),uZn(t)),vZn(t)),yZn(t)),dZn(t)),fZn(t)),gZn(t)),mZn(t)),bZn(t)),pZn(t)),hZn(t))}},DZn=t=>({titleLineHeight:t.controlHeight,customIconSize:t.controlHeight,customIconTop:0,customIconFontSize:t.controlHeightSM,iconSize:t.controlHeight,iconTop:-.5,iconFontSize:t.fontSize,iconSizeSM:t.fontSizeHeading3,dotSize:t.controlHeight/4,dotCurrentSize:t.controlHeightLG/4,navArrowColor:t.colorTextDisabled,navContentMaxWidth:"auto",descriptionMaxWidth:140,waitIconColor:t.wireframe?t.colorTextDisabled:t.colorTextLabel,waitIconBgColor:t.wireframe?t.colorBgContainer:t.colorFillContent,waitIconBorderColor:t.wireframe?t.colorTextDisabled:"transparent",finishIconBgColor:t.wireframe?t.colorBgContainer:t.controlItemBgActive,finishIconBorderColor:t.wireframe?t.colorPrimary:t.controlItemBgActive}),kZn=Jr("Steps",t=>{const{colorTextDisabled:e,controlHeightLG:n,colorTextLightSolid:i,colorText:r,colorPrimary:o,colorTextDescription:s,colorTextQuaternary:a,colorError:l,colorBorderSecondary:c,colorSplit:u}=t,d=mr(t,{processIconColor:i,processTitleColor:r,processDescriptionColor:r,processIconBgColor:o,processIconBorderColor:o,processDotColor:o,processTailColor:u,waitTitleColor:s,waitDescriptionColor:s,waitTailColor:u,waitDotColor:e,finishIconColor:o,finishTitleColor:r,finishDescriptionColor:s,finishTailColor:o,finishDotColor:o,errorIconColor:i,errorTitleColor:l,errorDescriptionColor:l,errorTailColor:u,errorIconBgColor:l,errorIconBorderColor:l,errorDotColor:l,stepsNavActiveColor:o,stepsProgressSize:n,inlineDotSize:6,inlineTitleColor:a,inlineTailColor:c});return[EZn(d)]},DZn);function MZn(t){return t.filter(e=>e)}function LZn(t,e){if(t)return t;const n=fc(e).map(i=>{if(b.isValidElement(i)){const{props:r}=i;return Object.assign({},r)}return null});return MZn(n)}var TZn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const p$e=t=>{const{percent:e,size:n,className:i,rootClassName:r,direction:o,items:s,responsive:a=!0,current:l=0,children:c,style:u}=t,d=TZn(t,["percent","size","className","rootClassName","direction","items","responsive","current","children","style"]),{xs:h}=vhe(a),{getPrefixCls:f,direction:m,steps:p}=b.useContext(jn),g=b.useMemo(()=>a&&h?"vertical":o,[h,o]),y=Hc(n),_=f("steps",t.prefixCls),[w,C,N]=kZn(_),E=t.type==="inline",D=f("",t.iconPrefix),k=LZn(s,c),M=E?void 0:e,T=Object.assign(Object.assign({},p==null?void 0:p.style),u),A=Me(p==null?void 0:p.className,{[`${_}-rtl`]:m==="rtl",[`${_}-with-progress`]:M!==void 0},i,r,C,N),R={finish:b.createElement(Xk,{className:`${_}-finish-icon`}),error:b.createElement(vb,{className:`${_}-error-icon`})},P=V=>{let{node:F,status:$}=V;if($==="process"&&M!==void 0){const B=y==="small"?32:40;return b.createElement("div",{className:`${_}-progress-icon`},b.createElement(Uj,{type:"circle",percent:M,size:B,strokeWidth:4,format:()=>null}),F)}return F},O=(V,F)=>V.description?b.createElement(Vs,{title:V.description},F):F;return w(b.createElement(m$e,Object.assign({icons:R},d,{style:T,current:l,size:y,items:k,itemRender:E?O:void 0,stepIcon:P,direction:g,prefixCls:_,iconPrefix:D,className:A})))};p$e.Step=m$e.Step;p$e.displayName="Steps";var IZn=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],SAt=b.forwardRef(function(t,e){var n,i=t.prefixCls,r=i===void 0?"rc-switch":i,o=t.className,s=t.checked,a=t.defaultChecked,l=t.disabled,c=t.loadingIcon,u=t.checkedChildren,d=t.unCheckedChildren,h=t.onClick,f=t.onChange,m=t.onKeyDown,p=di(t,IZn),g=ho(!1,{value:s,defaultValue:a}),y=He(g,2),_=y[0],w=y[1];function C(k,M){var T=_;return l||(T=k,w(T),f==null||f(T,M)),T}function N(k){k.which===Wt.LEFT?C(!1,k):k.which===Wt.RIGHT&&C(!0,k),m==null||m(k)}function E(k){var M=C(!_,k);h==null||h(M,k)}var D=Me(r,o,(n={},ye(n,"".concat(r,"-checked"),_),ye(n,"".concat(r,"-disabled"),l),n));return b.createElement("button",lt({},p,{type:"button",role:"switch","aria-checked":_,disabled:l,className:D,ref:e,onKeyDown:N,onClick:E}),c,b.createElement("span",{className:"".concat(r,"-inner")},b.createElement("span",{className:"".concat(r,"-inner-checked")},u),b.createElement("span",{className:"".concat(r,"-inner-unchecked")},d)))});SAt.displayName="Switch";const AZn=t=>{const{componentCls:e,trackHeightSM:n,trackPadding:i,trackMinWidthSM:r,innerMinMarginSM:o,innerMaxMarginSM:s,handleSizeSM:a,calc:l}=t,c=`${e}-inner`,u=xe(l(a).add(l(i).mul(2)).equal()),d=xe(l(s).mul(2).equal());return{[e]:{[`&${e}-small`]:{minWidth:r,height:n,lineHeight:xe(n),[`${e}-inner`]:{paddingInlineStart:s,paddingInlineEnd:o,[`${c}-checked, ${c}-unchecked`]:{minHeight:n},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${c}-unchecked`]:{marginTop:l(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${e}-handle`]:{width:a,height:a},[`${e}-loading-icon`]:{top:l(l(a).sub(t.switchLoadingIconSize)).div(2).equal(),fontSize:t.switchLoadingIconSize},[`&${e}-checked`]:{[`${e}-inner`]:{paddingInlineStart:o,paddingInlineEnd:s,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`${e}-handle`]:{insetInlineStart:`calc(100% - ${xe(l(a).add(i).equal())})`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:l(t.marginXXS).div(2).equal(),marginInlineEnd:l(t.marginXXS).mul(-1).div(2).equal()}},[`&${e}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:l(t.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:l(t.marginXXS).div(2).equal()}}}}}}},RZn=t=>{const{componentCls:e,handleSize:n,calc:i}=t;return{[e]:{[`${e}-loading-icon${t.iconCls}`]:{position:"relative",top:i(i(n).sub(t.fontSize)).div(2).equal(),color:t.switchLoadingIconColor,verticalAlign:"top"},[`&${e}-checked ${e}-loading-icon`]:{color:t.switchColor}}}},PZn=t=>{const{componentCls:e,trackPadding:n,handleBg:i,handleShadow:r,handleSize:o,calc:s}=t,a=`${e}-handle`;return{[e]:{[a]:{position:"absolute",top:n,insetInlineStart:n,width:o,height:o,transition:`all ${t.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:i,borderRadius:s(o).div(2).equal(),boxShadow:r,transition:`all ${t.switchDuration} ease-in-out`,content:'""'}},[`&${e}-checked ${a}`]:{insetInlineStart:`calc(100% - ${xe(s(o).add(n).equal())})`},[`&:not(${e}-disabled):active`]:{[`${a}::before`]:{insetInlineEnd:t.switchHandleActiveInset,insetInlineStart:0},[`&${e}-checked ${a}::before`]:{insetInlineEnd:0,insetInlineStart:t.switchHandleActiveInset}}}}},OZn=t=>{const{componentCls:e,trackHeight:n,trackPadding:i,innerMinMargin:r,innerMaxMargin:o,handleSize:s,calc:a}=t,l=`${e}-inner`,c=xe(a(s).add(a(i).mul(2)).equal()),u=xe(a(o).mul(2).equal());return{[e]:{[l]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:o,paddingInlineEnd:r,transition:`padding-inline-start ${t.switchDuration} ease-in-out, padding-inline-end ${t.switchDuration} ease-in-out`,[`${l}-checked, ${l}-unchecked`]:{display:"block",color:t.colorTextLightSolid,fontSize:t.fontSizeSM,transition:`margin-inline-start ${t.switchDuration} ease-in-out, margin-inline-end ${t.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${u})`,marginInlineEnd:`calc(100% - ${c} + ${u})`},[`${l}-unchecked`]:{marginTop:a(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${e}-checked ${l}`]:{paddingInlineStart:r,paddingInlineEnd:o,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${u})`,marginInlineEnd:`calc(-100% + ${c} - ${u})`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:a(i).mul(2).equal(),marginInlineEnd:a(i).mul(-1).mul(2).equal()}},[`&${e}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:a(i).mul(-1).mul(2).equal(),marginInlineEnd:a(i).mul(2).equal()}}}}}},jZn=t=>{const{componentCls:e,trackHeight:n,trackMinWidth:i}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},fo(t)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:i,height:n,lineHeight:xe(n),verticalAlign:"middle",background:t.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${t.motionDurationMid}`,userSelect:"none",[`&:hover:not(${e}-disabled)`]:{background:t.colorTextTertiary}}),j0(t)),{[`&${e}-checked`]:{background:t.switchColor,[`&:hover:not(${e}-disabled)`]:{background:t.colorPrimaryHover}},[`&${e}-loading, &${e}-disabled`]:{cursor:"not-allowed",opacity:t.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${e}-rtl`]:{direction:"rtl"}})}},FZn=t=>{const{fontSize:e,lineHeight:n,controlHeight:i,colorWhite:r}=t,o=e*n,s=i/2,a=2,l=o-a*2,c=s-a*2;return{trackHeight:o,trackHeightSM:s,trackMinWidth:l*2+a*4,trackMinWidthSM:c*2+a*2,trackPadding:a,handleBg:r,handleSize:l,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new ko("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:l/2,innerMaxMargin:l+a+a*2,innerMinMarginSM:c/2,innerMaxMarginSM:c+a+a*2}},$Zn=Jr("Switch",t=>{const e=mr(t,{switchDuration:t.motionDurationMid,switchColor:t.colorPrimary,switchDisabledOpacity:t.opacityLoading,switchLoadingIconSize:t.calc(t.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${t.opacityLoading})`,switchHandleActiveInset:"-30%"});return[jZn(e),OZn(e),PZn(e),RZn(e),AZn(e)]},FZn);var VZn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const BZn=b.forwardRef((t,e)=>{const{prefixCls:n,size:i,disabled:r,loading:o,className:s,rootClassName:a,style:l,checked:c,value:u,defaultChecked:d,defaultValue:h,onChange:f}=t,m=VZn(t,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[p,g]=ho(!1,{value:c??u,defaultValue:d??h}),{getPrefixCls:y,direction:_,switch:w}=b.useContext(jn),C=b.useContext(Yd),N=(r??C)||o,E=y("switch",n),D=b.createElement("div",{className:`${E}-handle`},o&&b.createElement(Xd,{className:`${E}-loading-icon`})),[k,M,T]=$Zn(E),A=Hc(i),R=Me(w==null?void 0:w.className,{[`${E}-small`]:A==="small",[`${E}-loading`]:o,[`${E}-rtl`]:_==="rtl"},s,a,M,T),P=Object.assign(Object.assign({},w==null?void 0:w.style),l),O=function(){g(arguments.length<=0?void 0:arguments[0]),f==null||f.apply(void 0,arguments)};return k(b.createElement(o6,{component:"Switch"},b.createElement(SAt,Object.assign({},m,{checked:p,onChange:O,prefixCls:E,className:R,style:P,disabled:N,ref:e,loadingIcon:D}))))}),nq=BZn;nq.__ANT_SWITCH=!0;nq.displayName="Switch";var J_={},iq="rc-table-internal-hook";function g$e(t){var e=b.createContext(void 0),n=function(r){var o=r.value,s=r.children,a=b.useRef(o);a.current=o;var l=b.useState(function(){return{getValue:function(){return a.current},listeners:new Set}}),c=He(l,1),u=c[0];return Lr(function(){Fc.unstable_batchedUpdates(function(){u.listeners.forEach(function(d){d(o)})})},[o]),b.createElement(e.Provider,{value:u},s)};return{Context:e,Provider:n,defaultValue:t}}function Fh(t,e){var n=gr(typeof e=="function"?e:function(d){if(e===void 0)return d;if(!Array.isArray(e))return d[e];var h={};return e.forEach(function(f){h[f]=d[f]}),h}),i=b.useContext(t==null?void 0:t.Context),r=i||{},o=r.listeners,s=r.getValue,a=b.useRef();a.current=n(i?s():t==null?void 0:t.defaultValue);var l=b.useState({}),c=He(l,2),u=c[1];return Lr(function(){if(!i)return;function d(h){var f=n(h);jp(a.current,f,!0)||u({})}return o.add(d),function(){o.delete(d)}},[i]),a.current}function zZn(){var t=b.createContext(null);function e(){return b.useContext(t)}function n(r,o){var s=P0(r),a=function(c,u){var d=s?{ref:u}:{},h=b.useRef(0),f=b.useRef(c),m=e();return m!==null?b.createElement(r,lt({},c,d)):((!o||o(f.current,c))&&(h.current+=1),f.current=c,b.createElement(t.Provider,{value:h.current},b.createElement(r,lt({},c,d))))};return a.displayName="ImmutableRoot(".concat(r.displayName||r.name,")"),s?b.forwardRef(a):a}function i(r,o){var s=P0(r),a=function(c,u){var d=s?{ref:u}:{};return e(),b.createElement(r,lt({},c,d))};return a.displayName="ImmutableResponse(".concat(r.displayName||r.name,")"),s?b.memo(b.forwardRef(a),o):b.memo(a,o)}return{makeImmutable:n,responseImmutable:i,useImmutableMark:e}}var b$e=zZn(),NAt=b$e.makeImmutable,v6=b$e.responseImmutable,HZn=b$e.useImmutableMark,$m=g$e();function EAt(t,e){var n=b.useRef(0);n.current+=1;var i=b.useRef(t),r=[];Object.keys(t||{}).map(function(s){var a;(t==null?void 0:t[s])!==((a=i.current)===null||a===void 0?void 0:a[s])&&r.push(s)}),i.current=t;var o=b.useRef([]);return r.length&&(o.current=r),b.useDebugValue(n.current),b.useDebugValue(o.current.join(", ")),e&&console.log("".concat(e,":"),n.current,o.current),n.current}const QD=EAt;var WZn=b.memo(function(){var t=EAt();return b.createElement("h1",null,"Render Times: ",t)});WZn.displayName="RenderBlock";var DAt=b.createContext({renderWithProps:!1}),UZn="RC_TABLE_KEY";function KZn(t){return t==null?[]:Array.isArray(t)?t:[t]}function Zhe(t){var e=[],n={};return t.forEach(function(i){for(var r=i||{},o=r.key,s=r.dataIndex,a=o||KZn(s).join("-")||UZn;n[a];)a="".concat(a,"_next");n[a]=!0,e.push(a)}),e}function wke(t){return t!=null}function qZn(t){return typeof t=="number"&&!Number.isNaN(t)}function GZn(t){return t&&Un(t)==="object"&&!Array.isArray(t)&&!b.isValidElement(t)}function YZn(t,e,n,i,r,o){var s=b.useContext(DAt),a=HZn(),l=Hk(function(){if(wke(i))return[i];var c=e==null||e===""?[]:Array.isArray(e)?e:[e],u=zg(t,c),d=u,h=void 0;if(r){var f=r(u,t,n);GZn(f)?(ii(!1,"`columns.render` return cell props is deprecated with perf issue, please use `onCell` instead."),d=f.children,h=f.props,s.renderWithProps=!0):d=f}return[d,h]},[a,t,i,e,r,n],function(c,u){if(o){var d=He(c,2),h=d[1],f=He(u,2),m=f[1];return o(m,h)}return s.renderWithProps?!0:!jp(c,u,!0)});return l}function XZn(t,e,n,i){var r=t+e-1;return t<=i&&r>=n}function ZZn(t,e){return Fh($m,function(n){var i=XZn(t,e||1,n.hoverStartRow,n.hoverEndRow);return[i,n.onHover]})}var QZn=function(e){var n=e.ellipsis,i=e.rowType,r=e.children,o,s=n===!0?{showTitle:!0}:n;return s&&(s.showTitle||i==="header")&&(typeof r=="string"||typeof r=="number"?o=r.toString():b.isValidElement(r)&&typeof r.props.children=="string"&&(o=r.props.children)),o};function JZn(t){var e,n,i,r,o,s,a,l;QD(t);var c=t.component,u=t.children,d=t.ellipsis,h=t.scope,f=t.prefixCls,m=t.className,p=t.align,g=t.record,y=t.render,_=t.dataIndex,w=t.renderIndex,C=t.shouldCellUpdate,N=t.index,E=t.rowType,D=t.colSpan,k=t.rowSpan,M=t.fixLeft,T=t.fixRight,A=t.firstFixLeft,R=t.lastFixLeft,P=t.firstFixRight,O=t.lastFixRight,V=t.appendNode,F=t.additionalProps,$=F===void 0?{}:F,B=t.isSticky,z="".concat(f,"-cell"),H=Fh($m,["supportSticky","allColumnsFixedLeft","rowHoverable"]),K=H.supportSticky,q=H.allColumnsFixedLeft,U=H.rowHoverable,Y=YZn(g,_,w,u,y,C),J=He(Y,2),ae=J[0],se=J[1],oe={},fe=typeof M=="number"&&K,de=typeof T=="number"&&K;fe&&(oe.position="sticky",oe.left=M),de&&(oe.position="sticky",oe.right=T);var ie=(e=(n=(i=se==null?void 0:se.colSpan)!==null&&i!==void 0?i:$.colSpan)!==null&&n!==void 0?n:D)!==null&&e!==void 0?e:1,Q=(r=(o=(s=se==null?void 0:se.rowSpan)!==null&&s!==void 0?s:$.rowSpan)!==null&&o!==void 0?o:k)!==null&&r!==void 0?r:1,be=ZZn(N,Q),le=He(be,2),Ne=le[0],Le=le[1],Te=gr(function(re){var we;g&&Le(N,N+Q-1),$==null||(we=$.onMouseEnter)===null||we===void 0||we.call($,re)}),De=gr(function(re){var we;g&&Le(-1,-1),$==null||(we=$.onMouseLeave)===null||we===void 0||we.call($,re)});if(ie===0||Q===0)return null;var Pe=(a=$.title)!==null&&a!==void 0?a:QZn({rowType:E,ellipsis:d,children:ae}),ge=Me(z,m,(l={},ye(ye(ye(ye(ye(ye(ye(ye(ye(ye(l,"".concat(z,"-fix-left"),fe&&K),"".concat(z,"-fix-left-first"),A&&K),"".concat(z,"-fix-left-last"),R&&K),"".concat(z,"-fix-left-all"),R&&q&&K),"".concat(z,"-fix-right"),de&&K),"".concat(z,"-fix-right-first"),P&&K),"".concat(z,"-fix-right-last"),O&&K),"".concat(z,"-ellipsis"),d),"".concat(z,"-with-append"),V),"".concat(z,"-fix-sticky"),(fe||de)&&B&&K),ye(l,"".concat(z,"-row-hover"),!se&&Ne)),$.className,se==null?void 0:se.className),he={};p&&(he.textAlign=p);var me=Ie(Ie(Ie(Ie({},oe),$.style),he),se==null?void 0:se.style),X=ae;return Un(X)==="object"&&!Array.isArray(X)&&!b.isValidElement(X)&&(X=null),d&&(R||P)&&(X=b.createElement("span",{className:"".concat(z,"-content")},X)),b.createElement(c,lt({},se,$,{className:ge,style:me,title:Pe,scope:h,onMouseEnter:U?Te:void 0,onMouseLeave:U?De:void 0,colSpan:ie!==1?ie:null,rowSpan:Q!==1?Q:null}),V,X)}const y6=b.memo(JZn);function v$e(t,e,n,i,r){var o=n[t]||{},s=n[e]||{},a,l;o.fixed==="left"?a=i.left[r==="rtl"?e:t]:s.fixed==="right"&&(l=i.right[r==="rtl"?t:e]);var c=!1,u=!1,d=!1,h=!1,f=n[e+1],m=n[t-1],p=f&&!f.fixed||m&&!m.fixed||n.every(function(C){return C.fixed==="left"});if(r==="rtl"){if(a!==void 0){var g=m&&m.fixed==="left";h=!g&&p}else if(l!==void 0){var y=f&&f.fixed==="right";d=!y&&p}}else if(a!==void 0){var _=f&&f.fixed==="left";c=!_&&p}else if(l!==void 0){var w=m&&m.fixed==="right";u=!w&&p}return{fixLeft:a,fixRight:l,lastFixLeft:c,firstFixRight:u,lastFixRight:d,firstFixLeft:h,isSticky:i.isSticky}}var kAt=b.createContext({});function eQn(t){var e=t.className,n=t.index,i=t.children,r=t.colSpan,o=r===void 0?1:r,s=t.rowSpan,a=t.align,l=Fh($m,["prefixCls","direction"]),c=l.prefixCls,u=l.direction,d=b.useContext(kAt),h=d.scrollColumnIndex,f=d.stickyOffsets,m=d.flattenColumns,p=n+o-1,g=p+1===h?o+1:o,y=v$e(n,n+g-1,m,f,u);return b.createElement(y6,lt({className:e,index:n,component:"td",prefixCls:c,record:null,dataIndex:null,align:a,colSpan:g,rowSpan:s,render:function(){return i}},y))}var tQn=["children"];function nQn(t){var e=t.children,n=di(t,tQn);return b.createElement("tr",n,e)}function Qhe(t){var e=t.children;return e}Qhe.Row=nQn;Qhe.Cell=eQn;function iQn(t){QD(t);var e=t.children,n=t.stickyOffsets,i=t.flattenColumns,r=Fh($m,"prefixCls"),o=i.length-1,s=i[o],a=b.useMemo(function(){return{stickyOffsets:n,flattenColumns:i,scrollColumnIndex:s!=null&&s.scrollbar?o:null}},[s,i,o,n]);return b.createElement(kAt.Provider,{value:a},b.createElement("tfoot",{className:"".concat(r,"-summary")},e))}const qZ=v6(iQn);var MAt=Qhe;function rQn(t){return null}function oQn(t){return null}function LAt(t,e,n,i,r,o,s){t.push({record:e,indent:n,index:s});var a=o(e),l=r==null?void 0:r.has(a);if(e&&Array.isArray(e[i])&&l)for(var c=0;c<e[i].length;c+=1)LAt(t,e[i][c],n+1,i,r,o,c)}function TAt(t,e,n,i){var r=b.useMemo(function(){if(n!=null&&n.size){for(var o=[],s=0;s<(t==null?void 0:t.length);s+=1){var a=t[s];LAt(o,a,0,e,n,i,s)}return o}return t==null?void 0:t.map(function(l,c){return{record:l,indent:0,index:c}})},[t,e,n,i]);return r}function IAt(t,e,n,i){var r=Fh($m,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),o=r.flattenColumns,s=r.expandableType,a=r.expandedKeys,l=r.childrenColumnName,c=r.onTriggerExpand,u=r.rowExpandable,d=r.onRow,h=r.expandRowByClick,f=r.rowClassName,m=s==="nest",p=s==="row"&&(!u||u(t)),g=p||m,y=a&&a.has(e),_=l&&t&&t[l],w=gr(c),C=d==null?void 0:d(t,n),N=C==null?void 0:C.onClick,E=function(T){h&&g&&c(t,T);for(var A=arguments.length,R=new Array(A>1?A-1:0),P=1;P<A;P++)R[P-1]=arguments[P];N==null||N.apply(void 0,[T].concat(R))},D;typeof f=="string"?D=f:typeof f=="function"&&(D=f(t,n,i));var k=Zhe(o);return Ie(Ie({},r),{},{columnsKey:k,nestExpandable:m,expanded:y,hasNestChildren:_,record:t,onTriggerExpand:w,rowSupportExpand:p,expandable:g,rowProps:Ie(Ie({},C),{},{className:Me(D,C==null?void 0:C.className),onClick:E})})}function AAt(t){QD(t);var e=t.prefixCls,n=t.children,i=t.component,r=t.cellComponent,o=t.className,s=t.expanded,a=t.colSpan,l=t.isEmpty,c=Fh($m,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),u=c.scrollbarSize,d=c.fixHeader,h=c.fixColumn,f=c.componentWidth,m=c.horizonScroll,p=n;return(l?m&&f:h)&&(p=b.createElement("div",{style:{width:f-(d&&!l?u:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(e,"-expanded-row-fixed")},p)),b.createElement(i,{className:o,style:{display:s?null:"none"}},b.createElement(y6,{component:r,prefixCls:e,colSpan:a},p))}function RAt(t,e,n,i,r){var o=t.record,s=t.prefixCls,a=t.columnsKey,l=t.fixedInfoList,c=t.expandIconColumnIndex,u=t.nestExpandable,d=t.indentSize,h=t.expandIcon,f=t.expanded,m=t.hasNestChildren,p=t.onTriggerExpand,g=a[n],y=l[n],_;n===(c||0)&&u&&(_=b.createElement(b.Fragment,null,b.createElement("span",{style:{paddingLeft:"".concat(d*i,"px")},className:"".concat(s,"-row-indent indent-level-").concat(i)}),h({prefixCls:s,expanded:f,expandable:m,record:o,onExpand:p})));var w;return e.onCell&&(w=e.onCell(o,r)),{key:g,fixedInfo:y,appendCellNode:_,additionalCellProps:w||{}}}function PAt(t){QD(t);var e=t.className,n=t.style,i=t.record,r=t.index,o=t.renderIndex,s=t.rowKey,a=t.indent,l=a===void 0?0:a,c=t.rowComponent,u=t.cellComponent,d=t.scopeCellComponent,h=IAt(i,s,r,l),f=h.prefixCls,m=h.flattenColumns,p=h.expandedRowClassName,g=h.expandedRowRender,y=h.rowProps,_=h.expanded,w=h.rowSupportExpand,C=b.useRef(!1);C.current||(C.current=_),QD(t);var N=p&&p(i,r,l),E=b.createElement(c,lt({},y,{"data-row-key":s,className:Me(e,"".concat(f,"-row"),"".concat(f,"-row-level-").concat(l),y==null?void 0:y.className,l>=1?N:""),style:Ie(Ie({},n),y==null?void 0:y.style)}),m.map(function(M,T){var A=M.render,R=M.dataIndex,P=M.className,O=RAt(h,M,T,l,r),V=O.key,F=O.fixedInfo,$=O.appendCellNode,B=O.additionalCellProps;return b.createElement(y6,lt({className:P,ellipsis:M.ellipsis,align:M.align,scope:M.rowScope,component:M.rowScope?d:u,prefixCls:f,key:V,record:i,index:r,renderIndex:o,dataIndex:R,render:A,shouldCellUpdate:M.shouldCellUpdate},F,{appendNode:$,additionalProps:B}))})),D;if(w&&(C.current||_)){var k=g(i,r,l+1,_);D=b.createElement(AAt,{expanded:_,className:Me("".concat(f,"-expanded-row"),"".concat(f,"-expanded-row-level-").concat(l+1),N),prefixCls:f,component:c,cellComponent:u,colSpan:m.length,isEmpty:!1},k)}return b.createElement(b.Fragment,null,E,D)}PAt.displayName="BodyRow";const sQn=v6(PAt);function aQn(t){var e=t.columnKey,n=t.onColumnResize,i=b.useRef();return b.useEffect(function(){i.current&&n(e,i.current.offsetWidth)},[]),b.createElement(Kd,{data:e},b.createElement("td",{ref:i,style:{padding:0,border:0,height:0}},b.createElement("div",{style:{height:0,overflow:"hidden"}}," ")))}function lQn(t){var e=t.prefixCls,n=t.columnsKey,i=t.onColumnResize;return b.createElement("tr",{"aria-hidden":"true",className:"".concat(e,"-measure-row"),style:{height:0,fontSize:0}},b.createElement(Kd.Collection,{onBatchResize:function(o){o.forEach(function(s){var a=s.data,l=s.size;i(a,l.offsetWidth)})}},n.map(function(r){return b.createElement(aQn,{key:r,columnKey:r,onColumnResize:i})})))}function OAt(t){QD(t);var e=t.data,n=t.measureColumnWidth,i=Fh($m,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),r=i.prefixCls,o=i.getComponent,s=i.onColumnResize,a=i.flattenColumns,l=i.getRowKey,c=i.expandedKeys,u=i.childrenColumnName,d=i.emptyNode,h=TAt(e,u,c,l),f=b.useRef({renderWithProps:!1}),m=o(["body","wrapper"],"tbody"),p=o(["body","row"],"tr"),g=o(["body","cell"],"td"),y=o(["body","cell"],"th"),_;e.length?_=h.map(function(C,N){var E=C.record,D=C.indent,k=C.index,M=l(E,N);return b.createElement(sQn,{key:M,rowKey:M,record:E,index:N,renderIndex:k,rowComponent:p,cellComponent:g,scopeCellComponent:y,getRowKey:l,indent:D})}):_=b.createElement(AAt,{expanded:!0,className:"".concat(r,"-placeholder"),prefixCls:r,component:p,cellComponent:g,colSpan:a.length,isEmpty:!0},d);var w=Zhe(a);return b.createElement(DAt.Provider,{value:f.current},b.createElement(m,{className:"".concat(r,"-tbody")},n&&b.createElement(lQn,{prefixCls:r,columnsKey:w,onColumnResize:s}),_))}OAt.displayName="Body";const cQn=v6(OAt);var uQn=["expandable"],O9="RC_TABLE_INTERNAL_COL_DEFINE";function dQn(t){var e=t.expandable,n=di(t,uQn),i;return"expandable"in t?i=Ie(Ie({},n),e):(["indentSize","expandedRowKeys","defaultExpandedRowKeys","defaultExpandAllRows","expandedRowRender","expandRowByClick","expandIcon","onExpand","onExpandedRowsChange","expandedRowClassName","expandIconColumnIndex","showExpandColumn","title"].some(function(r){return r in t})&&ii(!1,"expanded related props have been moved into `expandable`."),i=n),i.showExpandColumn===!1&&(i.expandIconColumnIndex=-1),i}var hQn=["columnType"];function jAt(t){for(var e=t.colWidths,n=t.columns,i=t.columCount,r=Fh($m,["tableLayout"]),o=r.tableLayout,s=[],a=i||n.length,l=!1,c=a-1;c>=0;c-=1){var u=e[c],d=n&&n[c],h=void 0,f=void 0;if(d&&(h=d[O9],o==="auto"&&(f=d.minWidth)),u||f||h||l){var m=h||{};m.columnType;var p=di(m,hQn);s.unshift(b.createElement("col",lt({key:c,style:{width:u,minWidth:f}},p))),l=!0}}return b.createElement("colgroup",null,s)}var fQn=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function mQn(t,e){return b.useMemo(function(){for(var n=[],i=0;i<e;i+=1){var r=t[i];if(r!==void 0)n[i]=r;else return null}return n},[t.join("_"),e])}var FAt=b.forwardRef(function(t,e){QD(t);var n=t.className,i=t.noData,r=t.columns,o=t.flattenColumns,s=t.colWidths,a=t.columCount,l=t.stickyOffsets,c=t.direction,u=t.fixHeader,d=t.stickyTopOffset,h=t.stickyBottomOffset,f=t.stickyClassName,m=t.onScroll,p=t.maxContentScroll,g=t.children,y=di(t,fQn),_=Fh($m,["prefixCls","scrollbarSize","isSticky","getComponent"]),w=_.prefixCls,C=_.scrollbarSize,N=_.isSticky,E=_.getComponent,D=E(["header","table"],"table"),k=N&&!u?0:C,M=b.useRef(null),T=b.useCallback(function(B){jz(e,B),jz(M,B)},[]);b.useEffect(function(){var B;function z(H){var K=H,q=K.currentTarget,U=K.deltaX;U&&(m({currentTarget:q,scrollLeft:q.scrollLeft+U}),H.preventDefault())}return(B=M.current)===null||B===void 0||B.addEventListener("wheel",z,{passive:!1}),function(){var H;(H=M.current)===null||H===void 0||H.removeEventListener("wheel",z)}},[]);var A=b.useMemo(function(){return o.every(function(B){return B.width})},[o]),R=o[o.length-1],P={fixed:R?R.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(w,"-cell-scrollbar")}}},O=b.useMemo(function(){return k?[].concat(Ot(r),[P]):r},[k,r]),V=b.useMemo(function(){return k?[].concat(Ot(o),[P]):o},[k,o]),F=b.useMemo(function(){var B=l.right,z=l.left;return Ie(Ie({},l),{},{left:c==="rtl"?[].concat(Ot(z.map(function(H){return H+k})),[0]):z,right:c==="rtl"?B:[].concat(Ot(B.map(function(H){return H+k})),[0]),isSticky:N})},[k,l,N]),$=mQn(s,a);return b.createElement("div",{style:Ie({overflow:"hidden"},N?{top:d,bottom:h}:{}),ref:T,className:Me(n,ye({},f,!!f))},b.createElement(D,{style:{tableLayout:"fixed",visibility:i||$?null:"hidden"}},(!i||!p||A)&&b.createElement(jAt,{colWidths:$?[].concat(Ot($),[k]):[],columCount:a+1,columns:V}),g(Ie(Ie({},y),{},{stickyOffsets:F,columns:O,flattenColumns:V}))))});FAt.displayName="FixedHolder";const Vit=b.memo(FAt);var $At=function(e){var n=e.cells,i=e.stickyOffsets,r=e.flattenColumns,o=e.rowComponent,s=e.cellComponent,a=e.onHeaderRow,l=e.index,c=Fh($m,["prefixCls","direction"]),u=c.prefixCls,d=c.direction,h;a&&(h=a(n.map(function(m){return m.column}),l));var f=Zhe(n.map(function(m){return m.column}));return b.createElement(o,h,n.map(function(m,p){var g=m.column,y=v$e(m.colStart,m.colEnd,r,i,d),_;return g&&g.onHeaderCell&&(_=m.column.onHeaderCell(g)),b.createElement(y6,lt({},m,{scope:g.title?m.colSpan>1?"colgroup":"col":null,ellipsis:g.ellipsis,align:g.align,component:s,prefixCls:u,key:f[p]},y,{additionalProps:_,rowType:"header"}))}))};$At.displayName="HeaderRow";function pQn(t){var e=[];function n(s,a){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;e[l]=e[l]||[];var c=a,u=s.filter(Boolean).map(function(d){var h={key:d.key,className:d.className||"",children:d.title,column:d,colStart:c},f=1,m=d.children;return m&&m.length>0&&(f=n(m,c,l+1).reduce(function(p,g){return p+g},0),h.hasSubColumns=!0),"colSpan"in d&&(f=d.colSpan),"rowSpan"in d&&(h.rowSpan=d.rowSpan),h.colSpan=f,h.colEnd=h.colStart+f-1,e[l].push(h),c+=f,f});return u}n(t,0);for(var i=e.length,r=function(a){e[a].forEach(function(l){!("rowSpan"in l)&&!l.hasSubColumns&&(l.rowSpan=i-a)})},o=0;o<i;o+=1)r(o);return e}var gQn=function(e){QD(e);var n=e.stickyOffsets,i=e.columns,r=e.flattenColumns,o=e.onHeaderRow,s=Fh($m,["prefixCls","getComponent"]),a=s.prefixCls,l=s.getComponent,c=b.useMemo(function(){return pQn(i)},[i]),u=l(["header","wrapper"],"thead"),d=l(["header","row"],"tr"),h=l(["header","cell"],"th");return b.createElement(u,{className:"".concat(a,"-thead")},c.map(function(f,m){var p=b.createElement($At,{key:m,flattenColumns:r,cells:f,stickyOffsets:n,rowComponent:d,cellComponent:h,onHeaderRow:o,index:m});return p}))};const Bit=v6(gQn);function zit(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof e=="number"?e:e.endsWith("%")?t*parseFloat(e)/100:null}function bQn(t,e,n){return b.useMemo(function(){if(e&&e>0){var i=0,r=0;t.forEach(function(h){var f=zit(e,h.width);f?i+=f:r+=1});var o=Math.max(e,n),s=Math.max(o-i,r),a=r,l=s/r,c=0,u=t.map(function(h){var f=Ie({},h),m=zit(e,f.width);if(m)f.width=m;else{var p=Math.floor(l);f.width=a===1?s:p,s-=p,a-=1}return c+=f.width,f});if(c<o){var d=o/c;s=o,u.forEach(function(h,f){var m=Math.floor(h.width*d);h.width=f===u.length-1?s:m,s-=m})}return[u,Math.max(c,o)]}return[t,e]},[t,e,n])}var vQn=["children"],yQn=["fixed"];function y$e(t){return fc(t).filter(function(e){return b.isValidElement(e)}).map(function(e){var n=e.key,i=e.props,r=i.children,o=di(i,vQn),s=Ie({key:n},o);return r&&(s.children=y$e(r)),s})}function VAt(t){return t.filter(function(e){return e&&Un(e)==="object"&&!e.hidden}).map(function(e){var n=e.children;return n&&n.length>0?Ie(Ie({},e),{},{children:VAt(n)}):e})}function Cke(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return t.filter(function(n){return n&&Un(n)==="object"}).reduce(function(n,i,r){var o=i.fixed,s=o===!0?"left":o,a="".concat(e,"-").concat(r),l=i.children;return l&&l.length>0?[].concat(Ot(n),Ot(Cke(l,a).map(function(c){return Ie({fixed:s},c)}))):[].concat(Ot(n),[Ie(Ie({key:a},i),{},{fixed:s})])},[])}function _Qn(t){return t.map(function(e){var n=e.fixed,i=di(e,yQn),r=n;return n==="left"?r="right":n==="right"&&(r="left"),Ie({fixed:r},i)})}function xQn(t,e){var n=t.prefixCls,i=t.columns,r=t.children,o=t.expandable,s=t.expandedKeys,a=t.columnTitle,l=t.getRowKey,c=t.onTriggerExpand,u=t.expandIcon,d=t.rowExpandable,h=t.expandIconColumnIndex,f=t.direction,m=t.expandRowByClick,p=t.columnWidth,g=t.fixed,y=t.scrollWidth,_=t.clientWidth,w=b.useMemo(function(){var R=i||y$e(r)||[];return VAt(R.slice())},[i,r]),C=b.useMemo(function(){if(o){var R=w.slice();if(h>=0&&ii(!1,"`expandIconColumnIndex` is deprecated. Please use `Table.EXPAND_COLUMN` in `columns` instead."),!R.includes(J_)){var P=h||0;P>=0&&R.splice(P,0,J_)}R.filter(function(B){return B===J_}).length>1&&ii(!1,"There exist more than one `EXPAND_COLUMN` in `columns`.");var O=R.indexOf(J_);R=R.filter(function(B,z){return B!==J_||z===O});var V=w[O],F;(g==="left"||g)&&!h?F="left":(g==="right"||g)&&h===w.length?F="right":F=V?V.fixed:null;var $=ye(ye(ye(ye(ye(ye({},O9,{className:"".concat(n,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",a),"fixed",F),"className","".concat(n,"-row-expand-icon-cell")),"width",p),"render",function(z,H,K){var q=l(H,K),U=s.has(q),Y=d?d(H):!0,J=u({prefixCls:n,expanded:U,expandable:Y,record:H,onExpand:c});return m?b.createElement("span",{onClick:function(se){return se.stopPropagation()}},J):J});return R.map(function(B){return B===J_?$:B})}return w.includes(J_)&&ii(!1,"`expandable` is not config but there exist `EXPAND_COLUMN` in `columns`."),w.filter(function(B){return B!==J_})},[o,w,l,s,u,f]),N=b.useMemo(function(){var R=C;return e&&(R=e(R)),R.length||(R=[{render:function(){return null}}]),R},[e,C,f]),E=b.useMemo(function(){return f==="rtl"?_Qn(Cke(N)):Cke(N)},[N,f,y]),D=b.useMemo(function(){for(var R=-1,P=E.length-1;P>=0;P-=1){var O=E[P].fixed;if(O==="left"||O===!0){R=P;break}}if(R>=0)for(var V=0;V<=R;V+=1){var F=E[V].fixed;if(F!=="left"&&F!==!0)return!0}var $=E.findIndex(function(H){var K=H.fixed;return K==="right"});if($>=0)for(var B=$;B<E.length;B+=1){var z=E[B].fixed;if(z!=="right")return!0}return!1},[E]),k=bQn(E,y,_),M=He(k,2),T=M[0],A=M[1];return[N,T,A,D]}function wQn(t){var e=t.prefixCls,n=t.record,i=t.onExpand,r=t.expanded,o=t.expandable,s="".concat(e,"-row-expand-icon");if(!o)return b.createElement("span",{className:Me(s,"".concat(e,"-row-spaced"))});var a=function(c){i(n,c),c.stopPropagation()};return b.createElement("span",{className:Me(s,ye(ye({},"".concat(e,"-row-expanded"),r),"".concat(e,"-row-collapsed"),!r)),onClick:a})}function CQn(t,e,n){var i=[];function r(o){(o||[]).forEach(function(s,a){i.push(e(s,a)),r(s[n])})}return r(t),i}function SQn(t,e,n){var i=dQn(t),r=i.expandIcon,o=i.expandedRowKeys,s=i.defaultExpandedRowKeys,a=i.defaultExpandAllRows,l=i.expandedRowRender,c=i.onExpand,u=i.onExpandedRowsChange,d=i.childrenColumnName,h=r||wQn,f=d||"children",m=b.useMemo(function(){return l?"row":t.expandable&&t.internalHooks===iq&&t.expandable.__PARENT_RENDER_ICON__||e.some(function(N){return N&&Un(N)==="object"&&N[f]})?"nest":!1},[!!l,e]),p=b.useState(function(){return s||(a?CQn(e,n,f):[])}),g=He(p,2),y=g[0],_=g[1],w=b.useMemo(function(){return new Set(o||y||[])},[o,y]),C=b.useCallback(function(N){var E=n(N,e.indexOf(N)),D,k=w.has(E);k?(w.delete(E),D=Ot(w)):D=[].concat(Ot(w),[E]),_(D),c&&c(!k,N),u&&u(D)},[n,w,e,c,u]);return l&&e.some(function(N){return Array.isArray(N==null?void 0:N[f])})&&ii(!1,"`expandedRowRender` should not use with nested Table"),[i,m,w,h,f,C]}function NQn(t,e,n){var i=t.map(function(r,o){return v$e(o,o,t,e,n)});return Hk(function(){return i},[i],function(r,o){return!jp(r,o)})}function BAt(t){var e=b.useRef(t),n=b.useState({}),i=He(n,2),r=i[1],o=b.useRef(null),s=b.useRef([]);function a(l){s.current.push(l);var c=Promise.resolve();o.current=c,c.then(function(){if(o.current===c){var u=s.current,d=e.current;s.current=[],u.forEach(function(h){e.current=h(e.current)}),o.current=null,d!==e.current&&r({})}})}return b.useEffect(function(){return function(){o.current=null}},[]),[e.current,a]}function EQn(t){var e=b.useRef(null),n=b.useRef();function i(){window.clearTimeout(n.current)}function r(s){e.current=s,i(),n.current=window.setTimeout(function(){e.current=null,n.current=void 0},100)}function o(){return e.current}return b.useEffect(function(){return i},[]),[r,o]}function DQn(){var t=b.useState(-1),e=He(t,2),n=e[0],i=e[1],r=b.useState(-1),o=He(r,2),s=o[0],a=o[1],l=b.useCallback(function(c,u){i(c),a(u)},[]);return[n,s,l]}var Hit=Lu()?window:null;function kQn(t,e){var n=Un(t)==="object"?t:{},i=n.offsetHeader,r=i===void 0?0:i,o=n.offsetSummary,s=o===void 0?0:o,a=n.offsetScroll,l=a===void 0?0:a,c=n.getContainer,u=c===void 0?function(){return Hit}:c,d=u()||Hit,h=!!t;return b.useMemo(function(){return{isSticky:h,stickyClassName:h?"".concat(e,"-sticky-holder"):"",offsetHeader:r,offsetSummary:s,offsetScroll:l,container:d}},[h,l,r,s,e,d])}function MQn(t,e,n){var i=b.useMemo(function(){var r=e.length,o=function(c,u,d){for(var h=[],f=0,m=c;m!==u;m+=d)h.push(f),e[m].fixed&&(f+=t[m]||0);return h},s=o(0,r,1),a=o(r-1,-1,-1).reverse();return n==="rtl"?{left:a,right:s}:{left:s,right:a}},[t,e,n]);return i}function Wit(t){var e=t.className,n=t.children;return b.createElement("div",{className:e},n)}var LQn=function(e,n){var i,r,o=e.scrollBodyRef,s=e.onScroll,a=e.offsetScroll,l=e.container,c=Fh($m,"prefixCls"),u=((i=o.current)===null||i===void 0?void 0:i.scrollWidth)||0,d=((r=o.current)===null||r===void 0?void 0:r.clientWidth)||0,h=u&&d*(d/u),f=b.useRef(),m=BAt({scrollLeft:0,isHiddenScrollBar:!0}),p=He(m,2),g=p[0],y=p[1],_=b.useRef({delta:0,x:0}),w=b.useState(!1),C=He(w,2),N=C[0],E=C[1],D=b.useRef(null);b.useEffect(function(){return function(){Dr.cancel(D.current)}},[]);var k=function(){E(!1)},M=function(O){O.persist(),_.current.delta=O.pageX-g.scrollLeft,_.current.x=0,E(!0),O.preventDefault()},T=function(O){var V,F=O||((V=window)===null||V===void 0?void 0:V.event),$=F.buttons;if(!N||$===0){N&&E(!1);return}var B=_.current.x+O.pageX-_.current.x-_.current.delta;B<=0&&(B=0),B+h>=d&&(B=d-h),s({scrollLeft:B/d*(u+2)}),_.current.x=O.pageX},A=function(){D.current=Dr(function(){if(o.current){var O=mke(o.current).top,V=O+o.current.offsetHeight,F=l===window?document.documentElement.scrollTop+window.innerHeight:mke(l).top+l.clientHeight;V-Ntt()<=F||O>=F-a?y(function($){return Ie(Ie({},$),{},{isHiddenScrollBar:!0})}):y(function($){return Ie(Ie({},$),{},{isHiddenScrollBar:!1})})}})},R=function(O){y(function(V){return Ie(Ie({},V),{},{scrollLeft:O/u*d||0})})};return b.useImperativeHandle(n,function(){return{setScrollLeft:R,checkScrollBarVisible:A}}),b.useEffect(function(){var P=Ax(document.body,"mouseup",k,!1),O=Ax(document.body,"mousemove",T,!1);return A(),function(){P.remove(),O.remove()}},[h,N]),b.useEffect(function(){var P=Ax(l,"scroll",A,!1),O=Ax(window,"resize",A,!1);return function(){P.remove(),O.remove()}},[l]),b.useEffect(function(){g.isHiddenScrollBar||y(function(P){var O=o.current;return O?Ie(Ie({},P),{},{scrollLeft:O.scrollLeft/O.scrollWidth*O.clientWidth}):P})},[g.isHiddenScrollBar]),u<=d||!h||g.isHiddenScrollBar?null:b.createElement("div",{style:{height:Ntt(),width:d,bottom:a},className:"".concat(c,"-sticky-scroll")},b.createElement("div",{onMouseDown:M,ref:f,className:Me("".concat(c,"-sticky-scroll-bar"),ye({},"".concat(c,"-sticky-scroll-bar-active"),N)),style:{width:"".concat(h,"px"),transform:"translate3d(".concat(g.scrollLeft,"px, 0, 0)")}}))};const TQn=b.forwardRef(LQn);var zAt="rc-table",IQn=[],AQn={};function RQn(){return"No Data"}function PQn(t,e){var n=Ie({rowKey:"key",prefixCls:zAt,emptyText:RQn},t),i=n.prefixCls,r=n.className,o=n.rowClassName,s=n.style,a=n.data,l=n.rowKey,c=n.scroll,u=n.tableLayout,d=n.direction,h=n.title,f=n.footer,m=n.summary,p=n.caption,g=n.id,y=n.showHeader,_=n.components,w=n.emptyText,C=n.onRow,N=n.onHeaderRow,E=n.onScroll,D=n.internalHooks,k=n.transformColumns,M=n.internalRefs,T=n.tailor,A=n.getContainerWidth,R=n.sticky,P=n.rowHoverable,O=P===void 0?!0:P,V=a||IQn,F=!!V.length,$=D===iq;["onRowClick","onRowDoubleClick","onRowContextMenu","onRowMouseEnter","onRowMouseLeave"].forEach(function(Hn){ii(n[Hn]===void 0,"`".concat(Hn,"` is removed, please use `onRow` instead."))}),ii(!("getBodyWrapper"in n),"`getBodyWrapper` is deprecated, please use custom `components` instead.");var B=b.useCallback(function(Hn,cn){return zg(_,Hn)||cn},[_]),z=b.useMemo(function(){return typeof l=="function"?l:function(Hn){var cn=Hn&&Hn[l];return ii(cn!==void 0,"Each record in table should have a unique `key` prop, or set `rowKey` to an unique primary key."),cn}},[l]),H=B(["body"]),K=DQn(),q=He(K,3),U=q[0],Y=q[1],J=q[2],ae=SQn(n,V,z),se=He(ae,6),oe=se[0],fe=se[1],de=se[2],ie=se[3],Q=se[4],be=se[5],le=c==null?void 0:c.x,Ne=b.useState(0),Le=He(Ne,2),Te=Le[0],De=Le[1],Pe=xQn(Ie(Ie(Ie({},n),oe),{},{expandable:!!oe.expandedRowRender,columnTitle:oe.columnTitle,expandedKeys:de,getRowKey:z,onTriggerExpand:be,expandIcon:ie,expandIconColumnIndex:oe.expandIconColumnIndex,direction:d,scrollWidth:$&&T&&typeof le=="number"?le:null,clientWidth:Te}),$?k:null),ge=He(Pe,4),he=ge[0],me=ge[1],X=ge[2],re=ge[3],we=X??le,ue=b.useMemo(function(){return{columns:he,flattenColumns:me}},[he,me]),Ce=b.useRef(),ze=b.useRef(),Ye=b.useRef(),Ke=b.useRef();b.useImperativeHandle(e,function(){return{nativeElement:Ce.current,scrollTo:function(cn){var Ui;if(Ye.current instanceof HTMLElement){var Pr=cn.index,bi=cn.top,zu=cn.key;if(qZn(bi)){var Ms;(Ms=Ye.current)===null||Ms===void 0||Ms.scrollTo({top:bi})}else{var Jl,Hu=zu??z(V[Pr]);(Jl=Ye.current.querySelector('[data-row-key="'.concat(Hu,'"]')))===null||Jl===void 0||Jl.scrollIntoView()}}else(Ui=Ye.current)!==null&&Ui!==void 0&&Ui.scrollTo&&Ye.current.scrollTo(cn)}}});var Xe=b.useRef(),it=b.useState(!1),ut=He(it,2),Ge=ut[0],Ee=ut[1],Se=b.useState(!1),je=He(Se,2),nt=je[0],rt=je[1],St=BAt(new Map),At=He(St,2),Nt=At[0],vt=At[1],$t=Zhe(me),ln=$t.map(function(Hn){return Nt.get(Hn)}),Jt=b.useMemo(function(){return ln},[ln.join("_")]),en=MQn(Jt,me,d),Ft=c&&wke(c.y),dn=c&&wke(we)||!!oe.fixed,Ze=dn&&me.some(function(Hn){var cn=Hn.fixed;return cn}),dt=b.useRef(),at=kQn(R,i),mt=at.isSticky,It=at.offsetHeader,Ve=at.offsetSummary,bt=at.offsetScroll,wt=at.stickyClassName,$e=at.container,We=b.useMemo(function(){return m==null?void 0:m(V)},[m,V]),tt=(Ft||mt)&&b.isValidElement(We)&&We.type===Qhe&&We.props.fixed,_t,ht,qe;Ft&&(ht={overflowY:F?"scroll":"auto",maxHeight:c.y}),dn&&(_t={overflowX:"auto"},Ft||(ht={overflowY:"hidden"}),qe={width:we===!0?"auto":we,minWidth:"100%"});var ft=b.useCallback(function(Hn,cn){r6(Ce.current)&&vt(function(Ui){if(Ui.get(Hn)!==cn){var Pr=new Map(Ui);return Pr.set(Hn,cn),Pr}return Ui})},[]),Ct=EQn(),Pt=He(Ct,2),an=Pt[0],_n=Pt[1];function on(Hn,cn){cn&&(typeof cn=="function"?cn(Hn):cn.scrollLeft!==Hn&&(cn.scrollLeft=Hn,cn.scrollLeft!==Hn&&setTimeout(function(){cn.scrollLeft=Hn},0)))}var yn=gr(function(Hn){var cn=Hn.currentTarget,Ui=Hn.scrollLeft,Pr=d==="rtl",bi=typeof Ui=="number"?Ui:cn.scrollLeft,zu=cn||AQn;if(!_n()||_n()===zu){var Ms;an(zu),on(bi,ze.current),on(bi,Ye.current),on(bi,Xe.current),on(bi,(Ms=dt.current)===null||Ms===void 0?void 0:Ms.setScrollLeft)}var Jl=cn||ze.current;if(Jl){var Hu=typeof we=="number"?we:Jl.scrollWidth,sg=Jl.clientWidth;if(Hu===sg){Ee(!1),rt(!1);return}Pr?(Ee(-bi<Hu-sg),rt(-bi>0)):(Ee(bi>0),rt(bi<Hu-sg))}}),fi=gr(function(Hn){yn(Hn),E==null||E(Hn)}),oi=function(){if(dn&&Ye.current){var cn;yn({currentTarget:TFe(Ye.current),scrollLeft:(cn=Ye.current)===null||cn===void 0?void 0:cn.scrollLeft})}else Ee(!1),rt(!1)},Qi=function(cn){var Ui,Pr=cn.width;(Ui=dt.current)===null||Ui===void 0||Ui.checkScrollBarVisible();var bi=Ce.current?Ce.current.offsetWidth:Pr;$&&A&&Ce.current&&(bi=A(Ce.current,bi)||bi),bi!==Te&&(oi(),De(bi))},mi=b.useRef(!1);b.useEffect(function(){mi.current&&oi()},[dn,a,he.length]),b.useEffect(function(){mi.current=!0},[]);var Vr=b.useState(0),_i=He(Vr,2),ur=_i[0],si=_i[1],Ii=b.useState(!0),Si=He(Ii,2),To=Si[0],ts=Si[1];b.useEffect(function(){(!T||!$)&&(Ye.current instanceof Element?si(ODe(Ye.current).width):si(ODe(Ke.current).width)),ts(qDe("position","sticky"))},[]),b.useEffect(function(){$&&M&&(M.body.current=Ye.current)});var La=b.useCallback(function(Hn){return b.createElement(b.Fragment,null,b.createElement(Bit,Hn),tt==="top"&&b.createElement(qZ,Hn,We))},[tt,We]),pc=b.useCallback(function(Hn){return b.createElement(qZ,Hn,We)},[We]),gc=B(["table"],"table"),ca=b.useMemo(function(){return u||(Ze?we==="max-content"?"auto":"fixed":Ft||mt||me.some(function(Hn){var cn=Hn.ellipsis;return cn})?"fixed":"auto")},[Ft,Ze,me,u,mt]),Nr,$i={colWidths:Jt,columCount:me.length,stickyOffsets:en,onHeaderRow:N,fixHeader:Ft,scroll:c},us=b.useMemo(function(){return F?null:typeof w=="function"?w():w},[F,w]),fr=b.createElement(cQn,{data:V,measureColumnWidth:Ft||dn||mt}),Gi=b.createElement(jAt,{colWidths:me.map(function(Hn){var cn=Hn.width;return cn}),columns:me}),zn=p!=null?b.createElement("caption",{className:"".concat(i,"-caption")},p):void 0,pi=Ll(n,{data:!0}),Tr=Ll(n,{aria:!0});if(Ft||mt){var vs;typeof H=="function"?(vs=H(V,{scrollbarSize:ur,ref:Ye,onScroll:yn}),$i.colWidths=me.map(function(Hn,cn){var Ui=Hn.width,Pr=cn===me.length-1?Ui-ur:Ui;return typeof Pr=="number"&&!Number.isNaN(Pr)?Pr:(ii(n.columns.length===0,"When use `components.body` with render props. Each column should have a fixed `width` value."),0)})):vs=b.createElement("div",{style:Ie(Ie({},_t),ht),onScroll:fi,ref:Ye,className:Me("".concat(i,"-body"))},b.createElement(gc,lt({style:Ie(Ie({},qe),{},{tableLayout:ca})},Tr),zn,Gi,fr,!tt&&We&&b.createElement(qZ,{stickyOffsets:en,flattenColumns:me},We)));var ua=Ie(Ie(Ie({noData:!V.length,maxContentScroll:dn&&we==="max-content"},$i),ue),{},{direction:d,stickyClassName:wt,onScroll:yn});Nr=b.createElement(b.Fragment,null,y!==!1&&b.createElement(Vit,lt({},ua,{stickyTopOffset:It,className:"".concat(i,"-header"),ref:ze}),La),vs,tt&&tt!=="top"&&b.createElement(Vit,lt({},ua,{stickyBottomOffset:Ve,className:"".concat(i,"-summary"),ref:Xe}),pc),mt&&Ye.current&&Ye.current instanceof Element&&b.createElement(TQn,{ref:dt,offsetScroll:bt,scrollBodyRef:Ye,onScroll:yn,container:$e}))}else Nr=b.createElement("div",{style:Ie(Ie({},_t),ht),className:Me("".concat(i,"-content")),onScroll:yn,ref:Ye},b.createElement(gc,lt({style:Ie(Ie({},qe),{},{tableLayout:ca})},Tr),zn,Gi,y!==!1&&b.createElement(Bit,lt({},$i,ue)),fr,We&&b.createElement(qZ,{stickyOffsets:en,flattenColumns:me},We)));var Al=b.createElement("div",lt({className:Me(i,r,ye(ye(ye(ye(ye(ye(ye(ye(ye(ye({},"".concat(i,"-rtl"),d==="rtl"),"".concat(i,"-ping-left"),Ge),"".concat(i,"-ping-right"),nt),"".concat(i,"-layout-fixed"),u==="fixed"),"".concat(i,"-fixed-header"),Ft),"".concat(i,"-fixed-column"),Ze),"".concat(i,"-fixed-column-gapped"),Ze&&re),"".concat(i,"-scroll-horizontal"),dn),"".concat(i,"-has-fix-left"),me[0]&&me[0].fixed),"".concat(i,"-has-fix-right"),me[me.length-1]&&me[me.length-1].fixed==="right")),style:s,id:g,ref:Ce},pi),h&&b.createElement(Wit,{className:"".concat(i,"-title")},h(V)),b.createElement("div",{ref:Ke,className:"".concat(i,"-container")},Nr),f&&b.createElement(Wit,{className:"".concat(i,"-footer")},f(V)));dn&&(Al=b.createElement(Kd,{onResize:Qi},Al));var bc=NQn(me,en,d),vc=b.useMemo(function(){return{scrollX:we,prefixCls:i,getComponent:B,scrollbarSize:ur,direction:d,fixedInfoList:bc,isSticky:mt,supportSticky:To,componentWidth:Te,fixHeader:Ft,fixColumn:Ze,horizonScroll:dn,tableLayout:ca,rowClassName:o,expandedRowClassName:oe.expandedRowClassName,expandIcon:ie,expandableType:fe,expandRowByClick:oe.expandRowByClick,expandedRowRender:oe.expandedRowRender,onTriggerExpand:be,expandIconColumnIndex:oe.expandIconColumnIndex,indentSize:oe.indentSize,allColumnsFixedLeft:me.every(function(Hn){return Hn.fixed==="left"}),emptyNode:us,columns:he,flattenColumns:me,onColumnResize:ft,hoverStartRow:U,hoverEndRow:Y,onHover:J,rowExpandable:oe.rowExpandable,onRow:C,getRowKey:z,expandedKeys:de,childrenColumnName:Q,rowHoverable:O}},[we,i,B,ur,d,bc,mt,To,Te,Ft,Ze,dn,ca,o,oe.expandedRowClassName,ie,fe,oe.expandRowByClick,oe.expandedRowRender,be,oe.expandIconColumnIndex,oe.indentSize,us,he,me,ft,U,Y,J,oe.rowExpandable,C,z,de,Q,O]);return b.createElement($m.Provider,{value:vc},Al)}var HAt=b.forwardRef(PQn);HAt.displayName="Table";function WAt(t){return NAt(HAt,t)}var _6=WAt();_6.EXPAND_COLUMN=J_;_6.INTERNAL_HOOKS=iq;_6.Column=rQn;_6.ColumnGroup=oQn;_6.Summary=MAt;var _$e=g$e(null),UAt=g$e(null);function OQn(t,e,n){var i=e||1;return n[t+i]-(n[t]||0)}function jQn(t){var e=t.rowInfo,n=t.column,i=t.colIndex,r=t.indent,o=t.index,s=t.component,a=t.renderIndex,l=t.record,c=t.style,u=t.className,d=t.inverse,h=t.getHeight,f=n.render,m=n.dataIndex,p=n.className,g=n.width,y=Fh(UAt,["columnsOffset"]),_=y.columnsOffset,w=RAt(e,n,i,r,o),C=w.key,N=w.fixedInfo,E=w.appendCellNode,D=w.additionalCellProps,k=D.style,M=D.colSpan,T=M===void 0?1:M,A=D.rowSpan,R=A===void 0?1:A,P=i-1,O=OQn(P,T,_),V=T>1?g-O:0,F=Ie(Ie(Ie({},k),c),{},{flex:"0 0 ".concat(O,"px"),width:"".concat(O,"px"),marginRight:V,pointerEvents:"auto"}),$=b.useMemo(function(){return d?R<=1:T===0||R===0||R>1},[R,T,d]);$?F.visibility="hidden":d&&(F.height=h==null?void 0:h(R));var B=$?function(){return null}:f,z={};return(R===0||T===0)&&(z.rowSpan=1,z.colSpan=1),b.createElement(y6,lt({className:Me(p,u),ellipsis:n.ellipsis,align:n.align,scope:n.rowScope,component:s,prefixCls:e.prefixCls,key:C,record:l,index:o,renderIndex:a,dataIndex:m,render:B,shouldCellUpdate:n.shouldCellUpdate},N,{appendNode:E,additionalProps:Ie(Ie({},D),{},{style:F},z)}))}var FQn=["data","index","className","rowKey","style","extra","getHeight"],$Qn=b.forwardRef(function(t,e){var n=t.data,i=t.index,r=t.className,o=t.rowKey,s=t.style,a=t.extra,l=t.getHeight,c=di(t,FQn),u=n.record,d=n.indent,h=n.index,f=Fh($m,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),m=f.scrollX,p=f.flattenColumns,g=f.prefixCls,y=f.fixColumn,_=f.componentWidth,w=Fh(_$e,["getComponent"]),C=w.getComponent,N=IAt(u,o,i,d),E=C(["body","row"],"div"),D=C(["body","cell"],"div"),k=N.rowSupportExpand,M=N.expanded,T=N.rowProps,A=N.expandedRowRender,R=N.expandedRowClassName,P;if(k&&M){var O=A(u,i,d+1,M),V=R==null?void 0:R(u,i,d),F={};y&&(F={style:ye({},"--virtual-width","".concat(_,"px"))});var $="".concat(g,"-expanded-row-cell");P=b.createElement(E,{className:Me("".concat(g,"-expanded-row"),"".concat(g,"-expanded-row-level-").concat(d+1),V)},b.createElement(y6,{component:D,prefixCls:g,className:Me($,ye({},"".concat($,"-fixed"),y)),additionalProps:F},O))}var B=Ie(Ie({},s),{},{width:m});a&&(B.position="absolute",B.pointerEvents="none");var z=b.createElement(E,lt({},T,c,{"data-row-key":o,ref:k?null:e,className:Me(r,"".concat(g,"-row"),T==null?void 0:T.className,ye({},"".concat(g,"-row-extra"),a)),style:Ie(Ie({},B),T==null?void 0:T.style)}),p.map(function(H,K){return b.createElement(jQn,{key:K,component:D,rowInfo:N,column:H,colIndex:K,indent:d,index:i,renderIndex:h,record:u,inverse:a,getHeight:l})}));return k?b.createElement("div",{ref:e},z,P):z}),Ske=v6($Qn);Ske.displayName="BodyLine";var VQn=b.forwardRef(function(t,e){var n=t.data,i=t.onScroll,r=Fh($m,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX"]),o=r.flattenColumns,s=r.onColumnResize,a=r.getRowKey,l=r.expandedKeys,c=r.prefixCls,u=r.childrenColumnName,d=r.scrollX,h=Fh(_$e),f=h.sticky,m=h.scrollY,p=h.listItemHeight,g=h.getComponent,y=h.onScroll,_=b.useRef(),w=TAt(n,u,l,a),C=b.useMemo(function(){var R=0;return o.map(function(P){var O=P.width,V=P.key;return R+=O,[V,O,R]})},[o]),N=b.useMemo(function(){return C.map(function(R){return R[2]})},[C]);b.useEffect(function(){C.forEach(function(R){var P=He(R,2),O=P[0],V=P[1];s(O,V)})},[C]),b.useImperativeHandle(e,function(){var R,P={scrollTo:function(V){var F;(F=_.current)===null||F===void 0||F.scrollTo(V)},nativeElement:(R=_.current)===null||R===void 0?void 0:R.nativeElement};return Object.defineProperty(P,"scrollLeft",{get:function(){var V;return((V=_.current)===null||V===void 0?void 0:V.getScrollInfo().x)||0},set:function(V){var F;(F=_.current)===null||F===void 0||F.scrollTo({left:V})}}),P});var E=function(P,O){var V,F=(V=w[O])===null||V===void 0?void 0:V.record,$=P.onCell;if($){var B,z=$(F,O);return(B=z==null?void 0:z.rowSpan)!==null&&B!==void 0?B:1}return 1},D=function(P){var O=P.start,V=P.end,F=P.getSize,$=P.offsetY;if(V<0)return null;for(var B=o.filter(function(de){return E(de,O)===0}),z=O,H=function(ie){if(B=B.filter(function(Q){return E(Q,ie)===0}),!B.length)return z=ie,1},K=O;K>=0&&!H(K);K-=1);for(var q=o.filter(function(de){return E(de,V)!==1}),U=V,Y=function(ie){if(q=q.filter(function(Q){return E(Q,ie)!==1}),!q.length)return U=Math.max(ie-1,V),1},J=V;J<w.length&&!Y(J);J+=1);for(var ae=[],se=function(ie){var Q=w[ie];if(!Q)return 1;o.some(function(be){return E(be,ie)>1})&&ae.push(ie)},oe=z;oe<=U;oe+=1)se(oe);var fe=ae.map(function(de){var ie=w[de],Q=a(ie.record,de),be=function(Le){var Te=de+Le-1,De=a(w[Te].record,Te),Pe=F(Q,De);return Pe.bottom-Pe.top},le=F(Q);return b.createElement(Ske,{key:de,data:ie,rowKey:Q,index:de,style:{top:-$+le.top},extra:!0,getHeight:be})});return fe},k=b.useMemo(function(){return{columnsOffset:N}},[N]),M="".concat(c,"-tbody"),T=g(["body","wrapper"]),A={};return f&&(A.position="sticky",A.bottom=0,Un(f)==="object"&&f.offsetScroll&&(A.bottom=f.offsetScroll)),b.createElement(UAt.Provider,{value:k},b.createElement(phe,{fullHeight:!1,ref:_,prefixCls:"".concat(M,"-virtual"),styles:{horizontalScrollBar:A},className:M,height:m,itemHeight:p||24,data:w,itemKey:function(P){return a(P.record)},component:T,scrollWidth:d,onVirtualScroll:function(P){var O,V=P.x;i({currentTarget:(O=_.current)===null||O===void 0?void 0:O.nativeElement,scrollLeft:V})},onScroll:y,extraRender:D},function(R,P,O){var V=a(R.record,P);return b.createElement(Ske,{data:R,rowKey:V,index:P,style:O.style})}))}),KAt=v6(VQn);KAt.displayName="ResponseGrid";var BQn=function(e,n){var i=n.ref,r=n.onScroll;return b.createElement(KAt,{ref:i,data:e,onScroll:r})};function zQn(t,e){var n=t.data,i=t.columns,r=t.scroll,o=t.sticky,s=t.prefixCls,a=s===void 0?zAt:s,l=t.className,c=t.listItemHeight,u=t.components,d=t.onScroll,h=r||{},f=h.x,m=h.y;typeof f!="number"&&(ii(!f,"`scroll.x` in virtual table must be number."),f=1),typeof m!="number"&&(m=500,ii(!1,"`scroll.y` in virtual table must be number."));var p=gr(function(_,w){return zg(u,_)||w}),g=gr(d),y=b.useMemo(function(){return{sticky:o,scrollY:m,listItemHeight:c,getComponent:p,onScroll:g}},[o,m,c,p,g]);return b.createElement(_$e.Provider,{value:y},b.createElement(_6,lt({},t,{className:Me(l,"".concat(a,"-virtual")),scroll:Ie(Ie({},r),{},{x:f}),components:Ie(Ie({},u),{},{body:n!=null&&n.length?BQn:void 0}),columns:i,internalHooks:iq,tailor:!0,ref:e})))}var qAt=b.forwardRef(zQn);qAt.displayName="VirtualTable";function GAt(t){return NAt(qAt,t)}GAt();const HQn=t=>null,WQn=t=>null;var x$e=b.createContext(null),UQn=function(e){for(var n=e.prefixCls,i=e.level,r=e.isStart,o=e.isEnd,s="".concat(n,"-indent-unit"),a=[],l=0;l<i;l+=1)a.push(b.createElement("span",{key:l,className:Me(s,ye(ye({},"".concat(s,"-start"),r[l]),"".concat(s,"-end"),o[l]))}));return b.createElement("span",{"aria-hidden":"true",className:"".concat(n,"-indent")},a)};const KQn=b.memo(UQn);var qQn=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],Uit="open",Kit="close",GQn="---",YQn=function(t){Zp(n,t);var e=pb(n);function n(){var i;Za(this,n);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=e.call.apply(e,[this].concat(o)),ye(bn(i),"state",{dragNodeHighlight:!1}),ye(bn(i),"selectHandle",void 0),ye(bn(i),"cacheIndent",void 0),ye(bn(i),"onSelectorClick",function(a){var l=i.props.context.onNodeClick;l(a,_u(i.props)),i.isSelectable()?i.onSelect(a):i.onCheck(a)}),ye(bn(i),"onSelectorDoubleClick",function(a){var l=i.props.context.onNodeDoubleClick;l(a,_u(i.props))}),ye(bn(i),"onSelect",function(a){if(!i.isDisabled()){var l=i.props.context.onNodeSelect;l(a,_u(i.props))}}),ye(bn(i),"onCheck",function(a){if(!i.isDisabled()){var l=i.props,c=l.disableCheckbox,u=l.checked,d=i.props.context.onNodeCheck;if(!(!i.isCheckable()||c)){var h=!u;d(a,_u(i.props),h)}}}),ye(bn(i),"onMouseEnter",function(a){var l=i.props.context.onNodeMouseEnter;l(a,_u(i.props))}),ye(bn(i),"onMouseLeave",function(a){var l=i.props.context.onNodeMouseLeave;l(a,_u(i.props))}),ye(bn(i),"onContextMenu",function(a){var l=i.props.context.onNodeContextMenu;l(a,_u(i.props))}),ye(bn(i),"onDragStart",function(a){var l=i.props.context.onNodeDragStart;a.stopPropagation(),i.setState({dragNodeHighlight:!0}),l(a,bn(i));try{a.dataTransfer.setData("text/plain","")}catch{}}),ye(bn(i),"onDragEnter",function(a){var l=i.props.context.onNodeDragEnter;a.preventDefault(),a.stopPropagation(),l(a,bn(i))}),ye(bn(i),"onDragOver",function(a){var l=i.props.context.onNodeDragOver;a.preventDefault(),a.stopPropagation(),l(a,bn(i))}),ye(bn(i),"onDragLeave",function(a){var l=i.props.context.onNodeDragLeave;a.stopPropagation(),l(a,bn(i))}),ye(bn(i),"onDragEnd",function(a){var l=i.props.context.onNodeDragEnd;a.stopPropagation(),i.setState({dragNodeHighlight:!1}),l(a,bn(i))}),ye(bn(i),"onDrop",function(a){var l=i.props.context.onNodeDrop;a.preventDefault(),a.stopPropagation(),i.setState({dragNodeHighlight:!1}),l(a,bn(i))}),ye(bn(i),"onExpand",function(a){var l=i.props,c=l.loading,u=l.context.onNodeExpand;c||u(a,_u(i.props))}),ye(bn(i),"setSelectHandle",function(a){i.selectHandle=a}),ye(bn(i),"getNodeState",function(){var a=i.props.expanded;return i.isLeaf()?null:a?Uit:Kit}),ye(bn(i),"hasChildren",function(){var a=i.props.eventKey,l=i.props.context.keyEntities,c=dp(l,a)||{},u=c.children;return!!(u||[]).length}),ye(bn(i),"isLeaf",function(){var a=i.props,l=a.isLeaf,c=a.loaded,u=i.props.context.loadData,d=i.hasChildren();return l===!1?!1:l||!u&&!d||u&&c&&!d}),ye(bn(i),"isDisabled",function(){var a=i.props.disabled,l=i.props.context.disabled;return!!(l||a)}),ye(bn(i),"isCheckable",function(){var a=i.props.checkable,l=i.props.context.checkable;return!l||a===!1?!1:l}),ye(bn(i),"syncLoadData",function(a){var l=a.expanded,c=a.loading,u=a.loaded,d=i.props.context,h=d.loadData,f=d.onNodeLoad;c||h&&l&&!i.isLeaf()&&!u&&f(_u(i.props))}),ye(bn(i),"isDraggable",function(){var a=i.props,l=a.data,c=a.context.draggable;return!!(c&&(!c.nodeDraggable||c.nodeDraggable(l)))}),ye(bn(i),"renderDragHandler",function(){var a=i.props.context,l=a.draggable,c=a.prefixCls;return l!=null&&l.icon?b.createElement("span",{className:"".concat(c,"-draggable-icon")},l.icon):null}),ye(bn(i),"renderSwitcherIconDom",function(a){var l=i.props.switcherIcon,c=i.props.context.switcherIcon,u=l||c;return typeof u=="function"?u(Ie(Ie({},i.props),{},{isLeaf:a})):u}),ye(bn(i),"renderSwitcher",function(){var a=i.props.expanded,l=i.props.context.prefixCls;if(i.isLeaf()){var c=i.renderSwitcherIconDom(!0);return c!==!1?b.createElement("span",{className:Me("".concat(l,"-switcher"),"".concat(l,"-switcher-noop"))},c):null}var u=Me("".concat(l,"-switcher"),"".concat(l,"-switcher_").concat(a?Uit:Kit)),d=i.renderSwitcherIconDom(!1);return d!==!1?b.createElement("span",{onClick:i.onExpand,className:u},d):null}),ye(bn(i),"renderCheckbox",function(){var a=i.props,l=a.checked,c=a.halfChecked,u=a.disableCheckbox,d=i.props.context.prefixCls,h=i.isDisabled(),f=i.isCheckable();if(!f)return null;var m=typeof f!="boolean"?f:null;return b.createElement("span",{className:Me("".concat(d,"-checkbox"),l&&"".concat(d,"-checkbox-checked"),!l&&c&&"".concat(d,"-checkbox-indeterminate"),(h||u)&&"".concat(d,"-checkbox-disabled")),onClick:i.onCheck},m)}),ye(bn(i),"renderIcon",function(){var a=i.props.loading,l=i.props.context.prefixCls;return b.createElement("span",{className:Me("".concat(l,"-iconEle"),"".concat(l,"-icon__").concat(i.getNodeState()||"docu"),a&&"".concat(l,"-icon_loading"))})}),ye(bn(i),"renderSelector",function(){var a=i.state.dragNodeHighlight,l=i.props,c=l.title,u=c===void 0?GQn:c,d=l.selected,h=l.icon,f=l.loading,m=l.data,p=i.props.context,g=p.prefixCls,y=p.showIcon,_=p.icon,w=p.loadData,C=p.titleRender,N=i.isDisabled(),E="".concat(g,"-node-content-wrapper"),D;if(y){var k=h||_;D=k?b.createElement("span",{className:Me("".concat(g,"-iconEle"),"".concat(g,"-icon__customize"))},typeof k=="function"?k(i.props):k):i.renderIcon()}else w&&f&&(D=i.renderIcon());var M;typeof u=="function"?M=u(m):C?M=C(m):M=u;var T=b.createElement("span",{className:"".concat(g,"-title")},M);return b.createElement("span",{ref:i.setSelectHandle,title:typeof u=="string"?u:"",className:Me("".concat(E),"".concat(E,"-").concat(i.getNodeState()||"normal"),!N&&(d||a)&&"".concat(g,"-node-selected")),onMouseEnter:i.onMouseEnter,onMouseLeave:i.onMouseLeave,onContextMenu:i.onContextMenu,onClick:i.onSelectorClick,onDoubleClick:i.onSelectorDoubleClick},D,T,i.renderDropIndicator())}),ye(bn(i),"renderDropIndicator",function(){var a=i.props,l=a.disabled,c=a.eventKey,u=i.props.context,d=u.draggable,h=u.dropLevelOffset,f=u.dropPosition,m=u.prefixCls,p=u.indent,g=u.dropIndicatorRender,y=u.dragOverNodeKey,_=u.direction,w=!!d,C=!l&&w&&y===c,N=p??i.cacheIndent;return i.cacheIndent=p,C?g({dropPosition:f,dropLevelOffset:h,indent:N,prefixCls:m,direction:_}):null}),i}return Qa(n,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var r=this.props.selectable,o=this.props.context.selectable;return typeof r=="boolean"?r:o}},{key:"render",value:function(){var r,o=this.props,s=o.eventKey,a=o.className,l=o.style,c=o.dragOver,u=o.dragOverGapTop,d=o.dragOverGapBottom,h=o.isLeaf,f=o.isStart,m=o.isEnd,p=o.expanded,g=o.selected,y=o.checked,_=o.halfChecked,w=o.loading,C=o.domRef,N=o.active;o.data;var E=o.onMouseMove,D=o.selectable,k=di(o,qQn),M=this.props.context,T=M.prefixCls,A=M.filterTreeNode,R=M.keyEntities,P=M.dropContainerKey,O=M.dropTargetKey,V=M.draggingNodeKey,F=this.isDisabled(),$=Ll(k,{aria:!0,data:!0}),B=dp(R,s)||{},z=B.level,H=m[m.length-1],K=this.isDraggable(),q=!F&&K,U=V===s,Y=D!==void 0?{"aria-selected":!!D}:void 0;return b.createElement("div",lt({ref:C,className:Me(a,"".concat(T,"-treenode"),(r={},ye(ye(ye(ye(ye(ye(ye(ye(ye(ye(r,"".concat(T,"-treenode-disabled"),F),"".concat(T,"-treenode-switcher-").concat(p?"open":"close"),!h),"".concat(T,"-treenode-checkbox-checked"),y),"".concat(T,"-treenode-checkbox-indeterminate"),_),"".concat(T,"-treenode-selected"),g),"".concat(T,"-treenode-loading"),w),"".concat(T,"-treenode-active"),N),"".concat(T,"-treenode-leaf-last"),H),"".concat(T,"-treenode-draggable"),K),"dragging",U),ye(ye(ye(ye(ye(ye(r,"drop-target",O===s),"drop-container",P===s),"drag-over",!F&&c),"drag-over-gap-top",!F&&u),"drag-over-gap-bottom",!F&&d),"filter-node",A&&A(_u(this.props))))),style:l,draggable:q,"aria-grabbed":U,onDragStart:q?this.onDragStart:void 0,onDragEnter:K?this.onDragEnter:void 0,onDragOver:K?this.onDragOver:void 0,onDragLeave:K?this.onDragLeave:void 0,onDrop:K?this.onDrop:void 0,onDragEnd:K?this.onDragEnd:void 0,onMouseMove:E},Y,$),b.createElement(KQn,{prefixCls:T,level:z,isStart:f,isEnd:m}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),n}(b.Component),Kj=function(e){return b.createElement(x$e.Consumer,null,function(n){return b.createElement(YQn,lt({},e,{context:n}))})};Kj.displayName="TreeNode";Kj.isTreeNode=1;function U_(t,e){if(!t)return[];var n=t.slice(),i=n.indexOf(e);return i>=0&&n.splice(i,1),n}function D1(t,e){var n=(t||[]).slice();return n.indexOf(e)===-1&&n.push(e),n}function w$e(t){return t.split("-")}function XQn(t,e){var n=[],i=dp(e,t);function r(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(s){var a=s.key,l=s.children;n.push(a),r(l)})}return r(i.children),n}function ZQn(t){if(t.parent){var e=w$e(t.pos);return Number(e[e.length-1])===t.parent.children.length-1}return!1}function QQn(t){var e=w$e(t.pos);return Number(e[e.length-1])===0}function qit(t,e,n,i,r,o,s,a,l,c){var u,d=t.clientX,h=t.clientY,f=t.target.getBoundingClientRect(),m=f.top,p=f.height,g=(c==="rtl"?-1:1)*(((r==null?void 0:r.x)||0)-d),y=(g-12)/i,_=l.filter(function(F){var $;return($=a[F])===null||$===void 0||($=$.children)===null||$===void 0?void 0:$.length}),w=dp(a,n.props.eventKey);if(h<m+p/2){var C=s.findIndex(function(F){return F.key===w.key}),N=C<=0?0:C-1,E=s[N].key;w=dp(a,E)}var D=w.key,k=w,M=w.key,T=0,A=0;if(!_.includes(D))for(var R=0;R<y&&ZQn(w);R+=1)w=w.parent,A+=1;var P=e.props.data,O=w.node,V=!0;return QQn(w)&&w.level===0&&h<m+p/2&&o({dragNode:P,dropNode:O,dropPosition:-1})&&w.key===n.props.eventKey?T=-1:(k.children||[]).length&&_.includes(M)?o({dragNode:P,dropNode:O,dropPosition:0})?T=0:V=!1:A===0?y>-1.5?o({dragNode:P,dropNode:O,dropPosition:1})?T=1:V=!1:o({dragNode:P,dropNode:O,dropPosition:0})?T=0:o({dragNode:P,dropNode:O,dropPosition:1})?T=1:V=!1:o({dragNode:P,dropNode:O,dropPosition:1})?T=1:V=!1,{dropPosition:T,dropLevelOffset:A,dropTargetKey:w.key,dropTargetPos:w.pos,dragOverNodeKey:M,dropContainerKey:T===0?null:((u=w.parent)===null||u===void 0?void 0:u.key)||null,dropAllowed:V}}function Git(t,e){if(t){var n=e.multiple;return n?t.slice():t.length?[t[0]]:t}}function zxe(t){if(!t)return null;var e;if(Array.isArray(t))e={checkedKeys:t,halfCheckedKeys:void 0};else if(Un(t)==="object")e={checkedKeys:t.checked||void 0,halfCheckedKeys:t.halfChecked||void 0};else return ii(!1,"`checkedKeys` is not an array or an object"),null;return e}function Nke(t,e){var n=new Set;function i(r){if(!n.has(r)){var o=dp(e,r);if(o){n.add(r);var s=o.parent,a=o.node;a.disabled||s&&i(s.key)}}}return(t||[]).forEach(function(r){i(r)}),Ot(n)}function JQn(t){const[e,n]=b.useState(null);return[b.useCallback((o,s,a)=>{const l=e??o,c=Math.min(l||0,o),u=Math.max(l||0,o),d=s.slice(c,u+1).map(m=>t(m)),h=d.some(m=>!a.has(m)),f=[];return d.forEach(m=>{h?(a.has(m)||f.push(m),a.add(m)):(a.delete(m),f.push(m))}),n(h?u:null),f},[e]),o=>{n(o)}]}const K_={},Eke="SELECT_ALL",Dke="SELECT_INVERT",kke="SELECT_NONE",Yit=[],YAt=(t,e)=>{let n=[];return(e||[]).forEach(i=>{n.push(i),i&&typeof i=="object"&&t in i&&(n=[].concat(Ot(n),Ot(YAt(t,i[t]))))}),n},eJn=(t,e)=>{const{preserveSelectedRowKeys:n,selectedRowKeys:i,defaultSelectedRowKeys:r,getCheckboxProps:o,onChange:s,onSelect:a,onSelectAll:l,onSelectInvert:c,onSelectNone:u,onSelectMultiple:d,columnWidth:h,type:f,selections:m,fixed:p,renderCell:g,hideSelectAll:y,checkStrictly:_=!0}=e||{},{prefixCls:w,data:C,pageData:N,getRecordByKey:E,getRowKey:D,expandType:k,childrenColumnName:M,locale:T,getPopupContainer:A}=t,R=Cr("Table"),[P,O]=JQn(ie=>ie),[V,F]=ho(i||r||Yit,{value:i}),$=b.useRef(new Map),B=b.useCallback(ie=>{if(n){const Q=new Map;ie.forEach(be=>{let le=E(be);!le&&$.current.has(be)&&(le=$.current.get(be)),Q.set(be,le)}),$.current=Q}},[E,n]);b.useEffect(()=>{B(V)},[V]);const z=b.useMemo(()=>YAt(M,N),[M,N]),{keyEntities:H}=b.useMemo(()=>{if(_)return{keyEntities:null};let ie=C;if(n){const Q=new Set(z.map((le,Ne)=>D(le,Ne))),be=Array.from($.current).reduce((le,Ne)=>{let[Le,Te]=Ne;return Q.has(Le)?le:le.concat(Te)},[]);ie=[].concat(Ot(ie),Ot(be))}return H6e(ie,{externalGetKey:D,childrenPropName:M})},[C,D,_,M,n,z]),K=b.useMemo(()=>{const ie=new Map;return z.forEach((Q,be)=>{const le=D(Q,be),Ne=(o?o(Q):null)||{};ie.set(le,Ne),R(!("checked"in Ne||"defaultChecked"in Ne),"usage","Do not set `checked` or `defaultChecked` in `getCheckboxProps`. Please use `selectedRowKeys` instead.")}),ie},[z,D,o]),q=b.useCallback(ie=>{var Q;return!!(!((Q=K.get(D(ie)))===null||Q===void 0)&&Q.disabled)},[K,D]),[U,Y]=b.useMemo(()=>{if(_)return[V||[],[]];const{checkedKeys:ie,halfCheckedKeys:Q}=h3(V,!0,H,q);return[ie||[],Q]},[V,_,H,q]),J=b.useMemo(()=>{const ie=f==="radio"?U.slice(0,1):U;return new Set(ie)},[U,f]),ae=b.useMemo(()=>f==="radio"?new Set:new Set(Y),[Y,f]);b.useEffect(()=>{e||F(Yit)},[!!e]);const se=b.useCallback((ie,Q)=>{let be,le;B(ie),n?(be=ie,le=ie.map(Ne=>$.current.get(Ne))):(be=[],le=[],ie.forEach(Ne=>{const Le=E(Ne);Le!==void 0&&(be.push(Ne),le.push(Le))})),F(be),s==null||s(be,le,{type:Q})},[F,E,s,n]),oe=b.useCallback((ie,Q,be,le)=>{if(a){const Ne=be.map(Le=>E(Le));a(E(ie),Q,Ne,le)}se(be,"single")},[a,E,se]),fe=b.useMemo(()=>!m||y?null:(m===!0?[Eke,Dke,kke]:m).map(Q=>Q===Eke?{key:"all",text:T.selectionAll,onSelect(){se(C.map((be,le)=>D(be,le)).filter(be=>{const le=K.get(be);return!(le!=null&&le.disabled)||J.has(be)}),"all")}}:Q===Dke?{key:"invert",text:T.selectInvert,onSelect(){const be=new Set(J);N.forEach((Ne,Le)=>{const Te=D(Ne,Le),De=K.get(Te);De!=null&&De.disabled||(be.has(Te)?be.delete(Te):be.add(Te))});const le=Array.from(be);c&&(R.deprecated(!1,"onSelectInvert","onChange"),c(le)),se(le,"invert")}}:Q===kke?{key:"none",text:T.selectNone,onSelect(){u==null||u(),se(Array.from(J).filter(be=>{const le=K.get(be);return le==null?void 0:le.disabled}),"none")}}:Q).map(Q=>Object.assign(Object.assign({},Q),{onSelect:function(){for(var be,le,Ne=arguments.length,Le=new Array(Ne),Te=0;Te<Ne;Te++)Le[Te]=arguments[Te];(le=Q.onSelect)===null||le===void 0||(be=le).call.apply(be,[Q].concat(Le)),O(null)}})),[m,J,N,D,c,se]);return[b.useCallback(ie=>{var Q;if(!e)return R(!ie.includes(K_),"usage","`rowSelection` is not config but `SELECTION_COLUMN` exists in the `columns`."),ie.filter(Ke=>Ke!==K_);let be=Ot(ie);const le=new Set(J),Ne=z.map(D).filter(Ke=>!K.get(Ke).disabled),Le=Ne.every(Ke=>le.has(Ke)),Te=Ne.some(Ke=>le.has(Ke)),De=()=>{const Ke=[];Le?Ne.forEach(it=>{le.delete(it),Ke.push(it)}):Ne.forEach(it=>{le.has(it)||(le.add(it),Ke.push(it))});const Xe=Array.from(le);l==null||l(!Le,Xe.map(it=>E(it)),Ke.map(it=>E(it))),se(Xe,"all"),O(null)};let Pe,ge;if(f!=="radio"){let Ke;if(fe){const Ee={getPopupContainer:A,items:fe.map((Se,je)=>{const{key:nt,text:rt,onSelect:St}=Se;return{key:nt??je,onClick:()=>{St==null||St(Ne)},label:rt}})};Ke=b.createElement("div",{className:`${w}-selection-extra`},b.createElement(b6,{menu:Ee,getPopupContainer:A},b.createElement("span",null,b.createElement(h6,null))))}const Xe=z.map((Ee,Se)=>{const je=D(Ee,Se),nt=K.get(je)||{};return Object.assign({checked:le.has(je)},nt)}).filter(Ee=>{let{disabled:Se}=Ee;return Se}),it=!!Xe.length&&Xe.length===z.length,ut=it&&Xe.every(Ee=>{let{checked:Se}=Ee;return Se}),Ge=it&&Xe.some(Ee=>{let{checked:Se}=Ee;return Se});ge=b.createElement(I2,{checked:it?ut:!!z.length&&Le,indeterminate:it?!ut&&Ge:!Le&&Te,onChange:De,disabled:z.length===0||it,"aria-label":Ke?"Custom selection":"Select all",skipGroup:!0}),Pe=!y&&b.createElement("div",{className:`${w}-selection`},ge,Ke)}let he;f==="radio"?he=(Ke,Xe,it)=>{const ut=D(Xe,it),Ge=le.has(ut);return{node:b.createElement(Mc,Object.assign({},K.get(ut),{checked:Ge,onClick:Ee=>Ee.stopPropagation(),onChange:Ee=>{le.has(ut)||oe(ut,!0,[ut],Ee.nativeEvent)}})),checked:Ge}}:he=(Ke,Xe,it)=>{var ut;const Ge=D(Xe,it),Ee=le.has(Ge),Se=ae.has(Ge),je=K.get(Ge);let nt;return k==="nest"?(nt=Se,R(typeof(je==null?void 0:je.indeterminate)!="boolean","usage","set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.")):nt=(ut=je==null?void 0:je.indeterminate)!==null&&ut!==void 0?ut:Se,{node:b.createElement(I2,Object.assign({},je,{indeterminate:nt,checked:Ee,skipGroup:!0,onClick:rt=>rt.stopPropagation(),onChange:rt=>{let{nativeEvent:St}=rt;const{shiftKey:At}=St,Nt=Ne.findIndex($t=>$t===Ge),vt=U.some($t=>Ne.includes($t));if(At&&_&&vt){const $t=P(Nt,Ne,le),ln=Array.from(le);d==null||d(!Ee,ln.map(Jt=>E(Jt)),$t.map(Jt=>E(Jt))),se(ln,"multiple")}else{const $t=U;if(_){const ln=Ee?U_($t,Ge):D1($t,Ge);oe(Ge,!Ee,ln,St)}else{const ln=h3([].concat(Ot($t),[Ge]),!0,H,q),{checkedKeys:Jt,halfCheckedKeys:en}=ln;let Ft=Jt;if(Ee){const dn=new Set(Jt);dn.delete(Ge),Ft=h3(Array.from(dn),{checked:!1,halfCheckedKeys:en},H,q).checkedKeys}oe(Ge,!Ee,Ft,St)}}O(Ee?null:Nt)}})),checked:Ee}};const me=(Ke,Xe,it)=>{const{node:ut,checked:Ge}=he(Ke,Xe,it);return g?g(Ge,Xe,it,ut):ut};if(!be.includes(K_))if(be.findIndex(Ke=>{var Xe;return((Xe=Ke[O9])===null||Xe===void 0?void 0:Xe.columnType)==="EXPAND_COLUMN"})===0){const[Ke,...Xe]=be;be=[Ke,K_].concat(Ot(Xe))}else be=[K_].concat(Ot(be));const X=be.indexOf(K_);R(be.filter(Ke=>Ke===K_).length<=1,"usage","Multiple `SELECTION_COLUMN` exist in `columns`."),be=be.filter((Ke,Xe)=>Ke!==K_||Xe===X);const re=be[X-1],we=be[X+1];let ue=p;ue===void 0&&((we==null?void 0:we.fixed)!==void 0?ue=we.fixed:(re==null?void 0:re.fixed)!==void 0&&(ue=re.fixed)),ue&&re&&((Q=re[O9])===null||Q===void 0?void 0:Q.columnType)==="EXPAND_COLUMN"&&re.fixed===void 0&&(re.fixed=ue);const Ce=Me(`${w}-selection-col`,{[`${w}-selection-col-with-dropdown`]:m&&f==="checkbox"}),ze=()=>e!=null&&e.columnTitle?typeof e.columnTitle=="function"?e.columnTitle(ge):e.columnTitle:Pe,Ye={fixed:ue,width:h,className:`${w}-selection-column`,title:ze(),render:me,onCell:e.onCell,[O9]:{className:Ce}};return be.map(Ke=>Ke===K_?Ye:Ke)},[D,z,e,U,J,ae,h,fe,k,K,d,oe,q]),J]};function tJn(t,e){return t._antProxy=t._antProxy||{},Object.keys(e).forEach(n=>{if(!(n in t._antProxy)){const i=t[n];t._antProxy[n]=i,t[n]=e[n]}}),t}function nJn(t,e){return b.useImperativeHandle(t,()=>{const n=e(),{nativeElement:i}=n;return typeof Proxy<"u"?new Proxy(i,{get(r,o){return n[o]?n[o]:Reflect.get(r,o)}}):tJn(i,n)})}function iJn(t){return e=>{const{prefixCls:n,onExpand:i,record:r,expanded:o,expandable:s}=e,a=`${n}-row-expand-icon`;return b.createElement("button",{type:"button",onClick:l=>{i(r,l),l.stopPropagation()},className:Me(a,{[`${a}-spaced`]:!s,[`${a}-expanded`]:s&&o,[`${a}-collapsed`]:s&&!o}),"aria-label":o?t.collapse:t.expand,"aria-expanded":o})}}function rJn(t){return(n,i)=>{const r=n.querySelector(`.${t}-container`);let o=i;if(r){const s=getComputedStyle(r),a=parseInt(s.borderLeftWidth,10),l=parseInt(s.borderRightWidth,10);o=i-a-l}return o}}const JD=(t,e)=>"key"in t&&t.key!==void 0&&t.key!==null?t.key:t.dataIndex?Array.isArray(t.dataIndex)?t.dataIndex.join("."):t.dataIndex:e;function x6(t,e){return e?`${e}-${t}`:`${t}`}const Jhe=(t,e)=>typeof t=="function"?t(e):t,oJn=(t,e)=>{const n=Jhe(t,e);return Object.prototype.toString.call(n)==="[object Object]"?"":n};function sJn(t){const e=b.useRef(t),n=bhe();return[()=>e.current,i=>{e.current=i,n()}]}function aJn(t){var e=t.dropPosition,n=t.dropLevelOffset,i=t.indent,r={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(e){case-1:r.top=0,r.left=-n*i;break;case 1:r.bottom=0,r.left=-n*i;break;case 0:r.bottom=0,r.left=i;break}return b.createElement("div",{style:r})}function XAt(t){if(t==null)throw new TypeError("Cannot destructure "+t)}function lJn(t,e){var n=b.useState(!1),i=He(n,2),r=i[0],o=i[1];Lr(function(){if(r)return t(),function(){e()}},[r]),Lr(function(){return o(!0),function(){o(!1)}},[])}var cJn=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],ZAt=function(e,n){var i=e.className,r=e.style,o=e.motion,s=e.motionNodes,a=e.motionType,l=e.onMotionStart,c=e.onMotionEnd,u=e.active,d=e.treeNodeRequiredProps,h=di(e,cJn),f=b.useState(!0),m=He(f,2),p=m[0],g=m[1],y=b.useContext(x$e),_=y.prefixCls,w=s&&a!=="hide";Lr(function(){s&&w!==p&&g(w)},[s]);var C=function(){s&&l()},N=b.useRef(!1),E=function(){s&&!N.current&&(N.current=!0,c())};lJn(C,E);var D=function(M){w===M&&E()};return s?b.createElement(Ou,lt({ref:n,visible:p},o,{motionAppear:a==="show",onVisibleChanged:D}),function(k,M){var T=k.className,A=k.style;return b.createElement("div",{ref:M,className:Me("".concat(_,"-treenode-motion"),T),style:A},s.map(function(R){var P=Object.assign({},(XAt(R.data),R.data)),O=R.title,V=R.key,F=R.isStart,$=R.isEnd;delete P.children;var B=R9(V,d);return b.createElement(Kj,lt({},P,B,{title:O,active:u,data:R.data,key:V,isStart:F,isEnd:$}))}))}):b.createElement(Kj,lt({domRef:n,className:i,style:r},h,{active:u}))};ZAt.displayName="MotionTreeNode";var uJn=b.forwardRef(ZAt);function dJn(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=t.length,i=e.length;if(Math.abs(n-i)!==1)return{add:!1,key:null};function r(o,s){var a=new Map;o.forEach(function(c){a.set(c,!0)});var l=s.filter(function(c){return!a.has(c)});return l.length===1?l[0]:null}return n<i?{add:!0,key:r(t,e)}:{add:!1,key:r(e,t)}}function Xit(t,e,n){var i=t.findIndex(function(a){return a.key===n}),r=t[i+1],o=e.findIndex(function(a){return a.key===n});if(r){var s=e.findIndex(function(a){return a.key===r.key});return e.slice(o+1,s)}return e.slice(o+1)}var hJn=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],Zit={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},fJn=function(){},A2="RC_TREE_MOTION_".concat(Math.random()),Mke={key:A2},QAt={key:A2,level:0,index:0,pos:"0",node:Mke,nodes:[Mke]},Qit={parent:null,children:[],pos:QAt.pos,data:Mke,title:null,key:A2,isStart:[],isEnd:[]};function Jit(t,e,n,i){return e===!1||!n?t:t.slice(0,Math.ceil(n/i)+1)}function ert(t){var e=t.key,n=t.pos;return ZK(e,n)}function mJn(t){for(var e=String(t.data.key),n=t;n.parent;)n=n.parent,e="".concat(n.data.key," > ").concat(e);return e}var JAt=b.forwardRef(function(t,e){var n=t.prefixCls,i=t.data;t.selectable,t.checkable;var r=t.expandedKeys,o=t.selectedKeys,s=t.checkedKeys,a=t.loadedKeys,l=t.loadingKeys,c=t.halfCheckedKeys,u=t.keyEntities,d=t.disabled,h=t.dragging,f=t.dragOverNodeKey,m=t.dropPosition,p=t.motion,g=t.height,y=t.itemHeight,_=t.virtual,w=t.focusable,C=t.activeItem,N=t.focused,E=t.tabIndex,D=t.onKeyDown,k=t.onFocus,M=t.onBlur,T=t.onActiveChange,A=t.onListChangeStart,R=t.onListChangeEnd,P=di(t,hJn),O=b.useRef(null),V=b.useRef(null);b.useImperativeHandle(e,function(){return{scrollTo:function(he){O.current.scrollTo(he)},getIndentWidth:function(){return V.current.offsetWidth}}});var F=b.useState(r),$=He(F,2),B=$[0],z=$[1],H=b.useState(i),K=He(H,2),q=K[0],U=K[1],Y=b.useState(i),J=He(Y,2),ae=J[0],se=J[1],oe=b.useState([]),fe=He(oe,2),de=fe[0],ie=fe[1],Q=b.useState(null),be=He(Q,2),le=be[0],Ne=be[1],Le=b.useRef(i);Le.current=i;function Te(){var ge=Le.current;U(ge),se(ge),ie([]),Ne(null),R()}Lr(function(){z(r);var ge=dJn(B,r);if(ge.key!==null)if(ge.add){var he=q.findIndex(function(Ce){var ze=Ce.key;return ze===ge.key}),me=Jit(Xit(q,i,ge.key),_,g,y),X=q.slice();X.splice(he+1,0,Qit),se(X),ie(me),Ne("show")}else{var re=i.findIndex(function(Ce){var ze=Ce.key;return ze===ge.key}),we=Jit(Xit(i,q,ge.key),_,g,y),ue=i.slice();ue.splice(re+1,0,Qit),se(ue),ie(we),Ne("hide")}else q!==i&&(U(i),se(i))},[r,i]),b.useEffect(function(){h||Te()},[h]);var De=p?ae:i,Pe={expandedKeys:r,selectedKeys:o,loadedKeys:a,loadingKeys:l,checkedKeys:s,halfCheckedKeys:c,dragOverNodeKey:f,dropPosition:m,keyEntities:u};return b.createElement(b.Fragment,null,N&&C&&b.createElement("span",{style:Zit,"aria-live":"assertive"},mJn(C)),b.createElement("div",null,b.createElement("input",{style:Zit,disabled:w===!1||d,tabIndex:w!==!1?E:null,onKeyDown:D,onFocus:k,onBlur:M,value:"",onChange:fJn,"aria-label":"for screen reader"})),b.createElement("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},b.createElement("div",{className:"".concat(n,"-indent")},b.createElement("div",{ref:V,className:"".concat(n,"-indent-unit")}))),b.createElement(phe,lt({},P,{data:De,itemKey:ert,height:g,fullHeight:!1,virtual:_,itemHeight:y,prefixCls:"".concat(n,"-list"),ref:O,onVisibleChange:function(he){he.every(function(me){return ert(me)!==A2})&&Te()}}),function(ge){var he=ge.pos,me=Object.assign({},(XAt(ge.data),ge.data)),X=ge.title,re=ge.key,we=ge.isStart,ue=ge.isEnd,Ce=ZK(re,he);delete me.key,delete me.children;var ze=R9(Ce,Pe);return b.createElement(uJn,lt({},me,ze,{title:X,active:!!C&&re===C.key,pos:he,data:ge.data,isStart:we,isEnd:ue,motion:p,motionNodes:re===A2?de:null,motionType:le,onMotionStart:A,onMotionEnd:Te,treeNodeRequiredProps:Pe,onMouseMove:function(){T(null)}}))}))});JAt.displayName="NodeList";var pJn=10,C$e=function(t){Zp(n,t);var e=pb(n);function n(){var i;Za(this,n);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=e.call.apply(e,[this].concat(o)),ye(bn(i),"destroyed",!1),ye(bn(i),"delayedDragEnterLogic",void 0),ye(bn(i),"loadingRetryTimes",{}),ye(bn(i),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:Wj()}),ye(bn(i),"dragStartMousePosition",null),ye(bn(i),"dragNode",void 0),ye(bn(i),"currentMouseOverDroppableNodeKey",null),ye(bn(i),"listRef",b.createRef()),ye(bn(i),"onNodeDragStart",function(a,l){var c=i.state,u=c.expandedKeys,d=c.keyEntities,h=i.props.onDragStart,f=l.props.eventKey;i.dragNode=l,i.dragStartMousePosition={x:a.clientX,y:a.clientY};var m=U_(u,f);i.setState({draggingNodeKey:f,dragChildrenKeys:XQn(f,d),indent:i.listRef.current.getIndentWidth()}),i.setExpandedKeys(m),window.addEventListener("dragend",i.onWindowDragEnd),h==null||h({event:a,node:_u(l.props)})}),ye(bn(i),"onNodeDragEnter",function(a,l){var c=i.state,u=c.expandedKeys,d=c.keyEntities,h=c.dragChildrenKeys,f=c.flattenNodes,m=c.indent,p=i.props,g=p.onDragEnter,y=p.onExpand,_=p.allowDrop,w=p.direction,C=l.props,N=C.pos,E=C.eventKey,D=bn(i),k=D.dragNode;if(i.currentMouseOverDroppableNodeKey!==E&&(i.currentMouseOverDroppableNodeKey=E),!k){i.resetDragState();return}var M=qit(a,k,l,m,i.dragStartMousePosition,_,f,d,u,w),T=M.dropPosition,A=M.dropLevelOffset,R=M.dropTargetKey,P=M.dropContainerKey,O=M.dropTargetPos,V=M.dropAllowed,F=M.dragOverNodeKey;if(h.indexOf(R)!==-1||!V){i.resetDragState();return}if(i.delayedDragEnterLogic||(i.delayedDragEnterLogic={}),Object.keys(i.delayedDragEnterLogic).forEach(function($){clearTimeout(i.delayedDragEnterLogic[$])}),k.props.eventKey!==l.props.eventKey&&(a.persist(),i.delayedDragEnterLogic[N]=window.setTimeout(function(){if(i.state.draggingNodeKey!==null){var $=Ot(u),B=dp(d,l.props.eventKey);B&&(B.children||[]).length&&($=D1(u,l.props.eventKey)),"expandedKeys"in i.props||i.setExpandedKeys($),y==null||y($,{node:_u(l.props),expanded:!0,nativeEvent:a.nativeEvent})}},800)),k.props.eventKey===R&&A===0){i.resetDragState();return}i.setState({dragOverNodeKey:F,dropPosition:T,dropLevelOffset:A,dropTargetKey:R,dropContainerKey:P,dropTargetPos:O,dropAllowed:V}),g==null||g({event:a,node:_u(l.props),expandedKeys:u})}),ye(bn(i),"onNodeDragOver",function(a,l){var c=i.state,u=c.dragChildrenKeys,d=c.flattenNodes,h=c.keyEntities,f=c.expandedKeys,m=c.indent,p=i.props,g=p.onDragOver,y=p.allowDrop,_=p.direction,w=bn(i),C=w.dragNode;if(C){var N=qit(a,C,l,m,i.dragStartMousePosition,y,d,h,f,_),E=N.dropPosition,D=N.dropLevelOffset,k=N.dropTargetKey,M=N.dropContainerKey,T=N.dropAllowed,A=N.dropTargetPos,R=N.dragOverNodeKey;u.indexOf(k)!==-1||!T||(C.props.eventKey===k&&D===0?i.state.dropPosition===null&&i.state.dropLevelOffset===null&&i.state.dropTargetKey===null&&i.state.dropContainerKey===null&&i.state.dropTargetPos===null&&i.state.dropAllowed===!1&&i.state.dragOverNodeKey===null||i.resetDragState():E===i.state.dropPosition&&D===i.state.dropLevelOffset&&k===i.state.dropTargetKey&&M===i.state.dropContainerKey&&A===i.state.dropTargetPos&&T===i.state.dropAllowed&&R===i.state.dragOverNodeKey||i.setState({dropPosition:E,dropLevelOffset:D,dropTargetKey:k,dropContainerKey:M,dropTargetPos:A,dropAllowed:T,dragOverNodeKey:R}),g==null||g({event:a,node:_u(l.props)}))}}),ye(bn(i),"onNodeDragLeave",function(a,l){i.currentMouseOverDroppableNodeKey===l.props.eventKey&&!a.currentTarget.contains(a.relatedTarget)&&(i.resetDragState(),i.currentMouseOverDroppableNodeKey=null);var c=i.props.onDragLeave;c==null||c({event:a,node:_u(l.props)})}),ye(bn(i),"onWindowDragEnd",function(a){i.onNodeDragEnd(a,null,!0),window.removeEventListener("dragend",i.onWindowDragEnd)}),ye(bn(i),"onNodeDragEnd",function(a,l){var c=i.props.onDragEnd;i.setState({dragOverNodeKey:null}),i.cleanDragState(),c==null||c({event:a,node:_u(l.props)}),i.dragNode=null,window.removeEventListener("dragend",i.onWindowDragEnd)}),ye(bn(i),"onNodeDrop",function(a,l){var c,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=i.state,h=d.dragChildrenKeys,f=d.dropPosition,m=d.dropTargetKey,p=d.dropTargetPos,g=d.dropAllowed;if(g){var y=i.props.onDrop;if(i.setState({dragOverNodeKey:null}),i.cleanDragState(),m!==null){var _=Ie(Ie({},R9(m,i.getTreeNodeRequiredProps())),{},{active:((c=i.getActiveItem())===null||c===void 0?void 0:c.key)===m,data:dp(i.state.keyEntities,m).node}),w=h.indexOf(m)!==-1;ii(!w,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var C=w$e(p),N={event:a,node:_u(_),dragNode:i.dragNode?_u(i.dragNode.props):null,dragNodesKeys:[i.dragNode.props.eventKey].concat(h),dropToGap:f!==0,dropPosition:f+Number(C[C.length-1])};u||y==null||y(N),i.dragNode=null}}}),ye(bn(i),"cleanDragState",function(){var a=i.state.draggingNodeKey;a!==null&&i.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),i.dragStartMousePosition=null,i.currentMouseOverDroppableNodeKey=null}),ye(bn(i),"triggerExpandActionExpand",function(a,l){var c=i.state,u=c.expandedKeys,d=c.flattenNodes,h=l.expanded,f=l.key,m=l.isLeaf;if(!(m||a.shiftKey||a.metaKey||a.ctrlKey)){var p=d.filter(function(y){return y.key===f})[0],g=_u(Ie(Ie({},R9(f,i.getTreeNodeRequiredProps())),{},{data:p.data}));i.setExpandedKeys(h?U_(u,f):D1(u,f)),i.onNodeExpand(a,g)}}),ye(bn(i),"onNodeClick",function(a,l){var c=i.props,u=c.onClick,d=c.expandAction;d==="click"&&i.triggerExpandActionExpand(a,l),u==null||u(a,l)}),ye(bn(i),"onNodeDoubleClick",function(a,l){var c=i.props,u=c.onDoubleClick,d=c.expandAction;d==="doubleClick"&&i.triggerExpandActionExpand(a,l),u==null||u(a,l)}),ye(bn(i),"onNodeSelect",function(a,l){var c=i.state.selectedKeys,u=i.state,d=u.keyEntities,h=u.fieldNames,f=i.props,m=f.onSelect,p=f.multiple,g=l.selected,y=l[h.key],_=!g;_?p?c=D1(c,y):c=[y]:c=U_(c,y);var w=c.map(function(C){var N=dp(d,C);return N?N.node:null}).filter(function(C){return C});i.setUncontrolledState({selectedKeys:c}),m==null||m(c,{event:"select",selected:_,node:l,selectedNodes:w,nativeEvent:a.nativeEvent})}),ye(bn(i),"onNodeCheck",function(a,l,c){var u=i.state,d=u.keyEntities,h=u.checkedKeys,f=u.halfCheckedKeys,m=i.props,p=m.checkStrictly,g=m.onCheck,y=l.key,_,w={event:"check",node:l,checked:c,nativeEvent:a.nativeEvent};if(p){var C=c?D1(h,y):U_(h,y),N=U_(f,y);_={checked:C,halfChecked:N},w.checkedNodes=C.map(function(A){return dp(d,A)}).filter(function(A){return A}).map(function(A){return A.node}),i.setUncontrolledState({checkedKeys:C})}else{var E=h3([].concat(Ot(h),[y]),!0,d),D=E.checkedKeys,k=E.halfCheckedKeys;if(!c){var M=new Set(D);M.delete(y);var T=h3(Array.from(M),{checked:!1,halfCheckedKeys:k},d);D=T.checkedKeys,k=T.halfCheckedKeys}_=D,w.checkedNodes=[],w.checkedNodesPositions=[],w.halfCheckedKeys=k,D.forEach(function(A){var R=dp(d,A);if(R){var P=R.node,O=R.pos;w.checkedNodes.push(P),w.checkedNodesPositions.push({node:P,pos:O})}}),i.setUncontrolledState({checkedKeys:D},!1,{halfCheckedKeys:k})}g==null||g(_,w)}),ye(bn(i),"onNodeLoad",function(a){var l,c=a.key,u=i.state.keyEntities,d=dp(u,c);if(!(d!=null&&(l=d.children)!==null&&l!==void 0&&l.length)){var h=new Promise(function(f,m){i.setState(function(p){var g=p.loadedKeys,y=g===void 0?[]:g,_=p.loadingKeys,w=_===void 0?[]:_,C=i.props,N=C.loadData,E=C.onLoad;if(!N||y.indexOf(c)!==-1||w.indexOf(c)!==-1)return null;var D=N(a);return D.then(function(){var k=i.state.loadedKeys,M=D1(k,c);E==null||E(M,{event:"load",node:a}),i.setUncontrolledState({loadedKeys:M}),i.setState(function(T){return{loadingKeys:U_(T.loadingKeys,c)}}),f()}).catch(function(k){if(i.setState(function(T){return{loadingKeys:U_(T.loadingKeys,c)}}),i.loadingRetryTimes[c]=(i.loadingRetryTimes[c]||0)+1,i.loadingRetryTimes[c]>=pJn){var M=i.state.loadedKeys;ii(!1,"Retry for `loadData` many times but still failed. No more retry."),i.setUncontrolledState({loadedKeys:D1(M,c)}),f()}m(k)}),{loadingKeys:D1(w,c)}})});return h.catch(function(){}),h}}),ye(bn(i),"onNodeMouseEnter",function(a,l){var c=i.props.onMouseEnter;c==null||c({event:a,node:l})}),ye(bn(i),"onNodeMouseLeave",function(a,l){var c=i.props.onMouseLeave;c==null||c({event:a,node:l})}),ye(bn(i),"onNodeContextMenu",function(a,l){var c=i.props.onRightClick;c&&(a.preventDefault(),c({event:a,node:l}))}),ye(bn(i),"onFocus",function(){var a=i.props.onFocus;i.setState({focused:!0});for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];a==null||a.apply(void 0,c)}),ye(bn(i),"onBlur",function(){var a=i.props.onBlur;i.setState({focused:!1}),i.onActiveChange(null);for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];a==null||a.apply(void 0,c)}),ye(bn(i),"getTreeNodeRequiredProps",function(){var a=i.state,l=a.expandedKeys,c=a.selectedKeys,u=a.loadedKeys,d=a.loadingKeys,h=a.checkedKeys,f=a.halfCheckedKeys,m=a.dragOverNodeKey,p=a.dropPosition,g=a.keyEntities;return{expandedKeys:l||[],selectedKeys:c||[],loadedKeys:u||[],loadingKeys:d||[],checkedKeys:h||[],halfCheckedKeys:f||[],dragOverNodeKey:m,dropPosition:p,keyEntities:g}}),ye(bn(i),"setExpandedKeys",function(a){var l=i.state,c=l.treeData,u=l.fieldNames,d=Lxe(c,a,u);i.setUncontrolledState({expandedKeys:a,flattenNodes:d},!0)}),ye(bn(i),"onNodeExpand",function(a,l){var c=i.state.expandedKeys,u=i.state,d=u.listChanging,h=u.fieldNames,f=i.props,m=f.onExpand,p=f.loadData,g=l.expanded,y=l[h.key];if(!d){var _=c.indexOf(y),w=!g;if(ii(g&&_!==-1||!g&&_===-1,"Expand state not sync with index check"),w?c=D1(c,y):c=U_(c,y),i.setExpandedKeys(c),m==null||m(c,{node:l,expanded:w,nativeEvent:a.nativeEvent}),w&&p){var C=i.onNodeLoad(l);C&&C.then(function(){var N=Lxe(i.state.treeData,c,h);i.setUncontrolledState({flattenNodes:N})}).catch(function(){var N=i.state.expandedKeys,E=U_(N,y);i.setExpandedKeys(E)})}}}),ye(bn(i),"onListChangeStart",function(){i.setUncontrolledState({listChanging:!0})}),ye(bn(i),"onListChangeEnd",function(){setTimeout(function(){i.setUncontrolledState({listChanging:!1})})}),ye(bn(i),"onActiveChange",function(a){var l=i.state.activeKey,c=i.props,u=c.onActiveChange,d=c.itemScrollOffset,h=d===void 0?0:d;l!==a&&(i.setState({activeKey:a}),a!==null&&i.scrollTo({key:a,offset:h}),u==null||u(a))}),ye(bn(i),"getActiveItem",function(){var a=i.state,l=a.activeKey,c=a.flattenNodes;return l===null?null:c.find(function(u){var d=u.key;return d===l})||null}),ye(bn(i),"offsetActiveKey",function(a){var l=i.state,c=l.flattenNodes,u=l.activeKey,d=c.findIndex(function(m){var p=m.key;return p===u});d===-1&&a<0&&(d=c.length),d=(d+a+c.length)%c.length;var h=c[d];if(h){var f=h.key;i.onActiveChange(f)}else i.onActiveChange(null)}),ye(bn(i),"onKeyDown",function(a){var l=i.state,c=l.activeKey,u=l.expandedKeys,d=l.checkedKeys,h=l.fieldNames,f=i.props,m=f.onKeyDown,p=f.checkable,g=f.selectable;switch(a.which){case Wt.UP:{i.offsetActiveKey(-1),a.preventDefault();break}case Wt.DOWN:{i.offsetActiveKey(1),a.preventDefault();break}}var y=i.getActiveItem();if(y&&y.data){var _=i.getTreeNodeRequiredProps(),w=y.data.isLeaf===!1||!!(y.data[h.children]||[]).length,C=_u(Ie(Ie({},R9(c,_)),{},{data:y.data,active:!0}));switch(a.which){case Wt.LEFT:{w&&u.includes(c)?i.onNodeExpand({},C):y.parent&&i.onActiveChange(y.parent.key),a.preventDefault();break}case Wt.RIGHT:{w&&!u.includes(c)?i.onNodeExpand({},C):y.children&&y.children.length&&i.onActiveChange(y.children[0].key),a.preventDefault();break}case Wt.ENTER:case Wt.SPACE:{p&&!C.disabled&&C.checkable!==!1&&!C.disableCheckbox?i.onNodeCheck({},C,!d.includes(c)):!p&&g&&!C.disabled&&C.selectable!==!1&&i.onNodeSelect({},C);break}}}m==null||m(a)}),ye(bn(i),"setUncontrolledState",function(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!i.destroyed){var u=!1,d=!0,h={};Object.keys(a).forEach(function(f){if(f in i.props){d=!1;return}u=!0,h[f]=a[f]}),u&&(!l||d)&&i.setState(Ie(Ie({},h),c))}}),ye(bn(i),"scrollTo",function(a){i.listRef.current.scrollTo(a)}),i}return Qa(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var r=this.props,o=r.activeKey,s=r.itemScrollOffset,a=s===void 0?0:s;o!==void 0&&o!==this.state.activeKey&&(this.setState({activeKey:o}),o!==null&&this.scrollTo({key:o,offset:a}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var r=this.state,o=r.focused,s=r.flattenNodes,a=r.keyEntities,l=r.draggingNodeKey,c=r.activeKey,u=r.dropLevelOffset,d=r.dropContainerKey,h=r.dropTargetKey,f=r.dropPosition,m=r.dragOverNodeKey,p=r.indent,g=this.props,y=g.prefixCls,_=g.className,w=g.style,C=g.showLine,N=g.focusable,E=g.tabIndex,D=E===void 0?0:E,k=g.selectable,M=g.showIcon,T=g.icon,A=g.switcherIcon,R=g.draggable,P=g.checkable,O=g.checkStrictly,V=g.disabled,F=g.motion,$=g.loadData,B=g.filterTreeNode,z=g.height,H=g.itemHeight,K=g.virtual,q=g.titleRender,U=g.dropIndicatorRender,Y=g.onContextMenu,J=g.onScroll,ae=g.direction,se=g.rootClassName,oe=g.rootStyle,fe=Ll(this.props,{aria:!0,data:!0}),de;return R&&(Un(R)==="object"?de=R:typeof R=="function"?de={nodeDraggable:R}:de={}),b.createElement(x$e.Provider,{value:{prefixCls:y,selectable:k,showIcon:M,icon:T,switcherIcon:A,draggable:de,draggingNodeKey:l,checkable:P,checkStrictly:O,disabled:V,keyEntities:a,dropLevelOffset:u,dropContainerKey:d,dropTargetKey:h,dropPosition:f,dragOverNodeKey:m,indent:p,direction:ae,dropIndicatorRender:U,loadData:$,filterTreeNode:B,titleRender:q,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},b.createElement("div",{role:"tree",className:Me(y,_,se,ye(ye(ye({},"".concat(y,"-show-line"),C),"".concat(y,"-focused"),o),"".concat(y,"-active-focused"),c!==null)),style:oe},b.createElement(JAt,lt({ref:this.listRef,prefixCls:y,style:w,data:s,disabled:V,selectable:k,checkable:!!P,motion:F,dragging:l!==null,height:z,itemHeight:H,virtual:K,focusable:N,focused:o,tabIndex:D,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Y,onScroll:J},this.getTreeNodeRequiredProps(),fe))))}}],[{key:"getDerivedStateFromProps",value:function(r,o){var s=o.prevProps,a={prevProps:r};function l(D){return!s&&D in r||s&&s[D]!==r[D]}var c,u=o.fieldNames;if(l("fieldNames")&&(u=Wj(r.fieldNames),a.fieldNames=u),l("treeData")?c=r.treeData:l("children")&&(ii(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),c=iIt(r.children)),c){a.treeData=c;var d=H6e(c,{fieldNames:u});a.keyEntities=Ie(ye({},A2,QAt),d.keyEntities),lzn(c,u)}var h=a.keyEntities||o.keyEntities;if(l("expandedKeys")||s&&l("autoExpandParent"))a.expandedKeys=r.autoExpandParent||!s&&r.defaultExpandParent?Nke(r.expandedKeys,h):r.expandedKeys;else if(!s&&r.defaultExpandAll){var f=Ie({},h);delete f[A2];var m=[];Object.keys(f).forEach(function(D){var k=f[D];k.children&&k.children.length&&m.push(k.key)}),a.expandedKeys=m}else!s&&r.defaultExpandedKeys&&(a.expandedKeys=r.autoExpandParent||r.defaultExpandParent?Nke(r.defaultExpandedKeys,h):r.defaultExpandedKeys);if(a.expandedKeys||delete a.expandedKeys,c||a.expandedKeys){var p=Lxe(c||o.treeData,a.expandedKeys||o.expandedKeys,u);a.flattenNodes=p}if(r.selectable&&(l("selectedKeys")?a.selectedKeys=Git(r.selectedKeys,r):!s&&r.defaultSelectedKeys&&(a.selectedKeys=Git(r.defaultSelectedKeys,r))),r.checkable){var g;if(l("checkedKeys")?g=zxe(r.checkedKeys)||{}:!s&&r.defaultCheckedKeys?g=zxe(r.defaultCheckedKeys)||{}:c&&(g=zxe(r.checkedKeys)||{checkedKeys:o.checkedKeys,halfCheckedKeys:o.halfCheckedKeys}),g){var y=g,_=y.checkedKeys,w=_===void 0?[]:_,C=y.halfCheckedKeys,N=C===void 0?[]:C;if(!r.checkStrictly){var E=h3(w,!0,h);w=E.checkedKeys,N=E.halfCheckedKeys}a.checkedKeys=w,a.halfCheckedKeys=N}}return l("loadedKeys")&&(a.loadedKeys=r.loadedKeys),a}}]),n}(b.Component);ye(C$e,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:aJn,allowDrop:function(){return!0},expandAction:!1});ye(C$e,"TreeNode",Kj);const gJn=new so("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),bJn=(t,e)=>({[`.${t}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${e.motionDurationSlow}`}}}),vJn=(t,e)=>({[`.${t}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:e.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${xe(e.lineWidthBold)} solid ${e.colorPrimary}`,borderRadius:"50%",content:'""'}}}),yJn=(t,e)=>{const{treeCls:n,treeNodeCls:i,treeNodePadding:r,titleHeight:o,nodeSelectedBg:s,nodeHoverBg:a}=e,l=e.paddingXS;return{[n]:Object.assign(Object.assign({},fo(e)),{background:e.colorBgContainer,borderRadius:e.borderRadius,transition:`background-color ${e.motionDurationSlow}`,[`&${n}-rtl`]:{[`${n}-switcher`]:{"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${n}-active-focused)`]:Object.assign({},iS(e)),[`${n}-list-holder-inner`]:{alignItems:"flex-start"},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:"stretch",[`${n}-node-content-wrapper`]:{flex:"auto"},[`${i}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:r,insetInlineStart:0,border:`1px solid ${e.colorPrimary}`,opacity:0,animationName:gJn,animationDuration:e.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[i]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${xe(r)} 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${n}-node-content-wrapper`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${n}-node-content-wrapper`]:{background:e.controlItemBgHover},[`&:not(${i}-disabled).filter-node ${n}-title`]:{color:e.colorPrimary,fontWeight:500},"&-draggable":{cursor:"grab",[`${n}-draggable-icon`]:{flexShrink:0,width:o,lineHeight:xe(o),textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${e.motionDurationSlow}`,[`${i}:hover &`]:{opacity:.45}},[`&${i}-disabled`]:{[`${n}-draggable-icon`]:{visibility:"hidden"}}}},[`${n}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:o}},[`${n}-draggable-icon`]:{visibility:"hidden"},[`${n}-switcher`]:Object.assign(Object.assign({},bJn(t,e)),{position:"relative",flex:"none",alignSelf:"stretch",width:o,margin:0,lineHeight:xe(o),textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${e.motionDurationSlow}`,marginInlineEnd:e.calc(e.calc(o).sub(e.controlInteractiveSize)).div(2).equal(),"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:o,height:o,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`},[`&:not(${n}-switcher-noop):hover:before`]:{backgroundColor:e.colorBgTextHover},"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:e.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:e.calc(o).div(2).equal(),bottom:e.calc(r).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${e.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:e.calc(e.calc(o).div(2).equal()).mul(.8).equal(),height:e.calc(o).div(2).equal(),borderBottom:`1px solid ${e.colorBorder}`,content:'""'}}}),[`${n}-checkbox`]:{top:"initial",marginInlineEnd:l,alignSelf:"flex-start",marginTop:e.marginXXS},[`${n}-node-content-wrapper, ${n}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:o,margin:0,padding:`0 ${xe(e.calc(e.paddingXS).div(2).equal())}`,color:"inherit",lineHeight:xe(o),background:"transparent",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:a},[`&${n}-node-selected`]:{backgroundColor:s},[`${n}-iconEle`]:{display:"inline-block",width:o,height:o,lineHeight:xe(o),textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${n}-node-content-wrapper`]:Object.assign({lineHeight:xe(o),userSelect:"none"},vJn(t,e)),[`${i}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${e.colorPrimary}`}},"&-show-line":{[`${n}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:e.calc(o).div(2).equal(),bottom:e.calc(r).mul(-1).equal(),borderInlineEnd:`1px solid ${e.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${n}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${i}-leaf-last`]:{[`${n}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${xe(e.calc(o).div(2).equal())} !important`}}}}})}},_Jn=t=>{const{treeCls:e,treeNodeCls:n,treeNodePadding:i,directoryNodeSelectedBg:r,directoryNodeSelectedColor:o}=t;return{[`${e}${e}-directory`]:{[n]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:i,insetInlineStart:0,transition:`background-color ${t.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:t.controlItemBgHover}},"> *":{zIndex:1},[`${e}-switcher`]:{transition:`color ${t.motionDurationMid}`},[`${e}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${e}-node-selected`]:{color:o,background:"transparent"}},"&-selected":{"\n            &:hover::before,\n            &::before\n          ":{background:r},[`${e}-switcher`]:{color:o},[`${e}-node-content-wrapper`]:{color:o,background:"transparent"}}}}}},xJn=(t,e)=>{const n=`.${t}`,i=`${n}-treenode`,r=e.calc(e.paddingXS).div(2).equal(),o=mr(e,{treeCls:n,treeNodeCls:i,treeNodePadding:r});return[yJn(t,o),_Jn(o)]},wJn=t=>{const{controlHeightSM:e}=t;return{titleHeight:e,nodeHoverBg:t.controlItemBgHover,nodeSelectedBg:t.controlItemBgActive}},CJn=t=>{const{colorTextLightSolid:e,colorPrimary:n}=t;return Object.assign(Object.assign({},wJn(t)),{directoryNodeSelectedColor:e,directoryNodeSelectedBg:n})},SJn=Jr("Tree",(t,e)=>{let{prefixCls:n}=e;return[{[t.componentCls]:oIt(`${n}-checkbox`,t)},xJn(n,t),jK(t)]},CJn),trt=4;function NJn(t){const{dropPosition:e,dropLevelOffset:n,prefixCls:i,indent:r,direction:o="ltr"}=t,s=o==="ltr"?"left":"right",a=o==="ltr"?"right":"left",l={[s]:-n*r+trt,[a]:0};switch(e){case-1:l.top=-3;break;case 1:l.bottom=-3;break;default:l.bottom=-3,l[s]=r+trt;break}return Z.createElement("div",{style:l,className:`${i}-drop-indicator`})}const EJn=t=>{const{prefixCls:e,switcherIcon:n,treeNodeProps:i,showLine:r,switcherLoadingIcon:o}=t,{isLeaf:s,expanded:a,loading:l}=i;if(l)return b.isValidElement(o)?o:b.createElement(Xd,{className:`${e}-switcher-loading-icon`});let c;if(r&&typeof r=="object"&&(c=r.showLeafIcon),s){if(!r)return null;if(typeof c!="boolean"&&c){const h=typeof c=="function"?c(i):c,f=`${e}-switcher-line-custom-icon`;return b.isValidElement(h)?$c(h,{className:Me(h.props.className||"",f)}):h}return c?b.createElement(d$e,{className:`${e}-switcher-line-icon`}):b.createElement("span",{className:`${e}-switcher-leaf-line`})}const u=`${e}-switcher-icon`,d=typeof n=="function"?n(i):n;return b.isValidElement(d)?$c(d,{className:Me(d.props.className||"",u)}):d!==void 0?d:r?a?b.createElement(sAt,{className:`${e}-switcher-line-icon`}):b.createElement(dAt,{className:`${e}-switcher-line-icon`}):b.createElement(B2t,{className:u})},S$e=Z.forwardRef((t,e)=>{var n;const{getPrefixCls:i,direction:r,virtual:o,tree:s}=Z.useContext(jn),{prefixCls:a,className:l,showIcon:c=!1,showLine:u,switcherIcon:d,switcherLoadingIcon:h,blockNode:f=!1,children:m,checkable:p=!1,selectable:g=!0,draggable:y,motion:_,style:w}=t,C=i("tree",a),N=i(),E=_??Object.assign(Object.assign({},$j(N)),{motionAppear:!1}),D=Object.assign(Object.assign({},t),{checkable:p,selectable:g,showIcon:c,motion:E,blockNode:f,showLine:!!u,dropIndicatorRender:NJn}),[k,M,T]=SJn(C),[,A]=Sd(),R=A.paddingXS/2+(((n=A.Tree)===null||n===void 0?void 0:n.titleHeight)||A.controlHeightSM),P=Z.useMemo(()=>{if(!y)return!1;let V={};switch(typeof y){case"function":V.nodeDraggable=y;break;case"object":V=Object.assign({},y);break}return V.icon!==!1&&(V.icon=V.icon||Z.createElement(iAt,null)),V},[y]),O=V=>Z.createElement(EJn,{prefixCls:C,switcherIcon:d,switcherLoadingIcon:h,treeNodeProps:V,showLine:u});return k(Z.createElement(C$e,Object.assign({itemHeight:R,ref:e,virtual:o},D,{style:Object.assign(Object.assign({},s==null?void 0:s.style),w),prefixCls:C,className:Me({[`${C}-icon-hide`]:!c,[`${C}-block-node`]:f,[`${C}-unselectable`]:!g,[`${C}-rtl`]:r==="rtl"},s==null?void 0:s.className,l,M,T),direction:r,checkable:p&&Z.createElement("span",{className:`${C}-checkbox-inner`}),selectable:g,switcherIcon:O,draggable:P}),m))});S$e.displayName="Tree";const nrt=0,Hxe=1,irt=2;function N$e(t,e,n){const{key:i,children:r}=n;function o(s){const a=s[i],l=s[r];e(a,s)!==!1&&N$e(l||[],e,n)}t.forEach(o)}function DJn(t){let{treeData:e,expandedKeys:n,startKey:i,endKey:r,fieldNames:o}=t;const s=[];let a=nrt;if(i&&i===r)return[i];if(!i||!r)return[];function l(c){return c===i||c===r}return N$e(e,c=>{if(a===irt)return!1;if(l(c)){if(s.push(c),a===nrt)a=Hxe;else if(a===Hxe)return a=irt,!1}else a===Hxe&&s.push(c);return n.includes(c)},Wj(o)),s}function Wxe(t,e,n){const i=Ot(e),r=[];return N$e(t,(o,s)=>{const a=i.indexOf(o);return a!==-1&&(r.push(s),i.splice(a,1)),!!i.length},Wj(n)),r}var rrt=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};function kJn(t){const{isLeaf:e,expanded:n}=t;return e?b.createElement(d$e,null):n?b.createElement(eAt,null):b.createElement(tAt,null)}function ort(t){let{treeData:e,children:n}=t;return e||iIt(n)}const MJn=(t,e)=>{var{defaultExpandAll:n,defaultExpandParent:i,defaultExpandedKeys:r}=t,o=rrt(t,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const s=b.useRef(),a=b.useRef(),l=()=>{const{keyEntities:k}=H6e(ort(o));let M;return n?M=Object.keys(k):i?M=Nke(o.expandedKeys||r||[],k):M=o.expandedKeys||r||[],M},[c,u]=b.useState(o.selectedKeys||o.defaultSelectedKeys||[]),[d,h]=b.useState(()=>l());b.useEffect(()=>{"selectedKeys"in o&&u(o.selectedKeys)},[o.selectedKeys]),b.useEffect(()=>{"expandedKeys"in o&&h(o.expandedKeys)},[o.expandedKeys]);const f=(k,M)=>{var T;return"expandedKeys"in o||h(k),(T=o.onExpand)===null||T===void 0?void 0:T.call(o,k,M)},m=(k,M)=>{var T;const{multiple:A,fieldNames:R}=o,{node:P,nativeEvent:O}=M,{key:V=""}=P,F=ort(o),$=Object.assign(Object.assign({},M),{selected:!0}),B=(O==null?void 0:O.ctrlKey)||(O==null?void 0:O.metaKey),z=O==null?void 0:O.shiftKey;let H;A&&B?(H=k,s.current=V,a.current=H,$.selectedNodes=Wxe(F,H,R)):A&&z?(H=Array.from(new Set([].concat(Ot(a.current||[]),Ot(DJn({treeData:F,expandedKeys:d,startKey:V,endKey:s.current,fieldNames:R}))))),$.selectedNodes=Wxe(F,H,R)):(H=[V],s.current=V,a.current=H,$.selectedNodes=Wxe(F,H,R)),(T=o.onSelect)===null||T===void 0||T.call(o,H,$),"selectedKeys"in o||u(H)},{getPrefixCls:p,direction:g}=b.useContext(jn),{prefixCls:y,className:_,showIcon:w=!0,expandAction:C="click"}=o,N=rrt(o,["prefixCls","className","showIcon","expandAction"]),E=p("tree",y),D=Me(`${E}-directory`,{[`${E}-directory-rtl`]:g==="rtl"},_);return b.createElement(S$e,Object.assign({icon:kJn,ref:e,blockNode:!0},N,{showIcon:w,expandAction:C,prefixCls:E,className:D,expandedKeys:d,selectedKeys:c,onSelect:m,onExpand:f}))},eRt=b.forwardRef(MJn);eRt.displayName="DirectoryTree";const E$e=S$e;E$e.DirectoryTree=eRt;E$e.TreeNode=Kj;const srt=t=>{const{value:e,filterSearch:n,tablePrefixCls:i,locale:r,onChange:o}=t;return n?b.createElement("div",{className:`${i}-filter-dropdown-search`},b.createElement(es,{prefix:b.createElement(ghe,null),placeholder:r.filterSearchPlaceholder,onChange:o,value:e,htmlSize:1,className:`${i}-filter-dropdown-search-input`})):null},LJn=t=>{const{keyCode:e}=t;e===Wt.ENTER&&t.stopPropagation()},tRt=b.forwardRef((t,e)=>b.createElement("div",{className:t.className,onClick:n=>n.stopPropagation(),onKeyDown:LJn,ref:e},t.children));tRt.displayName="FilterDropdownMenuWrapper";function f3(t){let e=[];return(t||[]).forEach(n=>{let{value:i,children:r}=n;e.push(i),r&&(e=[].concat(Ot(e),Ot(f3(r))))}),e}function TJn(t){return t.some(e=>{let{children:n}=e;return n})}function nRt(t,e){return typeof e=="string"||typeof e=="number"?e==null?void 0:e.toString().toLowerCase().includes(t.trim().toLowerCase()):!1}function iRt(t){let{filters:e,prefixCls:n,filteredKeys:i,filterMultiple:r,searchValue:o,filterSearch:s}=t;return e.map((a,l)=>{const c=String(a.value);if(a.children)return{key:c||l,label:a.text,popupClassName:`${n}-dropdown-submenu`,children:iRt({filters:a.children,prefixCls:n,filteredKeys:i,filterMultiple:r,searchValue:o,filterSearch:s})};const u=r?I2:Mc,d={key:a.value!==void 0?c:l,label:b.createElement(b.Fragment,null,b.createElement(u,{checked:i.includes(c)}),b.createElement("span",null,a.text))};return o.trim()?typeof s=="function"?s(o,a)?d:null:nRt(o,a.text)?d:null:d})}function Uxe(t){return t||[]}const IJn=t=>{var e,n;const{tablePrefixCls:i,prefixCls:r,column:o,dropdownPrefixCls:s,columnKey:a,filterOnClose:l,filterMultiple:c,filterMode:u="menu",filterSearch:d=!1,filterState:h,triggerFilter:f,locale:m,children:p,getPopupContainer:g,rootClassName:y}=t,{filterDropdownOpen:_,onFilterDropdownOpenChange:w,filterResetToDefaultFilteredValue:C,defaultFilteredValue:N,filterDropdownVisible:E,onFilterDropdownVisibleChange:D}=o,[k,M]=b.useState(!1),T=!!(h&&(!((e=h.filteredKeys)===null||e===void 0)&&e.length||h.forceFiltered)),A=De=>{M(De),w==null||w(De),D==null||D(De)};{const De=Cr("Table");[["filterDropdownVisible","filterDropdownOpen",E],["onFilterDropdownVisibleChange","onFilterDropdownOpenChange",D]].forEach(Pe=>{let[ge,he,me]=Pe;De.deprecated(me==null,ge,he)})}const R=(n=_??E)!==null&&n!==void 0?n:k,P=h==null?void 0:h.filteredKeys,[O,V]=sJn(Uxe(P)),F=De=>{let{selectedKeys:Pe}=De;V(Pe)},$=(De,Pe)=>{let{node:ge,checked:he}=Pe;F(c?{selectedKeys:De}:{selectedKeys:he&&ge.key?[ge.key]:[]})};b.useEffect(()=>{k&&F({selectedKeys:Uxe(P)})},[P]);const[B,z]=b.useState([]),H=De=>{z(De)},[K,q]=b.useState(""),U=De=>{const{value:Pe}=De.target;q(Pe)};b.useEffect(()=>{k||q("")},[k]);const Y=De=>{const Pe=De!=null&&De.length?De:null;if(Pe===null&&(!h||!h.filteredKeys)||jp(Pe,h==null?void 0:h.filteredKeys,!0))return null;f({column:o,key:a,filteredKeys:Pe})},J=()=>{A(!1),Y(O())},ae=function(){let{confirm:De,closeDropdown:Pe}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};De&&Y([]),Pe&&A(!1),q(""),V(C?(N||[]).map(ge=>String(ge)):[])},se=function(){let{closeDropdown:De}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};De&&A(!1),Y(O())},oe=(De,Pe)=>{Pe.source==="trigger"&&(De&&P!==void 0&&V(Uxe(P)),A(De),!De&&!o.filterDropdown&&l&&J())},fe=Me({[`${s}-menu-without-submenu`]:!TJn(o.filters||[])}),de=De=>{if(De.target.checked){const Pe=f3(o==null?void 0:o.filters).map(ge=>String(ge));V(Pe)}else V([])},ie=De=>{let{filters:Pe}=De;return(Pe||[]).map((ge,he)=>{const me=String(ge.value),X={title:ge.text,key:ge.value!==void 0?me:String(he)};return ge.children&&(X.children=ie({filters:ge.children})),X})},Q=De=>{var Pe;return Object.assign(Object.assign({},De),{text:De.title,value:De.key,children:((Pe=De.children)===null||Pe===void 0?void 0:Pe.map(ge=>Q(ge)))||[]})};let be;const{direction:le,renderEmpty:Ne}=b.useContext(jn);if(typeof o.filterDropdown=="function")be=o.filterDropdown({prefixCls:`${s}-custom`,setSelectedKeys:De=>F({selectedKeys:De}),selectedKeys:O(),confirm:se,clearFilters:ae,filters:o.filters,visible:R,close:()=>{A(!1)}});else if(o.filterDropdown)be=o.filterDropdown;else{const De=O()||[],Pe=()=>{var he;const me=(he=Ne==null?void 0:Ne("Table.filter"))!==null&&he!==void 0?he:b.createElement(wh,{image:wh.PRESENTED_IMAGE_SIMPLE,description:m.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}});if((o.filters||[]).length===0)return me;if(u==="tree")return b.createElement(b.Fragment,null,b.createElement(srt,{filterSearch:d,value:K,onChange:U,tablePrefixCls:i,locale:m}),b.createElement("div",{className:`${i}-filter-dropdown-tree`},c?b.createElement(I2,{checked:De.length===f3(o.filters).length,indeterminate:De.length>0&&De.length<f3(o.filters).length,className:`${i}-filter-dropdown-checkall`,onChange:de},m.filterCheckall):null,b.createElement(E$e,{checkable:!0,selectable:!1,blockNode:!0,multiple:c,checkStrictly:!c,className:`${s}-menu`,onCheck:$,checkedKeys:De,selectedKeys:De,showIcon:!1,treeData:ie({filters:o.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:K.trim()?we=>typeof d=="function"?d(K,Q(we)):nRt(K,we.title):void 0})));const X=iRt({filters:o.filters||[],filterSearch:d,prefixCls:r,filteredKeys:O(),filterMultiple:c,searchValue:K}),re=X.every(we=>we===null);return b.createElement(b.Fragment,null,b.createElement(srt,{filterSearch:d,value:K,onChange:U,tablePrefixCls:i,locale:m}),re?me:b.createElement(sS,{selectable:!0,multiple:c,prefixCls:`${s}-menu`,className:fe,onSelect:F,onDeselect:F,selectedKeys:De,getPopupContainer:g,openKeys:B,onOpenChange:H,items:X}))},ge=()=>C?jp((N||[]).map(he=>String(he)),De,!0):De.length===0;be=b.createElement(b.Fragment,null,Pe(),b.createElement("div",{className:`${r}-dropdown-btns`},b.createElement(vn,{type:"link",size:"small",disabled:ge(),onClick:()=>ae()},m.filterReset),b.createElement(vn,{type:"primary",size:"small",onClick:J},m.filterConfirm)))}o.filterDropdown&&(be=b.createElement(qLt,{selectable:void 0},be));const Le=()=>b.createElement(tRt,{className:`${r}-dropdown`},be);let Te;return typeof o.filterIcon=="function"?Te=o.filterIcon(T):o.filterIcon?Te=o.filterIcon:Te=b.createElement(Q2t,null),b.createElement("div",{className:`${r}-column`},b.createElement("span",{className:`${i}-column-title`},p),b.createElement(b6,{dropdownRender:Le,trigger:["click"],open:R,onOpenChange:oe,getPopupContainer:g,placement:le==="rtl"?"bottomLeft":"bottomRight",rootClassName:y},b.createElement("span",{role:"button",tabIndex:-1,className:Me(`${r}-trigger`,{active:T}),onClick:De=>{De.stopPropagation()}},Te)))},Lke=(t,e,n)=>{let i=[];return(t||[]).forEach((r,o)=>{var s;const a=x6(o,n);if(r.filters||"filterDropdown"in r||"onFilter"in r)if("filteredValue"in r){let l=r.filteredValue;"filterDropdown"in r||(l=(s=l==null?void 0:l.map(String))!==null&&s!==void 0?s:l),i.push({column:r,key:JD(r,a),filteredKeys:l,forceFiltered:r.filtered})}else i.push({column:r,key:JD(r,a),filteredKeys:e&&r.defaultFilteredValue?r.defaultFilteredValue:void 0,forceFiltered:r.filtered});"children"in r&&(i=[].concat(Ot(i),Ot(Lke(r.children,e,a))))}),i};function rRt(t,e,n,i,r,o,s,a,l){return n.map((c,u)=>{const d=x6(u,a),{filterOnClose:h=!0,filterMultiple:f=!0,filterMode:m,filterSearch:p}=c;let g=c;if(g.filters||g.filterDropdown){const y=JD(g,d),_=i.find(w=>{let{key:C}=w;return y===C});g=Object.assign(Object.assign({},g),{title:w=>b.createElement(IJn,{tablePrefixCls:t,prefixCls:`${t}-filter`,dropdownPrefixCls:e,column:g,columnKey:y,filterState:_,filterOnClose:h,filterMultiple:f,filterMode:m,filterSearch:p,triggerFilter:o,locale:r,getPopupContainer:s,rootClassName:l},Jhe(c.title,w))})}return"children"in g&&(g=Object.assign(Object.assign({},g),{children:rRt(t,e,g.children,i,r,o,s,d,l)})),g})}const art=t=>{const e={};return t.forEach(n=>{let{key:i,filteredKeys:r,column:o}=n;const s=i,{filters:a,filterDropdown:l}=o;if(l)e[s]=r||null;else if(Array.isArray(r)){const c=f3(a);e[s]=c.filter(u=>r.includes(String(u)))}else e[s]=null}),e},Tke=(t,e,n)=>e.reduce((r,o)=>{const{column:{onFilter:s,filters:a},filteredKeys:l}=o;return s&&l&&l.length?r.map(c=>Object.assign({},c)).filter(c=>l.some(u=>{const d=f3(a),h=d.findIndex(m=>String(m)===String(u)),f=h!==-1?d[h]:u;return c[n]&&(c[n]=Tke(c[n],e,n)),s(f,c)})):r},t),oRt=t=>t.flatMap(e=>"children"in e?[e].concat(Ot(oRt(e.children||[]))):[e]),AJn=t=>{const{prefixCls:e,dropdownPrefixCls:n,mergedColumns:i,onFilterChange:r,getPopupContainer:o,locale:s,rootClassName:a}=t,l=Cr("Table"),c=b.useMemo(()=>oRt(i||[]),[i]),[u,d]=b.useState(()=>Lke(c,!0)),h=b.useMemo(()=>{const g=Lke(c,!1);if(g.length===0)return g;let y=!0,_=!0;if(g.forEach(w=>{let{filteredKeys:C}=w;C!==void 0?y=!1:_=!1}),y){const w=(c||[]).map((C,N)=>JD(C,x6(N)));return u.filter(C=>{let{key:N}=C;return w.includes(N)}).map(C=>{const N=c[w.findIndex(E=>E===C.key)];return Object.assign(Object.assign({},C),{column:Object.assign(Object.assign({},C.column),N),forceFiltered:N.filtered})})}return l(_,"usage","Columns should all contain `filteredValue` or not contain `filteredValue`."),g},[c,u]),f=b.useMemo(()=>art(h),[h]),m=g=>{const y=h.filter(_=>{let{key:w}=_;return w!==g.key});y.push(g),d(y),r(art(y),y)};return[g=>rRt(e,n,g,h,s,m,o,void 0,a),h,f]},RJn=(t,e,n)=>{const i=b.useRef({});function r(o){var s;if(!i.current||i.current.data!==t||i.current.childrenColumnName!==e||i.current.getRowKey!==n){let l=function(c){c.forEach((u,d)=>{const h=n(u,d);a.set(h,u),u&&typeof u=="object"&&e in u&&l(u[e]||[])})};const a=new Map;l(t),i.current={data:t,childrenColumnName:e,kvMap:a,getRowKey:n}}return(s=i.current.kvMap)===null||s===void 0?void 0:s.get(o)}return[r]};var PJn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const sRt=10;function OJn(t,e){const n={current:t.current,pageSize:t.pageSize};return Object.keys(e&&typeof e=="object"?e:{}).forEach(r=>{const o=t[r];typeof o!="function"&&(n[r]=o)}),n}function jJn(t,e,n){const i=n&&typeof n=="object"?n:{},{total:r=0}=i,o=PJn(i,["total"]),[s,a]=b.useState(()=>({current:"defaultCurrent"in o?o.defaultCurrent:1,pageSize:"defaultPageSize"in o?o.defaultPageSize:sRt})),l=pqn(s,o,{total:r>0?r:t}),c=Math.ceil((r||t)/l.pageSize);l.current>c&&(l.current=c||1);const u=(h,f)=>{a({current:h??1,pageSize:f||l.pageSize})},d=(h,f)=>{var m;n&&((m=n.onChange)===null||m===void 0||m.call(n,h,f)),u(h,f),e(h,f||(l==null?void 0:l.pageSize))};return n===!1?[{},()=>{}]:[Object.assign(Object.assign({},l),{onChange:d}),u]}const Bee="ascend",Kxe="descend",cie=t=>typeof t.sorter=="object"&&typeof t.sorter.multiple=="number"?t.sorter.multiple:!1,lrt=t=>typeof t=="function"?t:t&&typeof t=="object"&&t.compare?t.compare:!1,FJn=(t,e)=>e?t[t.indexOf(e)+1]:t[0],Ike=(t,e,n)=>{let i=[];const r=(o,s)=>{i.push({column:o,key:JD(o,s),multiplePriority:cie(o),sortOrder:o.sortOrder})};return(t||[]).forEach((o,s)=>{const a=x6(s,n);o.children?("sortOrder"in o&&r(o,a),i=[].concat(Ot(i),Ot(Ike(o.children,e,a)))):o.sorter&&("sortOrder"in o?r(o,a):e&&o.defaultSortOrder&&i.push({column:o,key:JD(o,a),multiplePriority:cie(o),sortOrder:o.defaultSortOrder}))}),i},aRt=(t,e,n,i,r,o,s,a)=>(e||[]).map((c,u)=>{const d=x6(u,a);let h=c;if(h.sorter){const f=h.sortDirections||r,m=h.showSorterTooltip===void 0?s:h.showSorterTooltip,p=JD(h,d),g=n.find(M=>{let{key:T}=M;return T===p}),y=g?g.sortOrder:null,_=FJn(f,y);let w;if(c.sortIcon)w=c.sortIcon({sortOrder:y});else{const M=f.includes(Bee)&&b.createElement(H2t,{className:Me(`${t}-column-sorter-up`,{active:y===Bee})}),T=f.includes(Kxe)&&b.createElement(z2t,{className:Me(`${t}-column-sorter-down`,{active:y===Kxe})});w=b.createElement("span",{className:Me(`${t}-column-sorter`,{[`${t}-column-sorter-full`]:!!(M&&T)})},b.createElement("span",{className:`${t}-column-sorter-inner`,"aria-hidden":"true"},M,T))}const{cancelSort:C,triggerAsc:N,triggerDesc:E}=o||{};let D=C;_===Kxe?D=E:_===Bee&&(D=N);const k=typeof m=="object"?Object.assign({title:D},m):{title:D};h=Object.assign(Object.assign({},h),{className:Me(h.className,{[`${t}-column-sort`]:y}),title:M=>{const T=`${t}-column-sorters`,A=b.createElement("span",{className:`${t}-column-title`},Jhe(c.title,M)),R=b.createElement("div",{className:T},A,w);return m?typeof m!="boolean"&&(m==null?void 0:m.target)==="sorter-icon"?b.createElement("div",{className:`${T} ${t}-column-sorters-tooltip-target-sorter`},A,b.createElement(Vs,Object.assign({},k),w)):b.createElement(Vs,Object.assign({},k),R):R},onHeaderCell:M=>{var T;const A=((T=c.onHeaderCell)===null||T===void 0?void 0:T.call(c,M))||{},R=A.onClick,P=A.onKeyDown;A.onClick=F=>{i({column:c,key:p,sortOrder:_,multiplePriority:cie(c)}),R==null||R(F)},A.onKeyDown=F=>{F.keyCode===Wt.ENTER&&(i({column:c,key:p,sortOrder:_,multiplePriority:cie(c)}),P==null||P(F))};const O=oJn(c.title,{}),V=O==null?void 0:O.toString();return y?A["aria-sort"]=y==="ascend"?"ascending":"descending":A["aria-label"]=V||"",A.className=Me(A.className,`${t}-column-has-sorters`),A.tabIndex=0,c.ellipsis&&(A.title=(O??"").toString()),A}})}return"children"in h&&(h=Object.assign(Object.assign({},h),{children:aRt(t,h.children,n,i,r,o,s,d)})),h}),crt=t=>{const{column:e,sortOrder:n}=t;return{column:e,order:n,field:e.dataIndex,columnKey:e.key}},urt=t=>{const e=t.filter(n=>{let{sortOrder:i}=n;return i}).map(crt);if(e.length===0&&t.length){const n=t.length-1;return Object.assign(Object.assign({},crt(t[n])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return e.length<=1?e[0]||{}:e},Ake=(t,e,n)=>{const i=e.slice().sort((s,a)=>a.multiplePriority-s.multiplePriority),r=t.slice(),o=i.filter(s=>{let{column:{sorter:a},sortOrder:l}=s;return lrt(a)&&l});return o.length?r.sort((s,a)=>{for(let l=0;l<o.length;l+=1){const c=o[l],{column:{sorter:u},sortOrder:d}=c,h=lrt(u);if(h&&d){const f=h(s,a,d);if(f!==0)return d===Bee?f:-f}}return 0}).map(s=>{const a=s[n];return a?Object.assign(Object.assign({},s),{[n]:Ake(a,e,n)}):s}):r},$Jn=t=>{const{prefixCls:e,mergedColumns:n,sortDirections:i,tableLocale:r,showSorterTooltip:o,onSorterChange:s}=t,[a,l]=b.useState(Ike(n,!0)),c=(p,g)=>{const y=[];return p.forEach((_,w)=>{const C=x6(w,g);if(y.push(JD(_,C)),Array.isArray(_.children)){const N=c(_.children,C);y.push.apply(y,Ot(N))}}),y},u=b.useMemo(()=>{let p=!0;const g=Ike(n,!1);if(!g.length){const C=c(n);return a.filter(N=>{let{key:E}=N;return C.includes(E)})}const y=[];function _(C){p?y.push(C):y.push(Object.assign(Object.assign({},C),{sortOrder:null}))}let w=null;return g.forEach(C=>{w===null?(_(C),C.sortOrder&&(C.multiplePriority===!1?p=!1:w=!0)):(w&&C.multiplePriority!==!1||(p=!1),_(C))}),y},[n,a]),d=b.useMemo(()=>{var p,g;const y=u.map(_=>{let{column:w,sortOrder:C}=_;return{column:w,order:C}});return{sortColumns:y,sortColumn:(p=y[0])===null||p===void 0?void 0:p.column,sortOrder:(g=y[0])===null||g===void 0?void 0:g.order}},[u]),h=p=>{let g;p.multiplePriority===!1||!u.length||u[0].multiplePriority===!1?g=[p]:g=[].concat(Ot(u.filter(y=>{let{key:_}=y;return _!==p.key})),[p]),l(g),s(urt(g),g)};return[p=>aRt(e,p,u,h,i,r,o),u,d,()=>urt(u)]},lRt=(t,e)=>t.map(i=>{const r=Object.assign({},i);return r.title=Jhe(i.title,e),"children"in r&&(r.children=lRt(r.children,e)),r}),VJn=t=>[b.useCallback(n=>lRt(n,t),[t])],BJn=WAt((t,e)=>{const{_renderTimes:n}=t,{_renderTimes:i}=e;return n!==i}),zJn=GAt((t,e)=>{const{_renderTimes:n}=t,{_renderTimes:i}=e;return n!==i}),HJn=t=>{const{componentCls:e,lineWidth:n,lineType:i,tableBorderColor:r,tableHeaderBg:o,tablePaddingVertical:s,tablePaddingHorizontal:a,calc:l}=t,c=`${xe(n)} ${i} ${r}`,u=(d,h,f)=>({[`&${e}-${d}`]:{[`> ${e}-container`]:{[`> ${e}-content, > ${e}-body`]:{"\n            > table > tbody > tr > th,\n            > table > tbody > tr > td\n          ":{[`> ${e}-expanded-row-fixed`]:{margin:`${xe(l(h).mul(-1).equal())}
              ${xe(l(l(f).add(n)).mul(-1).equal())}`}}}}}});return{[`${e}-wrapper`]:{[`${e}${e}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${e}-title`]:{border:c,borderBottom:0},[`> ${e}-container`]:{borderInlineStart:c,borderTop:c,[`
            > ${e}-content,
            > ${e}-header,
            > ${e}-body,
            > ${e}-summary
          `]:{"> table":{"\n                > thead > tr > th,\n                > thead > tr > td,\n                > tbody > tr > th,\n                > tbody > tr > td,\n                > tfoot > tr > th,\n                > tfoot > tr > td\n              ":{borderInlineEnd:c},"> thead":{"> tr:not(:last-child) > th":{borderBottom:c},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n                > thead > tr,\n                > tbody > tr,\n                > tfoot > tr\n              ":{[`> ${e}-cell-fix-right-first::after`]:{borderInlineEnd:c}},"\n                > tbody > tr > th,\n                > tbody > tr > td\n              ":{[`> ${e}-expanded-row-fixed`]:{margin:`${xe(l(s).mul(-1).equal())} ${xe(l(l(a).add(n)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:n,bottom:0,borderInlineEnd:c,content:'""'}}}}}},[`&${e}-scroll-horizontal`]:{[`> ${e}-container > ${e}-body`]:{"> table > tbody":{[`
                > tr${e}-expanded-row,
                > tr${e}-placeholder
              `]:{"> th, > td":{borderInlineEnd:0}}}}}},u("middle",t.tablePaddingVerticalMiddle,t.tablePaddingHorizontalMiddle)),u("small",t.tablePaddingVerticalSmall,t.tablePaddingHorizontalSmall)),{[`> ${e}-footer`]:{border:c,borderTop:0}}),[`${e}-cell`]:{[`${e}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${xe(n)} 0 ${xe(n)} ${o}`}},[`${e}-bordered ${e}-cell-scrollbar`]:{borderInlineEnd:c}}}},WJn=t=>{const{componentCls:e}=t;return{[`${e}-wrapper`]:{[`${e}-cell-ellipsis`]:Object.assign(Object.assign({},Mm),{wordBreak:"keep-all",[`
          &${e}-cell-fix-left-last,
          &${e}-cell-fix-right-first
        `]:{overflow:"visible",[`${e}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${e}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},UJn=t=>{const{componentCls:e}=t;return{[`${e}-wrapper`]:{[`${e}-tbody > tr${e}-placeholder`]:{textAlign:"center",color:t.colorTextDisabled,"\n          &:hover > th,\n          &:hover > td,\n        ":{background:t.colorBgContainer}}}}},KJn=t=>{const{componentCls:e,antCls:n,motionDurationSlow:i,lineWidth:r,paddingXS:o,lineType:s,tableBorderColor:a,tableExpandIconBg:l,tableExpandColumnWidth:c,borderRadius:u,tablePaddingVertical:d,tablePaddingHorizontal:h,tableExpandedRowBg:f,paddingXXS:m,expandIconMarginTop:p,expandIconSize:g,expandIconHalfInner:y,expandIconScale:_,calc:w}=t,C=`${xe(r)} ${s} ${a}`,N=w(m).sub(r).equal();return{[`${e}-wrapper`]:{[`${e}-expand-icon-col`]:{width:c},[`${e}-row-expand-icon-cell`]:{textAlign:"center",[`${e}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${e}-row-indent`]:{height:1,float:"left"},[`${e}-row-expand-icon`]:Object.assign(Object.assign({},OFe(t)),{position:"relative",float:"left",width:g,height:g,color:"inherit",lineHeight:xe(g),background:l,border:C,borderRadius:u,transform:`scale(${_})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${i} ease-out`,content:'""'},"&::before":{top:y,insetInlineEnd:N,insetInlineStart:N,height:r},"&::after":{top:N,bottom:N,insetInlineStart:y,width:r,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${e}-row-indent + ${e}-row-expand-icon`]:{marginTop:p,marginInlineEnd:o},[`tr${e}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:f}},[`${n}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${e}-expanded-row-fixed`]:{position:"relative",margin:`${xe(w(d).mul(-1).equal())} ${xe(w(h).mul(-1).equal())}`,padding:`${xe(d)} ${xe(h)}`}}}},qJn=t=>{const{componentCls:e,antCls:n,iconCls:i,tableFilterDropdownWidth:r,tableFilterDropdownSearchWidth:o,paddingXXS:s,paddingXS:a,colorText:l,lineWidth:c,lineType:u,tableBorderColor:d,headerIconColor:h,fontSizeSM:f,tablePaddingHorizontal:m,borderRadius:p,motionDurationSlow:g,colorTextDescription:y,colorPrimary:_,tableHeaderFilterActiveBg:w,colorTextDisabled:C,tableFilterDropdownBg:N,tableFilterDropdownHeight:E,controlItemBgHover:D,controlItemBgActive:k,boxShadowSecondary:M,filterDropdownMenuBg:T,calc:A}=t,R=`${n}-dropdown`,P=`${e}-filter-dropdown`,O=`${n}-tree`,V=`${xe(c)} ${u} ${d}`;return[{[`${e}-wrapper`]:{[`${e}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${e}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:A(s).mul(-1).equal(),marginInline:`${xe(s)} ${xe(A(m).div(2).mul(-1).equal())}`,padding:`0 ${xe(s)}`,color:h,fontSize:f,borderRadius:p,cursor:"pointer",transition:`all ${g}`,"&:hover":{color:y,background:w},"&.active":{color:_}}}},{[`${n}-dropdown`]:{[P]:Object.assign(Object.assign({},fo(t)),{minWidth:r,backgroundColor:N,borderRadius:p,boxShadow:M,overflow:"hidden",[`${R}-menu`]:{maxHeight:E,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:T,"&:empty::after":{display:"block",padding:`${xe(a)} 0`,color:C,fontSize:f,textAlign:"center",content:'"Not Found"'}},[`${P}-tree`]:{paddingBlock:`${xe(a)} 0`,paddingInline:a,[O]:{padding:0},[`${O}-treenode ${O}-node-content-wrapper:hover`]:{backgroundColor:D},[`${O}-treenode-checkbox-checked ${O}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:k}}},[`${P}-search`]:{padding:a,borderBottom:V,"&-input":{input:{minWidth:o},[i]:{color:C}}},[`${P}-checkall`]:{width:"100%",marginBottom:s,marginInlineStart:s},[`${P}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${xe(A(a).sub(c).equal())} ${xe(a)}`,overflow:"hidden",borderTop:V}})}},{[`${n}-dropdown ${P}, ${P}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:a,color:l},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},GJn=t=>{const{componentCls:e,lineWidth:n,colorSplit:i,motionDurationSlow:r,zIndexTableFixed:o,tableBg:s,zIndexTableSticky:a,calc:l}=t,c=i;return{[`${e}-wrapper`]:{[`
        ${e}-cell-fix-left,
        ${e}-cell-fix-right
      `]:{position:"sticky !important",zIndex:o,background:s},[`
        ${e}-cell-fix-left-first::after,
        ${e}-cell-fix-left-last::after
      `]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:l(n).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:`box-shadow ${r}`,content:'""',pointerEvents:"none"},[`${e}-cell-fix-left-all::after`]:{display:"none"},[`
        ${e}-cell-fix-right-first::after,
        ${e}-cell-fix-right-last::after
      `]:{position:"absolute",top:0,bottom:l(n).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${r}`,content:'""',pointerEvents:"none"},[`${e}-container`]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:l(a).add(1).equal({unit:!1}),width:30,transition:`box-shadow ${r}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${e}-ping-left`]:{[`&:not(${e}-has-fix-left) ${e}-container::before`]:{boxShadow:`inset 10px 0 8px -8px ${c}`},[`
          ${e}-cell-fix-left-first::after,
          ${e}-cell-fix-left-last::after
        `]:{boxShadow:`inset 10px 0 8px -8px ${c}`},[`${e}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${e}-ping-right`]:{[`&:not(${e}-has-fix-right) ${e}-container::after`]:{boxShadow:`inset -10px 0 8px -8px ${c}`},[`
          ${e}-cell-fix-right-first::after,
          ${e}-cell-fix-right-last::after
        `]:{boxShadow:`inset -10px 0 8px -8px ${c}`}},[`${e}-fixed-column-gapped`]:{[`
        ${e}-cell-fix-left-first::after,
        ${e}-cell-fix-left-last::after,
        ${e}-cell-fix-right-first::after,
        ${e}-cell-fix-right-last::after
      `]:{boxShadow:"none"}}}}},YJn=t=>{const{componentCls:e,antCls:n,margin:i}=t;return{[`${e}-wrapper`]:{[`${e}-pagination${n}-pagination`]:{margin:`${xe(i)} 0`},[`${e}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:t.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},XJn=t=>{const{componentCls:e,tableRadius:n}=t;return{[`${e}-wrapper`]:{[e]:{[`${e}-title, ${e}-header`]:{borderRadius:`${xe(n)} ${xe(n)} 0 0`},[`${e}-title + ${e}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${e}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:`0 0 ${xe(n)} ${xe(n)}`}}}}},ZJn=t=>{const{componentCls:e}=t;return{[`${e}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${e}-pagination-left`]:{justifyContent:"flex-end"},[`${e}-pagination-right`]:{justifyContent:"flex-start"},[`${e}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${e}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${e}-row-indent`]:{float:"right"}}}}},QJn=t=>{const{componentCls:e,antCls:n,iconCls:i,fontSizeIcon:r,padding:o,paddingXS:s,headerIconColor:a,headerIconHoverColor:l,tableSelectionColumnWidth:c,tableSelectedRowBg:u,tableSelectedRowHoverBg:d,tableRowHoverBg:h,tablePaddingHorizontal:f,calc:m}=t;return{[`${e}-wrapper`]:{[`${e}-selection-col`]:{width:c,[`&${e}-selection-col-with-dropdown`]:{width:m(c).add(r).add(m(o).div(4)).equal()}},[`${e}-bordered ${e}-selection-col`]:{width:m(c).add(m(s).mul(2)).equal(),[`&${e}-selection-col-with-dropdown`]:{width:m(c).add(r).add(m(o).div(4)).add(m(s).mul(2)).equal()}},[`
        table tr th${e}-selection-column,
        table tr td${e}-selection-column,
        ${e}-selection-column
      `]:{paddingInlineEnd:t.paddingXS,paddingInlineStart:t.paddingXS,textAlign:"center",[`${n}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${e}-selection-column${e}-cell-fix-left`]:{zIndex:m(t.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${e}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${e}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${e}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${t.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:xe(m(f).div(4).equal()),[i]:{color:a,fontSize:r,verticalAlign:"baseline","&:hover":{color:l}}},[`${e}-tbody`]:{[`${e}-row`]:{[`&${e}-row-selected`]:{[`> ${e}-cell`]:{background:u,"&-row-hover":{background:d}}},[`> ${e}-cell-row-hover`]:{background:h}}}}}},JJn=t=>{const{componentCls:e,tableExpandColumnWidth:n,calc:i}=t,r=(o,s,a,l)=>({[`${e}${e}-${o}`]:{fontSize:l,[`
        ${e}-title,
        ${e}-footer,
        ${e}-cell,
        ${e}-thead > tr > th,
        ${e}-tbody > tr > th,
        ${e}-tbody > tr > td,
        tfoot > tr > th,
        tfoot > tr > td
      `]:{padding:`${xe(s)} ${xe(a)}`},[`${e}-filter-trigger`]:{marginInlineEnd:xe(i(a).div(2).mul(-1).equal())},[`${e}-expanded-row-fixed`]:{margin:`${xe(i(s).mul(-1).equal())} ${xe(i(a).mul(-1).equal())}`},[`${e}-tbody`]:{[`${e}-wrapper:only-child ${e}`]:{marginBlock:xe(i(s).mul(-1).equal()),marginInline:`${xe(i(n).sub(a).equal())} ${xe(i(a).mul(-1).equal())}`}},[`${e}-selection-extra`]:{paddingInlineStart:xe(i(a).div(4).equal())}}});return{[`${e}-wrapper`]:Object.assign(Object.assign({},r("middle",t.tablePaddingVerticalMiddle,t.tablePaddingHorizontalMiddle,t.tableFontSizeMiddle)),r("small",t.tablePaddingVerticalSmall,t.tablePaddingHorizontalSmall,t.tableFontSizeSmall))}},eei=t=>{const{componentCls:e,marginXXS:n,fontSizeIcon:i,headerIconColor:r,headerIconHoverColor:o}=t;return{[`${e}-wrapper`]:{[`${e}-thead th${e}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}, left 0s`,"&:hover":{background:t.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:t.colorPrimary},[`
          &${e}-cell-fix-left:hover,
          &${e}-cell-fix-right:hover
        `]:{background:t.tableFixedHeaderSortActiveBg}},[`${e}-thead th${e}-column-sort`]:{background:t.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${e}-column-sort`]:{background:t.tableBodySortBg},[`${e}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${e}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${e}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:"none"}},[`${e}-column-sorter`]:{marginInlineStart:n,color:r,fontSize:0,transition:`color ${t.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:i,"&.active":{color:t.colorPrimary}},[`${e}-column-sorter-up + ${e}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${e}-column-sorters:hover ${e}-column-sorter`]:{color:o}}}},tei=t=>{const{componentCls:e,opacityLoading:n,tableScrollThumbBg:i,tableScrollThumbBgHover:r,tableScrollThumbSize:o,tableScrollBg:s,zIndexTableSticky:a,stickyScrollBarBorderRadius:l,lineWidth:c,lineType:u,tableBorderColor:d}=t,h=`${xe(c)} ${u} ${d}`;return{[`${e}-wrapper`]:{[`${e}-sticky`]:{"&-holder":{position:"sticky",zIndex:a,background:t.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${xe(o)} !important`,zIndex:a,display:"flex",alignItems:"center",background:s,borderTop:h,opacity:n,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:o,backgroundColor:i,borderRadius:l,transition:`all ${t.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:r}}}}}}},drt=t=>{const{componentCls:e,lineWidth:n,tableBorderColor:i,calc:r}=t,o=`${xe(n)} ${t.lineType} ${i}`;return{[`${e}-wrapper`]:{[`${e}-summary`]:{position:"relative",zIndex:t.zIndexTableFixed,background:t.tableBg,"> tr":{"> th, > td":{borderBottom:o}}},[`div${e}-summary`]:{boxShadow:`0 ${xe(r(n).mul(-1).equal())} 0 ${i}`}}}},nei=t=>{const{componentCls:e,motionDurationMid:n,lineWidth:i,lineType:r,tableBorderColor:o,calc:s}=t,a=`${xe(i)} ${r} ${o}`,l=`${e}-expanded-row-cell`;return{[`${e}-wrapper`]:{[`${e}-tbody-virtual`]:{[`${e}-tbody-virtual-holder-inner`]:{[`
            & > ${e}-row, 
            & > div:not(${e}-row) > ${e}-row
          `]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${e}-cell`]:{borderBottom:a,transition:`background ${n}`},[`${e}-expanded-row`]:{[`${l}${l}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${xe(i)})`,borderInlineEnd:"none"}}},[`${e}-bordered`]:{[`${e}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:a,position:"absolute"},[`${e}-cell`]:{borderInlineEnd:a,[`&${e}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:s(i).mul(-1).equal(),borderInlineStart:a}}},[`&${e}-virtual`]:{[`${e}-placeholder ${e}-cell`]:{borderInlineEnd:a,borderBottom:a}}}}}},iei=t=>{const{componentCls:e,fontWeightStrong:n,tablePaddingVertical:i,tablePaddingHorizontal:r,tableExpandColumnWidth:o,lineWidth:s,lineType:a,tableBorderColor:l,tableFontSize:c,tableBg:u,tableRadius:d,tableHeaderTextColor:h,motionDurationMid:f,tableHeaderBg:m,tableHeaderCellSplitColor:p,tableFooterTextColor:g,tableFooterBg:y,calc:_}=t,w=`${xe(s)} ${a} ${l}`;return{[`${e}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},O0()),{[e]:Object.assign(Object.assign({},fo(t)),{fontSize:c,background:u,borderRadius:`${xe(d)} ${xe(d)} 0 0`,scrollbarColor:`${t.tableScrollThumbBg} ${t.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${xe(d)} ${xe(d)} 0 0`,borderCollapse:"separate",borderSpacing:0},[`
          ${e}-cell,
          ${e}-thead > tr > th,
          ${e}-tbody > tr > th,
          ${e}-tbody > tr > td,
          tfoot > tr > th,
          tfoot > tr > td
        `]:{position:"relative",padding:`${xe(i)} ${xe(r)}`,overflowWrap:"break-word"},[`${e}-title`]:{padding:`${xe(i)} ${xe(r)}`},[`${e}-thead`]:{"\n          > tr > th,\n          > tr > td\n        ":{position:"relative",color:h,fontWeight:n,textAlign:"start",background:m,borderBottom:w,transition:`background ${f} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${e}-selection-column):not(${e}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:p,transform:"translateY(-50%)",transition:`background-color ${f}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${e}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${f}, border-color ${f}`,borderBottom:w,[`
              > ${e}-wrapper:only-child,
              > ${e}-expanded-row-fixed > ${e}-wrapper:only-child
            `]:{[e]:{marginBlock:xe(_(i).mul(-1).equal()),marginInline:`${xe(_(o).sub(r).equal())}
                ${xe(_(r).mul(-1).equal())}`,[`${e}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:h,fontWeight:n,textAlign:"start",background:m,borderBottom:w,transition:`background ${f} ease`}}},[`${e}-footer`]:{padding:`${xe(i)} ${xe(r)}`,color:g,background:y}})}},rei=t=>{const{colorFillAlter:e,colorBgContainer:n,colorTextHeading:i,colorFillSecondary:r,colorFillContent:o,controlItemBgActive:s,controlItemBgActiveHover:a,padding:l,paddingSM:c,paddingXS:u,colorBorderSecondary:d,borderRadiusLG:h,controlHeight:f,colorTextPlaceholder:m,fontSize:p,fontSizeSM:g,lineHeight:y,lineWidth:_,colorIcon:w,colorIconHover:C,opacityLoading:N,controlInteractiveSize:E}=t,D=new ko(r).onBackground(n).toHexShortString(),k=new ko(o).onBackground(n).toHexShortString(),M=new ko(e).onBackground(n).toHexShortString(),T=new ko(w),A=new ko(C),R=E/2-_,P=R*2+_*3;return{headerBg:M,headerColor:i,headerSortActiveBg:D,headerSortHoverBg:k,bodySortBg:M,rowHoverBg:M,rowSelectedBg:s,rowSelectedHoverBg:a,rowExpandedBg:e,cellPaddingBlock:l,cellPaddingInline:l,cellPaddingBlockMD:c,cellPaddingInlineMD:u,cellPaddingBlockSM:u,cellPaddingInlineSM:u,borderColor:d,headerBorderRadius:h,footerBg:M,footerColor:i,cellFontSize:p,cellFontSizeMD:p,cellFontSizeSM:p,headerSplitColor:d,fixedHeaderSortActiveBg:D,headerFilterHoverBg:o,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:f,stickyScrollBarBg:m,stickyScrollBarBorderRadius:100,expandIconMarginTop:(p*y-_*3)/2-Math.ceil((g*1.4-_*3)/2),headerIconColor:T.clone().setAlpha(T.getAlpha()*N).toRgbString(),headerIconHoverColor:A.clone().setAlpha(A.getAlpha()*N).toRgbString(),expandIconHalfInner:R,expandIconSize:P,expandIconScale:E/P}},hrt=2,oei=Jr("Table",t=>{const{colorTextHeading:e,colorSplit:n,colorBgContainer:i,controlInteractiveSize:r,headerBg:o,headerColor:s,headerSortActiveBg:a,headerSortHoverBg:l,bodySortBg:c,rowHoverBg:u,rowSelectedBg:d,rowSelectedHoverBg:h,rowExpandedBg:f,cellPaddingBlock:m,cellPaddingInline:p,cellPaddingBlockMD:g,cellPaddingInlineMD:y,cellPaddingBlockSM:_,cellPaddingInlineSM:w,borderColor:C,footerBg:N,footerColor:E,headerBorderRadius:D,cellFontSize:k,cellFontSizeMD:M,cellFontSizeSM:T,headerSplitColor:A,fixedHeaderSortActiveBg:R,headerFilterHoverBg:P,filterDropdownBg:O,expandIconBg:V,selectionColumnWidth:F,stickyScrollBarBg:$,calc:B}=t,z=mr(t,{tableFontSize:k,tableBg:i,tableRadius:D,tablePaddingVertical:m,tablePaddingHorizontal:p,tablePaddingVerticalMiddle:g,tablePaddingHorizontalMiddle:y,tablePaddingVerticalSmall:_,tablePaddingHorizontalSmall:w,tableBorderColor:C,tableHeaderTextColor:s,tableHeaderBg:o,tableFooterTextColor:E,tableFooterBg:N,tableHeaderCellSplitColor:A,tableHeaderSortBg:a,tableHeaderSortHoverBg:l,tableBodySortBg:c,tableFixedHeaderSortActiveBg:R,tableHeaderFilterActiveBg:P,tableFilterDropdownBg:O,tableRowHoverBg:u,tableSelectedRowBg:d,tableSelectedRowHoverBg:h,zIndexTableFixed:hrt,zIndexTableSticky:B(hrt).add(1).equal({unit:!1}),tableFontSizeMiddle:M,tableFontSizeSmall:T,tableSelectionColumnWidth:F,tableExpandIconBg:V,tableExpandColumnWidth:B(r).add(B(t.padding).mul(2)).equal(),tableExpandedRowBg:f,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:$,tableScrollThumbBgHover:e,tableScrollBg:n});return[iei(z),YJn(z),drt(z),eei(z),qJn(z),HJn(z),XJn(z),KJn(z),drt(z),UJn(z),QJn(z),GJn(z),tei(z),WJn(z),JJn(z),ZJn(z),nei(z)]},rei,{unitless:{expandIconScale:!0}}),sei=[],aei=(t,e)=>{var n,i;const{prefixCls:r,className:o,rootClassName:s,style:a,size:l,bordered:c,dropdownPrefixCls:u,dataSource:d,pagination:h,rowSelection:f,rowKey:m="key",rowClassName:p,columns:g,children:y,childrenColumnName:_,onChange:w,getPopupContainer:C,loading:N,expandIcon:E,expandable:D,expandedRowRender:k,expandIconColumnIndex:M,indentSize:T,scroll:A,sortDirections:R,locale:P,showSorterTooltip:O={target:"full-header"},virtual:V}=t,F=Cr("Table");F(!(typeof m=="function"&&m.length>1),"usage","`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.");const $=b.useMemo(()=>g||y$e(y),[g,y]),B=b.useMemo(()=>$.some(We=>We.responsive),[$]),z=vhe(B),H=b.useMemo(()=>{const We=new Set(Object.keys(z).filter(tt=>z[tt]));return $.filter(tt=>!tt.responsive||tt.responsive.some(_t=>We.has(_t)))},[$,z]),K=Zs(t,["className","style","columns"]),{locale:q=Dv,direction:U,table:Y,renderEmpty:J,getPrefixCls:ae,getPopupContainer:se}=b.useContext(jn),oe=Hc(l),fe=Object.assign(Object.assign({},q.Table),P),de=d||sei,ie=ae("table",r),Q=ae("dropdown",u),[,be]=Sd(),le=Il(ie),[Ne,Le,Te]=oei(ie,le),De=Object.assign(Object.assign({childrenColumnName:_,expandIconColumnIndex:M},D),{expandIcon:(n=D==null?void 0:D.expandIcon)!==null&&n!==void 0?n:(i=Y==null?void 0:Y.expandable)===null||i===void 0?void 0:i.expandIcon}),{childrenColumnName:Pe="children"}=De,ge=b.useMemo(()=>de.some(We=>We==null?void 0:We[Pe])?"nest":k||D!=null&&D.expandedRowRender?"row":null,[de]),he={body:b.useRef()},me=rJn(ie),X=b.useRef(null),re=b.useRef(null);nJn(e,()=>Object.assign(Object.assign({},re.current),{nativeElement:X.current}));const we=b.useMemo(()=>typeof m=="function"?m:We=>We==null?void 0:We[m],[m]),[ue]=RJn(de,Pe,we),Ce={},ze=function(We,tt){let _t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var ht,qe,ft,Ct;const Pt=Object.assign(Object.assign({},Ce),We);_t&&((ht=Ce.resetPagination)===null||ht===void 0||ht.call(Ce),!((qe=Pt.pagination)===null||qe===void 0)&&qe.current&&(Pt.pagination.current=1),h&&((ft=h.onChange)===null||ft===void 0||ft.call(h,1,(Ct=Pt.pagination)===null||Ct===void 0?void 0:Ct.pageSize))),A&&A.scrollToFirstRowOnChange!==!1&&he.body.current&&U4n(0,{getContainer:()=>he.body.current}),w==null||w(Pt.pagination,Pt.filters,Pt.sorter,{currentDataSource:Tke(Ake(de,Pt.sorterStates,Pe),Pt.filterStates,Pe),action:tt})},Ye=(We,tt)=>{ze({sorter:We,sorterStates:tt},"sort",!1)},[Ke,Xe,it,ut]=$Jn({prefixCls:ie,mergedColumns:H,onSorterChange:Ye,sortDirections:R||["ascend","descend"],tableLocale:fe,showSorterTooltip:O}),Ge=b.useMemo(()=>Ake(de,Xe,Pe),[de,Xe]);Ce.sorter=ut(),Ce.sorterStates=Xe;const Ee=(We,tt)=>{ze({filters:We,filterStates:tt},"filter",!0)},[Se,je,nt]=AJn({prefixCls:ie,locale:fe,dropdownPrefixCls:Q,mergedColumns:H,onFilterChange:Ee,getPopupContainer:C||se,rootClassName:Me(s,le)}),rt=Tke(Ge,je,Pe);Ce.filters=nt,Ce.filterStates=je;const St=b.useMemo(()=>{const We={};return Object.keys(nt).forEach(tt=>{nt[tt]!==null&&(We[tt]=nt[tt])}),Object.assign(Object.assign({},it),{filters:We})},[it,nt]),[At]=VJn(St),Nt=(We,tt)=>{ze({pagination:Object.assign(Object.assign({},Ce.pagination),{current:We,pageSize:tt})},"paginate")},[vt,$t]=jJn(rt.length,Nt,h);Ce.pagination=h===!1?{}:OJn(vt,h),Ce.resetPagination=$t;const ln=b.useMemo(()=>{if(h===!1||!vt.pageSize)return rt;const{current:We=1,total:tt,pageSize:_t=sRt}=vt;return F(We>0,"usage","`current` should be positive number."),rt.length<tt?rt.length>_t?(F(!1,"usage","`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode."),rt.slice((We-1)*_t,We*_t)):rt:rt.slice((We-1)*_t,We*_t)},[!!h,rt,vt==null?void 0:vt.current,vt==null?void 0:vt.pageSize,vt==null?void 0:vt.total]),[Jt,en]=eJn({prefixCls:ie,data:rt,pageData:ln,getRowKey:we,getRecordByKey:ue,expandType:ge,childrenColumnName:Pe,locale:fe,getPopupContainer:C||se},f),Ft=(We,tt,_t)=>{let ht;return typeof p=="function"?ht=Me(p(We,tt,_t)):ht=Me(p),Me({[`${ie}-row-selected`]:en.has(we(We,tt))},ht)};De.__PARENT_RENDER_ICON__=De.expandIcon,De.expandIcon=De.expandIcon||E||iJn(fe),ge==="nest"&&De.expandIconColumnIndex===void 0?De.expandIconColumnIndex=f?1:0:De.expandIconColumnIndex>0&&f&&(De.expandIconColumnIndex-=1),typeof De.indentSize!="number"&&(De.indentSize=typeof T=="number"?T:15);const dn=b.useCallback(We=>At(Jt(Se(Ke(We)))),[Ke,Se,Jt]);let Ze,dt;if(h!==!1&&(vt!=null&&vt.total)){let We;vt.size?We=vt.size:We=oe==="small"||oe==="middle"?"small":void 0;const tt=qe=>b.createElement(D2t,Object.assign({},vt,{className:Me(`${ie}-pagination ${ie}-pagination-${qe}`,vt.className),size:We})),_t=U==="rtl"?"left":"right",{position:ht}=vt;if(ht!==null&&Array.isArray(ht)){const qe=ht.find(Pt=>Pt.includes("top")),ft=ht.find(Pt=>Pt.includes("bottom")),Ct=ht.every(Pt=>`${Pt}`=="none");!qe&&!ft&&!Ct&&(dt=tt(_t)),qe&&(Ze=tt(qe.toLowerCase().replace("top",""))),ft&&(dt=tt(ft.toLowerCase().replace("bottom","")))}else dt=tt(_t)}let at;typeof N=="boolean"?at={spinning:N}:typeof N=="object"&&(at=Object.assign({spinning:!0},N));const mt=Me(Te,le,`${ie}-wrapper`,Y==null?void 0:Y.className,{[`${ie}-wrapper-rtl`]:U==="rtl"},o,s,Le),It=Object.assign(Object.assign({},Y==null?void 0:Y.style),a),Ve=typeof(P==null?void 0:P.emptyText)<"u"?P.emptyText:(J==null?void 0:J("Table"))||b.createElement(lLt,{componentName:"Table"}),bt=V?zJn:BJn,wt={},$e=b.useMemo(()=>{const{fontSize:We,lineHeight:tt,padding:_t,paddingXS:ht,paddingSM:qe}=be,ft=Math.floor(We*tt);switch(oe){case"large":return _t*2+ft;case"small":return ht*2+ft;default:return qe*2+ft}},[be,oe]);return V&&(wt.listItemHeight=$e),Ne(b.createElement("div",{ref:X,className:mt,style:It},b.createElement(zS,Object.assign({spinning:!1},at),Ze,b.createElement(bt,Object.assign({},wt,K,{ref:re,columns:H,direction:U,expandable:De,prefixCls:ie,className:Me({[`${ie}-middle`]:oe==="middle",[`${ie}-small`]:oe==="small",[`${ie}-bordered`]:c,[`${ie}-empty`]:de.length===0},Te,le,Le),data:ln,rowKey:we,rowClassName:Ft,emptyText:Ve,internalHooks:iq,internalRefs:he,transformColumns:dn,getContainerWidth:me})),dt)))},lei=b.forwardRef(aei),cei=(t,e)=>{const n=b.useRef(0);return n.current+=1,b.createElement(lei,Object.assign({},t,{ref:e,_renderTimes:n.current}))},qs=b.forwardRef(cei);qs.SELECTION_COLUMN=K_;qs.EXPAND_COLUMN=J_;qs.SELECTION_ALL=Eke;qs.SELECTION_INVERT=Dke;qs.SELECTION_NONE=kke;qs.Column=HQn;qs.ColumnGroup=WQn;qs.Summary=MAt;qs.displayName="Table";const uei=t=>{const{paddingXXS:e,lineWidth:n,tagPaddingHorizontal:i,componentCls:r,calc:o}=t,s=o(i).sub(n).equal(),a=o(e).sub(n).equal();return{[r]:Object.assign(Object.assign({},fo(t)),{display:"inline-block",height:"auto",marginInlineEnd:t.marginXS,paddingInline:s,fontSize:t.tagFontSize,lineHeight:t.tagLineHeight,whiteSpace:"nowrap",background:t.defaultBg,border:`${xe(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusSM,opacity:1,transition:`all ${t.motionDurationMid}`,textAlign:"start",position:"relative",[`&${r}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:t.defaultColor},[`${r}-close-icon`]:{marginInlineStart:a,fontSize:t.tagIconSize,color:t.colorTextDescription,cursor:"pointer",transition:`all ${t.motionDurationMid}`,"&:hover":{color:t.colorTextHeading}},[`&${r}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${t.iconCls}-close, ${t.iconCls}-close:hover`]:{color:t.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${r}-checkable-checked):hover`]:{color:t.colorPrimary,backgroundColor:t.colorFillSecondary},"&:active, &-checked":{color:t.colorTextLightSolid},"&-checked":{backgroundColor:t.colorPrimary,"&:hover":{backgroundColor:t.colorPrimaryHover}},"&:active":{backgroundColor:t.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${t.iconCls} + span, > span + ${t.iconCls}`]:{marginInlineStart:s}}),[`${r}-borderless`]:{borderColor:"transparent",background:t.tagBorderlessBg}}},D$e=t=>{const{lineWidth:e,fontSizeIcon:n,calc:i}=t,r=t.fontSizeSM;return mr(t,{tagFontSize:r,tagLineHeight:xe(i(t.lineHeightSM).mul(r).equal()),tagIconSize:i(n).sub(i(e).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:t.defaultBg})},k$e=t=>({defaultBg:new ko(t.colorFillQuaternary).onBackground(t.colorBgContainer).toHexString(),defaultColor:t.colorText}),cRt=Jr("Tag",t=>{const e=D$e(t);return uei(e)},k$e);var dei=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const hei=b.forwardRef((t,e)=>{const{prefixCls:n,style:i,className:r,checked:o,onChange:s,onClick:a}=t,l=dei(t,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:c,tag:u}=b.useContext(jn),d=y=>{s==null||s(!o),a==null||a(y)},h=c("tag",n),[f,m,p]=cRt(h),g=Me(h,`${h}-checkable`,{[`${h}-checkable-checked`]:o},u==null?void 0:u.className,r,m,p);return f(b.createElement("span",Object.assign({},l,{ref:e,style:Object.assign(Object.assign({},i),u==null?void 0:u.style),className:g,onClick:d})))}),fei=t=>Jde(t,(e,n)=>{let{textColor:i,lightBorderColor:r,lightColor:o,darkColor:s}=n;return{[`${t.componentCls}${t.componentCls}-${e}`]:{color:i,background:o,borderColor:r,"&-inverse":{color:t.colorTextLightSolid,background:s,borderColor:s},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}}),mei=$A(["Tag","preset"],t=>{const e=D$e(t);return fei(e)},k$e);function pei(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.slice(1)}const GZ=(t,e,n)=>{const i=pei(n);return{[`${t.componentCls}${t.componentCls}-${e}`]:{color:t[`color${n}`],background:t[`color${i}Bg`],borderColor:t[`color${i}Border`],[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}},gei=$A(["Tag","status"],t=>{const e=D$e(t);return[GZ(e,"success","Success"),GZ(e,"processing","Info"),GZ(e,"error","Error"),GZ(e,"warning","Warning")]},k$e);var bei=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const vei=b.forwardRef((t,e)=>{const{prefixCls:n,className:i,rootClassName:r,style:o,children:s,icon:a,color:l,onClose:c,bordered:u=!0,visible:d}=t,h=bei(t,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:f,direction:m,tag:p}=b.useContext(jn),[g,y]=b.useState(!0),_=Zs(h,["closeIcon","closable"]);Cr("Tag").deprecated(!("visible"in t),"visible","visible && <Tag />"),b.useEffect(()=>{d!==void 0&&y(d)},[d]);const w=xhe(l),C=I8n(l),N=w||C,E=Object.assign(Object.assign({backgroundColor:l&&!N?l:void 0},p==null?void 0:p.style),o),D=f("tag",n),[k,M,T]=cRt(D),A=Me(D,p==null?void 0:p.className,{[`${D}-${l}`]:N,[`${D}-has-color`]:l&&!N,[`${D}-hidden`]:!g,[`${D}-rtl`]:m==="rtl",[`${D}-borderless`]:!u},i,r,M,T),R=B=>{B.stopPropagation(),c==null||c(B),!B.defaultPrevented&&y(!1)},[,P]=a6e(zj(t),zj(p),{closable:!1,closeIconRender:B=>{const z=b.createElement("span",{className:`${D}-close-icon`,onClick:R},B);return VFe(B,z,H=>({onClick:K=>{var q;(q=H==null?void 0:H.onClick)===null||q===void 0||q.call(H,K),R(K)},className:Me(H==null?void 0:H.className,`${D}-close-icon`)}))}}),O=typeof h.onClick=="function"||s&&s.type==="a",V=a||null,F=V?b.createElement(b.Fragment,null,V,s&&b.createElement("span",null,s)):s,$=b.createElement("span",Object.assign({},_,{ref:e,className:A,style:E}),F,P,w&&b.createElement(mei,{key:"preset",prefixCls:D}),C&&b.createElement(gei,{key:"status",prefixCls:D}));return k(O?b.createElement(o6,{component:"Tag"},$):$)}),kv=vei;kv.displayName="Tag";kv.CheckableTag=hei;const yei=t=>{const{componentCls:e,calc:n}=t;return{[e]:Object.assign(Object.assign({},fo(t)),{margin:0,padding:0,listStyle:"none",[`${e}-item`]:{position:"relative",margin:0,paddingBottom:t.itemPaddingBottom,fontSize:t.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:t.itemHeadSize,insetInlineStart:n(n(t.itemHeadSize).sub(t.tailWidth)).div(2).equal(),height:`calc(100% - ${xe(t.itemHeadSize)})`,borderInlineStart:`${xe(t.tailWidth)} ${t.lineType} ${t.tailColor}`},"&-pending":{[`${e}-item-head`]:{fontSize:t.fontSizeSM,backgroundColor:"transparent"},[`${e}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:t.itemHeadSize,height:t.itemHeadSize,backgroundColor:t.dotBg,border:`${xe(t.dotBorderWidth)} ${t.lineType} transparent`,borderRadius:"50%","&-blue":{color:t.colorPrimary,borderColor:t.colorPrimary},"&-red":{color:t.colorError,borderColor:t.colorError},"&-green":{color:t.colorSuccess,borderColor:t.colorSuccess},"&-gray":{color:t.colorTextDisabled,borderColor:t.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:n(t.itemHeadSize).div(2).equal(),insetInlineStart:n(t.itemHeadSize).div(2).equal(),width:"auto",height:"auto",marginBlockStart:0,paddingBlock:t.customHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:n(n(t.fontSize).mul(t.lineHeight).sub(t.fontSize)).mul(-1).add(t.lineWidth).equal(),marginInlineStart:n(t.margin).add(t.itemHeadSize).equal(),marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${e}-item-tail`]:{display:"none"},[`> ${e}-item-content`]:{minHeight:n(t.controlHeightLG).mul(1.2).equal()}}},[`&${e}-alternate,
        &${e}-right,
        &${e}-label`]:{[`${e}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:n(t.marginXXS).mul(-1).equal(),"&-custom":{marginInlineStart:n(t.tailWidth).div(2).equal()}},"&-left":{[`${e}-item-content`]:{insetInlineStart:`calc(50% - ${xe(t.marginXXS)})`,width:`calc(50% - ${xe(t.marginSM)})`,textAlign:"start"}},"&-right":{[`${e}-item-content`]:{width:`calc(50% - ${xe(t.marginSM)})`,margin:0,textAlign:"end"}}}},[`&${e}-right`]:{[`${e}-item-right`]:{[`${e}-item-tail,
            ${e}-item-head,
            ${e}-item-head-custom`]:{insetInlineStart:`calc(100% - ${xe(n(n(t.itemHeadSize).add(t.tailWidth)).div(2).equal())})`},[`${e}-item-content`]:{width:`calc(100% - ${xe(n(t.itemHeadSize).add(t.marginXS).equal())})`}}},[`&${e}-pending
        ${e}-item-last
        ${e}-item-tail`]:{display:"block",height:`calc(100% - ${xe(t.margin)})`,borderInlineStart:`${xe(t.tailWidth)} dotted ${t.tailColor}`},[`&${e}-reverse
        ${e}-item-last
        ${e}-item-tail`]:{display:"none"},[`&${e}-reverse ${e}-item-pending`]:{[`${e}-item-tail`]:{insetBlockStart:t.margin,display:"block",height:`calc(100% - ${xe(t.margin)})`,borderInlineStart:`${xe(t.tailWidth)} dotted ${t.tailColor}`},[`${e}-item-content`]:{minHeight:n(t.controlHeightLG).mul(1.2).equal()}},[`&${e}-label`]:{[`${e}-item-label`]:{position:"absolute",insetBlockStart:n(n(t.fontSize).mul(t.lineHeight).sub(t.fontSize)).mul(-1).add(t.tailWidth).equal(),width:`calc(50% - ${xe(t.marginSM)})`,textAlign:"end"},[`${e}-item-right`]:{[`${e}-item-label`]:{insetInlineStart:`calc(50% + ${xe(t.marginSM)})`,width:`calc(50% - ${xe(t.marginSM)})`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${e}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}},_ei=t=>({tailColor:t.colorSplit,tailWidth:t.lineWidthBold,dotBorderWidth:t.wireframe?t.lineWidthBold:t.lineWidth*3,dotBg:t.colorBgContainer,itemPaddingBottom:t.padding*1.25}),xei=Jr("Timeline",t=>{const e=mr(t,{itemHeadSize:10,customHeadPaddingVertical:t.paddingXXS,paddingInlineEnd:2});return[yei(e)]},_ei);var wei=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const uRt=t=>{var{prefixCls:e,className:n,color:i="blue",dot:r,pending:o=!1,position:s,label:a,children:l}=t,c=wei(t,["prefixCls","className","color","dot","pending","position","label","children"]);const{getPrefixCls:u}=b.useContext(jn),d=u("timeline",e),h=Me(`${d}-item`,{[`${d}-item-pending`]:o},n),f=/blue|red|green|gray/.test(i||"")?void 0:i,m=Me(`${d}-item-head`,{[`${d}-item-head-custom`]:!!r,[`${d}-item-head-${i}`]:!f});return b.createElement("li",Object.assign({},c,{className:h}),a&&b.createElement("div",{className:`${d}-item-label`},a),b.createElement("div",{className:`${d}-item-tail`}),b.createElement("div",{className:m,style:{borderColor:f,color:f}},r),b.createElement("div",{className:`${d}-item-content`},l))};var frt=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const Cei=t=>{var{prefixCls:e,className:n,pending:i=!1,children:r,items:o,rootClassName:s,reverse:a=!1,direction:l,hashId:c,pendingDot:u,mode:d=""}=t,h=frt(t,["prefixCls","className","pending","children","items","rootClassName","reverse","direction","hashId","pendingDot","mode"]);const f=(N,E)=>d==="alternate"?N==="right"?`${e}-item-right`:N==="left"?`${e}-item-left`:E%2===0?`${e}-item-left`:`${e}-item-right`:d==="left"?`${e}-item-left`:d==="right"?`${e}-item-right`:N==="right"?`${e}-item-right`:"",m=Ot(o||[]),p=typeof i=="boolean"?null:i;i&&m.push({pending:!!i,dot:u||b.createElement(Xd,null),children:p}),a&&m.reverse();const g=m.length,y=`${e}-item-last`,_=m.filter(N=>!!N).map((N,E)=>{var D;const k=E===g-2?y:"",M=E===g-1?y:"",{className:T}=N,A=frt(N,["className"]);return b.createElement(uRt,Object.assign({},A,{className:Me([T,!a&&i?k:M,f((D=N==null?void 0:N.position)!==null&&D!==void 0?D:"",E)]),key:(N==null?void 0:N.key)||E}))}),w=m.some(N=>!!(N!=null&&N.label)),C=Me(e,{[`${e}-pending`]:!!i,[`${e}-reverse`]:!!a,[`${e}-${d}`]:!!d&&!w,[`${e}-label`]:w,[`${e}-rtl`]:l==="rtl"},n,s,c);return b.createElement("ul",Object.assign({},h,{className:C}),_)};function Sei(t,e){return t&&Array.isArray(t)?t:fc(e).map(n=>{var i,r;return Object.assign({children:(r=(i=n==null?void 0:n.props)===null||i===void 0?void 0:i.children)!==null&&r!==void 0?r:""},n.props)})}var Nei=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const M$e=t=>{const{getPrefixCls:e,direction:n,timeline:i}=b.useContext(jn),{prefixCls:r,children:o,items:s,className:a,style:l}=t,c=Nei(t,["prefixCls","children","items","className","style"]),u=e("timeline",r);Cr("Timeline").deprecated(!o,"Timeline.Item","items");const d=Il(u),[h,f,m]=xei(u,d),p=Sei(s,o);return h(b.createElement(Cei,Object.assign({},c,{className:Me(i==null?void 0:i.className,a,m,d),style:Object.assign(Object.assign({},i==null?void 0:i.style),l),prefixCls:u,direction:n,items:p,hashId:f})))};M$e.Item=uRt;M$e.displayName="Timeline";const Eei=(t,e,n,i)=>{const{titleMarginBottom:r,fontWeightStrong:o}=i;return{marginBottom:r,color:n,fontWeight:o,fontSize:t,lineHeight:e}},Dei=t=>{const e=[1,2,3,4,5],n={};return e.forEach(i=>{n[`
      h${i}&,
      div&-h${i},
      div&-h${i} > textarea,
      h${i}
    `]=Eei(t[`fontSizeHeading${i}`],t[`lineHeightHeading${i}`],t.colorTextHeading,t)}),n},kei=t=>{const{componentCls:e}=t;return{"a&, a":Object.assign(Object.assign({},OFe(t)),{[`&[disabled], &${e}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:t.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},Mei=t=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:t.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:t.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:zne[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:600},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:t.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),Lei=t=>{const{componentCls:e,paddingSM:n}=t,i=n;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:t.calc(t.paddingSM).mul(-1).equal(),marginTop:t.calc(i).mul(-1).equal(),marginBottom:`calc(1em - ${xe(i)})`},[`${e}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:t.calc(t.marginXS).add(2).equal(),insetBlockEnd:t.marginXS,color:t.colorTextDescription,fontWeight:"normal",fontSize:t.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},Tei=t=>({[`${t.componentCls}-copy-success`]:{"\n    &,\n    &:hover,\n    &:focus":{color:t.colorSuccess}},[`${t.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),Iei=()=>({"\n  a&-ellipsis,\n  span&-ellipsis\n  ":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),Aei=t=>{const{componentCls:e,titleMarginTop:n}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorText,wordBreak:"break-word",lineHeight:t.lineHeight,[`&${e}-secondary`]:{color:t.colorTextDescription},[`&${e}-success`]:{color:t.colorSuccess},[`&${e}-warning`]:{color:t.colorWarning},[`&${e}-danger`]:{color:t.colorError,"a&:active, a&:focus":{color:t.colorErrorActive},"a&:hover":{color:t.colorErrorHover}},[`&${e}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n        div&,\n        p\n      ":{marginBottom:"1em"}},Dei(t)),{[`
      & + h1${e},
      & + h2${e},
      & + h3${e},
      & + h4${e},
      & + h5${e}
      `]:{marginTop:n},"\n      div,\n      ul,\n      li,\n      p,\n      h1,\n      h2,\n      h3,\n      h4,\n      h5":{"\n        + h1,\n        + h2,\n        + h3,\n        + h4,\n        + h5\n        ":{marginTop:n}}}),Mei(t)),kei(t)),{[`
        ${e}-expand,
        ${e}-collapse,
        ${e}-edit,
        ${e}-copy
      `]:Object.assign(Object.assign({},OFe(t)),{marginInlineStart:t.marginXXS})}),Lei(t)),Tei(t)),Iei()),{"&-rtl":{direction:"rtl"}})}},Rei=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),dRt=Jr("Typography",t=>[Aei(t)],Rei),Pei=t=>{const{prefixCls:e,"aria-label":n,className:i,style:r,direction:o,maxLength:s,autoSize:a=!0,value:l,onSave:c,onCancel:u,onEnd:d,component:h,enterIcon:f=b.createElement(G2t,null)}=t,m=b.useRef(null),p=b.useRef(!1),g=b.useRef(),[y,_]=b.useState(l);b.useEffect(()=>{_(l)},[l]),b.useEffect(()=>{var O;if(!((O=m.current)===null||O===void 0)&&O.resizableTextArea){const{textArea:V}=m.current.resizableTextArea;V.focus();const{length:F}=V.value;V.setSelectionRange(F,F)}},[]);const w=O=>{let{target:V}=O;_(V.value.replace(/[\n\r]/g,""))},C=()=>{p.current=!0},N=()=>{p.current=!1},E=O=>{let{keyCode:V}=O;p.current||(g.current=V)},D=()=>{c(y.trim())},k=O=>{let{keyCode:V,ctrlKey:F,altKey:$,metaKey:B,shiftKey:z}=O;g.current!==V||p.current||F||$||B||z||(V===Wt.ENTER?(D(),d==null||d()):V===Wt.ESC&&u())},M=()=>{D()},[T,A,R]=dRt(e),P=Me(e,`${e}-edit-content`,{[`${e}-rtl`]:o==="rtl",[`${e}-${h}`]:!!h},i,A,R);return T(b.createElement("div",{className:P,style:r},b.createElement(SIt,{ref:m,maxLength:s,value:y,onChange:w,onKeyDown:E,onKeyUp:k,onCompositionStart:C,onCompositionEnd:N,onBlur:M,"aria-label":n,rows:1,autoSize:a}),f!==null?$c(f,{className:`${e}-edit-content-confirm`}):null))};var Oei=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],i=0;i<t.rangeCount;i++)n.push(t.getRangeAt(i));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;break}return t.removeAllRanges(),function(){t.type==="Caret"&&t.removeAllRanges(),t.rangeCount||n.forEach(function(r){t.addRange(r)}),e&&e.focus()}},jei=Oei,mrt={"text/plain":"Text","text/html":"Url",default:"Text"},Fei="Copy to clipboard: #{key}, Enter";function $ei(t){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}function Vei(t,e){var n,i,r,o,s,a,l=!1;e||(e={}),n=e.debug||!1;try{r=jei(),o=document.createRange(),s=document.getSelection(),a=document.createElement("span"),a.textContent=t,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(u){if(u.stopPropagation(),e.format)if(u.preventDefault(),typeof u.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=mrt[e.format]||mrt.default;window.clipboardData.setData(d,t)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,t);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(a),o.selectNodeContents(a),s.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(u){n&&console.error("unable to copy using execCommand: ",u),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),l=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),i=$ei("message"in e?e.message:Fei),window.prompt(i,t)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(o):s.removeAllRanges()),a&&document.body.removeChild(a),r()}return l}var Bei=Vei;const zei=ao(Bei);var Hei=function(t,e,n,i){function r(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{c(i.next(u))}catch(d){s(d)}}function l(u){try{c(i.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):r(u.value).then(a,l)}c((i=i.apply(t,e||[])).next())})};const Wei=t=>{let{copyConfig:e,children:n}=t;const[i,r]=b.useState(!1),[o,s]=b.useState(!1),a=b.useRef(null),l=()=>{a.current&&clearTimeout(a.current)},c={};e.format&&(c.format=e.format),b.useEffect(()=>l,[]);const u=gr(d=>Hei(void 0,void 0,void 0,function*(){var h;d==null||d.preventDefault(),d==null||d.stopPropagation(),s(!0);try{const f=typeof e.text=="function"?yield e.text():e.text;zei(f||Kqn(n,!0).join("")||"",c),s(!1),r(!0),l(),a.current=setTimeout(()=>{r(!1)},3e3),(h=e.onCopy)===null||h===void 0||h.call(e,d)}catch(f){throw s(!1),f}}));return{copied:i,copyLoading:o,onClick:u}};function qxe(t,e){return b.useMemo(()=>{const n=!!t;return[n,Object.assign(Object.assign({},e),n&&typeof t=="object"?t:null)]},[t])}const Uei=t=>{const e=b.useRef();return b.useEffect(()=>{e.current=t}),e.current},Kei=(t,e,n)=>b.useMemo(()=>t===!0?{title:e??n}:b.isValidElement(t)?{title:t}:typeof t=="object"?Object.assign({title:e??n},t):{title:t},[t,e,n]);var qei=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const L$e=b.forwardRef((t,e)=>{const{prefixCls:n,component:i="article",className:r,rootClassName:o,setContentRef:s,children:a,direction:l,style:c}=t,u=qei(t,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:d,direction:h,typography:f}=b.useContext(jn),m=l??h,p=s?Vu(e,s):e,g=d("typography",n);Cr("Typography").deprecated(!s,"setContentRef","ref");const[y,_,w]=dRt(g),C=Me(g,f==null?void 0:f.className,{[`${g}-rtl`]:m==="rtl"},r,o,_,w),N=Object.assign(Object.assign({},f==null?void 0:f.style),c);return y(b.createElement(i,Object.assign({className:C,style:N,ref:p},u),a))});L$e.displayName="Typography";function prt(t){return t===!1?[!1,!1]:Array.isArray(t)?t:[t]}function Gxe(t,e,n){return t===!0||t===void 0?e:t||n&&e}function Gei(t){const e=document.createElement("em");t.appendChild(e),e.className="ant-typography-css-ellipsis-content-measure";const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return t.removeChild(e),n.left>i.left||i.right>n.right||n.top>i.top||i.bottom>n.bottom}const T$e=t=>["string","number"].includes(typeof t),Yei=t=>{let{prefixCls:e,copied:n,locale:i,iconOnly:r,tooltips:o,icon:s,tabIndex:a,onCopy:l,loading:c}=t;const u=prt(o),d=prt(s),{copied:h,copy:f}=i??{},m=n?h:f,p=Gxe(u[n?1:0],m),g=typeof p=="string"?p:m;return b.createElement(Vs,{title:p},b.createElement("button",{type:"button",className:Me(`${e}-copy`,{[`${e}-copy-success`]:n,[`${e}-copy-icon-only`]:r}),onClick:l,"aria-label":g,tabIndex:a},n?Gxe(d[1],b.createElement(Xk,null),!0):Gxe(d[0],c?b.createElement(Xd,null):b.createElement(K2t,null),!0)))},YZ=b.forwardRef((t,e)=>{let{style:n,children:i}=t;const r=b.useRef(null);return b.useImperativeHandle(e,()=>({isExceed:()=>{const o=r.current;return o.scrollHeight>o.clientHeight},getHeight:()=>r.current.clientHeight})),b.createElement("span",{"aria-hidden":!0,ref:r,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},n)},i)}),Xei=t=>t.reduce((e,n)=>e+(T$e(n)?String(n).length:1),0);function grt(t,e){let n=0;const i=[];for(let r=0;r<t.length;r+=1){if(n===e)return i;const o=t[r],a=T$e(o)?String(o).length:1,l=n+a;if(l>e){const c=e-n;return i.push(String(o).slice(0,c)),i}i.push(o),n=l}return t}const Yxe=0,Xxe=1,Zxe=2,Qxe=3,brt=4,XZ={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function Zei(t){const{enableMeasure:e,width:n,text:i,children:r,rows:o,expanded:s,miscDeps:a,onEllipsis:l}=t,c=b.useMemo(()=>fc(i),[i]),u=b.useMemo(()=>Xei(c),[i]),d=b.useMemo(()=>r(c,!1),[i]),[h,f]=b.useState(null),m=b.useRef(null),p=b.useRef(null),g=b.useRef(null),y=b.useRef(null),_=b.useRef(null),[w,C]=b.useState(!1),[N,E]=b.useState(Yxe),[D,k]=b.useState(0),[M,T]=b.useState(null);Lr(()=>{E(e&&n&&u?Xxe:Yxe)},[n,i,o,e,c]),Lr(()=>{var O,V,F,$;if(N===Xxe){E(Zxe);const B=p.current&&getComputedStyle(p.current).whiteSpace;T(B)}else if(N===Zxe){const B=!!(!((O=g.current)===null||O===void 0)&&O.isExceed());E(B?Qxe:brt),f(B?[0,u]:null),C(B);const z=((V=g.current)===null||V===void 0?void 0:V.getHeight())||0,H=o===1?0:((F=y.current)===null||F===void 0?void 0:F.getHeight())||0,K=(($=_.current)===null||$===void 0?void 0:$.getHeight())||0,q=Math.max(z,H+K);k(q+1),l(B)}},[N]);const A=h?Math.ceil((h[0]+h[1])/2):0;Lr(()=>{var O;const[V,F]=h||[0,0];if(V!==F){const B=(((O=m.current)===null||O===void 0?void 0:O.getHeight())||0)>D;let z=A;F-V===1&&(z=B?V:F),f(B?[V,z]:[z,F])}},[h,A]);const R=b.useMemo(()=>{if(!e)return r(c,!1);if(N!==Qxe||!h||h[0]!==h[1]){const O=r(c,!1);return[brt,Yxe].includes(N)?O:b.createElement("span",{style:Object.assign(Object.assign({},XZ),{WebkitLineClamp:o})},O)}return r(s?c:grt(c,h[0]),w)},[s,N,h,c].concat(Ot(a))),P={width:n,margin:0,padding:0,whiteSpace:M==="nowrap"?"normal":"inherit"};return b.createElement(b.Fragment,null,R,N===Zxe&&b.createElement(b.Fragment,null,b.createElement(YZ,{style:Object.assign(Object.assign(Object.assign({},P),XZ),{WebkitLineClamp:o}),ref:g},d),b.createElement(YZ,{style:Object.assign(Object.assign(Object.assign({},P),XZ),{WebkitLineClamp:o-1}),ref:y},d),b.createElement(YZ,{style:Object.assign(Object.assign(Object.assign({},P),XZ),{WebkitLineClamp:1}),ref:_},r([],!0))),N===Qxe&&h&&h[0]!==h[1]&&b.createElement(YZ,{style:Object.assign(Object.assign({},P),{top:400}),ref:m},r(grt(c,A),!0)),N===Xxe&&b.createElement("span",{style:{whiteSpace:"inherit"},ref:p}))}const hRt=t=>{let{enableEllipsis:e,isEllipsis:n,children:i,tooltipProps:r}=t;return!(r!=null&&r.title)||!e?i:b.createElement(Vs,Object.assign({open:n?void 0:!1},r),i)};hRt.displayName="EllipsisTooltip";var Qei=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};function Jei(t,e){let{mark:n,code:i,underline:r,delete:o,strong:s,keyboard:a,italic:l}=t,c=e;function u(d,h){h&&(c=b.createElement(d,{},c))}return u("strong",s),u("u",r),u("del",o),u("code",i),u("mark",n),u("kbd",a),u("i",l),c}const eti="...",efe=b.forwardRef((t,e)=>{var n;const{prefixCls:i,className:r,style:o,type:s,disabled:a,children:l,ellipsis:c,editable:u,copyable:d,component:h,title:f}=t,m=Qei(t,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:p,direction:g}=b.useContext(jn),[y]=bb("Text"),_=b.useRef(null),w=b.useRef(null),C=p("typography",i),N=Zs(m,["mark","code","delete","underline","strong","keyboard","italic"]),[E,D]=qxe(u),[k,M]=ho(!1,{value:D.editing}),{triggerType:T=["icon"]}=D,A=Se=>{var je;Se&&((je=D.onStart)===null||je===void 0||je.call(D)),M(Se)},R=Uei(k);Lr(()=>{var Se;!k&&R&&((Se=w.current)===null||Se===void 0||Se.focus())},[k]);const P=Se=>{Se==null||Se.preventDefault(),A(!0)},O=Se=>{var je;(je=D.onChange)===null||je===void 0||je.call(D,Se),A(!1)},V=()=>{var Se;(Se=D.onCancel)===null||Se===void 0||Se.call(D),A(!1)},[F,$]=qxe(d),{copied:B,copyLoading:z,onClick:H}=Wei({copyConfig:$,children:l}),[K,q]=b.useState(!1),[U,Y]=b.useState(!1),[J,ae]=b.useState(!1),[se,oe]=b.useState(!1),[fe,de]=b.useState(!0),[ie,Q]=qxe(c,{expandable:!1,symbol:Se=>Se?y==null?void 0:y.collapse:y==null?void 0:y.expand}),[be,le]=ho(Q.defaultExpanded||!1,{value:Q.expanded}),Ne=ie&&(!be||Q.expandable==="collapsible"),{rows:Le=1}=Q,Te=b.useMemo(()=>Ne&&(Q.suffix!==void 0||Q.onEllipsis||Q.expandable||E||F),[Ne,Q,E,F]);Lr(()=>{ie&&!Te&&(q(qDe("webkitLineClamp")),Y(qDe("textOverflow")))},[Te,ie]);const[De,Pe]=b.useState(Ne),ge=b.useMemo(()=>Te?!1:Le===1?U:K,[Te,U,K]);Lr(()=>{Pe(ge&&Ne)},[ge,Ne]);const he=Ne&&(De?se:J),me=Ne&&Le===1&&De,X=Ne&&Le>1&&De,re=(Se,je)=>{var nt;le(je.expanded),(nt=Q.onExpand)===null||nt===void 0||nt.call(Q,Se,je)},[we,ue]=b.useState(0),Ce=Se=>{let{offsetWidth:je}=Se;ue(je)},ze=Se=>{var je;ae(Se),J!==Se&&((je=Q.onEllipsis)===null||je===void 0||je.call(Q,Se))};b.useEffect(()=>{const Se=_.current;if(ie&&De&&Se){const je=Gei(Se);se!==je&&oe(je)}},[ie,De,l,X,fe,we]),b.useEffect(()=>{const Se=_.current;if(typeof IntersectionObserver>"u"||!Se||!De||!Ne)return;const je=new IntersectionObserver(()=>{de(!!Se.offsetParent)});return je.observe(Se),()=>{je.disconnect()}},[De,Ne]);const Ye=Kei(Q.tooltip,D.text,l),Ke=b.useMemo(()=>{if(!(!ie||De))return[D.text,l,f,Ye.title].find(T$e)},[ie,De,f,Ye.title,he]);if(k)return b.createElement(Pei,{value:(n=D.text)!==null&&n!==void 0?n:typeof l=="string"?l:"",onSave:O,onCancel:V,onEnd:D.onEnd,prefixCls:C,className:r,style:o,direction:g,component:h,maxLength:D.maxLength,autoSize:D.autoSize,enterIcon:D.enterIcon});const Xe=()=>{const{expandable:Se,symbol:je}=Q;return Se?b.createElement("button",{type:"button",key:"expand",className:`${C}-${be?"collapse":"expand"}`,onClick:nt=>re(nt,{expanded:!be}),"aria-label":be?y.collapse:y==null?void 0:y.expand},typeof je=="function"?je(be):je):null},it=()=>{if(!E)return;const{icon:Se,tooltip:je,tabIndex:nt}=D,rt=fc(je)[0]||(y==null?void 0:y.edit),St=typeof rt=="string"?rt:"";return T.includes("icon")?b.createElement(Vs,{key:"edit",title:je===!1?"":rt},b.createElement("button",{type:"button",ref:w,className:`${C}-edit`,onClick:P,"aria-label":St,tabIndex:nt},Se||b.createElement(u$e,{role:"button"}))):null},ut=()=>F?b.createElement(Yei,Object.assign({key:"copy"},$,{prefixCls:C,copied:B,locale:y,onCopy:H,loading:z,iconOnly:l==null})):null,Ge=Se=>[Se&&Xe(),it(),ut()],Ee=Se=>[Se&&!be&&b.createElement("span",{"aria-hidden":!0,key:"ellipsis"},eti),Q.suffix,Ge(Se)];return b.createElement(Kd,{onResize:Ce,disabled:!Ne},Se=>b.createElement(hRt,{tooltipProps:Ye,enableEllipsis:Ne,isEllipsis:he},b.createElement(L$e,Object.assign({className:Me({[`${C}-${s}`]:s,[`${C}-disabled`]:a,[`${C}-ellipsis`]:ie,[`${C}-ellipsis-single-line`]:me,[`${C}-ellipsis-multiple-line`]:X},r),prefixCls:i,style:Object.assign(Object.assign({},o),{WebkitLineClamp:X?Le:void 0}),component:h,ref:Vu(Se,_,e),direction:g,onClick:T.includes("text")?P:void 0,"aria-label":Ke==null?void 0:Ke.toString(),title:f},N),b.createElement(Zei,{enableMeasure:Ne&&!De,text:l,rows:Le,width:we,onEllipsis:ze,expanded:be,miscDeps:[B,be,z,E,F]},(je,nt)=>Jei(t,b.createElement(b.Fragment,null,je.length>0&&nt&&!be&&Ke?b.createElement("span",{key:"show-content","aria-hidden":!0},je):je,Ee(nt)))))))});var tti=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const nti=b.forwardRef((t,e)=>{var{ellipsis:n,rel:i}=t,r=tti(t,["ellipsis","rel"]);Cr("Typography.Link")(typeof n!="object","usage","`ellipsis` only supports boolean value.");const o=Object.assign(Object.assign({},r),{rel:i===void 0&&r.target==="_blank"?"noopener noreferrer":i});return delete o.navigate,b.createElement(efe,Object.assign({},o,{ref:e,ellipsis:!!n,component:"a"}))}),iti=b.forwardRef((t,e)=>b.createElement(efe,Object.assign({ref:e},t,{component:"div"})));var rti=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const oti=(t,e)=>{var{ellipsis:n}=t,i=rti(t,["ellipsis"]);const r=b.useMemo(()=>n&&typeof n=="object"?Zs(n,["expandable","rows"]):n,[n]);return Cr("Typography.Text")(typeof n!="object"||!n||!("expandable"in n)&&!("rows"in n),"usage","`ellipsis` do not support `expandable` or `rows` props."),b.createElement(efe,Object.assign({ref:e},i,{ellipsis:r,component:"span"}))},sti=b.forwardRef(oti);var ati=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const vrt=[1,2,3,4,5],lti=b.forwardRef((t,e)=>{const{level:n=1}=t,i=ati(t,["level"]);Cr("Typography.Title")(vrt.includes(n),"usage","Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version.");const r=vrt.includes(n)?`h${n}`:"h1";return b.createElement(efe,Object.assign({ref:e},i,{component:r}))}),Fn=L$e;Fn.Text=sti;Fn.Link=nti;Fn.Title=lti;Fn.Paragraph=iti;const Jxe=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),i=t.name||"",r=t.type||"",o=r.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim();if(/^\*(\/\*)?$/.test(s))return!0;if(a.charAt(0)==="."){var l=i.toLowerCase(),c=a.toLowerCase(),u=[c];return(c===".jpg"||c===".jpeg")&&(u=[".jpg",".jpeg"]),u.some(function(d){return l.endsWith(d)})}return/\/\*$/.test(a)?o===a.replace(/\/.*$/,""):r===a?!0:/^\w+$/.test(a)?(ii(!1,"Upload takes an invalidate 'accept' type '".concat(a,"'.Skip for check.")),!0):!1})}return!0};function cti(t,e){var n="cannot ".concat(t.method," ").concat(t.action," ").concat(e.status,"'"),i=new Error(n);return i.status=e.status,i.method=t.method,i.url=t.action,i}function yrt(t){var e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}function uti(t){var e=new XMLHttpRequest;t.onProgress&&e.upload&&(e.upload.onprogress=function(o){o.total>0&&(o.percent=o.loaded/o.total*100),t.onProgress(o)});var n=new FormData;t.data&&Object.keys(t.data).forEach(function(r){var o=t.data[r];if(Array.isArray(o)){o.forEach(function(s){n.append("".concat(r,"[]"),s)});return}n.append(r,o)}),t.file instanceof Blob?n.append(t.filename,t.file,t.file.name):n.append(t.filename,t.file),e.onerror=function(o){t.onError(o)},e.onload=function(){return e.status<200||e.status>=300?t.onError(cti(t,e),yrt(e)):t.onSuccess(yrt(e),e)},e.open(t.method,t.action,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);var i=t.headers||{};return i["X-Requested-With"]!==null&&e.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(i).forEach(function(r){i[r]!==null&&e.setRequestHeader(r,i[r])}),e.send(n),{abort:function(){e.abort()}}}var dti=function(){var t=Hg(ll().mark(function e(n,i){var r,o,s,a,l,c,u,d;return ll().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:c=function(){return c=Hg(ll().mark(function p(g){return ll().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.abrupt("return",new Promise(function(w){g.file(function(C){i(C)?(g.fullPath&&!C.webkitRelativePath&&(Object.defineProperties(C,{webkitRelativePath:{writable:!0}}),C.webkitRelativePath=g.fullPath.replace(/^\//,""),Object.defineProperties(C,{webkitRelativePath:{writable:!1}})),w(C)):w(null)})}));case 1:case"end":return _.stop()}},p)})),c.apply(this,arguments)},l=function(p){return c.apply(this,arguments)},a=function(){return a=Hg(ll().mark(function p(g){var y,_,w,C,N;return ll().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:y=g.createReader(),_=[];case 2:return D.next=5,new Promise(function(k){y.readEntries(k,function(){return k([])})});case 5:if(w=D.sent,C=w.length,C){D.next=9;break}return D.abrupt("break",12);case 9:for(N=0;N<C;N++)_.push(w[N]);D.next=2;break;case 12:return D.abrupt("return",_);case 13:case"end":return D.stop()}},p)})),a.apply(this,arguments)},s=function(p){return a.apply(this,arguments)},r=[],o=[],n.forEach(function(m){return o.push(m.webkitGetAsEntry())}),u=function(){var m=Hg(ll().mark(function p(g,y){var _,w;return ll().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(g){N.next=2;break}return N.abrupt("return");case 2:if(g.path=y||"",!g.isFile){N.next=10;break}return N.next=6,l(g);case 6:_=N.sent,_&&r.push(_),N.next=15;break;case 10:if(!g.isDirectory){N.next=15;break}return N.next=13,s(g);case 13:w=N.sent,o.push.apply(o,Ot(w));case 15:case"end":return N.stop()}},p)}));return function(g,y){return m.apply(this,arguments)}}(),d=0;case 9:if(!(d<o.length)){f.next=15;break}return f.next=12,u(o[d]);case 12:d++,f.next=9;break;case 15:return f.abrupt("return",r);case 16:case"end":return f.stop()}},e)}));return function(n,i){return t.apply(this,arguments)}}(),hti=+new Date,fti=0;function ewe(){return"rc-upload-".concat(hti,"-").concat(++fti)}var mti=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],pti=function(t){Zp(n,t);var e=pb(n);function n(){var i;Za(this,n);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=e.call.apply(e,[this].concat(o)),ye(bn(i),"state",{uid:ewe()}),ye(bn(i),"reqs",{}),ye(bn(i),"fileInput",void 0),ye(bn(i),"_isMounted",void 0),ye(bn(i),"onChange",function(a){var l=i.props,c=l.accept,u=l.directory,d=a.target.files,h=Ot(d).filter(function(f){return!u||Jxe(f,c)});i.uploadFiles(h),i.reset()}),ye(bn(i),"onClick",function(a){var l=i.fileInput;if(l){var c=a.target,u=i.props.onClick;if(c&&c.tagName==="BUTTON"){var d=l.parentNode;d.focus(),c.blur()}l.click(),u&&u(a)}}),ye(bn(i),"onKeyDown",function(a){a.key==="Enter"&&i.onClick(a)}),ye(bn(i),"onFileDrop",function(){var a=Hg(ll().mark(function l(c){var u,d,h;return ll().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(u=i.props.multiple,c.preventDefault(),c.type!=="dragover"){m.next=4;break}return m.abrupt("return");case 4:if(!i.props.directory){m.next=11;break}return m.next=7,dti(Array.prototype.slice.call(c.dataTransfer.items),function(p){return Jxe(p,i.props.accept)});case 7:d=m.sent,i.uploadFiles(d),m.next=14;break;case 11:h=Ot(c.dataTransfer.files).filter(function(p){return Jxe(p,i.props.accept)}),u===!1&&(h=h.slice(0,1)),i.uploadFiles(h);case 14:case"end":return m.stop()}},l)}));return function(l){return a.apply(this,arguments)}}()),ye(bn(i),"uploadFiles",function(a){var l=Ot(a),c=l.map(function(u){return u.uid=ewe(),i.processFile(u,l)});Promise.all(c).then(function(u){var d=i.props.onBatchStart;d==null||d(u.map(function(h){var f=h.origin,m=h.parsedFile;return{file:f,parsedFile:m}})),u.filter(function(h){return h.parsedFile!==null}).forEach(function(h){i.post(h)})})}),ye(bn(i),"processFile",function(){var a=Hg(ll().mark(function l(c,u){var d,h,f,m,p,g,y,_,w;return ll().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(d=i.props.beforeUpload,h=c,!d){N.next=14;break}return N.prev=3,N.next=6,d(c,u);case 6:h=N.sent,N.next=12;break;case 9:N.prev=9,N.t0=N.catch(3),h=!1;case 12:if(h!==!1){N.next=14;break}return N.abrupt("return",{origin:c,parsedFile:null,action:null,data:null});case 14:if(f=i.props.action,typeof f!="function"){N.next=21;break}return N.next=18,f(c);case 18:m=N.sent,N.next=22;break;case 21:m=f;case 22:if(p=i.props.data,typeof p!="function"){N.next=29;break}return N.next=26,p(c);case 26:g=N.sent,N.next=30;break;case 29:g=p;case 30:return y=(Un(h)==="object"||typeof h=="string")&&h?h:c,y instanceof File?_=y:_=new File([y],c.name,{type:c.type}),w=_,w.uid=c.uid,N.abrupt("return",{origin:c,data:g,parsedFile:w,action:m});case 35:case"end":return N.stop()}},l,null,[[3,9]])}));return function(l,c){return a.apply(this,arguments)}}()),ye(bn(i),"saveFileInput",function(a){i.fileInput=a}),i}return Qa(n,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(r){var o=this,s=r.data,a=r.origin,l=r.action,c=r.parsedFile;if(this._isMounted){var u=this.props,d=u.onStart,h=u.customRequest,f=u.name,m=u.headers,p=u.withCredentials,g=u.method,y=a.uid,_=h||uti,w={action:l,filename:f,data:s,file:c,headers:m,withCredentials:p,method:g||"post",onProgress:function(N){var E=o.props.onProgress;E==null||E(N,c)},onSuccess:function(N,E){var D=o.props.onSuccess;D==null||D(N,c,E),delete o.reqs[y]},onError:function(N,E){var D=o.props.onError;D==null||D(N,E,c),delete o.reqs[y]}};d(a),this.reqs[y]=_(w)}}},{key:"reset",value:function(){this.setState({uid:ewe()})}},{key:"abort",value:function(r){var o=this.reqs;if(r){var s=r.uid?r.uid:r;o[s]&&o[s].abort&&o[s].abort(),delete o[s]}else Object.keys(o).forEach(function(a){o[a]&&o[a].abort&&o[a].abort(),delete o[a]})}},{key:"render",value:function(){var r=this.props,o=r.component,s=r.prefixCls,a=r.className,l=r.classNames,c=l===void 0?{}:l,u=r.disabled,d=r.id,h=r.name,f=r.style,m=r.styles,p=m===void 0?{}:m,g=r.multiple,y=r.accept,_=r.capture,w=r.children,C=r.directory,N=r.openFileDialogOnClick,E=r.onMouseEnter,D=r.onMouseLeave,k=r.hasControlInside,M=di(r,mti),T=Me(ye(ye(ye({},s,!0),"".concat(s,"-disabled"),u),a,a)),A=C?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},R=u?{}:{onClick:N?this.onClick:function(){},onKeyDown:N?this.onKeyDown:function(){},onMouseEnter:E,onMouseLeave:D,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:k?void 0:"0"};return Z.createElement(o,lt({},R,{className:T,role:k?void 0:"button",style:f}),Z.createElement("input",lt({},Ll(M,{aria:!0,data:!0}),{id:d,name:h,disabled:u,type:"file",ref:this.saveFileInput,onClick:function(O){return O.stopPropagation()},key:this.state.uid,style:Ie({display:"none"},p.input),className:c.input,accept:y},A,{multiple:g,onChange:this.onChange},_!=null?{capture:_}:{})),w)}}]),n}(b.Component);function twe(){}var Rke=function(t){Zp(n,t);var e=pb(n);function n(){var i;Za(this,n);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=e.call.apply(e,[this].concat(o)),ye(bn(i),"uploader",void 0),ye(bn(i),"saveUploader",function(a){i.uploader=a}),i}return Qa(n,[{key:"abort",value:function(r){this.uploader.abort(r)}},{key:"render",value:function(){return Z.createElement(pti,lt({},this.props,{ref:this.saveUploader}))}}]),n}(b.Component);ye(Rke,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:twe,onError:twe,onSuccess:twe,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});const gti=t=>{const{componentCls:e,iconCls:n}=t;return{[`${e}-wrapper`]:{[`${e}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:t.colorFillAlter,border:`${xe(t.lineWidth)} dashed ${t.colorBorder}`,borderRadius:t.borderRadiusLG,cursor:"pointer",transition:`border-color ${t.motionDurationSlow}`,[e]:{padding:t.padding},[`${e}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:t.borderRadiusLG,"&:focus-visible":{outline:`${xe(t.lineWidthFocus)} solid ${t.colorPrimaryBorder}`}},[`${e}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`
          &:not(${e}-disabled):hover,
          &-hover:not(${e}-disabled)
        `]:{borderColor:t.colorPrimaryHover},[`p${e}-drag-icon`]:{marginBottom:t.margin,[n]:{color:t.colorPrimary,fontSize:t.uploadThumbnailSize}},[`p${e}-text`]:{margin:`0 0 ${xe(t.marginXXS)}`,color:t.colorTextHeading,fontSize:t.fontSizeLG},[`p${e}-hint`]:{color:t.colorTextDescription,fontSize:t.fontSize},[`&${e}-disabled`]:{[`p${e}-drag-icon ${n},
            p${e}-text,
            p${e}-hint
          `]:{color:t.colorTextDisabled}}}}}},bti=t=>{const{componentCls:e,antCls:n,iconCls:i,fontSize:r,lineHeight:o,calc:s}=t,a=`${e}-list-item`,l=`${a}-actions`,c=`${a}-action`,u=t.fontHeightSM;return{[`${e}-wrapper`]:{[`${e}-list`]:Object.assign(Object.assign({},O0()),{lineHeight:t.lineHeight,[a]:{position:"relative",height:s(t.lineHeight).mul(r).equal(),marginTop:t.marginXS,fontSize:r,display:"flex",alignItems:"center",transition:`background-color ${t.motionDurationSlow}`,"&:hover":{backgroundColor:t.controlItemBgHover},[`${a}-name`]:Object.assign(Object.assign({},Mm),{padding:`0 ${xe(t.paddingXS)}`,lineHeight:o,flex:"auto",transition:`all ${t.motionDurationSlow}`}),[l]:{whiteSpace:"nowrap",[c]:{opacity:0},[i]:{color:t.actionsColor,transition:`all ${t.motionDurationSlow}`},[`
              ${c}:focus-visible,
              &.picture ${c}
            `]:{opacity:1},[`${c}${n}-btn`]:{height:u,border:0,lineHeight:1}},[`${e}-icon ${i}`]:{color:t.colorTextDescription,fontSize:r},[`${a}-progress`]:{position:"absolute",bottom:t.calc(t.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:s(r).add(t.paddingXS).equal(),fontSize:r,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${a}:hover ${c}`]:{opacity:1},[`${a}-error`]:{color:t.colorError,[`${a}-name, ${e}-icon ${i}`]:{color:t.colorError},[l]:{[`${i}, ${i}:hover`]:{color:t.colorError},[c]:{opacity:1}}},[`${e}-list-item-container`]:{transition:`opacity ${t.motionDurationSlow}, height ${t.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},vti=t=>{const{componentCls:e}=t,n=new so("uploadAnimateInlineIn",{from:{width:0,height:0,padding:0,opacity:0,margin:t.calc(t.marginXS).div(-2).equal()}}),i=new so("uploadAnimateInlineOut",{to:{width:0,height:0,padding:0,opacity:0,margin:t.calc(t.marginXS).div(-2).equal()}}),r=`${e}-animate-inline`;return[{[`${e}-wrapper`]:{[`${r}-appear, ${r}-enter, ${r}-leave`]:{animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseInOutCirc,animationFillMode:"forwards"},[`${r}-appear, ${r}-enter`]:{animationName:n},[`${r}-leave`]:{animationName:i}}},{[`${e}-wrapper`]:KFe(t)},n,i]},yti=t=>{const{componentCls:e,iconCls:n,uploadThumbnailSize:i,uploadProgressOffset:r,calc:o}=t,s=`${e}-list`,a=`${s}-item`;return{[`${e}-wrapper`]:{[`
        ${s}${s}-picture,
        ${s}${s}-picture-card,
        ${s}${s}-picture-circle
      `]:{[a]:{position:"relative",height:o(i).add(o(t.lineWidth).mul(2)).add(o(t.paddingXS).mul(2)).equal(),padding:t.paddingXS,border:`${xe(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusLG,"&:hover":{background:"transparent"},[`${a}-thumbnail`]:Object.assign(Object.assign({},Mm),{width:i,height:i,lineHeight:xe(o(i).add(t.paddingSM).equal()),textAlign:"center",flex:"none",[n]:{fontSize:t.fontSizeHeading2,color:t.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${a}-progress`]:{bottom:r,width:`calc(100% - ${xe(o(t.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:o(i).add(t.paddingXS).equal()}},[`${a}-error`]:{borderColor:t.colorError,[`${a}-thumbnail ${n}`]:{[`svg path[fill='${Fj[0]}']`]:{fill:t.colorErrorBg},[`svg path[fill='${Fj.primary}']`]:{fill:t.colorError}}},[`${a}-uploading`]:{borderStyle:"dashed",[`${a}-name`]:{marginBottom:r}}},[`${s}${s}-picture-circle ${a}`]:{[`&, &::before, ${a}-thumbnail`]:{borderRadius:"50%"}}}}},_ti=t=>{const{componentCls:e,iconCls:n,fontSizeLG:i,colorTextLightSolid:r,calc:o}=t,s=`${e}-list`,a=`${s}-item`,l=t.uploadPicCardSize;return{[`
      ${e}-wrapper${e}-picture-card-wrapper,
      ${e}-wrapper${e}-picture-circle-wrapper
    `]:Object.assign(Object.assign({},O0()),{display:"block",[`${e}${e}-select`]:{width:l,height:l,textAlign:"center",verticalAlign:"top",backgroundColor:t.colorFillAlter,border:`${xe(t.lineWidth)} dashed ${t.colorBorder}`,borderRadius:t.borderRadiusLG,cursor:"pointer",transition:`border-color ${t.motionDurationSlow}`,[`> ${e}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${e}-disabled):hover`]:{borderColor:t.colorPrimary}},[`${s}${s}-picture-card, ${s}${s}-picture-circle`]:{display:"flex",flexWrap:"wrap","@supports not (gap: 1px)":{"& > *":{marginBlockEnd:t.marginXS,marginInlineEnd:t.marginXS}},"@supports (gap: 1px)":{gap:t.marginXS},[`${s}-item-container`]:{display:"inline-block",width:l,height:l,verticalAlign:"top"},"&::after":{display:"none"},"&::before":{display:"none"},[a]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${xe(o(t.paddingXS).mul(2).equal())})`,height:`calc(100% - ${xe(o(t.paddingXS).mul(2).equal())})`,backgroundColor:t.colorBgMask,opacity:0,transition:`all ${t.motionDurationSlow}`,content:'" "'}},[`${a}:hover`]:{[`&::before, ${a}-actions`]:{opacity:1}},[`${a}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${t.motionDurationSlow}`,[`
            ${n}-eye,
            ${n}-download,
            ${n}-delete
          `]:{zIndex:10,width:i,margin:`0 ${xe(t.marginXXS)}`,fontSize:i,cursor:"pointer",transition:`all ${t.motionDurationSlow}`,color:r,"&:hover":{color:r},svg:{verticalAlign:"baseline"}}},[`${a}-thumbnail, ${a}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${a}-name`]:{display:"none",textAlign:"center"},[`${a}-file + ${a}-name`]:{position:"absolute",bottom:t.margin,display:"block",width:`calc(100% - ${xe(o(t.paddingXS).mul(2).equal())})`},[`${a}-uploading`]:{[`&${a}`]:{backgroundColor:t.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${a}-progress`]:{bottom:t.marginXL,width:`calc(100% - ${xe(o(t.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${e}-wrapper${e}-picture-circle-wrapper`]:{[`${e}${e}-select`]:{borderRadius:"50%"}}}},xti=t=>{const{componentCls:e}=t;return{[`${e}-rtl`]:{direction:"rtl"}}},wti=t=>{const{componentCls:e,colorTextDisabled:n}=t;return{[`${e}-wrapper`]:Object.assign(Object.assign({},fo(t)),{[e]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${e}-select`]:{display:"inline-block"},[`${e}-disabled`]:{color:n,cursor:"not-allowed"}})}},Cti=t=>({actionsColor:t.colorTextDescription}),Sti=Jr("Upload",t=>{const{fontSizeHeading3:e,fontHeight:n,lineWidth:i,controlHeightLG:r,calc:o}=t,s=mr(t,{uploadThumbnailSize:o(e).mul(2).equal(),uploadProgressOffset:o(o(n).div(2)).add(i).equal(),uploadPicCardSize:o(r).mul(2.55).equal()});return[wti(s),gti(s),yti(s),_ti(s),bti(s),vti(s),xti(s),jK(s)]},Cti);function ZZ(t){return Object.assign(Object.assign({},t),{lastModified:t.lastModified,lastModifiedDate:t.lastModifiedDate,name:t.name,size:t.size,type:t.type,uid:t.uid,percent:0,originFileObj:t})}function QZ(t,e){const n=Ot(e),i=n.findIndex(r=>{let{uid:o}=r;return o===t.uid});return i===-1?n.push(t):n[i]=t,n}function nwe(t,e){const n=t.uid!==void 0?"uid":"name";return e.filter(i=>i[n]===t[n])[0]}function Nti(t,e){const n=t.uid!==void 0?"uid":"name",i=e.filter(r=>r[n]!==t[n]);return i.length===e.length?null:i}const Eti=function(){const e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),i=e[e.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(i)||[""])[0]},fRt=t=>t.indexOf("image/")===0,Dti=t=>{if(t.type&&!t.thumbUrl)return fRt(t.type);const e=t.thumbUrl||t.url||"",n=Eti(e);return/^data:image\//.test(e)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(e)||n)},AN=200;function kti(t){return new Promise(e=>{if(!t.type||!fRt(t.type)){e("");return}const n=document.createElement("canvas");n.width=AN,n.height=AN,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${AN}px; height: ${AN}px; z-index: 9999; display: none;`,document.body.appendChild(n);const i=n.getContext("2d"),r=new Image;if(r.onload=()=>{const{width:o,height:s}=r;let a=AN,l=AN,c=0,u=0;o>s?(l=s*(AN/o),u=-(l-a)/2):(a=o*(AN/s),c=-(a-l)/2),i.drawImage(r,c,u,a,l);const d=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(r.src),e(d)},r.crossOrigin="anonymous",t.type.startsWith("image/svg+xml")){const o=new FileReader;o.onload=()=>{o.result&&typeof o.result=="string"&&(r.src=o.result)},o.readAsDataURL(t)}else if(t.type.startsWith("image/gif")){const o=new FileReader;o.onload=()=>{o.result&&e(o.result)},o.readAsDataURL(t)}else r.src=window.URL.createObjectURL(t)})}const Mti=b.forwardRef((t,e)=>{let{prefixCls:n,className:i,style:r,locale:o,listType:s,file:a,items:l,progress:c,iconRender:u,actionIconRender:d,itemRender:h,isImgUrl:f,showPreviewIcon:m,showRemoveIcon:p,showDownloadIcon:g,previewIcon:y,removeIcon:_,downloadIcon:w,extra:C,onPreview:N,onDownload:E,onClose:D}=t;var k,M;const{status:T}=a,[A,R]=b.useState(T);b.useEffect(()=>{T!=="removed"&&R(T)},[T]);const[P,O]=b.useState(!1);b.useEffect(()=>{const be=setTimeout(()=>{O(!0)},300);return()=>{clearTimeout(be)}},[]);const V=u(a);let F=b.createElement("div",{className:`${n}-icon`},V);if(s==="picture"||s==="picture-card"||s==="picture-circle")if(A==="uploading"||!a.thumbUrl&&!a.url){const be=Me(`${n}-list-item-thumbnail`,{[`${n}-list-item-file`]:A!=="uploading"});F=b.createElement("div",{className:be},V)}else{const be=f!=null&&f(a)?b.createElement("img",{src:a.thumbUrl||a.url,alt:a.name,className:`${n}-list-item-image`,crossOrigin:a.crossOrigin}):V,le=Me(`${n}-list-item-thumbnail`,{[`${n}-list-item-file`]:f&&!f(a)});F=b.createElement("a",{className:le,onClick:Ne=>N(a,Ne),href:a.url||a.thumbUrl,target:"_blank",rel:"noopener noreferrer"},be)}const $=Me(`${n}-list-item`,`${n}-list-item-${A}`),B=typeof a.linkProps=="string"?JSON.parse(a.linkProps):a.linkProps,z=(typeof p=="function"?p(a):p)?d((typeof _=="function"?_(a):_)||b.createElement(l$e,null),()=>D(a),n,o.removeFile,!0):null,H=(typeof g=="function"?g(a):g)&&A==="done"?d((typeof w=="function"?w(a):w)||b.createElement(c$e,null),()=>E(a),n,o.downloadFile):null,K=s!=="picture-card"&&s!=="picture-circle"&&b.createElement("span",{key:"download-delete",className:Me(`${n}-list-item-actions`,{picture:s==="picture"})},H,z),q=typeof C=="function"?C(a):C,U=q&&b.createElement("span",{className:`${n}-list-item-extra`},q),Y=Me(`${n}-list-item-name`),J=a.url?b.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:Y,title:a.name},B,{href:a.url,onClick:be=>N(a,be)}),a.name,U):b.createElement("span",{key:"view",className:Y,onClick:be=>N(a,be),title:a.name},a.name,U),ae=(typeof m=="function"?m(a):m)&&(a.url||a.thumbUrl)?b.createElement("a",{href:a.url||a.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:be=>N(a,be),title:o.previewFile},typeof y=="function"?y(a):y||b.createElement(JK,null)):null,se=(s==="picture-card"||s==="picture-circle")&&A!=="uploading"&&b.createElement("span",{className:`${n}-list-item-actions`},ae,A==="done"&&H,z),{getPrefixCls:oe}=b.useContext(jn),fe=oe(),de=b.createElement("div",{className:$},F,J,K,se,P&&b.createElement(Ou,{motionName:`${fe}-fade`,visible:A==="uploading",motionDeadline:2e3},be=>{let{className:le}=be;const Ne="percent"in a?b.createElement(Uj,Object.assign({},c,{type:"line",percent:a.percent,"aria-label":a["aria-label"],"aria-labelledby":a["aria-labelledby"]})):null;return b.createElement("div",{className:Me(`${n}-list-item-progress`,le)},Ne)})),ie=a.response&&typeof a.response=="string"?a.response:((k=a.error)===null||k===void 0?void 0:k.statusText)||((M=a.error)===null||M===void 0?void 0:M.message)||o.uploadError,Q=A==="error"?b.createElement(Vs,{title:ie,getPopupContainer:be=>be.parentNode},de):de;return b.createElement("div",{className:Me(`${n}-list-item-container`,i),style:r,ref:e},h?h(Q,a,l,{download:E.bind(null,a),preview:N.bind(null,a),remove:D.bind(null,a)}):Q)}),Lti=(t,e)=>{const{listType:n="text",previewFile:i=kti,onPreview:r,onDownload:o,onRemove:s,locale:a,iconRender:l,isImageUrl:c=Dti,prefixCls:u,items:d=[],showPreviewIcon:h=!0,showRemoveIcon:f=!0,showDownloadIcon:m=!1,removeIcon:p,previewIcon:g,downloadIcon:y,extra:_,progress:w={size:[-1,2],showInfo:!1},appendAction:C,appendActionVisible:N=!0,itemRender:E,disabled:D}=t,k=bhe(),[M,T]=b.useState(!1),A=["picture-card","picture-circle"].includes(n);b.useEffect(()=>{n.startsWith("picture")&&(d||[]).forEach(U=>{!(U.originFileObj instanceof File||U.originFileObj instanceof Blob)||U.thumbUrl!==void 0||(U.thumbUrl="",i==null||i(U.originFileObj).then(Y=>{U.thumbUrl=Y||"",k()}))})},[n,d,i]),b.useEffect(()=>{T(!0)},[]);const R=(U,Y)=>{if(r)return Y.preventDefault(),r(U)},P=U=>{typeof o=="function"?o(U):U.url&&window.open(U.url)},O=U=>{s==null||s(U)},V=U=>{if(l)return l(U,n);const Y=U.status==="uploading";if(n.startsWith("picture")){const J=n==="picture"?b.createElement(Xd,null):a.uploading,ae=c!=null&&c(U)?b.createElement(cAt,null):b.createElement(Z2t,null);return Y?J:ae}return Y?b.createElement(Xd,null):b.createElement(lAt,null)},F=(U,Y,J,ae,se)=>{const oe={type:"text",size:"small",title:ae,onClick:fe=>{var de,ie;Y(),b.isValidElement(U)&&((ie=(de=U.props).onClick)===null||ie===void 0||ie.call(de,fe))},className:`${J}-list-item-action`};return se&&(oe.disabled=D),b.isValidElement(U)?b.createElement(vn,Object.assign({},oe,{icon:$c(U,Object.assign(Object.assign({},U.props),{onClick:()=>{}}))})):b.createElement(vn,Object.assign({},oe),b.createElement("span",null,U))};b.useImperativeHandle(e,()=>({handlePreview:R,handleDownload:P}));const{getPrefixCls:$}=b.useContext(jn),B=$("upload",u),z=$(),H=Me(`${B}-list`,`${B}-list-${n}`),K=b.useMemo(()=>Zs($j(z),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[z]),q=Object.assign(Object.assign({},A?{}:K),{motionDeadline:2e3,motionName:`${B}-${A?"animate-inline":"animate"}`,keys:Ot(d.map(U=>({key:U.uid,file:U}))),motionAppear:M});return b.createElement("div",{className:H},b.createElement(FFe,Object.assign({},q,{component:!1}),U=>{let{key:Y,file:J,className:ae,style:se}=U;return b.createElement(Mti,{key:Y,locale:a,prefixCls:B,className:ae,style:se,file:J,items:d,progress:w,listType:n,isImgUrl:c,showPreviewIcon:h,showRemoveIcon:f,showDownloadIcon:m,removeIcon:p,previewIcon:g,downloadIcon:y,extra:_,iconRender:V,actionIconRender:F,itemRender:E,onPreview:R,onDownload:P,onClose:O})}),C&&b.createElement(Ou,Object.assign({},q,{visible:N,forceRender:!0}),U=>{let{className:Y,style:J}=U;return $c(C,ae=>({className:Me(ae.className,Y),style:Object.assign(Object.assign(Object.assign({},J),{pointerEvents:Y?"none":void 0}),ae.style)}))}))},mRt=b.forwardRef(Lti);mRt.displayName="UploadList";var Tti=function(t,e,n,i){function r(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{c(i.next(u))}catch(d){s(d)}}function l(u){try{c(i.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):r(u.value).then(a,l)}c((i=i.apply(t,[])).next())})};const W7=`__LIST_IGNORE_${Date.now()}__`,Iti=(t,e)=>{const{fileList:n,defaultFileList:i,onRemove:r,showUploadList:o=!0,listType:s="text",onPreview:a,onDownload:l,onChange:c,onDrop:u,previewFile:d,disabled:h,locale:f,iconRender:m,isImageUrl:p,progress:g,prefixCls:y,className:_,type:w="select",children:C,style:N,itemRender:E,maxCount:D,data:k={},multiple:M=!1,hasControlInside:T=!0,action:A="",accept:R="",supportServerRender:P=!0,rootClassName:O}=t,V=b.useContext(Yd),F=h??V,[$,B]=ho(i||[],{value:n,postState:Ge=>Ge??[]}),[z,H]=b.useState("drop"),K=b.useRef(null),q=b.useRef(null);{const Ge=Cr("Upload");Ge("fileList"in t||!("value"in t),"usage","`value` is not a valid prop, do you mean `fileList`?"),Ge.deprecated(!("transformFile"in t),"transformFile","beforeUpload")}b.useMemo(()=>{const Ge=Date.now();(n||[]).forEach((Ee,Se)=>{!Ee.uid&&!Object.isFrozen(Ee)&&(Ee.uid=`__AUTO__${Ge}_${Se}__`)})},[n]);const U=(Ge,Ee,Se)=>{let je=Ot(Ee),nt=!1;D===1?je=je.slice(-1):D&&(nt=je.length>D,je=je.slice(0,D)),Fc.flushSync(()=>{B(je)});const rt={file:Ge,fileList:je};Se&&(rt.event=Se),(!nt||Ge.status==="removed"||je.some(St=>St.uid===Ge.uid))&&Fc.flushSync(()=>{c==null||c(rt)})},Y=(Ge,Ee)=>Tti(void 0,void 0,void 0,function*(){const{beforeUpload:Se,transformFile:je}=t;let nt=Ge;if(Se){const rt=yield Se(Ge,Ee);if(rt===!1)return!1;if(delete Ge[W7],rt===W7)return Object.defineProperty(Ge,W7,{value:!0,configurable:!0}),!1;typeof rt=="object"&&rt&&(nt=rt)}return je&&(nt=yield je(nt)),nt}),J=Ge=>{const Ee=Ge.filter(nt=>!nt.file[W7]);if(!Ee.length)return;const Se=Ee.map(nt=>ZZ(nt.file));let je=Ot($);Se.forEach(nt=>{je=QZ(nt,je)}),Se.forEach((nt,rt)=>{let St=nt;if(Ee[rt].parsedFile)nt.status="uploading";else{const{originFileObj:At}=nt;let Nt;try{Nt=new File([At],At.name,{type:At.type})}catch{Nt=new Blob([At],{type:At.type}),Nt.name=At.name,Nt.lastModifiedDate=new Date,Nt.lastModified=new Date().getTime()}Nt.uid=nt.uid,St=Nt}U(St,je)})},ae=(Ge,Ee,Se)=>{try{typeof Ge=="string"&&(Ge=JSON.parse(Ge))}catch{}if(!nwe(Ee,$))return;const je=ZZ(Ee);je.status="done",je.percent=100,je.response=Ge,je.xhr=Se;const nt=QZ(je,$);U(je,nt)},se=(Ge,Ee)=>{if(!nwe(Ee,$))return;const Se=ZZ(Ee);Se.status="uploading",Se.percent=Ge.percent;const je=QZ(Se,$);U(Se,je,Ge)},oe=(Ge,Ee,Se)=>{if(!nwe(Se,$))return;const je=ZZ(Se);je.error=Ge,je.response=Ee,je.status="error";const nt=QZ(je,$);U(je,nt)},fe=Ge=>{let Ee;Promise.resolve(typeof r=="function"?r(Ge):r).then(Se=>{var je;if(Se===!1)return;const nt=Nti(Ge,$);nt&&(Ee=Object.assign(Object.assign({},Ge),{status:"removed"}),$==null||$.forEach(rt=>{const St=Ee.uid!==void 0?"uid":"name";rt[St]===Ee[St]&&!Object.isFrozen(rt)&&(rt.status="removed")}),(je=K.current)===null||je===void 0||je.abort(Ee),U(Ee,nt))})},de=Ge=>{H(Ge.type),Ge.type==="drop"&&(u==null||u(Ge))};b.useImperativeHandle(e,()=>({onBatchStart:J,onSuccess:ae,onProgress:se,onError:oe,fileList:$,upload:K.current,nativeElement:q.current}));const{getPrefixCls:ie,direction:Q,upload:be}=b.useContext(jn),le=ie("upload",y),Ne=Object.assign(Object.assign({onBatchStart:J,onError:oe,onProgress:se,onSuccess:ae},t),{data:k,multiple:M,action:A,accept:R,supportServerRender:P,prefixCls:le,disabled:F,beforeUpload:Y,onChange:void 0,hasControlInside:T});delete Ne.className,delete Ne.style,(!C||F)&&delete Ne.id;const Le=`${le}-wrapper`,[Te,De,Pe]=Sti(le,Le),[ge]=bb("Upload",Dv.Upload),{showRemoveIcon:he,showPreviewIcon:me,showDownloadIcon:X,removeIcon:re,previewIcon:we,downloadIcon:ue,extra:Ce}=typeof o=="boolean"?{}:o,ze=typeof he>"u"?!F:he,Ye=(Ge,Ee)=>o?b.createElement(mRt,{prefixCls:le,listType:s,items:$,previewFile:d,onPreview:a,onDownload:l,onRemove:fe,showRemoveIcon:ze,showPreviewIcon:me,showDownloadIcon:X,removeIcon:re,previewIcon:we,downloadIcon:ue,iconRender:m,extra:Ce,locale:Object.assign(Object.assign({},ge),f),isImageUrl:p,progress:g,appendAction:Ge,appendActionVisible:Ee,itemRender:E,disabled:F}):Ge,Ke=Me(Le,_,O,De,Pe,be==null?void 0:be.className,{[`${le}-rtl`]:Q==="rtl",[`${le}-picture-card-wrapper`]:s==="picture-card",[`${le}-picture-circle-wrapper`]:s==="picture-circle"}),Xe=Object.assign(Object.assign({},be==null?void 0:be.style),N);if(w==="drag"){const Ge=Me(De,le,`${le}-drag`,{[`${le}-drag-uploading`]:$.some(Ee=>Ee.status==="uploading"),[`${le}-drag-hover`]:z==="dragover",[`${le}-disabled`]:F,[`${le}-rtl`]:Q==="rtl"});return Te(b.createElement("span",{className:Ke,ref:q},b.createElement("div",{className:Ge,style:Xe,onDrop:de,onDragOver:de,onDragLeave:de},b.createElement(Rke,Object.assign({},Ne,{ref:K,className:`${le}-btn`}),b.createElement("div",{className:`${le}-drag-container`},C))),Ye()))}const it=Me(le,`${le}-select`,{[`${le}-disabled`]:F}),ut=b.createElement("div",{className:it,style:C?void 0:{display:"none"}},b.createElement(Rke,Object.assign({},Ne,{ref:K})));return Te(s==="picture-card"||s==="picture-circle"?b.createElement("span",{className:Ke,ref:q},Ye(ut,!!C)):b.createElement("span",{className:Ke,ref:q},ut,Ye()))},I$e=b.forwardRef(Iti);I$e.displayName="Upload";var Ati=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const pRt=b.forwardRef((t,e)=>{var{style:n,height:i,hasControlInside:r=!1}=t,o=Ati(t,["style","height","hasControlInside"]);return b.createElement(I$e,Object.assign({ref:e,hasControlInside:r},o,{type:"drag",style:Object.assign(Object.assign({},n),{height:i})}))});pRt.displayName="Dragger";const tfe=I$e;tfe.Dragger=pRt;tfe.LIST_IGNORE=W7;var nfe={},gRt={exports:{}};(function(t){function e(n){return n&&n.__esModule?n:{default:n}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(gRt);var ife=gRt.exports,rfe={};Object.defineProperty(rfe,"__esModule",{value:!0});rfe.default=void 0;var Rti={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};rfe.default=Rti;var ofe={},rq={},sfe={},bRt={exports:{}},vRt={exports:{}},yRt={exports:{}},_Rt={exports:{}};(function(t){function e(n){"@babel/helpers - typeof";return t.exports=e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(_Rt);var xRt=_Rt.exports,wRt={exports:{}};(function(t){var e=xRt.default;function n(i,r){if(e(i)!="object"||!i)return i;var o=i[Symbol.toPrimitive];if(o!==void 0){var s=o.call(i,r||"default");if(e(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(i)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(wRt);var Pti=wRt.exports;(function(t){var e=xRt.default,n=Pti;function i(r){var o=n(r,"string");return e(o)=="symbol"?o:o+""}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports})(yRt);var Oti=yRt.exports;(function(t){var e=Oti;function n(i,r,o){return(r=e(r))in i?Object.defineProperty(i,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[r]=o,i}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(vRt);var jti=vRt.exports;(function(t){var e=jti;function n(r,o){var s=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);o&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(r,l).enumerable})),s.push.apply(s,a)}return s}function i(r){for(var o=1;o<arguments.length;o++){var s=arguments[o]!=null?arguments[o]:{};o%2?n(Object(s),!0).forEach(function(a){e(r,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(s)):n(Object(s)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(s,a))})}return r}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports})(bRt);var Fti=bRt.exports,afe={};Object.defineProperty(afe,"__esModule",{value:!0});afe.commonLocale=void 0;afe.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0};var $ti=ife.default;Object.defineProperty(sfe,"__esModule",{value:!0});sfe.default=void 0;var _rt=$ti(Fti),Vti=afe,Bti=(0,_rt.default)((0,_rt.default)({},Vti.commonLocale),{},{locale:"en_GB",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"Select time",dateSelect:"Select date",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"D/M/YYYY",dateTimeFormat:"D/M/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});sfe.default=Bti;var oq={};Object.defineProperty(oq,"__esModule",{value:!0});oq.default=void 0;const zti={placeholder:"Select time"};oq.default=zti;var CRt=ife.default;Object.defineProperty(rq,"__esModule",{value:!0});rq.default=void 0;var Hti=CRt(sfe),Wti=CRt(oq);const Uti={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},Hti.default),timePickerLocale:Object.assign({},Wti.default)};rq.default=Uti;var Kti=ife.default;Object.defineProperty(ofe,"__esModule",{value:!0});ofe.default=void 0;var qti=Kti(rq);ofe.default=qti.default;var lfe=ife.default;Object.defineProperty(nfe,"__esModule",{value:!0});nfe.default=void 0;var Gti=lfe(rfe),Yti=lfe(ofe),Xti=lfe(rq),Zti=lfe(oq);const yg="${label} is not a valid ${type}",Qti={locale:"en-gb",Pagination:Gti.default,DatePicker:Xti.default,TimePicker:Zti.default,Calendar:Yti.default,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No Data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:yg,method:yg,array:yg,object:yg,number:yg,date:yg,boolean:yg,integer:yg,float:yg,regexp:yg,email:yg,url:yg,hex:yg},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"}};nfe.default=Qti;var Jti=nfe;const eni=ao(Jti);function nm(t,e){var n=e&&e.cache?e.cache:sni,i=e&&e.serializer?e.serializer:oni,r=e&&e.strategy?e.strategy:nni;return r(t,{cache:n,serializer:i})}function tni(t){return t==null||typeof t=="number"||typeof t=="boolean"}function SRt(t,e,n,i){var r=tni(i)?i:n(i),o=e.get(r);return typeof o>"u"&&(o=t.call(this,i),e.set(r,o)),o}function NRt(t,e,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),o=e.get(r);return typeof o>"u"&&(o=t.apply(this,i),e.set(r,o)),o}function A$e(t,e,n,i,r){return n.bind(e,t,i,r)}function nni(t,e){var n=t.length===1?SRt:NRt;return A$e(t,this,n,e.cache.create(),e.serializer)}function ini(t,e){return A$e(t,this,NRt,e.cache.create(),e.serializer)}function rni(t,e){return A$e(t,this,SRt,e.cache.create(),e.serializer)}var oni=function(){return JSON.stringify(arguments)};function R$e(){this.cache=Object.create(null)}R$e.prototype.get=function(t){return this.cache[t]};R$e.prototype.set=function(t,e){this.cache[t]=e};var sni={create:function(){return new R$e}},im={variadic:ini,monadic:rni};function ERt(t,e,n){if(n===void 0&&(n=Error),!t)throw new n(e)}nm(function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,Zc([void 0],e,!1)))},{strategy:im.variadic});nm(function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,Zc([void 0],e,!1)))},{strategy:im.variadic});nm(function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,Zc([void 0],e,!1)))},{strategy:im.variadic});nm(function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.Locale).bind.apply(t,Zc([void 0],e,!1)))},{strategy:im.variadic});nm(function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.ListFormat).bind.apply(t,Zc([void 0],e,!1)))},{strategy:im.variadic});var ys;(function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(ys||(ys={}));var Fl;(function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"})(Fl||(Fl={}));var qj;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(qj||(qj={}));function xrt(t){return t.type===Fl.literal}function ani(t){return t.type===Fl.argument}function DRt(t){return t.type===Fl.number}function kRt(t){return t.type===Fl.date}function MRt(t){return t.type===Fl.time}function LRt(t){return t.type===Fl.select}function TRt(t){return t.type===Fl.plural}function lni(t){return t.type===Fl.pound}function IRt(t){return t.type===Fl.tag}function ARt(t){return!!(t&&typeof t=="object"&&t.type===qj.number)}function Pke(t){return!!(t&&typeof t=="object"&&t.type===qj.dateTime)}var RRt=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,cni=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function uni(t){var e={};return t.replace(cni,function(n){var i=n.length;switch(n[0]){case"G":e.era=i===4?"long":i===5?"narrow":"short";break;case"y":e.year=i===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][i-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][i-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=i===4?"long":i===5?"narrow":"short";break;case"e":if(i<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][i-4];break;case"c":if(i<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][i-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][i-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][i-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][i-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][i-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][i-1];break;case"s":e.second=["numeric","2-digit"][i-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=i<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),e}var dni=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function hni(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var e=t.split(dni).filter(function(h){return h.length>0}),n=[],i=0,r=e;i<r.length;i++){var o=r[i],s=o.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var a=s[0],l=s.slice(1),c=0,u=l;c<u.length;c++){var d=u[c];if(d.length===0)throw new Error("Invalid number skeleton")}n.push({stem:a,options:l})}return n}function fni(t){return t.replace(/^(.*?)-/,"")}var wrt=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,PRt=/^(@+)?(\+|#+)?[rs]?$/g,mni=/(\*)(0+)|(#+)(0+)|(0+)/g,ORt=/^(0+)$/;function Crt(t){var e={};return t[t.length-1]==="r"?e.roundingPriority="morePrecision":t[t.length-1]==="s"&&(e.roundingPriority="lessPrecision"),t.replace(PRt,function(n,i,r){return typeof r!="string"?(e.minimumSignificantDigits=i.length,e.maximumSignificantDigits=i.length):r==="+"?e.minimumSignificantDigits=i.length:i[0]==="#"?e.maximumSignificantDigits=i.length:(e.minimumSignificantDigits=i.length,e.maximumSignificantDigits=i.length+(typeof r=="string"?r.length:0)),""}),e}function jRt(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function pni(t){var e;if(t[0]==="E"&&t[1]==="E"?(e={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(e={notation:"scientific"},t=t.slice(1)),e){var n=t.slice(0,2);if(n==="+!"?(e.signDisplay="always",t=t.slice(2)):n==="+?"&&(e.signDisplay="exceptZero",t=t.slice(2)),!ORt.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function Srt(t){var e={},n=jRt(t);return n||e}function gni(t){for(var e={},n=0,i=t;n<i.length;n++){var r=i[n];switch(r.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=r.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=fni(r.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=Et(Et(Et({},e),{notation:"scientific"}),r.options.reduce(function(l,c){return Et(Et({},l),Srt(c))},{}));continue;case"engineering":e=Et(Et(Et({},e),{notation:"engineering"}),r.options.reduce(function(l,c){return Et(Et({},l),Srt(c))},{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(r.options[0]);continue;case"rounding-mode-floor":e.roundingMode="floor";continue;case"rounding-mode-ceiling":e.roundingMode="ceil";continue;case"rounding-mode-down":e.roundingMode="trunc";continue;case"rounding-mode-up":e.roundingMode="expand";continue;case"rounding-mode-half-even":e.roundingMode="halfEven";continue;case"rounding-mode-half-down":e.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":e.roundingMode="halfExpand";continue;case"integer-width":if(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(mni,function(l,c,u,d,h,f){if(c)e.minimumIntegerDigits=u.length;else{if(d&&h)throw new Error("We currently do not support maximum integer digits");if(f)throw new Error("We currently do not support exact integer digits")}return""});continue}if(ORt.test(r.stem)){e.minimumIntegerDigits=r.stem.length;continue}if(wrt.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(wrt,function(l,c,u,d,h,f){return u==="*"?e.minimumFractionDigits=c.length:d&&d[0]==="#"?e.maximumFractionDigits=d.length:h&&f?(e.minimumFractionDigits=h.length,e.maximumFractionDigits=h.length+f.length):(e.minimumFractionDigits=c.length,e.maximumFractionDigits=c.length),""});var o=r.options[0];o==="w"?e=Et(Et({},e),{trailingZeroDisplay:"stripIfInteger"}):o&&(e=Et(Et({},e),Crt(o)));continue}if(PRt.test(r.stem)){e=Et(Et({},e),Crt(r.stem));continue}var s=jRt(r.stem);s&&(e=Et(Et({},e),s));var a=pni(r.stem);a&&(e=Et(Et({},e),a))}return e}var JZ={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function bni(t,e){for(var n="",i=0;i<t.length;i++){var r=t.charAt(i);if(r==="j"){for(var o=0;i+1<t.length&&t.charAt(i+1)===r;)o++,i++;var s=1+(o&1),a=o<2?1:3+(o>>1),l="a",c=vni(e);for((c=="H"||c=="k")&&(a=0);a-- >0;)n+=l;for(;s-- >0;)n=c+n}else r==="J"?n+="H":n+=r}return n}function vni(t){var e=t.hourCycle;if(e===void 0&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=t.language,i;n!=="root"&&(i=t.maximize().region);var r=JZ[i||""]||JZ[n||""]||JZ["".concat(n,"-001")]||JZ["001"];return r[0]}var iwe,yni=new RegExp("^".concat(RRt.source,"*")),_ni=new RegExp("".concat(RRt.source,"*$"));function Is(t,e){return{start:t,end:e}}var xni=!!String.prototype.startsWith&&"_a".startsWith("a",1),wni=!!String.fromCodePoint,Cni=!!Object.fromEntries,Sni=!!String.prototype.codePointAt,Nni=!!String.prototype.trimStart,Eni=!!String.prototype.trimEnd,Dni=!!Number.isSafeInteger,kni=Dni?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},Oke=!0;try{var Mni=$Rt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Oke=((iwe=Mni.exec("a"))===null||iwe===void 0?void 0:iwe[0])==="a"}catch{Oke=!1}var Nrt=xni?function(e,n,i){return e.startsWith(n,i)}:function(e,n,i){return e.slice(i,i+n.length)===n},jke=wni?String.fromCodePoint:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var i="",r=e.length,o=0,s;r>o;){if(s=e[o++],s>1114111)throw RangeError(s+" is not a valid code point");i+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return i},Ert=Cni?Object.fromEntries:function(e){for(var n={},i=0,r=e;i<r.length;i++){var o=r[i],s=o[0],a=o[1];n[s]=a}return n},FRt=Sni?function(e,n){return e.codePointAt(n)}:function(e,n){var i=e.length;if(!(n<0||n>=i)){var r=e.charCodeAt(n),o;return r<55296||r>56319||n+1===i||(o=e.charCodeAt(n+1))<56320||o>57343?r:(r-55296<<10)+(o-56320)+65536}},Lni=Nni?function(e){return e.trimStart()}:function(e){return e.replace(yni,"")},Tni=Eni?function(e){return e.trimEnd()}:function(e){return e.replace(_ni,"")};function $Rt(t,e){return new RegExp(t,e)}var Fke;if(Oke){var Drt=$Rt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Fke=function(e,n){var i;Drt.lastIndex=n;var r=Drt.exec(e);return(i=r[1])!==null&&i!==void 0?i:""}}else Fke=function(e,n){for(var i=[];;){var r=FRt(e,n);if(r===void 0||VRt(r)||Pni(r))break;i.push(r),n+=r>=65536?2:1}return jke.apply(void 0,i)};var Ini=function(){function t(e,n){n===void 0&&(n={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(e,n,i){for(var r=[];!this.isEOF();){var o=this.char();if(o===123){var s=this.parseArgument(e,i);if(s.err)return s;r.push(s.val)}else{if(o===125&&e>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var a=this.clonePosition();this.bump(),r.push({type:Fl.pound,location:Is(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(ys.UNMATCHED_CLOSING_TAG,Is(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&$ke(this.peek()||0)){var s=this.parseTag(e,n);if(s.err)return s;r.push(s.val)}else{var s=this.parseLiteral(e,n);if(s.err)return s;r.push(s.val)}}}return{val:r,err:null}},t.prototype.parseTag=function(e,n){var i=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Fl.literal,value:"<".concat(r,"/>"),location:Is(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(e+1,n,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!$ke(this.char()))return this.error(ys.INVALID_TAG,Is(a,this.clonePosition()));var l=this.clonePosition(),c=this.parseTagName();return r!==c?this.error(ys.UNMATCHED_CLOSING_TAG,Is(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Fl.tag,value:r,children:s,location:Is(i,this.clonePosition())},err:null}:this.error(ys.INVALID_TAG,Is(a,this.clonePosition())))}else return this.error(ys.UNCLOSED_TAG,Is(i,this.clonePosition()))}else return this.error(ys.INVALID_TAG,Is(i,this.clonePosition()))},t.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&Rni(this.char());)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(e,n){for(var i=this.clonePosition(),r="";;){var o=this.tryParseQuote(n);if(o){r+=o;continue}var s=this.tryParseUnquoted(e,n);if(s){r+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){r+=a;continue}break}var l=Is(i,this.clonePosition());return{val:{type:Fl.literal,value:r,location:l},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Ani(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var i=this.char();if(i===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(i);this.bump()}return jke.apply(void 0,n)},t.prototype.tryParseUnquoted=function(e,n){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(n==="plural"||n==="selectordinal")||i===125&&e>0?null:(this.bump(),jke(i))},t.prototype.parseArgument=function(e,n){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ys.EXPECT_ARGUMENT_CLOSING_BRACE,Is(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(ys.EMPTY_ARGUMENT,Is(i,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(ys.MALFORMED_ARGUMENT,Is(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ys.EXPECT_ARGUMENT_CLOSING_BRACE,Is(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Fl.argument,value:r,location:Is(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ys.EXPECT_ARGUMENT_CLOSING_BRACE,Is(i,this.clonePosition())):this.parseArgumentOptions(e,n,r,i);default:return this.error(ys.MALFORMED_ARGUMENT,Is(i,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),n=this.offset(),i=Fke(this.message,n),r=n+i.length;this.bumpTo(r);var o=this.clonePosition(),s=Is(e,o);return{value:i,location:s}},t.prototype.parseArgumentOptions=function(e,n,i,r){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(a){case"":return this.error(ys.EXPECT_ARGUMENT_TYPE,Is(s,l));case"number":case"date":case"time":{this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var h=Tni(d.val);if(h.length===0)return this.error(ys.EXPECT_ARGUMENT_STYLE,Is(this.clonePosition(),this.clonePosition()));var f=Is(u,this.clonePosition());c={style:h,styleLocation:f}}var m=this.tryParseArgumentClose(r);if(m.err)return m;var p=Is(r,this.clonePosition());if(c&&Nrt(c==null?void 0:c.style,"::",0)){var g=Lni(c.style.slice(2));if(a==="number"){var d=this.parseNumberSkeletonFromString(g,c.styleLocation);return d.err?d:{val:{type:Fl.number,value:i,location:p,style:d.val},err:null}}else{if(g.length===0)return this.error(ys.EXPECT_DATE_TIME_SKELETON,p);var y=g;this.locale&&(y=bni(g,this.locale));var h={type:qj.dateTime,pattern:y,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?uni(y):{}},_=a==="date"?Fl.date:Fl.time;return{val:{type:_,value:i,location:p,style:h},err:null}}}return{val:{type:a==="number"?Fl.number:a==="date"?Fl.date:Fl.time,value:i,location:p,style:(o=c==null?void 0:c.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var w=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ys.EXPECT_SELECT_ARGUMENT_OPTIONS,Is(w,Et({},w)));this.bumpSpace();var C=this.parseIdentifierIfPossible(),N=0;if(a!=="select"&&C.value==="offset"){if(!this.bumpIf(":"))return this.error(ys.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Is(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(ys.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ys.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),C=this.parseIdentifierIfPossible(),N=d.val}var E=this.tryParsePluralOrSelectOptions(e,a,n,C);if(E.err)return E;var m=this.tryParseArgumentClose(r);if(m.err)return m;var D=Is(r,this.clonePosition());return a==="select"?{val:{type:Fl.select,value:i,options:Ert(E.val),location:D},err:null}:{val:{type:Fl.plural,value:i,options:Ert(E.val),offset:N,pluralType:a==="plural"?"cardinal":"ordinal",location:D},err:null}}default:return this.error(ys.INVALID_ARGUMENT_TYPE,Is(s,l))}},t.prototype.tryParseArgumentClose=function(e){return this.isEOF()||this.char()!==125?this.error(ys.EXPECT_ARGUMENT_CLOSING_BRACE,Is(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,n=this.clonePosition();!this.isEOF();){var i=this.char();switch(i){case 39:{this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ys.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Is(r,this.clonePosition()));this.bump();break}case 123:{e+=1,this.bump();break}case 125:{if(e>0)e-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(e,n){var i=[];try{i=hni(e)}catch{return this.error(ys.INVALID_NUMBER_SKELETON,n)}return{val:{type:qj.number,tokens:i,location:n,parsedOptions:this.shouldParseSkeletons?gni(i):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(e,n,i,r){for(var o,s=!1,a=[],l=new Set,c=r.value,u=r.location;;){if(c.length===0){var d=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(ys.EXPECT_PLURAL_ARGUMENT_SELECTOR,ys.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;u=Is(d,this.clonePosition()),c=this.message.slice(d.offset,this.offset())}else break}if(l.has(c))return this.error(n==="select"?ys.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ys.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);c==="other"&&(s=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?ys.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ys.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Is(this.clonePosition(),this.clonePosition()));var m=this.parseMessage(e+1,n,i);if(m.err)return m;var p=this.tryParseArgumentClose(f);if(p.err)return p;a.push([c,{value:m.val,location:Is(f,this.clonePosition())}]),l.add(c),this.bumpSpace(),o=this.parseIdentifierIfPossible(),c=o.value,u=o.location}return a.length===0?this.error(n==="select"?ys.EXPECT_SELECT_ARGUMENT_SELECTOR:ys.EXPECT_PLURAL_ARGUMENT_SELECTOR,Is(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(ys.MISSING_OTHER_CLAUSE,Is(this.clonePosition(),this.clonePosition())):{val:a,err:null}},t.prototype.tryParseDecimalInteger=function(e,n){var i=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var l=Is(r,this.clonePosition());return o?(s*=i,kni(s)?{val:s,err:null}:this.error(n,l)):this.error(e,l)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var n=FRt(this.message,e);if(n===void 0)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return n},t.prototype.error=function(e,n){return{val:null,err:{kind:e,message:this.message,location:n}}},t.prototype.bump=function(){if(!this.isEOF()){var e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},t.prototype.bumpIf=function(e){if(Nrt(this.message,e,this.offset())){for(var n=0;n<e.length;n++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(e){var n=this.offset(),i=this.message.indexOf(e,n);return i>=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var n=this.offset();if(n===e)break;if(n>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&VRt(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),n=this.offset(),i=this.message.charCodeAt(n+(e>=65536?2:1));return i??null},t}();function $ke(t){return t>=97&&t<=122||t>=65&&t<=90}function Ani(t){return $ke(t)||t===47}function Rni(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function VRt(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function Pni(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function Vke(t){t.forEach(function(e){if(delete e.location,LRt(e)||TRt(e))for(var n in e.options)delete e.options[n].location,Vke(e.options[n].value);else DRt(e)&&ARt(e.style)||(kRt(e)||MRt(e))&&Pke(e.style)?delete e.style.location:IRt(e)&&Vke(e.children)})}function Oni(t,e){e===void 0&&(e={}),e=Et({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var n=new Ini(t,e).parse();if(n.err){var i=SyntaxError(ys[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return e!=null&&e.captureLocation||Vke(n.val),n.val}var sw;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(sw||(sw={}));var Jk=function(t){Af(e,t);function e(n,i,r){var o=t.call(this,n)||this;return o.code=i,o.originalMessage=r,o}return e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),krt=function(t){Af(e,t);function e(n,i,r,o){return t.call(this,'Invalid values for "'.concat(n,'": "').concat(i,'". Options are "').concat(Object.keys(r).join('", "'),'"'),sw.INVALID_VALUE,o)||this}return e}(Jk),jni=function(t){Af(e,t);function e(n,i,r){return t.call(this,'Value for "'.concat(n,'" must be of type ').concat(i),sw.INVALID_VALUE,r)||this}return e}(Jk),Fni=function(t){Af(e,t);function e(n,i){return t.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(i,'"'),sw.MISSING_VALUE,i)||this}return e}(Jk),Zf;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(Zf||(Zf={}));function $ni(t){return t.length<2?t:t.reduce(function(e,n){var i=e[e.length-1];return!i||i.type!==Zf.literal||n.type!==Zf.literal?e.push(n):i.value+=n.value,e},[])}function BRt(t){return typeof t=="function"}function zee(t,e,n,i,r,o,s){if(t.length===1&&xrt(t[0]))return[{type:Zf.literal,value:t[0].value}];for(var a=[],l=0,c=t;l<c.length;l++){var u=c[l];if(xrt(u)){a.push({type:Zf.literal,value:u.value});continue}if(lni(u)){typeof o=="number"&&a.push({type:Zf.literal,value:n.getNumberFormat(e).format(o)});continue}var d=u.value;if(!(r&&d in r))throw new Fni(d,s);var h=r[d];if(ani(u)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),a.push({type:typeof h=="string"?Zf.literal:Zf.object,value:h});continue}if(kRt(u)){var f=typeof u.style=="string"?i.date[u.style]:Pke(u.style)?u.style.parsedOptions:void 0;a.push({type:Zf.literal,value:n.getDateTimeFormat(e,f).format(h)});continue}if(MRt(u)){var f=typeof u.style=="string"?i.time[u.style]:Pke(u.style)?u.style.parsedOptions:i.time.medium;a.push({type:Zf.literal,value:n.getDateTimeFormat(e,f).format(h)});continue}if(DRt(u)){var f=typeof u.style=="string"?i.number[u.style]:ARt(u.style)?u.style.parsedOptions:void 0;f&&f.scale&&(h=h*(f.scale||1)),a.push({type:Zf.literal,value:n.getNumberFormat(e,f).format(h)});continue}if(IRt(u)){var m=u.children,p=u.value,g=r[p];if(!BRt(g))throw new jni(p,"function",s);var y=zee(m,e,n,i,r,o),_=g(y.map(function(N){return N.value}));Array.isArray(_)||(_=[_]),a.push.apply(a,_.map(function(N){return{type:typeof N=="string"?Zf.literal:Zf.object,value:N}}))}if(LRt(u)){var w=u.options[h]||u.options.other;if(!w)throw new krt(u.value,h,Object.keys(u.options),s);a.push.apply(a,zee(w.value,e,n,i,r));continue}if(TRt(u)){var w=u.options["=".concat(h)];if(!w){if(!Intl.PluralRules)throw new Jk(`Intl.PluralRules is not available in this environment.
Try polyfilling it using "@formatjs/intl-pluralrules"
`,sw.MISSING_INTL_API,s);var C=n.getPluralRules(e,{type:u.pluralType}).select(h-(u.offset||0));w=u.options[C]||u.options.other}if(!w)throw new krt(u.value,h,Object.keys(u.options),s);a.push.apply(a,zee(w.value,e,n,i,r,h-(u.offset||0)));continue}}return $ni(a)}function Vni(t,e){return e?Et(Et(Et({},t||{}),e||{}),Object.keys(t).reduce(function(n,i){return n[i]=Et(Et({},t[i]),e[i]||{}),n},{})):t}function Bni(t,e){return e?Object.keys(t).reduce(function(n,i){return n[i]=Vni(t[i],e[i]),n},Et({},t)):t}function rwe(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,n){t[e]=n}}}}}function zni(t){return t===void 0&&(t={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:nm(function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((e=Intl.NumberFormat).bind.apply(e,Zc([void 0],n,!1)))},{cache:rwe(t.number),strategy:im.variadic}),getDateTimeFormat:nm(function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((e=Intl.DateTimeFormat).bind.apply(e,Zc([void 0],n,!1)))},{cache:rwe(t.dateTime),strategy:im.variadic}),getPluralRules:nm(function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((e=Intl.PluralRules).bind.apply(e,Zc([void 0],n,!1)))},{cache:rwe(t.pluralRules),strategy:im.variadic})}}var zRt=function(){function t(e,n,i,r){n===void 0&&(n=t.defaultLocale);var o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(l){var c=o.formatToParts(l);if(c.length===1)return c[0].value;var u=c.reduce(function(d,h){return!d.length||h.type!==Zf.literal||typeof d[d.length-1]!="string"?d.push(h.value):d[d.length-1]+=h.value,d},[]);return u.length<=1?u[0]||"":u},this.formatToParts=function(l){return zee(o.ast,o.locales,o.formatters,o.formats,l,void 0,o.message)},this.resolvedOptions=function(){var l;return{locale:((l=o.resolvedLocale)===null||l===void 0?void 0:l.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=n,this.resolvedLocale=t.resolveLocale(n),typeof e=="string"){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=r||{};s.formatters;var a=km(s,["formatters"]);this.ast=t.__parse(e,Et(Et({},a),{locale:this.resolvedLocale}))}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Bni(t.formats,i),this.formatters=r&&r.formatters||zni(this.formatterCache)}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(e){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(e);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof e=="string"?e:e[0])}},t.__parse=Oni,t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t}(),R2;(function(t){t.FORMAT_ERROR="FORMAT_ERROR",t.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",t.INVALID_CONFIG="INVALID_CONFIG",t.MISSING_DATA="MISSING_DATA",t.MISSING_TRANSLATION="MISSING_TRANSLATION"})(R2||(R2={}));var sq=function(t){Af(e,t);function e(n,i,r){var o=this,s=r?r instanceof Error?r:new Error(String(r)):void 0;return o=t.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(i,`
`).concat(s?`
`.concat(s.message,`
`).concat(s.stack):""))||this,o.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(o,e),o}return e}(Error),Hni=function(t){Af(e,t);function e(n,i){return t.call(this,R2.UNSUPPORTED_FORMATTER,n,i)||this}return e}(sq),Wni=function(t){Af(e,t);function e(n,i){return t.call(this,R2.INVALID_CONFIG,n,i)||this}return e}(sq),Mrt=function(t){Af(e,t);function e(n,i){return t.call(this,R2.MISSING_DATA,n,i)||this}return e}(sq),qv=function(t){Af(e,t);function e(n,i,r){var o=t.call(this,R2.FORMAT_ERROR,"".concat(n,`
Locale: `).concat(i,`
`),r)||this;return o.locale=i,o}return e}(sq),owe=function(t){Af(e,t);function e(n,i,r,o){var s=t.call(this,"".concat(n,`
MessageID: `).concat(r==null?void 0:r.id,`
Default Message: `).concat(r==null?void 0:r.defaultMessage,`
Description: `).concat(r==null?void 0:r.description,`
`),i,o)||this;return s.descriptor=r,s.locale=i,s}return e}(qv),Uni=function(t){Af(e,t);function e(n,i){var r=t.call(this,R2.MISSING_TRANSLATION,'Missing message: "'.concat(n.id,'" for locale "').concat(i,'", using ').concat(n.defaultMessage?"default message (".concat(typeof n.defaultMessage=="string"?n.defaultMessage:n.defaultMessage.map(function(o){var s;return(s=o.value)!==null&&s!==void 0?s:JSON.stringify(o)}).join(),")"):"id"," as fallback."))||this;return r.descriptor=n,r}return e}(sq);function UA(t,e,n){return n===void 0&&(n={}),e.reduce(function(i,r){return r in t?i[r]=t[r]:r in n&&(i[r]=n[r]),i},{})}var Kni=function(t){console.error(t)},qni=function(t){console.warn(t)},HRt={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:Kni,onWarn:qni};function WRt(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function uL(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,n){t[e]=n}}}}}function Gni(t){t===void 0&&(t=WRt());var e=Intl.RelativeTimeFormat,n=Intl.ListFormat,i=Intl.DisplayNames,r=nm(function(){for(var a,l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return new((a=Intl.DateTimeFormat).bind.apply(a,Zc([void 0],l,!1)))},{cache:uL(t.dateTime),strategy:im.variadic}),o=nm(function(){for(var a,l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return new((a=Intl.NumberFormat).bind.apply(a,Zc([void 0],l,!1)))},{cache:uL(t.number),strategy:im.variadic}),s=nm(function(){for(var a,l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return new((a=Intl.PluralRules).bind.apply(a,Zc([void 0],l,!1)))},{cache:uL(t.pluralRules),strategy:im.variadic});return{getDateTimeFormat:r,getNumberFormat:o,getMessageFormat:nm(function(a,l,c,u){return new zRt(a,l,c,Et({formatters:{getNumberFormat:o,getDateTimeFormat:r,getPluralRules:s}},u||{}))},{cache:uL(t.message),strategy:im.variadic}),getRelativeTimeFormat:nm(function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return new(e.bind.apply(e,Zc([void 0],a,!1)))},{cache:uL(t.relativeTime),strategy:im.variadic}),getPluralRules:s,getListFormat:nm(function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return new(n.bind.apply(n,Zc([void 0],a,!1)))},{cache:uL(t.list),strategy:im.variadic}),getDisplayNames:nm(function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return new(i.bind.apply(i,Zc([void 0],a,!1)))},{cache:uL(t.displayNames),strategy:im.variadic})}}function P$e(t,e,n,i){var r=t&&t[e],o;if(r&&(o=r[n]),o)return o;i(new Hni("No ".concat(e," format named: ").concat(n)))}function eQ(t,e){return Object.keys(t).reduce(function(n,i){return n[i]=Et({timeZone:e},t[i]),n},{})}function Lrt(t,e){var n=Object.keys(Et(Et({},t),e));return n.reduce(function(i,r){return i[r]=Et(Et({},t[r]||{}),e[r]||{}),i},{})}function Trt(t,e){if(!e)return t;var n=zRt.formats;return Et(Et(Et({},n),t),{date:Lrt(eQ(n.date,e),eQ(t.date||{},e)),time:Lrt(eQ(n.time,e),eQ(t.time||{},e))})}var Bke=function(t,e,n,i,r){var o=t.locale,s=t.formats,a=t.messages,l=t.defaultLocale,c=t.defaultFormats,u=t.fallbackOnEmptyString,d=t.onError,h=t.timeZone,f=t.defaultRichTextElements;n===void 0&&(n={id:""});var m=n.id,p=n.defaultMessage;ERt(!!m,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var g=String(m),y=a&&Object.prototype.hasOwnProperty.call(a,g)&&a[g];if(Array.isArray(y)&&y.length===1&&y[0].type===Fl.literal)return y[0].value;if(!i&&y&&typeof y=="string"&&!f)return y.replace(/'\{(.*?)\}'/gi,"{$1}");if(i=Et(Et({},f),i||{}),s=Trt(s,h),c=Trt(c,h),!y){if(u===!1&&y==="")return y;if((!p||o&&o.toLowerCase()!==l.toLowerCase())&&d(new Uni(n,o)),p)try{var _=e.getMessageFormat(p,l,c,r);return _.format(i)}catch(w){return d(new owe('Error formatting default message for: "'.concat(g,'", rendering default message verbatim'),o,n,w)),typeof p=="string"?p:g}return g}try{var _=e.getMessageFormat(y,o,s,Et({formatters:e},r||{}));return _.format(i)}catch(w){d(new owe('Error formatting message: "'.concat(g,'", using ').concat(p?"default message":"id"," as fallback."),o,n,w))}if(p)try{var _=e.getMessageFormat(p,l,c,r);return _.format(i)}catch(w){d(new owe('Error formatting the default message for: "'.concat(g,'", rendering message verbatim'),o,n,w))}return typeof y=="string"?y:typeof p=="string"?p:g},URt=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function cfe(t,e,n,i){var r=t.locale,o=t.formats,s=t.onError,a=t.timeZone;i===void 0&&(i={});var l=i.format,c=Et(Et({},a&&{timeZone:a}),l&&P$e(o,e,l,s)),u=UA(i,URt,c);return e==="time"&&!u.hour&&!u.minute&&!u.second&&!u.timeStyle&&!u.dateStyle&&(u=Et(Et({},u),{hour:"numeric",minute:"numeric"})),n(r,u)}function Yni(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],o=n[1],s=o===void 0?{}:o,a=typeof r=="string"?new Date(r||0):r;try{return cfe(t,"date",e,s).format(a)}catch(l){t.onError(new qv("Error formatting date.",t.locale,l))}return String(a)}function Xni(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],o=n[1],s=o===void 0?{}:o,a=typeof r=="string"?new Date(r||0):r;try{return cfe(t,"time",e,s).format(a)}catch(l){t.onError(new qv("Error formatting time.",t.locale,l))}return String(a)}function Zni(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],o=n[1],s=n[2],a=s===void 0?{}:s,l=t.timeZone,c=t.locale,u=t.onError,d=UA(a,URt,l?{timeZone:l}:{});try{return e(c,d).formatRange(r,o)}catch(h){u(new qv("Error formatting date time range.",t.locale,h))}return String(r)}function Qni(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],o=n[1],s=o===void 0?{}:o,a=typeof r=="string"?new Date(r||0):r;try{return cfe(t,"date",e,s).formatToParts(a)}catch(l){t.onError(new qv("Error formatting date.",t.locale,l))}return[]}function Jni(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],o=n[1],s=o===void 0?{}:o,a=typeof r=="string"?new Date(r||0):r;try{return cfe(t,"time",e,s).formatToParts(a)}catch(l){t.onError(new qv("Error formatting time.",t.locale,l))}return[]}var eii=["style","type","fallback","languageDisplay"];function tii(t,e,n,i){var r=t.locale,o=t.onError,s=Intl.DisplayNames;s||o(new Jk(`Intl.DisplayNames is not available in this environment.
Try polyfilling it using "@formatjs/intl-displaynames"
`,sw.MISSING_INTL_API));var a=UA(i,eii);try{return e(r,a).of(n)}catch(l){o(new qv("Error formatting display name.",r,l))}}var nii=["type","style"],Irt=Date.now();function iii(t){return"".concat(Irt,"_").concat(t,"_").concat(Irt)}function rii(t,e,n,i){i===void 0&&(i={});var r=KRt(t,e,n,i).reduce(function(o,s){var a=s.value;return typeof a!="string"?o.push(a):typeof o[o.length-1]=="string"?o[o.length-1]+=a:o.push(a),o},[]);return r.length===1?r[0]:r.length===0?"":r}function KRt(t,e,n,i){var r=t.locale,o=t.onError;i===void 0&&(i={});var s=Intl.ListFormat;s||o(new Jk(`Intl.ListFormat is not available in this environment.
Try polyfilling it using "@formatjs/intl-listformat"
`,sw.MISSING_INTL_API));var a=UA(i,nii);try{var l={},c=n.map(function(u,d){if(typeof u=="object"){var h=iii(d);return l[h]=u,h}return String(u)});return e(r,a).formatToParts(c).map(function(u){return u.type==="literal"?u:Et(Et({},u),{value:l[u.value]||u.value})})}catch(u){o(new qv("Error formatting list.",r,u))}return n}var oii=["type"];function sii(t,e,n,i){var r=t.locale,o=t.onError;i===void 0&&(i={}),Intl.PluralRules||o(new Jk(`Intl.PluralRules is not available in this environment.
Try polyfilling it using "@formatjs/intl-pluralrules"
`,sw.MISSING_INTL_API));var s=UA(i,oii);try{return e(r,s).select(n)}catch(a){o(new qv("Error formatting plural.",r,a))}return"other"}var aii=["numeric","style"];function lii(t,e,n){var i=t.locale,r=t.formats,o=t.onError;n===void 0&&(n={});var s=n.format,a=!!s&&P$e(r,"relative",s,o)||{},l=UA(n,aii,a);return e(i,l)}function cii(t,e,n,i,r){r===void 0&&(r={}),i||(i="second");var o=Intl.RelativeTimeFormat;o||t.onError(new Jk(`Intl.RelativeTimeFormat is not available in this environment.
Try polyfilling it using "@formatjs/intl-relativetimeformat"
`,sw.MISSING_INTL_API));try{return lii(t,e,r).format(n,i)}catch(s){t.onError(new qv("Error formatting relative time.",t.locale,s))}return String(n)}var uii=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function qRt(t,e,n){var i=t.locale,r=t.formats,o=t.onError;n===void 0&&(n={});var s=n.format,a=s&&P$e(r,"number",s,o)||{},l=UA(n,uii,a);return e(i,l)}function dii(t,e,n,i){i===void 0&&(i={});try{return qRt(t,e,i).format(n)}catch(r){t.onError(new qv("Error formatting number.",t.locale,r))}return String(n)}function hii(t,e,n,i){i===void 0&&(i={});try{return qRt(t,e,i).formatToParts(n)}catch(r){t.onError(new qv("Error formatting number.",t.locale,r))}return[]}function fii(t){var e=t?t[Object.keys(t)[0]]:void 0;return typeof e=="string"}function mii(t){t.onWarn&&t.defaultRichTextElements&&fii(t.messages||{})&&t.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled. 
Please consider using "@formatjs/cli" to pre-compile your messages for performance.
For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function pii(t,e){var n=Gni(e),i=Et(Et({},HRt),t),r=i.locale,o=i.defaultLocale,s=i.onError;return r?!Intl.NumberFormat.supportedLocalesOf(r).length&&s?s(new Mrt('Missing locale data for locale: "'.concat(r,'" in Intl.NumberFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(r).length&&s&&s(new Mrt('Missing locale data for locale: "'.concat(r,'" in Intl.DateTimeFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new Wni('"locale" was not configured, using "'.concat(o,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),i.locale=i.defaultLocale||"en"),mii(i),Et(Et({},i),{formatters:n,formatNumber:dii.bind(null,i,n.getNumberFormat),formatNumberToParts:hii.bind(null,i,n.getNumberFormat),formatRelativeTime:cii.bind(null,i,n.getRelativeTimeFormat),formatDate:Yni.bind(null,i,n.getDateTimeFormat),formatDateToParts:Qni.bind(null,i,n.getDateTimeFormat),formatTime:Xni.bind(null,i,n.getDateTimeFormat),formatDateTimeRange:Zni.bind(null,i,n.getDateTimeFormat),formatTimeToParts:Jni.bind(null,i,n.getDateTimeFormat),formatPlural:sii.bind(null,i,n.getPluralRules),formatMessage:Bke.bind(null,i,n),$t:Bke.bind(null,i,n),formatList:rii.bind(null,i,n.getListFormat),formatListToParts:KRt.bind(null,i,n.getListFormat),formatDisplayName:tii.bind(null,i,n.getDisplayNames)})}function GRt(t){ERt(t,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var YRt=Et(Et({},HRt),{textComponent:b.Fragment});function gii(t){return function(e){return t(b.Children.toArray(e))}}function zke(t,e){if(t===e)return!0;if(!t||!e)return!1;var n=Object.keys(t),i=Object.keys(e),r=n.length;if(i.length!==r)return!1;for(var o=0;o<r;o++){var s=n[o];if(t[s]!==e[s]||!Object.prototype.hasOwnProperty.call(e,s))return!1}return!0}var O$e=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=b.createContext(null)):b.createContext(null);O$e.Consumer;var bii=O$e.Provider,vii=bii,yii=O$e;function Mt(){var t=b.useContext(yii);return GRt(t),t}var Hke;(function(t){t.formatDate="FormattedDate",t.formatTime="FormattedTime",t.formatNumber="FormattedNumber",t.formatList="FormattedList",t.formatDisplayName="FormattedDisplayName"})(Hke||(Hke={}));var Wke;(function(t){t.formatDate="FormattedDateParts",t.formatTime="FormattedTimeParts",t.formatNumber="FormattedNumberParts",t.formatList="FormattedListParts"})(Wke||(Wke={}));function XRt(t){var e=function(n){var i=Mt(),r=n.value,o=n.children,s=km(n,["value","children"]),a=typeof r=="string"?new Date(r||0):r,l=t==="formatDate"?i.formatDateToParts(a,s):i.formatTimeToParts(a,s);return o(l)};return e.displayName=Wke[t],e}function aq(t){var e=function(n){var i=Mt(),r=n.value,o=n.children,s=km(n,["value","children"]),a=i[t](r,s);if(typeof o=="function")return o(a);var l=i.textComponent||b.Fragment;return b.createElement(l,null,a)};return e.displayName=Hke[t],e}function ZRt(t){return t&&Object.keys(t).reduce(function(e,n){var i=t[n];return e[n]=BRt(i)?gii(i):i,e},{})}var Art=function(t,e,n,i){for(var r=[],o=4;o<arguments.length;o++)r[o-4]=arguments[o];var s=ZRt(i),a=Bke.apply(void 0,Zc([t,e,n,s],r,!1));return Array.isArray(a)?b.Children.toArray(a):a},Rrt=function(t,e){var n=t.defaultRichTextElements,i=km(t,["defaultRichTextElements"]),r=ZRt(n),o=pii(Et(Et(Et({},YRt),i),{defaultRichTextElements:r}),e),s={locale:o.locale,timeZone:o.timeZone,fallbackOnEmptyString:o.fallbackOnEmptyString,formats:o.formats,defaultLocale:o.defaultLocale,defaultFormats:o.defaultFormats,messages:o.messages,onError:o.onError,defaultRichTextElements:r};return Et(Et({},o),{formatMessage:Art.bind(null,s,o.formatters),$t:Art.bind(null,s,o.formatters)})};function swe(t){return{locale:t.locale,timeZone:t.timeZone,fallbackOnEmptyString:t.fallbackOnEmptyString,formats:t.formats,textComponent:t.textComponent,messages:t.messages,defaultLocale:t.defaultLocale,defaultFormats:t.defaultFormats,onError:t.onError,onWarn:t.onWarn,wrapRichTextChunksInFragment:t.wrapRichTextChunksInFragment,defaultRichTextElements:t.defaultRichTextElements}}var _ii=function(t){Af(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.cache=WRt(),n.state={cache:n.cache,intl:Rrt(swe(n.props),n.cache),prevConfig:swe(n.props)},n}return e.getDerivedStateFromProps=function(n,i){var r=i.prevConfig,o=i.cache,s=swe(n);return zke(r,s)?null:{intl:Rrt(s,o),prevConfig:s}},e.prototype.render=function(){return GRt(this.state.intl),b.createElement(vii,{value:this.state.intl},this.props.children)},e.displayName="IntlProvider",e.defaultProps=YRt,e}(b.PureComponent);function xii(t,e){var n=t.values,i=km(t,["values"]),r=e.values,o=km(e,["values"]);return zke(r,n)&&zke(i,o)}function QRt(t){var e=Mt(),n=e.formatMessage,i=e.textComponent,r=i===void 0?b.Fragment:i,o=t.id,s=t.description,a=t.defaultMessage,l=t.values,c=t.children,u=t.tagName,d=u===void 0?r:u,h=t.ignoreTag,f={id:o,description:s,defaultMessage:a},m=n(f,l,{ignoreTag:h});return typeof c=="function"?c(Array.isArray(m)?m:[m]):d?b.createElement(d,null,b.Children.toArray(m)):b.createElement(b.Fragment,null,m)}QRt.displayName="FormattedMessage";var ee=b.memo(QRt,xii);ee.displayName="MemoizedFormattedMessage";var tu=aq("formatDate"),Prt=aq("formatTime"),Qb=aq("formatNumber");aq("formatList");aq("formatDisplayName");XRt("formatDate");XRt("formatTime");var wii=function(){function t(){this.keyToValue=new Map,this.valueToKey=new Map}return t.prototype.set=function(e,n){this.keyToValue.set(e,n),this.valueToKey.set(n,e)},t.prototype.getByKey=function(e){return this.keyToValue.get(e)},t.prototype.getByValue=function(e){return this.valueToKey.get(e)},t.prototype.clear=function(){this.keyToValue.clear(),this.valueToKey.clear()},t}(),JRt=function(){function t(e){this.generateIdentifier=e,this.kv=new wii}return t.prototype.register=function(e,n){this.kv.getByValue(e)||(n||(n=this.generateIdentifier(e)),this.kv.set(n,e))},t.prototype.clear=function(){this.kv.clear()},t.prototype.getIdentifier=function(e){return this.kv.getByValue(e)},t.prototype.getValue=function(e){return this.kv.getByKey(e)},t}(),Cii=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(i[o]=r[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function i(){this.constructor=e}e.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),Sii=function(t){Cii(e,t);function e(){var n=t.call(this,function(i){return i.name})||this;return n.classToAllowedProps=new Map,n}return e.prototype.register=function(n,i){typeof i=="object"?(i.allowProps&&this.classToAllowedProps.set(n,i.allowProps),t.prototype.register.call(this,n,i.identifier)):t.prototype.register.call(this,n,i)},e.prototype.getAllowedProps=function(n){return this.classToAllowedProps.get(n)},e}(JRt),Nii=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),r,o=[],s;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return o};function Eii(t){if("values"in Object)return Object.values(t);var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(t[n]);return e}function Dii(t,e){var n=Eii(t);if("find"in n)return n.find(e);for(var i=n,r=0;r<i.length;r++){var o=i[r];if(e(o))return o}}function Gj(t,e){Object.entries(t).forEach(function(n){var i=Nii(n,2),r=i[0],o=i[1];return e(o,r)})}function Hee(t,e){return t.indexOf(e)!==-1}function Ort(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(e(i))return i}}var kii=function(){function t(){this.transfomers={}}return t.prototype.register=function(e){this.transfomers[e.name]=e},t.prototype.findApplicable=function(e){return Dii(this.transfomers,function(n){return n.isApplicable(e)})},t.prototype.findByName=function(e){return this.transfomers[e]},t}(),Mii=function(t){return Object.prototype.toString.call(t).slice(8,-1)},ePt=function(t){return typeof t>"u"},Lii=function(t){return t===null},qz=function(t){return typeof t!="object"||t===null||t===Object.prototype?!1:Object.getPrototypeOf(t)===null?!0:Object.getPrototypeOf(t)===Object.prototype},Uke=function(t){return qz(t)&&Object.keys(t).length===0},ek=function(t){return Array.isArray(t)},Tii=function(t){return typeof t=="string"},Iii=function(t){return typeof t=="number"&&!isNaN(t)},Aii=function(t){return typeof t=="boolean"},Rii=function(t){return t instanceof RegExp},Gz=function(t){return t instanceof Map},Yz=function(t){return t instanceof Set},tPt=function(t){return Mii(t)==="Symbol"},Pii=function(t){return t instanceof Date&&!isNaN(t.valueOf())},Oii=function(t){return t instanceof Error},jrt=function(t){return typeof t=="number"&&isNaN(t)},jii=function(t){return Aii(t)||Lii(t)||ePt(t)||Iii(t)||Tii(t)||tPt(t)},Fii=function(t){return typeof t=="bigint"},$ii=function(t){return t===1/0||t===-1/0},Vii=function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},Bii=function(t){return t instanceof URL},nPt=function(t){return t.replace(/\./g,"\\.")},awe=function(t){return t.map(String).map(nPt).join(".")},j9=function(t){for(var e=[],n="",i=0;i<t.length;i++){var r=t.charAt(i),o=r==="\\"&&t.charAt(i+1)===".";if(o){n+=".",i++;continue}var s=r===".";if(s){e.push(n),n="";continue}n+=r}var a=n;return e.push(a),e},Kke=function(){return Kke=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},Kke.apply(this,arguments)},qke=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),r,o=[],s;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return o},Gke=function(t,e){for(var n=0,i=e.length,r=t.length;n<i;n++,r++)t[r]=e[n];return t};function P_(t,e,n,i){return{isApplicable:t,annotation:e,transform:n,untransform:i}}var iPt=[P_(ePt,"undefined",function(){return null},function(){}),P_(Fii,"bigint",function(t){return t.toString()},function(t){return typeof BigInt<"u"?BigInt(t):(console.error("Please add a BigInt polyfill."),t)}),P_(Pii,"Date",function(t){return t.toISOString()},function(t){return new Date(t)}),P_(Oii,"Error",function(t,e){var n={name:t.name,message:t.message};return e.allowedErrorProps.forEach(function(i){n[i]=t[i]}),n},function(t,e){var n=new Error(t.message);return n.name=t.name,n.stack=t.stack,e.allowedErrorProps.forEach(function(i){n[i]=t[i]}),n}),P_(Rii,"regexp",function(t){return""+t},function(t){var e=t.slice(1,t.lastIndexOf("/")),n=t.slice(t.lastIndexOf("/")+1);return new RegExp(e,n)}),P_(Yz,"set",function(t){return Gke([],qke(t.values()))},function(t){return new Set(t)}),P_(Gz,"map",function(t){return Gke([],qke(t.entries()))},function(t){return new Map(t)}),P_(function(t){return jrt(t)||$ii(t)},"number",function(t){return jrt(t)?"NaN":t>0?"Infinity":"-Infinity"},Number),P_(function(t){return t===0&&1/t===-1/0},"number",function(){return"-0"},Number),P_(Bii,"URL",function(t){return t.toString()},function(t){return new URL(t)})];function ufe(t,e,n,i){return{isApplicable:t,annotation:e,transform:n,untransform:i}}var rPt=ufe(function(t,e){if(tPt(t)){var n=!!e.symbolRegistry.getIdentifier(t);return n}return!1},function(t,e){var n=e.symbolRegistry.getIdentifier(t);return["symbol",n]},function(t){return t.description},function(t,e,n){var i=n.symbolRegistry.getValue(e[1]);if(!i)throw new Error("Trying to deserialize unknown symbol");return i}),zii=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(t,e){return t[e.name]=e,t},{}),oPt=ufe(Vii,function(t){return["typed-array",t.constructor.name]},function(t){return Gke([],qke(t))},function(t,e){var n=zii[e[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(t)});function sPt(t,e){if(t!=null&&t.constructor){var n=!!e.classRegistry.getIdentifier(t.constructor);return n}return!1}var aPt=ufe(sPt,function(t,e){var n=e.classRegistry.getIdentifier(t.constructor);return["class",n]},function(t,e){var n=e.classRegistry.getAllowedProps(t.constructor);if(!n)return Kke({},t);var i={};return n.forEach(function(r){i[r]=t[r]}),i},function(t,e,n){var i=n.classRegistry.getValue(e[1]);if(!i)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(i.prototype),t)}),lPt=ufe(function(t,e){return!!e.customTransformerRegistry.findApplicable(t)},function(t,e){var n=e.customTransformerRegistry.findApplicable(t);return["custom",n.name]},function(t,e){var n=e.customTransformerRegistry.findApplicable(t);return n.serialize(t)},function(t,e,n){var i=n.customTransformerRegistry.findByName(e[1]);if(!i)throw new Error("Trying to deserialize unknown custom value");return i.deserialize(t)}),Hii=[aPt,rPt,lPt,oPt],Frt=function(t,e){var n=Ort(Hii,function(r){return r.isApplicable(t,e)});if(n)return{value:n.transform(t,e),type:n.annotation(t,e)};var i=Ort(iPt,function(r){return r.isApplicable(t,e)});if(i)return{value:i.transform(t,e),type:i.annotation}},cPt={};iPt.forEach(function(t){cPt[t.annotation]=t});var Wii=function(t,e,n){if(ek(e))switch(e[0]){case"symbol":return rPt.untransform(t,e,n);case"class":return aPt.untransform(t,e,n);case"custom":return lPt.untransform(t,e,n);case"typed-array":return oPt.untransform(t,e,n);default:throw new Error("Unknown transformation: "+e)}else{var i=cPt[e];if(!i)throw new Error("Unknown transformation: "+e);return i.untransform(t,n)}},n4=function(t,e){for(var n=t.keys();e>0;)n.next(),e--;return n.next().value};function uPt(t){if(Hee(t,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Hee(t,"prototype"))throw new Error("prototype is not allowed as a property");if(Hee(t,"constructor"))throw new Error("constructor is not allowed as a property")}var Uii=function(t,e){uPt(e);for(var n=0;n<e.length;n++){var i=e[n];if(Yz(t))t=n4(t,+i);else if(Gz(t)){var r=+i,o=+e[++n]==0?"key":"value",s=n4(t,r);switch(o){case"key":t=s;break;case"value":t=t.get(s);break}}else t=t[i]}return t},Yke=function(t,e,n){if(uPt(e),e.length===0)return n(t);for(var i=t,r=0;r<e.length-1;r++){var o=e[r];if(ek(i)){var s=+o;i=i[s]}else if(qz(i))i=i[o];else if(Yz(i)){var a=+o;i=n4(i,a)}else if(Gz(i)){var l=r===e.length-2;if(l)break;var a=+o,c=+e[++r]==0?"key":"value",u=n4(i,a);switch(c){case"key":i=u;break;case"value":i=i.get(u);break}}}var d=e[e.length-1];if(ek(i)?i[+d]=n(i[+d]):qz(i)&&(i[d]=n(i[d])),Yz(i)){var h=n4(i,+d),f=n(h);h!==f&&(i.delete(h),i.add(f))}if(Gz(i)){var a=+e[e.length-2],m=n4(i,a),c=+d==0?"key":"value";switch(c){case"key":{var p=n(m);i.set(p,i.get(m)),p!==m&&i.delete(m);break}case"value":{i.set(m,n(i.get(m)));break}}}return t},X1=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),r,o=[],s;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return o},FE=function(t,e){for(var n=0,i=e.length,r=t.length;n<i;n++,r++)t[r]=e[n];return t};function Xke(t,e,n){if(n===void 0&&(n=[]),!!t){if(!ek(t)){Gj(t,function(s,a){return Xke(s,e,FE(FE([],X1(n)),X1(j9(a))))});return}var i=X1(t,2),r=i[0],o=i[1];o&&Gj(o,function(s,a){Xke(s,e,FE(FE([],X1(n)),X1(j9(a))))}),e(r,n)}}function Kii(t,e,n){return Xke(e,function(i,r){t=Yke(t,r,function(o){return Wii(o,i,n)})}),t}function qii(t,e){function n(s,a){var l=Uii(t,j9(a));s.map(j9).forEach(function(c){t=Yke(t,c,function(){return l})})}if(ek(e)){var i=X1(e,2),r=i[0],o=i[1];r.forEach(function(s){t=Yke(t,j9(s),function(){return t})}),o&&Gj(o,n)}else Gj(e,n);return t}var Gii=function(t,e){return qz(t)||ek(t)||Gz(t)||Yz(t)||sPt(t,e)};function Yii(t,e,n){var i=n.get(t);i?i.push(e):n.set(t,[e])}function Xii(t,e){var n={},i=void 0;return t.forEach(function(r){if(!(r.length<=1)){e||(r=r.map(function(l){return l.map(String)}).sort(function(l,c){return l.length-c.length}));var o=X1(r),s=o[0],a=o.slice(1);s.length===0?i=a.map(awe):n[awe(s)]=a.map(awe)}}),i?Uke(n)?[i]:[i,n]:Uke(n)?void 0:n}var dPt=function(t,e,n,i,r,o,s){var a;r===void 0&&(r=[]),o===void 0&&(o=[]),s===void 0&&(s=new Map);var l=jii(t);if(!l){Yii(t,r,e);var c=s.get(t);if(c)return i?{transformedValue:null}:c}if(!Gii(t,n)){var u=Frt(t,n),d=u?{transformedValue:u.value,annotations:[u.type]}:{transformedValue:t};return l||s.set(t,d),d}if(Hee(o,t))return{transformedValue:null};var h=Frt(t,n),f=(a=h==null?void 0:h.value)!==null&&a!==void 0?a:t,m=ek(f)?[]:{},p={};Gj(f,function(y,_){var w=dPt(y,e,n,i,FE(FE([],X1(r)),[_]),FE(FE([],X1(o)),[t]),s);m[_]=w.transformedValue,ek(w.annotations)?p[_]=w.annotations:qz(w.annotations)&&Gj(w.annotations,function(C,N){p[nPt(_)+"."+N]=C})});var g=Uke(p)?{transformedValue:m,annotations:h?[h.type]:void 0}:{transformedValue:m,annotations:h?[h.type,p]:p};return l||s.set(t,g),g};function hPt(t){return Object.prototype.toString.call(t).slice(8,-1)}function $rt(t){return hPt(t)==="Array"}function Zii(t){if(hPt(t)!=="Object")return!1;const e=Object.getPrototypeOf(t);return!!e&&e.constructor===Object&&e===Object.prototype}function Qii(t,e,n,i,r){const o={}.propertyIsEnumerable.call(i,e)?"enumerable":"nonenumerable";o==="enumerable"&&(t[e]=n),r&&o==="nonenumerable"&&Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}function Zke(t,e={}){if($rt(t))return t.map(r=>Zke(r,e));if(!Zii(t))return t;const n=Object.getOwnPropertyNames(t),i=Object.getOwnPropertySymbols(t);return[...n,...i].reduce((r,o)=>{if($rt(e.props)&&!e.props.includes(o))return r;const s=t[o],a=Zke(s,e);return Qii(r,o,a,t,e.nonenumerable),r},{})}var tT=function(){return tT=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},tT.apply(this,arguments)},Jii=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),r,o=[],s;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return o},eri=function(t,e){for(var n=0,i=e.length,r=t.length;n<i;n++,r++)t[r]=e[n];return t},HS=function(){function t(e){var n=e===void 0?{}:e,i=n.dedupe,r=i===void 0?!1:i;this.classRegistry=new Sii,this.symbolRegistry=new JRt(function(o){var s;return(s=o.description)!==null&&s!==void 0?s:""}),this.customTransformerRegistry=new kii,this.allowedErrorProps=[],this.dedupe=r}return t.prototype.serialize=function(e){var n=new Map,i=dPt(e,n,this,this.dedupe),r={json:i.transformedValue};i.annotations&&(r.meta=tT(tT({},r.meta),{values:i.annotations}));var o=Xii(n,this.dedupe);return o&&(r.meta=tT(tT({},r.meta),{referentialEqualities:o})),r},t.prototype.deserialize=function(e){var n=e.json,i=e.meta,r=Zke(n);return i!=null&&i.values&&(r=Kii(r,i.values,this)),i!=null&&i.referentialEqualities&&(r=qii(r,i.referentialEqualities)),r},t.prototype.stringify=function(e){return JSON.stringify(this.serialize(e))},t.prototype.parse=function(e){return this.deserialize(JSON.parse(e))},t.prototype.registerClass=function(e,n){this.classRegistry.register(e,n)},t.prototype.registerSymbol=function(e,n){this.symbolRegistry.register(e,n)},t.prototype.registerCustom=function(e,n){this.customTransformerRegistry.register(tT({name:n},e))},t.prototype.allowErrorProps=function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];(e=this.allowedErrorProps).push.apply(e,eri([],Jii(n)))},t.defaultInstance=new t,t.serialize=t.defaultInstance.serialize.bind(t.defaultInstance),t.deserialize=t.defaultInstance.deserialize.bind(t.defaultInstance),t.stringify=t.defaultInstance.stringify.bind(t.defaultInstance),t.parse=t.defaultInstance.parse.bind(t.defaultInstance),t.registerClass=t.defaultInstance.registerClass.bind(t.defaultInstance),t.registerSymbol=t.defaultInstance.registerSymbol.bind(t.defaultInstance),t.registerCustom=t.defaultInstance.registerCustom.bind(t.defaultInstance),t.allowErrorProps=t.defaultInstance.allowErrorProps.bind(t.defaultInstance),t}();HS.serialize;HS.deserialize;HS.stringify;HS.parse;HS.registerClass;HS.registerCustom;HS.registerSymbol;HS.allowErrorProps;const yd="#5445ff",dfe="#7f6eff",tri="#9595F9",j$e="#BD87C9",nri="#D3B9DC",iri="#6C67AA",rri="#A6A5C9",ori="#002140",Wee="#f651a0",sri=["image/jpeg","image/png","image/jpg","image/webp","image/svg+xml"],fPt=["facebook","localhost:","twitter","google","stackoverflow","tailwindcss","instagram","tiktok","spotify","yahoo.com","hln.be","sporza","cnn.com","vtm.be","vrt.be","tijd.be","nbcnews.com","reuters.com","demorgen.be","nieuwsblad.be","standaard.be","wikipedia"],ari={mobile:640,mobileNav:768},F$e={maxAvatar:5e6,maxTextSize:1e7},lri=["azureOpenAi","openAi"],aE={azureOpenAi:"Azure OpenAI",openAi:"OpenAI"},lwe={aiForm:{azureOpenAi:["gpt-4o","gpt-4","gpt-4o-mini"],openAi:["gpt-4o-mini","gpt-4o","gpt-4","gpt-4-turbo-preview"]},chatbot:{azureOpenAi:["gpt-3.5-turbo","gpt-4o","gpt-4","gpt-4o-mini"],openAi:["gpt-4o-mini","gpt-4o","gpt-4","gpt-4-turbo-preview"]}},WP={"gpt-3.5-turbo":2,"gpt-4o-mini":1,"gpt-4o":10,"gpt-4-turbo-preview":20,"gpt-4":60},AV={rag:0,"rag-fusion":1},cri={rag:void 0,"rag-fusion":{id:"pre_processor.rag-fusion.description",defaultMessage:"Enhances your AI assistant's accuracy, keeps it in scope, and improves its ability to maintain conversational context."}},cwe="https://developers.chathive.app",lq={base:cwe,sdk:`${cwe}/sdk`,crawler:`${cwe}/crawler/crawler-config`},Yj={admin:{id:"members_role.admin",defaultMessage:"Admin"},default:{id:"members_role.default",defaultMessage:"Default"}},Vrt={free:{id:"billing_types.free",defaultMessage:"Free"},monthly:{id:"billing_types.monthly",defaultMessage:"Monthly"},annually:{id:"billing_types.annually",defaultMessage:"Annually"},trial:{id:"billing_types.trial",defaultMessage:"Trial"}},bv={veryLow:{id:"priority_types.veryLow",defaultMessage:"Very low"},low:{id:"priority_types.low",defaultMessage:"Low"},default:{id:"priority_types.default",defaultMessage:"Default"},high:{id:"priority_types.high",defaultMessage:"High"},veryHigh:{id:"priority_types.very_high",defaultMessage:"Very high"},topPriority:{id:"priority_types.top_priority",defaultMessage:"Top priority"}},Brt={linear:{id:"scoring_types.linear",defaultMessage:"Linear"},fibonacci:{id:"scoring_types.fibonacci",defaultMessage:"Fibonacci"},logarithmic:{id:"scoring_types.logarithmic",defaultMessage:"Logarithmic"}},cp={creative:.7,balanced:.5,precise:.3},uri=["chatbot","aiForm"],Uee={chatbot:{id:"project.project_type.chatbot.label",defaultMessage:"Chatbot"},aiForm:{id:"project.project_type.ai_form.label",defaultMessage:"AI Form"}},dri={chatbot:"red",aiForm:"blue"},F9={chatbot:{id:"project.project_type.chatbot.description",defaultMessage:"Designed to enhance both customer support and internal knowledge management through chat interactions."},aiForm:{id:"project.project_type.ai_form.description",defaultMessage:"Transforms forms into an interactive chat flow, with a single goal: to efficiently collect data from the customer while guiding and assisting them in completing the form."}},hri={"gpt-3.5-turbo":{total:16385,output:4096,input:12e3},"gpt-4-turbo-preview":{total:128e3,output:4096,input:122e3},"gpt-4":{total:8192,output:4096,input:4096},"gpt-4o-mini":{total:128e3,output:16384,input:11e4},"gpt-4o":{total:128e3,output:4096,input:122e3}};function hfe({children:t}){const e=Mt();return v.jsxDEV(kwt,{fallback:()=>v.jsxDEV(fd,{icon:v.jsxDEV(BS,{src:"/img/svg/error_fallback.svg",preview:!1,className:"mb-4",style:{height:"25vh"}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/ErrorBoundary.tsx",lineNumber:16,columnNumber:7},this),title:e.formatMessage({id:"app_shell.error_fallback.title",defaultMessage:"We're sorry, something went wrong",description:"Website crashed show error with fallback image"}),subTitle:e.formatMessage({id:"app_shell.error_fallback.description",defaultMessage:"It seems like you’ve found a bug in our software. Our developers are notified of this issue and will investigate it."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/ErrorBoundary.tsx",lineNumber:14,columnNumber:5},this),dialogOptions:{colorScheme:"light",themeLight:{submitBackground:yd,submitBackgroundHover:dfe}},children:t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/ErrorBoundary.tsx",lineNumber:12,columnNumber:3},this)}function nc(t,e){const n=Array.isArray(t)?t:[t],[i,r]=n,o=typeof i!="string"||i===""?[]:i.split(".");return!r&&(!e||e==="any")?o.length?[o]:[]:[o,{...typeof r<"u"&&{input:r},...e&&e!=="any"&&{type:e}}]}function uie(t,e){return t.length?e===void 0?[t]:[t,e]:[]}function fri(t,e){return Xde(n=>{const i=n.args,r=[t,...n.path],o=r.pop(),s=r.join(".");if(o==="useMutation")return e[o](s,...i);const[a,...l]=i,c=uie(s,a);if(o==="getQueryKey")return nc(c,l[0]??"any");if(o==="_def")return{path:r};if(o.startsWith("useSuspense")){const u=l[0]||{},h=e[o==="useSuspenseQuery"?"useQuery":"useInfiniteQuery"](c,{...u,suspense:!0,enabled:!0});return[h.data,h]}return e[o](c,...l)})}const mri=["client","ssrContext","ssrState","abortOnUnmount"],pri=b.createContext(null);function gri(t){return MFe(e=>{const n=e;return n==="client"?YRn(t.client):mri.includes(n)?t[n]:Xde(({path:i,args:r})=>{const o=[e,...i],s=o.pop(),a=o.join("."),l=f=>{if(["setData","setInfiniteData"].includes(f)){const[y,_,...w]=r;return{queryKey:uie(a,y),updater:_,rest:w}}const[m,...p]=r;return{queryKey:uie(a,m),rest:p}},{queryKey:c,rest:u,updater:d}=l(s);return{fetch:()=>t.fetchQuery(c,...u),fetchInfinite:()=>t.fetchInfiniteQuery(c,...u),prefetch:()=>t.prefetchQuery(c,...u),prefetchInfinite:()=>t.prefetchInfiniteQuery(c,...u),ensureData:()=>t.ensureQueryData(c,...u),invalidate:()=>t.invalidateQueries(c,...u),reset:()=>t.resetQueries(c,...u),refetch:()=>t.refetchQueries(c,...u),cancel:()=>t.cancelQuery(c,...u),setData:()=>{t.setQueryData(c,d,...u)},setInfiniteData:()=>{t.setInfiniteQueryData(c,d,...u)},getData:()=>t.getQueryData(c),getInfiniteData:()=>t.getInfiniteQueryData(c)}[s]()})})}function bri(t){return Xde(e=>{const n=e.path.join("."),[i,r]=e.args;return{queryKey:uie(n,i),queryFn:()=>t.query(n,i,r==null?void 0:r.trpc),...r}})}function RN(t,e){const[n,i]=t;return[n,i,e==null?void 0:e.trpc]}function uwe(t){const{path:e}=t;return b.useMemo(()=>({path:e}),[e])}function vri(t){var m,p;const e=((p=(m=(t==null?void 0:t.overrides)??(t==null?void 0:t.unstable_overrides))==null?void 0:m.useMutation)==null?void 0:p.onSuccess)??(g=>g.originalFn()),n=(t==null?void 0:t.context)??pri,i=t==null?void 0:t.reactQueryContext,r=g=>KRn(g),o=g=>{const{abortOnUnmount:y=!1,client:_,queryClient:w,ssrContext:C}=g,[N,E]=b.useState(g.ssrState??!1);return b.useEffect(()=>{E(D=>D?"mounted":!1)},[]),Z.createElement(n.Provider,{value:{abortOnUnmount:y,queryClient:w,client:_,ssrContext:C??null,ssrState:N,fetchQuery:b.useCallback((D,k)=>w.fetchQuery({...k,queryKey:nc(D,"query"),queryFn:()=>_.query(...RN(D,k))}),[_,w]),fetchInfiniteQuery:b.useCallback((D,k)=>w.fetchInfiniteQuery({...k,queryKey:nc(D,"infinite"),queryFn:({pageParam:M})=>{const[T,A]=D,R={...A,cursor:M};return _.query(...RN([T,R],k))}}),[_,w]),prefetchQuery:b.useCallback((D,k)=>w.prefetchQuery({...k,queryKey:nc(D,"query"),queryFn:()=>_.query(...RN(D,k))}),[_,w]),prefetchInfiniteQuery:b.useCallback((D,k)=>w.prefetchInfiniteQuery({...k,queryKey:nc(D,"infinite"),queryFn:({pageParam:M})=>{const[T,A]=D,R={...A,cursor:M};return _.query(...RN([T,R],k))}}),[_,w]),ensureQueryData:b.useCallback((D,k)=>w.ensureQueryData({...k,queryKey:nc(D,"query"),queryFn:()=>_.query(...RN(D,k))}),[_,w]),invalidateQueries:b.useCallback((D,k,M)=>w.invalidateQueries({...k,queryKey:nc(D,"any")},M),[w]),resetQueries:b.useCallback((...D)=>{const[k,M,T]=D;return w.resetQueries({...M,queryKey:nc(k,"any")},T)},[w]),refetchQueries:b.useCallback((...D)=>{const[k,M,T]=D;return w.refetchQueries({...M,queryKey:nc(k,"any")},T)},[w]),cancelQuery:b.useCallback(D=>w.cancelQueries({queryKey:nc(D,"any")}),[w]),setQueryData:b.useCallback((...D)=>{const[k,...M]=D;return w.setQueryData(nc(k,"query"),...M)},[w]),getQueryData:b.useCallback((...D)=>{const[k,...M]=D;return w.getQueryData(nc(k,"query"),...M)},[w]),setInfiniteQueryData:b.useCallback((...D)=>{const[k,...M]=D;return w.setQueryData(nc(k,"infinite"),...M)},[w]),getInfiniteQueryData:b.useCallback((...D)=>{const[k,...M]=D;return w.getQueryData(nc(k,"infinite"),...M)},[w])}},g.children)};function s(){return Z.useContext(n)}function a(g,y,_){var N;const{queryClient:w,ssrState:C}=s();return C&&C!=="mounted"&&((N=w.getQueryCache().find(nc(g,y)))==null?void 0:N.state.status)==="error"?{retryOnMount:!1,..._}:_}function l(g,y){var R,P;const _=s();if(!_)throw new Error("Unable to retrieve application context. Did you forget to wrap your App inside `withTRPC` HoC?");const{abortOnUnmount:w,client:C,ssrState:N,queryClient:E,prefetchQuery:D}=_,k=E.getQueryDefaults(nc(g,"query"));typeof window>"u"&&N==="prepass"&&((R=y==null?void 0:y.trpc)==null?void 0:R.ssr)!==!1&&((y==null?void 0:y.enabled)??(k==null?void 0:k.enabled))!==!1&&!E.getQueryCache().find(nc(g,"query"))&&D(g,y);const M=a(g,"query",{...k,...y}),T=((P=y==null?void 0:y.trpc)==null?void 0:P.abortOnUnmount)??(t==null?void 0:t.abortOnUnmount)??w,A=pRn({...M,queryKey:nc(g,"query"),queryFn:O=>{const V={...M,trpc:{...M==null?void 0:M.trpc,...T?{signal:O.signal}:{}}};return C.query(...RN(g,V))},context:i});return A.trpc=uwe({path:g[0]}),A}function c(g,y){const{client:_}=s(),w=Gde({context:i}),C=Array.isArray(g)?g[0]:g,N=w.getMutationDefaults([C.split(".")]),E=gRn({...y,mutationKey:[C.split(".")],mutationFn:D=>_.mutation(...RN([C,D],y)),context:i,onSuccess(...D){return e({originalFn:()=>{var M,T;return((M=y==null?void 0:y.onSuccess)==null?void 0:M.call(y,...D))??((T=N==null?void 0:N.onSuccess)==null?void 0:T.call(N,...D))},queryClient:w,meta:(y==null?void 0:y.meta)??(N==null?void 0:N.meta)??{}})}});return E.trpc=uwe({path:C}),E}/* istanbul ignore next -- @preserve */function u(g,y){const _=(y==null?void 0:y.enabled)??!0,w=PE(g),{client:C}=s(),N=b.useRef(y);N.current=y,b.useEffect(()=>{if(!_)return;const[E,D]=g;let k=!1;const M=C.subscription(E,D??void 0,{onStarted:()=>{var T,A;k||(A=(T=N.current).onStarted)==null||A.call(T)},onData:T=>{k||N.current.onData(T)},onError:T=>{var A,R;k||(R=(A=N.current).onError)==null||R.call(A,T)}});return()=>{k=!0,M.unsubscribe()}},[w,_])}function d(g,y){var P,O;const[_,w]=g,{client:C,ssrState:N,prefetchInfiniteQuery:E,queryClient:D,abortOnUnmount:k}=s(),M=D.getQueryDefaults(nc(g,"infinite"));typeof window>"u"&&N==="prepass"&&((P=y==null?void 0:y.trpc)==null?void 0:P.ssr)!==!1&&((y==null?void 0:y.enabled)??(M==null?void 0:M.enabled))!==!1&&!D.getQueryCache().find(nc(g,"infinite"))&&E(g,{...M,...y});const T=a(g,"infinite",{...M,...y}),A=((O=y==null?void 0:y.trpc)==null?void 0:O.abortOnUnmount)??k,R=vRn({...T,queryKey:nc(g,"infinite"),queryFn:V=>{const F={...T,trpc:{...T==null?void 0:T.trpc,...A?{signal:V.signal}:{}}},$={...w??{},cursor:V.pageParam??(y==null?void 0:y.initialCursor)};return C.query(...RN([_,$],F))},context:i});return R.trpc=uwe({path:_}),R}return{Provider:o,createClient:r,useContext:s,useUtils:s,useQuery:l,useQueries:(g,y)=>{var k;const{ssrState:_,queryClient:w,prefetchQuery:C,client:N}=s(),E=bri(N),D=g(E);if(typeof window>"u"&&_==="prepass")for(const M of D){const T=M;((k=T.trpc)==null?void 0:k.ssr)!==!1&&!w.getQueryCache().find(nc(T.queryKey,"query"))&&C(T.queryKey,T)}return mRn({queries:D.map(M=>({...M,queryKey:nc(M.queryKey,"query")})),context:y})},useMutation:c,useSubscription:u,useDehydratedState:(g,y)=>b.useMemo(()=>y&&g.runtime.transformer.deserialize(y),[y,g]),useInfiniteQuery:d}}function yri(t){return vri(t)}function _ri(t){return MFe(e=>e==="useContext"||e==="useUtils"?()=>{const n=t.useUtils();return b.useMemo(()=>gri(n),[n])}:t.hasOwnProperty(e)?t[e]:fri(e,t))}function xri(t){const e=yri(t);return _ri(e)}const Je=xri({});function iC({menu:t,children:e,organization:n,showOrganization:i,onOrganizationChange:r,onMenuClick:o}){const s=Mt(),a=Qr(),l=Je.useContext(),[c,u]=b.useState(!1),[d,h]=b.useState(""),{data:f,isLoading:m}=Je.getOrganizations.useQuery({offset:0,limit:5,q:d}),p=w=>{switch(w.key){case"profile":break;case"organizationsOverview":a("/account/organizations");break;case"logout":localStorage.clear(),a("/login");break;default:if(!o)break;o(w.key);break}},g=w=>{localStorage.setItem("organizationId",w),l.getOrganization.invalidate(),r&&r()},y=b.useMemo(()=>{const w=(f==null?void 0:f.data)||[];return n&&!w.find(C=>C._id===n._id)&&w.unshift(n),w.map(C=>({value:C._id,label:C.name}))},[n,f]),_=b.useMemo(()=>{if(!(!n||n.billing.type!=="trial"||!n.billing.trialEndDate))return new Date(n.billing.trialEndDate).toLocaleDateString(s.locale,{year:"numeric",month:"short",day:"numeric"})},[n]);return v.jsxDEV(Ps.Header,{className:"!bg-white shadow-md !px-4 flex justify-between gap-0 sm:gap-8 md:gap-16 items-center z-20",children:[v.jsxDEV("div",{className:"flex flex-row items-center gap-14",children:[v.jsxDEV(T0,{className:"w-24 sm:w-32",to:"/account/organizations",children:v.jsxDEV(BS,{src:"/img/svg/logo.svg",preview:!1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:86,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:85,columnNumber:5},this),v.jsxDEV("div",{className:"flex flex-row gap-4 items-center",children:i&&v.jsxDEV(Lo,{showSearch:!0,variant:"borderless",loading:m,value:n==null?void 0:n._id,popupMatchSelectWidth:!1,searchValue:d,onSelect:g,className:"min-w-[124px] max-w-fit !hidden sm:!block",onSearch:h,options:y,filterOption:(w,C)=>{var N,E;return!!(C!=null&&C.label)&&((E=(N=C.label)==null?void 0:N.toLowerCase())==null?void 0:E.includes(w.toLowerCase()))},notFoundContent:v.jsxDEV("div",{className:"text-center p-2",children:v.jsxDEV(Fn.Text,{type:"secondary",children:v.jsxDEV(ee,{id:"app_shell.header.select.not_found",defaultMessage:"No organizations found",description:"Fallback in organization picker when nothing is found"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:107,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:106,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:105,columnNumber:9},this),dropdownRender:w=>v.jsxDEV(v.Fragment,{children:[w,v.jsxDEV(ZD,{style:{margin:"8px 0"}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:118,columnNumber:10},this),v.jsxDEV(vn,{type:"text",className:"w-full",style:{textAlign:"left",paddingLeft:"12px"},onClick:()=>a("/account/organizations"),children:v.jsxDEV(ee,{id:"app_shell.header.select.option.go_to_overview",defaultMessage:"Organization overview",description:"Have option to go to organizations overview"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:125,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:119,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:116,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:90,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:88,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:84,columnNumber:4},this),v.jsxDEV("div",{className:"flex gap-2 shrink-0 wrap-0 items-center",children:[_&&v.jsxDEV(kv,{color:"blue",className:"max-h-fit md:!hidden !mr-0",children:v.jsxDEV(ee,{id:"app_shell.header.trail",defaultMessage:"Trial"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:140,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:139,columnNumber:6},this),e,v.jsxDEV(b6,{menu:{items:[{label:s.formatMessage({id:"app_shell.menu.organizations_overview.label",defaultMessage:"My organizations"}),key:"organizationsOverview"},...t||[],{type:"divider"},{label:s.formatMessage({id:"app_shell.menu.profile.logout",defaultMessage:"Log out"}),key:"logout",danger:!0}],onClick:p},onOpenChange:w=>u(w),open:c,arrow:!1,trigger:["click"],children:v.jsxDEV(vn,{icon:v.jsxDEV(f$e,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:189,columnNumber:20},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:189,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:144,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:137,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/header.tsx",lineNumber:83,columnNumber:3},this)}function mPt(){const[t,e]=b.useState({width:0,height:0});return b.useEffect(()=>{function n(){e({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},[]),t}function pPt(t,e){if(!t.length)return[];const n=t.slice(0,e),i=t.slice(e);return[n,...pPt(i,e)]}function P2(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function Xz(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function $$e(t,e){const n=P2(t);return isNaN(e)?Xz(t,NaN):(e&&n.setDate(n.getDate()+e),n)}function gPt(t,e){const n=P2(t);if(isNaN(e))return Xz(t,NaN);if(!e)return n;const i=n.getDate(),r=Xz(t,n.getTime());r.setMonth(n.getMonth()+e+1,0);const o=r.getDate();return i>=o?r:(n.setFullYear(r.getFullYear(),r.getMonth(),i),n)}function wri(t,e){const{years:n=0,months:i=0,weeks:r=0,days:o=0,hours:s=0,minutes:a=0,seconds:l=0}=e,c=P2(t),u=i||n?gPt(c,i+n*12):c,d=o||r?$$e(u,o+r*7):u,h=a+s*60,m=(l+h*60)*1e3;return Xz(t,d.getTime()+m)}const Cri=3600,Sri=60;function Nri(t){const e=P2(t);return e.setHours(0,0,0,0),e}function Eri(t){return e=>{const i=(t?Math[t]:Math.trunc)(e);return i===0?0:i}}function Dri(t,e){return+P2(t)-+P2(e)}function kri(t){const e=P2(t);return e.setHours(23,59,59,999),e}function Mri(t,e,n){const i=Dri(t,e)/1e3;return Eri(n==null?void 0:n.roundingMethod)(i)}function bPt(t,e){return $$e(t,-e)}function Lri(t){const e=t/Cri;return Math.trunc(e)}function Tri(t){const e=t/Sri;return Math.trunc(e)}function Iri(t,e){return gPt(t,-e)}function vPt(t,e){const{years:n=0,months:i=0,weeks:r=0,days:o=0,hours:s=0,minutes:a=0,seconds:l=0}=e,c=Iri(t,i+n*12),u=bPt(c,o+r*7),d=a+s*60,f=(l+d*60)*1e3;return Xz(t,u.getTime()-f)}function w6(t){const e=new Date,n=t.getDate()-e.getDate();return n===0||(e.setDate(t.getDate()),n<0)?e:vPt(e,{months:1})}function cq(t){const e=ffe(t);return vPt(e,{days:1})}function ffe(t){const e=w6(t);return wri(e,{months:1})}function yPt({date:t,alwaysIncludeTime:e=!1}){const n=new Date(t),i=new Date,r=n.toISOString().slice(0,10)===i.toISOString().slice(0,10),o=Math.abs(i.getTime()-n.getTime())<=7*24*60*60*1e3,s={...r?{timeStyle:"short"}:o?{dateStyle:"short",timeStyle:"short"}:e?{dateStyle:"short",timeStyle:"short"}:{dateStyle:"short"}};return new Intl.DateTimeFormat("en-GB",s).format(n)}const Ari=t=>t<60?{value:t,unit:"second"}:t<3600?{value:Tri(t),unit:"minute"}:{value:Lri(t),unit:"hour"},_Pt=Xmn({colorScheme:"light",autoInject:!1,showEmail:!1,isEmailRequired:!1,showName:!1,isNameRequired:!1,themeLight:{submitBackground:yd,submitBackgroundHover:dfe}});class zrt extends Error{constructor({code:n,message:i}){super(i);HX(this,"code");this.code=n}}function Rri(t){if(!sri.includes(t.type))throw new zrt({code:"FILE_TYPE",message:"invalid file type"});if(!(t.size/1024/1024<5))throw new zrt({code:"FILE_SIZE",message:"invalid file size"});return!0}function xPt(t,e){const n=new FileReader;n.addEventListener("load",()=>e(n.result)),n.readAsDataURL(t)}async function die({file:t,action:e,onSuccess:n,onError:i}){const r=new XMLHttpRequest,o=t;return r.open("PUT",e,!0),r.setRequestHeader("Content-Type",o.type),r.send(o),r.onreadystatechange=()=>{if(r.readyState===4){if(r.status===200&&n){n({status:"success"},r);return}i&&i(new Error("Upload failed"))}},{abort(){r.abort()}}}function V$e({file:t,fileName:e,format:n}){const i=new Blob(["\uFEFF",t]),r={csv:"csv",json:"json"},o=window.URL.createObjectURL(i),s=document.createElement("a");s.href=o,s.setAttribute("download",`${e}.${r[n]}`),s.setAttribute("charset","utf-16"),document.body.appendChild(s),s.click(),document.contains(s)&&document.body.removeChild(s)}function Pri(t){return new Promise((e,n)=>{const i=new FileReader;i.addEventListener("load",()=>{if(!i.result)return n();e({name:t.name,type:t.type,data:i.result})},!0),i.readAsDataURL(t)})}function O2({intl:t,error:e}){var n,i,r;return(i=(n=e.data)==null?void 0:n.stack)!=null&&i.includes("Limit")?In.show({color:"red",autoClose:!1,message:t.formatMessage({id:"training.error.training_tokens_reached",defaultMessage:"The text document is too large and has surpassed your total allowed training characters. Consider upgrading to a higher tier to accommodate more training characters.",description:"Training text is to large and reached the total allowed training tokens"})}):`${(r=e==null?void 0:e.data)==null?void 0:r.stack}`.includes("fair use limit hit")?In.show({color:"red",autoClose:!1,message:t.formatMessage({id:"training.error.fair_use_policy_hit",defaultMessage:"You've reached our fair use limit. Contact our support or upgrade your billing to train more documents.",description:"Show error user has hit our fair use limit, they trained more then 2 times their allowed trainings tokens this month"})}):In.show({color:"red",message:t.formatMessage({id:"training.error.error",defaultMessage:"Something went wrong while training your chatbot. Please try again later."})})}function B$e({firstName:t,lastName:e,email:n}){return!t&&!e?n:[t,e].join(" ").trim()}const mfe=t=>t;function Ori({organization:t}){const e=Qr(),n=Mt();if(t.billing.type!=="trial"||!t.billing.trialEndDate)return null;const i=new Date(t.billing.trialEndDate).toLocaleDateString(n.locale,{year:"numeric",month:"short",day:"numeric"});return v.jsxDEV(pl,{type:"info",className:"flex-col gap-2 items-start [&>.ant-alert-action]:w-full",message:n.formatMessage({id:"app_shell.trial_banner.message",defaultMessage:"You are currently using Chathive in trial mode until {endOfTrialDate}. To continue enjoying all of Chathive's features, consider upgrading.",description:"Show user they are in a trial"},{endOfTrialDate:i}),action:v.jsxDEV(vn,{type:"primary",size:"small",block:!0,onClick:()=>e("/billing"),children:v.jsxDEV(ee,{id:"general.upgrade.submit",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/trialBanner.tsx",lineNumber:33,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/trialBanner.tsx",lineNumber:32,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/trialBanner.tsx",lineNumber:19,columnNumber:3},this)}function pfe({menu:t,organization:e,selectionMenu:n,defaultSelectedKeys:i,defaultOpenKeys:r,onMenuClick:o}){const s=Gp(),a=mPt(),l=b.useMemo(()=>{const p=s.pathname.split("/");return p[2]||p[1]},[s.pathname]),c=b.useMemo(()=>{const p=s.pathname.split("/");return p[3]||p[2]},[s.pathname]),u=b.useRef(!1),d=a.width<ari.mobileNav,h=(t==null?void 0:t.map(p=>!p||!("children"in p)||d?p:{...p,children:void 0}))??[],f=t==null?void 0:t.find(p=>(p==null?void 0:p.key)===l),{data:m}=Je.getReseller.useQuery(void 0);return b.useLayoutEffect(()=>{const p=document.querySelector("#reportBug");!p||u.current||(u.current=!0,_Pt.attachTo(p))},[]),v.jsxDEV("div",{className:"flex flex-row fixed sm:relative sm:top-0 z-10 bg-white ",children:[v.jsxDEV(Ps.Sider,{className:Vt("flex flex-row !bg-white shadow-md z-10 w-72 min-h-[calc(100svh-48px)]","[&>.ant-layout-sider-children]:w-full"),breakpoint:"md",collapsedWidth:"0",zeroWidthTriggerStyle:{background:yd,top:"0rem",width:"2rem",height:"2rem",insetInlineEnd:"-2rem"},children:v.jsxDEV("div",{className:"flex flex-col justify-between w-full h-full pt-4",children:[v.jsxDEV("div",{className:"w-full",children:[n,v.jsxDEV(sS,{mode:"inline",items:h,inlineIndent:16,defaultOpenKeys:r,style:{borderInlineEnd:"none"},defaultSelectedKeys:i,onClick:({keyPath:p})=>o(p.reverse().join("/")),selectedKeys:l?[l,c]:[],className:"mt-4 [&>.ant-menu-item]:!px-1 [&>.ant-menu-submenu>.ant-menu-submenu-title]:!px-1"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/navigation.tsx",lineNumber:87,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/navigation.tsx",lineNumber:85,columnNumber:6},this),v.jsxDEV("div",{className:"p-2 flex flex-col gap-2",children:[e&&v.jsxDEV(Ori,{organization:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/navigation.tsx",lineNumber:102,columnNumber:24},this),v.jsxDEV(vn,{id:"reportBug",type:"default",icon:v.jsxDEV(V2t,{className:"mr-2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/navigation.tsx",lineNumber:106,columnNumber:14},this),className:"w-full !justify-start",children:v.jsxDEV(ee,{id:"app_shell.navigation.report_bug",defaultMessage:"Report a bug"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/navigation.tsx",lineNumber:109,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/navigation.tsx",lineNumber:103,columnNumber:7},this),v.jsxDEV(vn,{icon:v.jsxDEV(Bhe,{className:"mr-2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/navigation.tsx",lineNumber:112,columnNumber:14},this),type:"default",className:"w-full !justify-start",href:`mailto:${(m==null?void 0:m.email)||"support@chathive.co"}`,children:v.jsxDEV(ee,{id:"app_shell.navigation.contact_support",defaultMessage:"Customer support"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/navigation.tsx",lineNumber:117,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/navigation.tsx",lineNumber:111,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/navigation.tsx",lineNumber:101,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/navigation.tsx",lineNumber:84,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/navigation.tsx",lineNumber:69,columnNumber:4},this),!d&&f&&"children"in f&&f.children&&v.jsxDEV("div",{className:"pt-3 px-2 bg-white",children:v.jsxDEV(sS,{inlineIndent:16,items:f.children,style:{borderInlineEnd:"none"},selectedKeys:c?[c]:[],onClick:({key:p})=>o(`${f.key}/${p}`),className:"mt-4"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/navigation.tsx",lineNumber:127,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/navigation.tsx",lineNumber:126,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/navigation.tsx",lineNumber:68,columnNumber:3},this)}function jri(t){if(!t.length)return"";if(t.length===1)return t[0];const e=Math.floor(Math.random()*t.length);return t[e]}function Fri({array:t,from:e,to:n}){const i=[...t],r=i[e];return i.splice(e,1),i.splice(n,0,r),i}function gfe({days:t,to:e}){return $$e(new Date(e),t)}function wPt({from:t,by:e}){return bPt(new Date(t),e)}function bfe(t,e){const n=e?Date.parse(e):Date.now();return Math.floor((n-Date.parse(t))/864e5)}function $ri(t){return`${t.getFullYear()}-${t.getMonth()+1}-${t.getDate()}`}function RV(t){return t.toString().padStart(2,"0")}function CPt(t){const e=Math.floor(t%1e3);let n=Math.floor(t/1e3);const i=n%60;let r=Math.floor(n/60);const o=r%60;let s=Math.floor(r/60);const a=s%24,l=Math.floor(s/24);let c=[];return l&&c.push(`${RV(l)}d`),(a||c.length)&&c.push(`${RV(a)}h`),(o||c.length)&&c.push(`${RV(o)}min`),i&&(!c.length||c.length<3)&&c.push(`${RV(i)}s`),e&&(!c.length||c.length<3)&&c.push(`${RV(e)}ms`),c.join(" ").trim()}function SPt(t=1500){return new Promise(e=>setTimeout(()=>e(!0),t))}let dwe;function KA(t,e=1e3){clearTimeout(dwe),dwe=setTimeout(()=>{t(),clearTimeout(dwe)},e)}function Vri({length:t}={length:24}){const e="abcdefghijklmonpqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_";let n="";for(let i=0;i<t;i++)n+=jri(e);return n}function z$e({length:t}={length:20}){return`${Date.now().toString(16)}${Vri({length:t})}`}function hie({max:t,min:e}){return Math.floor(Math.random()*(t+1-e))+e}var Bri="Expected a function",NPt="__lodash_hash_undefined__",EPt=1/0,zri="[object Function]",Hri="[object GeneratorFunction]",Wri="[object Symbol]",Uri=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kri=/^\w*$/,qri=/^\./,Gri=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yri=/[\\^$.*+?()[\]{}|]/g,Xri=/\\(\\)?/g,Zri=/^\[object .+?Constructor\]$/,Qri=typeof Bl=="object"&&Bl&&Bl.Object===Object&&Bl,Jri=typeof self=="object"&&self&&self.Object===Object&&self,H$e=Qri||Jri||Function("return this")();function eoi(t,e){return t==null?void 0:t[e]}function toi(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var noi=Array.prototype,ioi=Function.prototype,DPt=Object.prototype,hwe=H$e["__core-js_shared__"],Hrt=function(){var t=/[^.]+$/.exec(hwe&&hwe.keys&&hwe.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),kPt=ioi.toString,W$e=DPt.hasOwnProperty,MPt=DPt.toString,roi=RegExp("^"+kPt.call(W$e).replace(Yri,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wrt=H$e.Symbol,ooi=noi.splice,soi=LPt(H$e,"Map"),Zz=LPt(Object,"create"),Urt=Wrt?Wrt.prototype:void 0,Krt=Urt?Urt.toString:void 0;function j2(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function aoi(){this.__data__=Zz?Zz(null):{}}function loi(t){return this.has(t)&&delete this.__data__[t]}function coi(t){var e=this.__data__;if(Zz){var n=e[t];return n===NPt?void 0:n}return W$e.call(e,t)?e[t]:void 0}function uoi(t){var e=this.__data__;return Zz?e[t]!==void 0:W$e.call(e,t)}function doi(t,e){var n=this.__data__;return n[t]=Zz&&e===void 0?NPt:e,this}j2.prototype.clear=aoi;j2.prototype.delete=loi;j2.prototype.get=coi;j2.prototype.has=uoi;j2.prototype.set=doi;function C6(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function hoi(){this.__data__=[]}function foi(t){var e=this.__data__,n=vfe(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():ooi.call(e,n,1),!0}function moi(t){var e=this.__data__,n=vfe(e,t);return n<0?void 0:e[n][1]}function poi(t){return vfe(this.__data__,t)>-1}function goi(t,e){var n=this.__data__,i=vfe(n,t);return i<0?n.push([t,e]):n[i][1]=e,this}C6.prototype.clear=hoi;C6.prototype.delete=foi;C6.prototype.get=moi;C6.prototype.has=poi;C6.prototype.set=goi;function qA(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function boi(){this.__data__={hash:new j2,map:new(soi||C6),string:new j2}}function voi(t){return yfe(this,t).delete(t)}function yoi(t){return yfe(this,t).get(t)}function _oi(t){return yfe(this,t).has(t)}function xoi(t,e){return yfe(this,t).set(t,e),this}qA.prototype.clear=boi;qA.prototype.delete=voi;qA.prototype.get=yoi;qA.prototype.has=_oi;qA.prototype.set=xoi;function vfe(t,e){for(var n=t.length;n--;)if(Ioi(t[n][0],e))return n;return-1}function woi(t,e){e=Eoi(e,t)?[e]:Noi(e);for(var n=0,i=e.length;t!=null&&n<i;)t=t[Loi(e[n++])];return n&&n==i?t:void 0}function Coi(t){if(!IPt(t)||koi(t))return!1;var e=Aoi(t)||toi(t)?roi:Zri;return e.test(Toi(t))}function Soi(t){if(typeof t=="string")return t;if(K$e(t))return Krt?Krt.call(t):"";var e=t+"";return e=="0"&&1/t==-EPt?"-0":e}function Noi(t){return TPt(t)?t:Moi(t)}function yfe(t,e){var n=t.__data__;return Doi(e)?n[typeof e=="string"?"string":"hash"]:n.map}function LPt(t,e){var n=eoi(t,e);return Coi(n)?n:void 0}function Eoi(t,e){if(TPt(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||K$e(t)?!0:Kri.test(t)||!Uri.test(t)||e!=null&&t in Object(e)}function Doi(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function koi(t){return!!Hrt&&Hrt in t}var Moi=U$e(function(t){t=Poi(t);var e=[];return qri.test(t)&&e.push(""),t.replace(Gri,function(n,i,r,o){e.push(r?o.replace(Xri,"$1"):i||n)}),e});function Loi(t){if(typeof t=="string"||K$e(t))return t;var e=t+"";return e=="0"&&1/t==-EPt?"-0":e}function Toi(t){if(t!=null){try{return kPt.call(t)}catch{}try{return t+""}catch{}}return""}function U$e(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(Bri);var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=t.apply(this,i);return n.cache=o.set(r,s),s};return n.cache=new(U$e.Cache||qA),n}U$e.Cache=qA;function Ioi(t,e){return t===e||t!==t&&e!==e}var TPt=Array.isArray;function Aoi(t){var e=IPt(t)?MPt.call(t):"";return e==zri||e==Hri}function IPt(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Roi(t){return!!t&&typeof t=="object"}function K$e(t){return typeof t=="symbol"||Roi(t)&&MPt.call(t)==Wri}function Poi(t){return t==null?"":Soi(t)}function Ooi(t,e,n){var i=t==null?void 0:woi(t,e);return i===void 0?n:i}var joi=Ooi;const APt=ao(joi);new Proxy({},{get(t,e){throw new Error(`Module "crypto" has been externalized for browser compatibility. Cannot access "crypto.${e}" in client code.  See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`)}});function zp(t){return!t||t===""||t===" "}function Mp(t){return t!=null&&t.length?t.charAt(0).toUpperCase()+t.slice(1):""}function Xj({string:t,payload:e}){return e?t==null?void 0:t.replace(/{{([a-zA-Z0-9\-\_\.[\]]*)}}/g,(n,i)=>APt(e,i,n)):t}var Foi={attributes:!0,characterData:!0,subtree:!0,childList:!0};function $oi(t,e,n=Foi){b.useEffect(()=>{if(t.current){const i=new MutationObserver(e);return i.observe(t.current,n),()=>{i.disconnect()}}},[e,n])}var Voi=({mutationObservables:t,resizeObservables:e,refresh:n})=>{const[i,r]=b.useState(0),o=b.useRef(document.documentElement||document.body);function s(l){const c=Array.from(l);for(const u of c)if(t){if(!u.attributes)continue;t.find(h=>u.matches(h))&&n(!0)}}function a(l){const c=Array.from(l);for(const u of c)if(e){if(!u.attributes)continue;e.find(h=>u.matches(h))&&r(i+1)}}return $oi(o,l=>{for(const c of l)c.addedNodes.length!==0&&(s(c.addedNodes),a(c.addedNodes)),c.removedNodes.length!==0&&(s(c.removedNodes),a(c.removedNodes))},{childList:!0,subtree:!0}),b.useEffect(()=>{if(!e)return;const l=new TDt(()=>{n()});for(const c of e){const u=document.querySelector(c);u&&l.observe(u)}return()=>{l.disconnect()}},[e,i]),null},Boi=Voi;function Kee(t){let e=RPt;return t&&(e=t.getBoundingClientRect()),e}function zoi(t,e){const[n,i]=b.useState(RPt),r=b.useCallback(()=>{t!=null&&t.current&&i(Kee(t==null?void 0:t.current))},[t==null?void 0:t.current]);return b.useEffect(()=>(r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)),[t==null?void 0:t.current,e]),n}var RPt={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0};function Hoi(t,e){return new Promise(n=>{if(!(t instanceof Element))throw new TypeError("Argument 1 must be an Element");let i=0,r=null;const o=Object.assign({behavior:"smooth"},e);t.scrollIntoView(o),requestAnimationFrame(s);function s(){const a=t==null?void 0:t.getBoundingClientRect().top;if(a===r){if(i++>2)return n(null)}else i=0,r=a;requestAnimationFrame(s)}})}function tQ(t){return t<0?0:t}function Woi(t){return typeof t=="object"&&t!==null?{thresholdX:t.x||0,thresholdY:t.y||0}:{thresholdX:t||0,thresholdY:t||0}}function _fe(){const t=Math.max(document.documentElement.clientWidth,window.innerWidth||0),e=Math.max(document.documentElement.clientHeight,window.innerHeight||0);return{w:t,h:e}}function Uoi({top:t,right:e,bottom:n,left:i,threshold:r}){const{w:o,h:s}=_fe(),{thresholdX:a,thresholdY:l}=Woi(r);return t<0&&n-t>s?!0:t>=0+l&&i>=0+a&&n<=s-l&&e<=o-a}var qrt=(t,e)=>t>e,Grt=(t,e)=>t>e;function Koi(t,e=[]){const n=(i,r)=>e.includes(i)?1:e.includes(r)?-1:0;return Object.keys(t).map(i=>({position:i,value:t[i]})).sort((i,r)=>r.value-i.value).sort((i,r)=>n(i.position,r.position)).filter(i=>i.value>0).map(i=>i.position)}var fwe=10;function Qke(t=fwe){return Array.isArray(t)?t.length===1?[t[0],t[0],t[0],t[0]]:t.length===2?[t[1],t[0],t[1],t[0]]:t.length===3?[t[0],t[1],t[2],t[1]]:t.length>3?[t[0],t[1],t[2],t[3]]:[fwe,fwe]:[t,t,t,t]}var qoi={maskWrapper:()=>({opacity:.7,left:0,top:0,position:"fixed",zIndex:99999,pointerEvents:"none",color:"#000"}),svgWrapper:({windowWidth:t,windowHeight:e,wpt:n,wpl:i})=>({width:t,height:e,left:Number(i),top:Number(n),position:"fixed"}),maskArea:({x:t,y:e,width:n,height:i})=>({x:t,y:e,width:n,height:i,fill:"black",rx:0}),maskRect:({windowWidth:t,windowHeight:e,maskID:n})=>({x:0,y:0,width:t,height:e,fill:"currentColor",mask:`url(#${n})`}),clickArea:({windowWidth:t,windowHeight:e,clipID:n})=>({x:0,y:0,width:t,height:e,fill:"currentcolor",pointerEvents:"auto",clipPath:`url(#${n})`}),highlightedArea:({x:t,y:e,width:n,height:i})=>({x:t,y:e,width:n,height:i,pointerEvents:"auto",fill:"transparent",display:"none"})};function Goi(t){return(e,n)=>{const i=qoi[e](n),r=t[e];return r?r(i,n):i}}var Yoi=({padding:t=10,wrapperPadding:e=0,onClick:n,onClickHighlighted:i,styles:r={},sizes:o,className:s,highlightedAreaClassName:a,maskId:l,clipId:c})=>{const u=l||Yrt("mask__"),d=c||Yrt("clip__"),h=Goi(r),[f,m,p,g]=Qke(t),[y,_,w,C]=Qke(e),{w:N,h:E}=_fe(),D=tQ((o==null?void 0:o.width)+g+m),k=tQ((o==null?void 0:o.height)+f+p),M=tQ((o==null?void 0:o.top)-f-y),T=tQ((o==null?void 0:o.left)-g-C),A=N-C-_,R=E-y-w,P=h("maskArea",{x:T,y:M,width:D,height:k}),O=h("highlightedArea",{x:T,y:M,width:D,height:k});return Z.createElement("div",{style:h("maskWrapper",{}),onClick:n,className:s},Z.createElement("svg",{width:A,height:R,xmlns:"http://www.w3.org/2000/svg",style:h("svgWrapper",{windowWidth:A,windowHeight:R,wpt:y,wpl:C})},Z.createElement("defs",null,Z.createElement("mask",{id:u},Z.createElement("rect",{x:0,y:0,width:A,height:R,fill:"white"}),Z.createElement("rect",{style:P,rx:P.rx?1:void 0})),Z.createElement("clipPath",{id:d},Z.createElement("polygon",{points:`0 0, 0 ${R}, ${T} ${R}, ${T} ${M}, ${T+D} ${M}, ${T+D} ${M+k}, ${T} ${M+k}, ${T} ${R}, ${A} ${R}, ${A} 0`}))),Z.createElement("rect",{style:h("maskRect",{windowWidth:A,windowHeight:R,maskID:u})}),Z.createElement("rect",{style:h("clickArea",{windowWidth:A,windowHeight:R,top:M,left:T,width:D,height:k,clipID:d})}),Z.createElement("rect",{style:O,className:a,onClick:i,rx:O.rx?1:void 0})))},Xoi=Yoi;function Yrt(t){return t+Math.random().toString(36).substring(2,16)}var Zoi=Object.defineProperty,fie=Object.getOwnPropertySymbols,PPt=Object.prototype.hasOwnProperty,OPt=Object.prototype.propertyIsEnumerable,Xrt=(t,e,n)=>e in t?Zoi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Zrt=(t,e)=>{for(var n in e||(e={}))PPt.call(e,n)&&Xrt(t,n,e[n]);if(fie)for(var n of fie(e))OPt.call(e,n)&&Xrt(t,n,e[n]);return t},Qoi=(t,e)=>{var n={};for(var i in t)PPt.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&fie)for(var i of fie(t))e.indexOf(i)<0&&OPt.call(t,i)&&(n[i]=t[i]);return n},Joi={popover:()=>({position:"fixed",maxWidth:353,backgroundColor:"#fff",padding:"24px 30px",boxShadow:"0 0.5em 3em rgba(0, 0, 0, 0.3)",color:"inherit",zIndex:1e5,transition:"transform 0.3s",top:0,left:0})};function esi(t){return(e,n)=>{const i=Joi[e](n),r=t[e];return r?r(i,n):i}}var tsi=t=>{var e=t,{children:n,position:i="bottom",padding:r=10,styles:o={},sizes:s,refresher:a}=e,l=Qoi(e,["children","position","padding","styles","sizes","refresher"]);const c=b.useRef(null),u=b.useRef(""),d=b.useRef(""),h=b.useRef(""),{w:f,h:m}=_fe(),p=esi(o),g=zoi(c,a),{width:y,height:_}=g,[w,C,N,E]=Qke(r),D=(s==null?void 0:s.left)-E,k=(s==null?void 0:s.top)-w,M=(s==null?void 0:s.right)+C,T=(s==null?void 0:s.bottom)+N,A=i&&typeof i=="function"?i({width:y,height:_,windowWidth:f,windowHeight:m,top:k,left:D,right:M,bottom:T,x:s.x,y:s.y},g):i,R={left:D,right:f-M,top:k,bottom:m-T},P=($,B,z)=>{switch($){case"top":return R.top>_+N;case"right":return B?!1:R.right>y+E;case"bottom":return z?!1:R.bottom>_+w;case"left":return R.left>y+C;default:return!1}},O=($,B,z)=>{const H=Koi(R,z?["right","left"]:B?["top","bottom"]:[]);for(let K=0;K<H.length;K++)if(P(H[K],B,z))return u.current=H[K],$[H[K]];return u.current="center",$.center},F=($=>{if(Array.isArray($)){const U=qrt($[0],f),Y=Grt($[1],m);return u.current="custom",[U?f/2-y/2:$[0],Y?m/2-_/2:$[1]]}const B=qrt(D+y,f),z=Grt(T+_,m),H=B?Math.min(D,f-y):Math.max(D,0),K=z?_>R.bottom?Math.max(T-_,0):Math.max(k,0):k;z&&_>R.bottom?d.current="bottom":d.current="top",B?h.current="left":h.current="right";const q={top:[H-E,k-_-N],right:[M+E,K-w],bottom:[H-E,T+w],left:[D-y-C,K-w],center:[f/2-y/2,m/2-_/2]};return $==="center"||P($,B,z)&&!B&&!z?(u.current=$,q[$]):O(q,B,z)})(A);return Z.createElement("div",Zrt({className:"reactour__popover",style:Zrt({transform:`translate(${Math.round(F[0])}px, ${Math.round(F[1])}px)`},p("popover",{position:u.current,verticalAlign:d.current,horizontalAlign:h.current,helperRect:g,targetRect:s})),ref:c},l),n)},nsi=tsi,isi=Object.defineProperty,rsi=Object.defineProperties,osi=Object.getOwnPropertyDescriptors,mie=Object.getOwnPropertySymbols,jPt=Object.prototype.hasOwnProperty,FPt=Object.prototype.propertyIsEnumerable,Qrt=(t,e,n)=>e in t?isi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,hf=(t,e)=>{for(var n in e||(e={}))jPt.call(e,n)&&Qrt(t,n,e[n]);if(mie)for(var n of mie(e))FPt.call(e,n)&&Qrt(t,n,e[n]);return t},q$e=(t,e)=>rsi(t,osi(e)),Qz=(t,e)=>{var n={};for(var i in t)jPt.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&mie)for(var i of mie(t))e.indexOf(i)<0&&FPt.call(t,i)&&(n[i]=t[i]);return n},ssi={bottom:0,height:0,left:0,right:0,top:0,width:0,windowWidth:0,windowHeight:0,x:0,y:0};function asi(t,e={block:"center",behavior:"smooth",inViewThreshold:0}){const[n,i]=b.useState(!1),[r,o]=b.useState(!1),[s,a]=b.useState(!1),[l,c]=b.useState(null),[u,d]=b.useState(ssi),h=(t==null?void 0:t.selector)instanceof Element?t==null?void 0:t.selector:document.querySelector(t==null?void 0:t.selector),f=b.useCallback(()=>{const p=Jrt(h,t==null?void 0:t.highlightedSelectors,t==null?void 0:t.bypassElem),g=Qz(p,["hasHighligtedElems"]);Object.entries(u).some(([y,_])=>g[y]!==_)&&d(g)},[h,t==null?void 0:t.highlightedSelectors,u]);b.useEffect(()=>(f(),window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)),[h,t==null?void 0:t.highlightedSelectors,l]),b.useEffect(()=>{!Uoi(q$e(hf({},u),{threshold:e.inViewThreshold}))&&h&&(i(!0),Hoi(h,e).then(()=>{r||c(Date.now())}).finally(()=>{i(!1)}))},[u]);const m=b.useCallback(()=>{o(!0);const p=Jrt(h,t==null?void 0:t.highlightedSelectors,t==null?void 0:t.bypassElem),{hasHighligtedElems:g}=p,y=Qz(p,["hasHighligtedElems"]);a(g),d(y),o(!1)},[h,t==null?void 0:t.highlightedSelectors,u]);return{sizes:u,transition:n,target:h,observableRefresher:m,isHighlightingObserved:s}}function Jrt(t,e=[],n=!0){let i=!1;const{w:r,h:o}=_fe();if(!e)return q$e(hf({},Kee(t)),{windowWidth:r,windowHeight:o,hasHighligtedElems:!1});let s=Kee(t),a={bottom:0,height:0,left:r,right:0,top:o,width:0};for(const c of e){const u=document.querySelector(c);if(!u||u.style.display==="none"||u.style.visibility==="hidden")continue;const d=Kee(u);i=!0,n||!t?(d.top<a.top&&(a.top=d.top),d.right>a.right&&(a.right=d.right),d.bottom>a.bottom&&(a.bottom=d.bottom),d.left<a.left&&(a.left=d.left),a.width=a.right-a.left,a.height=a.bottom-a.top):(d.top<s.top&&(s.top=d.top),d.right>s.right&&(s.right=d.right),d.bottom>s.bottom&&(s.bottom=d.bottom),d.left<s.left&&(s.left=d.left),s.width=s.right-s.left,s.height=s.bottom-s.top)}const l=n||!t?a.width>0&&a.height>0:!1;return{left:(l?a:s).left,top:(l?a:s).top,right:(l?a:s).right,bottom:(l?a:s).bottom,width:(l?a:s).width,height:(l?a:s).height,windowWidth:r,windowHeight:o,hasHighligtedElems:i,x:s.x,y:s.y}}var lsi=({disableKeyboardNavigation:t,setCurrentStep:e,currentStep:n,setIsOpen:i,stepsLength:r,disable:o,rtl:s,clickProps:a,keyboardHandler:l})=>{function c(u){if(u.stopPropagation(),t===!0||o)return;let d,h,f;t&&(d=t.includes("esc"),h=t.includes("right"),f=t.includes("left"));function m(){e(Math.min(n+1,r-1))}function p(){e(Math.max(n-1,0))}l&&typeof l=="function"?l(u,a,{isEscDisabled:d,isRightDisabled:h,isLeftDisabled:f}):(u.keyCode===27&&!d&&(u.preventDefault(),i(!1)),u.keyCode===39&&!h&&(u.preventDefault(),s?p():m()),u.keyCode===37&&!f&&(u.preventDefault(),s?m():p()))}return b.useEffect(()=>(window.addEventListener("keydown",c,!1),()=>{window.removeEventListener("keydown",c)}),[o,e,n]),null},csi=lsi,usi={badge:()=>({position:"absolute",fontFamily:"monospace",background:"var(--reactour-accent,#007aff)",height:"1.875em",lineHeight:2,paddingLeft:"0.8125em",paddingRight:"0.8125em",fontSize:"1em",borderRadius:"1.625em",color:"white",textAlign:"center",boxShadow:"0 0.25em 0.5em rgba(0, 0, 0, 0.3)",top:"-0.8125em",left:"-0.8125em"}),controls:()=>({display:"flex",marginTop:24,alignItems:"center",justifyContent:"space-between"}),navigation:()=>({counterReset:"dot",display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"}),button:({disabled:t})=>({display:"block",padding:0,border:0,background:"none",cursor:t?"not-allowed":"pointer"}),arrow:({disabled:t})=>({color:t?"#caccce":"#646464",width:16,height:12,flex:"0 0 16px"}),dot:({current:t,disabled:e,showNumber:n})=>({counterIncrement:"dot",width:8,height:8,border:t?"0":"1px solid #caccce",borderRadius:"100%",padding:0,display:"block",margin:4,transition:"opacity 0.3s, transform 0.3s",cursor:e?"not-allowed":"pointer",transform:`scale(${t?1.25:1})`,color:t?"var(--reactour-accent, #007aff)":"#caccce",background:t?"var(--reactour-accent, #007aff)":"none"}),close:({disabled:t})=>({position:"absolute",top:22,right:22,width:9,height:9,"--rt-close-btn":t?"#caccce":"#5e5e5e","--rt-close-btn-disabled":t?"#caccce":"#000"}),svg:()=>({display:"block"})};function xfe(t){return(e,n)=>{const i=usi[e](n),r=t[e];return r?r(i,n):i}}var dsi=({styles:t={},children:e})=>{const n=xfe(t);return Z.createElement("span",{style:n("badge",{})},e)},hsi=dsi,fsi=t=>{var e=t,{styles:n={},onClick:i,disabled:r}=e,o=Qz(e,["styles","onClick","disabled"]);const s=xfe(n);return Z.createElement("button",hf({className:"reactour__close-button",style:hf(hf({},s("button",{})),s("close",{disabled:r})),onClick:i},o),Z.createElement("svg",{viewBox:"0 0 9.1 9.1","aria-hidden":!0,role:"presentation",style:hf({},s("svg",{}))},Z.createElement("path",{fill:"currentColor",d:"M5.9 4.5l2.8-2.8c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L4.5 3.1 1.7.3C1.3-.1.7-.1.3.3c-.4.4-.4 1 0 1.4l2.8 2.8L.3 7.4c-.4.4-.4 1 0 1.4.2.2.4.3.7.3s.5-.1.7-.3L4.5 6l2.8 2.8c.3.2.5.3.8.3s.5-.1.7-.3c.4-.4.4-1 0-1.4L5.9 4.5z"})))},msi=fsi,psi=({content:t,setCurrentStep:e,transition:n,isHighlightingObserved:i,currentStep:r,setIsOpen:o})=>typeof t=="function"?t({setCurrentStep:e,transition:n,isHighlightingObserved:i,currentStep:r,setIsOpen:o}):t,gsi=psi,bsi=({styles:t={},steps:e,setCurrentStep:n,currentStep:i,setIsOpen:r,nextButton:o,prevButton:s,disableDots:a,hideDots:l,hideButtons:c,disableAll:u,rtl:d,Arrow:h=$Pt})=>{const f=e.length,m=xfe(t),p=({onClick:g,kind:y="next",children:_,hideArrow:w})=>{function C(){u||(g&&typeof g=="function"?g():n(y==="next"?Math.min(i+1,f-1):Math.max(i-1,0)))}return Z.createElement("button",{style:m("button",{kind:y,disabled:u||(y==="next"?f-1===i:i===0)}),onClick:C,"aria-label":`Go to ${y} step`},w?null:Z.createElement(h,{styles:t,inverted:d?y==="prev":y==="next",disabled:u||(y==="next"?f-1===i:i===0)}),_)};return Z.createElement("div",{style:m("controls",{}),dir:d?"rtl":"ltr"},c?null:s&&typeof s=="function"?s({Button:p,setCurrentStep:n,currentStep:i,stepsLength:f,setIsOpen:r,steps:e}):Z.createElement(p,{kind:"prev"}),l?null:Z.createElement("div",{style:m("navigation",{})},Array.from({length:f},(g,y)=>y).map(g=>{var y;return Z.createElement("button",{style:m("dot",{current:g===i,disabled:a||u}),onClick:()=>{!a&&!u&&n(g)},key:`navigation_dot_${g}`,"aria-label":((y=e[g])==null?void 0:y.navDotAriaLabel)||`Go to step ${g+1}`})})),c?null:o&&typeof o=="function"?o({Button:p,setCurrentStep:n,currentStep:i,stepsLength:f,setIsOpen:r,steps:e}):Z.createElement(p,null))},vsi=bsi,$Pt=({styles:t={},inverted:e=!1,disabled:n})=>{const i=xfe(t);return Z.createElement("svg",{viewBox:"0 0 18.4 14.4",style:i("arrow",{inverted:e,disabled:n})},Z.createElement("path",{d:e?"M17 7.2H1M10.8 1L17 7.2l-6.2 6.2":"M1.4 7.2h16M7.6 1L1.4 7.2l6.2 6.2",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeMiterlimit:"10"}))},ysi={Badge:hsi,Close:msi,Content:gsi,Navigation:vsi,Arrow:$Pt},_si=t=>hf(hf({},ysi),t),xsi=({styles:t,components:e={},badgeContent:n,accessibilityOptions:i,disabledActions:r,onClickClose:o,steps:s,setCurrentStep:a,currentStep:l,transition:c,isHighlightingObserved:u,setIsOpen:d,nextButton:h,prevButton:f,disableDotsNavigation:m,rtl:p,showPrevNextButtons:g=!0,showCloseButton:y=!0,showNavigation:_=!0,showBadge:w=!0,showDots:C=!0,meta:N,setMeta:E,setSteps:D})=>{const k=s[l],{Badge:M,Close:T,Content:A,Navigation:R,Arrow:P}=_si(e),O=n&&typeof n=="function"?n({currentStep:l,totalSteps:s.length,transition:c}):l+1;function V(){r||(o&&typeof o=="function"?o({setCurrentStep:a,setIsOpen:d,currentStep:l,steps:s,meta:N,setMeta:E,setSteps:D}):d(!1))}return Z.createElement(Z.Fragment,null,w?Z.createElement(M,{styles:t},O):null,y?Z.createElement(T,{styles:t,"aria-label":i==null?void 0:i.closeButtonAriaLabel,disabled:r,onClick:V}):null,Z.createElement(A,{content:k==null?void 0:k.content,setCurrentStep:a,currentStep:l,transition:c,isHighlightingObserved:u,setIsOpen:d}),_?Z.createElement(R,{setCurrentStep:a,currentStep:l,setIsOpen:d,steps:s,styles:t,"aria-hidden":!(i!=null&&i.showNavigationScreenReaders),nextButton:h,prevButton:f,disableDots:m,hideButtons:!g,hideDots:!C,disableAll:r,rtl:p,Arrow:P}):null)},wsi=xsi,Csi=t=>{var e=t,{currentStep:n,setCurrentStep:i,setIsOpen:r,steps:o=[],setSteps:s,styles:a={},scrollSmooth:l,afterOpen:c,beforeClose:u,padding:d=10,position:h,onClickMask:f,onClickHighlighted:m,keyboardHandler:p,className:g="reactour__popover",maskClassName:y="reactour__mask",highlightedMaskClassName:_,clipId:w,maskId:C,disableInteraction:N,disableKeyboardNavigation:E,inViewThreshold:D,disabledActions:k,setDisabledActions:M,disableWhenSelectorFalsy:T,rtl:A,accessibilityOptions:R={closeButtonAriaLabel:"Close Tour",showNavigationScreenReaders:!0},ContentComponent:P,Wrapper:O,meta:V,setMeta:F,onTransition:$=()=>"center"}=e,B=Qz(e,["currentStep","setCurrentStep","setIsOpen","steps","setSteps","styles","scrollSmooth","afterOpen","beforeClose","padding","position","onClickMask","onClickHighlighted","keyboardHandler","className","maskClassName","highlightedMaskClassName","clipId","maskId","disableInteraction","disableKeyboardNavigation","inViewThreshold","disabledActions","setDisabledActions","disableWhenSelectorFalsy","rtl","accessibilityOptions","ContentComponent","Wrapper","meta","setMeta","onTransition"]),z;const H=o[n],K=hf(hf({},a),H==null?void 0:H.styles),{sizes:q,transition:U,observableRefresher:Y,isHighlightingObserved:J,target:ae}=asi(H,{block:"center",behavior:l?"smooth":"auto",inViewThreshold:D});b.useEffect(()=>(c&&typeof c=="function"&&c(ae),()=>{u&&typeof u=="function"&&u(ae)}),[]);const{maskPadding:se,popoverPadding:oe,wrapperPadding:fe}=Nsi((z=H==null?void 0:H.padding)!=null?z:d),de={setCurrentStep:i,setIsOpen:r,currentStep:n,setSteps:s,steps:o,setMeta:F,meta:V};function ie(){k||(f&&typeof f=="function"?f(de):r(!1))}const Q=typeof(H==null?void 0:H.stepInteraction)=="boolean"?!(H!=null&&H.stepInteraction):N?typeof N=="boolean"?N:N(de):!1;b.useEffect(()=>(H!=null&&H.action&&typeof(H==null?void 0:H.action)=="function"&&(H==null||H.action(ae)),(H==null?void 0:H.disableActions)!==void 0&&M(H==null?void 0:H.disableActions),()=>{H!=null&&H.actionAfter&&typeof(H==null?void 0:H.actionAfter)=="function"&&(H==null||H.actionAfter(ae))}),[H]);const be=U?$:H!=null&&H.position?H==null?void 0:H.position:h,le=O||Z.Fragment;return H?Z.createElement(le,null,Z.createElement(Boi,{mutationObservables:H==null?void 0:H.mutationObservables,resizeObservables:H==null?void 0:H.resizeObservables,refresh:Y}),Z.createElement(csi,{setCurrentStep:i,currentStep:n,setIsOpen:r,stepsLength:o.length,disableKeyboardNavigation:E,disable:k,rtl:A,clickProps:de,keyboardHandler:p}),(!T||ae)&&Z.createElement(Xoi,{sizes:U?Esi:q,onClick:ie,styles:hf({highlightedArea:Ne=>q$e(hf({},Ne),{display:Q?"block":"none"})},K),padding:U?0:se,highlightedAreaClassName:_,className:y,onClickHighlighted:Ne=>{Ne.preventDefault(),Ne.stopPropagation(),m&&m(Ne,de)},wrapperPadding:fe,clipId:w,maskId:C}),(!T||ae)&&Z.createElement(nsi,{sizes:q,styles:K,position:be,padding:oe,"aria-labelledby":R==null?void 0:R.ariaLabelledBy,className:g,refresher:n},P?Z.createElement(P,hf({styles:K,setCurrentStep:i,currentStep:n,setIsOpen:r,steps:o,accessibilityOptions:R,disabledActions:k,transition:U,isHighlightingObserved:J,rtl:A},B)):Z.createElement(wsi,hf({styles:K,setCurrentStep:i,currentStep:n,setIsOpen:r,steps:o,setSteps:s,accessibilityOptions:R,disabledActions:k,transition:U,isHighlightingObserved:J,rtl:A,meta:V,setMeta:F},B)))):null},Ssi=Csi;function Nsi(t){return typeof t=="object"&&t!==null?{maskPadding:t.mask,popoverPadding:t.popover,wrapperPadding:t.wrapper}:{maskPadding:t,popoverPadding:t,wrapperPadding:0}}var Esi={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0},Dsi={isOpen:!1,setIsOpen:()=>!1,currentStep:0,setCurrentStep:()=>0,steps:[],setSteps:()=>[],setMeta:()=>"",disabledActions:!1,setDisabledActions:()=>!1,components:{}},ksi=Z.createContext(Dsi),Msi=t=>{var e=t,{children:n,defaultOpen:i=!1,startAt:r=0,steps:o,setCurrentStep:s,currentStep:a}=e,l=Qz(e,["children","defaultOpen","startAt","steps","setCurrentStep","currentStep"]);const[c,u]=b.useState(i),[d,h]=b.useState(r),[f,m]=b.useState(o),[p,g]=b.useState(""),[y,_]=b.useState(!1),w=hf({isOpen:c,setIsOpen:u,currentStep:a||d,setCurrentStep:s&&typeof s=="function"?s:h,steps:f,setSteps:m,disabledActions:y,setDisabledActions:_,meta:p,setMeta:g},l);return Z.createElement(ksi.Provider,{value:w},n,c?Z.createElement(Ssi,hf({},w)):null)};function Lsi({percent:t,increase:e,decrease:n,...i}){const r=i.currentStep===i.steps.length-1,o=i.steps[i.currentStep].content,s=()=>{i.setCurrentStep(i.currentStep-1),n&&n()},a=()=>{i.setCurrentStep(i.currentStep+1),e&&e()},l=()=>{i.setIsOpen(!1),i.onFinish()};return v.jsxDEV("div",{className:"flex flex-col align-start rounded",children:[v.jsxDEV(Uj,{percent:t,type:"line",showInfo:!1,strokeColor:"var(--color-primary)",className:"walkthrough !m-0 rounded-none",trailColor:"var(--color-trail)"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/walkthrough/WalkthroughContent.tsx",lineNumber:38,columnNumber:4},this),v.jsxDEV("div",{className:"p-4 flex flex-col",children:typeof o=="function"?o(i):o},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/walkthrough/WalkthroughContent.tsx",lineNumber:46,columnNumber:4},this),v.jsxDEV("footer",{className:"flex flex-row justify-between items-baseline mt-4 gap-8 px-4 pb-4",children:[v.jsxDEV(Fn.Text,{children:[i.currentStep+1,"/",i.steps.length]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/walkthrough/WalkthroughContent.tsx",lineNumber:51,columnNumber:5},this),v.jsxDEV("div",{className:"flex flex-row justify-end gap-2",children:[!!i.currentStep&&v.jsxDEV(vn,{onClick:s,children:v.jsxDEV(ee,{id:"project.walkthrough.button.cancel",defaultMessage:"Previous",description:"Go to previous step in the walkthrough"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/walkthrough/WalkthroughContent.tsx",lineNumber:57,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/walkthrough/WalkthroughContent.tsx",lineNumber:56,columnNumber:7},this),!r&&v.jsxDEV(vn,{type:"primary",onClick:a,children:v.jsxDEV(ee,{id:"project.walkthrough.button.next",defaultMessage:"Next",description:"Go to next step in the walkthrough"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/walkthrough/WalkthroughContent.tsx",lineNumber:66,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/walkthrough/WalkthroughContent.tsx",lineNumber:65,columnNumber:7},this),r&&v.jsxDEV(vn,{type:"primary",onClick:l,children:v.jsxDEV(ee,{id:"project.walkthrough.button.finish",defaultMessage:"Finish"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/walkthrough/WalkthroughContent.tsx",lineNumber:75,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/walkthrough/WalkthroughContent.tsx",lineNumber:74,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/walkthrough/WalkthroughContent.tsx",lineNumber:54,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/walkthrough/WalkthroughContent.tsx",lineNumber:50,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/walkthrough/WalkthroughContent.tsx",lineNumber:37,columnNumber:3},this)}let p1;function S6({steps:t,children:e,isDisabled:n,startModal:i,walkthroughType:r,usesModalOverlay:o}){var T,A;const s=b.useRef(!1),a=Qr(),[l,c]=b.useState(0),[u,d]=b.useState(!1),h=Je.useUtils(),{data:f,isLoading:m}=Je.getAuthUser.useQuery(),p=Je.setWalkthroughFollowed.useMutation(),g=100/t.length,y=(T=t[l])==null?void 0:T.isInModal,_=!!((A=f==null?void 0:f.walkthrough)!=null&&A[r]),[w,C]=b.useState(g),N=async R=>{const P=t[R].url;if(location.pathname!==P&&(a(P),o)){const O=t[R].isInModal?850:400;await SPt(O)}c(R)},E=async R=>{await p.mutateAsync({type:r,action:R}),h.getAuthUser.invalidate(),p1=void 0},D=()=>{window._cio.track('introduction_finished"'),p1=void 0,E("finished")};b.useEffect(()=>{var P;if(n||_||s.current)return;const R=(P=t[0])==null?void 0:P.url;s.current=!0,R&&(location.pathname===R||`${location.pathname}${location.search}`===R||a(R))},[t,_]),b.useEffect(()=>{!(f!=null&&f.walkthrough)||!p1||f.walkthrough[p1]&&(p1=void 0)},[f==null?void 0:f.walkthrough]),b.useEffect(()=>n?()=>{}:(window.addEventListener("closeWalkthrough",()=>E("finished")),()=>{window.removeEventListener("closeWalkthrough",()=>E("finished"))}),[]);const k=()=>{C(R=>{const P=R+g;return P>100?100:P})},M=()=>{C(R=>{const P=R-g;return P<0?0:P})};return _||m||n||p1&&p1!==r?e:(p1||(p1=r),i&&!u?v.jsxDEV(v.Fragment,{children:[i({onClose:()=>E("skip"),onNext:()=>d(!0)}),e]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/walkthrough/index.tsx",lineNumber:131,columnNumber:4},this):v.jsxDEV(Msi,{scrollSmooth:!0,steps:t,showDots:!1,showBadge:!1,currentStep:l,onClickMask:D,onClickClose:D,setCurrentStep:N,ContentComponent:R=>v.jsxDEV(Lsi,{...R,onFinish:D,percent:w,increase:k,decrease:M},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/walkthrough/index.tsx",lineNumber:149,columnNumber:5},this),defaultOpen:!_,maskClassName:y?"":"!z-50",className:`!p-0 overflow-hidden ${y?"":"!z-[55]"}`,styles:{maskArea:R=>({...R,rx:8}),popover:R=>({...R,borderRadius:"8px",padding:8}),maskWrapper:R=>({...R,color:"#00000010",rx:8})},children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/walkthrough/index.tsx",lineNumber:139,columnNumber:3},this))}function Tsi({onClose:t,onNext:e}){return v.jsxDEV(bl,{p:"lg",opened:!0,withCloseButton:!1,closeOnEscape:!1,onClose:t,children:v.jsxDEV(Gt,{gap:"lg",children:[v.jsxDEV("img",{src:"/img/svg/onboarding.svg",className:"h-44"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/WalkthroughModal.tsx",lineNumber:8,columnNumber:5},this),v.jsxDEV(Gt,{gap:"xs",children:[v.jsxDEV("h1",{className:"font-bold text-xl text-center",children:v.jsxDEV(ee,{id:"project.walkthrough.start_modal.title",defaultMessage:"Welcome your first Chatbot project",description:"Start modal before walkthrough title"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/WalkthroughModal.tsx",lineNumber:11,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/WalkthroughModal.tsx",lineNumber:10,columnNumber:6},this),v.jsxDEV(Qe,{className:"text-center",children:v.jsxDEV(ee,{id:"project.walkthrough.start_modal.description",defaultMessage:"We'll guide you through our platform to make it easy for you to personalize your settings, ensuring you get the most out of our services.",description:"Explain user we will give them a walkthrough, through the platform where all the config is."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/WalkthroughModal.tsx",lineNumber:18,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/WalkthroughModal.tsx",lineNumber:17,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/WalkthroughModal.tsx",lineNumber:9,columnNumber:5},this),v.jsxDEV(un,{gap:"sm",justify:"flex-end",children:[v.jsxDEV(Nn,{autoFocus:!1,variant:"light",onClick:t,children:v.jsxDEV(ee,{id:"project.walkthrough.start_modal.button.skip_tour",defaultMessage:"Skip",description:"Skip tour button"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/WalkthroughModal.tsx",lineNumber:27,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/WalkthroughModal.tsx",lineNumber:26,columnNumber:6},this),v.jsxDEV(Nn,{autoFocus:!0,onClick:e,children:v.jsxDEV(ee,{id:"project.walkthrough.start_modal.button.start_tour",defaultMessage:"Start tour",description:"Start tour button"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/WalkthroughModal.tsx",lineNumber:34,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/WalkthroughModal.tsx",lineNumber:33,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/WalkthroughModal.tsx",lineNumber:25,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/WalkthroughModal.tsx",lineNumber:7,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/WalkthroughModal.tsx",lineNumber:6,columnNumber:3},this)}function Isi({projectId:t,children:e}){const n=[{key:"setup.addDocument",selector:"#trainingAddDocumentButton",url:`/${t}/training`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{className:"fw-bold",children:v.jsxDEV(ee,{id:"project.walkthrough.add_url.title",defaultMessage:"Elevate your bot's intelligence"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:23,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:22,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"project.walkthrough.add_url.description",defaultMessage:"You can seamlessly upload and train your AI assistants with your own data."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:29,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:28,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:21,columnNumber:5},this)},{key:"setup.switch",selector:"#trainingSwitch",url:`/${t}/training`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{className:"fw-bold",children:v.jsxDEV(ee,{id:"project.walkthrough.training_switch.title",defaultMessage:"Filter between documents"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:44,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:43,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"project.walkthrough.training_switch.description",defaultMessage:"Use different types of document? change the filter type to see your different documents."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:50,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:49,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:42,columnNumber:5},this)},{key:"setup.agent",selector:"#agentTourButton",url:`/${t}/agent`,padding:{mask:[10,160,10,10]},className:"ml-20 mr-20",content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{className:"fw-bold",children:v.jsxDEV(ee,{id:"project.walkthrough.agent_navigation.title",defaultMessage:"Configure your AI assistant"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:67,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:66,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"project.walkthrough.agent_navigation.description",defaultMessage:"Customize your chat agent's tone of voice and behavior to match your brand and customer needs."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:73,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:72,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:65,columnNumber:5},this)},{key:"setup.layout",selector:"#layoutTourButton",url:`/${t}/layout`,padding:{mask:[10,160,10,10]},content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{className:"fw-bold",children:v.jsxDEV(ee,{id:"project.walkthrough.widget_navigation.title",defaultMessage:"Personalize the layout"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:89,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:88,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"project.walkthrough.widget_navigation.description",defaultMessage:"Make your layout look like your brand and configure it's functionalities"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:95,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:94,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:87,columnNumber:5},this)},{key:"setup.conversations",selector:"#conversationsTourButton",url:`/${t}/conversations`,padding:{mask:[10,160,10,10]},className:"ml-20 mr-20",content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{className:"fw-bold",children:v.jsxDEV(ee,{id:"project.walkthrough.conversations_navigation.title",defaultMessage:"View the conversations"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:112,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:111,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"project.walkthrough.conversations_navigation.description",defaultMessage:"Here is where you can see all the conversations your agent has had with your customers."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:118,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:117,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:110,columnNumber:5},this)},{key:"setup.implementation",selector:"#implementationTourButton",url:`/${t}/implementation`,padding:{mask:[10,160,10,10]},content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{className:"fw-bold",children:v.jsxDEV(ee,{id:"project.walkthrough.implementation_navigation.title",defaultMessage:"Add the assistant to your website"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:134,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:133,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"project.walkthrough.implementation_navigation.description",defaultMessage:"With this step for step guide you will learn how to install the assistant on your own website."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:140,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:139,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:132,columnNumber:5},this)},{key:"setup.settings",selector:"#settingsTourButton",url:`/${t}/settings`,padding:{mask:[10,160,10,10]},content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{className:"fw-bold",children:v.jsxDEV(ee,{id:"project.walkthrough.settings_navigation.title",defaultMessage:"Project settings"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:156,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:155,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"project.walkthrough.settings_navigation.description",defaultMessage:"Configure supported languages, AI models, GDPR settings and much more of your project."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:162,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:161,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:154,columnNumber:5},this)}];return v.jsxDEV(S6,{steps:n,usesModalOverlay:!1,walkthroughType:"chatbotProjectIntroduction",startModal:i=>v.jsxDEV(Tsi,{...i},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:177,columnNumber:27},this),children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/ChatbotProjectWalkthrough/index.tsx",lineNumber:173,columnNumber:3},this)}function Asi({onClose:t,onNext:e}){return v.jsxDEV(bl,{p:"lg",opened:!0,withCloseButton:!1,closeOnEscape:!1,onClose:t,children:v.jsxDEV(Gt,{gap:"lg",children:[v.jsxDEV("img",{src:"/img/svg/onboarding.svg",className:"h-44"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/WalkthroughModal.tsx",lineNumber:8,columnNumber:5},this),v.jsxDEV(Gt,{gap:"xs",children:[v.jsxDEV("h1",{className:"font-bold text-xl text-center",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.start_modal.title",defaultMessage:"Welcome to your first AI from project"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/WalkthroughModal.tsx",lineNumber:11,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/WalkthroughModal.tsx",lineNumber:10,columnNumber:6},this),v.jsxDEV(Qe,{className:"text-center",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.start_modal.description",defaultMessage:"We'll guide you through our platform to make it easy for you to personalize your settings, ensuring you get the most out of our services."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/WalkthroughModal.tsx",lineNumber:17,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/WalkthroughModal.tsx",lineNumber:16,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/WalkthroughModal.tsx",lineNumber:9,columnNumber:5},this),v.jsxDEV(un,{gap:"sm",justify:"flex-end",children:[v.jsxDEV(Nn,{autoFocus:!1,variant:"light",onClick:t,children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.start_modal.button.skip_tour",defaultMessage:"Skip",description:"Skip tour button"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/WalkthroughModal.tsx",lineNumber:25,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/WalkthroughModal.tsx",lineNumber:24,columnNumber:6},this),v.jsxDEV(Nn,{autoFocus:!0,onClick:e,children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.start_modal.button.start_tour",defaultMessage:"Start tour",description:"Start tour button"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/WalkthroughModal.tsx",lineNumber:32,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/WalkthroughModal.tsx",lineNumber:31,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/WalkthroughModal.tsx",lineNumber:23,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/WalkthroughModal.tsx",lineNumber:7,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/WalkthroughModal.tsx",lineNumber:6,columnNumber:3},this)}function Rsi({projectId:t,children:e}){const n=[{key:"setup.form_config",selector:"#formConfigTourButton",url:`/${t}/form-config`,padding:{mask:[10,160,10,10]},content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{className:"fw-bold",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.form_config_navigation.title",defaultMessage:"Configure your AI form"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:24,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:23,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.form_config_navigation.description",defaultMessage:"Here you can configure how your AI form should work and behave."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:30,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:29,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:22,columnNumber:5},this)},{key:"setup.addDocument",selector:"#trainingAddDocumentButton",url:`/${t}/training`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{className:"fw-bold",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.add_url.title",defaultMessage:"Elevate your bot's intelligence"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:45,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:44,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.add_url.description",defaultMessage:"Provide your own documents and resources to help the AI assistant to answer questions about the form"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:51,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:50,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:43,columnNumber:5},this)},{key:"setup.switch",selector:"#trainingSwitch",url:`/${t}/training`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{className:"fw-bold",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.training_switch.title",defaultMessage:"Filter between documents"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:66,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:65,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.training_switch.description",defaultMessage:"Use different types of document? change the filter type to see your different documents."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:72,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:71,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:64,columnNumber:5},this)},{key:"setup.layout",selector:"#layoutTourButton",url:`/${t}/layout`,padding:{mask:[10,160,10,10]},content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{className:"fw-bold",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.layout_navigation.title",defaultMessage:"Personalize the layout"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:88,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:87,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.layout_navigation.description",defaultMessage:"Make your form look like your brand and perfectly fit in your application"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:94,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:93,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:86,columnNumber:5},this)},{key:"setup.sessions",selector:"#sessionsTourButton",url:`/${t}/sessions`,padding:{mask:[10,160,10,10]},content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{className:"fw-bold",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.sessions_navigation.title",defaultMessage:"Sessions"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:110,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:109,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.sessions_navigation.description",defaultMessage:"Here you will find all the reports your customers have filled-in through the form"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:116,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:115,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:108,columnNumber:5},this)},{key:"setup.conversations",selector:"#conversationsTourButton",url:`/${t}/conversations`,padding:{mask:[10,160,10,10]},content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{className:"fw-bold",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.conversations_navigation.title",defaultMessage:"View the conversations"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:132,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:131,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.conversations_navigation.description",defaultMessage:"Here is where you can see all the conversations your customers had. This can help you to improve your form."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:138,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:137,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:130,columnNumber:5},this)},{key:"setup.settings",selector:"#settingsTourButton",url:`/${t}/settings`,padding:{mask:[10,160,10,10]},content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{className:"fw-bold",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.settings_navigation.title",defaultMessage:"Project settings"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:154,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:153,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.settings_navigation.description",defaultMessage:"Configure supported languages, AI models, GDPR settings and much more of your project."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:160,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:159,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:152,columnNumber:5},this)},{key:"setup.implementation",selector:"#implementationTourButton",url:`/${t}/implementation`,padding:{mask:[10,160,10,10]},content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{className:"fw-bold",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.implementation_navigation.title",defaultMessage:"Embed on your website"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:176,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:175,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"ai_form_project.walkthrough.implementation_navigation.description",defaultMessage:"With this step for step guide you learn how to embedded the AI form into your application."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:182,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:181,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:174,columnNumber:5},this)}];return v.jsxDEV(S6,{steps:n,usesModalOverlay:!1,walkthroughType:"aiFromProjectIntroduction",startModal:i=>v.jsxDEV(Asi,{...i},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:197,columnNumber:27},this),children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/AiFormProjectWalkthrough/index.tsx",lineNumber:193,columnNumber:3},this)}function Psi({project:t,children:e}){switch(t==null?void 0:t.projectType){case"aiForm":return v.jsxDEV(Rsi,{projectId:t._id,children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/index.tsx",lineNumber:10,columnNumber:11},this);case"chatbot":return v.jsxDEV(Isi,{projectId:t._id,children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/components/projectWalkthrough/index.tsx",lineNumber:12,columnNumber:11},this);default:return e}}function eot({className:t="sm:p-8",children:e}){const n=Mt(),i=Qr(),{data:r}=Je.getAuthUser.useQuery(),o=[{key:"organizations",icon:v.jsxDEV($2t,{className:"app_shell-icon-blue_green p-2 rounded","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/accountShell.tsx",lineNumber:23,columnNumber:10},this),label:n.formatMessage({id:"account_shell.menu.organizations.label",defaultMessage:"Organizations"})}];return(r==null?void 0:r.type)==="reseller"&&o.push({key:"reseller",icon:v.jsxDEV(bAt,{className:"app_shell-icon-blood_orange p-2 rounded","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/accountShell.tsx",lineNumber:34,columnNumber:10},this),label:n.formatMessage({id:"account_shell.menu.reseller.label",defaultMessage:"Reseller"})}),v.jsxDEV(Ps,{className:"bg-white",style:{minHeight:"100svh",height:"100svh",overflow:"hidden"},children:[v.jsxDEV(iC,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/accountShell.tsx",lineNumber:44,columnNumber:4},this),v.jsxDEV(Ps,{children:[v.jsxDEV(pfe,{onMenuClick:s=>i(`/account/${s}`),menu:o},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/accountShell.tsx",lineNumber:46,columnNumber:5},this),v.jsxDEV(Ps.Content,{className:Vt("flex flex-col justify-start items-center gap-4 relative overflow-auto min-h-[calc(100svh-64px)]",t),children:v.jsxDEV(hfe,{children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/accountShell.tsx",lineNumber:53,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/accountShell.tsx",lineNumber:47,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/accountShell.tsx",lineNumber:45,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/accountShell.tsx",lineNumber:43,columnNumber:3},this)}/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Osi={outline:{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"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Mi=(t,e,n,i)=>{const r=b.forwardRef(({color:o="currentColor",size:s=24,stroke:a=2,title:l,className:c,children:u,...d},h)=>b.createElement("svg",{ref:h,...Osi[t],width:s,height:s,className:["tabler-icon",`tabler-icon-${e}`,c].join(" "),...t==="filled"?{fill:o}:{strokeWidth:a,stroke:o},...d},[l&&b.createElement("title",{key:"svg-title"},l),...i.map(([f,m])=>b.createElement(f,m)),...Array.isArray(u)?u:[u]]));return r.displayName=`${n}`,r};/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var ud=Mi("outline","alert-triangle","IconAlertTriangle",[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var jsi=Mi("outline","archive-off","IconArchiveOff",[["path",{d:"M8 4h11a2 2 0 1 1 0 4h-7m-4 0h-3a2 2 0 0 1 -.826 -3.822",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 1.824 -1.18m.176 -3.82v-7",key:"svg-1"}],["path",{d:"M10 12h2",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var G$e=Mi("outline","archive","IconArchive",[["path",{d:"M3 4m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10",key:"svg-1"}],["path",{d:"M10 12l4 0",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Fsi=Mi("outline","arrow-right","IconArrowRight",[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M13 18l6 -6",key:"svg-1"}],["path",{d:"M13 6l6 6",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var $si=Mi("outline","arrows-vertical","IconArrowsVertical",[["path",{d:"M8 7l4 -4l4 4",key:"svg-0"}],["path",{d:"M8 17l4 4l4 -4",key:"svg-1"}],["path",{d:"M12 3l0 18",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Vsi=Mi("outline","bold","IconBold",[["path",{d:"M7 5h6a3.5 3.5 0 0 1 0 7h-6z",key:"svg-0"}],["path",{d:"M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Y$e=Mi("outline","book-2","IconBook2",[["path",{d:"M19 4v16h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12z",key:"svg-0"}],["path",{d:"M19 16h-12a2 2 0 0 0 -2 2",key:"svg-1"}],["path",{d:"M9 8h6",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Bsi=Mi("outline","calendar-bolt","IconCalendarBolt",[["path",{d:"M13.5 21h-7.5a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v5",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M19 16l-2 3h4l-2 3",key:"svg-4"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var zsi=Mi("outline","calendar-check","IconCalendarCheck",[["path",{d:"M11.5 21h-5.5a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v6",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-4"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Hsi=Mi("outline","calendar-off","IconCalendarOff",[["path",{d:"M9 5h9a2 2 0 0 1 2 2v9m-.184 3.839a2 2 0 0 1 -1.816 1.161h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 1.158 -1.815",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v1",key:"svg-2"}],["path",{d:"M4 11h7m4 0h5",key:"svg-3"}],["path",{d:"M3 3l18 18",key:"svg-4"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Wsi=Mi("outline","calendar-plus","IconCalendarPlus",[["path",{d:"M12.5 21h-6.5a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v5",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M16 19h6",key:"svg-4"}],["path",{d:"M19 16v6",key:"svg-5"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var X$e=Mi("outline","check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Z$e=Mi("outline","chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var wfe=Mi("outline","chevron-left","IconChevronLeft",[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Q$e=Mi("outline","chevron-right","IconChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var J$e=Mi("outline","chevron-up","IconChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var VPt=Mi("outline","circle-check","IconCircleCheck",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Usi=Mi("outline","circle-x","IconCircleX",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M10 10l4 4m0 -4l-4 4",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Ksi=Mi("outline","clipboard-check","IconClipboardCheck",[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-1"}],["path",{d:"M9 14l2 2l4 -4",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var BPt=Mi("outline","clipboard","IconClipboard",[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var zPt=Mi("outline","clock","IconClock",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var qsi=Mi("outline","cookie","IconCookie",[["path",{d:"M8 13v.01",key:"svg-1"}],["path",{d:"M12 17v.01",key:"svg-2"}],["path",{d:"M12 12v.01",key:"svg-3"}],["path",{d:"M16 14v.01",key:"svg-4"}],["path",{d:"M11 8v.01",key:"svg-5"}],["path",{d:"M13.148 3.476l2.667 1.104a4 4 0 0 0 4.656 6.14l.053 .132a3 3 0 0 1 0 2.296q -.745 1.18 -1.024 1.852q -.283 .684 -.66 2.216a3 3 0 0 1 -1.624 1.623q -1.572 .394 -2.216 .661q -.712 .295 -1.852 1.024a3 3 0 0 1 -2.296 0q -1.203 -.754 -1.852 -1.024q -.707 -.292 -2.216 -.66a3 3 0 0 1 -1.623 -1.624q -.397 -1.577 -.661 -2.216q -.298 -.718 -1.024 -1.852a3 3 0 0 1 0 -2.296q .719 -1.116 1.024 -1.852q .257 -.62 .66 -2.216a3 3 0 0 1 1.624 -1.623q 1.547 -.384 2.216 -.661q .687 -.285 1.852 -1.024a3 3 0 0 1 2.296 0",key:"svg-6"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var HPt=Mi("outline","copy","IconCopy",[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Gsi=Mi("outline","database","IconDatabase",[["path",{d:"M12 6m-8 0a8 3 0 1 0 16 0a8 3 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 6v6a8 3 0 0 0 16 0v-6",key:"svg-1"}],["path",{d:"M4 12v6a8 3 0 0 0 16 0v-6",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Ysi=Mi("outline","device-floppy","IconDeviceFloppy",[["path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M14 4l0 4l-6 0l0 -4",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var WPt=Mi("outline","dots-vertical","IconDotsVertical",[["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var UPt=Mi("outline","download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Xsi=Mi("outline","edit","IconEdit",[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Zsi=Mi("outline","exclamation-circle","IconExclamationCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 9v4",key:"svg-1"}],["path",{d:"M12 16v.01",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Qsi=Mi("outline","external-link","IconExternalLink",[["path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6",key:"svg-0"}],["path",{d:"M11 13l9 -9",key:"svg-1"}],["path",{d:"M15 4h5v5",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Jsi=Mi("outline","eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var eai=Mi("outline","eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var tai=Mi("outline","file-description","IconFileDescription",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 17h6",key:"svg-2"}],["path",{d:"M9 13h6",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var nai=Mi("outline","filter","IconFilter",[["path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var KPt=Mi("outline","flask","IconFlask",[["path",{d:"M9 3l6 0",key:"svg-0"}],["path",{d:"M10 9l4 0",key:"svg-1"}],["path",{d:"M10 3v6l-4 11a.7 .7 0 0 0 .5 1h11a.7 .7 0 0 0 .5 -1l-4 -11v-6",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var iai=Mi("outline","fold","IconFold",[["path",{d:"M12 3v6l3 -3m-6 0l3 3",key:"svg-0"}],["path",{d:"M12 21v-6l3 3m-6 0l3 -3",key:"svg-1"}],["path",{d:"M4 12l1 0",key:"svg-2"}],["path",{d:"M9 12l1 0",key:"svg-3"}],["path",{d:"M14 12l1 0",key:"svg-4"}],["path",{d:"M19 12l1 0",key:"svg-5"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var qPt=Mi("outline","grip-vertical","IconGripVertical",[["path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var rai=Mi("outline","heart-spark","IconHeartSpark",[["path",{d:"M11.537 19.542l-7.037 -6.97a5 5 0 1 1 7.5 -6.566a5 5 0 0 1 8.212 5.693",key:"svg-0"}],["path",{d:"M19 22.5a4.75 4.75 0 0 1 3.5 -3.5a4.75 4.75 0 0 1 -3.5 -3.5a4.75 4.75 0 0 1 -3.5 3.5a4.75 4.75 0 0 1 3.5 3.5",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var oai=Mi("outline","history","IconHistory",[["path",{d:"M12 8l0 4l2 2",key:"svg-0"}],["path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var sai=Mi("outline","id","IconId",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v10a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M9 10m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M15 8l2 0",key:"svg-2"}],["path",{d:"M15 12l2 0",key:"svg-3"}],["path",{d:"M7 16l10 0",key:"svg-4"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var uq=Mi("outline","info-circle","IconInfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var aai=Mi("outline","italic","IconItalic",[["path",{d:"M11 5l6 0",key:"svg-0"}],["path",{d:"M7 19l6 0",key:"svg-1"}],["path",{d:"M14 5l-4 14",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var lai=Mi("outline","key","IconKey",[["path",{d:"M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0z",key:"svg-0"}],["path",{d:"M15 9h.01",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var cai=Mi("outline","link","IconLink",[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var pie=Mi("outline","loader-2","IconLoader2",[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var uai=Mi("outline","mail","IconMail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var dai=Mi("outline","messages","IconMessages",[["path",{d:"M21 14l-3 -3h-7a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1h9a1 1 0 0 1 1 1v10",key:"svg-0"}],["path",{d:"M14 15v2a1 1 0 0 1 -1 1h-7l-3 3v-10a1 1 0 0 1 1 -1h2",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var e8e=Mi("outline","pencil","IconPencil",[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var GPt=Mi("outline","player-pause","IconPlayerPause",[["path",{d:"M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var YPt=Mi("outline","player-play","IconPlayerPlay",[["path",{d:"M7 4v16l13 -8z",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var hai=Mi("outline","player-track-next","IconPlayerTrackNext",[["path",{d:"M3 5v14l8 -7z",key:"svg-0"}],["path",{d:"M14 5v14l8 -7z",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var GA=Mi("outline","plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var fai=Mi("outline","refresh-dot","IconRefreshDot",[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var mai=Mi("outline","refresh","IconRefresh",[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var XPt=Mi("outline","reload","IconReload",[["path",{d:"M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747",key:"svg-0"}],["path",{d:"M20 4v5h-5",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var pai=Mi("outline","report-analytics","IconReportAnalytics",[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-1"}],["path",{d:"M9 17v-5",key:"svg-2"}],["path",{d:"M12 17v-1",key:"svg-3"}],["path",{d:"M15 17v-3",key:"svg-4"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var gai=Mi("outline","report-search","IconReportSearch",[["path",{d:"M8 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h5.697",key:"svg-0"}],["path",{d:"M18 12v-5a2 2 0 0 0 -2 -2h-2",key:"svg-1"}],["path",{d:"M8 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-2"}],["path",{d:"M8 11h4",key:"svg-3"}],["path",{d:"M8 15h3",key:"svg-4"}],["path",{d:"M16.5 17.5m-2.5 0a2.5 2.5 0 1 0 5 0a2.5 2.5 0 1 0 -5 0",key:"svg-5"}],["path",{d:"M18.5 19.5l2.5 2.5",key:"svg-6"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var bai=Mi("outline","rotate-clockwise","IconRotateClockwise",[["path",{d:"M4.05 11a8 8 0 1 1 .5 4m-.5 5v-5h5",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var ZPt=Mi("outline","search","IconSearch",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var t8e=Mi("outline","send","IconSend",[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var tot=Mi("outline","sparkles","IconSparkles",[["path",{d:"M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2zm0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2zm-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6z",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var vai=Mi("outline","spider","IconSpider",[["path",{d:"M5 4v2l5 5",key:"svg-0"}],["path",{d:"M2.5 9.5l1.5 1.5h6",key:"svg-1"}],["path",{d:"M4 19v-2l6 -6",key:"svg-2"}],["path",{d:"M19 4v2l-5 5",key:"svg-3"}],["path",{d:"M21.5 9.5l-1.5 1.5h-6",key:"svg-4"}],["path",{d:"M20 19v-2l-6 -6",key:"svg-5"}],["path",{d:"M12 15m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-6"}],["path",{d:"M12 9m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-7"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var yai=Mi("outline","stopwatch","IconStopwatch",[["path",{d:"M5 13a7 7 0 1 0 14 0a7 7 0 0 0 -14 0z",key:"svg-0"}],["path",{d:"M14.5 10.5l-2.5 2.5",key:"svg-1"}],["path",{d:"M17 8l1 -1",key:"svg-2"}],["path",{d:"M14 3h-4",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var _ai=Mi("outline","strikethrough","IconStrikethrough",[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M16 6.5a4 2 0 0 0 -4 -1.5h-1a3.5 3.5 0 0 0 0 7h2a3.5 3.5 0 0 1 0 7h-1.5a4 2 0 0 1 -4 -1.5",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var QPt=Mi("outline","test-pipe","IconTestPipe",[["path",{d:"M20 8.04l-12.122 12.124a2.857 2.857 0 1 1 -4.041 -4.04l12.122 -12.124",key:"svg-0"}],["path",{d:"M7 13h8",key:"svg-1"}],["path",{d:"M19 15l1.5 1.6a2 2 0 1 1 -3 0l1.5 -1.6z",key:"svg-2"}],["path",{d:"M15 3l6 6",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var xai=Mi("outline","thumb-down","IconThumbDown",[["path",{d:"M7 13v-8a1 1 0 0 0 -1 -1h-2a1 1 0 0 0 -1 1v7a1 1 0 0 0 1 1h3a4 4 0 0 1 4 4v1a2 2 0 0 0 4 0v-5h3a2 2 0 0 0 2 -2l-1 -5a2 3 0 0 0 -2 -2h-7a3 3 0 0 0 -3 3",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var wai=Mi("outline","thumb-up","IconThumbUp",[["path",{d:"M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Lw=Mi("outline","trash","IconTrash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Cai=Mi("outline","unlink","IconUnlink",[["path",{d:"M17 22v-2",key:"svg-0"}],["path",{d:"M9 15l6 -6",key:"svg-1"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-2"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-3"}],["path",{d:"M20 17h2",key:"svg-4"}],["path",{d:"M2 7h2",key:"svg-5"}],["path",{d:"M7 2v2",key:"svg-6"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Sai=Mi("outline","user-square","IconUserSquare",[["path",{d:"M9 10a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-0"}],["path",{d:"M6 21v-1a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v1",key:"svg-1"}],["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var n8e=Mi("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Nai=Mi("filled","circle-check-filled","IconCircleCheckFilled",[["path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Eai=Mi("filled","circle-x-filled","IconCircleXFilled",[["path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-6.489 5.8a1 1 0 0 0 -1.218 1.567l1.292 1.293l-1.292 1.293l-.083 .094a1 1 0 0 0 1.497 1.32l1.293 -1.292l1.293 1.292l.094 .083a1 1 0 0 0 1.32 -1.497l-1.292 -1.293l1.292 -1.293l.083 -.094a1 1 0 0 0 -1.497 -1.32l-1.293 1.292l-1.293 -1.292l-.094 -.083z",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.20.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var JPt=Mi("filled","star-filled","IconStarFilled",[["path",{d:"M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z",key:"svg-0"}]]);const Dai="modulepreload",kai=function(t){return"/"+t},not={},Gn=function(e,n,i){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));r=Promise.allSettled(n.map(l=>{if(l=kai(l),l in not)return;not[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":Dai,c||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((h,f)=>{d.addEventListener("load",h),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return r.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return e().catch(o)})};function eOt(){const[t]=b.useState(!1);return t?v.jsxDEV("section",{className:"p-4 flex flex-row justify-center bg-red-500 text-white",children:v.jsxDEV(ee,{id:"status_banner.outage.description",defaultMessage:"OpenAI is experiencing an outage, we have hidden the widget on your website until this problem is resolved. <link>Check status</link>",values:{link:e=>v.jsxDEV("a",{href:"https://status.openai.com/",className:"ml-1 !text-white !underline font-bold",children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/StatusBanner.tsx",lineNumber:23,columnNumber:7},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/StatusBanner.tsx",lineNumber:18,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/StatusBanner.tsx",lineNumber:17,columnNumber:3},this):null}const N6=Xp({key:"memberState",default:void 0}),ps=FF({key:"isAdminMember",get:({get:t})=>{const e=t(N6);return e?e.role==="admin":!1}});function PN({children:t,className:e}){const n=Mt(),i=Qr(),r=Je.useContext(),o=Wd(N6),{data:s}=Je.getAuthUser.useQuery(void 0,{staleTime:1/0}),{data:a,isLoading:l,isError:c}=Je.getOrganization.useQuery(void 0);b.useEffect(()=>{localStorage.getItem("organizationId")||i("/account/organizations")},[]),b.useEffect(()=>{if(!s||!a)return;let d=a.members.find(h=>h.userId===(s==null?void 0:s._id));(s.type==="reseller"||s.type==="chathiveAdmin")&&(d={_id:s._id,role:"admin",userId:s._id,createdAt:s.createdAt}),d&&o(d)},[a,s]);const u=()=>{r.getOrganizations.invalidate(),r.getOrganization.invalidate(),r.project.getAll.invalidate(),r.getMembers.invalidate(),r.invalidate(),window.location.reload()};return!l&&!a||c?v.jsxDEV(Op,{to:"/account",replace:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:70,columnNumber:10},this):l?v.jsxDEV(Ps,{className:"h-screen",children:[v.jsxDEV(iC,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:75,columnNumber:5},this),v.jsxDEV(Ps.Content,{className:"flex flex-col justify-center items-center gap-4",children:[v.jsxDEV(zS,{size:"large"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:77,columnNumber:6},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"app_shell.organization.loader.title",defaultMessage:"We are setting up your organization...",description:"Message show'n when organization is loaded in and loader is show'n"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:79,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:78,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:76,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:74,columnNumber:4},this):v.jsxDEV(Ps,{className:"bg-white relative",style:{minHeight:"100svh",height:"100svh",overflow:"hidden"},children:[v.jsxDEV(eOt,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:92,columnNumber:4},this),v.jsxDEV(iC,{showOrganization:!0,organization:a,onOrganizationChange:u,children:v.jsxDEV(vn,{type:"primary",onClick:()=>i("/billing"),children:v.jsxDEV(ee,{id:"general.upgrade.submit",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:95,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:94,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:93,columnNumber:4},this),v.jsxDEV(Ps,{children:[v.jsxDEV(pfe,{organization:a,onMenuClick:d=>i(`/${d}`),menu:[{key:"dashboard",icon:v.jsxDEV(Khe,{className:"app_shell-icon-green p-2 rounded","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:105,columnNumber:14},this),label:n.formatMessage({id:"app_shell.organization.menu.dashboard.label",defaultMessage:"Dashboard"})},{key:"projects",icon:v.jsxDEV(qhe,{className:"app_shell-icon-blue_green p-2 rounded","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:113,columnNumber:14},this),label:n.formatMessage({id:"app_shell.organization.menu.projects_overview.label",defaultMessage:"Projects"})},{key:"members",icon:v.jsxDEV(yAt,{className:"app_shell-icon-blue p-2 rounded","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:121,columnNumber:14},this),label:n.formatMessage({id:"app_shell.organization.menu.members.label",defaultMessage:"Members"})},{type:"divider",className:"!my-4"},{key:"crawler",icon:v.jsxDEV(vai,{size:"30",className:"app_shell-icon-purple p-2 rounded","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:130,columnNumber:14},this),label:n.formatMessage({id:"app_shell.organization.menu.crawler.label",defaultMessage:"Crawler"})},{key:"api_key",icon:v.jsxDEV(lai,{size:"30",className:"app_shell-icon-dark_rose p-2 rounded","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:138,columnNumber:14},this),label:n.formatMessage({id:"app_shell.organization.menu.api_key.label",defaultMessage:"Api key"})},{type:"divider",className:"!my-4"},{key:"billing",icon:v.jsxDEV(q2t,{className:"app_shell-icon-blood_orange p-2 rounded","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:147,columnNumber:14},this),label:n.formatMessage({id:"app_shell.organization.menu.billing.label",defaultMessage:"Billing"})},{key:"settings",icon:v.jsxDEV(Xhe,{className:"app_shell-icon-red p-2 rounded","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:155,columnNumber:14},this),label:n.formatMessage({id:"app_shell.organization.menu.settings.label",defaultMessage:"Settings"})}]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:99,columnNumber:5},this),v.jsxDEV(Ps.Content,{className:Vt("sm:p-4 flex justify-center items-start overflow-auto min-h-[calc(100svh-64px)]",e),children:v.jsxDEV(hfe,{children:t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:169,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:163,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:98,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/AppShell/organizationShell.tsx",lineNumber:91,columnNumber:3},this)}function ga(t,e=!1){const n=b.useRef(document.title);b.useEffect(()=>{document.title=t},[t]),b.useEffect(()=>()=>{e||(document.title=n.current)},[])}const YA=Xp({key:"signUpState",default:{language:"en",projectType:"chatbot",agent:{name:"Sophia",temperature:.5},organization:{name:"",activity:"",size:""},user:{firstName:"",lastName:"",email:"",jobTitle:""}}});function Mai({onLogin:t}){const e=Mt();return v.jsxDEV(Gt,{children:[v.jsxDEV(QF,{className:"font-bold !text-2xl md:!text-4xl text-center",children:v.jsxDEV(ee,{id:"login.email.title",defaultMessage:"Login to your account"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/EmailLogin.tsx",lineNumber:17,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/EmailLogin.tsx",lineNumber:16,columnNumber:4},this),v.jsxDEV(Qe,{className:"text-center text-sm mt-4 inline-block",children:v.jsxDEV(ee,{id:"login.email.explanation",defaultMessage:"First enter your email address so we can send you a login code.<newLine></newLine> Or you can <link>sign up</link> with a new account.",description:"Comes under the login title, says what the user needs to do, fill in their email address to go to the next step.",values:{newLine:()=>v.jsxDEV("br",{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/EmailLogin.tsx",lineNumber:25,columnNumber:22},this),link:n=>v.jsxDEV(T0,{to:"/sign_up",children:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/EmailLogin.tsx",lineNumber:26,columnNumber:26},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/EmailLogin.tsx",lineNumber:20,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/EmailLogin.tsx",lineNumber:19,columnNumber:4},this),v.jsxDEV(Ut,{requiredMark:!1,layout:"vertical",onFinish:t,children:[v.jsxDEV(Ut.Item,{rules:[{pattern:new RegExp(/^[^\s@]+@[^\s@]+\.[^\s@]+$/),message:e.formatMessage({id:"login.email.input.email.validation.error.message",defaultMessage:"Please enter a valid email address."})},{required:!0,message:e.formatMessage({id:"login.email.input.email.validation.error.required",defaultMessage:"Email is required."})}],htmlFor:"email",name:"email",label:e.formatMessage({id:"login.email.input.email.label",defaultMessage:"Email"}),children:v.jsxDEV(es,{id:"email",size:"large",placeholder:e.formatMessage({id:"login.email.input.email.placeholder",defaultMessage:"E.g. emily@chathive.co"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/EmailLogin.tsx",lineNumber:55,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/EmailLogin.tsx",lineNumber:31,columnNumber:5},this),v.jsxDEV(Ut.Item,{className:"!mb-0",children:v.jsxDEV(Nn,{fullWidth:!0,type:"submit",children:v.jsxDEV(ee,{id:"login.email.input.btn.submit",defaultMessage:"Sign in"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/EmailLogin.tsx",lineNumber:66,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/EmailLogin.tsx",lineNumber:65,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/EmailLogin.tsx",lineNumber:64,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/EmailLogin.tsx",lineNumber:30,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/EmailLogin.tsx",lineNumber:15,columnNumber:3},this)}const Lai=t=>{const[e,n]=b.useState(),i=QNn({base:"md",xs:"md",sm:"xl",md:"xl",lg:"xl"}),r=()=>{t.onRequestNewCode(),n("")};return v.jsxDEV(Gt,{gap:"lg",className:"h-full w-full overflow-auto",align:"center",children:[v.jsxDEV(QF,{className:"font-bold !text-4xl text-center",children:v.jsxDEV(ee,{id:"login.verify.code.title",defaultMessage:"Verify code"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/VerifyCode.tsx",lineNumber:34,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/VerifyCode.tsx",lineNumber:33,columnNumber:4},void 0),v.jsxDEV(Qe,{className:"text-center text-sm max-w-[496px] mx-auto",children:v.jsxDEV(ee,{id:"login.verify.code.explanation",defaultMessage:"You received a 6-digit verification code at {email}. Enter the code below to verify your identity.",values:{email:t.email}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/VerifyCode.tsx",lineNumber:37,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/VerifyCode.tsx",lineNumber:36,columnNumber:4},void 0),t.isVerifyCodeError&&v.jsxDEV(Yo,{color:"red",children:v.jsxDEV(ee,{id:"login.verify.code.error.invalid",defaultMessage:"This code is not valid. Check your code again or click on 'send new code’ to request a new code."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/VerifyCode.tsx",lineNumber:45,columnNumber:6},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/VerifyCode.tsx",lineNumber:44,columnNumber:5},void 0),v.jsxDEV("div",{className:"flex flex-col gap-8 items-center",children:[v.jsxDEV(Hde,{oneTimeCode:!0,value:e,length:6,type:"number",size:i||"xl",onComplete:t.onSubmitCode},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/VerifyCode.tsx",lineNumber:52,columnNumber:5},void 0),v.jsxDEV("div",{className:"w-full flex flex-col items-center space-y-5 sm:flex-row sm:justify-between sm:space-y-0 overflow-hidden",children:[v.jsxDEV(Nn,{variant:"subtle",onClick:t.onPrevious,children:v.jsxDEV(ee,{id:"login.verify.code.btn.use_other_email",defaultMessage:"Use other email address"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/VerifyCode.tsx",lineNumber:63,columnNumber:7},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/VerifyCode.tsx",lineNumber:62,columnNumber:6},void 0),v.jsxDEV(Nn,{onClick:r,loading:t.isSendingVerificationCode,children:v.jsxDEV(ee,{id:"login.verify.code.btn.request_new_code",defaultMessage:"Request new code"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/VerifyCode.tsx",lineNumber:69,columnNumber:7},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/VerifyCode.tsx",lineNumber:68,columnNumber:6},void 0)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/VerifyCode.tsx",lineNumber:61,columnNumber:5},void 0)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/VerifyCode.tsx",lineNumber:51,columnNumber:4},void 0)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/VerifyCode.tsx",lineNumber:32,columnNumber:3},void 0)};function tOt({className:t}){return v.jsxDEV(Gt,{gap:"xl",align:"center",justify:"center",className:Vt("w-5/12 lg:w-[896px] h-full lg:pb-20",t),children:[v.jsxDEV(or,{shadow:"lg",p:"xl",withBorder:!0,className:"w-full lg:max-w-prose rounded-md",children:v.jsxDEV(Gt,{gap:"xs",children:[v.jsxDEV(un,{gap:"sm",children:[v.jsxDEV(kp,{variant:"light",children:v.jsxDEV(qsi,{size:20,className:"text-theme-primary"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:18,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:17,columnNumber:7},this),v.jsxDEV(Qe,{fw:"bold",size:"lg",children:v.jsxDEV(ee,{id:"sign_up.shell.card.cookie_less.title",defaultMessage:"Cookieless by default"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:21,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:20,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:16,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"sign_up.shell.card.cookie_less.description",defaultMessage:"Our chatbot system uses session storage only, eliminating the need for cookie banners and ensuring a privacy-friendly experience with no persistent data stored between sessions."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:28,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:27,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:15,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:14,columnNumber:4},this),v.jsxDEV(or,{shadow:"lg",p:"xl",withBorder:!0,className:"w-full lg:max-w-prose rounded-md",children:v.jsxDEV(Gt,{gap:"xs",children:[v.jsxDEV(un,{gap:"sm",children:[v.jsxDEV(kp,{variant:"light",children:v.jsxDEV(gai,{size:20,className:"text-theme-primary"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:39,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:38,columnNumber:7},this),v.jsxDEV(Qe,{fw:"bold",size:"lg",children:v.jsxDEV(ee,{id:"sign_up.shell.card.auditable.title",defaultMessage:"Full auditability"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:42,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:41,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:37,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"sign_up.shell.card.auditable.description",defaultMessage:"Chathive provides full transparency on how your AI assistant generates messages, showing which articles are referenced, why they are chosen, and how they are synthesized into the final response."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:49,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:48,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:36,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:35,columnNumber:4},this),v.jsxDEV(or,{shadow:"lg",p:"xl",withBorder:!0,className:"w-full lg:max-w-prose rounded-md",children:v.jsxDEV(Gt,{gap:"lg",children:[v.jsxDEV(un,{gap:"sm",children:[v.jsxDEV(kp,{variant:"light",children:v.jsxDEV(rai,{size:20,className:"text-theme-primary"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:60,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:59,columnNumber:7},this),v.jsxDEV(Qe,{fw:"bold",size:"lg",children:v.jsxDEV(ee,{id:"sign_up.shell.card.trusted_by.title",defaultMessage:"Trusted by leading companies"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:63,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:62,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:58,columnNumber:6},this),v.jsxDEV(un,{ml:"sm",gap:"xl",children:[v.jsxDEV("img",{src:"/img/png/liantis_logo.png",className:"h-8"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:70,columnNumber:7},this),v.jsxDEV("img",{src:"/img/png/vlaio_logo.png",className:"h-8"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:71,columnNumber:7},this),v.jsxDEV("img",{src:"/img/png/unizo_icon.png",className:"h-12"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:72,columnNumber:7},this),v.jsxDEV("img",{src:"/img/svg/yuki_logo.svg",className:"h-8"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:73,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:69,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:57,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:56,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/components/IntroCards.tsx",lineNumber:8,columnNumber:3},this)}function Tai(){const t=Mt(),e=Qr(),[n]=Bv(),[i,r]=b.useState(""),[o,s]=f0(YA),[a,l]=b.useState("EMAIL");ga(t.formatMessage({id:"login.page.title",defaultMessage:"Login - Chathive"})),b.useEffect(()=>{const h=n.get("email"),f=n.get("code");!h||!f||u.mutate({email:h,authToken:f})},[n]);const c=Je.verifyUser.useMutation({onError:h=>{var f;if(((f=h.data)==null?void 0:f.code)==="NOT_FOUND"){s({...o,user:{...o.user,email:i}}),e("/sign_up");return}Ei.error({placement:"bottomRight",message:t.formatMessage({id:"login.email.executed.error.message",defaultMessage:"Something went wrong while trying to send a verification mail to {email}. Try again."},{email:i})})},onSuccess:()=>{l("VERIFY_CODE")}}),u=Je.verifyAuthToken.useMutation({onError:()=>{Ei.error({placement:"bottomRight",message:t.formatMessage({id:"login.verify.code.executed.error.message",defaultMessage:"Something went wrong while trying to verify your code. Try again."},{email:i})})},onSuccess:h=>{localStorage.setItem("TOKEN",h.jwtToken),e("/")}});function d(h){r(h.email.toLowerCase()),c.mutate({email:h.email.toLowerCase()})}return localStorage.getItem("TOKEN")?v.jsxDEV(Op,{to:"/",replace:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/index.tsx",lineNumber:89,columnNumber:44},this):v.jsxDEV("div",{className:Vt("w-screen h-screen","flex flex-col lg:flex-row gap-4 lg:gap-16 p-2 sm:p-4 md:p-8 relative !min-h-screen","bg-gradient-to-br from-theme-primary to-theme-secondary overflow-auto"),children:[v.jsxDEV("main",{className:Vt("w-full min-w-[calc(100% - 512px)] h-screen md:min-h-[65vh] lg:h-full pb-8 pt-[16vh]","rounded-lg shadow bg-white flex flex-col justify-start items-center gap-4 z-[0]","backdrop-blur-sm bg-gradient-to-bl from-white/10 to-white"),children:[v.jsxDEV("header",{className:"w-full flex flex-row justify-center p-8 md:px-16 signUp:px-8 xl:px-16",children:v.jsxDEV(T0,{to:"/login",children:v.jsxDEV("img",{src:"/img/svg/logo.svg",className:"h-10"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/index.tsx",lineNumber:108,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/index.tsx",lineNumber:107,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/index.tsx",lineNumber:106,columnNumber:5},this),v.jsxDEV("div",{className:"px-8 pb-8 md:px-32 signUp:px-16 xl:px-32 overflow-auto",children:[a==="EMAIL"&&v.jsxDEV(Mai,{onLogin:d},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/index.tsx",lineNumber:112,columnNumber:34},this),a==="VERIFY_CODE"&&v.jsxDEV(Lai,{email:i,autoVerification:!0,isSendingVerificationCode:u.isLoading,isVerifyCodeError:u.isError,onPrevious:()=>{r(""),l("EMAIL")},onRequestNewCode:()=>c.mutate({email:i},{onSuccess:()=>{Ei.success({placement:"bottomRight",message:t.formatMessage({id:"login.email.executed.retry.message",defaultMessage:"New verification code send to {email}."},{email:i})})}}),onSubmitCode:h=>u.mutate({email:i,authToken:h})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/index.tsx",lineNumber:114,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/index.tsx",lineNumber:111,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/index.tsx",lineNumber:99,columnNumber:4},this),v.jsxDEV(tOt,{className:"w-full !gap-4 !hidden md:!flex lg:!gap-8"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/index.tsx",lineNumber:154,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Login/index.tsx",lineNumber:92,columnNumber:3},this)}function Iai(t){if(!/^[0-9a-zA-Z-]+$/.test(t))throw new Error(`[@mantine/use-form] Form name "${t}" is invalid, it should contain only letters, numbers and dashes`)}const Aai=typeof window<"u"?b.useLayoutEffect:b.useEffect;function dh(t,e){Aai(()=>{if(t)return window.addEventListener(t,e),()=>window.removeEventListener(t,e)},[t])}function Rai(t,e){t&&Iai(t),dh(`mantine-form:${t}:set-field-value`,n=>e.setFieldValue(n.detail.path,n.detail.value)),dh(`mantine-form:${t}:set-values`,n=>e.setValues(n.detail)),dh(`mantine-form:${t}:set-initial-values`,n=>e.setInitialValues(n.detail)),dh(`mantine-form:${t}:set-errors`,n=>e.setErrors(n.detail)),dh(`mantine-form:${t}:set-field-error`,n=>e.setFieldError(n.detail.path,n.detail.error)),dh(`mantine-form:${t}:clear-field-error`,n=>e.clearFieldError(n.detail)),dh(`mantine-form:${t}:clear-errors`,e.clearErrors),dh(`mantine-form:${t}:reset`,e.reset),dh(`mantine-form:${t}:validate`,e.validate),dh(`mantine-form:${t}:validate-field`,n=>e.validateField(n.detail)),dh(`mantine-form:${t}:reorder-list-item`,n=>e.reorderListItem(n.detail.path,n.detail.payload)),dh(`mantine-form:${t}:remove-list-item`,n=>e.removeListItem(n.detail.path,n.detail.index)),dh(`mantine-form:${t}:insert-list-item`,n=>e.insertListItem(n.detail.path,n.detail.item,n.detail.index)),dh(`mantine-form:${t}:set-dirty`,n=>e.setDirty(n.detail)),dh(`mantine-form:${t}:set-touched`,n=>e.setTouched(n.detail)),dh(`mantine-form:${t}:reset-dirty`,n=>e.resetDirty(n.detail)),dh(`mantine-form:${t}:reset-touched`,e.resetTouched)}function Pai(t){return e=>{if(!e)t(e);else if(typeof e=="function")t(e);else if(typeof e=="object"&&"nativeEvent"in e){const{currentTarget:n}=e;n instanceof HTMLInputElement?n.type==="checkbox"?t(n.checked):t(n.value):(n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&t(n.value)}else t(e)}}function Jke(t){return t===null||typeof t!="object"?{}:Object.keys(t).reduce((e,n)=>{const i=t[n];return i!=null&&i!==!1&&(e[n]=i),e},{})}function Oai(t){const[e,n]=b.useState(Jke(t)),i=b.useRef(e),r=b.useCallback(l=>{n(c=>{const u=Jke(typeof l=="function"?l(c):l);return i.current=u,u})},[]),o=b.useCallback(()=>r({}),[]),s=b.useCallback(l=>{i.current[l]!==void 0&&r(c=>{const u={...c};return delete u[l],u})},[e]),a=b.useCallback((l,c)=>{c==null||c===!1?s(l):i.current[l]!==c&&r(u=>({...u,[l]:c}))},[e]);return{errorsState:e,setErrors:r,clearErrors:o,setFieldError:a,clearFieldError:s}}function eMe(t,e){if(e===null||typeof e!="object")return{};const n={...e};return Object.keys(e).forEach(i=>{i.includes(`${String(t)}.`)&&delete n[i]}),n}function iot(t,e){const n=t.substring(e.length+1).split(".")[0];return parseInt(n,10)}function rot(t,e,n,i){if(e===void 0)return n;const r=`${String(t)}`;let o=n;i===-1&&(o=eMe(`${r}.${e}`,o));const s={...o},a=new Set;return Object.entries(o).filter(([l])=>{if(!l.startsWith(`${r}.`))return!1;const c=iot(l,r);return Number.isNaN(c)?!1:c>=e}).forEach(([l,c])=>{const u=iot(l,r),d=l.replace(`${r}.${u}`,`${r}.${u+i}`);s[d]=c,a.add(d),a.has(l)||delete s[l]}),s}function jai(t,{from:e,to:n},i){const r=`${t}.${e}`,o=`${t}.${n}`,s={...i};return Object.keys(i).every(a=>{let l,c;if(a.startsWith(r)&&(l=a,c=a.replace(r,o)),a.startsWith(o)&&(l=a.replace(o,r),c=a),l&&c){const u=s[l],d=s[c];return d===void 0?delete s[l]:s[l]=d,u===void 0?delete s[c]:s[c]=u,!1}return!0}),s}function oot(t,e,n){typeof n.value=="object"&&(n.value=i4(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||e==="__proto__"?Object.defineProperty(t,e,n):t[e]=n.value}function i4(t){if(typeof t!="object")return t;var e=0,n,i,r,o=Object.prototype.toString.call(t);if(o==="[object Object]"?r=Object.create(t.__proto__||null):o==="[object Array]"?r=Array(t.length):o==="[object Set]"?(r=new Set,t.forEach(function(s){r.add(i4(s))})):o==="[object Map]"?(r=new Map,t.forEach(function(s,a){r.set(i4(a),i4(s))})):o==="[object Date]"?r=new Date(+t):o==="[object RegExp]"?r=new RegExp(t.source,t.flags):o==="[object DataView]"?r=new t.constructor(i4(t.buffer)):o==="[object ArrayBuffer]"?r=t.slice(0):o.slice(-6)==="Array]"&&(r=new t.constructor(t)),r){for(i=Object.getOwnPropertySymbols(t);e<i.length;e++)oot(r,i[e],Object.getOwnPropertyDescriptor(t,i[e]));for(e=0,i=Object.getOwnPropertyNames(t);e<i.length;e++)Object.hasOwnProperty.call(r,n=i[e])&&r[n]===t[n]||oot(r,n,Object.getOwnPropertyDescriptor(t,n))}return r||t}function nOt(t){return typeof t!="string"?[]:t.split(".")}function vf(t,e){const n=nOt(t);if(n.length===0||typeof e!="object"||e===null)return;let i=e[n[0]];for(let r=1;r<n.length&&i!=null;r+=1)i=i[n[r]];return i}function Cfe(t,e,n){const i=nOt(t);if(i.length===0)return n;const r=i4(n);if(i.length===1)return r[i[0]]=e,r;let o=r[i[0]];for(let s=1;s<i.length-1;s+=1){if(o===void 0)return r;o=o[i[s]]}return o[i[i.length-1]]=e,r}function Fai(t,{from:e,to:n},i){const r=vf(t,i);if(!Array.isArray(r))return i;const o=[...r],s=r[e];return o.splice(e,1),o.splice(n,0,s),Cfe(t,o,i)}function $ai(t,e,n,i){const r=vf(t,i);if(!Array.isArray(r))return i;const o=[...r];return o.splice(typeof n=="number"?n:o.length,0,e),Cfe(t,o,i)}function Vai(t,e,n){const i=vf(t,n);return Array.isArray(i)?Cfe(t,i.filter((r,o)=>o!==e),n):n}function Bai({$values:t,$errors:e,$status:n}){const i=b.useCallback((s,a)=>{n.clearFieldDirty(s),e.setErrors(l=>jai(s,a,l)),t.setValues({values:Fai(s,a,t.refValues.current),updateState:!0})},[]),r=b.useCallback((s,a)=>{n.clearFieldDirty(s),e.setErrors(l=>rot(s,a,l,-1)),t.setValues({values:Vai(s,a,t.refValues.current),updateState:!0})},[]),o=b.useCallback((s,a,l)=>{n.clearFieldDirty(s),e.setErrors(c=>rot(s,l,c,1)),t.setValues({values:$ai(s,a,l,t.refValues.current),updateState:!0})},[]);return{reorderListItem:i,removeListItem:r,insertListItem:o}}var zai=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var i,r,o;if(Array.isArray(e)){if(i=e.length,i!=n.length)return!1;for(r=i;r--!==0;)if(!t(e[r],n[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),i=o.length,i!==Object.keys(n).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[r]))return!1;for(r=i;r--!==0;){var s=o[r];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n};const nQ=ao(zai);function PV(t,e){const n=Object.keys(t);if(typeof e=="string"){const i=n.filter(r=>r.startsWith(`${e}.`));return t[e]||i.some(r=>t[r])||!1}return n.some(i=>t[i])}function Hai({initialDirty:t,initialTouched:e,mode:n,$values:i}){const[r,o]=b.useState(e),[s,a]=b.useState(t),l=b.useRef(e),c=b.useRef(t),u=b.useCallback(E=>{const D=typeof E=="function"?E(l.current):E;l.current=D,n==="controlled"&&o(D)},[]),d=b.useCallback((E,D=!1)=>{const k=typeof E=="function"?E(c.current):E;c.current=k,(n==="controlled"||D)&&a(k)},[]),h=b.useCallback(()=>u({}),[]),f=E=>{const D=E?{...E,...i.refValues.current}:i.refValues.current;i.setValuesSnapshot(D),d({})},m=b.useCallback((E,D)=>{u(k=>PV(k,E)===D?k:{...k,[E]:D})},[]),p=b.useCallback((E,D,k)=>{d(M=>PV(M,E)===D?M:{...M,[E]:D},k)},[]),g=b.useCallback((E,D)=>{const k=PV(c.current,E),M=!nQ(vf(E,i.getValuesSnapshot()),D),T=eMe(E,c.current);T[E]=M,d(T,k!==M)},[]),y=b.useCallback(E=>PV(l.current,E),[]),_=b.useCallback(E=>d(D=>{if(typeof E!="string")return D;const k=eMe(E,D);return delete k[E],nQ(k,D)?D:k}),[]),w=b.useCallback(E=>{if(E){const k=vf(E,c.current);if(typeof k=="boolean")return k;const M=vf(E,i.refValues.current),T=vf(E,i.valuesSnapshot.current);return!nQ(M,T)}return Object.keys(c.current).length>0?PV(c.current):!nQ(i.refValues.current,i.valuesSnapshot.current)},[]),C=b.useCallback(()=>c.current,[]),N=b.useCallback(()=>l.current,[]);return{touchedState:r,dirtyState:s,touchedRef:l,dirtyRef:c,setTouched:u,setDirty:d,resetDirty:f,resetTouched:h,isTouched:y,setFieldTouched:m,setFieldDirty:p,setTouchedState:o,setDirtyState:a,clearFieldDirty:_,isDirty:w,getDirty:C,getTouched:N,setCalculatedFieldDirty:g}}function Wai({initialValues:t,onValuesChange:e,mode:n}){const i=b.useRef(!1),[r,o]=b.useState(t||{}),s=b.useRef(r),a=b.useRef(r),l=b.useCallback(({values:p,subscribers:g,updateState:y=!0,mergeWithPreviousValues:_=!0})=>{const w=s.current,C=p instanceof Function?p(s.current):p,N=_?{...w,...C}:C;s.current=N,y&&o(N),e==null||e(N,w),g==null||g.filter(Boolean).forEach(E=>E({updatedValues:N,previousValues:w}))},[e]),c=b.useCallback(p=>{var _;const g=vf(p.path,s.current),y=p.value instanceof Function?p.value(g):p.value;if(g!==y){const w=s.current,C=Cfe(p.path,y,s.current);l({values:C,updateState:p.updateState}),(_=p.subscribers)==null||_.filter(Boolean).forEach(N=>N({path:p.path,updatedValues:C,previousValues:w}))}},[l]),u=b.useCallback(p=>{a.current=p},[]),d=b.useCallback((p,g)=>{i.current||(i.current=!0,l({values:p,updateState:n==="controlled"}),u(p),g())},[l]),h=b.useCallback(()=>{l({values:a.current,updateState:!0,mergeWithPreviousValues:!1})},[l]),f=b.useCallback(()=>s.current,[]),m=b.useCallback(()=>a.current,[]);return{initialized:i,stateValues:r,refValues:s,valuesSnapshot:a,setValues:l,setFieldValue:c,resetValues:h,setValuesSnapshot:u,initialize:d,getValues:f,getValuesSnapshot:m}}function Uai({$status:t}){const e=b.useRef({}),n=b.useCallback((r,o)=>{b.useEffect(()=>(e.current[r]=e.current[r]||[],e.current[r].push(o),()=>{e.current[r]=e.current[r].filter(s=>s!==o)}),[o])},[]),i=b.useCallback(r=>e.current[r]?e.current[r].map(o=>s=>o({previousValue:vf(r,s.previousValues),value:vf(r,s.updatedValues),touched:t.isTouched(r),dirty:t.isDirty(r)})):[],[]);return{subscribers:e,watch:n,getFieldSubscribers:i}}function sot(t,e){return t?`${t}-${e.toString()}`:e.toString()}function aot(t){const e=Jke(t);return{hasErrors:Object.keys(e).length>0,errors:e}}function tMe(t,e,n="",i={}){return typeof t!="object"||t===null?i:Object.keys(t).reduce((r,o)=>{const s=t[o],a=`${n===""?"":`${n}.`}${o}`,l=vf(a,e);let c=!1;return typeof s=="function"&&(r[a]=s(l,e,a)),typeof s=="object"&&Array.isArray(l)&&(c=!0,l.forEach((u,d)=>tMe(s,e,`${a}.${d}`,r))),typeof s=="object"&&typeof l=="object"&&l!==null&&(c||tMe(s,e,a,r)),r},i)}function nMe(t,e){return aot(typeof t=="function"?t(e):tMe(t,e))}function iQ(t,e,n){if(typeof t!="string")return{hasError:!1,error:null};const i=nMe(e,n),r=Object.keys(i.errors).find(o=>t.split(".").every((s,a)=>s===o.split(".")[a]));return{hasError:!!r,error:r?i.errors[r]:null}}const Kai="__MANTINE_FORM_INDEX__";function lot(t,e){return e?typeof e=="boolean"?e:Array.isArray(e)?e.includes(t.replace(/[.][0-9]+/g,`.${Kai}`)):!1:!1}function ls({name:t,mode:e="controlled",initialValues:n,initialErrors:i={},initialDirty:r={},initialTouched:o={},clearInputErrorOnChange:s=!0,validateInputOnChange:a=!1,validateInputOnBlur:l=!1,onValuesChange:c,transformValues:u=f=>f,enhanceGetInputProps:d,validate:h}={}){const f=Oai(i),m=Wai({initialValues:n,onValuesChange:c,mode:e}),p=Hai({initialDirty:r,initialTouched:o,$values:m,mode:e}),g=Bai({$values:m,$errors:f,$status:p}),y=Uai({$status:p}),[_,w]=b.useState(0),[C,N]=b.useState({}),E=b.useCallback(()=>{m.resetValues(),f.clearErrors(),p.resetDirty(),p.resetTouched(),e==="uncontrolled"&&w(K=>K+1)},[]),D=b.useCallback(K=>{s&&f.clearErrors(),e==="uncontrolled"&&w(q=>q+1),Object.keys(y.subscribers.current).forEach(q=>{const U=vf(q,m.refValues.current),Y=vf(q,K);U!==Y&&y.getFieldSubscribers(q).forEach(J=>J({previousValues:K,updatedValues:m.refValues.current}))})},[s]),k=b.useCallback(K=>{const q=m.refValues.current;m.initialize(K,()=>e==="uncontrolled"&&w(U=>U+1)),D(q)},[D]),M=b.useCallback((K,q,U)=>{const Y=lot(K,a),J=q instanceof Function?q(vf(K,m.refValues.current)):q;p.setCalculatedFieldDirty(K,J),p.setFieldTouched(K,!0),!Y&&s&&f.clearFieldError(K),m.setFieldValue({path:K,value:q,updateState:e==="controlled",subscribers:[...y.getFieldSubscribers(K),Y?ae=>{const se=iQ(K,h,ae.updatedValues);se.hasError?f.setFieldError(K,se.error):f.clearFieldError(K)}:null,(U==null?void 0:U.forceUpdate)!==!1&&e!=="controlled"?()=>N(ae=>({...ae,[K]:(ae[K]||0)+1})):null]})},[c,h]),T=b.useCallback(K=>{const q=m.refValues.current;m.setValues({values:K,updateState:e==="controlled"}),D(q)},[c,D]),A=b.useCallback(()=>{const K=nMe(h,m.refValues.current);return f.setErrors(K.errors),K},[h]),R=b.useCallback(K=>{const q=iQ(K,h,m.refValues.current);return q.hasError?f.setFieldError(K,q.error):f.clearFieldError(K),q},[h]),P=(K,{type:q="input",withError:U=!0,withFocus:Y=!0,...J}={})=>{const se={onChange:Pai(oe=>M(K,oe,{forceUpdate:!1})),"data-path":sot(t,K)};return U&&(se.error=f.errorsState[K]),q==="checkbox"?se[e==="controlled"?"checked":"defaultChecked"]=vf(K,m.refValues.current):se[e==="controlled"?"value":"defaultValue"]=vf(K,m.refValues.current),Y&&(se.onFocus=()=>p.setFieldTouched(K,!0),se.onBlur=()=>{if(lot(K,l)){const oe=iQ(K,h,m.refValues.current);oe.hasError?f.setFieldError(K,oe.error):f.clearFieldError(K)}}),Object.assign(se,d==null?void 0:d({inputProps:se,field:K,options:{type:q,withError:U,withFocus:Y,...J},form:H}))},O=(K,q)=>U=>{U==null||U.preventDefault();const Y=A();Y.hasErrors?q==null||q(Y.errors,m.refValues.current,U):K==null||K(u(m.refValues.current),U)},V=K=>u(K||m.refValues.current),F=b.useCallback(K=>{K.preventDefault(),E()},[]),$=b.useCallback(K=>K?!iQ(K,h,m.refValues.current).hasError:!nMe(h,m.refValues.current).hasErrors,[h]),B=K=>`${_}-${K}-${C[K]||0}`,z=b.useCallback(K=>document.querySelector(`[data-path="${sot(t,K)}"]`),[]),H={watch:y.watch,initialized:m.initialized.current,values:m.stateValues,getValues:m.getValues,setInitialValues:m.setValuesSnapshot,initialize:k,setValues:T,setFieldValue:M,errors:f.errorsState,setErrors:f.setErrors,setFieldError:f.setFieldError,clearFieldError:f.clearFieldError,clearErrors:f.clearErrors,resetDirty:p.resetDirty,setTouched:p.setTouched,setDirty:p.setDirty,isTouched:p.isTouched,resetTouched:p.resetTouched,isDirty:p.isDirty,getTouched:p.getTouched,getDirty:p.getDirty,reorderListItem:g.reorderListItem,insertListItem:g.insertListItem,removeListItem:g.removeListItem,reset:E,validate:A,validateField:R,getInputProps:P,onSubmit:O,onReset:F,isValid:$,getTransformedValues:V,key:B,getInputNode:z};return Rai(t,H),H}function iOt(t){return e=>{const n=t.safeParse(e);if(n.success)return{};const i={};return n.error.errors.forEach(r=>{i[r.path.join(".")]=r.message}),i}}function aa(t,e){return n=>{const i=t.safeParse(n);if(i.success)return{};const r={};return"error"in i&&i.error.errors.forEach(o=>{r[o.path.join(".")]=o.message}),r}}var Fs;(function(t){t.assertEqual=r=>r;function e(r){}t.assertIs=e;function n(r){throw new Error}t.assertNever=n,t.arrayToEnum=r=>{const o={};for(const s of r)o[s]=s;return o},t.getValidEnumValues=r=>{const o=t.objectKeys(r).filter(a=>typeof r[r[a]]!="number"),s={};for(const a of o)s[a]=r[a];return t.objectValues(s)},t.objectValues=r=>t.objectKeys(r).map(function(o){return r[o]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const o=[];for(const s in r)Object.prototype.hasOwnProperty.call(r,s)&&o.push(s);return o},t.find=(r,o)=>{for(const s of r)if(o(s))return s},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&isFinite(r)&&Math.floor(r)===r;function i(r,o=" | "){return r.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}t.joinValues=i,t.jsonStringifyReplacer=(r,o)=>typeof o=="bigint"?o.toString():o})(Fs||(Fs={}));var iMe;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(iMe||(iMe={}));const zi=Fs.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),xE=t=>{switch(typeof t){case"undefined":return zi.undefined;case"string":return zi.string;case"number":return isNaN(t)?zi.nan:zi.number;case"boolean":return zi.boolean;case"function":return zi.function;case"bigint":return zi.bigint;case"symbol":return zi.symbol;case"object":return Array.isArray(t)?zi.array:t===null?zi.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?zi.promise:typeof Map<"u"&&t instanceof Map?zi.map:typeof Set<"u"&&t instanceof Set?zi.set:typeof Date<"u"&&t instanceof Date?zi.date:zi.object;default:return zi.unknown}},Yn=Fs.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),qai=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Qg extends Error{constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(o){return o.message},i={_errors:[]},r=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(r);else if(s.code==="invalid_return_type")r(s.returnTypeError);else if(s.code==="invalid_arguments")r(s.argumentsError);else if(s.path.length===0)i._errors.push(n(s));else{let a=i,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return r(this),i}static assert(e){if(!(e instanceof Qg))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Fs.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},i=[];for(const r of this.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(e(r))):i.push(e(r));return{formErrors:i,fieldErrors:n}}get formErrors(){return this.flatten()}}Qg.create=t=>new Qg(t);const Zj=(t,e)=>{let n;switch(t.code){case Yn.invalid_type:t.received===zi.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case Yn.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Fs.jsonStringifyReplacer)}`;break;case Yn.unrecognized_keys:n=`Unrecognized key(s) in object: ${Fs.joinValues(t.keys,", ")}`;break;case Yn.invalid_union:n="Invalid input";break;case Yn.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Fs.joinValues(t.options)}`;break;case Yn.invalid_enum_value:n=`Invalid enum value. Expected ${Fs.joinValues(t.options)}, received '${t.received}'`;break;case Yn.invalid_arguments:n="Invalid function arguments";break;case Yn.invalid_return_type:n="Invalid function return type";break;case Yn.invalid_date:n="Invalid date";break;case Yn.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Fs.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case Yn.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case Yn.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case Yn.custom:n="Invalid input";break;case Yn.invalid_intersection_types:n="Intersection results could not be merged";break;case Yn.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case Yn.not_finite:n="Number must be finite";break;default:n=e.defaultError,Fs.assertNever(t)}return{message:n}};let rOt=Zj;function Gai(t){rOt=t}function gie(){return rOt}const bie=t=>{const{data:e,path:n,errorMaps:i,issueData:r}=t,o=[...n,...r.path||[]],s={...r,path:o};if(r.message!==void 0)return{...r,path:o,message:r.message};let a="";const l=i.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:e,defaultError:a}).message;return{...r,path:o,message:a}},Yai=[];function Ri(t,e){const n=gie(),i=bie({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Zj?void 0:Zj].filter(r=>!!r)});t.common.issues.push(i)}class Df{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const i=[];for(const r of n){if(r.status==="aborted")return oo;r.status==="dirty"&&e.dirty(),i.push(r.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,n){const i=[];for(const r of n){const o=await r.key,s=await r.value;i.push({key:o,value:s})}return Df.mergeObjectSync(e,i)}static mergeObjectSync(e,n){const i={};for(const r of n){const{key:o,value:s}=r;if(o.status==="aborted"||s.status==="aborted")return oo;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||r.alwaysSet)&&(i[o.value]=s.value)}return{status:e.value,value:i}}}const oo=Object.freeze({status:"aborted"}),r4=t=>({status:"dirty",value:t}),Lm=t=>({status:"valid",value:t}),rMe=t=>t.status==="aborted",oMe=t=>t.status==="dirty",Jz=t=>t.status==="valid",eH=t=>typeof Promise<"u"&&t instanceof Promise;function vie(t,e,n,i){if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function oOt(t,e,n,i,r){if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}var br;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(br||(br={}));var U7,K7;class aw{constructor(e,n,i,r){this._cachedPath=[],this.parent=e,this.data=n,this._path=i,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const cot=(t,e)=>{if(Jz(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Qg(t.common.issues);return this._error=n,this._error}}};function jo(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:i,description:r}=t;if(e&&(n||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:r}:{errorMap:(s,a)=>{var l,c;const{message:u}=t;return s.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??i)!==null&&l!==void 0?l:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:r}}class Ho{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return xE(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:xE(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Df,ctx:{common:e.parent.common,data:e.data,parsedType:xE(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(eH(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const i=this.safeParse(e,n);if(i.success)return i.data;throw i.error}safeParse(e,n){var i;const r={common:{issues:[],async:(i=n==null?void 0:n.async)!==null&&i!==void 0?i:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xE(e)},o=this._parseSync({data:e,path:r.path,parent:r});return cot(r,o)}async parseAsync(e,n){const i=await this.safeParseAsync(e,n);if(i.success)return i.data;throw i.error}async safeParseAsync(e,n){const i={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xE(e)},r=this._parse({data:e,path:i.path,parent:i}),o=await(eH(r)?r:Promise.resolve(r));return cot(i,o)}refine(e,n){const i=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,o)=>{const s=e(r),a=()=>o.addIssue({code:Yn.custom,...i(r)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,n){return this._refinement((i,r)=>e(i)?!0:(r.addIssue(typeof n=="function"?n(i,r):n),!1))}_refinement(e){return new B0({schema:this,typeName:Zr.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Bx.create(this,this._def)}nullable(){return rk.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return v0.create(this,this._def)}promise(){return Jj.create(this,this._def)}or(e){return rH.create([this,e],this._def)}and(e){return oH.create(this,e,this._def)}transform(e){return new B0({...jo(this._def),schema:this,typeName:Zr.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new uH({...jo(this._def),innerType:this,defaultValue:n,typeName:Zr.ZodDefault})}brand(){return new i8e({typeName:Zr.ZodBranded,type:this,...jo(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new dH({...jo(this._def),innerType:this,catchValue:n,typeName:Zr.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return dq.create(this,e)}readonly(){return hH.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Xai=/^c[^\s-]{8,}$/i,Zai=/^[0-9a-z]+$/,Qai=/^[0-9A-HJKMNP-TV-Z]{26}$/,Jai=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,eli=/^[a-z0-9_-]{21}$/i,tli=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,nli=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ili="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let mwe;const rli=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,oli=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,sli=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,sOt="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ali=new RegExp(`^${sOt}$`);function aOt(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function lli(t){return new RegExp(`^${aOt(t)}$`)}function lOt(t){let e=`${sOt}T${aOt(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function cli(t,e){return!!((e==="v4"||!e)&&rli.test(t)||(e==="v6"||!e)&&oli.test(t))}class s0 extends Ho{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==zi.string){const o=this._getOrReturnCtx(e);return Ri(o,{code:Yn.invalid_type,expected:zi.string,received:o.parsedType}),oo}const i=new Df;let r;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(r=this._getOrReturnCtx(e,r),Ri(r,{code:Yn.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="max")e.data.length>o.value&&(r=this._getOrReturnCtx(e,r),Ri(r,{code:Yn.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="length"){const s=e.data.length>o.value,a=e.data.length<o.value;(s||a)&&(r=this._getOrReturnCtx(e,r),s?Ri(r,{code:Yn.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&Ri(r,{code:Yn.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),i.dirty())}else if(o.kind==="email")nli.test(e.data)||(r=this._getOrReturnCtx(e,r),Ri(r,{validation:"email",code:Yn.invalid_string,message:o.message}),i.dirty());else if(o.kind==="emoji")mwe||(mwe=new RegExp(ili,"u")),mwe.test(e.data)||(r=this._getOrReturnCtx(e,r),Ri(r,{validation:"emoji",code:Yn.invalid_string,message:o.message}),i.dirty());else if(o.kind==="uuid")Jai.test(e.data)||(r=this._getOrReturnCtx(e,r),Ri(r,{validation:"uuid",code:Yn.invalid_string,message:o.message}),i.dirty());else if(o.kind==="nanoid")eli.test(e.data)||(r=this._getOrReturnCtx(e,r),Ri(r,{validation:"nanoid",code:Yn.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid")Xai.test(e.data)||(r=this._getOrReturnCtx(e,r),Ri(r,{validation:"cuid",code:Yn.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid2")Zai.test(e.data)||(r=this._getOrReturnCtx(e,r),Ri(r,{validation:"cuid2",code:Yn.invalid_string,message:o.message}),i.dirty());else if(o.kind==="ulid")Qai.test(e.data)||(r=this._getOrReturnCtx(e,r),Ri(r,{validation:"ulid",code:Yn.invalid_string,message:o.message}),i.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{r=this._getOrReturnCtx(e,r),Ri(r,{validation:"url",code:Yn.invalid_string,message:o.message}),i.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),Ri(r,{validation:"regex",code:Yn.invalid_string,message:o.message}),i.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(r=this._getOrReturnCtx(e,r),Ri(r,{code:Yn.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),i.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(r=this._getOrReturnCtx(e,r),Ri(r,{code:Yn.invalid_string,validation:{startsWith:o.value},message:o.message}),i.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(r=this._getOrReturnCtx(e,r),Ri(r,{code:Yn.invalid_string,validation:{endsWith:o.value},message:o.message}),i.dirty()):o.kind==="datetime"?lOt(o).test(e.data)||(r=this._getOrReturnCtx(e,r),Ri(r,{code:Yn.invalid_string,validation:"datetime",message:o.message}),i.dirty()):o.kind==="date"?ali.test(e.data)||(r=this._getOrReturnCtx(e,r),Ri(r,{code:Yn.invalid_string,validation:"date",message:o.message}),i.dirty()):o.kind==="time"?lli(o).test(e.data)||(r=this._getOrReturnCtx(e,r),Ri(r,{code:Yn.invalid_string,validation:"time",message:o.message}),i.dirty()):o.kind==="duration"?tli.test(e.data)||(r=this._getOrReturnCtx(e,r),Ri(r,{validation:"duration",code:Yn.invalid_string,message:o.message}),i.dirty()):o.kind==="ip"?cli(e.data,o.version)||(r=this._getOrReturnCtx(e,r),Ri(r,{validation:"ip",code:Yn.invalid_string,message:o.message}),i.dirty()):o.kind==="base64"?sli.test(e.data)||(r=this._getOrReturnCtx(e,r),Ri(r,{validation:"base64",code:Yn.invalid_string,message:o.message}),i.dirty()):Fs.assertNever(o);return{status:i.value,value:e.data}}_regex(e,n,i){return this.refinement(r=>e.test(r),{validation:n,code:Yn.invalid_string,...br.errToObj(i)})}_addCheck(e){return new s0({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...br.errToObj(e)})}url(e){return this._addCheck({kind:"url",...br.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...br.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...br.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...br.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...br.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...br.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...br.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...br.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...br.errToObj(e)})}datetime(e){var n,i;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(i=e==null?void 0:e.local)!==null&&i!==void 0?i:!1,...br.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...br.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...br.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...br.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...br.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...br.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...br.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...br.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...br.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...br.errToObj(n)})}nonempty(e){return this.min(1,br.errToObj(e))}trim(){return new s0({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new s0({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new s0({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}s0.create=t=>{var e;return new s0({checks:[],typeName:Zr.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...jo(t)})};function uli(t,e){const n=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,r=n>i?n:i,o=parseInt(t.toFixed(r).replace(".","")),s=parseInt(e.toFixed(r).replace(".",""));return o%s/Math.pow(10,r)}class tk extends Ho{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==zi.number){const o=this._getOrReturnCtx(e);return Ri(o,{code:Yn.invalid_type,expected:zi.number,received:o.parsedType}),oo}let i;const r=new Df;for(const o of this._def.checks)o.kind==="int"?Fs.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),Ri(i,{code:Yn.invalid_type,expected:"integer",received:"float",message:o.message}),r.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(i=this._getOrReturnCtx(e,i),Ri(i,{code:Yn.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),r.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(i=this._getOrReturnCtx(e,i),Ri(i,{code:Yn.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),r.dirty()):o.kind==="multipleOf"?uli(e.data,o.value)!==0&&(i=this._getOrReturnCtx(e,i),Ri(i,{code:Yn.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),Ri(i,{code:Yn.not_finite,message:o.message}),r.dirty()):Fs.assertNever(o);return{status:r.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,br.toString(n))}gt(e,n){return this.setLimit("min",e,!1,br.toString(n))}lte(e,n){return this.setLimit("max",e,!0,br.toString(n))}lt(e,n){return this.setLimit("max",e,!1,br.toString(n))}setLimit(e,n,i,r){return new tk({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:br.toString(r)}]})}_addCheck(e){return new tk({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:br.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:br.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:br.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:br.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:br.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:br.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:br.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:br.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:br.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Fs.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(n===null||i.value>n)&&(n=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(n)&&Number.isFinite(e)}}tk.create=t=>new tk({checks:[],typeName:Zr.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...jo(t)});class nk extends Ho{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==zi.bigint){const o=this._getOrReturnCtx(e);return Ri(o,{code:Yn.invalid_type,expected:zi.bigint,received:o.parsedType}),oo}let i;const r=new Df;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(i=this._getOrReturnCtx(e,i),Ri(i,{code:Yn.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(i=this._getOrReturnCtx(e,i),Ri(i,{code:Yn.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),Ri(i,{code:Yn.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):Fs.assertNever(o);return{status:r.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,br.toString(n))}gt(e,n){return this.setLimit("min",e,!1,br.toString(n))}lte(e,n){return this.setLimit("max",e,!0,br.toString(n))}lt(e,n){return this.setLimit("max",e,!1,br.toString(n))}setLimit(e,n,i,r){return new nk({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:br.toString(r)}]})}_addCheck(e){return new nk({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:br.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:br.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:br.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:br.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:br.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}nk.create=t=>{var e;return new nk({checks:[],typeName:Zr.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...jo(t)})};class tH extends Ho{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==zi.boolean){const i=this._getOrReturnCtx(e);return Ri(i,{code:Yn.invalid_type,expected:zi.boolean,received:i.parsedType}),oo}return Lm(e.data)}}tH.create=t=>new tH({typeName:Zr.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...jo(t)});class F2 extends Ho{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==zi.date){const o=this._getOrReturnCtx(e);return Ri(o,{code:Yn.invalid_type,expected:zi.date,received:o.parsedType}),oo}if(isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return Ri(o,{code:Yn.invalid_date}),oo}const i=new Df;let r;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(r=this._getOrReturnCtx(e,r),Ri(r,{code:Yn.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),i.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(r=this._getOrReturnCtx(e,r),Ri(r,{code:Yn.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),i.dirty()):Fs.assertNever(o);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new F2({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:br.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:br.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}F2.create=t=>new F2({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Zr.ZodDate,...jo(t)});class yie extends Ho{_parse(e){if(this._getType(e)!==zi.symbol){const i=this._getOrReturnCtx(e);return Ri(i,{code:Yn.invalid_type,expected:zi.symbol,received:i.parsedType}),oo}return Lm(e.data)}}yie.create=t=>new yie({typeName:Zr.ZodSymbol,...jo(t)});class nH extends Ho{_parse(e){if(this._getType(e)!==zi.undefined){const i=this._getOrReturnCtx(e);return Ri(i,{code:Yn.invalid_type,expected:zi.undefined,received:i.parsedType}),oo}return Lm(e.data)}}nH.create=t=>new nH({typeName:Zr.ZodUndefined,...jo(t)});class iH extends Ho{_parse(e){if(this._getType(e)!==zi.null){const i=this._getOrReturnCtx(e);return Ri(i,{code:Yn.invalid_type,expected:zi.null,received:i.parsedType}),oo}return Lm(e.data)}}iH.create=t=>new iH({typeName:Zr.ZodNull,...jo(t)});class Qj extends Ho{constructor(){super(...arguments),this._any=!0}_parse(e){return Lm(e.data)}}Qj.create=t=>new Qj({typeName:Zr.ZodAny,...jo(t)});class nI extends Ho{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Lm(e.data)}}nI.create=t=>new nI({typeName:Zr.ZodUnknown,...jo(t)});class lS extends Ho{_parse(e){const n=this._getOrReturnCtx(e);return Ri(n,{code:Yn.invalid_type,expected:zi.never,received:n.parsedType}),oo}}lS.create=t=>new lS({typeName:Zr.ZodNever,...jo(t)});class _ie extends Ho{_parse(e){if(this._getType(e)!==zi.undefined){const i=this._getOrReturnCtx(e);return Ri(i,{code:Yn.invalid_type,expected:zi.void,received:i.parsedType}),oo}return Lm(e.data)}}_ie.create=t=>new _ie({typeName:Zr.ZodVoid,...jo(t)});class v0 extends Ho{_parse(e){const{ctx:n,status:i}=this._processInputParams(e),r=this._def;if(n.parsedType!==zi.array)return Ri(n,{code:Yn.invalid_type,expected:zi.array,received:n.parsedType}),oo;if(r.exactLength!==null){const s=n.data.length>r.exactLength.value,a=n.data.length<r.exactLength.value;(s||a)&&(Ri(n,{code:s?Yn.too_big:Yn.too_small,minimum:a?r.exactLength.value:void 0,maximum:s?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),i.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(Ri(n,{code:Yn.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),i.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(Ri(n,{code:Yn.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),i.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>r.type._parseAsync(new aw(n,s,n.path,a)))).then(s=>Df.mergeArray(i,s));const o=[...n.data].map((s,a)=>r.type._parseSync(new aw(n,s,n.path,a)));return Df.mergeArray(i,o)}get element(){return this._def.type}min(e,n){return new v0({...this._def,minLength:{value:e,message:br.toString(n)}})}max(e,n){return new v0({...this._def,maxLength:{value:e,message:br.toString(n)}})}length(e,n){return new v0({...this._def,exactLength:{value:e,message:br.toString(n)}})}nonempty(e){return this.min(1,e)}}v0.create=(t,e)=>new v0({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Zr.ZodArray,...jo(e)});function IO(t){if(t instanceof rc){const e={};for(const n in t.shape){const i=t.shape[n];e[n]=Bx.create(IO(i))}return new rc({...t._def,shape:()=>e})}else return t instanceof v0?new v0({...t._def,type:IO(t.element)}):t instanceof Bx?Bx.create(IO(t.unwrap())):t instanceof rk?rk.create(IO(t.unwrap())):t instanceof lw?lw.create(t.items.map(e=>IO(e))):t}class rc extends Ho{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Fs.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==zi.object){const c=this._getOrReturnCtx(e);return Ri(c,{code:Yn.invalid_type,expected:zi.object,received:c.parsedType}),oo}const{status:i,ctx:r}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof lS&&this._def.unknownKeys==="strip"))for(const c in r.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=o[c],d=r.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new aw(r,d,r.path,c)),alwaysSet:c in r.data})}if(this._def.catchall instanceof lS){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:r.data[u]}});else if(c==="strict")a.length>0&&(Ri(r,{code:Yn.unrecognized_keys,keys:a}),i.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=r.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new aw(r,d,r.path,u)),alwaysSet:u in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,h=await u.value;c.push({key:d,value:h,alwaysSet:u.alwaysSet})}return c}).then(c=>Df.mergeObjectSync(i,c)):Df.mergeObjectSync(i,l)}get shape(){return this._def.shape()}strict(e){return br.errToObj,new rc({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,i)=>{var r,o,s,a;const l=(s=(o=(r=this._def).errorMap)===null||o===void 0?void 0:o.call(r,n,i).message)!==null&&s!==void 0?s:i.defaultError;return n.code==="unrecognized_keys"?{message:(a=br.errToObj(e).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new rc({...this._def,unknownKeys:"strip"})}passthrough(){return new rc({...this._def,unknownKeys:"passthrough"})}extend(e){return new rc({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new rc({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Zr.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new rc({...this._def,catchall:e})}pick(e){const n={};return Fs.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(n[i]=this.shape[i])}),new rc({...this._def,shape:()=>n})}omit(e){const n={};return Fs.objectKeys(this.shape).forEach(i=>{e[i]||(n[i]=this.shape[i])}),new rc({...this._def,shape:()=>n})}deepPartial(){return IO(this)}partial(e){const n={};return Fs.objectKeys(this.shape).forEach(i=>{const r=this.shape[i];e&&!e[i]?n[i]=r:n[i]=r.optional()}),new rc({...this._def,shape:()=>n})}required(e){const n={};return Fs.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])n[i]=this.shape[i];else{let o=this.shape[i];for(;o instanceof Bx;)o=o._def.innerType;n[i]=o}}),new rc({...this._def,shape:()=>n})}keyof(){return cOt(Fs.objectKeys(this.shape))}}rc.create=(t,e)=>new rc({shape:()=>t,unknownKeys:"strip",catchall:lS.create(),typeName:Zr.ZodObject,...jo(e)});rc.strictCreate=(t,e)=>new rc({shape:()=>t,unknownKeys:"strict",catchall:lS.create(),typeName:Zr.ZodObject,...jo(e)});rc.lazycreate=(t,e)=>new rc({shape:t,unknownKeys:"strip",catchall:lS.create(),typeName:Zr.ZodObject,...jo(e)});class rH extends Ho{_parse(e){const{ctx:n}=this._processInputParams(e),i=this._def.options;function r(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(a=>new Qg(a.ctx.common.issues));return Ri(n,{code:Yn.invalid_union,unionErrors:s}),oo}if(n.common.async)return Promise.all(i.map(async o=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(r);{let o;const s=[];for(const l of i){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(l=>new Qg(l));return Ri(n,{code:Yn.invalid_union,unionErrors:a}),oo}}get options(){return this._def.options}}rH.create=(t,e)=>new rH({options:t,typeName:Zr.ZodUnion,...jo(e)});const k1=t=>t instanceof aH?k1(t.schema):t instanceof B0?k1(t.innerType()):t instanceof lH?[t.value]:t instanceof ik?t.options:t instanceof cH?Fs.objectValues(t.enum):t instanceof uH?k1(t._def.innerType):t instanceof nH?[void 0]:t instanceof iH?[null]:t instanceof Bx?[void 0,...k1(t.unwrap())]:t instanceof rk?[null,...k1(t.unwrap())]:t instanceof i8e||t instanceof hH?k1(t.unwrap()):t instanceof dH?k1(t._def.innerType):[];class Sfe extends Ho{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==zi.object)return Ri(n,{code:Yn.invalid_type,expected:zi.object,received:n.parsedType}),oo;const i=this.discriminator,r=n.data[i],o=this.optionsMap.get(r);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(Ri(n,{code:Yn.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),oo)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,i){const r=new Map;for(const o of n){const s=k1(o.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of s){if(r.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);r.set(a,o)}}return new Sfe({typeName:Zr.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:r,...jo(i)})}}function sMe(t,e){const n=xE(t),i=xE(e);if(t===e)return{valid:!0,data:t};if(n===zi.object&&i===zi.object){const r=Fs.objectKeys(e),o=Fs.objectKeys(t).filter(a=>r.indexOf(a)!==-1),s={...t,...e};for(const a of o){const l=sMe(t[a],e[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===zi.array&&i===zi.array){if(t.length!==e.length)return{valid:!1};const r=[];for(let o=0;o<t.length;o++){const s=t[o],a=e[o],l=sMe(s,a);if(!l.valid)return{valid:!1};r.push(l.data)}return{valid:!0,data:r}}else return n===zi.date&&i===zi.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class oH extends Ho{_parse(e){const{status:n,ctx:i}=this._processInputParams(e),r=(o,s)=>{if(rMe(o)||rMe(s))return oo;const a=sMe(o.value,s.value);return a.valid?((oMe(o)||oMe(s))&&n.dirty(),{status:n.value,value:a.data}):(Ri(i,{code:Yn.invalid_intersection_types}),oo)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([o,s])=>r(o,s)):r(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}oH.create=(t,e,n)=>new oH({left:t,right:e,typeName:Zr.ZodIntersection,...jo(n)});class lw extends Ho{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==zi.array)return Ri(i,{code:Yn.invalid_type,expected:zi.array,received:i.parsedType}),oo;if(i.data.length<this._def.items.length)return Ri(i,{code:Yn.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),oo;!this._def.rest&&i.data.length>this._def.items.length&&(Ri(i,{code:Yn.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...i.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new aw(i,s,i.path,a)):null}).filter(s=>!!s);return i.common.async?Promise.all(o).then(s=>Df.mergeArray(n,s)):Df.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new lw({...this._def,rest:e})}}lw.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new lw({items:t,typeName:Zr.ZodTuple,rest:null,...jo(e)})};class sH extends Ho{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==zi.object)return Ri(i,{code:Yn.invalid_type,expected:zi.object,received:i.parsedType}),oo;const r=[],o=this._def.keyType,s=this._def.valueType;for(const a in i.data)r.push({key:o._parse(new aw(i,a,i.path,a)),value:s._parse(new aw(i,i.data[a],i.path,a)),alwaysSet:a in i.data});return i.common.async?Df.mergeObjectAsync(n,r):Df.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(e,n,i){return n instanceof Ho?new sH({keyType:e,valueType:n,typeName:Zr.ZodRecord,...jo(i)}):new sH({keyType:s0.create(),valueType:e,typeName:Zr.ZodRecord,...jo(n)})}}class xie extends Ho{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==zi.map)return Ri(i,{code:Yn.invalid_type,expected:zi.map,received:i.parsedType}),oo;const r=this._def.keyType,o=this._def.valueType,s=[...i.data.entries()].map(([a,l],c)=>({key:r._parse(new aw(i,a,i.path,[c,"key"])),value:o._parse(new aw(i,l,i.path,[c,"value"]))}));if(i.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return oo;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return oo;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}xie.create=(t,e,n)=>new xie({valueType:e,keyType:t,typeName:Zr.ZodMap,...jo(n)});class $2 extends Ho{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==zi.set)return Ri(i,{code:Yn.invalid_type,expected:zi.set,received:i.parsedType}),oo;const r=this._def;r.minSize!==null&&i.data.size<r.minSize.value&&(Ri(i,{code:Yn.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&i.data.size>r.maxSize.value&&(Ri(i,{code:Yn.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());const o=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return oo;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...i.data.values()].map((l,c)=>o._parse(new aw(i,l,i.path,c)));return i.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(e,n){return new $2({...this._def,minSize:{value:e,message:br.toString(n)}})}max(e,n){return new $2({...this._def,maxSize:{value:e,message:br.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}$2.create=(t,e)=>new $2({valueType:t,minSize:null,maxSize:null,typeName:Zr.ZodSet,...jo(e)});class m3 extends Ho{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==zi.function)return Ri(n,{code:Yn.invalid_type,expected:zi.function,received:n.parsedType}),oo;function i(a,l){return bie({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,gie(),Zj].filter(c=>!!c),issueData:{code:Yn.invalid_arguments,argumentsError:l}})}function r(a,l){return bie({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,gie(),Zj].filter(c=>!!c),issueData:{code:Yn.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof Jj){const a=this;return Lm(async function(...l){const c=new Qg([]),u=await a._def.args.parseAsync(l,o).catch(f=>{throw c.addIssue(i(l,f)),c}),d=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(d,o).catch(f=>{throw c.addIssue(r(d,f)),c})})}else{const a=this;return Lm(function(...l){const c=a._def.args.safeParse(l,o);if(!c.success)throw new Qg([i(l,c.error)]);const u=Reflect.apply(s,this,c.data),d=a._def.returns.safeParse(u,o);if(!d.success)throw new Qg([r(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new m3({...this._def,args:lw.create(e).rest(nI.create())})}returns(e){return new m3({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,i){return new m3({args:e||lw.create([]).rest(nI.create()),returns:n||nI.create(),typeName:Zr.ZodFunction,...jo(i)})}}class aH extends Ho{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}aH.create=(t,e)=>new aH({getter:t,typeName:Zr.ZodLazy,...jo(e)});class lH extends Ho{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return Ri(n,{received:n.data,code:Yn.invalid_literal,expected:this._def.value}),oo}return{status:"valid",value:e.data}}get value(){return this._def.value}}lH.create=(t,e)=>new lH({value:t,typeName:Zr.ZodLiteral,...jo(e)});function cOt(t,e){return new ik({values:t,typeName:Zr.ZodEnum,...jo(e)})}class ik extends Ho{constructor(){super(...arguments),U7.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),i=this._def.values;return Ri(n,{expected:Fs.joinValues(i),received:n.parsedType,code:Yn.invalid_type}),oo}if(vie(this,U7)||oOt(this,U7,new Set(this._def.values)),!vie(this,U7).has(e.data)){const n=this._getOrReturnCtx(e),i=this._def.values;return Ri(n,{received:n.data,code:Yn.invalid_enum_value,options:i}),oo}return Lm(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return ik.create(e,{...this._def,...n})}exclude(e,n=this._def){return ik.create(this.options.filter(i=>!e.includes(i)),{...this._def,...n})}}U7=new WeakMap;ik.create=cOt;class cH extends Ho{constructor(){super(...arguments),K7.set(this,void 0)}_parse(e){const n=Fs.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==zi.string&&i.parsedType!==zi.number){const r=Fs.objectValues(n);return Ri(i,{expected:Fs.joinValues(r),received:i.parsedType,code:Yn.invalid_type}),oo}if(vie(this,K7)||oOt(this,K7,new Set(Fs.getValidEnumValues(this._def.values))),!vie(this,K7).has(e.data)){const r=Fs.objectValues(n);return Ri(i,{received:i.data,code:Yn.invalid_enum_value,options:r}),oo}return Lm(e.data)}get enum(){return this._def.values}}K7=new WeakMap;cH.create=(t,e)=>new cH({values:t,typeName:Zr.ZodNativeEnum,...jo(e)});class Jj extends Ho{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==zi.promise&&n.common.async===!1)return Ri(n,{code:Yn.invalid_type,expected:zi.promise,received:n.parsedType}),oo;const i=n.parsedType===zi.promise?n.data:Promise.resolve(n.data);return Lm(i.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Jj.create=(t,e)=>new Jj({type:t,typeName:Zr.ZodPromise,...jo(e)});class B0 extends Ho{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Zr.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:i}=this._processInputParams(e),r=this._def.effect||null,o={addIssue:s=>{Ri(i,s),s.fatal?n.abort():n.dirty()},get path(){return i.path}};if(o.addIssue=o.addIssue.bind(o),r.type==="preprocess"){const s=r.transform(i.data,o);if(i.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return oo;const l=await this._def.schema._parseAsync({data:a,path:i.path,parent:i});return l.status==="aborted"?oo:l.status==="dirty"||n.value==="dirty"?r4(l.value):l});{if(n.value==="aborted")return oo;const a=this._def.schema._parseSync({data:s,path:i.path,parent:i});return a.status==="aborted"?oo:a.status==="dirty"||n.value==="dirty"?r4(a.value):a}}if(r.type==="refinement"){const s=a=>{const l=r.refinement(a,o);if(i.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(i.common.async===!1){const a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?oo:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>a.status==="aborted"?oo:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(r.type==="transform")if(i.common.async===!1){const s=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Jz(s))return s;const a=r.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(s=>Jz(s)?Promise.resolve(r.transform(s.value,o)).then(a=>({status:n.value,value:a})):s);Fs.assertNever(r)}}B0.create=(t,e,n)=>new B0({schema:t,typeName:Zr.ZodEffects,effect:e,...jo(n)});B0.createWithPreprocess=(t,e,n)=>new B0({schema:e,effect:{type:"preprocess",transform:t},typeName:Zr.ZodEffects,...jo(n)});class Bx extends Ho{_parse(e){return this._getType(e)===zi.undefined?Lm(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Bx.create=(t,e)=>new Bx({innerType:t,typeName:Zr.ZodOptional,...jo(e)});class rk extends Ho{_parse(e){return this._getType(e)===zi.null?Lm(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}rk.create=(t,e)=>new rk({innerType:t,typeName:Zr.ZodNullable,...jo(e)});class uH extends Ho{_parse(e){const{ctx:n}=this._processInputParams(e);let i=n.data;return n.parsedType===zi.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}uH.create=(t,e)=>new uH({innerType:t,typeName:Zr.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...jo(e)});class dH extends Ho{_parse(e){const{ctx:n}=this._processInputParams(e),i={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return eH(r)?r.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Qg(i.common.issues)},input:i.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Qg(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}dH.create=(t,e)=>new dH({innerType:t,typeName:Zr.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...jo(e)});class wie extends Ho{_parse(e){if(this._getType(e)!==zi.nan){const i=this._getOrReturnCtx(e);return Ri(i,{code:Yn.invalid_type,expected:zi.nan,received:i.parsedType}),oo}return{status:"valid",value:e.data}}}wie.create=t=>new wie({typeName:Zr.ZodNaN,...jo(t)});const dli=Symbol("zod_brand");class i8e extends Ho{_parse(e){const{ctx:n}=this._processInputParams(e),i=n.data;return this._def.type._parse({data:i,path:n.path,parent:n})}unwrap(){return this._def.type}}class dq extends Ho{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?oo:o.status==="dirty"?(n.dirty(),r4(o.value)):this._def.out._parseAsync({data:o.value,path:i.path,parent:i})})();{const r=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return r.status==="aborted"?oo:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:i.path,parent:i})}}static create(e,n){return new dq({in:e,out:n,typeName:Zr.ZodPipeline})}}class hH extends Ho{_parse(e){const n=this._def.innerType._parse(e),i=r=>(Jz(r)&&(r.value=Object.freeze(r.value)),r);return eH(n)?n.then(r=>i(r)):i(n)}unwrap(){return this._def.innerType}}hH.create=(t,e)=>new hH({innerType:t,typeName:Zr.ZodReadonly,...jo(e)});function uOt(t,e={},n){return t?Qj.create().superRefine((i,r)=>{var o,s;if(!t(i)){const a=typeof e=="function"?e(i):typeof e=="string"?{message:e}:e,l=(s=(o=a.fatal)!==null&&o!==void 0?o:n)!==null&&s!==void 0?s:!0,c=typeof a=="string"?{message:a}:a;r.addIssue({code:"custom",...c,fatal:l})}}):Qj.create()}const hli={object:rc.lazycreate};var Zr;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Zr||(Zr={}));const fli=(t,e={message:`Input not instance of ${t.name}`})=>uOt(n=>n instanceof t,e),dOt=s0.create,hOt=tk.create,mli=wie.create,pli=nk.create,fOt=tH.create,gli=F2.create,bli=yie.create,vli=nH.create,yli=iH.create,_li=Qj.create,xli=nI.create,wli=lS.create,Cli=_ie.create,Sli=v0.create,Nli=rc.create,Eli=rc.strictCreate,Dli=rH.create,kli=Sfe.create,Mli=oH.create,Lli=lw.create,Tli=sH.create,Ili=xie.create,Ali=$2.create,Rli=m3.create,Pli=aH.create,Oli=lH.create,jli=ik.create,Fli=cH.create,$li=Jj.create,uot=B0.create,Vli=Bx.create,Bli=rk.create,zli=B0.createWithPreprocess,Hli=dq.create,Wli=()=>dOt().optional(),Uli=()=>hOt().optional(),Kli=()=>fOt().optional(),qli={string:t=>s0.create({...t,coerce:!0}),number:t=>tk.create({...t,coerce:!0}),boolean:t=>tH.create({...t,coerce:!0}),bigint:t=>nk.create({...t,coerce:!0}),date:t=>F2.create({...t,coerce:!0})},Gli=oo;var gt=Object.freeze({__proto__:null,defaultErrorMap:Zj,setErrorMap:Gai,getErrorMap:gie,makeIssue:bie,EMPTY_PATH:Yai,addIssueToContext:Ri,ParseStatus:Df,INVALID:oo,DIRTY:r4,OK:Lm,isAborted:rMe,isDirty:oMe,isValid:Jz,isAsync:eH,get util(){return Fs},get objectUtil(){return iMe},ZodParsedType:zi,getParsedType:xE,ZodType:Ho,datetimeRegex:lOt,ZodString:s0,ZodNumber:tk,ZodBigInt:nk,ZodBoolean:tH,ZodDate:F2,ZodSymbol:yie,ZodUndefined:nH,ZodNull:iH,ZodAny:Qj,ZodUnknown:nI,ZodNever:lS,ZodVoid:_ie,ZodArray:v0,ZodObject:rc,ZodUnion:rH,ZodDiscriminatedUnion:Sfe,ZodIntersection:oH,ZodTuple:lw,ZodRecord:sH,ZodMap:xie,ZodSet:$2,ZodFunction:m3,ZodLazy:aH,ZodLiteral:lH,ZodEnum:ik,ZodNativeEnum:cH,ZodPromise:Jj,ZodEffects:B0,ZodTransformer:B0,ZodOptional:Bx,ZodNullable:rk,ZodDefault:uH,ZodCatch:dH,ZodNaN:wie,BRAND:dli,ZodBranded:i8e,ZodPipeline:dq,ZodReadonly:hH,custom:uOt,Schema:Ho,ZodSchema:Ho,late:hli,get ZodFirstPartyTypeKind(){return Zr},coerce:qli,any:_li,array:Sli,bigint:pli,boolean:fOt,date:gli,discriminatedUnion:kli,effect:uot,enum:jli,function:Rli,instanceof:fli,intersection:Mli,lazy:Pli,literal:Oli,map:Ili,nan:mli,nativeEnum:Fli,never:wli,null:yli,nullable:Bli,number:hOt,object:Nli,oboolean:Kli,onumber:Uli,optional:Vli,ostring:Wli,pipeline:Hli,preprocess:zli,promise:$li,record:Tli,set:Ali,strictObject:Eli,string:dOt,symbol:bli,transformer:uot,tuple:Lli,undefined:vli,union:Dli,unknown:xli,void:Cli,NEVER:Gli,ZodIssueCode:Yn,quotelessJson:qai,ZodError:Qg});function mOt({apiKey:t,className:e}){const n=Mt();return v.jsxDEV(Y5e,{value:t,timeout:1e4,children:({copied:i,copy:r})=>v.jsxDEV(Nn,{variant:"subtle",className:`px-2 ${e}`,c:i?"green":"",onClick:o=>{r(),o.stopPropagation(),In.show({color:"green",message:n.formatMessage({id:"api_key.notification.copied_to_clipboard",defaultMessage:"Copied api key to clipboard"})})},rightSection:i?v.jsxDEV(Ksi,{style:{width:sn(16),height:sn(16)},stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ApiKeyButton.tsx",lineNumber:29,columnNumber:8},this):v.jsxDEV(BPt,{style:{width:sn(16),height:sn(16)},stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ApiKeyButton.tsx",lineNumber:31,columnNumber:8},this),children:v.jsxDEV(Qe,{truncate:!0,children:[t.slice(0,10)," *** *** ",t.slice(-10)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ApiKeyButton.tsx",lineNumber:35,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ApiKeyButton.tsx",lineNumber:12,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ApiKeyButton.tsx",lineNumber:10,columnNumber:3},this)}function z0({value:t}){const e=Mt();return t?`${e.formatDate(t,{year:"numeric",month:"numeric",day:"numeric"})} ${e.formatTime(t)}`:""}function _m({label:t,required:e}){const n=!e&&v.jsxDEV(Qe,{size:"xs",c:"dimmed",children:v.jsxDEV(ee,{id:"shared.components.form_optional_label",defaultMessage:"(optional)"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/FormOptionalLabel.tsx",lineNumber:8,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/FormOptionalLabel.tsx",lineNumber:7,columnNumber:3},this);return v.jsxDEV(un,{gap:4,children:[t," ",n]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/FormOptionalLabel.tsx",lineNumber:13,columnNumber:3},this)}const pOt=["project.read","document.read","document.write","document.delete","session.read","session.write"];function Zd({title:t,description:e,src:n,className:i,imgClassName:r,children:o}){return v.jsxDEV(Gt,{align:"center",className:i,children:[n&&v.jsxDEV("img",{src:n,className:"h-32 "+r,"aria-label":"","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/EmptyComponent.tsx",lineNumber:15,columnNumber:12},this),v.jsxDEV("div",{children:[t&&v.jsxDEV(Qe,{ta:"center",className:"max-w-prose",children:t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/EmptyComponent.tsx",lineNumber:18,columnNumber:6},this),e&&v.jsxDEV(Qe,{ta:"center",c:"dimmed",size:"sm",className:"max-w-prose",children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/EmptyComponent.tsx",lineNumber:23,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/EmptyComponent.tsx",lineNumber:16,columnNumber:4},this),o]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/EmptyComponent.tsx",lineNumber:14,columnNumber:3},this)}function r8e({filter:t,actions:e,columns:n,renderRows:i,className:r}){const s=Mt(),[a,l]=b.useState(1),[c,u]=b.useState(void 0),d=20*(a-1),{data:h,isLoading:f}=Je.auditLog.getAll.useQuery({...t,offset:d,limit:20,type:c?[c]:void 0}),m=h!=null&&h.total?Math.ceil(h.total/20):0,p=g=>{u(g),l(1)};return v.jsxDEV(or,{className:`max-h-full ${r||""}`,children:[v.jsxDEV(un,{justify:"space-between",className:"mb-4",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"audit_logs_list.title",defaultMessage:"Audit logs"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:48,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:47,columnNumber:5},this),v.jsxDEV(Fm,{size:"xs",clearable:!0,placeholder:s.formatMessage({id:"audit_log_list.filter_action",defaultMessage:"Filter action"}),data:e,onChange:g=>p(g)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:50,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:46,columnNumber:4},this),f&&v.jsxDEV(Gt,{children:[v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:63,columnNumber:6},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:64,columnNumber:6},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:65,columnNumber:6},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:66,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:62,columnNumber:5},this),!(h!=null&&h.total)&&!f&&v.jsxDEV(Zd,{src:"/img/svg/empty_api_key.svg",imgClassName:"h-44",title:s.formatMessage({id:"audit_logs_list.list.empty.title",defaultMessage:"No {selectedType} audit logs found"},{selectedType:c}),description:s.formatMessage({id:"audit_logs_list.list.empty.description",defaultMessage:"Here you will find insights about your activity"}),className:"m-8"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:70,columnNumber:5},this),!!(h!=null&&h.total)&&!f&&v.jsxDEV(or.Section,{className:"p-4 pr-0 overflow-auto",children:v.jsxDEV(Gt,{className:"h-full pr-4 min-w-800 overflow-auto",children:[v.jsxDEV(ad,{className:"w-full pr-8",children:n.map(g=>v.jsxDEV(ad.Col,{span:g.span,children:v.jsxDEV(Qe,{size:"sm",children:g.label},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:93,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:92,columnNumber:9},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:90,columnNumber:7},this),v.jsxDEV(zl,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:97,columnNumber:7},this),v.jsxDEV(Gt,{className:"w-full grow overflow-auto",children:h.data.map(g=>v.jsxDEV(v.Fragment,{children:[i({auditLog:g}),v.jsxDEV(zl,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:102,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:100,columnNumber:9},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:98,columnNumber:7},this),m>1&&v.jsxDEV(uu,{justify:"flex-end",children:v.jsxDEV(Kh,{size:"sm",hideWithOnePage:!0,total:m,value:a,onChange:l},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:108,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:107,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:89,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:88,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/AuditLogsList.tsx",lineNumber:45,columnNumber:3},this)}function Yli({auditLog:t}){var s,a,l,c,u,d;const[e,n]=Pc(),i=t.type!=="api_key.deleted",r=200<=((s=t.meta)==null?void 0:s.status)&&((a=t.meta)==null?void 0:a.status)<300?"green":"red",o=((l=t.meta)==null?void 0:l.originalUrl)||((c=t.meta)==null?void 0:c.baseUrl);return v.jsxDEV(Ew,{children:v.jsxDEV(Gt,{gap:4,children:[v.jsxDEV(uu,{gap:4,children:[v.jsxDEV(ad,{className:"w-full",children:[v.jsxDEV(ad.Col,{span:5,children:[o&&v.jsxDEV(Qe,{truncate:!0,className:"max-w-80",children:o},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:24,columnNumber:9},this),(t==null?void 0:t.user)&&v.jsxDEV(Qe,{className:"max-w-80",children:B$e(t==null?void 0:t.user)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:28,columnNumber:27},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:22,columnNumber:7},this),v.jsxDEV(ad.Col,{span:2,children:((u=t.meta)==null?void 0:u.status)&&v.jsxDEV(Qe,{c:r,truncate:"end",children:(d=t.meta)==null?void 0:d.status},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:32,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:30,columnNumber:7},this),v.jsxDEV(ad.Col,{span:3,children:v.jsxDEV(Qe,{children:t.type},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:38,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:37,columnNumber:7},this),v.jsxDEV(ad.Col,{span:2,children:v.jsxDEV(Qe,{children:v.jsxDEV(z0,{value:t.createdAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:42,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:41,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:40,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:21,columnNumber:6},this),i&&v.jsxDEV(Fr,{variant:"subtle",color:"gray",onClick:n.toggle,children:[!e&&v.jsxDEV(Z$e,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:48,columnNumber:22},this),e&&v.jsxDEV(J$e,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:49,columnNumber:21},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:47,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:20,columnNumber:5},this),e&&v.jsxDEV("section",{className:"p-2 bg-gray-100 rounded",children:[t.payload&&v.jsxDEV(rw,{block:!0,children:JSON.stringify(t.payload,null,2)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:55,columnNumber:28},this),t.meta&&v.jsxDEV(rw,{block:!0,children:JSON.stringify(t.meta,null,2)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:56,columnNumber:25},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:54,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:19,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/components/AuditLogItem.tsx",lineNumber:18,columnNumber:3},this)}function Xli({apiKeyId:t,organization:e}){var r;const n=Mt(),i=Qr();return(r=e==null?void 0:e.permissions)!=null&&r.auditLogHistory?v.jsxDEV(r8e,{filter:{apiKeyId:t},actions:["api_key.event","api_key.created","api_key.updated","api_key.deleted"],columns:[{span:5,label:n.formatMessage({id:"api_key_detail.audit_log.list.header.triggered_by",defaultMessage:"Triggered by"})},{span:2,label:n.formatMessage({id:"api_key_detail.audit_log.list.header.status",defaultMessage:"Status"})},{span:3,label:n.formatMessage({id:"api_key_detail.audit_log.list.header.action",defaultMessage:"Action"})},{span:2,label:n.formatMessage({id:"api_key_detail.audit_log.list.header.time",defaultMessage:"Time"})}],renderRows:({auditLog:o})=>v.jsxDEV(Yli,{auditLog:o},o._id,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/AuditLogs.tsx",lineNumber:75,columnNumber:34},this),className:"!max-h-[calc(100vh_-_48px_-_2rem)]"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/AuditLogs.tsx",lineNumber:41,columnNumber:3},this):v.jsxDEV(or,{children:v.jsxDEV(Gt,{align:"flex-start",children:[v.jsxDEV(un,{justify:"space-between",className:"mb-4",children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"api_key_detail.audit_log.title",defaultMessage:"Audit logs"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/AuditLogs.tsx",lineNumber:23,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/AuditLogs.tsx",lineNumber:22,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/AuditLogs.tsx",lineNumber:21,columnNumber:6},this),v.jsxDEV(Qe,{className:"max-w-prose",children:v.jsxDEV(ee,{id:"api_key_detail.audit_log.description",defaultMessage:"Audit logs offer advanced features for greater transparency in your API key usage. Boost your security and compliance by upgrading today!"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/AuditLogs.tsx",lineNumber:27,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/AuditLogs.tsx",lineNumber:26,columnNumber:6},this),v.jsxDEV(Nn,{onClick:()=>i("/billing"),children:v.jsxDEV(ee,{id:"general.upgrade.submit",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/AuditLogs.tsx",lineNumber:33,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/AuditLogs.tsx",lineNumber:32,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/AuditLogs.tsx",lineNumber:20,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/AuditLogs.tsx",lineNumber:19,columnNumber:4},this)}function $E({label:t,value:e}){return v.jsxDEV(Gt,{gap:1,children:[v.jsxDEV(Qe,{c:"dimmed",size:"sm",children:t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Statistic.tsx",lineNumber:11,columnNumber:4},this),v.jsxDEV(Qe,{children:e||" "},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Statistic.tsx",lineNumber:12,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Statistic.tsx",lineNumber:10,columnNumber:3},this)}function gOt(t){const e=Mt(),n=[{group:e.formatMessage({id:"api_key.permissions.projects.title",defaultMessage:"Project"}),items:[{label:e.formatMessage({id:"api_key.permissions.projects.option.read",defaultMessage:"Read projects"}),value:"project.read"}]},{group:e.formatMessage({id:"api_key.permissions.documents.title",defaultMessage:"Documents"}),items:[{label:e.formatMessage({id:"api_key.permissions.documents.option.write",defaultMessage:"Write documents"}),value:"document.write"},{label:e.formatMessage({id:"api_key.permissions.documents.option.delete",defaultMessage:"Delete documents"}),value:"document.delete"}]},{group:e.formatMessage({id:"api_key.permissions.sessions.title",defaultMessage:"Sessions"}),items:[{label:e.formatMessage({id:"api_key.permissions.session.option.read",defaultMessage:"Read sessions"}),value:"session.read"},{label:e.formatMessage({id:"api_key.permissions.session.option.write",defaultMessage:"Write sessions"}),value:"session.write"}]}];return v.jsxDEV(PA,{searchable:!0,data:n,...t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/shared/PermissionsPicker.tsx",lineNumber:76,columnNumber:9},this)}function Zli(){var C,N,E;const t=Mt(),e=Qr(),n=Je.useContext(),i=Oi(ps),[r,o]=b.useState(!1),[s,a]=b.useState(""),{keyId:l}=If(),c=Je.apiKey.update.useMutation(),u=Je.apiKey.deleteApiKey.useMutation(),{data:d}=Je.project.getAll.useQuery({q:s,limit:5}),{data:h}=Je.getOrganization.useQuery(void 0,{staleTime:1/0}),{data:f,isLoading:m}=Je.apiKey.getApiKey.useQuery({id:l},{refetchOnWindowFocus:!1}),p=gt.object({name:gt.string({required_error:t.formatMessage({id:"api_key_detail.form.name.error.required",defaultMessage:"A name for your API key is required"})}).min(1,{message:t.formatMessage({id:"api_key_detail.form.name.error.required",defaultMessage:"A name for your API key is required"})}).max(128,{message:t.formatMessage({id:"api_key_detail.form.name.error.max_length",defaultMessage:"Name cannot be longer then 128 characters"})}),description:gt.string().max(2048,{message:t.formatMessage({id:"api_key_detail.form.description.error.max_length",defaultMessage:"Description cannot be longer then 2.048 characters"})}).optional(),projects:gt.array(gt.string()).optional(),permissions:gt.array(gt.enum(mfe(pOt))).optional()}),g=ls({validateInputOnBlur:!0,validate:aa(p),initialValues:{name:"",description:"",permissions:[],projects:[]},onValuesChange:()=>o(g.isValid()&&g.isDirty())});ga(t.formatMessage({id:"api_key_detail.page.title",defaultMessage:"Api key - Chathive",description:"Browser tab title for api key detail page"})),b.useEffect(()=>{if(!f)return;const D={...f,projects:f.projects.map(k=>k._id)};g.setValues(D),g.setInitialValues(D),o(!1)},[f]);const y=()=>{Ev.openConfirmModal({title:t.formatMessage({id:"api_key_detail.delete_modal.title",defaultMessage:"Delete API key"}),centered:!0,children:v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"api_key_detail.delete_modal.description",defaultMessage:"If you delete this API key, there's no going back. That means any external requests using this key will fail."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:128,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:127,columnNumber:5},this),labels:{confirm:t.formatMessage({id:"api_key_detail.delete_modal.confirm",defaultMessage:"Delete API key"}),cancel:t.formatMessage({id:"shared.modal.footer.cancel.delete",defaultMessage:"No don't delete it"})},confirmProps:{color:"red"},onConfirm:w})},_=async D=>{try{await c.mutateAsync({...D,id:l}),n.apiKey.getApiKey.invalidate(),n.auditLog.getAll.invalidate(),In.show({color:"green",message:t.formatMessage({id:"api_key_detail.update.notification.succeeded",defaultMessage:"API key has been updated"}),autoClose:5e3})}catch(k){console.error("Failed to update API key",k),In.show({color:"red",title:t.formatMessage({id:"api_key_detail.update.notification.failed.title",defaultMessage:"API key could not be updated"}),message:t.formatMessage({id:"api_key_detail.update.notification.failed.message",defaultMessage:"We cannot update your API key at this time. Please try again or contact our support team."}),autoClose:5e3})}},w=async()=>{try{await u.mutateAsync({id:l}),e("/api_key"),In.show({color:"green",message:t.formatMessage({id:"api_key_detail.delete.notification.succeeded",defaultMessage:"API key has been delete"}),autoClose:5e3})}catch(D){console.error("Failed to update API key",D),In.show({color:"red",title:t.formatMessage({id:"api_key_detail.delete.notification.failed.title",defaultMessage:"API key could not be delete"}),message:t.formatMessage({id:"api_key_detail.delete.notification.failed.message",defaultMessage:"We cannot delete your API key at this time. Please try again or contact our support team."}),autoClose:5e3})}};return!f&&!m?(e("/api_key"),null):v.jsxDEV("main",{className:"grid gap-4 w-full max-w-4xl",children:[v.jsxDEV(or,{children:v.jsxDEV("form",{onSubmit:g.onSubmit(_),children:v.jsxDEV(Gt,{children:[v.jsxDEV(un,{justify:"space-between",children:[v.jsxDEV(B5e,{children:[v.jsxDEV(T0,{to:"/api_key",children:v.jsxDEV("span",{className:"!text-neutral-600",children:v.jsxDEV(ee,{id:"api_key_detail.header.breadcrumb",defaultMessage:"API keys"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:226,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:225,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:224,columnNumber:9},this),v.jsxDEV(Qe,{fw:"600",children:f==null?void 0:f.name},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:232,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:223,columnNumber:8},this),i&&v.jsxDEV(Nn,{size:"xs",variant:"light",color:"red",onClick:y,children:v.jsxDEV(ee,{id:"api_key_detail.header.delete",defaultMessage:"Delete API key"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:236,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:235,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:222,columnNumber:7},this),m&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:245,columnNumber:9},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:246,columnNumber:9},this),v.jsxDEV(li,{height:64},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:247,columnNumber:9},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:248,columnNumber:9},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:249,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:244,columnNumber:8},this),f&&!m&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Gt,{align:"flex-start",gap:0,children:[v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"api_key_detail.form.api_key",defaultMessage:"API key"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:256,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:255,columnNumber:10},this),v.jsxDEV(mOt,{apiKey:f.key},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:258,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:254,columnNumber:9},this),v.jsxDEV(pa,{...g.getInputProps("name"),label:t.formatMessage({id:"api_key_detail.form.name.label",defaultMessage:"Name"}),readOnly:!i},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:260,columnNumber:9},this),v.jsxDEV(Th,{label:v.jsxDEV(_m,{label:t.formatMessage({id:"api_key_detail.form.description.label",defaultMessage:"Description"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:270,columnNumber:11},this),...g.getInputProps("description"),autosize:!0,minRows:2,readOnly:!i},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:268,columnNumber:9},this),v.jsxDEV(gOt,{readOnly:!i,...g.getInputProps("permissions"),label:t.formatMessage({id:"api_key_detail.form.permissions.label",defaultMessage:"Permissions"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:282,columnNumber:9},this),v.jsxDEV(PA,{searchable:!0,readOnly:!i,searchValue:s,...g.getInputProps("projects"),onSearchChange:a,label:v.jsxDEV(_m,{label:t.formatMessage({id:"api_key_detail.form.projects.label",defaultMessage:"Projects"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:297,columnNumber:11},this),description:t.formatMessage({id:"api_key_detail.form.projects.description",defaultMessage:"API key will only work within the selected projects."}),data:(C=d==null?void 0:d.result)==null?void 0:C.map(D=>({label:D.name,value:D._id}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:290,columnNumber:9},this),i&&v.jsxDEV(un,{justify:"flex-start",children:v.jsxDEV(Nn,{size:"sm",type:"submit",disabled:!r,loading:c.isLoading,children:v.jsxDEV(ee,{id:"api_key_detail.form.submit",defaultMessage:"Update API key"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:320,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:314,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:313,columnNumber:21},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:253,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:221,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:220,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:219,columnNumber:4},this),v.jsxDEV(or,{children:[v.jsxDEV(un,{justify:"space-between",className:"mb-4",children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"api_key_detail.statistics.title",defaultMessage:"Statistics"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:334,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:333,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:332,columnNumber:5},this),m&&v.jsxDEV(li,{height:72},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:337,columnNumber:19},this),!m&&v.jsxDEV(un,{justify:"space-between",children:[v.jsxDEV($E,{label:t.formatMessage({id:"api_key_detail.statistic.total_used.label",defaultMessage:"Total used last 30 days"}),value:t.formatNumber((f==null?void 0:f.usageInLastMonth)||0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:340,columnNumber:7},this),v.jsxDEV($E,{label:t.formatMessage({id:"api_key_detail.statistic.last_used.label",defaultMessage:"Last used"}),value:f!=null&&f.lastUsedAt?v.jsxDEV(z0,{value:f==null?void 0:f.lastUsedAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:354,columnNumber:10},this):t.formatMessage({id:"api_key_detail.statistic.last_used.value",defaultMessage:"Not used"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:347,columnNumber:7},this),v.jsxDEV($E,{label:t.formatMessage({id:"api_key_detail.statistic.created_by.label",defaultMessage:"CreatedBy"}),value:[(N=f==null?void 0:f.createdBy)==null?void 0:N.firstName,(E=f==null?void 0:f.createdBy)==null?void 0:E.lastName].join(" ").trim()},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:363,columnNumber:7},this),v.jsxDEV($E,{label:t.formatMessage({id:"api_key_detail.statistic.created_at.label",defaultMessage:"Created at"}),value:t.formatDate(f==null?void 0:f.createdAt)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:370,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:339,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:331,columnNumber:4},this),v.jsxDEV(Xli,{apiKeyId:l,organization:h},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:380,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyDetail/index.tsx",lineNumber:218,columnNumber:3},this)}function Qli({isOpen:t,onClose:e}){var m;const n=Mt(),i=Qr(),[r,o]=b.useState(!1),[s,a]=b.useState(""),l=gt.object({name:gt.string({required_error:n.formatMessage({id:"create_api_key.form.name.error.required",defaultMessage:"A name for your API key is required"})}).min(1,{message:n.formatMessage({id:"create_api_key.form.name.error.required",defaultMessage:"A name for your API key is required"})}).max(128,{message:n.formatMessage({id:"create_api_key.form.name.error.max_length",defaultMessage:"Name cannot be longer then 128 characters"})}),description:gt.string().max(2048,{message:n.formatMessage({id:"create_api_key.form.description.error.max_length",defaultMessage:"Description cannot be longer then 2.048 characters"})}).optional(),projects:gt.array(gt.string()).optional(),permissions:gt.array(gt.enum(mfe(pOt))).optional()}),c=ls({mode:"uncontrolled",validateInputOnBlur:!0,initialValues:{name:"",description:"",permissions:[],projects:[]},validate:aa(l),onValuesChange:()=>o(c.isValid()&&c.isDirty())}),{data:u}=Je.getOrganization.useQuery(void 0,{staleTime:1/0}),{data:d}=Je.project.getAll.useQuery({q:s,limit:5}),h=Je.apiKey.create.useMutation(),f=async p=>{try{const g=await h.mutateAsync(p);i(`${g._id}`),In.show({color:"green",message:n.formatMessage({id:"create_api_key.create.notification.succeeded",defaultMessage:"API key has been created"}),autoClose:5e3})}catch(g){console.error("Failed to create API key",g),In.show({color:"red",title:n.formatMessage({id:"create_api_key.create.notification.failed.title",defaultMessage:"API key could not be created"}),message:n.formatMessage({id:"create_api_key.create.notification.failed.message",defaultMessage:"We cannot create your API key at this time. Please try again or contact our support team."}),autoClose:5e3})}};if(u)return v.jsxDEV(bl,{opened:t,onClose:e,title:n.formatMessage({id:"create_api_key.header.title",defaultMessage:"Create API key"}),closeButtonProps:{"aria-label":n.formatMessage({id:"shared.modal.close",defaultMessage:"Close modal"})},children:v.jsxDEV("form",{onSubmit:c.onSubmit(f),className:"flex flex-col gap-4",children:[v.jsxDEV(pa,{...c.getInputProps("name"),label:n.formatMessage({id:"create_api_key.form.name.label",defaultMessage:"Name"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/CreateApiKey.tsx",lineNumber:122,columnNumber:5},this),v.jsxDEV(Th,{label:v.jsxDEV(_m,{label:n.formatMessage({id:"create_api_key.form.description.label",defaultMessage:"Description"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/CreateApiKey.tsx",lineNumber:128,columnNumber:7},this),...c.getInputProps("description"),autosize:!0,minRows:2},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/CreateApiKey.tsx",lineNumber:126,columnNumber:5},this),v.jsxDEV(gOt,{...c.getInputProps("permissions"),label:v.jsxDEV(_m,{label:n.formatMessage({id:"create_api_key.form.permissions.label",defaultMessage:"Permissions"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/CreateApiKey.tsx",lineNumber:142,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/CreateApiKey.tsx",lineNumber:139,columnNumber:5},this),v.jsxDEV(PA,{searchable:!0,searchValue:s,...c.getInputProps("projects"),onSearchChange:a,label:v.jsxDEV(_m,{label:n.formatMessage({id:"create_api_key.form.projects.label",defaultMessage:"Projects"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/CreateApiKey.tsx",lineNumber:156,columnNumber:7},this),description:n.formatMessage({id:"create_api_key.form.projects.description",defaultMessage:"API key will only work within the selected projects."}),data:(m=d==null?void 0:d.result)==null?void 0:m.map(p=>({label:p.name,value:p._id}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/CreateApiKey.tsx",lineNumber:150,columnNumber:5},this),v.jsxDEV(un,{justify:"flex-end",mt:"md",children:v.jsxDEV(Nn,{size:"sm",type:"submit",disabled:!r,loading:h.isLoading,children:v.jsxDEV(ee,{id:"create_api_key.form.submit",defaultMessage:"Create API key"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/CreateApiKey.tsx",lineNumber:171,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/CreateApiKey.tsx",lineNumber:170,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/CreateApiKey.tsx",lineNumber:169,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/CreateApiKey.tsx",lineNumber:121,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/CreateApiKey.tsx",lineNumber:113,columnNumber:3},this)}function Jli(){var p;const e=Mt(),n=Qr(),i=Oi(ps),[r,o]=b.useState(1),[s,a]=Pc(!1),{data:l}=Je.getOrganization.useQuery(void 0,{staleTime:36e5}),{data:c,isLoading:u,isInitialLoading:d}=Je.apiKey.getAll.useQuery({offset:(r-1)*20,limit:20});ide(e.formatMessage({id:"api_key_overview.page.title",defaultMessage:"Api keys - Chathive",description:"Browser tab title for api keys overview page"}));const h=()=>{if(!(l!=null&&l.permissions.apiAccess))return n("/billing");a.open()},f=g=>{n(`${g}`)};if(!(l!=null&&l.permissions.apiAccess))return v.jsxDEV("main",{className:"grid gap-4 w-full max-w-4xl",children:v.jsxDEV(or,{children:v.jsxDEV(Gt,{children:[v.jsxDEV(dot,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:59,columnNumber:7},this),v.jsxDEV(Zd,{title:e.formatMessage({id:"api_key_overview.upgrade.title",defaultMessage:"Upgrade your plan"}),description:e.formatMessage({id:"api_key_overview.upgrade.description",defaultMessage:"Api keys allow you to send data to your organization and projects and get more control over your organization."}),src:"/img/svg/upgrade_step_up.svg",className:"m-8",children:v.jsxDEV(Nn,{size:"xs",variant:"filled",onClick:()=>n("/billing"),children:v.jsxDEV(ee,{id:"general.upgrade.submit",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:74,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:73,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:60,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:58,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:57,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:56,columnNumber:4},this);const m=((c==null?void 0:c.total)||0)/20;return v.jsxDEV("main",{className:"grid gap-4 w-full max-w-4xl",children:[v.jsxDEV(or,{children:v.jsxDEV(Gt,{children:[v.jsxDEV(dot,{children:i&&v.jsxDEV(Nn,{variant:"filled",size:"xs",onClick:h,children:v.jsxDEV(ee,{id:"api_key_overview.header.create_new",defaultMessage:"Add api key"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:91,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:90,columnNumber:19},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:89,columnNumber:6},this),!d&&!(c!=null&&c.total)&&v.jsxDEV(Zd,{src:"/img/svg/empty_api_key.svg",imgClassName:"h-44",title:e.formatMessage({id:"api_key_overview.empty.title",defaultMessage:"Create your API key"}),description:e.formatMessage({id:"api_key_overview.empty.description",defaultMessage:"Api keys allow you to send data to your organization and projects and get more control over your organization."}),className:"m-8",children:v.jsxDEV(Nn,{size:"xs",variant:"filled",onClick:h,children:v.jsxDEV(ee,{id:"api_key_overview.empty.button",defaultMessage:"Add API key"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:110,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:109,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:95,columnNumber:7},this),!u&&!!(c!=null&&c.total)&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(hn.ScrollContainer,{type:"native",className:"rounded-md",minWidth:600,children:v.jsxDEV(hn,{highlightOnHover:!0,className:"rounded-md overflow-hidden",children:[v.jsxDEV(hn.Thead,{className:"bg-[var(--mantine-color-gray-1)]",children:v.jsxDEV(hn.Tr,{children:[v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"api_key_overview.table.name",defaultMessage:"Name"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:121,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:120,columnNumber:12},this),v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"api_key_overview.table.projects",defaultMessage:"Projects"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:127,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:126,columnNumber:12},this),v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"api_key_overview.table.key",defaultMessage:"Key"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:133,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:132,columnNumber:12},this),v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"api_key_overview.table.created",defaultMessage:"Created"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:139,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:138,columnNumber:12},this),v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"api_key_overview.table.last_used",defaultMessage:"Last used"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:145,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:144,columnNumber:12},this),v.jsxDEV(hn.Th,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:150,columnNumber:12},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:119,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:118,columnNumber:10},this),v.jsxDEV(hn.Tbody,{children:(p=c==null?void 0:c.data)==null?void 0:p.map(g=>{var _,w;let y=e.formatMessage({id:"api_key_overview.table.projects.no_project",defaultMessage:"All projects"});return((_=g.projects)==null?void 0:_.length)===1&&(y=g.projects[0].name),((w=g.projects)==null?void 0:w.length)>1&&(y=e.formatMessage({id:"api_key_overview.table.projects.multiple",defaultMessage:"{total} projects"},{total:g.projects.length})),v.jsxDEV(hn.Tr,{className:"cursor-pointer",onClick:()=>f(g._id),children:[v.jsxDEV(hn.Td,{children:v.jsxDEV(Qe,{children:g.name},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:179,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:178,columnNumber:14},this),v.jsxDEV(hn.Td,{children:v.jsxDEV(Qe,{children:y},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:182,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:181,columnNumber:14},this),v.jsxDEV(hn.Td,{children:v.jsxDEV(mOt,{apiKey:g.key},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:185,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:184,columnNumber:14},this),v.jsxDEV(hn.Td,{children:v.jsxDEV("time",{children:v.jsxDEV(tu,{value:g.createdAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:189,columnNumber:16},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:188,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:187,columnNumber:14},this),v.jsxDEV(hn.Td,{children:v.jsxDEV("time",{children:g.lastUsedAt&&v.jsxDEV(z0,{value:g.lastUsedAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:195,columnNumber:17},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:193,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:192,columnNumber:14},this),v.jsxDEV(hn.Td,{className:"align-middle",children:v.jsxDEV(Fr,{"aria-label":e.formatMessage({id:"api_key_overview.table.column.go_detail.label",defaultMessage:"Go to api key detail"}),variant:"subtle",children:v.jsxDEV(Q$e,{size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:207,columnNumber:16},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:200,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:199,columnNumber:14},this)]},g._id,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:173,columnNumber:13},this)})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:154,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:117,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:116,columnNumber:8},this),m>1&&v.jsxDEV(uu,{justify:"flex-end",children:v.jsxDEV(Kh,{size:"sm",hideWithOnePage:!0,total:m,value:r,onChange:o},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:218,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:217,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:115,columnNumber:7},this),u&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:231,columnNumber:8},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:232,columnNumber:8},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:233,columnNumber:8},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:234,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:230,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:88,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:87,columnNumber:4},this),v.jsxDEV(Qli,{isOpen:s,onClose:a.close},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:239,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:86,columnNumber:3},this)}function dot({children:t}){return v.jsxDEV(un,{justify:"space-between",className:"mb-4",children:[v.jsxDEV(un,{gap:"sm",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"api_key_overview.header.title",defaultMessage:"Api keys"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:249,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:248,columnNumber:5},this),v.jsxDEV(jc,{color:"violet",radius:"md",variant:"light",leftSection:v.jsxDEV(KPt,{size:14,stroke:1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:251,columnNumber:68},this),children:v.jsxDEV(ee,{id:"general.experimental",defaultMessage:"Experimental"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:252,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:251,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:247,columnNumber:4},this),v.jsxDEV(un,{gap:"sm",children:[v.jsxDEV(Nn,{size:"xs",component:"a",variant:"light",target:"_blank",href:"https://documenter.getpostman.com/view/21518222/2s9YC31uAP",children:v.jsxDEV(ee,{id:"api_key_overview.header.documentation",defaultMessage:"Documentation"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:263,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:256,columnNumber:5},this),t]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:255,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/apiKey/ApiKeyOverview/index.tsx",lineNumber:246,columnNumber:3},this)}var eci="Expected a function",hot=NaN,tci="[object Symbol]",nci=/^\s+|\s+$/g,ici=/^[-+]0x[0-9a-f]+$/i,rci=/^0b[01]+$/i,oci=/^0o[0-7]+$/i,sci=parseInt,aci=typeof Bl=="object"&&Bl&&Bl.Object===Object&&Bl,lci=typeof self=="object"&&self&&self.Object===Object&&self,cci=aci||lci||Function("return this")(),uci=Object.prototype,dci=uci.toString,hci=Math.max,fci=Math.min,pwe=function(){return cci.Date.now()};function mci(t,e,n){var i,r,o,s,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(eci);e=fot(e)||0,aMe(n)&&(u=!!n.leading,d="maxWait"in n,o=d?hci(fot(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(E){var D=i,k=r;return i=r=void 0,c=E,s=t.apply(k,D),s}function m(E){return c=E,a=setTimeout(y,e),u?f(E):s}function p(E){var D=E-l,k=E-c,M=e-D;return d?fci(M,o-k):M}function g(E){var D=E-l,k=E-c;return l===void 0||D>=e||D<0||d&&k>=o}function y(){var E=pwe();if(g(E))return _(E);a=setTimeout(y,p(E))}function _(E){return a=void 0,h&&i?f(E):(i=r=void 0,s)}function w(){a!==void 0&&clearTimeout(a),c=0,i=l=r=a=void 0}function C(){return a===void 0?s:_(pwe())}function N(){var E=pwe(),D=g(E);if(i=arguments,r=this,l=E,D){if(a===void 0)return m(l);if(d)return a=setTimeout(y,e),f(l)}return a===void 0&&(a=setTimeout(y,e)),s}return N.cancel=w,N.flush=C,N}function aMe(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function pci(t){return!!t&&typeof t=="object"}function gci(t){return typeof t=="symbol"||pci(t)&&dci.call(t)==tci}function fot(t){if(typeof t=="number")return t;if(gci(t))return hot;if(aMe(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=aMe(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(nci,"");var n=rci.test(t);return n||oci.test(t)?sci(t.slice(2),n?2:8):ici.test(t)?hot:+t}var bci=mci;const vci=ao(bci);let by,mot;function lMe(t,e){var n;(n=t==null?void 0:t.data)!=null&&n.code&&(window.removeEventListener("message",i=>lMe(i)),vci(()=>e&&e(t.data)))}function bOt({url:t,name:e,callback:n,blank:i=!1}){window.removeEventListener("message",o=>lMe(o));const r=i?"_blank":e;if(!by||by!=null&&by.closed?by=window.open(t,r):(mot!==t&&(by=window.open(t,r)),by.focus()),!by||by.closed||typeof by.closed>"u"){n(void 0,{message:"blocked"});return}window.addEventListener("message",o=>lMe(o,n),!1),mot=t}const $9=[{id:"starter",name:{id:"plans.tier.starter.name",defaultMessage:"Starter"},planId:{monthly:"starter-v1-EUR-Monthly",annually:"starter-v1-EUR-Yearly"},price:{monthly:0,annually:0*12},description:{id:"plans.tier.starter.description",defaultMessage:"Explore Chathive and its features before upgrading to the plan that suits your needs."},highlightedFeatures:[{message:{id:"plans.tier.starter.features.users",defaultMessage:"{amount, plural, =1 {# user} other {# users}}"},values:{amount:2}},{message:{id:"plans.tier.starter.features.languages",defaultMessage:"Support {amount, plural, =1 {# language} other {# languages}}"},values:{amount:1}},{message:{id:"plans.tier.starter.features.limited_project",defaultMessage:"Create {amount, plural, =1 {# chatbot project} other {# chatbot projects}}"},values:{amount:1}},{message:{id:"plans.tier.starter.features.messages",defaultMessage:"{amount} questions per month"},values:{amount:100}},{message:{id:"plans.tier.starter.features.max_data_set",defaultMessage:"Maximum {amount} characters of input for training"},values:{amount:"500K"}},{message:{id:"plans.tier.starter.features.install_on_website",defaultMessage:"Install the chatbot on your website"}}],mostPopular:!1,isCustom:!1,features:{usage:{users:2,languages:1,messageCredits:100,characters:5e5},data:{url:!0,text:!0,faq:!0,prioritySettings:!1,advancedPrioritySettings:!1,manageThroughApi:!1},crawler:{total:1,interval:void 0,AdvancedSettings:!1,behindLogin:!1},models:{openAI:!0,azure:!0,stayInScope:!0,fusionAlgorithm:!1,"gpt3.5-turbo":!0,gpt4oMini:!0,gpt4o:!1,gpt4:!1,"gpt4-turbo":!1,contextWindow:{id:"plans.tier.starter.features.context_window",defaultMessage:"Up to 4K"}},widget:{embed:!0,branding:!0,customCss:!1,utmTags:!1,whiteLabel:!1},chatbotProject:{total:1,welcomeMessage:!0,suggestions:!1,sourceReferences:!1,allowLeadGeneration:!1,customizeLeadGeneration:!1,feedbackModule:!1},aiFormProject:{total:3,export:!1,generateSuggestions:!1,keepActive:!1},conversations:{analytics:!0,history:{id:"plans.tier.starter.features.history",defaultMessage:"5 days"},export:!1},security:{auditLogs:void 0,retention:!1},support:{emailSupport:!0,customerSuccess:!1}}},{name:{id:"plans.tier.basic.name",defaultMessage:"Basic"},id:"basic",planId:{monthly:"basic-v1-EUR-Monthly",annually:"basic-v1-EUR-Yearly"},price:{monthly:62.49,annually:49.99*12},description:{id:"plans.tier.basic.description",defaultMessage:"Assist a larger number of visitors with a GPT chatbot for your medium-sized website."},highlightedFeatures:[{message:{id:"plans.tier.basic.features.users",defaultMessage:"{amount, plural, =1 {# user} other {# users}}"},values:{amount:5}},{message:{id:"plans.tier.basic.features.languages",defaultMessage:"Support {amount, plural, =1 {# language} other {# languages}}"},values:{amount:1}},{message:{id:"plans.tier.basic.features.limited_project",defaultMessage:"Create {amount, plural, =1 {# chatbot project} other {# chatbot projects}}"},values:{amount:1}},{message:{id:"plans.tier.basic.features.messages",defaultMessage:"{amount} questions per month"},values:{amount:500}},{message:{id:"plans.tier.basic.features.max_data_set",defaultMessage:"Maximum {amount} characters of input for training"},values:{amount:"1 million"}},{message:{id:"plans.tier.basic.features.conversation_history",defaultMessage:"View the conversation history up to 30 days."}}],features:{usage:{users:5,languages:1,messageCredits:500,characters:1e6},data:{url:!0,text:!0,faq:!0,prioritySettings:!1,advancedPrioritySettings:!1,manageThroughApi:!1},crawler:{total:1,interval:void 0,AdvancedSettings:!1,behindLogin:!1},models:{openAI:!0,azure:!0,stayInScope:!0,fusionAlgorithm:!1,"gpt3.5-turbo":!0,gpt4oMini:!0,gpt4o:!1,gpt4:!1,"gpt4-turbo":!1,contextWindow:{id:"plans.features.context_window.4k",defaultMessage:"Up to 4K"}},widget:{embed:!0,branding:!0,customCss:!1,utmTags:!1,whiteLabel:!1},chatbotProject:{total:1,welcomeMessage:!0,suggestions:!1,sourceReferences:!1,allowLeadGeneration:!1,customizeLeadGeneration:!1,feedbackModule:!1},aiFormProject:{total:3,export:!0,generateSuggestions:!0,keepActive:!0},conversations:{analytics:!0,history:{id:"plans.features.history.30_days",defaultMessage:"30 days"},export:!0},security:{auditLogs:void 0,retention:!1},support:{emailSupport:!0,customerSuccess:!1}},mostPopular:!1,isCustom:!1},{name:{id:"plans.tier.growth.name",defaultMessage:"Growth"},id:"growth",planId:{monthly:"growth-v1-EUR-Monthly",annually:"growth-v1-EUR-Yearly"},price:{monthly:124.99,annually:99.99*12},description:{id:"plans.tier.growth.description",defaultMessage:"Align the behavior of a GPT chatbot with the goals of your business and assist leads in multiple languages."},highlightedFeatures:[{message:{id:"plans.tier.growth.features.users",defaultMessage:"{amount, plural, =1 {# user} other {# users}}"},values:{amount:5}},{message:{id:"plans.tier.growth.features.languages",defaultMessage:"Support {amount, plural, =1 {# language} other {# languages}}"},values:{amount:3}},{message:{id:"plans.tier.growth.features.models",defaultMessage:"GPT 4o-mini"}},{message:{id:"plans.tier.growth.features.source_reference",defaultMessage:"Show source references under each chat message"}},{message:{id:"plans.tier.growth.features.feedback_module",defaultMessage:"Feedback module to improve the answers."}},{message:{id:"plans.tier.growth.features.handover",defaultMessage:"Enable chatbot-to-human handover via email when needed."}}],features:{usage:{users:5,languages:3,messageCredits:1e3,characters:1e6},data:{url:!0,text:!0,faq:!0,prioritySettings:!0,advancedPrioritySettings:!1,manageThroughApi:!0},crawler:{total:3,interval:void 0,AdvancedSettings:!1,behindLogin:!1},models:{openAI:!0,azure:!0,stayInScope:!0,fusionAlgorithm:!1,"gpt3.5-turbo":!0,gpt4oMini:!0,gpt4o:!1,gpt4:!1,"gpt4-turbo":!1,contextWindow:{id:"plans.features.context_window.4k",defaultMessage:"Up to 4K"}},widget:{embed:!0,branding:!0,customCss:!1,utmTags:!1,whiteLabel:!1},chatbotProject:{total:1,welcomeMessage:!0,suggestions:!1,sourceReferences:!0,allowLeadGeneration:!0,customizeLeadGeneration:!1,feedbackModule:!0},aiFormProject:{total:10,export:!0,generateSuggestions:!0,keepActive:!0},conversations:{analytics:!0,history:{id:"plans.features.history.30_days",defaultMessage:"30 days"},export:!0},security:{auditLogs:void 0,retention:!1},support:{emailSupport:!0,customerSuccess:!1}},mostPopular:!0,isCustom:!1}],o4=[{name:{id:"plans.tier.advanced.name",defaultMessage:"Advanced"},id:"advanced",planId:{monthly:"advanced-v1-EUR-Monthly",annually:"advanced-v1-EUR-Yearly"},price:{monthly:312.99,annually:249.99*12},description:{id:"plans.tier.advanced.description",defaultMessage:"Deploy and customize multiple GPT chatbot projects in multiple languages."},highlightedFeatures:[{message:{id:"plans.tier.advanced.features.models",defaultMessage:"GPT 4o"}},{message:{id:"plans.tier.advanced.features.context_window",defaultMessage:"Context window up to 8K"}},{message:{id:"plans.tier.advanced.features.conversation_history",defaultMessage:"View the conversation history up to one year."}},{message:{id:"plans.tier.growth.features.audit_log_history",defaultMessage:"Audit log history up to 3 months."}},{message:{id:"plans.tier.advanced.features.support",defaultMessage:"Human support during business hours"}}],features:{usage:{users:10,languages:5,messageCredits:3e3,characters:2e7},data:{url:!0,text:!0,faq:!0,prioritySettings:!0,advancedPrioritySettings:!0,manageThroughApi:!0},crawler:{total:10,interval:{id:"plans.features.interval.weekly",defaultMessage:"Weekly"},AdvancedSettings:!0,behindLogin:!1},models:{openAI:!0,azure:!0,stayInScope:!0,fusionAlgorithm:!0,"gpt3.5-turbo":!0,gpt4oMini:!0,gpt4o:!0,gpt4:!0,"gpt4-turbo":!0,contextWindow:{id:"plans.features.context_window.8k",defaultMessage:"Up to 8K"}},widget:{embed:!0,branding:!0,customCss:!1,utmTags:!0,whiteLabel:!1},chatbotProject:{total:5,welcomeMessage:!0,suggestions:!0,sourceReferences:!0,allowLeadGeneration:!0,customizeLeadGeneration:!0,feedbackModule:!0},aiFormProject:{total:25,export:!0,generateSuggestions:!0,keepActive:!0},conversations:{analytics:!0,history:{id:"plans.features.history.1_year",defaultMessage:"1 year"},export:!0},security:{auditLogs:{id:"plans.features.history.3_months",defaultMessage:"3 months"},retention:!1},support:{emailSupport:!0,customerSuccess:!1}},mostPopular:!1,isCustom:!1},{name:{id:"plans.tier.professional.name",defaultMessage:"Professional"},id:"professional",planId:{monthly:"professional-v1-EUR-Monthly",annually:"professional-v1-EUR-Yearly"},price:{monthly:624.99,annually:499.99*12},description:{id:"plans.tier.professional.description",defaultMessage:"Enable multiple GPT chatbot projects to efficiently handle a wide range of tasks at a professional scale with the guidance of your automatisation coach."},highlightedFeatures:[{message:{id:"plans.tier.professional.features.languages",defaultMessage:"Support unlimited languages"}},{message:{id:"plans.tier.growth.features.audit_log_history",defaultMessage:"Audit log history up to 1 year."}},{message:{id:"plans.tier.professional.features.re_crawler",defaultMessage:"Automatically recrawl your websites"}},{message:{id:"plans.tier.professional.features.retention",defaultMessage:"Setup retention policy"}},{message:{id:"plans.tier.professional.features.setup_coaching",defaultMessage:"Dedicated customer success manager"}}],features:{usage:{users:99,languages:Number.MAX_SAFE_INTEGER,messageCredits:1e4,characters:2e8},data:{url:!0,text:!0,faq:!0,prioritySettings:!0,advancedPrioritySettings:!0,manageThroughApi:!0},crawler:{total:Number.MAX_SAFE_INTEGER,interval:{id:"plans.features.interval.daily",defaultMessage:"Daily"},AdvancedSettings:!0,behindLogin:!0},models:{openAI:!0,azure:!0,stayInScope:!0,fusionAlgorithm:!0,"gpt3.5-turbo":!0,gpt4oMini:!0,gpt4o:!0,gpt4:!0,"gpt4-turbo":!0,contextWindow:{id:"plans.features.context_window.64k",defaultMessage:"Up to 64K"}},widget:{embed:!0,branding:!0,customCss:!0,utmTags:!0,whiteLabel:!0},chatbotProject:{total:Number.MAX_SAFE_INTEGER,welcomeMessage:!0,suggestions:!0,sourceReferences:!0,allowLeadGeneration:!0,customizeLeadGeneration:!0,feedbackModule:!0},aiFormProject:{total:Number.MAX_SAFE_INTEGER,export:!0,generateSuggestions:!0,keepActive:!0},conversations:{analytics:!0,history:{id:"plans.features.history.unlimited",defaultMessage:"Unlimited"},export:!0},security:{auditLogs:{id:"plans.features.history.1_year",defaultMessage:"1 year"},retention:!0},support:{emailSupport:!0,customerSuccess:!0}},mostPopular:!0,isCustom:!1},{id:"enterprise",name:{id:"plans.tier.enterprise.name",defaultMessage:"Enterprise"},planId:{monthly:"enterprise-v1-EUR-Monthly",annually:"enterprise-v1-EUR-Yearly"},price:{monthly:1e6,annually:1e6*12},description:{id:"plans.tier.enterprise.description",defaultMessage:"Have custom GPT projects created specifically for your business that achieve the precise goals at a large scale and across multiple projects."},highlightedFeatures:[],features:{usage:{users:Number.MAX_SAFE_INTEGER,languages:Number.MAX_SAFE_INTEGER,messageCredits:2e4,characters:1e9},data:{url:!0,text:!0,faq:!0,prioritySettings:!0,advancedPrioritySettings:!0,manageThroughApi:!0},crawler:{total:Number.MAX_SAFE_INTEGER,interval:{id:"plans.features.interval.daily",defaultMessage:"Daily"},AdvancedSettings:!0,behindLogin:!0},models:{openAI:!0,azure:!0,stayInScope:!0,fusionAlgorithm:!0,"gpt3.5-turbo":!0,gpt4oMini:!0,gpt4o:!0,gpt4:!0,"gpt4-turbo":!0,contextWindow:{id:"plans.features.context_window.64k",defaultMessage:"Up to 64K"}},widget:{embed:!0,branding:!0,customCss:!0,utmTags:!0,whiteLabel:!0},chatbotProject:{total:Number.MAX_SAFE_INTEGER,welcomeMessage:!0,suggestions:!0,sourceReferences:!0,allowLeadGeneration:!0,customizeLeadGeneration:!0,feedbackModule:!0},aiFormProject:{total:Number.MAX_SAFE_INTEGER,export:!0,generateSuggestions:!0,keepActive:!0},conversations:{analytics:!0,history:{id:"plans.features.history.unlimited",defaultMessage:"Unlimited"},export:!0},security:{auditLogs:{id:"plans.features.history.unlimited",defaultMessage:"Unlimited"},retention:!0},support:{emailSupport:!0,customerSuccess:!0}},mostPopular:!1,isCustom:!0}],e5=[...$9,...o4],yci=[{key:"usage",title:{id:"billing.pricing_table.usage.title",defaultMessage:"Usage"},rows:[{type:"number",key:"users",label:{id:"billing.pricing_table.usage.users",defaultMessage:"Users"}},{type:"number",key:"languages",label:{id:"billing.pricing_table.usage.languages",defaultMessage:"Languages"}},{type:"number",key:"messageCredits",label:{id:"billing.pricing_table.usage.message_credits",defaultMessage:"Message credits"}},{type:"number",key:"characters",label:{id:"billing.pricing_table.usage.characters",defaultMessage:"Characters"}}]},{key:"data",title:{id:"billing.pricing_table.data_sources.title",defaultMessage:"Data sources"},rows:[{key:"url",type:"boolean",label:{id:"billing.pricing_table.data_sources.url",defaultMessage:"url"}},{key:"text",type:"boolean",label:{id:"billing.pricing_table.data_sources.text",defaultMessage:"text"}},{key:"faq",type:"boolean",label:{id:"billing.pricing_table.data_sources.faq",defaultMessage:"faq"}},{type:"boolean",key:"prioritySettings",label:{id:"billing.pricing_table.data_sources.priority_settings",defaultMessage:"Priority settings"}},{type:"boolean",key:"advancedPrioritySettings",label:{id:"billing.pricing_table.data_sources.advanced_priority_settings",defaultMessage:"Advanced priority settings"}},{type:"boolean",key:"manageThroughApi",label:{id:"billing.pricing_table.data_sources.manage_through_api",defaultMessage:"Manage documents with API"}}]},{key:"crawler",title:{id:"billing.pricing_table.crawler.title",defaultMessage:"Crawlers"},rows:[{type:"number",key:"total",label:{id:"billing.pricing_table.data_sources.crawler_limit",defaultMessage:"Crawlers"}},{type:"string",key:"interval",label:{id:"billing.pricing_table.data_sources.intervals",defaultMessage:"Intervals"}},{type:"boolean",key:"AdvancedSettings",label:{id:"billing.pricing_table.data_sources.advanced_settings",defaultMessage:"Advanced settings"}},{type:"boolean",key:"behindLogin",label:{id:"billing.pricing_table.data_sources.behind_login",defaultMessage:"Behind login"}}]},{key:"models",title:{id:"billing.pricing_table.models.title",defaultMessage:"Models"},rows:[{key:"openAI",type:"boolean",label:{id:"billing.pricing_table.models.openAI",defaultMessage:"OpenAI"}},{key:"azure",type:"boolean",label:{id:"billing.pricing_table.models.azure",defaultMessage:"Azure OpenAI"}},{key:"stayInScope",type:"boolean",label:{id:"billing.pricing_table.models.stay_in_scope",defaultMessage:"Stay in scope"}},{key:"fusionAlgorithm",type:"boolean",label:{id:"billing.pricing_table.models.fusion_algorithm",defaultMessage:"Fusion algorithm"}},{key:"gpt3.5-turbo",type:"boolean",label:{id:"billing.pricing_table.models.gpt3_5_turbo",defaultMessage:"GPT 3.5-turbo"}},{key:"gpt4oMini",type:"boolean",label:{id:"billing.pricing_table.models.gpt_4o_mini",defaultMessage:"GPT 4o mini"}},{key:"gpt4o",type:"boolean",label:{id:"billing.pricing_table.models.gpt4o",defaultMessage:"GPT 4o"}},{key:"gpt4",type:"boolean",label:{id:"billing.pricing_table.models.gpt4",defaultMessage:"GPT 4"}},{key:"gpt4-turbo",type:"boolean",label:{id:"billing.pricing_table.models.gpt4_turbo",defaultMessage:"GPT 4 turbo"}},{key:"contextWindow",type:"boolean",label:{id:"billing.pricing_table.models.context_window",defaultMessage:"Context window"}}]},{key:"widget",title:{id:"billing.pricing_table.widget.title",defaultMessage:"Widget"},rows:[{type:"boolean",key:"embed",label:{id:"billing.pricing_table.widget.embed",defaultMessage:"Embed"}},{type:"boolean",key:"branding",label:{id:"billing.pricing_table.widget.branding",defaultMessage:"Branding"}},{type:"boolean",key:"customCss",label:{id:"billing.pricing_table.widget.customCss",defaultMessage:"Custom CSS"}},{type:"boolean",key:"utmTags",label:{id:"billing.pricing_table.widget.utmTags",defaultMessage:"UTM tags"}},{type:"boolean",key:"whiteLabel",label:{id:"billing.pricing_table.widget.whiteLabel",defaultMessage:"Hide Chathive branding"}}]},{key:"chatbotProject",title:{id:"billing.pricing_table.chatbot_project.title",defaultMessage:"Chatbot project"},rows:[{type:"number",key:"total",label:{id:"billing.pricing_table.chatbot_project.total",defaultMessage:"Total"}},{key:"welcomeMessage",type:"boolean",label:{id:"billing.pricing_table.chatbot_project.welcome_message",defaultMessage:"Welcome messages"}},{key:"suggestions",type:"boolean",label:{id:"billing.pricing_table.chatbot_project.suggestions",defaultMessage:"Suggestions"}},{key:"sourceReferences",type:"boolean",label:{id:"billing.pricing_table.chatbot_project.source_references",defaultMessage:"Source references"}},{key:"allowLeadGeneration",type:"boolean",label:{id:"billing.pricing_table.chatbot_project.lead_generation",defaultMessage:"Lead generation"}},{key:"customizeLeadGeneration",type:"boolean",label:{id:"billing.pricing_table.chatbot_project.customize_lead_generation",defaultMessage:"Customize lead generation"}},{key:"feedbackModule",type:"boolean",label:{id:"billing.pricing_table.chatbot_project.feedback_module",defaultMessage:"Feedback module"}}]},{key:"aiFormProject",title:{id:"billing.pricing_table.ai_form_project.title",defaultMessage:"AI form project"},rows:[{type:"number",key:"total",label:{id:"billing.pricing_table.ai_form_project.total",defaultMessage:"Total"}},{key:"export",type:"boolean",label:{id:"billing.pricing_table.ai_form_project.export",defaultMessage:"Export sessions"}},{key:"generateSuggestions",type:"boolean",label:{id:"billing.pricing_table.ai_form_project.generate_suggestions",defaultMessage:"Generate suggestions"}},{key:"keepActive",type:"boolean",label:{id:"billing.pricing_table.ai_form_project.keep_Active",defaultMessage:"Keep active"}}]},{key:"conversations",title:{id:"billing.pricing_table.conversations.title",defaultMessage:"Conversations"},rows:[{type:"boolean",key:"analytics",label:{id:"billing.pricing_table.conversations.analytics",defaultMessage:"Analytics"}},{key:"history",type:"string",label:{id:"billing.pricing_table.conversations.history",defaultMessage:"Conversation history"}},{key:"export",type:"boolean",label:{id:"billing.pricing_table.conversations.export",defaultMessage:"Export conversations"}}]},{key:"security",title:{id:"billing.pricing_table.security_compliance.title",defaultMessage:"Security + Compliance"},rows:[{key:"auditLogs",type:"string",label:{id:"billing.pricing_table.security_compliance.audit_logs",defaultMessage:"Audit logs"}},{key:"retention",type:"number",label:{id:"billing.pricing_table.security_compliance.retention",defaultMessage:"Conversation retention"}}]},{key:"support",title:{id:"billing.pricing_table.support.title",defaultMessage:"Support"},rows:[{type:"boolean",key:"emailSupport",label:{id:"billing.pricing_table.support.email_support",defaultMessage:"Email support"}},{type:"boolean",key:"customerSuccess",label:{id:"billing.pricing_table.support.customer_support",defaultMessage:"Dedicated Customer Success Manager"}}]}];function qee({tiers:t,selectedTierId:e}){const n=Mt();return v.jsxDEV("div",{className:"flex flex-col gap-16",children:yci.map(i=>{var r;return v.jsxDEV("section",{className:"flex flex-col gap-4",children:[v.jsxDEV("h2",{className:"text-2xl",children:v.jsxDEV(ee,{...i.title},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/PricingTable.tsx",lineNumber:16,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/PricingTable.tsx",lineNumber:15,columnNumber:6},this),v.jsxDEV("div",{className:"w-full overflow-y-auto",children:v.jsxDEV(qs,{scroll:{x:896},pagination:!1,dataSource:i.rows,columns:[{key:"label",width:"192px",fixed:"left",dataIndex:"label",render:o=>v.jsxDEV(Fn.Text,{strong:!0,children:v.jsxDEV(ee,{...o},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/PricingTable.tsx",lineNumber:31,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/PricingTable.tsx",lineNumber:30,columnNumber:11},this)},...t.map(o=>({key:"key",width:"10vw",minWidth:128,dataIndex:[],align:"center",title:n.formatMessage(o.name),className:o.id===e?"!bg-theme-primary/20 [&.ant-table-cell-row-hover]:!bg-theme-primary/10":"",render:s=>{let a=o.features[i.key][s.key];if(!a&&a!==0)return v.jsxDEV(vb,{className:"text-red-500"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/PricingTable.tsx",lineNumber:49,columnNumber:45},this);if(a===!0)return v.jsxDEV(Xk,{className:"text-green-500"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/PricingTable.tsx",lineNumber:50,columnNumber:38},this);let l="";return Number.isNaN(a)||(l=n.formatNumber(a)),a.id&&(l=n.formatMessage(a)),a===Number.MAX_SAFE_INTEGER&&(l=n.formatMessage({id:"billing.pricing_table.unlimited",defaultMessage:"Unlimited"})),v.jsxDEV("p",{children:l},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/PricingTable.tsx",lineNumber:64,columnNumber:18},this)}}))]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/PricingTable.tsx",lineNumber:19,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/PricingTable.tsx",lineNumber:18,columnNumber:6},this)]},(r=i.title)==null?void 0:r.id,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/PricingTable.tsx",lineNumber:14,columnNumber:5},this)})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/PricingTable.tsx",lineNumber:12,columnNumber:3},this)}function Cie({title:t,plan:e,className:n=""}){return v.jsxDEV("article",{className:`flex flex-col justify-start align-start gap-2 ${n}`,children:[v.jsxDEV(Fn.Text,{type:"secondary",className:"uppercase",children:t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/planDetail.tsx",lineNumber:13,columnNumber:4},this),v.jsxDEV(Fn.Text,{strong:!0,children:v.jsxDEV(ee,{...e.name},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/planDetail.tsx",lineNumber:15,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/planDetail.tsx",lineNumber:14,columnNumber:4},this),v.jsxDEV("ul",{className:"list-disc pl-4",children:e.highlightedFeatures.slice(0,5).map(i=>v.jsxDEV("li",{children:v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{...i.message,values:i.values},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/planDetail.tsx",lineNumber:21,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/planDetail.tsx",lineNumber:20,columnNumber:7},this)},i.message.id,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/planDetail.tsx",lineNumber:19,columnNumber:6},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/planDetail.tsx",lineNumber:17,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/planDetail.tsx",lineNumber:12,columnNumber:3},this)}function pot(t){return e5.find(e=>e.planId.monthly===t||e.planId.annually===t)}function _ci({isOpen:t,newPlanId:e,currentPlanId:n,frequency:i,onClose:r}){const o=Mt(),s=Je.getPortalLogin.useQuery(),a=Je.changeSubscription.useMutation(),l=Je.useContext(),c=pot(n),u=pot(e),d=async()=>{try{const f=await a.mutateAsync({planId:e,type:i});if(!f)throw new Error("Check out url is not defined");r(),bOt({url:f,callback:()=>{l.getOrganization.invalidate(),Ei.success({placement:"bottomRight",message:o.formatMessage({id:"billing.chang_plan.succeeded.message",defaultMessage:"Your plan has successfully been changed.",description:"Show confirmation banner subscription change worked"})})}})}catch(f){console.error("Change subscription failed",f),Ei.error({placement:"bottomRight",message:o.formatMessage({id:"billing.chang_plan.error.message",defaultMessage:"Something went wrong while changing your billing plan. Please try again later.",description:"If we can't get a change users subscription in stripe throw error"})})}},h=b.useMemo(()=>{var f,m;return((f=c==null?void 0:c.price)==null?void 0:f.monthly)===u.price.monthly?"change":((m=c==null?void 0:c.price)==null?void 0:m.monthly)<u.price.monthly?"upgrade":"downgrade"},[c,u]);return v.jsxDEV(Ma,{open:t,onCancel:r,footer:null,width:"640px",children:v.jsxDEV("div",{className:"flex flex-col justify-center gap-8 p-2 md:p-4",children:[v.jsxDEV("img",{src:"/img/svg/credit_card.svg",className:"h-44"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:77,columnNumber:5},this),v.jsxDEV("section",{className:"flex flex-col",children:[v.jsxDEV("h1",{className:"font-bold text-xl text-center mb-2",children:v.jsxDEV(ee,{id:"billing.chang_plan.title",defaultMessage:"Change your plan",description:"Title for upgrade billing plan modal"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:80,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:79,columnNumber:6},this),v.jsxDEV(Fn.Text,{className:"text-center",children:v.jsxDEV(ee,{id:"billing.chang_plan.description.manage_billing_information",defaultMessage:"Billing information can be managed in <link>the billing portal</link>.",description:"Description for upgrade billing plan modal. With link to location where user can change billing information",values:{link:f=>v.jsxDEV("a",{href:s.data,target:"_blank",children:f},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:93,columnNumber:10},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:87,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:86,columnNumber:6},this),v.jsxDEV(Fn.Text,{className:"text-center",children:v.jsxDEV(ee,{id:"billing.chang_plan.description.change_explanation",defaultMessage:"Changes will apply immediately.",description:"Billing changes will happen immediately after payment is confirmed"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:101,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:100,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:78,columnNumber:5},this),v.jsxDEV("section",{className:"flex flex-col items-center sm:flex-row gap-8 justify-center",children:[v.jsxDEV(Cie,{title:o.formatMessage({id:"billing.chang_plan.detail.current_plan.title",defaultMessage:"Current plan"}),plan:c,className:"w-full sm:w-5/12"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:109,columnNumber:6},this),v.jsxDEV(o$e,{className:"sm:-rotate-90"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:117,columnNumber:6},this),v.jsxDEV(Cie,{title:o.formatMessage({id:"billing.chang_plan.detail.new_plan.title",defaultMessage:"New plan"}),plan:u,className:"w-full sm:w-5/12"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:118,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:108,columnNumber:5},this),v.jsxDEV("div",{className:"flex flex-col items-center gap-4",children:[v.jsxDEV(vn,{type:"primary",className:"w-full",onClick:d,loading:a.isLoading,children:[h==="upgrade"&&v.jsxDEV(ee,{id:"billing.chang_plan.button.upgrade",defaultMessage:"Yes, upgrade my plan",description:"Upgrade button"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:135,columnNumber:8},this),h==="change"&&v.jsxDEV(ee,{id:"billing.chang_plan.button.change",defaultMessage:"Yes, change my plan",description:"Change plan from monthly or annually or vice versa button"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:142,columnNumber:8},this),h==="downgrade"&&v.jsxDEV(ee,{id:"billing.chang_plan.button.downgrade",defaultMessage:"Yes, downgrade my plan",description:"Downgrade button"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:149,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:128,columnNumber:6},this),v.jsxDEV(vn,{type:"text",onClick:r,className:"w-max",children:v.jsxDEV(ee,{id:"billing.chang_plan.button.cancel",defaultMessage:"No thanks",description:"close modal button"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:157,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:156,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:127,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:76,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/index.tsx",lineNumber:75,columnNumber:3},this)}function Sie(t){return t-t*25/100}function got(t){return e5.find(e=>e.planId.monthly===t||e.planId.annually===t)}function xci({organization:t,isOpen:e,onClose:n}){const i=Mt(),r=Je.useContext(),[o,s]=b.useState(t.billing.planId||"trial"),a=Je.reseller.updateOrganizationBilling.useMutation(),l=o&&got(o),c=t.billing.planId&&got(t.billing.planId),u=l&&c&&(l.id==="enterprise"||c.id==="enterprise"),d=b.useMemo(()=>{if(l)return c?o===t.billing.planId?"noChange":c.price.monthly===l.price.monthly?"change":c.price.monthly<l.price.monthly?"upgrade":"downgrade":"upgrade"},[c,l,o]),h=b.useMemo(()=>{const m=e5.map(p=>{const g=i.formatMessage(p.name),y=i.formatMessage({id:"billing.reseller_change_plan.planId.option.monthly",defaultMessage:"Monthly - ({price, plural, =0 {Free} other {€ {formattedPrice}}})"},{price:p.price.monthly,formattedPrice:i.formatNumber(Sie(p.price.monthly),{minimumFractionDigits:0,maximumFractionDigits:2})}),_=i.formatMessage({id:"billing.reseller_change_plan.planId.option.annually",defaultMessage:"Annually - ({price, plural, =0 {Free} other {€ {formattedPrice}}})"},{price:p.price.annually,formattedPrice:i.formatNumber(Sie(p.price.annually),{minimumFractionDigits:0,maximumFractionDigits:2})});return{label:g,options:[{data:`${g} ${y.toLowerCase()}`,value:p.planId.monthly,label:y},{data:`${g} ${_.toLowerCase()}`,value:p.planId.annually,label:_}]}});return t.billing.planId?m:[{label:i.formatMessage({id:"billing.reseller_change_plan.detail.current_plan.trial_plan.label",defaultMessage:"Trial"}),options:[{value:"trial",disabled:!0,label:i.formatMessage({id:"billing.reseller_change_plan.detail.current_plan.trial_plan.description",defaultMessage:"30 day free trial"})}]},...m]},[]),f=async()=>{try{if(!o||d==="noChange")return;await a.mutateAsync({organizationId:t==null?void 0:t._id,planId:o}),n(),r.getOrganization.invalidate(),Ei.success({placement:"bottomRight",message:i.formatMessage({id:"billing.reseller_change_plan.succeeded.message",defaultMessage:"Organization plan has been changed.",description:"Show confirmation banner subscription change worked"})})}catch(m){console.error("Change subscription failed",m),Ei.error({placement:"bottomRight",message:i.formatMessage({id:"billing.reseller_change_plan.error.message",defaultMessage:"Something went wrong while changing the plan. Please try again later.",description:"If we can't get a change users subscription in stripe throw error"})})}};return v.jsxDEV(Ma,{open:e,onCancel:n,footer:null,width:"640px",children:v.jsxDEV("div",{className:"flex flex-col justify-center gap-8 p-2 md:p-4",children:[v.jsxDEV("img",{src:"/img/svg/credit_card.svg",className:"h-44"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:149,columnNumber:5},this),v.jsxDEV("section",{className:"flex flex-col",children:[v.jsxDEV("h1",{className:"font-bold text-xl text-center mb-2",children:v.jsxDEV(ee,{id:"billing.reseller_change_plan.title",defaultMessage:"Change the organization's plan",description:"Title for the reseller to change the organizations plan"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:152,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:151,columnNumber:6},this),v.jsxDEV(Fn.Text,{className:"text-center",children:v.jsxDEV(ee,{id:"billing.reseller_change_plan.description",defaultMessage:"Organization's plan can be changed at any moment and will be billed to you, as agreed in our reseller's agreement. Changes will apply immediately."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:159,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:158,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:150,columnNumber:5},this),v.jsxDEV(Lo,{showSearch:!0,size:"large",options:h,value:o,allowClear:!1,optionLabelProp:"data",filterOption:(m,p)=>{var g,y;return((y=(g=p==null?void 0:p.label)==null?void 0:g.toLowerCase())==null?void 0:y.includes(m.toLowerCase()))||!0},onChange:s},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:165,columnNumber:5},this),d!=="noChange"&&l&&!u&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV("section",{className:"flex flex-col items-center sm:flex-row gap-8",children:[c&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Cie,{title:i.formatMessage({id:"billing.reseller_change_plan.detail.current_plan.title",defaultMessage:"Current plan"}),plan:c,className:"w-full sm:w-5/12"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:182,columnNumber:10},this),v.jsxDEV(o$e,{className:"sm:-rotate-90"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:190,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:181,columnNumber:9},this),v.jsxDEV(Cie,{title:i.formatMessage({id:"billing.reseller_change_plan.detail.new_plan.title",defaultMessage:"New plan"}),plan:l,className:"w-full sm:w-5/12"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:193,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:179,columnNumber:7},this),v.jsxDEV("div",{className:"flex flex-col items-center gap-4",children:[v.jsxDEV(vn,{type:"primary",className:"w-full",onClick:f,loading:a.isLoading,children:[d==="upgrade"&&v.jsxDEV(ee,{id:"billing.reseller_change_plan.button.upgrade",defaultMessage:"Yes, upgrade organization's plan",description:"Upgrade button"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:210,columnNumber:10},this),d==="change"&&v.jsxDEV(ee,{id:"billing.reseller_change_plan.button.change",defaultMessage:"Yes, change organization's plan",description:"Change plan from monthly or annually or vice versa button"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:217,columnNumber:10},this),d==="downgrade"&&v.jsxDEV(ee,{id:"billing.reseller_change_plan.button.downgrade",defaultMessage:"Yes, downgrade organization's plan",description:"Downgrade button"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:224,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:203,columnNumber:8},this),v.jsxDEV(vn,{type:"text",onClick:n,className:"w-max",children:v.jsxDEV(ee,{id:"billing.reseller_change_plan.button.cancel",defaultMessage:"No thanks",description:"close modal button"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:232,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:231,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:202,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:178,columnNumber:6},this),d!=="noChange"&&u&&v.jsxDEV(pl,{type:"info",message:i.formatMessage({id:"billing.reseller_change_plan.info.enterprise_plan",defaultMessage:"Switching enterprise plans isn't straightforward. Get in touch with our support team for personalized assistance!",description:"Explain to user changing from or to plan is not possible and they should contact us"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:242,columnNumber:6},this),d==="noChange"&&v.jsxDEV(pl,{message:i.formatMessage({id:"billing.reseller_change_plan.info.same_plan",defaultMessage:"The current organization plan is selected.",description:"Explain to user they selected the current plan"}),type:"info"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:254,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:148,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/changeBillingModal/resellerModal.tsx",lineNumber:147,columnNumber:3},this)}function wci({tier:t,isLoading:e,isSelected:n,frequency:i,currentTierId:r,onSelect:o}){const s=i.value==="monthly"?t.price.monthly:t.price.annually/12;return v.jsxDEV("div",{className:Vt("rounded-3xl p-8 relative",t.mostPopular?"ring-2 ring-theme-primary":"ring-1 ring-gray-200",n?"ring-2 ring-theme-secondary cursor-not-allowed":""),children:[t.mostPopular&&!n&&v.jsxDEV(kv,{color:yd,className:"absolute top-4 right-2",style:{position:"absolute"},children:v.jsxDEV(ee,{id:"billing.tier.most_popular",defaultMessage:"Most popular"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:32,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:31,columnNumber:5},this),n&&v.jsxDEV(kv,{color:j$e,className:"absolute top-4 right-2",style:{position:"absolute"},children:v.jsxDEV(ee,{id:"billing.tier.current_plan",defaultMessage:"Current plan"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:37,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:36,columnNumber:5},this),v.jsxDEV("div",{style:{minHeight:"180px"},children:[v.jsxDEV("h3",{id:t.id,className:Vt("text-lg font-semibold leading-8 text-gray-900",t.mostPopular&&"text-theme-primary",n&&"text-theme-secondary"),children:v.jsxDEV(ee,{...t.name},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:49,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:41,columnNumber:5},this),v.jsxDEV("p",{className:"mt-4 text-sm leading-6 text-gray-600 h-18 sm:h-28 md:h-20",children:v.jsxDEV(ee,{...t.description},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:52,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:51,columnNumber:5},this),!s&&v.jsxDEV("p",{className:"mt-6 flex items-baseline gap-x-1 text-2xl sm:text-3xl font-bold tracking-tight text-gray-900",children:v.jsxDEV(ee,{id:"billing.tier.price.free",defaultMessage:"Free"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:56,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:55,columnNumber:6},this),s>0&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV("p",{className:"mt-6 flex items-baseline gap-x-1",children:[v.jsxDEV("span",{className:"text-2xl sm:text-3xl font-bold tracking-tight text-gray-900",children:["€ ",s]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:62,columnNumber:8},this),v.jsxDEV("span",{className:"text-sm font-semibold leading-6 text-gray-600",children:i.priceSuffix},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:65,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:61,columnNumber:7},this),v.jsxDEV("div",{className:"text-left",children:v.jsxDEV("p",{className:"text-[10px] text-zinc-500",children:v.jsxDEV(ee,{id:"billing.tier.price.ex_vat",defaultMessage:"Exclusive VAT"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:71,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:70,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:69,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:60,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:40,columnNumber:4},this),v.jsxDEV(vn,{type:"primary",disabled:n||e&&r!==t.id,loading:e&&r===t.id,onClick:()=>o(t),className:"mt-6",children:[n&&v.jsxDEV(ee,{id:"billing.buy.button.is_selected",defaultMessage:"Current plan",description:"Show to user this plan is selected, this button is disabled"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:86,columnNumber:6},this),!n&&v.jsxDEV(ee,{id:"billing.buy.button",defaultMessage:"Choose plan"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:92,columnNumber:21},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:78,columnNumber:4},this),v.jsxDEV("ul",{role:"list",className:"mt-8 space-y-3 text-sm leading-6 text-gray-600",children:t.highlightedFeatures.map(a=>v.jsxDEV("li",{className:"flex gap-x-3",children:[v.jsxDEV(Xk,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:97,columnNumber:7},this),v.jsxDEV(ee,{...a.message,values:a.values},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:98,columnNumber:7},this)]},`${a.message.id}`,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:96,columnNumber:6},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:94,columnNumber:4},this)]},t.id,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/defaultTier.tsx",lineNumber:22,columnNumber:3},this)}function Cci({tier:t,isLoading:e,isSelected:n,currentTierId:i}){const r=Mt(),o=r.formatMessage(t.name),s=r.formatMessage({id:"billing.tier.custom.email.subject",defaultMessage:"I am interested in the {tierName} plan.",description:"Subject that will be prefilled when user wants to contact us about the custom plan"},{tierName:o.toLowerCase()}),{data:a}=Je.getReseller.useQuery(void 0);return v.jsxDEV("div",{className:Vt("rounded-3xl p-8 relative",t.mostPopular?"ring-2 ring-theme-primary":"ring-1 ring-gray-200",n?"ring-2 ring-theme-secondary cursor-not-allowed":""),children:[n&&v.jsxDEV(kv,{color:j$e,className:"absolute top-4 right-2",style:{position:"absolute"},children:v.jsxDEV(ee,{id:"billing.tier.current_plan",defaultMessage:"Current plan"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/customTier.tsx",lineNumber:41,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/customTier.tsx",lineNumber:40,columnNumber:5},this),v.jsxDEV("div",{style:{minHeight:"180px"},children:[v.jsxDEV("h3",{id:t.id,className:Vt("text-lg font-semibold leading-8 text-gray-900",t.mostPopular&&"text-theme-primary",n&&"text-theme-secondary"),children:v.jsxDEV(ee,{...t.name},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/customTier.tsx",lineNumber:53,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/customTier.tsx",lineNumber:45,columnNumber:5},this),v.jsxDEV("p",{className:"mt-4 text-sm leading-6 text-gray-600  h-18 sm:h-28 md:h-20",children:v.jsxDEV(ee,{...t.description},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/customTier.tsx",lineNumber:56,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/customTier.tsx",lineNumber:55,columnNumber:5},this),v.jsxDEV("p",{className:"mt-6 flex items-baseline gap-x-1 mb-6",children:v.jsxDEV("span",{className:"text-2xl sm:text-3xl  font-bold tracking-tight text-gray-900",children:v.jsxDEV(ee,{id:"billing.tier.custom.price",defaultMessage:"Custom",description:"The pricing in custom tiers are always custom based on the customers needs"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/customTier.tsx",lineNumber:60,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/customTier.tsx",lineNumber:59,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/customTier.tsx",lineNumber:58,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/customTier.tsx",lineNumber:44,columnNumber:4},this),v.jsxDEV(vn,{type:"primary",disabled:n||e&&i!==t.id,loading:e&&i===t.id,href:`mailto:${(a==null?void 0:a.email)||"support@chathive.co"}?subject=${s}`,className:"mt-6",children:v.jsxDEV(ee,{id:"billing.tier.custom.contact_sales",defaultMessage:"Contact sales",description:"Custom plans have no select button, just a button to let them contact our sales"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/customTier.tsx",lineNumber:76,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/customTier.tsx",lineNumber:69,columnNumber:4},this),v.jsxDEV("p",{className:"mt-8 space-y-3 text-sm leading-6 text-gray-600 text-left",children:v.jsxDEV(ee,{id:"billing.tier.custom.features",defaultMessage:"Enterprise tier contains all the features from our other plans and more. It's for advanced teams that have special needs, complex workflows and don't want to be limited."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/customTier.tsx",lineNumber:83,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/customTier.tsx",lineNumber:82,columnNumber:4},this)]},t.id,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/customTier.tsx",lineNumber:31,columnNumber:3},this)}function bot({frequency:t,organization:e,tiers:n,selectedTierId:i,isLoading:r,onSelect:o,className:s}){return v.jsxDEV("div",{className:Vt("isolate mx-auto grid max-w-full grid-cols-1 gap-4","xl:gap-8 sm:max-w-2xl sm:grid-cols-2 md:grid-cols-1 lg:grid-cols-2 lg:max-w-4xl 2xl:mx-0 2xl:max-w-none 2xl:grid-cols-3",s),children:n.map(a=>{var c;const l=a.planId[t.value]===((c=e==null?void 0:e.billing)==null?void 0:c.planId);return a.isCustom?v.jsxDEV(Cci,{tier:a,isLoading:r,isSelected:l,currentTierId:i},a.id,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/tiersList.tsx",lineNumber:31,columnNumber:7},this):v.jsxDEV(wci,{tier:a,isLoading:r,frequency:t,isSelected:l,currentTierId:i,onSelect:o},a.id,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/tiersList.tsx",lineNumber:42,columnNumber:6},this)})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/components/tiersList.tsx",lineNumber:19,columnNumber:3},this)}function Sci(){var y,_,w,C,N,E,D;const t=Mt(),e=Oi(N6),[n,i]=b.useState(),[r,o]=b.useState(!1),{data:s}=Je.getAuthUser.useQuery(),{data:a}=Je.getOrganization.useQuery(void 0,{refetchOnWindowFocus:!0}),l=Je.createCheckoutSession.useMutation(),{data:c,isLoading:u}=Je.getReseller.useQuery(void 0),d=Je.getPortalLogin.useQuery(void 0,{enabled:(e==null?void 0:e.role)==="admin"&&!c}),h=[{value:"monthly",label:t.formatMessage({id:"plans.frequency.monthly",defaultMessage:"Monthly"}),priceSuffix:t.formatMessage({id:"plans.frequency.month",defaultMessage:"/month"})},{value:"annually",label:t.formatMessage({id:"plans.frequency.yearly",defaultMessage:"Annually"}),priceSuffix:t.formatMessage({id:"plans.frequency.month",defaultMessage:"/month"})}],[f,m]=b.useState(h.find(k=>k.value===(a==null?void 0:a.billing.type))||h[1]),p=async k=>{var M,T;try{i(k);const A=k.planId[f.value];if(c){o(!0);return}if(window._cio.track("billing_plan_selected",{planId:A,type:f.value}),!k||A===((M=a==null?void 0:a.billing)==null?void 0:M.planId))return;if((T=a==null?void 0:a.billing)!=null&&T.subscriptionId)return o(!0);const R=await l.mutateAsync({planId:A,type:f.value});if(!R)throw new Error;bOt({url:R,callback:()=>{}})}catch(A){console.error("Select plan failed",A),Ei.error({placement:"bottomRight",message:t.formatMessage({id:"billing.go_to_billing.error.message",defaultMessage:"Something went wrong while loading the checkout page.",description:"If we can't get a check out link from stripe throw error"})})}i(void 0)};if((e==null?void 0:e.role)==="default")return v.jsxDEV(fd,{icon:v.jsxDEV("img",{src:"/img/svg/locked.svg",className:"h-48 mx-auto"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:87,columnNumber:11},this),title:t.formatMessage({id:"billing.unauthorized.title",defaultMessage:"You are not authorized to access the billing page.",description:"Default members don't have access to the billing page"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:86,columnNumber:4},this);if(u)return v.jsxDEV("div",{className:"h-full flex flex-col justify-center items-center gap-4",children:[v.jsxDEV(zS,{size:"large"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:100,columnNumber:5},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"billing.loader.title",defaultMessage:"We are loading the pricing page.",description:"Message show'n when billing page is loaded in and loader is show'n"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:102,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:101,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:99,columnNumber:4},this);if(c&&(s==null?void 0:s.type)!=="reseller")return v.jsxDEV("div",{className:"w-full grid gap-4",children:[v.jsxDEV(uo,{className:"billing-card bg-white !py-6 sm:!py-12 w-full overflow-hidden",children:v.jsxDEV("div",{className:"w-full flex flex-col justify-between items-start gap-4 lg:flex-row lg:items-center max-w-7xl mx-auto",children:[v.jsxDEV("div",{className:"flex flex-col justify-start items-start w-full text-left gap-4",children:[v.jsxDEV("img",{src:c.logo,className:"h-20 rounded"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:118,columnNumber:8},this),v.jsxDEV("h2",{className:"text-xl font-semibold",children:v.jsxDEV(ee,{id:"billing.reseller.title",defaultMessage:"Your plan is managed by our partner."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:120,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:119,columnNumber:8},this),v.jsxDEV(Fn.Text,{className:"max-w-[96ch]",children:v.jsxDEV(ee,{id:"billing.reseller.description",defaultMessage:"If you want to change your current plan, you need to contact <bold>{resellerName}</bold>. They will take care of any changes you need.",values:{resellerName:c.name,bold:k=>v.jsxDEV(Fn.Text,{strong:!0,children:k},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:131,columnNumber:30},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:126,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:125,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:117,columnNumber:7},this),v.jsxDEV(vn,{type:"primary",size:"large",href:`mailto:${c.name} <${c.email}>?subject=Chathive plan change`,children:v.jsxDEV(ee,{id:"billing.reseller.button",defaultMessage:"Contact {resellerName}",values:{resellerName:c.name}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:141,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:136,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:116,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:115,columnNumber:5},this),v.jsxDEV(uo,{children:v.jsxDEV(qee,{tiers:[...$9,...o4],selectedTierId:(y=a==null?void 0:a.billing)==null?void 0:y.planId},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:150,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:149,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:114,columnNumber:4},this);if(c&&(s==null?void 0:s.type)==="reseller"&&a)return v.jsxDEV("div",{className:"w-full grid gap-4",children:[v.jsxDEV(uo,{className:"billing-card bg-white !py-6 sm:!py-12 w-full overflow-hidden",children:[v.jsxDEV("div",{className:"w-full flex flex-col justify-between items-start gap-4 lg:flex-row lg:items-center max-w-7xl mx-auto",children:[v.jsxDEV("div",{className:"flex flex-col justify-start items-start w-full text-left gap-4",children:[((_=c.logo)==null?void 0:_.length)>0&&v.jsxDEV("img",{src:c.logo,className:"h-20 rounded"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:165,columnNumber:38},this),v.jsxDEV("h2",{className:"text-xl font-semibold",children:v.jsxDEV(ee,{id:"billing.reseller_view.title",defaultMessage:"The plan of this organization is managed by {resellerName}.",description:"Special reseller view where they can change the billing",values:{resellerName:c.name}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:167,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:166,columnNumber:8},this),v.jsxDEV(Fn.Text,{className:"max-w-[96ch]",children:v.jsxDEV(ee,{id:"billing.reseller_view.description",defaultMessage:"If you wish to modify the organization's plan, you can do so here. Any adjustments made will be invoiced to you at the agreed intervals in our reseller's agreement with <bold>{resellerName}</bold>.",description:"Special reseller view where they can change the billing, explain how they can doe it and what happens",values:{resellerName:c.name,bold:k=>v.jsxDEV(Fn.Text,{strong:!0,children:k},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:181,columnNumber:30},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:175,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:174,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:164,columnNumber:7},this),v.jsxDEV(vn,{type:"primary",size:"large",onClick:()=>o(!0),children:v.jsxDEV(ee,{id:"billing.reseller_view.button",defaultMessage:"Change the plan of this organization"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:187,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:186,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:163,columnNumber:6},this),v.jsxDEV(xci,{organization:a,isOpen:r,onClose:()=>o(!1)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:193,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:162,columnNumber:5},this),v.jsxDEV(uo,{children:v.jsxDEV(qee,{tiers:[...$9,...o4],selectedTierId:(w=a==null?void 0:a.billing)==null?void 0:w.planId},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:200,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:199,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:161,columnNumber:4},this);const g=$9.filter(k=>k.id!=="basic");return v.jsxDEV("div",{className:"w-full grid gap-4",children:[v.jsxDEV(uo,{className:"w-full",children:v.jsxDEV("div",{className:"w-full flex flex-row justify-between items-end",children:[v.jsxDEV("div",{children:[v.jsxDEV("h1",{className:"text-[16px] font-bold",children:v.jsxDEV(ee,{id:"billing.billing_portal.title",defaultMessage:"Managing account"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:217,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:216,columnNumber:7},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"billing.billing_portal.description",defaultMessage:"Manage invoices, update payment methods, and modify your billing email."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:220,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:219,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:215,columnNumber:6},this),v.jsxDEV(vn,{type:"primary",href:d.data,target:"_blank",children:v.jsxDEV(ee,{id:"billing.billing_portal.button",defaultMessage:"Go to portal"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:227,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:226,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:214,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:213,columnNumber:4},this),((C=a==null?void 0:a.billing)==null?void 0:C.customerId)&&v.jsxDEV(v.Fragment,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:231,columnNumber:42},this),v.jsxDEV(uo,{className:"billing-card py-24 sm:py-14 w-full overflow-hidden",children:[v.jsxDEV("div",{className:"mx-auto max-w-7xl p-2 md:p-6",children:[v.jsxDEV("div",{className:"mx-auto max-w-4xl text-center",children:[v.jsxDEV("h2",{className:"text-base font-semibold leading-7 text-theme-primary",children:v.jsxDEV(ee,{id:"plans.aboveTitle",defaultMessage:"Choose your plan"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:236,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:235,columnNumber:7},this),v.jsxDEV("p",{className:"mt-2 text-4xl font-bold tracking-tight text-gray-900 sm:text-5xl",children:v.jsxDEV(ee,{id:"plans.title",defaultMessage:"Customized pricing plans for your business"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:239,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:238,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:234,columnNumber:6},this),v.jsxDEV("p",{className:"mx-auto mt-6 max-w-2xl text-center text-lg leading-8 text-gray-600",children:v.jsxDEV(ee,{id:"plans.description",defaultMessage:"Select a plan that suits your needs. You can upgrade or downgrade at any time."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:246,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:245,columnNumber:6},this),v.jsxDEV("div",{className:"flex justify-center mt-8",children:v.jsxDEV("div",{className:"flex mx-auto justify-center mt-8 mb-14",children:[v.jsxDEV(ee,{id:"billing.switch.monthly",defaultMessage:"Monthly"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:253,columnNumber:8},this),v.jsxDEV("div",{className:"px-2",children:v.jsxDEV(nq,{checked:f.value==="annually",onChange:k=>m(k?h[1]:h[0])},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:255,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:254,columnNumber:8},this),v.jsxDEV("div",{className:"relative",children:[v.jsxDEV(ee,{id:"billing.switch.yearly",defaultMessage:"Annually"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:261,columnNumber:9},this),v.jsxDEV("div",{className:"cardPrice",children:v.jsxDEV(ee,{id:"billing.switch.yearly.saving",defaultMessage:"Save 25%"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:263,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:262,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:260,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:252,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:251,columnNumber:6},this),v.jsxDEV(Rhe,{type:"card",moreIcon:null,tabPosition:"top",className:"billing-tabs",defaultActiveKey:"mostBusinesses",items:[{key:"smallTeams",label:t.formatMessage({id:"billing.tabs.small_teams",defaultMessage:"For smaller teams"}),children:v.jsxDEV(bot,{tiers:g,frequency:f,organization:a,selectedTierId:n==null?void 0:n.id,isLoading:l.isLoading,onSelect:p,className:"2xl:grid-cols-2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:283,columnNumber:10},this)},{key:"mostBusinesses",label:t.formatMessage({id:"billing.tabs.most_businesses",defaultMessage:"For most businesses"}),children:v.jsxDEV(bot,{tiers:o4,frequency:f,organization:a,selectedTierId:n==null?void 0:n.id,isLoading:l.isLoading,onSelect:p},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:301,columnNumber:10},this)}]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:269,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:233,columnNumber:5},this),((N=a==null?void 0:a.billing)==null?void 0:N.planId)&&n&&v.jsxDEV(_ci,{isOpen:r,frequency:f.value,currentPlanId:(E=a==null?void 0:a.billing)==null?void 0:E.planId,newPlanId:n.planId[f.value],onClose:()=>o(!1)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:315,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:232,columnNumber:4},this),v.jsxDEV(uo,{children:v.jsxDEV(qee,{tiers:[...g,...o4],selectedTierId:(D=a==null?void 0:a.billing)==null?void 0:D.planId},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:325,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:324,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/index.tsx",lineNumber:212,columnNumber:3},this)}function Nci({onClose:t}){var c;const e=Mt(),n=Qr(),[i,r]=b.useState(""),o=ls({validateInputOnBlur:!0,validate:aa(gt.object({name:gt.string({required_error:e.formatMessage({id:"create_advanced_crawler.form.name.error.required",defaultMessage:"Name is required"})}).max(254,{message:e.formatMessage({id:"create_advanced_crawler.form.name.error.max_length",defaultMessage:"Name cannot be longer then 254 characters"})}),startUrls:gt.string().refine(u=>{if(!(u!=null&&u.length))return!0;const d=u.split(/,|\n|\r| /);return d?!d.find(h=>{try{let f=h;return!new URL(f)}catch{return!0}}):!1},{message:e.formatMessage({id:"create_advanced_crawler.form.name.error.max_length",defaultMessage:"Contains invalid url(s)"})}).optional(),projects:gt.string({required_error:e.formatMessage({id:"create_advanced_crawler.form.projects.error.required",defaultMessage:"Project is required"})})}))}),{data:s}=Je.project.getAll.useQuery({q:i,limit:5}),a=Je.crawler.createAdvancedCrawler.useMutation(),l=async()=>{var u;try{const{startUrls:d,projects:h,...f}=o.values,m=(u=d==null?void 0:d.trim())==null?void 0:u.split(/,|\n|\r| /).filter(g=>!zp(g)),p=await a.mutateAsync({projects:[h],startUrls:m,...f});n(`${p._id}/editor`),In.show({color:"green",message:e.formatMessage({id:"create_advanced_crawler.notification.succeeded",defaultMessage:"Crawler has been created"}),autoClose:5e3}),t()}catch(d){console.error("Failed to create crawler",d),In.show({color:"red",title:e.formatMessage({id:"create_advanced_crawler.notification.failed.title",defaultMessage:"Crawler could not be created"}),message:e.formatMessage({id:"create_advanced_crawler.notification.failed.message",defaultMessage:"We cannot create your crawler at this time. Please try again or contact our support team."}),autoClose:1e4})}};return b.useEffect(()=>{!(s!=null&&s.result)||!(s!=null&&s.total)||o.values.projects||o.setFieldValue("projects",`${s.result[0]._id}`)},[s]),v.jsxDEV("form",{onSubmit:o.onSubmit(l),children:v.jsxDEV(Gt,{children:[v.jsxDEV(pa,{...o.getInputProps("name"),label:e.formatMessage({id:"create_advanced_crawler.form.name.label",defaultMessage:"Name"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CreateCrawler/AdvancedCrawler.tsx",lineNumber:131,columnNumber:5},this),v.jsxDEV(Fm,{searchable:!0,...o.getInputProps("projects"),onSearchChange:r,label:e.formatMessage({id:"create_advanced_crawler.form.projects.label",defaultMessage:"Project"}),onDropdownOpen:()=>r(""),data:(c=s==null?void 0:s.result)==null?void 0:c.map(u=>({label:u.name,value:u._id}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CreateCrawler/AdvancedCrawler.tsx",lineNumber:138,columnNumber:5},this),v.jsxDEV(Th,{autosize:!0,minRows:2,maxRows:8,...o.getInputProps("startUrls"),label:v.jsxDEV(_m,{label:e.formatMessage({id:"create_advanced_crawler.form.start_urls.label",defaultMessage:"Start urls"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CreateCrawler/AdvancedCrawler.tsx",lineNumber:163,columnNumber:7},this),placeholder:e.formatMessage({id:"create_advanced_crawler.form.start_urls.placeholder",defaultMessage:"https://chathive.co"}),description:e.formatMessage({id:"create_advanced_crawler.form.start_urls.description",defaultMessage:"Separate each url on new line"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CreateCrawler/AdvancedCrawler.tsx",lineNumber:157,columnNumber:5},this),v.jsxDEV("footer",{className:"w-full",children:v.jsxDEV(un,{justify:"flex-end",gap:"xs",children:[v.jsxDEV(Nn,{variant:"outline",size:"xs",onClick:t,children:v.jsxDEV(ee,{id:"create_advanced_crawler.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CreateCrawler/AdvancedCrawler.tsx",lineNumber:182,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CreateCrawler/AdvancedCrawler.tsx",lineNumber:181,columnNumber:7},this),v.jsxDEV(Nn,{size:"xs",type:"submit",disabled:!o.isValid(),loading:a.isLoading,children:v.jsxDEV(ee,{id:"create_advanced_crawler.form.submit",defaultMessage:"Create crawler"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CreateCrawler/AdvancedCrawler.tsx",lineNumber:190,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CreateCrawler/AdvancedCrawler.tsx",lineNumber:184,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CreateCrawler/AdvancedCrawler.tsx",lineNumber:180,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CreateCrawler/AdvancedCrawler.tsx",lineNumber:179,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CreateCrawler/AdvancedCrawler.tsx",lineNumber:130,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CreateCrawler/AdvancedCrawler.tsx",lineNumber:129,columnNumber:3},this)}function vot({isOpen:t,onClose:e}){const n=Mt();return v.jsxDEV(bl,{title:n.formatMessage({id:"create_crawler.title",defaultMessage:"Create crawler"}),opened:t,onClose:e,closeButtonProps:{"aria-label":n.formatMessage({id:"shared.modal.close",defaultMessage:"Close modal"})},children:v.jsxDEV(Nci,{onClose:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CreateCrawler/index.tsx",lineNumber:60,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CreateCrawler/index.tsx",lineNumber:19,columnNumber:3},this)}function vOt({crawler:t,isOpen:e,onClose:n}){const i=Mt(),r=Qr(),o=Je.useUtils(),s=Je.crawler.deleteCrawler.useMutation(),a=async()=>{if(t)try{await s.mutateAsync({id:t._id}),n(),o.crawler.getAll.invalidate(),r("/crawler"),In.show({color:"green",message:i.formatMessage({id:"crawler.delete_modal.notification.succeeded",defaultMessage:"Crawler has been delete"}),autoClose:5e3})}catch(l){console.error("Failed to delete crawler",l),In.show({color:"red",title:i.formatMessage({id:"crawler.delete_modal.notification.failed.title",defaultMessage:"Crawler could not be delete"}),message:i.formatMessage({id:"crawler.delete_modal.notification.failed.message",defaultMessage:"We cannot delete your crawler at this time. Please try again or contact our support team."}),autoClose:5e3})}};return v.jsxDEV(bl,{opened:e,onClose:n,title:i.formatMessage({id:"crawler.delete_modal.title",defaultMessage:"Delete crawler"}),closeButtonProps:{"aria-label":i.formatMessage({id:"shared.modal.close",defaultMessage:"Close modal"})},children:v.jsxDEV(Gt,{children:[v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"crawler.delete_modal.description",defaultMessage:"Deleting <bold>{name}</bold> is permanent and can't be undone. Here's what will happen:",values:{name:(t==null?void 0:t.name)||"",bold:l=>v.jsxDEV("span",{className:"font-bold",children:l},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:72,columnNumber:27},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:67,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:66,columnNumber:5},this),v.jsxDEV(mm,{withPadding:!0,className:"list-disc",children:[v.jsxDEV(mm.Item,{children:v.jsxDEV(ee,{id:"crawler.delete_modal.list_item.logs",defaultMessage:"All crawler logs will be wiped out."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:78,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:77,columnNumber:6},this),v.jsxDEV(mm.Item,{children:v.jsxDEV(ee,{id:"crawler.delete_modal.list_item.config",defaultMessage:"The re-crawler won't run anymore."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:84,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:83,columnNumber:6},this),v.jsxDEV(mm.Item,{children:v.jsxDEV(ee,{id:"crawler.delete_modal.list_item.documents",defaultMessage:"The crawled documents will <bold>be kept</bold>",values:{bold:l=>v.jsxDEV("span",{className:"font-bold",children:l},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:93,columnNumber:37},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:90,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:89,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:76,columnNumber:5},this),v.jsxDEV("footer",{className:"w-full",children:v.jsxDEV(un,{justify:"flex-end",gap:"sm",children:[v.jsxDEV(Nn,{variant:"outline",color:"gray",onClick:n,children:v.jsxDEV(ee,{id:"shared.modal.footer.cancel.delete",defaultMessage:"No don't delete it"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:100,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:99,columnNumber:7},this),v.jsxDEV(Nn,{variant:"filled",color:"red",onClick:a,loading:s.isLoading,children:v.jsxDEV(ee,{id:"crawler.delete_modal.button.delete",defaultMessage:"Delete crawler"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:106,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:105,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:98,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:97,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:65,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DeleteCrawler.tsx",lineNumber:57,columnNumber:3},this)}function yOt({crawler:t,isOpen:e,onClose:n}){var h;const i=Mt(),r=Qr(),o=Je.useUtils(),[s,a]=b.useState(""),l=Je.crawler.duplicateCrawler.useMutation(),c=ls({validateInputOnBlur:!0,validate:aa(gt.object({name:gt.string({required_error:i.formatMessage({id:"crawler.duplicate_modal.form.name.error.required",defaultMessage:"Name is required"})}).max(254,{message:i.formatMessage({id:"crawler.duplicate_modal.form.name.error.max_length",defaultMessage:"Name cannot be longer then 254 characters"})}),projects:gt.string({required_error:i.formatMessage({id:"crawler.duplicate_modal.form.projects.error.required",defaultMessage:"Project is required"})})}))}),{data:u}=Je.project.getAll.useQuery({q:s,limit:5}),d=async()=>{if(t)try{const{projects:f,...m}=c.values,p=await l.mutateAsync({crawlerId:t._id,projects:[f],...m});r(`/crawler/${p._id}/editor`),n(),o.crawler.getAll.invalidate(),r("/crawler"),In.show({color:"green",message:i.formatMessage({id:"crawler.duplicate_modal.notification.succeeded",defaultMessage:"Crawler has been duplicated"}),autoClose:5e3})}catch(f){console.error("Failed to duplicate crawler",f),In.show({color:"red",title:i.formatMessage({id:"crawler.duplicate_modal.notification.failed.title",defaultMessage:"Crawler could not be duplicated"}),message:i.formatMessage({id:"crawler.duplicate_modal.notification.failed.message",defaultMessage:"We cannot duplicate your crawler at this time. Please try again or contact our support team."}),autoClose:5e3})}};return b.useEffect(()=>{t&&c.setValues({name:i.formatMessage({id:"crawler.duplicate_modal.form.name",defaultMessage:"Duplicate {name}"},{name:t.name.slice(0,64)}),projects:`${t.projectId}`})},[t]),v.jsxDEV(bl,{opened:e,onClose:n,title:i.formatMessage({id:"crawler.duplicate_modal.title",defaultMessage:"Duplicate crawler"}),closeButtonProps:{"aria-label":i.formatMessage({id:"shared.modal.close",defaultMessage:"Close modal"})},children:v.jsxDEV("form",{onSubmit:c.onSubmit(d),children:v.jsxDEV(Gt,{children:[v.jsxDEV(pa,{...c.getInputProps("name"),label:i.formatMessage({id:"crawler.duplicate_modal.form.name.label",defaultMessage:"Name"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DuplicateCrawler.tsx",lineNumber:128,columnNumber:6},this),v.jsxDEV(Fm,{searchable:!0,searchValue:s,...c.getInputProps("projects"),onSearchChange:a,label:i.formatMessage({id:"crawler.duplicate_modal.form.projects.label",defaultMessage:"Project"}),data:(h=u==null?void 0:u.result)==null?void 0:h.map(f=>({label:f.name,value:f._id}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DuplicateCrawler.tsx",lineNumber:135,columnNumber:6},this),v.jsxDEV("footer",{className:"w-full",children:v.jsxDEV(un,{justify:"flex-end",gap:"xs",children:[v.jsxDEV(Nn,{variant:"outline",size:"xs",onClick:n,children:v.jsxDEV(ee,{id:"shared.modal.footer.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DuplicateCrawler.tsx",lineNumber:157,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DuplicateCrawler.tsx",lineNumber:156,columnNumber:8},this),v.jsxDEV(Nn,{size:"xs",type:"submit",disabled:!c.isValid(),loading:l.isLoading,children:v.jsxDEV(ee,{id:"crawler.duplicate_modal.form.submit",defaultMessage:"Duplicate crawler"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DuplicateCrawler.tsx",lineNumber:165,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DuplicateCrawler.tsx",lineNumber:159,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DuplicateCrawler.tsx",lineNumber:155,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DuplicateCrawler.tsx",lineNumber:154,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DuplicateCrawler.tsx",lineNumber:127,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DuplicateCrawler.tsx",lineNumber:126,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/DuplicateCrawler.tsx",lineNumber:118,columnNumber:3},this)}function _Ot({crawler:t,isOpen:e,onClose:n}){const i=Mt(),r=Je.useUtils(),o=Je.crawler.stopCrawler.useMutation(),s=ls({validateInputOnBlur:!0,initialValues:{reason:""},validate:aa(gt.object({reason:gt.string().max(2048,{message:i.formatMessage({id:"crawler.stop_modal.form.reasons.error.max_length",defaultMessage:"Reason cannot be longer then 2.048 characters"})}).optional()}))}),a=async()=>{if(t)try{await o.mutateAsync({id:t._id,...s.values}),n(),r.crawler.getAll.invalidate(),r.crawler.getById.invalidate(),In.show({color:"blue",message:i.formatMessage({id:"crawler.stop_modal.notification.succeeded",defaultMessage:"We are currently stopping your crawler. This process may take a moment."}),autoClose:5e3})}catch(l){console.error("Failed to update API key",l),In.show({color:"red",title:i.formatMessage({id:"crawler.stop_modal.notification.failed.title",defaultMessage:"Crawler could not be stopped"}),message:i.formatMessage({id:"crawler.stop_modal.notification.failed.message",defaultMessage:"We cannot stop your crawler at this time. Please try again or contact our support team."}),autoClose:1e4})}};return v.jsxDEV(bl,{opened:e,onClose:n,title:i.formatMessage({id:"crawler.stop_modal.title",defaultMessage:"Stop crawler"}),closeButtonProps:{"aria-label":i.formatMessage({id:"shared.modal.close",defaultMessage:"Close modal"})},children:v.jsxDEV("form",{onSubmit:s.onSubmit(a),className:"flex flex-col gap-4",children:v.jsxDEV(Gt,{children:[v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"crawler.stop_modal.description",defaultMessage:"The crawler will stop immediately. URLs currently being processed might still finish, but no new URLs will be crawled."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/StopCrawler.tsx",lineNumber:86,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/StopCrawler.tsx",lineNumber:85,columnNumber:6},this),v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"crawler.stop_modal.description.auto_crawler",defaultMessage:"Auto crawler will also be stopped and won't start up again until you manually restart."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/StopCrawler.tsx",lineNumber:92,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/StopCrawler.tsx",lineNumber:91,columnNumber:6},this),v.jsxDEV(Th,{label:i.formatMessage({id:"crawler.stop_modal.form.reason.label",defaultMessage:"Reason"}),description:i.formatMessage({id:"crawler.stop_modal.form.reason.description",defaultMessage:"Let team members know why you stopped it"}),...s.getInputProps("reason")},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/StopCrawler.tsx",lineNumber:97,columnNumber:6},this),v.jsxDEV("footer",{className:"w-full",children:v.jsxDEV(un,{justify:"flex-end",gap:"sm",children:[v.jsxDEV(Nn,{variant:"outline",color:"gray",onClick:n,children:v.jsxDEV(ee,{id:"crawler.stop_modal.button.cancel",defaultMessage:"No don't stop it"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/StopCrawler.tsx",lineNumber:111,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/StopCrawler.tsx",lineNumber:110,columnNumber:8},this),v.jsxDEV(Nn,{type:"submit",variant:"filled",color:"red",loading:o.isLoading,children:v.jsxDEV(ee,{id:"crawler.stop_modal.button.delete",defaultMessage:"Stop crawler"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/StopCrawler.tsx",lineNumber:117,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/StopCrawler.tsx",lineNumber:116,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/StopCrawler.tsx",lineNumber:109,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/StopCrawler.tsx",lineNumber:108,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/StopCrawler.tsx",lineNumber:84,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/StopCrawler.tsx",lineNumber:83,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/shared/StopCrawler.tsx",lineNumber:75,columnNumber:3},this)}const cMe={created:{id:"crawler.status.created",defaultMessage:"Created"},initialize:{id:"crawler.status.initialize",defaultMessage:"Initialize"},inProgress:{id:"crawler.status.in_progress",defaultMessage:"In progress"},finished:{id:"crawler.status.finished",defaultMessage:"Finished"},failed:{id:"crawler.status.failed",defaultMessage:"Failed"},stopped:{id:"crawler.status.stopped",defaultMessage:"Stopped"}},xOt={created:"orange",initialize:"primary",inProgress:"primary",finished:"green",failed:"red",stopped:"red"},gwe=["once","monthly","weekly","workDays","daily"],yot=["plain","smart"],_ot=["delete","mark_as_deleted"];function Eci(){var $,B;const e=Mt(),n=Qr(),i=Je.useUtils(),r=ls({}),o=Oi(ps),[s,a]=b.useState(1),[l,c]=b.useState(""),[u,d]=Pc(!1),[h,f]=Pc(!1),[m,p]=Pc(!1),[g,y]=Pc(!1),[_,w]=b.useState(),C=Je.crawler.startCrawler.useMutation(),{data:N}=Je.project.getAll.useQuery({q:l,limit:5}),{data:E,isLoading:D,isInitialLoading:k}=Je.crawler.getAll.useQuery({...Object.entries(r.values).reduce((z,[H,K])=>K?{...z,[H]:K}:z,{}),offset:(s-1)*20,limit:20});ide(e.formatMessage({id:"crawler_overview.page.title",defaultMessage:"Crawlers - Chathive",description:"Browser tab title for crawlers overview page"}));const M=({id:z,event:H})=>{if(H.stopPropagation(),!(E!=null&&E.data))return;const K=E.data.find(q=>q._id===z);if(K)switch(w(K),K.status){case"created":case"stopped":case"finished":case"failed":T(K._id);break;case"inProgress":case"initialize":f.open();break}},T=async z=>{try{await C.mutateAsync({id:z}),i.crawler.getAll.invalidate(),In.show({color:"primary",title:e.formatMessage({id:"crawler_overview.start_crawler.succeeded.title",defaultMessage:"Starting your crawler"}),message:e.formatMessage({id:"crawler_overview.start_crawler.succeeded.description",defaultMessage:"We're getting your crawler up and running. This might take a few seconds."}),autoClose:1e4})}catch(H){const K=H;let q=e.formatMessage({id:"crawler_overview.start_crawler.failed.default_message",defaultMessage:"We cannot start your crawler at this time. Please try again or contact our support team."});K.message==="MISSING_START_POINT"&&(q=e.formatMessage({id:"crawler_overview.start_crawler.failed.missing_start_point",defaultMessage:"Crawler is missing a start url or sitemap."})),In.show({color:"red",title:e.formatMessage({id:"crawler_overview.start_crawler.failed.title",defaultMessage:"Crawler cannot be started"}),message:q,autoClose:1e4})}},A=({id:z,event:H})=>{if(H.stopPropagation(),!(E!=null&&E.data))return;const K=E.data.find(q=>q._id===z);K&&(y.open(),w(K))},R=({id:z,event:H})=>{if(H.stopPropagation(),!(E!=null&&E.data))return;const K=E.data.find(q=>q._id===z);K&&(p.open(),w(K))},P=()=>{p.close(),w(void 0)},O=()=>{y.close(),w(void 0)},V=()=>{f.close(),w(void 0)};if(!k&&!(E!=null&&E.total)&&!Object.values(r.values).length)return v.jsxDEV("main",{className:"w-full max-w-4xl",children:[v.jsxDEV(or,{children:v.jsxDEV(Gt,{children:[v.jsxDEV(xot,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:207,columnNumber:7},this),v.jsxDEV(Zd,{src:"/img/svg/collect.svg",imgClassName:"h-44",title:e.formatMessage({id:"crawler_overview.empty.title",defaultMessage:"Create your crawler"}),description:e.formatMessage({id:"crawler_overview.empty.description",defaultMessage:"Our crawler is a service for extracting content from your web pages, online resources or any data that is reachable through the web publicly or behind a login wall."}),className:"m-8",children:v.jsxDEV(Nn,{size:"xs",variant:"filled",onClick:d.open,children:v.jsxDEV(ee,{id:"crawler_overview.empty.button",defaultMessage:"Create new crawler"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:223,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:222,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:208,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:206,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:205,columnNumber:5},this),v.jsxDEV(vot,{type:"advanced",isOpen:u,onClose:d.close},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:231,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:204,columnNumber:4},this);const F=((E==null?void 0:E.total)||0)/20;return v.jsxDEV("main",{className:"w-full max-w-4xl grid gap-4",children:[v.jsxDEV(or,{children:v.jsxDEV(Gt,{children:[v.jsxDEV("div",{children:[v.jsxDEV(xot,{children:o&&v.jsxDEV(Nn,{variant:"filled",size:"xs",onClick:d.open,children:v.jsxDEV(ee,{id:"crawler_overview.header.create_new",defaultMessage:"Create a crawler"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:245,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:244,columnNumber:20},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:243,columnNumber:7},this),v.jsxDEV("form",{children:v.jsxDEV(un,{justify:"flex-start",children:[v.jsxDEV(Fm,{size:"xs",clearable:!0,...r.getInputProps("status"),label:e.formatMessage({id:"crawler_overview.filter.status.label",defaultMessage:"Status"}),placeholder:e.formatMessage({id:"crawler_overview.filter.status.placeholder",defaultMessage:"All statuses"}),data:Object.entries(cMe).map(([z,H])=>({value:z,label:e.formatMessage(H)}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:253,columnNumber:9},this),v.jsxDEV(PA,{size:"xs",searchable:!0,searchValue:l,...r.getInputProps("projects"),onSearchChange:c,label:e.formatMessage({id:"crawler_overview.filter.projects.label",defaultMessage:"Projects"}),placeholder:e.formatMessage({id:"crawler_overview.filter.projects.placeholder",defaultMessage:"All Projects"}),data:($=N==null?void 0:N.result)==null?void 0:$.map(z=>({label:z.name,value:z._id}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:270,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:252,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:251,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:242,columnNumber:6},this),!D&&!!(E!=null&&E.total)&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(hn,{highlightOnHover:!0,className:"rounded-md overflow-hidden",children:[v.jsxDEV(hn.Thead,{className:"bg-[var(--mantine-color-gray-1)]",children:v.jsxDEV(hn.Tr,{children:[v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"crawler_overview.table.name",defaultMessage:"Name"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:298,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:297,columnNumber:11},this),v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"crawler_overview.table.status",defaultMessage:"Status"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:301,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:300,columnNumber:11},this),v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"crawler_overview.table.project",defaultMessage:"Project"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:307,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:306,columnNumber:11},this),v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"crawler_overview.table.executed_at",defaultMessage:"Last crawled at"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:313,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:312,columnNumber:11},this),v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"crawler_overview.table.planned_execution",defaultMessage:"Next crawl at"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:319,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:318,columnNumber:11},this),o&&v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"crawler_overview.table.actions",defaultMessage:"Actions"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:325,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:324,columnNumber:23},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:296,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:295,columnNumber:9},this),v.jsxDEV(hn.Tbody,{children:(B=E==null?void 0:E.data)==null?void 0:B.map(z=>{var K;const H=Dci(z.status);return v.jsxDEV(hn.Tr,{className:"cursor-pointer",onClick:()=>n(z._id),children:[v.jsxDEV(hn.Td,{children:v.jsxDEV(Qe,{truncate:"end",className:"max-w-64",children:z.name},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:344,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:343,columnNumber:13},this),v.jsxDEV(hn.Td,{children:v.jsxDEV(jc,{color:xOt[z.status],variant:"light",children:v.jsxDEV(ee,{...cMe[z.status]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:348,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:347,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:346,columnNumber:13},this),v.jsxDEV(hn.Td,{children:v.jsxDEV(Qe,{truncate:"end",className:"w-24",children:(K=z.project)==null?void 0:K.name},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:352,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:351,columnNumber:13},this),v.jsxDEV(hn.Td,{width:128,children:v.jsxDEV(Qe,{truncate:"end",children:z.lastCrawledAt&&v.jsxDEV(tu,{value:z.lastCrawledAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:357,columnNumber:16},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:355,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:354,columnNumber:13},this),v.jsxDEV(hn.Td,{children:v.jsxDEV(Qe,{truncate:"end",children:z.nextExecution&&v.jsxDEV(z0,{value:z.nextExecution},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:364,columnNumber:16},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:362,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:361,columnNumber:13},this),o&&v.jsxDEV(hn.Td,{width:88,className:"align-middle",children:v.jsxDEV(un,{gap:0,wrap:"nowrap",children:[v.jsxDEV(ir,{label:e.formatMessage(kci[H]),children:v.jsxDEV(Fr,{variant:"subtle","aria-label":e.formatMessage(Mci[H],{name:z.name}),onClick:q=>M({id:z._id,event:q}),children:[H==="start"&&v.jsxDEV(YPt,{size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:381,columnNumber:44},this),H==="stop"&&v.jsxDEV(GPt,{size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:382,columnNumber:43},this),H==="reRun"&&v.jsxDEV(fai,{size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:383,columnNumber:44},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:371,columnNumber:16},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:370,columnNumber:15},this),v.jsxDEV(Cu,{shadow:"md",children:[v.jsxDEV(Cu.Target,{children:v.jsxDEV(Fr,{variant:"subtle",onClick:q=>q.stopPropagation(),children:v.jsxDEV(WPt,{size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:392,columnNumber:18},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:388,columnNumber:17},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:387,columnNumber:16},this),v.jsxDEV(Cu.Dropdown,{children:[v.jsxDEV(Cu.Item,{leftSection:v.jsxDEV(HPt,{size:14},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:398,columnNumber:31},this),onClick:q=>A({id:z._id,event:q}),children:v.jsxDEV(ee,{id:"crawler_overview.table.row.menu.delete",defaultMessage:"Duplicate crawler"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:403,columnNumber:18},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:397,columnNumber:17},this),v.jsxDEV(Cu.Divider,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:408,columnNumber:17},this),v.jsxDEV(ir,{label:e.formatMessage({id:"crawler_overview.table.row.menu.delete.tooltip",defaultMessage:"Cannot delete when crawling"}),disabled:z.status!=="inProgress",children:v.jsxDEV(Cu.Item,{color:"red",disabled:z.status==="inProgress",leftSection:v.jsxDEV(Lw,{size:14},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:419,columnNumber:32},this),onClick:q=>R({id:z._id,event:q}),children:v.jsxDEV(ee,{id:"crawler_overview.table.row.menu.delete",defaultMessage:"Delete crawler"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:424,columnNumber:19},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:416,columnNumber:18},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:409,columnNumber:17},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:396,columnNumber:16},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:386,columnNumber:15},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:369,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:368,columnNumber:25},this)]},z._id,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:338,columnNumber:12},this)})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:333,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:294,columnNumber:8},this),F>1&&v.jsxDEV(uu,{justify:"flex-end",children:v.jsxDEV(Kh,{size:"sm",hideWithOnePage:!0,total:F,value:s,onChange:a},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:441,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:440,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:293,columnNumber:7},this),!D&&!(E!=null&&E.total)&&v.jsxDEV(iw,{className:"p-8",children:v.jsxDEV(Qe,{c:"gray",size:"sm",children:v.jsxDEV(ee,{id:"crawler_overview.table.empty",defaultMessage:"No crawlers found matching your filters"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:455,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:454,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:453,columnNumber:7},this),D&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:464,columnNumber:8},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:465,columnNumber:8},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:466,columnNumber:8},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:467,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:463,columnNumber:7},this),!!(E!=null&&E.totalLocked)&&v.jsxDEV(Yo,{variant:"light",color:"blue",children:v.jsxDEV("div",{className:"w-full flex flex-col gap-2 justify-between md:flex-row md:items-center",children:[v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"crawler_overview.upgrade_banner.description",defaultMessage:"You've got {totalLocked, plural, =1 {# crawler} other {# crawlers}} beyond your billing scope. Upgrade to view all your older crawlers.",values:{totalLocked:(E==null?void 0:E.totalLocked)||0}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:474,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:473,columnNumber:9},this),v.jsxDEV(Nn,{size:"xs",onClick:()=>n("/billing"),children:v.jsxDEV(ee,{id:"crawler_overview.upgrade_banner.upgrade",defaultMessage:"Upgrade my plan"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:481,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:480,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:472,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:471,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:241,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:240,columnNumber:4},this),v.jsxDEV(vot,{type:"advanced",isOpen:u,onClose:d.close},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:491,columnNumber:4},this),v.jsxDEV(vOt,{crawler:_,isOpen:m,onClose:P},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:492,columnNumber:4},this),v.jsxDEV(yOt,{crawler:_,isOpen:g,onClose:O},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:493,columnNumber:4},this),v.jsxDEV(_Ot,{crawler:_,isOpen:h,onClose:V},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:494,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:239,columnNumber:3},this)}function xot({children:t}){return v.jsxDEV(un,{justify:"space-between",className:"mb-4",children:[v.jsxDEV(un,{gap:"sm",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"crawler_overview.header.title",defaultMessage:"Crawlers"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:504,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:503,columnNumber:5},this),v.jsxDEV(jc,{color:"violet",radius:"md",variant:"light",leftSection:v.jsxDEV(KPt,{size:14},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:506,columnNumber:68},this),children:v.jsxDEV(ee,{id:"general.experimental",defaultMessage:"Experimental"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:507,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:506,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:502,columnNumber:4},this),v.jsxDEV(un,{gap:"sm",children:[v.jsxDEV(Nn,{size:"xs",component:"a",variant:"light",target:"_blank",href:lq.crawler,children:v.jsxDEV(ee,{id:"crawler_overview.header.documentation",defaultMessage:"Documentation"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:518,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:511,columnNumber:5},this),t]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:510,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerOverview/index.tsx",lineNumber:501,columnNumber:3},this)}function Dci(t){switch(t){case"created":return"start";case"inProgress":case"initialize":return"stop";default:return"reRun"}}const kci={start:{id:"crawler_overview.table.action.start.tooltip",defaultMessage:"Start crawler"},stop:{id:"crawler_overview.table.action.stop.tooltip",defaultMessage:"Stop crawler"},reRun:{id:"crawler_overview.table.action.re_run.tooltip",defaultMessage:"Re run crawler"},delete:{id:"crawler_overview.table.action.delete.tooltip",defaultMessage:"Delete crawler"}},Mci={start:{id:"crawler_overview.table.action.start.aria_label",defaultMessage:"Start crawler: {name}"},stop:{id:"crawler_overview.table.action.stop.aria_label",defaultMessage:"Stop crawler: {name}"},reRun:{id:"crawler_overview.table.action.re_run.aria_label",defaultMessage:"Re run crawler: {name}"},delete:{id:"crawler_overview.table.action.delete.aria_label",defaultMessage:"Delete crawler: {name}"}};function Nie({to:t}){const e=Gp();return v.jsxDEV(Op,{to:`${e.pathname}${t}`,replace:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Redirect.tsx",lineNumber:6,columnNumber:10},this)}const Lci={aa:{name:"Afar",nativeName:"Afaraf"},ab:{name:"Abkhaz",nativeName:"аҧсуа бызшәа"},ae:{name:"Avestan",nativeName:"avesta"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},am:{name:"Amharic",nativeName:"አማርኛ"},an:{name:"Aragonese",nativeName:"aragonés"},ar:{name:"Arabic",nativeName:"العربية"},as:{name:"Assamese",nativeName:"অসমীয়া"},av:{name:"Avaric",nativeName:"авар мацӀ"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"azərbaycan dili"},ba:{name:"Bashkir",nativeName:"башҡорт теле"},be:{name:"Belarusian",nativeName:"беларуская мова"},bg:{name:"Bulgarian",nativeName:"български език"},bi:{name:"Bislama",nativeName:"Bislama"},bm:{name:"Bambara",nativeName:"bamanankan"},bn:{name:"Bengali",nativeName:"বাংলা"},bo:{name:"Tibetan",nativeName:"བོད་ཡིག"},br:{name:"Breton",nativeName:"brezhoneg"},bs:{name:"Bosnian",nativeName:"bosanski jezik"},ca:{name:"Catalan",nativeName:"Català"},ce:{name:"Chechen",nativeName:"нохчийн мотт"},ch:{name:"Chamorro",nativeName:"Chamoru"},co:{name:"Corsican",nativeName:"corsu"},cr:{name:"Cree",nativeName:"ᓀᐦᐃᔭᐍᐏᐣ"},cs:{name:"Czech",nativeName:"čeština"},cu:{name:"Old Church Slavonic",nativeName:"ѩзыкъ словѣньскъ"},cv:{name:"Chuvash",nativeName:"чӑваш чӗлхи"},cy:{name:"Welsh",nativeName:"Cymraeg"},da:{name:"Danish",nativeName:"Dansk"},de:{name:"German",nativeName:"Deutsch"},dv:{name:"Divehi",nativeName:"ދިވެހި"},dz:{name:"Dzongkha",nativeName:"རྫོང་ཁ"},ee:{name:"Ewe",nativeName:"Eʋegbe"},el:{name:"Greek",nativeName:"Ελληνικά"},en:{name:"English",nativeName:"English"},eo:{name:"Esperanto",nativeName:"Esperanto"},es:{name:"Spanish",nativeName:"Español"},et:{name:"Estonian",nativeName:"eesti"},eu:{name:"Basque",nativeName:"euskara"},fa:{name:"Persian",nativeName:"فارسی"},ff:{name:"Fula",nativeName:"Fulfulde"},fi:{name:"Finnish",nativeName:"suomi"},fj:{name:"Fijian",nativeName:"vosa Vakaviti"},fo:{name:"Faroese",nativeName:"Føroyskt"},fr:{name:"French",nativeName:"Français"},fy:{name:"Western Frisian",nativeName:"Frysk"},ga:{name:"Irish",nativeName:"Gaeilge"},gd:{name:"Scottish Gaelic",nativeName:"Gàidhlig"},gl:{name:"Galician",nativeName:"galego"},gn:{name:"Guaraní",nativeName:"Avañe'ẽ"},gu:{name:"Gujarati",nativeName:"ગુજરાતી"},gv:{name:"Manx",nativeName:"Gaelg"},ha:{name:"Hausa",nativeName:"هَوُسَ"},he:{name:"Hebrew",nativeName:"עברית"},hi:{name:"Hindi",nativeName:"हिन्दी"},ho:{name:"Hiri Motu",nativeName:"Hiri Motu"},hr:{name:"Croatian",nativeName:"Hrvatski"},ht:{name:"Haitian",nativeName:"Kreyòl ayisyen"},hu:{name:"Hungarian",nativeName:"magyar"},hy:{name:"Armenian",nativeName:"Հայերեն"},hz:{name:"Herero",nativeName:"Otjiherero"},ia:{name:"Interlingua",nativeName:"Interlingua"},id:{name:"Indonesian",nativeName:"Bahasa Indonesia"},ie:{name:"Interlingue",nativeName:"Interlingue"},ig:{name:"Igbo",nativeName:"Asụsụ Igbo"},ii:{name:"Nuosu",nativeName:"ꆈꌠ꒿ Nuosuhxop"},ik:{name:"Inupiaq",nativeName:"Iñupiaq"},io:{name:"Ido",nativeName:"Ido"},is:{name:"Icelandic",nativeName:"Íslenska"},it:{name:"Italian",nativeName:"Italiano"},iu:{name:"Inuktitut",nativeName:"ᐃᓄᒃᑎᑐᑦ"},ja:{name:"Japanese",nativeName:"日本語"},jv:{name:"Javanese",nativeName:"basa Jawa"},ka:{name:"Georgian",nativeName:"ქართული"},kg:{name:"Kongo",nativeName:"Kikongo"},ki:{name:"Kikuyu",nativeName:"Gĩkũyũ"},kj:{name:"Kwanyama",nativeName:"Kuanyama"},kk:{name:"Kazakh",nativeName:"қазақ тілі"},kl:{name:"Kalaallisut",nativeName:"kalaallisut"},km:{name:"Khmer",nativeName:"ខេមរភាសា"},kn:{name:"Kannada",nativeName:"ಕನ್ನಡ"},ko:{name:"Korean",nativeName:"한국어"},kr:{name:"Kanuri",nativeName:"Kanuri"},ks:{name:"Kashmiri",nativeName:"कश्मीरी"},ku:{name:"Kurdish",nativeName:"Kurdî"},kv:{name:"Komi",nativeName:"коми кыв"},kw:{name:"Cornish",nativeName:"Kernewek"},ky:{name:"Kyrgyz",nativeName:"Кыргызча"},la:{name:"Latin",nativeName:"latine"},lb:{name:"Luxembourgish",nativeName:"Lëtzebuergesch"},lg:{name:"Ganda",nativeName:"Luganda"},li:{name:"Limburgish",nativeName:"Limburgs"},ln:{name:"Lingala",nativeName:"Lingála"},lo:{name:"Lao",nativeName:"ພາສາລາວ"},lt:{name:"Lithuanian",nativeName:"lietuvių kalba"},lu:{name:"Luba-Katanga",nativeName:"Kiluba"},lv:{name:"Latvian",nativeName:"latviešu valoda"},mg:{name:"Malagasy",nativeName:"fiteny malagasy"},mh:{name:"Marshallese",nativeName:"Kajin M̧ajeļ"},mi:{name:"Māori",nativeName:"te reo Māori"},mk:{name:"Macedonian",nativeName:"македонски јазик"},ml:{name:"Malayalam",nativeName:"മലയാളം"},mn:{name:"Mongolian",nativeName:"Монгол хэл"},mr:{name:"Marathi",nativeName:"मराठी"},ms:{name:"Malay",nativeName:"Bahasa Melayu"},mt:{name:"Maltese",nativeName:"Malti"},my:{name:"Burmese",nativeName:"ဗမာစာ"},na:{name:"Nauru",nativeName:"Dorerin Naoero"},nb:{name:"Norwegian Bokmål",nativeName:"Norsk bokmål"},nd:{name:"Northern Ndebele",nativeName:"isiNdebele"},ne:{name:"Nepali",nativeName:"नेपाली"},ng:{name:"Ndonga",nativeName:"Owambo"},nl:{name:"Dutch",nativeName:"Nederlands"},nn:{name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk"},no:{name:"Norwegian",nativeName:"Norsk"},nr:{name:"Southern Ndebele",nativeName:"isiNdebele"},nv:{name:"Navajo",nativeName:"Diné bizaad"},ny:{name:"Chichewa",nativeName:"chiCheŵa"},oc:{name:"Occitan",nativeName:"occitan"},oj:{name:"Ojibwe",nativeName:"ᐊᓂᔑᓈᐯᒧᐎᓐ"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Oriya",nativeName:"ଓଡ଼ିଆ"},os:{name:"Ossetian",nativeName:"ирон æвзаг"},pa:{name:"Panjabi",nativeName:"ਪੰਜਾਬੀ"},pi:{name:"Pāli",nativeName:"पाऴि"},pl:{name:"Polish",nativeName:"Polski"},ps:{name:"Pashto",nativeName:"پښتو"},pt:{name:"Portuguese",nativeName:"Português"},qu:{name:"Quechua",nativeName:"Runa Simi"},rm:{name:"Romansh",nativeName:"rumantsch grischun"},rn:{name:"Kirundi",nativeName:"Ikirundi"},ro:{name:"Romanian",nativeName:"Română"},ru:{name:"Russian",nativeName:"Русский"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},sa:{name:"Sanskrit",nativeName:"संस्कृतम्"},sc:{name:"Sardinian",nativeName:"sardu"},sd:{name:"Sindhi",nativeName:"सिन्धी"},se:{name:"Northern Sami",nativeName:"Davvisámegiella"},sg:{name:"Sango",nativeName:"yângâ tî sängö"},si:{name:"Sinhala",nativeName:"සිංහල"},sk:{name:"Slovak",nativeName:"slovenčina"},sl:{name:"Slovenian",nativeName:"slovenščina"},sm:{name:"Samoan",nativeName:"gagana fa'a Samoa"},sn:{name:"Shona",nativeName:"chiShona"},so:{name:"Somali",nativeName:"Soomaaliga"},sq:{name:"Albanian",nativeName:"Shqip"},sr:{name:"Serbian",nativeName:"српски језик"},ss:{name:"Swati",nativeName:"SiSwati"},st:{name:"Southern Sotho",nativeName:"Sesotho"},su:{name:"Sundanese",nativeName:"Basa Sunda"},sv:{name:"Swedish",nativeName:"Svenska"},sw:{name:"Swahili",nativeName:"Kiswahili"},ta:{name:"Tamil",nativeName:"தமிழ்"},te:{name:"Telugu",nativeName:"తెలుగు"},tg:{name:"Tajik",nativeName:"тоҷикӣ"},th:{name:"Thai",nativeName:"ไทย"},ti:{name:"Tigrinya",nativeName:"ትግርኛ"},tk:{name:"Turkmen",nativeName:"Türkmençe"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"Türkçe"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"татар теле"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uyghur",nativeName:"ئۇيغۇرچە‎"},uk:{name:"Ukrainian",nativeName:"Українська"},ur:{name:"Urdu",nativeName:"اردو"},uz:{name:"Uzbek",nativeName:"Ўзбек"},ve:{name:"Venda",nativeName:"Tshivenḓa"},vi:{name:"Vietnamese",nativeName:"Tiếng Việt"},vo:{name:"Volapük",nativeName:"Volapük"},wa:{name:"Walloon",nativeName:"walon"},wo:{name:"Wolof",nativeName:"Wollof"},xh:{name:"Xhosa",nativeName:"isiXhosa"},yi:{name:"Yiddish",nativeName:"ייִדיש"},yo:{name:"Yoruba",nativeName:"Yorùbá"},za:{name:"Zhuang",nativeName:"Saɯ cueŋƅ"},zh:{name:"Chinese",nativeName:"中文"},zu:{name:"Zulu",nativeName:"isiZulu"}};var Tci=Lci;const V9=Tci,wOt={},Eie={},COt=[],SOt=[],NOt=[];for(const t in V9){const{name:e,nativeName:n}=V9[t];wOt[t]=Eie[e.toLowerCase()]=Eie[n.toLowerCase()]={code:t,name:e,nativeName:n},COt.push(t),SOt.push(e),NOt.push(n)}var Ici=class Gee{static getLanguages(e=[]){return e.map(n=>Gee.validate(n)?Object.assign({},wOt[n]):{code:n,name:"",nativeName:""})}static getName(e){return Gee.validate(e)?V9[e].name:""}static getAllNames(){return SOt.slice()}static getNativeName(e){return Gee.validate(e)?V9[e].nativeName:""}static getAllNativeNames(){return NOt.slice()}static getCode(e){return e=e.toLowerCase(),Eie.hasOwnProperty(e)?Eie[e].code:""}static getAllCodes(){return COt.slice()}static validate(e){return V9.hasOwnProperty(e)}};const Ja=ao(Ici);function _g(t,e=0){return t[t.length-(1+e)]}function Aci(t){if(t.length===0)throw new Error("Invalid tail call");return[t.slice(0,t.length-1),t[t.length-1]]}function Xs(t,e,n=(i,r)=>i===r){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let i=0,r=t.length;i<r;i++)if(!n(t[i],e[i]))return!1;return!0}function Rci(t,e){const n=t.length-1;e<n&&(t[e]=t[n]),t.pop()}function fH(t,e,n){return Pci(t.length,i=>n(t[i],e))}function Pci(t,e){let n=0,i=t-1;for(;n<=i;){const r=(n+i)/2|0,o=e(r);if(o<0)n=r+1;else if(o>0)i=r-1;else return r}return-(n+1)}function uMe(t,e,n){if(t=t|0,t>=e.length)throw new TypeError("invalid index");const i=e[Math.floor(e.length*Math.random())],r=[],o=[],s=[];for(const a of e){const l=n(a,i);l<0?r.push(a):l>0?o.push(a):s.push(a)}return t<r.length?uMe(t,r,n):t<r.length+s.length?s[0]:uMe(t-(r.length+s.length),o,n)}function wot(t,e){const n=[];let i;for(const r of t.slice(0).sort(e))!i||e(i[0],r)!==0?(i=[r],n.push(i)):i.push(r);return n}function*o8e(t,e){let n,i;for(const r of t)i!==void 0&&e(i,r)?n.push(r):(n&&(yield n),n=[r]),i=r;n&&(yield n)}function EOt(t,e){for(let n=0;n<=t.length;n++)e(n===0?void 0:t[n-1],n===t.length?void 0:t[n])}function Oci(t,e){for(let n=0;n<t.length;n++)e(n===0?void 0:t[n-1],t[n],n+1===t.length?void 0:t[n+1])}function H0(t){return t.filter(e=>!!e)}function Cot(t){let e=0;for(let n=0;n<t.length;n++)t[n]&&(t[e]=t[n],e+=1);t.length=e}function DOt(t){return!Array.isArray(t)||t.length===0}function md(t){return Array.isArray(t)&&t.length>0}function cS(t,e=n=>n){const n=new Set;return t.filter(i=>{const r=e(i);return n.has(r)?!1:(n.add(r),!0)})}function s8e(t,e){return t.length>0?t[0]:e}function sf(t,e){let n=typeof e=="number"?t:0;typeof e=="number"?n=t:(n=0,e=t);const i=[];if(n<=e)for(let r=n;r<e;r++)i.push(r);else for(let r=n;r>e;r--)i.push(r);return i}function Nfe(t,e,n){const i=t.slice(0,e),r=t.slice(e);return i.concat(n,r)}function bwe(t,e){const n=t.indexOf(e);n>-1&&(t.splice(n,1),t.unshift(e))}function rQ(t,e){const n=t.indexOf(e);n>-1&&(t.splice(n,1),t.push(e))}function dMe(t,e){for(const n of e)t.push(n)}function a8e(t){return Array.isArray(t)?t:[t]}function jci(t,e,n){const i=kOt(t,e),r=t.length,o=n.length;t.length=r+o;for(let s=r-1;s>=i;s--)t[s+o]=t[s];for(let s=0;s<o;s++)t[s+i]=n[s]}function Sot(t,e,n,i){const r=kOt(t,e);let o=t.splice(r,n);return o===void 0&&(o=[]),jci(t,r,i),o}function kOt(t,e){return e<0?Math.max(e+t.length,0):Math.min(e,t.length)}var mH;(function(t){function e(o){return o<0}t.isLessThan=e;function n(o){return o<=0}t.isLessThanOrEqual=n;function i(o){return o>0}t.isGreaterThan=i;function r(o){return o===0}t.isNeitherLessOrGreaterThan=r,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(mH||(mH={}));function Ah(t,e){return(n,i)=>e(t(n),t(i))}function Fci(...t){return(e,n)=>{for(const i of t){const r=i(e,n);if(!mH.isNeitherLessOrGreaterThan(r))return r}return mH.neitherLessOrGreaterThan}}const vv=(t,e)=>t-e,$ci=(t,e)=>vv(t?1:0,e?1:0);function MOt(t){return(e,n)=>-t(e,n)}class uS{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let n=this.firstIdx;for(;n<this.items.length&&e(this.items[n]);)n++;const i=n===this.firstIdx?null:this.items.slice(this.firstIdx,n);return this.firstIdx=n,i}takeFromEndWhile(e){let n=this.lastIdx;for(;n>=0&&e(this.items[n]);)n--;const i=n===this.lastIdx?null:this.items.slice(n+1,this.lastIdx+1);return this.lastIdx=n,i}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const n=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,n}}const j4=class j4{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new j4(n=>this.iterate(i=>e(i)?n(i):!0))}map(e){return new j4(n=>this.iterate(i=>n(e(i))))}findLast(e){let n;return this.iterate(i=>(e(i)&&(n=i),!0)),n}findLastMaxBy(e){let n,i=!0;return this.iterate(r=>((i||mH.isGreaterThan(e(r,n)))&&(i=!1,n=r),!0)),n}};j4.empty=new j4(e=>{});let iI=j4;class Die{constructor(e){this._indexMap=e}static createSortPermutation(e,n){const i=Array.from(e.keys()).sort((r,o)=>n(e[r],e[o]));return new Die(i)}apply(e){return e.map((n,i)=>e[this._indexMap[i]])}inverse(){const e=this._indexMap.slice();for(let n=0;n<this._indexMap.length;n++)e[this._indexMap[n]]=n;return new Die(e)}}function Cf(t){return typeof t=="string"}function Ic(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}function Vci(t){const e=Object.getPrototypeOf(Uint8Array);return typeof t=="object"&&t instanceof e}function ok(t){return typeof t=="number"&&!isNaN(t)}function Not(t){return!!t&&typeof t[Symbol.iterator]=="function"}function LOt(t){return t===!0||t===!1}function Ud(t){return typeof t>"u"}function zx(t){return!pp(t)}function pp(t){return Ud(t)||t===null}function Gr(t,e){if(!t)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function VE(t){if(pp(t))throw new Error("Assertion Failed: argument is undefined or null");return t}function pH(t){return typeof t=="function"}function Bci(t,e){const n=Math.min(t.length,e.length);for(let i=0;i<n;i++)zci(t[i],e[i])}function zci(t,e){if(Cf(e)){if(typeof t!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if(pH(e)){try{if(t instanceof e)return}catch{}if(!pp(t)&&t.constructor===e||e.length===1&&e.call(void 0,t)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function W1(t){if(!t||typeof t!="object"||t instanceof RegExp)return t;const e=Array.isArray(t)?[]:{};return Object.entries(t).forEach(([n,i])=>{e[n]=i&&typeof i=="object"?W1(i):i}),e}function Hci(t){if(!t||typeof t!="object")return t;const e=[t];for(;e.length>0;){const n=e.shift();Object.freeze(n);for(const i in n)if(TOt.call(n,i)){const r=n[i];typeof r=="object"&&!Object.isFrozen(r)&&!Vci(r)&&e.push(r)}}return t}const TOt=Object.prototype.hasOwnProperty;function IOt(t,e){return hMe(t,e,new Set)}function hMe(t,e,n){if(pp(t))return t;const i=e(t);if(typeof i<"u")return i;if(Array.isArray(t)){const r=[];for(const o of t)r.push(hMe(o,e,n));return r}if(Ic(t)){if(n.has(t))throw new Error("Cannot clone recursive data-structure");n.add(t);const r={};for(const o in t)TOt.call(t,o)&&(r[o]=hMe(t[o],e,n));return n.delete(t),r}return t}function Efe(t,e,n=!0){return Ic(t)?(Ic(e)&&Object.keys(e).forEach(i=>{i in t?n&&(Ic(t[i])&&Ic(e[i])?Efe(t[i],e[i],n):t[i]=e[i]):t[i]=e[i]}),t):e}function Lp(t,e){if(t===e)return!0;if(t==null||e===null||e===void 0||typeof t!=typeof e||typeof t!="object"||Array.isArray(t)!==Array.isArray(e))return!1;let n,i;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(n=0;n<t.length;n++)if(!Lp(t[n],e[n]))return!1}else{const r=[];for(i in t)r.push(i);r.sort();const o=[];for(i in e)o.push(i);if(o.sort(),!Lp(r,o))return!1;for(n=0;n<r.length;n++)if(!Lp(t[r[n]],e[r[n]]))return!1}return!0}function Wci(t){let e=[];for(;Object.prototype!==t;)e=e.concat(Object.getOwnPropertyNames(t)),t=Object.getPrototypeOf(t);return e}function l8e(t){const e=[];for(const n of Wci(t))typeof t[n]=="function"&&e.push(n);return e}function Uci(t,e){const n=r=>function(){const o=Array.prototype.slice.call(arguments,0);return e(r,o)},i={};for(const r of t)i[r]=n(r);return i}function Kci(){return globalThis._VSCODE_NLS_MESSAGES}function AOt(){return globalThis._VSCODE_NLS_LANGUAGE}const qci=AOt()==="pseudo"||typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function kie(t,e){let n;return e.length===0?n=t:n=t.replace(/\{(\d+)\}/g,(i,r)=>{const o=r[0],s=e[o];let a=i;return typeof s=="string"?a=s:(typeof s=="number"||typeof s=="boolean"||s===void 0||s===null)&&(a=String(s)),a}),qci&&(n="［"+n.replace(/[aouei]/g,"$&$&")+"］"),n}function I(t,e,...n){return kie(typeof t=="number"?ROt(t,e):e,n)}function ROt(t,e){var i;const n=(i=Kci())==null?void 0:i[t];if(typeof n!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${t} !!!`)}return n}function Ci(t,e,...n){let i;typeof t=="number"?i=ROt(t,e):i=e;const r=kie(i,n);return{value:r,original:e===i?r:kie(e,n)}}const s4="en";let Mie=!1,Lie=!1,Yee=!1,POt=!1,c8e=!1,u8e=!1,OOt=!1,oQ,Xee=s4,Eot=s4,Gci,Cy;const LC=globalThis;let gh;var G0t;typeof LC.vscode<"u"&&typeof LC.vscode.process<"u"?gh=LC.vscode.process:typeof process<"u"&&typeof((G0t=process==null?void 0:process.versions)==null?void 0:G0t.node)=="string"&&(gh=process);var Y0t;const Yci=typeof((Y0t=gh==null?void 0:gh.versions)==null?void 0:Y0t.electron)=="string",Xci=Yci&&(gh==null?void 0:gh.type)==="renderer";var X0t;if(typeof gh=="object"){Mie=gh.platform==="win32",Lie=gh.platform==="darwin",Yee=gh.platform==="linux",Yee&&gh.env.SNAP&&gh.env.SNAP_REVISION,gh.env.CI||gh.env.BUILD_ARTIFACTSTAGINGDIRECTORY,oQ=s4,Xee=s4;const t=gh.env.VSCODE_NLS_CONFIG;if(t)try{const e=JSON.parse(t);oQ=e.userLocale,Eot=e.osLocale,Xee=e.resolvedLanguage||s4,Gci=(X0t=e.languagePack)==null?void 0:X0t.translationsConfigFile}catch{}POt=!0}else typeof navigator=="object"&&!Xci?(Cy=navigator.userAgent,Mie=Cy.indexOf("Windows")>=0,Lie=Cy.indexOf("Macintosh")>=0,u8e=(Cy.indexOf("Macintosh")>=0||Cy.indexOf("iPad")>=0||Cy.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Yee=Cy.indexOf("Linux")>=0,OOt=(Cy==null?void 0:Cy.indexOf("Mobi"))>=0,c8e=!0,Xee=AOt()||s4,oQ=navigator.language.toLowerCase(),Eot=oQ):console.error("Unable to resolve platform.");const Fu=Mie,xr=Lie,$h=Yee,y0=POt,eM=c8e,Zci=c8e&&typeof LC.importScripts=="function",Qci=Zci?LC.origin:void 0,W0=u8e,jOt=OOt,cw=Cy,Jci=Xee,eui=typeof LC.postMessage=="function"&&!LC.importScripts,FOt=(()=>{if(eui){const t=[];LC.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let i=0,r=t.length;i<r;i++){const o=t[i];if(o.id===n.data.vscodeScheduleAsyncWork){t.splice(i,1),o.callback();return}}});let e=0;return n=>{const i=++e;t.push({id:i,callback:n}),LC.postMessage({vscodeScheduleAsyncWork:i},"*")}}return t=>setTimeout(t)})(),pm=Lie||u8e?2:Mie?1:3;let Dot=!0,kot=!1;function $Ot(){if(!kot){kot=!0;const t=new Uint8Array(2);t[0]=1,t[1]=2,Dot=new Uint16Array(t.buffer)[0]===513}return Dot}const VOt=!!(cw&&cw.indexOf("Chrome")>=0),tui=!!(cw&&cw.indexOf("Firefox")>=0),nui=!!(!VOt&&cw&&cw.indexOf("Safari")>=0),iui=!!(cw&&cw.indexOf("Edg/")>=0),rui=!!(cw&&cw.indexOf("Android")>=0),id={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}};var Ir;(function(t){function e(C){return C&&typeof C=="object"&&typeof C[Symbol.iterator]=="function"}t.is=e;const n=Object.freeze([]);function i(){return n}t.empty=i;function*r(C){yield C}t.single=r;function o(C){return e(C)?C:r(C)}t.wrap=o;function s(C){return C||n}t.from=s;function*a(C){for(let N=C.length-1;N>=0;N--)yield C[N]}t.reverse=a;function l(C){return!C||C[Symbol.iterator]().next().done===!0}t.isEmpty=l;function c(C){return C[Symbol.iterator]().next().value}t.first=c;function u(C,N){let E=0;for(const D of C)if(N(D,E++))return!0;return!1}t.some=u;function d(C,N){for(const E of C)if(N(E))return E}t.find=d;function*h(C,N){for(const E of C)N(E)&&(yield E)}t.filter=h;function*f(C,N){let E=0;for(const D of C)yield N(D,E++)}t.map=f;function*m(C,N){let E=0;for(const D of C)yield*N(D,E++)}t.flatMap=m;function*p(...C){for(const N of C)yield*N}t.concat=p;function g(C,N,E){let D=E;for(const k of C)D=N(D,k);return D}t.reduce=g;function*y(C,N,E=C.length){for(N<0&&(N+=C.length),E<0?E+=C.length:E>C.length&&(E=C.length);N<E;N++)yield C[N]}t.slice=y;function _(C,N=Number.POSITIVE_INFINITY){const E=[];if(N===0)return[E,C];const D=C[Symbol.iterator]();for(let k=0;k<N;k++){const M=D.next();if(M.done)return[E,t.empty()];E.push(M.value)}return[E,{[Symbol.iterator](){return D}}]}t.consume=_;async function w(C){const N=[];for await(const E of C)N.push(E);return Promise.resolve(N)}t.asyncToArray=w})(Ir||(Ir={}));var bC;let tc=(bC=class{constructor(e){this.element=e,this.next=bC.Undefined,this.prev=bC.Undefined}},bC.Undefined=new bC(void 0),bC);class Ch{constructor(){this._first=tc.Undefined,this._last=tc.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===tc.Undefined}clear(){let e=this._first;for(;e!==tc.Undefined;){const n=e.next;e.prev=tc.Undefined,e.next=tc.Undefined,e=n}this._first=tc.Undefined,this._last=tc.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,n){const i=new tc(e);if(this._first===tc.Undefined)this._first=i,this._last=i;else if(n){const o=this._last;this._last=i,i.prev=o,o.next=i}else{const o=this._first;this._first=i,i.next=o,o.prev=i}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(i))}}shift(){if(this._first!==tc.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==tc.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==tc.Undefined&&e.next!==tc.Undefined){const n=e.prev;n.next=e.next,e.next.prev=n}else e.prev===tc.Undefined&&e.next===tc.Undefined?(this._first=tc.Undefined,this._last=tc.Undefined):e.next===tc.Undefined?(this._last=this._last.prev,this._last.next=tc.Undefined):e.prev===tc.Undefined&&(this._first=this._first.next,this._first.prev=tc.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==tc.Undefined;)yield e.element,e=e.next}}const BOt="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function oui(t=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const n of BOt)t.indexOf(n)>=0||(e+="\\"+n);return e+="\\s]+)",new RegExp(e,"g")}const d8e=oui();function h8e(t){let e=d8e;if(t&&t instanceof RegExp)if(t.global)e=t;else{let n="g";t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),e=new RegExp(t.source,n)}return e.lastIndex=0,e}const zOt=new Ch;zOt.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function gH(t,e,n,i,r){if(e=h8e(e),r||(r=Ir.first(zOt)),n.length>r.maxLen){let c=t-r.maxLen/2;return c<0?c=0:i+=c,n=n.substring(c,t+r.maxLen/2),gH(t,e,n,i,r)}const o=Date.now(),s=t-1-i;let a=-1,l=null;for(let c=1;!(Date.now()-o>=r.timeBudget);c++){const u=s-r.windowSize*c;e.lastIndex=Math.max(0,u);const d=sui(e,n,s,a);if(!d&&l||(l=d,u<=0))break;a=u}if(l){const c={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function sui(t,e,n,i){let r;for(;r=t.exec(e);){const o=r.index||0;if(o<=n&&t.lastIndex>=n)return r;if(i>0&&o>i)return null}return null}const q_=8;class HOt{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class WOt{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class Hs{constructor(e,n,i,r){this.id=e,this.name=n,this.defaultValue=i,this.schema=r}applyUpdate(e,n){return Dfe(e,n)}compute(e,n,i){return i}}class B9{constructor(e,n){this.newValue=e,this.didChange=n}}function Dfe(t,e){if(typeof t!="object"||typeof e!="object"||!t||!e)return new B9(e,t!==e);if(Array.isArray(t)||Array.isArray(e)){const i=Array.isArray(t)&&Array.isArray(e)&&Xs(t,e);return new B9(e,!i)}let n=!1;for(const i in e)if(e.hasOwnProperty(i)){const r=Dfe(t[i],e[i]);r.didChange&&(t[i]=r.newValue,n=!0)}return new B9(t,n)}class hq{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,n){return Dfe(e,n)}validate(e){return this.defaultValue}}class E6{constructor(e,n,i,r){this.id=e,this.name=n,this.defaultValue=i,this.schema=r}applyUpdate(e,n){return Dfe(e,n)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,n,i){return i}}function Wn(t,e){return typeof t>"u"?e:t==="false"?!1:!!t}class Ur extends E6{constructor(e,n,i,r=void 0){typeof r<"u"&&(r.type="boolean",r.default=i),super(e,n,i,r)}validate(e){return Wn(e,this.defaultValue)}}function TL(t,e,n,i){if(typeof t>"u")return e;let r=parseInt(t,10);return isNaN(r)?e:(r=Math.max(n,r),r=Math.min(i,r),r|0)}class ss extends E6{static clampedInt(e,n,i,r){return TL(e,n,i,r)}constructor(e,n,i,r,o,s=void 0){typeof s<"u"&&(s.type="integer",s.default=i,s.minimum=r,s.maximum=o),super(e,n,i,s),this.minimum=r,this.maximum=o}validate(e){return ss.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function aui(t,e,n,i){if(typeof t>"u")return e;const r=_p.float(t,e);return _p.clamp(r,n,i)}class _p extends E6{static clamp(e,n,i){return e<n?n:e>i?i:e}static float(e,n){if(typeof e=="number")return e;if(typeof e>"u")return n;const i=parseFloat(e);return isNaN(i)?n:i}constructor(e,n,i,r,o){typeof o<"u"&&(o.type="number",o.default=i),super(e,n,i,o),this.validationFn=r}validate(e){return this.validationFn(_p.float(e,this.defaultValue))}}class Bd extends E6{static string(e,n){return typeof e!="string"?n:e}constructor(e,n,i,r=void 0){typeof r<"u"&&(r.type="string",r.default=i),super(e,n,i,r)}validate(e){return Bd.string(e,this.defaultValue)}}function wa(t,e,n,i){return typeof t!="string"?e:i&&t in i?i[t]:n.indexOf(t)===-1?e:t}class xa extends E6{constructor(e,n,i,r,o=void 0){typeof o<"u"&&(o.type="string",o.enum=r,o.default=i),super(e,n,i,o),this._allowedValues=r}validate(e){return wa(e,this.defaultValue,this._allowedValues)}}class sQ extends Hs{constructor(e,n,i,r,o,s,a=void 0){typeof a<"u"&&(a.type="string",a.enum=o,a.default=r),super(e,n,i,a),this._allowedValues=o,this._convert=s}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function lui(t){switch(t){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class cui extends Hs{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[I("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),I("accessibilitySupport.on","Optimize for usage with a Screen Reader."),I("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:I("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,n,i){return i===0?e.accessibilitySupport:i}}class uui extends Hs{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:I("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:I("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e;return{insertSpace:Wn(n.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:Wn(n.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function dui(t){switch(t){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var Qc;(function(t){t[t.Line=1]="Line",t[t.Block=2]="Block",t[t.Underline=3]="Underline",t[t.LineThin=4]="LineThin",t[t.BlockOutline=5]="BlockOutline",t[t.UnderlineThin=6]="UnderlineThin"})(Qc||(Qc={}));function hui(t){switch(t){case"line":return Qc.Line;case"block":return Qc.Block;case"underline":return Qc.Underline;case"line-thin":return Qc.LineThin;case"block-outline":return Qc.BlockOutline;case"underline-thin":return Qc.UnderlineThin}}class fui extends hq{constructor(){super(143)}compute(e,n,i){const r=["monaco-editor"];return n.get(39)&&r.push(n.get(39)),e.extraEditorClassName&&r.push(e.extraEditorClassName),n.get(74)==="default"?r.push("mouse-default"):n.get(74)==="copy"&&r.push("mouse-copy"),n.get(112)&&r.push("showUnused"),n.get(141)&&r.push("showDeprecated"),r.join(" ")}}class mui extends Ur{constructor(){super(37,"emptySelectionClipboard",!0,{description:I("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,n,i){return i&&e.emptySelectionClipboard}}class pui extends Hs{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:I("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[I("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),I("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),I("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:I("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[I("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),I("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),I("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:I("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:I("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:xr},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:I("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:I("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e;return{cursorMoveOnType:Wn(n.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":wa(n.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":wa(n.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:Wn(n.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:Wn(n.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:Wn(n.loop,this.defaultValue.loop)}}}const F1=class F1 extends Hs{constructor(){super(51,"fontLigatures",F1.OFF,{anyOf:[{type:"boolean",description:I("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:I("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:I("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"||e.length===0?F1.OFF:e==="true"?F1.ON:e:e?F1.ON:F1.OFF}};F1.OFF='"liga" off, "calt" off',F1.ON='"liga" on, "calt" on';let sk=F1;const $1=class $1 extends Hs{constructor(){super(54,"fontVariations",$1.OFF,{anyOf:[{type:"boolean",description:I("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:I("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:I("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?$1.OFF:e==="true"?$1.TRANSLATE:e:e?$1.TRANSLATE:$1.OFF}compute(e,n,i){return e.fontInfo.fontVariationSettings}};$1.OFF="normal",$1.TRANSLATE="translate";let bH=$1;class gui extends hq{constructor(){super(50)}compute(e,n,i){return e.fontInfo}}class bui extends E6{constructor(){super(52,"fontSize",Rh.fontSize,{type:"number",minimum:6,maximum:100,default:Rh.fontSize,description:I("fontSize","Controls the font size in pixels.")})}validate(e){const n=_p.float(e,this.defaultValue);return n===0?Rh.fontSize:_p.clamp(n,6,100)}compute(e,n,i){return e.fontInfo.fontSize}}const ix=class ix extends Hs{constructor(){super(53,"fontWeight",Rh.fontWeight,{anyOf:[{type:"number",minimum:ix.MINIMUM_VALUE,maximum:ix.MAXIMUM_VALUE,errorMessage:I("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:ix.SUGGESTION_VALUES}],default:Rh.fontWeight,description:I("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(ss.clampedInt(e,Rh.fontWeight,ix.MINIMUM_VALUE,ix.MAXIMUM_VALUE))}};ix.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],ix.MINIMUM_VALUE=1,ix.MAXIMUM_VALUE=1e3;let fMe=ix;class vui extends Hs{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",multipleTests:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:"",alternativeTestsCommand:""},n={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[I("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),I("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),I("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:I("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:I("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...n},"editor.gotoLocation.multipleTypeDefinitions":{description:I("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...n},"editor.gotoLocation.multipleDeclarations":{description:I("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...n},"editor.gotoLocation.multipleImplementations":{description:I("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...n},"editor.gotoLocation.multipleReferences":{description:I("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...n},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:I("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:I("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:I("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:I("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:I("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e;return{multiple:wa(n.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:n.multipleDefinitions??wa(n.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:n.multipleTypeDefinitions??wa(n.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:n.multipleDeclarations??wa(n.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:n.multipleImplementations??wa(n.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:n.multipleReferences??wa(n.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),multipleTests:n.multipleTests??wa(n.multipleTests,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Bd.string(n.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Bd.string(n.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Bd.string(n.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Bd.string(n.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Bd.string(n.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand),alternativeTestsCommand:Bd.string(n.alternativeTestsCommand,this.defaultValue.alternativeTestsCommand)}}}class yui extends Hs{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:I("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:I("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:I("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:I("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:I("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e;return{enabled:Wn(n.enabled,this.defaultValue.enabled),delay:ss.clampedInt(n.delay,this.defaultValue.delay,0,1e4),sticky:Wn(n.sticky,this.defaultValue.sticky),hidingDelay:ss.clampedInt(n.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:Wn(n.above,this.defaultValue.above)}}}class p3 extends hq{constructor(){super(146)}compute(e,n,i){return p3.computeLayout(n,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const n=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight);let r=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(r=Math.max(r,n-1));const o=(i+e.viewLineCount+r)/(e.pixelRatio*e.height),s=Math.floor(e.viewLineCount/o);return{typicalViewportLineCount:n,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:r,desiredRatio:o,minimapLineCount:s}}static _computeMinimapLayout(e,n){const i=e.outerWidth,r=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*r),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:r};const s=n.stableMinimapLayoutInput,a=s&&e.outerHeight===s.outerHeight&&e.lineHeight===s.lineHeight&&e.typicalHalfwidthCharacterWidth===s.typicalHalfwidthCharacterWidth&&e.pixelRatio===s.pixelRatio&&e.scrollBeyondLastLine===s.scrollBeyondLastLine&&e.paddingTop===s.paddingTop&&e.paddingBottom===s.paddingBottom&&e.minimap.enabled===s.minimap.enabled&&e.minimap.side===s.minimap.side&&e.minimap.size===s.minimap.size&&e.minimap.showSlider===s.minimap.showSlider&&e.minimap.renderCharacters===s.minimap.renderCharacters&&e.minimap.maxColumn===s.minimap.maxColumn&&e.minimap.scale===s.minimap.scale&&e.verticalScrollbarWidth===s.verticalScrollbarWidth&&e.isViewportWrapping===s.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,u=e.scrollBeyondLastLine,d=e.minimap.renderCharacters;let h=o>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const f=e.minimap.maxColumn,m=e.minimap.size,p=e.minimap.side,g=e.verticalScrollbarWidth,y=e.viewLineCount,_=e.remainingWidth,w=e.isViewportWrapping,C=d?2:3;let N=Math.floor(o*r);const E=N/o;let D=!1,k=!1,M=C*h,T=h/o,A=1;if(m==="fill"||m==="fit"){const{typicalViewportLineCount:B,extraLinesBeforeFirstLine:z,extraLinesBeyondLastLine:H,desiredRatio:K,minimapLineCount:q}=p3.computeContainedMinimapLineCount({viewLineCount:y,scrollBeyondLastLine:u,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:r,lineHeight:l,pixelRatio:o});if(y/q>1)D=!0,k=!0,h=1,M=1,T=h/o;else{let Y=!1,J=h+1;if(m==="fit"){const ae=Math.ceil((z+y+H)*M);w&&a&&_<=n.stableFitRemainingWidth?(Y=!0,J=n.stableFitMaxMinimapScale):Y=ae>N}if(m==="fill"||Y){D=!0;const ae=h;M=Math.min(l*o,Math.max(1,Math.floor(1/K))),w&&a&&_<=n.stableFitRemainingWidth&&(J=n.stableFitMaxMinimapScale),h=Math.min(J,Math.max(1,Math.floor(M/C))),h>ae&&(A=Math.min(2,h/ae)),T=h/o/A,N=Math.ceil(Math.max(B,z+y+H)*M),w?(n.stableMinimapLayoutInput=e,n.stableFitRemainingWidth=_,n.stableFitMaxMinimapScale=h):(n.stableMinimapLayoutInput=null,n.stableFitRemainingWidth=0)}}}const R=Math.floor(f*T),P=Math.min(R,Math.max(0,Math.floor((_-g-2)*T/(c+T)))+q_);let O=Math.floor(o*P);const V=O/o;O=Math.floor(O*A);const F=d?1:2,$=p==="left"?0:i-P-g;return{renderMinimap:F,minimapLeft:$,minimapWidth:P,minimapHeightIsEditorHeight:D,minimapIsSampling:k,minimapScale:h,minimapLineHeight:M,minimapCanvasInnerWidth:O,minimapCanvasInnerHeight:N,minimapCanvasOuterWidth:V,minimapCanvasOuterHeight:E}}static computeLayout(e,n){const i=n.outerWidth|0,r=n.outerHeight|0,o=n.lineHeight|0,s=n.lineNumbersDigitCount|0,a=n.typicalHalfwidthCharacterWidth,l=n.maxDigitWidth,c=n.pixelRatio,u=n.viewLineCount,d=e.get(138),h=d==="inherit"?e.get(137):d,f=h==="inherit"?e.get(133):h,m=e.get(136),p=n.isDominatedByLongLines,g=e.get(57),y=e.get(68).renderType!==0,_=e.get(69),w=e.get(106),C=e.get(84),N=e.get(73),E=e.get(104),D=E.verticalScrollbarSize,k=E.verticalHasArrows,M=E.arrowSize,T=E.horizontalScrollbarSize,A=e.get(43),R=e.get(111)!=="never";let P=e.get(66);A&&R&&(P+=16);let O=0;if(y){const oe=Math.max(s,_);O=Math.round(oe*l)}let V=0;g&&(V=o*n.glyphMarginDecorationLaneCount);let F=0,$=F+V,B=$+O,z=B+P;const H=i-V-O-P;let K=!1,q=!1,U=-1;h==="inherit"&&p?(K=!0,q=!0):f==="on"||f==="bounded"?q=!0:f==="wordWrapColumn"&&(U=m);const Y=p3._computeMinimapLayout({outerWidth:i,outerHeight:r,lineHeight:o,typicalHalfwidthCharacterWidth:a,pixelRatio:c,scrollBeyondLastLine:w,paddingTop:C.top,paddingBottom:C.bottom,minimap:N,verticalScrollbarWidth:D,viewLineCount:u,remainingWidth:H,isViewportWrapping:q},n.memory||new WOt);Y.renderMinimap!==0&&Y.minimapLeft===0&&(F+=Y.minimapWidth,$+=Y.minimapWidth,B+=Y.minimapWidth,z+=Y.minimapWidth);const J=H-Y.minimapWidth,ae=Math.max(1,Math.floor((J-D-2)/a)),se=k?M:0;return q&&(U=Math.max(1,ae),f==="bounded"&&(U=Math.min(U,m))),{width:i,height:r,glyphMarginLeft:F,glyphMarginWidth:V,glyphMarginDecorationLaneCount:n.glyphMarginDecorationLaneCount,lineNumbersLeft:$,lineNumbersWidth:O,decorationsLeft:B,decorationsWidth:P,contentLeft:z,contentWidth:J,minimap:Y,viewportColumn:ae,isWordWrapMinified:K,isViewportWrapping:q,wrappingColumn:U,verticalScrollbarWidth:D,horizontalScrollbarHeight:T,overviewRuler:{top:se,width:D,height:r-2*se,right:0}}}}class _ui extends Hs{constructor(){super(140,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[I("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),I("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:I("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return wa(e,"simple",["simple","advanced"])}compute(e,n,i){return n.get(2)===2?"advanced":i}}var Jb;(function(t){t.Off="off",t.OnCode="onCode",t.On="on"})(Jb||(Jb={}));class xui extends Hs{constructor(){const e={enabled:Jb.On};super(65,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[Jb.Off,Jb.OnCode,Jb.On],default:e.enabled,enumDescriptions:[I("editor.lightbulb.enabled.off","Disable the code action menu."),I("editor.lightbulb.enabled.onCode","Show the code action menu when the cursor is on lines with code."),I("editor.lightbulb.enabled.on","Show the code action menu when the cursor is on lines with code or on empty lines.")],description:I("enabled","Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:wa(e.enabled,this.defaultValue.enabled,[Jb.Off,Jb.OnCode,Jb.On])}}}class wui extends Hs{constructor(){const e={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(116,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:I("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:20,description:I("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:I("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:I("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e;return{enabled:Wn(n.enabled,this.defaultValue.enabled),maxLineCount:ss.clampedInt(n.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:wa(n.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:Wn(n.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class Cui extends Hs{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(142,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:I("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[I("editor.inlayHints.on","Inlay hints are enabled"),I("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",xr?"Ctrl+Option":"Ctrl+Alt"),I("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",xr?"Ctrl+Option":"Ctrl+Alt"),I("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:I("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:I("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:I("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e;return typeof n.enabled=="boolean"&&(n.enabled=n.enabled?"on":"off"),{enabled:wa(n.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:ss.clampedInt(n.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Bd.string(n.fontFamily,this.defaultValue.fontFamily),padding:Wn(n.padding,this.defaultValue.padding)}}}class Sui extends Hs{constructor(){super(66,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):ss.clampedInt(e,this.defaultValue,0,1e3)}compute(e,n,i){return i<0?ss.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}class Nui extends _p{constructor(){super(67,"lineHeight",Rh.lineHeight,e=>_p.clamp(e,0,150),{markdownDescription:I("lineHeight",`Controls the line height. 
 - Use 0 to automatically compute the line height from the font size.
 - Values between 0 and 8 will be used as a multiplier with the font size.
 - Values greater than or equal to 8 will be used as effective values.`)})}compute(e,n,i){return e.fontInfo.lineHeight}}class Eui extends Hs{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1,showRegionSectionHeaders:!0,showMarkSectionHeaders:!0,sectionHeaderFontSize:9,sectionHeaderLetterSpacing:1};super(73,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:I("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:I("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[I("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),I("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),I("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:I("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:I("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:I("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:I("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:I("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:I("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")},"editor.minimap.showRegionSectionHeaders":{type:"boolean",default:e.showRegionSectionHeaders,description:I("minimap.showRegionSectionHeaders","Controls whether named regions are shown as section headers in the minimap.")},"editor.minimap.showMarkSectionHeaders":{type:"boolean",default:e.showMarkSectionHeaders,description:I("minimap.showMarkSectionHeaders","Controls whether MARK: comments are shown as section headers in the minimap.")},"editor.minimap.sectionHeaderFontSize":{type:"number",default:e.sectionHeaderFontSize,description:I("minimap.sectionHeaderFontSize","Controls the font size of section headers in the minimap.")},"editor.minimap.sectionHeaderLetterSpacing":{type:"number",default:e.sectionHeaderLetterSpacing,description:I("minimap.sectionHeaderLetterSpacing","Controls the amount of space (in pixels) between characters of section header. This helps the readability of the header in small font sizes.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e;return{enabled:Wn(n.enabled,this.defaultValue.enabled),autohide:Wn(n.autohide,this.defaultValue.autohide),size:wa(n.size,this.defaultValue.size,["proportional","fill","fit"]),side:wa(n.side,this.defaultValue.side,["right","left"]),showSlider:wa(n.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:Wn(n.renderCharacters,this.defaultValue.renderCharacters),scale:ss.clampedInt(n.scale,1,1,3),maxColumn:ss.clampedInt(n.maxColumn,this.defaultValue.maxColumn,1,1e4),showRegionSectionHeaders:Wn(n.showRegionSectionHeaders,this.defaultValue.showRegionSectionHeaders),showMarkSectionHeaders:Wn(n.showMarkSectionHeaders,this.defaultValue.showMarkSectionHeaders),sectionHeaderFontSize:_p.clamp(n.sectionHeaderFontSize??this.defaultValue.sectionHeaderFontSize,4,32),sectionHeaderLetterSpacing:_p.clamp(n.sectionHeaderLetterSpacing??this.defaultValue.sectionHeaderLetterSpacing,0,5)}}}function Dui(t){return t==="ctrlCmd"?xr?"metaKey":"ctrlKey":"altKey"}class kui extends Hs{constructor(){super(84,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:I("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:I("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e;return{top:ss.clampedInt(n.top,0,0,1e3),bottom:ss.clampedInt(n.bottom,0,0,1e3)}}}class Mui extends Hs{constructor(){const e={enabled:!0,cycle:!0};super(86,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:I("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:I("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e;return{enabled:Wn(n.enabled,this.defaultValue.enabled),cycle:Wn(n.cycle,this.defaultValue.cycle)}}}class Lui extends hq{constructor(){super(144)}compute(e,n,i){return e.pixelRatio}}class Tui extends Hs{constructor(){super(88,"placeholder",void 0)}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e:this.defaultValue}}class Iui extends Hs{constructor(){const e={other:"on",comments:"off",strings:"off"},n=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[I("on","Quick suggestions show inside the suggest widget"),I("inline","Quick suggestions show as ghost text"),I("off","Quick suggestions are disabled")]}];super(90,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:n,default:e.strings,description:I("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:n,default:e.comments,description:I("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:n,default:e.other,description:I("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:I("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the {0}-setting which controls if suggestions are triggered by special characters.","`#editor.suggestOnTriggerCharacters#`")}),this.defaultValue=e}validate(e){if(typeof e=="boolean"){const c=e?"on":"off";return{comments:c,strings:c,other:c}}if(!e||typeof e!="object")return this.defaultValue;const{other:n,comments:i,strings:r}=e,o=["on","inline","off"];let s,a,l;return typeof n=="boolean"?s=n?"on":"off":s=wa(n,this.defaultValue.other,o),typeof i=="boolean"?a=i?"on":"off":a=wa(i,this.defaultValue.comments,o),typeof r=="boolean"?l=r?"on":"off":l=wa(r,this.defaultValue.strings,o),{other:s,comments:a,strings:l}}}class Aui extends Hs{constructor(){super(68,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[I("lineNumbers.off","Line numbers are not rendered."),I("lineNumbers.on","Line numbers are rendered as absolute number."),I("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),I("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:I("lineNumbers","Controls the display of line numbers.")})}validate(e){let n=this.defaultValue.renderType,i=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(n=4,i=e):e==="interval"?n=3:e==="relative"?n=2:e==="on"?n=1:n=0),{renderType:n,renderFn:i}}}function Tie(t){const e=t.get(99);return e==="editable"?t.get(92):e!=="on"}class Rui extends Hs{constructor(){const e=[],n={type:"number",description:I("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(103,"rulers",e,{type:"array",items:{anyOf:[n,{type:["object"],properties:{column:n,color:{type:"string",description:I("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:I("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const n=[];for(const i of e)if(typeof i=="number")n.push({column:ss.clampedInt(i,0,0,1e4),color:null});else if(i&&typeof i=="object"){const r=i;n.push({column:ss.clampedInt(r.column,0,0,1e4),color:r.color})}return n.sort((i,r)=>i.column-r.column),n}return this.defaultValue}}class Pui extends Hs{constructor(){super(93,"readOnlyMessage",void 0)}validate(e){return!e||typeof e!="object"?this.defaultValue:e}}function Mot(t,e){if(typeof t!="string")return e;switch(t){case"hidden":return 2;case"visible":return 3;default:return 1}}let Oui=class extends Hs{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(104,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[I("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),I("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),I("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:I("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[I("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),I("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),I("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:I("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:I("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:I("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:I("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:e.ignoreHorizontalScrollbarInContentHeight,description:I("scrollbar.ignoreHorizontalScrollbarInContentHeight","When set, the horizontal scrollbar will not increase the size of the editor's content.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e,i=ss.clampedInt(n.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),r=ss.clampedInt(n.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:ss.clampedInt(n.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Mot(n.vertical,this.defaultValue.vertical),horizontal:Mot(n.horizontal,this.defaultValue.horizontal),useShadows:Wn(n.useShadows,this.defaultValue.useShadows),verticalHasArrows:Wn(n.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:Wn(n.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:Wn(n.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:Wn(n.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:ss.clampedInt(n.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:r,verticalSliderSize:ss.clampedInt(n.verticalSliderSize,r,0,1e3),scrollByPage:Wn(n.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:Wn(n.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}};const ip="inUntrustedWorkspace",uf={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class jui extends Hs{constructor(){const e={nonBasicASCII:ip,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:ip,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(126,"unicodeHighlight",e,{[uf.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,ip],default:e.nonBasicASCII,description:I("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[uf.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:I("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[uf.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:I("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[uf.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,ip],default:e.includeComments,description:I("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[uf.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,ip],default:e.includeStrings,description:I("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[uf.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:I("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[uf.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:I("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,n){let i=!1;n.allowedCharacters&&e&&(Lp(e.allowedCharacters,n.allowedCharacters)||(e={...e,allowedCharacters:n.allowedCharacters},i=!0)),n.allowedLocales&&e&&(Lp(e.allowedLocales,n.allowedLocales)||(e={...e,allowedLocales:n.allowedLocales},i=!0));const r=super.applyUpdate(e,n);return i?new B9(r.newValue,!0):r}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e;return{nonBasicASCII:g3(n.nonBasicASCII,ip,[!0,!1,ip]),invisibleCharacters:Wn(n.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:Wn(n.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:g3(n.includeComments,ip,[!0,!1,ip]),includeStrings:g3(n.includeStrings,ip,[!0,!1,ip]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,n){if(typeof e!="object"||!e)return n;const i={};for(const[r,o]of Object.entries(e))o===!0&&(i[r]=!0);return i}}class Fui extends Hs{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1,fontFamily:"default"};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:I("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[I("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),I("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),I("inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:I("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:I("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")},"editor.inlineSuggest.fontFamily":{type:"string",default:e.fontFamily,description:I("inlineSuggest.fontFamily","Controls the font family of the inline suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e;return{enabled:Wn(n.enabled,this.defaultValue.enabled),mode:wa(n.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:wa(n.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:Wn(n.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:Wn(n.keepOnBlur,this.defaultValue.keepOnBlur),fontFamily:Bd.string(n.fontFamily,this.defaultValue.fontFamily)}}}class $ui extends Hs{constructor(){const e={enabled:!1,showToolbar:"onHover",fontFamily:"default",keepOnBlur:!1};super(63,"experimentalInlineEdit",e,{"editor.experimentalInlineEdit.enabled":{type:"boolean",default:e.enabled,description:I("inlineEdit.enabled","Controls whether to show inline edits in the editor.")},"editor.experimentalInlineEdit.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[I("inlineEdit.showToolbar.always","Show the inline edit toolbar whenever an inline suggestion is shown."),I("inlineEdit.showToolbar.onHover","Show the inline edit toolbar when hovering over an inline suggestion."),I("inlineEdit.showToolbar.never","Never show the inline edit toolbar.")],description:I("inlineEdit.showToolbar","Controls when to show the inline edit toolbar.")},"editor.experimentalInlineEdit.fontFamily":{type:"string",default:e.fontFamily,description:I("inlineEdit.fontFamily","Controls the font family of the inline edit.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e;return{enabled:Wn(n.enabled,this.defaultValue.enabled),showToolbar:wa(n.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),fontFamily:Bd.string(n.fontFamily,this.defaultValue.fontFamily),keepOnBlur:Wn(n.keepOnBlur,this.defaultValue.keepOnBlur)}}}class Vui extends Hs{constructor(){const e={enabled:id.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:id.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:I("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:I("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e;return{enabled:Wn(n.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:Wn(n.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class Bui extends Hs{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[I("editor.guides.bracketPairs.true","Enables bracket pair guides."),I("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),I("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:I("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[I("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),I("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),I("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:I("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:I("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:I("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[I("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),I("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),I("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:I("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e;return{bracketPairs:g3(n.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:g3(n.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:Wn(n.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:Wn(n.indentation,this.defaultValue.indentation),highlightActiveIndentation:g3(n.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function g3(t,e,n){const i=n.indexOf(t);return i===-1?e:n[i]}class zui extends Hs{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(119,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[I("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),I("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:I("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:I("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:I("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:I("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[I("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),I("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),I("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),I("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:I("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions ({0} and {1}) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.","`#editor.quickSuggestions#`","`#editor.suggestOnTriggerCharacters#`")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:I("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:I("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:I("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:I("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:I("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:I("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:I("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:I("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e;return{insertMode:wa(n.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:Wn(n.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:Wn(n.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:Wn(n.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:Wn(n.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:wa(n.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:Wn(n.showIcons,this.defaultValue.showIcons),showStatusBar:Wn(n.showStatusBar,this.defaultValue.showStatusBar),preview:Wn(n.preview,this.defaultValue.preview),previewMode:wa(n.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:Wn(n.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:Wn(n.showMethods,this.defaultValue.showMethods),showFunctions:Wn(n.showFunctions,this.defaultValue.showFunctions),showConstructors:Wn(n.showConstructors,this.defaultValue.showConstructors),showDeprecated:Wn(n.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:Wn(n.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:Wn(n.showFields,this.defaultValue.showFields),showVariables:Wn(n.showVariables,this.defaultValue.showVariables),showClasses:Wn(n.showClasses,this.defaultValue.showClasses),showStructs:Wn(n.showStructs,this.defaultValue.showStructs),showInterfaces:Wn(n.showInterfaces,this.defaultValue.showInterfaces),showModules:Wn(n.showModules,this.defaultValue.showModules),showProperties:Wn(n.showProperties,this.defaultValue.showProperties),showEvents:Wn(n.showEvents,this.defaultValue.showEvents),showOperators:Wn(n.showOperators,this.defaultValue.showOperators),showUnits:Wn(n.showUnits,this.defaultValue.showUnits),showValues:Wn(n.showValues,this.defaultValue.showValues),showConstants:Wn(n.showConstants,this.defaultValue.showConstants),showEnums:Wn(n.showEnums,this.defaultValue.showEnums),showEnumMembers:Wn(n.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:Wn(n.showKeywords,this.defaultValue.showKeywords),showWords:Wn(n.showWords,this.defaultValue.showWords),showColors:Wn(n.showColors,this.defaultValue.showColors),showFiles:Wn(n.showFiles,this.defaultValue.showFiles),showReferences:Wn(n.showReferences,this.defaultValue.showReferences),showFolders:Wn(n.showFolders,this.defaultValue.showFolders),showTypeParameters:Wn(n.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:Wn(n.showSnippets,this.defaultValue.showSnippets),showUsers:Wn(n.showUsers,this.defaultValue.showUsers),showIssues:Wn(n.showIssues,this.defaultValue.showIssues)}}}class Hui extends Hs{constructor(){super(114,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:I("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:I("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:Wn(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:Wn(e.selectSubwords,this.defaultValue.selectSubwords)}}}class Wui extends Hs{constructor(){const e=[];super(131,"wordSegmenterLocales",e,{anyOf:[{description:I("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"string"},{description:I("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"array",items:{type:"string"}}]})}validate(e){if(typeof e=="string"&&(e=[e]),Array.isArray(e)){const n=[];for(const i of e)if(typeof i=="string")try{Intl.Segmenter.supportedLocalesOf(i).length>0&&n.push(i)}catch{}return n}return this.defaultValue}}class Uui extends Hs{constructor(){super(139,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[I("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),I("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),I("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),I("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:I("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,n,i){return n.get(2)===2?0:i}}class Kui extends hq{constructor(){super(147)}compute(e,n,i){const r=n.get(146);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:r.isWordWrapMinified,isViewportWrapping:r.isViewportWrapping,wrappingColumn:r.wrappingColumn}}}class qui extends Hs{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:I("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down the `Shift` key (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:I("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[I("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),I("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e;return{enabled:Wn(n.enabled,this.defaultValue.enabled),showDropSelector:wa(n.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}class Gui extends Hs{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(85,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:I("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:I("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[I("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),I("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const n=e;return{enabled:Wn(n.enabled,this.defaultValue.enabled),showPasteSelector:wa(n.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}const Yui="Consolas, 'Courier New', monospace",Xui="Menlo, Monaco, 'Courier New', monospace",Zui="'Droid Sans Mono', 'monospace', monospace",Rh={fontFamily:xr?Xui:$h?Zui:Yui,fontWeight:"normal",fontSize:xr?12:14,lineHeight:0,letterSpacing:0},a4=[];function Qt(t){return a4[t.id]=t,t}const l_={acceptSuggestionOnCommitCharacter:Qt(new Ur(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:I("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:Qt(new xa(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",I("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:I("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:Qt(new cui),accessibilityPageSize:Qt(new ss(3,"accessibilityPageSize",10,1,1073741824,{description:I("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:Qt(new Bd(4,"ariaLabel",I("editorViewAccessibleLabel","Editor content"))),ariaRequired:Qt(new Ur(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:Qt(new Ur(8,"screenReaderAnnounceInlineSuggestion",!0,{description:I("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:Qt(new xa(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",I("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),I("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:I("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:Qt(new xa(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",I("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),I("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:I("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:Qt(new xa(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",I("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:I("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:Qt(new xa(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",I("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:I("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:Qt(new xa(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",I("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),I("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:I("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:Qt(new sQ(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],lui,{enumDescriptions:[I("editor.autoIndent.none","The editor will not insert indentation automatically."),I("editor.autoIndent.keep","The editor will keep the current line's indentation."),I("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),I("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),I("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:I("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:Qt(new Ur(13,"automaticLayout",!1)),autoSurround:Qt(new xa(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[I("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),I("editor.autoSurround.quotes","Surround with quotes but not brackets."),I("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:I("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:Qt(new Vui),bracketPairGuides:Qt(new Bui),stickyTabStops:Qt(new Ur(117,"stickyTabStops",!1,{description:I("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:Qt(new Ur(17,"codeLens",!0,{description:I("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:Qt(new Bd(18,"codeLensFontFamily","",{description:I("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:Qt(new ss(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:I("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:Qt(new Ur(20,"colorDecorators",!0,{description:I("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:Qt(new xa(149,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[I("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),I("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),I("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:I("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:Qt(new ss(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:I("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:Qt(new Ur(22,"columnSelection",!1,{description:I("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:Qt(new uui),contextmenu:Qt(new Ur(24,"contextmenu",!0)),copyWithSyntaxHighlighting:Qt(new Ur(25,"copyWithSyntaxHighlighting",!0,{description:I("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:Qt(new sQ(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],dui,{description:I("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:Qt(new xa(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[I("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),I("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),I("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:I("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:Qt(new sQ(28,"cursorStyle",Qc.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],hui,{description:I("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:Qt(new ss(29,"cursorSurroundingLines",0,0,1073741824,{description:I("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:Qt(new xa(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[I("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),I("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:I("cursorSurroundingLinesStyle","Controls when `#editor.cursorSurroundingLines#` should be enforced.")})),cursorWidth:Qt(new ss(31,"cursorWidth",0,0,1073741824,{markdownDescription:I("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:Qt(new Ur(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:Qt(new Ur(33,"disableMonospaceOptimizations",!1)),domReadOnly:Qt(new Ur(34,"domReadOnly",!1)),dragAndDrop:Qt(new Ur(35,"dragAndDrop",!0,{description:I("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:Qt(new mui),dropIntoEditor:Qt(new qui),stickyScroll:Qt(new wui),experimentalWhitespaceRendering:Qt(new xa(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[I("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),I("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),I("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:I("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:Qt(new Bd(39,"extraEditorClassName","")),fastScrollSensitivity:Qt(new _p(40,"fastScrollSensitivity",5,t=>t<=0?5:t,{markdownDescription:I("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:Qt(new pui),fixedOverflowWidgets:Qt(new Ur(42,"fixedOverflowWidgets",!1)),folding:Qt(new Ur(43,"folding",!0,{description:I("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:Qt(new xa(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[I("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),I("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:I("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:Qt(new Ur(45,"foldingHighlight",!0,{description:I("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:Qt(new Ur(46,"foldingImportsByDefault",!1,{description:I("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:Qt(new ss(47,"foldingMaximumRegions",5e3,10,65e3,{description:I("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:Qt(new Ur(48,"unfoldOnClickAfterEndOfLine",!1,{description:I("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:Qt(new Bd(49,"fontFamily",Rh.fontFamily,{description:I("fontFamily","Controls the font family.")})),fontInfo:Qt(new gui),fontLigatures2:Qt(new sk),fontSize:Qt(new bui),fontWeight:Qt(new fMe),fontVariations:Qt(new bH),formatOnPaste:Qt(new Ur(55,"formatOnPaste",!1,{description:I("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:Qt(new Ur(56,"formatOnType",!1,{description:I("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:Qt(new Ur(57,"glyphMargin",!0,{description:I("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:Qt(new vui),hideCursorInOverviewRuler:Qt(new Ur(59,"hideCursorInOverviewRuler",!1,{description:I("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:Qt(new yui),inDiffEditor:Qt(new Ur(61,"inDiffEditor",!1)),letterSpacing:Qt(new _p(64,"letterSpacing",Rh.letterSpacing,t=>_p.clamp(t,-5,20),{description:I("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:Qt(new xui),lineDecorationsWidth:Qt(new Sui),lineHeight:Qt(new Nui),lineNumbers:Qt(new Aui),lineNumbersMinChars:Qt(new ss(69,"lineNumbersMinChars",5,1,300)),linkedEditing:Qt(new Ur(70,"linkedEditing",!1,{description:I("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:Qt(new Ur(71,"links",!0,{description:I("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:Qt(new xa(72,"matchBrackets","always",["always","near","never"],{description:I("matchBrackets","Highlight matching brackets.")})),minimap:Qt(new Eui),mouseStyle:Qt(new xa(74,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Qt(new _p(75,"mouseWheelScrollSensitivity",1,t=>t===0?1:t,{markdownDescription:I("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:Qt(new Ur(76,"mouseWheelZoom",!1,{markdownDescription:xr?I("mouseWheelZoom.mac","Zoom the font of the editor when using mouse wheel and holding `Cmd`."):I("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:Qt(new Ur(77,"multiCursorMergeOverlapping",!0,{description:I("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:Qt(new sQ(78,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],Dui,{markdownEnumDescriptions:[I("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),I("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:I({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:Qt(new xa(79,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[I("multiCursorPaste.spread","Each cursor pastes a single line of the text."),I("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:I("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:Qt(new ss(80,"multiCursorLimit",1e4,1,1e5,{markdownDescription:I("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:Qt(new xa(81,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[I("occurrencesHighlight.off","Does not highlight occurrences."),I("occurrencesHighlight.singleFile","Highlights occurrences only in the current file."),I("occurrencesHighlight.multiFile","Experimental: Highlights occurrences across all valid open files.")],markdownDescription:I("occurrencesHighlight","Controls whether occurrences should be highlighted across open files.")})),overviewRulerBorder:Qt(new Ur(82,"overviewRulerBorder",!0,{description:I("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:Qt(new ss(83,"overviewRulerLanes",3,0,3)),padding:Qt(new kui),pasteAs:Qt(new Gui),parameterHints:Qt(new Mui),peekWidgetDefaultFocus:Qt(new xa(87,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[I("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),I("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:I("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),placeholder:Qt(new Tui),definitionLinkOpensInPeek:Qt(new Ur(89,"definitionLinkOpensInPeek",!1,{description:I("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:Qt(new Iui),quickSuggestionsDelay:Qt(new ss(91,"quickSuggestionsDelay",10,0,1073741824,{description:I("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:Qt(new Ur(92,"readOnly",!1)),readOnlyMessage:Qt(new Pui),renameOnType:Qt(new Ur(94,"renameOnType",!1,{description:I("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:I("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:Qt(new Ur(95,"renderControlCharacters",!0,{description:I("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:Qt(new xa(96,"renderFinalNewline",$h?"dimmed":"on",["off","on","dimmed"],{description:I("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:Qt(new xa(97,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",I("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:I("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:Qt(new Ur(98,"renderLineHighlightOnlyWhenFocus",!1,{description:I("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:Qt(new xa(99,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Qt(new xa(100,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",I("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),I("renderWhitespace.selection","Render whitespace characters only on selected text."),I("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:I("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:Qt(new ss(101,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:Qt(new Ur(102,"roundedSelection",!0,{description:I("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:Qt(new Rui),scrollbar:Qt(new Oui),scrollBeyondLastColumn:Qt(new ss(105,"scrollBeyondLastColumn",4,0,1073741824,{description:I("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:Qt(new Ur(106,"scrollBeyondLastLine",!0,{description:I("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:Qt(new Ur(107,"scrollPredominantAxis",!0,{description:I("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:Qt(new Ur(108,"selectionClipboard",!0,{description:I("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:$h})),selectionHighlight:Qt(new Ur(109,"selectionHighlight",!0,{description:I("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:Qt(new Ur(110,"selectOnLineNumbers",!0)),showFoldingControls:Qt(new xa(111,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[I("showFoldingControls.always","Always show the folding controls."),I("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),I("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:I("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:Qt(new Ur(112,"showUnused",!0,{description:I("showUnused","Controls fading out of unused code.")})),showDeprecated:Qt(new Ur(141,"showDeprecated",!0,{description:I("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:Qt(new Cui),snippetSuggestions:Qt(new xa(113,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[I("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),I("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),I("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),I("snippetSuggestions.none","Do not show snippet suggestions.")],description:I("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:Qt(new Hui),smoothScrolling:Qt(new Ur(115,"smoothScrolling",!1,{description:I("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:Qt(new ss(118,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Qt(new zui),inlineSuggest:Qt(new Fui),inlineEdit:Qt(new $ui),inlineCompletionsAccessibilityVerbose:Qt(new Ur(150,"inlineCompletionsAccessibilityVerbose",!1,{description:I("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:Qt(new ss(120,"suggestFontSize",0,0,1e3,{markdownDescription:I("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:Qt(new ss(121,"suggestLineHeight",0,0,1e3,{markdownDescription:I("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:Qt(new Ur(122,"suggestOnTriggerCharacters",!0,{description:I("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:Qt(new xa(123,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[I("suggestSelection.first","Always select the first suggestion."),I("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),I("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:I("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:Qt(new xa(124,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[I("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),I("tabCompletion.off","Disable tab completions."),I("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:I("tabCompletion","Enables tab completions.")})),tabIndex:Qt(new ss(125,"tabIndex",0,-1,1073741824)),unicodeHighlight:Qt(new jui),unusualLineTerminators:Qt(new xa(127,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[I("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),I("unusualLineTerminators.off","Unusual line terminators are ignored."),I("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:I("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:Qt(new Ur(128,"useShadowDOM",!0)),useTabStops:Qt(new Ur(129,"useTabStops",!0,{description:I("useTabStops","Spaces and tabs are inserted and deleted in alignment with tab stops.")})),wordBreak:Qt(new xa(130,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[I("wordBreak.normal","Use the default line break rule."),I("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:I("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSegmenterLocales:Qt(new Wui),wordSeparators:Qt(new Bd(132,"wordSeparators",BOt,{description:I("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:Qt(new xa(133,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[I("wordWrap.off","Lines will never wrap."),I("wordWrap.on","Lines will wrap at the viewport width."),I({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),I({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:I({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:Qt(new Bd(134,"wordWrapBreakAfterCharacters"," 	})]?|/&.,;¢°′″‰℃、。｡､￠，．：；？！％・･ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ｧｨｩｪｫｬｭｮｯｰ”〉》」』】〕）］｝｣")),wordWrapBreakBeforeCharacters:Qt(new Bd(135,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔（［｛｢£¥＄￡￥+＋")),wordWrapColumn:Qt(new ss(136,"wordWrapColumn",80,1,1073741824,{markdownDescription:I({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:Qt(new xa(137,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Qt(new xa(138,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:Qt(new fui),defaultColorDecorators:Qt(new Ur(148,"defaultColorDecorators",!1,{markdownDescription:I("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:Qt(new Lui),tabFocusMode:Qt(new Ur(145,"tabFocusMode",!1,{markdownDescription:I("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:Qt(new p3),wrappingInfo:Qt(new Kui),wrappingIndent:Qt(new Uui),wrappingStrategy:Qt(new _ui)};class Qui{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?t5.isErrorNoTelemetry(e)?new t5(e.message+`

`+e.stack):new Error(e.message+`

`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const UOt=new Qui;function ji(t){yb(t)||UOt.onUnexpectedError(t)}function $a(t){yb(t)||UOt.onUnexpectedExternalError(t)}function Lot(t){if(t instanceof Error){const{name:e,message:n}=t,i=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:i,noTelemetry:t5.isErrorNoTelemetry(t)}}return t}const Iie="Canceled";function yb(t){return t instanceof Mv?!0:t instanceof Error&&t.name===Iie&&t.message===Iie}class Mv extends Error{constructor(){super(Iie),this.name=this.message}}function Jui(){const t=new Error(Iie);return t.name=t.message,t}function Jg(t){return t?new Error(`Illegal argument: ${t}`):new Error("Illegal argument")}function f8e(t){return t?new Error(`Illegal state: ${t}`):new Error("Illegal state")}class edi extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class t5 extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof t5)return e;const n=new t5;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class co extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,co.prototype)}}function ak(t,e){const n=this;let i=!1,r;return function(){return i||(i=!0,r=t.apply(n,arguments)),r}}function kfe(t){return typeof t=="object"&&t!==null&&typeof t.dispose=="function"&&t.dispose.length===0}function Jo(t){if(Ir.is(t)){const e=[];for(const n of t)if(n)try{n.dispose()}catch(i){e.push(i)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function yv(...t){return Kn(()=>Jo(t))}function Kn(t){return{dispose:ak(()=>{t()})}}const Dle=class Dle{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Jo(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Dle.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&this._toDispose.delete(e)}};Dle.DISABLE_DISPOSED_WARNING=!1;let Lt=Dle;const UWe=class UWe{constructor(){this._store=new Lt,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};UWe.None=Object.freeze({dispose(){}});let ct=UWe;class mc{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var n;this._isDisposed||e===this._value||((n=this._value)==null||n.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)==null||e.dispose(),this._value=void 0}}class tdi{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}class ndi{constructor(e){this.object=e}dispose(){}}class m8e{constructor(){this._store=new Map,this._isDisposed=!1}dispose(){this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{Jo(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,n,i=!1){var r;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),i||(r=this._store.get(e))==null||r.dispose(),this._store.set(e,n)}deleteAndDispose(e){var n;(n=this._store.get(e))==null||n.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}const idi=globalThis.performance&&typeof globalThis.performance.now=="function";class cu{static create(e){return new cu(e)}constructor(e){this._now=idi&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}var rn;(function(t){t.None=()=>ct.None;function e(R,P){return d(R,()=>{},0,void 0,!0,void 0,P)}t.defer=e;function n(R){return(P,O=null,V)=>{let F=!1,$;return $=R(B=>{if(!F)return $?$.dispose():F=!0,P.call(O,B)},null,V),F&&$.dispose(),$}}t.once=n;function i(R,P,O){return c((V,F=null,$)=>R(B=>V.call(F,P(B)),null,$),O)}t.map=i;function r(R,P,O){return c((V,F=null,$)=>R(B=>{P(B),V.call(F,B)},null,$),O)}t.forEach=r;function o(R,P,O){return c((V,F=null,$)=>R(B=>P(B)&&V.call(F,B),null,$),O)}t.filter=o;function s(R){return R}t.signal=s;function a(...R){return(P,O=null,V)=>{const F=yv(...R.map($=>$(B=>P.call(O,B))));return u(F,V)}}t.any=a;function l(R,P,O,V){let F=O;return i(R,$=>(F=P(F,$),F),V)}t.reduce=l;function c(R,P){let O;const V={onWillAddFirstListener(){O=R(F.fire,F)},onDidRemoveLastListener(){O==null||O.dispose()}},F=new st(V);return P==null||P.add(F),F.event}function u(R,P){return P instanceof Array?P.push(R):P&&P.add(R),R}function d(R,P,O=100,V=!1,F=!1,$,B){let z,H,K,q=0,U;const Y={leakWarningThreshold:$,onWillAddFirstListener(){z=R(ae=>{q++,H=P(H,ae),V&&!K&&(J.fire(H),H=void 0),U=()=>{const se=H;H=void 0,K=void 0,(!V||q>1)&&J.fire(se),q=0},typeof O=="number"?(clearTimeout(K),K=setTimeout(U,O)):K===void 0&&(K=0,queueMicrotask(U))})},onWillRemoveListener(){F&&q>0&&(U==null||U())},onDidRemoveLastListener(){U=void 0,z.dispose()}},J=new st(Y);return B==null||B.add(J),J.event}t.debounce=d;function h(R,P=0,O){return t.debounce(R,(V,F)=>V?(V.push(F),V):[F],P,void 0,!0,void 0,O)}t.accumulate=h;function f(R,P=(V,F)=>V===F,O){let V=!0,F;return o(R,$=>{const B=V||!P($,F);return V=!1,F=$,B},O)}t.latch=f;function m(R,P,O){return[t.filter(R,P,O),t.filter(R,V=>!P(V),O)]}t.split=m;function p(R,P=!1,O=[],V){let F=O.slice(),$=R(H=>{F?F.push(H):z.fire(H)});V&&V.add($);const B=()=>{F==null||F.forEach(H=>z.fire(H)),F=null},z=new st({onWillAddFirstListener(){$||($=R(H=>z.fire(H)),V&&V.add($))},onDidAddFirstListener(){F&&(P?setTimeout(B):B())},onDidRemoveLastListener(){$&&$.dispose(),$=null}});return V&&V.add(z),z.event}t.buffer=p;function g(R,P){return(V,F,$)=>{const B=P(new _);return R(function(z){const H=B.evaluate(z);H!==y&&V.call(F,H)},void 0,$)}}t.chain=g;const y=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(P){return this.steps.push(P),this}forEach(P){return this.steps.push(O=>(P(O),O)),this}filter(P){return this.steps.push(O=>P(O)?O:y),this}reduce(P,O){let V=O;return this.steps.push(F=>(V=P(V,F),V)),this}latch(P=(O,V)=>O===V){let O=!0,V;return this.steps.push(F=>{const $=O||!P(F,V);return O=!1,V=F,$?F:y}),this}evaluate(P){for(const O of this.steps)if(P=O(P),P===y)break;return P}}function w(R,P,O=V=>V){const V=(...z)=>B.fire(O(...z)),F=()=>R.on(P,V),$=()=>R.removeListener(P,V),B=new st({onWillAddFirstListener:F,onDidRemoveLastListener:$});return B.event}t.fromNodeEventEmitter=w;function C(R,P,O=V=>V){const V=(...z)=>B.fire(O(...z)),F=()=>R.addEventListener(P,V),$=()=>R.removeEventListener(P,V),B=new st({onWillAddFirstListener:F,onDidRemoveLastListener:$});return B.event}t.fromDOMEventEmitter=C;function N(R){return new Promise(P=>n(R)(P))}t.toPromise=N;function E(R){const P=new st;return R.then(O=>{P.fire(O)},()=>{P.fire(void 0)}).finally(()=>{P.dispose()}),P.event}t.fromPromise=E;function D(R,P){return R(O=>P.fire(O))}t.forward=D;function k(R,P,O){return P(O),R(V=>P(V))}t.runAndSubscribe=k;class M{constructor(P,O){this._observable=P,this._counter=0,this._hasChanged=!1;const V={onWillAddFirstListener:()=>{P.addObserver(this)},onDidRemoveLastListener:()=>{P.removeObserver(this)}};this.emitter=new st(V),O&&O.add(this.emitter)}beginUpdate(P){this._counter++}handlePossibleChange(P){}handleChange(P,O){this._hasChanged=!0}endUpdate(P){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function T(R,P){return new M(R,P).emitter.event}t.fromObservable=T;function A(R){return(P,O,V)=>{let F=0,$=!1;const B={beginUpdate(){F++},endUpdate(){F--,F===0&&(R.reportChanges(),$&&($=!1,P.call(O)))},handlePossibleChange(){},handleChange(){$=!0}};R.addObserver(B),R.reportChanges();const z={dispose(){R.removeObserver(B)}};return V instanceof Lt?V.add(z):Array.isArray(V)&&V.push(z),z}}t.fromObservableLight=A})(rn||(rn={}));const F4=class F4{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${F4._idPool++}`,F4.all.add(this)}start(e){this._stopWatch=new cu,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};F4.all=new Set,F4._idPool=0;let mMe=F4,rdi=-1;const kle=class kle{constructor(e,n,i=(kle._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=n,this.name=i,this._warnCountdown=0}dispose(){var e;(e=this._stacks)==null||e.clear()}check(e,n){const i=this.threshold;if(i<=0||n<i)return;this._stacks||(this._stacks=new Map);const r=this._stacks.get(e.value)||0;if(this._stacks.set(e.value,r+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=i*.5;const[o,s]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${s}):`;console.warn(a),console.warn(o);const l=new odi(a,o);this._errorHandler(l)}return()=>{const o=this._stacks.get(e.value)||0;this._stacks.set(e.value,o-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,n=0;for(const[i,r]of this._stacks)(!e||n<r)&&(e=[i,r],n=r);return e}};kle._idPool=1;let pMe=kle;class p8e{static create(){const e=new Error;return new p8e(e.stack??"")}constructor(e){this.value=e}print(){console.warn(this.value.split(`
`).slice(2).join(`
`))}}class odi extends Error{constructor(e,n){super(e),this.name="ListenerLeakError",this.stack=n}}class sdi extends Error{constructor(e,n){super(e),this.name="ListenerRefusalError",this.stack=n}}class vwe{constructor(e){this.value=e}}const adi=2;let st=class{constructor(e){var n,i,r,o;this._size=0,this._options=e,this._leakageMon=(n=this._options)!=null&&n.leakWarningThreshold?new pMe((e==null?void 0:e.onListenerError)??ji,((i=this._options)==null?void 0:i.leakWarningThreshold)??rdi):void 0,this._perfMon=(r=this._options)!=null&&r._profName?new mMe(this._options._profName):void 0,this._deliveryQueue=(o=this._options)==null?void 0:o.deliveryQueue}dispose(){var e,n,i,r;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)==null?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(i=(n=this._options)==null?void 0:n.onDidRemoveLastListener)==null||i.call(n),(r=this._leakageMon)==null||r.dispose())}get event(){return this._event??(this._event=(e,n,i)=>{var a,l,c,u,d;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const h=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(h);const f=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],m=new sdi(`${h}. HINT: Stack shows most frequent listener (${f[1]}-times)`,f[0]);return(((a=this._options)==null?void 0:a.onListenerError)||ji)(m),ct.None}if(this._disposed)return ct.None;n&&(e=e.bind(n));const r=new vwe(e);let o;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=p8e.create(),o=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof vwe?(this._deliveryQueue??(this._deliveryQueue=new KOt),this._listeners=[this._listeners,r]):this._listeners.push(r):((c=(l=this._options)==null?void 0:l.onWillAddFirstListener)==null||c.call(l,this),this._listeners=r,(d=(u=this._options)==null?void 0:u.onDidAddFirstListener)==null||d.call(u,this)),this._size++;const s=Kn(()=>{o==null||o(),this._removeListener(r)});return i instanceof Lt?i.add(s):Array.isArray(i)&&i.push(s),s}),this._event}_removeListener(e){var o,s,a,l;if((s=(o=this._options)==null?void 0:o.onWillRemoveListener)==null||s.call(o,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(l=(a=this._options)==null?void 0:a.onDidRemoveLastListener)==null||l.call(a,this),this._size=0;return}const n=this._listeners,i=n.indexOf(e);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[i]=void 0;const r=this._deliveryQueue.current===this;if(this._size*adi<=n.length){let c=0;for(let u=0;u<n.length;u++)n[u]?n[c++]=n[u]:r&&(this._deliveryQueue.end--,c<this._deliveryQueue.i&&this._deliveryQueue.i--);n.length=c}}_deliver(e,n){var r;if(!e)return;const i=((r=this._options)==null?void 0:r.onListenerError)||ji;if(!i){e.value(n);return}try{e.value(n)}catch(o){i(o)}}_deliverQueue(e){const n=e.current._listeners;for(;e.i<e.end;)this._deliver(n[e.i++],e.value);e.reset()}fire(e){var n,i,r,o;if((n=this._deliveryQueue)!=null&&n.current&&(this._deliverQueue(this._deliveryQueue),(i=this._perfMon)==null||i.stop()),(r=this._perfMon)==null||r.start(this._size),this._listeners)if(this._listeners instanceof vwe)this._deliver(this._listeners,e);else{const s=this._deliveryQueue;s.enqueue(this,e,this._listeners.length),this._deliverQueue(s)}(o=this._perfMon)==null||o.stop()}hasListeners(){return this._size>0}};const ldi=()=>new KOt;class KOt{constructor(){this.i=-1,this.end=0}enqueue(e,n,i){this.i=0,this.end=i,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class V2 extends st{constructor(e){super(e),this._isPaused=0,this._eventQueue=new Ch,this._mergeFn=e==null?void 0:e.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}}class qOt extends V2{constructor(e){super(e),this._delay=e.delay??100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}}class cdi extends st{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e==null?void 0:e.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(n=>super.fire(n)),this._queuedEvents=[]}))}}class udi{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new st({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const n={event:e,listener:null};return this.events.push(n),this.hasListeners&&this.hook(n),Kn(ak(()=>{this.hasListeners&&this.unhook(n);const r=this.events.indexOf(n);this.events.splice(r,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(n=>this.emitter.fire(n))}unhook(e){var n;(n=e.listener)==null||n.dispose(),e.listener=null}dispose(){var e;this.emitter.dispose();for(const n of this.events)(e=n.listener)==null||e.dispose();this.events=[]}}class fq{constructor(){this.data=[]}wrapEvent(e,n,i){return(r,o,s)=>e(a=>{const l=this.data[this.data.length-1];if(!n){l?l.buffers.push(()=>r.call(o,a)):r.call(o,a);return}const c=l;if(!c){r.call(o,n(i,a));return}c.items??(c.items=[]),c.items.push(a),c.buffers.length===0&&l.buffers.push(()=>{c.reducedResult??(c.reducedResult=i?c.items.reduce(n,i):c.items.reduce(n)),r.call(o,c.reducedResult)})},void 0,s)}bufferEvents(e){const n={buffers:new Array};this.data.push(n);const i=e();return this.data.pop(),n.buffers.forEach(r=>r()),i}}class Tot{constructor(){this.listening=!1,this.inputEvent=rn.None,this.inputEventListener=ct.None,this.emitter=new st({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}const GOt=Object.freeze(function(t,e){const n=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(n)}}});var er;(function(t){function e(n){return n===t.None||n===t.Cancelled||n instanceof Zee?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:rn.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:GOt})})(er||(er={}));class Zee{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?GOt:(this._emitter||(this._emitter=new st),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}let oa=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Zee),this._token}cancel(){this._token?this._token instanceof Zee&&this._token.cancel():this._token=er.Cancelled}dispose(e=!1){var n;e&&this.cancel(),(n=this._parentListener)==null||n.dispose(),this._token?this._token instanceof Zee&&this._token.dispose():this._token=er.None}};function gMe(t){const e=new oa;return t.add({dispose(){e.cancel()}}),e.token}class g8e{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,n){this._keyCodeToStr[e]=n,this._strToKeyCode[n.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const Qee=new g8e,bMe=new g8e,vMe=new g8e,YOt=new Array(230),ddi=Object.create(null),hdi=Object.create(null),b8e=[];for(let t=0;t<=193;t++)b8e[t]=-1;(function(){const t="",e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",t,t],[1,1,"Hyper",0,t,0,t,t,t],[1,2,"Super",0,t,0,t,t,t],[1,3,"Fn",0,t,0,t,t,t],[1,4,"FnLock",0,t,0,t,t,t],[1,5,"Suspend",0,t,0,t,t,t],[1,6,"Resume",0,t,0,t,t,t],[1,7,"Turbo",0,t,0,t,t,t],[1,8,"Sleep",0,t,0,"VK_SLEEP",t,t],[1,9,"WakeUp",0,t,0,t,t,t],[0,10,"KeyA",31,"A",65,"VK_A",t,t],[0,11,"KeyB",32,"B",66,"VK_B",t,t],[0,12,"KeyC",33,"C",67,"VK_C",t,t],[0,13,"KeyD",34,"D",68,"VK_D",t,t],[0,14,"KeyE",35,"E",69,"VK_E",t,t],[0,15,"KeyF",36,"F",70,"VK_F",t,t],[0,16,"KeyG",37,"G",71,"VK_G",t,t],[0,17,"KeyH",38,"H",72,"VK_H",t,t],[0,18,"KeyI",39,"I",73,"VK_I",t,t],[0,19,"KeyJ",40,"J",74,"VK_J",t,t],[0,20,"KeyK",41,"K",75,"VK_K",t,t],[0,21,"KeyL",42,"L",76,"VK_L",t,t],[0,22,"KeyM",43,"M",77,"VK_M",t,t],[0,23,"KeyN",44,"N",78,"VK_N",t,t],[0,24,"KeyO",45,"O",79,"VK_O",t,t],[0,25,"KeyP",46,"P",80,"VK_P",t,t],[0,26,"KeyQ",47,"Q",81,"VK_Q",t,t],[0,27,"KeyR",48,"R",82,"VK_R",t,t],[0,28,"KeyS",49,"S",83,"VK_S",t,t],[0,29,"KeyT",50,"T",84,"VK_T",t,t],[0,30,"KeyU",51,"U",85,"VK_U",t,t],[0,31,"KeyV",52,"V",86,"VK_V",t,t],[0,32,"KeyW",53,"W",87,"VK_W",t,t],[0,33,"KeyX",54,"X",88,"VK_X",t,t],[0,34,"KeyY",55,"Y",89,"VK_Y",t,t],[0,35,"KeyZ",56,"Z",90,"VK_Z",t,t],[0,36,"Digit1",22,"1",49,"VK_1",t,t],[0,37,"Digit2",23,"2",50,"VK_2",t,t],[0,38,"Digit3",24,"3",51,"VK_3",t,t],[0,39,"Digit4",25,"4",52,"VK_4",t,t],[0,40,"Digit5",26,"5",53,"VK_5",t,t],[0,41,"Digit6",27,"6",54,"VK_6",t,t],[0,42,"Digit7",28,"7",55,"VK_7",t,t],[0,43,"Digit8",29,"8",56,"VK_8",t,t],[0,44,"Digit9",30,"9",57,"VK_9",t,t],[0,45,"Digit0",21,"0",48,"VK_0",t,t],[1,46,"Enter",3,"Enter",13,"VK_RETURN",t,t],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",t,t],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",t,t],[1,49,"Tab",2,"Tab",9,"VK_TAB",t,t],[1,50,"Space",10,"Space",32,"VK_SPACE",t,t],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,t,0,t,t,t],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",t,t],[1,64,"F1",59,"F1",112,"VK_F1",t,t],[1,65,"F2",60,"F2",113,"VK_F2",t,t],[1,66,"F3",61,"F3",114,"VK_F3",t,t],[1,67,"F4",62,"F4",115,"VK_F4",t,t],[1,68,"F5",63,"F5",116,"VK_F5",t,t],[1,69,"F6",64,"F6",117,"VK_F6",t,t],[1,70,"F7",65,"F7",118,"VK_F7",t,t],[1,71,"F8",66,"F8",119,"VK_F8",t,t],[1,72,"F9",67,"F9",120,"VK_F9",t,t],[1,73,"F10",68,"F10",121,"VK_F10",t,t],[1,74,"F11",69,"F11",122,"VK_F11",t,t],[1,75,"F12",70,"F12",123,"VK_F12",t,t],[1,76,"PrintScreen",0,t,0,t,t,t],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",t,t],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",t,t],[1,79,"Insert",19,"Insert",45,"VK_INSERT",t,t],[1,80,"Home",14,"Home",36,"VK_HOME",t,t],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",t,t],[1,82,"Delete",20,"Delete",46,"VK_DELETE",t,t],[1,83,"End",13,"End",35,"VK_END",t,t],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",t,t],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",t],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",t],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",t],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",t],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",t,t],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",t,t],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",t,t],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",t,t],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",t,t],[1,94,"NumpadEnter",3,t,0,t,t,t],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",t,t],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",t,t],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",t,t],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",t,t],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",t,t],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",t,t],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",t,t],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",t,t],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",t,t],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",t,t],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",t,t],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",t,t],[1,107,"ContextMenu",58,"ContextMenu",93,t,t,t],[1,108,"Power",0,t,0,t,t,t],[1,109,"NumpadEqual",0,t,0,t,t,t],[1,110,"F13",71,"F13",124,"VK_F13",t,t],[1,111,"F14",72,"F14",125,"VK_F14",t,t],[1,112,"F15",73,"F15",126,"VK_F15",t,t],[1,113,"F16",74,"F16",127,"VK_F16",t,t],[1,114,"F17",75,"F17",128,"VK_F17",t,t],[1,115,"F18",76,"F18",129,"VK_F18",t,t],[1,116,"F19",77,"F19",130,"VK_F19",t,t],[1,117,"F20",78,"F20",131,"VK_F20",t,t],[1,118,"F21",79,"F21",132,"VK_F21",t,t],[1,119,"F22",80,"F22",133,"VK_F22",t,t],[1,120,"F23",81,"F23",134,"VK_F23",t,t],[1,121,"F24",82,"F24",135,"VK_F24",t,t],[1,122,"Open",0,t,0,t,t,t],[1,123,"Help",0,t,0,t,t,t],[1,124,"Select",0,t,0,t,t,t],[1,125,"Again",0,t,0,t,t,t],[1,126,"Undo",0,t,0,t,t,t],[1,127,"Cut",0,t,0,t,t,t],[1,128,"Copy",0,t,0,t,t,t],[1,129,"Paste",0,t,0,t,t,t],[1,130,"Find",0,t,0,t,t,t],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",t,t],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",t,t],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",t,t],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",t,t],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",t,t],[1,136,"KanaMode",0,t,0,t,t,t],[0,137,"IntlYen",0,t,0,t,t,t],[1,138,"Convert",0,t,0,t,t,t],[1,139,"NonConvert",0,t,0,t,t,t],[1,140,"Lang1",0,t,0,t,t,t],[1,141,"Lang2",0,t,0,t,t,t],[1,142,"Lang3",0,t,0,t,t,t],[1,143,"Lang4",0,t,0,t,t,t],[1,144,"Lang5",0,t,0,t,t,t],[1,145,"Abort",0,t,0,t,t,t],[1,146,"Props",0,t,0,t,t,t],[1,147,"NumpadParenLeft",0,t,0,t,t,t],[1,148,"NumpadParenRight",0,t,0,t,t,t],[1,149,"NumpadBackspace",0,t,0,t,t,t],[1,150,"NumpadMemoryStore",0,t,0,t,t,t],[1,151,"NumpadMemoryRecall",0,t,0,t,t,t],[1,152,"NumpadMemoryClear",0,t,0,t,t,t],[1,153,"NumpadMemoryAdd",0,t,0,t,t,t],[1,154,"NumpadMemorySubtract",0,t,0,t,t,t],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",t,t],[1,156,"NumpadClearEntry",0,t,0,t,t,t],[1,0,t,5,"Ctrl",17,"VK_CONTROL",t,t],[1,0,t,4,"Shift",16,"VK_SHIFT",t,t],[1,0,t,6,"Alt",18,"VK_MENU",t,t],[1,0,t,57,"Meta",91,"VK_COMMAND",t,t],[1,157,"ControlLeft",5,t,0,"VK_LCONTROL",t,t],[1,158,"ShiftLeft",4,t,0,"VK_LSHIFT",t,t],[1,159,"AltLeft",6,t,0,"VK_LMENU",t,t],[1,160,"MetaLeft",57,t,0,"VK_LWIN",t,t],[1,161,"ControlRight",5,t,0,"VK_RCONTROL",t,t],[1,162,"ShiftRight",4,t,0,"VK_RSHIFT",t,t],[1,163,"AltRight",6,t,0,"VK_RMENU",t,t],[1,164,"MetaRight",57,t,0,"VK_RWIN",t,t],[1,165,"BrightnessUp",0,t,0,t,t,t],[1,166,"BrightnessDown",0,t,0,t,t,t],[1,167,"MediaPlay",0,t,0,t,t,t],[1,168,"MediaRecord",0,t,0,t,t,t],[1,169,"MediaFastForward",0,t,0,t,t,t],[1,170,"MediaRewind",0,t,0,t,t,t],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",t,t],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",t,t],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",t,t],[1,174,"Eject",0,t,0,t,t,t],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",t,t],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",t,t],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",t,t],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",t,t],[1,179,"LaunchApp1",0,t,0,"VK_MEDIA_LAUNCH_APP1",t,t],[1,180,"SelectTask",0,t,0,t,t,t],[1,181,"LaunchScreenSaver",0,t,0,t,t,t],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",t,t],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",t,t],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",t,t],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",t,t],[1,186,"BrowserStop",0,t,0,"VK_BROWSER_STOP",t,t],[1,187,"BrowserRefresh",0,t,0,"VK_BROWSER_REFRESH",t,t],[1,188,"BrowserFavorites",0,t,0,"VK_BROWSER_FAVORITES",t,t],[1,189,"ZoomToggle",0,t,0,t,t,t],[1,190,"MailReply",0,t,0,t,t,t],[1,191,"MailForward",0,t,0,t,t,t],[1,192,"MailSend",0,t,0,t,t,t],[1,0,t,114,"KeyInComposition",229,t,t,t],[1,0,t,116,"ABNT_C2",194,"VK_ABNT_C2",t,t],[1,0,t,96,"OEM_8",223,"VK_OEM_8",t,t],[1,0,t,0,t,0,"VK_KANA",t,t],[1,0,t,0,t,0,"VK_HANGUL",t,t],[1,0,t,0,t,0,"VK_JUNJA",t,t],[1,0,t,0,t,0,"VK_FINAL",t,t],[1,0,t,0,t,0,"VK_HANJA",t,t],[1,0,t,0,t,0,"VK_KANJI",t,t],[1,0,t,0,t,0,"VK_CONVERT",t,t],[1,0,t,0,t,0,"VK_NONCONVERT",t,t],[1,0,t,0,t,0,"VK_ACCEPT",t,t],[1,0,t,0,t,0,"VK_MODECHANGE",t,t],[1,0,t,0,t,0,"VK_SELECT",t,t],[1,0,t,0,t,0,"VK_PRINT",t,t],[1,0,t,0,t,0,"VK_EXECUTE",t,t],[1,0,t,0,t,0,"VK_SNAPSHOT",t,t],[1,0,t,0,t,0,"VK_HELP",t,t],[1,0,t,0,t,0,"VK_APPS",t,t],[1,0,t,0,t,0,"VK_PROCESSKEY",t,t],[1,0,t,0,t,0,"VK_PACKET",t,t],[1,0,t,0,t,0,"VK_DBE_SBCSCHAR",t,t],[1,0,t,0,t,0,"VK_DBE_DBCSCHAR",t,t],[1,0,t,0,t,0,"VK_ATTN",t,t],[1,0,t,0,t,0,"VK_CRSEL",t,t],[1,0,t,0,t,0,"VK_EXSEL",t,t],[1,0,t,0,t,0,"VK_EREOF",t,t],[1,0,t,0,t,0,"VK_PLAY",t,t],[1,0,t,0,t,0,"VK_ZOOM",t,t],[1,0,t,0,t,0,"VK_NONAME",t,t],[1,0,t,0,t,0,"VK_PA1",t,t],[1,0,t,0,t,0,"VK_OEM_CLEAR",t,t]],n=[],i=[];for(const r of e){const[o,s,a,l,c,u,d,h,f]=r;if(i[s]||(i[s]=!0,ddi[a]=s,hdi[a.toLowerCase()]=s,o&&(b8e[s]=l)),!n[l]){if(n[l]=!0,!c)throw new Error(`String representation missing for key code ${l} around scan code ${a}`);Qee.define(l,c),bMe.define(l,h||c),vMe.define(l,f||h||c)}u&&(YOt[u]=l)}})();var Z1;(function(t){function e(a){return Qee.keyCodeToStr(a)}t.toString=e;function n(a){return Qee.strToKeyCode(a)}t.fromString=n;function i(a){return bMe.keyCodeToStr(a)}t.toUserSettingsUS=i;function r(a){return vMe.keyCodeToStr(a)}t.toUserSettingsGeneral=r;function o(a){return bMe.strToKeyCode(a)||vMe.strToKeyCode(a)}t.fromUserSettings=o;function s(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Qee.keyCodeToStr(a)}t.toElectronAccelerator=s})(Z1||(Z1={}));function Tl(t,e){const n=(e&65535)<<16>>>0;return(t|n)>>>0}var Iot={};let b3;const ywe=globalThis.vscode;if(typeof ywe<"u"&&typeof ywe.process<"u"){const t=ywe.process;b3={get platform(){return t.platform},get arch(){return t.arch},get env(){return t.env},cwd(){return t.cwd()}}}else typeof process<"u"?b3={get platform(){return process.platform},get arch(){return process.arch},get env(){return Iot},cwd(){return Iot.VSCODE_CWD||process.cwd()}}:b3={get platform(){return Fu?"win32":xr?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const Aie=b3.cwd,yMe=b3.env,fdi=b3.platform,mdi=65,pdi=97,gdi=90,bdi=122,mD=46,Pd=47,ep=92,ON=58,vdi=63;class XOt extends Error{constructor(e,n,i){let r;typeof n=="string"&&n.indexOf("not ")===0?(r="must not be",n=n.replace(/^not /,"")):r="must be";const o=e.indexOf(".")!==-1?"property":"argument";let s=`The "${e}" ${o} ${r} of type ${n}`;s+=`. Received type ${typeof i}`,super(s),this.code="ERR_INVALID_ARG_TYPE"}}function ydi(t,e){if(t===null||typeof t!="object")throw new XOt(e,"Object",t)}function Ec(t,e){if(typeof t!="string")throw new XOt(e,"string",t)}const tM=fdi==="win32";function Fo(t){return t===Pd||t===ep}function _Me(t){return t===Pd}function jN(t){return t>=mdi&&t<=gdi||t>=pdi&&t<=bdi}function Rie(t,e,n,i){let r="",o=0,s=-1,a=0,l=0;for(let c=0;c<=t.length;++c){if(c<t.length)l=t.charCodeAt(c);else{if(i(l))break;l=Pd}if(i(l)){if(!(s===c-1||a===1))if(a===2){if(r.length<2||o!==2||r.charCodeAt(r.length-1)!==mD||r.charCodeAt(r.length-2)!==mD){if(r.length>2){const u=r.lastIndexOf(n);u===-1?(r="",o=0):(r=r.slice(0,u),o=r.length-1-r.lastIndexOf(n)),s=c,a=0;continue}else if(r.length!==0){r="",o=0,s=c,a=0;continue}}e&&(r+=r.length>0?`${n}..`:"..",o=2)}else r.length>0?r+=`${n}${t.slice(s+1,c)}`:r=t.slice(s+1,c),o=c-s-1;s=c,a=0}else l===mD&&a!==-1?++a:a=-1}return r}function _di(t){return t?`${t[0]==="."?"":"."}${t}`:""}function ZOt(t,e){ydi(e,"pathObject");const n=e.dir||e.root,i=e.base||`${e.name||""}${_di(e.ext)}`;return n?n===e.root?`${n}${i}`:`${n}${t}${i}`:i}const gm={resolve(...t){let e="",n="",i=!1;for(let r=t.length-1;r>=-1;r--){let o;if(r>=0){if(o=t[r],Ec(o,`paths[${r}]`),o.length===0)continue}else e.length===0?o=Aie():(o=yMe[`=${e}`]||Aie(),(o===void 0||o.slice(0,2).toLowerCase()!==e.toLowerCase()&&o.charCodeAt(2)===ep)&&(o=`${e}\\`));const s=o.length;let a=0,l="",c=!1;const u=o.charCodeAt(0);if(s===1)Fo(u)&&(a=1,c=!0);else if(Fo(u))if(c=!0,Fo(o.charCodeAt(1))){let d=2,h=d;for(;d<s&&!Fo(o.charCodeAt(d));)d++;if(d<s&&d!==h){const f=o.slice(h,d);for(h=d;d<s&&Fo(o.charCodeAt(d));)d++;if(d<s&&d!==h){for(h=d;d<s&&!Fo(o.charCodeAt(d));)d++;(d===s||d!==h)&&(l=`\\\\${f}\\${o.slice(h,d)}`,a=d)}}}else a=1;else jN(u)&&o.charCodeAt(1)===ON&&(l=o.slice(0,2),a=2,s>2&&Fo(o.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(i){if(e.length>0)break}else if(n=`${o.slice(a)}\\${n}`,i=c,c&&e.length>0)break}return n=Rie(n,!i,"\\",Fo),i?`${e}\\${n}`:`${e}${n}`||"."},normalize(t){Ec(t,"path");const e=t.length;if(e===0)return".";let n=0,i,r=!1;const o=t.charCodeAt(0);if(e===1)return _Me(o)?"\\":t;if(Fo(o))if(r=!0,Fo(t.charCodeAt(1))){let a=2,l=a;for(;a<e&&!Fo(t.charCodeAt(a));)a++;if(a<e&&a!==l){const c=t.slice(l,a);for(l=a;a<e&&Fo(t.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&!Fo(t.charCodeAt(a));)a++;if(a===e)return`\\\\${c}\\${t.slice(l)}\\`;a!==l&&(i=`\\\\${c}\\${t.slice(l,a)}`,n=a)}}}else n=1;else jN(o)&&t.charCodeAt(1)===ON&&(i=t.slice(0,2),n=2,e>2&&Fo(t.charCodeAt(2))&&(r=!0,n=3));let s=n<e?Rie(t.slice(n),!r,"\\",Fo):"";return s.length===0&&!r&&(s="."),s.length>0&&Fo(t.charCodeAt(e-1))&&(s+="\\"),i===void 0?r?`\\${s}`:s:r?`${i}\\${s}`:`${i}${s}`},isAbsolute(t){Ec(t,"path");const e=t.length;if(e===0)return!1;const n=t.charCodeAt(0);return Fo(n)||e>2&&jN(n)&&t.charCodeAt(1)===ON&&Fo(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,n;for(let o=0;o<t.length;++o){const s=t[o];Ec(s,"path"),s.length>0&&(e===void 0?e=n=s:e+=`\\${s}`)}if(e===void 0)return".";let i=!0,r=0;if(typeof n=="string"&&Fo(n.charCodeAt(0))){++r;const o=n.length;o>1&&Fo(n.charCodeAt(1))&&(++r,o>2&&(Fo(n.charCodeAt(2))?++r:i=!1))}if(i){for(;r<e.length&&Fo(e.charCodeAt(r));)r++;r>=2&&(e=`\\${e.slice(r)}`)}return gm.normalize(e)},relative(t,e){if(Ec(t,"from"),Ec(e,"to"),t===e)return"";const n=gm.resolve(t),i=gm.resolve(e);if(n===i||(t=n.toLowerCase(),e=i.toLowerCase(),t===e))return"";let r=0;for(;r<t.length&&t.charCodeAt(r)===ep;)r++;let o=t.length;for(;o-1>r&&t.charCodeAt(o-1)===ep;)o--;const s=o-r;let a=0;for(;a<e.length&&e.charCodeAt(a)===ep;)a++;let l=e.length;for(;l-1>a&&e.charCodeAt(l-1)===ep;)l--;const c=l-a,u=s<c?s:c;let d=-1,h=0;for(;h<u;h++){const m=t.charCodeAt(r+h);if(m!==e.charCodeAt(a+h))break;m===ep&&(d=h)}if(h!==u){if(d===-1)return i}else{if(c>u){if(e.charCodeAt(a+h)===ep)return i.slice(a+h+1);if(h===2)return i.slice(a+h)}s>u&&(t.charCodeAt(r+h)===ep?d=h:h===2&&(d=3)),d===-1&&(d=0)}let f="";for(h=r+d+1;h<=o;++h)(h===o||t.charCodeAt(h)===ep)&&(f+=f.length===0?"..":"\\..");return a+=d,f.length>0?`${f}${i.slice(a,l)}`:(i.charCodeAt(a)===ep&&++a,i.slice(a,l))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;const e=gm.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===ep){if(e.charCodeAt(1)===ep){const n=e.charCodeAt(2);if(n!==vdi&&n!==mD)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(jN(e.charCodeAt(0))&&e.charCodeAt(1)===ON&&e.charCodeAt(2)===ep)return`\\\\?\\${e}`;return t},dirname(t){Ec(t,"path");const e=t.length;if(e===0)return".";let n=-1,i=0;const r=t.charCodeAt(0);if(e===1)return Fo(r)?t:".";if(Fo(r)){if(n=i=1,Fo(t.charCodeAt(1))){let a=2,l=a;for(;a<e&&!Fo(t.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&Fo(t.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&!Fo(t.charCodeAt(a));)a++;if(a===e)return t;a!==l&&(n=i=a+1)}}}}else jN(r)&&t.charCodeAt(1)===ON&&(n=e>2&&Fo(t.charCodeAt(2))?3:2,i=n);let o=-1,s=!0;for(let a=e-1;a>=i;--a)if(Fo(t.charCodeAt(a))){if(!s){o=a;break}}else s=!1;if(o===-1){if(n===-1)return".";o=n}return t.slice(0,o)},basename(t,e){e!==void 0&&Ec(e,"suffix"),Ec(t,"path");let n=0,i=-1,r=!0,o;if(t.length>=2&&jN(t.charCodeAt(0))&&t.charCodeAt(1)===ON&&(n=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let s=e.length-1,a=-1;for(o=t.length-1;o>=n;--o){const l=t.charCodeAt(o);if(Fo(l)){if(!r){n=o+1;break}}else a===-1&&(r=!1,a=o+1),s>=0&&(l===e.charCodeAt(s)?--s===-1&&(i=o):(s=-1,i=a))}return n===i?i=a:i===-1&&(i=t.length),t.slice(n,i)}for(o=t.length-1;o>=n;--o)if(Fo(t.charCodeAt(o))){if(!r){n=o+1;break}}else i===-1&&(r=!1,i=o+1);return i===-1?"":t.slice(n,i)},extname(t){Ec(t,"path");let e=0,n=-1,i=0,r=-1,o=!0,s=0;t.length>=2&&t.charCodeAt(1)===ON&&jN(t.charCodeAt(0))&&(e=i=2);for(let a=t.length-1;a>=e;--a){const l=t.charCodeAt(a);if(Fo(l)){if(!o){i=a+1;break}continue}r===-1&&(o=!1,r=a+1),l===mD?n===-1?n=a:s!==1&&(s=1):n!==-1&&(s=-1)}return n===-1||r===-1||s===0||s===1&&n===r-1&&n===i+1?"":t.slice(n,r)},format:ZOt.bind(null,"\\"),parse(t){Ec(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const n=t.length;let i=0,r=t.charCodeAt(0);if(n===1)return Fo(r)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(Fo(r)){if(i=1,Fo(t.charCodeAt(1))){let d=2,h=d;for(;d<n&&!Fo(t.charCodeAt(d));)d++;if(d<n&&d!==h){for(h=d;d<n&&Fo(t.charCodeAt(d));)d++;if(d<n&&d!==h){for(h=d;d<n&&!Fo(t.charCodeAt(d));)d++;d===n?i=d:d!==h&&(i=d+1)}}}}else if(jN(r)&&t.charCodeAt(1)===ON){if(n<=2)return e.root=e.dir=t,e;if(i=2,Fo(t.charCodeAt(2))){if(n===3)return e.root=e.dir=t,e;i=3}}i>0&&(e.root=t.slice(0,i));let o=-1,s=i,a=-1,l=!0,c=t.length-1,u=0;for(;c>=i;--c){if(r=t.charCodeAt(c),Fo(r)){if(!l){s=c+1;break}continue}a===-1&&(l=!1,a=c+1),r===mD?o===-1?o=c:u!==1&&(u=1):o!==-1&&(u=-1)}return a!==-1&&(o===-1||u===0||u===1&&o===a-1&&o===s+1?e.base=e.name=t.slice(s,a):(e.name=t.slice(s,o),e.base=t.slice(s,a),e.ext=t.slice(o,a))),s>0&&s!==i?e.dir=t.slice(0,s-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},xdi=(()=>{if(tM){const t=/\\/g;return()=>{const e=Aie().replace(t,"/");return e.slice(e.indexOf("/"))}}return()=>Aie()})(),Dl={resolve(...t){let e="",n=!1;for(let i=t.length-1;i>=-1&&!n;i--){const r=i>=0?t[i]:xdi();Ec(r,`paths[${i}]`),r.length!==0&&(e=`${r}/${e}`,n=r.charCodeAt(0)===Pd)}return e=Rie(e,!n,"/",_Me),n?`/${e}`:e.length>0?e:"."},normalize(t){if(Ec(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===Pd,n=t.charCodeAt(t.length-1)===Pd;return t=Rie(t,!e,"/",_Me),t.length===0?e?"/":n?"./":".":(n&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return Ec(t,"path"),t.length>0&&t.charCodeAt(0)===Pd},join(...t){if(t.length===0)return".";let e;for(let n=0;n<t.length;++n){const i=t[n];Ec(i,"path"),i.length>0&&(e===void 0?e=i:e+=`/${i}`)}return e===void 0?".":Dl.normalize(e)},relative(t,e){if(Ec(t,"from"),Ec(e,"to"),t===e||(t=Dl.resolve(t),e=Dl.resolve(e),t===e))return"";const n=1,i=t.length,r=i-n,o=1,s=e.length-o,a=r<s?r:s;let l=-1,c=0;for(;c<a;c++){const d=t.charCodeAt(n+c);if(d!==e.charCodeAt(o+c))break;d===Pd&&(l=c)}if(c===a)if(s>a){if(e.charCodeAt(o+c)===Pd)return e.slice(o+c+1);if(c===0)return e.slice(o+c)}else r>a&&(t.charCodeAt(n+c)===Pd?l=c:c===0&&(l=0));let u="";for(c=n+l+1;c<=i;++c)(c===i||t.charCodeAt(c)===Pd)&&(u+=u.length===0?"..":"/..");return`${u}${e.slice(o+l)}`},toNamespacedPath(t){return t},dirname(t){if(Ec(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===Pd;let n=-1,i=!0;for(let r=t.length-1;r>=1;--r)if(t.charCodeAt(r)===Pd){if(!i){n=r;break}}else i=!1;return n===-1?e?"/":".":e&&n===1?"//":t.slice(0,n)},basename(t,e){e!==void 0&&Ec(e,"ext"),Ec(t,"path");let n=0,i=-1,r=!0,o;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let s=e.length-1,a=-1;for(o=t.length-1;o>=0;--o){const l=t.charCodeAt(o);if(l===Pd){if(!r){n=o+1;break}}else a===-1&&(r=!1,a=o+1),s>=0&&(l===e.charCodeAt(s)?--s===-1&&(i=o):(s=-1,i=a))}return n===i?i=a:i===-1&&(i=t.length),t.slice(n,i)}for(o=t.length-1;o>=0;--o)if(t.charCodeAt(o)===Pd){if(!r){n=o+1;break}}else i===-1&&(r=!1,i=o+1);return i===-1?"":t.slice(n,i)},extname(t){Ec(t,"path");let e=-1,n=0,i=-1,r=!0,o=0;for(let s=t.length-1;s>=0;--s){const a=t.charCodeAt(s);if(a===Pd){if(!r){n=s+1;break}continue}i===-1&&(r=!1,i=s+1),a===mD?e===-1?e=s:o!==1&&(o=1):e!==-1&&(o=-1)}return e===-1||i===-1||o===0||o===1&&e===i-1&&e===n+1?"":t.slice(e,i)},format:ZOt.bind(null,"/"),parse(t){Ec(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const n=t.charCodeAt(0)===Pd;let i;n?(e.root="/",i=1):i=0;let r=-1,o=0,s=-1,a=!0,l=t.length-1,c=0;for(;l>=i;--l){const u=t.charCodeAt(l);if(u===Pd){if(!a){o=l+1;break}continue}s===-1&&(a=!1,s=l+1),u===mD?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}if(s!==-1){const u=o===0&&n?1:o;r===-1||c===0||c===1&&r===s-1&&r===o+1?e.base=e.name=t.slice(u,s):(e.name=t.slice(u,r),e.base=t.slice(u,s),e.ext=t.slice(r,s))}return o>0?e.dir=t.slice(0,o-1):n&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Dl.win32=gm.win32=gm;Dl.posix=gm.posix=Dl;const QOt=tM?gm.normalize:Dl.normalize,wdi=tM?gm.resolve:Dl.resolve,Cdi=tM?gm.relative:Dl.relative,JOt=tM?gm.dirname:Dl.dirname,pD=tM?gm.basename:Dl.basename,Sdi=tM?gm.extname:Dl.extname,_0=tM?gm.sep:Dl.sep,Ndi=/^\w[\w\d+.-]*$/,Edi=/^\//,Ddi=/^\/\//;function kdi(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!Ndi.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path){if(t.authority){if(!Edi.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Ddi.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Mdi(t,e){return!t&&!e?"file":t}function Ldi(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==Ky&&(e=Ky+e):e=Ky;break}return e}const sl="",Ky="/",Tdi=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class ri{static isUri(e){return e instanceof ri?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}constructor(e,n,i,r,o,s=!1){typeof e=="object"?(this.scheme=e.scheme||sl,this.authority=e.authority||sl,this.path=e.path||sl,this.query=e.query||sl,this.fragment=e.fragment||sl):(this.scheme=Mdi(e,s),this.authority=n||sl,this.path=Ldi(this.scheme,i||sl),this.query=r||sl,this.fragment=o||sl,kdi(this,s))}get fsPath(){return Pie(this,!1)}with(e){if(!e)return this;let{scheme:n,authority:i,path:r,query:o,fragment:s}=e;return n===void 0?n=this.scheme:n===null&&(n=sl),i===void 0?i=this.authority:i===null&&(i=sl),r===void 0?r=this.path:r===null&&(r=sl),o===void 0?o=this.query:o===null&&(o=sl),s===void 0?s=this.fragment:s===null&&(s=sl),n===this.scheme&&i===this.authority&&r===this.path&&o===this.query&&s===this.fragment?this:new UP(n,i,r,o,s)}static parse(e,n=!1){const i=Tdi.exec(e);return i?new UP(i[2]||sl,aQ(i[4]||sl),aQ(i[5]||sl),aQ(i[7]||sl),aQ(i[9]||sl),n):new UP(sl,sl,sl,sl,sl)}static file(e){let n=sl;if(Fu&&(e=e.replace(/\\/g,Ky)),e[0]===Ky&&e[1]===Ky){const i=e.indexOf(Ky,2);i===-1?(n=e.substring(2),e=Ky):(n=e.substring(2,i),e=e.substring(i)||Ky)}return new UP("file",n,e,sl,sl)}static from(e,n){return new UP(e.scheme,e.authority,e.path,e.query,e.fragment,n)}static joinPath(e,...n){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return Fu&&e.scheme==="file"?i=ri.file(gm.join(Pie(e,!0),...n)).path:i=Dl.join(e.path,...n),e.with({path:i})}toString(e=!1){return xMe(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof ri)return e;{const n=new UP(e);return n._formatted=e.external??null,n._fsPath=e._sep===e4t?e.fsPath??null:null,n}}else return e}}const e4t=Fu?1:void 0;let UP=class extends ri{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Pie(this,!1)),this._fsPath}toString(e=!1){return e?xMe(this,!0):(this._formatted||(this._formatted=xMe(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=e4t),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}};const t4t={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function Aot(t,e,n){let i,r=-1;for(let o=0;o<t.length;o++){const s=t.charCodeAt(o);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===45||s===46||s===95||s===126||e&&s===47||n&&s===91||n&&s===93||n&&s===58)r!==-1&&(i+=encodeURIComponent(t.substring(r,o)),r=-1),i!==void 0&&(i+=t.charAt(o));else{i===void 0&&(i=t.substr(0,o));const a=t4t[s];a!==void 0?(r!==-1&&(i+=encodeURIComponent(t.substring(r,o)),r=-1),i+=a):r===-1&&(r=o)}}return r!==-1&&(i+=encodeURIComponent(t.substring(r))),i!==void 0?i:t}function Idi(t){let e;for(let n=0;n<t.length;n++){const i=t.charCodeAt(n);i===35||i===63?(e===void 0&&(e=t.substr(0,n)),e+=t4t[i]):e!==void 0&&(e+=t[n])}return e!==void 0?e:t}function Pie(t,e){let n;return t.authority&&t.path.length>1&&t.scheme==="file"?n=`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?e?n=t.path.substr(1):n=t.path[1].toLowerCase()+t.path.substr(2):n=t.path,Fu&&(n=n.replace(/\//g,"\\")),n}function xMe(t,e){const n=e?Idi:Aot;let i="",{scheme:r,authority:o,path:s,query:a,fragment:l}=t;if(r&&(i+=r,i+=":"),(o||r==="file")&&(i+=Ky,i+=Ky),o){let c=o.indexOf("@");if(c!==-1){const u=o.substr(0,c);o=o.substr(c+1),c=u.lastIndexOf(":"),c===-1?i+=n(u,!1,!1):(i+=n(u.substr(0,c),!1,!1),i+=":",i+=n(u.substr(c+1),!1,!0)),i+="@"}o=o.toLowerCase(),c=o.lastIndexOf(":"),c===-1?i+=n(o,!1,!0):(i+=n(o.substr(0,c),!1,!0),i+=o.substr(c))}if(s){if(s.length>=3&&s.charCodeAt(0)===47&&s.charCodeAt(2)===58){const c=s.charCodeAt(1);c>=65&&c<=90&&(s=`/${String.fromCharCode(c+32)}:${s.substr(3)}`)}else if(s.length>=2&&s.charCodeAt(1)===58){const c=s.charCodeAt(0);c>=65&&c<=90&&(s=`${String.fromCharCode(c+32)}:${s.substr(2)}`)}i+=n(s,!0,!1)}return a&&(i+="?",i+=n(a,!1,!1)),l&&(i+="#",i+=e?l:Aot(l,!1,!1)),i}function n4t(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+n4t(t.substr(3)):t}}const Rot=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function aQ(t){return t.match(Rot)?t.replace(Rot,e=>n4t(e)):t}let ot=class IL{constructor(e,n){this.lineNumber=e,this.column=n}with(e=this.lineNumber,n=this.column){return e===this.lineNumber&&n===this.column?this:new IL(e,n)}delta(e=0,n=0){return this.with(this.lineNumber+e,this.column+n)}equals(e){return IL.equals(this,e)}static equals(e,n){return!e&&!n?!0:!!e&&!!n&&e.lineNumber===n.lineNumber&&e.column===n.column}isBefore(e){return IL.isBefore(this,e)}static isBefore(e,n){return e.lineNumber<n.lineNumber?!0:n.lineNumber<e.lineNumber?!1:e.column<n.column}isBeforeOrEqual(e){return IL.isBeforeOrEqual(this,e)}static isBeforeOrEqual(e,n){return e.lineNumber<n.lineNumber?!0:n.lineNumber<e.lineNumber?!1:e.column<=n.column}static compare(e,n){const i=e.lineNumber|0,r=n.lineNumber|0;if(i===r){const o=e.column|0,s=n.column|0;return o-s}return i-r}clone(){return new IL(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(e){return new IL(e.lineNumber,e.column)}static isIPosition(e){return e&&typeof e.lineNumber=="number"&&typeof e.column=="number"}toJSON(){return{lineNumber:this.lineNumber,column:this.column}}},ve=class Uc{constructor(e,n,i,r){e>i||e===i&&n>r?(this.startLineNumber=i,this.startColumn=r,this.endLineNumber=e,this.endColumn=n):(this.startLineNumber=e,this.startColumn=n,this.endLineNumber=i,this.endColumn=r)}isEmpty(){return Uc.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return Uc.containsPosition(this,e)}static containsPosition(e,n){return!(n.lineNumber<e.startLineNumber||n.lineNumber>e.endLineNumber||n.lineNumber===e.startLineNumber&&n.column<e.startColumn||n.lineNumber===e.endLineNumber&&n.column>e.endColumn)}static strictContainsPosition(e,n){return!(n.lineNumber<e.startLineNumber||n.lineNumber>e.endLineNumber||n.lineNumber===e.startLineNumber&&n.column<=e.startColumn||n.lineNumber===e.endLineNumber&&n.column>=e.endColumn)}containsRange(e){return Uc.containsRange(this,e)}static containsRange(e,n){return!(n.startLineNumber<e.startLineNumber||n.endLineNumber<e.startLineNumber||n.startLineNumber>e.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumn<e.startColumn||n.endLineNumber===e.endLineNumber&&n.endColumn>e.endColumn)}strictContainsRange(e){return Uc.strictContainsRange(this,e)}static strictContainsRange(e,n){return!(n.startLineNumber<e.startLineNumber||n.endLineNumber<e.startLineNumber||n.startLineNumber>e.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumn<=e.startColumn||n.endLineNumber===e.endLineNumber&&n.endColumn>=e.endColumn)}plusRange(e){return Uc.plusRange(this,e)}static plusRange(e,n){let i,r,o,s;return n.startLineNumber<e.startLineNumber?(i=n.startLineNumber,r=n.startColumn):n.startLineNumber===e.startLineNumber?(i=n.startLineNumber,r=Math.min(n.startColumn,e.startColumn)):(i=e.startLineNumber,r=e.startColumn),n.endLineNumber>e.endLineNumber?(o=n.endLineNumber,s=n.endColumn):n.endLineNumber===e.endLineNumber?(o=n.endLineNumber,s=Math.max(n.endColumn,e.endColumn)):(o=e.endLineNumber,s=e.endColumn),new Uc(i,r,o,s)}intersectRanges(e){return Uc.intersectRanges(this,e)}static intersectRanges(e,n){let i=e.startLineNumber,r=e.startColumn,o=e.endLineNumber,s=e.endColumn;const a=n.startLineNumber,l=n.startColumn,c=n.endLineNumber,u=n.endColumn;return i<a?(i=a,r=l):i===a&&(r=Math.max(r,l)),o>c?(o=c,s=u):o===c&&(s=Math.min(s,u)),i>o||i===o&&r>s?null:new Uc(i,r,o,s)}equalsRange(e){return Uc.equalsRange(this,e)}static equalsRange(e,n){return!e&&!n?!0:!!e&&!!n&&e.startLineNumber===n.startLineNumber&&e.startColumn===n.startColumn&&e.endLineNumber===n.endLineNumber&&e.endColumn===n.endColumn}getEndPosition(){return Uc.getEndPosition(this)}static getEndPosition(e){return new ot(e.endLineNumber,e.endColumn)}getStartPosition(){return Uc.getStartPosition(this)}static getStartPosition(e){return new ot(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,n){return new Uc(this.startLineNumber,this.startColumn,e,n)}setStartPosition(e,n){return new Uc(e,n,this.endLineNumber,this.endColumn)}collapseToStart(){return Uc.collapseToStart(this)}static collapseToStart(e){return new Uc(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return Uc.collapseToEnd(this)}static collapseToEnd(e){return new Uc(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new Uc(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,n=e){return new Uc(e.lineNumber,e.column,n.lineNumber,n.column)}static lift(e){return e?new Uc(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,n){return!(e.endLineNumber<n.startLineNumber||e.endLineNumber===n.startLineNumber&&e.endColumn<n.startColumn||n.endLineNumber<e.startLineNumber||n.endLineNumber===e.startLineNumber&&n.endColumn<e.startColumn)}static areIntersecting(e,n){return!(e.endLineNumber<n.startLineNumber||e.endLineNumber===n.startLineNumber&&e.endColumn<=n.startColumn||n.endLineNumber<e.startLineNumber||n.endLineNumber===e.startLineNumber&&n.endColumn<=e.startColumn)}static compareRangesUsingStarts(e,n){if(e&&n){const o=e.startLineNumber|0,s=n.startLineNumber|0;if(o===s){const a=e.startColumn|0,l=n.startColumn|0;if(a===l){const c=e.endLineNumber|0,u=n.endLineNumber|0;if(c===u){const d=e.endColumn|0,h=n.endColumn|0;return d-h}return c-u}return a-l}return o-s}return(e?1:0)-(n?1:0)}static compareRangesUsingEnds(e,n){return e.endLineNumber===n.endLineNumber?e.endColumn===n.endColumn?e.startLineNumber===n.startLineNumber?e.startColumn-n.startColumn:e.startLineNumber-n.startLineNumber:e.endColumn-n.endColumn:e.endLineNumber-n.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}toJSON(){return this}},Pn=class zb extends ve{constructor(e,n,i,r){super(e,n,i,r),this.selectionStartLineNumber=e,this.selectionStartColumn=n,this.positionLineNumber=i,this.positionColumn=r}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return zb.selectionsEqual(this,e)}static selectionsEqual(e,n){return e.selectionStartLineNumber===n.selectionStartLineNumber&&e.selectionStartColumn===n.selectionStartColumn&&e.positionLineNumber===n.positionLineNumber&&e.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,n){return this.getDirection()===0?new zb(this.startLineNumber,this.startColumn,e,n):new zb(e,n,this.startLineNumber,this.startColumn)}getPosition(){return new ot(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new ot(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,n){return this.getDirection()===0?new zb(e,n,this.endLineNumber,this.endColumn):new zb(this.endLineNumber,this.endColumn,e,n)}static fromPositions(e,n=e){return new zb(e.lineNumber,e.column,n.lineNumber,n.column)}static fromRange(e,n){return n===0?new zb(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new zb(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new zb(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,n){if(e&&!n||!e&&n)return!1;if(!e&&!n)return!0;if(e.length!==n.length)return!1;for(let i=0,r=e.length;i<r;i++)if(!this.selectionsEqual(e[i],n[i]))return!1;return!0}static isISelection(e){return e&&typeof e.selectionStartLineNumber=="number"&&typeof e.selectionStartColumn=="number"&&typeof e.positionLineNumber=="number"&&typeof e.positionColumn=="number"}static createWithDirection(e,n,i,r,o){return o===0?new zb(e,n,i,r):new zb(i,r,e,n)}};const wMe=Object.create(null);function ce(t,e){if(Cf(e)){const n=wMe[e];if(n===void 0)throw new Error(`${t} references an unknown codicon: ${e}`);e=n}return wMe[t]=e,{id:t}}function i4t(){return wMe}const Adi={add:ce("add",6e4),plus:ce("plus",6e4),gistNew:ce("gist-new",6e4),repoCreate:ce("repo-create",6e4),lightbulb:ce("lightbulb",60001),lightBulb:ce("light-bulb",60001),repo:ce("repo",60002),repoDelete:ce("repo-delete",60002),gistFork:ce("gist-fork",60003),repoForked:ce("repo-forked",60003),gitPullRequest:ce("git-pull-request",60004),gitPullRequestAbandoned:ce("git-pull-request-abandoned",60004),recordKeys:ce("record-keys",60005),keyboard:ce("keyboard",60005),tag:ce("tag",60006),gitPullRequestLabel:ce("git-pull-request-label",60006),tagAdd:ce("tag-add",60006),tagRemove:ce("tag-remove",60006),person:ce("person",60007),personFollow:ce("person-follow",60007),personOutline:ce("person-outline",60007),personFilled:ce("person-filled",60007),gitBranch:ce("git-branch",60008),gitBranchCreate:ce("git-branch-create",60008),gitBranchDelete:ce("git-branch-delete",60008),sourceControl:ce("source-control",60008),mirror:ce("mirror",60009),mirrorPublic:ce("mirror-public",60009),star:ce("star",60010),starAdd:ce("star-add",60010),starDelete:ce("star-delete",60010),starEmpty:ce("star-empty",60010),comment:ce("comment",60011),commentAdd:ce("comment-add",60011),alert:ce("alert",60012),warning:ce("warning",60012),search:ce("search",60013),searchSave:ce("search-save",60013),logOut:ce("log-out",60014),signOut:ce("sign-out",60014),logIn:ce("log-in",60015),signIn:ce("sign-in",60015),eye:ce("eye",60016),eyeUnwatch:ce("eye-unwatch",60016),eyeWatch:ce("eye-watch",60016),circleFilled:ce("circle-filled",60017),primitiveDot:ce("primitive-dot",60017),closeDirty:ce("close-dirty",60017),debugBreakpoint:ce("debug-breakpoint",60017),debugBreakpointDisabled:ce("debug-breakpoint-disabled",60017),debugHint:ce("debug-hint",60017),terminalDecorationSuccess:ce("terminal-decoration-success",60017),primitiveSquare:ce("primitive-square",60018),edit:ce("edit",60019),pencil:ce("pencil",60019),info:ce("info",60020),issueOpened:ce("issue-opened",60020),gistPrivate:ce("gist-private",60021),gitForkPrivate:ce("git-fork-private",60021),lock:ce("lock",60021),mirrorPrivate:ce("mirror-private",60021),close:ce("close",60022),removeClose:ce("remove-close",60022),x:ce("x",60022),repoSync:ce("repo-sync",60023),sync:ce("sync",60023),clone:ce("clone",60024),desktopDownload:ce("desktop-download",60024),beaker:ce("beaker",60025),microscope:ce("microscope",60025),vm:ce("vm",60026),deviceDesktop:ce("device-desktop",60026),file:ce("file",60027),fileText:ce("file-text",60027),more:ce("more",60028),ellipsis:ce("ellipsis",60028),kebabHorizontal:ce("kebab-horizontal",60028),mailReply:ce("mail-reply",60029),reply:ce("reply",60029),organization:ce("organization",60030),organizationFilled:ce("organization-filled",60030),organizationOutline:ce("organization-outline",60030),newFile:ce("new-file",60031),fileAdd:ce("file-add",60031),newFolder:ce("new-folder",60032),fileDirectoryCreate:ce("file-directory-create",60032),trash:ce("trash",60033),trashcan:ce("trashcan",60033),history:ce("history",60034),clock:ce("clock",60034),folder:ce("folder",60035),fileDirectory:ce("file-directory",60035),symbolFolder:ce("symbol-folder",60035),logoGithub:ce("logo-github",60036),markGithub:ce("mark-github",60036),github:ce("github",60036),terminal:ce("terminal",60037),console:ce("console",60037),repl:ce("repl",60037),zap:ce("zap",60038),symbolEvent:ce("symbol-event",60038),error:ce("error",60039),stop:ce("stop",60039),variable:ce("variable",60040),symbolVariable:ce("symbol-variable",60040),array:ce("array",60042),symbolArray:ce("symbol-array",60042),symbolModule:ce("symbol-module",60043),symbolPackage:ce("symbol-package",60043),symbolNamespace:ce("symbol-namespace",60043),symbolObject:ce("symbol-object",60043),symbolMethod:ce("symbol-method",60044),symbolFunction:ce("symbol-function",60044),symbolConstructor:ce("symbol-constructor",60044),symbolBoolean:ce("symbol-boolean",60047),symbolNull:ce("symbol-null",60047),symbolNumeric:ce("symbol-numeric",60048),symbolNumber:ce("symbol-number",60048),symbolStructure:ce("symbol-structure",60049),symbolStruct:ce("symbol-struct",60049),symbolParameter:ce("symbol-parameter",60050),symbolTypeParameter:ce("symbol-type-parameter",60050),symbolKey:ce("symbol-key",60051),symbolText:ce("symbol-text",60051),symbolReference:ce("symbol-reference",60052),goToFile:ce("go-to-file",60052),symbolEnum:ce("symbol-enum",60053),symbolValue:ce("symbol-value",60053),symbolRuler:ce("symbol-ruler",60054),symbolUnit:ce("symbol-unit",60054),activateBreakpoints:ce("activate-breakpoints",60055),archive:ce("archive",60056),arrowBoth:ce("arrow-both",60057),arrowDown:ce("arrow-down",60058),arrowLeft:ce("arrow-left",60059),arrowRight:ce("arrow-right",60060),arrowSmallDown:ce("arrow-small-down",60061),arrowSmallLeft:ce("arrow-small-left",60062),arrowSmallRight:ce("arrow-small-right",60063),arrowSmallUp:ce("arrow-small-up",60064),arrowUp:ce("arrow-up",60065),bell:ce("bell",60066),bold:ce("bold",60067),book:ce("book",60068),bookmark:ce("bookmark",60069),debugBreakpointConditionalUnverified:ce("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:ce("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:ce("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:ce("debug-breakpoint-data-unverified",60072),debugBreakpointData:ce("debug-breakpoint-data",60073),debugBreakpointDataDisabled:ce("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:ce("debug-breakpoint-log-unverified",60074),debugBreakpointLog:ce("debug-breakpoint-log",60075),debugBreakpointLogDisabled:ce("debug-breakpoint-log-disabled",60075),briefcase:ce("briefcase",60076),broadcast:ce("broadcast",60077),browser:ce("browser",60078),bug:ce("bug",60079),calendar:ce("calendar",60080),caseSensitive:ce("case-sensitive",60081),check:ce("check",60082),checklist:ce("checklist",60083),chevronDown:ce("chevron-down",60084),chevronLeft:ce("chevron-left",60085),chevronRight:ce("chevron-right",60086),chevronUp:ce("chevron-up",60087),chromeClose:ce("chrome-close",60088),chromeMaximize:ce("chrome-maximize",60089),chromeMinimize:ce("chrome-minimize",60090),chromeRestore:ce("chrome-restore",60091),circleOutline:ce("circle-outline",60092),circle:ce("circle",60092),debugBreakpointUnverified:ce("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:ce("terminal-decoration-incomplete",60092),circleSlash:ce("circle-slash",60093),circuitBoard:ce("circuit-board",60094),clearAll:ce("clear-all",60095),clippy:ce("clippy",60096),closeAll:ce("close-all",60097),cloudDownload:ce("cloud-download",60098),cloudUpload:ce("cloud-upload",60099),code:ce("code",60100),collapseAll:ce("collapse-all",60101),colorMode:ce("color-mode",60102),commentDiscussion:ce("comment-discussion",60103),creditCard:ce("credit-card",60105),dash:ce("dash",60108),dashboard:ce("dashboard",60109),database:ce("database",60110),debugContinue:ce("debug-continue",60111),debugDisconnect:ce("debug-disconnect",60112),debugPause:ce("debug-pause",60113),debugRestart:ce("debug-restart",60114),debugStart:ce("debug-start",60115),debugStepInto:ce("debug-step-into",60116),debugStepOut:ce("debug-step-out",60117),debugStepOver:ce("debug-step-over",60118),debugStop:ce("debug-stop",60119),debug:ce("debug",60120),deviceCameraVideo:ce("device-camera-video",60121),deviceCamera:ce("device-camera",60122),deviceMobile:ce("device-mobile",60123),diffAdded:ce("diff-added",60124),diffIgnored:ce("diff-ignored",60125),diffModified:ce("diff-modified",60126),diffRemoved:ce("diff-removed",60127),diffRenamed:ce("diff-renamed",60128),diff:ce("diff",60129),diffSidebyside:ce("diff-sidebyside",60129),discard:ce("discard",60130),editorLayout:ce("editor-layout",60131),emptyWindow:ce("empty-window",60132),exclude:ce("exclude",60133),extensions:ce("extensions",60134),eyeClosed:ce("eye-closed",60135),fileBinary:ce("file-binary",60136),fileCode:ce("file-code",60137),fileMedia:ce("file-media",60138),filePdf:ce("file-pdf",60139),fileSubmodule:ce("file-submodule",60140),fileSymlinkDirectory:ce("file-symlink-directory",60141),fileSymlinkFile:ce("file-symlink-file",60142),fileZip:ce("file-zip",60143),files:ce("files",60144),filter:ce("filter",60145),flame:ce("flame",60146),foldDown:ce("fold-down",60147),foldUp:ce("fold-up",60148),fold:ce("fold",60149),folderActive:ce("folder-active",60150),folderOpened:ce("folder-opened",60151),gear:ce("gear",60152),gift:ce("gift",60153),gistSecret:ce("gist-secret",60154),gist:ce("gist",60155),gitCommit:ce("git-commit",60156),gitCompare:ce("git-compare",60157),compareChanges:ce("compare-changes",60157),gitMerge:ce("git-merge",60158),githubAction:ce("github-action",60159),githubAlt:ce("github-alt",60160),globe:ce("globe",60161),grabber:ce("grabber",60162),graph:ce("graph",60163),gripper:ce("gripper",60164),heart:ce("heart",60165),home:ce("home",60166),horizontalRule:ce("horizontal-rule",60167),hubot:ce("hubot",60168),inbox:ce("inbox",60169),issueReopened:ce("issue-reopened",60171),issues:ce("issues",60172),italic:ce("italic",60173),jersey:ce("jersey",60174),json:ce("json",60175),kebabVertical:ce("kebab-vertical",60176),key:ce("key",60177),law:ce("law",60178),lightbulbAutofix:ce("lightbulb-autofix",60179),linkExternal:ce("link-external",60180),link:ce("link",60181),listOrdered:ce("list-ordered",60182),listUnordered:ce("list-unordered",60183),liveShare:ce("live-share",60184),loading:ce("loading",60185),location:ce("location",60186),mailRead:ce("mail-read",60187),mail:ce("mail",60188),markdown:ce("markdown",60189),megaphone:ce("megaphone",60190),mention:ce("mention",60191),milestone:ce("milestone",60192),gitPullRequestMilestone:ce("git-pull-request-milestone",60192),mortarBoard:ce("mortar-board",60193),move:ce("move",60194),multipleWindows:ce("multiple-windows",60195),mute:ce("mute",60196),noNewline:ce("no-newline",60197),note:ce("note",60198),octoface:ce("octoface",60199),openPreview:ce("open-preview",60200),package:ce("package",60201),paintcan:ce("paintcan",60202),pin:ce("pin",60203),play:ce("play",60204),run:ce("run",60204),plug:ce("plug",60205),preserveCase:ce("preserve-case",60206),preview:ce("preview",60207),project:ce("project",60208),pulse:ce("pulse",60209),question:ce("question",60210),quote:ce("quote",60211),radioTower:ce("radio-tower",60212),reactions:ce("reactions",60213),references:ce("references",60214),refresh:ce("refresh",60215),regex:ce("regex",60216),remoteExplorer:ce("remote-explorer",60217),remote:ce("remote",60218),remove:ce("remove",60219),replaceAll:ce("replace-all",60220),replace:ce("replace",60221),repoClone:ce("repo-clone",60222),repoForcePush:ce("repo-force-push",60223),repoPull:ce("repo-pull",60224),repoPush:ce("repo-push",60225),report:ce("report",60226),requestChanges:ce("request-changes",60227),rocket:ce("rocket",60228),rootFolderOpened:ce("root-folder-opened",60229),rootFolder:ce("root-folder",60230),rss:ce("rss",60231),ruby:ce("ruby",60232),saveAll:ce("save-all",60233),saveAs:ce("save-as",60234),save:ce("save",60235),screenFull:ce("screen-full",60236),screenNormal:ce("screen-normal",60237),searchStop:ce("search-stop",60238),server:ce("server",60240),settingsGear:ce("settings-gear",60241),settings:ce("settings",60242),shield:ce("shield",60243),smiley:ce("smiley",60244),sortPrecedence:ce("sort-precedence",60245),splitHorizontal:ce("split-horizontal",60246),splitVertical:ce("split-vertical",60247),squirrel:ce("squirrel",60248),starFull:ce("star-full",60249),starHalf:ce("star-half",60250),symbolClass:ce("symbol-class",60251),symbolColor:ce("symbol-color",60252),symbolConstant:ce("symbol-constant",60253),symbolEnumMember:ce("symbol-enum-member",60254),symbolField:ce("symbol-field",60255),symbolFile:ce("symbol-file",60256),symbolInterface:ce("symbol-interface",60257),symbolKeyword:ce("symbol-keyword",60258),symbolMisc:ce("symbol-misc",60259),symbolOperator:ce("symbol-operator",60260),symbolProperty:ce("symbol-property",60261),wrench:ce("wrench",60261),wrenchSubaction:ce("wrench-subaction",60261),symbolSnippet:ce("symbol-snippet",60262),tasklist:ce("tasklist",60263),telescope:ce("telescope",60264),textSize:ce("text-size",60265),threeBars:ce("three-bars",60266),thumbsdown:ce("thumbsdown",60267),thumbsup:ce("thumbsup",60268),tools:ce("tools",60269),triangleDown:ce("triangle-down",60270),triangleLeft:ce("triangle-left",60271),triangleRight:ce("triangle-right",60272),triangleUp:ce("triangle-up",60273),twitter:ce("twitter",60274),unfold:ce("unfold",60275),unlock:ce("unlock",60276),unmute:ce("unmute",60277),unverified:ce("unverified",60278),verified:ce("verified",60279),versions:ce("versions",60280),vmActive:ce("vm-active",60281),vmOutline:ce("vm-outline",60282),vmRunning:ce("vm-running",60283),watch:ce("watch",60284),whitespace:ce("whitespace",60285),wholeWord:ce("whole-word",60286),window:ce("window",60287),wordWrap:ce("word-wrap",60288),zoomIn:ce("zoom-in",60289),zoomOut:ce("zoom-out",60290),listFilter:ce("list-filter",60291),listFlat:ce("list-flat",60292),listSelection:ce("list-selection",60293),selection:ce("selection",60293),listTree:ce("list-tree",60294),debugBreakpointFunctionUnverified:ce("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:ce("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:ce("debug-breakpoint-function-disabled",60296),debugStackframeActive:ce("debug-stackframe-active",60297),circleSmallFilled:ce("circle-small-filled",60298),debugStackframeDot:ce("debug-stackframe-dot",60298),terminalDecorationMark:ce("terminal-decoration-mark",60298),debugStackframe:ce("debug-stackframe",60299),debugStackframeFocused:ce("debug-stackframe-focused",60299),debugBreakpointUnsupported:ce("debug-breakpoint-unsupported",60300),symbolString:ce("symbol-string",60301),debugReverseContinue:ce("debug-reverse-continue",60302),debugStepBack:ce("debug-step-back",60303),debugRestartFrame:ce("debug-restart-frame",60304),debugAlt:ce("debug-alt",60305),callIncoming:ce("call-incoming",60306),callOutgoing:ce("call-outgoing",60307),menu:ce("menu",60308),expandAll:ce("expand-all",60309),feedback:ce("feedback",60310),gitPullRequestReviewer:ce("git-pull-request-reviewer",60310),groupByRefType:ce("group-by-ref-type",60311),ungroupByRefType:ce("ungroup-by-ref-type",60312),account:ce("account",60313),gitPullRequestAssignee:ce("git-pull-request-assignee",60313),bellDot:ce("bell-dot",60314),debugConsole:ce("debug-console",60315),library:ce("library",60316),output:ce("output",60317),runAll:ce("run-all",60318),syncIgnored:ce("sync-ignored",60319),pinned:ce("pinned",60320),githubInverted:ce("github-inverted",60321),serverProcess:ce("server-process",60322),serverEnvironment:ce("server-environment",60323),pass:ce("pass",60324),issueClosed:ce("issue-closed",60324),stopCircle:ce("stop-circle",60325),playCircle:ce("play-circle",60326),record:ce("record",60327),debugAltSmall:ce("debug-alt-small",60328),vmConnect:ce("vm-connect",60329),cloud:ce("cloud",60330),merge:ce("merge",60331),export:ce("export",60332),graphLeft:ce("graph-left",60333),magnet:ce("magnet",60334),notebook:ce("notebook",60335),redo:ce("redo",60336),checkAll:ce("check-all",60337),pinnedDirty:ce("pinned-dirty",60338),passFilled:ce("pass-filled",60339),circleLargeFilled:ce("circle-large-filled",60340),circleLarge:ce("circle-large",60341),circleLargeOutline:ce("circle-large-outline",60341),combine:ce("combine",60342),gather:ce("gather",60342),table:ce("table",60343),variableGroup:ce("variable-group",60344),typeHierarchy:ce("type-hierarchy",60345),typeHierarchySub:ce("type-hierarchy-sub",60346),typeHierarchySuper:ce("type-hierarchy-super",60347),gitPullRequestCreate:ce("git-pull-request-create",60348),runAbove:ce("run-above",60349),runBelow:ce("run-below",60350),notebookTemplate:ce("notebook-template",60351),debugRerun:ce("debug-rerun",60352),workspaceTrusted:ce("workspace-trusted",60353),workspaceUntrusted:ce("workspace-untrusted",60354),workspaceUnknown:ce("workspace-unknown",60355),terminalCmd:ce("terminal-cmd",60356),terminalDebian:ce("terminal-debian",60357),terminalLinux:ce("terminal-linux",60358),terminalPowershell:ce("terminal-powershell",60359),terminalTmux:ce("terminal-tmux",60360),terminalUbuntu:ce("terminal-ubuntu",60361),terminalBash:ce("terminal-bash",60362),arrowSwap:ce("arrow-swap",60363),copy:ce("copy",60364),personAdd:ce("person-add",60365),filterFilled:ce("filter-filled",60366),wand:ce("wand",60367),debugLineByLine:ce("debug-line-by-line",60368),inspect:ce("inspect",60369),layers:ce("layers",60370),layersDot:ce("layers-dot",60371),layersActive:ce("layers-active",60372),compass:ce("compass",60373),compassDot:ce("compass-dot",60374),compassActive:ce("compass-active",60375),azure:ce("azure",60376),issueDraft:ce("issue-draft",60377),gitPullRequestClosed:ce("git-pull-request-closed",60378),gitPullRequestDraft:ce("git-pull-request-draft",60379),debugAll:ce("debug-all",60380),debugCoverage:ce("debug-coverage",60381),runErrors:ce("run-errors",60382),folderLibrary:ce("folder-library",60383),debugContinueSmall:ce("debug-continue-small",60384),beakerStop:ce("beaker-stop",60385),graphLine:ce("graph-line",60386),graphScatter:ce("graph-scatter",60387),pieChart:ce("pie-chart",60388),bracket:ce("bracket",60175),bracketDot:ce("bracket-dot",60389),bracketError:ce("bracket-error",60390),lockSmall:ce("lock-small",60391),azureDevops:ce("azure-devops",60392),verifiedFilled:ce("verified-filled",60393),newline:ce("newline",60394),layout:ce("layout",60395),layoutActivitybarLeft:ce("layout-activitybar-left",60396),layoutActivitybarRight:ce("layout-activitybar-right",60397),layoutPanelLeft:ce("layout-panel-left",60398),layoutPanelCenter:ce("layout-panel-center",60399),layoutPanelJustify:ce("layout-panel-justify",60400),layoutPanelRight:ce("layout-panel-right",60401),layoutPanel:ce("layout-panel",60402),layoutSidebarLeft:ce("layout-sidebar-left",60403),layoutSidebarRight:ce("layout-sidebar-right",60404),layoutStatusbar:ce("layout-statusbar",60405),layoutMenubar:ce("layout-menubar",60406),layoutCentered:ce("layout-centered",60407),target:ce("target",60408),indent:ce("indent",60409),recordSmall:ce("record-small",60410),errorSmall:ce("error-small",60411),terminalDecorationError:ce("terminal-decoration-error",60411),arrowCircleDown:ce("arrow-circle-down",60412),arrowCircleLeft:ce("arrow-circle-left",60413),arrowCircleRight:ce("arrow-circle-right",60414),arrowCircleUp:ce("arrow-circle-up",60415),layoutSidebarRightOff:ce("layout-sidebar-right-off",60416),layoutPanelOff:ce("layout-panel-off",60417),layoutSidebarLeftOff:ce("layout-sidebar-left-off",60418),blank:ce("blank",60419),heartFilled:ce("heart-filled",60420),map:ce("map",60421),mapHorizontal:ce("map-horizontal",60421),foldHorizontal:ce("fold-horizontal",60421),mapFilled:ce("map-filled",60422),mapHorizontalFilled:ce("map-horizontal-filled",60422),foldHorizontalFilled:ce("fold-horizontal-filled",60422),circleSmall:ce("circle-small",60423),bellSlash:ce("bell-slash",60424),bellSlashDot:ce("bell-slash-dot",60425),commentUnresolved:ce("comment-unresolved",60426),gitPullRequestGoToChanges:ce("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:ce("git-pull-request-new-changes",60428),searchFuzzy:ce("search-fuzzy",60429),commentDraft:ce("comment-draft",60430),send:ce("send",60431),sparkle:ce("sparkle",60432),insert:ce("insert",60433),mic:ce("mic",60434),thumbsdownFilled:ce("thumbsdown-filled",60435),thumbsupFilled:ce("thumbsup-filled",60436),coffee:ce("coffee",60437),snake:ce("snake",60438),game:ce("game",60439),vr:ce("vr",60440),chip:ce("chip",60441),piano:ce("piano",60442),music:ce("music",60443),micFilled:ce("mic-filled",60444),repoFetch:ce("repo-fetch",60445),copilot:ce("copilot",60446),lightbulbSparkle:ce("lightbulb-sparkle",60447),robot:ce("robot",60448),sparkleFilled:ce("sparkle-filled",60449),diffSingle:ce("diff-single",60450),diffMultiple:ce("diff-multiple",60451),surroundWith:ce("surround-with",60452),share:ce("share",60453),gitStash:ce("git-stash",60454),gitStashApply:ce("git-stash-apply",60455),gitStashPop:ce("git-stash-pop",60456),vscode:ce("vscode",60457),vscodeInsiders:ce("vscode-insiders",60458),codeOss:ce("code-oss",60459),runCoverage:ce("run-coverage",60460),runAllCoverage:ce("run-all-coverage",60461),coverage:ce("coverage",60462),githubProject:ce("github-project",60463),mapVertical:ce("map-vertical",60464),foldVertical:ce("fold-vertical",60464),mapVerticalFilled:ce("map-vertical-filled",60465),foldVerticalFilled:ce("fold-vertical-filled",60465),goToSearch:ce("go-to-search",60466),percentage:ce("percentage",60467),sortPercentage:ce("sort-percentage",60467),attach:ce("attach",60468)},Rdi={dialogError:ce("dialog-error","error"),dialogWarning:ce("dialog-warning","warning"),dialogInfo:ce("dialog-info","info"),dialogClose:ce("dialog-close","close"),treeItemExpanded:ce("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:ce("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:ce("tree-filter-on-type-off","list-selection"),treeFilterClear:ce("tree-filter-clear","close"),treeItemLoading:ce("tree-item-loading","loading"),menuSelection:ce("menu-selection","check"),menuSubmenu:ce("menu-submenu","chevron-right"),menuBarMore:ce("menubar-more","more"),scrollbarButtonLeft:ce("scrollbar-button-left","triangle-left"),scrollbarButtonRight:ce("scrollbar-button-right","triangle-right"),scrollbarButtonUp:ce("scrollbar-button-up","triangle-up"),scrollbarButtonDown:ce("scrollbar-button-down","triangle-down"),toolBarMore:ce("toolbar-more","more"),quickInputBack:ce("quick-input-back","arrow-left"),dropDownButton:ce("drop-down-button",60084),symbolCustomColor:ce("symbol-customcolor",60252),exportIcon:ce("export",60332),workspaceUnspecified:ce("workspace-unspecified",60355),newLine:ce("newline",60394),thumbsDownFilled:ce("thumbsdown-filled",60435),thumbsUpFilled:ce("thumbsup-filled",60436),gitFetch:ce("git-fetch",60445),lightbulbSparkleAutofix:ce("lightbulb-sparkle-autofix",60447),debugBreakpointPending:ce("debug-breakpoint-pending",60377)},qt={...Adi,...Rdi};let Pdi=class{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new st,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,n){return this._tokenizationSupports.set(e,n),this.handleChange([e]),Kn(()=>{this._tokenizationSupports.get(e)===n&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,n){var r;(r=this._factories.get(e))==null||r.dispose();const i=new Odi(this,e,n);return this._factories.set(e,i),Kn(()=>{const o=this._factories.get(e);!o||o!==i||(this._factories.delete(e),o.dispose())})}async getOrCreate(e){const n=this.get(e);if(n)return n;const i=this._factories.get(e);return!i||i.isResolved?null:(await i.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const i=this._factories.get(e);return!!(!i||i.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}};class Odi extends ct{get isResolved(){return this._isResolved}constructor(e,n,i){super(),this._registry=e,this._languageId=n,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}let vH=class{constructor(e,n,i){this.offset=e,this.type=n,this.language=i,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}};class v8e{constructor(e,n){this.tokens=e,this.endState=n,this._tokenizationResultBrand=void 0}}class Mfe{constructor(e,n){this.tokens=e,this.endState=n,this._encodedTokenizationResultBrand=void 0}}var rm;(function(t){t[t.Increase=0]="Increase",t[t.Decrease=1]="Decrease"})(rm||(rm={}));var yH;(function(t){const e=new Map;e.set(0,qt.symbolMethod),e.set(1,qt.symbolFunction),e.set(2,qt.symbolConstructor),e.set(3,qt.symbolField),e.set(4,qt.symbolVariable),e.set(5,qt.symbolClass),e.set(6,qt.symbolStruct),e.set(7,qt.symbolInterface),e.set(8,qt.symbolModule),e.set(9,qt.symbolProperty),e.set(10,qt.symbolEvent),e.set(11,qt.symbolOperator),e.set(12,qt.symbolUnit),e.set(13,qt.symbolValue),e.set(15,qt.symbolEnum),e.set(14,qt.symbolConstant),e.set(15,qt.symbolEnum),e.set(16,qt.symbolEnumMember),e.set(17,qt.symbolKeyword),e.set(27,qt.symbolSnippet),e.set(18,qt.symbolText),e.set(19,qt.symbolColor),e.set(20,qt.symbolFile),e.set(21,qt.symbolReference),e.set(22,qt.symbolCustomColor),e.set(23,qt.symbolFolder),e.set(24,qt.symbolTypeParameter),e.set(25,qt.account),e.set(26,qt.issues);function n(o){let s=e.get(o);return s||(console.info("No codicon found for CompletionItemKind "+o),s=qt.symbolProperty),s}t.toIcon=n;const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",27),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26);function r(o,s){let a=i.get(o);return typeof a>"u"&&!s&&(a=9),a}t.fromString=r})(yH||(yH={}));var x0;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(x0||(x0={}));class r4t{constructor(e,n,i,r){this.range=e,this.text=n,this.completionKind=i,this.isSnippetText=r}equals(e){return ve.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}var _H;(function(t){t[t.Automatic=0]="Automatic",t[t.PasteAs=1]="PasteAs"})(_H||(_H={}));var Hx;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(Hx||(Hx={}));var xH;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(xH||(xH={}));function jdi(t){return t&&ri.isUri(t.uri)&&ve.isIRange(t.range)&&(ve.isIRange(t.originSelectionRange)||ve.isIRange(t.targetSelectionRange))}const Fdi={17:I("Array","array"),16:I("Boolean","boolean"),4:I("Class","class"),13:I("Constant","constant"),8:I("Constructor","constructor"),9:I("Enum","enumeration"),21:I("EnumMember","enumeration member"),23:I("Event","event"),7:I("Field","field"),0:I("File","file"),11:I("Function","function"),10:I("Interface","interface"),19:I("Key","key"),5:I("Method","method"),1:I("Module","module"),2:I("Namespace","namespace"),20:I("Null","null"),15:I("Number","number"),18:I("Object","object"),24:I("Operator","operator"),3:I("Package","package"),6:I("Property","property"),14:I("String","string"),22:I("Struct","struct"),25:I("TypeParameter","type parameter"),12:I("Variable","variable")};function $di(t,e){return I("symbolAriaLabel","{0} ({1})",t,Fdi[e])}var Oie;(function(t){const e=new Map;e.set(0,qt.symbolFile),e.set(1,qt.symbolModule),e.set(2,qt.symbolNamespace),e.set(3,qt.symbolPackage),e.set(4,qt.symbolClass),e.set(5,qt.symbolMethod),e.set(6,qt.symbolProperty),e.set(7,qt.symbolField),e.set(8,qt.symbolConstructor),e.set(9,qt.symbolEnum),e.set(10,qt.symbolInterface),e.set(11,qt.symbolFunction),e.set(12,qt.symbolVariable),e.set(13,qt.symbolConstant),e.set(14,qt.symbolString),e.set(15,qt.symbolNumber),e.set(16,qt.symbolBoolean),e.set(17,qt.symbolArray),e.set(18,qt.symbolObject),e.set(19,qt.symbolKey),e.set(20,qt.symbolNull),e.set(21,qt.symbolEnumMember),e.set(22,qt.symbolStruct),e.set(23,qt.symbolEvent),e.set(24,qt.symbolOperator),e.set(25,qt.symbolTypeParameter);function n(i){let r=e.get(i);return r||(console.info("No codicon found for SymbolKind "+i),r=qt.symbolProperty),r}t.toIcon=n})(Oie||(Oie={}));const Kb=class Kb{static fromValue(e){switch(e){case"comment":return Kb.Comment;case"imports":return Kb.Imports;case"region":return Kb.Region}return new Kb(e)}constructor(e){this.value=e}};Kb.Comment=new Kb("comment"),Kb.Imports=new Kb("imports"),Kb.Region=new Kb("region");let lk=Kb;var CMe;(function(t){t[t.AIGenerated=1]="AIGenerated"})(CMe||(CMe={}));var wH;(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(wH||(wH={}));var SMe;(function(t){function e(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}t.is=e})(SMe||(SMe={}));var jie;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(jie||(jie={}));class Vdi{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(e=>{e&&e.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const Ca=new Pdi;var Fie;(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(Fie||(Fie={}));var NMe;(function(t){t[t.Unknown=0]="Unknown",t[t.Disabled=1]="Disabled",t[t.Enabled=2]="Enabled"})(NMe||(NMe={}));var EMe;(function(t){t[t.Invoke=1]="Invoke",t[t.Auto=2]="Auto"})(EMe||(EMe={}));var DMe;(function(t){t[t.None=0]="None",t[t.KeepWhitespace=1]="KeepWhitespace",t[t.InsertAsSnippet=4]="InsertAsSnippet"})(DMe||(DMe={}));var kMe;(function(t){t[t.Method=0]="Method",t[t.Function=1]="Function",t[t.Constructor=2]="Constructor",t[t.Field=3]="Field",t[t.Variable=4]="Variable",t[t.Class=5]="Class",t[t.Struct=6]="Struct",t[t.Interface=7]="Interface",t[t.Module=8]="Module",t[t.Property=9]="Property",t[t.Event=10]="Event",t[t.Operator=11]="Operator",t[t.Unit=12]="Unit",t[t.Value=13]="Value",t[t.Constant=14]="Constant",t[t.Enum=15]="Enum",t[t.EnumMember=16]="EnumMember",t[t.Keyword=17]="Keyword",t[t.Text=18]="Text",t[t.Color=19]="Color",t[t.File=20]="File",t[t.Reference=21]="Reference",t[t.Customcolor=22]="Customcolor",t[t.Folder=23]="Folder",t[t.TypeParameter=24]="TypeParameter",t[t.User=25]="User",t[t.Issue=26]="Issue",t[t.Snippet=27]="Snippet"})(kMe||(kMe={}));var MMe;(function(t){t[t.Deprecated=1]="Deprecated"})(MMe||(MMe={}));var LMe;(function(t){t[t.Invoke=0]="Invoke",t[t.TriggerCharacter=1]="TriggerCharacter",t[t.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(LMe||(LMe={}));var TMe;(function(t){t[t.EXACT=0]="EXACT",t[t.ABOVE=1]="ABOVE",t[t.BELOW=2]="BELOW"})(TMe||(TMe={}));var IMe;(function(t){t[t.NotSet=0]="NotSet",t[t.ContentFlush=1]="ContentFlush",t[t.RecoverFromMarkers=2]="RecoverFromMarkers",t[t.Explicit=3]="Explicit",t[t.Paste=4]="Paste",t[t.Undo=5]="Undo",t[t.Redo=6]="Redo"})(IMe||(IMe={}));var AMe;(function(t){t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(AMe||(AMe={}));var RMe;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(RMe||(RMe={}));var PMe;(function(t){t[t.None=0]="None",t[t.Keep=1]="Keep",t[t.Brackets=2]="Brackets",t[t.Advanced=3]="Advanced",t[t.Full=4]="Full"})(PMe||(PMe={}));var OMe;(function(t){t[t.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",t[t.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",t[t.accessibilitySupport=2]="accessibilitySupport",t[t.accessibilityPageSize=3]="accessibilityPageSize",t[t.ariaLabel=4]="ariaLabel",t[t.ariaRequired=5]="ariaRequired",t[t.autoClosingBrackets=6]="autoClosingBrackets",t[t.autoClosingComments=7]="autoClosingComments",t[t.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",t[t.autoClosingDelete=9]="autoClosingDelete",t[t.autoClosingOvertype=10]="autoClosingOvertype",t[t.autoClosingQuotes=11]="autoClosingQuotes",t[t.autoIndent=12]="autoIndent",t[t.automaticLayout=13]="automaticLayout",t[t.autoSurround=14]="autoSurround",t[t.bracketPairColorization=15]="bracketPairColorization",t[t.guides=16]="guides",t[t.codeLens=17]="codeLens",t[t.codeLensFontFamily=18]="codeLensFontFamily",t[t.codeLensFontSize=19]="codeLensFontSize",t[t.colorDecorators=20]="colorDecorators",t[t.colorDecoratorsLimit=21]="colorDecoratorsLimit",t[t.columnSelection=22]="columnSelection",t[t.comments=23]="comments",t[t.contextmenu=24]="contextmenu",t[t.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",t[t.cursorBlinking=26]="cursorBlinking",t[t.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",t[t.cursorStyle=28]="cursorStyle",t[t.cursorSurroundingLines=29]="cursorSurroundingLines",t[t.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",t[t.cursorWidth=31]="cursorWidth",t[t.disableLayerHinting=32]="disableLayerHinting",t[t.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",t[t.domReadOnly=34]="domReadOnly",t[t.dragAndDrop=35]="dragAndDrop",t[t.dropIntoEditor=36]="dropIntoEditor",t[t.emptySelectionClipboard=37]="emptySelectionClipboard",t[t.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",t[t.extraEditorClassName=39]="extraEditorClassName",t[t.fastScrollSensitivity=40]="fastScrollSensitivity",t[t.find=41]="find",t[t.fixedOverflowWidgets=42]="fixedOverflowWidgets",t[t.folding=43]="folding",t[t.foldingStrategy=44]="foldingStrategy",t[t.foldingHighlight=45]="foldingHighlight",t[t.foldingImportsByDefault=46]="foldingImportsByDefault",t[t.foldingMaximumRegions=47]="foldingMaximumRegions",t[t.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",t[t.fontFamily=49]="fontFamily",t[t.fontInfo=50]="fontInfo",t[t.fontLigatures=51]="fontLigatures",t[t.fontSize=52]="fontSize",t[t.fontWeight=53]="fontWeight",t[t.fontVariations=54]="fontVariations",t[t.formatOnPaste=55]="formatOnPaste",t[t.formatOnType=56]="formatOnType",t[t.glyphMargin=57]="glyphMargin",t[t.gotoLocation=58]="gotoLocation",t[t.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",t[t.hover=60]="hover",t[t.inDiffEditor=61]="inDiffEditor",t[t.inlineSuggest=62]="inlineSuggest",t[t.inlineEdit=63]="inlineEdit",t[t.letterSpacing=64]="letterSpacing",t[t.lightbulb=65]="lightbulb",t[t.lineDecorationsWidth=66]="lineDecorationsWidth",t[t.lineHeight=67]="lineHeight",t[t.lineNumbers=68]="lineNumbers",t[t.lineNumbersMinChars=69]="lineNumbersMinChars",t[t.linkedEditing=70]="linkedEditing",t[t.links=71]="links",t[t.matchBrackets=72]="matchBrackets",t[t.minimap=73]="minimap",t[t.mouseStyle=74]="mouseStyle",t[t.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",t[t.mouseWheelZoom=76]="mouseWheelZoom",t[t.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",t[t.multiCursorModifier=78]="multiCursorModifier",t[t.multiCursorPaste=79]="multiCursorPaste",t[t.multiCursorLimit=80]="multiCursorLimit",t[t.occurrencesHighlight=81]="occurrencesHighlight",t[t.overviewRulerBorder=82]="overviewRulerBorder",t[t.overviewRulerLanes=83]="overviewRulerLanes",t[t.padding=84]="padding",t[t.pasteAs=85]="pasteAs",t[t.parameterHints=86]="parameterHints",t[t.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",t[t.placeholder=88]="placeholder",t[t.definitionLinkOpensInPeek=89]="definitionLinkOpensInPeek",t[t.quickSuggestions=90]="quickSuggestions",t[t.quickSuggestionsDelay=91]="quickSuggestionsDelay",t[t.readOnly=92]="readOnly",t[t.readOnlyMessage=93]="readOnlyMessage",t[t.renameOnType=94]="renameOnType",t[t.renderControlCharacters=95]="renderControlCharacters",t[t.renderFinalNewline=96]="renderFinalNewline",t[t.renderLineHighlight=97]="renderLineHighlight",t[t.renderLineHighlightOnlyWhenFocus=98]="renderLineHighlightOnlyWhenFocus",t[t.renderValidationDecorations=99]="renderValidationDecorations",t[t.renderWhitespace=100]="renderWhitespace",t[t.revealHorizontalRightPadding=101]="revealHorizontalRightPadding",t[t.roundedSelection=102]="roundedSelection",t[t.rulers=103]="rulers",t[t.scrollbar=104]="scrollbar",t[t.scrollBeyondLastColumn=105]="scrollBeyondLastColumn",t[t.scrollBeyondLastLine=106]="scrollBeyondLastLine",t[t.scrollPredominantAxis=107]="scrollPredominantAxis",t[t.selectionClipboard=108]="selectionClipboard",t[t.selectionHighlight=109]="selectionHighlight",t[t.selectOnLineNumbers=110]="selectOnLineNumbers",t[t.showFoldingControls=111]="showFoldingControls",t[t.showUnused=112]="showUnused",t[t.snippetSuggestions=113]="snippetSuggestions",t[t.smartSelect=114]="smartSelect",t[t.smoothScrolling=115]="smoothScrolling",t[t.stickyScroll=116]="stickyScroll",t[t.stickyTabStops=117]="stickyTabStops",t[t.stopRenderingLineAfter=118]="stopRenderingLineAfter",t[t.suggest=119]="suggest",t[t.suggestFontSize=120]="suggestFontSize",t[t.suggestLineHeight=121]="suggestLineHeight",t[t.suggestOnTriggerCharacters=122]="suggestOnTriggerCharacters",t[t.suggestSelection=123]="suggestSelection",t[t.tabCompletion=124]="tabCompletion",t[t.tabIndex=125]="tabIndex",t[t.unicodeHighlighting=126]="unicodeHighlighting",t[t.unusualLineTerminators=127]="unusualLineTerminators",t[t.useShadowDOM=128]="useShadowDOM",t[t.useTabStops=129]="useTabStops",t[t.wordBreak=130]="wordBreak",t[t.wordSegmenterLocales=131]="wordSegmenterLocales",t[t.wordSeparators=132]="wordSeparators",t[t.wordWrap=133]="wordWrap",t[t.wordWrapBreakAfterCharacters=134]="wordWrapBreakAfterCharacters",t[t.wordWrapBreakBeforeCharacters=135]="wordWrapBreakBeforeCharacters",t[t.wordWrapColumn=136]="wordWrapColumn",t[t.wordWrapOverride1=137]="wordWrapOverride1",t[t.wordWrapOverride2=138]="wordWrapOverride2",t[t.wrappingIndent=139]="wrappingIndent",t[t.wrappingStrategy=140]="wrappingStrategy",t[t.showDeprecated=141]="showDeprecated",t[t.inlayHints=142]="inlayHints",t[t.editorClassName=143]="editorClassName",t[t.pixelRatio=144]="pixelRatio",t[t.tabFocusMode=145]="tabFocusMode",t[t.layoutInfo=146]="layoutInfo",t[t.wrappingInfo=147]="wrappingInfo",t[t.defaultColorDecorators=148]="defaultColorDecorators",t[t.colorDecoratorsActivatedOn=149]="colorDecoratorsActivatedOn",t[t.inlineCompletionsAccessibilityVerbose=150]="inlineCompletionsAccessibilityVerbose"})(OMe||(OMe={}));var jMe;(function(t){t[t.TextDefined=0]="TextDefined",t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(jMe||(jMe={}));var FMe;(function(t){t[t.LF=0]="LF",t[t.CRLF=1]="CRLF"})(FMe||(FMe={}));var $Me;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"})($Me||($Me={}));var VMe;(function(t){t[t.Increase=0]="Increase",t[t.Decrease=1]="Decrease"})(VMe||(VMe={}));var BMe;(function(t){t[t.None=0]="None",t[t.Indent=1]="Indent",t[t.IndentOutdent=2]="IndentOutdent",t[t.Outdent=3]="Outdent"})(BMe||(BMe={}));var zMe;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(zMe||(zMe={}));var HMe;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(HMe||(HMe={}));var WMe;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(WMe||(WMe={}));var UMe;(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(UMe||(UMe={}));var KMe;(function(t){t[t.DependsOnKbLayout=-1]="DependsOnKbLayout",t[t.Unknown=0]="Unknown",t[t.Backspace=1]="Backspace",t[t.Tab=2]="Tab",t[t.Enter=3]="Enter",t[t.Shift=4]="Shift",t[t.Ctrl=5]="Ctrl",t[t.Alt=6]="Alt",t[t.PauseBreak=7]="PauseBreak",t[t.CapsLock=8]="CapsLock",t[t.Escape=9]="Escape",t[t.Space=10]="Space",t[t.PageUp=11]="PageUp",t[t.PageDown=12]="PageDown",t[t.End=13]="End",t[t.Home=14]="Home",t[t.LeftArrow=15]="LeftArrow",t[t.UpArrow=16]="UpArrow",t[t.RightArrow=17]="RightArrow",t[t.DownArrow=18]="DownArrow",t[t.Insert=19]="Insert",t[t.Delete=20]="Delete",t[t.Digit0=21]="Digit0",t[t.Digit1=22]="Digit1",t[t.Digit2=23]="Digit2",t[t.Digit3=24]="Digit3",t[t.Digit4=25]="Digit4",t[t.Digit5=26]="Digit5",t[t.Digit6=27]="Digit6",t[t.Digit7=28]="Digit7",t[t.Digit8=29]="Digit8",t[t.Digit9=30]="Digit9",t[t.KeyA=31]="KeyA",t[t.KeyB=32]="KeyB",t[t.KeyC=33]="KeyC",t[t.KeyD=34]="KeyD",t[t.KeyE=35]="KeyE",t[t.KeyF=36]="KeyF",t[t.KeyG=37]="KeyG",t[t.KeyH=38]="KeyH",t[t.KeyI=39]="KeyI",t[t.KeyJ=40]="KeyJ",t[t.KeyK=41]="KeyK",t[t.KeyL=42]="KeyL",t[t.KeyM=43]="KeyM",t[t.KeyN=44]="KeyN",t[t.KeyO=45]="KeyO",t[t.KeyP=46]="KeyP",t[t.KeyQ=47]="KeyQ",t[t.KeyR=48]="KeyR",t[t.KeyS=49]="KeyS",t[t.KeyT=50]="KeyT",t[t.KeyU=51]="KeyU",t[t.KeyV=52]="KeyV",t[t.KeyW=53]="KeyW",t[t.KeyX=54]="KeyX",t[t.KeyY=55]="KeyY",t[t.KeyZ=56]="KeyZ",t[t.Meta=57]="Meta",t[t.ContextMenu=58]="ContextMenu",t[t.F1=59]="F1",t[t.F2=60]="F2",t[t.F3=61]="F3",t[t.F4=62]="F4",t[t.F5=63]="F5",t[t.F6=64]="F6",t[t.F7=65]="F7",t[t.F8=66]="F8",t[t.F9=67]="F9",t[t.F10=68]="F10",t[t.F11=69]="F11",t[t.F12=70]="F12",t[t.F13=71]="F13",t[t.F14=72]="F14",t[t.F15=73]="F15",t[t.F16=74]="F16",t[t.F17=75]="F17",t[t.F18=76]="F18",t[t.F19=77]="F19",t[t.F20=78]="F20",t[t.F21=79]="F21",t[t.F22=80]="F22",t[t.F23=81]="F23",t[t.F24=82]="F24",t[t.NumLock=83]="NumLock",t[t.ScrollLock=84]="ScrollLock",t[t.Semicolon=85]="Semicolon",t[t.Equal=86]="Equal",t[t.Comma=87]="Comma",t[t.Minus=88]="Minus",t[t.Period=89]="Period",t[t.Slash=90]="Slash",t[t.Backquote=91]="Backquote",t[t.BracketLeft=92]="BracketLeft",t[t.Backslash=93]="Backslash",t[t.BracketRight=94]="BracketRight",t[t.Quote=95]="Quote",t[t.OEM_8=96]="OEM_8",t[t.IntlBackslash=97]="IntlBackslash",t[t.Numpad0=98]="Numpad0",t[t.Numpad1=99]="Numpad1",t[t.Numpad2=100]="Numpad2",t[t.Numpad3=101]="Numpad3",t[t.Numpad4=102]="Numpad4",t[t.Numpad5=103]="Numpad5",t[t.Numpad6=104]="Numpad6",t[t.Numpad7=105]="Numpad7",t[t.Numpad8=106]="Numpad8",t[t.Numpad9=107]="Numpad9",t[t.NumpadMultiply=108]="NumpadMultiply",t[t.NumpadAdd=109]="NumpadAdd",t[t.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",t[t.NumpadSubtract=111]="NumpadSubtract",t[t.NumpadDecimal=112]="NumpadDecimal",t[t.NumpadDivide=113]="NumpadDivide",t[t.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",t[t.ABNT_C1=115]="ABNT_C1",t[t.ABNT_C2=116]="ABNT_C2",t[t.AudioVolumeMute=117]="AudioVolumeMute",t[t.AudioVolumeUp=118]="AudioVolumeUp",t[t.AudioVolumeDown=119]="AudioVolumeDown",t[t.BrowserSearch=120]="BrowserSearch",t[t.BrowserHome=121]="BrowserHome",t[t.BrowserBack=122]="BrowserBack",t[t.BrowserForward=123]="BrowserForward",t[t.MediaTrackNext=124]="MediaTrackNext",t[t.MediaTrackPrevious=125]="MediaTrackPrevious",t[t.MediaStop=126]="MediaStop",t[t.MediaPlayPause=127]="MediaPlayPause",t[t.LaunchMediaPlayer=128]="LaunchMediaPlayer",t[t.LaunchMail=129]="LaunchMail",t[t.LaunchApp2=130]="LaunchApp2",t[t.Clear=131]="Clear",t[t.MAX_VALUE=132]="MAX_VALUE"})(KMe||(KMe={}));var qMe;(function(t){t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error"})(qMe||(qMe={}));var GMe;(function(t){t[t.Unnecessary=1]="Unnecessary",t[t.Deprecated=2]="Deprecated"})(GMe||(GMe={}));var YMe;(function(t){t[t.Inline=1]="Inline",t[t.Gutter=2]="Gutter"})(YMe||(YMe={}));var XMe;(function(t){t[t.Normal=1]="Normal",t[t.Underlined=2]="Underlined"})(XMe||(XMe={}));var ZMe;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.TEXTAREA=1]="TEXTAREA",t[t.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",t[t.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",t[t.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",t[t.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",t[t.CONTENT_TEXT=6]="CONTENT_TEXT",t[t.CONTENT_EMPTY=7]="CONTENT_EMPTY",t[t.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",t[t.CONTENT_WIDGET=9]="CONTENT_WIDGET",t[t.OVERVIEW_RULER=10]="OVERVIEW_RULER",t[t.SCROLLBAR=11]="SCROLLBAR",t[t.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",t[t.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(ZMe||(ZMe={}));var QMe;(function(t){t[t.AIGenerated=1]="AIGenerated"})(QMe||(QMe={}));var JMe;(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(JMe||(JMe={}));var eLe;(function(t){t[t.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",t[t.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",t[t.TOP_CENTER=2]="TOP_CENTER"})(eLe||(eLe={}));var tLe;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(tLe||(tLe={}));var nLe;(function(t){t[t.Word=0]="Word",t[t.Line=1]="Line",t[t.Suggest=2]="Suggest"})(nLe||(nLe={}));var iLe;(function(t){t[t.Left=0]="Left",t[t.Right=1]="Right",t[t.None=2]="None",t[t.LeftOfInjectedText=3]="LeftOfInjectedText",t[t.RightOfInjectedText=4]="RightOfInjectedText"})(iLe||(iLe={}));var rLe;(function(t){t[t.Off=0]="Off",t[t.On=1]="On",t[t.Relative=2]="Relative",t[t.Interval=3]="Interval",t[t.Custom=4]="Custom"})(rLe||(rLe={}));var oLe;(function(t){t[t.None=0]="None",t[t.Text=1]="Text",t[t.Blocks=2]="Blocks"})(oLe||(oLe={}));var sLe;(function(t){t[t.Smooth=0]="Smooth",t[t.Immediate=1]="Immediate"})(sLe||(sLe={}));var aLe;(function(t){t[t.Auto=1]="Auto",t[t.Hidden=2]="Hidden",t[t.Visible=3]="Visible"})(aLe||(aLe={}));var lLe;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(lLe||(lLe={}));var cLe;(function(t){t.Off="off",t.OnCode="onCode",t.On="on"})(cLe||(cLe={}));var uLe;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(uLe||(uLe={}));var dLe;(function(t){t[t.File=0]="File",t[t.Module=1]="Module",t[t.Namespace=2]="Namespace",t[t.Package=3]="Package",t[t.Class=4]="Class",t[t.Method=5]="Method",t[t.Property=6]="Property",t[t.Field=7]="Field",t[t.Constructor=8]="Constructor",t[t.Enum=9]="Enum",t[t.Interface=10]="Interface",t[t.Function=11]="Function",t[t.Variable=12]="Variable",t[t.Constant=13]="Constant",t[t.String=14]="String",t[t.Number=15]="Number",t[t.Boolean=16]="Boolean",t[t.Array=17]="Array",t[t.Object=18]="Object",t[t.Key=19]="Key",t[t.Null=20]="Null",t[t.EnumMember=21]="EnumMember",t[t.Struct=22]="Struct",t[t.Event=23]="Event",t[t.Operator=24]="Operator",t[t.TypeParameter=25]="TypeParameter"})(dLe||(dLe={}));var hLe;(function(t){t[t.Deprecated=1]="Deprecated"})(hLe||(hLe={}));var fLe;(function(t){t[t.Hidden=0]="Hidden",t[t.Blink=1]="Blink",t[t.Smooth=2]="Smooth",t[t.Phase=3]="Phase",t[t.Expand=4]="Expand",t[t.Solid=5]="Solid"})(fLe||(fLe={}));var mLe;(function(t){t[t.Line=1]="Line",t[t.Block=2]="Block",t[t.Underline=3]="Underline",t[t.LineThin=4]="LineThin",t[t.BlockOutline=5]="BlockOutline",t[t.UnderlineThin=6]="UnderlineThin"})(mLe||(mLe={}));var pLe;(function(t){t[t.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",t[t.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",t[t.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",t[t.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(pLe||(pLe={}));var gLe;(function(t){t[t.None=0]="None",t[t.Same=1]="Same",t[t.Indent=2]="Indent",t[t.DeepIndent=3]="DeepIndent"})(gLe||(gLe={}));var vC;let Bdi=(vC=class{static chord(e,n){return Tl(e,n)}},vC.CtrlCmd=2048,vC.Shift=1024,vC.Alt=512,vC.WinCtrl=256,vC);function o4t(){return{editor:void 0,languages:void 0,CancellationTokenSource:oa,Emitter:st,KeyCode:KMe,KeyMod:Bdi,Position:ot,Range:ve,Selection:Pn,SelectionDirection:lLe,MarkerSeverity:qMe,MarkerTag:GMe,Uri:ri,Token:vH}}function zdi(t,e){const n=t;typeof n.vscodeWindowId!="number"&&Object.defineProperty(n,"vscodeWindowId",{get:()=>e})}const Go=window;function s4t(t){return t}class Hdi{constructor(e,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=s4t):(this._fn=n,this._computeKey=e.getCacheKey)}get(e){const n=this._computeKey(e);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(e)),this.lastCache}}class Pot{get cachedValues(){return this._map}constructor(e,n){this._map=new Map,this._map2=new Map,typeof e=="function"?(this._fn=e,this._computeKey=s4t):(this._fn=n,this._computeKey=e.getCacheKey)}get(e){const n=this._computeKey(e);if(this._map2.has(n))return this._map2.get(n);const i=this._fn(e);return this._map.set(e,i),this._map2.set(n,i),i}}class U0{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function a4t(t){return!t||typeof t!="string"?!0:t.trim().length===0}const Wdi=/{(\d+)}/g;function B2(t,...e){return e.length===0?t:t.replace(Wdi,function(n,i){const r=parseInt(i,10);return isNaN(r)||r<0||r>=e.length?n:e[r]})}function Udi(t){return t.replace(/[<>"'&]/g,e=>{switch(e){case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case"'":return"&apos;";case"&":return"&amp;"}return e})}function z9(t){return t.replace(/[<>&]/g,function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}})}function Hp(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Kdi(t,e=" "){const n=mq(t,e);return l4t(n,e)}function mq(t,e){if(!t||!e)return t;const n=e.length;if(n===0||t.length===0)return t;let i=0;for(;t.indexOf(e,i)===i;)i=i+n;return t.substring(i)}function l4t(t,e){if(!t||!e)return t;const n=e.length,i=t.length;if(n===0||i===0)return t;let r=i,o=-1;for(;o=t.lastIndexOf(e,r-1),!(o===-1||o+n!==r);){if(o===0)return"";r=o}return t.substring(0,r)}function qdi(t){return t.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function Gdi(t){return t.replace(/\*/g,"")}function c4t(t,e,n={}){if(!t)throw new Error("Cannot create regex from empty string");e||(t=Hp(t)),n.wholeWord&&(/\B/.test(t.charAt(0))||(t="\\b"+t),/\B/.test(t.charAt(t.length-1))||(t=t+"\\b"));let i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),n.unicode&&(i+="u"),new RegExp(t,i)}function Ydi(t){return t.source==="^"||t.source==="^$"||t.source==="$"||t.source==="^\\s*$"?!1:!!(t.exec("")&&t.lastIndex===0)}function Tw(t){return t.split(/\r\n|\r|\n/)}function Xdi(t){const e=[],n=t.split(/(\r\n|\r|\n)/);for(let i=0;i<Math.ceil(n.length/2);i++)e.push(n[2*i]+(n[2*i+1]??""));return e}function qd(t){for(let e=0,n=t.length;e<n;e++){const i=t.charCodeAt(e);if(i!==32&&i!==9)return e}return-1}function Zo(t,e=0,n=t.length){for(let i=e;i<n;i++){const r=t.charCodeAt(i);if(r!==32&&r!==9)return t.substring(e,i)}return t.substring(e,n)}function w0(t,e=t.length-1){for(let n=e;n>=0;n--){const i=t.charCodeAt(n);if(i!==32&&i!==9)return n}return-1}function CH(t,e){return t<e?-1:t>e?1:0}function y8e(t,e,n=0,i=t.length,r=0,o=e.length){for(;n<i&&r<o;n++,r++){const l=t.charCodeAt(n),c=e.charCodeAt(r);if(l<c)return-1;if(l>c)return 1}const s=i-n,a=o-r;return s<a?-1:s>a?1:0}function bLe(t,e){return pq(t,e,0,t.length,0,e.length)}function pq(t,e,n=0,i=t.length,r=0,o=e.length){for(;n<i&&r<o;n++,r++){let l=t.charCodeAt(n),c=e.charCodeAt(r);if(l===c)continue;if(l>=128||c>=128)return y8e(t.toLowerCase(),e.toLowerCase(),n,i,r,o);BE(l)&&(l-=32),BE(c)&&(c-=32);const u=l-c;if(u!==0)return u}const s=i-n,a=o-r;return s<a?-1:s>a?1:0}function lQ(t){return t>=48&&t<=57}function BE(t){return t>=97&&t<=122}function px(t){return t>=65&&t<=90}function l4(t,e){return t.length===e.length&&pq(t,e)===0}function _8e(t,e){const n=e.length;return e.length>t.length?!1:pq(t,e,0,n)===0}function ck(t,e){const n=Math.min(t.length,e.length);let i;for(i=0;i<n;i++)if(t.charCodeAt(i)!==e.charCodeAt(i))return i;return n}function $ie(t,e){const n=Math.min(t.length,e.length);let i;const r=t.length-1,o=e.length-1;for(i=0;i<n;i++)if(t.charCodeAt(r-i)!==e.charCodeAt(o-i))return i;return n}function sc(t){return 55296<=t&&t<=56319}function z2(t){return 56320<=t&&t<=57343}function x8e(t,e){return(t-55296<<10)+(e-56320)+65536}function Vie(t,e,n){const i=t.charCodeAt(n);if(sc(i)&&n+1<e){const r=t.charCodeAt(n+1);if(z2(r))return x8e(i,r)}return i}function Zdi(t,e){const n=t.charCodeAt(e-1);if(z2(n)&&e>1){const i=t.charCodeAt(e-2);if(sc(i))return x8e(i,n)}return n}class w8e{get offset(){return this._offset}constructor(e,n=0){this._str=e,this._len=e.length,this._offset=n}setOffset(e){this._offset=e}prevCodePoint(){const e=Zdi(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=Vie(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class Bie{get offset(){return this._iterator.offset}constructor(e,n=0){this._iterator=new w8e(e,n)}nextGraphemeLength(){const e=zie.getInstance(),n=this._iterator,i=n.offset;let r=e.getGraphemeBreakType(n.nextCodePoint());for(;!n.eol();){const o=n.offset,s=e.getGraphemeBreakType(n.nextCodePoint());if(Oot(r,s)){n.setOffset(o);break}r=s}return n.offset-i}prevGraphemeLength(){const e=zie.getInstance(),n=this._iterator,i=n.offset;let r=e.getGraphemeBreakType(n.prevCodePoint());for(;n.offset>0;){const o=n.offset,s=e.getGraphemeBreakType(n.prevCodePoint());if(Oot(s,r)){n.setOffset(o);break}r=s}return i-n.offset}eol(){return this._iterator.eol()}}function C8e(t,e){return new Bie(t,e).nextGraphemeLength()}function u4t(t,e){return new Bie(t,e).prevGraphemeLength()}function Qdi(t,e){e>0&&z2(t.charCodeAt(e))&&e--;const n=e+C8e(t,e);return[n-u4t(t,n),n]}let _we;function Jdi(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function n5(t){return _we||(_we=Jdi()),_we.test(t)}const ehi=/^[\t\n\r\x20-\x7E]*$/;function gq(t){return ehi.test(t)}const d4t=/[\u2028\u2029]/;function h4t(t){return d4t.test(t)}function uk(t){return t>=11904&&t<=55215||t>=63744&&t<=64255||t>=65281&&t<=65374}function S8e(t){return t>=127462&&t<=127487||t===8986||t===8987||t===9200||t===9203||t>=9728&&t<=10175||t===11088||t===11093||t>=127744&&t<=128591||t>=128640&&t<=128764||t>=128992&&t<=129008||t>=129280&&t<=129535||t>=129648&&t<=129782}const thi="\uFEFF";function N8e(t){return!!(t&&t.length>0&&t.charCodeAt(0)===65279)}function nhi(t,e=!1){return t?(e&&(t=t.replace(/\\./g,"")),t.toLowerCase()!==t):!1}function f4t(t){return t=t%(2*26),t<26?String.fromCharCode(97+t):String.fromCharCode(65+t-26)}function Oot(t,e){return t===0?e!==5&&e!==7:t===2&&e===3?!1:t===4||t===2||t===3||e===4||e===2||e===3?!0:!(t===8&&(e===8||e===9||e===11||e===12)||(t===11||t===9)&&(e===9||e===10)||(t===12||t===10)&&e===10||e===5||e===13||e===7||t===1||t===13&&e===14||t===6&&e===6)}const bT=class bT{static getInstance(){return bT._INSTANCE||(bT._INSTANCE=new bT),bT._INSTANCE}constructor(){this._data=ihi()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;const n=this._data,i=n.length/3;let r=1;for(;r<=i;)if(e<n[3*r])r=2*r;else if(e>n[3*r+1])r=2*r+1;else return n[3*r+2];return 0}};bT._INSTANCE=null;let zie=bT;function ihi(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function rhi(t,e){if(t===0)return 0;const n=ohi(t,e);if(n!==void 0)return n;const i=new w8e(e,t);return i.prevCodePoint(),i.offset}function ohi(t,e){const n=new w8e(e,t);let i=n.prevCodePoint();for(;shi(i)||i===65039||i===8419;){if(n.offset===0)return;i=n.prevCodePoint()}if(!S8e(i))return;let r=n.offset;return r>0&&n.prevCodePoint()===8205&&(r=n.offset),r}function shi(t){return 127995<=t&&t<=127999}const m4t=" ",rx=class rx{static getInstance(e){return rx.cache.get(Array.from(e))}static getLocales(){return rx._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}};rx.ambiguousCharacterData=new U0(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')),rx.cache=new Hdi({getCacheKey:JSON.stringify},e=>{function n(u){const d=new Map;for(let h=0;h<u.length;h+=2)d.set(u[h],u[h+1]);return d}function i(u,d){const h=new Map(u);for(const[f,m]of d)h.set(f,m);return h}function r(u,d){if(!u)return d;const h=new Map;for(const[f,m]of u)d.has(f)&&h.set(f,m);return h}const o=rx.ambiguousCharacterData.value;let s=e.filter(u=>!u.startsWith("_")&&u in o);s.length===0&&(s=["_default"]);let a;for(const u of s){const d=n(o[u]);a=r(a,d)}const l=n(o._common),c=i(l,a);return new rx(c)}),rx._locales=new U0(()=>Object.keys(rx.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")));let SH=rx;const $4=class $4{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set($4.getRawData())),this._data}static isInvisibleCharacter(e){return $4.getData().has(e)}static get codePoints(){return $4.getData()}};$4._data=void 0;let rI=$4;const Mle=class Mle{constructor(){this.mapWindowIdToZoomFactor=new Map}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}};Mle.INSTANCE=new Mle;let vLe=Mle;function p4t(t,e,n){typeof e=="string"&&(e=t.matchMedia(e)),e.addEventListener("change",n)}function ahi(t){return vLe.INSTANCE.getZoomFactor(t)}const D6=navigator.userAgent,sb=D6.indexOf("Firefox")>=0,oI=D6.indexOf("AppleWebKit")>=0,bq=D6.indexOf("Chrome")>=0,dS=!bq&&D6.indexOf("Safari")>=0,g4t=!bq&&!dS&&oI;D6.indexOf("Electron/")>=0;const jot=D6.indexOf("Android")>=0;let Jee=!1;if(typeof Go.matchMedia=="function"){const t=Go.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=Go.matchMedia("(display-mode: fullscreen)");Jee=t.matches,p4t(Go,t,({matches:n})=>{Jee&&e.matches||(Jee=n)})}function lhi(){return Jee}const E8e={clipboard:{writeText:y0||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:y0||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:y0||lhi()?0:navigator.keyboard||dS?1:2,touch:"ontouchstart"in Go||navigator.maxTouchPoints>0,pointerEvents:Go.PointerEvent&&("ontouchstart"in Go||navigator.maxTouchPoints>0)};function yLe(t,e){if(typeof t=="number"){if(t===0)return null;const n=(t&65535)>>>0,i=(t&4294901760)>>>16;return i!==0?new xwe([cQ(n,e),cQ(i,e)]):new xwe([cQ(n,e)])}else{const n=[];for(let i=0;i<t.length;i++)n.push(cQ(t[i],e));return new xwe(n)}}function cQ(t,e){const n=!!(t&2048),i=!!(t&256),r=e===2?i:n,o=!!(t&1024),s=!!(t&512),a=e===2?n:i,l=t&255;return new hS(r,o,s,a,l)}class hS{constructor(e,n,i,r,o){this.ctrlKey=e,this.shiftKey=n,this.altKey=i,this.metaKey=r,this.keyCode=o}equals(e){return e instanceof hS&&this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}class xwe{constructor(e){if(e.length===0)throw Jg("chords");this.chords=e}}class chi{constructor(e,n,i,r,o,s){this.ctrlKey=e,this.shiftKey=n,this.altKey=i,this.metaKey=r,this.keyLabel=o,this.keyAriaLabel=s}}class uhi{}function dhi(t){if(t.charCode){const n=String.fromCharCode(t.charCode).toUpperCase();return Z1.fromString(n)}const e=t.keyCode;if(e===3)return 7;if(sb)switch(e){case 59:return 85;case 60:if($h)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(xr)return 57;break}else if(oI){if(xr&&e===93)return 57;if(!xr&&e===92)return 57}return YOt[e]||0}const hhi=xr?256:2048,fhi=512,mhi=1024,phi=xr?2048:256;class as{constructor(e){var i;this._standardKeyboardEventBrand=!0;const n=e;this.browserEvent=n,this.target=n.target,this.ctrlKey=n.ctrlKey,this.shiftKey=n.shiftKey,this.altKey=n.altKey,this.metaKey=n.metaKey,this.altGraphKey=(i=n.getModifierState)==null?void 0:i.call(n,"AltGraph"),this.keyCode=dhi(n),this.code=n.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let n=0;return this.ctrlKey&&(n|=hhi),this.altKey&&(n|=fhi),this.shiftKey&&(n|=mhi),this.metaKey&&(n|=phi),n|=e,n}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new hS(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}const Fot=new WeakMap;function ghi(t){if(!t.parent||t.parent===t)return null;try{const e=t.location,n=t.parent.location;if(e.origin!=="null"&&n.origin!=="null"&&e.origin!==n.origin)return null}catch{return null}return t.parent}class bhi{static getSameOriginWindowChain(e){let n=Fot.get(e);if(!n){n=[],Fot.set(e,n);let i=e,r;do r=ghi(i),r?n.push({window:new WeakRef(i),iframeElement:i.frameElement||null}):n.push({window:new WeakRef(i),iframeElement:null}),i=r;while(i)}return n.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,n){if(!n||e===n)return{top:0,left:0};let i=0,r=0;const o=this.getSameOriginWindowChain(e);for(const s of o){const a=s.window.deref();if(i+=(a==null?void 0:a.scrollY)??0,r+=(a==null?void 0:a.scrollX)??0,a===n||!s.iframeElement)break;const l=s.iframeElement.getBoundingClientRect();i+=l.top,r+=l.left}return{top:i,left:r}}}class uv{constructor(e,n){this.timestamp=Date.now(),this.browserEvent=n,this.leftButton=n.button===0,this.middleButton=n.button===1,this.rightButton=n.button===2,this.buttons=n.buttons,this.target=n.target,this.detail=n.detail||1,n.type==="dblclick"&&(this.detail=2),this.ctrlKey=n.ctrlKey,this.shiftKey=n.shiftKey,this.altKey=n.altKey,this.metaKey=n.metaKey,typeof n.pageX=="number"?(this.posx=n.pageX,this.posy=n.pageY):(this.posx=n.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=n.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);const i=bhi.getPositionOfChildWindowRelativeToAncestorWindow(e,n.view);this.posx-=i.left,this.posy-=i.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class H2{constructor(e,n=0,i=0){var o;this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=n;let r=!1;if(bq){const s=navigator.userAgent.match(/Chrome\/(\d+)/);r=(s?parseInt(s[1]):123)<=122}if(e){const s=e,a=e,l=((o=e.view)==null?void 0:o.devicePixelRatio)||1;if(typeof s.wheelDeltaY<"u")r?this.deltaY=s.wheelDeltaY/(120*l):this.deltaY=s.wheelDeltaY/120;else if(typeof a.VERTICAL_AXIS<"u"&&a.axis===a.VERTICAL_AXIS)this.deltaY=-a.detail/3;else if(e.type==="wheel"){const c=e;c.deltaMode===c.DOM_DELTA_LINE?sb&&!xr?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof s.wheelDeltaX<"u")dS&&Fu?this.deltaX=-(s.wheelDeltaX/120):r?this.deltaX=s.wheelDeltaX/(120*l):this.deltaX=s.wheelDeltaX/120;else if(typeof a.HORIZONTAL_AXIS<"u"&&a.axis===a.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){const c=e;c.deltaMode===c.DOM_DELTA_LINE?sb&&!xr?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(r?this.deltaY=e.wheelDelta/(120*l):this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;(e=this.browserEvent)==null||e.preventDefault()}stopPropagation(){var e;(e=this.browserEvent)==null||e.stopPropagation()}}const b4t=Symbol("MicrotaskDelay");function _Le(t){return!!t&&typeof t.then=="function"}function cc(t){const e=new oa,n=t(e.token),i=new Promise((r,o)=>{const s=e.token.onCancellationRequested(()=>{s.dispose(),o(new Mv)});Promise.resolve(n).then(a=>{s.dispose(),e.dispose(),r(a)},a=>{s.dispose(),e.dispose(),o(a)})});return new class{cancel(){e.cancel(),e.dispose()}then(r,o){return i.then(r,o)}catch(r){return this.then(void 0,r)}finally(r){return i.finally(r)}}}function vq(t,e,n){return new Promise((i,r)=>{const o=e.onCancellationRequested(()=>{o.dispose(),i(n)});t.then(i,r).finally(()=>o.dispose())})}class vhi{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const n=()=>{if(this.queuedPromise=null,this.isDisposed)return;const i=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,i};this.queuedPromise=new Promise(i=>{this.activePromise.then(n,n).then(i)})}return new Promise((n,i)=>{this.queuedPromise.then(n,i)})}return this.activePromise=e(),new Promise((n,i)=>{this.activePromise.then(r=>{this.activePromise=null,n(r)},r=>{this.activePromise=null,i(r)})})}dispose(){this.isDisposed=!0}}const yhi=(t,e)=>{let n=!0;const i=setTimeout(()=>{n=!1,e()},t);return{isTriggered:()=>n,dispose:()=>{clearTimeout(i),n=!1}}},_hi=t=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,t())}),{isTriggered:()=>e,dispose:()=>{e=!1}}};class Lv{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,n=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((r,o)=>{this.doResolve=r,this.doReject=o}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const r=this.task;return this.task=null,r()}}));const i=()=>{var r;this.deferred=null,(r=this.doResolve)==null||r.call(this,null)};return this.deferred=n===b4t?_hi(i):yhi(n,i),this.completionPromise}isTriggered(){var e;return!!((e=this.deferred)!=null&&e.isTriggered())}cancel(){var e;this.cancelTimeout(),this.completionPromise&&((e=this.doReject)==null||e.call(this,new Mv),this.completionPromise=null)}cancelTimeout(){var e;(e=this.deferred)==null||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class v4t{constructor(e){this.delayer=new Lv(e),this.throttler=new vhi}trigger(e,n){return this.delayer.trigger(()=>this.throttler.queue(e),n)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function uw(t,e){return e?new Promise((n,i)=>{const r=setTimeout(()=>{o.dispose(),n()},t),o=e.onCancellationRequested(()=>{clearTimeout(r),o.dispose(),i(new Mv)})}):cc(n=>uw(t,n))}function dk(t,e=0,n){const i=setTimeout(()=>{t(),n&&r.dispose()},e),r=Kn(()=>{clearTimeout(i),n==null||n.deleteAndLeak(r)});return n==null||n.add(r),r}function D8e(t,e=i=>!!i,n=null){let i=0;const r=t.length,o=()=>{if(i>=r)return Promise.resolve(n);const s=t[i++];return Promise.resolve(s()).then(l=>e(l)?Promise.resolve(l):o())};return o()}class Gv{constructor(e,n){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof n=="number"&&this.setIfNotSet(e,n)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,n){if(this._isDisposed)throw new co("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},n)}setIfNotSet(e,n){if(this._isDisposed)throw new co("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},n))}}class k8e{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){var e;(e=this.disposable)==null||e.dispose(),this.disposable=void 0}cancelAndSet(e,n,i=globalThis){if(this.isDisposed)throw new co("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();const r=i.setInterval(()=>{e()},n);this.disposable=Kn(()=>{i.clearInterval(r),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}}class Wo{constructor(e,n){this.timeoutToken=-1,this.runner=e,this.timeout=n,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var e;(e=this.runner)==null||e.call(this)}}let y4t,H9;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?H9=(t,e)=>{FOt(()=>{if(n)return;const i=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,i-Date.now())}}))});let n=!1;return{dispose(){n||(n=!0)}}}:H9=(t,e,n)=>{const i=t.requestIdleCallback(e,typeof n=="number"?{timeout:n}:void 0);let r=!1;return{dispose(){r||(r=!0,t.cancelIdleCallback(i))}}},y4t=t=>H9(globalThis,t)})();class _4t{constructor(e,n){this._didRun=!1,this._executor=()=>{try{this._value=n()}catch(i){this._error=i}finally{this._didRun=!0}},this._handle=H9(e,()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class xhi extends _4t{constructor(e){super(globalThis,e)}}class k6{get isRejected(){var e;return((e=this.outcome)==null?void 0:e.outcome)===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,n)=>{this.completeCallback=e,this.errorCallback=n})}complete(e){return new Promise(n=>{this.completeCallback(e),this.outcome={outcome:0,value:e},n()})}error(e){return new Promise(n=>{this.errorCallback(e),this.outcome={outcome:1,value:e},n()})}cancel(){return this.error(new Mv)}}var xLe;(function(t){async function e(i){let r;const o=await Promise.all(i.map(s=>s.then(a=>a,a=>{r||(r=a)})));if(typeof r<"u")throw r;return o}t.settled=e;function n(i){return new Promise(async(r,o)=>{try{await i(r,o)}catch(s){o(s)}})}t.withAsyncBody=n})(xLe||(xLe={}));const Xf=class Xf{static fromArray(e){return new Xf(n=>{n.emitMany(e)})}static fromPromise(e){return new Xf(async n=>{n.emitMany(await e)})}static fromPromises(e){return new Xf(async n=>{await Promise.all(e.map(async i=>n.emitOne(await i)))})}static merge(e){return new Xf(async n=>{await Promise.all(e.map(async i=>{for await(const r of i)n.emitOne(r)}))})}constructor(e,n){this._state=0,this._results=[],this._error=null,this._onReturn=n,this._onStateChanged=new st,queueMicrotask(async()=>{const i={emitOne:r=>this.emitOne(r),emitMany:r=>this.emitMany(r),reject:r=>this.reject(r)};try{await Promise.resolve(e(i)),this.resolve()}catch(r){this.reject(r)}finally{i.emitOne=void 0,i.emitMany=void 0,i.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(this._state===1)return{done:!0,value:void 0};await rn.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>{var n;return(n=this._onReturn)==null||n.call(this),{done:!0,value:void 0}}}}static map(e,n){return new Xf(async i=>{for await(const r of e)i.emitOne(n(r))})}map(e){return Xf.map(this,e)}static filter(e,n){return new Xf(async i=>{for await(const r of e)n(r)&&i.emitOne(r)})}filter(e){return Xf.filter(this,e)}static coalesce(e){return Xf.filter(e,n=>!!n)}coalesce(){return Xf.coalesce(this)}static async toPromise(e){const n=[];for await(const i of e)n.push(i);return n}toPromise(){return Xf.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};Xf.EMPTY=Xf.fromArray([]);let xp=Xf;class whi extends xp{constructor(e,n){super(n),this._source=e}cancel(){this._source.cancel()}}function Chi(t){const e=new oa,n=t(e.token);return new whi(e,async i=>{const r=e.token.onCancellationRequested(()=>{r.dispose(),e.dispose(),i.reject(new Mv)});try{for await(const o of n){if(e.token.isCancellationRequested)return;i.emitOne(o)}r.dispose(),e.dispose()}catch(o){r.dispose(),e.dispose(),i.reject(o)}})}/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries:x4t,setPrototypeOf:$ot,isFrozen:Shi,getPrototypeOf:Nhi,getOwnPropertyDescriptor:Ehi}=Object;let{freeze:Tm,seal:K0,create:Dhi}=Object,{apply:wLe,construct:CLe}=typeof Reflect<"u"&&Reflect;wLe||(wLe=function(e,n,i){return e.apply(n,i)});Tm||(Tm=function(e){return e});K0||(K0=function(e){return e});CLe||(CLe=function(e,n){return new e(...n)});const khi=Tv(Array.prototype.forEach),Vot=Tv(Array.prototype.pop),OV=Tv(Array.prototype.push),ete=Tv(String.prototype.toLowerCase),wwe=Tv(String.prototype.toString),Mhi=Tv(String.prototype.match),vy=Tv(String.prototype.replace),Lhi=Tv(String.prototype.indexOf),Thi=Tv(String.prototype.trim),xg=Tv(RegExp.prototype.test),jV=Ihi(TypeError);function Tv(t){return function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return wLe(t,e,i)}}function Ihi(t){return function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return CLe(t,n)}}function zo(t,e,n){var i;n=(i=n)!==null&&i!==void 0?i:ete,$ot&&$ot(t,null);let r=e.length;for(;r--;){let o=e[r];if(typeof o=="string"){const s=n(o);s!==o&&(Shi(e)||(e[r]=s),o=s)}t[o]=!0}return t}function KP(t){const e=Dhi(null);for(const[n,i]of x4t(t))e[n]=i;return e}function uQ(t,e){for(;t!==null;){const i=Ehi(t,e);if(i){if(i.get)return Tv(i.get);if(typeof i.value=="function")return Tv(i.value)}t=Nhi(t)}function n(i){return console.warn("fallback value for",i),null}return n}const Bot=Tm(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Cwe=Tm(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Swe=Tm(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ahi=Tm(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Nwe=Tm(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Rhi=Tm(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),zot=Tm(["#text"]),Hot=Tm(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Ewe=Tm(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Wot=Tm(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),dQ=Tm(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Phi=K0(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ohi=K0(/<%[\w\W]*|[\w\W]*%>/gm),jhi=K0(/\${[\w\W]*}/gm),Fhi=K0(/^data-[\-\w.\u00B7-\uFFFF]/),$hi=K0(/^aria-[\-\w]+$/),w4t=K0(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Vhi=K0(/^(?:\w+script|data):/i),Bhi=K0(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),C4t=K0(/^html$/i);var Uot=Object.freeze({__proto__:null,MUSTACHE_EXPR:Phi,ERB_EXPR:Ohi,TMPLIT_EXPR:jhi,DATA_ATTR:Fhi,ARIA_ATTR:$hi,IS_ALLOWED_URI:w4t,IS_SCRIPT_OR_DATA:Vhi,ATTR_WHITESPACE:Bhi,DOCTYPE_NAME:C4t});const zhi=()=>typeof window>"u"?null:window,Hhi=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let i=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(i=n.getAttribute(r));const o="dompurify"+(i?"#"+i:"");try{return e.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function S4t(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:zhi();const e=ht=>S4t(ht);if(e.version="3.0.5",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;const n=t.document,i=n.currentScript;let{document:r}=t;const{DocumentFragment:o,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:f}=t,m=l.prototype,p=uQ(m,"cloneNode"),g=uQ(m,"nextSibling"),y=uQ(m,"childNodes"),_=uQ(m,"parentNode");if(typeof s=="function"){const ht=r.createElement("template");ht.content&&ht.content.ownerDocument&&(r=ht.content.ownerDocument)}let w,C="";const{implementation:N,createNodeIterator:E,createDocumentFragment:D,getElementsByTagName:k}=r,{importNode:M}=n;let T={};e.isSupported=typeof x4t=="function"&&typeof _=="function"&&N&&N.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:A,ERB_EXPR:R,TMPLIT_EXPR:P,DATA_ATTR:O,ARIA_ATTR:V,IS_SCRIPT_OR_DATA:F,ATTR_WHITESPACE:$}=Uot;let{IS_ALLOWED_URI:B}=Uot,z=null;const H=zo({},[...Bot,...Cwe,...Swe,...Nwe,...zot]);let K=null;const q=zo({},[...Hot,...Ewe,...Wot,...dQ]);let U=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,J=null,ae=!0,se=!0,oe=!1,fe=!0,de=!1,ie=!1,Q=!1,be=!1,le=!1,Ne=!1,Le=!1,Te=!0,De=!1;const Pe="user-content-";let ge=!0,he=!1,me={},X=null;const re=zo({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let we=null;const ue=zo({},["audio","video","img","source","image","track"]);let Ce=null;const ze=zo({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ye="http://www.w3.org/1998/Math/MathML",Ke="http://www.w3.org/2000/svg",Xe="http://www.w3.org/1999/xhtml";let it=Xe,ut=!1,Ge=null;const Ee=zo({},[Ye,Ke,Xe],wwe);let Se;const je=["application/xhtml+xml","text/html"],nt="text/html";let rt,St=null;const At=r.createElement("form"),Nt=function(qe){return qe instanceof RegExp||qe instanceof Function},vt=function(qe){if(!(St&&St===qe)){if((!qe||typeof qe!="object")&&(qe={}),qe=KP(qe),Se=je.indexOf(qe.PARSER_MEDIA_TYPE)===-1?Se=nt:Se=qe.PARSER_MEDIA_TYPE,rt=Se==="application/xhtml+xml"?wwe:ete,z="ALLOWED_TAGS"in qe?zo({},qe.ALLOWED_TAGS,rt):H,K="ALLOWED_ATTR"in qe?zo({},qe.ALLOWED_ATTR,rt):q,Ge="ALLOWED_NAMESPACES"in qe?zo({},qe.ALLOWED_NAMESPACES,wwe):Ee,Ce="ADD_URI_SAFE_ATTR"in qe?zo(KP(ze),qe.ADD_URI_SAFE_ATTR,rt):ze,we="ADD_DATA_URI_TAGS"in qe?zo(KP(ue),qe.ADD_DATA_URI_TAGS,rt):ue,X="FORBID_CONTENTS"in qe?zo({},qe.FORBID_CONTENTS,rt):re,Y="FORBID_TAGS"in qe?zo({},qe.FORBID_TAGS,rt):{},J="FORBID_ATTR"in qe?zo({},qe.FORBID_ATTR,rt):{},me="USE_PROFILES"in qe?qe.USE_PROFILES:!1,ae=qe.ALLOW_ARIA_ATTR!==!1,se=qe.ALLOW_DATA_ATTR!==!1,oe=qe.ALLOW_UNKNOWN_PROTOCOLS||!1,fe=qe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,de=qe.SAFE_FOR_TEMPLATES||!1,ie=qe.WHOLE_DOCUMENT||!1,le=qe.RETURN_DOM||!1,Ne=qe.RETURN_DOM_FRAGMENT||!1,Le=qe.RETURN_TRUSTED_TYPE||!1,be=qe.FORCE_BODY||!1,Te=qe.SANITIZE_DOM!==!1,De=qe.SANITIZE_NAMED_PROPS||!1,ge=qe.KEEP_CONTENT!==!1,he=qe.IN_PLACE||!1,B=qe.ALLOWED_URI_REGEXP||w4t,it=qe.NAMESPACE||Xe,U=qe.CUSTOM_ELEMENT_HANDLING||{},qe.CUSTOM_ELEMENT_HANDLING&&Nt(qe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=qe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),qe.CUSTOM_ELEMENT_HANDLING&&Nt(qe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=qe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),qe.CUSTOM_ELEMENT_HANDLING&&typeof qe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=qe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),de&&(se=!1),Ne&&(le=!0),me&&(z=zo({},[...zot]),K=[],me.html===!0&&(zo(z,Bot),zo(K,Hot)),me.svg===!0&&(zo(z,Cwe),zo(K,Ewe),zo(K,dQ)),me.svgFilters===!0&&(zo(z,Swe),zo(K,Ewe),zo(K,dQ)),me.mathMl===!0&&(zo(z,Nwe),zo(K,Wot),zo(K,dQ))),qe.ADD_TAGS&&(z===H&&(z=KP(z)),zo(z,qe.ADD_TAGS,rt)),qe.ADD_ATTR&&(K===q&&(K=KP(K)),zo(K,qe.ADD_ATTR,rt)),qe.ADD_URI_SAFE_ATTR&&zo(Ce,qe.ADD_URI_SAFE_ATTR,rt),qe.FORBID_CONTENTS&&(X===re&&(X=KP(X)),zo(X,qe.FORBID_CONTENTS,rt)),ge&&(z["#text"]=!0),ie&&zo(z,["html","head","body"]),z.table&&(zo(z,["tbody"]),delete Y.tbody),qe.TRUSTED_TYPES_POLICY){if(typeof qe.TRUSTED_TYPES_POLICY.createHTML!="function")throw jV('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof qe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw jV('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=qe.TRUSTED_TYPES_POLICY,C=w.createHTML("")}else w===void 0&&(w=Hhi(f,i)),w!==null&&typeof C=="string"&&(C=w.createHTML(""));Tm&&Tm(qe),St=qe}},$t=zo({},["mi","mo","mn","ms","mtext"]),ln=zo({},["foreignobject","desc","title","annotation-xml"]),Jt=zo({},["title","style","font","a","script"]),en=zo({},Cwe);zo(en,Swe),zo(en,Ahi);const Ft=zo({},Nwe);zo(Ft,Rhi);const dn=function(qe){let ft=_(qe);(!ft||!ft.tagName)&&(ft={namespaceURI:it,tagName:"template"});const Ct=ete(qe.tagName),Pt=ete(ft.tagName);return Ge[qe.namespaceURI]?qe.namespaceURI===Ke?ft.namespaceURI===Xe?Ct==="svg":ft.namespaceURI===Ye?Ct==="svg"&&(Pt==="annotation-xml"||$t[Pt]):!!en[Ct]:qe.namespaceURI===Ye?ft.namespaceURI===Xe?Ct==="math":ft.namespaceURI===Ke?Ct==="math"&&ln[Pt]:!!Ft[Ct]:qe.namespaceURI===Xe?ft.namespaceURI===Ke&&!ln[Pt]||ft.namespaceURI===Ye&&!$t[Pt]?!1:!Ft[Ct]&&(Jt[Ct]||!en[Ct]):!!(Se==="application/xhtml+xml"&&Ge[qe.namespaceURI]):!1},Ze=function(qe){OV(e.removed,{element:qe});try{qe.parentNode.removeChild(qe)}catch{qe.remove()}},dt=function(qe,ft){try{OV(e.removed,{attribute:ft.getAttributeNode(qe),from:ft})}catch{OV(e.removed,{attribute:null,from:ft})}if(ft.removeAttribute(qe),qe==="is"&&!K[qe])if(le||Ne)try{Ze(ft)}catch{}else try{ft.setAttribute(qe,"")}catch{}},at=function(qe){let ft,Ct;if(be)qe="<remove></remove>"+qe;else{const _n=Mhi(qe,/^[\r\n\t ]+/);Ct=_n&&_n[0]}Se==="application/xhtml+xml"&&it===Xe&&(qe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+qe+"</body></html>");const Pt=w?w.createHTML(qe):qe;if(it===Xe)try{ft=new h().parseFromString(Pt,Se)}catch{}if(!ft||!ft.documentElement){ft=N.createDocument(it,"template",null);try{ft.documentElement.innerHTML=ut?C:Pt}catch{}}const an=ft.body||ft.documentElement;return qe&&Ct&&an.insertBefore(r.createTextNode(Ct),an.childNodes[0]||null),it===Xe?k.call(ft,ie?"html":"body")[0]:ie?ft.documentElement:an},mt=function(qe){return E.call(qe.ownerDocument||qe,qe,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},It=function(qe){return qe instanceof d&&(typeof qe.nodeName!="string"||typeof qe.textContent!="string"||typeof qe.removeChild!="function"||!(qe.attributes instanceof u)||typeof qe.removeAttribute!="function"||typeof qe.setAttribute!="function"||typeof qe.namespaceURI!="string"||typeof qe.insertBefore!="function"||typeof qe.hasChildNodes!="function")},Ve=function(qe){return typeof a=="object"?qe instanceof a:qe&&typeof qe=="object"&&typeof qe.nodeType=="number"&&typeof qe.nodeName=="string"},bt=function(qe,ft,Ct){T[qe]&&khi(T[qe],Pt=>{Pt.call(e,ft,Ct,St)})},wt=function(qe){let ft;if(bt("beforeSanitizeElements",qe,null),It(qe))return Ze(qe),!0;const Ct=rt(qe.nodeName);if(bt("uponSanitizeElement",qe,{tagName:Ct,allowedTags:z}),qe.hasChildNodes()&&!Ve(qe.firstElementChild)&&(!Ve(qe.content)||!Ve(qe.content.firstElementChild))&&xg(/<[/\w]/g,qe.innerHTML)&&xg(/<[/\w]/g,qe.textContent))return Ze(qe),!0;if(!z[Ct]||Y[Ct]){if(!Y[Ct]&&We(Ct)&&(U.tagNameCheck instanceof RegExp&&xg(U.tagNameCheck,Ct)||U.tagNameCheck instanceof Function&&U.tagNameCheck(Ct)))return!1;if(ge&&!X[Ct]){const Pt=_(qe)||qe.parentNode,an=y(qe)||qe.childNodes;if(an&&Pt){const _n=an.length;for(let on=_n-1;on>=0;--on)Pt.insertBefore(p(an[on],!0),g(qe))}}return Ze(qe),!0}return qe instanceof l&&!dn(qe)||(Ct==="noscript"||Ct==="noembed"||Ct==="noframes")&&xg(/<\/no(script|embed|frames)/i,qe.innerHTML)?(Ze(qe),!0):(de&&qe.nodeType===3&&(ft=qe.textContent,ft=vy(ft,A," "),ft=vy(ft,R," "),ft=vy(ft,P," "),qe.textContent!==ft&&(OV(e.removed,{element:qe.cloneNode()}),qe.textContent=ft)),bt("afterSanitizeElements",qe,null),!1)},$e=function(qe,ft,Ct){if(Te&&(ft==="id"||ft==="name")&&(Ct in r||Ct in At))return!1;if(!(se&&!J[ft]&&xg(O,ft))){if(!(ae&&xg(V,ft))){if(!K[ft]||J[ft]){if(!(We(qe)&&(U.tagNameCheck instanceof RegExp&&xg(U.tagNameCheck,qe)||U.tagNameCheck instanceof Function&&U.tagNameCheck(qe))&&(U.attributeNameCheck instanceof RegExp&&xg(U.attributeNameCheck,ft)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(ft))||ft==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&xg(U.tagNameCheck,Ct)||U.tagNameCheck instanceof Function&&U.tagNameCheck(Ct))))return!1}else if(!Ce[ft]){if(!xg(B,vy(Ct,$,""))){if(!((ft==="src"||ft==="xlink:href"||ft==="href")&&qe!=="script"&&Lhi(Ct,"data:")===0&&we[qe])){if(!(oe&&!xg(F,vy(Ct,$,"")))){if(Ct)return!1}}}}}}return!0},We=function(qe){return qe.indexOf("-")>0},tt=function(qe){let ft,Ct,Pt,an;bt("beforeSanitizeAttributes",qe,null);const{attributes:_n}=qe;if(!_n)return;const on={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:K};for(an=_n.length;an--;){ft=_n[an];const{name:yn,namespaceURI:fi}=ft;if(Ct=yn==="value"?ft.value:Thi(ft.value),Pt=rt(yn),on.attrName=Pt,on.attrValue=Ct,on.keepAttr=!0,on.forceKeepAttr=void 0,bt("uponSanitizeAttribute",qe,on),Ct=on.attrValue,on.forceKeepAttr||(dt(yn,qe),!on.keepAttr))continue;if(!fe&&xg(/\/>/i,Ct)){dt(yn,qe);continue}de&&(Ct=vy(Ct,A," "),Ct=vy(Ct,R," "),Ct=vy(Ct,P," "));const oi=rt(qe.nodeName);if($e(oi,Pt,Ct)){if(De&&(Pt==="id"||Pt==="name")&&(dt(yn,qe),Ct=Pe+Ct),w&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!fi)switch(f.getAttributeType(oi,Pt)){case"TrustedHTML":{Ct=w.createHTML(Ct);break}case"TrustedScriptURL":{Ct=w.createScriptURL(Ct);break}}try{fi?qe.setAttributeNS(fi,yn,Ct):qe.setAttribute(yn,Ct),Vot(e.removed)}catch{}}}bt("afterSanitizeAttributes",qe,null)},_t=function ht(qe){let ft;const Ct=mt(qe);for(bt("beforeSanitizeShadowDOM",qe,null);ft=Ct.nextNode();)bt("uponSanitizeShadowNode",ft,null),!wt(ft)&&(ft.content instanceof o&&ht(ft.content),tt(ft));bt("afterSanitizeShadowDOM",qe,null)};return e.sanitize=function(ht){let qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ft,Ct,Pt,an;if(ut=!ht,ut&&(ht="<!-->"),typeof ht!="string"&&!Ve(ht))if(typeof ht.toString=="function"){if(ht=ht.toString(),typeof ht!="string")throw jV("dirty is not a string, aborting")}else throw jV("toString is not a function");if(!e.isSupported)return ht;if(Q||vt(qe),e.removed=[],typeof ht=="string"&&(he=!1),he){if(ht.nodeName){const yn=rt(ht.nodeName);if(!z[yn]||Y[yn])throw jV("root node is forbidden and cannot be sanitized in-place")}}else if(ht instanceof a)ft=at("<!---->"),Ct=ft.ownerDocument.importNode(ht,!0),Ct.nodeType===1&&Ct.nodeName==="BODY"||Ct.nodeName==="HTML"?ft=Ct:ft.appendChild(Ct);else{if(!le&&!de&&!ie&&ht.indexOf("<")===-1)return w&&Le?w.createHTML(ht):ht;if(ft=at(ht),!ft)return le?null:Le?C:""}ft&&be&&Ze(ft.firstChild);const _n=mt(he?ht:ft);for(;Pt=_n.nextNode();)wt(Pt)||(Pt.content instanceof o&&_t(Pt.content),tt(Pt));if(he)return ht;if(le){if(Ne)for(an=D.call(ft.ownerDocument);ft.firstChild;)an.appendChild(ft.firstChild);else an=ft;return(K.shadowroot||K.shadowrootmode)&&(an=M.call(n,an,!0)),an}let on=ie?ft.outerHTML:ft.innerHTML;return ie&&z["!doctype"]&&ft.ownerDocument&&ft.ownerDocument.doctype&&ft.ownerDocument.doctype.name&&xg(C4t,ft.ownerDocument.doctype.name)&&(on="<!DOCTYPE "+ft.ownerDocument.doctype.name+`>
`+on),de&&(on=vy(on,A," "),on=vy(on,R," "),on=vy(on,P," ")),w&&Le?w.createHTML(on):on},e.setConfig=function(ht){vt(ht),Q=!0},e.clearConfig=function(){St=null,Q=!1},e.isValidAttribute=function(ht,qe,ft){St||vt({});const Ct=rt(ht),Pt=rt(qe);return $e(Ct,Pt,ft)},e.addHook=function(ht,qe){typeof qe=="function"&&(T[ht]=T[ht]||[],OV(T[ht],qe))},e.removeHook=function(ht){if(T[ht])return Vot(T[ht])},e.removeHooks=function(ht){T[ht]&&(T[ht]=[])},e.removeAllHooks=function(){T={}},e}var Iw=S4t();Iw.version;Iw.isSupported;const N4t=Iw.sanitize;Iw.setConfig;Iw.clearConfig;Iw.isValidAttribute;const E4t=Iw.addHook,D4t=Iw.removeHook;Iw.removeHooks;Iw.removeAllHooks;var Ti;(function(t){t.inMemory="inmemory",t.vscode="vscode",t.internal="private",t.walkThrough="walkThrough",t.walkThroughSnippet="walkThroughSnippet",t.http="http",t.https="https",t.file="file",t.mailto="mailto",t.untitled="untitled",t.data="data",t.command="command",t.vscodeRemote="vscode-remote",t.vscodeRemoteResource="vscode-remote-resource",t.vscodeManagedRemoteResource="vscode-managed-remote-resource",t.vscodeUserData="vscode-userdata",t.vscodeCustomEditor="vscode-custom-editor",t.vscodeNotebookCell="vscode-notebook-cell",t.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",t.vscodeNotebookCellOutput="vscode-notebook-cell-output",t.vscodeInteractiveInput="vscode-interactive-input",t.vscodeSettings="vscode-settings",t.vscodeWorkspaceTrust="vscode-workspace-trust",t.vscodeTerminal="vscode-terminal",t.vscodeChatCodeBlock="vscode-chat-code-block",t.vscodeCopilotBackingChatCodeBlock="vscode-copilot-chat-code-block",t.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",t.vscodeChatSesssion="vscode-chat-editor",t.webviewPanel="webview-panel",t.vscodeWebview="vscode-webview",t.extension="extension",t.vscodeFileResource="vscode-file",t.tmp="tmp",t.vsls="vsls",t.vscodeSourceControl="vscode-scm",t.commentsInput="comment",t.codeSetting="code-setting"})(Ti||(Ti={}));function M8e(t,e){return ri.isUri(t)?l4(t.scheme,e):_8e(t,e+":")}function SLe(t,...e){return e.some(n=>M8e(t,n))}const Whi="tkn";class Uhi{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return Dl.join(this._serverRootPath,Ti.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(a){return ji(a),e}const n=e.authority;let i=this._hosts[n];i&&i.indexOf(":")!==-1&&i.indexOf("[")===-1&&(i=`[${i}]`);const r=this._ports[n],o=this._connectionTokens[n];let s=`path=${encodeURIComponent(e.path)}`;return typeof o=="string"&&(s+=`&${Whi}=${encodeURIComponent(o)}`),ri.from({scheme:eM?this._preferredWebSchema:Ti.vscodeRemoteResource,authority:`${i}:${r}`,path:this._remoteResourcesPath,query:s})}}const k4t=new Uhi,Khi="vscode-app",YB=class YB{uriToBrowserUri(e){return e.scheme===Ti.vscodeRemote?k4t.rewrite(e):e.scheme===Ti.file&&(y0||Qci===`${Ti.vscodeFileResource}://${YB.FALLBACK_AUTHORITY}`)?e.with({scheme:Ti.vscodeFileResource,authority:e.authority||YB.FALLBACK_AUTHORITY,query:null,fragment:null}):e}};YB.FALLBACK_AUTHORITY=Khi;let NLe=YB;const M4t=new NLe;var Kot;(function(t){const e=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);t.CoopAndCoep=Object.freeze(e.get("3"));const n="vscode-coi";function i(o){let s;typeof o=="string"?s=new URL(o).searchParams:o instanceof URL?s=o.searchParams:ri.isUri(o)&&(s=new URL(o.toString(!0)).searchParams);const a=s==null?void 0:s.get(n);if(a)return e.get(a)}t.getHeadersFromQuery=i;function r(o,s,a){if(!globalThis.crossOriginIsolated)return;const l=s&&a?"3":a?"2":"1";o instanceof URLSearchParams?o.set(n,l):o[n]=l}t.addSearchParam=r})(Kot||(Kot={}));function Lfe(t){return Tfe(t,0)}function Tfe(t,e){switch(typeof t){case"object":return t===null?rC(349,e):Array.isArray(t)?Ghi(t,e):Yhi(t,e);case"string":return L8e(t,e);case"boolean":return qhi(t,e);case"number":return rC(t,e);case"undefined":return rC(937,e);default:return rC(617,e)}}function rC(t,e){return(e<<5)-e+t|0}function qhi(t,e){return rC(t?433:863,e)}function L8e(t,e){e=rC(149417,e);for(let n=0,i=t.length;n<i;n++)e=rC(t.charCodeAt(n),e);return e}function Ghi(t,e){return e=rC(104579,e),t.reduce((n,i)=>Tfe(i,n),e)}function Yhi(t,e){return e=rC(181387,e),Object.keys(t).sort().reduce((n,i)=>(n=L8e(i,n),Tfe(t[i],n)),e)}function Dwe(t,e,n=32){const i=n-e,r=~((1<<i)-1);return(t<<e|(r&t)>>>i)>>>0}function qot(t,e=0,n=t.byteLength,i=0){for(let r=0;r<n;r++)t[e+r]=i}function Xhi(t,e,n="0"){for(;t.length<e;)t=n+t;return t}function FV(t,e=32){return t instanceof ArrayBuffer?Array.from(new Uint8Array(t)).map(n=>n.toString(16).padStart(2,"0")).join(""):Xhi((t>>>0).toString(16),e/4)}const Lle=class Lle{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const n=e.length;if(n===0)return;const i=this._buff;let r=this._buffLen,o=this._leftoverHighSurrogate,s,a;for(o!==0?(s=o,a=-1,o=0):(s=e.charCodeAt(0),a=0);;){let l=s;if(sc(s))if(a+1<n){const c=e.charCodeAt(a+1);z2(c)?(a++,l=x8e(s,c)):l=65533}else{o=s;break}else z2(s)&&(l=65533);if(r=this._push(i,r,l),a++,a<n)s=e.charCodeAt(a);else break}this._buffLen=r,this._leftoverHighSurrogate=o}_push(e,n,i){return i<128?e[n++]=i:i<2048?(e[n++]=192|(i&1984)>>>6,e[n++]=128|(i&63)>>>0):i<65536?(e[n++]=224|(i&61440)>>>12,e[n++]=128|(i&4032)>>>6,e[n++]=128|(i&63)>>>0):(e[n++]=240|(i&1835008)>>>18,e[n++]=128|(i&258048)>>>12,e[n++]=128|(i&4032)>>>6,e[n++]=128|(i&63)>>>0),n>=64&&(this._step(),n-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),n}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),FV(this._h0)+FV(this._h1)+FV(this._h2)+FV(this._h3)+FV(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,qot(this._buff,this._buffLen),this._buffLen>56&&(this._step(),qot(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=Lle._bigBlock32,n=this._buffDV;for(let d=0;d<64;d+=4)e.setUint32(d,n.getUint32(d,!1),!1);for(let d=64;d<320;d+=4)e.setUint32(d,Dwe(e.getUint32(d-12,!1)^e.getUint32(d-32,!1)^e.getUint32(d-56,!1)^e.getUint32(d-64,!1),1),!1);let i=this._h0,r=this._h1,o=this._h2,s=this._h3,a=this._h4,l,c,u;for(let d=0;d<80;d++)d<20?(l=r&o|~r&s,c=1518500249):d<40?(l=r^o^s,c=1859775393):d<60?(l=r&o|r&s|o&s,c=2400959708):(l=r^o^s,c=3395469782),u=Dwe(i,5)+l+a+c+e.getUint32(d*4,!1)&4294967295,a=s,s=o,o=Dwe(r,30),r=i,i=u;this._h0=this._h0+i&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+o&4294967295,this._h3=this._h3+s&4294967295,this._h4=this._h4+a&4294967295}};Lle._bigBlock32=new DataView(new ArrayBuffer(320));let ELe=Lle;const{registerWindow:W3r,getWindow:ei,getDocument:U3r,getWindows:L4t,getWindowsCount:Zhi,getWindowId:Hie,getWindowById:Got,hasWindow:K3r,onDidRegisterWindow:Ife,onWillUnregisterWindow:Qhi,onDidUnregisterWindow:Jhi}=function(){const t=new Map;zdi(Go,1);const e={window:Go,disposables:new Lt};t.set(Go.vscodeWindowId,e);const n=new st,i=new st,r=new st;function o(s,a){return(typeof s=="number"?t.get(s):void 0)??(a?e:void 0)}return{onDidRegisterWindow:n.event,onWillUnregisterWindow:r.event,onDidUnregisterWindow:i.event,registerWindow(s){if(t.has(s.vscodeWindowId))return ct.None;const a=new Lt,l={window:s,disposables:a.add(new Lt)};return t.set(s.vscodeWindowId,l),a.add(Kn(()=>{t.delete(s.vscodeWindowId),i.fire(s)})),a.add(yt(s,Yt.BEFORE_UNLOAD,()=>{r.fire(s)})),n.fire(l),a},getWindows(){return t.values()},getWindowsCount(){return t.size},getWindowId(s){return s.vscodeWindowId},hasWindow(s){return t.has(s)},getWindowById:o,getWindow(s){var c;const a=s;if((c=a==null?void 0:a.ownerDocument)!=null&&c.defaultView)return a.ownerDocument.defaultView.window;const l=s;return l!=null&&l.view?l.view.window:Go},getDocument(s){return ei(s).document}}}();function ru(t){for(;t.firstChild;)t.firstChild.remove()}class efi{constructor(e,n,i,r){this._node=e,this._type=n,this._handler=i,this._options=r||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function yt(t,e,n,i){return new efi(t,e,n,i)}function T4t(t,e){return function(n){return e(new uv(t,n))}}function tfi(t){return function(e){return t(new as(e))}}const Fa=function(e,n,i,r){let o=i;return n==="click"||n==="mousedown"||n==="contextmenu"?o=T4t(ei(e),i):(n==="keydown"||n==="keypress"||n==="keyup")&&(o=tfi(i)),yt(e,n,o,r)},nfi=function(e,n,i){const r=T4t(ei(e),n);return ifi(e,r,i)};function ifi(t,e,n){return yt(t,W0&&E8e.pointerEvents?Yt.POINTER_DOWN:Yt.MOUSE_DOWN,e,n)}function q7(t,e,n){return H9(t,e,n)}class kwe extends _4t{constructor(e,n){super(e,n)}}let Wie,Im;class T8e extends k8e{constructor(e){super(),this.defaultTarget=e&&ei(e)}cancelAndSet(e,n,i){return super.cancelAndSet(e,n,i??this.defaultTarget)}}class Mwe{constructor(e,n=0){this._runner=e,this.priority=n,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){ji(e)}}static sort(e,n){return n.priority-e.priority}}(function(){const t=new Map,e=new Map,n=new Map,i=new Map,r=o=>{n.set(o,!1);const s=t.get(o)??[];for(e.set(o,s),t.set(o,[]),i.set(o,!0);s.length>0;)s.sort(Mwe.sort),s.shift().execute();i.set(o,!1)};Im=(o,s,a=0)=>{const l=Hie(o),c=new Mwe(s,a);let u=t.get(l);return u||(u=[],t.set(l,u)),u.push(c),n.get(l)||(n.set(l,!0),o.requestAnimationFrame(()=>r(l))),c},Wie=(o,s,a)=>{const l=Hie(o);if(i.get(l)){const c=new Mwe(s,a);let u=e.get(l);return u||(u=[],e.set(l,u)),u.push(c),c}else return Im(o,s,a)}})();function Afe(t){return ei(t).getComputedStyle(t,null)}function hk(t,e){const n=ei(t),i=n.document;if(t!==i.body)return new Do(t.clientWidth,t.clientHeight);if(W0&&(n!=null&&n.visualViewport))return new Do(n.visualViewport.width,n.visualViewport.height);if(n!=null&&n.innerWidth&&n.innerHeight)return new Do(n.innerWidth,n.innerHeight);if(i.body&&i.body.clientWidth&&i.body.clientHeight)return new Do(i.body.clientWidth,i.body.clientHeight);if(i.documentElement&&i.documentElement.clientWidth&&i.documentElement.clientHeight)return new Do(i.documentElement.clientWidth,i.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class Ha{static convertToPixels(e,n){return parseFloat(n)||0}static getDimension(e,n,i){const r=Afe(e),o=r?r.getPropertyValue(n):"0";return Ha.convertToPixels(e,o)}static getBorderLeftWidth(e){return Ha.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return Ha.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return Ha.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return Ha.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return Ha.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return Ha.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return Ha.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return Ha.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return Ha.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return Ha.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return Ha.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return Ha.getDimension(e,"margin-bottom","marginBottom")}}const vT=class vT{constructor(e,n){this.width=e,this.height=n}with(e=this.width,n=this.height){return e!==this.width||n!==this.height?new vT(e,n):this}static is(e){return typeof e=="object"&&typeof e.height=="number"&&typeof e.width=="number"}static lift(e){return e instanceof vT?e:new vT(e.width,e.height)}static equals(e,n){return e===n?!0:!e||!n?!1:e.width===n.width&&e.height===n.height}};vT.None=new vT(0,0);let Do=vT;function I4t(t){let e=t.offsetParent,n=t.offsetTop,i=t.offsetLeft;for(;(t=t.parentNode)!==null&&t!==t.ownerDocument.body&&t!==t.ownerDocument.documentElement;){n-=t.scrollTop;const r=R4t(t)?null:Afe(t);r&&(i-=r.direction!=="rtl"?t.scrollLeft:-t.scrollLeft),t===e&&(i+=Ha.getBorderLeftWidth(t),n+=Ha.getBorderTopWidth(t),n+=t.offsetTop,i+=t.offsetLeft,e=t.offsetParent)}return{left:i,top:n}}function rfi(t,e,n){typeof e=="number"&&(t.style.width=`${e}px`),typeof n=="number"&&(t.style.height=`${n}px`)}function Ga(t){const e=t.getBoundingClientRect(),n=ei(t);return{left:e.left+n.scrollX,top:e.top+n.scrollY,width:e.width,height:e.height}}function A4t(t){let e=t,n=1;do{const i=Afe(e).zoom;i!=null&&i!=="1"&&(n*=i),e=e.parentElement}while(e!==null&&e!==e.ownerDocument.documentElement);return n}function Jf(t){const e=Ha.getMarginLeft(t)+Ha.getMarginRight(t);return t.offsetWidth+e}function Lwe(t){const e=Ha.getBorderLeftWidth(t)+Ha.getBorderRightWidth(t),n=Ha.getPaddingLeft(t)+Ha.getPaddingRight(t);return t.offsetWidth-e-n}function ofi(t){const e=Ha.getBorderTopWidth(t)+Ha.getBorderBottomWidth(t),n=Ha.getPaddingTop(t)+Ha.getPaddingBottom(t);return t.offsetHeight-e-n}function oC(t){const e=Ha.getMarginTop(t)+Ha.getMarginBottom(t);return t.offsetHeight+e}function ac(t,e){return!!(e!=null&&e.contains(t))}function sfi(t,e,n){for(;t&&t.nodeType===t.ELEMENT_NODE;){if(t.classList.contains(e))return t;if(n){if(typeof n=="string"){if(t.classList.contains(n))return null}else if(t===n)return null}t=t.parentNode}return null}function Twe(t,e,n){return!!sfi(t,e,n)}function R4t(t){return t&&!!t.host&&!!t.mode}function Uie(t){return!!W2(t)}function W2(t){var e;for(;t.parentNode;){if(t===((e=t.ownerDocument)==null?void 0:e.body))return null;t=t.parentNode}return R4t(t)?t:null}function Au(){let t=M6().activeElement;for(;t!=null&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function Rfe(t){return Au()===t}function P4t(t){return ac(Au(),t)}function M6(){return Zhi()<=1?Go.document:Array.from(L4t()).map(({window:e})=>e.document).find(e=>e.hasFocus())??Go.document}function tte(){var e;return((e=M6().defaultView)==null?void 0:e.window)??Go}const I8e=new Map;function O4t(){return new afi}class afi{constructor(){this._currentCssStyle="",this._styleSheet=void 0}setStyle(e){e!==this._currentCssStyle&&(this._currentCssStyle=e,this._styleSheet?this._styleSheet.innerText=e:this._styleSheet=Wp(Go.document.head,n=>n.innerText=e))}dispose(){this._styleSheet&&(this._styleSheet.remove(),this._styleSheet=void 0)}}function Wp(t=Go.document.head,e,n){const i=document.createElement("style");if(i.type="text/css",i.media="screen",e==null||e(i),t.appendChild(i),n&&n.add(Kn(()=>i.remove())),t===Go.document.head){const r=new Set;I8e.set(i,r);for(const{window:o,disposables:s}of L4t()){if(o===Go)continue;const a=s.add(lfi(i,r,o));n==null||n.add(a)}}return i}function lfi(t,e,n){var o,s;const i=new Lt,r=t.cloneNode(!0);n.document.head.appendChild(r),i.add(Kn(()=>r.remove()));for(const a of F4t(t))(s=r.sheet)==null||s.insertRule(a.cssText,(o=r.sheet)==null?void 0:o.cssRules.length);return i.add(cfi.observe(t,i,{childList:!0})(()=>{r.textContent=t.textContent})),e.add(r),i.add(Kn(()=>e.delete(r))),i}const cfi=new class{constructor(){this.mutationObservers=new Map}observe(t,e,n){let i=this.mutationObservers.get(t);i||(i=new Map,this.mutationObservers.set(t,i));const r=Lfe(n);let o=i.get(r);if(o)o.users+=1;else{const s=new st,a=new MutationObserver(c=>s.fire(c));a.observe(t,n);const l=o={users:1,observer:a,onDidMutate:s.event};e.add(Kn(()=>{l.users-=1,l.users===0&&(s.dispose(),a.disconnect(),i==null||i.delete(r),(i==null?void 0:i.size)===0&&this.mutationObservers.delete(t))})),i.set(r,o)}return o.onDidMutate}};let Iwe=null;function j4t(){return Iwe||(Iwe=Wp()),Iwe}function F4t(t){var e,n;return(e=t==null?void 0:t.sheet)!=null&&e.rules?t.sheet.rules:(n=t==null?void 0:t.sheet)!=null&&n.cssRules?t.sheet.cssRules:[]}function Kie(t,e,n=j4t()){var i;if(!(!n||!e)){(i=n.sheet)==null||i.insertRule(`${t} {${e}}`,0);for(const r of I8e.get(n)??[])Kie(t,e,r)}}function DLe(t,e=j4t()){var r;if(!e)return;const n=F4t(e),i=[];for(let o=0;o<n.length;o++){const s=n[o];ufi(s)&&s.selectorText.indexOf(t)!==-1&&i.push(o)}for(let o=i.length-1;o>=0;o--)(r=e.sheet)==null||r.deleteRule(i[o]);for(const o of I8e.get(e)??[])DLe(t,o)}function ufi(t){return typeof t.selectorText=="string"}function uc(t){return t instanceof HTMLElement||t instanceof ei(t).HTMLElement}function Yot(t){return t instanceof HTMLAnchorElement||t instanceof ei(t).HTMLAnchorElement}function dfi(t){return t instanceof SVGElement||t instanceof ei(t).SVGElement}function A8e(t){return t instanceof MouseEvent||t instanceof ei(t).MouseEvent}function U1(t){return t instanceof KeyboardEvent||t instanceof ei(t).KeyboardEvent}const Yt={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:oI?"webkitAnimationStart":"animationstart",ANIMATION_END:oI?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:oI?"webkitAnimationIteration":"animationiteration"};function hfi(t){const e=t;return!!(e&&typeof e.preventDefault=="function"&&typeof e.stopPropagation=="function")}const Mr={stop:(t,e)=>(t.preventDefault(),e&&t.stopPropagation(),t)};function ffi(t){const e=[];for(let n=0;t&&t.nodeType===t.ELEMENT_NODE;n++)e[n]=t.scrollTop,t=t.parentNode;return e}function mfi(t,e){for(let n=0;t&&t.nodeType===t.ELEMENT_NODE;n++)t.scrollTop!==e[n]&&(t.scrollTop=e[n]),t=t.parentNode}class qie extends ct{static hasFocusWithin(e){if(uc(e)){const n=W2(e),i=n?n.activeElement:e.ownerDocument.activeElement;return ac(i,e)}else{const n=e;return ac(n.document.activeElement,n.document)}}constructor(e){super(),this._onDidFocus=this._register(new st),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new st),this.onDidBlur=this._onDidBlur.event;let n=qie.hasFocusWithin(e),i=!1;const r=()=>{i=!1,n||(n=!0,this._onDidFocus.fire())},o=()=>{n&&(i=!0,(uc(e)?ei(e):e).setTimeout(()=>{i&&(i=!1,n=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{qie.hasFocusWithin(e)!==n&&(n?o():r())},this._register(yt(e,Yt.FOCUS,r,!0)),this._register(yt(e,Yt.BLUR,o,!0)),uc(e)&&(this._register(yt(e,Yt.FOCUS_IN,()=>this._refreshStateHandler())),this._register(yt(e,Yt.FOCUS_OUT,()=>this._refreshStateHandler())))}}function q0(t){return new qie(t)}function pfi(t,e){return t.after(e),e}function jt(t,...e){if(t.append(...e),e.length===1&&typeof e[0]!="string")return e[0]}function R8e(t,e){return t.insertBefore(e,t.firstChild),e}function ou(t,...e){t.innerText="",jt(t,...e)}const gfi=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var NH;(function(t){t.HTML="http://www.w3.org/1999/xhtml",t.SVG="http://www.w3.org/2000/svg"})(NH||(NH={}));function $4t(t,e,n,...i){const r=gfi.exec(e);if(!r)throw new Error("Bad use of emmet");const o=r[1]||"div";let s;return t!==NH.HTML?s=document.createElementNS(t,o):s=document.createElement(o),r[3]&&(s.id=r[3]),r[4]&&(s.className=r[4].replace(/\./g," ").trim()),n&&Object.entries(n).forEach(([a,l])=>{typeof l>"u"||(/^on\w+$/.test(a)?s[a]=l:a==="selected"?l&&s.setAttribute(a,"true"):s.setAttribute(a,l))}),s.append(...i),s}function Xt(t,e,...n){return $4t(NH.HTML,t,e,...n)}Xt.SVG=function(t,e,...n){return $4t(NH.SVG,t,e,...n)};function bfi(t,...e){t?um(...e):yh(...e)}function um(...t){for(const e of t)e.style.display="",e.removeAttribute("aria-hidden")}function yh(...t){for(const e of t)e.style.display="none",e.setAttribute("aria-hidden","true")}function Xot(t,e){const n=t.devicePixelRatio*e;return Math.max(1,Math.floor(n))/t.devicePixelRatio}function V4t(t){Go.open(t,"_blank","noopener")}function vfi(t,e){const n=()=>{e(),i=Im(t,n)};let i=Im(t,n);return Kn(()=>i.dispose())}k4t.setPreferredWebSchema(/^https:/.test(Go.location.href)?"https":"http");function fS(t){return t?`url('${M4t.uriToBrowserUri(t).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function Awe(t){return`'${t.replace(/'/g,"%27")}'`}function TC(t,e){if(t!==void 0){const n=t.match(/^\s*var\((.+)\)$/);if(n){const i=n[1].split(",",2);return i.length===2&&(e=TC(i[1].trim(),e)),`var(${i[0]}, ${e})`}return t}return e}function yfi(t,e=!1){const n=document.createElement("a");return E4t("afterSanitizeAttributes",i=>{for(const r of["href","src"])if(i.hasAttribute(r)){const o=i.getAttribute(r);if(r==="href"&&o.startsWith("#"))continue;if(n.href=o,!t.includes(n.protocol.replace(/:$/,""))){if(e&&r==="src"&&n.href.startsWith("data:"))continue;i.removeAttribute(r)}}}),Kn(()=>{D4t("afterSanitizeAttributes")})}const _fi=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);class sC extends st{constructor(){super(),this._subscriptions=new Lt,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(rn.runAndSubscribe(Ife,({window:e,disposables:n})=>this.registerListeners(e,n),{window:Go,disposables:this._subscriptions}))}registerListeners(e,n){n.add(yt(e,"keydown",i=>{if(i.defaultPrevented)return;const r=new as(i);if(!(r.keyCode===6&&i.repeat)){if(i.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(i.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(i.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(i.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(r.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=i.altKey,this._keyStatus.ctrlKey=i.ctrlKey,this._keyStatus.metaKey=i.metaKey,this._keyStatus.shiftKey=i.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=i,this.fire(this._keyStatus))}},!0)),n.add(yt(e,"keyup",i=>{i.defaultPrevented||(!i.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!i.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!i.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!i.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=i.altKey,this._keyStatus.ctrlKey=i.ctrlKey,this._keyStatus.metaKey=i.metaKey,this._keyStatus.shiftKey=i.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=i,this.fire(this._keyStatus)))},!0)),n.add(yt(e.document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),n.add(yt(e.document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),n.add(yt(e.document.body,"mousemove",i=>{i.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),n.add(yt(e,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return sC.instance||(sC.instance=new sC),sC.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class xfi extends ct{constructor(e,n){super(),this.element=e,this.callbacks=n,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this.callbacks.onDragStart&&this._register(yt(this.element,Yt.DRAG_START,e=>{var n,i;(i=(n=this.callbacks).onDragStart)==null||i.call(n,e)})),this.callbacks.onDrag&&this._register(yt(this.element,Yt.DRAG,e=>{var n,i;(i=(n=this.callbacks).onDrag)==null||i.call(n,e)})),this._register(yt(this.element,Yt.DRAG_ENTER,e=>{var n,i;this.counter++,this.dragStartTime=e.timeStamp,(i=(n=this.callbacks).onDragEnter)==null||i.call(n,e)})),this._register(yt(this.element,Yt.DRAG_OVER,e=>{var n,i;e.preventDefault(),(i=(n=this.callbacks).onDragOver)==null||i.call(n,e,e.timeStamp-this.dragStartTime)})),this._register(yt(this.element,Yt.DRAG_LEAVE,e=>{var n,i;this.counter--,this.counter===0&&(this.dragStartTime=0,(i=(n=this.callbacks).onDragLeave)==null||i.call(n,e))})),this._register(yt(this.element,Yt.DRAG_END,e=>{var n,i;this.counter=0,this.dragStartTime=0,(i=(n=this.callbacks).onDragEnd)==null||i.call(n,e)})),this._register(yt(this.element,Yt.DROP,e=>{var n,i;this.counter=0,this.dragStartTime=0,(i=(n=this.callbacks).onDrop)==null||i.call(n,e)}))}}const B4t=/(?<tag>[\w\-]+)?(?:#(?<id>[\w\-]+))?(?<class>(?:\.(?:[\w\-]+))*)(?:@(?<name>(?:[\w\_])+))?/;function pr(t,...e){let n,i;Array.isArray(e[0])?(n={},i=e[0]):(n=e[0]||{},i=e[1]);const r=B4t.exec(t);if(!r||!r.groups)throw new Error("Bad use of h");const o=r.groups.tag||"div",s=document.createElement(o);r.groups.id&&(s.id=r.groups.id);const a=[];if(r.groups.class)for(const c of r.groups.class.split("."))c!==""&&a.push(c);if(n.className!==void 0)for(const c of n.className.split("."))c!==""&&a.push(c);a.length>0&&(s.className=a.join(" "));const l={};if(r.groups.name&&(l[r.groups.name]=s),i)for(const c of i)uc(c)?s.appendChild(c):typeof c=="string"?s.append(c):"root"in c&&(Object.assign(l,c),s.appendChild(c.root));for(const[c,u]of Object.entries(n))if(c!=="className")if(c==="style")for(const[d,h]of Object.entries(u))s.style.setProperty(Gie(d),typeof h=="number"?h+"px":""+h);else c==="tabIndex"?s.tabIndex=u:s.setAttribute(Gie(c),u.toString());return l.root=s,l}function qP(t,...e){let n,i;Array.isArray(e[0])?(n={},i=e[0]):(n=e[0]||{},i=e[1]);const r=B4t.exec(t);if(!r||!r.groups)throw new Error("Bad use of h");const o=r.groups.tag||"div",s=document.createElementNS("http://www.w3.org/2000/svg",o);r.groups.id&&(s.id=r.groups.id);const a=[];if(r.groups.class)for(const c of r.groups.class.split("."))c!==""&&a.push(c);if(n.className!==void 0)for(const c of n.className.split("."))c!==""&&a.push(c);a.length>0&&(s.className=a.join(" "));const l={};if(r.groups.name&&(l[r.groups.name]=s),i)for(const c of i)uc(c)?s.appendChild(c):typeof c=="string"?s.append(c):"root"in c&&(Object.assign(l,c),s.appendChild(c.root));for(const[c,u]of Object.entries(n))if(c!=="className")if(c==="style")for(const[d,h]of Object.entries(u))s.style.setProperty(Gie(d),typeof h=="number"?h+"px":""+h);else c==="tabIndex"?s.tabIndex=u:s.setAttribute(Gie(c),u.toString());return l.root=s,l}function Gie(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}class wfi extends ct{constructor(e){super(),this._onDidChange=this._register(new st),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(e,!0),this._mediaQueryList=null,this._handleChange(e,!1)}_handleChange(e,n){var i;(i=this._mediaQueryList)==null||i.removeEventListener("change",this._listener),this._mediaQueryList=e.matchMedia(`(resolution: ${e.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),n&&this._onDidChange.fire()}}class Cfi extends ct{get value(){return this._value}constructor(e){super(),this._onDidChange=this._register(new st),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio(e);const n=this._register(new wfi(e));this._register(n.onDidChange(()=>{this._value=this._getPixelRatio(e),this._onDidChange.fire(this._value)}))}_getPixelRatio(e){const n=document.createElement("canvas").getContext("2d"),i=e.devicePixelRatio||1,r=n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1;return i/r}}class Sfi{constructor(){this.mapWindowIdToPixelRatioMonitor=new Map}_getOrCreatePixelRatioMonitor(e){const n=Hie(e);let i=this.mapWindowIdToPixelRatioMonitor.get(n);return i||(i=new Cfi(e),this.mapWindowIdToPixelRatioMonitor.set(n,i),rn.once(Jhi)(({vscodeWindowId:r})=>{r===n&&(i==null||i.dispose(),this.mapWindowIdToPixelRatioMonitor.delete(n))})),i}getInstance(e){return this._getOrCreatePixelRatioMonitor(e)}}const EH=new Sfi;class z4t{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const n=yy(e);this._maxWidth!==n&&(this._maxWidth=n,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const n=yy(e);this._width!==n&&(this._width=n,this.domNode.style.width=this._width)}setHeight(e){const n=yy(e);this._height!==n&&(this._height=n,this.domNode.style.height=this._height)}setTop(e){const n=yy(e);this._top!==n&&(this._top=n,this.domNode.style.top=this._top)}setLeft(e){const n=yy(e);this._left!==n&&(this._left=n,this.domNode.style.left=this._left)}setBottom(e){const n=yy(e);this._bottom!==n&&(this._bottom=n,this.domNode.style.bottom=this._bottom)}setRight(e){const n=yy(e);this._right!==n&&(this._right=n,this.domNode.style.right=this._right)}setPaddingLeft(e){const n=yy(e);this._paddingLeft!==n&&(this._paddingLeft=n,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const n=yy(e);this._fontSize!==n&&(this._fontSize=n,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const n=yy(e);this._lineHeight!==n&&(this._lineHeight=n,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const n=yy(e);this._letterSpacing!==n&&(this._letterSpacing=n,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,n){this.domNode.classList.toggle(e,n),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,n){this.domNode.setAttribute(e,n)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function yy(t){return typeof t=="number"?`${t}px`:t}function wo(t){return new z4t(t)}function su(t,e){t instanceof z4t?(t.setFontFamily(e.getMassagedFontFamily()),t.setFontWeight(e.fontWeight),t.setFontSize(e.fontSize),t.setFontFeatureSettings(e.fontFeatureSettings),t.setFontVariationSettings(e.fontVariationSettings),t.setLineHeight(e.lineHeight),t.setLetterSpacing(e.letterSpacing)):(t.style.fontFamily=e.getMassagedFontFamily(),t.style.fontWeight=e.fontWeight,t.style.fontSize=e.fontSize+"px",t.style.fontFeatureSettings=e.fontFeatureSettings,t.style.fontVariationSettings=e.fontVariationSettings,t.style.lineHeight=e.lineHeight+"px",t.style.letterSpacing=e.letterSpacing+"px")}class Nfi{constructor(e,n){this.chr=e,this.type=n,this.width=0}fulfill(e){this.width=e}}class P8e{constructor(e,n){this._bareFontInfo=e,this._requests=n,this._container=null,this._testElements=null}read(e){var n;this._createDomElements(),e.document.body.appendChild(this._container),this._readFromDomElements(),(n=this._container)==null||n.remove(),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const n=document.createElement("div");su(n,this._bareFontInfo),e.appendChild(n);const i=document.createElement("div");su(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const r=document.createElement("div");su(r,this._bareFontInfo),r.style.fontStyle="italic",e.appendChild(r);const o=[];for(const s of this._requests){let a;s.type===0&&(a=n),s.type===2&&(a=i),s.type===1&&(a=r),a.appendChild(document.createElement("br"));const l=document.createElement("span");P8e._render(l,s),a.appendChild(l),o.push(l)}this._container=e,this._testElements=o}static _render(e,n){if(n.chr===" "){let i=" ";for(let r=0;r<8;r++)i+=i;e.innerText=i}else{let i=n.chr;for(let r=0;r<8;r++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,n=this._requests.length;e<n;e++){const i=this._requests[e],r=this._testElements[e];i.fulfill(r.offsetWidth/256)}}}function Efi(t,e,n){new P8e(e,n).read(t)}const jg=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new st,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(t){t=Math.min(Math.max(-5,t),20),this._zoomLevel!==t&&(this._zoomLevel=t,this._onDidChangeZoomLevel.fire(this._zoomLevel))}},Dfi=xr?1.5:1.35,Rwe=8;class sI{static createFromValidatedSettings(e,n,i){const r=e.get(49),o=e.get(53),s=e.get(52),a=e.get(51),l=e.get(54),c=e.get(67),u=e.get(64);return sI._create(r,o,s,a,l,c,u,n,i)}static _create(e,n,i,r,o,s,a,l,c){s===0?s=Dfi*i:s<Rwe&&(s=s*i),s=Math.round(s),s<Rwe&&(s=Rwe);const u=1+(c?0:jg.getZoomLevel()*.1);return i*=u,s*=u,o===bH.TRANSLATE&&(n==="normal"||n==="bold"?o=bH.OFF:(o=`'wght' ${parseInt(n,10)}`,n="normal")),new sI({pixelRatio:l,fontFamily:e,fontWeight:n,fontSize:i,fontFeatureSettings:r,fontVariationSettings:o,lineHeight:s,letterSpacing:a})}constructor(e){this._bareFontInfoBrand=void 0,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.fontVariationSettings=e.fontVariationSettings,this.lineHeight=e.lineHeight|0,this.letterSpacing=e.letterSpacing}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.fontVariationSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){const e=Rh.fontFamily,n=sI._wrapInQuotes(this.fontFamily);return e&&this.fontFamily!==e?`${n}, ${e}`:n}static _wrapInQuotes(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?`"${e}"`:e}}const kfi=2;class kLe extends sI{constructor(e,n){super(e),this._editorStylingBrand=void 0,this.version=kfi,this.isTrusted=n,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.fontVariationSettings===e.fontVariationSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}class Mfi extends ct{constructor(){super(...arguments),this._cache=new Map,this._evictUntrustedReadingsTimeout=-1,this._onDidChange=this._register(new st),this.onDidChange=this._onDidChange.event}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache.clear(),this._onDidChange.fire()}_ensureCache(e){const n=Hie(e);let i=this._cache.get(n);return i||(i=new Lfi,this._cache.set(n,i)),i}_writeToCache(e,n,i){this._ensureCache(e).put(n,i),!i.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=e.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings(e)},5e3))}_evictUntrustedReadings(e){const n=this._ensureCache(e),i=n.getValues();let r=!1;for(const o of i)o.isTrusted||(r=!0,n.remove(o));r&&this._onDidChange.fire()}readFontInfo(e,n){const i=this._ensureCache(e);if(!i.has(n)){let r=this._actualReadFontInfo(e,n);(r.typicalHalfwidthCharacterWidth<=2||r.typicalFullwidthCharacterWidth<=2||r.spaceWidth<=2||r.maxDigitWidth<=2)&&(r=new kLe({pixelRatio:EH.getInstance(e).value,fontFamily:r.fontFamily,fontWeight:r.fontWeight,fontSize:r.fontSize,fontFeatureSettings:r.fontFeatureSettings,fontVariationSettings:r.fontVariationSettings,lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,isMonospace:r.isMonospace,typicalHalfwidthCharacterWidth:Math.max(r.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(r.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:r.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(r.spaceWidth,5),middotWidth:Math.max(r.middotWidth,5),wsmiddotWidth:Math.max(r.wsmiddotWidth,5),maxDigitWidth:Math.max(r.maxDigitWidth,5)},!1)),this._writeToCache(e,n,r)}return i.get(n)}_createRequest(e,n,i,r){const o=new Nfi(e,n);return i.push(o),r==null||r.push(o),o}_actualReadFontInfo(e,n){const i=[],r=[],o=this._createRequest("n",0,i,r),s=this._createRequest("ｍ",0,i,null),a=this._createRequest(" ",0,i,r),l=this._createRequest("0",0,i,r),c=this._createRequest("1",0,i,r),u=this._createRequest("2",0,i,r),d=this._createRequest("3",0,i,r),h=this._createRequest("4",0,i,r),f=this._createRequest("5",0,i,r),m=this._createRequest("6",0,i,r),p=this._createRequest("7",0,i,r),g=this._createRequest("8",0,i,r),y=this._createRequest("9",0,i,r),_=this._createRequest("→",0,i,r),w=this._createRequest("￫",0,i,null),C=this._createRequest("·",0,i,r),N=this._createRequest("⸱",0,i,null),E="|/-_ilm%";for(let A=0,R=E.length;A<R;A++)this._createRequest(E.charAt(A),0,i,r),this._createRequest(E.charAt(A),1,i,r),this._createRequest(E.charAt(A),2,i,r);Efi(e,n,i);const D=Math.max(l.width,c.width,u.width,d.width,h.width,f.width,m.width,p.width,g.width,y.width);let k=n.fontFeatureSettings===sk.OFF;const M=r[0].width;for(let A=1,R=r.length;k&&A<R;A++){const P=M-r[A].width;if(P<-.001||P>.001){k=!1;break}}let T=!0;return k&&w.width!==M&&(T=!1),w.width>_.width&&(T=!1),new kLe({pixelRatio:EH.getInstance(e).value,fontFamily:n.fontFamily,fontWeight:n.fontWeight,fontSize:n.fontSize,fontFeatureSettings:n.fontFeatureSettings,fontVariationSettings:n.fontVariationSettings,lineHeight:n.lineHeight,letterSpacing:n.letterSpacing,isMonospace:k,typicalHalfwidthCharacterWidth:o.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:T,spaceWidth:a.width,middotWidth:C.width,wsmiddotWidth:N.width,maxDigitWidth:D},!0)}}class Lfi{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const n=e.getId();return!!this._values[n]}get(e){const n=e.getId();return this._values[n]}put(e,n){const i=e.getId();this._keys[i]=e,this._values[i]=n}remove(e){const n=e.getId();delete this._keys[n],delete this._values[n]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}const MLe=new Mfi;var a0;(function(t){t.serviceIds=new Map,t.DI_TARGET="$di$target",t.DI_DEPENDENCIES="$di$dependencies";function e(n){return n[t.DI_DEPENDENCIES]||[]}t.getServiceDependencies=e})(a0||(a0={}));const qn=Sr("instantiationService");function Tfi(t,e,n){e[a0.DI_TARGET]===e?e[a0.DI_DEPENDENCIES].push({id:t,index:n}):(e[a0.DI_DEPENDENCIES]=[{id:t,index:n}],e[a0.DI_TARGET]=e)}function Sr(t){if(a0.serviceIds.has(t))return a0.serviceIds.get(t);const e=function(n,i,r){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Tfi(e,n,r)};return e.toString=()=>t,a0.serviceIds.set(t,e),e}const Yr=Sr("codeEditorService"),Ds=Sr("modelService"),Rf=Sr("textModelService");class xm extends ct{constructor(e,n="",i="",r=!0,o){super(),this._onDidChange=this._register(new st),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=n,this._cssClass=i,this._enabled=r,this._actionCallback=o}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}async run(e,n){this._actionCallback&&await this._actionCallback(e)}}class U2 extends ct{constructor(){super(...arguments),this._onWillRun=this._register(new st),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new st),this.onDidRun=this._onDidRun.event}async run(e,n){if(!e.enabled)return;this._onWillRun.fire({action:e});let i;try{await this.runAction(e,n)}catch(r){i=r}this._onDidRun.fire({action:e,error:i})}async runAction(e,n){await e.run(n)}}const XB=class XB{constructor(){this.id=XB.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let n=[];for(const i of e)i.length&&(n.length?n=[...n,new XB,...i]:n=i);return n}async run(){}};XB.ID="vs.actions.separator";let dc=XB;class i5{get actions(){return this._actions}constructor(e,n,i,r){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=n,this.class=r,this._actions=i}async run(){}}const Tle=class Tle extends xm{constructor(){super(Tle.ID,I("submenu.empty","(empty)"),void 0,!1)}};Tle.ID="vs.actions.empty";let LLe=Tle;function aI(t){return{id:t.id,label:t.label,tooltip:t.tooltip??t.label,class:t.class,enabled:t.enabled??!0,checked:t.checked,run:async(...e)=>t.run(...e)}}var TLe;(function(t){function e(n){return n&&typeof n=="object"&&typeof n.id=="string"}t.isThemeColor=e})(TLe||(TLe={}));var ci;(function(t){t.iconNameSegment="[A-Za-z0-9]+",t.iconNameExpression="[A-Za-z0-9-]+",t.iconModifierExpression="~[A-Za-z]+",t.iconNameCharacter="[A-Za-z0-9~-]";const e=new RegExp(`^(${t.iconNameExpression})(${t.iconModifierExpression})?$`);function n(h){const f=e.exec(h.id);if(!f)return n(qt.error);const[,m,p]=f,g=["codicon","codicon-"+m];return p&&g.push("codicon-modifier-"+p.substring(1)),g}t.asClassNameArray=n;function i(h){return n(h).join(" ")}t.asClassName=i;function r(h){return"."+n(h).join(".")}t.asCSSSelector=r;function o(h){return h&&typeof h=="object"&&typeof h.id=="string"&&(typeof h.color>"u"||TLe.isThemeColor(h.color))}t.isThemeIcon=o;const s=new RegExp(`^\\$\\((${t.iconNameExpression}(?:${t.iconModifierExpression})?)\\)$`);function a(h){const f=s.exec(h);if(!f)return;const[,m]=f;return{id:m}}t.fromString=a;function l(h){return{id:h}}t.fromId=l;function c(h,f){let m=h.id;const p=m.lastIndexOf("~");return p!==-1&&(m=m.substring(0,p)),f&&(m=`${m}~${f}`),{id:m}}t.modify=c;function u(h){const f=h.id.lastIndexOf("~");if(f!==-1)return h.id.substring(f+1)}t.getModifier=u;function d(h,f){var m,p;return h.id===f.id&&((m=h.color)==null?void 0:m.id)===((p=f.color)==null?void 0:p.id)}t.isEqual=d})(ci||(ci={}));const gs=Sr("commandService"),Ar=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new st,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(t,e){if(!t)throw new Error("invalid command");if(typeof t=="string"){if(!e)throw new Error("invalid command");return this.registerCommand({id:t,handler:e})}if(t.metadata&&Array.isArray(t.metadata.args)){const s=[];for(const l of t.metadata.args)s.push(l.constraint);const a=t.handler;t.handler=function(l,...c){return Bci(c,s),a(l,...c)}}const{id:n}=t;let i=this._commands.get(n);i||(i=new Ch,this._commands.set(n,i));const r=i.unshift(t),o=Kn(()=>{r();const s=this._commands.get(n);s!=null&&s.isEmpty()&&this._commands.delete(n)});return this._onDidRegisterCommand.fire(n),o}registerCommandAlias(t,e){return Ar.registerCommand(t,(n,...i)=>n.get(gs).executeCommand(e,...i))}getCommand(t){const e=this._commands.get(t);if(!(!e||e.isEmpty()))return Ir.first(e)}getCommands(){const t=new Map;for(const e of this._commands.keys()){const n=this.getCommand(e);n&&t.set(e,n)}return t}};Ar.registerCommand("noop",()=>{});function Pwe(...t){switch(t.length){case 1:return I("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",t[0]);case 2:return I("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",t[0],t[1]);case 3:return I("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",t[0],t[1],t[2]);default:return}}const Ifi=I("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),Afi=I("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");var yC;let $V=(yC=class{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw f8e(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const n=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:n})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const n=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:n})}else this._match(126)?this._addToken(9):this._error(Pwe("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(Pwe("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(Pwe("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return this._isAtEnd()||this._input.charCodeAt(this._current)!==e?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const n=this._start,i=this._input.substring(this._start,this._current),r={type:19,offset:this._start,lexeme:i};this._errors.push({offset:n,lexeme:i,additionalInfo:e}),this._tokens.push(r)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const n=this._input.substring(this._start,this._current),i=yC._keywords.get(n);i?this._addToken(i):this._tokens.push({type:17,lexeme:n,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(Ifi);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let e=this._current,n=!1,i=!1;for(;;){if(e>=this._input.length){this._current=e,this._error(Afi);return}const o=this._input.charCodeAt(e);if(n)n=!1;else if(o===47&&!i){e++;break}else o===91?i=!0:o===92?n=!0:o===93&&(i=!1);e++}for(;e<this._input.length&&yC._regexFlags.has(this._input.charCodeAt(e));)e++;this._current=e;const r=this._input.substring(this._start,this._current);this._tokens.push({type:10,lexeme:r,offset:this._start})}_isAtEnd(){return this._current>=this._input.length}},yC._regexFlags=new Set(["i","g","s","m","y","u"].map(e=>e.charCodeAt(0))),yC._keywords=new Map([["not",14],["in",13],["false",12],["true",11]]),yC);const _d=new Map;_d.set("false",!1);_d.set("true",!0);_d.set("isMac",xr);_d.set("isLinux",$h);_d.set("isWindows",Fu);_d.set("isWeb",eM);_d.set("isMacNative",xr&&!eM);_d.set("isEdge",iui);_d.set("isFirefox",tui);_d.set("isChrome",VOt);_d.set("isSafari",nui);const Rfi=Object.prototype.hasOwnProperty,Pfi={regexParsingWithErrorRecovery:!0},Ofi=I("contextkey.parser.error.emptyString","Empty context key expression"),jfi=I("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),Ffi=I("contextkey.parser.error.noInAfterNot","'in' after 'not'."),Zot=I("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),$fi=I("contextkey.parser.error.unexpectedToken","Unexpected token"),Vfi=I("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),Bfi=I("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),zfi=I("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");var Dx;let Hfi=(Dx=class{constructor(e=Pfi){this._config=e,this._scanner=new $V,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(e===""){this._parsingErrors.push({message:Ofi,offset:0,lexeme:"",additionalInfo:jfi});return}this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const n=this._expr();if(!this._isAtEnd()){const i=this._peek(),r=i.type===17?Vfi:void 0;throw this._parsingErrors.push({message:$fi,offset:i.offset,lexeme:$V.getLexeme(i),additionalInfo:r}),Dx._parseError}return n}catch(n){if(n!==Dx._parseError)throw n;return}}_expr(){return this._or()}_or(){const e=[this._and()];for(;this._matchOne(16);){const n=this._and();e.push(n)}return e.length===1?e[0]:Tt.or(...e)}_and(){const e=[this._term()];for(;this._matchOne(15);){const n=this._term();e.push(n)}return e.length===1?e[0]:Tt.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),Vh.INSTANCE;case 12:return this._advance(),kf.INSTANCE;case 0:{this._advance();const n=this._expr();return this._consume(1,Zot),n==null?void 0:n.negate()}case 17:return this._advance(),ZA.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),Tt.true();case 12:return this._advance(),Tt.false();case 0:{this._advance();const n=this._expr();return this._consume(1,Zot),n}case 17:{const n=e.lexeme;if(this._advance(),this._matchOne(9)){const r=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),r.type!==10)throw this._errExpectedButGot("REGEX",r);const o=r.lexeme,s=o.lastIndexOf("/"),a=s===o.length-1?void 0:this._removeFlagsGY(o.substring(s+1));let l;try{l=new RegExp(o.substring(1,s),a)}catch{throw this._errExpectedButGot("REGEX",r)}return DH.create(n,l)}switch(r.type){case 10:case 19:{const o=[r.lexeme];this._advance();let s=this._peek(),a=0;for(let h=0;h<r.lexeme.length;h++)r.lexeme.charCodeAt(h)===40?a++:r.lexeme.charCodeAt(h)===41&&a--;for(;!this._isAtEnd()&&s.type!==15&&s.type!==16;){switch(s.type){case 0:a++;break;case 1:a--;break;case 10:case 18:for(let h=0;h<s.lexeme.length;h++)s.lexeme.charCodeAt(h)===40?a++:r.lexeme.charCodeAt(h)===41&&a--}if(a<0)break;o.push($V.getLexeme(s)),this._advance(),s=this._peek()}const l=o.join(""),c=l.lastIndexOf("/"),u=c===l.length-1?void 0:this._removeFlagsGY(l.substring(c+1));let d;try{d=new RegExp(l.substring(1,c),u)}catch{throw this._errExpectedButGot("REGEX",r)}return Tt.regex(n,d)}case 18:{const o=r.lexeme;this._advance();let s=null;if(!a4t(o)){const a=o.indexOf("/"),l=o.lastIndexOf("/");if(a!==l&&a>=0){const c=o.slice(a+1,l),u=o[l+1]==="i"?"i":"";try{s=new RegExp(c,u)}catch{throw this._errExpectedButGot("REGEX",r)}}}if(s===null)throw this._errExpectedButGot("REGEX",r);return DH.create(n,s)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,Ffi);const r=this._value();return Tt.notIn(n,r)}switch(this._peek().type){case 3:{this._advance();const r=this._value();if(this._previous().type===18)return Tt.equals(n,r);switch(r){case"true":return Tt.has(n);case"false":return Tt.not(n);default:return Tt.equals(n,r)}}case 4:{this._advance();const r=this._value();if(this._previous().type===18)return Tt.notEquals(n,r);switch(r){case"true":return Tt.not(n);case"false":return Tt.has(n);default:return Tt.notEquals(n,r)}}case 5:return this._advance(),Bfe.create(n,this._value());case 6:return this._advance(),zfe.create(n,this._value());case 7:return this._advance(),$fe.create(n,this._value());case 8:return this._advance(),Vfe.create(n,this._value());case 13:return this._advance(),Tt.in(n,this._value());default:return Tt.has(n)}}case 20:throw this._parsingErrors.push({message:Bfi,offset:e.offset,lexeme:"",additionalInfo:zfi}),Dx._parseError;default:throw this._errExpectedButGot(`true | false | KEY 
	| KEY '=~' REGEX 
	| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return this._check(e)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,n){if(this._check(e))return this._advance();throw this._errExpectedButGot(n,this._peek())}_errExpectedButGot(e,n,i){const r=I("contextkey.parser.error.expectedButGot",`Expected: {0}
Received: '{1}'.`,e,$V.getLexeme(n)),o=n.offset,s=$V.getLexeme(n);return this._parsingErrors.push({message:r,offset:o,lexeme:s,additionalInfo:i}),Dx._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}},Dx._parseError=new Error,Dx);const KWe=class KWe{static false(){return Vh.INSTANCE}static true(){return kf.INSTANCE}static has(e){return XA.create(e)}static equals(e,n){return L6.create(e,n)}static notEquals(e,n){return jfe.create(e,n)}static regex(e,n){return DH.create(e,n)}static in(e,n){return Pfe.create(e,n)}static notIn(e,n){return Ofe.create(e,n)}static not(e){return ZA.create(e)}static and(...e){return PT.create(e,null,!0)}static or(...e){return Q1.create(e,null,!0)}static deserialize(e){return e==null?void 0:this._parser.parse(e)}};KWe._parser=new Hfi({regexParsingWithErrorRecovery:!1});let Tt=KWe;function Wfi(t,e){const n=t?t.substituteConstants():void 0,i=e?e.substituteConstants():void 0;return!n&&!i?!0:!n||!i?!1:n.equals(i)}function W9(t,e){return t.cmp(e)}const Ile=class Ile{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return kf.INSTANCE}};Ile.INSTANCE=new Ile;let Vh=Ile;const Ale=class Ale{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return Vh.INSTANCE}};Ale.INSTANCE=new Ale;let kf=Ale;class XA{static create(e,n=null){const i=_d.get(e);return typeof i=="boolean"?i?kf.INSTANCE:Vh.INSTANCE:new XA(e,n)}constructor(e,n){this.key=e,this.negated=n,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:W4t(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=_d.get(this.key);return typeof e=="boolean"?e?kf.INSTANCE:Vh.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=ZA.create(this.key,this)),this.negated}}class L6{static create(e,n,i=null){if(typeof n=="boolean")return n?XA.create(e,i):ZA.create(e,i);const r=_d.get(e);return typeof r=="boolean"?n===(r?"true":"false")?kf.INSTANCE:Vh.INSTANCE:new L6(e,n,i)}constructor(e,n,i){this.key=e,this.value=n,this.negated=i,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:QA(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=_d.get(this.key);if(typeof e=="boolean"){const n=e?"true":"false";return this.value===n?kf.INSTANCE:Vh.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=jfe.create(this.key,this.value,this)),this.negated}}class Pfe{static create(e,n){return new Pfe(e,n)}constructor(e,n){this.key=e,this.valueKey=n,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:QA(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type?this.key===e.key&&this.valueKey===e.valueKey:!1}substituteConstants(){return this}evaluate(e){const n=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(n)?n.includes(i):typeof i=="string"&&typeof n=="object"&&n!==null?Rfi.call(n,i):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=Ofe.create(this.key,this.valueKey)),this.negated}}class Ofe{static create(e,n){return new Ofe(e,n)}constructor(e,n){this.key=e,this.valueKey=n,this.type=11,this._negated=Pfe.create(e,n)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type?this._negated.equals(e._negated):!1}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class jfe{static create(e,n,i=null){if(typeof n=="boolean")return n?ZA.create(e,i):XA.create(e,i);const r=_d.get(e);return typeof r=="boolean"?n===(r?"true":"false")?Vh.INSTANCE:kf.INSTANCE:new jfe(e,n,i)}constructor(e,n,i){this.key=e,this.value=n,this.negated=i,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:QA(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=_d.get(this.key);if(typeof e=="boolean"){const n=e?"true":"false";return this.value===n?Vh.INSTANCE:kf.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=L6.create(this.key,this.value,this)),this.negated}}class ZA{static create(e,n=null){const i=_d.get(e);return typeof i=="boolean"?i?Vh.INSTANCE:kf.INSTANCE:new ZA(e,n)}constructor(e,n){this.key=e,this.negated=n,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:W4t(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=_d.get(this.key);return typeof e=="boolean"?e?Vh.INSTANCE:kf.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=XA.create(this.key,this)),this.negated}}function Ffe(t,e){if(typeof t=="string"){const n=parseFloat(t);isNaN(n)||(t=n)}return typeof t=="string"||typeof t=="number"?e(t):Vh.INSTANCE}class $fe{static create(e,n,i=null){return Ffe(n,r=>new $fe(e,r,i))}constructor(e,n,i){this.key=e,this.value=n,this.negated=i,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:QA(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=zfe.create(this.key,this.value,this)),this.negated}}class Vfe{static create(e,n,i=null){return Ffe(n,r=>new Vfe(e,r,i))}constructor(e,n,i){this.key=e,this.value=n,this.negated=i,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:QA(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Bfe.create(this.key,this.value,this)),this.negated}}class Bfe{static create(e,n,i=null){return Ffe(n,r=>new Bfe(e,r,i))}constructor(e,n,i){this.key=e,this.value=n,this.negated=i,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:QA(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Vfe.create(this.key,this.value,this)),this.negated}}class zfe{static create(e,n,i=null){return Ffe(n,r=>new zfe(e,r,i))}constructor(e,n,i){this.key=e,this.value=n,this.negated=i,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:QA(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=$fe.create(this.key,this.value,this)),this.negated}}class DH{static create(e,n){return new DH(e,n)}constructor(e,n){this.key=e,this.regexp=n,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.key<e.key)return-1;if(this.key>e.key)return 1;const n=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return n<i?-1:n>i?1:0}equals(e){if(e.type===this.type){const n=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&n===i}return!1}substituteConstants(){return this}evaluate(e){const n=e.getValue(this.key);return this.regexp?this.regexp.test(n):!1}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=O8e.create(this)),this.negated}}class O8e{static create(e){return new O8e(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type?this._actual.equals(e._actual):!1}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function H4t(t){let e=null;for(let n=0,i=t.length;n<i;n++){const r=t[n].substituteConstants();if(t[n]!==r&&e===null){e=[];for(let o=0;o<n;o++)e[o]=t[o]}e!==null&&(e[n]=r)}return e===null?t:e}class PT{static create(e,n,i){return PT._normalizeArr(e,n,i)}constructor(e,n){this.expr=e,this.negated=n,this.type=6}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let n=0,i=this.expr.length;n<i;n++){const r=W9(this.expr[n],e.expr[n]);if(r!==0)return r}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let n=0,i=this.expr.length;n<i;n++)if(!this.expr[n].equals(e.expr[n]))return!1;return!0}return!1}substituteConstants(){const e=H4t(this.expr);return e===this.expr?this:PT.create(e,this.negated,!1)}evaluate(e){for(let n=0,i=this.expr.length;n<i;n++)if(!this.expr[n].evaluate(e))return!1;return!0}static _normalizeArr(e,n,i){const r=[];let o=!1;for(const s of e)if(s){if(s.type===1){o=!0;continue}if(s.type===0)return Vh.INSTANCE;if(s.type===6){r.push(...s.expr);continue}r.push(s)}if(r.length===0&&o)return kf.INSTANCE;if(r.length!==0){if(r.length===1)return r[0];r.sort(W9);for(let s=1;s<r.length;s++)r[s-1].equals(r[s])&&(r.splice(s,1),s--);if(r.length===1)return r[0];for(;r.length>1;){const s=r[r.length-1];if(s.type!==9)break;r.pop();const a=r.pop(),l=r.length===0,c=Q1.create(s.expr.map(u=>PT.create([u,a],null,i)),null,l);c&&(r.push(c),r.sort(W9))}if(r.length===1)return r[0];if(i){for(let s=0;s<r.length;s++)for(let a=s+1;a<r.length;a++)if(r[s].negate().equals(r[a]))return Vh.INSTANCE;if(r.length===1)return r[0]}return new PT(r,n)}}serialize(){return this.expr.map(e=>e.serialize()).join(" && ")}keys(){const e=[];for(const n of this.expr)e.push(...n.keys());return e}negate(){if(!this.negated){const e=[];for(const n of this.expr)e.push(n.negate());this.negated=Q1.create(e,this,!0)}return this.negated}}class Q1{static create(e,n,i){return Q1._normalizeArr(e,n,i)}constructor(e,n){this.expr=e,this.negated=n,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let n=0,i=this.expr.length;n<i;n++){const r=W9(this.expr[n],e.expr[n]);if(r!==0)return r}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let n=0,i=this.expr.length;n<i;n++)if(!this.expr[n].equals(e.expr[n]))return!1;return!0}return!1}substituteConstants(){const e=H4t(this.expr);return e===this.expr?this:Q1.create(e,this.negated,!1)}evaluate(e){for(let n=0,i=this.expr.length;n<i;n++)if(this.expr[n].evaluate(e))return!0;return!1}static _normalizeArr(e,n,i){let r=[],o=!1;if(e){for(let s=0,a=e.length;s<a;s++){const l=e[s];if(l){if(l.type===0){o=!0;continue}if(l.type===1)return kf.INSTANCE;if(l.type===9){r=r.concat(l.expr);continue}r.push(l)}}if(r.length===0&&o)return Vh.INSTANCE;r.sort(W9)}if(r.length!==0){if(r.length===1)return r[0];for(let s=1;s<r.length;s++)r[s-1].equals(r[s])&&(r.splice(s,1),s--);if(r.length===1)return r[0];if(i){for(let s=0;s<r.length;s++)for(let a=s+1;a<r.length;a++)if(r[s].negate().equals(r[a]))return kf.INSTANCE;if(r.length===1)return r[0]}return new Q1(r,n)}}serialize(){return this.expr.map(e=>e.serialize()).join(" || ")}keys(){const e=[];for(const n of this.expr)e.push(...n.keys());return e}negate(){if(!this.negated){const e=[];for(const n of this.expr)e.push(n.negate());for(;e.length>1;){const n=e.shift(),i=e.shift(),r=[];for(const o of Jot(n))for(const s of Jot(i))r.push(PT.create([o,s],null,!1));e.unshift(Q1.create(r,null,!1))}this.negated=Q1.create(e,this,!0)}return this.negated}}const V4=class V4 extends XA{static all(){return V4._info.values()}constructor(e,n,i){super(e,null),this._defaultValue=n,typeof i=="object"?V4._info.push({...i,key:e}):i!==!0&&V4._info.push({key:e,description:i,type:n!=null?typeof n:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return L6.create(this.key,e)}};V4._info=[];let gn=V4;const vi=Sr("contextKeyService");function W4t(t,e){return t<e?-1:t>e?1:0}function QA(t,e,n,i){return t<n?-1:t>n?1:e<i?-1:e>i?1:0}function ILe(t,e){if(t.type===0||e.type===1)return!0;if(t.type===9)return e.type===9?Qot(t.expr,e.expr):!1;if(e.type===9){for(const n of e.expr)if(ILe(t,n))return!0;return!1}if(t.type===6){if(e.type===6)return Qot(e.expr,t.expr);for(const n of t.expr)if(ILe(n,e))return!0;return!1}return t.equals(e)}function Qot(t,e){let n=0,i=0;for(;n<t.length&&i<e.length;){const r=t[n].cmp(e[i]);if(r<0)return!1;r===0&&n++,i++}return n===t.length}function Jot(t){return t.type===9?t.expr:[t]}function Owe(t,e){if(!t)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}function Hfe(t,e="Unreachable"){throw new Error(e)}function est(t){t||ji(new co("Soft Assertion Failed"))}function K2(t){if(!t()){debugger;t(),ji(new co("Assertion Failed"))}}function j8e(t,e){let n=0;for(;n<t.length-1;){const i=t[n],r=t[n+1];if(!e(i,r))return!1;n++}return!0}class Ufi{constructor(){this.data=new Map}add(e,n){Owe(Cf(e)),Owe(Ic(n)),Owe(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,n)}as(e){return this.data.get(e)||null}}const la=new Ufi;class F8e{constructor(){this._coreKeybindings=new Ch,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(pm===1){if(e&&e.win)return e.win}else if(pm===2){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const n=F8e.bindToCurrentPlatform(e),i=new Lt;if(n&&n.primary){const r=yLe(n.primary,pm);r&&i.add(this._registerDefaultKeybinding(r,e.id,e.args,e.weight,0,e.when))}if(n&&Array.isArray(n.secondary))for(let r=0,o=n.secondary.length;r<o;r++){const s=n.secondary[r],a=yLe(s,pm);a&&i.add(this._registerDefaultKeybinding(a,e.id,e.args,e.weight,-r-1,e.when))}return i}registerCommandAndKeybindingRule(e){return yv(this.registerKeybindingRule(e),Ar.registerCommand(e))}_registerDefaultKeybinding(e,n,i,r,o,s){const a=this._coreKeybindings.push({keybinding:e,command:n,commandArgs:i,when:s,weight1:r,weight2:o,extensionId:null,isBuiltinExtension:!1});return this._cachedMergedKeybindings=null,Kn(()=>{a(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(qfi)),this._cachedMergedKeybindings.slice(0)}}const Bh=new F8e,Kfi={EditorModes:"platform.keybindingsRegistry"};la.add(Kfi.EditorModes,Bh);function qfi(t,e){if(t.weight1!==e.weight1)return t.weight1-e.weight1;if(t.command&&e.command){if(t.command<e.command)return-1;if(t.command>e.command)return 1}return t.weight2-e.weight2}var Gfi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},tst=function(t,e){return function(n,i){e(n,i,t)}},nte;function v3(t){return t.command!==void 0}function Yfi(t){return t.submenu!==void 0}const Be=class Be{constructor(e){if(Be._instances.has(e))throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);Be._instances.set(e,this),this.id=e}};Be._instances=new Map,Be.CommandPalette=new Be("CommandPalette"),Be.DebugBreakpointsContext=new Be("DebugBreakpointsContext"),Be.DebugCallStackContext=new Be("DebugCallStackContext"),Be.DebugConsoleContext=new Be("DebugConsoleContext"),Be.DebugVariablesContext=new Be("DebugVariablesContext"),Be.NotebookVariablesContext=new Be("NotebookVariablesContext"),Be.DebugHoverContext=new Be("DebugHoverContext"),Be.DebugWatchContext=new Be("DebugWatchContext"),Be.DebugToolBar=new Be("DebugToolBar"),Be.DebugToolBarStop=new Be("DebugToolBarStop"),Be.DebugCallStackToolbar=new Be("DebugCallStackToolbar"),Be.EditorContext=new Be("EditorContext"),Be.SimpleEditorContext=new Be("SimpleEditorContext"),Be.EditorContent=new Be("EditorContent"),Be.EditorLineNumberContext=new Be("EditorLineNumberContext"),Be.EditorContextCopy=new Be("EditorContextCopy"),Be.EditorContextPeek=new Be("EditorContextPeek"),Be.EditorContextShare=new Be("EditorContextShare"),Be.EditorTitle=new Be("EditorTitle"),Be.EditorTitleRun=new Be("EditorTitleRun"),Be.EditorTitleContext=new Be("EditorTitleContext"),Be.EditorTitleContextShare=new Be("EditorTitleContextShare"),Be.EmptyEditorGroup=new Be("EmptyEditorGroup"),Be.EmptyEditorGroupContext=new Be("EmptyEditorGroupContext"),Be.EditorTabsBarContext=new Be("EditorTabsBarContext"),Be.EditorTabsBarShowTabsSubmenu=new Be("EditorTabsBarShowTabsSubmenu"),Be.EditorTabsBarShowTabsZenModeSubmenu=new Be("EditorTabsBarShowTabsZenModeSubmenu"),Be.EditorActionsPositionSubmenu=new Be("EditorActionsPositionSubmenu"),Be.ExplorerContext=new Be("ExplorerContext"),Be.ExplorerContextShare=new Be("ExplorerContextShare"),Be.ExtensionContext=new Be("ExtensionContext"),Be.GlobalActivity=new Be("GlobalActivity"),Be.CommandCenter=new Be("CommandCenter"),Be.CommandCenterCenter=new Be("CommandCenterCenter"),Be.LayoutControlMenuSubmenu=new Be("LayoutControlMenuSubmenu"),Be.LayoutControlMenu=new Be("LayoutControlMenu"),Be.MenubarMainMenu=new Be("MenubarMainMenu"),Be.MenubarAppearanceMenu=new Be("MenubarAppearanceMenu"),Be.MenubarDebugMenu=new Be("MenubarDebugMenu"),Be.MenubarEditMenu=new Be("MenubarEditMenu"),Be.MenubarCopy=new Be("MenubarCopy"),Be.MenubarFileMenu=new Be("MenubarFileMenu"),Be.MenubarGoMenu=new Be("MenubarGoMenu"),Be.MenubarHelpMenu=new Be("MenubarHelpMenu"),Be.MenubarLayoutMenu=new Be("MenubarLayoutMenu"),Be.MenubarNewBreakpointMenu=new Be("MenubarNewBreakpointMenu"),Be.PanelAlignmentMenu=new Be("PanelAlignmentMenu"),Be.PanelPositionMenu=new Be("PanelPositionMenu"),Be.ActivityBarPositionMenu=new Be("ActivityBarPositionMenu"),Be.MenubarPreferencesMenu=new Be("MenubarPreferencesMenu"),Be.MenubarRecentMenu=new Be("MenubarRecentMenu"),Be.MenubarSelectionMenu=new Be("MenubarSelectionMenu"),Be.MenubarShare=new Be("MenubarShare"),Be.MenubarSwitchEditorMenu=new Be("MenubarSwitchEditorMenu"),Be.MenubarSwitchGroupMenu=new Be("MenubarSwitchGroupMenu"),Be.MenubarTerminalMenu=new Be("MenubarTerminalMenu"),Be.MenubarViewMenu=new Be("MenubarViewMenu"),Be.MenubarHomeMenu=new Be("MenubarHomeMenu"),Be.OpenEditorsContext=new Be("OpenEditorsContext"),Be.OpenEditorsContextShare=new Be("OpenEditorsContextShare"),Be.ProblemsPanelContext=new Be("ProblemsPanelContext"),Be.SCMInputBox=new Be("SCMInputBox"),Be.SCMChangesSeparator=new Be("SCMChangesSeparator"),Be.SCMChangesContext=new Be("SCMChangesContext"),Be.SCMIncomingChanges=new Be("SCMIncomingChanges"),Be.SCMIncomingChangesContext=new Be("SCMIncomingChangesContext"),Be.SCMIncomingChangesSetting=new Be("SCMIncomingChangesSetting"),Be.SCMOutgoingChanges=new Be("SCMOutgoingChanges"),Be.SCMOutgoingChangesContext=new Be("SCMOutgoingChangesContext"),Be.SCMOutgoingChangesSetting=new Be("SCMOutgoingChangesSetting"),Be.SCMIncomingChangesAllChangesContext=new Be("SCMIncomingChangesAllChangesContext"),Be.SCMIncomingChangesHistoryItemContext=new Be("SCMIncomingChangesHistoryItemContext"),Be.SCMOutgoingChangesAllChangesContext=new Be("SCMOutgoingChangesAllChangesContext"),Be.SCMOutgoingChangesHistoryItemContext=new Be("SCMOutgoingChangesHistoryItemContext"),Be.SCMChangeContext=new Be("SCMChangeContext"),Be.SCMResourceContext=new Be("SCMResourceContext"),Be.SCMResourceContextShare=new Be("SCMResourceContextShare"),Be.SCMResourceFolderContext=new Be("SCMResourceFolderContext"),Be.SCMResourceGroupContext=new Be("SCMResourceGroupContext"),Be.SCMSourceControl=new Be("SCMSourceControl"),Be.SCMSourceControlInline=new Be("SCMSourceControlInline"),Be.SCMSourceControlTitle=new Be("SCMSourceControlTitle"),Be.SCMTitle=new Be("SCMTitle"),Be.SearchContext=new Be("SearchContext"),Be.SearchActionMenu=new Be("SearchActionContext"),Be.StatusBarWindowIndicatorMenu=new Be("StatusBarWindowIndicatorMenu"),Be.StatusBarRemoteIndicatorMenu=new Be("StatusBarRemoteIndicatorMenu"),Be.StickyScrollContext=new Be("StickyScrollContext"),Be.TestItem=new Be("TestItem"),Be.TestItemGutter=new Be("TestItemGutter"),Be.TestProfilesContext=new Be("TestProfilesContext"),Be.TestMessageContext=new Be("TestMessageContext"),Be.TestMessageContent=new Be("TestMessageContent"),Be.TestPeekElement=new Be("TestPeekElement"),Be.TestPeekTitle=new Be("TestPeekTitle"),Be.TestCallStack=new Be("TestCallStack"),Be.TouchBarContext=new Be("TouchBarContext"),Be.TitleBarContext=new Be("TitleBarContext"),Be.TitleBarTitleContext=new Be("TitleBarTitleContext"),Be.TunnelContext=new Be("TunnelContext"),Be.TunnelPrivacy=new Be("TunnelPrivacy"),Be.TunnelProtocol=new Be("TunnelProtocol"),Be.TunnelPortInline=new Be("TunnelInline"),Be.TunnelTitle=new Be("TunnelTitle"),Be.TunnelLocalAddressInline=new Be("TunnelLocalAddressInline"),Be.TunnelOriginInline=new Be("TunnelOriginInline"),Be.ViewItemContext=new Be("ViewItemContext"),Be.ViewContainerTitle=new Be("ViewContainerTitle"),Be.ViewContainerTitleContext=new Be("ViewContainerTitleContext"),Be.ViewTitle=new Be("ViewTitle"),Be.ViewTitleContext=new Be("ViewTitleContext"),Be.CommentEditorActions=new Be("CommentEditorActions"),Be.CommentThreadTitle=new Be("CommentThreadTitle"),Be.CommentThreadActions=new Be("CommentThreadActions"),Be.CommentThreadAdditionalActions=new Be("CommentThreadAdditionalActions"),Be.CommentThreadTitleContext=new Be("CommentThreadTitleContext"),Be.CommentThreadCommentContext=new Be("CommentThreadCommentContext"),Be.CommentTitle=new Be("CommentTitle"),Be.CommentActions=new Be("CommentActions"),Be.CommentsViewThreadActions=new Be("CommentsViewThreadActions"),Be.InteractiveToolbar=new Be("InteractiveToolbar"),Be.InteractiveCellTitle=new Be("InteractiveCellTitle"),Be.InteractiveCellDelete=new Be("InteractiveCellDelete"),Be.InteractiveCellExecute=new Be("InteractiveCellExecute"),Be.InteractiveInputExecute=new Be("InteractiveInputExecute"),Be.InteractiveInputConfig=new Be("InteractiveInputConfig"),Be.ReplInputExecute=new Be("ReplInputExecute"),Be.IssueReporter=new Be("IssueReporter"),Be.NotebookToolbar=new Be("NotebookToolbar"),Be.NotebookStickyScrollContext=new Be("NotebookStickyScrollContext"),Be.NotebookCellTitle=new Be("NotebookCellTitle"),Be.NotebookCellDelete=new Be("NotebookCellDelete"),Be.NotebookCellInsert=new Be("NotebookCellInsert"),Be.NotebookCellBetween=new Be("NotebookCellBetween"),Be.NotebookCellListTop=new Be("NotebookCellTop"),Be.NotebookCellExecute=new Be("NotebookCellExecute"),Be.NotebookCellExecuteGoTo=new Be("NotebookCellExecuteGoTo"),Be.NotebookCellExecutePrimary=new Be("NotebookCellExecutePrimary"),Be.NotebookDiffCellInputTitle=new Be("NotebookDiffCellInputTitle"),Be.NotebookDiffCellMetadataTitle=new Be("NotebookDiffCellMetadataTitle"),Be.NotebookDiffCellOutputsTitle=new Be("NotebookDiffCellOutputsTitle"),Be.NotebookOutputToolbar=new Be("NotebookOutputToolbar"),Be.NotebookOutlineFilter=new Be("NotebookOutlineFilter"),Be.NotebookOutlineActionMenu=new Be("NotebookOutlineActionMenu"),Be.NotebookEditorLayoutConfigure=new Be("NotebookEditorLayoutConfigure"),Be.NotebookKernelSource=new Be("NotebookKernelSource"),Be.BulkEditTitle=new Be("BulkEditTitle"),Be.BulkEditContext=new Be("BulkEditContext"),Be.TimelineItemContext=new Be("TimelineItemContext"),Be.TimelineTitle=new Be("TimelineTitle"),Be.TimelineTitleContext=new Be("TimelineTitleContext"),Be.TimelineFilterSubMenu=new Be("TimelineFilterSubMenu"),Be.AccountsContext=new Be("AccountsContext"),Be.SidebarTitle=new Be("SidebarTitle"),Be.PanelTitle=new Be("PanelTitle"),Be.AuxiliaryBarTitle=new Be("AuxiliaryBarTitle"),Be.AuxiliaryBarHeader=new Be("AuxiliaryBarHeader"),Be.TerminalInstanceContext=new Be("TerminalInstanceContext"),Be.TerminalEditorInstanceContext=new Be("TerminalEditorInstanceContext"),Be.TerminalNewDropdownContext=new Be("TerminalNewDropdownContext"),Be.TerminalTabContext=new Be("TerminalTabContext"),Be.TerminalTabEmptyAreaContext=new Be("TerminalTabEmptyAreaContext"),Be.TerminalStickyScrollContext=new Be("TerminalStickyScrollContext"),Be.WebviewContext=new Be("WebviewContext"),Be.InlineCompletionsActions=new Be("InlineCompletionsActions"),Be.InlineEditsActions=new Be("InlineEditsActions"),Be.InlineEditActions=new Be("InlineEditActions"),Be.NewFile=new Be("NewFile"),Be.MergeInput1Toolbar=new Be("MergeToolbar1Toolbar"),Be.MergeInput2Toolbar=new Be("MergeToolbar2Toolbar"),Be.MergeBaseToolbar=new Be("MergeBaseToolbar"),Be.MergeInputResultToolbar=new Be("MergeToolbarResultToolbar"),Be.InlineSuggestionToolbar=new Be("InlineSuggestionToolbar"),Be.InlineEditToolbar=new Be("InlineEditToolbar"),Be.ChatContext=new Be("ChatContext"),Be.ChatCodeBlock=new Be("ChatCodeblock"),Be.ChatCompareBlock=new Be("ChatCompareBlock"),Be.ChatMessageTitle=new Be("ChatMessageTitle"),Be.ChatExecute=new Be("ChatExecute"),Be.ChatExecuteSecondary=new Be("ChatExecuteSecondary"),Be.ChatInputSide=new Be("ChatInputSide"),Be.AccessibleView=new Be("AccessibleView"),Be.MultiDiffEditorFileToolbar=new Be("MultiDiffEditorFileToolbar"),Be.DiffEditorHunkToolbar=new Be("DiffEditorHunkToolbar"),Be.DiffEditorSelectionToolbar=new Be("DiffEditorSelectionToolbar");let Rn=Be;const Jp=Sr("menuService"),ZB=class ZB{static for(e){let n=this._all.get(e);return n||(n=new ZB(e),this._all.set(e,n)),n}static merge(e){const n=new Set;for(const i of e)i instanceof ZB&&n.add(i.id);return n}constructor(e){this.id=e,this.has=n=>n===e}};ZB._all=new Map;let nT=ZB;const Oc=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new cdi({merge:nT.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(t){return this._commands.set(t.id,t),this._onDidChangeMenu.fire(nT.for(Rn.CommandPalette)),Kn(()=>{this._commands.delete(t.id)&&this._onDidChangeMenu.fire(nT.for(Rn.CommandPalette))})}getCommand(t){return this._commands.get(t)}getCommands(){const t=new Map;return this._commands.forEach((e,n)=>t.set(n,e)),t}appendMenuItem(t,e){let n=this._menuItems.get(t);n||(n=new Ch,this._menuItems.set(t,n));const i=n.push(e);return this._onDidChangeMenu.fire(nT.for(t)),Kn(()=>{i(),this._onDidChangeMenu.fire(nT.for(t))})}appendMenuItems(t){const e=new Lt;for(const{id:n,item:i}of t)e.add(this.appendMenuItem(n,i));return e}getMenuItems(t){let e;return this._menuItems.has(t)?e=[...this._menuItems.get(t)]:e=[],t===Rn.CommandPalette&&this._appendImplicitItems(e),e}_appendImplicitItems(t){const e=new Set;for(const n of t)v3(n)&&(e.add(n.command.id),n.alt&&e.add(n.alt.id));this._commands.forEach((n,i)=>{e.has(i)||t.push({command:n})})}};class y3 extends i5{constructor(e,n,i){super(`submenuitem.${e.submenu.id}`,typeof e.title=="string"?e.title:e.title.value,i,"submenu"),this.item=e,this.hideActions=n}}let wm=nte=class{static label(e,n){return n!=null&&n.renderShortTitle&&e.shortTitle?typeof e.shortTitle=="string"?e.shortTitle:e.shortTitle.value:typeof e.title=="string"?e.title:e.title.value}constructor(e,n,i,r,o,s,a){var c;this.hideActions=r,this.menuKeybinding=o,this._commandService=a,this.id=e.id,this.label=nte.label(e,i),this.tooltip=(typeof e.tooltip=="string"?e.tooltip:(c=e.tooltip)==null?void 0:c.value)??"",this.enabled=!e.precondition||s.contextMatchesRules(e.precondition),this.checked=void 0;let l;if(e.toggled){const u=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=s.contextMatchesRules(u.condition),this.checked&&u.tooltip&&(this.tooltip=typeof u.tooltip=="string"?u.tooltip:u.tooltip.value),this.checked&&ci.isThemeIcon(u.icon)&&(l=u.icon),this.checked&&u.title&&(this.label=typeof u.title=="string"?u.title:u.title.value)}l||(l=ci.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=n?new nte(n,void 0,i,r,void 0,s,a):void 0,this._options=i,this.class=l&&ci.asClassName(l)}run(...e){var i,r;let n=[];return(i=this._options)!=null&&i.arg&&(n=[...n,this._options.arg]),(r=this._options)!=null&&r.shouldForwardArgs&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};wm=nte=Gfi([tst(5,vi),tst(6,gs)],wm);class qh{constructor(e){this.desc=e}}function cs(t){const e=[],n=new t,{f1:i,menu:r,keybinding:o,...s}=n.desc;if(Ar.getCommand(s.id))throw new Error(`Cannot register two commands with the same id: ${s.id}`);if(e.push(Ar.registerCommand({id:s.id,handler:(a,...l)=>n.run(a,...l),metadata:s.metadata})),Array.isArray(r))for(const a of r)e.push(Oc.appendMenuItem(a.id,{command:{...s,precondition:a.precondition===null?void 0:s.precondition},...a}));else r&&e.push(Oc.appendMenuItem(r.id,{command:{...s,precondition:r.precondition===null?void 0:s.precondition},...r}));if(i&&(e.push(Oc.appendMenuItem(Rn.CommandPalette,{command:s,when:s.precondition})),e.push(Oc.addCommand(s))),Array.isArray(o))for(const a of o)e.push(Bh.registerKeybindingRule({...a,id:s.id,when:s.precondition?Tt.and(s.precondition,a.when):a.when}));else o&&e.push(Bh.registerKeybindingRule({...o,id:s.id,when:s.precondition?Tt.and(s.precondition,o.when):o.when}));return{dispose(){Jo(e)}}}const eh=Sr("telemetryService"),Nd=Sr("logService");var ff;(function(t){t[t.Off=0]="Off",t[t.Trace=1]="Trace",t[t.Debug=2]="Debug",t[t.Info=3]="Info",t[t.Warning=4]="Warning",t[t.Error=5]="Error"})(ff||(ff={}));const U4t=ff.Info;class K4t extends ct{constructor(){super(...arguments),this.level=U4t,this._onDidChangeLogLevel=this._register(new st),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==ff.Off&&this.level<=e}}class Xfi extends K4t{constructor(e=U4t,n=!0){super(),this.useColors=n,this.setLevel(e)}trace(e,...n){this.checkLogLevel(ff.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...n):console.log(e,...n))}debug(e,...n){this.checkLogLevel(ff.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...n):console.log(e,...n))}info(e,...n){this.checkLogLevel(ff.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...n):console.log(e,...n))}warn(e,...n){this.checkLogLevel(ff.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...n):console.log(e,...n))}error(e,...n){this.checkLogLevel(ff.Error)&&(this.useColors?console.log("%c  ERR","color: #f33",e,...n):console.error(e,...n))}}class Zfi extends K4t{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const n of this.loggers)n.setLevel(e);super.setLevel(e)}trace(e,...n){for(const i of this.loggers)i.trace(e,...n)}debug(e,...n){for(const i of this.loggers)i.debug(e,...n)}info(e,...n){for(const i of this.loggers)i.info(e,...n)}warn(e,...n){for(const i of this.loggers)i.warn(e,...n)}error(e,...n){for(const i of this.loggers)i.error(e,...n)}dispose(){for(const e of this.loggers)e.dispose();super.dispose()}}function Qfi(t){switch(t){case ff.Trace:return"trace";case ff.Debug:return"debug";case ff.Info:return"info";case ff.Warning:return"warn";case ff.Error:return"error";case ff.Off:return"off"}}new gn("logLevel",Qfi(ff.Info));class Wfe{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this.metadata=e.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const n of e){let i=n.kbExpr;this.precondition&&(i?i=Tt.and(i,this.precondition):i=this.precondition);const r={id:this.id,weight:n.weight,args:n.args,when:i,primary:n.primary,secondary:n.secondary,win:n.win,linux:n.linux,mac:n.mac};Bh.registerKeybindingRule(r)}}Ar.registerCommand({id:this.id,handler:(e,n)=>this.runCommand(e,n),metadata:this.metadata})}_registerMenuItem(e){Oc.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class T6 extends Wfe{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,n,i,r){return this._implementations.push({priority:e,name:n,implementation:i,when:r}),this._implementations.sort((o,s)=>s.priority-o.priority),{dispose:()=>{for(let o=0;o<this._implementations.length;o++)if(this._implementations[o].implementation===i){this._implementations.splice(o,1);return}}}}runCommand(e,n){const i=e.get(Nd),r=e.get(vi);i.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const o of this._implementations){if(o.when){const a=r.getContext(Au());if(!o.when.evaluate(a))continue}const s=o.implementation(e,n);if(s)return i.trace(`Command '${this.id}' was handled by '${o.name}'.`),typeof s=="boolean"?void 0:s}i.trace(`The Command '${this.id}' was not handled by any implementation.`)}}class q4t extends Wfe{constructor(e,n){super(n),this.command=e}runCommand(e,n){return this.command.runCommand(e,n)}}class Zl extends Wfe{static bindToContribution(e){return class extends Zl{constructor(i){super(i),this._callback=i.handler}runEditorCommand(i,r,o){const s=e(r);s&&this._callback(s,o)}}}static runEditorCommand(e,n,i,r){const o=e.get(Yr),s=o.getFocusedCodeEditor()||o.getActiveCodeEditor();if(s)return s.invokeWithinContext(a=>{if(a.get(vi).contextMatchesRules(i??void 0))return r(a,s,n)})}runCommand(e,n){return Zl.runEditorCommand(e,n,this.precondition,(i,r,o)=>this.runEditorCommand(i,r,o))}}class En extends Zl{static convertOptions(e){let n;Array.isArray(e.menuOpts)?n=e.menuOpts:e.menuOpts?n=[e.menuOpts]:n=[];function i(r){return r.menuId||(r.menuId=Rn.EditorContext),r.title||(r.title=e.label),r.when=Tt.and(e.precondition,r.when),r}return Array.isArray(e.contextMenuOpts)?n.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&n.push(i(e.contextMenuOpts)),e.menuOpts=n,e}constructor(e){super(En.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,n,i){return this.reportTelemetry(e,n),this.run(e,n,i||{})}reportTelemetry(e,n){e.get(eh).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class G4t extends En{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,n){return this._implementations.push([e,n]),this._implementations.sort((i,r)=>r[0]-i[0]),{dispose:()=>{for(let i=0;i<this._implementations.length;i++)if(this._implementations[i][1]===n){this._implementations.splice(i,1);return}}}}run(e,n,i){for(const r of this._implementations){const o=r[1](e,n,i);if(o)return typeof o=="boolean"?void 0:o}}}class c_ extends qh{run(e,...n){const i=e.get(Yr),r=i.getFocusedCodeEditor()||i.getActiveCodeEditor();if(r)return r.invokeWithinContext(o=>{var c;const s=o.get(vi),a=o.get(Nd);if(!s.contextMatchesRules(this.desc.precondition??void 0)){a.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,(c=this.desc.precondition)==null?void 0:c.serialize());return}return this.runEditorCommand(o,r,...n)})}}function Pf(t,e){Ar.registerCommand(t,function(n,...i){const r=n.get(qn),[o,s]=i;Gr(ri.isUri(o)),Gr(ot.isIPosition(s));const a=n.get(Ds).getModel(o);if(a){const l=ot.lift(s);return r.invokeFunction(e,a,l,...i.slice(2))}return n.get(Rf).createModelReference(o).then(l=>new Promise((c,u)=>{try{const d=r.invokeFunction(e,l.object.textEditorModel,ot.lift(s),i.slice(2));c(d)}catch(d){u(d)}}).finally(()=>{l.dispose()}))})}function fn(t){return Fg.INSTANCE.registerEditorCommand(t),t}function Ht(t){const e=new t;return Fg.INSTANCE.registerEditorAction(e),e}function Y4t(t){return Fg.INSTANCE.registerEditorAction(t),t}function Jfi(t){Fg.INSTANCE.registerEditorAction(t)}function Wr(t,e,n){Fg.INSTANCE.registerEditorContribution(t,e,n)}var lI;(function(t){function e(s){return Fg.INSTANCE.getEditorCommand(s)}t.getEditorCommand=e;function n(){return Fg.INSTANCE.getEditorActions()}t.getEditorActions=n;function i(){return Fg.INSTANCE.getEditorContributions()}t.getEditorContributions=i;function r(s){return Fg.INSTANCE.getEditorContributions().filter(a=>s.indexOf(a.id)>=0)}t.getSomeEditorContributions=r;function o(){return Fg.INSTANCE.getDiffEditorContributions()}t.getDiffEditorContributions=o})(lI||(lI={}));const emi={EditorCommonContributions:"editor.contributions"},Rle=class Rle{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,n,i){this.editorContributions.push({id:e,ctor:n,instantiation:i})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}};Rle.INSTANCE=new Rle;let Fg=Rle;la.add(emi.EditorCommonContributions,Fg.INSTANCE);function yq(t){return t.register(),t}const X4t=yq(new T6({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:Rn.MenubarEditMenu,group:"1_do",title:I({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:Rn.CommandPalette,group:"",title:I("undo","Undo"),order:1}]}));yq(new q4t(X4t,{id:"default:undo",precondition:void 0}));const Z4t=yq(new T6({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:Rn.MenubarEditMenu,group:"1_do",title:I({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:Rn.CommandPalette,group:"",title:I("redo","Redo"),order:1}]}));yq(new q4t(Z4t,{id:"default:redo",precondition:void 0}));const tmi=yq(new T6({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:Rn.MenubarSelectionMenu,group:"1_basic",title:I({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:Rn.CommandPalette,group:"",title:I("selectAll","Select All"),order:1}]})),nmi="$initialize";let nst=!1;function ALe(t){eM&&(nst||(nst=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(t.message))}class imi{constructor(e,n,i,r){this.vsWorker=e,this.req=n,this.method=i,this.args=r,this.type=0}}class ist{constructor(e,n,i,r){this.vsWorker=e,this.seq=n,this.res=i,this.err=r,this.type=1}}class rmi{constructor(e,n,i,r){this.vsWorker=e,this.req=n,this.eventName=i,this.arg=r,this.type=2}}class omi{constructor(e,n,i){this.vsWorker=e,this.req=n,this.event=i,this.type=3}}class smi{constructor(e,n){this.vsWorker=e,this.req=n,this.type=4}}class ami{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,n){const i=String(++this._lastSentReq);return new Promise((r,o)=>{this._pendingReplies[i]={resolve:r,reject:o},this._send(new imi(this._workerId,i,e,n))})}listen(e,n){let i=null;const r=new st({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,r),this._send(new rmi(this._workerId,i,e,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new smi(this._workerId,i)),i=null}});return r.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const n=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;e.err.$isError&&(i=new Error,i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack),n.reject(i);return}n.resolve(e.res)}_handleRequestMessage(e){const n=e.req;this._handler.handleMessage(e.method,e.args).then(r=>{this._send(new ist(this._workerId,n,r,void 0))},r=>{r.detail instanceof Error&&(r.detail=Lot(r.detail)),this._send(new ist(this._workerId,n,void 0,Lot(r)))})}_handleSubscribeEventMessage(e){const n=e.req,i=this._handler.handleEvent(e.eventName,e.arg)(r=>{this._send(new omi(this._workerId,n,r))});this._pendingEvents.set(n,i)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){const n=[];if(e.type===0)for(let i=0;i<e.args.length;i++)e.args[i]instanceof ArrayBuffer&&n.push(e.args[i]);else e.type===1&&e.res instanceof ArrayBuffer&&n.push(e.res);this._handler.sendMessage(e,n)}}class lmi extends ct{constructor(e,n,i){super();let r=null;this._worker=this._register(e.create("vs/base/common/worker/simpleWorker",u=>{this._protocol.handleMessage(u)},u=>{r==null||r(u)})),this._protocol=new ami({sendMessage:(u,d)=>{this._worker.postMessage(u,d)},handleMessage:(u,d)=>{if(typeof i[u]!="function")return Promise.reject(new Error("Missing method "+u+" on main thread host."));try{return Promise.resolve(i[u].apply(i,d))}catch(h){return Promise.reject(h)}},handleEvent:(u,d)=>{if(J4t(u)){const h=i[u].call(i,d);if(typeof h!="function")throw new Error(`Missing dynamic event ${u} on main thread host.`);return h}if(Q4t(u)){const h=i[u];if(typeof h!="function")throw new Error(`Missing event ${u} on main thread host.`);return h}throw new Error(`Malformed event name ${u}`)}}),this._protocol.setWorkerId(this._worker.getId());let o=null;const s=globalThis.require;typeof s<"u"&&typeof s.getConfig=="function"?o=s.getConfig():typeof globalThis.requirejs<"u"&&(o=globalThis.requirejs.s.contexts._.config);const a=l8e(i);this._onModuleLoaded=this._protocol.sendMessage(nmi,[this._worker.getId(),JSON.parse(JSON.stringify(o)),n,a]);const l=(u,d)=>this._request(u,d),c=(u,d)=>this._protocol.listen(u,d);this._lazyProxy=new Promise((u,d)=>{r=d,this._onModuleLoaded.then(h=>{u(cmi(h,l,c))},h=>{d(h),this._onError("Worker failed to load "+n,h)})})}getProxyObject(){return this._lazyProxy}_request(e,n){return new Promise((i,r)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(e,n).then(i,r)},r)})}_onError(e,n){console.error(e),console.info(n)}}function Q4t(t){return t[0]==="o"&&t[1]==="n"&&px(t.charCodeAt(2))}function J4t(t){return/^onDynamic/.test(t)&&px(t.charCodeAt(9))}function cmi(t,e,n){const i=s=>function(){const a=Array.prototype.slice.call(arguments,0);return e(s,a)},r=s=>function(a){return n(s,a)},o={};for(const s of t){if(J4t(s)){o[s]=r(s);continue}if(Q4t(s)){o[s]=n(s,void 0);continue}o[s]=i(s)}return o}function WS(t,e){var i;const n=globalThis.MonacoEnvironment;if(n!=null&&n.createTrustedTypesPolicy)try{return n.createTrustedTypesPolicy(t,e)}catch(r){ji(r);return}try{return(i=globalThis.trustedTypes)==null?void 0:i.createPolicy(t,e)}catch(r){ji(r);return}}let Yie;typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope"&&globalThis.workerttPolicy!==void 0?Yie=globalThis.workerttPolicy:Yie=WS("defaultWorkerFactory",{createScriptURL:t=>t});function umi(t){const e=globalThis.MonacoEnvironment;if(e){if(typeof e.getWorker=="function")return e.getWorker("workerMain.js",t);if(typeof e.getWorkerUrl=="function"){const n=e.getWorkerUrl("workerMain.js",t);return new Worker(Yie?Yie.createScriptURL(n):n,{name:t})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function dmi(t){return typeof t.then=="function"}class hmi extends ct{constructor(e,n,i,r,o){super(),this.id=n,this.label=i;const s=umi(i);dmi(s)?this.worker=s:this.worker=Promise.resolve(s),this.postMessage(e,[]),this.worker.then(a=>{a.onmessage=function(l){r(l.data)},a.onmessageerror=o,typeof a.addEventListener=="function"&&a.addEventListener("error",o)}),this._register(Kn(()=>{var a;(a=this.worker)==null||a.then(l=>{l.onmessage=null,l.onmessageerror=null,l.removeEventListener("error",o),l.terminate()}),this.worker=null}))}getId(){return this.id}postMessage(e,n){var i;(i=this.worker)==null||i.then(r=>{try{r.postMessage(e,n)}catch(o){ji(o),ji(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:o}))}})}}const Ple=class Ple{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,n,i){const r=++Ple.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new hmi(e,r,this._label||"anonymous"+r,n,o=>{ALe(o),this._webWorkerFailedBeforeError=o,i(o)})}};Ple.LAST_WORKER_ID=0;let RLe=Ple;var kl;(function(t){t[t.None=0]="None",t[t.Indent=1]="Indent",t[t.IndentOutdent=2]="IndentOutdent",t[t.Outdent=3]="Outdent"})(kl||(kl={}));class jwe{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let n=0,i=e.notIn.length;n<i;n++)switch(e.notIn[n]){case"string":this._inString=!1;break;case"comment":this._inComment=!1;break;case"regex":this._inRegEx=!1;break}}isOK(e){switch(e){case 0:return!0;case 1:return this._inComment;case 2:return this._inString;case 3:return this._inRegEx}}shouldAutoClose(e,n){if(e.getTokenCount()===0)return!0;const i=e.findTokenIndexAtOffset(n-2),r=e.getStandardTokenType(i);return this.isOK(r)}_findNeutralCharacterInRange(e,n){for(let i=e;i<=n;i++){const r=String.fromCharCode(i);if(!this.open.includes(r)&&!this.close.includes(r))return r}return null}findNeutralCharacter(){return this._neutralCharacterSearched||(this._neutralCharacterSearched=!0,this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(48,57)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(97,122)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(65,90))),this._neutralCharacter}}class fmi{constructor(e){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const n of e)VV(this.autoClosingPairsOpenByStart,n.open.charAt(0),n),VV(this.autoClosingPairsOpenByEnd,n.open.charAt(n.open.length-1),n),VV(this.autoClosingPairsCloseByStart,n.close.charAt(0),n),VV(this.autoClosingPairsCloseByEnd,n.close.charAt(n.close.length-1),n),n.close.length===1&&n.open.length===1&&VV(this.autoClosingPairsCloseSingleChar,n.close,n)}}function VV(t,e,n){t.has(e)?t.get(e).push(n):t.set(e,[n])}const B4=class B4{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(n=>new jwe(n)):e.brackets?this._autoClosingPairs=e.brackets.map(n=>new jwe({open:n[0],close:n[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const n=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new jwe({open:n.open,close:n.close||""}))}this._autoCloseBeforeForQuotes=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:B4.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:B4.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}};B4.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])> 
	`,B4.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS=`'"\`;:.,=}])> 
	`;let PLe=B4;function OT(t,e){const n=t.getCount(),i=t.findTokenIndexAtOffset(e),r=t.getLanguageId(i);let o=i;for(;o+1<n&&t.getLanguageId(o+1)===r;)o++;let s=i;for(;s>0&&t.getLanguageId(s-1)===r;)s--;return new mmi(t,r,s,o+1,t.getStartOffset(s),t.getEndOffset(o))}class mmi{constructor(e,n,i,r,o,s){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=n,this._firstTokenIndex=i,this._lastTokenIndex=r,this.firstCharOffset=o,this._lastCharOffset=s,this.languageIdCodec=e.languageIdCodec}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getLineLength(){return this._lastCharOffset-this.firstCharOffset}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}toIViewLineTokens(){return this._actual.sliceAndInflate(this.firstCharOffset,this._lastCharOffset,0)}}function G_(t){return(t&3)!==0}const rst=typeof Buffer<"u";let Fwe;class Ufe{static wrap(e){return rst&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new Ufe(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return rst?this.buffer.toString():(Fwe||(Fwe=new TextDecoder),Fwe.decode(this.buffer))}}function pmi(t,e){return t[e+0]<<0>>>0|t[e+1]<<8>>>0}function gmi(t,e,n){t[n+0]=e&255,e=e>>>8,t[n+1]=e&255}function Iy(t,e){return t[e]*2**24+t[e+1]*2**16+t[e+2]*2**8+t[e+3]}function Ay(t,e,n){t[n+3]=e,e=e>>>8,t[n+2]=e,e=e>>>8,t[n+1]=e,e=e>>>8,t[n]=e}function ost(t,e){return t[e]}function sst(t,e,n){t[n]=e}let $we;function e3t(){return $we||($we=new TextDecoder("UTF-16LE")),$we}let Vwe;function bmi(){return Vwe||(Vwe=new TextDecoder("UTF-16BE")),Vwe}let Bwe;function t3t(){return Bwe||(Bwe=$Ot()?e3t():bmi()),Bwe}function vmi(t,e,n){const i=new Uint16Array(t.buffer,e,n);return n>0&&(i[0]===65279||i[0]===65534)?ymi(t,e,n):e3t().decode(i)}function ymi(t,e,n){const i=[];let r=0;for(let o=0;o<n;o++){const s=pmi(t,e);e+=2,i[r++]=String.fromCharCode(s)}return i.join("")}class I6{constructor(e){this._capacity=e|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return t3t().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}appendCharCode(e){const n=this._capacity-this._bufferLength;n<=1&&(n===0||sc(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIICharCode(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendString(e){const n=e.length;if(this._bufferLength+n>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let i=0;i<n;i++)this._buffer[this._bufferLength++]=e.charCodeAt(i)}}class Xie{constructor(e,n,i,r,o,s){this._richEditBracketBrand=void 0,this.languageId=e,this.index=n,this.open=i,this.close=r,this.forwardRegex=o,this.reversedRegex=s,this._openSet=Xie._toSet(this.open),this._closeSet=Xie._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const n=new Set;for(const i of e)n.add(i);return n}}function _mi(t){const e=t.length;t=t.map(s=>[s[0].toLowerCase(),s[1].toLowerCase()]);const n=[];for(let s=0;s<e;s++)n[s]=s;const i=(s,a)=>{const[l,c]=s,[u,d]=a;return l===u||l===d||c===u||c===d},r=(s,a)=>{const l=Math.min(s,a),c=Math.max(s,a);for(let u=0;u<e;u++)n[u]===c&&(n[u]=l)};for(let s=0;s<e;s++){const a=t[s];for(let l=s+1;l<e;l++){const c=t[l];i(a,c)&&r(n[s],n[l])}}const o=[];for(let s=0;s<e;s++){const a=[],l=[];for(let c=0;c<e;c++)if(n[c]===s){const[u,d]=t[c];a.push(u),l.push(d)}a.length>0&&o.push({open:a,close:l})}return o}class xmi{constructor(e,n){this._richEditBracketsBrand=void 0;const i=_mi(n);this.brackets=i.map((r,o)=>new Xie(e,o,r.open,r.close,wmi(r.open,r.close,i,o),Cmi(r.open,r.close,i,o))),this.forwardRegex=Smi(this.brackets),this.reversedRegex=Nmi(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const r of this.brackets){for(const o of r.open)this.textIsBracket[o]=r,this.textIsOpenBracket[o]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,o.length);for(const o of r.close)this.textIsBracket[o]=r,this.textIsOpenBracket[o]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,o.length)}}}function n3t(t,e,n,i){for(let r=0,o=e.length;r<o;r++){if(r===n)continue;const s=e[r];for(const a of s.open)a.indexOf(t)>=0&&i.push(a);for(const a of s.close)a.indexOf(t)>=0&&i.push(a)}}function i3t(t,e){return t.length-e.length}function Kfe(t){if(t.length<=1)return t;const e=[],n=new Set;for(const i of t)n.has(i)||(e.push(i),n.add(i));return e}function wmi(t,e,n,i){let r=[];r=r.concat(t),r=r.concat(e);for(let o=0,s=r.length;o<s;o++)n3t(r[o],n,i,r);return r=Kfe(r),r.sort(i3t),r.reverse(),_q(r)}function Cmi(t,e,n,i){let r=[];r=r.concat(t),r=r.concat(e);for(let o=0,s=r.length;o<s;o++)n3t(r[o],n,i,r);return r=Kfe(r),r.sort(i3t),r.reverse(),_q(r.map($8e))}function Smi(t){let e=[];for(const n of t){for(const i of n.open)e.push(i);for(const i of n.close)e.push(i)}return e=Kfe(e),_q(e)}function Nmi(t){let e=[];for(const n of t){for(const i of n.open)e.push(i);for(const i of n.close)e.push(i)}return e=Kfe(e),_q(e.map($8e))}function Emi(t){const e=/^[\w ]+$/.test(t);return t=Hp(t),e?`\\b${t}\\b`:t}function _q(t,e){const n=`(${t.map(Emi).join(")|(")})`;return c4t(n,!0,e)}const $8e=function(){function t(i){const r=new Uint16Array(i.length);let o=0;for(let s=i.length-1;s>=0;s--)r[o++]=i.charCodeAt(s);return t3t().decode(r)}let e=null,n=null;return function(r){return e!==r&&(e=r,n=t(e)),n}}();class Hb{static _findPrevBracketInText(e,n,i,r){const o=i.match(e);if(!o)return null;const s=i.length-(o.index||0),a=o[0].length,l=r+s;return new ve(n,l-a+1,n,l+1)}static findPrevBracketInRange(e,n,i,r,o){const a=$8e(i).substring(i.length-o,i.length-r);return this._findPrevBracketInText(e,n,a,r)}static findNextBracketInText(e,n,i,r){const o=i.match(e);if(!o)return null;const s=o.index||0,a=o[0].length;if(a===0)return null;const l=r+s;return new ve(n,l+1,n,l+1+a)}static findNextBracketInRange(e,n,i,r,o){const s=i.substring(r,o);return this.findNextBracketInText(e,n,s,r)}}class Dmi{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const n of this._richEditBrackets.brackets)for(const i of n.close){const r=i.charAt(i.length-1);e.push(r)}return cS(e)}onElectricCharacter(e,n,i){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const r=n.findTokenIndexAtOffset(i-1);if(G_(n.getStandardTokenType(r)))return null;const o=this._richEditBrackets.reversedRegex,s=n.getLineContent().substring(0,i-1)+e,a=Hb.findPrevBracketInRange(o,1,s,0,s.length);if(!a)return null;const l=s.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[l])return null;const u=n.getActualLineContentBefore(a.startColumn-1);return/^\s*$/.test(u)?{matchOpenBracket:l}:null}}function hQ(t){return t.global&&(t.lastIndex=0),!0}class kmi{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&hQ(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&hQ(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&hQ(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&hQ(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let n=0;return this.shouldIncrease(e)&&(n+=1),this.shouldDecrease(e)&&(n+=2),this.shouldIndentNextLine(e)&&(n+=4),this.shouldIgnore(e)&&(n+=8),n}}class c4{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(n=>{const i=c4._createOpenBracketRegExp(n[0]),r=c4._createCloseBracketRegExp(n[1]);i&&r&&this._brackets.push({open:n[0],openRegExp:i,close:n[1],closeRegExp:r})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,n,i,r){if(e>=3)for(let o=0,s=this._regExpRules.length;o<s;o++){const a=this._regExpRules[o];if([{reg:a.beforeText,text:i},{reg:a.afterText,text:r},{reg:a.previousLineText,text:n}].every(c=>c.reg?(c.reg.lastIndex=0,c.reg.test(c.text)):!0))return a.action}if(e>=2&&i.length>0&&r.length>0)for(let o=0,s=this._brackets.length;o<s;o++){const a=this._brackets[o];if(a.openRegExp.test(i)&&a.closeRegExp.test(r))return{indentAction:kl.IndentOutdent}}if(e>=2&&i.length>0){for(let o=0,s=this._brackets.length;o<s;o++)if(this._brackets[o].openRegExp.test(i))return{indentAction:kl.Indent}}return null}static _createOpenBracketRegExp(e){let n=Hp(e);return/\B/.test(n.charAt(0))||(n="\\b"+n),n+="\\s*$",c4._safeRegExp(n)}static _createCloseBracketRegExp(e){let n=Hp(e);return/\B/.test(n.charAt(n.length-1))||(n=n+"\\b"),n="^\\s*"+n,c4._safeRegExp(n)}static _safeRegExp(e){try{return new RegExp(e)}catch(n){return ji(n),null}}}const cr=Sr("configurationService");function OLe(t,e){const n=Object.create(null);for(const i in t)r3t(n,i,t[i],e);return n}function r3t(t,e,n,i){const r=e.split("."),o=r.pop();let s=t;for(let a=0;a<r.length;a++){const l=r[a];let c=s[l];switch(typeof c){case"undefined":c=s[l]=Object.create(null);break;case"object":if(c===null){i(`Ignoring ${e} as ${r.slice(0,a+1).join(".")} is null`);return}break;default:i(`Ignoring ${e} as ${r.slice(0,a+1).join(".")} is ${JSON.stringify(c)}`);return}s=c}if(typeof s=="object"&&s!==null)try{s[o]=n}catch{i(`Ignoring ${e} as ${r.join(".")} is ${JSON.stringify(s)}`)}else i(`Ignoring ${e} as ${r.join(".")} is ${JSON.stringify(s)}`)}function Mmi(t,e){const n=e.split(".");o3t(t,n)}function o3t(t,e){const n=e.shift();if(e.length===0){delete t[n];return}if(Object.keys(t).indexOf(n)!==-1){const i=t[n];typeof i=="object"&&!Array.isArray(i)&&(o3t(i,e),Object.keys(i).length===0&&delete t[n])}}function ast(t,e,n){function i(s,a){let l=s;for(const c of a){if(typeof l!="object"||l===null)return;l=l[c]}return l}const r=e.split("."),o=i(t,r);return typeof o>"u"?n:o}function Lmi(t){return t.replace(/[\[\]]/g,"")}const Qs=Sr("languageService");class gx{constructor(e,n=[],i=!1){this.ctor=e,this.staticArguments=n,this.supportsDelayedInstantiation=i}}const s3t=[];function Rr(t,e,n){e instanceof gx||(e=new gx(e,[],!!n)),s3t.push([t,e])}function lst(){return s3t}const Pa=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"}),qfe={JSONContribution:"base.contributions.json"};function Tmi(t){return t.length>0&&t.charAt(t.length-1)==="#"?t.substring(0,t.length-1):t}class Imi{constructor(){this._onDidChangeSchema=new st,this.schemasById={}}registerSchema(e,n){this.schemasById[Tmi(e)]=n,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const Ami=new Imi;la.add(qfe.JSONContribution,Ami);const Yv={Configuration:"base.contributions.configuration"},BV="vscode://schemas/settings/resourceLanguage",cst=la.as(qfe.JSONContribution);class Rmi{constructor(){this.registeredConfigurationDefaults=[],this.overrideIdentifiers=new Set,this._onDidSchemaChange=new st,this._onDidUpdateConfiguration=new st,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:I("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},cst.registerSchema(BV,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,n=!0){this.registerConfigurations([e],n)}registerConfigurations(e,n=!0){const i=new Set;this.doRegisterConfigurations(e,n,i),cst.registerSchema(BV,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(e){const n=new Set;this.doRegisterDefaultConfigurations(e,n),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,n){this.registeredConfigurationDefaults.push(...e);const i=[];for(const{overrides:r,source:o}of e)for(const s in r){n.add(s);const a=this.configurationDefaultsOverrides.get(s)??this.configurationDefaultsOverrides.set(s,{configurationDefaultOverrides:[]}).get(s),l=r[s];if(a.configurationDefaultOverrides.push({value:l,source:o}),fk.test(s)){const c=this.mergeDefaultConfigurationsForOverrideIdentifier(s,l,o,a.configurationDefaultOverrideValue);if(!c)continue;a.configurationDefaultOverrideValue=c,this.updateDefaultOverrideProperty(s,c,o),i.push(...Zie(s))}else{const c=this.mergeDefaultConfigurationsForConfigurationProperty(s,l,o,a.configurationDefaultOverrideValue);if(!c)continue;a.configurationDefaultOverrideValue=c;const u=this.configurationProperties[s];u&&(this.updatePropertyDefaultValue(s,u),this.updateSchema(s,u))}}this.doRegisterOverrideIdentifiers(i)}updateDefaultOverrideProperty(e,n,i){const r={type:"object",default:n.value,description:I("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",Lmi(e)),$ref:BV,defaultDefaultValue:n.value,source:i,defaultValueSource:i};this.configurationProperties[e]=r,this.defaultLanguageConfigurationOverridesNode.properties[e]=r}mergeDefaultConfigurationsForOverrideIdentifier(e,n,i,r){const o=(r==null?void 0:r.value)||{},s=(r==null?void 0:r.source)??new Map;if(!(s instanceof Map)){console.error("objectConfigurationSources is not a Map");return}for(const a of Object.keys(n)){const l=n[a];if(Ic(l)&&(Ud(o[a])||Ic(o[a]))){if(o[a]={...o[a]??{},...l},i)for(const u in l)s.set(`${a}.${u}`,i)}else o[a]=l,i?s.set(a,i):s.delete(a)}return{value:o,source:s}}mergeDefaultConfigurationsForConfigurationProperty(e,n,i,r){const o=this.configurationProperties[e],s=(r==null?void 0:r.value)??(o==null?void 0:o.defaultDefaultValue);let a=i;if(Ic(n)&&(o!==void 0&&o.type==="object"||o===void 0&&(Ud(s)||Ic(s)))){if(a=(r==null?void 0:r.source)??new Map,!(a instanceof Map)){console.error("defaultValueSource is not a Map");return}for(const c in n)i&&a.set(`${e}.${c}`,i);n={...Ic(s)?s:{},...n}}return{value:n,source:a}}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const n of e)this.overrideIdentifiers.add(n);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,n,i){e.forEach(r=>{this.validateAndRegisterProperties(r,n,r.extensionInfo,r.restrictedProperties,void 0,i),this.configurationContributors.push(r),this.registerJSONConfiguration(r)})}validateAndRegisterProperties(e,n=!0,i,r,o=3,s){var c;o=pp(e.scope)?o:e.scope;const a=e.properties;if(a)for(const u in a){const d=a[u];if(n&&jmi(u,d)){delete a[u];continue}if(d.source=i,d.defaultDefaultValue=a[u].default,this.updatePropertyDefaultValue(u,d),fk.test(u)?d.scope=void 0:(d.scope=pp(d.scope)?o:d.scope,d.restricted=pp(d.restricted)?!!(r!=null&&r.includes(u)):d.restricted),a[u].hasOwnProperty("included")&&!a[u].included){this.excludedConfigurationProperties[u]=a[u],delete a[u];continue}else this.configurationProperties[u]=a[u],(c=a[u].policy)!=null&&c.name&&this.policyConfigurations.set(a[u].policy.name,u);!a[u].deprecationMessage&&a[u].markdownDeprecationMessage&&(a[u].deprecationMessage=a[u].markdownDeprecationMessage),s.add(u)}const l=e.allOf;if(l)for(const u of l)this.validateAndRegisterProperties(u,n,i,r,o,s)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const n=i=>{const r=i.properties;if(r)for(const s in r)this.updateSchema(s,r[s]);const o=i.allOf;o==null||o.forEach(n)};n(e)}updateSchema(e,n){switch(n.scope){case 1:break;case 2:break;case 6:break;case 3:break;case 4:break;case 5:this.resourceLanguageSettingsSchema.properties[e]=n;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const n=`[${e}]`,i={type:"object",description:I("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:I("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:BV};this.updatePropertyDefaultValue(n,i)}}registerOverridePropertyPatternKey(){I("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),I("overrideSettings.errorMessage","This setting does not support per-language configuration."),this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,n){var s;const i=(s=this.configurationDefaultsOverrides.get(e))==null?void 0:s.configurationDefaultOverrideValue;let r,o;i&&(!n.disallowConfigurationDefault||!i.source)&&(r=i.value,o=i.source),Ud(r)&&(r=n.defaultDefaultValue,o=void 0),Ud(r)&&(r=Omi(n.type)),n.default=r,n.defaultValueSource=o}}const a3t="\\[([^\\]]+)\\]",ust=new RegExp(a3t,"g"),Pmi=`^(${a3t})+$`,fk=new RegExp(Pmi);function Zie(t){const e=[];if(fk.test(t)){let n=ust.exec(t);for(;n!=null&&n.length;){const i=n[1].trim();i&&e.push(i),n=ust.exec(t)}}return cS(e)}function Omi(t){switch(Array.isArray(t)?t[0]:t){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const ite=new Rmi;la.add(Yv.Configuration,ite);function jmi(t,e){var n,i,r,o;return t.trim()?fk.test(t)?I("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",t):ite.getConfigurationProperties()[t]!==void 0?I("config.property.duplicate","Cannot register '{0}'. This property is already registered.",t):(n=e.policy)!=null&&n.name&&ite.getPolicyConfigurations().get((i=e.policy)==null?void 0:i.name)!==void 0?I("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",t,(r=e.policy)==null?void 0:r.name,ite.getPolicyConfigurations().get((o=e.policy)==null?void 0:o.name)):null:I("config.property.empty","Cannot register an empty property")}const Fmi={ModesRegistry:"editor.modesRegistry"};class $mi{constructor(){this._onDidChangeLanguages=new st,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let n=0,i=this._languages.length;n<i;n++)if(this._languages[n]===e){this._languages.splice(n,1);return}}}}getLanguages(){return this._languages}}const r5=new $mi;la.add(Fmi.ModesRegistry,r5);const Ph="plaintext",Vmi=".txt";r5.registerLanguage({id:Ph,extensions:[Vmi],aliases:[I("plainText.alias","Plain Text"),"text"],mimetypes:[Pa.text]});la.as(Yv.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}]);class Bmi{constructor(e,n){this.languageId=e;const i=n.brackets?dst(n.brackets):[],r=new Pot(a=>{const l=new Set;return{info:new zmi(this,a,l),closing:l}}),o=new Pot(a=>{const l=new Set,c=new Set;return{info:new Hmi(this,a,l,c),opening:l,openingColorized:c}});for(const[a,l]of i){const c=r.get(a),u=o.get(l);c.closing.add(u.info),u.opening.add(c.info)}const s=n.colorizedBracketPairs?dst(n.colorizedBracketPairs):i.filter(a=>!(a[0]==="<"&&a[1]===">"));for(const[a,l]of s){const c=r.get(a),u=o.get(l);c.closing.add(u.info),u.openingColorized.add(c.info),u.opening.add(c.info)}this._openingBrackets=new Map([...r.cachedValues].map(([a,l])=>[a,l.info])),this._closingBrackets=new Map([...o.cachedValues].map(([a,l])=>[a,l.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){const n=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return _q(n,e)}}function dst(t){return t.filter(([e,n])=>e!==""&&n!=="")}class l3t{constructor(e,n){this.config=e,this.bracketText=n}get languageId(){return this.config.languageId}}class zmi extends l3t{constructor(e,n,i){super(e,n),this.openedBrackets=i,this.isOpeningBracket=!0}}class Hmi extends l3t{constructor(e,n,i,r){super(e,n),this.openingBrackets=i,this.openingColorizedBrackets=r,this.isOpeningBracket=!1}closes(e){return e.config!==this.config?!1:this.openingBrackets.has(e)}closesColorized(e){return e.config!==this.config?!1:this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var Wmi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},hst=function(t,e){return function(n,i){e(n,i,t)}};class zwe{constructor(e){this.languageId=e}affects(e){return this.languageId?this.languageId===e:!0}}const bs=Sr("languageConfigurationService");let jLe=class extends ct{constructor(e,n){super(),this.configurationService=e,this.languageService=n,this._registry=this._register(new Gmi),this.onDidChangeEmitter=this._register(new st),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(FLe));this._register(this.configurationService.onDidChangeConfiguration(r=>{const o=r.change.keys.some(a=>i.has(a)),s=r.change.overrides.filter(([a,l])=>l.some(c=>i.has(c))).map(([a])=>a);if(o)this.configurations.clear(),this.onDidChangeEmitter.fire(new zwe(void 0));else for(const a of s)this.languageService.isRegisteredLanguageId(a)&&(this.configurations.delete(a),this.onDidChangeEmitter.fire(new zwe(a)))})),this._register(this._registry.onDidChange(r=>{this.configurations.delete(r.languageId),this.onDidChangeEmitter.fire(new zwe(r.languageId))}))}register(e,n,i){return this._registry.register(e,n,i)}getLanguageConfiguration(e){let n=this.configurations.get(e);return n||(n=Umi(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,n)),n}};jLe=Wmi([hst(0,cr),hst(1,Qs)],jLe);function Umi(t,e,n,i){let r=e.getLanguageConfiguration(t);if(!r){if(!i.isRegisteredLanguageId(t))return new _3(t,{});r=new _3(t,{})}const o=Kmi(r.languageId,n),s=u3t([r.underlyingConfig,o]);return new _3(r.languageId,s)}const FLe={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function Kmi(t,e){const n=e.getValue(FLe.brackets,{overrideIdentifier:t}),i=e.getValue(FLe.colorizedBracketPairs,{overrideIdentifier:t});return{brackets:fst(n),colorizedBracketPairs:fst(i)}}function fst(t){if(Array.isArray(t))return t.map(e=>{if(!(!Array.isArray(e)||e.length!==2))return[e[0],e[1]]}).filter(e=>!!e)}function c3t(t,e,n){const i=t.getLineContent(e);let r=Zo(i);return r.length>n-1&&(r=r.substring(0,n-1)),r}class qmi{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,n){const i=new mst(e,n,++this._order);return this._entries.push(i),this._resolved=null,Kn(()=>{for(let r=0;r<this._entries.length;r++)if(this._entries[r]===i){this._entries.splice(r,1),this._resolved=null;break}})}getResolvedConfiguration(){if(!this._resolved){const e=this._resolve();e&&(this._resolved=new _3(this.languageId,e))}return this._resolved}_resolve(){return this._entries.length===0?null:(this._entries.sort(mst.cmp),u3t(this._entries.map(e=>e.configuration)))}}function u3t(t){let e={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const n of t)e={comments:n.comments||e.comments,brackets:n.brackets||e.brackets,wordPattern:n.wordPattern||e.wordPattern,indentationRules:n.indentationRules||e.indentationRules,onEnterRules:n.onEnterRules||e.onEnterRules,autoClosingPairs:n.autoClosingPairs||e.autoClosingPairs,surroundingPairs:n.surroundingPairs||e.surroundingPairs,autoCloseBefore:n.autoCloseBefore||e.autoCloseBefore,folding:n.folding||e.folding,colorizedBracketPairs:n.colorizedBracketPairs||e.colorizedBracketPairs,__electricCharacterSupport:n.__electricCharacterSupport||e.__electricCharacterSupport};return e}class mst{constructor(e,n,i){this.configuration=e,this.priority=n,this.order=i}static cmp(e,n){return e.priority===n.priority?e.order-n.order:e.priority-n.priority}}class pst{constructor(e){this.languageId=e}}class Gmi extends ct{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new st),this.onDidChange=this._onDidChange.event,this._register(this.register(Ph,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,n,i=0){let r=this._entries.get(e);r||(r=new qmi(e),this._entries.set(e,r));const o=r.register(n,i);return this._onDidChange.fire(new pst(e)),Kn(()=>{o.dispose(),this._onDidChange.fire(new pst(e))})}getLanguageConfiguration(e){const n=this._entries.get(e);return(n==null?void 0:n.getResolvedConfiguration())||null}}class _3{constructor(e,n){this.languageId=e,this.underlyingConfig=n,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new c4(this.underlyingConfig):null,this.comments=_3._handleComments(this.underlyingConfig),this.characterPair=new PLe(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||d8e,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new kmi(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new Bmi(e,this.underlyingConfig)}getWordDefinition(){return h8e(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new xmi(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new Dmi(this.brackets)),this._electricCharacter}onEnter(e,n,i,r){return this._onEnterSupport?this._onEnterSupport.onEnter(e,n,i,r):null}getAutoClosingPairs(){return new fmi(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const n=e.comments;if(!n)return null;const i={};if(n.lineComment&&(i.lineCommentToken=n.lineComment),n.blockComment){const[r,o]=n.blockComment;i.blockCommentStartToken=r,i.blockCommentEndToken=o}return i}}Rr(bs,jLe,1);class qN{constructor(e,n,i,r){this.originalStart=e,this.originalLength=n,this.modifiedStart=i,this.modifiedLength=r}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}class gst{constructor(e){this.source=e}getElements(){const e=this.source,n=new Int32Array(e.length);for(let i=0,r=e.length;i<r;i++)n[i]=e.charCodeAt(i);return n}}function Ymi(t,e,n){return new wx(new gst(t),new gst(e)).ComputeDiff(n).changes}class GP{static Assert(e,n){if(!e)throw new Error(n)}}class YP{static Copy(e,n,i,r,o){for(let s=0;s<o;s++)i[r+s]=e[n+s]}static Copy2(e,n,i,r,o){for(let s=0;s<o;s++)i[r+s]=e[n+s]}}class bst{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new qN(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class wx{constructor(e,n,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=n;const[r,o,s]=wx._getElements(e),[a,l,c]=wx._getElements(n);this._hasStrings=s&&c,this._originalStringElements=r,this._originalElementsOrHash=o,this._modifiedStringElements=a,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const n=e.getElements();if(wx._isStringArray(n)){const i=new Int32Array(n.length);for(let r=0,o=n.length;r<o;r++)i[r]=L8e(n[r],0);return[n,i,!0]}return n instanceof Int32Array?[[],n,!1]:[[],new Int32Array(n),!1]}ElementsAreEqual(e,n){return this._originalElementsOrHash[e]!==this._modifiedElementsOrHash[n]?!1:this._hasStrings?this._originalStringElements[e]===this._modifiedStringElements[n]:!0}ElementsAreStrictEqual(e,n){if(!this.ElementsAreEqual(e,n))return!1;const i=wx._getStrictElement(this._originalSequence,e),r=wx._getStrictElement(this._modifiedSequence,n);return i===r}static _getStrictElement(e,n){return typeof e.getStrictElement=="function"?e.getStrictElement(n):null}OriginalElementsAreEqual(e,n){return this._originalElementsOrHash[e]!==this._originalElementsOrHash[n]?!1:this._hasStrings?this._originalStringElements[e]===this._originalStringElements[n]:!0}ModifiedElementsAreEqual(e,n){return this._modifiedElementsOrHash[e]!==this._modifiedElementsOrHash[n]?!1:this._hasStrings?this._modifiedStringElements[e]===this._modifiedStringElements[n]:!0}ComputeDiff(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}_ComputeDiff(e,n,i,r,o){const s=[!1];let a=this.ComputeDiffRecursive(e,n,i,r,s);return o&&(a=this.PrettifyChanges(a)),{quitEarly:s[0],changes:a}}ComputeDiffRecursive(e,n,i,r,o){for(o[0]=!1;e<=n&&i<=r&&this.ElementsAreEqual(e,i);)e++,i++;for(;n>=e&&r>=i&&this.ElementsAreEqual(n,r);)n--,r--;if(e>n||i>r){let d;return i<=r?(GP.Assert(e===n+1,"originalStart should only be one more than originalEnd"),d=[new qN(e,0,i,r-i+1)]):e<=n?(GP.Assert(i===r+1,"modifiedStart should only be one more than modifiedEnd"),d=[new qN(e,n-e+1,i,0)]):(GP.Assert(e===n+1,"originalStart should only be one more than originalEnd"),GP.Assert(i===r+1,"modifiedStart should only be one more than modifiedEnd"),d=[]),d}const s=[0],a=[0],l=this.ComputeRecursionPoint(e,n,i,r,s,a,o),c=s[0],u=a[0];if(l!==null)return l;if(!o[0]){const d=this.ComputeDiffRecursive(e,c,i,u,o);let h=[];return o[0]?h=[new qN(c+1,n-(c+1)+1,u+1,r-(u+1)+1)]:h=this.ComputeDiffRecursive(c+1,n,u+1,r,o),this.ConcatenateChanges(d,h)}return[new qN(e,n-e+1,i,r-i+1)]}WALKTRACE(e,n,i,r,o,s,a,l,c,u,d,h,f,m,p,g,y,_){let w=null,C=null,N=new bst,E=n,D=i,k=f[0]-g[0]-r,M=-1073741824,T=this.m_forwardHistory.length-1;do{const A=k+e;A===E||A<D&&c[A-1]<c[A+1]?(d=c[A+1],m=d-k-r,d<M&&N.MarkNextChange(),M=d,N.AddModifiedElement(d+1,m),k=A+1-e):(d=c[A-1]+1,m=d-k-r,d<M&&N.MarkNextChange(),M=d-1,N.AddOriginalElement(d,m+1),k=A-1-e),T>=0&&(c=this.m_forwardHistory[T],e=c[0],E=1,D=c.length-1)}while(--T>=-1);if(w=N.getReverseChanges(),_[0]){let A=f[0]+1,R=g[0]+1;if(w!==null&&w.length>0){const P=w[w.length-1];A=Math.max(A,P.getOriginalEnd()),R=Math.max(R,P.getModifiedEnd())}C=[new qN(A,h-A+1,R,p-R+1)]}else{N=new bst,E=s,D=a,k=f[0]-g[0]-l,M=1073741824,T=y?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const A=k+o;A===E||A<D&&u[A-1]>=u[A+1]?(d=u[A+1]-1,m=d-k-l,d>M&&N.MarkNextChange(),M=d+1,N.AddOriginalElement(d+1,m+1),k=A+1-o):(d=u[A-1],m=d-k-l,d>M&&N.MarkNextChange(),M=d,N.AddModifiedElement(d+1,m+1),k=A-1-o),T>=0&&(u=this.m_reverseHistory[T],o=u[0],E=1,D=u.length-1)}while(--T>=-1);C=N.getChanges()}return this.ConcatenateChanges(w,C)}ComputeRecursionPoint(e,n,i,r,o,s,a){let l=0,c=0,u=0,d=0,h=0,f=0;e--,i--,o[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=n-e+(r-i),p=m+1,g=new Int32Array(p),y=new Int32Array(p),_=r-i,w=n-e,C=e-i,N=n-r,D=(w-_)%2===0;g[_]=e,y[w]=n,a[0]=!1;for(let k=1;k<=m/2+1;k++){let M=0,T=0;u=this.ClipDiagonalBound(_-k,k,_,p),d=this.ClipDiagonalBound(_+k,k,_,p);for(let R=u;R<=d;R+=2){R===u||R<d&&g[R-1]<g[R+1]?l=g[R+1]:l=g[R-1]+1,c=l-(R-_)-C;const P=l;for(;l<n&&c<r&&this.ElementsAreEqual(l+1,c+1);)l++,c++;if(g[R]=l,l+c>M+T&&(M=l,T=c),!D&&Math.abs(R-w)<=k-1&&l>=y[R])return o[0]=l,s[0]=c,P<=y[R]&&k<=1448?this.WALKTRACE(_,u,d,C,w,h,f,N,g,y,l,n,o,c,r,s,D,a):null}const A=(M-e+(T-i)-k)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(M,A))return a[0]=!0,o[0]=M,s[0]=T,A>0&&k<=1448?this.WALKTRACE(_,u,d,C,w,h,f,N,g,y,l,n,o,c,r,s,D,a):(e++,i++,[new qN(e,n-e+1,i,r-i+1)]);h=this.ClipDiagonalBound(w-k,k,w,p),f=this.ClipDiagonalBound(w+k,k,w,p);for(let R=h;R<=f;R+=2){R===h||R<f&&y[R-1]>=y[R+1]?l=y[R+1]-1:l=y[R-1],c=l-(R-w)-N;const P=l;for(;l>e&&c>i&&this.ElementsAreEqual(l,c);)l--,c--;if(y[R]=l,D&&Math.abs(R-_)<=k&&l<=g[R])return o[0]=l,s[0]=c,P>=g[R]&&k<=1448?this.WALKTRACE(_,u,d,C,w,h,f,N,g,y,l,n,o,c,r,s,D,a):null}if(k<=1447){let R=new Int32Array(d-u+2);R[0]=_-u+1,YP.Copy2(g,u,R,1,d-u+1),this.m_forwardHistory.push(R),R=new Int32Array(f-h+2),R[0]=w-h+1,YP.Copy2(y,h,R,1,f-h+1),this.m_reverseHistory.push(R)}}return this.WALKTRACE(_,u,d,C,w,h,f,N,g,y,l,n,o,c,r,s,D,a)}PrettifyChanges(e){for(let n=0;n<e.length;n++){const i=e[n],r=n<e.length-1?e[n+1].originalStart:this._originalElementsOrHash.length,o=n<e.length-1?e[n+1].modifiedStart:this._modifiedElementsOrHash.length,s=i.originalLength>0,a=i.modifiedLength>0;for(;i.originalStart+i.originalLength<r&&i.modifiedStart+i.modifiedLength<o&&(!s||this.OriginalElementsAreEqual(i.originalStart,i.originalStart+i.originalLength))&&(!a||this.ModifiedElementsAreEqual(i.modifiedStart,i.modifiedStart+i.modifiedLength));){const c=this.ElementsAreStrictEqual(i.originalStart,i.modifiedStart);if(this.ElementsAreStrictEqual(i.originalStart+i.originalLength,i.modifiedStart+i.modifiedLength)&&!c)break;i.originalStart++,i.modifiedStart++}const l=[null];if(n<e.length-1&&this.ChangesOverlap(e[n],e[n+1],l)){e[n]=l[0],e.splice(n+1,1),n--;continue}}for(let n=e.length-1;n>=0;n--){const i=e[n];let r=0,o=0;if(n>0){const d=e[n-1];r=d.originalStart+d.originalLength,o=d.modifiedStart+d.modifiedLength}const s=i.originalLength>0,a=i.modifiedLength>0;let l=0,c=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let d=1;;d++){const h=i.originalStart-d,f=i.modifiedStart-d;if(h<r||f<o||s&&!this.OriginalElementsAreEqual(h,h+i.originalLength)||a&&!this.ModifiedElementsAreEqual(f,f+i.modifiedLength))break;const p=(h===r&&f===o?5:0)+this._boundaryScore(h,i.originalLength,f,i.modifiedLength);p>c&&(c=p,l=d)}i.originalStart-=l,i.modifiedStart-=l;const u=[null];if(n>0&&this.ChangesOverlap(e[n-1],e[n],u)){e[n-1]=u[0],e.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,i=e.length;n<i;n++){const r=e[n-1],o=e[n],s=o.originalStart-r.originalStart-r.originalLength,a=r.originalStart,l=o.originalStart+o.originalLength,c=l-a,u=r.modifiedStart,d=o.modifiedStart+o.modifiedLength,h=d-u;if(s<5&&c<20&&h<20){const f=this._findBetterContiguousSequence(a,c,u,h,s);if(f){const[m,p]=f;(m!==r.originalStart+r.originalLength||p!==r.modifiedStart+r.modifiedLength)&&(r.originalLength=m-r.originalStart,r.modifiedLength=p-r.modifiedStart,o.originalStart=m+s,o.modifiedStart=p+s,o.originalLength=l-o.originalStart,o.modifiedLength=d-o.modifiedStart)}}}return e}_findBetterContiguousSequence(e,n,i,r,o){if(n<o||r<o)return null;const s=e+n-o+1,a=i+r-o+1;let l=0,c=0,u=0;for(let d=e;d<s;d++)for(let h=i;h<a;h++){const f=this._contiguousSequenceScore(d,h,o);f>0&&f>l&&(l=f,c=d,u=h)}return l>0?[c,u]:null}_contiguousSequenceScore(e,n,i){let r=0;for(let o=0;o<i;o++){if(!this.ElementsAreEqual(e+o,n+o))return 0;r+=this._originalStringElements[e+o].length}return r}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,n){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(n>0){const i=e+n;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,n){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(n>0){const i=e+n;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,n,i,r){const o=this._OriginalRegionIsBoundary(e,n)?1:0,s=this._ModifiedRegionIsBoundary(i,r)?1:0;return o+s}ConcatenateChanges(e,n){const i=[];if(e.length===0||n.length===0)return n.length>0?n:e;if(this.ChangesOverlap(e[e.length-1],n[0],i)){const r=new Array(e.length+n.length-1);return YP.Copy(e,0,r,0,e.length-1),r[e.length-1]=i[0],YP.Copy(n,1,r,e.length,n.length-1),r}else{const r=new Array(e.length+n.length);return YP.Copy(e,0,r,0,e.length),YP.Copy(n,0,r,e.length,n.length),r}}ChangesOverlap(e,n,i){if(GP.Assert(e.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),GP.Assert(e.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=n.originalStart||e.modifiedStart+e.modifiedLength>=n.modifiedStart){const r=e.originalStart;let o=e.originalLength;const s=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=n.originalStart&&(o=n.originalStart+n.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=n.modifiedStart&&(a=n.modifiedStart+n.modifiedLength-e.modifiedStart),i[0]=new qN(r,o,s,a),!0}else return i[0]=null,!1}ClipDiagonalBound(e,n,i,r){if(e>=0&&e<r)return e;const o=i,s=r-i-1,a=n%2===0;if(e<0){const l=o%2===0;return a===l?0:1}else{const l=s%2===0;return a===l?r-1:r-2}}}function Qie(t){return t<0?0:t>255?255:t|0}function XP(t){return t<0?0:t>4294967295?4294967295:t|0}class Xmi{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=XP(e);const i=this.values,r=this.prefixSum,o=n.length;return o===0?!1:(this.values=new Uint32Array(i.length+o),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+o),this.values.set(n,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=XP(e),n=XP(n),this.values[e]===n?!1:(this.values[e]=n,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,n){e=XP(e),n=XP(n);const i=this.values,r=this.prefixSum;if(e>=i.length)return!1;const o=i.length-e;return n>=o&&(n=o),n===0?!1:(this.values=new Uint32Array(i.length-n),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+n),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=XP(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),e>=this.values.length&&(e=this.values.length-1);for(let i=n;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let n=0,i=this.values.length-1,r=0,o=0,s=0;for(;n<=i;)if(r=n+(i-n)/2|0,o=this.prefixSum[r],s=o-this.values[r],e<s)i=r-1;else if(e>=o)n=r+1;else break;return new d3t(r,e-s)}}class Zmi{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),e===0?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const n=this._indexBySum[e],i=n>0?this._prefixSum[n-1]:0;return new d3t(n,e-i)}removeValues(e,n){this._values.splice(e,n),this._invalidate(e)}insertValues(e,n){this._values=Nfe(this._values,e,n),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,n=this._values.length;e<n;e++){const i=this._values[e],r=e>0?this._prefixSum[e-1]:0;this._prefixSum[e]=r+i;for(let o=0;o<i;o++)this._indexBySum[r+o]=e}this._prefixSum.length=this._values.length,this._indexBySum.length=this._prefixSum[this._prefixSum.length-1],this._isValid=!0,this._validEndIndex=this._values.length-1}}setValue(e,n){this._values[e]!==n&&(this._values[e]=n,this._invalidate(e))}}class d3t{constructor(e,n){this.index=e,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=n}}class Qmi{constructor(e,n,i,r){this._uri=e,this._lines=n,this._eol=i,this._versionId=r,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const n=e.changes;for(const i of n)this._acceptDeleteRange(i.range),this._acceptInsertText(new ot(i.range.startLineNumber,i.range.startColumn),i.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,n=this._lines.length,i=new Uint32Array(n);for(let r=0;r<n;r++)i[r]=this._lines[r].length+e;this._lineStarts=new Xmi(i)}}_setLineText(e,n){this._lines[e]=n,this._lineStarts&&this._lineStarts.setValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1));return}this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,n){if(n.length===0)return;const i=Tw(n);if(i.length===1){this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]+this._lines[e.lineNumber-1].substring(e.column-1));return}i[i.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]);const r=new Uint32Array(i.length-1);for(let o=1;o<i.length;o++)this._lines.splice(e.lineNumber+o-1,0,i[o]),r[o-1]=i[o].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,r)}}class A6{constructor(e){const n=Qie(e);this._defaultValue=n,this._asciiMap=A6._createAsciiMap(n),this._map=new Map}static _createAsciiMap(e){const n=new Uint8Array(256);return n.fill(e),n}set(e,n){const i=Qie(n);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class Jie{constructor(){this._actual=new A6(0)}add(e){this._actual.set(e,1)}has(e){return this._actual.get(e)===1}clear(){return this._actual.clear()}}class Jmi{constructor(e,n,i){const r=new Uint8Array(e*n);for(let o=0,s=e*n;o<s;o++)r[o]=i;this._data=r,this.rows=e,this.cols=n}get(e,n){return this._data[e*this.cols+n]}set(e,n,i){this._data[e*this.cols+n]=i}}class epi{constructor(e){let n=0,i=0;for(let o=0,s=e.length;o<s;o++){const[a,l,c]=e[o];l>n&&(n=l),a>i&&(i=a),c>i&&(i=c)}n++,i++;const r=new Jmi(i,n,0);for(let o=0,s=e.length;o<s;o++){const[a,l,c]=e[o];r.set(a,l,c)}this._states=r,this._maxCharCode=n}nextState(e,n){return n<0||n>=this._maxCharCode?0:this._states.get(e,n)}}let Hwe=null;function tpi(){return Hwe===null&&(Hwe=new epi([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Hwe}let zV=null;function npi(){if(zV===null){zV=new A6(0);const t=` 	<>'"、。｡､，．：；‘〈「『〔（［｛｢｣｝］）〕』」〉’｀～…`;for(let n=0;n<t.length;n++)zV.set(t.charCodeAt(n),1);const e=".,;:";for(let n=0;n<e.length;n++)zV.set(e.charCodeAt(n),2)}return zV}class ere{static _createLink(e,n,i,r,o){let s=o-1;do{const a=n.charCodeAt(s);if(e.get(a)!==2)break;s--}while(s>r);if(r>0){const a=n.charCodeAt(r-1),l=n.charCodeAt(s);(a===40&&l===41||a===91&&l===93||a===123&&l===125)&&s--}return{range:{startLineNumber:i,startColumn:r+1,endLineNumber:i,endColumn:s+2},url:n.substring(r,s+1)}}static computeLinks(e,n=tpi()){const i=npi(),r=[];for(let o=1,s=e.getLineCount();o<=s;o++){const a=e.getLineContent(o),l=a.length;let c=0,u=0,d=0,h=1,f=!1,m=!1,p=!1,g=!1;for(;c<l;){let y=!1;const _=a.charCodeAt(c);if(h===13){let w;switch(_){case 40:f=!0,w=0;break;case 41:w=f?0:1;break;case 91:p=!0,m=!0,w=0;break;case 93:p=!1,w=m?0:1;break;case 123:g=!0,w=0;break;case 125:w=g?0:1;break;case 39:case 34:case 96:d===_?w=1:d===39||d===34||d===96?w=0:w=1;break;case 42:w=d===42?1:0;break;case 124:w=d===124?1:0;break;case 32:w=p?0:1;break;default:w=i.get(_)}w===1&&(r.push(ere._createLink(i,a,o,u,c)),y=!0)}else if(h===12){let w;_===91?(m=!0,w=0):w=i.get(_),w===1?y=!0:h=13}else h=n.nextState(h,_),h===0&&(y=!0);y&&(h=1,f=!1,m=!1,g=!1,u=c+1,d=_),c++}h===13&&r.push(ere._createLink(i,a,o,u,l))}return r}}function ipi(t){return!t||typeof t.getLineCount!="function"||typeof t.getLineContent!="function"?[]:ere.computeLinks(t)}const Ole=class Ole{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(e,n,i,r,o){if(e&&n){const s=this.doNavigateValueSet(n,o);if(s)return{range:e,value:s}}if(i&&r){const s=this.doNavigateValueSet(r,o);if(s)return{range:i,value:s}}return null}doNavigateValueSet(e,n){const i=this.numberReplace(e,n);return i!==null?i:this.textReplace(e,n)}numberReplace(e,n){const i=Math.pow(10,e.length-(e.lastIndexOf(".")+1));let r=Number(e);const o=parseFloat(e);return!isNaN(r)&&!isNaN(o)&&r===o?r===0&&!n?null:(r=Math.floor(r*i),r+=n?i:-i,String(r/i)):null}textReplace(e,n){return this.valueSetsReplace(this._defaultValueSet,e,n)}valueSetsReplace(e,n,i){let r=null;for(let o=0,s=e.length;r===null&&o<s;o++)r=this.valueSetReplace(e[o],n,i);return r}valueSetReplace(e,n,i){let r=e.indexOf(n);return r>=0?(r+=i?1:-1,r<0?r=e.length-1:r%=e.length,e[r]):null}};Ole.INSTANCE=new Ole;let $Le=Ole;var vst,yst;class rpi{constructor(e,n){this.uri=e,this.value=n}}function opi(t){return Array.isArray(t)}const yT=class yT{constructor(e,n){if(this[vst]="ResourceMap",e instanceof yT)this.map=new Map(e.map),this.toKey=n??yT.defaultToKey;else if(opi(e)){this.map=new Map,this.toKey=n??yT.defaultToKey;for(const[i,r]of e)this.set(i,r)}else this.map=new Map,this.toKey=e??yT.defaultToKey}set(e,n){return this.map.set(this.toKey(e),new rpi(e,n)),this}get(e){var n;return(n=this.map.get(this.toKey(e)))==null?void 0:n.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,n){typeof n<"u"&&(e=e.bind(n));for(const[i,r]of this.map)e(r.value,r.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(vst=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}};yT.defaultToKey=e=>e.toString();let Xl=yT;class spi{constructor(){this[yst]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return(e=this._head)==null?void 0:e.value}get last(){var e;return(e=this._tail)==null?void 0:e.value}has(e){return this._map.has(e)}get(e,n=0){const i=this._map.get(e);if(i)return n!==0&&this.touch(i,n),i.value}set(e,n,i=0){let r=this._map.get(e);if(r)r.value=n,i!==0&&this.touch(r,i);else{switch(r={key:e,value:n,next:void 0,previous:void 0},i){case 0:this.addItemLast(r);break;case 1:this.addItemFirst(r);break;case 2:this.addItemLast(r);break;default:this.addItemLast(r);break}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const n=this._map.get(e);if(n)return this._map.delete(e),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,n){const i=this._state;let r=this._head;for(;r;){if(n?e.bind(n)(r.value,r.key,this):e(r.value,r.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this,n=this._state;let i=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(i){const o={value:i.key,done:!1};return i=i.next,o}else return{value:void 0,done:!0}}};return r}values(){const e=this,n=this._state;let i=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(i){const o={value:i.value,done:!1};return i=i.next,o}else return{value:void 0,done:!0}}};return r}entries(){const e=this,n=this._state;let i=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(i){const o={value:[i.key,i.value],done:!1};return i=i.next,o}else return{value:void 0,done:!0}}};return r}[(yst=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._head,i=this.size;for(;n&&i>e;)this._map.delete(n.key),n=n.next,i--;this._head=n,this._size=i,n&&(n.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._tail,i=this.size;for(;n&&i>e;)this._map.delete(n.key),n=n.previous,i--;this._tail=n,this._size=i,n&&(n.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const n=e.next,i=e.previous;if(!n||!i)throw new Error("Invalid list");n.previous=i,i.next=n}e.next=void 0,e.previous=void 0,this._state++}touch(e,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(e===this._head)return;const i=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(i.previous=r,r.next=i),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(n===2){if(e===this._tail)return;const i=e.next,r=e.previous;e===this._head?(i.previous=void 0,this._head=i):(i.previous=r,r.next=i),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){const e=[];return this.forEach((n,i)=>{e.push([i,n])}),e}fromJSON(e){this.clear();for(const[n,i]of e)this.set(n,i)}}class api extends spi{constructor(e,n=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,n=2){return super.get(e,n)}peek(e){return super.get(e,0)}set(e,n){return super.set(e,n,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class Aw extends api{constructor(e,n=1){super(e,n)}trim(e){this.trimOld(e)}set(e,n){return super.set(e,n),this.checkTrim(),this}}class lpi{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[n,i]of e)this.set(n,i)}clear(){this._m1.clear(),this._m2.clear()}set(e,n){this._m1.set(e,n),this._m2.set(n,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const n=this._m1.get(e);return n===void 0?!1:(this._m1.delete(e),this._m2.delete(n),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class V8e{constructor(){this.map=new Map}add(e,n){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(n)}delete(e,n){const i=this.map.get(e);i&&(i.delete(n),i.size===0&&this.map.delete(e))}forEach(e,n){const i=this.map.get(e);i&&i.forEach(n)}get(e){const n=this.map.get(e);return n||new Set}}class cpi extends A6{constructor(e,n){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=n,this.intlSegmenterLocales.length>0?this._segmenter=new Intl.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let i=0,r=e.length;i<r;i++)this.set(e.charCodeAt(i),2);this.set(32,1),this.set(9,1)}findPrevIntlWordBeforeOrAtOffset(e,n){let i=null;for(const r of this._getIntlSegmenterWordsOnLine(e)){if(r.index>n)break;i=r}return i}findNextIntlWordAtOrAfterOffset(e,n){for(const i of this._getIntlSegmenterWordsOnLine(e))if(!(i.index<n))return i;return null}_getIntlSegmenterWordsOnLine(e){return this._segmenter?this._cachedLine===e?this._cachedSegments:(this._cachedLine=e,this._cachedSegments=this._filterWordSegments(this._segmenter.segment(e)),this._cachedSegments):[]}_filterWordSegments(e){const n=[];for(const i of e)this._isWordLike(i)&&n.push(i);return n}_isWordLike(e){return!!e.isWordLike}}const _st=new Aw(10);function ab(t,e){const n=`${t}/${e.join(",")}`;let i=_st.get(n);return i||(i=new cpi(t,e),_st.set(n,i)),i}var Tp;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(Tp||(Tp={}));var Iv;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"})(Iv||(Iv={}));var dv;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(dv||(dv={}));class rte{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,e.tabSize|0),e.indentSize==="tabSize"?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,e.indentSize|0),this._indentSizeIsTabSize=!1),this.insertSpaces=!!e.insertSpaces,this.defaultEOL=e.defaultEOL|0,this.trimAutoWhitespace=!!e.trimAutoWhitespace,this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&Lp(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class kH{constructor(e,n){this._findMatchBrand=void 0,this.range=e,this.matches=n}}function upi(t){return t&&typeof t.read=="function"}class Wwe{constructor(e,n,i,r,o,s){this.identifier=e,this.range=n,this.text=i,this.forceMoveMarkers=r,this.isAutoWhitespaceEdit=o,this._isTracked=s}}class dpi{constructor(e,n,i){this.regex=e,this.wordSeparators=n,this.simpleSearch=i}}class hpi{constructor(e,n,i){this.reverseEdits=e,this.changes=n,this.trimAutoWhitespaceLineNumbers=i}}function h3t(t){return!t.isTooLargeForSyncing()&&!t.isForSimpleWidget}const fpi=999;class AL{constructor(e,n,i,r){this.searchString=e,this.isRegex=n,this.matchCase=i,this.wordSeparators=r}parseSearchRequest(){if(this.searchString==="")return null;let e;this.isRegex?e=mpi(this.searchString):e=this.searchString.indexOf(`
`)>=0;let n=null;try{n=c4t(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!n)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new dpi(n,this.wordSeparators?ab(this.wordSeparators,[]):null,i?this.searchString:null)}}function mpi(t){if(!t||t.length===0)return!1;for(let e=0,n=t.length;e<n;e++){const i=t.charCodeAt(e);if(i===10)return!0;if(i===92){if(e++,e>=n)break;const r=t.charCodeAt(e);if(r===110||r===114||r===87)return!0}}return!1}function iT(t,e,n){if(!n)return new kH(t,null);const i=[];for(let r=0,o=e.length;r<o;r++)i[r]=e[r];return new kH(t,i)}class xst{constructor(e){const n=[];let i=0;for(let r=0,o=e.length;r<o;r++)e.charCodeAt(r)===10&&(n[i++]=r);this._lineFeedsOffsets=n}findLineFeedCountBeforeOffset(e){const n=this._lineFeedsOffsets;let i=0,r=n.length-1;if(r===-1||e<=n[0])return 0;for(;i<r;){const o=i+((r-i)/2>>0);n[o]>=e?r=o-1:n[o+1]>=e?(i=o,r=o):i=o+1}return i+1}}class fQ{static findMatches(e,n,i,r,o){const s=n.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,i,new u4(s.wordSeparators,s.regex),r,o):this._doFindMatchesLineByLine(e,i,s,r,o):[]}static _getMultilineMatchRange(e,n,i,r,o,s){let a,l=0;r?(l=r.findLineFeedCountBeforeOffset(o),a=n+o+l):a=n+o;let c;if(r){const f=r.findLineFeedCountBeforeOffset(o+s.length)-l;c=a+s.length+f}else c=a+s.length;const u=e.getPositionAt(a),d=e.getPositionAt(c);return new ve(u.lineNumber,u.column,d.lineNumber,d.column)}static _doFindMatchesMultiline(e,n,i,r,o){const s=e.getOffsetAt(n.getStartPosition()),a=e.getValueInRange(n,1),l=e.getEOL()===`\r
`?new xst(a):null,c=[];let u=0,d;for(i.reset(0);d=i.next(a);)if(c[u++]=iT(this._getMultilineMatchRange(e,s,a,l,d.index,d[0]),d,r),u>=o)return c;return c}static _doFindMatchesLineByLine(e,n,i,r,o){const s=[];let a=0;if(n.startLineNumber===n.endLineNumber){const c=e.getLineContent(n.startLineNumber).substring(n.startColumn-1,n.endColumn-1);return a=this._findMatchesInLine(i,c,n.startLineNumber,n.startColumn-1,a,s,r,o),s}const l=e.getLineContent(n.startLineNumber).substring(n.startColumn-1);a=this._findMatchesInLine(i,l,n.startLineNumber,n.startColumn-1,a,s,r,o);for(let c=n.startLineNumber+1;c<n.endLineNumber&&a<o;c++)a=this._findMatchesInLine(i,e.getLineContent(c),c,0,a,s,r,o);if(a<o){const c=e.getLineContent(n.endLineNumber).substring(0,n.endColumn-1);a=this._findMatchesInLine(i,c,n.endLineNumber,0,a,s,r,o)}return s}static _findMatchesInLine(e,n,i,r,o,s,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const h=e.simpleSearch,f=h.length,m=n.length;let p=-f;for(;(p=n.indexOf(h,p+f))!==-1;)if((!c||B8e(c,n,m,p,f))&&(s[o++]=new kH(new ve(i,p+1+r,i,p+1+f+r),null),o>=l))return o;return o}const u=new u4(e.wordSeparators,e.regex);let d;u.reset(0);do if(d=u.next(n),d&&(s[o++]=iT(new ve(i,d.index+1+r,i,d.index+1+d[0].length+r),d,a),o>=l))return o;while(d);return o}static findNextMatch(e,n,i,r){const o=n.parseSearchRequest();if(!o)return null;const s=new u4(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,s,r):this._doFindNextMatchLineByLine(e,i,s,r)}static _doFindNextMatchMultiline(e,n,i,r){const o=new ot(n.lineNumber,1),s=e.getOffsetAt(o),a=e.getLineCount(),l=e.getValueInRange(new ve(o.lineNumber,o.column,a,e.getLineMaxColumn(a)),1),c=e.getEOL()===`\r
`?new xst(l):null;i.reset(n.column-1);const u=i.next(l);return u?iT(this._getMultilineMatchRange(e,s,l,c,u.index,u[0]),u,r):n.lineNumber!==1||n.column!==1?this._doFindNextMatchMultiline(e,new ot(1,1),i,r):null}static _doFindNextMatchLineByLine(e,n,i,r){const o=e.getLineCount(),s=n.lineNumber,a=e.getLineContent(s),l=this._findFirstMatchInLine(i,a,s,n.column,r);if(l)return l;for(let c=1;c<=o;c++){const u=(s+c-1)%o,d=e.getLineContent(u+1),h=this._findFirstMatchInLine(i,d,u+1,1,r);if(h)return h}return null}static _findFirstMatchInLine(e,n,i,r,o){e.reset(r-1);const s=e.next(n);return s?iT(new ve(i,s.index+1,i,s.index+1+s[0].length),s,o):null}static findPreviousMatch(e,n,i,r){const o=n.parseSearchRequest();if(!o)return null;const s=new u4(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,s,r):this._doFindPreviousMatchLineByLine(e,i,s,r)}static _doFindPreviousMatchMultiline(e,n,i,r){const o=this._doFindMatchesMultiline(e,new ve(1,1,n.lineNumber,n.column),i,r,10*fpi);if(o.length>0)return o[o.length-1];const s=e.getLineCount();return n.lineNumber!==s||n.column!==e.getLineMaxColumn(s)?this._doFindPreviousMatchMultiline(e,new ot(s,e.getLineMaxColumn(s)),i,r):null}static _doFindPreviousMatchLineByLine(e,n,i,r){const o=e.getLineCount(),s=n.lineNumber,a=e.getLineContent(s).substring(0,n.column-1),l=this._findLastMatchInLine(i,a,s,r);if(l)return l;for(let c=1;c<=o;c++){const u=(o+s-c-1)%o,d=e.getLineContent(u+1),h=this._findLastMatchInLine(i,d,u+1,r);if(h)return h}return null}static _findLastMatchInLine(e,n,i,r){let o=null,s;for(e.reset(0);s=e.next(n);)o=iT(new ve(i,s.index+1,i,s.index+1+s[0].length),s,r);return o}}function ppi(t,e,n,i,r){if(i===0)return!0;const o=e.charCodeAt(i-1);if(t.get(o)!==0||o===13||o===10)return!0;if(r>0){const s=e.charCodeAt(i);if(t.get(s)!==0)return!0}return!1}function gpi(t,e,n,i,r){if(i+r===n)return!0;const o=e.charCodeAt(i+r);if(t.get(o)!==0||o===13||o===10)return!0;if(r>0){const s=e.charCodeAt(i+r-1);if(t.get(s)!==0)return!0}return!1}function B8e(t,e,n,i,r){return ppi(t,e,n,i,r)&&gpi(t,e,n,i,r)}class u4{constructor(e,n){this._wordSeparators=e,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const n=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(i=this._searchRegex.exec(e),!i))return null;const r=i.index,o=i[0].length;if(r===this._prevMatchStartIndex&&o===this._prevMatchLength){if(o===0){Vie(e,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=r,this._prevMatchLength=o,!this._wordSeparators||B8e(this._wordSeparators,e,n,r,o))return i}while(i);return null}}class z8e{static computeUnicodeHighlights(e,n,i){const r=i?i.startLineNumber:1,o=i?i.endLineNumber:e.getLineCount(),s=new wst(n),a=s.getCandidateCodePoints();let l;a==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${bpi(Array.from(a))}`,"g");const c=new u4(null,l),u=[];let d=!1,h,f=0,m=0,p=0;e:for(let g=r,y=o;g<=y;g++){const _=e.getLineContent(g),w=_.length;c.reset(0);do if(h=c.next(_),h){let C=h.index,N=h.index+h[0].length;if(C>0){const M=_.charCodeAt(C-1);sc(M)&&C--}if(N+1<w){const M=_.charCodeAt(N-1);sc(M)&&N++}const E=_.substring(C,N);let D=gH(C+1,d8e,_,0);D&&D.endColumn<=C+1&&(D=null);const k=s.shouldHighlightNonBasicASCII(E,D?D.word:null);if(k!==0){if(k===3?f++:k===2?m++:k===1?p++:Hfe(),u.length>=1e3){d=!0;break e}u.push(new ve(g,C+1,g,N+1))}}while(h)}return{ranges:u,hasMore:d,ambiguousCharacterCount:f,invisibleCharacterCount:m,nonBasicAsciiCharacterCount:p}}static computeUnicodeHighlightReason(e,n){const i=new wst(n);switch(i.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const o=e.codePointAt(0),s=i.ambiguousCharacters.getPrimaryConfusable(o),a=SH.getLocales().filter(l=>!SH.getInstance(new Set([...n.allowedLocales,l])).isAmbiguous(o));return{kind:0,confusableWith:String.fromCodePoint(s),notAmbiguousInLocales:a}}case 1:return{kind:2}}}}function bpi(t,e){return`[${Hp(t.map(i=>String.fromCodePoint(i)).join(""))}]`}class wst{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=SH.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const n of rI.codePoints)Cst(String.fromCodePoint(n))||e.add(n);if(this.options.ambiguousCharacters)for(const n of this.ambiguousCharacters.getConfusableCodePoints())e.add(n);for(const n of this.allowedCodePoints)e.delete(n);return e}shouldHighlightNonBasicASCII(e,n){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let r=!1,o=!1;if(n)for(const s of n){const a=s.codePointAt(0),l=gq(s);r=r||l,!l&&!this.ambiguousCharacters.isAmbiguous(a)&&!rI.isInvisibleCharacter(a)&&(o=!0)}return!r&&o?0:this.options.invisibleCharacters&&!Cst(e)&&rI.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function Cst(t){return t===" "||t===`
`||t==="	"}class ote{constructor(e,n,i){this.changes=e,this.moves=n,this.hitTimeout=i}}class f3t{constructor(e,n){this.lineRangeMapping=e,this.changes=n}}class dr{static addRange(e,n){let i=0;for(;i<n.length&&n[i].endExclusive<e.start;)i++;let r=i;for(;r<n.length&&n[r].start<=e.endExclusive;)r++;if(i===r)n.splice(i,0,e);else{const o=Math.min(e.start,n[i].start),s=Math.max(e.endExclusive,n[r-1].endExclusive);n.splice(i,r-i,new dr(o,s))}}static tryCreate(e,n){if(!(e>n))return new dr(e,n)}static ofLength(e){return new dr(0,e)}static ofStartAndLength(e,n){return new dr(e,e+n)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new co(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new dr(this.start+e,this.endExclusive+e)}deltaStart(e){return new dr(this.start+e,this.endExclusive)}deltaEnd(e){return new dr(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e<this.endExclusive}join(e){return new dr(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){const n=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);if(n<=i)return new dr(n,i)}intersects(e){const n=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);return n<i}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new co(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new co(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;n<this.endExclusive;n++)e(n)}}class H8e{constructor(){this._sortedRanges=[]}addRange(e){let n=0;for(;n<this._sortedRanges.length&&this._sortedRanges[n].endExclusive<e.start;)n++;let i=n;for(;i<this._sortedRanges.length&&this._sortedRanges[i].start<=e.endExclusive;)i++;if(n===i)this._sortedRanges.splice(n,0,e);else{const r=Math.min(e.start,this._sortedRanges[n].start),o=Math.max(e.endExclusive,this._sortedRanges[i-1].endExclusive);this._sortedRanges.splice(n,i-n,new dr(r,o))}}toString(){return this._sortedRanges.map(e=>e.toString()).join(", ")}intersectsStrict(e){let n=0;for(;n<this._sortedRanges.length&&this._sortedRanges[n].endExclusive<=e.start;)n++;return n<this._sortedRanges.length&&this._sortedRanges[n].start<e.endExclusive}intersectWithRange(e){const n=new H8e;for(const i of this._sortedRanges){const r=i.intersect(e);r&&n.addRange(r)}return n}intersectWithRangeLength(e){return this.intersectWithRange(e).length}get length(){return this._sortedRanges.reduce((e,n)=>e+n.length,0)}}function MH(t,e){const n=vpi(t,e);if(n!==-1)return t[n]}function vpi(t,e,n=t.length-1){for(let i=n;i>=0;i--){const r=t[i];if(e(r))return i}return-1}function o5(t,e){const n=LH(t,e);return n===-1?void 0:t[n]}function LH(t,e,n=0,i=t.length){let r=n,o=i;for(;r<o;){const s=Math.floor((r+o)/2);e(t[s])?r=s+1:o=s}return r-1}function ypi(t,e){const n=TH(t,e);return n===t.length?void 0:t[n]}function TH(t,e,n=0,i=t.length){let r=n,o=i;for(;r<o;){const s=Math.floor((r+o)/2);e(t[s])?o=s:r=s+1}return r}const jle=class jle{constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(jle.assertInvariants){if(this._prevFindLastPredicate){for(const i of this._array)if(this._prevFindLastPredicate(i)&&!e(i))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}const n=LH(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}};jle.assertInvariants=!1;let tre=jle;function W8e(t,e){if(t.length===0)return;let n=t[0];for(let i=1;i<t.length;i++){const r=t[i];e(r,n)>0&&(n=r)}return n}function _pi(t,e){if(t.length===0)return;let n=t[0];for(let i=1;i<t.length;i++){const r=t[i];e(r,n)>=0&&(n=r)}return n}function xpi(t,e){return W8e(t,(n,i)=>-e(n,i))}function wpi(t,e){if(t.length===0)return-1;let n=0;for(let i=1;i<t.length;i++){const r=t[i];e(r,t[n])>0&&(n=i)}return n}function Cpi(t,e){for(const n of t){const i=e(n);if(i!==void 0)return i}}let Ki=class M1{static fromRangeInclusive(e){return new M1(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(e.length===0)return[];let n=new $g(e[0].slice());for(let i=1;i<e.length;i++)n=n.getUnion(new $g(e[i].slice()));return n.ranges}static join(e){if(e.length===0)throw new co("lineRanges cannot be empty");let n=e[0].startLineNumber,i=e[0].endLineNumberExclusive;for(let r=1;r<e.length;r++)n=Math.min(n,e[r].startLineNumber),i=Math.max(i,e[r].endLineNumberExclusive);return new M1(n,i)}static ofLength(e,n){return new M1(e,e+n)}static deserialize(e){return new M1(e[0],e[1])}constructor(e,n){if(e>n)throw new co(`startLineNumber ${e} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=e,this.endLineNumberExclusive=n}contains(e){return this.startLineNumber<=e&&e<this.endLineNumberExclusive}get isEmpty(){return this.startLineNumber===this.endLineNumberExclusive}delta(e){return new M1(this.startLineNumber+e,this.endLineNumberExclusive+e)}deltaLength(e){return new M1(this.startLineNumber,this.endLineNumberExclusive+e)}get length(){return this.endLineNumberExclusive-this.startLineNumber}join(e){return new M1(Math.min(this.startLineNumber,e.startLineNumber),Math.max(this.endLineNumberExclusive,e.endLineNumberExclusive))}toString(){return`[${this.startLineNumber},${this.endLineNumberExclusive})`}intersect(e){const n=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumberExclusive,e.endLineNumberExclusive);if(n<=i)return new M1(n,i)}intersectsStrict(e){return this.startLineNumber<e.endLineNumberExclusive&&e.startLineNumber<this.endLineNumberExclusive}overlapOrTouch(e){return this.startLineNumber<=e.endLineNumberExclusive&&e.startLineNumber<=this.endLineNumberExclusive}equals(e){return this.startLineNumber===e.startLineNumber&&this.endLineNumberExclusive===e.endLineNumberExclusive}toInclusiveRange(){return this.isEmpty?null:new ve(this.startLineNumber,1,this.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER)}toExclusiveRange(){return new ve(this.startLineNumber,1,this.endLineNumberExclusive,1)}mapToLineArray(e){const n=[];for(let i=this.startLineNumber;i<this.endLineNumberExclusive;i++)n.push(e(i));return n}forEach(e){for(let n=this.startLineNumber;n<this.endLineNumberExclusive;n++)e(n)}serialize(){return[this.startLineNumber,this.endLineNumberExclusive]}includes(e){return this.startLineNumber<=e&&e<this.endLineNumberExclusive}toOffsetRange(){return new dr(this.startLineNumber-1,this.endLineNumberExclusive-1)}};class $g{constructor(e=[]){this._normalizedRanges=e}get ranges(){return this._normalizedRanges}addRange(e){if(e.length===0)return;const n=TH(this._normalizedRanges,r=>r.endLineNumberExclusive>=e.startLineNumber),i=LH(this._normalizedRanges,r=>r.startLineNumber<=e.endLineNumberExclusive)+1;if(n===i)this._normalizedRanges.splice(n,0,e);else if(n===i-1){const r=this._normalizedRanges[n];this._normalizedRanges[n]=r.join(e)}else{const r=this._normalizedRanges[n].join(this._normalizedRanges[i-1]).join(e);this._normalizedRanges.splice(n,i-n,r)}}contains(e){const n=o5(this._normalizedRanges,i=>i.startLineNumber<=e);return!!n&&n.endLineNumberExclusive>e}intersects(e){const n=o5(this._normalizedRanges,i=>i.startLineNumber<e.endLineNumberExclusive);return!!n&&n.endLineNumberExclusive>e.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;const n=[];let i=0,r=0,o=null;for(;i<this._normalizedRanges.length||r<e._normalizedRanges.length;){let s=null;if(i<this._normalizedRanges.length&&r<e._normalizedRanges.length){const a=this._normalizedRanges[i],l=e._normalizedRanges[r];a.startLineNumber<l.startLineNumber?(s=a,i++):(s=l,r++)}else i<this._normalizedRanges.length?(s=this._normalizedRanges[i],i++):(s=e._normalizedRanges[r],r++);o===null?o=s:o.endLineNumberExclusive>=s.startLineNumber?o=new Ki(o.startLineNumber,Math.max(o.endLineNumberExclusive,s.endLineNumberExclusive)):(n.push(o),o=s)}return o!==null&&n.push(o),new $g(n)}subtractFrom(e){const n=TH(this._normalizedRanges,s=>s.endLineNumberExclusive>=e.startLineNumber),i=LH(this._normalizedRanges,s=>s.startLineNumber<=e.endLineNumberExclusive)+1;if(n===i)return new $g([e]);const r=[];let o=e.startLineNumber;for(let s=n;s<i;s++){const a=this._normalizedRanges[s];a.startLineNumber>o&&r.push(new Ki(o,a.startLineNumber)),o=a.endLineNumberExclusive}return o<e.endLineNumberExclusive&&r.push(new Ki(o,e.endLineNumberExclusive)),new $g(r)}toString(){return this._normalizedRanges.map(e=>e.toString()).join(", ")}getIntersection(e){const n=[];let i=0,r=0;for(;i<this._normalizedRanges.length&&r<e._normalizedRanges.length;){const o=this._normalizedRanges[i],s=e._normalizedRanges[r],a=o.intersect(s);a&&!a.isEmpty&&n.push(a),o.endLineNumberExclusive<s.endLineNumberExclusive?i++:r++}return new $g(n)}getWithDelta(e){return new $g(this._normalizedRanges.map(n=>n.delta(e)))}}const hE=class hE{static betweenPositions(e,n){return e.lineNumber===n.lineNumber?new hE(0,n.column-e.column):new hE(n.lineNumber-e.lineNumber,n.column-1)}static ofRange(e){return hE.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let n=0,i=0;for(const r of e)r===`
`?(n++,i=0):i++;return new hE(n,i)}constructor(e,n){this.lineCount=e,this.columnCount=n}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}createRange(e){return this.lineCount===0?new ve(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new ve(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return this.lineCount===0?new ot(e.lineNumber,e.column+this.columnCount):new ot(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};hE.zero=new hE(0,0);let Av=hE;class Spi{constructor(e){this.text=e,this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let n=0;n<e.length;n++)e.charAt(n)===`
`&&this.lineStartOffsetByLineIdx.push(n+1)}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}getOffsetRange(e){return new dr(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new Av(e,this.text.length-this.lineStartOffsetByLineIdx[e])}}class U8e{constructor(e){this.edits=e,K2(()=>j8e(e,(n,i)=>n.range.getEndPosition().isBeforeOrEqual(i.range.getStartPosition())))}apply(e){let n="",i=new ot(1,1);for(const o of this.edits){const s=o.range,a=s.getStartPosition(),l=s.getEndPosition(),c=Sst(i,a);c.isEmpty()||(n+=e.getValueOfRange(c)),n+=o.text,i=l}const r=Sst(i,e.endPositionExclusive);return r.isEmpty()||(n+=e.getValueOfRange(r)),n}applyToString(e){const n=new Npi(e);return this.apply(n)}getNewRanges(){const e=[];let n=0,i=0,r=0;for(const o of this.edits){const s=Av.ofText(o.text),a=ot.lift({lineNumber:o.range.startLineNumber+i,column:o.range.startColumn+(o.range.startLineNumber===n?r:0)}),l=s.createRange(a);e.push(l),i=l.endLineNumber-o.range.endLineNumber,r=l.endColumn-o.range.endColumn,n=o.range.endLineNumber}return e}}class dw{constructor(e,n){this.range=e,this.text=n}toSingleEditOperation(){return{range:this.range,text:this.text}}}function Sst(t,e){if(t.lineNumber===e.lineNumber&&t.column===Number.MAX_SAFE_INTEGER)return ve.fromPositions(e,e);if(!t.isBeforeOrEqual(e))throw new co("start must be before end");return new ve(t.lineNumber,t.column,e.lineNumber,e.column)}class m3t{get endPositionExclusive(){return this.length.addToPosition(new ot(1,1))}}class Npi extends m3t{constructor(e){super(),this.value=e,this._t=new Spi(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}}class zd{static inverse(e,n,i){const r=[];let o=1,s=1;for(const l of e){const c=new zd(new Ki(o,l.original.startLineNumber),new Ki(s,l.modified.startLineNumber));c.modified.isEmpty||r.push(c),o=l.original.endLineNumberExclusive,s=l.modified.endLineNumberExclusive}const a=new zd(new Ki(o,n+1),new Ki(s,i+1));return a.modified.isEmpty||r.push(a),r}static clip(e,n,i){const r=[];for(const o of e){const s=o.original.intersect(n),a=o.modified.intersect(i);s&&!s.isEmpty&&a&&!a.isEmpty&&r.push(new zd(s,a))}return r}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new zd(this.modified,this.original)}join(e){return new zd(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new hp(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new co("not a valid diff");return new hp(new ve(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new ve(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new hp(new ve(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new ve(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(Nst(this.original.endLineNumberExclusive,e)&&Nst(this.modified.endLineNumberExclusive,n))return new hp(new ve(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new ve(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new hp(ve.fromPositions(new ot(this.original.startLineNumber,1),ZP(new ot(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),ve.fromPositions(new ot(this.modified.startLineNumber,1),ZP(new ot(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new hp(ve.fromPositions(ZP(new ot(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),ZP(new ot(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),ve.fromPositions(ZP(new ot(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),ZP(new ot(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new co}}function ZP(t,e){if(t.lineNumber<1)return new ot(1,1);if(t.lineNumber>e.length)return new ot(e.length,e[e.length-1].length+1);const n=e[t.lineNumber-1];return t.column>n.length+1?new ot(t.lineNumber,n.length+1):t}function Nst(t,e){return t>=1&&t<=e.length}class Ip extends zd{static fromRangeMappings(e){const n=Ki.join(e.map(r=>Ki.fromRangeInclusive(r.originalRange))),i=Ki.join(e.map(r=>Ki.fromRangeInclusive(r.modifiedRange)));return new Ip(n,i,e)}constructor(e,n,i){super(e,n),this.innerChanges=i}flip(){var e;return new Ip(this.modified,this.original,(e=this.innerChanges)==null?void 0:e.map(n=>n.flip()))}withInnerChangesFromLineRanges(){return new Ip(this.original,this.modified,[this.toRangeMapping()])}}class hp{static assertSorted(e){for(let n=1;n<e.length;n++){const i=e[n-1],r=e[n];if(!(i.originalRange.getEndPosition().isBeforeOrEqual(r.originalRange.getStartPosition())&&i.modifiedRange.getEndPosition().isBeforeOrEqual(r.modifiedRange.getStartPosition())))throw new co("Range mappings must be sorted")}}constructor(e,n){this.originalRange=e,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new hp(this.modifiedRange,this.originalRange)}toTextEdit(e){const n=e.getValueOfRange(this.modifiedRange);return new dw(this.originalRange,n)}}const Epi=3;class Dpi{computeDiff(e,n,i){var l;const o=new Lpi(e,n,{maxComputationTime:i.maxComputationTimeMs,shouldIgnoreTrimWhitespace:i.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),s=[];let a=null;for(const c of o.changes){let u;c.originalEndLineNumber===0?u=new Ki(c.originalStartLineNumber+1,c.originalStartLineNumber+1):u=new Ki(c.originalStartLineNumber,c.originalEndLineNumber+1);let d;c.modifiedEndLineNumber===0?d=new Ki(c.modifiedStartLineNumber+1,c.modifiedStartLineNumber+1):d=new Ki(c.modifiedStartLineNumber,c.modifiedEndLineNumber+1);let h=new Ip(u,d,(l=c.charChanges)==null?void 0:l.map(f=>new hp(new ve(f.originalStartLineNumber,f.originalStartColumn,f.originalEndLineNumber,f.originalEndColumn),new ve(f.modifiedStartLineNumber,f.modifiedStartColumn,f.modifiedEndLineNumber,f.modifiedEndColumn))));a&&(a.modified.endLineNumberExclusive===h.modified.startLineNumber||a.original.endLineNumberExclusive===h.original.startLineNumber)&&(h=new Ip(a.original.join(h.original),a.modified.join(h.modified),a.innerChanges&&h.innerChanges?a.innerChanges.concat(h.innerChanges):void 0),s.pop()),s.push(h),a=h}return K2(()=>j8e(s,(c,u)=>u.original.startLineNumber-c.original.endLineNumberExclusive===u.modified.startLineNumber-c.modified.endLineNumberExclusive&&c.original.endLineNumberExclusive<u.original.startLineNumber&&c.modified.endLineNumberExclusive<u.modified.startLineNumber)),new ote(s,[],o.quitEarly)}}function p3t(t,e,n,i){return new wx(t,e,n).ComputeDiff(i)}let Est=class{constructor(e){const n=[],i=[];for(let r=0,o=e.length;r<o;r++)n[r]=VLe(e[r],1),i[r]=BLe(e[r],1);this.lines=e,this._startColumns=n,this._endColumns=i}getElements(){const e=[];for(let n=0,i=this.lines.length;n<i;n++)e[n]=this.lines[n].substring(this._startColumns[n]-1,this._endColumns[n]-1);return e}getStrictElement(e){return this.lines[e]}getStartLineNumber(e){return e+1}getEndLineNumber(e){return e+1}createCharSequence(e,n,i){const r=[],o=[],s=[];let a=0;for(let l=n;l<=i;l++){const c=this.lines[l],u=e?this._startColumns[l]:1,d=e?this._endColumns[l]:c.length+1;for(let h=u;h<d;h++)r[a]=c.charCodeAt(h-1),o[a]=l+1,s[a]=h,a++;!e&&l<i&&(r[a]=10,o[a]=l+1,s[a]=c.length+1,a++)}return new kpi(r,o,s)}};class kpi{constructor(e,n,i){this._charCodes=e,this._lineNumbers=n,this._columns=i}toString(){return"["+this._charCodes.map((e,n)=>(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(e,n){if(e<0||e>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}}class x3{constructor(e,n,i,r,o,s,a,l){this.originalStartLineNumber=e,this.originalStartColumn=n,this.originalEndLineNumber=i,this.originalEndColumn=r,this.modifiedStartLineNumber=o,this.modifiedStartColumn=s,this.modifiedEndLineNumber=a,this.modifiedEndColumn=l}static createFromDiffChange(e,n,i){const r=n.getStartLineNumber(e.originalStart),o=n.getStartColumn(e.originalStart),s=n.getEndLineNumber(e.originalStart+e.originalLength-1),a=n.getEndColumn(e.originalStart+e.originalLength-1),l=i.getStartLineNumber(e.modifiedStart),c=i.getStartColumn(e.modifiedStart),u=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),d=i.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new x3(r,o,s,a,l,c,u,d)}}function Mpi(t){if(t.length<=1)return t;const e=[t[0]];let n=e[0];for(let i=1,r=t.length;i<r;i++){const o=t[i],s=o.originalStart-(n.originalStart+n.originalLength),a=o.modifiedStart-(n.modifiedStart+n.modifiedLength);Math.min(s,a)<Epi?(n.originalLength=o.originalStart+o.originalLength-n.originalStart,n.modifiedLength=o.modifiedStart+o.modifiedLength-n.modifiedStart):(e.push(o),n=o)}return e}class U9{constructor(e,n,i,r,o){this.originalStartLineNumber=e,this.originalEndLineNumber=n,this.modifiedStartLineNumber=i,this.modifiedEndLineNumber=r,this.charChanges=o}static createFromDiffResult(e,n,i,r,o,s,a){let l,c,u,d,h;if(n.originalLength===0?(l=i.getStartLineNumber(n.originalStart)-1,c=0):(l=i.getStartLineNumber(n.originalStart),c=i.getEndLineNumber(n.originalStart+n.originalLength-1)),n.modifiedLength===0?(u=r.getStartLineNumber(n.modifiedStart)-1,d=0):(u=r.getStartLineNumber(n.modifiedStart),d=r.getEndLineNumber(n.modifiedStart+n.modifiedLength-1)),s&&n.originalLength>0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&o()){const f=i.createCharSequence(e,n.originalStart,n.originalStart+n.originalLength-1),m=r.createCharSequence(e,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(f.getElements().length>0&&m.getElements().length>0){let p=p3t(f,m,o,!0).changes;a&&(p=Mpi(p)),h=[];for(let g=0,y=p.length;g<y;g++)h.push(x3.createFromDiffChange(p[g],f,m))}}return new U9(l,c,u,d,h)}}class Lpi{constructor(e,n,i){this.shouldComputeCharChanges=i.shouldComputeCharChanges,this.shouldPostProcessCharChanges=i.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=i.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=i.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=n,this.original=new Est(e),this.modified=new Est(n),this.continueLineDiff=Dst(i.maxComputationTime),this.continueCharDiff=Dst(i.maxComputationTime===0?0:Math.min(i.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:void 0}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:void 0}]};const e=p3t(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),n=e.changes,i=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const a=[];for(let l=0,c=n.length;l<c;l++)a.push(U9.createFromDiffResult(this.shouldIgnoreTrimWhitespace,n[l],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:i,changes:a}}const r=[];let o=0,s=0;for(let a=-1,l=n.length;a<l;a++){const c=a+1<l?n[a+1]:null,u=c?c.originalStart:this.originalLines.length,d=c?c.modifiedStart:this.modifiedLines.length;for(;o<u&&s<d;){const h=this.originalLines[o],f=this.modifiedLines[s];if(h!==f){{let m=VLe(h,1),p=VLe(f,1);for(;m>1&&p>1;){const g=h.charCodeAt(m-2),y=f.charCodeAt(p-2);if(g!==y)break;m--,p--}(m>1||p>1)&&this._pushTrimWhitespaceCharChange(r,o+1,1,m,s+1,1,p)}{let m=BLe(h,1),p=BLe(f,1);const g=h.length+1,y=f.length+1;for(;m<g&&p<y;){const _=h.charCodeAt(m-1),w=h.charCodeAt(p-1);if(_!==w)break;m++,p++}(m<g||p<y)&&this._pushTrimWhitespaceCharChange(r,o+1,m,g,s+1,p,y)}}o++,s++}c&&(r.push(U9.createFromDiffResult(this.shouldIgnoreTrimWhitespace,c,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),o+=c.originalLength,s+=c.modifiedLength)}return{quitEarly:i,changes:r}}_pushTrimWhitespaceCharChange(e,n,i,r,o,s,a){if(this._mergeTrimWhitespaceCharChange(e,n,i,r,o,s,a))return;let l;this.shouldComputeCharChanges&&(l=[new x3(n,i,n,r,o,s,o,a)]),e.push(new U9(n,n,o,o,l))}_mergeTrimWhitespaceCharChange(e,n,i,r,o,s,a){const l=e.length;if(l===0)return!1;const c=e[l-1];return c.originalEndLineNumber===0||c.modifiedEndLineNumber===0?!1:c.originalEndLineNumber===n&&c.modifiedEndLineNumber===o?(this.shouldComputeCharChanges&&c.charChanges&&c.charChanges.push(new x3(n,i,n,r,o,s,o,a)),!0):c.originalEndLineNumber+1===n&&c.modifiedEndLineNumber+1===o?(c.originalEndLineNumber=n,c.modifiedEndLineNumber=o,this.shouldComputeCharChanges&&c.charChanges&&c.charChanges.push(new x3(n,i,n,r,o,s,o,a)),!0):!1}}function VLe(t,e){const n=qd(t);return n===-1?e:n+1}function BLe(t,e){const n=w0(t);return n===-1?e:n+2}function Dst(t){if(t===0)return()=>!0;const e=Date.now();return()=>Date.now()-e<t}class IC{static trivial(e,n){return new IC([new oc(dr.ofLength(e.length),dr.ofLength(n.length))],!1)}static trivialTimedOut(e,n){return new IC([new oc(dr.ofLength(e.length),dr.ofLength(n.length))],!0)}constructor(e,n){this.diffs=e,this.hitTimeout=n}}class oc{static invert(e,n){const i=[];return EOt(e,(r,o)=>{i.push(oc.fromOffsetPairs(r?r.getEndExclusives():aC.zero,o?o.getStarts():new aC(n,(r?r.seq2Range.endExclusive-r.seq1Range.endExclusive:0)+n)))}),i}static fromOffsetPairs(e,n){return new oc(new dr(e.offset1,n.offset1),new dr(e.offset2,n.offset2))}static assertSorted(e){let n;for(const i of e){if(n&&!(n.seq1Range.endExclusive<=i.seq1Range.start&&n.seq2Range.endExclusive<=i.seq2Range.start))throw new co("Sequence diffs must be sorted");n=i}}constructor(e,n){this.seq1Range=e,this.seq2Range=n}swap(){return new oc(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new oc(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new oc(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new oc(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new oc(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const n=this.seq1Range.intersect(e.seq1Range),i=this.seq2Range.intersect(e.seq2Range);if(!(!n||!i))return new oc(n,i)}getStarts(){return new aC(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new aC(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}const _T=class _T{constructor(e,n){this.offset1=e,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return e===0?this:new _T(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}};_T.zero=new _T(0,0),_T.max=new _T(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);let aC=_T;const Fle=class Fle{isValid(){return!0}};Fle.instance=new Fle;let IH=Fle;class Tpi{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new co("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime<this.timeout)&&this.valid){this.valid=!1;debugger}return this.valid}}class Uwe{constructor(e,n){this.width=e,this.height=n,this.array=[],this.array=new Array(e*n)}get(e,n){return this.array[e+n*this.width]}set(e,n,i){this.array[e+n*this.width]=i}}function zLe(t){return t===32||t===9}const QB=class QB{static getKey(e){let n=this.chrKeys.get(e);return n===void 0&&(n=this.chrKeys.size,this.chrKeys.set(e,n)),n}constructor(e,n,i){this.range=e,this.lines=n,this.source=i,this.histogram=[];let r=0;for(let o=e.startLineNumber-1;o<e.endLineNumberExclusive-1;o++){const s=n[o];for(let l=0;l<s.length;l++){r++;const c=s[l],u=QB.getKey(c);this.histogram[u]=(this.histogram[u]||0)+1}r++;const a=QB.getKey(`
`);this.histogram[a]=(this.histogram[a]||0)+1}this.totalCount=r}computeSimilarity(e){let n=0;const i=Math.max(this.histogram.length,e.histogram.length);for(let r=0;r<i;r++)n+=Math.abs((this.histogram[r]??0)-(e.histogram[r]??0));return 1-n/(this.totalCount+e.totalCount)}};QB.chrKeys=new Map;let nre=QB;class Ipi{compute(e,n,i=IH.instance,r){if(e.length===0||n.length===0)return IC.trivial(e,n);const o=new Uwe(e.length,n.length),s=new Uwe(e.length,n.length),a=new Uwe(e.length,n.length);for(let m=0;m<e.length;m++)for(let p=0;p<n.length;p++){if(!i.isValid())return IC.trivialTimedOut(e,n);const g=m===0?0:o.get(m-1,p),y=p===0?0:o.get(m,p-1);let _;e.getElement(m)===n.getElement(p)?(m===0||p===0?_=0:_=o.get(m-1,p-1),m>0&&p>0&&s.get(m-1,p-1)===3&&(_+=a.get(m-1,p-1)),_+=r?r(m,p):1):_=-1;const w=Math.max(g,y,_);if(w===_){const C=m>0&&p>0?a.get(m-1,p-1):0;a.set(m,p,C+1),s.set(m,p,3)}else w===g?(a.set(m,p,0),s.set(m,p,1)):w===y&&(a.set(m,p,0),s.set(m,p,2));o.set(m,p,w)}const l=[];let c=e.length,u=n.length;function d(m,p){(m+1!==c||p+1!==u)&&l.push(new oc(new dr(m+1,c),new dr(p+1,u))),c=m,u=p}let h=e.length-1,f=n.length-1;for(;h>=0&&f>=0;)s.get(h,f)===3?(d(h,f),h--,f--):s.get(h,f)===1?h--:f--;return d(-1,-1),l.reverse(),new IC(l,!1)}}class g3t{compute(e,n,i=IH.instance){if(e.length===0||n.length===0)return IC.trivial(e,n);const r=e,o=n;function s(p,g){for(;p<r.length&&g<o.length&&r.getElement(p)===o.getElement(g);)p++,g++;return p}let a=0;const l=new Api;l.set(0,s(0,0));const c=new Rpi;c.set(0,l.get(0)===0?null:new kst(null,0,0,l.get(0)));let u=0;e:for(;;){if(a++,!i.isValid())return IC.trivialTimedOut(r,o);const p=-Math.min(a,o.length+a%2),g=Math.min(a,r.length+a%2);for(u=p;u<=g;u+=2){const y=u===g?-1:l.get(u+1),_=u===p?-1:l.get(u-1)+1,w=Math.min(Math.max(y,_),r.length),C=w-u;if(w>r.length||C>o.length)continue;const N=s(w,C);l.set(u,N);const E=w===y?c.get(u+1):c.get(u-1);if(c.set(u,N!==w?new kst(E,w,C,N-w):E),l.get(u)===r.length&&l.get(u)-u===o.length)break e}}let d=c.get(u);const h=[];let f=r.length,m=o.length;for(;;){const p=d?d.x+d.length:0,g=d?d.y+d.length:0;if((p!==f||g!==m)&&h.push(new oc(new dr(p,f),new dr(g,m))),!d)break;f=d.x,m=d.y,d=d.prev}return h.reverse(),new IC(h,!1)}}class kst{constructor(e,n,i,r){this.prev=e,this.x=n,this.y=i,this.length=r}}class Api{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const i=this.negativeArr;this.negativeArr=new Int32Array(i.length*2),this.negativeArr.set(i)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){const i=this.positiveArr;this.positiveArr=new Int32Array(i.length*2),this.positiveArr.set(i)}this.positiveArr[e]=n}}}class Rpi{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}}class ire{constructor(e,n,i){this.lines=e,this.range=n,this.considerWhitespaceChanges=i,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let r=this.range.startLineNumber;r<=this.range.endLineNumber;r++){let o=e[r-1],s=0;r===this.range.startLineNumber&&this.range.startColumn>1&&(s=this.range.startColumn-1,o=o.substring(s)),this.lineStartOffsets.push(s);let a=0;if(!i){const c=o.trimStart();a=o.length-c.length,o=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(a);const l=r===this.range.endLineNumber?Math.min(this.range.endColumn-1-s-a,o.length):o.length;for(let c=0;c<l;c++)this.elements.push(o.charCodeAt(c));r<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new dr(0,this.length))}getText(e){return this.elements.slice(e.start,e.endExclusive).map(n=>String.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const n=Lst(e>0?this.elements[e-1]:-1),i=Lst(e<this.elements.length?this.elements[e]:-1);if(n===7&&i===8)return 0;if(n===8)return 150;let r=0;return n!==i&&(r+=10,n===0&&i===1&&(r+=1)),r+=Mst(n),r+=Mst(i),r}translateOffset(e,n="right"){const i=LH(this.firstElementOffsetByLineIdx,o=>o<=e),r=e-this.firstElementOffsetByLineIdx[i];return new ot(this.range.startLineNumber+i,1+this.lineStartOffsets[i]+r+(r===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[i]))}translateRange(e){const n=this.translateOffset(e.start,"right"),i=this.translateOffset(e.endExclusive,"left");return i.isBefore(n)?ve.fromPositions(i,i):ve.fromPositions(n,i)}findWordContaining(e){if(e<0||e>=this.elements.length||!Kwe(this.elements[e]))return;let n=e;for(;n>0&&Kwe(this.elements[n-1]);)n--;let i=e;for(;i<this.elements.length&&Kwe(this.elements[i]);)i++;return new dr(n,i)}countLinesIn(e){return this.translateOffset(e.endExclusive).lineNumber-this.translateOffset(e.start).lineNumber}isStronglyEqual(e,n){return this.elements[e]===this.elements[n]}extendToFullLines(e){const n=o5(this.firstElementOffsetByLineIdx,r=>r<=e.start)??0,i=ypi(this.firstElementOffsetByLineIdx,r=>e.endExclusive<=r)??this.elements.length;return new dr(n,i)}}function Kwe(t){return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57}const Ppi={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function Mst(t){return Ppi[t]}function Lst(t){return t===10?8:t===13?7:zLe(t)?6:t>=97&&t<=122?0:t>=65&&t<=90?1:t>=48&&t<=57?2:t===-1?3:t===44||t===59?5:4}function Opi(t,e,n,i,r,o){let{moves:s,excludedChanges:a}=Fpi(t,e,n,o);if(!o.isValid())return[];const l=t.filter(u=>!a.has(u)),c=$pi(l,i,r,e,n,o);return dMe(s,c),s=Vpi(s),s=s.filter(u=>{const d=u.original.toOffsetRange().slice(e).map(f=>f.trim());return d.join(`
`).length>=15&&jpi(d,f=>f.length>=2)>=2}),s=Bpi(t,s),s}function jpi(t,e){let n=0;for(const i of t)e(i)&&n++;return n}function Fpi(t,e,n,i){const r=[],o=t.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new nre(l.original,e,l)),s=new Set(t.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new nre(l.modified,n,l))),a=new Set;for(const l of o){let c=-1,u;for(const d of s){const h=l.computeSimilarity(d);h>c&&(c=h,u=d)}if(c>.9&&u&&(s.delete(u),r.push(new zd(l.range,u.range)),a.add(l.source),a.add(u.source)),!i.isValid())return{moves:r,excludedChanges:a}}return{moves:r,excludedChanges:a}}function $pi(t,e,n,i,r,o){const s=[],a=new V8e;for(const h of t)for(let f=h.original.startLineNumber;f<h.original.endLineNumberExclusive-2;f++){const m=`${e[f-1]}:${e[f+1-1]}:${e[f+2-1]}`;a.add(m,{range:new Ki(f,f+3)})}const l=[];t.sort(Ah(h=>h.modified.startLineNumber,vv));for(const h of t){let f=[];for(let m=h.modified.startLineNumber;m<h.modified.endLineNumberExclusive-2;m++){const p=`${n[m-1]}:${n[m+1-1]}:${n[m+2-1]}`,g=new Ki(m,m+3),y=[];a.forEach(p,({range:_})=>{for(const C of f)if(C.originalLineRange.endLineNumberExclusive+1===_.endLineNumberExclusive&&C.modifiedLineRange.endLineNumberExclusive+1===g.endLineNumberExclusive){C.originalLineRange=new Ki(C.originalLineRange.startLineNumber,_.endLineNumberExclusive),C.modifiedLineRange=new Ki(C.modifiedLineRange.startLineNumber,g.endLineNumberExclusive),y.push(C);return}const w={modifiedLineRange:g,originalLineRange:_};l.push(w),y.push(w)}),f=y}if(!o.isValid())return[]}l.sort(MOt(Ah(h=>h.modifiedLineRange.length,vv)));const c=new $g,u=new $g;for(const h of l){const f=h.modifiedLineRange.startLineNumber-h.originalLineRange.startLineNumber,m=c.subtractFrom(h.modifiedLineRange),p=u.subtractFrom(h.originalLineRange).getWithDelta(f),g=m.getIntersection(p);for(const y of g.ranges){if(y.length<3)continue;const _=y,w=y.delta(-f);s.push(new zd(w,_)),c.addRange(_),u.addRange(w)}}s.sort(Ah(h=>h.original.startLineNumber,vv));const d=new tre(t);for(let h=0;h<s.length;h++){const f=s[h],m=d.findLastMonotonous(E=>E.original.startLineNumber<=f.original.startLineNumber),p=o5(t,E=>E.modified.startLineNumber<=f.modified.startLineNumber),g=Math.max(f.original.startLineNumber-m.original.startLineNumber,f.modified.startLineNumber-p.modified.startLineNumber),y=d.findLastMonotonous(E=>E.original.startLineNumber<f.original.endLineNumberExclusive),_=o5(t,E=>E.modified.startLineNumber<f.modified.endLineNumberExclusive),w=Math.max(y.original.endLineNumberExclusive-f.original.endLineNumberExclusive,_.modified.endLineNumberExclusive-f.modified.endLineNumberExclusive);let C;for(C=0;C<g;C++){const E=f.original.startLineNumber-C-1,D=f.modified.startLineNumber-C-1;if(E>i.length||D>r.length||c.contains(D)||u.contains(E)||!Tst(i[E-1],r[D-1],o))break}C>0&&(u.addRange(new Ki(f.original.startLineNumber-C,f.original.startLineNumber)),c.addRange(new Ki(f.modified.startLineNumber-C,f.modified.startLineNumber)));let N;for(N=0;N<w;N++){const E=f.original.endLineNumberExclusive+N,D=f.modified.endLineNumberExclusive+N;if(E>i.length||D>r.length||c.contains(D)||u.contains(E)||!Tst(i[E-1],r[D-1],o))break}N>0&&(u.addRange(new Ki(f.original.endLineNumberExclusive,f.original.endLineNumberExclusive+N)),c.addRange(new Ki(f.modified.endLineNumberExclusive,f.modified.endLineNumberExclusive+N))),(C>0||N>0)&&(s[h]=new zd(new Ki(f.original.startLineNumber-C,f.original.endLineNumberExclusive+N),new Ki(f.modified.startLineNumber-C,f.modified.endLineNumberExclusive+N)))}return s}function Tst(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;const r=new g3t().compute(new ire([t],new ve(1,1,1,t.length),!1),new ire([e],new ve(1,1,1,e.length),!1),n);let o=0;const s=oc.invert(r.diffs,t.length);for(const u of s)u.seq1Range.forEach(d=>{zLe(t.charCodeAt(d))||o++});function a(u){let d=0;for(let h=0;h<t.length;h++)zLe(u.charCodeAt(h))||d++;return d}const l=a(t.length>e.length?t:e);return o/l>.6&&l>10}function Vpi(t){if(t.length===0)return t;t.sort(Ah(n=>n.original.startLineNumber,vv));const e=[t[0]];for(let n=1;n<t.length;n++){const i=e[e.length-1],r=t[n],o=r.original.startLineNumber-i.original.endLineNumberExclusive,s=r.modified.startLineNumber-i.modified.endLineNumberExclusive;if(o>=0&&s>=0&&o+s<=2){e[e.length-1]=i.join(r);continue}e.push(r)}return e}function Bpi(t,e){const n=new tre(t);return e=e.filter(i=>{const r=n.findLastMonotonous(a=>a.original.startLineNumber<i.original.endLineNumberExclusive)||new zd(new Ki(1,1),new Ki(1,1)),o=o5(t,a=>a.modified.startLineNumber<i.modified.endLineNumberExclusive);return r!==o}),e}function HLe(t,e,n){let i=n;return i=Ist(t,e,i),i=Ist(t,e,i),i=zpi(t,e,i),i}function Ist(t,e,n){if(n.length===0)return n;const i=[];i.push(n[0]);for(let o=1;o<n.length;o++){const s=i[i.length-1];let a=n[o];if(a.seq1Range.isEmpty||a.seq2Range.isEmpty){const l=a.seq1Range.start-s.seq1Range.endExclusive;let c;for(c=1;c<=l&&!(t.getElement(a.seq1Range.start-c)!==t.getElement(a.seq1Range.endExclusive-c)||e.getElement(a.seq2Range.start-c)!==e.getElement(a.seq2Range.endExclusive-c));c++);if(c--,c===l){i[i.length-1]=new oc(new dr(s.seq1Range.start,a.seq1Range.endExclusive-l),new dr(s.seq2Range.start,a.seq2Range.endExclusive-l));continue}a=a.delta(-c)}i.push(a)}const r=[];for(let o=0;o<i.length-1;o++){const s=i[o+1];let a=i[o];if(a.seq1Range.isEmpty||a.seq2Range.isEmpty){const l=s.seq1Range.start-a.seq1Range.endExclusive;let c;for(c=0;c<l&&!(!t.isStronglyEqual(a.seq1Range.start+c,a.seq1Range.endExclusive+c)||!e.isStronglyEqual(a.seq2Range.start+c,a.seq2Range.endExclusive+c));c++);if(c===l){i[o+1]=new oc(new dr(a.seq1Range.start+l,s.seq1Range.endExclusive),new dr(a.seq2Range.start+l,s.seq2Range.endExclusive));continue}c>0&&(a=a.delta(c))}r.push(a)}return i.length>0&&r.push(i[i.length-1]),r}function zpi(t,e,n){if(!t.getBoundaryScore||!e.getBoundaryScore)return n;for(let i=0;i<n.length;i++){const r=i>0?n[i-1]:void 0,o=n[i],s=i+1<n.length?n[i+1]:void 0,a=new dr(r?r.seq1Range.endExclusive+1:0,s?s.seq1Range.start-1:t.length),l=new dr(r?r.seq2Range.endExclusive+1:0,s?s.seq2Range.start-1:e.length);o.seq1Range.isEmpty?n[i]=Ast(o,t,e,a,l):o.seq2Range.isEmpty&&(n[i]=Ast(o.swap(),e,t,l,a).swap())}return n}function Ast(t,e,n,i,r){let s=1;for(;t.seq1Range.start-s>=i.start&&t.seq2Range.start-s>=r.start&&n.isStronglyEqual(t.seq2Range.start-s,t.seq2Range.endExclusive-s)&&s<100;)s++;s--;let a=0;for(;t.seq1Range.start+a<i.endExclusive&&t.seq2Range.endExclusive+a<r.endExclusive&&n.isStronglyEqual(t.seq2Range.start+a,t.seq2Range.endExclusive+a)&&a<100;)a++;if(s===0&&a===0)return t;let l=0,c=-1;for(let u=-s;u<=a;u++){const d=t.seq2Range.start+u,h=t.seq2Range.endExclusive+u,f=t.seq1Range.start+u,m=e.getBoundaryScore(f)+n.getBoundaryScore(d)+n.getBoundaryScore(h);m>c&&(c=m,l=u)}return t.delta(l)}function Hpi(t,e,n){const i=[];for(const r of n){const o=i[i.length-1];if(!o){i.push(r);continue}r.seq1Range.start-o.seq1Range.endExclusive<=2||r.seq2Range.start-o.seq2Range.endExclusive<=2?i[i.length-1]=new oc(o.seq1Range.join(r.seq1Range),o.seq2Range.join(r.seq2Range)):i.push(r)}return i}function Wpi(t,e,n){const i=oc.invert(n,t.length),r=[];let o=new aC(0,0);function s(l,c){if(l.offset1<o.offset1||l.offset2<o.offset2)return;const u=t.findWordContaining(l.offset1),d=e.findWordContaining(l.offset2);if(!u||!d)return;let h=new oc(u,d);const f=h.intersect(c);let m=f.seq1Range.length,p=f.seq2Range.length;for(;i.length>0;){const g=i[0];if(!(g.seq1Range.intersects(h.seq1Range)||g.seq2Range.intersects(h.seq2Range)))break;const _=t.findWordContaining(g.seq1Range.start),w=e.findWordContaining(g.seq2Range.start),C=new oc(_,w),N=C.intersect(g);if(m+=N.seq1Range.length,p+=N.seq2Range.length,h=h.join(C),h.seq1Range.endExclusive>=g.seq1Range.endExclusive)i.shift();else break}m+p<(h.seq1Range.length+h.seq2Range.length)*2/3&&r.push(h),o=h.getEndExclusives()}for(;i.length>0;){const l=i.shift();l.seq1Range.isEmpty||(s(l.getStarts(),l),s(l.getEndExclusives().delta(-1),l))}return Upi(n,r)}function Upi(t,e){const n=[];for(;t.length>0||e.length>0;){const i=t[0],r=e[0];let o;i&&(!r||i.seq1Range.start<r.seq1Range.start)?o=t.shift():o=e.shift(),n.length>0&&n[n.length-1].seq1Range.endExclusive>=o.seq1Range.start?n[n.length-1]=n[n.length-1].join(o):n.push(o)}return n}function Kpi(t,e,n){let i=n;if(i.length===0)return i;let r=0,o;do{o=!1;const s=[i[0]];for(let a=1;a<i.length;a++){let u=function(h,f){const m=new dr(c.seq1Range.endExclusive,l.seq1Range.start);return t.getText(m).replace(/\s/g,"").length<=4&&(h.seq1Range.length+h.seq2Range.length>5||f.seq1Range.length+f.seq2Range.length>5)};const l=i[a],c=s[s.length-1];u(c,l)?(o=!0,s[s.length-1]=s[s.length-1].join(l)):s.push(l)}i=s}while(r++<10&&o);return i}function qpi(t,e,n){let i=n;if(i.length===0)return i;let r=0,o;do{o=!1;const a=[i[0]];for(let l=1;l<i.length;l++){let d=function(f,m){const p=new dr(u.seq1Range.endExclusive,c.seq1Range.start);if(t.countLinesIn(p)>5||p.length>500)return!1;const y=t.getText(p).trim();if(y.length>20||y.split(/\r\n|\r|\n/).length>1)return!1;const _=t.countLinesIn(f.seq1Range),w=f.seq1Range.length,C=e.countLinesIn(f.seq2Range),N=f.seq2Range.length,E=t.countLinesIn(m.seq1Range),D=m.seq1Range.length,k=e.countLinesIn(m.seq2Range),M=m.seq2Range.length,T=2*40+50;function A(R){return Math.min(R,T)}return Math.pow(Math.pow(A(_*40+w),1.5)+Math.pow(A(C*40+N),1.5),1.5)+Math.pow(Math.pow(A(E*40+D),1.5)+Math.pow(A(k*40+M),1.5),1.5)>(T**1.5)**1.5*1.3};const c=i[l],u=a[a.length-1];d(u,c)?(o=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}i=a}while(r++<10&&o);const s=[];return Oci(i,(a,l,c)=>{let u=l;function d(y){return y.length>0&&y.trim().length<=3&&l.seq1Range.length+l.seq2Range.length>100}const h=t.extendToFullLines(l.seq1Range),f=t.getText(new dr(h.start,l.seq1Range.start));d(f)&&(u=u.deltaStart(-f.length));const m=t.getText(new dr(l.seq1Range.endExclusive,h.endExclusive));d(m)&&(u=u.deltaEnd(m.length));const p=oc.fromOffsetPairs(a?a.getEndExclusives():aC.zero,c?c.getStarts():aC.max),g=u.intersect(p);s.length>0&&g.getStarts().equals(s[s.length-1].getEndExclusives())?s[s.length-1]=s[s.length-1].join(g):s.push(g)}),s}class Rst{constructor(e,n){this.trimmedHash=e,this.lines=n}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const n=e===0?0:Pst(this.lines[e-1]),i=e===this.lines.length?0:Pst(this.lines[e]);return 1e3-(n+i)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(`
`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}}function Pst(t){let e=0;for(;e<t.length&&(t.charCodeAt(e)===32||t.charCodeAt(e)===9);)e++;return e}class b3t{constructor(){this.dynamicProgrammingDiffing=new Ipi,this.myersDiffingAlgorithm=new g3t}computeDiff(e,n,i){if(e.length<=1&&Xs(e,n,(N,E)=>N===E))return new ote([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new ote([new Ip(new Ki(1,e.length+1),new Ki(1,n.length+1),[new hp(new ve(1,1,e.length,e[e.length-1].length+1),new ve(1,1,n.length,n[n.length-1].length+1))])],[],!1);const r=i.maxComputationTimeMs===0?IH.instance:new Tpi(i.maxComputationTimeMs),o=!i.ignoreTrimWhitespace,s=new Map;function a(N){let E=s.get(N);return E===void 0&&(E=s.size,s.set(N,E)),E}const l=e.map(N=>a(N.trim())),c=n.map(N=>a(N.trim())),u=new Rst(l,e),d=new Rst(c,n),h=u.length+d.length<1700?this.dynamicProgrammingDiffing.compute(u,d,r,(N,E)=>e[N]===n[E]?n[E].length===0?.1:1+Math.log(1+n[E].length):.99):this.myersDiffingAlgorithm.compute(u,d,r);let f=h.diffs,m=h.hitTimeout;f=HLe(u,d,f),f=Kpi(u,d,f);const p=[],g=N=>{if(o)for(let E=0;E<N;E++){const D=y+E,k=_+E;if(e[D]!==n[k]){const M=this.refineDiff(e,n,new oc(new dr(D,D+1),new dr(k,k+1)),r,o);for(const T of M.mappings)p.push(T);M.hitTimeout&&(m=!0)}}};let y=0,_=0;for(const N of f){K2(()=>N.seq1Range.start-y===N.seq2Range.start-_);const E=N.seq1Range.start-y;g(E),y=N.seq1Range.endExclusive,_=N.seq2Range.endExclusive;const D=this.refineDiff(e,n,N,r,o);D.hitTimeout&&(m=!0);for(const k of D.mappings)p.push(k)}g(e.length-y);const w=Ost(p,e,n);let C=[];return i.computeMoves&&(C=this.computeMoves(w,e,n,l,c,r,o)),K2(()=>{function N(D,k){if(D.lineNumber<1||D.lineNumber>k.length)return!1;const M=k[D.lineNumber-1];return!(D.column<1||D.column>M.length+1)}function E(D,k){return!(D.startLineNumber<1||D.startLineNumber>k.length+1||D.endLineNumberExclusive<1||D.endLineNumberExclusive>k.length+1)}for(const D of w){if(!D.innerChanges)return!1;for(const k of D.innerChanges)if(!(N(k.modifiedRange.getStartPosition(),n)&&N(k.modifiedRange.getEndPosition(),n)&&N(k.originalRange.getStartPosition(),e)&&N(k.originalRange.getEndPosition(),e)))return!1;if(!E(D.modified,n)||!E(D.original,e))return!1}return!0}),new ote(w,C,m)}computeMoves(e,n,i,r,o,s,a){return Opi(e,n,i,r,o,s).map(u=>{const d=this.refineDiff(n,i,new oc(u.original.toOffsetRange(),u.modified.toOffsetRange()),s,a),h=Ost(d.mappings,n,i,!0);return new f3t(u,h)})}refineDiff(e,n,i,r,o){const a=Ypi(i).toRangeMapping2(e,n),l=new ire(e,a.originalRange,o),c=new ire(n,a.modifiedRange,o),u=l.length+c.length<500?this.dynamicProgrammingDiffing.compute(l,c,r):this.myersDiffingAlgorithm.compute(l,c,r);let d=u.diffs;return d=HLe(l,c,d),d=Wpi(l,c,d),d=Hpi(l,c,d),d=qpi(l,c,d),{mappings:d.map(f=>new hp(l.translateRange(f.seq1Range),c.translateRange(f.seq2Range))),hitTimeout:u.hitTimeout}}}function Ost(t,e,n,i=!1){const r=[];for(const o of o8e(t.map(s=>Gpi(s,e,n)),(s,a)=>s.original.overlapOrTouch(a.original)||s.modified.overlapOrTouch(a.modified))){const s=o[0],a=o[o.length-1];r.push(new Ip(s.original.join(a.original),s.modified.join(a.modified),o.map(l=>l.innerChanges[0])))}return K2(()=>!i&&r.length>0&&(r[0].modified.startLineNumber!==r[0].original.startLineNumber||n.length-r[r.length-1].modified.endLineNumberExclusive!==e.length-r[r.length-1].original.endLineNumberExclusive)?!1:j8e(r,(o,s)=>s.original.startLineNumber-o.original.endLineNumberExclusive===s.modified.startLineNumber-o.modified.endLineNumberExclusive&&o.original.endLineNumberExclusive<s.original.startLineNumber&&o.modified.endLineNumberExclusive<s.modified.startLineNumber)),r}function Gpi(t,e,n){let i=0,r=0;t.modifiedRange.endColumn===1&&t.originalRange.endColumn===1&&t.originalRange.startLineNumber+i<=t.originalRange.endLineNumber&&t.modifiedRange.startLineNumber+i<=t.modifiedRange.endLineNumber&&(r=-1),t.modifiedRange.startColumn-1>=n[t.modifiedRange.startLineNumber-1].length&&t.originalRange.startColumn-1>=e[t.originalRange.startLineNumber-1].length&&t.originalRange.startLineNumber<=t.originalRange.endLineNumber+r&&t.modifiedRange.startLineNumber<=t.modifiedRange.endLineNumber+r&&(i=1);const o=new Ki(t.originalRange.startLineNumber+i,t.originalRange.endLineNumber+1+r),s=new Ki(t.modifiedRange.startLineNumber+i,t.modifiedRange.endLineNumber+1+r);return new Ip(o,s,[t])}function Ypi(t){return new zd(new Ki(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new Ki(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}const jst={getLegacy:()=>new Dpi,getDefault:()=>new b3t};function gD(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class jr{constructor(e,n,i,r=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,i))|0,this.a=gD(Math.max(Math.min(1,r),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}}class tv{constructor(e,n,i,r){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=gD(Math.max(Math.min(1,n),0),3),this.l=gD(Math.max(Math.min(1,i),0),3),this.a=gD(Math.max(Math.min(1,r),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){const n=e.r/255,i=e.g/255,r=e.b/255,o=e.a,s=Math.max(n,i,r),a=Math.min(n,i,r);let l=0,c=0;const u=(a+s)/2,d=s-a;if(d>0){switch(c=Math.min(u<=.5?d/(2*u):d/(2-2*u),1),s){case n:l=(i-r)/d+(i<r?6:0);break;case i:l=(r-n)/d+2;break;case r:l=(n-i)/d+4;break}l*=60,l=Math.round(l)}return new tv(l,c,u,o)}static _hue2rgb(e,n,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+(n-e)*6*i:i<1/2?n:i<2/3?e+(n-e)*(2/3-i)*6:e}static toRGBA(e){const n=e.h/360,{s:i,l:r,a:o}=e;let s,a,l;if(i===0)s=a=l=r;else{const c=r<.5?r*(1+i):r+i-r*i,u=2*r-c;s=tv._hue2rgb(u,c,n+1/3),a=tv._hue2rgb(u,c,n),l=tv._hue2rgb(u,c,n-1/3)}return new jr(Math.round(s*255),Math.round(a*255),Math.round(l*255),o)}}class Rx{constructor(e,n,i,r){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=gD(Math.max(Math.min(1,n),0),3),this.v=gD(Math.max(Math.min(1,i),0),3),this.a=gD(Math.max(Math.min(1,r),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){const n=e.r/255,i=e.g/255,r=e.b/255,o=Math.max(n,i,r),s=Math.min(n,i,r),a=o-s,l=o===0?0:a/o;let c;return a===0?c=0:o===n?c=((i-r)/a%6+6)%6:o===i?c=(r-n)/a+2:c=(n-i)/a+4,new Rx(Math.round(c*60),l,o,e.a)}static toRGBA(e){const{h:n,s:i,v:r,a:o}=e,s=r*i,a=s*(1-Math.abs(n/60%2-1)),l=r-s;let[c,u,d]=[0,0,0];return n<60?(c=s,u=a):n<120?(c=a,u=s):n<180?(u=s,d=a):n<240?(u=a,d=s):n<300?(c=a,d=s):n<=360&&(c=s,d=a),c=Math.round((c+l)*255),u=Math.round((u+l)*255),d=Math.round((d+l)*255),new jr(c,u,d,o)}}var na;let Rt=(na=class{static fromHex(e){return na.Format.CSS.parseHex(e)||na.red}static equals(e,n){return!e&&!n?!0:!e||!n?!1:e.equals(n)}get hsla(){return this._hsla?this._hsla:tv.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Rx.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof jr)this.rgba=e;else if(e instanceof tv)this._hsla=e,this.rgba=tv.toRGBA(e);else if(e instanceof Rx)this._hsva=e,this.rgba=Rx.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&jr.equals(this.rgba,e.rgba)&&tv.equals(this.hsla,e.hsla)&&Rx.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=na._relativeLuminanceForComponent(this.rgba.r),n=na._relativeLuminanceForComponent(this.rgba.g),i=na._relativeLuminanceForComponent(this.rgba.b),r=.2126*e+.7152*n+.0722*i;return gD(r,4)}static _relativeLuminanceForComponent(e){const n=e/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const n=this.getRelativeLuminance(),i=e.getRelativeLuminance();return n>i}isDarkerThan(e){const n=this.getRelativeLuminance(),i=e.getRelativeLuminance();return n<i}lighten(e){return new na(new tv(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new na(new tv(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:n,g:i,b:r,a:o}=this.rgba;return new na(new jr(n,i,r,o*e))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new na(new jr(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}makeOpaque(e){if(this.isOpaque()||e.rgba.a!==1)return this;const{r:n,g:i,b:r,a:o}=this.rgba;return new na(new jr(e.rgba.r-o*(e.rgba.r-n),e.rgba.g-o*(e.rgba.g-i),e.rgba.b-o*(e.rgba.b-r),1))}toString(){return this._toString||(this._toString=na.Format.CSS.format(this)),this._toString}static getLighterColor(e,n,i){if(e.isLighterThan(n))return e;i=i||.5;const r=e.getRelativeLuminance(),o=n.getRelativeLuminance();return i=i*(o-r)/o,e.lighten(i)}static getDarkerColor(e,n,i){if(e.isDarkerThan(n))return e;i=i||.5;const r=e.getRelativeLuminance(),o=n.getRelativeLuminance();return i=i*(r-o)/r,e.darken(i)}},na.white=new na(new jr(255,255,255,1)),na.black=new na(new jr(0,0,0,1)),na.red=new na(new jr(255,0,0,1)),na.blue=new na(new jr(0,0,255,1)),na.green=new na(new jr(0,255,0,1)),na.cyan=new na(new jr(0,255,255,1)),na.lightgrey=new na(new jr(211,211,211,1)),na.transparent=new na(new jr(0,0,0,0)),na);(function(t){(function(e){(function(n){function i(f){return f.rgba.a===1?`rgb(${f.rgba.r}, ${f.rgba.g}, ${f.rgba.b})`:t.Format.CSS.formatRGBA(f)}n.formatRGB=i;function r(f){return`rgba(${f.rgba.r}, ${f.rgba.g}, ${f.rgba.b}, ${+f.rgba.a.toFixed(2)})`}n.formatRGBA=r;function o(f){return f.hsla.a===1?`hsl(${f.hsla.h}, ${(f.hsla.s*100).toFixed(2)}%, ${(f.hsla.l*100).toFixed(2)}%)`:t.Format.CSS.formatHSLA(f)}n.formatHSL=o;function s(f){return`hsla(${f.hsla.h}, ${(f.hsla.s*100).toFixed(2)}%, ${(f.hsla.l*100).toFixed(2)}%, ${f.hsla.a.toFixed(2)})`}n.formatHSLA=s;function a(f){const m=f.toString(16);return m.length!==2?"0"+m:m}function l(f){return`#${a(f.rgba.r)}${a(f.rgba.g)}${a(f.rgba.b)}`}n.formatHex=l;function c(f,m=!1){return m&&f.rgba.a===1?t.Format.CSS.formatHex(f):`#${a(f.rgba.r)}${a(f.rgba.g)}${a(f.rgba.b)}${a(Math.round(f.rgba.a*255))}`}n.formatHexA=c;function u(f){return f.isOpaque()?t.Format.CSS.formatHex(f):t.Format.CSS.formatRGBA(f)}n.format=u;function d(f){const m=f.length;if(m===0||f.charCodeAt(0)!==35)return null;if(m===7){const p=16*h(f.charCodeAt(1))+h(f.charCodeAt(2)),g=16*h(f.charCodeAt(3))+h(f.charCodeAt(4)),y=16*h(f.charCodeAt(5))+h(f.charCodeAt(6));return new t(new jr(p,g,y,1))}if(m===9){const p=16*h(f.charCodeAt(1))+h(f.charCodeAt(2)),g=16*h(f.charCodeAt(3))+h(f.charCodeAt(4)),y=16*h(f.charCodeAt(5))+h(f.charCodeAt(6)),_=16*h(f.charCodeAt(7))+h(f.charCodeAt(8));return new t(new jr(p,g,y,_/255))}if(m===4){const p=h(f.charCodeAt(1)),g=h(f.charCodeAt(2)),y=h(f.charCodeAt(3));return new t(new jr(16*p+p,16*g+g,16*y+y))}if(m===5){const p=h(f.charCodeAt(1)),g=h(f.charCodeAt(2)),y=h(f.charCodeAt(3)),_=h(f.charCodeAt(4));return new t(new jr(16*p+p,16*g+g,16*y+y,(16*_+_)/255))}return null}n.parseHex=d;function h(f){switch(f){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(e.CSS||(e.CSS={}))})(t.Format||(t.Format={}))})(Rt||(Rt={}));function v3t(t){const e=[];for(const n of t){const i=Number(n);(i||i===0&&n.replace(/\s/g,"")!=="")&&e.push(i)}return e}function K8e(t,e,n,i){return{red:t/255,blue:n/255,green:e/255,alpha:i}}function HV(t,e){const n=e.index,i=e[0].length;if(!n)return;const r=t.positionAt(n);return{startLineNumber:r.lineNumber,startColumn:r.column,endLineNumber:r.lineNumber,endColumn:r.column+i}}function Xpi(t,e){if(!t)return;const n=Rt.Format.CSS.parseHex(e);if(n)return{range:t,color:K8e(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}}function Fst(t,e,n){if(!t||e.length!==1)return;const r=e[0].values(),o=v3t(r);return{range:t,color:K8e(o[0],o[1],o[2],n?o[3]:1)}}function $st(t,e,n){if(!t||e.length!==1)return;const r=e[0].values(),o=v3t(r),s=new Rt(new tv(o[0],o[1]/100,o[2]/100,n?o[3]:1));return{range:t,color:K8e(s.rgba.r,s.rgba.g,s.rgba.b,s.rgba.a)}}function WV(t,e){return typeof t=="string"?[...t.matchAll(e)]:t.findMatches(e)}function Zpi(t){const e=[],i=WV(t,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm);if(i.length>0)for(const r of i){const o=r.filter(c=>c!==void 0),s=o[1],a=o[2];if(!a)continue;let l;if(s==="rgb"){const c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;l=Fst(HV(t,r),WV(a,c),!1)}else if(s==="rgba"){const c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=Fst(HV(t,r),WV(a,c),!0)}else if(s==="hsl"){const c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;l=$st(HV(t,r),WV(a,c),!1)}else if(s==="hsla"){const c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=$st(HV(t,r),WV(a,c),!0)}else s==="#"&&(l=Xpi(HV(t,r),s+a));l&&e.push(l)}return e}function Qpi(t){return!t||typeof t.getValue!="function"||typeof t.positionAt!="function"?[]:Zpi(t)}const Vst=new RegExp("\\bMARK:\\s*(.*)$","d"),Jpi=/^-+|-+$/g;function egi(t,e){var i;let n=[];if(e.findRegionSectionHeaders&&((i=e.foldingRules)!=null&&i.markers)){const r=tgi(t,e);n=n.concat(r)}if(e.findMarkSectionHeaders){const r=ngi(t);n=n.concat(r)}return n}function tgi(t,e){const n=[],i=t.getLineCount();for(let r=1;r<=i;r++){const o=t.getLineContent(r),s=o.match(e.foldingRules.markers.start);if(s){const a={startLineNumber:r,startColumn:s[0].length+1,endLineNumber:r,endColumn:o.length+1};if(a.endColumn>a.startColumn){const l={range:a,...y3t(o.substring(s[0].length)),shouldBeInComments:!1};(l.text||l.hasSeparatorLine)&&n.push(l)}}}return n}function ngi(t){const e=[],n=t.getLineCount();for(let i=1;i<=n;i++){const r=t.getLineContent(i);igi(r,i,e)}return e}function igi(t,e,n){Vst.lastIndex=0;const i=Vst.exec(t);if(i){const r=i.indices[1][0]+1,o=i.indices[1][1]+1,s={startLineNumber:e,startColumn:r,endLineNumber:e,endColumn:o};if(s.endColumn>s.startColumn){const a={range:s,...y3t(i[1]),shouldBeInComments:!0};(a.text||a.hasSeparatorLine)&&n.push(a)}}}function y3t(t){t=t.trim();const e=t.startsWith("-");return t=t.replace(Jpi,""),{text:t,hasSeparatorLine:e}}class rgi extends Qmi{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const n=[];for(let i=0;i<this._lines.length;i++){const r=this._lines[i],o=this.offsetAt(new ot(i+1,1)),s=r.matchAll(e);for(const a of s)(a.index||a.index===0)&&(a.index=a.index+o),n.push(a)}return n}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,n){const i=gH(e.column,h8e(n),this._lines[e.lineNumber-1],0);return i?new ve(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn):null}words(e){const n=this._lines,i=this._wordenize.bind(this);let r=0,o="",s=0,a=[];return{*[Symbol.iterator](){for(;;)if(s<a.length){const l=o.substring(a[s].start,a[s].end);s+=1,yield l}else if(r<n.length)o=n[r],a=i(o,e),s=0,r+=1;else break}}}getLineWords(e,n){const i=this._lines[e-1],r=this._wordenize(i,n),o=[];for(const s of r)o.push({word:i.substring(s.start,s.end),startColumn:s.start+1,endColumn:s.end+1});return o}_wordenize(e,n){const i=[];let r;for(n.lastIndex=0;(r=n.exec(e))&&r[0].length!==0;)i.push({start:r.index,end:r.index+r[0].length});return i}getValueInRange(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);const n=this._eol,i=e.startLineNumber-1,r=e.endLineNumber-1,o=[];o.push(this._lines[i].substring(e.startColumn-1));for(let s=i+1;s<r;s++)o.push(this._lines[s]);return o.push(this._lines[r].substring(0,e.endColumn-1)),o.join(n)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();const n=this._lineStarts.getIndexOf(e),i=this._lines[n.index].length;return{lineNumber:1+n.index,column:1+Math.min(n.remainder,i)}}_validateRange(e){const n=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),i=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return n.lineNumber!==e.startLineNumber||n.column!==e.startColumn||i.lineNumber!==e.endLineNumber||i.column!==e.endColumn?{startLineNumber:n.lineNumber,startColumn:n.column,endLineNumber:i.lineNumber,endColumn:i.column}:e}_validatePosition(e){if(!ot.isIPosition(e))throw new Error("bad position");let{lineNumber:n,column:i}=e,r=!1;if(n<1)n=1,i=1,r=!0;else if(n>this._lines.length)n=this._lines.length,i=this._lines[n-1].length+1,r=!0;else{const o=this._lines[n-1].length+1;i<1?(i=1,r=!0):i>o&&(i=o,r=!0)}return r?{lineNumber:n,column:i}:e}}const xT=class xT{constructor(e,n){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=n,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach(n=>e.push(this._models[n])),e}acceptNewModel(e){this._models[e.url]=new rgi(ri.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,n){if(!this._models[e])return;this._models[e].onEvents(n)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}async computeUnicodeHighlights(e,n,i){const r=this._getModel(e);return r?z8e.computeUnicodeHighlights(r,n,i):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async findSectionHeaders(e,n){const i=this._getModel(e);return i?egi(i,n):[]}async computeDiff(e,n,i,r){const o=this._getModel(e),s=this._getModel(n);return!o||!s?null:xT.computeDiff(o,s,i,r)}static computeDiff(e,n,i,r){const o=r==="advanced"?jst.getDefault():jst.getLegacy(),s=e.getLinesContent(),a=n.getLinesContent(),l=o.computeDiff(s,a,i),c=l.changes.length>0?!1:this._modelsAreIdentical(e,n);function u(d){return d.map(h=>{var f;return[h.original.startLineNumber,h.original.endLineNumberExclusive,h.modified.startLineNumber,h.modified.endLineNumberExclusive,(f=h.innerChanges)==null?void 0:f.map(m=>[m.originalRange.startLineNumber,m.originalRange.startColumn,m.originalRange.endLineNumber,m.originalRange.endColumn,m.modifiedRange.startLineNumber,m.modifiedRange.startColumn,m.modifiedRange.endLineNumber,m.modifiedRange.endColumn])]})}return{identical:c,quitEarly:l.hitTimeout,changes:u(l.changes),moves:l.moves.map(d=>[d.lineRangeMapping.original.startLineNumber,d.lineRangeMapping.original.endLineNumberExclusive,d.lineRangeMapping.modified.startLineNumber,d.lineRangeMapping.modified.endLineNumberExclusive,u(d.changes)])}}static _modelsAreIdentical(e,n){const i=e.getLineCount(),r=n.getLineCount();if(i!==r)return!1;for(let o=1;o<=i;o++){const s=e.getLineContent(o),a=n.getLineContent(o);if(s!==a)return!1}return!0}async computeMoreMinimalEdits(e,n,i){const r=this._getModel(e);if(!r)return n;const o=[];let s;n=n.slice(0).sort((l,c)=>{if(l.range&&c.range)return ve.compareRangesUsingStarts(l.range,c.range);const u=l.range?0:1,d=c.range?0:1;return u-d});let a=0;for(let l=1;l<n.length;l++)ve.getEndPosition(n[a].range).equals(ve.getStartPosition(n[l].range))?(n[a].range=ve.fromPositions(ve.getStartPosition(n[a].range),ve.getEndPosition(n[l].range)),n[a].text+=n[l].text):(a++,n[a]=n[l]);n.length=a+1;for(let{range:l,text:c,eol:u}of n){if(typeof u=="number"&&(s=u),ve.isEmpty(l)&&!c)continue;const d=r.getValueInRange(l);if(c=c.replace(/\r\n|\n|\r/g,r.eol),d===c)continue;if(Math.max(c.length,d.length)>xT._diffLimit){o.push({range:l,text:c});continue}const h=Ymi(d,c,i),f=r.offsetAt(ve.lift(l).getStartPosition());for(const m of h){const p=r.positionAt(f+m.originalStart),g=r.positionAt(f+m.originalStart+m.originalLength),y={text:c.substr(m.modifiedStart,m.modifiedLength),range:{startLineNumber:p.lineNumber,startColumn:p.column,endLineNumber:g.lineNumber,endColumn:g.column}};r.getValueInRange(y.range)!==y.text&&o.push(y)}}return typeof s=="number"&&o.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),o}async computeLinks(e){const n=this._getModel(e);return n?ipi(n):null}async computeDefaultDocumentColors(e){const n=this._getModel(e);return n?Qpi(n):null}async textualSuggest(e,n,i,r){const o=new cu,s=new RegExp(i,r),a=new Set;e:for(const l of e){const c=this._getModel(l);if(c){for(const u of c.words(s))if(!(u===n||!isNaN(Number(u)))&&(a.add(u),a.size>xT._suggestionsLimit))break e}}return{words:Array.from(a),duration:o.elapsed()}}async computeWordRanges(e,n,i,r){const o=this._getModel(e);if(!o)return Object.create(null);const s=new RegExp(i,r),a=Object.create(null);for(let l=n.startLineNumber;l<n.endLineNumber;l++){const c=o.getLineWords(l,s);for(const u of c){if(!isNaN(Number(u.word)))continue;let d=a[u.word];d||(d=[],a[u.word]=d),d.push({startLineNumber:l,startColumn:u.startColumn,endLineNumber:l,endColumn:u.endColumn})}}return a}async navigateValueSet(e,n,i,r,o){const s=this._getModel(e);if(!s)return null;const a=new RegExp(r,o);n.startColumn===n.endColumn&&(n={startLineNumber:n.startLineNumber,startColumn:n.startColumn,endLineNumber:n.endLineNumber,endColumn:n.endColumn+1});const l=s.getValueInRange(n),c=s.getWordAtPosition({lineNumber:n.startLineNumber,column:n.startColumn},a);if(!c)return null;const u=s.getValueInRange(c);return $Le.INSTANCE.navigateValueSet(n,l,c,u,i)}loadForeignModule(e,n,i){const s={host:Uci(i,(a,l)=>this._host.fhr(a,l)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(s,n),Promise.resolve(l8e(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,n){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,n))}catch(i){return Promise.reject(i)}}};xT._diffLimit=1e5,xT._suggestionsLimit=1e4;let rre=xT;typeof importScripts=="function"&&(globalThis.monaco=o4t());const q8e=Sr("textResourceConfigurationService"),_3t=Sr("textResourcePropertiesService"),Ln=Sr("ILanguageFeaturesService");var ogi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},UV=function(t,e){return function(n,i){e(n,i,t)}};const Bst=60*1e3,zst=5*60*1e3;function rT(t,e){const n=t.getModel(e);return!(!n||n.isTooLargeForSyncing())}let WLe=class extends ct{constructor(e,n,i,r,o){super(),this._modelService=e,this._workerManager=this._register(new agi(this._modelService,r)),this._logService=i,this._register(o.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(s,a)=>rT(this._modelService,s.uri)?this._workerManager.withWorker().then(l=>l.computeLinks(s.uri)).then(l=>l&&{links:l}):Promise.resolve({links:[]})})),this._register(o.completionProvider.register("*",new sgi(this._workerManager,n,this._modelService,r)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return rT(this._modelService,e)}computedUnicodeHighlights(e,n,i){return this._workerManager.withWorker().then(r=>r.computedUnicodeHighlights(e,n,i))}async computeDiff(e,n,i,r){const o=await this._workerManager.withWorker().then(l=>l.computeDiff(e,n,i,r));if(!o)return null;return{identical:o.identical,quitEarly:o.quitEarly,changes:a(o.changes),moves:o.moves.map(l=>new f3t(new zd(new Ki(l[0],l[1]),new Ki(l[2],l[3])),a(l[4])))};function a(l){return l.map(c=>{var u;return new Ip(new Ki(c[0],c[1]),new Ki(c[2],c[3]),(u=c[4])==null?void 0:u.map(d=>new hp(new ve(d[0],d[1],d[2],d[3]),new ve(d[4],d[5],d[6],d[7]))))})}}computeMoreMinimalEdits(e,n,i=!1){if(md(n)){if(!rT(this._modelService,e))return Promise.resolve(n);const r=cu.create(),o=this._workerManager.withWorker().then(s=>s.computeMoreMinimalEdits(e,n,i));return o.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),r.elapsed())),Promise.race([o,uw(1e3).then(()=>n)])}else return Promise.resolve(void 0)}canNavigateValueSet(e){return rT(this._modelService,e)}navigateValueSet(e,n,i){return this._workerManager.withWorker().then(r=>r.navigateValueSet(e,n,i))}canComputeWordRanges(e){return rT(this._modelService,e)}computeWordRanges(e,n){return this._workerManager.withWorker().then(i=>i.computeWordRanges(e,n))}findSectionHeaders(e,n){return this._workerManager.withWorker().then(i=>i.findSectionHeaders(e,n))}};WLe=ogi([UV(0,Ds),UV(1,q8e),UV(2,Nd),UV(3,bs),UV(4,Ln)],WLe);class sgi{constructor(e,n,i,r){this.languageConfigurationService=r,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=n,this._modelService=i}async provideCompletionItems(e,n){const i=this._configurationService.getValue(e.uri,n,"editor");if(i.wordBasedSuggestions==="off")return;const r=[];if(i.wordBasedSuggestions==="currentDocument")rT(this._modelService,e.uri)&&r.push(e.uri);else for(const d of this._modelService.getModels())rT(this._modelService,d.uri)&&(d===e?r.unshift(d.uri):(i.wordBasedSuggestions==="allDocuments"||d.getLanguageId()===e.getLanguageId())&&r.push(d.uri));if(r.length===0)return;const o=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),s=e.getWordAtPosition(n),a=s?new ve(n.lineNumber,s.startColumn,n.lineNumber,s.endColumn):ve.fromPositions(n),l=a.setEndPosition(n.lineNumber,n.column),u=await(await this._workerManager.withWorker()).textualSuggest(r,s==null?void 0:s.word,o);if(u)return{duration:u.duration,suggestions:u.words.map(d=>({kind:18,label:d,insertText:d,range:{insert:l,replace:a}}))}}}class agi extends ct{constructor(e,n){super(),this.languageConfigurationService=n,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new T8e).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(zst/2),Go),this._register(this._modelService.onModelRemoved(r=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>zst&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new G8e(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class lgi extends ct{constructor(e,n,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=n,!i){const r=new k8e;r.cancelAndSet(()=>this._checkStopModelSync(),Math.round(Bst/2)),this._register(r)}}dispose(){for(const e in this._syncedModels)Jo(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,n){for(const i of e){const r=i.toString();this._syncedModels[r]||this._beginModelSync(i,n),this._syncedModels[r]&&(this._syncedModelsLastUsedTime[r]=new Date().getTime())}}_checkStopModelSync(){const e=new Date().getTime(),n=[];for(const i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>Bst&&n.push(i);for(const i of n)this._stopModelSync(i)}_beginModelSync(e,n){const i=this._modelService.getModel(e);if(!i||!n&&i.isTooLargeForSyncing())return;const r=e.toString();this._proxy.acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const o=new Lt;o.add(i.onDidChangeContent(s=>{this._proxy.acceptModelChanged(r.toString(),s)})),o.add(i.onWillDispose(()=>{this._stopModelSync(r)})),o.add(Kn(()=>{this._proxy.acceptRemovedModel(r)})),this._syncedModels[r]=o}_stopModelSync(e){const n=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],Jo(n)}}class Hst{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class qwe{constructor(e){this._workerClient=e}fhr(e,n){return this._workerClient.fhr(e,n)}}class G8e extends ct{constructor(e,n,i,r){super(),this.languageConfigurationService=r,this._disposed=!1,this._modelService=e,this._keepIdleModels=n,this._workerFactory=new RLe(i),this._worker=null,this._modelManager=null}fhr(e,n){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new lmi(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new qwe(this)))}catch(e){ALe(e),this._worker=new Hst(new rre(new qwe(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>(ALe(e),this._worker=new Hst(new rre(new qwe(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new lgi(e,this._modelService,this._keepIdleModels))),this._modelManager}async _withSyncedResources(e,n=!1){return this._disposed?Promise.reject(Jui()):this._getProxy().then(i=>(this._getOrCreateModelManager(i).ensureSyncedResources(e,n),i))}computedUnicodeHighlights(e,n,i){return this._withSyncedResources([e]).then(r=>r.computeUnicodeHighlights(e.toString(),n,i))}computeDiff(e,n,i,r){return this._withSyncedResources([e,n],!0).then(o=>o.computeDiff(e.toString(),n.toString(),i,r))}computeMoreMinimalEdits(e,n,i){return this._withSyncedResources([e]).then(r=>r.computeMoreMinimalEdits(e.toString(),n,i))}computeLinks(e){return this._withSyncedResources([e]).then(n=>n.computeLinks(e.toString()))}computeDefaultDocumentColors(e){return this._withSyncedResources([e]).then(n=>n.computeDefaultDocumentColors(e.toString()))}async textualSuggest(e,n,i){const r=await this._withSyncedResources(e),o=i.source,s=i.flags;return r.textualSuggest(e.map(a=>a.toString()),n,o,s)}computeWordRanges(e,n){return this._withSyncedResources([e]).then(i=>{const r=this._modelService.getModel(e);if(!r)return Promise.resolve(null);const o=this.languageConfigurationService.getLanguageConfiguration(r.getLanguageId()).getWordDefinition(),s=o.source,a=o.flags;return i.computeWordRanges(e.toString(),n,s,a)})}navigateValueSet(e,n,i){return this._withSyncedResources([e]).then(r=>{const o=this._modelService.getModel(e);if(!o)return null;const s=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId()).getWordDefinition(),a=s.source,l=s.flags;return r.navigateValueSet(e.toString(),n,i,a,l)})}findSectionHeaders(e,n){return this._withSyncedResources([e]).then(i=>i.findSectionHeaders(e.toString(),n))}dispose(){super.dispose(),this._disposed=!0}}function cgi(t,e,n){return new ugi(t,e,n)}class ugi extends G8e{constructor(e,n,i){super(e,i.keepIdleModels||!1,i.label,n),this._foreignModuleId=i.moduleId,this._foreignModuleCreateData=i.createData||null,this._foreignModuleHost=i.host||null,this._foreignProxy=null}fhr(e,n){if(!this._foreignModuleHost||typeof this._foreignModuleHost[e]!="function")return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,n))}catch(i){return Promise.reject(i)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{const n=this._foreignModuleHost?l8e(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,n).then(i=>{this._foreignModuleCreateData=null;const r=(a,l)=>e.fmr(a,l),o=(a,l)=>function(){const c=Array.prototype.slice.call(arguments,0);return l(a,c)},s={};for(const a of i)s[a]=o(a,r);return s})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(n=>this.getProxy())}}const xq={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"},s5=new class{clone(){return this}equals(t){return this===t}};function Y8e(t,e){return new v8e([new vH(0,"",t)],e)}function Gfe(t,e){const n=new Uint32Array(2);return n[0]=0,n[1]=(t<<0|0|0|32768|2<<24)>>>0,new Mfe(n,e===null?s5:e)}class mf{static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static getClassNameFromMetadata(e){let i="mtk"+this.getForeground(e);const r=this.getFontStyle(e);return r&1&&(i+=" mtki"),r&2&&(i+=" mtkb"),r&4&&(i+=" mtku"),r&8&&(i+=" mtks"),i}static getInlineStyleFromMetadata(e,n){const i=this.getForeground(e),r=this.getFontStyle(e);let o=`color: ${n[i]};`;r&1&&(o+="font-style: italic;"),r&2&&(o+="font-weight: bold;");let s="";return r&4&&(s+=" underline"),r&8&&(s+=" line-through"),s&&(o+=`text-decoration:${s};`),o}static getPresentationFromMetadata(e){const n=this.getForeground(e),i=this.getFontStyle(e);return{foreground:n,italic:!!(i&1),bold:!!(i&2),underline:!!(i&4),strikethrough:!!(i&8)}}}const V1=class V1{static createEmpty(e,n){const i=V1.defaultTokenMetadata,r=new Uint32Array(2);return r[0]=e.length,r[1]=i,new V1(r,e,n)}static createFromTextAndMetadata(e,n){let i=0,r="";const o=new Array;for(const{text:s,metadata:a}of e)o.push(i+s.length,a),i+=s.length,r+=s;return new V1(new Uint32Array(o),r,n)}constructor(e,n,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=n,this.languageIdCodec=i}equals(e){return e instanceof V1?this.slicedEquals(e,0,this._tokensCount):!1}slicedEquals(e,n,i){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;const r=n<<1,o=r+(i<<1);for(let s=r;s<o;s++)if(this._tokens[s]!==e._tokens[s])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(e){return e>0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){const n=this._tokens[(e<<1)+1],i=mf.getLanguageId(n);return this.languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const n=this._tokens[(e<<1)+1];return mf.getTokenType(n)}getForeground(e){const n=this._tokens[(e<<1)+1];return mf.getForeground(n)}getClassName(e){const n=this._tokens[(e<<1)+1];return mf.getClassNameFromMetadata(n)}getInlineStyle(e,n){const i=this._tokens[(e<<1)+1];return mf.getInlineStyleFromMetadata(i,n)}getPresentation(e){const n=this._tokens[(e<<1)+1];return mf.getPresentationFromMetadata(n)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return V1.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,n,i){return new X8e(this,e,n,i)}static convertToEndOffset(e,n){const r=(e.length>>>1)-1;for(let o=0;o<r;o++)e[o<<1]=e[o+1<<1];e[r<<1]=n}static findIndexInTokensArray(e,n){if(e.length<=2)return 0;let i=0,r=(e.length>>>1)-1;for(;i<r;){const o=i+Math.floor((r-i)/2),s=e[o<<1];if(s===n)return o+1;s<n?i=o+1:s>n&&(r=o)}return i}withInserted(e){if(e.length===0)return this;let n=0,i=0,r="";const o=new Array;let s=0;for(;;){const a=n<this._tokensCount?this._tokens[n<<1]:-1,l=i<e.length?e[i]:null;if(a!==-1&&(l===null||a<=l.offset)){r+=this._text.substring(s,a);const c=this._tokens[(n<<1)+1];o.push(r.length,c),n++,s=a}else if(l){if(l.offset>s){r+=this._text.substring(s,l.offset);const c=this._tokens[(n<<1)+1];o.push(r.length,c),s=l.offset}r+=l.text,o.push(r.length,l.tokenMetadata),i++}else break}return new V1(new Uint32Array(o),r,this.languageIdCodec)}getTokenText(e){const n=this.getStartOffset(e),i=this.getEndOffset(e);return this._text.substring(n,i)}forEach(e){const n=this.getCount();for(let i=0;i<n;i++)e(i)}};V1.defaultTokenMetadata=(32768|2<<24)>>>0;let $u=V1;class X8e{constructor(e,n,i,r){this._source=e,this._startOffset=n,this._endOffset=i,this._deltaOffset=r,this._firstTokenIndex=e.findTokenIndexAtOffset(n),this.languageIdCodec=e.languageIdCodec,this._tokensCount=0;for(let o=this._firstTokenIndex,s=e.getCount();o<s&&!(e.getStartOffset(o)>=i);o++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof X8e?this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getStandardTokenType(e){return this._source.getStandardTokenType(this._firstTokenIndex+e)}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const n=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,n)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,n){return this._source.getInlineStyle(this._firstTokenIndex+e,n)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(e){const n=this._firstTokenIndex+e,i=this._source.getStartOffset(n),r=this._source.getEndOffset(n);let o=this._source.getTokenText(n);return i<this._startOffset&&(o=o.substring(this._startOffset-i)),r>this._endOffset&&(o=o.substring(0,o.length-(r-this._endOffset))),o}forEach(e){for(let n=0;n<this.getCount();n++)e(n)}}function dgi(t,e){const n=e.lineNumber;if(!t.tokenization.isCheapToTokenize(n))return;t.tokenization.forceTokenization(n);const i=t.tokenization.getLineTokens(n),r=i.findTokenIndexAtOffset(e.column-1);return i.getStandardTokenType(r)}class Sh{constructor(e,n,i,r){this.startColumn=e,this.endColumn=n,this.className=i,this.type=r,this._lineDecorationBrand=void 0}static _equals(e,n){return e.startColumn===n.startColumn&&e.endColumn===n.endColumn&&e.className===n.className&&e.type===n.type}static equalsArr(e,n){const i=e.length,r=n.length;if(i!==r)return!1;for(let o=0;o<i;o++)if(!Sh._equals(e[o],n[o]))return!1;return!0}static extractWrapped(e,n,i){if(e.length===0)return e;const r=n+1,o=i+1,s=i-n,a=[];let l=0;for(const c of e)c.endColumn<=r||c.startColumn>=o||(a[l++]=new Sh(Math.max(1,c.startColumn-r+1),Math.min(s+1,c.endColumn-r+1),c.className,c.type));return a}static filter(e,n,i,r){if(e.length===0)return[];const o=[];let s=0;for(let a=0,l=e.length;a<l;a++){const c=e[a],u=c.range;if(u.endLineNumber<n||u.startLineNumber>n||u.isEmpty()&&(c.type===0||c.type===3))continue;const d=u.startLineNumber===n?u.startColumn:i,h=u.endLineNumber===n?u.endColumn:r;o[s++]=new Sh(d,h,c.inlineClassName,c.type)}return o}static _typeCompare(e,n){const i=[2,0,1,3];return i[e]-i[n]}static compare(e,n){if(e.startColumn!==n.startColumn)return e.startColumn-n.startColumn;if(e.endColumn!==n.endColumn)return e.endColumn-n.endColumn;const i=Sh._typeCompare(e.type,n.type);return i!==0?i:e.className!==n.className?e.className<n.className?-1:1:0}}class Wst{constructor(e,n,i,r){this.startOffset=e,this.endOffset=n,this.className=i,this.metadata=r}}let hgi=class ULe{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let n=0;for(let i=0,r=e.length;i<r;i++)n|=e[i];return n}consumeLowerThan(e,n,i){for(;this.count>0&&this.stopOffsets[0]<e;){let r=0;for(;r+1<this.count&&this.stopOffsets[r]===this.stopOffsets[r+1];)r++;i.push(new Wst(n,this.stopOffsets[r],this.classNames.join(" "),ULe._metadata(this.metadata))),n=this.stopOffsets[r]+1,this.stopOffsets.splice(0,r+1),this.classNames.splice(0,r+1),this.metadata.splice(0,r+1),this.count-=r+1}return this.count>0&&n<e&&(i.push(new Wst(n,e-1,this.classNames.join(" "),ULe._metadata(this.metadata))),n=e),n}insert(e,n,i){if(this.count===0||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(n),this.metadata.push(i);else for(let r=0;r<this.count;r++)if(this.stopOffsets[r]>=e){this.stopOffsets.splice(r,0,e),this.classNames.splice(r,0,n),this.metadata.splice(r,0,i);break}this.count++}};class fgi{static normalize(e,n){if(n.length===0)return[];const i=[],r=new hgi;let o=0;for(let s=0,a=n.length;s<a;s++){const l=n[s];let c=l.startColumn,u=l.endColumn;const d=l.className,h=l.type===1?2:l.type===2?4:0;if(c>1){const p=e.charCodeAt(c-2);sc(p)&&c--}if(u>1){const p=e.charCodeAt(u-2);sc(p)&&u--}const f=c-1,m=u-2;o=r.consumeLowerThan(f,o,i),r.count===0&&(o=f),r.insert(m,d,h)}return r.consumeLowerThan(1073741824,o,i),i}}class Lc{constructor(e,n,i,r){this.endIndex=e,this.type=n,this.metadata=i,this.containsRTL=r,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}class x3t{constructor(e,n){this.startOffset=e,this.endOffset=n}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class nM{constructor(e,n,i,r,o,s,a,l,c,u,d,h,f,m,p,g,y,_,w){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=n,this.lineContent=i,this.continuesWithWrappedLine=r,this.isBasicASCII=o,this.containsRTL=s,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=c.sort(Sh.compare),this.tabSize=u,this.startVisibleColumn=d,this.spaceWidth=h,this.stopRenderingLineAfter=p,this.renderWhitespace=g==="all"?4:g==="boundary"?1:g==="selection"?2:g==="trailing"?3:0,this.renderControlCharacters=y,this.fontLigatures=_,this.selectionsOnLine=w&&w.sort((E,D)=>E.startOffset<D.startOffset?-1:1);const C=Math.abs(m-h),N=Math.abs(f-h);C<N?(this.renderSpaceWidth=m,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=f,this.renderSpaceCharCode=183)}sameSelection(e){if(this.selectionsOnLine===null)return e===null;if(e===null||e.length!==this.selectionsOnLine.length)return!1;for(let n=0;n<this.selectionsOnLine.length;n++)if(!this.selectionsOnLine[n].equals(e[n]))return!1;return!0}equals(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.startVisibleColumn===e.startVisibleColumn&&this.spaceWidth===e.spaceWidth&&this.renderSpaceWidth===e.renderSpaceWidth&&this.renderSpaceCharCode===e.renderSpaceCharCode&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&Sh.equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens)&&this.sameSelection(e.selectionsOnLine)}}class w3t{constructor(e,n){this.partIndex=e,this.charIndex=n}}class bx{static getPartIndex(e){return(e&4294901760)>>>16}static getCharIndex(e){return(e&65535)>>>0}constructor(e,n){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,n,i,r){const o=(n<<16|i<<0)>>>0;this._data[e-1]=o,this._horizontalOffset[e-1]=r}getHorizontalOffset(e){return this._horizontalOffset.length===0?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return this.length===0?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const n=this.charOffsetToPartData(e-1),i=bx.getPartIndex(n),r=bx.getCharIndex(n);return new w3t(i,r)}getColumn(e,n){return this.partDataToCharOffset(e.partIndex,n,e.charIndex)+1}partDataToCharOffset(e,n,i){if(this.length===0)return 0;const r=(e<<16|i<<0)>>>0;let o=0,s=this.length-1;for(;o+1<s;){const p=o+s>>>1,g=this._data[p];if(g===r)return p;g>r?s=p:o=p}if(o===s)return o;const a=this._data[o],l=this._data[s];if(a===r)return o;if(l===r)return s;const c=bx.getPartIndex(a),u=bx.getCharIndex(a),d=bx.getPartIndex(l);let h;c!==d?h=n:h=bx.getCharIndex(l);const f=i-u,m=h-i;return f<=m?o:s}}class KLe{constructor(e,n,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=n,this.containsForeignElements=i}}function wq(t,e){if(t.lineContent.length===0){if(t.lineDecorations.length>0){e.appendString("<span>");let n=0,i=0,r=0;for(const s of t.lineDecorations)(s.type===1||s.type===2)&&(e.appendString('<span class="'),e.appendString(s.className),e.appendString('"></span>'),s.type===1&&(r|=1,n++),s.type===2&&(r|=2,i++));e.appendString("</span>");const o=new bx(1,n+i);return o.setColumnInfo(1,n,0,0),new KLe(o,!1,r)}return e.appendString("<span><span></span></span>"),new KLe(new bx(0,0),!1,0)}return wgi(ggi(t),e)}class mgi{constructor(e,n,i,r){this.characterMapping=e,this.html=n,this.containsRTL=i,this.containsForeignElements=r}}function Yfe(t){const e=new I6(1e4),n=wq(t,e);return new mgi(n.characterMapping,e.build(),n.containsRTL,n.containsForeignElements)}class pgi{constructor(e,n,i,r,o,s,a,l,c,u,d,h,f,m,p,g){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=n,this.lineContent=i,this.len=r,this.isOverflowing=o,this.overflowingCharCount=s,this.parts=a,this.containsForeignElements=l,this.fauxIndentLength=c,this.tabSize=u,this.startVisibleColumn=d,this.containsRTL=h,this.spaceWidth=f,this.renderSpaceCharCode=m,this.renderWhitespace=p,this.renderControlCharacters=g}}function ggi(t){const e=t.lineContent;let n,i,r;t.stopRenderingLineAfter!==-1&&t.stopRenderingLineAfter<e.length?(n=!0,i=e.length-t.stopRenderingLineAfter,r=t.stopRenderingLineAfter):(n=!1,i=0,r=e.length);let o=bgi(e,t.containsRTL,t.lineTokens,t.fauxIndentLength,r);t.renderControlCharacters&&!t.isBasicASCII&&(o=ygi(e,o)),(t.renderWhitespace===4||t.renderWhitespace===1||t.renderWhitespace===2&&t.selectionsOnLine||t.renderWhitespace===3&&!t.continuesWithWrappedLine)&&(o=_gi(t,e,r,o));let s=0;if(t.lineDecorations.length>0){for(let a=0,l=t.lineDecorations.length;a<l;a++){const c=t.lineDecorations[a];c.type===3||c.type===1?s|=1:c.type===2&&(s|=2)}o=xgi(e,r,o,t.lineDecorations)}return t.containsRTL||(o=vgi(e,o,!t.isBasicASCII||t.fontLigatures)),new pgi(t.useMonospaceOptimizations,t.canUseHalfwidthRightwardsArrow,e,r,n,i,o,s,t.fauxIndentLength,t.tabSize,t.startVisibleColumn,t.containsRTL,t.spaceWidth,t.renderSpaceCharCode,t.renderWhitespace,t.renderControlCharacters)}function bgi(t,e,n,i,r){const o=[];let s=0;i>0&&(o[s++]=new Lc(i,"",0,!1));let a=i;for(let l=0,c=n.getCount();l<c;l++){const u=n.getEndOffset(l);if(u<=i)continue;const d=n.getClassName(l);if(u>=r){const f=e?n5(t.substring(a,r)):!1;o[s++]=new Lc(r,d,0,f);break}const h=e?n5(t.substring(a,u)):!1;o[s++]=new Lc(u,d,0,h),a=u}return o}function vgi(t,e,n){let i=0;const r=[];let o=0;if(n)for(let s=0,a=e.length;s<a;s++){const l=e[s],c=l.endIndex;if(i+50<c){const u=l.type,d=l.metadata,h=l.containsRTL;let f=-1,m=i;for(let p=i;p<c;p++)t.charCodeAt(p)===32&&(f=p),f!==-1&&p-m>=50&&(r[o++]=new Lc(f+1,u,d,h),m=f+1,f=-1);m!==c&&(r[o++]=new Lc(c,u,d,h))}else r[o++]=l;i=c}else for(let s=0,a=e.length;s<a;s++){const l=e[s],c=l.endIndex,u=c-i;if(u>50){const d=l.type,h=l.metadata,f=l.containsRTL,m=Math.ceil(u/50);for(let p=1;p<m;p++){const g=i+p*50;r[o++]=new Lc(g,d,h,f)}r[o++]=new Lc(c,d,h,f)}else r[o++]=l;i=c}return r}function C3t(t){return t<32?t!==9:t===127||t>=8234&&t<=8238||t>=8294&&t<=8297||t>=8206&&t<=8207||t===1564}function ygi(t,e){const n=[];let i=new Lc(0,"",0,!1),r=0;for(const o of e){const s=o.endIndex;for(;r<s;r++){const a=t.charCodeAt(r);C3t(a)&&(r>i.endIndex&&(i=new Lc(r,o.type,o.metadata,o.containsRTL),n.push(i)),i=new Lc(r+1,"mtkcontrol",o.metadata,!1),n.push(i))}r>i.endIndex&&(i=new Lc(s,o.type,o.metadata,o.containsRTL),n.push(i))}return n}function _gi(t,e,n,i){const r=t.continuesWithWrappedLine,o=t.fauxIndentLength,s=t.tabSize,a=t.startVisibleColumn,l=t.useMonospaceOptimizations,c=t.selectionsOnLine,u=t.renderWhitespace===1,d=t.renderWhitespace===3,h=t.renderSpaceWidth!==t.spaceWidth,f=[];let m=0,p=0,g=i[p].type,y=i[p].containsRTL,_=i[p].endIndex;const w=i.length;let C=!1,N=qd(e),E;N===-1?(C=!0,N=n,E=n):E=w0(e);let D=!1,k=0,M=c&&c[k],T=a%s;for(let R=o;R<n;R++){const P=e.charCodeAt(R);M&&R>=M.endOffset&&(k++,M=c&&c[k]);let O;if(R<N||R>E)O=!0;else if(P===9)O=!0;else if(P===32)if(u)if(D)O=!0;else{const V=R+1<n?e.charCodeAt(R+1):0;O=V===32||V===9}else O=!0;else O=!1;if(O&&c&&(O=!!M&&M.startOffset<=R&&M.endOffset>R),O&&d&&(O=C||R>E),O&&y&&R>=N&&R<=E&&(O=!1),D){if(!O||!l&&T>=s){if(h){const V=m>0?f[m-1].endIndex:o;for(let F=V+1;F<=R;F++)f[m++]=new Lc(F,"mtkw",1,!1)}else f[m++]=new Lc(R,"mtkw",1,!1);T=T%s}}else(R===_||O&&R>o)&&(f[m++]=new Lc(R,g,0,y),T=T%s);for(P===9?T=s:uk(P)?T+=2:T++,D=O;R===_&&(p++,p<w);)g=i[p].type,y=i[p].containsRTL,_=i[p].endIndex}let A=!1;if(D)if(r&&u){const R=n>0?e.charCodeAt(n-1):0,P=n>1?e.charCodeAt(n-2):0;R===32&&P!==32&&P!==9||(A=!0)}else A=!0;if(A)if(h){const R=m>0?f[m-1].endIndex:o;for(let P=R+1;P<=n;P++)f[m++]=new Lc(P,"mtkw",1,!1)}else f[m++]=new Lc(n,"mtkw",1,!1);else f[m++]=new Lc(n,g,0,y);return f}function xgi(t,e,n,i){i.sort(Sh.compare);const r=fgi.normalize(t,i),o=r.length;let s=0;const a=[];let l=0,c=0;for(let d=0,h=n.length;d<h;d++){const f=n[d],m=f.endIndex,p=f.type,g=f.metadata,y=f.containsRTL;for(;s<o&&r[s].startOffset<m;){const _=r[s];if(_.startOffset>c&&(c=_.startOffset,a[l++]=new Lc(c,p,g,y)),_.endOffset+1<=m)c=_.endOffset+1,a[l++]=new Lc(c,p+" "+_.className,g|_.metadata,y),s++;else{c=m,a[l++]=new Lc(c,p+" "+_.className,g|_.metadata,y);break}}m>c&&(c=m,a[l++]=new Lc(c,p,g,y))}const u=n[n.length-1].endIndex;if(s<o&&r[s].startOffset===u)for(;s<o&&r[s].startOffset===u;){const d=r[s];a[l++]=new Lc(c,d.className,d.metadata,!1),s++}return a}function wgi(t,e){const n=t.fontIsMonospace,i=t.canUseHalfwidthRightwardsArrow,r=t.containsForeignElements,o=t.lineContent,s=t.len,a=t.isOverflowing,l=t.overflowingCharCount,c=t.parts,u=t.fauxIndentLength,d=t.tabSize,h=t.startVisibleColumn,f=t.containsRTL,m=t.spaceWidth,p=t.renderSpaceCharCode,g=t.renderWhitespace,y=t.renderControlCharacters,_=new bx(s+1,c.length);let w=!1,C=0,N=h,E=0,D=0,k=0;f?e.appendString('<span dir="ltr">'):e.appendString("<span>");for(let M=0,T=c.length;M<T;M++){const A=c[M],R=A.endIndex,P=A.type,O=A.containsRTL,V=g!==0&&A.isWhitespace(),F=V&&!n&&(P==="mtkw"||!r),$=C===R&&A.isPseudoAfter();if(E=0,e.appendString("<span "),O&&e.appendString('style="unicode-bidi:isolate" '),e.appendString('class="'),e.appendString(F?"mtkz":P),e.appendASCIICharCode(34),V){let B=0;{let z=C,H=N;for(;z<R;z++){const q=(o.charCodeAt(z)===9?d-H%d:1)|0;B+=q,z>=u&&(H+=q)}}for(F&&(e.appendString(' style="width:'),e.appendString(String(m*B)),e.appendString('px"')),e.appendASCIICharCode(62);C<R;C++){_.setColumnInfo(C+1,M-k,E,D),k=0;const z=o.charCodeAt(C);let H,K;if(z===9){H=d-N%d|0,K=H,!i||K>1?e.appendCharCode(8594):e.appendCharCode(65515);for(let q=2;q<=K;q++)e.appendCharCode(160)}else H=2,K=1,e.appendCharCode(p),e.appendCharCode(8204);E+=H,D+=K,C>=u&&(N+=K)}}else for(e.appendASCIICharCode(62);C<R;C++){_.setColumnInfo(C+1,M-k,E,D),k=0;const B=o.charCodeAt(C);let z=1,H=1;switch(B){case 9:z=d-N%d,H=z;for(let K=1;K<=z;K++)e.appendCharCode(160);break;case 32:e.appendCharCode(160);break;case 60:e.appendString("&lt;");break;case 62:e.appendString("&gt;");break;case 38:e.appendString("&amp;");break;case 0:y?e.appendCharCode(9216):e.appendString("&#00;");break;case 65279:case 8232:case 8233:case 133:e.appendCharCode(65533);break;default:uk(B)&&H++,y&&B<32?e.appendCharCode(9216+B):y&&B===127?e.appendCharCode(9249):y&&C3t(B)?(e.appendString("[U+"),e.appendString(Cgi(B)),e.appendString("]"),z=8,H=z):e.appendCharCode(B)}E+=z,D+=H,C>=u&&(N+=H)}$?k++:k=0,C>=s&&!w&&A.isPseudoAfter()&&(w=!0,_.setColumnInfo(C+1,M,E,D)),e.appendString("</span>")}return w||_.setColumnInfo(s+1,c.length-1,E,D),a&&(e.appendString('<span class="mtkoverflow">'),e.appendString(I("showMore","Show more ({0})",Sgi(l))),e.appendString("</span>")),e.appendString("</span>"),new KLe(_,f,r)}function Cgi(t){return t.toString(16).toUpperCase().padStart(4,"0")}function Sgi(t){return t<1024?I("overflow.chars","{0} chars",t):t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/1024/1024).toFixed(1)} MB`}class Ust{constructor(e,n,i,r){this._viewportBrand=void 0,this.top=e|0,this.left=n|0,this.width=i|0,this.height=r|0}}class Ngi{constructor(e,n){this.tabSize=e,this.data=n}}class Z8e{constructor(e,n,i,r,o,s,a){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=n,this.minColumn=i,this.maxColumn=r,this.startVisibleColumn=o,this.tokens=s,this.inlineDecorations=a}}class Up{constructor(e,n,i,r,o,s,a,l,c,u){this.minColumn=e,this.maxColumn=n,this.content=i,this.continuesWithWrappedLine=r,this.isBasicASCII=Up.isBasicASCII(i,s),this.containsRTL=Up.containsRTL(i,this.isBasicASCII,o),this.tokens=a,this.inlineDecorations=l,this.tabSize=c,this.startVisibleColumn=u}static isBasicASCII(e,n){return n?gq(e):!0}static containsRTL(e,n,i){return!n&&i?n5(e):!1}}class K9{constructor(e,n,i){this.range=e,this.inlineClassName=n,this.type=i}}class Egi{constructor(e,n,i,r){this.startOffset=e,this.endOffset=n,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=r}toInlineDecoration(e){return new K9(new ve(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class S3t{constructor(e,n){this._viewModelDecorationBrand=void 0,this.range=e,this.options=n}}class AH{constructor(e,n,i){this.color=e,this.zIndex=n,this.data=i}static compareByRenderingProps(e,n){return e.zIndex===n.zIndex?e.color<n.color?-1:e.color>n.color?1:0:e.zIndex-n.zIndex}static equals(e,n){return e.color===n.color&&e.zIndex===n.zIndex&&Xs(e.data,n.data)}static equalsArr(e,n){return Xs(e,n,AH.equals)}}function Dgi(t){return Array.isArray(t)}function kgi(t){return!Dgi(t)}function N3t(t){return typeof t=="string"}function Kst(t){return!N3t(t)}function oT(t){return!t}function AC(t,e){return t.ignoreCase&&e?e.toLowerCase():e}function qst(t){return t.replace(/[&<>'"_]/g,"-")}function Mgi(t,e){console.log(`${t.languageId}: ${e}`)}function Rs(t,e){return new Error(`${t.languageId}: ${e}`)}function wE(t,e,n,i,r){const o=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let s=null;return e.replace(o,function(a,l,c,u,d,h,f,m,p){return oT(c)?oT(u)?!oT(d)&&d<i.length?AC(t,i[d]):!oT(f)&&t&&typeof t[f]=="string"?t[f]:(s===null&&(s=r.split("."),s.unshift(r)),!oT(h)&&h<s.length?AC(t,s[h]):""):AC(t,n):"$"})}function Lgi(t,e,n){const i=/\$[sS](\d\d?)/g;let r=null;return e.replace(i,function(o,s){return r===null&&(r=n.split("."),r.unshift(n)),!oT(s)&&s<r.length?AC(t,r[s]):""})}function mQ(t,e){let n=e;for(;n&&n.length>0;){const i=t.tokenizer[n];if(i)return i;const r=n.lastIndexOf(".");r<0?n=null:n=n.substr(0,r)}return null}function Tgi(t,e){let n=e;for(;n&&n.length>0;){if(t.stateNames[n])return!0;const r=n.lastIndexOf(".");r<0?n=null:n=n.substr(0,r)}return!1}var Igi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Agi=function(t,e){return function(n,i){e(n,i,t)}},qLe;const E3t=5,$le=class $le{static create(e,n){return this._INSTANCE.create(e,n)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,n){if(e!==null&&e.depth>=this._maxCacheDepth)return new w3(e,n);let i=w3.getStackElementId(e);i.length>0&&(i+="|"),i+=n;let r=this._entries[i];return r||(r=new w3(e,n),this._entries[i]=r,r)}};$le._INSTANCE=new $le(E3t);let RH=$le;class w3{constructor(e,n){this.parent=e,this.state=n,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let n="";for(;e!==null;)n.length>0&&(n+="|"),n+=e.state,e=e.parent;return n}static _equals(e,n){for(;e!==null&&n!==null;){if(e===n)return!0;if(e.state!==n.state)return!1;e=e.parent,n=n.parent}return e===null&&n===null}equals(e){return w3._equals(this,e)}push(e){return RH.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return RH.create(this.parent,e)}}class d4{constructor(e,n){this.languageId=e,this.state=n}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new d4(this.languageId,this.state)}}const Vle=class Vle{static create(e,n){return this._INSTANCE.create(e,n)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,n){if(n!==null)return new q9(e,n);if(e!==null&&e.depth>=this._maxCacheDepth)return new q9(e,n);const i=w3.getStackElementId(e);let r=this._entries[i];return r||(r=new q9(e,null),this._entries[i]=r,r)}};Vle._INSTANCE=new Vle(E3t);let CE=Vle;class q9{constructor(e,n){this.stack=e,this.embeddedLanguageData=n}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:CE.create(this.stack,this.embeddedLanguageData)}equals(e){return!(e instanceof q9)||!this.stack.equals(e.stack)?!1:this.embeddedLanguageData===null&&e.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||e.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(e.embeddedLanguageData)}}class Rgi{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,n){this._lastTokenType===n&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=n,this._lastTokenLanguage=this._languageId,this._tokens.push(new vH(e,n,this._languageId)))}nestedLanguageTokenize(e,n,i,r){const o=i.languageId,s=i.state,a=Ca.get(o);if(!a)return this.enterLanguage(o),this.emit(r,""),s;const l=a.tokenize(e,n,s);if(r!==0)for(const c of l.tokens)this._tokens.push(new vH(c.offset+r,c.type,c.language));else this._tokens=this._tokens.concat(l.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,l.endState}finalize(e){return new v8e(this._tokens,e)}}class ore{constructor(e,n){this._languageService=e,this._theme=n,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,n){const i=this._theme.match(this._currentLanguageId,n)|1024;this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,n,i){const r=e!==null?e.length:0,o=n.length,s=i!==null?i.length:0;if(r===0&&o===0&&s===0)return new Uint32Array(0);if(r===0&&o===0)return i;if(o===0&&s===0)return e;const a=new Uint32Array(r+o+s);e!==null&&a.set(e);for(let l=0;l<o;l++)a[r+l]=n[l];return i!==null&&a.set(i,r+o),a}nestedLanguageTokenize(e,n,i,r){const o=i.languageId,s=i.state,a=Ca.get(o);if(!a)return this.enterLanguage(o),this.emit(r,""),s;const l=a.tokenizeEncoded(e,n,s);if(r!==0)for(let c=0,u=l.tokens.length;c<u;c+=2)l.tokens[c]+=r;return this._prependTokens=ore._merge(this._prependTokens,this._tokens,l.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,l.endState}finalize(e){return new Mfe(ore._merge(this._prependTokens,this._tokens,null),e)}}let PH=qLe=class extends ct{constructor(e,n,i,r,o){super(),this._configurationService=o,this._languageService=e,this._standaloneThemeService=n,this._languageId=i,this._lexer=r,this._embeddedLanguages=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let s=!1;this._register(Ca.onDidChange(a=>{if(s)return;let l=!1;for(let c=0,u=a.changedLanguages.length;c<u;c++){const d=a.changedLanguages[c];if(this._embeddedLanguages[d]){l=!0;break}}l&&(s=!0,Ca.handleChange([this._languageId]),s=!1)})),this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}),this._register(this._configurationService.onDidChangeConfiguration(a=>{a.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))}))}getLoadStatus(){const e=[];for(const n in this._embeddedLanguages){const i=Ca.get(n);if(i){if(i instanceof qLe){const r=i.getLoadStatus();r.loaded===!1&&e.push(r.promise)}continue}Ca.isResolved(n)||e.push(Ca.getOrCreate(n))}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(n=>{})}}getInitialState(){const e=RH.create(null,this._lexer.start);return CE.create(e,null)}tokenize(e,n,i){if(e.length>=this._maxTokenizationLineLength)return Y8e(this._languageId,i);const r=new Rgi,o=this._tokenize(e,n,i,r);return r.finalize(o)}tokenizeEncoded(e,n,i){if(e.length>=this._maxTokenizationLineLength)return Gfe(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),i);const r=new ore(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),o=this._tokenize(e,n,i,r);return r.finalize(o)}_tokenize(e,n,i,r){return i.embeddedLanguageData?this._nestedTokenize(e,n,i,0,r):this._myTokenize(e,n,i,0,r)}_findLeavingNestedLanguageOffset(e,n){let i=this._lexer.tokenizer[n.stack.state];if(!i&&(i=mQ(this._lexer,n.stack.state),!i))throw Rs(this._lexer,"tokenizer state is not defined: "+n.stack.state);let r=-1,o=!1;for(const s of i){if(!Kst(s.action)||s.action.nextEmbedded!=="@pop")continue;o=!0;let a=s.resolveRegex(n.stack.state);const l=a.source;if(l.substr(0,4)==="^(?:"&&l.substr(l.length-1,1)===")"){const u=(a.ignoreCase?"i":"")+(a.unicode?"u":"");a=new RegExp(l.substr(4,l.length-5),u)}const c=e.search(a);c===-1||c!==0&&s.matchOnlyAtLineStart||(r===-1||c<r)&&(r=c)}if(!o)throw Rs(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+n.stack.state);return r}_nestedTokenize(e,n,i,r,o){const s=this._findLeavingNestedLanguageOffset(e,i);if(s===-1){const c=o.nestedLanguageTokenize(e,n,i.embeddedLanguageData,r);return CE.create(i.stack,new d4(i.embeddedLanguageData.languageId,c))}const a=e.substring(0,s);a.length>0&&o.nestedLanguageTokenize(a,!1,i.embeddedLanguageData,r);const l=e.substring(s);return this._myTokenize(l,n,i,r+s,o)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,n,i,r,o){o.enterLanguage(this._languageId);const s=e.length,a=n&&this._lexer.includeLF?e+`
`:e,l=a.length;let c=i.embeddedLanguageData,u=i.stack,d=0,h=null,f=!0;for(;f||d<l;){const m=d,p=u.depth,g=h?h.groups.length:0,y=u.state;let _=null,w=null,C=null,N=null,E=null;if(h){_=h.matches;const M=h.groups.shift();w=M.matched,C=M.action,N=h.rule,h.groups.length===0&&(h=null)}else{if(!f&&d>=l)break;f=!1;let M=this._lexer.tokenizer[y];if(!M&&(M=mQ(this._lexer,y),!M))throw Rs(this._lexer,"tokenizer state is not defined: "+y);const T=a.substr(d);for(const A of M)if((d===0||!A.matchOnlyAtLineStart)&&(_=T.match(A.resolveRegex(y)),_)){w=_[0],C=A.action;break}}if(_||(_=[""],w=""),C||(d<l&&(_=[a.charAt(d)],w=_[0]),C=this._lexer.defaultToken),w===null)break;for(d+=w.length;kgi(C)&&Kst(C)&&C.test;)C=C.test(w,_,y,d===l);let D=null;if(typeof C=="string"||Array.isArray(C))D=C;else if(C.group)D=C.group;else if(C.token!==null&&C.token!==void 0){if(C.tokenSubst?D=wE(this._lexer,C.token,w,_,y):D=C.token,C.nextEmbedded)if(C.nextEmbedded==="@pop"){if(!c)throw Rs(this._lexer,"cannot pop embedded language if not inside one");c=null}else{if(c)throw Rs(this._lexer,"cannot enter embedded language from within an embedded language");E=wE(this._lexer,C.nextEmbedded,w,_,y)}if(C.goBack&&(d=Math.max(0,d-C.goBack)),C.switchTo&&typeof C.switchTo=="string"){let M=wE(this._lexer,C.switchTo,w,_,y);if(M[0]==="@"&&(M=M.substr(1)),mQ(this._lexer,M))u=u.switchTo(M);else throw Rs(this._lexer,"trying to switch to a state '"+M+"' that is undefined in rule: "+this._safeRuleName(N))}else{if(C.transform&&typeof C.transform=="function")throw Rs(this._lexer,"action.transform not supported");if(C.next)if(C.next==="@push"){if(u.depth>=this._lexer.maxStack)throw Rs(this._lexer,"maximum tokenizer stack size reached: ["+u.state+","+u.parent.state+",...]");u=u.push(y)}else if(C.next==="@pop"){if(u.depth<=1)throw Rs(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(N));u=u.pop()}else if(C.next==="@popall")u=u.popall();else{let M=wE(this._lexer,C.next,w,_,y);if(M[0]==="@"&&(M=M.substr(1)),mQ(this._lexer,M))u=u.push(M);else throw Rs(this._lexer,"trying to set a next state '"+M+"' that is undefined in rule: "+this._safeRuleName(N))}}C.log&&typeof C.log=="string"&&Mgi(this._lexer,this._lexer.languageId+": "+wE(this._lexer,C.log,w,_,y))}if(D===null)throw Rs(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(N));const k=M=>{const T=this._languageService.getLanguageIdByLanguageName(M)||this._languageService.getLanguageIdByMimeType(M)||M,A=this._getNestedEmbeddedLanguageData(T);if(d<l){const R=e.substr(d);return this._nestedTokenize(R,n,CE.create(u,A),r+d,o)}else return CE.create(u,A)};if(Array.isArray(D)){if(h&&h.groups.length>0)throw Rs(this._lexer,"groups cannot be nested: "+this._safeRuleName(N));if(_.length!==D.length+1)throw Rs(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(N));let M=0;for(let T=1;T<_.length;T++)M+=_[T].length;if(M!==w.length)throw Rs(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(N));h={rule:N,matches:_,groups:[]};for(let T=0;T<D.length;T++)h.groups[T]={action:D[T],matched:_[T+1]};d-=w.length;continue}else{if(D==="@rematch"&&(d-=w.length,w="",_=null,D="",E!==null))return k(E);if(w.length===0){if(l===0||p!==u.depth||y!==u.state||(h?h.groups.length:0)!==g)continue;throw Rs(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(N))}let M=null;if(N3t(D)&&D.indexOf("@brackets")===0){const T=D.substr(9),A=Pgi(this._lexer,w);if(!A)throw Rs(this._lexer,"@brackets token returned but no bracket defined as: "+w);M=qst(A.token+T)}else{const T=D===""?"":D+this._lexer.tokenPostfix;M=qst(T)}m<s&&o.emit(m+r,M)}if(E!==null)return k(E)}return CE.create(u,c)}_getNestedEmbeddedLanguageData(e){if(!this._languageService.isRegisteredLanguageId(e))return new d4(e,s5);e!==this._languageId&&(this._languageService.requestBasicLanguageFeatures(e),Ca.getOrCreate(e),this._embeddedLanguages[e]=!0);const n=Ca.get(e);return n?new d4(e,n.getInitialState()):new d4(e,s5)}};PH=qLe=Igi([Agi(4,cr)],PH);function Pgi(t,e){if(!e)return null;e=AC(t,e);const n=t.brackets;for(const i of n){if(i.open===e)return{token:i.token,bracketType:1};if(i.close===e)return{token:i.token,bracketType:-1}}return null}const Gwe=WS("standaloneColorizer",{createHTML:t=>t});class Q8e{static colorizeElement(e,n,i,r){r=r||{};const o=r.theme||"vs",s=r.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!s)return console.error("Mode not detected"),Promise.resolve();const a=n.getLanguageIdByMimeType(s)||s;e.setTheme(o);const l=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+o;const c=u=>{const d=(Gwe==null?void 0:Gwe.createHTML(u))??u;i.innerHTML=d};return this.colorize(n,l||"",a,r).then(c,u=>console.error(u))}static async colorize(e,n,i,r){const o=e.languageIdCodec;let s=4;r&&typeof r.tabSize=="number"&&(s=r.tabSize),N8e(n)&&(n=n.substr(1));const a=Tw(n);if(!e.isRegisteredLanguageId(i))return Gst(a,s,o);const l=await Ca.getOrCreate(i);return l?Ogi(a,s,l,o):Gst(a,s,o)}static colorizeLine(e,n,i,r,o=4){const s=Up.isBasicASCII(e,n),a=Up.containsRTL(e,s,i);return Yfe(new nM(!1,!0,e,!1,s,a,0,r,[],o,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,n,i=4){const r=e.getLineContent(n);e.tokenization.forceTokenization(n);const s=e.tokenization.getLineTokens(n).inflate();return this.colorizeLine(r,e.mightContainNonBasicASCII(),e.mightContainRTL(),s,i)}}function Ogi(t,e,n,i){return new Promise((r,o)=>{const s=()=>{const a=jgi(t,e,n,i);if(n instanceof PH){const l=n.getLoadStatus();if(l.loaded===!1){l.promise.then(s,o);return}}r(a)};s()})}function Gst(t,e,n){let i=[];const o=new Uint32Array(2);o[0]=0,o[1]=33587200;for(let s=0,a=t.length;s<a;s++){const l=t[s];o[0]=l.length;const c=new $u(o,l,n),u=Up.isBasicASCII(l,!0),d=Up.containsRTL(l,u,!0),h=Yfe(new nM(!1,!0,l,!1,u,d,0,c,[],e,0,0,0,0,-1,"none",!1,!1,null));i=i.concat(h.html),i.push("<br/>")}return i.join("")}function jgi(t,e,n,i){let r=[],o=n.getInitialState();for(let s=0,a=t.length;s<a;s++){const l=t[s],c=n.tokenizeEncoded(l,!0,o);$u.convertToEndOffset(c.tokens,l.length);const u=new $u(c.tokens,l,i),d=Up.isBasicASCII(l,!0),h=Up.containsRTL(l,d,!0),f=Yfe(new nM(!1,!0,l,!1,d,h,0,u.inflate(),[],e,0,0,0,0,-1,"none",!1,!1,null));r=r.concat(f.html),r.push("<br/>"),o=c.endState}return r.join("")}const Yst=2e4;let sT,ste,GLe,ate,YLe;function Fgi(t){sT=document.createElement("div"),sT.className="monaco-aria-container";const e=()=>{const i=document.createElement("div");return i.className="monaco-alert",i.setAttribute("role","alert"),i.setAttribute("aria-atomic","true"),sT.appendChild(i),i};ste=e(),GLe=e();const n=()=>{const i=document.createElement("div");return i.className="monaco-status",i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true"),sT.appendChild(i),i};ate=n(),YLe=n(),t.appendChild(sT)}function Am(t){sT&&(ste.textContent!==t?(ru(GLe),sre(ste,t)):(ru(ste),sre(GLe,t)))}function hw(t){sT&&(ate.textContent!==t?(ru(YLe),sre(ate,t)):(ru(ate),sre(YLe,t)))}function sre(t,e){ru(t),e.length>Yst&&(e=e.substr(0,Yst)),t.textContent=e,t.style.visibility="hidden",t.style.visibility="visible"}const J8e=Sr("markerDecorationsService");var $gi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Vgi=function(t,e){return function(n,i){e(n,i,t)}},Q3;let are=(Q3=class{constructor(e,n){}dispose(){}},Q3.ID="editor.contrib.markerDecorations",Q3);are=$gi([Vgi(1,J8e)],are);Wr(are.ID,are,0);class D3t extends ct{constructor(e,n){super(),this._onDidChange=this._register(new st),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,n)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null;const n=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()};let i=!1,r=!1;const o=()=>{if(i&&!r)try{i=!1,r=!0,n()}finally{Im(ei(this._referenceDomElement),()=>{r=!1,o()})}};this._resizeObserver=new ResizeObserver(s=>{s&&s[0]&&s[0].contentRect?e={width:s[0].contentRect.width,height:s[0].contentRect.height}:e=null,i=!0,o()}),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,n){let i=0,r=0;n?(i=n.width,r=n.height):this._referenceDomElement&&(i=this._referenceDomElement.clientWidth,r=this._referenceDomElement.clientHeight),i=Math.max(5,i),r=Math.max(5,r),(this._width!==i||this._height!==r)&&(this._width=i,this._height=r,e&&this._onDidChange.fire())}}const z4=class z4{constructor(e,n){this.key=e,this.migrate=n}apply(e){const n=z4._read(e,this.key),i=o=>z4._read(e,o),r=(o,s)=>z4._write(e,o,s);this.migrate(n,i,r)}static _read(e,n){if(typeof e>"u")return;const i=n.indexOf(".");if(i>=0){const r=n.substring(0,i);return this._read(e[r],n.substring(i+1))}return e[n]}static _write(e,n,i){const r=n.indexOf(".");if(r>=0){const o=n.substring(0,r);e[o]=e[o]||{},this._write(e[o],n.substring(r+1),i);return}e[n]=i}};z4.items=[];let OH=z4;function u_(t,e){OH.items.push(new OH(t,e))}function Vm(t,e){u_(t,(n,i,r)=>{if(typeof n<"u"){for(const[o,s]of e)if(n===o){r(t,s);return}}})}function Bgi(t){OH.items.forEach(e=>e.apply(t))}Vm("wordWrap",[[!0,"on"],[!1,"off"]]);Vm("lineNumbers",[[!0,"on"],[!1,"off"]]);Vm("cursorBlinking",[["visible","solid"]]);Vm("renderWhitespace",[[!0,"boundary"],[!1,"none"]]);Vm("renderLineHighlight",[[!0,"line"],[!1,"none"]]);Vm("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]);Vm("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]);Vm("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);Vm("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);Vm("autoIndent",[[!1,"advanced"],[!0,"full"]]);Vm("matchBrackets",[[!0,"always"],[!1,"never"]]);Vm("renderFinalNewline",[[!0,"on"],[!1,"off"]]);Vm("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]);Vm("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]);Vm("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]);u_("autoClosingBrackets",(t,e,n)=>{t===!1&&(n("autoClosingBrackets","never"),typeof e("autoClosingQuotes")>"u"&&n("autoClosingQuotes","never"),typeof e("autoSurround")>"u"&&n("autoSurround","never"))});u_("renderIndentGuides",(t,e,n)=>{typeof t<"u"&&(n("renderIndentGuides",void 0),typeof e("guides.indentation")>"u"&&n("guides.indentation",!!t))});u_("highlightActiveIndentGuide",(t,e,n)=>{typeof t<"u"&&(n("highlightActiveIndentGuide",void 0),typeof e("guides.highlightActiveIndentation")>"u"&&n("guides.highlightActiveIndentation",!!t))});const zgi={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};u_("suggest.filteredTypes",(t,e,n)=>{if(t&&typeof t=="object"){for(const i of Object.entries(zgi))t[i[0]]===!1&&typeof e(`suggest.${i[1]}`)>"u"&&n(`suggest.${i[1]}`,!1);n("suggest.filteredTypes",void 0)}});u_("quickSuggestions",(t,e,n)=>{if(typeof t=="boolean"){const i=t?"on":"off";n("quickSuggestions",{comments:i,strings:i,other:i})}});u_("experimental.stickyScroll.enabled",(t,e,n)=>{typeof t=="boolean"&&(n("experimental.stickyScroll.enabled",void 0),typeof e("stickyScroll.enabled")>"u"&&n("stickyScroll.enabled",t))});u_("experimental.stickyScroll.maxLineCount",(t,e,n)=>{typeof t=="number"&&(n("experimental.stickyScroll.maxLineCount",void 0),typeof e("stickyScroll.maxLineCount")>"u"&&n("stickyScroll.maxLineCount",t))});u_("codeActionsOnSave",(t,e,n)=>{if(t&&typeof t=="object"){let i=!1;const r={};for(const o of Object.entries(t))typeof o[1]=="boolean"?(i=!0,r[o[0]]=o[1]?"explicit":"never"):r[o[0]]=o[1];i&&n("codeActionsOnSave",r)}});u_("codeActionWidget.includeNearbyQuickfixes",(t,e,n)=>{typeof t=="boolean"&&(n("codeActionWidget.includeNearbyQuickfixes",void 0),typeof e("codeActionWidget.includeNearbyQuickFixes")>"u"&&n("codeActionWidget.includeNearbyQuickFixes",t))});u_("lightbulb.enabled",(t,e,n)=>{typeof t=="boolean"&&n("lightbulb.enabled",t?void 0:"off")});class Hgi{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new st,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}}const a5=new Hgi,Bm=Sr("accessibilityService"),Cq=new gn("accessibilityModeEnabled",!1);var Wgi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Ugi=function(t,e){return function(n,i){e(n,i,t)}};let XLe=class extends ct{constructor(e,n,i,r,o){super(),this._accessibilityService=o,this._onDidChange=this._register(new st),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new st),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new WOt,this.isSimpleWidget=e,this.contextMenuId=n,this._containerObserver=this._register(new D3t(r,i.dimension)),this._targetWindowId=ei(r).vscodeWindowId,this._rawOptions=Xst(i),this._validatedOptions=SE.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(jg.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(a5.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(MLe.onDidChange(()=>this._recomputeOptions())),this._register(EH.getInstance(ei(r)).onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const e=this._computeOptions(),n=SE.checkEquals(this.options,e);n!==null&&(this.options=e,this._onDidChangeFast.fire(n),this._onDidChange.fire(n))}_computeOptions(){const e=this._readEnvConfiguration(),n=sI.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(n),r={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:a5.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return SE.computeOptions(this._validatedOptions,r)}_readEnvConfiguration(){return{extraEditorClassName:qgi(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:oI||sb,pixelRatio:EH.getInstance(Got(this._targetWindowId,!0).window).value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return MLe.readFontInfo(Got(this._targetWindowId,!0).window,e)}getRawOptions(){return this._rawOptions}updateOptions(e){const n=Xst(e);SE.applyUpdate(this._rawOptions,n)&&(this._validatedOptions=SE.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const n=Kgi(e);this._lineNumbersDigitCount!==n&&(this._lineNumbersDigitCount=n,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};XLe=Wgi([Ugi(4,Bm)],XLe);function Kgi(t){let e=0;for(;t;)t=Math.floor(t/10),e++;return e||1}function qgi(){let t="";return!dS&&!g4t&&(t+="no-user-select "),dS&&(t+="no-minimap-shadow ",t+="enable-user-select "),xr&&(t+="mac "),t}class Ggi{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,n){this._values[e]=n}}class Ygi{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,n){this._values[e]=n}}class SE{static validateOptions(e){const n=new Ggi;for(const i of a4){const r=i.name==="_never_"?void 0:e[i.name];n._write(i.id,i.validate(r))}return n}static computeOptions(e,n){const i=new Ygi;for(const r of a4)i._write(r.id,r.compute(n,i,e._read(r.id)));return i}static _deepEquals(e,n){if(typeof e!="object"||typeof n!="object"||!e||!n)return e===n;if(Array.isArray(e)||Array.isArray(n))return Array.isArray(e)&&Array.isArray(n)?Xs(e,n):!1;if(Object.keys(e).length!==Object.keys(n).length)return!1;for(const i in e)if(!SE._deepEquals(e[i],n[i]))return!1;return!0}static checkEquals(e,n){const i=[];let r=!1;for(const o of a4){const s=!SE._deepEquals(e._read(o.id),n._read(o.id));i[o.id]=s,s&&(r=!0)}return r?new HOt(i):null}static applyUpdate(e,n){let i=!1;for(const r of a4)if(n.hasOwnProperty(r.name)){const o=r.applyUpdate(e[r.name],n[r.name]);e[r.name]=o.newValue,i=i||o.didChange}return i}}function Xst(t){const e=W1(t);return Bgi(e),e}var zE;(function(t){const e={total:0,min:Number.MAX_VALUE,max:0},n={...e},i={...e},r={...e};let o=0;const s={keydown:0,input:0,render:0};function a(){y(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),s.keydown=1,queueMicrotask(l)}t.onKeyDown=a;function l(){s.keydown===1&&(performance.mark("keydown/end"),s.keydown=2)}function c(){performance.mark("input/start"),s.input=1,g()}t.onBeforeInput=c;function u(){s.input===0&&c(),queueMicrotask(d)}t.onInput=u;function d(){s.input===1&&(performance.mark("input/end"),s.input=2)}function h(){y()}t.onKeyUp=h;function f(){y()}t.onSelectionChange=f;function m(){s.keydown===2&&s.input===2&&s.render===0&&(performance.mark("render/start"),s.render=1,queueMicrotask(p),g())}t.onRenderStart=m;function p(){s.render===1&&(performance.mark("render/end"),s.render=2)}function g(){setTimeout(y)}function y(){s.keydown===2&&s.input===2&&s.render===2&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),_("keydown",e),_("input",n),_("render",i),_("inputlatency",r),o++,w())}function _(D,k){const M=performance.getEntriesByName(D)[0].duration;k.total+=M,k.min=Math.min(k.min,M),k.max=Math.max(k.max,M)}function w(){performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),s.keydown=0,s.input=0,s.render=0}function C(){if(o===0)return;const D={keydown:N(e),input:N(n),render:N(i),total:N(r),sampleCount:o};return E(e),E(n),E(i),E(r),o=0,D}t.getAndClearMeasurements=C;function N(D){return{average:D.total/o,max:D.max,min:D.min}}function E(D){D.total=0,D.min=Number.MAX_VALUE,D.max=0}})(zE||(zE={}));class R6{constructor(){this._hooks=new Lt,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,n){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(n)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,n,i,r,o){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=r,this._onStopCallback=o;let s=e;try{e.setPointerCapture(n),this._hooks.add(Kn(()=>{try{e.releasePointerCapture(n)}catch{}}))}catch{s=ei(e)}this._hooks.add(yt(s,Yt.POINTER_MOVE,a=>{if(a.buttons!==i){this.stopMonitoring(!0);return}a.preventDefault(),this._pointerMoveCallback(a)})),this._hooks.add(yt(s,Yt.POINTER_UP,a=>this.stopMonitoring(!0)))}}function eVe(t){return`--vscode-${t.replace(/\./g,"-")}`}function Cn(t){return`var(${eVe(t)})`}function Xgi(t,e){return`var(${eVe(t)}, ${e})`}function Zgi(t){return t!==null&&typeof t=="object"&&"light"in t&&"dark"in t}const k3t={ColorContribution:"base.contributions.colors"},Qgi="default";class Jgi{constructor(){this._onDidChangeSchema=new st,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,n,i,r=!1,o){const s={id:e,description:i,defaults:n,needsTransparency:r,deprecationMessage:o};this.colorsById[e]=s;const a={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(a.deprecationMessage=o),r&&(a.pattern="^#(?:(?<rgba>[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",a.patternErrorMessage=I("transparecyRequired","This color must be transparent or it will obscure content")),this.colorSchema.properties[e]={oneOf:[a,{type:"string",const:Qgi,description:I("useDefault","Use the default color.")}]},this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map(e=>this.colorsById[e])}resolveDefaultColor(e,n){const i=this.colorsById[e];if(i!=null&&i.defaults){const r=Zgi(i.defaults)?i.defaults[n.type]:i.defaults;return Sy(r,n)}}getColorSchema(){return this.colorSchema}toString(){const e=(n,i)=>{const r=n.indexOf(".")===-1?0:1,o=i.indexOf(".")===-1?0:1;return r!==o?r-o:n.localeCompare(i)};return Object.keys(this.colorsById).sort(e).map(n=>`- \`${n}\`: ${this.colorsById[n].description}`).join(`
`)}}const Xfe=new Jgi;la.add(k3t.ColorContribution,Xfe);function Fe(t,e,n,i,r){return Xfe.registerColor(t,e,n,i,r)}function ebi(t,e){var n,i,r,o;switch(t.op){case 0:return(n=Sy(t.value,e))==null?void 0:n.darken(t.factor);case 1:return(i=Sy(t.value,e))==null?void 0:i.lighten(t.factor);case 2:return(r=Sy(t.value,e))==null?void 0:r.transparent(t.factor);case 3:{const s=Sy(t.background,e);return s?(o=Sy(t.value,e))==null?void 0:o.makeOpaque(s):Sy(t.value,e)}case 4:for(const s of t.values){const a=Sy(s,e);if(a)return a}return;case 6:return Sy(e.defines(t.if)?t.then:t.else,e);case 5:{const s=Sy(t.value,e);if(!s)return;const a=Sy(t.background,e);return a?s.isDarkerThan(a)?Rt.getLighterColor(s,a,t.factor).transparent(t.transparency):Rt.getDarkerColor(s,a,t.factor).transparent(t.transparency):s.transparent(t.factor*t.transparency)}default:throw Hfe()}}function JA(t,e){return{op:0,value:t,factor:e}}function C0(t,e){return{op:1,value:t,factor:e}}function rr(t,e){return{op:2,value:t,factor:e}}function jH(...t){return{op:4,values:t}}function tbi(t,e,n){return{op:6,if:t,then:e,else:n}}function Zst(t,e,n,i){return{op:5,value:t,background:e,factor:n,transparency:i}}function Sy(t,e){if(t!==null){if(typeof t=="string")return t[0]==="#"?Rt.fromHex(t):e.getColor(t);if(t instanceof Rt)return t;if(typeof t=="object")return ebi(t,e)}}const M3t="vscode://schemas/workbench-colors",L3t=la.as(qfe.JSONContribution);L3t.registerSchema(M3t,Xfe.getColorSchema());const Qst=new Wo(()=>L3t.notifySchemaChanged(M3t),200);Xfe.onDidChangeSchema(()=>{Qst.isScheduled()||Qst.schedule()});const hr=Fe("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},I("foreground","Overall foreground color. This color is only used if not overridden by a component."));Fe("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},I("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component."));Fe("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},I("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component."));Fe("descriptionForeground",{light:"#717171",dark:rr(hr,.7),hcDark:rr(hr,.7),hcLight:rr(hr,.7)},I("descriptionForeground","Foreground color for description text providing additional information, for example for a label."));const lre=Fe("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},I("iconForeground","The default color for icons in the workbench.")),fw=Fe("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},I("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),$r=Fe("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},I("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),Bs=Fe("contrastActiveBorder",{light:null,dark:null,hcDark:fw,hcLight:fw},I("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast."));Fe("selection.background",null,I("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));const nbi=Fe("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},I("textLinkForeground","Foreground color for links in text."));Fe("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},I("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover."));Fe("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:Rt.black,hcLight:"#292929"},I("textSeparatorForeground","Color for text separators."));Fe("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},I("textPreformatForeground","Foreground color for preformatted text segments."));Fe("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},I("textPreformatBackground","Background color for preformatted text segments."));Fe("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},I("textBlockQuoteBackground","Background color for block quotes in text."));Fe("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:Rt.white,hcLight:"#292929"},I("textBlockQuoteBorder","Border color for block quotes in text."));Fe("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:Rt.black,hcLight:"#F2F2F2"},I("textCodeBlockBackground","Background color for code blocks in text."));Fe("sash.hoverBorder",fw,I("sashActiveBorder","Border color of active sashes."));const lte=Fe("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:Rt.black,hcLight:"#0F4A85"},I("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),ibi=Fe("badge.foreground",{dark:Rt.white,light:"#333",hcDark:Rt.white,hcLight:Rt.white},I("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),tVe=Fe("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},I("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),T3t=Fe("scrollbarSlider.background",{dark:Rt.fromHex("#797979").transparent(.4),light:Rt.fromHex("#646464").transparent(.4),hcDark:rr($r,.6),hcLight:rr($r,.4)},I("scrollbarSliderBackground","Scrollbar slider background color.")),I3t=Fe("scrollbarSlider.hoverBackground",{dark:Rt.fromHex("#646464").transparent(.7),light:Rt.fromHex("#646464").transparent(.7),hcDark:rr($r,.8),hcLight:rr($r,.8)},I("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),A3t=Fe("scrollbarSlider.activeBackground",{dark:Rt.fromHex("#BFBFBF").transparent(.4),light:Rt.fromHex("#000000").transparent(.6),hcDark:$r,hcLight:$r},I("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),rbi=Fe("progressBar.background",{dark:Rt.fromHex("#0E70C0"),light:Rt.fromHex("#0E70C0"),hcDark:$r,hcLight:$r},I("progressBarBackground","Background color of the progress bar that can show for long running operations.")),G0=Fe("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:Rt.black,hcLight:Rt.white},I("editorBackground","Editor background color.")),Rw=Fe("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:Rt.white,hcLight:hr},I("editorForeground","Editor default foreground color."));Fe("editorStickyScroll.background",G0,I("editorStickyScrollBackground","Background color of sticky scroll in the editor"));Fe("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:Rt.fromHex("#0F4A85").transparent(.1)},I("editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor"));Fe("editorStickyScroll.border",{dark:null,light:null,hcDark:$r,hcLight:$r},I("editorStickyScrollBorder","Border color of sticky scroll in the editor"));Fe("editorStickyScroll.shadow",tVe,I("editorStickyScrollShadow"," Shadow color of sticky scroll in the editor"));const Kg=Fe("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:Rt.white},I("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),nVe=Fe("editorWidget.foreground",hr,I("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),iVe=Fe("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:$r,hcLight:$r},I("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget."));Fe("editorWidget.resizeBorder",null,I("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget."));Fe("editorError.background",null,I("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const Zfe=Fe("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},I("editorError.foreground","Foreground color of error squigglies in the editor.")),obi=Fe("editorError.border",{dark:null,light:null,hcDark:Rt.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},I("errorBorder","If set, color of double underlines for errors in the editor.")),sbi=Fe("editorWarning.background",null,I("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),mS=Fe("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},I("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),FH=Fe("editorWarning.border",{dark:null,light:null,hcDark:Rt.fromHex("#FFCC00").transparent(.8),hcLight:Rt.fromHex("#FFCC00").transparent(.8)},I("warningBorder","If set, color of double underlines for warnings in the editor."));Fe("editorInfo.background",null,I("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const mw=Fe("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},I("editorInfo.foreground","Foreground color of info squigglies in the editor.")),$H=Fe("editorInfo.border",{dark:null,light:null,hcDark:Rt.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},I("infoBorder","If set, color of double underlines for infos in the editor.")),abi=Fe("editorHint.foreground",{dark:Rt.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},I("editorHint.foreground","Foreground color of hint squigglies in the editor."));Fe("editorHint.border",{dark:null,light:null,hcDark:Rt.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},I("hintBorder","If set, color of double underlines for hints in the editor."));const lbi=Fe("editorLink.activeForeground",{dark:"#4E94CE",light:Rt.blue,hcDark:Rt.cyan,hcLight:"#292929"},I("activeLinkForeground","Color of active links.")),HE=Fe("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},I("editorSelectionBackground","Color of the editor selection.")),cbi=Fe("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:Rt.white},I("editorSelectionForeground","Color of the selected text for high contrast.")),R3t=Fe("editor.inactiveSelectionBackground",{light:rr(HE,.5),dark:rr(HE,.5),hcDark:rr(HE,.7),hcLight:rr(HE,.5)},I("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),rVe=Fe("editor.selectionHighlightBackground",{light:Zst(HE,G0,.3,.6),dark:Zst(HE,G0,.3,.6),hcDark:null,hcLight:null},I("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0);Fe("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:Bs,hcLight:Bs},I("editorSelectionHighlightBorder","Border color for regions with the same content as the selection."));Fe("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},I("editorFindMatch","Color of the current search match."));const ubi=Fe("editor.findMatchForeground",null,I("editorFindMatchForeground","Text color of the current search match.")),lC=Fe("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},I("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),dbi=Fe("editor.findMatchHighlightForeground",null,I("findMatchHighlightForeground","Foreground color of the other search matches."),!0);Fe("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},I("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0);Fe("editor.findMatchBorder",{light:null,dark:null,hcDark:Bs,hcLight:Bs},I("editorFindMatchBorder","Border color of the current search match."));const WE=Fe("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:Bs,hcLight:Bs},I("findMatchHighlightBorder","Border color of the other search matches.")),hbi=Fe("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:rr(Bs,.4),hcLight:rr(Bs,.4)},I("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0);Fe("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},I("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0);const cre=Fe("editorHoverWidget.background",Kg,I("hoverBackground","Background color of the editor hover."));Fe("editorHoverWidget.foreground",nVe,I("hoverForeground","Foreground color of the editor hover."));const P3t=Fe("editorHoverWidget.border",iVe,I("hoverBorder","Border color of the editor hover."));Fe("editorHoverWidget.statusBarBackground",{dark:C0(cre,.2),light:JA(cre,.05),hcDark:Kg,hcLight:Kg},I("statusBarBackground","Background color of the editor hover status bar."));const oVe=Fe("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:Rt.white,hcLight:Rt.black},I("editorInlayHintForeground","Foreground color of inline hints")),sVe=Fe("editorInlayHint.background",{dark:rr(lte,.1),light:rr(lte,.1),hcDark:rr(Rt.white,.1),hcLight:rr(lte,.1)},I("editorInlayHintBackground","Background color of inline hints")),fbi=Fe("editorInlayHint.typeForeground",oVe,I("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),mbi=Fe("editorInlayHint.typeBackground",sVe,I("editorInlayHintBackgroundTypes","Background color of inline hints for types")),pbi=Fe("editorInlayHint.parameterForeground",oVe,I("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),gbi=Fe("editorInlayHint.parameterBackground",sVe,I("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),bbi=Fe("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},I("editorLightBulbForeground","The color used for the lightbulb actions icon."));Fe("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},I("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon."));Fe("editorLightBulbAi.foreground",bbi,I("editorLightBulbAiForeground","The color used for the lightbulb AI icon."));Fe("editor.snippetTabstopHighlightBackground",{dark:new Rt(new jr(124,124,124,.3)),light:new Rt(new jr(10,50,100,.2)),hcDark:new Rt(new jr(124,124,124,.3)),hcLight:new Rt(new jr(10,50,100,.2))},I("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop."));Fe("editor.snippetTabstopHighlightBorder",null,I("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop."));Fe("editor.snippetFinalTabstopHighlightBackground",null,I("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet."));Fe("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new Rt(new jr(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},I("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet."));const ZLe=new Rt(new jr(155,185,85,.2)),QLe=new Rt(new jr(255,0,0,.2)),vbi=Fe("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},I("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),ybi=Fe("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},I("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0);Fe("diffEditor.insertedLineBackground",{dark:ZLe,light:ZLe,hcDark:null,hcLight:null},I("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0);Fe("diffEditor.removedLineBackground",{dark:QLe,light:QLe,hcDark:null,hcLight:null},I("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0);Fe("diffEditorGutter.insertedLineBackground",null,I("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted."));Fe("diffEditorGutter.removedLineBackground",null,I("diffEditorRemovedLineGutter","Background color for the margin where lines got removed."));const _bi=Fe("diffEditorOverview.insertedForeground",null,I("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),xbi=Fe("diffEditorOverview.removedForeground",null,I("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content."));Fe("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},I("diffEditorInsertedOutline","Outline color for the text that got inserted."));Fe("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},I("diffEditorRemovedOutline","Outline color for text that got removed."));Fe("diffEditor.border",{dark:null,light:null,hcDark:$r,hcLight:$r},I("diffEditorBorder","Border color between the two text editors."));Fe("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},I("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views."));Fe("diffEditor.unchangedRegionBackground","sideBar.background",I("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor."));Fe("diffEditor.unchangedRegionForeground","foreground",I("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor."));Fe("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},I("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor."));const P6=Fe("widget.shadow",{dark:rr(Rt.black,.36),light:rr(Rt.black,.16),hcDark:null,hcLight:null},I("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),O3t=Fe("widget.border",{dark:null,light:null,hcDark:$r,hcLight:$r},I("widgetBorder","Border color of widgets such as find/replace inside the editor.")),Jst=Fe("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},I("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse"));Fe("toolbar.hoverOutline",{dark:null,light:null,hcDark:Bs,hcLight:Bs},I("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse"));Fe("toolbar.activeBackground",{dark:C0(Jst,.1),light:JA(Jst,.1),hcDark:null,hcLight:null},I("toolbarActiveBackground","Toolbar background when holding the mouse over actions"));const wbi=Fe("breadcrumb.foreground",rr(hr,.8),I("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),Cbi=Fe("breadcrumb.background",G0,I("breadcrumbsBackground","Background color of breadcrumb items.")),eat=Fe("breadcrumb.focusForeground",{light:JA(hr,.2),dark:C0(hr,.1),hcDark:C0(hr,.1),hcLight:C0(hr,.1)},I("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),Sbi=Fe("breadcrumb.activeSelectionForeground",{light:JA(hr,.2),dark:C0(hr,.1),hcDark:C0(hr,.1),hcLight:C0(hr,.1)},I("breadcrumbsSelectedForeground","Color of selected breadcrumb items."));Fe("breadcrumbPicker.background",Kg,I("breadcrumbsSelectedBackground","Background color of breadcrumb item picker."));const j3t=.5,tat=Rt.fromHex("#40C8AE").transparent(j3t),nat=Rt.fromHex("#40A6FF").transparent(j3t),iat=Rt.fromHex("#606060").transparent(.4),aVe=.4,l5=1,JLe=Fe("merge.currentHeaderBackground",{dark:tat,light:tat,hcDark:null,hcLight:null},I("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);Fe("merge.currentContentBackground",rr(JLe,aVe),I("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const eTe=Fe("merge.incomingHeaderBackground",{dark:nat,light:nat,hcDark:null,hcLight:null},I("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);Fe("merge.incomingContentBackground",rr(eTe,aVe),I("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const tTe=Fe("merge.commonHeaderBackground",{dark:iat,light:iat,hcDark:null,hcLight:null},I("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);Fe("merge.commonContentBackground",rr(tTe,aVe),I("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const c5=Fe("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},I("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."));Fe("editorOverviewRuler.currentContentForeground",{dark:rr(JLe,l5),light:rr(JLe,l5),hcDark:c5,hcLight:c5},I("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts."));Fe("editorOverviewRuler.incomingContentForeground",{dark:rr(eTe,l5),light:rr(eTe,l5),hcDark:c5,hcLight:c5},I("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts."));Fe("editorOverviewRuler.commonContentForeground",{dark:rr(tTe,l5),light:rr(tTe,l5),hcDark:c5,hcLight:c5},I("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts."));const Ywe=Fe("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},I("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),F3t=Fe("editorOverviewRuler.selectionHighlightForeground","#A0A0A0CC",I("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Nbi=Fe("problemsErrorIcon.foreground",Zfe,I("problemsErrorIconForeground","The color used for the problems error icon.")),Ebi=Fe("problemsWarningIcon.foreground",mS,I("problemsWarningIconForeground","The color used for the problems warning icon.")),Dbi=Fe("problemsInfoIcon.foreground",mw,I("problemsInfoIconForeground","The color used for the problems info icon.")),nTe=Fe("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},I("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),Qfe=Fe("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},I("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),rat=Fe("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},I("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),kbi=Fe("minimap.infoHighlight",{dark:mw,light:mw,hcDark:$H,hcLight:$H},I("minimapInfo","Minimap marker color for infos.")),Mbi=Fe("minimap.warningHighlight",{dark:mS,light:mS,hcDark:FH,hcLight:FH},I("overviewRuleWarning","Minimap marker color for warnings.")),Lbi=Fe("minimap.errorHighlight",{dark:new Rt(new jr(255,18,18,.7)),light:new Rt(new jr(255,18,18,.7)),hcDark:new Rt(new jr(255,50,50,1)),hcLight:"#B5200D"},I("minimapError","Minimap marker color for errors.")),Tbi=Fe("minimap.background",null,I("minimapBackground","Minimap background color.")),Ibi=Fe("minimap.foregroundOpacity",Rt.fromHex("#000f"),I("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.'));Fe("minimapSlider.background",rr(T3t,.5),I("minimapSliderBackground","Minimap slider background color."));Fe("minimapSlider.hoverBackground",rr(I3t,.5),I("minimapSliderHoverBackground","Minimap slider background color when hovering."));Fe("minimapSlider.activeBackground",rr(A3t,.5),I("minimapSliderActiveBackground","Minimap slider background color when clicked on."));Fe("charts.foreground",hr,I("chartsForeground","The foreground color used in charts."));Fe("charts.lines",rr(hr,.5),I("chartsLines","The color used for horizontal lines in charts."));Fe("charts.red",Zfe,I("chartsRed","The red color used in chart visualizations."));Fe("charts.blue",mw,I("chartsBlue","The blue color used in chart visualizations."));Fe("charts.yellow",mS,I("chartsYellow","The yellow color used in chart visualizations."));Fe("charts.orange",nTe,I("chartsOrange","The orange color used in chart visualizations."));Fe("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},I("chartsGreen","The green color used in chart visualizations."));Fe("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},I("chartsPurple","The purple color used in chart visualizations."));const iTe=Fe("input.background",{dark:"#3C3C3C",light:Rt.white,hcDark:Rt.black,hcLight:Rt.white},I("inputBoxBackground","Input box background.")),$3t=Fe("input.foreground",hr,I("inputBoxForeground","Input box foreground.")),V3t=Fe("input.border",{dark:null,light:null,hcDark:$r,hcLight:$r},I("inputBoxBorder","Input box border.")),Jfe=Fe("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:$r,hcLight:$r},I("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),Abi=Fe("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},I("inputOption.hoverBackground","Background color of activated options in input fields.")),Sq=Fe("inputOption.activeBackground",{dark:rr(fw,.4),light:rr(fw,.2),hcDark:Rt.transparent,hcLight:Rt.transparent},I("inputOption.activeBackground","Background hover color of options in input fields.")),eme=Fe("inputOption.activeForeground",{dark:Rt.white,light:Rt.black,hcDark:hr,hcLight:hr},I("inputOption.activeForeground","Foreground color of activated options in input fields."));Fe("input.placeholderForeground",{light:rr(hr,.5),dark:rr(hr,.5),hcDark:rr(hr,.7),hcLight:rr(hr,.7)},I("inputPlaceholderForeground","Input box foreground color for placeholder text."));const Rbi=Fe("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:Rt.black,hcLight:Rt.white},I("inputValidationInfoBackground","Input validation background color for information severity.")),Pbi=Fe("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:hr},I("inputValidationInfoForeground","Input validation foreground color for information severity.")),Obi=Fe("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:$r,hcLight:$r},I("inputValidationInfoBorder","Input validation border color for information severity.")),jbi=Fe("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:Rt.black,hcLight:Rt.white},I("inputValidationWarningBackground","Input validation background color for warning severity.")),Fbi=Fe("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:hr},I("inputValidationWarningForeground","Input validation foreground color for warning severity.")),$bi=Fe("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:$r,hcLight:$r},I("inputValidationWarningBorder","Input validation border color for warning severity.")),Vbi=Fe("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:Rt.black,hcLight:Rt.white},I("inputValidationErrorBackground","Input validation background color for error severity.")),Bbi=Fe("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:hr},I("inputValidationErrorForeground","Input validation foreground color for error severity.")),zbi=Fe("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:$r,hcLight:$r},I("inputValidationErrorBorder","Input validation border color for error severity.")),tme=Fe("dropdown.background",{dark:"#3C3C3C",light:Rt.white,hcDark:Rt.black,hcLight:Rt.white},I("dropdownBackground","Dropdown background.")),Hbi=Fe("dropdown.listBackground",{dark:null,light:null,hcDark:Rt.black,hcLight:Rt.white},I("dropdownListBackground","Dropdown list background.")),lVe=Fe("dropdown.foreground",{dark:"#F0F0F0",light:hr,hcDark:Rt.white,hcLight:hr},I("dropdownForeground","Dropdown foreground.")),cVe=Fe("dropdown.border",{dark:tme,light:"#CECECE",hcDark:$r,hcLight:$r},I("dropdownBorder","Dropdown border.")),B3t=Fe("button.foreground",Rt.white,I("buttonForeground","Button foreground color.")),Wbi=Fe("button.separator",rr(B3t,.4),I("buttonSeparator","Button separator color.")),G7=Fe("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},I("buttonBackground","Button background color.")),Ubi=Fe("button.hoverBackground",{dark:C0(G7,.2),light:JA(G7,.2),hcDark:G7,hcLight:G7},I("buttonHoverBackground","Button background color when hovering.")),Kbi=Fe("button.border",$r,I("buttonBorder","Button border color.")),qbi=Fe("button.secondaryForeground",{dark:Rt.white,light:Rt.white,hcDark:Rt.white,hcLight:hr},I("buttonSecondaryForeground","Secondary button foreground color.")),rTe=Fe("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:Rt.white},I("buttonSecondaryBackground","Secondary button background color.")),Gbi=Fe("button.secondaryHoverBackground",{dark:C0(rTe,.2),light:JA(rTe,.2),hcDark:null,hcLight:null},I("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),Y7=Fe("radio.activeForeground",eme,I("radioActiveForeground","Foreground color of active radio option.")),Ybi=Fe("radio.activeBackground",Sq,I("radioBackground","Background color of active radio option.")),Xbi=Fe("radio.activeBorder",Jfe,I("radioActiveBorder","Border color of the active radio option.")),Zbi=Fe("radio.inactiveForeground",null,I("radioInactiveForeground","Foreground color of inactive radio option.")),Qbi=Fe("radio.inactiveBackground",null,I("radioInactiveBackground","Background color of inactive radio option.")),Jbi=Fe("radio.inactiveBorder",{light:rr(Y7,.2),dark:rr(Y7,.2),hcDark:rr(Y7,.4),hcLight:rr(Y7,.2)},I("radioInactiveBorder","Border color of the inactive radio option.")),evi=Fe("radio.inactiveHoverBackground",Abi,I("radioHoverBackground","Background color of inactive active radio option when hovering.")),tvi=Fe("checkbox.background",tme,I("checkbox.background","Background color of checkbox widget."));Fe("checkbox.selectBackground",Kg,I("checkbox.select.background","Background color of checkbox widget when the element it's in is selected."));const nvi=Fe("checkbox.foreground",lVe,I("checkbox.foreground","Foreground color of checkbox widget.")),ivi=Fe("checkbox.border",cVe,I("checkbox.border","Border color of checkbox widget."));Fe("checkbox.selectBorder",lre,I("checkbox.select.border","Border color of checkbox widget when the element it's in is selected."));const rvi=Fe("keybindingLabel.background",{dark:new Rt(new jr(128,128,128,.17)),light:new Rt(new jr(221,221,221,.4)),hcDark:Rt.transparent,hcLight:Rt.transparent},I("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),ovi=Fe("keybindingLabel.foreground",{dark:Rt.fromHex("#CCCCCC"),light:Rt.fromHex("#555555"),hcDark:Rt.white,hcLight:hr},I("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),svi=Fe("keybindingLabel.border",{dark:new Rt(new jr(51,51,51,.6)),light:new Rt(new jr(204,204,204,.4)),hcDark:new Rt(new jr(111,195,223)),hcLight:$r},I("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),avi=Fe("keybindingLabel.bottomBorder",{dark:new Rt(new jr(68,68,68,.6)),light:new Rt(new jr(187,187,187,.4)),hcDark:new Rt(new jr(111,195,223)),hcLight:hr},I("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),lvi=Fe("list.focusBackground",null,I("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),cvi=Fe("list.focusForeground",null,I("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),uvi=Fe("list.focusOutline",{dark:fw,light:fw,hcDark:Bs,hcLight:Bs},I("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),dvi=Fe("list.focusAndSelectionOutline",null,I("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),u5=Fe("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:Rt.fromHex("#0F4A85").transparent(.1)},I("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),ure=Fe("list.activeSelectionForeground",{dark:Rt.white,light:Rt.white,hcDark:null,hcLight:null},I("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),z3t=Fe("list.activeSelectionIconForeground",null,I("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),hvi=Fe("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:Rt.fromHex("#0F4A85").transparent(.1)},I("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),fvi=Fe("list.inactiveSelectionForeground",null,I("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),mvi=Fe("list.inactiveSelectionIconForeground",null,I("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),pvi=Fe("list.inactiveFocusBackground",null,I("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),gvi=Fe("list.inactiveFocusOutline",null,I("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),H3t=Fe("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:Rt.white.transparent(.1),hcLight:Rt.fromHex("#0F4A85").transparent(.1)},I("listHoverBackground","List/Tree background when hovering over items using the mouse.")),W3t=Fe("list.hoverForeground",null,I("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),bvi=Fe("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},I("listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),vvi=Fe("list.dropBetweenBackground",{dark:lre,light:lre,hcDark:null,hcLight:null},I("listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),h4=Fe("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:fw,hcLight:fw},I("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),yvi=Fe("list.focusHighlightForeground",{dark:h4,light:tbi(u5,h4,"#BBE7FF"),hcDark:h4,hcLight:h4},I("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));Fe("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},I("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer."));Fe("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},I("listErrorForeground","Foreground color of list items containing errors."));Fe("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},I("listWarningForeground","Foreground color of list items containing warnings."));const _vi=Fe("listFilterWidget.background",{light:JA(Kg,0),dark:C0(Kg,0),hcDark:Kg,hcLight:Kg},I("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),xvi=Fe("listFilterWidget.outline",{dark:Rt.transparent,light:Rt.transparent,hcDark:"#f38518",hcLight:"#007ACC"},I("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),wvi=Fe("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:$r,hcLight:$r},I("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),Cvi=Fe("listFilterWidget.shadow",P6,I("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees."));Fe("list.filterMatchBackground",{dark:lC,light:lC,hcDark:null,hcLight:null},I("listFilterMatchHighlight","Background color of the filtered match."));Fe("list.filterMatchBorder",{dark:WE,light:WE,hcDark:$r,hcLight:Bs},I("listFilterMatchHighlightBorder","Border color of the filtered match."));Fe("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},I("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized."));const U3t=Fe("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},I("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),Svi=Fe("tree.inactiveIndentGuidesStroke",rr(U3t,.4),I("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),Nvi=Fe("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},I("tableColumnsBorder","Table border color between columns.")),Evi=Fe("tree.tableOddRowsBackground",{dark:rr(hr,.04),light:rr(hr,.04),hcDark:null,hcLight:null},I("tableOddRowsBackgroundColor","Background color for odd table rows.")),Dvi=Fe("menu.border",{dark:null,light:null,hcDark:$r,hcLight:$r},I("menuBorder","Border color of menus.")),kvi=Fe("menu.foreground",lVe,I("menuForeground","Foreground color of menu items.")),Mvi=Fe("menu.background",tme,I("menuBackground","Background color of menu items.")),Lvi=Fe("menu.selectionForeground",ure,I("menuSelectionForeground","Foreground color of the selected menu item in menus.")),Tvi=Fe("menu.selectionBackground",u5,I("menuSelectionBackground","Background color of the selected menu item in menus.")),Ivi=Fe("menu.selectionBorder",{dark:null,light:null,hcDark:Bs,hcLight:Bs},I("menuSelectionBorder","Border color of the selected menu item in menus.")),Avi=Fe("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:$r,hcLight:$r},I("menuSeparatorBackground","Color of a separator menu item in menus.")),oat=Fe("quickInput.background",Kg,I("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),Rvi=Fe("quickInput.foreground",nVe,I("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),Pvi=Fe("quickInputTitle.background",{dark:new Rt(new jr(255,255,255,.105)),light:new Rt(new jr(0,0,0,.06)),hcDark:"#000000",hcLight:Rt.white},I("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),K3t=Fe("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:Rt.white,hcLight:"#0F4A85"},I("pickerGroupForeground","Quick picker color for grouping labels.")),Ovi=Fe("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:Rt.white,hcLight:"#0F4A85"},I("pickerGroupBorder","Quick picker color for grouping borders.")),sat=Fe("quickInput.list.focusBackground",null,"",void 0,I("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),VH=Fe("quickInputList.focusForeground",ure,I("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),uVe=Fe("quickInputList.focusIconForeground",z3t,I("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),BH=Fe("quickInputList.focusBackground",{dark:jH(sat,u5),light:jH(sat,u5),hcDark:null,hcLight:null},I("quickInput.listFocusBackground","Quick picker background color for the focused item."));Fe("search.resultsInfoForeground",{light:hr,dark:rr(hr,.65),hcDark:hr,hcLight:hr},I("search.resultsInfoForeground","Color of the text in the search viewlet's completion message."));Fe("searchEditor.findMatchBackground",{light:rr(lC,.66),dark:rr(lC,.66),hcDark:lC,hcLight:lC},I("searchEditor.queryMatch","Color of the Search Editor query matches."));Fe("searchEditor.findMatchBorder",{light:rr(WE,.66),dark:rr(WE,.66),hcDark:WE,hcLight:WE},I("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."));class nme{constructor(e,n){this.x=e,this.y=n,this._pageCoordinatesBrand=void 0}toClientCoordinates(e){return new q3t(this.x-e.scrollX,this.y-e.scrollY)}}class q3t{constructor(e,n){this.clientX=e,this.clientY=n,this._clientCoordinatesBrand=void 0}toPageCoordinates(e){return new nme(this.clientX+e.scrollX,this.clientY+e.scrollY)}}class jvi{constructor(e,n,i,r){this.x=e,this.y=n,this.width=i,this.height=r,this._editorPagePositionBrand=void 0}}class Fvi{constructor(e,n){this.x=e,this.y=n,this._positionRelativeToEditorBrand=void 0}}function dVe(t){const e=Ga(t);return new jvi(e.left,e.top,e.width,e.height)}function hVe(t,e,n){const i=e.width/t.offsetWidth,r=e.height/t.offsetHeight,o=(n.x-e.x)/i,s=(n.y-e.y)/r;return new Fvi(o,s)}class mk extends uv{constructor(e,n,i){super(ei(i),e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=n,this.pos=new nme(this.posx,this.posy),this.editorPos=dVe(i),this.relativePos=hVe(i,this.editorPos,this.pos)}}class $vi{constructor(e){this._editorViewDomNode=e}_create(e){return new mk(e,!1,this._editorViewDomNode)}onContextMenu(e,n){return yt(e,"contextmenu",i=>{n(this._create(i))})}onMouseUp(e,n){return yt(e,"mouseup",i=>{n(this._create(i))})}onMouseDown(e,n){return yt(e,Yt.MOUSE_DOWN,i=>{n(this._create(i))})}onPointerDown(e,n){return yt(e,Yt.POINTER_DOWN,i=>{n(this._create(i),i.pointerId)})}onMouseLeave(e,n){return yt(e,Yt.MOUSE_LEAVE,i=>{n(this._create(i))})}onMouseMove(e,n){return yt(e,"mousemove",i=>n(this._create(i)))}}class Vvi{constructor(e){this._editorViewDomNode=e}_create(e){return new mk(e,!1,this._editorViewDomNode)}onPointerUp(e,n){return yt(e,"pointerup",i=>{n(this._create(i))})}onPointerDown(e,n){return yt(e,Yt.POINTER_DOWN,i=>{n(this._create(i),i.pointerId)})}onPointerLeave(e,n){return yt(e,Yt.POINTER_LEAVE,i=>{n(this._create(i))})}onPointerMove(e,n){return yt(e,"pointermove",i=>n(this._create(i)))}}class Bvi extends ct{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new R6),this._keydownListener=null}startMonitoring(e,n,i,r,o){this._keydownListener=Fa(e.ownerDocument,"keydown",s=>{s.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,s.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(e,n,i,s=>{r(new mk(s,!0,this._editorViewDomNode))},s=>{this._keydownListener.dispose(),o(s)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}const Ble=class Ble{constructor(e){this._editor=e,this._instanceId=++Ble._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new Wo(()=>this.garbageCollect(),1e3)}createClassNameRef(e){const n=this.getOrCreateRule(e);return n.increaseRefCount(),{className:n.className,dispose:()=>{n.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const n=this.computeUniqueKey(e);let i=this._rules.get(n);if(!i){const r=this._counter++;i=new zvi(n,`dyn-rule-${this._instanceId}-${r}`,Uie(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(n,i)}return i}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}};Ble._idPool=0;let dre=Ble;class zvi{constructor(e,n,i,r){this.key=e,this.className=n,this.properties=r,this._referenceCount=0,this._styleElementDisposables=new Lt,this._styleElement=Wp(i,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,n){let i=`.${e} {`;for(const r in n){const o=n[r];let s;typeof o=="object"?s=Cn(o.id):s=o;const a=Hvi(r);i+=`
	${a}: ${s};`}return i+=`
}`,i}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function Hvi(t){return t.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}class Nq extends ct{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let n=!1;for(let i=0,r=e.length;i<r;i++){const o=e[i];switch(o.type){case 0:this.onCompositionStart(o)&&(n=!0);break;case 1:this.onCompositionEnd(o)&&(n=!0);break;case 2:this.onConfigurationChanged(o)&&(n=!0);break;case 3:this.onCursorStateChanged(o)&&(n=!0);break;case 4:this.onDecorationsChanged(o)&&(n=!0);break;case 5:this.onFlushed(o)&&(n=!0);break;case 6:this.onFocusChanged(o)&&(n=!0);break;case 7:this.onLanguageConfigurationChanged(o)&&(n=!0);break;case 8:this.onLineMappingChanged(o)&&(n=!0);break;case 9:this.onLinesChanged(o)&&(n=!0);break;case 10:this.onLinesDeleted(o)&&(n=!0);break;case 11:this.onLinesInserted(o)&&(n=!0);break;case 12:this.onRevealRangeRequest(o)&&(n=!0);break;case 13:this.onScrollChanged(o)&&(n=!0);break;case 15:this.onTokensChanged(o)&&(n=!0);break;case 14:this.onThemeChanged(o)&&(n=!0);break;case 16:this.onTokensColorsChanged(o)&&(n=!0);break;case 17:this.onZonesChanged(o)&&(n=!0);break;default:console.info("View received unknown event: "),console.info(o)}}n&&(this._shouldRender=!0)}}class zm extends Nq{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class Y0{static write(e,n){e.setAttribute("data-mprt",String(n))}static read(e){const n=e.getAttribute("data-mprt");return n===null?0:parseInt(n,10)}static collect(e,n){const i=[];let r=0;for(;e&&e!==e.ownerDocument.body&&e!==n;)e.nodeType===e.ELEMENT_NODE&&(i[r++]=this.read(e)),e=e.parentElement;const o=new Uint8Array(r);for(let s=0;s<r;s++)o[s]=i[r-s-1];return o}}class Wvi{constructor(e,n){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=n,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e,n){return this._viewLayout.getVerticalOffsetForLineNumber(e,n)}getVerticalOffsetAfterLineNumber(e,n){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,n)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class Uvi extends Wvi{constructor(e,n,i){super(e,n),this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(e,n){return this._viewLines.linesVisibleRangesForRange(e,n)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class Kvi{constructor(e,n,i,r){this.outsideRenderedLine=e,this.lineNumber=n,this.ranges=i,this.continuesOnNextLine=r}}class ime{static from(e){const n=new Array(e.length);for(let i=0,r=e.length;i<r;i++){const o=e[i];n[i]=new ime(o.left,o.width)}return n}constructor(e,n){this._horizontalRangeBrand=void 0,this.left=Math.round(e),this.width=Math.round(n)}toString(){return`[${this.left},${this.width}]`}}class cI{constructor(e,n){this._floatHorizontalRangeBrand=void 0,this.left=e,this.width=n}toString(){return`[${this.left},${this.width}]`}static compare(e,n){return e.left-n.left}}class qvi{constructor(e,n){this.outsideRenderedLine=e,this.originalLeft=n,this.left=Math.round(this.originalLeft)}}class aat{constructor(e,n){this.outsideRenderedLine=e,this.ranges=n}}class cte{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,n){e.selectNodeContents(n)}static _readClientRects(e,n,i,r,o){const s=this._createRange();try{return s.setStart(e,n),s.setEnd(i,r),s.getClientRects()}catch{return null}finally{this._detachRange(s,o)}}static _mergeAdjacentRanges(e){if(e.length===1)return e;e.sort(cI.compare);const n=[];let i=0,r=e[0];for(let o=1,s=e.length;o<s;o++){const a=e[o];r.left+r.width+.9>=a.left?r.width=Math.max(r.width,a.left+a.width-r.left):(n[i++]=r,r=a)}return n[i++]=r,n}static _createHorizontalRangesFromClientRects(e,n,i){if(!e||e.length===0)return null;const r=[];for(let o=0,s=e.length;o<s;o++){const a=e[o];r[o]=new cI(Math.max(0,(a.left-n)/i),a.width/i)}return this._mergeAdjacentRanges(r)}static readHorizontalRanges(e,n,i,r,o,s){const l=e.children.length-1;if(0>l)return null;if(n=Math.min(l,Math.max(0,n)),r=Math.min(l,Math.max(0,r)),n===r&&i===o&&i===0&&!e.children[n].firstChild){const h=e.children[n].getClientRects();return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(h,s.clientRectDeltaLeft,s.clientRectScale)}n!==r&&r>0&&o===0&&(r--,o=1073741824);let c=e.children[n].firstChild,u=e.children[r].firstChild;if((!c||!u)&&(!c&&i===0&&n>0&&(c=e.children[n-1].firstChild,i=1073741824),!u&&o===0&&r>0&&(u=e.children[r-1].firstChild,o=1073741824)),!c||!u)return null;i=Math.min(c.textContent.length,Math.max(0,i)),o=Math.min(u.textContent.length,Math.max(0,o));const d=this._readClientRects(c,i,u,o,s.endNode);return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(d,s.clientRectDeltaLeft,s.clientRectScale)}}var qg;(function(t){t.DARK="dark",t.LIGHT="light",t.HIGH_CONTRAST_DARK="hcDark",t.HIGH_CONTRAST_LIGHT="hcLight"})(qg||(qg={}));function S0(t){return t===qg.HIGH_CONTRAST_DARK||t===qg.HIGH_CONTRAST_LIGHT}function d5(t){return t===qg.DARK||t===qg.HIGH_CONTRAST_DARK}const Gvi=function(){return y0?!0:!($h||sb||dS)}();let C3=!0;class lat{constructor(e,n){this.themeType=n;const i=e.options,r=i.get(50);i.get(38)==="off"?this.renderWhitespace=i.get(100):this.renderWhitespace="none",this.renderControlCharacters=i.get(95),this.spaceWidth=r.spaceWidth,this.middotWidth=r.middotWidth,this.wsmiddotWidth=r.wsmiddotWidth,this.useMonospaceOptimizations=r.isMonospace&&!i.get(33),this.canUseHalfwidthRightwardsArrow=r.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(67),this.stopRenderingLineAfter=i.get(118),this.fontLigatures=i.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}const zle=class zle{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(this._renderedViewLine)this._renderedViewLine.domNode=wo(e);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return S0(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(e,n,i,r,o){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const s=r.getViewLineRenderingData(e),a=this._options,l=Sh.filter(s.inlineDecorations,e,s.minColumn,s.maxColumn);let c=null;if(S0(a.themeType)||this._options.renderWhitespace==="selection"){const f=r.selections;for(const m of f){if(m.endLineNumber<e||m.startLineNumber>e)continue;const p=m.startLineNumber===e?m.startColumn:s.minColumn,g=m.endLineNumber===e?m.endColumn:s.maxColumn;p<g&&(S0(a.themeType)&&l.push(new Sh(p,g,"inline-selected-text",0)),this._options.renderWhitespace==="selection"&&(c||(c=[]),c.push(new x3t(p-1,g-1))))}}const u=new nM(a.useMonospaceOptimizations,a.canUseHalfwidthRightwardsArrow,s.content,s.continuesWithWrappedLine,s.isBasicASCII,s.containsRTL,s.minColumn-1,s.tokens,l,s.tabSize,s.startVisibleColumn,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,a.stopRenderingLineAfter,a.renderWhitespace,a.renderControlCharacters,a.fontLigatures!==sk.OFF,c);if(this._renderedViewLine&&this._renderedViewLine.input.equals(u))return!1;o.appendString('<div style="top:'),o.appendString(String(n)),o.appendString("px;height:"),o.appendString(String(i)),o.appendString('px;" class="'),o.appendString(zle.CLASS_NAME),o.appendString('">');const d=wq(u,o);o.appendString("</div>");let h=null;return C3&&Gvi&&s.isBasicASCII&&a.useMonospaceOptimizations&&d.containsForeignElements===0&&(h=new pQ(this._renderedViewLine?this._renderedViewLine.domNode:null,u,d.characterMapping)),h||(h=Y3t(this._renderedViewLine?this._renderedViewLine.domNode:null,u,d.characterMapping,d.containsRTL,d.containsForeignElements)),this._renderedViewLine=h,!0}layoutLine(e,n,i){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(n),this._renderedViewLine.domNode.setHeight(i))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof pQ:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof pQ?this._renderedViewLine.monospaceAssumptionsAreValid():C3}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof pQ&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,n,i,r){if(!this._renderedViewLine)return null;n=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,n)),i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i));const o=this._renderedViewLine.input.stopRenderingLineAfter;if(o!==-1&&n>o+1&&i>o+1)return new aat(!0,[new cI(this.getWidth(r),0)]);o!==-1&&n>o+1&&(n=o+1),o!==-1&&i>o+1&&(i=o+1);const s=this._renderedViewLine.getVisibleRangesForRange(e,n,i,r);return s&&s.length>0?new aat(!1,s):null}getColumnOfNodeOffset(e,n){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,n):1}};zle.CLASS_NAME="view-line";let J1=zle;class pQ{constructor(e,n,i){this._cachedWidth=-1,this.domNode=e,this.input=n;const r=Math.floor(n.lineContent.length/300);if(r>0){this._keyColumnPixelOffsetCache=new Float32Array(r);for(let o=0;o<r;o++)this._keyColumnPixelOffsetCache[o]=-1}else this._keyColumnPixelOffsetCache=null;this._characterMapping=i,this._charWidth=n.spaceWidth}getWidth(e){if(!this.domNode||this.input.lineContent.length<300){const n=this._characterMapping.getHorizontalOffset(this._characterMapping.length);return Math.round(this._charWidth*n)}return this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e==null||e.markDidDomLayout()),this._cachedWidth}getWidthIsFast(){return this.input.lineContent.length<300||this._cachedWidth!==-1}monospaceAssumptionsAreValid(){if(!this.domNode)return C3;if(this.input.lineContent.length<300){const e=this.getWidth(null),n=this.domNode.domNode.firstChild.offsetWidth;Math.abs(e-n)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),C3=!1)}return C3}toSlowRenderedLine(){return Y3t(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,n,i,r){const o=this._getColumnPixelOffset(e,n,r),s=this._getColumnPixelOffset(e,i,r);return[new cI(o,s-o)]}_getColumnPixelOffset(e,n,i){if(n<=300){const c=this._characterMapping.getHorizontalOffset(n);return this._charWidth*c}const r=Math.floor((n-1)/300)-1,o=(r+1)*300+1;let s=-1;if(this._keyColumnPixelOffsetCache&&(s=this._keyColumnPixelOffsetCache[r],s===-1&&(s=this._actualReadPixelOffset(e,o,i),this._keyColumnPixelOffsetCache[r]=s)),s===-1){const c=this._characterMapping.getHorizontalOffset(n);return this._charWidth*c}const a=this._characterMapping.getHorizontalOffset(o),l=this._characterMapping.getHorizontalOffset(n);return s+this._charWidth*(l-a)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,n,i){if(!this.domNode)return-1;const r=this._characterMapping.getDomPosition(n),o=cte.readHorizontalRanges(this._getReadingTarget(this.domNode),r.partIndex,r.charIndex,r.partIndex,r.charIndex,i);return!o||o.length===0?-1:o[0].left}getColumnOfNodeOffset(e,n){return fVe(this._characterMapping,e,n)}}class G3t{constructor(e,n,i,r,o){if(this.domNode=e,this.input=n,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(n.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!r||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let s=0,a=this._characterMapping.length;s<=a;s++)this._pixelOffsetCache[s]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e==null||e.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(e,n,i,r){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const o=this._readPixelOffset(this.domNode,e,n,r);if(o===-1)return null;const s=this._readPixelOffset(this.domNode,e,i,r);return s===-1?null:[new cI(o,s-o)]}return this._readVisibleRangesForRange(this.domNode,e,n,i,r)}_readVisibleRangesForRange(e,n,i,r,o){if(i===r){const s=this._readPixelOffset(e,n,i,o);return s===-1?null:[new cI(s,0)]}else return this._readRawVisibleRangesForRange(e,i,r,o)}_readPixelOffset(e,n,i,r){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth(r);const o=this._getReadingTarget(e);return o.firstChild?(r.markDidDomLayout(),o.firstChild.offsetWidth):0}if(this._pixelOffsetCache!==null){const o=this._pixelOffsetCache[i];if(o!==-1)return o;const s=this._actualReadPixelOffset(e,n,i,r);return this._pixelOffsetCache[i]=s,s}return this._actualReadPixelOffset(e,n,i,r)}_actualReadPixelOffset(e,n,i,r){if(this._characterMapping.length===0){const l=cte.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,r);return!l||l.length===0?-1:l[0].left}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth(r);const o=this._characterMapping.getDomPosition(i),s=cte.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,o.partIndex,o.charIndex,r);if(!s||s.length===0)return-1;const a=s[0].left;if(this.input.isBasicASCII){const l=this._characterMapping.getHorizontalOffset(i),c=Math.round(this.input.spaceWidth*l);if(Math.abs(c-a)<=1)return c}return a}_readRawVisibleRangesForRange(e,n,i,r){if(n===1&&i===this._characterMapping.length)return[new cI(0,this.getWidth(r))];const o=this._characterMapping.getDomPosition(n),s=this._characterMapping.getDomPosition(i);return cte.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,s.partIndex,s.charIndex,r)}getColumnOfNodeOffset(e,n){return fVe(this._characterMapping,e,n)}}class Yvi extends G3t{_readVisibleRangesForRange(e,n,i,r,o){const s=super._readVisibleRangesForRange(e,n,i,r,o);if(!s||s.length===0||i===r||i===1&&r===this._characterMapping.length)return s;if(!this.input.containsRTL){const a=this._readPixelOffset(e,n,r,o);if(a!==-1){const l=s[s.length-1];l.left<a&&(l.width=a-l.left)}}return s}}const Y3t=function(){return oI?Xvi:Zvi}();function Xvi(t,e,n,i,r){return new Yvi(t,e,n,i,r)}function Zvi(t,e,n,i,r){return new G3t(t,e,n,i,r)}function fVe(t,e,n){const i=e.textContent.length;let r=-1;for(;e;)e=e.previousSibling,r++;return t.getColumn(new w3t(r,n),i)}class Kl{static _nextVisibleColumn(e,n,i){return e===9?Kl.nextRenderTabStop(n,i):uk(e)||S8e(e)?n+2:n+1}static visibleColumnFromColumn(e,n,i){const r=Math.min(n-1,e.length),o=e.substring(0,r),s=new Bie(o);let a=0;for(;!s.eol();){const l=Vie(o,r,s.offset);s.nextGraphemeLength(),a=this._nextVisibleColumn(l,a,i)}return a}static columnFromVisibleColumn(e,n,i){if(n<=0)return 1;const r=e.length,o=new Bie(e);let s=0,a=1;for(;!o.eol();){const l=Vie(e,r,o.offset);o.nextGraphemeLength();const c=this._nextVisibleColumn(l,s,i),u=o.offset+1;if(c>=n){const d=n-s;return c-n<d?u:a}s=c,a=u}return r+1}static nextRenderTabStop(e,n){return e+n-e%n}static nextIndentTabStop(e,n){return e+n-e%n}static prevRenderTabStop(e,n){return Math.max(0,e-1-(e-1)%n)}static prevIndentTabStop(e,n){return Math.max(0,e-1-(e-1)%n)}}class zH{static whitespaceVisibleColumn(e,n,i){const r=e.length;let o=0,s=-1,a=-1;for(let l=0;l<r;l++){if(l===n)return[s,a,o];switch(o%i===0&&(s=l,a=o),e.charCodeAt(l)){case 32:o+=1;break;case 9:o=Kl.nextRenderTabStop(o,i);break;default:return[-1,-1,-1]}}return n===r?[s,a,o]:[-1,-1,-1]}static atomicPosition(e,n,i,r){const o=e.length,[s,a,l]=zH.whitespaceVisibleColumn(e,n,i);if(l===-1)return-1;let c;switch(r){case 0:c=!0;break;case 1:c=!1;break;case 2:if(l%i===0)return n;c=l%i<=i/2;break}if(c){if(s===-1)return-1;let h=a;for(let f=s;f<o;++f){if(h===a+i)return s;switch(e.charCodeAt(f)){case 32:h+=1;break;case 9:h=Kl.nextRenderTabStop(h,i);break;default:return-1}}return h===a+i?s:-1}const u=Kl.nextRenderTabStop(l,i);let d=l;for(let h=n;h<o;h++){if(d===u)return h;switch(e.charCodeAt(h)){case 32:d+=1;break;case 9:d=Kl.nextRenderTabStop(d,i);break;default:return-1}}return d===u?o:-1}}class GN{constructor(e=null){this.hitTarget=e,this.type=0}}class X3t{get hitTarget(){return this.spanNode}constructor(e,n,i){this.position=e,this.spanNode=n,this.injectedText=i,this.type=1}}var aT;(function(t){function e(n,i,r){const o=n.getPositionFromDOMInfo(i,r);return o?new X3t(o,i,null):new GN(i)}t.createFromDOMInfo=e})(aT||(aT={}));class Qvi{constructor(e,n){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=n}}class jd{static _deduceRage(e,n=null){return!n&&e?new ve(e.lineNumber,e.column,e.lineNumber,e.column):n??null}static createUnknown(e,n,i){return{type:0,element:e,mouseColumn:n,position:i,range:this._deduceRage(i)}}static createTextarea(e,n){return{type:1,element:e,mouseColumn:n,position:null,range:null}}static createMargin(e,n,i,r,o,s){return{type:e,element:n,mouseColumn:i,position:r,range:o,detail:s}}static createViewZone(e,n,i,r,o){return{type:e,element:n,mouseColumn:i,position:r,range:this._deduceRage(r),detail:o}}static createContentText(e,n,i,r,o){return{type:6,element:e,mouseColumn:n,position:i,range:this._deduceRage(i,r),detail:o}}static createContentEmpty(e,n,i,r){return{type:7,element:e,mouseColumn:n,position:i,range:this._deduceRage(i),detail:r}}static createContentWidget(e,n,i){return{type:9,element:e,mouseColumn:n,position:null,range:null,detail:i}}static createScrollbar(e,n,i){return{type:11,element:e,mouseColumn:n,position:i,range:this._deduceRage(i)}}static createOverlayWidget(e,n,i){return{type:12,element:e,mouseColumn:n,position:null,range:null,detail:i}}static createOutsideEditor(e,n,i,r){return{type:13,element:null,mouseColumn:e,position:n,range:this._deduceRage(n),outsidePosition:i,outsideDistance:r}}static _typeToString(e){return e===1?"TEXTAREA":e===2?"GUTTER_GLYPH_MARGIN":e===3?"GUTTER_LINE_NUMBERS":e===4?"GUTTER_LINE_DECORATIONS":e===5?"GUTTER_VIEW_ZONE":e===6?"CONTENT_TEXT":e===7?"CONTENT_EMPTY":e===8?"CONTENT_VIEW_ZONE":e===9?"CONTENT_WIDGET":e===10?"OVERVIEW_RULER":e===11?"SCROLLBAR":e===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+JSON.stringify(e.detail)}}class hh{static isTextArea(e){return e.length===2&&e[0]===3&&e[1]===7}static isChildOfViewLines(e){return e.length>=4&&e[0]===3&&e[3]===8}static isStrictChildOfViewLines(e){return e.length>4&&e[0]===3&&e[3]===8}static isChildOfScrollableElement(e){return e.length>=2&&e[0]===3&&e[1]===6}static isChildOfMinimap(e){return e.length>=2&&e[0]===3&&e[1]===9}static isChildOfContentWidgets(e){return e.length>=4&&e[0]===3&&e[3]===1}static isChildOfOverflowGuard(e){return e.length>=1&&e[0]===3}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&e[0]===2}static isChildOfOverlayWidgets(e){return e.length>=2&&e[0]===3&&e[1]===4}static isChildOfOverflowingOverlayWidgets(e){return e.length>=1&&e[0]===5}}class q2{constructor(e,n,i){this.viewModel=e.viewModel;const r=e.configuration.options;this.layoutInfo=r.get(146),this.viewDomNode=n.viewDomNode,this.overflowWidgetsDomNode=n.overflowWidgetsDomNode??null,this.lineHeight=r.get(67),this.stickyTabStops=r.get(117),this.typicalHalfwidthCharacterWidth=r.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=n}getZoneAtCoord(e){return q2.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,n){const i=e.viewLayout.getWhitespaceAtVerticalOffset(n);if(i){const r=i.verticalOffset+i.height/2,o=e.viewModel.getLineCount();let s=null,a,l=null;return i.afterLineNumber!==o&&(l=new ot(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(s=new ot(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),l===null?a=s:s===null?a=l:n<r?a=s:a=l,{viewZoneId:i.id,afterLineNumber:i.afterLineNumber,positionBefore:s,positionAfter:l,position:a}}return null}getFullLineRangeAtCoord(e){if(this._context.viewLayout.isAfterLines(e)){const r=this._context.viewModel.getLineCount(),o=this._context.viewModel.getLineMaxColumn(r);return{range:new ve(r,o,r,o),isAfterLines:!0}}const n=this._context.viewLayout.getLineNumberAtVerticalOffset(e),i=this._context.viewModel.getLineMaxColumn(n);return{range:new ve(n,1,n,i),isAfterLines:!1}}getLineNumberAtVerticalOffset(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)}isAfterLines(e){return this._context.viewLayout.isAfterLines(e)}isInTopPadding(e){return this._context.viewLayout.isInTopPadding(e)}isInBottomPadding(e){return this._context.viewLayout.isInBottomPadding(e)}getVerticalOffsetForLineNumber(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)}findAttribute(e,n){return q2._findAttribute(e,n,this._viewHelper.viewDomNode)}static _findAttribute(e,n,i){for(;e&&e!==e.ownerDocument.body;){if(e.hasAttribute&&e.hasAttribute(n))return e.getAttribute(n);if(e===i)return null;e=e.parentNode}return null}getLineWidth(e){return this._viewHelper.getLineWidth(e)}visibleRangeForPosition(e,n){return this._viewHelper.visibleRangeForPosition(e,n)}getPositionFromDOMInfo(e,n){return this._viewHelper.getPositionFromDOMInfo(e,n)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}class Jvi{constructor(e,n,i,r){this.editorPos=n,this.pos=i,this.relativePos=r,this.mouseVerticalOffset=Math.max(0,e.getCurrentScrollTop()+this.relativePos.y),this.mouseContentHorizontalOffset=e.getCurrentScrollLeft()+this.relativePos.x-e.layoutInfo.contentLeft,this.isInMarginArea=this.relativePos.x<e.layoutInfo.contentLeft&&this.relativePos.x>=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Ju._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class cat extends Jvi{get target(){return this._useHitTestTarget?this.hitTestResult.value.hitTarget:this._eventTarget}get targetPath(){return this._targetPathCacheElement!==this.target&&this._targetElement&&(this._targetPathCacheElement=this.target,this._targetPathCacheValue=Y0.collect(this.target,this._targetElement)),this._targetPathCacheValue}constructor(e,n,i,r,o,s=null){super(e,n,i,r),this.hitTestResult=new U0(()=>Ju.doHitTest(this._ctx,this)),this._targetPathCacheElement=null,this._targetPathCacheValue=new Uint8Array(0),this._targetElement=null,this._ctx=e,this._eventTarget=o,this._targetElement=s;const a=!!this._eventTarget;this._useHitTestTarget=!a}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}
	target: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&this.hitTestResult.value.hitTarget!==null&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(e=null){return e&&e.column<this._ctx.viewModel.getLineMaxColumn(e.lineNumber)?Kl.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(e.lineNumber),e.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(e=null){return jd.createUnknown(this.target,this._getMouseColumn(e),e)}fulfillTextarea(){return jd.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(e,n,i,r){return jd.createMargin(e,this.target,this._getMouseColumn(n),n,i,r)}fulfillViewZone(e,n,i){return jd.createViewZone(e,this.target,this._getMouseColumn(n),n,i)}fulfillContentText(e,n,i){return jd.createContentText(this.target,this._getMouseColumn(e),e,n,i)}fulfillContentEmpty(e,n){return jd.createContentEmpty(this.target,this._getMouseColumn(e),e,n)}fulfillContentWidget(e){return jd.createContentWidget(this.target,this._getMouseColumn(),e)}fulfillScrollbar(e){return jd.createScrollbar(this.target,this._getMouseColumn(e),e)}fulfillOverlayWidget(e){return jd.createOverlayWidget(this.target,this._getMouseColumn(),e)}}const uat={isAfterLines:!0};function Xwe(t){return{isAfterLines:!1,horizontalDistanceToText:t}}class Ju{constructor(e,n){this._context=e,this._viewHelper=n}mouseTargetIsWidget(e){const n=e.target,i=Y0.collect(n,this._viewHelper.viewDomNode);return!!(hh.isChildOfContentWidgets(i)||hh.isChildOfOverflowingContentWidgets(i)||hh.isChildOfOverlayWidgets(i)||hh.isChildOfOverflowingOverlayWidgets(i))}createMouseTargetForView(e,n,i,r,o){const s=new q2(this._context,this._viewHelper,e),a=new cat(s,n,i,r,o,s.viewDomNode);try{const l=Ju._createMouseTarget(s,a);if(l.type===6&&s.stickyTabStops&&l.position!==null){const c=Ju._snapToSoftTabBoundary(l.position,s.viewModel),u=ve.fromPositions(c,c).plusRange(l.range);return a.fulfillContentText(c,u,l.detail)}return l}catch{return a.fulfillUnknown()}}createMouseTargetForOverflowWidgetsDomNode(e,n,i,r,o){const s=new q2(this._context,this._viewHelper,e),a=new cat(s,n,i,r,o,s.overflowWidgetsDomNode);try{return Ju._createMouseTarget(s,a)}catch{return a.fulfillUnknown()}}static _createMouseTarget(e,n){if(n.target===null)return n.fulfillUnknown();const i=n;let r=null;return!hh.isChildOfOverflowGuard(n.targetPath)&&!hh.isChildOfOverflowingContentWidgets(n.targetPath)&&!hh.isChildOfOverflowingOverlayWidgets(n.targetPath)&&(r=r||n.fulfillUnknown()),r=r||Ju._hitTestContentWidget(e,i),r=r||Ju._hitTestOverlayWidget(e,i),r=r||Ju._hitTestMinimap(e,i),r=r||Ju._hitTestScrollbarSlider(e,i),r=r||Ju._hitTestViewZone(e,i),r=r||Ju._hitTestMargin(e,i),r=r||Ju._hitTestViewCursor(e,i),r=r||Ju._hitTestTextArea(e,i),r=r||Ju._hitTestViewLines(e,i),r=r||Ju._hitTestScrollbar(e,i),r||n.fulfillUnknown()}static _hitTestContentWidget(e,n){if(hh.isChildOfContentWidgets(n.targetPath)||hh.isChildOfOverflowingContentWidgets(n.targetPath)){const i=e.findAttribute(n.target,"widgetId");return i?n.fulfillContentWidget(i):n.fulfillUnknown()}return null}static _hitTestOverlayWidget(e,n){if(hh.isChildOfOverlayWidgets(n.targetPath)||hh.isChildOfOverflowingOverlayWidgets(n.targetPath)){const i=e.findAttribute(n.target,"widgetId");return i?n.fulfillOverlayWidget(i):n.fulfillUnknown()}return null}static _hitTestViewCursor(e,n){if(n.target){const i=e.lastRenderData.lastViewCursorsRenderData;for(const r of i)if(n.target===r.domNode)return n.fulfillContentText(r.position,null,{mightBeForeignElement:!1,injectedText:null})}if(n.isInContentArea){const i=e.lastRenderData.lastViewCursorsRenderData,r=n.mouseContentHorizontalOffset,o=n.mouseVerticalOffset;for(const s of i){if(r<s.contentLeft||r>s.contentLeft+s.width)continue;const a=e.getVerticalOffsetForLineNumber(s.position.lineNumber);if(a<=o&&o<=a+s.height)return n.fulfillContentText(s.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,n){const i=e.getZoneAtCoord(n.mouseVerticalOffset);if(i){const r=n.isInContentArea?8:5;return n.fulfillViewZone(r,i.position,i)}return null}static _hitTestTextArea(e,n){return hh.isTextArea(n.targetPath)?e.lastRenderData.lastTextareaPosition?n.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):n.fulfillTextarea():null}static _hitTestMargin(e,n){if(n.isInMarginArea){const i=e.getFullLineRangeAtCoord(n.mouseVerticalOffset),r=i.range.getStartPosition();let o=Math.abs(n.relativePos.x);const s={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};if(o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth){const a=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i.range.getStartPosition()),l=e.viewModel.glyphLanes.getLanesAtLine(a.lineNumber);return s.glyphMarginLane=l[Math.floor(o/e.lineHeight)],n.fulfillMargin(2,r,i.range,s)}return o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?n.fulfillMargin(3,r,i.range,s):(o-=e.layoutInfo.lineNumbersWidth,n.fulfillMargin(4,r,i.range,s))}return null}static _hitTestViewLines(e,n){if(!hh.isChildOfViewLines(n.targetPath))return null;if(e.isInTopPadding(n.mouseVerticalOffset))return n.fulfillContentEmpty(new ot(1,1),uat);if(e.isAfterLines(n.mouseVerticalOffset)||e.isInBottomPadding(n.mouseVerticalOffset)){const r=e.viewModel.getLineCount(),o=e.viewModel.getLineMaxColumn(r);return n.fulfillContentEmpty(new ot(r,o),uat)}if(hh.isStrictChildOfViewLines(n.targetPath)){const r=e.getLineNumberAtVerticalOffset(n.mouseVerticalOffset);if(e.viewModel.getLineLength(r)===0){const s=e.getLineWidth(r),a=Xwe(n.mouseContentHorizontalOffset-s);return n.fulfillContentEmpty(new ot(r,1),a)}const o=e.getLineWidth(r);if(n.mouseContentHorizontalOffset>=o){const s=Xwe(n.mouseContentHorizontalOffset-o),a=new ot(r,e.viewModel.getLineMaxColumn(r));return n.fulfillContentEmpty(a,s)}}const i=n.hitTestResult.value;return i.type===1?Ju.createMouseTargetFromHitTestPosition(e,n,i.spanNode,i.position,i.injectedText):n.wouldBenefitFromHitTestTargetSwitch?(n.switchToHitTestTarget(),this._createMouseTarget(e,n)):n.fulfillUnknown()}static _hitTestMinimap(e,n){if(hh.isChildOfMinimap(n.targetPath)){const i=e.getLineNumberAtVerticalOffset(n.mouseVerticalOffset),r=e.viewModel.getLineMaxColumn(i);return n.fulfillScrollbar(new ot(i,r))}return null}static _hitTestScrollbarSlider(e,n){if(hh.isChildOfScrollableElement(n.targetPath)&&n.target&&n.target.nodeType===1){const i=n.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const r=e.getLineNumberAtVerticalOffset(n.mouseVerticalOffset),o=e.viewModel.getLineMaxColumn(r);return n.fulfillScrollbar(new ot(r,o))}}return null}static _hitTestScrollbar(e,n){if(hh.isChildOfScrollableElement(n.targetPath)){const i=e.getLineNumberAtVerticalOffset(n.mouseVerticalOffset),r=e.viewModel.getLineMaxColumn(i);return n.fulfillScrollbar(new ot(i,r))}return null}getMouseColumn(e){const n=this._context.configuration.options,i=n.get(146),r=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return Ju._getMouseColumn(r,n.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,n){return e<0?1:Math.round(e/n)+1}static createMouseTargetFromHitTestPosition(e,n,i,r,o){const s=r.lineNumber,a=r.column,l=e.getLineWidth(s);if(n.mouseContentHorizontalOffset>l){const y=Xwe(n.mouseContentHorizontalOffset-l);return n.fulfillContentEmpty(r,y)}const c=e.visibleRangeForPosition(s,a);if(!c)return n.fulfillUnknown(r);const u=c.left;if(Math.abs(n.mouseContentHorizontalOffset-u)<1)return n.fulfillContentText(r,null,{mightBeForeignElement:!!o,injectedText:o});const d=[];if(d.push({offset:c.left,column:a}),a>1){const y=e.visibleRangeForPosition(s,a-1);y&&d.push({offset:y.left,column:a-1})}const h=e.viewModel.getLineMaxColumn(s);if(a<h){const y=e.visibleRangeForPosition(s,a+1);y&&d.push({offset:y.left,column:a+1})}d.sort((y,_)=>y.offset-_.offset);const f=n.pos.toClientCoordinates(ei(e.viewDomNode)),m=i.getBoundingClientRect(),p=m.left<=f.clientX&&f.clientX<=m.right;let g=null;for(let y=1;y<d.length;y++){const _=d[y-1],w=d[y];if(_.offset<=n.mouseContentHorizontalOffset&&n.mouseContentHorizontalOffset<=w.offset){g=new ve(s,_.column,s,w.column);const C=Math.abs(_.offset-n.mouseContentHorizontalOffset),N=Math.abs(w.offset-n.mouseContentHorizontalOffset);r=C<N?new ot(s,_.column):new ot(s,w.column);break}}return n.fulfillContentText(r,g,{mightBeForeignElement:!p||!!o,injectedText:o})}static _doHitTestWithCaretRangeFromPoint(e,n){const i=e.getLineNumberAtVerticalOffset(n.mouseVerticalOffset),r=e.getVerticalOffsetForLineNumber(i),o=r+e.lineHeight;if(!(i===e.viewModel.getLineCount()&&n.mouseVerticalOffset>o)){const a=Math.floor((r+o)/2);let l=n.pos.y+(a-n.mouseVerticalOffset);l<=n.editorPos.y&&(l=n.editorPos.y+1),l>=n.editorPos.y+n.editorPos.height&&(l=n.editorPos.y+n.editorPos.height-1);const c=new nme(n.pos.x,l),u=this._actualDoHitTestWithCaretRangeFromPoint(e,c.toClientCoordinates(ei(e.viewDomNode)));if(u.type===1)return u}return this._actualDoHitTestWithCaretRangeFromPoint(e,n.pos.toClientCoordinates(ei(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,n){const i=W2(e.viewDomNode);let r;if(i?typeof i.caretRangeFromPoint>"u"?r=eyi(i,n.clientX,n.clientY):r=i.caretRangeFromPoint(n.clientX,n.clientY):r=e.viewDomNode.ownerDocument.caretRangeFromPoint(n.clientX,n.clientY),!r||!r.startContainer)return new GN;const o=r.startContainer;if(o.nodeType===o.TEXT_NODE){const s=o.parentNode,a=s?s.parentNode:null,l=a?a.parentNode:null;return(l&&l.nodeType===l.ELEMENT_NODE?l.className:null)===J1.CLASS_NAME?aT.createFromDOMInfo(e,s,r.startOffset):new GN(o.parentNode)}else if(o.nodeType===o.ELEMENT_NODE){const s=o.parentNode,a=s?s.parentNode:null;return(a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===J1.CLASS_NAME?aT.createFromDOMInfo(e,o,o.textContent.length):new GN(o)}return new GN}static _doHitTestWithCaretPositionFromPoint(e,n){const i=e.viewDomNode.ownerDocument.caretPositionFromPoint(n.clientX,n.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){const r=i.offsetNode.parentNode,o=r?r.parentNode:null,s=o?o.parentNode:null;return(s&&s.nodeType===s.ELEMENT_NODE?s.className:null)===J1.CLASS_NAME?aT.createFromDOMInfo(e,i.offsetNode.parentNode,i.offset):new GN(i.offsetNode.parentNode)}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){const r=i.offsetNode.parentNode,o=r&&r.nodeType===r.ELEMENT_NODE?r.className:null,s=r?r.parentNode:null,a=s&&s.nodeType===s.ELEMENT_NODE?s.className:null;if(o===J1.CLASS_NAME){const l=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(l)return aT.createFromDOMInfo(e,l,0)}else if(a===J1.CLASS_NAME)return aT.createFromDOMInfo(e,i.offsetNode,0)}return new GN(i.offsetNode)}static _snapToSoftTabBoundary(e,n){const i=n.getLineContent(e.lineNumber),{tabSize:r}=n.model.getOptions(),o=zH.atomicPosition(i,e.column-1,r,2);return o!==-1?new ot(e.lineNumber,o+1):e}static doHitTest(e,n){let i=new GN;if(typeof e.viewDomNode.ownerDocument.caretRangeFromPoint=="function"?i=this._doHitTestWithCaretRangeFromPoint(e,n):e.viewDomNode.ownerDocument.caretPositionFromPoint&&(i=this._doHitTestWithCaretPositionFromPoint(e,n.pos.toClientCoordinates(ei(e.viewDomNode)))),i.type===1){const r=e.viewModel.getInjectedTextAt(i.position),o=e.viewModel.normalizePosition(i.position,2);(r||!o.equals(i.position))&&(i=new X3t(o,i.spanNode,r))}return i}}function eyi(t,e,n){const i=document.createRange();let r=t.elementFromPoint(e,n);if(r!==null){for(;r&&r.firstChild&&r.firstChild.nodeType!==r.firstChild.TEXT_NODE&&r.lastChild&&r.lastChild.firstChild;)r=r.lastChild;const o=r.getBoundingClientRect(),s=ei(r),a=s.getComputedStyle(r,null).getPropertyValue("font-style"),l=s.getComputedStyle(r,null).getPropertyValue("font-variant"),c=s.getComputedStyle(r,null).getPropertyValue("font-weight"),u=s.getComputedStyle(r,null).getPropertyValue("font-size"),d=s.getComputedStyle(r,null).getPropertyValue("line-height"),h=s.getComputedStyle(r,null).getPropertyValue("font-family"),f=`${a} ${l} ${c} ${u}/${d} ${h}`,m=r.innerText;let p=o.left,g=0,y;if(e>o.left+o.width)g=m.length;else{const _=oTe.getInstance();for(let w=0;w<m.length+1;w++){if(y=_.getCharWidth(m.charAt(w),f)/2,p+=y,e<p){g=w;break}p+=y}}i.setStart(r.firstChild,g),i.setEnd(r.firstChild,g)}return i}const wT=class wT{static getInstance(){return wT._INSTANCE||(wT._INSTANCE=new wT),wT._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(e,n){const i=e+n;if(this._cache[i])return this._cache[i];const r=this._canvas.getContext("2d");r.font=n;const s=r.measureText(e).width;return this._cache[i]=s,s}};wT._INSTANCE=null;let oTe=wT;function el(t,e,n){let i=null,r=null;if(typeof n.value=="function"?(i="value",r=n.value,r.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof n.get=="function"&&(i="get",r=n.get),!r)throw new Error("not supported");const o=`$memoize$${e}`;n[i]=function(...s){return this.hasOwnProperty(o)||Object.defineProperty(this,o,{configurable:!1,enumerable:!1,writable:!1,value:r.apply(this,s)}),this[o]}}var tyi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},hs;(function(t){t.Tap="-monaco-gesturetap",t.Change="-monaco-gesturechange",t.Start="-monaco-gesturestart",t.End="-monaco-gesturesend",t.Contextmenu="-monaco-gesturecontextmenu"})(hs||(hs={}));const gu=class gu extends ct{constructor(){super(),this.dispatched=!1,this.targets=new Ch,this.ignoreTargets=new Ch,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(rn.runAndSubscribe(Ife,({window:e,disposables:n})=>{n.add(yt(e.document,"touchstart",i=>this.onTouchStart(i),{passive:!1})),n.add(yt(e.document,"touchend",i=>this.onTouchEnd(e,i))),n.add(yt(e.document,"touchmove",i=>this.onTouchMove(i),{passive:!1}))},{window:Go,disposables:this._store}))}static addTarget(e){if(!gu.isTouchDevice())return ct.None;gu.INSTANCE||(gu.INSTANCE=new gu);const n=gu.INSTANCE.targets.push(e);return Kn(n)}static ignoreTarget(e){if(!gu.isTouchDevice())return ct.None;gu.INSTANCE||(gu.INSTANCE=new gu);const n=gu.INSTANCE.ignoreTargets.push(e);return Kn(n)}static isTouchDevice(){return"ontouchstart"in Go||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const n=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,r=e.targetTouches.length;i<r;i++){const o=e.targetTouches.item(i);this.activeTouches[o.identifier]={id:o.identifier,initialTarget:o.target,initialTimeStamp:n,initialPageX:o.pageX,initialPageY:o.pageY,rollingTimestamps:[n],rollingPageX:[o.pageX],rollingPageY:[o.pageY]};const s=this.newGestureEvent(hs.Start,o.target);s.pageX=o.pageX,s.pageY=o.pageY,this.dispatchEvent(s)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}onTouchEnd(e,n){const i=Date.now(),r=Object.keys(this.activeTouches).length;for(let o=0,s=n.changedTouches.length;o<s;o++){const a=n.changedTouches.item(o);if(!this.activeTouches.hasOwnProperty(String(a.identifier))){console.warn("move of an UNKNOWN touch",a);continue}const l=this.activeTouches[a.identifier],c=Date.now()-l.initialTimeStamp;if(c<gu.HOLD_DELAY&&Math.abs(l.initialPageX-_g(l.rollingPageX))<30&&Math.abs(l.initialPageY-_g(l.rollingPageY))<30){const u=this.newGestureEvent(hs.Tap,l.initialTarget);u.pageX=_g(l.rollingPageX),u.pageY=_g(l.rollingPageY),this.dispatchEvent(u)}else if(c>=gu.HOLD_DELAY&&Math.abs(l.initialPageX-_g(l.rollingPageX))<30&&Math.abs(l.initialPageY-_g(l.rollingPageY))<30){const u=this.newGestureEvent(hs.Contextmenu,l.initialTarget);u.pageX=_g(l.rollingPageX),u.pageY=_g(l.rollingPageY),this.dispatchEvent(u)}else if(r===1){const u=_g(l.rollingPageX),d=_g(l.rollingPageY),h=_g(l.rollingTimestamps)-l.rollingTimestamps[0],f=u-l.rollingPageX[0],m=d-l.rollingPageY[0],p=[...this.targets].filter(g=>l.initialTarget instanceof Node&&g.contains(l.initialTarget));this.inertia(e,p,i,Math.abs(f)/h,f>0?1:-1,u,Math.abs(m)/h,m>0?1:-1,d)}this.dispatchEvent(this.newGestureEvent(hs.End,l.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(n.preventDefault(),n.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,n){const i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=n,i.tapCount=0,i}dispatchEvent(e){if(e.type===hs.Tap){const n=new Date().getTime();let i=0;n-this._lastSetTapCountTime>gu.CLEAR_TAP_COUNT_TIME?i=1:i=2,this._lastSetTapCountTime=n,e.tapCount=i}else(e.type===hs.Change||e.type===hs.Contextmenu)&&(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(const i of this.ignoreTargets)if(i.contains(e.initialTarget))return;const n=[];for(const i of this.targets)if(i.contains(e.initialTarget)){let r=0,o=e.initialTarget;for(;o&&o!==i;)r++,o=o.parentElement;n.push([r,i])}n.sort((i,r)=>i[0]-r[0]);for(const[i,r]of n)r.dispatchEvent(e),this.dispatched=!0}}inertia(e,n,i,r,o,s,a,l,c){this.handle=Im(e,()=>{const u=Date.now(),d=u-i;let h=0,f=0,m=!0;r+=gu.SCROLL_FRICTION*d,a+=gu.SCROLL_FRICTION*d,r>0&&(m=!1,h=o*r*d),a>0&&(m=!1,f=l*a*d);const p=this.newGestureEvent(hs.Change);p.translationX=h,p.translationY=f,n.forEach(g=>g.dispatchEvent(p)),m||this.inertia(e,n,u,r,o,s+h,a,l,c+f)})}onTouchMove(e){const n=Date.now();for(let i=0,r=e.changedTouches.length;i<r;i++){const o=e.changedTouches.item(i);if(!this.activeTouches.hasOwnProperty(String(o.identifier))){console.warn("end of an UNKNOWN touch",o);continue}const s=this.activeTouches[o.identifier],a=this.newGestureEvent(hs.Change,s.initialTarget);a.translationX=o.pageX-_g(s.rollingPageX),a.translationY=o.pageY-_g(s.rollingPageY),a.pageX=o.pageX,a.pageY=o.pageY,this.dispatchEvent(a),s.rollingPageX.length>3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(o.pageX),s.rollingPageY.push(o.pageY),s.rollingTimestamps.push(n)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}};gu.SCROLL_FRICTION=-.005,gu.HOLD_DELAY=700,gu.CLEAR_TAP_COUNT_TIME=400;let xd=gu;tyi([el],xd,"isTouchDevice",null);let eg=class extends ct{onclick(e,n){this._register(yt(e,Yt.CLICK,i=>n(new uv(ei(e),i))))}onmousedown(e,n){this._register(yt(e,Yt.MOUSE_DOWN,i=>n(new uv(ei(e),i))))}onmouseover(e,n){this._register(yt(e,Yt.MOUSE_OVER,i=>n(new uv(ei(e),i))))}onmouseleave(e,n){this._register(yt(e,Yt.MOUSE_LEAVE,i=>n(new uv(ei(e),i))))}onkeydown(e,n){this._register(yt(e,Yt.KEY_DOWN,i=>n(new as(i))))}onkeyup(e,n){this._register(yt(e,Yt.KEY_UP,i=>n(new as(i))))}oninput(e,n){this._register(yt(e,Yt.INPUT,n))}onblur(e,n){this._register(yt(e,Yt.BLUR,n))}onfocus(e,n){this._register(yt(e,Yt.FOCUS,n))}ignoreGesture(e){return xd.ignoreTarget(e)}};const h5=11;class nyi extends eg{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...ci.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width=h5+"px",this.domNode.style.height=h5+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new R6),this._register(Fa(this.bgDomNode,Yt.POINTER_DOWN,n=>this._arrowPointerDown(n))),this._register(Fa(this.domNode,Yt.POINTER_DOWN,n=>this._arrowPointerDown(n))),this._pointerdownRepeatTimer=this._register(new T8e),this._pointerdownScheduleRepeatTimer=this._register(new Gv)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const n=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,ei(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(n,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}}class iyi extends ct{constructor(e,n,i){super(),this._visibility=e,this._visibleClassName=n,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new Gv)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)==null||e.setClassName(this._visibleClassName)},0))}_hide(e){var n;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(n=this._domNode)==null||n.setClassName(this._invisibleClassName+(e?" fade":"")))}}const ryi=140;class Z3t extends eg{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new iyi(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new R6),this._shouldRender=!0,this.domNode=wo(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(yt(this.domNode.domNode,Yt.POINTER_DOWN,n=>this._domNodePointerDown(n)))}_createArrow(e){const n=this._register(new nyi(e));this.domNode.domNode.appendChild(n.bgDomNode),this.domNode.domNode.appendChild(n.domNode)}_createSlider(e,n,i,r){this.slider=wo(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(n),typeof i=="number"&&this.slider.setWidth(i),typeof r=="number"&&this.slider.setHeight(r),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(yt(this.slider.domNode,Yt.POINTER_DOWN,o=>{o.button===0&&(o.preventDefault(),this._sliderPointerDown(o))})),this.onclick(this.slider.domNode,o=>{o.leftButton&&o.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const n=this.domNode.domNode.getClientRects()[0].top,i=n+this._scrollbarState.getSliderPosition(),r=n+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderPointerPosition(e);i<=o&&o<=r?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let n,i;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")n=e.offsetX,i=e.offsetY;else{const o=Ga(this.domNode.domNode);n=e.pageX-o.left,i=e.pageY-o.top}const r=this._pointerDownRelativePosition(n,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(r):this._scrollbarState.getDesiredScrollPositionFromOffset(r)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const n=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),r=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,o=>{const s=this._sliderOrthogonalPointerPosition(o),a=Math.abs(s-i);if(Fu&&a>ryi){this._setDesiredScrollPositionNow(r.getScrollPosition());return}const c=this._sliderPointerPosition(o)-n;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(c))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const n={};this.writeScrollPosition(n,e),this._scrollable.setScrollPositionNow(n)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}const oyi=20;class f5{constructor(e,n,i,r,o,s){this._scrollbarSize=Math.round(n),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=r,this._scrollSize=o,this._scrollPosition=s,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new f5(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const n=Math.round(e);return this._visibleSize!==n?(this._visibleSize=n,this._refreshComputedValues(),!0):!1}setScrollSize(e){const n=Math.round(e);return this._scrollSize!==n?(this._scrollSize=n,this._refreshComputedValues(),!0):!1}setScrollPosition(e){const n=Math.round(e);return this._scrollPosition!==n?(this._scrollPosition=n,this._refreshComputedValues(),!0):!1}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,n,i,r,o){const s=Math.max(0,i-e),a=Math.max(0,s-2*n),l=r>0&&r>i;if(!l)return{computedAvailableSize:Math.round(s),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};const c=Math.round(Math.max(oyi,Math.floor(i*a/r))),u=(a-c)/(r-i),d=o*u;return{computedAvailableSize:Math.round(s),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:u,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){const e=f5._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const n=e-this._arrowSize-this._computedSliderSize/2;return Math.round(n/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const n=e-this._arrowSize;let i=this._scrollPosition;return n<this._computedSliderPosition?i-=this._visibleSize:i+=this._visibleSize,i}getDesiredScrollPositionFromDelta(e){if(!this._computedIsNeeded)return 0;const n=this._computedSliderPosition+e;return Math.round(n/this._computedSliderRatio)}}class syi extends Z3t{constructor(e,n,i){const r=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:n.lazyRender,host:i,scrollbarState:new f5(n.horizontalHasArrows?n.arrowSize:0,n.horizontal===2?0:n.horizontalScrollbarSize,n.vertical===2?0:n.verticalScrollbarSize,r.width,r.scrollWidth,o.scrollLeft),visibility:n.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:n.scrollByPage}),n.horizontalHasArrows){const s=(n.arrowSize-h5)/2,a=(n.horizontalScrollbarSize-h5)/2;this._createArrow({className:"scra",icon:qt.scrollbarButtonLeft,top:a,left:s,bottom:void 0,right:void 0,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new H2(null,1,0))}),this._createArrow({className:"scra",icon:qt.scrollbarButtonRight,top:a,left:void 0,bottom:void 0,right:s,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new H2(null,-1,0))})}this._createSlider(Math.floor((n.horizontalScrollbarSize-n.horizontalSliderSize)/2),0,void 0,n.horizontalSliderSize)}_updateSlider(e,n){this.slider.setWidth(e),this.slider.setLeft(n)}_renderDomNode(e,n){this.domNode.setWidth(e),this.domNode.setHeight(n),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,n){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,n){e.scrollLeft=n}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class ayi extends Z3t{constructor(e,n,i){const r=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:n.lazyRender,host:i,scrollbarState:new f5(n.verticalHasArrows?n.arrowSize:0,n.vertical===2?0:n.verticalScrollbarSize,0,r.height,r.scrollHeight,o.scrollTop),visibility:n.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:n.scrollByPage}),n.verticalHasArrows){const s=(n.arrowSize-h5)/2,a=(n.verticalScrollbarSize-h5)/2;this._createArrow({className:"scra",icon:qt.scrollbarButtonUp,top:s,left:a,bottom:void 0,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:()=>this._host.onMouseWheel(new H2(null,0,1))}),this._createArrow({className:"scra",icon:qt.scrollbarButtonDown,top:void 0,left:a,bottom:s,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:()=>this._host.onMouseWheel(new H2(null,0,-1))})}this._createSlider(0,Math.floor((n.verticalScrollbarSize-n.verticalSliderSize)/2),n.verticalSliderSize,void 0)}_updateSlider(e,n){this.slider.setHeight(e),this.slider.setTop(n)}_renderDomNode(e,n){this.domNode.setWidth(n),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,n){return n}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,n){e.scrollTop=n}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}class hre{constructor(e,n,i,r,o,s,a){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(n=n|0,i=i|0,r=r|0,o=o|0,s=s|0,a=a|0),this.rawScrollLeft=r,this.rawScrollTop=a,n<0&&(n=0),r+n>i&&(r=i-n),r<0&&(r=0),o<0&&(o=0),a+o>s&&(a=s-o),a<0&&(a=0),this.width=n,this.scrollWidth=i,this.scrollLeft=r,this.height=o,this.scrollHeight=s,this.scrollTop=a}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,n){return new hre(this._forceIntegerValues,typeof e.width<"u"?e.width:this.width,typeof e.scrollWidth<"u"?e.scrollWidth:this.scrollWidth,n?this.rawScrollLeft:this.scrollLeft,typeof e.height<"u"?e.height:this.height,typeof e.scrollHeight<"u"?e.scrollHeight:this.scrollHeight,n?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new hre(this._forceIntegerValues,this.width,this.scrollWidth,typeof e.scrollLeft<"u"?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof e.scrollTop<"u"?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,n){const i=this.width!==e.width,r=this.scrollWidth!==e.scrollWidth,o=this.scrollLeft!==e.scrollLeft,s=this.height!==e.height,a=this.scrollHeight!==e.scrollHeight,l=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:n,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:r,scrollLeftChanged:o,heightChanged:s,scrollHeightChanged:a,scrollTopChanged:l}}}class O6 extends ct{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new st),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new hre(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,n){var r;const i=this._state.withScrollDimensions(e,n);this._setState(i,!!this._smoothScrolling),(r=this._smoothScrolling)==null||r.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const n=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(n,!1)}setScrollPositionSmooth(e,n){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let r;n?r=new HH(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):r=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=r}else{const i=this._state.withScrollPosition(e);this._smoothScrolling=HH.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),n=this._state.withScrollPosition(e);if(this._setState(n,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,n){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,n)))}}class dat{constructor(e,n,i){this.scrollLeft=e,this.scrollTop=n,this.isDone=i}}function Zwe(t,e){const n=e-t;return function(i){return t+n*uyi(i)}}function lyi(t,e,n){return function(i){return i<n?t(i/n):e((i-n)/(1-n))}}class HH{constructor(e,n,i,r){this.from=e,this.to=n,this.duration=r,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,n,i){if(Math.abs(e-n)>2.5*i){let o,s;return e<n?(o=e+.75*i,s=n-.75*i):(o=e-.75*i,s=n+.75*i),lyi(Zwe(e,o),Zwe(s,n),.33)}return Zwe(e,n)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(e){this.to=e.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(e){const n=(e-this.startTime)/this.duration;if(n<1){const i=this.scrollLeft(n),r=this.scrollTop(n);return new dat(i,r,!1)}return new dat(this.to.scrollLeft,this.to.scrollTop,!0)}combine(e,n,i){return HH.start(e,n,i)}static start(e,n,i){i=i+10;const r=Date.now()-10;return new HH(e,n,r,i)}}function cyi(t){return Math.pow(t,3)}function uyi(t){return 1-cyi(1-t)}const dyi=500,hat=50;class hyi{constructor(e,n,i){this.timestamp=e,this.deltaX=n,this.deltaY=i,this.score=0}}const Hle=class Hle{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let e=1,n=0,i=1,r=this._rear;do{const o=r===this._front?e:Math.pow(2,-i);if(e-=o,n+=this._memory[r].score*o,r===this._front)break;r=(this._capacity+r-1)%this._capacity,i++}while(!0);return n<=.5}acceptStandardWheelEvent(e){if(bq){const n=ei(e.browserEvent),i=ahi(n);this.accept(Date.now(),e.deltaX*i,e.deltaY*i)}else this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,n,i){let r=null;const o=new hyi(e,n,i);this._front===-1&&this._rear===-1?(this._memory[0]=o,this._front=0,this._rear=0):(r=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=o),o.score=this._computeScore(o,r)}_computeScore(e,n){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let i=.5;if((!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(i+=.25),n){const r=Math.abs(e.deltaX),o=Math.abs(e.deltaY),s=Math.abs(n.deltaX),a=Math.abs(n.deltaY),l=Math.max(Math.min(r,s),1),c=Math.max(Math.min(o,a),1),u=Math.max(r,s),d=Math.max(o,a);u%l===0&&d%c===0&&(i-=.5)}return Math.min(Math.max(i,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}};Hle.INSTANCE=new Hle;let fre=Hle;class mVe extends eg{get options(){return this._options}constructor(e,n,i){super(),this._onScroll=this._register(new st),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new st),e.style.overflow="hidden",this._options=fyi(n),this._scrollable=i,this._register(this._scrollable.onScroll(o=>{this._onWillScroll.fire(o),this._onDidScroll(o),this._onScroll.fire(o)}));const r={onMouseWheel:o=>this._onMouseWheel(o),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new ayi(this._scrollable,this._options,r)),this._horizontalScrollbar=this._register(new syi(this._scrollable,this._options,r)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=wo(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=wo(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=wo(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,o=>this._onMouseOver(o)),this.onmouseleave(this._listenOnDomNode,o=>this._onMouseLeave(o)),this._hideTimeout=this._register(new Gv),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=Jo(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,xr&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new H2(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Jo(this._mouseWheelToDispose),e)){const i=r=>{this._onMouseWheel(new H2(r))};this._mouseWheelToDispose.push(yt(this._listenOnDomNode,Yt.MOUSE_WHEEL,i,{passive:!1}))}}_onMouseWheel(e){var o;if((o=e.browserEvent)!=null&&o.defaultPrevented)return;const n=fre.INSTANCE;n.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let s=e.deltaY*this._options.mouseWheelScrollSensitivity,a=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&a+s===0?a=s=0:Math.abs(s)>=Math.abs(a)?a=0:s=0),this._options.flipAxes&&([s,a]=[a,s]);const l=!xr&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||l)&&!a&&(a=s,s=0),e.browserEvent&&e.browserEvent.altKey&&(a=a*this._options.fastScrollSensitivity,s=s*this._options.fastScrollSensitivity);const c=this._scrollable.getFutureScrollPosition();let u={};if(s){const d=hat*s,h=c.scrollTop-(d<0?Math.floor(d):Math.ceil(d));this._verticalScrollbar.writeScrollPosition(u,h)}if(a){const d=hat*a,h=c.scrollLeft-(d<0?Math.floor(d):Math.ceil(d));this._horizontalScrollbar.writeScrollPosition(u,h)}u=this._scrollable.validateScrollPosition(u),(c.scrollLeft!==u.scrollLeft||c.scrollTop!==u.scrollTop)&&(this._options.mouseWheelSmoothScroll&&n.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(u):this._scrollable.setScrollPositionNow(u),i=!0)}let r=i;!r&&this._options.alwaysConsumeMouseWheel&&(r=!0),!r&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(r=!0),r&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),n=e.scrollTop>0,i=e.scrollLeft>0,r=i?" left":"",o=n?" top":"",s=i||n?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${r}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${s}${o}${r}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),dyi)}}class Q3t extends mVe{constructor(e,n){n=n||{},n.mouseWheelSmoothScroll=!1;const i=new O6({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:r=>Im(ei(e),r)});super(e,n,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class rme extends mVe{constructor(e,n,i){super(e,n,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class Eq extends mVe{constructor(e,n){n=n||{},n.mouseWheelSmoothScroll=!1;const i=new O6({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:r=>Im(ei(e),r)});super(e,n,i),this._register(i),this._element=e,this._register(this.onScroll(r=>{r.scrollTopChanged&&(this._element.scrollTop=r.scrollTop),r.scrollLeftChanged&&(this._element.scrollLeft=r.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}function fyi(t){const e={lazyRender:typeof t.lazyRender<"u"?t.lazyRender:!1,className:typeof t.className<"u"?t.className:"",useShadows:typeof t.useShadows<"u"?t.useShadows:!0,handleMouseWheel:typeof t.handleMouseWheel<"u"?t.handleMouseWheel:!0,flipAxes:typeof t.flipAxes<"u"?t.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof t.consumeMouseWheelIfScrollbarIsNeeded<"u"?t.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof t.alwaysConsumeMouseWheel<"u"?t.alwaysConsumeMouseWheel:!1,scrollYToX:typeof t.scrollYToX<"u"?t.scrollYToX:!1,mouseWheelScrollSensitivity:typeof t.mouseWheelScrollSensitivity<"u"?t.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof t.fastScrollSensitivity<"u"?t.fastScrollSensitivity:5,scrollPredominantAxis:typeof t.scrollPredominantAxis<"u"?t.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof t.mouseWheelSmoothScroll<"u"?t.mouseWheelSmoothScroll:!0,arrowSize:typeof t.arrowSize<"u"?t.arrowSize:11,listenOnDomNode:typeof t.listenOnDomNode<"u"?t.listenOnDomNode:null,horizontal:typeof t.horizontal<"u"?t.horizontal:1,horizontalScrollbarSize:typeof t.horizontalScrollbarSize<"u"?t.horizontalScrollbarSize:10,horizontalSliderSize:typeof t.horizontalSliderSize<"u"?t.horizontalSliderSize:0,horizontalHasArrows:typeof t.horizontalHasArrows<"u"?t.horizontalHasArrows:!1,vertical:typeof t.vertical<"u"?t.vertical:1,verticalScrollbarSize:typeof t.verticalScrollbarSize<"u"?t.verticalScrollbarSize:10,verticalHasArrows:typeof t.verticalHasArrows<"u"?t.verticalHasArrows:!1,verticalSliderSize:typeof t.verticalSliderSize<"u"?t.verticalSliderSize:0,scrollByPage:typeof t.scrollByPage<"u"?t.scrollByPage:!1};return e.horizontalSliderSize=typeof t.horizontalSliderSize<"u"?t.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof t.verticalSliderSize<"u"?t.verticalSliderSize:e.verticalScrollbarSize,xr&&(e.className+=" mac"),e}class pVe extends Nq{constructor(e,n,i){super(),this._mouseLeaveMonitor=null,this._mouseOnOverflowWidgetsDomNode=!1,this._mouseOnViewDomNode=!1,this._context=e,this.viewController=n,this.viewHelper=i,this.mouseTargetFactory=new Ju(this._context,i),this._mouseDownOperation=this._register(new myi(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(a,l)=>this._createMouseTargetForView(a,l),a=>this._getMouseColumn(a))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(146).height;const r=new $vi(this.viewHelper.viewDomNode);this._register(r.onContextMenu(this.viewHelper.viewDomNode,a=>this._onContextMenu(a,!0))),this._register(r.onMouseMove(this.viewHelper.viewDomNode,a=>{this._mouseOnViewDomNode=!0,this._onMouseMoveOverView(a),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=yt(this.viewHelper.viewDomNode.ownerDocument,"mousemove",l=>{this.viewHelper.viewDomNode.contains(l.target)||(this._mouseOnViewDomNode=!1,setTimeout(()=>{this._mouseOnOverflowWidgetsDomNode||this._onMouseLeave(new mk(l,!1,this.viewHelper.viewDomNode))},0))}))})),this._register(r.onMouseUp(this.viewHelper.viewDomNode,a=>this._onMouseUp(a))),this._register(r.onMouseLeave(this.viewHelper.viewDomNode,a=>{this._mouseOnViewDomNode=!1,setTimeout(()=>{this._mouseOnOverflowWidgetsDomNode||this._onMouseLeave(a)},0)}));const o=this.viewHelper.overflowWidgetsDomNode;o&&(this._register(r.onMouseMove(o,a=>{var l;this._mouseOnOverflowWidgetsDomNode=!0,(l=this._mouseLeaveMonitor)==null||l.dispose(),this._mouseLeaveMonitor=null,this._onMouseMoveOverOverflowWidgetsDomNode(a)})),this._register(r.onMouseLeave(o,a=>{this._mouseOnOverflowWidgetsDomNode=!1,setTimeout(()=>{this._mouseOnViewDomNode||this._onMouseLeave(a)},0)})));let s=0;this._register(r.onPointerDown(this.viewHelper.viewDomNode,(a,l)=>{s=l})),this._register(yt(this.viewHelper.viewDomNode,Yt.POINTER_UP,a=>{this._mouseDownOperation.onPointerUp()})),this._register(r.onMouseDown(this.viewHelper.viewDomNode,a=>this._onMouseDown(a,s))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const e=fre.INSTANCE;let n=0,i=jg.getZoomLevel(),r=!1,o=0;const s=l=>{if(this.viewController.emitMouseWheel(l),!this._context.configuration.options.get(76))return;const c=new H2(l);if(e.acceptStandardWheelEvent(c),e.isPhysicalMouseWheel()){if(a(l)){const u=jg.getZoomLevel(),d=c.deltaY>0?1:-1;jg.setZoomLevel(u+d),c.preventDefault(),c.stopPropagation()}}else Date.now()-n>50&&(i=jg.getZoomLevel(),r=a(l),o=0),n=Date.now(),o+=c.deltaY,r&&(jg.setZoomLevel(i+o/5),c.preventDefault(),c.stopPropagation())};this._register(yt(this.viewHelper.viewDomNode,Yt.MOUSE_WHEEL,s,{capture:!0,passive:!1}));function a(l){return xr?(l.metaKey||l.ctrlKey)&&!l.shiftKey&&!l.altKey:l.ctrlKey&&!l.metaKey&&!l.shiftKey&&!l.altKey}}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(146)){const n=this._context.configuration.options.get(146).height;this._height!==n&&(this._height=n,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,n){const r=new q3t(e,n).toPageCoordinates(ei(this.viewHelper.viewDomNode)),o=dVe(this.viewHelper.viewDomNode);if(r.y<o.y||r.y>o.y+o.height||r.x<o.x||r.x>o.x+o.width)return null;const s=hVe(this.viewHelper.viewDomNode,o,r);return this.mouseTargetFactory.createMouseTargetForView(this.viewHelper.getLastRenderData(),o,r,s,null)}_createMouseTargetForView(e,n){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const r=W2(this.viewHelper.viewDomNode);r&&(i=r.elementsFromPoint(e.posx,e.posy).find(o=>this.viewHelper.viewDomNode.contains(o)))}return this.mouseTargetFactory.createMouseTargetForView(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,n?i:null)}_createMouseTargetForOverflowWidgetsDomNode(e){return this.mouseTargetFactory.createMouseTargetForOverflowWidgetsDomNode(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,e.target)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,n){this.viewController.emitContextMenu({event:e,target:this._createMouseTargetForView(e,n)})}_onMouseMoveOverView(e){this._onMouseMove(e,this._createMouseTargetForView(e,!0))}_onMouseMoveOverOverflowWidgetsDomNode(e){this._onMouseMove(e,this._createMouseTargetForOverflowWidgetsDomNode(e))}_onMouseMove(e,n){this._shouldIgnoreMouseMoveEvent(e)||this.viewController.emitMouseMove({event:e,target:n})}_shouldIgnoreMouseMoveEvent(e){return this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),!!(this._mouseDownOperation.isActive()||e.timestamp<this.lastMouseLeaveTime)}_onMouseLeave(e){this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:e,target:null})}_onMouseUp(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTargetForView(e,!0)})}_onMouseDown(e,n){const i=this._createMouseTargetForView(e,!0),r=i.type===6||i.type===7,o=i.type===2||i.type===3||i.type===4,s=i.type===3,a=this._context.configuration.options.get(110),l=i.type===8||i.type===5,c=i.type===9;let u=e.leftButton||e.middleButton;xr&&e.leftButton&&e.ctrlKey&&(u=!1);const d=()=>{e.preventDefault(),this.viewHelper.focusTextArea()};if(u&&(r||s&&a))d(),this._mouseDownOperation.start(i.type,e,n);else if(o)e.preventDefault();else if(l){const h=i.detail;u&&this.viewHelper.shouldSuppressMouseDownOnViewZone(h.viewZoneId)&&(d(),this._mouseDownOperation.start(i.type,e,n),e.preventDefault())}else c&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}}class myi extends ct{constructor(e,n,i,r,o,s){super(),this._context=e,this._viewController=n,this._viewHelper=i,this._mouseTargetFactory=r,this._createMouseTarget=o,this._getMouseColumn=s,this._mouseMoveMonitor=this._register(new Bvi(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new pyi(this._context,this._viewHelper,this._mouseTargetFactory,(a,l,c)=>this._dispatchMouse(a,l,c))),this._mouseState=new sTe,this._currentSelection=new Pn(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const n=this._findMousePosition(e,!1);n&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:n}):n.type===13&&(n.outsidePosition==="above"||n.outsidePosition==="below")?this._topBottomDragScrolling.start(n,e):(this._topBottomDragScrolling.stop(),this._dispatchMouse(n,!0,1)))}start(e,n,i){this._lastMouseEvent=n,this._mouseState.setStartedOnLineNumbers(e===3),this._mouseState.setStartButtons(n),this._mouseState.setModifiers(n);const r=this._findMousePosition(n,!0);if(!r||!r.position)return;this._mouseState.trySetCount(n.detail,r.position),n.detail=this._mouseState.count;const o=this._context.configuration.options;if(!o.get(92)&&o.get(35)&&!o.get(22)&&!this._mouseState.altKey&&n.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&r.type===6&&r.position&&this._currentSelection.containsPosition(r.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,n.buttons,s=>this._onMouseDownThenMove(s),s=>{const a=this._findMousePosition(this._lastMouseEvent,!1);U1(s)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:a?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(r,n.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,n.buttons,s=>this._onMouseDownThenMove(s),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const n=e.editorPos,i=this._context.viewModel,r=this._context.viewLayout,o=this._getMouseColumn(e);if(e.posy<n.y){const a=n.y-e.posy,l=Math.max(r.getCurrentScrollTop()-a,0),c=q2.getZoneAtCoord(this._context,l);if(c){const d=this._helpPositionJumpOverViewZone(c);if(d)return jd.createOutsideEditor(o,d,"above",a)}const u=r.getLineNumberAtVerticalOffset(l);return jd.createOutsideEditor(o,new ot(u,1),"above",a)}if(e.posy>n.y+n.height){const a=e.posy-n.y-n.height,l=r.getCurrentScrollTop()+e.relativePos.y,c=q2.getZoneAtCoord(this._context,l);if(c){const d=this._helpPositionJumpOverViewZone(c);if(d)return jd.createOutsideEditor(o,d,"below",a)}const u=r.getLineNumberAtVerticalOffset(l);return jd.createOutsideEditor(o,new ot(u,i.getLineMaxColumn(u)),"below",a)}const s=r.getLineNumberAtVerticalOffset(r.getCurrentScrollTop()+e.relativePos.y);if(e.posx<n.x){const a=n.x-e.posx;return jd.createOutsideEditor(o,new ot(s,1),"left",a)}if(e.posx>n.x+n.width){const a=e.posx-n.x-n.width;return jd.createOutsideEditor(o,new ot(s,i.getLineMaxColumn(s)),"right",a)}return null}_findMousePosition(e,n){const i=this._getPositionOutsideEditor(e);if(i)return i;const r=this._createMouseTarget(e,n);if(!r.position)return null;if(r.type===8||r.type===5){const s=this._helpPositionJumpOverViewZone(r.detail);if(s)return jd.createViewZone(r.type,r.element,r.mouseColumn,s,r.detail)}return r}_helpPositionJumpOverViewZone(e){const n=new ot(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,r=e.positionAfter;return i&&r?i.isBefore(n)?i:r:null}_dispatchMouse(e,n,i){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:i,inSelectionMode:n,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:e.type===6&&e.detail.injectedText!==null})}}class pyi extends ct{constructor(e,n,i,r){super(),this._context=e,this._viewHelper=n,this._mouseTargetFactory=i,this._dispatchMouse=r,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,n){this._operation?this._operation.setPosition(e,n):this._operation=new gyi(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,n)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class gyi extends ct{constructor(e,n,i,r,o,s){super(),this._context=e,this._viewHelper=n,this._mouseTargetFactory=i,this._dispatchMouse=r,this._position=o,this._mouseEvent=s,this._lastTime=Date.now(),this._animationFrameDisposable=Im(ei(s.browserEvent),()=>this._execute())}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(e,n){this._position=e,this._mouseEvent=n}_tick(){const e=Date.now(),n=e-this._lastTime;return this._lastTime=e,n}_getScrollSpeed(){const e=this._context.configuration.options.get(67),n=this._context.configuration.options.get(146).height/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,n*(1+i)):i<=3?Math.max(60,n*(2+i)):Math.max(200,n*(7+i))}_execute(){const e=this._context.configuration.options.get(67),n=this._getScrollSpeed(),i=this._tick(),r=n*(i/1e3)*e,o=this._position.outsidePosition==="above"?-r:r;this._context.viewModel.viewLayout.deltaScrollNow(0,o),this._viewHelper.renderNow();const s=this._context.viewLayout.getLinesViewportData(),a=this._position.outsidePosition==="above"?s.startLineNumber:s.endLineNumber;let l;{const c=dVe(this._viewHelper.viewDomNode),u=this._context.configuration.options.get(146).horizontalScrollbarHeight,d=new nme(this._mouseEvent.pos.x,c.y+c.height-u-.1),h=hVe(this._viewHelper.viewDomNode,c,d);l=this._mouseTargetFactory.createMouseTargetForView(this._viewHelper.getLastRenderData(),c,d,h,null)}(!l.position||l.position.lineNumber!==a)&&(this._position.outsidePosition==="above"?l=jd.createOutsideEditor(this._position.mouseColumn,new ot(a,1),"above",this._position.outsideDistance):l=jd.createOutsideEditor(this._position.mouseColumn,new ot(a,this._context.viewModel.getLineMaxColumn(a)),"below",this._position.outsideDistance)),this._dispatchMouse(l,!0,2),this._animationFrameDisposable=Im(ei(l.element),()=>this._execute())}}const Wle=class Wle{get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,n){const i=new Date().getTime();i-this._lastSetMouseDownCountTime>Wle.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(n)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=n,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}};Wle.CLEAR_MOUSE_DOWN_COUNT_TIME=400;let sTe=Wle;class Er{get event(){return this.emitter.event}constructor(e,n,i){const r=o=>this.emitter.fire(o);this.emitter=new st({onWillAddFirstListener:()=>e.addEventListener(n,r,i),onDidRemoveLastListener:()=>e.removeEventListener(n,r,i)})}dispose(){this.emitter.dispose()}}const H4=class H4{constructor(e,n,i,r,o){this.value=e,this.selectionStart=n,this.selectionEnd=i,this.selection=r,this.newlineCountBeforeSelection=o}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,n){const i=e.getValue(),r=e.getSelectionStart(),o=e.getSelectionEnd();let s;if(n){const a=i.substring(0,r),l=n.value.substring(0,n.selectionStart);a===l&&(s=n.newlineCountBeforeSelection)}return new H4(i,r,o,null,s)}collapseSelection(){return this.selectionStart===this.value.length?this:new H4(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,n,i){n.setValue(e,this.value),i&&n.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){var r,o,s,a;if(e<=this.selectionStart){const l=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(((r=this.selection)==null?void 0:r.getStartPosition())??null,l,-1)}if(e>=this.selectionEnd){const l=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(((o=this.selection)==null?void 0:o.getEndPosition())??null,l,1)}const n=this.value.substring(this.selectionStart,e);if(n.indexOf("…")===-1)return this._finishDeduceEditorPosition(((s=this.selection)==null?void 0:s.getStartPosition())??null,n,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(((a=this.selection)==null?void 0:a.getEndPosition())??null,i,-1)}_finishDeduceEditorPosition(e,n,i){let r=0,o=-1;for(;(o=n.indexOf(`
`,o+1))!==-1;)r++;return[e,i*n.length,r]}static deduceInput(e,n,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const r=Math.min(ck(e.value,n.value),e.selectionStart,n.selectionStart),o=Math.min($ie(e.value,n.value),e.value.length-e.selectionEnd,n.value.length-n.selectionEnd);e.value.substring(r,e.value.length-o);const s=n.value.substring(r,n.value.length-o),a=e.selectionStart-r,l=e.selectionEnd-r,c=n.selectionStart-r,u=n.selectionEnd-r;if(c===u){const h=e.selectionStart-r;return{text:s,replacePrevCharCnt:h,replaceNextCharCnt:0,positionDelta:0}}const d=l-a;return{text:s,replacePrevCharCnt:d,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,n){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===n.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:n.selectionEnd-e.selectionEnd};const i=Math.min(ck(e.value,n.value),e.selectionEnd),r=Math.min($ie(e.value,n.value),e.value.length-e.selectionEnd),o=e.value.substring(i,e.value.length-r),s=n.value.substring(i,n.value.length-r);e.selectionStart-i;const a=e.selectionEnd-i;n.selectionStart-i;const l=n.selectionEnd-i;return{text:s,replacePrevCharCnt:a,replaceNextCharCnt:o.length-a,positionDelta:l-s.length}}};H4.EMPTY=new H4("",0,0,null,void 0);let Fd=H4;class f4{static _getPageOfLine(e,n){return Math.floor((e-1)/n)}static _getRangeForPage(e,n){const i=e*n,r=i+1,o=i+n;return new ve(r,1,o+1,1)}static fromEditorSelection(e,n,i,r){const s=f4._getPageOfLine(n.startLineNumber,i),a=f4._getRangeForPage(s,i),l=f4._getPageOfLine(n.endLineNumber,i),c=f4._getRangeForPage(l,i);let u=a.intersectRanges(new ve(1,1,n.startLineNumber,n.startColumn));if(r&&e.getValueLengthInRange(u,1)>500){const y=e.modifyPosition(u.getEndPosition(),-500);u=ve.fromPositions(y,u.getEndPosition())}const d=e.getValueInRange(u,1),h=e.getLineCount(),f=e.getLineMaxColumn(h);let m=c.intersectRanges(new ve(n.endLineNumber,n.endColumn,h,f));if(r&&e.getValueLengthInRange(m,1)>500){const y=e.modifyPosition(m.getStartPosition(),500);m=ve.fromPositions(m.getStartPosition(),y)}const p=e.getValueInRange(m,1);let g;if(s===l||s+1===l)g=e.getValueInRange(n,1);else{const y=a.intersectRanges(n),_=c.intersectRanges(n);g=e.getValueInRange(y,1)+"…"+e.getValueInRange(_,1)}return r&&g.length>2*500&&(g=g.substring(0,500)+"…"+g.substring(g.length-500,g.length)),new Fd(d+g+p,d.length,d.length+g.length,n,u.endLineNumber-u.startLineNumber)}}var byi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},fat=function(t,e){return function(n,i){e(n,i,t)}},mre;(function(t){t.Tap="-monaco-textarea-synthetic-tap"})(mre||(mre={}));const aTe={forceCopyWithSyntaxHighlighting:!1},Ule=class Ule{constructor(){this._lastState=null}set(e,n){this._lastState={lastCopiedValue:e,data:n}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}};Ule.INSTANCE=new Ule;let WH=Ule;class vyi{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){e=e||"";const n={text:e,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,n}}let lTe=class extends ct{get textAreaState(){return this._textAreaState}constructor(e,n,i,r,o,s){super(),this._host=e,this._textArea=n,this._OS=i,this._browser=r,this._accessibilityService=o,this._logService=s,this._onFocus=this._register(new st),this.onFocus=this._onFocus.event,this._onBlur=this._register(new st),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new st),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new st),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new st),this.onCut=this._onCut.event,this._onPaste=this._register(new st),this.onPaste=this._onPaste.event,this._onType=this._register(new st),this.onType=this._onType.event,this._onCompositionStart=this._register(new st),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new st),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new st),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new st),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new mc),this._asyncTriggerCut=this._register(new Wo(()=>this._onCut.fire(),0)),this._textAreaState=Fd.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(rn.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new Wo(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let a=null;this._register(this._textArea.onKeyDown(l=>{const c=new as(l);(c.keyCode===114||this._currentComposition&&c.keyCode===1)&&c.stopPropagation(),c.equals(9)&&c.preventDefault(),a=c,this._onKeyDown.fire(c)})),this._register(this._textArea.onKeyUp(l=>{const c=new as(l);this._onKeyUp.fire(c)})),this._register(this._textArea.onCompositionStart(l=>{const c=new vyi;if(this._currentComposition){this._currentComposition=c;return}if(this._currentComposition=c,this._OS===2&&a&&a.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===l.data&&(a.code==="ArrowRight"||a.code==="ArrowLeft")){c.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:l.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:l.data});return}this._onCompositionStart.fire({data:l.data})})),this._register(this._textArea.onCompositionUpdate(l=>{const c=this._currentComposition;if(!c)return;if(this._browser.isAndroid){const d=Fd.readFromTextArea(this._textArea,this._textAreaState),h=Fd.deduceAndroidCompositionInput(this._textAreaState,d);this._textAreaState=d,this._onType.fire(h),this._onCompositionUpdate.fire(l);return}const u=c.handleCompositionUpdate(l.data);this._textAreaState=Fd.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(u),this._onCompositionUpdate.fire(l)})),this._register(this._textArea.onCompositionEnd(l=>{const c=this._currentComposition;if(!c)return;if(this._currentComposition=null,this._browser.isAndroid){const d=Fd.readFromTextArea(this._textArea,this._textAreaState),h=Fd.deduceAndroidCompositionInput(this._textAreaState,d);this._textAreaState=d,this._onType.fire(h),this._onCompositionEnd.fire();return}const u=c.handleCompositionUpdate(l.data);this._textAreaState=Fd.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(u),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(l=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const c=Fd.readFromTextArea(this._textArea,this._textAreaState),u=Fd.deduceInput(this._textAreaState,c,this._OS===2);u.replacePrevCharCnt===0&&u.text.length===1&&(sc(u.text.charCodeAt(0))||u.text.charCodeAt(0)===127)||(this._textAreaState=c,(u.text!==""||u.replacePrevCharCnt!==0||u.replaceNextCharCnt!==0||u.positionDelta!==0)&&this._onType.fire(u))})),this._register(this._textArea.onCut(l=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(l),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(l=>{this._ensureClipboardGetsEditorSelection(l)})),this._register(this._textArea.onPaste(l=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),l.preventDefault(),!l.clipboardData)return;let[c,u]=cTe.getTextData(l.clipboardData);c&&(u=u||WH.INSTANCE.get(c),this._onPaste.fire({text:c,metadata:u}))})),this._register(this._textArea.onFocus(()=>{const l=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!l&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new Wo(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return yt(this._textArea.ownerDocument,"selectionchange",n=>{if(zE.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const i=Date.now(),r=i-e;if(e=i,r<5)return;const o=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),o<100||!this._textAreaState.selection)return;const s=this._textArea.getValue();if(this._textAreaState.value!==s)return;const a=this._textArea.getSelectionStart(),l=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===a&&this._textAreaState.selectionEnd===l)return;const c=this._textAreaState.deduceEditorPosition(a),u=this._host.deduceModelPosition(c[0],c[1],c[2]),d=this._textAreaState.deduceEditorPosition(l),h=this._host.deduceModelPosition(d[0],d[1],d[2]),f=new Pn(u.lineNumber,u.column,h.lineNumber,h.column);this._onSelectionChangeRequest.fire(f)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,n){this._hasFocus||(n=n.collapseSelection()),n.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=n}writeNativeTextAreaContent(e){!this._accessibilityService.isScreenReaderOptimized()&&e==="render"||this._currentComposition||(this._logService.trace(`writeTextAreaState(reason: ${e})`),this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent()))}_ensureClipboardGetsEditorSelection(e){const n=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:n.isFromEmptySelection,multicursorText:n.multicursorText,mode:n.mode};WH.INSTANCE.set(this._browser.isFirefox?n.text.replace(/\r\n/g,`
`):n.text,i),e.preventDefault(),e.clipboardData&&cTe.setTextData(e.clipboardData,n.text,n.html,i)}};lTe=byi([fat(4,Bm),fat(5,Nd)],lTe);const cTe={getTextData(t){const e=t.getData(Pa.text);let n=null;const i=t.getData("vscode-editor-data");if(typeof i=="string")try{n=JSON.parse(i),n.version!==1&&(n=null)}catch{}return e.length===0&&n===null&&t.files.length>0?[Array.prototype.slice.call(t.files,0).map(o=>o.name).join(`
`),null]:[e,n]},setTextData(t,e,n,i){t.setData(Pa.text,e),typeof n=="string"&&t.setData("text/html",n),t.setData("vscode-editor-data",JSON.stringify(i))}};class yyi extends ct{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new Er(this._actual,"keydown")).event,this.onKeyUp=this._register(new Er(this._actual,"keyup")).event,this.onCompositionStart=this._register(new Er(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new Er(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new Er(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new Er(this._actual,"beforeinput")).event,this.onInput=this._register(new Er(this._actual,"input")).event,this.onCut=this._register(new Er(this._actual,"cut")).event,this.onCopy=this._register(new Er(this._actual,"copy")).event,this.onPaste=this._register(new Er(this._actual,"paste")).event,this.onFocus=this._register(new Er(this._actual,"focus")).event,this.onBlur=this._register(new Er(this._actual,"blur")).event,this._onSyntheticTap=this._register(new st),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown(()=>zE.onKeyDown())),this._register(this.onBeforeInput(()=>zE.onBeforeInput())),this._register(this.onInput(()=>zE.onInput())),this._register(this.onKeyUp(()=>zE.onKeyUp())),this._register(yt(this._actual,mre.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const e=W2(this._actual);return e?e.activeElement===this._actual:this._actual.isConnected?Au()===this._actual:!1}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,n){const i=this._actual;i.value!==n&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=n)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,n,i){const r=this._actual;let o=null;const s=W2(r);s?o=s.activeElement:o=Au();const a=ei(o),l=o===r,c=r.selectionStart,u=r.selectionEnd;if(l&&c===n&&u===i){sb&&a.parent!==a&&r.focus();return}if(l){this.setIgnoreSelectionChangeTime("setSelectionRange"),r.setSelectionRange(n,i),sb&&a.parent!==a&&r.focus();return}try{const d=ffi(r);this.setIgnoreSelectionChangeTime("setSelectionRange"),r.focus(),r.setSelectionRange(n,i),mfi(r,d)}catch{}}}class _yi extends pVe{constructor(e,n,i){super(e,n,i),this._register(xd.addTarget(this.viewHelper.linesContentDomNode)),this._register(yt(this.viewHelper.linesContentDomNode,hs.Tap,o=>this.onTap(o))),this._register(yt(this.viewHelper.linesContentDomNode,hs.Change,o=>this.onChange(o))),this._register(yt(this.viewHelper.linesContentDomNode,hs.Contextmenu,o=>this._onContextMenu(new mk(o,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(yt(this.viewHelper.linesContentDomNode,"pointerdown",o=>{const s=o.pointerType;if(s==="mouse"){this._lastPointerType="mouse";return}else s==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const r=new Vvi(this.viewHelper.viewDomNode);this._register(r.onPointerMove(this.viewHelper.viewDomNode,o=>this._onMouseMoveOverView(o))),this._register(r.onPointerUp(this.viewHelper.viewDomNode,o=>this._onMouseUp(o))),this._register(r.onPointerLeave(this.viewHelper.viewDomNode,o=>this._onMouseLeave(o))),this._register(r.onPointerDown(this.viewHelper.viewDomNode,(o,s)=>this._onMouseDown(o,s)))}onTap(e){!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget)||(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),this._lastPointerType==="pen"&&this._dispatchGesture(e,!0)}_dispatchGesture(e,n){const i=this._createMouseTargetForView(new mk(e,!1,this.viewHelper.viewDomNode),!1);i.position&&this.viewController.dispatchMouse({position:i.position,mouseColumn:i.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:n,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:i.type===6&&i.detail.injectedText!==null})}_onMouseDown(e,n){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e,n)}}class xyi extends pVe{constructor(e,n,i){super(e,n,i),this._register(xd.addTarget(this.viewHelper.linesContentDomNode)),this._register(yt(this.viewHelper.linesContentDomNode,hs.Tap,r=>this.onTap(r))),this._register(yt(this.viewHelper.linesContentDomNode,hs.Change,r=>this.onChange(r))),this._register(yt(this.viewHelper.linesContentDomNode,hs.Contextmenu,r=>this._onContextMenu(new mk(r,!1,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const n=this._createMouseTargetForView(new mk(e,!1,this.viewHelper.viewDomNode),!1);if(n.position){const i=document.createEvent("CustomEvent");i.initEvent(mre.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(i),this.viewController.moveTo(n.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class wyi extends ct{constructor(e,n,i){super(),(W0||rui&&jOt)&&E8e.pointerEvents?this.handler=this._register(new _yi(e,n,i)):Go.TouchEvent?this.handler=this._register(new xyi(e,n,i)):this.handler=this._register(new pVe(e,n,i))}getTargetAtClientPoint(e,n){return this.handler.getTargetAtClientPoint(e,n)}}class eR extends Nq{}const Ql=Sr("themeService");function Sa(t){return{id:t}}function uTe(t){switch(t){case qg.DARK:return"vs-dark";case qg.HIGH_CONTRAST_DARK:return"hc-black";case qg.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const J3t={ThemingContribution:"base.contributions.theming"};class Cyi{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new st}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),Kn(()=>{const n=this.themingParticipants.indexOf(e);this.themingParticipants.splice(n,1)})}getThemingParticipants(){return this.themingParticipants}}const ejt=new Cyi;la.add(J3t.ThemingContribution,ejt);function _b(t){return ejt.onColorThemeChange(t)}class Syi extends ct{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(n=>this.onThemeChange(n)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}const tjt=Fe("editor.lineHighlightBackground",null,I("lineHighlight","Background color for the highlight of line at the cursor position.")),mat=Fe("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:$r},I("lineHighlightBorderBox","Background color for the border around the line at the cursor position."));Fe("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},I("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0);Fe("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:Bs,hcLight:Bs},I("rangeHighlightBorder","Background color of the border around highlighted ranges."));Fe("editor.symbolHighlightBackground",{dark:lC,light:lC,hcDark:null,hcLight:null},I("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0);Fe("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:Bs,hcLight:Bs},I("symbolHighlightBorder","Background color of the border around highlighted symbols."));const ome=Fe("editorCursor.foreground",{dark:"#AEAFAD",light:Rt.black,hcDark:Rt.white,hcLight:"#0F4A85"},I("caret","Color of the editor cursor.")),gVe=Fe("editorCursor.background",null,I("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),njt=Fe("editorMultiCursor.primary.foreground",ome,I("editorMultiCursorPrimaryForeground","Color of the primary editor cursor when multiple cursors are present.")),Nyi=Fe("editorMultiCursor.primary.background",gVe,I("editorMultiCursorPrimaryBackground","The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),ijt=Fe("editorMultiCursor.secondary.foreground",ome,I("editorMultiCursorSecondaryForeground","Color of secondary editor cursors when multiple cursors are present.")),Eyi=Fe("editorMultiCursor.secondary.background",gVe,I("editorMultiCursorSecondaryBackground","The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),bVe=Fe("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},I("editorWhitespaces","Color of whitespace characters in the editor.")),Dyi=Fe("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:Rt.white,hcLight:"#292929"},I("editorLineNumbers","Color of editor line numbers.")),kyi=Fe("editorIndentGuide.background",bVe,I("editorIndentGuides","Color of the editor indentation guides."),!1,I("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),Myi=Fe("editorIndentGuide.activeBackground",bVe,I("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,I("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),Dq=Fe("editorIndentGuide.background1",kyi,I("editorIndentGuides1","Color of the editor indentation guides (1).")),Lyi=Fe("editorIndentGuide.background2","#00000000",I("editorIndentGuides2","Color of the editor indentation guides (2).")),Tyi=Fe("editorIndentGuide.background3","#00000000",I("editorIndentGuides3","Color of the editor indentation guides (3).")),Iyi=Fe("editorIndentGuide.background4","#00000000",I("editorIndentGuides4","Color of the editor indentation guides (4).")),Ayi=Fe("editorIndentGuide.background5","#00000000",I("editorIndentGuides5","Color of the editor indentation guides (5).")),Ryi=Fe("editorIndentGuide.background6","#00000000",I("editorIndentGuides6","Color of the editor indentation guides (6).")),kq=Fe("editorIndentGuide.activeBackground1",Myi,I("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),Pyi=Fe("editorIndentGuide.activeBackground2","#00000000",I("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),Oyi=Fe("editorIndentGuide.activeBackground3","#00000000",I("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),jyi=Fe("editorIndentGuide.activeBackground4","#00000000",I("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),Fyi=Fe("editorIndentGuide.activeBackground5","#00000000",I("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),$yi=Fe("editorIndentGuide.activeBackground6","#00000000",I("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),Vyi=Fe("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:Bs,hcLight:Bs},I("editorActiveLineNumber","Color of editor active line number"),!1,I("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead."));Fe("editorLineNumber.activeForeground",Vyi,I("editorActiveLineNumber","Color of editor active line number"));const Byi=Fe("editorLineNumber.dimmedForeground",null,I("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed."));Fe("editorRuler.foreground",{dark:"#5A5A5A",light:Rt.lightgrey,hcDark:Rt.white,hcLight:"#292929"},I("editorRuler","Color of the editor rulers."));Fe("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},I("editorCodeLensForeground","Foreground color of editor CodeLens"));Fe("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},I("editorBracketMatchBackground","Background color behind matching brackets"));Fe("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:$r,hcLight:$r},I("editorBracketMatchBorder","Color for matching brackets boxes"));const zyi=Fe("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},I("editorOverviewRulerBorder","Color of the overview ruler border.")),Hyi=Fe("editorOverviewRuler.background",null,I("editorOverviewRulerBackground","Background color of the editor overview ruler."));Fe("editorGutter.background",G0,I("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers."));Fe("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:Rt.fromHex("#fff").transparent(.8),hcLight:$r},I("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor."));const Wyi=Fe("editorUnnecessaryCode.opacity",{dark:Rt.fromHex("#000a"),light:Rt.fromHex("#0007"),hcDark:null,hcLight:null},I("unnecessaryCodeOpacity",`Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the  'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.`));Fe("editorGhostText.border",{dark:null,light:null,hcDark:Rt.fromHex("#fff").transparent(.8),hcLight:Rt.fromHex("#292929").transparent(.8)},I("editorGhostTextBorder","Border color of ghost text in the editor."));const Uyi=Fe("editorGhostText.foreground",{dark:Rt.fromHex("#ffffff56"),light:Rt.fromHex("#0007"),hcDark:null,hcLight:null},I("editorGhostTextForeground","Foreground color of the ghost text in the editor."));Fe("editorGhostText.background",null,I("editorGhostTextBackground","Background color of the ghost text in the editor."));const Kyi=new Rt(new jr(0,122,204,.6)),rjt=Fe("editorOverviewRuler.rangeHighlightForeground",Kyi,I("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),qyi=Fe("editorOverviewRuler.errorForeground",{dark:new Rt(new jr(255,18,18,.7)),light:new Rt(new jr(255,18,18,.7)),hcDark:new Rt(new jr(255,50,50,1)),hcLight:"#B5200D"},I("overviewRuleError","Overview ruler marker color for errors.")),Gyi=Fe("editorOverviewRuler.warningForeground",{dark:mS,light:mS,hcDark:FH,hcLight:FH},I("overviewRuleWarning","Overview ruler marker color for warnings.")),Yyi=Fe("editorOverviewRuler.infoForeground",{dark:mw,light:mw,hcDark:$H,hcLight:$H},I("overviewRuleInfo","Overview ruler marker color for infos.")),ojt=Fe("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},I("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),sjt=Fe("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},I("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),ajt=Fe("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},I("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),ljt=Fe("editorBracketHighlight.foreground4","#00000000",I("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),cjt=Fe("editorBracketHighlight.foreground5","#00000000",I("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),ujt=Fe("editorBracketHighlight.foreground6","#00000000",I("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),Xyi=Fe("editorBracketHighlight.unexpectedBracket.foreground",{dark:new Rt(new jr(255,18,18,.8)),light:new Rt(new jr(255,18,18,.8)),hcDark:new Rt(new jr(255,50,50,1)),hcLight:""},I("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),Zyi=Fe("editorBracketPairGuide.background1","#00000000",I("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),Qyi=Fe("editorBracketPairGuide.background2","#00000000",I("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),Jyi=Fe("editorBracketPairGuide.background3","#00000000",I("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),e0i=Fe("editorBracketPairGuide.background4","#00000000",I("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),t0i=Fe("editorBracketPairGuide.background5","#00000000",I("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),n0i=Fe("editorBracketPairGuide.background6","#00000000",I("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),i0i=Fe("editorBracketPairGuide.activeBackground1","#00000000",I("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),r0i=Fe("editorBracketPairGuide.activeBackground2","#00000000",I("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),o0i=Fe("editorBracketPairGuide.activeBackground3","#00000000",I("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),s0i=Fe("editorBracketPairGuide.activeBackground4","#00000000",I("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),a0i=Fe("editorBracketPairGuide.activeBackground5","#00000000",I("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),l0i=Fe("editorBracketPairGuide.activeBackground6","#00000000",I("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));Fe("editorUnicodeHighlight.border",mS,I("editorUnicodeHighlight.border","Border color used to highlight unicode characters."));Fe("editorUnicodeHighlight.background",sbi,I("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));_b((t,e)=>{const n=t.getColor(G0),i=t.getColor(tjt),r=i&&!i.isTransparent()?i:n;r&&e.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${r}; }`)});const Kle=class Kle extends eR{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new ot(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(67);const n=e.get(68);this._renderLineNumbers=n.renderType,this._renderCustomLineNumbers=n.renderFn,this._renderFinalNewline=e.get(96);const i=e.get(146);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const n=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(n);let i=!1;return this._activeLineNumber!==n.lineNumber&&(this._activeLineNumber=n.lineNumber,i=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){const n=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ot(e,1));if(n.column!==1)return"";const i=n.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(this._renderLineNumbers===2){const r=Math.abs(this._lastCursorModelPosition.lineNumber-i);return r===0?'<span class="relative-current-line-number">'+i+"</span>":String(r)}if(this._renderLineNumbers===3){if(this._lastCursorModelPosition.lineNumber===i||i%10===0)return String(i);const r=this._context.viewModel.getLineCount();return i===r?String(i):""}return String(i)}prepareRender(e){if(this._renderLineNumbers===0){this._renderResult=null;return}const n=$h?this._lineHeight%2===0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,o=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter(c=>!!c.options.lineNumberClassName);o.sort((c,u)=>ve.compareRangesUsingEnds(c.range,u.range));let s=0;const a=this._context.viewModel.getLineCount(),l=[];for(let c=i;c<=r;c++){const u=c-i;let d=this._getLineRenderLineNumber(c),h="";for(;s<o.length&&o[s].range.endLineNumber<c;)s++;for(let f=s;f<o.length;f++){const{range:m,options:p}=o[f];m.startLineNumber<=c&&(h+=" "+p.lineNumberClassName)}if(!d&&!h){l[u]="";continue}c===a&&this._context.viewModel.getLineLength(c)===0&&(this._renderFinalNewline==="off"&&(d=""),this._renderFinalNewline==="dimmed"&&(h+=" dimmed-line-number")),c===this._activeLineNumber&&(h+=" active-line-number"),l[u]=`<div class="${Kle.CLASS_NAME}${n}${h}" style="left:${this._lineNumbersLeft}px;width:${this._lineNumbersWidth}px;">${d}</div>`}this._renderResult=l}render(e,n){if(!this._renderResult)return"";const i=n-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}};Kle.CLASS_NAME="line-numbers";let pre=Kle;_b((t,e)=>{const n=t.getColor(Dyi),i=t.getColor(Byi);i?e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i}; }`):n&&e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n.transparent(.4)}; }`)});const W4=class W4 extends zm{constructor(e){super(e);const n=this._context.configuration.options,i=n.get(146);this._canUseLayerHinting=!n.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=wo(document.createElement("div")),this._domNode.setClassName(W4.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=wo(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(W4.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const n=this._context.configuration.options,i=n.get(146);return this._canUseLayerHinting=!n.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const n=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-n);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}};W4.CLASS_NAME="glyph-margin",W4.OUTER_CLASS_NAME="margin";let gre=W4;const S3="monaco-mouse-cursor-text";class c0i{constructor(){this._onDidChange=new st,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}}const G9=new c0i,vo=Sr("keybindingService");var u0i=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},pat=function(t,e){return function(n,i){e(n,i,t)}};class d0i{constructor(e,n,i,r,o){this._context=e,this.modelLineNumber=n,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=r,this.distanceToModelLineEnd=o,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const n=new ot(this.modelLineNumber,this.distanceToModelLineStart+1),i=new ot(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(e?this._previousPresentation=e:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const Qwe=sb;let dTe=class extends zm{constructor(e,n,i,r,o){super(e),this._keybindingService=r,this._instantiationService=o,this._primaryCursorPosition=new ot(1,1),this._primaryCursorVisibleRange=null,this._viewController=n,this._visibleRangeProvider=i,this._scrollLeft=0,this._scrollTop=0;const s=this._context.configuration.options,a=s.get(146);this._setAccessibilityOptions(s),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._contentHeight=a.height,this._fontInfo=s.get(50),this._lineHeight=s.get(67),this._emptySelectionClipboard=s.get(37),this._copyWithSyntaxHighlighting=s.get(25),this._visibleTextArea=null,this._selections=[new Pn(1,1,1,1)],this._modelSelections=[new Pn(1,1,1,1)],this._lastRenderPosition=null,this.textArea=wo(document.createElement("textarea")),Y0.write(this.textArea,7),this.textArea.setClassName(`inputarea ${S3}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:l}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${l*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(s)),this.textArea.setAttribute("aria-required",s.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(s.get(125))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",I("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",s.get(92)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=wo(document.createElement("div")),this.textAreaCover.setPosition("absolute");const c={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:h=>this._context.viewModel.getLineMaxColumn(h),getValueInRange:(h,f)=>this._context.viewModel.getValueInRange(h,f),getValueLengthInRange:(h,f)=>this._context.viewModel.getValueLengthInRange(h,f),modifyPosition:(h,f)=>this._context.viewModel.modifyPosition(h,f)},u={getDataToCopy:()=>{const h=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,Fu),f=this._context.viewModel.model.getEOL(),m=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),p=Array.isArray(h)?h:null,g=Array.isArray(h)?h.join(f):h;let y,_=null;if(aTe.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&g.length<65536){const w=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);w&&(y=w.html,_=w.mode)}return{isFromEmptySelection:m,multicursorText:p,text:g,html:y,mode:_}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const h=this._selections[0];if(xr&&h.isEmpty()){const m=h.getStartPosition();let p=this._getWordBeforePosition(m);if(p.length===0&&(p=this._getCharacterBeforePosition(m)),p.length>0)return new Fd(p,p.length,p.length,ve.fromPositions(m),0)}if(xr&&!h.isEmpty()&&c.getValueLengthInRange(h,0)<500){const m=c.getValueInRange(h,0);return new Fd(m,0,m.length,h,0)}if(dS&&!h.isEmpty()){const m="vscode-placeholder";return new Fd(m,0,m.length,null,void 0)}return Fd.EMPTY}if(jot){const h=this._selections[0];if(h.isEmpty()){const f=h.getStartPosition(),[m,p]=this._getAndroidWordAtPosition(f);if(m.length>0)return new Fd(m,p,p,ve.fromPositions(f),0)}return Fd.EMPTY}return f4.fromEditorSelection(c,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(h,f,m)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(h,f,m)},d=this._register(new yyi(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(lTe,u,d,pm,{isAndroid:jot,isChrome:bq,isFirefox:sb,isSafari:dS})),this._register(this._textAreaInput.onKeyDown(h=>{this._viewController.emitKeyDown(h)})),this._register(this._textAreaInput.onKeyUp(h=>{this._viewController.emitKeyUp(h)})),this._register(this._textAreaInput.onPaste(h=>{let f=!1,m=null,p=null;h.metadata&&(f=this._emptySelectionClipboard&&!!h.metadata.isFromEmptySelection,m=typeof h.metadata.multicursorText<"u"?h.metadata.multicursorText:null,p=h.metadata.mode),this._viewController.paste(h.text,f,m,p)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(h=>{h.replacePrevCharCnt||h.replaceNextCharCnt||h.positionDelta?this._viewController.compositionType(h.text,h.replacePrevCharCnt,h.replaceNextCharCnt,h.positionDelta):this._viewController.type(h.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(h=>{this._viewController.setSelection(h)})),this._register(this._textAreaInput.onCompositionStart(h=>{const f=this.textArea.domNode,m=this._modelSelections[0],{distanceToModelLineStart:p,widthOfHiddenTextBefore:g}=(()=>{const _=f.value.substring(0,Math.min(f.selectionStart,f.selectionEnd)),w=_.lastIndexOf(`
`),C=_.substring(w+1),N=C.lastIndexOf("	"),E=C.length-N-1,D=m.getStartPosition(),k=Math.min(D.column-1,E),M=D.column-1-k,T=C.substring(0,C.length-k),{tabSize:A}=this._context.viewModel.model.getOptions(),R=h0i(this.textArea.domNode.ownerDocument,T,this._fontInfo,A);return{distanceToModelLineStart:M,widthOfHiddenTextBefore:R}})(),{distanceToModelLineEnd:y}=(()=>{const _=f.value.substring(Math.max(f.selectionStart,f.selectionEnd)),w=_.indexOf(`
`),C=w===-1?_:_.substring(0,w),N=C.indexOf("	"),E=N===-1?C.length:C.length-N-1,D=m.getEndPosition(),k=Math.min(this._context.viewModel.model.getLineMaxColumn(D.lineNumber)-D.column,E);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(D.lineNumber)-D.column-k}})();this._context.viewModel.revealRange("keyboard",!0,ve.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new d0i(this._context,m.startLineNumber,p,g,y),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${S3} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(h=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${S3}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(G9.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const n='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',i=this._context.viewModel.getLineContent(e.lineNumber),r=ab(n,[]);let o=!0,s=e.column,a=!0,l=e.column,c=0;for(;c<50&&(o||a);){if(o&&s<=1&&(o=!1),o){const u=i.charCodeAt(s-2);r.get(u)!==0?o=!1:s--}if(a&&l>i.length&&(a=!1),a){const u=i.charCodeAt(l-1);r.get(u)!==0?a=!1:l++}c++}return[i.substring(s-1,l-1),e.column-s]}_getWordBeforePosition(e){const n=this._context.viewModel.getLineContent(e.lineNumber),i=ab(this._context.configuration.options.get(132),[]);let r=e.column,o=0;for(;r>1;){const s=n.charCodeAt(r-2);if(i.get(s)!==0||o>50)return n.substring(r-1,e.column-1);o++,r--}return n.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const i=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!sc(i.charCodeAt(0)))return i}return""}_getAriaLabel(e){var i,r,o;if(e.get(2)===1){const s=(i=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))==null?void 0:i.getAriaLabel(),a=(r=this._keybindingService.lookupKeybinding("workbench.action.showCommands"))==null?void 0:r.getAriaLabel(),l=(o=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings"))==null?void 0:o.getAriaLabel(),c=I("accessibilityModeOff","The editor is not accessible at this time.");return s?I("accessibilityOffAriaLabel","{0} To enable screen reader optimized mode, use {1}",c,s):a?I("accessibilityOffAriaLabelNoKb","{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",c,a):l?I("accessibilityOffAriaLabelNoKbs","{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",c,l):c}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const n=e.get(3);this._accessibilitySupport===2&&n===l_.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=n;const r=e.get(146).wrappingColumn;if(r!==-1&&this._accessibilitySupport!==1){const o=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(r*o.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=Qwe?0:1}onConfigurationChanged(e){const n=this._context.configuration.options,i=n.get(146);this._setAccessibilityOptions(n),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=n.get(50),this._lineHeight=n.get(67),this._emptySelectionClipboard=n.get(37),this._copyWithSyntaxHighlighting=n.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:r}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${r*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",this._getAriaLabel(n)),this.textArea.setAttribute("aria-required",n.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(n.get(125))),(e.hasChanged(34)||e.hasChanged(92))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options;!G9.enabled||e.get(34)&&e.get(92)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){var n;this._primaryCursorPosition=new ot(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),(n=this._visibleTextArea)==null||n.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){if(this._visibleTextArea){const i=this._visibleTextArea.visibleTextareaStart,r=this._visibleTextArea.visibleTextareaEnd,o=this._visibleTextArea.startPosition,s=this._visibleTextArea.endPosition;if(o&&s&&i&&r&&r.left>=this._scrollLeft&&i.left<=this._scrollLeft+this._contentWidth){const a=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,l=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let c=this._visibleTextArea.widthOfHiddenLineTextBefore,u=this._contentLeft+i.left-this._scrollLeft,d=r.left-i.left+1;if(u<this._contentLeft){const y=this._contentLeft-u;u+=y,c+=y,d-=y}d>this._contentWidth&&(d=this._contentWidth);const h=this._context.viewModel.getViewLineData(o.lineNumber),f=h.tokens.findTokenIndexAtOffset(o.column-1),m=h.tokens.findTokenIndexAtOffset(s.column-1),p=f===m,g=this._visibleTextArea.definePresentation(p?h.tokens.getPresentation(f):null);this.textArea.domNode.scrollTop=l*this._lineHeight,this.textArea.domNode.scrollLeft=c,this._doRender({lastRenderPosition:null,top:a,left:u,width:d,height:this._lineHeight,useCover:!1,color:(Ca.getColorMap()||[])[g.foreground],italic:g.italic,bold:g.bold,underline:g.underline,strikethrough:g.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(e<this._contentLeft||e>this._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const n=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(n<0||n>this._contentHeight){this._renderAtTopLeft();return}if(xr||this._accessibilitySupport===2){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:n,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const i=this._textAreaInput.textAreaState.newlineCountBeforeSelection??this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=i*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:n,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:Qwe?0:1,useCover:!1})}_newlinecount(e){let n=0,i=-1;do{if(i=e.indexOf(`
`,i+1),i===-1)break;n++}while(!0);return n}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:Qwe?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const n=this.textArea,i=this.textAreaCover;su(n,this._fontInfo),n.setTop(e.top),n.setLeft(e.left),n.setWidth(e.width),n.setHeight(e.height),n.setColor(e.color?Rt.Format.CSS.formatHex(e.color):""),n.setFontStyle(e.italic?"italic":""),e.bold&&n.setFontWeight("bold"),n.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);const r=this._context.configuration.options;r.get(57)?i.setClassName("monaco-editor-background textAreaCover "+gre.OUTER_CLASS_NAME):r.get(68).renderType!==0?i.setClassName("monaco-editor-background textAreaCover "+pre.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}};dTe=u0i([pat(3,vo),pat(4,qn)],dTe);function h0i(t,e,n,i){if(e.length===0)return 0;const r=t.createElement("div");r.style.position="absolute",r.style.top="-50000px",r.style.width="50000px";const o=t.createElement("span");su(o,n),o.style.whiteSpace="pre",o.style.tabSize=`${i*n.spaceWidth}px`,o.append(e),r.appendChild(o),t.body.appendChild(r);const s=o.offsetWidth;return r.remove(),s}function f0i(t,e,n){let i=0;for(let o=0;o<t.length;o++)t.charAt(o)==="	"?i=Kl.nextIndentTabStop(i,e):i++;let r="";if(!n){const o=Math.floor(i/e);i=i%e;for(let s=0;s<o;s++)r+="	"}for(let o=0;o<i;o++)r+=" ";return r}function vVe(t,e,n){let i=qd(t);return i===-1&&(i=t.length),f0i(t.substring(0,i),e,n)+t.substring(i)}const m0i=()=>!0,p0i=()=>!1,g0i=t=>t===" "||t==="	";class QP{static shouldRecreate(e){return e.hasChanged(146)||e.hasChanged(132)||e.hasChanged(37)||e.hasChanged(77)||e.hasChanged(79)||e.hasChanged(80)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(129)||e.hasChanged(50)||e.hasChanged(92)||e.hasChanged(131)}constructor(e,n,i,r){this.languageConfigurationService=r,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const o=i.options,s=o.get(146),a=o.get(50);this.readOnly=o.get(92),this.tabSize=n.tabSize,this.indentSize=n.indentSize,this.insertSpaces=n.insertSpaces,this.stickyTabStops=o.get(117),this.lineHeight=a.lineHeight,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(s.height/this.lineHeight)-2),this.useTabStops=o.get(129),this.wordSeparators=o.get(132),this.emptySelectionClipboard=o.get(37),this.copyWithSyntaxHighlighting=o.get(25),this.multiCursorMergeOverlapping=o.get(77),this.multiCursorPaste=o.get(79),this.multiCursorLimit=o.get(80),this.autoClosingBrackets=o.get(6),this.autoClosingComments=o.get(7),this.autoClosingQuotes=o.get(11),this.autoClosingDelete=o.get(9),this.autoClosingOvertype=o.get(10),this.autoSurround=o.get(14),this.autoIndent=o.get(12),this.wordSegmenterLocales=o.get(131),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const l=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(l)for(const u of l)this.surroundingPairs[u.open]=u.close;const c=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=(c==null?void 0:c.blockCommentStartToken)??null}get electricChars(){var e;if(!this._electricChars){this._electricChars={};const n=(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)==null?void 0:e.getElectricCharacters();if(n)for(const i of n)this._electricChars[i]=!0}return this._electricChars}onElectricCharacter(e,n,i){const r=OT(n,i-1),o=this.languageConfigurationService.getLanguageConfiguration(r.languageId).electricCharacter;return o?o.onElectricCharacter(e,r,i-r.firstCharOffset):null}normalizeIndentation(e){return vVe(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,n,i){switch(n){case"beforeWhitespace":return g0i;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,i);case"always":return m0i;case"never":return p0i}}_getLanguageDefinedShouldAutoClose(e,n){const i=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(n);return r=>i.indexOf(r)!==-1}visibleColumnFromColumn(e,n){return Kl.visibleColumnFromColumn(e.getLineContent(n.lineNumber),n.column,this.tabSize)}columnFromVisibleColumn(e,n,i){const r=Kl.columnFromVisibleColumn(e.getLineContent(n),i,this.tabSize),o=e.getLineMinColumn(n);if(r<o)return o;const s=e.getLineMaxColumn(n);return r>s?s:r}}let Kr=class djt{static fromModelState(e){return new b0i(e)}static fromViewState(e){return new v0i(e)}static fromModelSelection(e){const n=Pn.liftSelection(e),i=new Xc(ve.fromPositions(n.getSelectionStart()),0,0,n.getPosition(),0);return djt.fromModelState(i)}static fromModelSelections(e){const n=[];for(let i=0,r=e.length;i<r;i++)n[i]=this.fromModelSelection(e[i]);return n}constructor(e,n){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=n}equals(e){return this.viewState.equals(e.viewState)&&this.modelState.equals(e.modelState)}};class b0i{constructor(e){this.modelState=e,this.viewState=null}}class v0i{constructor(e){this.modelState=null,this.viewState=e}}class Xc{constructor(e,n,i,r,o){this.selectionStart=e,this.selectionStartKind=n,this.selectionStartLeftoverVisibleColumns=i,this.position=r,this.leftoverVisibleColumns=o,this._singleCursorStateBrand=void 0,this.selection=Xc._computeSelection(this.selectionStart,this.position)}equals(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.selectionStartKind===e.selectionStartKind&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(e,n,i,r){return e?new Xc(this.selectionStart,this.selectionStartKind,this.selectionStartLeftoverVisibleColumns,new ot(n,i),r):new Xc(new ve(n,i,n,i),0,r,new ot(n,i),r)}static _computeSelection(e,n){return e.isEmpty()||!n.isBeforeOrEqual(e.getStartPosition())?Pn.fromPositions(e.getStartPosition(),n):Pn.fromPositions(e.getEndPosition(),n)}}class Mf{constructor(e,n,i){this._editOperationResultBrand=void 0,this.type=e,this.commands=n,this.shouldPushStackElementBefore=i.shouldPushStackElementBefore,this.shouldPushStackElementAfter=i.shouldPushStackElementAfter}}function pk(t){return t==="'"||t==='"'||t==="`"}class lT{static columnSelect(e,n,i,r,o,s){const a=Math.abs(o-i)+1,l=i>o,c=r>s,u=r<s,d=[];for(let h=0;h<a;h++){const f=i+(l?-h:h),m=e.columnFromVisibleColumn(n,f,r),p=e.columnFromVisibleColumn(n,f,s),g=e.visibleColumnFromColumn(n,new ot(f,m)),y=e.visibleColumnFromColumn(n,new ot(f,p));u&&(g>s||y<r)||c&&(y>r||g<s)||d.push(new Xc(new ve(f,m,f,m),0,0,new ot(f,p),0))}if(d.length===0)for(let h=0;h<a;h++){const f=i+(l?-h:h),m=n.getLineMaxColumn(f);d.push(new Xc(new ve(f,m,f,m),0,0,new ot(f,m),0))}return{viewStates:d,reversed:l,fromLineNumber:i,fromVisualColumn:r,toLineNumber:o,toVisualColumn:s}}static columnSelectLeft(e,n,i){let r=i.toViewVisualColumn;return r>0&&r--,lT.columnSelect(e,n,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,r)}static columnSelectRight(e,n,i){let r=0;const o=Math.min(i.fromViewLineNumber,i.toViewLineNumber),s=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let l=o;l<=s;l++){const c=n.getLineMaxColumn(l),u=e.visibleColumnFromColumn(n,new ot(l,c));r=Math.max(r,u)}let a=i.toViewVisualColumn;return a<r&&a++,this.columnSelect(e,n,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,a)}static columnSelectUp(e,n,i,r){const o=r?e.pageSize:1,s=Math.max(1,i.toViewLineNumber-o);return this.columnSelect(e,n,i.fromViewLineNumber,i.fromViewVisualColumn,s,i.toViewVisualColumn)}static columnSelectDown(e,n,i,r){const o=r?e.pageSize:1,s=Math.min(n.getLineCount(),i.toViewLineNumber+o);return this.columnSelect(e,n,i.fromViewLineNumber,i.fromViewVisualColumn,s,i.toViewVisualColumn)}}class Su{constructor(e,n,i=!1){this._range=e,this._text=n,this.insertsAutoWhitespace=i}getEditOperations(e,n){n.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,n){const r=n.getInverseEditOperations()[0].range;return Pn.fromPositions(r.getEndPosition())}}class y0i{constructor(e,n){this._range=e,this._text=n}getEditOperations(e,n){n.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,n){const r=n.getInverseEditOperations()[0].range;return Pn.fromRange(r,0)}}class ute{constructor(e,n,i=!1){this._range=e,this._text=n,this.insertsAutoWhitespace=i}getEditOperations(e,n){n.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,n){const r=n.getInverseEditOperations()[0].range;return Pn.fromPositions(r.getStartPosition())}}class bre{constructor(e,n,i,r,o=!1){this._range=e,this._text=n,this._columnDeltaOffset=r,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=o}getEditOperations(e,n){n.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,n){const r=n.getInverseEditOperations()[0].range;return Pn.fromPositions(r.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class yVe{constructor(e,n,i,r=!1){this._range=e,this._text=n,this._initialSelection=i,this._forceMoveMarkers=r,this._selectionId=null}getEditOperations(e,n){n.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=n.trackSelection(this._initialSelection)}computeCursorState(e,n){return n.getTrackedSelection(this._selectionId)}}class Jwe{constructor(e,n,i){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=n,this.leftoverVisibleColumns=i}}class No{static leftPosition(e,n){if(n.column>e.getLineMinColumn(n.lineNumber))return n.delta(void 0,-u4t(e.getLineContent(n.lineNumber),n.column-1));if(n.lineNumber>1){const i=n.lineNumber-1;return new ot(i,e.getLineMaxColumn(i))}else return n}static leftPositionAtomicSoftTabs(e,n,i){if(n.column<=e.getLineIndentColumn(n.lineNumber)){const r=e.getLineMinColumn(n.lineNumber),o=e.getLineContent(n.lineNumber),s=zH.atomicPosition(o,n.column-1,i,0);if(s!==-1&&s+1>=r)return new ot(n.lineNumber,s+1)}return this.leftPosition(e,n)}static left(e,n,i){const r=e.stickyTabStops?No.leftPositionAtomicSoftTabs(n,i,e.tabSize):No.leftPosition(n,i);return new Jwe(r.lineNumber,r.column,0)}static moveLeft(e,n,i,r,o){let s,a;if(i.hasSelection()&&!r)s=i.selection.startLineNumber,a=i.selection.startColumn;else{const l=i.position.delta(void 0,-(o-1)),c=n.normalizePosition(No.clipPositionColumn(l,n),0),u=No.left(e,n,c);s=u.lineNumber,a=u.column}return i.move(r,s,a,0)}static clipPositionColumn(e,n){return new ot(e.lineNumber,No.clipRange(e.column,n.getLineMinColumn(e.lineNumber),n.getLineMaxColumn(e.lineNumber)))}static clipRange(e,n,i){return e<n?n:e>i?i:e}static rightPosition(e,n,i){return i<e.getLineMaxColumn(n)?i=i+C8e(e.getLineContent(n),i-1):n<e.getLineCount()&&(n=n+1,i=e.getLineMinColumn(n)),new ot(n,i)}static rightPositionAtomicSoftTabs(e,n,i,r,o){if(i<e.getLineIndentColumn(n)){const s=e.getLineContent(n),a=zH.atomicPosition(s,i-1,r,1);if(a!==-1)return new ot(n,a+1)}return this.rightPosition(e,n,i)}static right(e,n,i){const r=e.stickyTabStops?No.rightPositionAtomicSoftTabs(n,i.lineNumber,i.column,e.tabSize,e.indentSize):No.rightPosition(n,i.lineNumber,i.column);return new Jwe(r.lineNumber,r.column,0)}static moveRight(e,n,i,r,o){let s,a;if(i.hasSelection()&&!r)s=i.selection.endLineNumber,a=i.selection.endColumn;else{const l=i.position.delta(void 0,o-1),c=n.normalizePosition(No.clipPositionColumn(l,n),1),u=No.right(e,n,c);s=u.lineNumber,a=u.column}return i.move(r,s,a,0)}static vertical(e,n,i,r,o,s,a,l){const c=Kl.visibleColumnFromColumn(n.getLineContent(i),r,e.tabSize)+o,u=n.getLineCount(),d=i===1&&r===1,h=i===u&&r===n.getLineMaxColumn(i),f=s<i?d:h;if(i=s,i<1?(i=1,a?r=n.getLineMinColumn(i):r=Math.min(n.getLineMaxColumn(i),r)):i>u?(i=u,a?r=n.getLineMaxColumn(i):r=Math.min(n.getLineMaxColumn(i),r)):r=e.columnFromVisibleColumn(n,i,c),f?o=0:o=c-Kl.visibleColumnFromColumn(n.getLineContent(i),r,e.tabSize),l!==void 0){const m=new ot(i,r),p=n.normalizePosition(m,l);o=o+(r-p.column),i=p.lineNumber,r=p.column}return new Jwe(i,r,o)}static down(e,n,i,r,o,s,a){return this.vertical(e,n,i,r,o,i+s,a,4)}static moveDown(e,n,i,r,o){let s,a;i.hasSelection()&&!r?(s=i.selection.endLineNumber,a=i.selection.endColumn):(s=i.position.lineNumber,a=i.position.column);let l=0,c;do if(c=No.down(e,n,s+l,a,i.leftoverVisibleColumns,o,!0),n.normalizePosition(new ot(c.lineNumber,c.column),2).lineNumber>s)break;while(l++<10&&s+l<n.getLineCount());return i.move(r,c.lineNumber,c.column,c.leftoverVisibleColumns)}static translateDown(e,n,i){const r=i.selection,o=No.down(e,n,r.selectionStartLineNumber,r.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),s=No.down(e,n,r.positionLineNumber,r.positionColumn,i.leftoverVisibleColumns,1,!1);return new Xc(new ve(o.lineNumber,o.column,o.lineNumber,o.column),0,o.leftoverVisibleColumns,new ot(s.lineNumber,s.column),s.leftoverVisibleColumns)}static up(e,n,i,r,o,s,a){return this.vertical(e,n,i,r,o,i-s,a,3)}static moveUp(e,n,i,r,o){let s,a;i.hasSelection()&&!r?(s=i.selection.startLineNumber,a=i.selection.startColumn):(s=i.position.lineNumber,a=i.position.column);const l=No.up(e,n,s,a,i.leftoverVisibleColumns,o,!0);return i.move(r,l.lineNumber,l.column,l.leftoverVisibleColumns)}static translateUp(e,n,i){const r=i.selection,o=No.up(e,n,r.selectionStartLineNumber,r.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),s=No.up(e,n,r.positionLineNumber,r.positionColumn,i.leftoverVisibleColumns,1,!1);return new Xc(new ve(o.lineNumber,o.column,o.lineNumber,o.column),0,o.leftoverVisibleColumns,new ot(s.lineNumber,s.column),s.leftoverVisibleColumns)}static _isBlankLine(e,n){return e.getLineFirstNonWhitespaceColumn(n)===0}static moveToPrevBlankLine(e,n,i,r){let o=i.position.lineNumber;for(;o>1&&this._isBlankLine(n,o);)o--;for(;o>1&&!this._isBlankLine(n,o);)o--;return i.move(r,o,n.getLineMinColumn(o),0)}static moveToNextBlankLine(e,n,i,r){const o=n.getLineCount();let s=i.position.lineNumber;for(;s<o&&this._isBlankLine(n,s);)s++;for(;s<o&&!this._isBlankLine(n,s);)s++;return i.move(r,s,n.getLineMinColumn(s),0)}static moveToBeginningOfLine(e,n,i,r){const o=i.position.lineNumber,s=n.getLineMinColumn(o),a=n.getLineFirstNonWhitespaceColumn(o)||s;let l;return i.position.column===a?l=s:l=a,i.move(r,o,l,0)}static moveToEndOfLine(e,n,i,r,o){const s=i.position.lineNumber,a=n.getLineMaxColumn(s);return i.move(r,s,a,o?1073741824-a:0)}static moveToBeginningOfBuffer(e,n,i,r){return i.move(r,1,1,0)}static moveToEndOfBuffer(e,n,i,r){const o=n.getLineCount(),s=n.getLineMaxColumn(o);return i.move(r,o,s,0)}}class G2{static deleteRight(e,n,i,r){const o=[];let s=e!==3;for(let a=0,l=r.length;a<l;a++){const c=r[a];let u=c;if(u.isEmpty()){const d=c.getPosition(),h=No.right(n,i,d);u=new ve(h.lineNumber,h.column,d.lineNumber,d.column)}if(u.isEmpty()){o[a]=null;continue}u.startLineNumber!==u.endLineNumber&&(s=!0),o[a]=new Su(u,"")}return[s,o]}static isAutoClosingPairDelete(e,n,i,r,o,s,a){if(n==="never"&&i==="never"||e==="never")return!1;for(let l=0,c=s.length;l<c;l++){const u=s[l],d=u.getPosition();if(!u.isEmpty())return!1;const h=o.getLineContent(d.lineNumber);if(d.column<2||d.column>=h.length+1)return!1;const f=h.charAt(d.column-2),m=r.get(f);if(!m)return!1;if(pk(f)){if(i==="never")return!1}else if(n==="never")return!1;const p=h.charAt(d.column-1);let g=!1;for(const y of m)y.open===f&&y.close===p&&(g=!0);if(!g)return!1;if(e==="auto"){let y=!1;for(let _=0,w=a.length;_<w;_++){const C=a[_];if(d.lineNumber===C.startLineNumber&&d.column===C.startColumn){y=!0;break}}if(!y)return!1}}return!0}static _runAutoClosingPairDelete(e,n,i){const r=[];for(let o=0,s=i.length;o<s;o++){const a=i[o].getPosition(),l=new ve(a.lineNumber,a.column-1,a.lineNumber,a.column+1);r[o]=new Su(l,"")}return[!0,r]}static deleteLeft(e,n,i,r,o){if(this.isAutoClosingPairDelete(n.autoClosingDelete,n.autoClosingBrackets,n.autoClosingQuotes,n.autoClosingPairs.autoClosingPairsOpenByEnd,i,r,o))return this._runAutoClosingPairDelete(n,i,r);const s=[];let a=e!==2;for(let l=0,c=r.length;l<c;l++){const u=G2.getDeleteRange(r[l],i,n);if(u.isEmpty()){s[l]=null;continue}u.startLineNumber!==u.endLineNumber&&(a=!0),s[l]=new Su(u,"")}return[a,s]}static getDeleteRange(e,n,i){if(!e.isEmpty())return e;const r=e.getPosition();if(i.useTabStops&&r.column>1){const o=n.getLineContent(r.lineNumber),s=qd(o),a=s===-1?o.length+1:s+1;if(r.column<=a){const l=i.visibleColumnFromColumn(n,r),c=Kl.prevIndentTabStop(l,i.indentSize),u=i.columnFromVisibleColumn(n,r.lineNumber,c);return new ve(r.lineNumber,u,r.lineNumber,r.column)}}return ve.fromPositions(G2.getPositionAfterDeleteLeft(r,n),r)}static getPositionAfterDeleteLeft(e,n){if(e.column>1){const i=rhi(e.column-1,n.getLineContent(e.lineNumber));return e.with(void 0,i+1)}else if(e.lineNumber>1){const i=e.lineNumber-1;return new ot(i,n.getLineMaxColumn(i))}else return e}static cut(e,n,i){const r=[];let o=null;i.sort((s,a)=>ot.compare(s.getStartPosition(),a.getEndPosition()));for(let s=0,a=i.length;s<a;s++){const l=i[s];if(l.isEmpty())if(e.emptySelectionClipboard){const c=l.getPosition();let u,d,h,f;c.lineNumber<n.getLineCount()?(u=c.lineNumber,d=1,h=c.lineNumber+1,f=1):c.lineNumber>1&&(o==null?void 0:o.endLineNumber)!==c.lineNumber?(u=c.lineNumber-1,d=n.getLineMaxColumn(c.lineNumber-1),h=c.lineNumber,f=n.getLineMaxColumn(c.lineNumber)):(u=c.lineNumber,d=1,h=c.lineNumber,f=n.getLineMaxColumn(c.lineNumber));const m=new ve(u,d,h,f);o=m,m.isEmpty()?r[s]=null:r[s]=new Su(m,"")}else r[s]=null;else r[s]=new Su(l,"")}return new Mf(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class yo{static _createWord(e,n,i,r,o){return{start:r,end:o,wordType:n,nextCharClass:i}}static _createIntlWord(e,n){return{start:e.index,end:e.index+e.segment.length,wordType:1,nextCharClass:n}}static _findPreviousWordOnLine(e,n,i){const r=n.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(r,e,i)}static _doFindPreviousWordOnLine(e,n,i){let r=0;const o=n.findPrevIntlWordBeforeOrAtOffset(e,i.column-2);for(let s=i.column-2;s>=0;s--){const a=e.charCodeAt(s),l=n.get(a);if(o&&s===o.index)return this._createIntlWord(o,l);if(l===0){if(r===2)return this._createWord(e,r,l,s+1,this._findEndOfWord(e,n,r,s+1));r=1}else if(l===2){if(r===1)return this._createWord(e,r,l,s+1,this._findEndOfWord(e,n,r,s+1));r=2}else if(l===1&&r!==0)return this._createWord(e,r,l,s+1,this._findEndOfWord(e,n,r,s+1))}return r!==0?this._createWord(e,r,1,0,this._findEndOfWord(e,n,r,0)):null}static _findEndOfWord(e,n,i,r){const o=n.findNextIntlWordAtOrAfterOffset(e,r),s=e.length;for(let a=r;a<s;a++){const l=e.charCodeAt(a),c=n.get(l);if(o&&a===o.index+o.segment.length||c===1||i===1&&c===2||i===2&&c===0)return a}return s}static _findNextWordOnLine(e,n,i){const r=n.getLineContent(i.lineNumber);return this._doFindNextWordOnLine(r,e,i)}static _doFindNextWordOnLine(e,n,i){let r=0;const o=e.length,s=n.findNextIntlWordAtOrAfterOffset(e,i.column-1);for(let a=i.column-1;a<o;a++){const l=e.charCodeAt(a),c=n.get(l);if(s&&a===s.index)return this._createIntlWord(s,c);if(c===0){if(r===2)return this._createWord(e,r,c,this._findStartOfWord(e,n,r,a-1),a);r=1}else if(c===2){if(r===1)return this._createWord(e,r,c,this._findStartOfWord(e,n,r,a-1),a);r=2}else if(c===1&&r!==0)return this._createWord(e,r,c,this._findStartOfWord(e,n,r,a-1),a)}return r!==0?this._createWord(e,r,1,this._findStartOfWord(e,n,r,o-1),o):null}static _findStartOfWord(e,n,i,r){const o=n.findPrevIntlWordBeforeOrAtOffset(e,r);for(let s=r;s>=0;s--){const a=e.charCodeAt(s),l=n.get(a);if(o&&s===o.index)return s;if(l===1||i===1&&l===2||i===2&&l===0)return s+1}return 0}static moveWordLeft(e,n,i,r,o){let s=i.lineNumber,a=i.column;a===1&&s>1&&(s=s-1,a=n.getLineMaxColumn(s));let l=yo._findPreviousWordOnLine(e,n,new ot(s,a));if(r===0)return new ot(s,l?l.start+1:1);if(r===1)return!o&&l&&l.wordType===2&&l.end-l.start===1&&l.nextCharClass===0&&(l=yo._findPreviousWordOnLine(e,n,new ot(s,l.start+1))),new ot(s,l?l.start+1:1);if(r===3){for(;l&&l.wordType===2;)l=yo._findPreviousWordOnLine(e,n,new ot(s,l.start+1));return new ot(s,l?l.start+1:1)}return l&&a<=l.end+1&&(l=yo._findPreviousWordOnLine(e,n,new ot(s,l.start+1))),new ot(s,l?l.end+1:1)}static _moveWordPartLeft(e,n){const i=n.lineNumber,r=e.getLineMaxColumn(i);if(n.column===1)return i>1?new ot(i-1,e.getLineMaxColumn(i-1)):n;const o=e.getLineContent(i);for(let s=n.column-1;s>1;s--){const a=o.charCodeAt(s-2),l=o.charCodeAt(s-1);if(a===95&&l!==95)return new ot(i,s);if(a===45&&l!==45)return new ot(i,s);if((BE(a)||lQ(a))&&px(l))return new ot(i,s);if(px(a)&&px(l)&&s+1<r){const c=o.charCodeAt(s);if(BE(c)||lQ(c))return new ot(i,s)}}return new ot(i,1)}static moveWordRight(e,n,i,r){let o=i.lineNumber,s=i.column,a=!1;s===n.getLineMaxColumn(o)&&o<n.getLineCount()&&(a=!0,o=o+1,s=1);let l=yo._findNextWordOnLine(e,n,new ot(o,s));if(r===2)l&&l.wordType===2&&l.end-l.start===1&&l.nextCharClass===0&&(l=yo._findNextWordOnLine(e,n,new ot(o,l.end+1))),l?s=l.end+1:s=n.getLineMaxColumn(o);else if(r===3){for(a&&(s=0);l&&(l.wordType===2||l.start+1<=s);)l=yo._findNextWordOnLine(e,n,new ot(o,l.end+1));l?s=l.start+1:s=n.getLineMaxColumn(o)}else l&&!a&&s>=l.start+1&&(l=yo._findNextWordOnLine(e,n,new ot(o,l.end+1))),l?s=l.start+1:s=n.getLineMaxColumn(o);return new ot(o,s)}static _moveWordPartRight(e,n){const i=n.lineNumber,r=e.getLineMaxColumn(i);if(n.column===r)return i<e.getLineCount()?new ot(i+1,1):n;const o=e.getLineContent(i);for(let s=n.column+1;s<r;s++){const a=o.charCodeAt(s-2),l=o.charCodeAt(s-1);if(a!==95&&l===95)return new ot(i,s);if(a!==45&&l===45)return new ot(i,s);if((BE(a)||lQ(a))&&px(l))return new ot(i,s);if(px(a)&&px(l)&&s+1<r){const c=o.charCodeAt(s);if(BE(c)||lQ(c))return new ot(i,s)}}return new ot(i,r)}static _deleteWordLeftWhitespace(e,n){const i=e.getLineContent(n.lineNumber),r=n.column-2,o=w0(i,r);return o+1<r?new ve(n.lineNumber,o+2,n.lineNumber,n.column):null}static deleteWordLeft(e,n){const i=e.wordSeparators,r=e.model,o=e.selection,s=e.whitespaceHeuristics;if(!o.isEmpty())return o;if(G2.isAutoClosingPairDelete(e.autoClosingDelete,e.autoClosingBrackets,e.autoClosingQuotes,e.autoClosingPairs.autoClosingPairsOpenByEnd,e.model,[e.selection],e.autoClosedCharacters)){const d=e.selection.getPosition();return new ve(d.lineNumber,d.column-1,d.lineNumber,d.column+1)}const a=new ot(o.positionLineNumber,o.positionColumn);let l=a.lineNumber,c=a.column;if(l===1&&c===1)return null;if(s){const d=this._deleteWordLeftWhitespace(r,a);if(d)return d}let u=yo._findPreviousWordOnLine(i,r,a);return n===0?u?c=u.start+1:c>1?c=1:(l--,c=r.getLineMaxColumn(l)):(u&&c<=u.end+1&&(u=yo._findPreviousWordOnLine(i,r,new ot(l,u.start+1))),u?c=u.end+1:c>1?c=1:(l--,c=r.getLineMaxColumn(l))),new ve(l,c,a.lineNumber,a.column)}static deleteInsideWord(e,n,i){if(!i.isEmpty())return i;const r=new ot(i.positionLineNumber,i.positionColumn),o=this._deleteInsideWordWhitespace(n,r);return o||this._deleteInsideWordDetermineDeleteRange(e,n,r)}static _charAtIsWhitespace(e,n){const i=e.charCodeAt(n);return i===32||i===9}static _deleteInsideWordWhitespace(e,n){const i=e.getLineContent(n.lineNumber),r=i.length;if(r===0)return null;let o=Math.max(n.column-2,0);if(!this._charAtIsWhitespace(i,o))return null;let s=Math.min(n.column-1,r-1);if(!this._charAtIsWhitespace(i,s))return null;for(;o>0&&this._charAtIsWhitespace(i,o-1);)o--;for(;s+1<r&&this._charAtIsWhitespace(i,s+1);)s++;return new ve(n.lineNumber,o+1,n.lineNumber,s+2)}static _deleteInsideWordDetermineDeleteRange(e,n,i){const r=n.getLineContent(i.lineNumber),o=r.length;if(o===0)return i.lineNumber>1?new ve(i.lineNumber-1,n.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumber<n.getLineCount()?new ve(i.lineNumber,1,i.lineNumber+1,1):new ve(i.lineNumber,1,i.lineNumber,1);const s=d=>d.start+1<=i.column&&i.column<=d.end+1,a=(d,h)=>(d=Math.min(d,i.column),h=Math.max(h,i.column),new ve(i.lineNumber,d,i.lineNumber,h)),l=d=>{let h=d.start+1,f=d.end+1,m=!1;for(;f-1<o&&this._charAtIsWhitespace(r,f-1);)m=!0,f++;if(!m)for(;h>1&&this._charAtIsWhitespace(r,h-2);)h--;return a(h,f)},c=yo._findPreviousWordOnLine(e,n,i);if(c&&s(c))return l(c);const u=yo._findNextWordOnLine(e,n,i);return u&&s(u)?l(u):c&&u?a(c.end+1,u.start+1):c?a(c.start+1,c.end+1):u?a(u.start+1,u.end+1):a(1,o+1)}static _deleteWordPartLeft(e,n){if(!n.isEmpty())return n;const i=n.getPosition(),r=yo._moveWordPartLeft(e,i);return new ve(i.lineNumber,i.column,r.lineNumber,r.column)}static _findFirstNonWhitespaceChar(e,n){const i=e.length;for(let r=n;r<i;r++){const o=e.charAt(r);if(o!==" "&&o!=="	")return r}return i}static _deleteWordRightWhitespace(e,n){const i=e.getLineContent(n.lineNumber),r=n.column-1,o=this._findFirstNonWhitespaceChar(i,r);return r+1<o?new ve(n.lineNumber,n.column,n.lineNumber,o+1):null}static deleteWordRight(e,n){const i=e.wordSeparators,r=e.model,o=e.selection,s=e.whitespaceHeuristics;if(!o.isEmpty())return o;const a=new ot(o.positionLineNumber,o.positionColumn);let l=a.lineNumber,c=a.column;const u=r.getLineCount(),d=r.getLineMaxColumn(l);if(l===u&&c===d)return null;if(s){const f=this._deleteWordRightWhitespace(r,a);if(f)return f}let h=yo._findNextWordOnLine(i,r,a);return n===2?h?c=h.end+1:c<d||l===u?c=d:(l++,h=yo._findNextWordOnLine(i,r,new ot(l,1)),h?c=h.start+1:c=r.getLineMaxColumn(l)):(h&&c>=h.start+1&&(h=yo._findNextWordOnLine(i,r,new ot(l,h.end+1))),h?c=h.start+1:c<d||l===u?c=d:(l++,h=yo._findNextWordOnLine(i,r,new ot(l,1)),h?c=h.start+1:c=r.getLineMaxColumn(l))),new ve(l,c,a.lineNumber,a.column)}static _deleteWordPartRight(e,n){if(!n.isEmpty())return n;const i=n.getPosition(),r=yo._moveWordPartRight(e,i);return new ve(i.lineNumber,i.column,r.lineNumber,r.column)}static _createWordAtPosition(e,n,i){const r=new ve(n,i.start+1,n,i.end+1);return{word:e.getValueInRange(r),startColumn:r.startColumn,endColumn:r.endColumn}}static getWordAtPosition(e,n,i,r){const o=ab(n,i),s=yo._findPreviousWordOnLine(o,e,r);if(s&&s.wordType===1&&s.start<=r.column-1&&r.column-1<=s.end)return yo._createWordAtPosition(e,r.lineNumber,s);const a=yo._findNextWordOnLine(o,e,r);return a&&a.wordType===1&&a.start<=r.column-1&&r.column-1<=a.end?yo._createWordAtPosition(e,r.lineNumber,a):null}static word(e,n,i,r,o){const s=ab(e.wordSeparators,e.wordSegmenterLocales),a=yo._findPreviousWordOnLine(s,n,o),l=yo._findNextWordOnLine(s,n,o);if(!r){let f,m;return a&&a.wordType===1&&a.start<=o.column-1&&o.column-1<=a.end?(f=a.start+1,m=a.end+1):l&&l.wordType===1&&l.start<=o.column-1&&o.column-1<=l.end?(f=l.start+1,m=l.end+1):(a?f=a.end+1:f=1,l?m=l.start+1:m=n.getLineMaxColumn(o.lineNumber)),new Xc(new ve(o.lineNumber,f,o.lineNumber,m),1,0,new ot(o.lineNumber,m),0)}let c,u;a&&a.wordType===1&&a.start<o.column-1&&o.column-1<a.end?(c=a.start+1,u=a.end+1):l&&l.wordType===1&&l.start<o.column-1&&o.column-1<l.end?(c=l.start+1,u=l.end+1):(c=o.column,u=o.column);const d=o.lineNumber;let h;if(i.selectionStart.containsPosition(o))h=i.selectionStart.endColumn;else if(o.isBeforeOrEqual(i.selectionStart.getStartPosition())){h=c;const f=new ot(d,h);i.selectionStart.containsPosition(f)&&(h=i.selectionStart.endColumn)}else{h=u;const f=new ot(d,h);i.selectionStart.containsPosition(f)&&(h=i.selectionStart.startColumn)}return i.move(!0,d,h,0)}}class sme extends yo{static deleteWordPartLeft(e){const n=gQ([yo.deleteWordLeft(e,0),yo.deleteWordLeft(e,2),yo._deleteWordPartLeft(e.model,e.selection)]);return n.sort(ve.compareRangesUsingEnds),n[2]}static deleteWordPartRight(e){const n=gQ([yo.deleteWordRight(e,0),yo.deleteWordRight(e,2),yo._deleteWordPartRight(e.model,e.selection)]);return n.sort(ve.compareRangesUsingStarts),n[0]}static moveWordPartLeft(e,n,i,r){const o=gQ([yo.moveWordLeft(e,n,i,0,r),yo.moveWordLeft(e,n,i,2,r),yo._moveWordPartLeft(n,i)]);return o.sort(ot.compare),o[2]}static moveWordPartRight(e,n,i){const r=gQ([yo.moveWordRight(e,n,i,0),yo.moveWordRight(e,n,i,2),yo._moveWordPartRight(n,i)]);return r.sort(ot.compare),r[0]}}function gQ(t){return t.filter(e=>!!e)}class qc{static addCursorDown(e,n,i){const r=[];let o=0;for(let s=0,a=n.length;s<a;s++){const l=n[s];r[o++]=new Kr(l.modelState,l.viewState),i?r[o++]=Kr.fromModelState(No.translateDown(e.cursorConfig,e.model,l.modelState)):r[o++]=Kr.fromViewState(No.translateDown(e.cursorConfig,e,l.viewState))}return r}static addCursorUp(e,n,i){const r=[];let o=0;for(let s=0,a=n.length;s<a;s++){const l=n[s];r[o++]=new Kr(l.modelState,l.viewState),i?r[o++]=Kr.fromModelState(No.translateUp(e.cursorConfig,e.model,l.modelState)):r[o++]=Kr.fromViewState(No.translateUp(e.cursorConfig,e,l.viewState))}return r}static moveToBeginningOfLine(e,n,i){const r=[];for(let o=0,s=n.length;o<s;o++){const a=n[o];r[o]=this._moveToLineStart(e,a,i)}return r}static _moveToLineStart(e,n,i){const r=n.viewState.position.column,o=n.modelState.position.column,s=r===o,a=n.viewState.position.lineNumber,l=e.getLineFirstNonWhitespaceColumn(a);return!s&&!(r===l)?this._moveToLineStartByView(e,n,i):this._moveToLineStartByModel(e,n,i)}static _moveToLineStartByView(e,n,i){return Kr.fromViewState(No.moveToBeginningOfLine(e.cursorConfig,e,n.viewState,i))}static _moveToLineStartByModel(e,n,i){return Kr.fromModelState(No.moveToBeginningOfLine(e.cursorConfig,e.model,n.modelState,i))}static moveToEndOfLine(e,n,i,r){const o=[];for(let s=0,a=n.length;s<a;s++){const l=n[s];o[s]=this._moveToLineEnd(e,l,i,r)}return o}static _moveToLineEnd(e,n,i,r){const o=n.viewState.position,s=e.getLineMaxColumn(o.lineNumber),a=o.column===s,l=n.modelState.position,c=e.model.getLineMaxColumn(l.lineNumber),u=s-o.column===c-l.column;return a||u?this._moveToLineEndByModel(e,n,i,r):this._moveToLineEndByView(e,n,i,r)}static _moveToLineEndByView(e,n,i,r){return Kr.fromViewState(No.moveToEndOfLine(e.cursorConfig,e,n.viewState,i,r))}static _moveToLineEndByModel(e,n,i,r){return Kr.fromModelState(No.moveToEndOfLine(e.cursorConfig,e.model,n.modelState,i,r))}static expandLineSelection(e,n){const i=[];for(let r=0,o=n.length;r<o;r++){const s=n[r],a=s.modelState.selection.startLineNumber,l=e.model.getLineCount();let c=s.modelState.selection.endLineNumber,u;c===l?u=e.model.getLineMaxColumn(l):(c++,u=1),i[r]=Kr.fromModelState(new Xc(new ve(a,1,a,1),0,0,new ot(c,u),0))}return i}static moveToBeginningOfBuffer(e,n,i){const r=[];for(let o=0,s=n.length;o<s;o++){const a=n[o];r[o]=Kr.fromModelState(No.moveToBeginningOfBuffer(e.cursorConfig,e.model,a.modelState,i))}return r}static moveToEndOfBuffer(e,n,i){const r=[];for(let o=0,s=n.length;o<s;o++){const a=n[o];r[o]=Kr.fromModelState(No.moveToEndOfBuffer(e.cursorConfig,e.model,a.modelState,i))}return r}static selectAll(e,n){const i=e.model.getLineCount(),r=e.model.getLineMaxColumn(i);return Kr.fromModelState(new Xc(new ve(1,1,1,1),0,0,new ot(i,r),0))}static line(e,n,i,r,o){const s=e.model.validatePosition(r),a=o?e.coordinatesConverter.validateViewPosition(new ot(o.lineNumber,o.column),s):e.coordinatesConverter.convertModelPositionToViewPosition(s);if(!i){const c=e.model.getLineCount();let u=s.lineNumber+1,d=1;return u>c&&(u=c,d=e.model.getLineMaxColumn(u)),Kr.fromModelState(new Xc(new ve(s.lineNumber,1,u,d),2,0,new ot(u,d),0))}const l=n.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumber<l)return Kr.fromViewState(n.viewState.move(!0,a.lineNumber,1,0));if(s.lineNumber>l){const c=e.getLineCount();let u=a.lineNumber+1,d=1;return u>c&&(u=c,d=e.getLineMaxColumn(u)),Kr.fromViewState(n.viewState.move(!0,u,d,0))}else{const c=n.modelState.selectionStart.getEndPosition();return Kr.fromModelState(n.modelState.move(!0,c.lineNumber,c.column,0))}}static word(e,n,i,r){const o=e.model.validatePosition(r);return Kr.fromModelState(yo.word(e.cursorConfig,e.model,n.modelState,i,o))}static cancelSelection(e,n){if(!n.modelState.hasSelection())return new Kr(n.modelState,n.viewState);const i=n.viewState.position.lineNumber,r=n.viewState.position.column;return Kr.fromViewState(new Xc(new ve(i,r,i,r),0,0,new ot(i,r),0))}static moveTo(e,n,i,r,o){if(i){if(n.modelState.selectionStartKind===1)return this.word(e,n,i,r);if(n.modelState.selectionStartKind===2)return this.line(e,n,i,r,o)}const s=e.model.validatePosition(r),a=o?e.coordinatesConverter.validateViewPosition(new ot(o.lineNumber,o.column),s):e.coordinatesConverter.convertModelPositionToViewPosition(s);return Kr.fromViewState(n.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,n,i,r,o,s){switch(i){case 0:return s===4?this._moveHalfLineLeft(e,n,r):this._moveLeft(e,n,r,o);case 1:return s===4?this._moveHalfLineRight(e,n,r):this._moveRight(e,n,r,o);case 2:return s===2?this._moveUpByViewLines(e,n,r,o):this._moveUpByModelLines(e,n,r,o);case 3:return s===2?this._moveDownByViewLines(e,n,r,o):this._moveDownByModelLines(e,n,r,o);case 4:return s===2?n.map(a=>Kr.fromViewState(No.moveToPrevBlankLine(e.cursorConfig,e,a.viewState,r))):n.map(a=>Kr.fromModelState(No.moveToPrevBlankLine(e.cursorConfig,e.model,a.modelState,r)));case 5:return s===2?n.map(a=>Kr.fromViewState(No.moveToNextBlankLine(e.cursorConfig,e,a.viewState,r))):n.map(a=>Kr.fromModelState(No.moveToNextBlankLine(e.cursorConfig,e.model,a.modelState,r)));case 6:return this._moveToViewMinColumn(e,n,r);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,n,r);case 8:return this._moveToViewCenterColumn(e,n,r);case 9:return this._moveToViewMaxColumn(e,n,r);case 10:return this._moveToViewLastNonWhitespaceColumn(e,n,r);default:return null}}static viewportMove(e,n,i,r,o){const s=e.getCompletelyVisibleViewRange(),a=e.coordinatesConverter.convertViewRangeToModelRange(s);switch(i){case 11:{const l=this._firstLineNumberInRange(e.model,a,o),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,n[0],r,l,c)]}case 13:{const l=this._lastLineNumberInRange(e.model,a,o),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,n[0],r,l,c)]}case 12:{const l=Math.round((a.startLineNumber+a.endLineNumber)/2),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,n[0],r,l,c)]}case 14:{const l=[];for(let c=0,u=n.length;c<u;c++){const d=n[c];l[c]=this.findPositionInViewportIfOutside(e,d,s,r)}return l}default:return null}}static findPositionInViewportIfOutside(e,n,i,r){const o=n.viewState.position.lineNumber;if(i.startLineNumber<=o&&o<=i.endLineNumber-1)return new Kr(n.modelState,n.viewState);{let s;o>i.endLineNumber-1?s=i.endLineNumber-1:o<i.startLineNumber?s=i.startLineNumber:s=o;const a=No.vertical(e.cursorConfig,e,o,n.viewState.position.column,n.viewState.leftoverVisibleColumns,s,!1);return Kr.fromViewState(n.viewState.move(r,a.lineNumber,a.column,a.leftoverVisibleColumns))}}static _firstLineNumberInRange(e,n,i){let r=n.startLineNumber;return n.startColumn!==e.getLineMinColumn(r)&&r++,Math.min(n.endLineNumber,r+i-1)}static _lastLineNumberInRange(e,n,i){let r=n.startLineNumber;return n.startColumn!==e.getLineMinColumn(r)&&r++,Math.max(r,n.endLineNumber-i+1)}static _moveLeft(e,n,i,r){return n.map(o=>Kr.fromViewState(No.moveLeft(e.cursorConfig,e,o.viewState,i,r)))}static _moveHalfLineLeft(e,n,i){const r=[];for(let o=0,s=n.length;o<s;o++){const a=n[o],l=a.viewState.position.lineNumber,c=Math.round(e.getLineLength(l)/2);r[o]=Kr.fromViewState(No.moveLeft(e.cursorConfig,e,a.viewState,i,c))}return r}static _moveRight(e,n,i,r){return n.map(o=>Kr.fromViewState(No.moveRight(e.cursorConfig,e,o.viewState,i,r)))}static _moveHalfLineRight(e,n,i){const r=[];for(let o=0,s=n.length;o<s;o++){const a=n[o],l=a.viewState.position.lineNumber,c=Math.round(e.getLineLength(l)/2);r[o]=Kr.fromViewState(No.moveRight(e.cursorConfig,e,a.viewState,i,c))}return r}static _moveDownByViewLines(e,n,i,r){const o=[];for(let s=0,a=n.length;s<a;s++){const l=n[s];o[s]=Kr.fromViewState(No.moveDown(e.cursorConfig,e,l.viewState,i,r))}return o}static _moveDownByModelLines(e,n,i,r){const o=[];for(let s=0,a=n.length;s<a;s++){const l=n[s];o[s]=Kr.fromModelState(No.moveDown(e.cursorConfig,e.model,l.modelState,i,r))}return o}static _moveUpByViewLines(e,n,i,r){const o=[];for(let s=0,a=n.length;s<a;s++){const l=n[s];o[s]=Kr.fromViewState(No.moveUp(e.cursorConfig,e,l.viewState,i,r))}return o}static _moveUpByModelLines(e,n,i,r){const o=[];for(let s=0,a=n.length;s<a;s++){const l=n[s];o[s]=Kr.fromModelState(No.moveUp(e.cursorConfig,e.model,l.modelState,i,r))}return o}static _moveToViewPosition(e,n,i,r,o){return Kr.fromViewState(n.viewState.move(i,r,o,0))}static _moveToModelPosition(e,n,i,r,o){return Kr.fromModelState(n.modelState.move(i,r,o,0))}static _moveToViewMinColumn(e,n,i){const r=[];for(let o=0,s=n.length;o<s;o++){const a=n[o],l=a.viewState.position.lineNumber,c=e.getLineMinColumn(l);r[o]=this._moveToViewPosition(e,a,i,l,c)}return r}static _moveToViewFirstNonWhitespaceColumn(e,n,i){const r=[];for(let o=0,s=n.length;o<s;o++){const a=n[o],l=a.viewState.position.lineNumber,c=e.getLineFirstNonWhitespaceColumn(l);r[o]=this._moveToViewPosition(e,a,i,l,c)}return r}static _moveToViewCenterColumn(e,n,i){const r=[];for(let o=0,s=n.length;o<s;o++){const a=n[o],l=a.viewState.position.lineNumber,c=Math.round((e.getLineMaxColumn(l)+e.getLineMinColumn(l))/2);r[o]=this._moveToViewPosition(e,a,i,l,c)}return r}static _moveToViewMaxColumn(e,n,i){const r=[];for(let o=0,s=n.length;o<s;o++){const a=n[o],l=a.viewState.position.lineNumber,c=e.getLineMaxColumn(l);r[o]=this._moveToViewPosition(e,a,i,l,c)}return r}static _moveToViewLastNonWhitespaceColumn(e,n,i){const r=[];for(let o=0,s=n.length;o<s;o++){const a=n[o],l=a.viewState.position.lineNumber,c=e.getLineLastNonWhitespaceColumn(l);r[o]=this._moveToViewPosition(e,a,i,l,c)}return r}}var vre;(function(t){const e=function(i){if(!Ic(i))return!1;const r=i;return!(!Cf(r.to)||!Ud(r.select)&&!LOt(r.select)||!Ud(r.by)&&!Cf(r.by)||!Ud(r.value)&&!ok(r.value))};t.metadata={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:`Property-value pairs that can be passed through this argument:
					* 'to': A mandatory logical position value providing where to move the cursor.
						\`\`\`
						'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',
						'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'
						'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'
						'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'
						\`\`\`
					* 'by': Unit to move. Default is computed based on 'to' value.
						\`\`\`
						'line', 'wrappedLine', 'character', 'halfLine'
						\`\`\`
					* 'value': Number of units to move. Default is '1'.
					* 'select': If 'true' makes the selection. Default is 'false'.
				`,constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},t.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},t.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function n(i){if(!i.to)return null;let r;switch(i.to){case t.RawDirection.Left:r=0;break;case t.RawDirection.Right:r=1;break;case t.RawDirection.Up:r=2;break;case t.RawDirection.Down:r=3;break;case t.RawDirection.PrevBlankLine:r=4;break;case t.RawDirection.NextBlankLine:r=5;break;case t.RawDirection.WrappedLineStart:r=6;break;case t.RawDirection.WrappedLineFirstNonWhitespaceCharacter:r=7;break;case t.RawDirection.WrappedLineColumnCenter:r=8;break;case t.RawDirection.WrappedLineEnd:r=9;break;case t.RawDirection.WrappedLineLastNonWhitespaceCharacter:r=10;break;case t.RawDirection.ViewPortTop:r=11;break;case t.RawDirection.ViewPortBottom:r=13;break;case t.RawDirection.ViewPortCenter:r=12;break;case t.RawDirection.ViewPortIfOutside:r=14;break;default:return null}let o=0;switch(i.by){case t.RawUnit.Line:o=1;break;case t.RawUnit.WrappedLine:o=2;break;case t.RawUnit.Character:o=3;break;case t.RawUnit.HalfLine:o=4;break}return{direction:r,unit:o,select:!!i.select,value:i.value||1}}t.parse=n})(vre||(vre={}));class _Ve{constructor(e,n,i){this._indentRulesSupport=n,this._indentationLineProcessor=new hjt(e,i)}shouldIncrease(e,n){const i=this._indentationLineProcessor.getProcessedLine(e,n);return this._indentRulesSupport.shouldIncrease(i)}shouldDecrease(e,n){const i=this._indentationLineProcessor.getProcessedLine(e,n);return this._indentRulesSupport.shouldDecrease(i)}shouldIgnore(e,n){const i=this._indentationLineProcessor.getProcessedLine(e,n);return this._indentRulesSupport.shouldIgnore(i)}shouldIndentNextLine(e,n){const i=this._indentationLineProcessor.getProcessedLine(e,n);return this._indentRulesSupport.shouldIndentNextLine(i)}}class xVe{constructor(e,n){this.model=e,this.indentationLineProcessor=new hjt(e,n)}getProcessedTokenContextAroundRange(e){const n=this._getProcessedTokensBeforeRange(e),i=this._getProcessedTokensAfterRange(e),r=this._getProcessedPreviousLineTokens(e);return{beforeRangeProcessedTokens:n,afterRangeProcessedTokens:i,previousLineProcessedTokens:r}}_getProcessedTokensBeforeRange(e){this.model.tokenization.forceTokenization(e.startLineNumber);const n=this.model.tokenization.getLineTokens(e.startLineNumber),i=OT(n,e.startColumn-1);let r;if(wVe(this.model,e.getStartPosition())){const s=e.startColumn-1-i.firstCharOffset,a=i.firstCharOffset,l=a+s;r=n.sliceAndInflate(a,l,0)}else{const s=e.startColumn-1;r=n.sliceAndInflate(0,s,0)}return this.indentationLineProcessor.getProcessedTokens(r)}_getProcessedTokensAfterRange(e){const n=e.isEmpty()?e.getStartPosition():e.getEndPosition();this.model.tokenization.forceTokenization(n.lineNumber);const i=this.model.tokenization.getLineTokens(n.lineNumber),r=OT(i,n.column-1),o=n.column-1-r.firstCharOffset,s=r.firstCharOffset+o,a=r.firstCharOffset+r.getLineLength(),l=i.sliceAndInflate(s,a,0);return this.indentationLineProcessor.getProcessedTokens(l)}_getProcessedPreviousLineTokens(e){const n=f=>{this.model.tokenization.forceTokenization(f);const m=this.model.tokenization.getLineTokens(f),p=this.model.getLineMaxColumn(f)-1;return OT(m,p)};this.model.tokenization.forceTokenization(e.startLineNumber);const i=this.model.tokenization.getLineTokens(e.startLineNumber),r=OT(i,e.startColumn-1),o=$u.createEmpty("",r.languageIdCodec),s=e.startLineNumber-1;if(s===0||!(r.firstCharOffset===0))return o;const c=n(s);if(!(r.languageId===c.languageId))return o;const d=c.toIViewLineTokens();return this.indentationLineProcessor.getProcessedTokens(d)}}class hjt{constructor(e,n){this.model=e,this.languageConfigurationService=n}getProcessedLine(e,n){var s,a;const i=(l,c)=>{const u=Zo(l);return c+l.substring(u.length)};(a=(s=this.model.tokenization).forceTokenization)==null||a.call(s,e);const r=this.model.tokenization.getLineTokens(e);let o=this.getProcessedTokens(r).getLineContent();return n!==void 0&&(o=i(o,n)),o}getProcessedTokens(e){const n=l=>l===2||l===3||l===1,i=e.getLanguageId(0),o=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew.getBracketRegExp({global:!0}),s=[];return e.forEach(l=>{const c=e.getStandardTokenType(l);let u=e.getTokenText(l);n(c)&&(u=u.replace(o,""));const d=e.getMetadata(l);s.push({text:u,metadata:d})}),$u.createFromTextAndMetadata(s,e.languageIdCodec)}}function wVe(t,e){t.tokenization.forceTokenization(e.lineNumber);const n=t.tokenization.getLineTokens(e.lineNumber),i=OT(n,e.column-1),r=i.firstCharOffset===0,o=n.getLanguageId(0)===i.languageId;return!r&&!o}function N3(t,e,n,i){e.tokenization.forceTokenization(n.startLineNumber);const r=e.getLanguageIdAtPosition(n.startLineNumber,n.startColumn),o=i.getLanguageConfiguration(r);if(!o)return null;const a=new xVe(e,i).getProcessedTokenContextAroundRange(n),l=a.previousLineProcessedTokens.getLineContent(),c=a.beforeRangeProcessedTokens.getLineContent(),u=a.afterRangeProcessedTokens.getLineContent(),d=o.onEnter(t,l,c,u);if(!d)return null;const h=d.indentAction;let f=d.appendText;const m=d.removeText||0;f?h===kl.Indent&&(f="	"+f):h===kl.Indent||h===kl.IndentOutdent?f="	":f="";let p=c3t(e,n.startLineNumber,n.startColumn);return m&&(p=p.substring(0,p.length-m)),{indentAction:h,appendText:f,removeText:m,indentation:p}}var _0i=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},x0i=function(t,e){return function(n,i){e(n,i,t)}},dte;const e1e=Object.create(null);function dL(t,e){if(e<=0)return"";e1e[t]||(e1e[t]=["",t]);const n=e1e[t];for(let i=n.length;i<=e;i++)n[i]=n[i-1]+t;return n[e]}let lb=dte=class{static unshiftIndent(e,n,i,r,o){const s=Kl.visibleColumnFromColumn(e,n,i);if(o){const a=dL(" ",r),c=Kl.prevIndentTabStop(s,r)/r;return dL(a,c)}else{const a="	",c=Kl.prevRenderTabStop(s,i)/i;return dL(a,c)}}static shiftIndent(e,n,i,r,o){const s=Kl.visibleColumnFromColumn(e,n,i);if(o){const a=dL(" ",r),c=Kl.nextIndentTabStop(s,r)/r;return dL(a,c)}else{const a="	",c=Kl.nextRenderTabStop(s,i)/i;return dL(a,c)}}constructor(e,n,i){this._languageConfigurationService=i,this._opts=n,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,n,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(n,i):e.addEditOperation(n,i)}getEditOperations(e,n){const i=this._selection.startLineNumber;let r=this._selection.endLineNumber;this._selection.endColumn===1&&i!==r&&(r=r-1);const{tabSize:o,indentSize:s,insertSpaces:a}=this._opts,l=i===r;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let c=0,u=0;for(let d=i;d<=r;d++,c=u){u=0;const h=e.getLineContent(d);let f=qd(h);if(this._opts.isUnshift&&(h.length===0||f===0)||!l&&!this._opts.isUnshift&&h.length===0)continue;if(f===-1&&(f=h.length),d>1&&Kl.visibleColumnFromColumn(h,f+1,o)%s!==0&&e.tokenization.isCheapToTokenize(d-1)){const g=N3(this._opts.autoIndent,e,new ve(d-1,e.getLineMaxColumn(d-1),d-1,e.getLineMaxColumn(d-1)),this._languageConfigurationService);if(g){if(u=c,g.appendText)for(let y=0,_=g.appendText.length;y<_&&u<s&&g.appendText.charCodeAt(y)===32;y++)u++;g.removeText&&(u=Math.max(0,u-g.removeText));for(let y=0;y<u&&!(f===0||h.charCodeAt(f-1)!==32);y++)f--}}if(this._opts.isUnshift&&f===0)continue;let m;this._opts.isUnshift?m=dte.unshiftIndent(h,f+1,o,s,a):m=dte.shiftIndent(h,f+1,o,s,a),this._addEditOperation(n,new ve(d,1,d,f+1),m),d===i&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=f+1)}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&e.getLineLength(i)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const c=a?dL(" ",s):"	";for(let u=i;u<=r;u++){const d=e.getLineContent(u);let h=qd(d);if(!(this._opts.isUnshift&&(d.length===0||h===0))&&!(!l&&!this._opts.isUnshift&&d.length===0)&&(h===-1&&(h=d.length),!(this._opts.isUnshift&&h===0)))if(this._opts.isUnshift){h=Math.min(h,s);for(let f=0;f<h;f++)if(d.charCodeAt(f)===9){h=f+1;break}this._addEditOperation(n,new ve(u,1,u,h+1),"")}else this._addEditOperation(n,new ve(u,1,u,1),c),u===i&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn===1)}}this._selectionId=n.trackSelection(this._selection)}computeCursorState(e,n){if(this._useLastEditRangeForCursorEndPosition){const r=n.getInverseEditOperations()[0];return new Pn(r.range.endLineNumber,r.range.endColumn,r.range.endLineNumber,r.range.endColumn)}const i=n.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){const r=this._selection.startColumn;return i.startColumn<=r?i:i.getDirection()===0?new Pn(i.startLineNumber,r,i.endLineNumber,i.endColumn):new Pn(i.endLineNumber,i.endColumn,i.startLineNumber,r)}return i}};lb=dte=_0i([x0i(2,bs)],lb);class w0i{constructor(e,n,i){this._range=e,this._charBeforeSelection=n,this._charAfterSelection=i}getEditOperations(e,n){n.addTrackedEditOperation(new ve(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),n.addTrackedEditOperation(new ve(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,n){const i=n.getInverseEditOperations(),r=i[0].range,o=i[1].range;return new Pn(r.endLineNumber,r.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)}}class C0i{constructor(e,n,i){this._position=e,this._text=n,this._charAfter=i}getEditOperations(e,n){n.addTrackedEditOperation(new ve(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(e,n){const r=n.getInverseEditOperations()[0].range;return new Pn(r.endLineNumber,r.startColumn,r.endLineNumber,r.endColumn-this._charAfter.length)}}function S0i(t,e,n){const i=t.tokenization.getLanguageIdAtPosition(e,0);if(e>1){let r,o=-1;for(r=e-1;r>=1;r--){if(t.tokenization.getLanguageIdAtPosition(r,0)!==i)return o;const s=t.getLineContent(r);if(n.shouldIgnore(r)||/^\s+$/.test(s)||s===""){o=r;continue}return r}}return-1}function UH(t,e,n,i=!0,r){if(t<4)return null;const o=r.getLanguageConfiguration(e.tokenization.getLanguageId()).indentRulesSupport;if(!o)return null;const s=new _Ve(e,o,r);if(n<=1)return{indentation:"",action:null};for(let l=n-1;l>0&&e.getLineContent(l)==="";l--)if(l===1)return{indentation:"",action:null};const a=S0i(e,n,s);if(a<0)return null;if(a<1)return{indentation:"",action:null};if(s.shouldIncrease(a)||s.shouldIndentNextLine(a)){const l=e.getLineContent(a);return{indentation:Zo(l),action:kl.Indent,line:a}}else if(s.shouldDecrease(a)){const l=e.getLineContent(a);return{indentation:Zo(l),action:null,line:a}}else{if(a===1)return{indentation:Zo(e.getLineContent(a)),action:null,line:a};const l=a-1,c=o.getIndentMetadata(e.getLineContent(l));if(!(c&3)&&c&4){let u=0;for(let d=l-1;d>0;d--)if(!s.shouldIndentNextLine(d)){u=d;break}return{indentation:Zo(e.getLineContent(u+1)),action:null,line:u+1}}if(i)return{indentation:Zo(e.getLineContent(a)),action:null,line:a};for(let u=a;u>0;u--){if(s.shouldIncrease(u))return{indentation:Zo(e.getLineContent(u)),action:kl.Indent,line:u};if(s.shouldIndentNextLine(u)){let d=0;for(let h=u-1;h>0;h--)if(!s.shouldIndentNextLine(u)){d=h;break}return{indentation:Zo(e.getLineContent(d+1)),action:null,line:d+1}}else if(s.shouldDecrease(u))return{indentation:Zo(e.getLineContent(u)),action:null,line:u}}return{indentation:Zo(e.getLineContent(1)),action:null,line:1}}}function Y9(t,e,n,i,r,o){if(t<4)return null;const s=o.getLanguageConfiguration(n);if(!s)return null;const a=o.getLanguageConfiguration(n).indentRulesSupport;if(!a)return null;const l=new _Ve(e,a,o),c=UH(t,e,i,void 0,o);if(c){const u=c.line;if(u!==void 0){let d=!0;for(let h=u;h<i-1;h++)if(!/^\s*$/.test(e.getLineContent(h))){d=!1;break}if(d){const h=s.onEnter(t,"",e.getLineContent(u),"");if(h){let f=Zo(e.getLineContent(u));return h.removeText&&(f=f.substring(0,f.length-h.removeText)),h.indentAction===kl.Indent||h.indentAction===kl.IndentOutdent?f=r.shiftIndent(f):h.indentAction===kl.Outdent&&(f=r.unshiftIndent(f)),l.shouldDecrease(i)&&(f=r.unshiftIndent(f)),h.appendText&&(f+=h.appendText),Zo(f)}}}return l.shouldDecrease(i)?c.action===kl.Indent?c.indentation:r.unshiftIndent(c.indentation):c.action===kl.Indent?r.shiftIndent(c.indentation):c.indentation}return null}function N0i(t,e,n,i,r){if(t<4)return null;const o=e.getLanguageIdAtPosition(n.startLineNumber,n.startColumn),s=r.getLanguageConfiguration(o).indentRulesSupport;if(!s)return null;e.tokenization.forceTokenization(n.startLineNumber);const l=new xVe(e,r).getProcessedTokenContextAroundRange(n),c=l.afterRangeProcessedTokens,u=l.beforeRangeProcessedTokens,d=Zo(u.getLineContent()),h=D0i(e,n.startLineNumber,u),f=wVe(e,n.getStartPosition()),m=e.getLineContent(n.startLineNumber),p=Zo(m),g=UH(t,h,n.startLineNumber+1,void 0,r);if(!g){const _=f?p:d;return{beforeEnter:_,afterEnter:_}}let y=f?p:g.indentation;return g.action===kl.Indent&&(y=i.shiftIndent(y)),s.shouldDecrease(c.getLineContent())&&(y=i.unshiftIndent(y)),{beforeEnter:f?p:d,afterEnter:y}}function E0i(t,e,n,i,r,o){const s=t.autoIndent;if(s<4||wVe(e,n.getStartPosition()))return null;const l=e.getLanguageIdAtPosition(n.startLineNumber,n.startColumn),c=o.getLanguageConfiguration(l).indentRulesSupport;if(!c)return null;const d=new xVe(e,o).getProcessedTokenContextAroundRange(n),h=d.beforeRangeProcessedTokens.getLineContent(),f=d.afterRangeProcessedTokens.getLineContent(),m=h+f,p=h+i+f;if(!c.shouldDecrease(m)&&c.shouldDecrease(p)){const y=UH(s,e,n.startLineNumber,!1,o);if(!y)return null;let _=y.indentation;return y.action!==kl.Indent&&(_=r.unshiftIndent(_)),_}const g=n.startLineNumber-1;if(g>0){const y=e.getLineContent(g);if(c.shouldIndentNextLine(y)&&c.shouldIncrease(p)){const _=UH(s,e,n.startLineNumber,!1,o),w=_==null?void 0:_.indentation;if(w!==void 0){const C=e.getLineContent(n.startLineNumber),N=Zo(C),D=r.shiftIndent(w)===N,k=/^\s*$/.test(m),M=t.autoClosingPairs.autoClosingPairsOpenByEnd.get(i),A=M&&M.length>0&&k;if(D&&A)return w}}}return null}function fjt(t,e,n){const i=n.getLanguageConfiguration(t.getLanguageId()).indentRulesSupport;return!i||e<1||e>t.getLineCount()?null:i.getIndentMetadata(t.getLineContent(e))}function D0i(t,e,n){return{tokenization:{getLineTokens:r=>r===e?n:t.tokenization.getLineTokens(r),getLanguageId:()=>t.getLanguageId(),getLanguageIdAtPosition:(r,o)=>t.getLanguageIdAtPosition(r,o)},getLineContent:r=>r===e?n.getLineContent():t.getLineContent(r)}}class k0i{static getEdits(e,n,i,r,o){if(!o&&this._isAutoIndentType(e,n,i)){const s=[];for(const l of i){const c=this._findActualIndentationForSelection(e,n,l,r);if(c===null)return;s.push({selection:l,indentation:c})}const a=hTe.getAutoClosingPairClose(e,n,i,r,!1);return this._getIndentationAndAutoClosingPairEdits(e,n,s,r,a)}}static _isAutoIndentType(e,n,i){if(e.autoIndent<4)return!1;for(let r=0,o=i.length;r<o;r++)if(!n.tokenization.isCheapToTokenize(i[r].getEndPosition().lineNumber))return!1;return!0}static _findActualIndentationForSelection(e,n,i,r){const o=E0i(e,n,i,r,{shiftIndent:a=>NVe(e,a),unshiftIndent:a=>yre(e,a)},e.languageConfigurationService);if(o===null)return null;const s=c3t(n,i.startLineNumber,i.startColumn);return o===e.normalizeIndentation(s)?null:o}static _getIndentationAndAutoClosingPairEdits(e,n,i,r,o){const s=i.map(({selection:l,indentation:c})=>{if(o!==null){const u=this._getEditFromIndentationAndSelection(e,n,c,l,r,!1);return new $0i(u,l,r,o)}else{const u=this._getEditFromIndentationAndSelection(e,n,c,l,r,!0);return RL(u.range,u.text,!1)}}),a={shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1};return new Mf(4,s,a)}static _getEditFromIndentationAndSelection(e,n,i,r,o,s=!0){const a=r.startLineNumber,l=n.getLineFirstNonWhitespaceColumn(a);let c=e.normalizeIndentation(i);if(l!==0){const d=n.getLineContent(a);c+=d.substring(l-1,r.startColumn-1)}return c+=s?o:"",{range:new ve(a,1,r.endLineNumber,r.endColumn),text:c}}}class M0i{static getEdits(e,n,i,r,o,s){if(mjt(n,i,r,o,s))return this._runAutoClosingOvertype(e,r,s)}static _runAutoClosingOvertype(e,n,i){const r=[];for(let o=0,s=n.length;o<s;o++){const l=n[o].getPosition(),c=new ve(l.lineNumber,l.column,l.lineNumber,l.column+1);r[o]=new Su(c,i)}return new Mf(4,r,{shouldPushStackElementBefore:lme(e,4),shouldPushStackElementAfter:!1})}}class L0i{static getEdits(e,n,i,r,o){if(mjt(e,n,i,r,o)){const s=i.map(a=>new Su(new ve(a.positionLineNumber,a.positionColumn,a.positionLineNumber,a.positionColumn+1),"",!1));return new Mf(4,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}}class hTe{static getEdits(e,n,i,r,o,s){if(!s){const a=this.getAutoClosingPairClose(e,n,i,r,o);if(a!==null)return this._runAutoClosingOpenCharType(i,r,o,a)}}static _runAutoClosingOpenCharType(e,n,i,r){const o=[];for(let s=0,a=e.length;s<a;s++){const l=e[s];o[s]=new F0i(l,n,!i,r)}return new Mf(4,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static getAutoClosingPairClose(e,n,i,r,o){for(const m of i)if(!m.isEmpty())return null;const s=i.map(m=>{const p=m.getPosition();return o?{lineNumber:p.lineNumber,beforeColumn:p.column-r.length,afterColumn:p.column}:{lineNumber:p.lineNumber,beforeColumn:p.column,afterColumn:p.column}}),a=this._findAutoClosingPairOpen(e,n,s.map(m=>new ot(m.lineNumber,m.beforeColumn)),r);if(!a)return null;let l,c;if(pk(r)?(l=e.autoClosingQuotes,c=e.shouldAutoCloseBefore.quote):(e.blockCommentStartToken?a.open.includes(e.blockCommentStartToken):!1)?(l=e.autoClosingComments,c=e.shouldAutoCloseBefore.comment):(l=e.autoClosingBrackets,c=e.shouldAutoCloseBefore.bracket),l==="never")return null;const d=this._findContainedAutoClosingPair(e,a),h=d?d.close:"";let f=!0;for(const m of s){const{lineNumber:p,beforeColumn:g,afterColumn:y}=m,_=n.getLineContent(p),w=_.substring(0,g-1),C=_.substring(y-1);if(C.startsWith(h)||(f=!1),C.length>0){const k=C.charAt(0);if(!this._isBeforeClosingBrace(e,C)&&!c(k))return null}if(a.open.length===1&&(r==="'"||r==='"')&&l!=="always"){const k=ab(e.wordSeparators,[]);if(w.length>0){const M=w.charCodeAt(w.length-1);if(k.get(M)===0)return null}}if(!n.tokenization.isCheapToTokenize(p))return null;n.tokenization.forceTokenization(p);const N=n.tokenization.getLineTokens(p),E=OT(N,g-1);if(!a.shouldAutoClose(E,g-E.firstCharOffset))return null;const D=a.findNeutralCharacter();if(D){const k=n.tokenization.getTokenTypeIfInsertingCharacter(p,g,D);if(!a.isOK(k))return null}}return f?a.close.substring(0,a.close.length-h.length):a.close}static _findContainedAutoClosingPair(e,n){if(n.open.length<=1)return null;const i=n.close.charAt(n.close.length-1),r=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let o=null;for(const s of r)s.open!==n.open&&n.open.includes(s.open)&&n.close.endsWith(s.close)&&(!o||s.open.length>o.open.length)&&(o=s);return o}static _findAutoClosingPairOpen(e,n,i,r){const o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(r);if(!o)return null;let s=null;for(const a of o)if(s===null||a.open.length>s.open.length){let l=!0;for(const c of i)if(n.getValueInRange(new ve(c.lineNumber,c.column-a.open.length+1,c.lineNumber,c.column))+r!==a.open){l=!1;break}l&&(s=a)}return s}static _isBeforeClosingBrace(e,n){const i=n.charAt(0),r=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],o=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],s=r.some(l=>n.startsWith(l.open)),a=o.some(l=>n.startsWith(l.close));return!s&&a}}class T0i{static getEdits(e,n,i,r,o){if(!o&&this._isSurroundSelectionType(e,n,i,r))return this._runSurroundSelectionType(e,i,r)}static _runSurroundSelectionType(e,n,i){const r=[];for(let o=0,s=n.length;o<s;o++){const a=n[o],l=e.surroundingPairs[i];r[o]=new w0i(a,i,l)}return new Mf(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isSurroundSelectionType(e,n,i,r){if(!pjt(e,r)||!e.surroundingPairs.hasOwnProperty(r))return!1;const o=pk(r);for(const s of i){if(s.isEmpty())return!1;let a=!0;for(let l=s.startLineNumber;l<=s.endLineNumber;l++){const c=n.getLineContent(l),u=l===s.startLineNumber?s.startColumn-1:0,d=l===s.endLineNumber?s.endColumn-1:c.length,h=c.substring(u,d);if(/[^ \t]/.test(h)){a=!1;break}}if(a)return!1;if(o&&s.startLineNumber===s.endLineNumber&&s.startColumn+1===s.endColumn){const l=n.getValueInRange(s);if(pk(l))return!1}}return!0}}class I0i{static getEdits(e,n,i,r,o,s){if(!s&&this._isTypeInterceptorElectricChar(n,i,r)){const a=this._typeInterceptorElectricChar(e,n,i,r[0],o);if(a)return a}}static _isTypeInterceptorElectricChar(e,n,i){return!!(i.length===1&&n.tokenization.isCheapToTokenize(i[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(e,n,i,r,o){if(!n.electricChars.hasOwnProperty(o)||!r.isEmpty())return null;const s=r.getPosition();i.tokenization.forceTokenization(s.lineNumber);const a=i.tokenization.getLineTokens(s.lineNumber);let l;try{l=n.onElectricCharacter(o,a,s.column)}catch(c){return ji(c),null}if(!l)return null;if(l.matchOpenBracket){const c=(a.getLineContent()+o).lastIndexOf(l.matchOpenBracket)+1,u=i.bracketPairs.findMatchingBracketUp(l.matchOpenBracket,{lineNumber:s.lineNumber,column:c},500);if(u){if(u.startLineNumber===s.lineNumber)return null;const d=i.getLineContent(u.startLineNumber),h=Zo(d),f=n.normalizeIndentation(h),m=i.getLineContent(s.lineNumber),p=i.getLineFirstNonWhitespaceColumn(s.lineNumber)||s.column,g=m.substring(p-1,s.column-1),y=f+g+o,_=new ve(s.lineNumber,1,s.lineNumber,s.column),w=new Su(_,y);return new Mf(SVe(y,e),[w],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}}class A0i{static getEdits(e,n,i){const r=[];for(let s=0,a=n.length;s<a;s++)r[s]=new Su(n[s],i);const o=SVe(i,e);return new Mf(o,r,{shouldPushStackElementBefore:lme(e,o),shouldPushStackElementAfter:!1})}}class ame{static getEdits(e,n,i,r,o){if(!o&&r===`
`){const s=[];for(let a=0,l=i.length;a<l;a++)s[a]=this._enter(e,n,!1,i[a]);return new Mf(4,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}static _enter(e,n,i,r){if(e.autoIndent===0)return RL(r,`
`,i);if(!n.tokenization.isCheapToTokenize(r.getStartPosition().lineNumber)||e.autoIndent===1){const l=n.getLineContent(r.startLineNumber),c=Zo(l).substring(0,r.startColumn-1);return RL(r,`
`+e.normalizeIndentation(c),i)}const o=N3(e.autoIndent,n,r,e.languageConfigurationService);if(o){if(o.indentAction===kl.None)return RL(r,`
`+e.normalizeIndentation(o.indentation+o.appendText),i);if(o.indentAction===kl.Indent)return RL(r,`
`+e.normalizeIndentation(o.indentation+o.appendText),i);if(o.indentAction===kl.IndentOutdent){const l=e.normalizeIndentation(o.indentation),c=e.normalizeIndentation(o.indentation+o.appendText),u=`
`+c+`
`+l;return i?new ute(r,u,!0):new bre(r,u,-1,c.length-l.length,!0)}else if(o.indentAction===kl.Outdent){const l=yre(e,o.indentation);return RL(r,`
`+e.normalizeIndentation(l+o.appendText),i)}}const s=n.getLineContent(r.startLineNumber),a=Zo(s).substring(0,r.startColumn-1);if(e.autoIndent>=4){const l=N0i(e.autoIndent,n,r,{unshiftIndent:c=>yre(e,c),shiftIndent:c=>NVe(e,c),normalizeIndentation:c=>e.normalizeIndentation(c)},e.languageConfigurationService);if(l){let c=e.visibleColumnFromColumn(n,r.getEndPosition());const u=r.endColumn,d=n.getLineContent(r.endLineNumber),h=qd(d);if(h>=0?r=r.setEndPosition(r.endLineNumber,Math.max(r.endColumn,h+1)):r=r.setEndPosition(r.endLineNumber,n.getLineMaxColumn(r.endLineNumber)),i)return new ute(r,`
`+e.normalizeIndentation(l.afterEnter),!0);{let f=0;return u<=h+1&&(e.insertSpaces||(c=Math.ceil(c/e.indentSize)),f=Math.min(c+1-e.normalizeIndentation(l.afterEnter).length-1,0)),new bre(r,`
`+e.normalizeIndentation(l.afterEnter),0,f,!0)}}}return RL(r,`
`+e.normalizeIndentation(a),i)}static lineInsertBefore(e,n,i){if(n===null||i===null)return[];const r=[];for(let o=0,s=i.length;o<s;o++){let a=i[o].positionLineNumber;if(a===1)r[o]=new ute(new ve(1,1,1,1),`
`);else{a--;const l=n.getLineMaxColumn(a);r[o]=this._enter(e,n,!1,new ve(a,l,a,l))}}return r}static lineInsertAfter(e,n,i){if(n===null||i===null)return[];const r=[];for(let o=0,s=i.length;o<s;o++){const a=i[o].positionLineNumber,l=n.getLineMaxColumn(a);r[o]=this._enter(e,n,!1,new ve(a,l,a,l))}return r}static lineBreakInsert(e,n,i){const r=[];for(let o=0,s=i.length;o<s;o++)r[o]=this._enter(e,n,!0,i[o]);return r}}class R0i{static getEdits(e,n,i,r,o,s){const a=this._distributePasteToCursors(e,i,r,o,s);return a?(i=i.sort(ve.compareRangesUsingStarts),this._distributedPaste(e,n,i,a)):this._simplePaste(e,n,i,r,o)}static _distributePasteToCursors(e,n,i,r,o){if(r||n.length===1)return null;if(o&&o.length===n.length)return o;if(e.multiCursorPaste==="spread"){i.charCodeAt(i.length-1)===10&&(i=i.substring(0,i.length-1)),i.charCodeAt(i.length-1)===13&&(i=i.substring(0,i.length-1));const s=Tw(i);if(s.length===n.length)return s}return null}static _distributedPaste(e,n,i,r){const o=[];for(let s=0,a=i.length;s<a;s++)o[s]=new Su(i[s],r[s]);return new Mf(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(e,n,i,r,o){const s=[];for(let a=0,l=i.length;a<l;a++){const c=i[a],u=c.getPosition();if(o&&!c.isEmpty()&&(o=!1),o&&r.indexOf(`
`)!==r.length-1&&(o=!1),o){const d=new ve(u.lineNumber,1,u.lineNumber,1);s[a]=new yVe(d,r,c,!0)}else s[a]=new Su(c,r)}return new Mf(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class P0i{static getEdits(e,n,i,r,o,s,a,l){const c=r.map(u=>this._compositionType(i,u,o,s,a,l));return new Mf(4,c,{shouldPushStackElementBefore:lme(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,n,i,r,o,s){if(!n.isEmpty())return null;const a=n.getPosition(),l=Math.max(1,a.column-r),c=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+o),u=new ve(a.lineNumber,l,a.lineNumber,c);return e.getValueInRange(u)===i&&s===0?null:new bre(u,i,0,s)}}class O0i{static getEdits(e,n,i){const r=[];for(let s=0,a=n.length;s<a;s++)r[s]=new Su(n[s],i);const o=SVe(i,e);return new Mf(o,r,{shouldPushStackElementBefore:lme(e,o),shouldPushStackElementAfter:!1})}}class j0i{static getCommands(e,n,i){const r=[];for(let o=0,s=i.length;o<s;o++){const a=i[o];if(a.isEmpty()){const l=n.getLineContent(a.startLineNumber);if(/^\s*$/.test(l)&&n.tokenization.isCheapToTokenize(a.startLineNumber)){let c=this._goodIndentForLine(e,n,a.startLineNumber);c=c||"	";const u=e.normalizeIndentation(c);if(!l.startsWith(u)){r[o]=new Su(new ve(a.startLineNumber,1,a.startLineNumber,l.length+1),u,!0);continue}}r[o]=this._replaceJumpToNextIndent(e,n,a,!0)}else{if(a.startLineNumber===a.endLineNumber){const l=n.getLineMaxColumn(a.startLineNumber);if(a.startColumn!==1||a.endColumn!==l){r[o]=this._replaceJumpToNextIndent(e,n,a,!1);continue}}r[o]=new lb(a,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService)}}return r}static _goodIndentForLine(e,n,i){let r=null,o="";const s=UH(e.autoIndent,n,i,!1,e.languageConfigurationService);if(s)r=s.action,o=s.indentation;else if(i>1){let a;for(a=i-1;a>=1;a--){const u=n.getLineContent(a);if(w0(u)>=0)break}if(a<1)return null;const l=n.getLineMaxColumn(a),c=N3(e.autoIndent,n,new ve(a,l,a,l),e.languageConfigurationService);c&&(o=c.indentation+c.appendText)}return r&&(r===kl.Indent&&(o=NVe(e,o)),r===kl.Outdent&&(o=yre(e,o)),o=e.normalizeIndentation(o)),o||null}static _replaceJumpToNextIndent(e,n,i,r){let o="";const s=i.getStartPosition();if(e.insertSpaces){const a=e.visibleColumnFromColumn(n,s),l=e.indentSize,c=l-a%l;for(let u=0;u<c;u++)o+=" "}else o="	";return new Su(i,o,r)}}class CVe extends bre{constructor(e,n,i,r,o,s){super(e,n,i,r),this._openCharacter=o,this._closeCharacter=s,this.closeCharacterRange=null,this.enclosingRange=null}_computeCursorStateWithRange(e,n,i){return this.closeCharacterRange=new ve(n.startLineNumber,n.endColumn-this._closeCharacter.length,n.endLineNumber,n.endColumn),this.enclosingRange=new ve(n.startLineNumber,n.endColumn-this._openCharacter.length-this._closeCharacter.length,n.endLineNumber,n.endColumn),super.computeCursorState(e,i)}}class F0i extends CVe{constructor(e,n,i,r){const o=(i?n:"")+r,s=0,a=-r.length;super(e,o,s,a,n,r)}computeCursorState(e,n){const r=n.getInverseEditOperations()[0].range;return this._computeCursorStateWithRange(e,r,n)}}class $0i extends CVe{constructor(e,n,i,r){const o=i+r,s=0,a=i.length;super(n,o,s,a,i,r),this._autoIndentationEdit=e,this._autoClosingEdit={range:n,text:o}}getEditOperations(e,n){n.addTrackedEditOperation(this._autoIndentationEdit.range,this._autoIndentationEdit.text),n.addTrackedEditOperation(this._autoClosingEdit.range,this._autoClosingEdit.text)}computeCursorState(e,n){const i=n.getInverseEditOperations();if(i.length!==2)throw new Error("There should be two inverse edit operations!");const r=i[0].range,o=i[1].range,s=r.plusRange(o);return this._computeCursorStateWithRange(e,s,n)}}function SVe(t,e){return t===" "?e===5||e===6?6:5:4}function lme(t,e){return bat(t)&&!bat(e)?!0:t===5?!1:gat(t)!==gat(e)}function gat(t){return t===6||t===5?"space":t}function bat(t){return t===4||t===5||t===6}function mjt(t,e,n,i,r){if(t.autoClosingOvertype==="never"||!t.autoClosingPairs.autoClosingPairsCloseSingleChar.has(r))return!1;for(let o=0,s=n.length;o<s;o++){const a=n[o];if(!a.isEmpty())return!1;const l=a.getPosition(),c=e.getLineContent(l.lineNumber);if(c.charAt(l.column-1)!==r)return!1;const d=pk(r);if((l.column>2?c.charCodeAt(l.column-2):0)===92&&d)return!1;if(t.autoClosingOvertype==="auto"){let f=!1;for(let m=0,p=i.length;m<p;m++){const g=i[m];if(l.lineNumber===g.startLineNumber&&l.column===g.startColumn){f=!0;break}}if(!f)return!1}}return!0}function RL(t,e,n){return n?new ute(t,e,!0):new Su(t,e,!0)}function NVe(t,e,n){return n=n||1,lb.shiftIndent(e,e.length+n,t.tabSize,t.indentSize,t.insertSpaces)}function yre(t,e,n){return n=n||1,lb.unshiftIndent(e,e.length+n,t.tabSize,t.indentSize,t.insertSpaces)}function pjt(t,e){return pk(e)?t.autoSurround==="quotes"||t.autoSurround==="languageDefined":t.autoSurround==="brackets"||t.autoSurround==="languageDefined"}class NE{static indent(e,n,i){if(n===null||i===null)return[];const r=[];for(let o=0,s=i.length;o<s;o++)r[o]=new lb(i[o],{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService);return r}static outdent(e,n,i){const r=[];for(let o=0,s=i.length;o<s;o++)r[o]=new lb(i[o],{isUnshift:!0,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService);return r}static paste(e,n,i,r,o,s){return R0i.getEdits(e,n,i,r,o,s)}static tab(e,n,i){return j0i.getCommands(e,n,i)}static compositionType(e,n,i,r,o,s,a,l){return P0i.getEdits(e,n,i,r,o,s,a,l)}static compositionEndWithInterceptors(e,n,i,r,o,s){if(!r)return null;let a=null;for(const h of r)if(a===null)a=h.insertedText;else if(a!==h.insertedText)return null;if(!a||a.length!==1)return null;const l=a;let c=!1;for(const h of r)if(h.deletedText.length!==0){c=!0;break}if(c){if(!pjt(n,l)||!n.surroundingPairs.hasOwnProperty(l))return null;const h=pk(l);for(const p of r)if(p.deletedSelectionStart!==0||p.deletedSelectionEnd!==p.deletedText.length||/^[ \t]+$/.test(p.deletedText)||h&&pk(p.deletedText))return null;const f=[];for(const p of o){if(!p.isEmpty())return null;f.push(p.getPosition())}if(f.length!==r.length)return null;const m=[];for(let p=0,g=f.length;p<g;p++)m.push(new C0i(f[p],r[p].deletedText,n.surroundingPairs[l]));return new Mf(4,m,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const u=L0i.getEdits(n,i,o,s,l);if(u!==void 0)return u;const d=hTe.getEdits(n,i,o,l,!0,!1);return d!==void 0?d:null}static typeWithInterceptors(e,n,i,r,o,s,a){const l=ame.getEdits(i,r,o,a,e);if(l!==void 0)return l;const c=k0i.getEdits(i,r,o,a,e);if(c!==void 0)return c;const u=M0i.getEdits(n,i,r,o,s,a);if(u!==void 0)return u;const d=hTe.getEdits(i,r,o,a,!1,e);if(d!==void 0)return d;const h=T0i.getEdits(i,r,o,a,e);if(h!==void 0)return h;const f=I0i.getEdits(n,i,r,o,a,e);return f!==void 0?f:A0i.getEdits(n,o,a)}static typeWithoutInterceptors(e,n,i,r,o){return O0i.getEdits(e,r,o)}}class V0i{constructor(e,n,i,r,o,s){this.deletedText=e,this.deletedSelectionStart=n,this.deletedSelectionEnd=i,this.insertedText=r,this.insertedSelectionStart=o,this.insertedSelectionEnd=s}}var Re;(function(t){t.editorSimpleInput=new gn("editorSimpleInput",!1,!0),t.editorTextFocus=new gn("editorTextFocus",!1,I("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),t.focus=new gn("editorFocus",!1,I("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),t.textInputFocus=new gn("textInputFocus",!1,I("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),t.readOnly=new gn("editorReadonly",!1,I("editorReadonly","Whether the editor is read-only")),t.inDiffEditor=new gn("inDiffEditor",!1,I("inDiffEditor","Whether the context is a diff editor")),t.isEmbeddedDiffEditor=new gn("isEmbeddedDiffEditor",!1,I("isEmbeddedDiffEditor","Whether the context is an embedded diff editor")),t.inMultiDiffEditor=new gn("inMultiDiffEditor",!1,I("inMultiDiffEditor","Whether the context is a multi diff editor")),t.multiDiffEditorAllCollapsed=new gn("multiDiffEditorAllCollapsed",void 0,I("multiDiffEditorAllCollapsed","Whether all files in multi diff editor are collapsed")),t.hasChanges=new gn("diffEditorHasChanges",!1,I("diffEditorHasChanges","Whether the diff editor has changes")),t.comparingMovedCode=new gn("comparingMovedCode",!1,I("comparingMovedCode","Whether a moved code block is selected for comparison")),t.accessibleDiffViewerVisible=new gn("accessibleDiffViewerVisible",!1,I("accessibleDiffViewerVisible","Whether the accessible diff viewer is visible")),t.diffEditorRenderSideBySideInlineBreakpointReached=new gn("diffEditorRenderSideBySideInlineBreakpointReached",!1,I("diffEditorRenderSideBySideInlineBreakpointReached","Whether the diff editor render side by side inline breakpoint is reached")),t.diffEditorInlineMode=new gn("diffEditorInlineMode",!1,I("diffEditorInlineMode","Whether inline mode is active")),t.diffEditorOriginalWritable=new gn("diffEditorOriginalWritable",!1,I("diffEditorOriginalWritable","Whether modified is writable in the diff editor")),t.diffEditorModifiedWritable=new gn("diffEditorModifiedWritable",!1,I("diffEditorModifiedWritable","Whether modified is writable in the diff editor")),t.diffEditorOriginalUri=new gn("diffEditorOriginalUri","",I("diffEditorOriginalUri","The uri of the original document")),t.diffEditorModifiedUri=new gn("diffEditorModifiedUri","",I("diffEditorModifiedUri","The uri of the modified document")),t.columnSelection=new gn("editorColumnSelection",!1,I("editorColumnSelection","Whether `editor.columnSelection` is enabled")),t.writable=t.readOnly.toNegated(),t.hasNonEmptySelection=new gn("editorHasSelection",!1,I("editorHasSelection","Whether the editor has text selected")),t.hasOnlyEmptySelection=t.hasNonEmptySelection.toNegated(),t.hasMultipleSelections=new gn("editorHasMultipleSelections",!1,I("editorHasMultipleSelections","Whether the editor has multiple selections")),t.hasSingleSelection=t.hasMultipleSelections.toNegated(),t.tabMovesFocus=new gn("editorTabMovesFocus",!1,I("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),t.tabDoesNotMoveFocus=t.tabMovesFocus.toNegated(),t.isInEmbeddedEditor=new gn("isInEmbeddedEditor",!1,!0),t.canUndo=new gn("canUndo",!1,!0),t.canRedo=new gn("canRedo",!1,!0),t.hoverVisible=new gn("editorHoverVisible",!1,I("editorHoverVisible","Whether the editor hover is visible")),t.hoverFocused=new gn("editorHoverFocused",!1,I("editorHoverFocused","Whether the editor hover is focused")),t.stickyScrollFocused=new gn("stickyScrollFocused",!1,I("stickyScrollFocused","Whether the sticky scroll is focused")),t.stickyScrollVisible=new gn("stickyScrollVisible",!1,I("stickyScrollVisible","Whether the sticky scroll is visible")),t.standaloneColorPickerVisible=new gn("standaloneColorPickerVisible",!1,I("standaloneColorPickerVisible","Whether the standalone color picker is visible")),t.standaloneColorPickerFocused=new gn("standaloneColorPickerFocused",!1,I("standaloneColorPickerFocused","Whether the standalone color picker is focused")),t.inCompositeEditor=new gn("inCompositeEditor",void 0,I("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),t.notInCompositeEditor=t.inCompositeEditor.toNegated(),t.languageId=new gn("editorLangId","",I("editorLangId","The language identifier of the editor")),t.hasCompletionItemProvider=new gn("editorHasCompletionItemProvider",!1,I("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),t.hasCodeActionsProvider=new gn("editorHasCodeActionsProvider",!1,I("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),t.hasCodeLensProvider=new gn("editorHasCodeLensProvider",!1,I("editorHasCodeLensProvider","Whether the editor has a code lens provider")),t.hasDefinitionProvider=new gn("editorHasDefinitionProvider",!1,I("editorHasDefinitionProvider","Whether the editor has a definition provider")),t.hasDeclarationProvider=new gn("editorHasDeclarationProvider",!1,I("editorHasDeclarationProvider","Whether the editor has a declaration provider")),t.hasImplementationProvider=new gn("editorHasImplementationProvider",!1,I("editorHasImplementationProvider","Whether the editor has an implementation provider")),t.hasTypeDefinitionProvider=new gn("editorHasTypeDefinitionProvider",!1,I("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),t.hasHoverProvider=new gn("editorHasHoverProvider",!1,I("editorHasHoverProvider","Whether the editor has a hover provider")),t.hasDocumentHighlightProvider=new gn("editorHasDocumentHighlightProvider",!1,I("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),t.hasDocumentSymbolProvider=new gn("editorHasDocumentSymbolProvider",!1,I("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),t.hasReferenceProvider=new gn("editorHasReferenceProvider",!1,I("editorHasReferenceProvider","Whether the editor has a reference provider")),t.hasRenameProvider=new gn("editorHasRenameProvider",!1,I("editorHasRenameProvider","Whether the editor has a rename provider")),t.hasSignatureHelpProvider=new gn("editorHasSignatureHelpProvider",!1,I("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),t.hasInlayHintsProvider=new gn("editorHasInlayHintsProvider",!1,I("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),t.hasDocumentFormattingProvider=new gn("editorHasDocumentFormattingProvider",!1,I("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),t.hasDocumentSelectionFormattingProvider=new gn("editorHasDocumentSelectionFormattingProvider",!1,I("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),t.hasMultipleDocumentFormattingProvider=new gn("editorHasMultipleDocumentFormattingProvider",!1,I("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),t.hasMultipleDocumentSelectionFormattingProvider=new gn("editorHasMultipleDocumentSelectionFormattingProvider",!1,I("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))})(Re||(Re={}));const po=0;class Ta extends Zl{runEditorCommand(e,n,i){const r=n._getViewModel();r&&this.runCoreEditorCommand(r,i||{})}}var pu;(function(t){const e=function(i){if(!Ic(i))return!1;const r=i;return!(!Cf(r.to)||!Ud(r.by)&&!Cf(r.by)||!Ud(r.value)&&!ok(r.value)||!Ud(r.revealCursor)&&!LOt(r.revealCursor))};t.metadata={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n					* 'to': A mandatory direction value.\n						```\n						'up', 'down'\n						```\n					* 'by': Unit to move. Default is computed based on 'to' value.\n						```\n						'line', 'wrappedLine', 'page', 'halfPage', 'editor'\n						```\n					* 'value': Number of units to move. Default is '1'.\n					* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n				",constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage","editor"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},t.RawDirection={Up:"up",Right:"right",Down:"down",Left:"left"},t.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage",Editor:"editor",Column:"column"};function n(i){let r;switch(i.to){case t.RawDirection.Up:r=1;break;case t.RawDirection.Right:r=2;break;case t.RawDirection.Down:r=3;break;case t.RawDirection.Left:r=4;break;default:return null}let o;switch(i.by){case t.RawUnit.Line:o=1;break;case t.RawUnit.WrappedLine:o=2;break;case t.RawUnit.Page:o=3;break;case t.RawUnit.HalfPage:o=4;break;case t.RawUnit.Editor:o=5;break;case t.RawUnit.Column:o=6;break;default:o=2}const s=Math.floor(i.value||1),a=!!i.revealCursor;return{direction:r,unit:o,value:s,revealCursor:a,select:!!i.select}}t.parse=n})(pu||(pu={}));var m4;(function(t){const e=function(n){if(!Ic(n))return!1;const i=n;return!(!ok(i.lineNumber)&&!Cf(i.lineNumber)||!Ud(i.at)&&!Cf(i.at))};t.metadata={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n					* 'lineNumber': A mandatory line number value.\n					* 'at': Logical position at which line has to be revealed.\n						```\n						'top', 'center', 'bottom'\n						```\n				",constraint:e,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},t.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(m4||(m4={}));class fTe{constructor(e){e.addImplementation(1e4,"code-editor",(n,i)=>{const r=n.get(Yr).getFocusedCodeEditor();return r&&r.hasTextFocus()?this._runEditorCommand(n,r,i):!1}),e.addImplementation(1e3,"generic-dom-input-textarea",(n,i)=>{const r=Au();return r&&["input","textarea"].indexOf(r.tagName.toLowerCase())>=0?(this.runDOMCommand(r),!0):!1}),e.addImplementation(0,"generic-dom",(n,i)=>{const r=n.get(Yr).getActiveCodeEditor();return r?(r.focus(),this._runEditorCommand(n,r,i)):!1})}_runEditorCommand(e,n,i){const r=this.runEditorCommand(e,n,i);return r||!0}}var Sc;(function(t){class e extends Ta{constructor(_){super(_),this._inSelectionMode=_.inSelectionMode}runCoreEditorCommand(_,w){if(!w.position)return;_.model.pushStackElement(),_.setCursorStates(w.source,3,[qc.moveTo(_,_.getPrimaryCursorState(),this._inSelectionMode,w.position,w.viewPosition)])&&w.revealType!==2&&_.revealAllCursors(w.source,!0,!0)}}t.MoveTo=fn(new e({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),t.MoveToSelect=fn(new e({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class n extends Ta{runCoreEditorCommand(_,w){_.model.pushStackElement();const C=this._getColumnSelectResult(_,_.getPrimaryCursorState(),_.getCursorColumnSelectData(),w);C!==null&&(_.setCursorStates(w.source,3,C.viewStates.map(N=>Kr.fromViewState(N))),_.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:C.fromLineNumber,fromViewVisualColumn:C.fromVisualColumn,toViewLineNumber:C.toLineNumber,toViewVisualColumn:C.toVisualColumn}),C.reversed?_.revealTopMostCursor(w.source):_.revealBottomMostCursor(w.source))}}t.ColumnSelect=fn(new class extends n{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(y,_,w,C){if(typeof C.position>"u"||typeof C.viewPosition>"u"||typeof C.mouseColumn>"u")return null;const N=y.model.validatePosition(C.position),E=y.coordinatesConverter.validateViewPosition(new ot(C.viewPosition.lineNumber,C.viewPosition.column),N),D=C.doColumnSelect?w.fromViewLineNumber:E.lineNumber,k=C.doColumnSelect?w.fromViewVisualColumn:C.mouseColumn-1;return lT.columnSelect(y.cursorConfig,y,D,k,E.lineNumber,C.mouseColumn-1)}}),t.CursorColumnSelectLeft=fn(new class extends n{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(y,_,w,C){return lT.columnSelectLeft(y.cursorConfig,y,w)}}),t.CursorColumnSelectRight=fn(new class extends n{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(y,_,w,C){return lT.columnSelectRight(y.cursorConfig,y,w)}});class i extends n{constructor(_){super(_),this._isPaged=_.isPaged}_getColumnSelectResult(_,w,C,N){return lT.columnSelectUp(_.cursorConfig,_,C,this._isPaged)}}t.CursorColumnSelectUp=fn(new i({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:3600,linux:{primary:0}}})),t.CursorColumnSelectPageUp=fn(new i({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:3595,linux:{primary:0}}}));class r extends n{constructor(_){super(_),this._isPaged=_.isPaged}_getColumnSelectResult(_,w,C,N){return lT.columnSelectDown(_.cursorConfig,_,C,this._isPaged)}}t.CursorColumnSelectDown=fn(new r({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:3602,linux:{primary:0}}})),t.CursorColumnSelectPageDown=fn(new r({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:3596,linux:{primary:0}}}));class o extends Ta{constructor(){super({id:"cursorMove",precondition:void 0,metadata:vre.metadata})}runCoreEditorCommand(_,w){const C=vre.parse(w);C&&this._runCursorMove(_,w.source,C)}_runCursorMove(_,w,C){_.model.pushStackElement(),_.setCursorStates(w,3,o._move(_,_.getCursorStates(),C)),_.revealAllCursors(w,!0)}static _move(_,w,C){const N=C.select,E=C.value;switch(C.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return qc.simpleMove(_,w,C.direction,N,E,C.unit);case 11:case 13:case 12:case 14:return qc.viewportMove(_,w,C.direction,N,E);default:return null}}}t.CursorMoveImpl=o,t.CursorMove=fn(new o);class s extends Ta{constructor(_){super(_),this._staticArgs=_.args}runCoreEditorCommand(_,w){let C=this._staticArgs;this._staticArgs.value===-1&&(C={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:w.pageSize||_.cursorConfig.pageSize}),_.model.pushStackElement(),_.setCursorStates(w.source,3,qc.simpleMove(_,_.getCursorStates(),C.direction,C.select,C.value,C.unit)),_.revealAllCursors(w.source,!0)}}t.CursorLeft=fn(new s({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),t.CursorLeftSelect=fn(new s({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:1039}})),t.CursorRight=fn(new s({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),t.CursorRightSelect=fn(new s({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:1041}})),t.CursorUp=fn(new s({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),t.CursorUpSelect=fn(new s({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),t.CursorPageUp=fn(new s({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:11}})),t.CursorPageUpSelect=fn(new s({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:1035}})),t.CursorDown=fn(new s({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),t.CursorDownSelect=fn(new s({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),t.CursorPageDown=fn(new s({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:12}})),t.CursorPageDownSelect=fn(new s({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:1036}})),t.CreateCursor=fn(new class extends Ta{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(y,_){if(!_.position)return;let w;_.wholeLine?w=qc.line(y,y.getPrimaryCursorState(),!1,_.position,_.viewPosition):w=qc.moveTo(y,y.getPrimaryCursorState(),!1,_.position,_.viewPosition);const C=y.getCursorStates();if(C.length>1){const N=w.modelState?w.modelState.position:null,E=w.viewState?w.viewState.position:null;for(let D=0,k=C.length;D<k;D++){const M=C[D];if(!(N&&!M.modelState.selection.containsPosition(N))&&!(E&&!M.viewState.selection.containsPosition(E))){C.splice(D,1),y.model.pushStackElement(),y.setCursorStates(_.source,3,C);return}}}C.push(w),y.model.pushStackElement(),y.setCursorStates(_.source,3,C)}}),t.LastCursorMoveToSelect=fn(new class extends Ta{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(y,_){if(!_.position)return;const w=y.getLastAddedCursorIndex(),C=y.getCursorStates(),N=C.slice(0);N[w]=qc.moveTo(y,C[w],!0,_.position,_.viewPosition),y.model.pushStackElement(),y.setCursorStates(_.source,3,N)}});class a extends Ta{constructor(_){super(_),this._inSelectionMode=_.inSelectionMode}runCoreEditorCommand(_,w){_.model.pushStackElement(),_.setCursorStates(w.source,3,qc.moveToBeginningOfLine(_,_.getCursorStates(),this._inSelectionMode)),_.revealAllCursors(w.source,!0)}}t.CursorHome=fn(new a({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),t.CursorHomeSelect=fn(new a({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class l extends Ta{constructor(_){super(_),this._inSelectionMode=_.inSelectionMode}runCoreEditorCommand(_,w){_.model.pushStackElement(),_.setCursorStates(w.source,3,this._exec(_.getCursorStates())),_.revealAllCursors(w.source,!0)}_exec(_){const w=[];for(let C=0,N=_.length;C<N;C++){const E=_[C],D=E.modelState.position.lineNumber;w[C]=Kr.fromModelState(E.modelState.move(this._inSelectionMode,D,1,0))}return w}}t.CursorLineStart=fn(new l({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:0,mac:{primary:287}}})),t.CursorLineStartSelect=fn(new l({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:0,mac:{primary:1311}}}));class c extends Ta{constructor(_){super(_),this._inSelectionMode=_.inSelectionMode}runCoreEditorCommand(_,w){_.model.pushStackElement(),_.setCursorStates(w.source,3,qc.moveToEndOfLine(_,_.getCursorStates(),this._inSelectionMode,w.sticky||!1)),_.revealAllCursors(w.source,!0)}}t.CursorEnd=fn(new c({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:po,kbExpr:Re.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},metadata:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:I("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}})),t.CursorEndSelect=fn(new c({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:po,kbExpr:Re.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},metadata:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:I("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}}));class u extends Ta{constructor(_){super(_),this._inSelectionMode=_.inSelectionMode}runCoreEditorCommand(_,w){_.model.pushStackElement(),_.setCursorStates(w.source,3,this._exec(_,_.getCursorStates())),_.revealAllCursors(w.source,!0)}_exec(_,w){const C=[];for(let N=0,E=w.length;N<E;N++){const D=w[N],k=D.modelState.position.lineNumber,M=_.model.getLineMaxColumn(k);C[N]=Kr.fromModelState(D.modelState.move(this._inSelectionMode,k,M,0))}return C}}t.CursorLineEnd=fn(new u({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:0,mac:{primary:291}}})),t.CursorLineEndSelect=fn(new u({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:0,mac:{primary:1315}}}));class d extends Ta{constructor(_){super(_),this._inSelectionMode=_.inSelectionMode}runCoreEditorCommand(_,w){_.model.pushStackElement(),_.setCursorStates(w.source,3,qc.moveToBeginningOfBuffer(_,_.getCursorStates(),this._inSelectionMode)),_.revealAllCursors(w.source,!0)}}t.CursorTop=fn(new d({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:2062,mac:{primary:2064}}})),t.CursorTopSelect=fn(new d({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:3086,mac:{primary:3088}}}));class h extends Ta{constructor(_){super(_),this._inSelectionMode=_.inSelectionMode}runCoreEditorCommand(_,w){_.model.pushStackElement(),_.setCursorStates(w.source,3,qc.moveToEndOfBuffer(_,_.getCursorStates(),this._inSelectionMode)),_.revealAllCursors(w.source,!0)}}t.CursorBottom=fn(new h({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:2061,mac:{primary:2066}}})),t.CursorBottomSelect=fn(new h({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:3085,mac:{primary:3090}}}));class f extends Ta{constructor(){super({id:"editorScroll",precondition:void 0,metadata:pu.metadata})}determineScrollMethod(_){const w=[6],C=[1,2,3,4,5,6],N=[4,2],E=[1,3];return w.includes(_.unit)&&N.includes(_.direction)?this._runHorizontalEditorScroll.bind(this):C.includes(_.unit)&&E.includes(_.direction)?this._runVerticalEditorScroll.bind(this):null}runCoreEditorCommand(_,w){const C=pu.parse(w);if(!C)return;const N=this.determineScrollMethod(C);N&&N(_,w.source,C)}_runVerticalEditorScroll(_,w,C){const N=this._computeDesiredScrollTop(_,C);if(C.revealCursor){const E=_.getCompletelyVisibleViewRangeAtScrollTop(N);_.setCursorStates(w,3,[qc.findPositionInViewportIfOutside(_,_.getPrimaryCursorState(),E,C.select)])}_.viewLayout.setScrollPosition({scrollTop:N},0)}_computeDesiredScrollTop(_,w){if(w.unit===1){const E=_.viewLayout.getFutureViewport(),D=_.getCompletelyVisibleViewRangeAtScrollTop(E.top),k=_.coordinatesConverter.convertViewRangeToModelRange(D);let M;w.direction===1?M=Math.max(1,k.startLineNumber-w.value):M=Math.min(_.model.getLineCount(),k.startLineNumber+w.value);const T=_.coordinatesConverter.convertModelPositionToViewPosition(new ot(M,1));return _.viewLayout.getVerticalOffsetForLineNumber(T.lineNumber)}if(w.unit===5){let E=0;return w.direction===3&&(E=_.model.getLineCount()-_.cursorConfig.pageSize),_.viewLayout.getVerticalOffsetForLineNumber(E)}let C;w.unit===3?C=_.cursorConfig.pageSize*w.value:w.unit===4?C=Math.round(_.cursorConfig.pageSize/2)*w.value:C=w.value;const N=(w.direction===1?-1:1)*C;return _.viewLayout.getCurrentScrollTop()+N*_.cursorConfig.lineHeight}_runHorizontalEditorScroll(_,w,C){const N=this._computeDesiredScrollLeft(_,C);_.viewLayout.setScrollPosition({scrollLeft:N},0)}_computeDesiredScrollLeft(_,w){const C=(w.direction===4?-1:1)*w.value;return _.viewLayout.getCurrentScrollLeft()+C*_.cursorConfig.typicalHalfwidthCharacterWidth}}t.EditorScrollImpl=f,t.EditorScroll=fn(new f),t.ScrollLineUp=fn(new class extends Ta{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(y,_){t.EditorScroll.runCoreEditorCommand(y,{to:pu.RawDirection.Up,by:pu.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:_.source})}}),t.ScrollPageUp=fn(new class extends Ta{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(y,_){t.EditorScroll.runCoreEditorCommand(y,{to:pu.RawDirection.Up,by:pu.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:_.source})}}),t.ScrollEditorTop=fn(new class extends Ta{constructor(){super({id:"scrollEditorTop",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus}})}runCoreEditorCommand(y,_){t.EditorScroll.runCoreEditorCommand(y,{to:pu.RawDirection.Up,by:pu.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:_.source})}}),t.ScrollLineDown=fn(new class extends Ta{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(y,_){t.EditorScroll.runCoreEditorCommand(y,{to:pu.RawDirection.Down,by:pu.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:_.source})}}),t.ScrollPageDown=fn(new class extends Ta{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(y,_){t.EditorScroll.runCoreEditorCommand(y,{to:pu.RawDirection.Down,by:pu.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:_.source})}}),t.ScrollEditorBottom=fn(new class extends Ta{constructor(){super({id:"scrollEditorBottom",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus}})}runCoreEditorCommand(y,_){t.EditorScroll.runCoreEditorCommand(y,{to:pu.RawDirection.Down,by:pu.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:_.source})}}),t.ScrollLeft=fn(new class extends Ta{constructor(){super({id:"scrollLeft",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus}})}runCoreEditorCommand(y,_){t.EditorScroll.runCoreEditorCommand(y,{to:pu.RawDirection.Left,by:pu.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:_.source})}}),t.ScrollRight=fn(new class extends Ta{constructor(){super({id:"scrollRight",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus}})}runCoreEditorCommand(y,_){t.EditorScroll.runCoreEditorCommand(y,{to:pu.RawDirection.Right,by:pu.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:_.source})}});class m extends Ta{constructor(_){super(_),this._inSelectionMode=_.inSelectionMode}runCoreEditorCommand(_,w){w.position&&(_.model.pushStackElement(),_.setCursorStates(w.source,3,[qc.word(_,_.getPrimaryCursorState(),this._inSelectionMode,w.position)]),w.revealType!==2&&_.revealAllCursors(w.source,!0,!0))}}t.WordSelect=fn(new m({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),t.WordSelectDrag=fn(new m({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),t.LastCursorWordSelect=fn(new class extends Ta{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(y,_){if(!_.position)return;const w=y.getLastAddedCursorIndex(),C=y.getCursorStates(),N=C.slice(0),E=C[w];N[w]=qc.word(y,E,E.modelState.hasSelection(),_.position),y.model.pushStackElement(),y.setCursorStates(_.source,3,N)}});class p extends Ta{constructor(_){super(_),this._inSelectionMode=_.inSelectionMode}runCoreEditorCommand(_,w){w.position&&(_.model.pushStackElement(),_.setCursorStates(w.source,3,[qc.line(_,_.getPrimaryCursorState(),this._inSelectionMode,w.position,w.viewPosition)]),w.revealType!==2&&_.revealAllCursors(w.source,!1,!0))}}t.LineSelect=fn(new p({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),t.LineSelectDrag=fn(new p({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class g extends Ta{constructor(_){super(_),this._inSelectionMode=_.inSelectionMode}runCoreEditorCommand(_,w){if(!w.position)return;const C=_.getLastAddedCursorIndex(),N=_.getCursorStates(),E=N.slice(0);E[C]=qc.line(_,N[C],this._inSelectionMode,w.position,w.viewPosition),_.model.pushStackElement(),_.setCursorStates(w.source,3,E)}}t.LastCursorLineSelect=fn(new g({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),t.LastCursorLineSelectDrag=fn(new g({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),t.CancelSelection=fn(new class extends Ta{constructor(){super({id:"cancelSelection",precondition:Re.hasNonEmptySelection,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(y,_){y.model.pushStackElement(),y.setCursorStates(_.source,3,[qc.cancelSelection(y,y.getPrimaryCursorState())]),y.revealAllCursors(_.source,!0)}}),t.RemoveSecondaryCursors=fn(new class extends Ta{constructor(){super({id:"removeSecondaryCursors",precondition:Re.hasMultipleSelections,kbOpts:{weight:po+1,kbExpr:Re.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(y,_){y.model.pushStackElement(),y.setCursorStates(_.source,3,[y.getPrimaryCursorState()]),y.revealAllCursors(_.source,!0),hw(I("removedCursor","Removed secondary cursors"))}}),t.RevealLine=fn(new class extends Ta{constructor(){super({id:"revealLine",precondition:void 0,metadata:m4.metadata})}runCoreEditorCommand(y,_){const w=_,C=w.lineNumber||0;let N=typeof C=="number"?C+1:parseInt(C)+1;N<1&&(N=1);const E=y.model.getLineCount();N>E&&(N=E);const D=new ve(N,1,N,y.model.getLineMaxColumn(N));let k=0;if(w.at)switch(w.at){case m4.RawAtArgument.Top:k=3;break;case m4.RawAtArgument.Center:k=1;break;case m4.RawAtArgument.Bottom:k=4;break}const M=y.coordinatesConverter.convertModelRangeToViewRange(D);y.revealRange(_.source,!1,M,k,0)}}),t.SelectAll=new class extends fTe{constructor(){super(tmi)}runDOMCommand(y){sb&&(y.focus(),y.select()),y.ownerDocument.execCommand("selectAll")}runEditorCommand(y,_,w){const C=_._getViewModel();C&&this.runCoreEditorCommand(C,w)}runCoreEditorCommand(y,_){y.model.pushStackElement(),y.setCursorStates("keyboard",3,[qc.selectAll(y,y.getPrimaryCursorState())])}},t.SetSelection=fn(new class extends Ta{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(y,_){_.selection&&(y.model.pushStackElement(),y.setCursorStates(_.source,3,[Kr.fromModelSelection(_.selection)]))}})})(Sc||(Sc={}));const B0i=Tt.and(Re.textInputFocus,Re.columnSelection);function j6(t,e){Bh.registerKeybindingRule({id:t,primary:e,when:B0i,weight:po+1})}j6(Sc.CursorColumnSelectLeft.id,1039);j6(Sc.CursorColumnSelectRight.id,1041);j6(Sc.CursorColumnSelectUp.id,1040);j6(Sc.CursorColumnSelectPageUp.id,1035);j6(Sc.CursorColumnSelectDown.id,1042);j6(Sc.CursorColumnSelectPageDown.id,1036);function vat(t){return t.register(),t}var E3;(function(t){class e extends Zl{runEditorCommand(i,r,o){const s=r._getViewModel();s&&this.runCoreEditingCommand(r,s,o||{})}}t.CoreEditingCommand=e,t.LineBreakInsert=fn(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:Re.writable,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(n,i,r){n.pushUndoStop(),n.executeCommands(this.id,ame.lineBreakInsert(i.cursorConfig,i.model,i.getCursorStates().map(o=>o.modelState.selection)))}}),t.Outdent=fn(new class extends e{constructor(){super({id:"outdent",precondition:Re.writable,kbOpts:{weight:po,kbExpr:Tt.and(Re.editorTextFocus,Re.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(n,i,r){n.pushUndoStop(),n.executeCommands(this.id,NE.outdent(i.cursorConfig,i.model,i.getCursorStates().map(o=>o.modelState.selection))),n.pushUndoStop()}}),t.Tab=fn(new class extends e{constructor(){super({id:"tab",precondition:Re.writable,kbOpts:{weight:po,kbExpr:Tt.and(Re.editorTextFocus,Re.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(n,i,r){n.pushUndoStop(),n.executeCommands(this.id,NE.tab(i.cursorConfig,i.model,i.getCursorStates().map(o=>o.modelState.selection))),n.pushUndoStop()}}),t.DeleteLeft=fn(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(n,i,r){const[o,s]=G2.deleteLeft(i.getPrevEditOperationType(),i.cursorConfig,i.model,i.getCursorStates().map(a=>a.modelState.selection),i.getCursorAutoClosedCharacters());o&&n.pushUndoStop(),n.executeCommands(this.id,s),i.setPrevEditOperationType(2)}}),t.DeleteRight=fn(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:po,kbExpr:Re.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(n,i,r){const[o,s]=G2.deleteRight(i.getPrevEditOperationType(),i.cursorConfig,i.model,i.getCursorStates().map(a=>a.modelState.selection));o&&n.pushUndoStop(),n.executeCommands(this.id,s),i.setPrevEditOperationType(3)}}),t.Undo=new class extends fTe{constructor(){super(X4t)}runDOMCommand(n){n.ownerDocument.execCommand("undo")}runEditorCommand(n,i,r){if(!(!i.hasModel()||i.getOption(92)===!0))return i.getModel().undo()}},t.Redo=new class extends fTe{constructor(){super(Z4t)}runDOMCommand(n){n.ownerDocument.execCommand("redo")}runEditorCommand(n,i,r){if(!(!i.hasModel()||i.getOption(92)===!0))return i.getModel().redo()}}})(E3||(E3={}));class yat extends Wfe{constructor(e,n,i){super({id:e,precondition:void 0,metadata:i}),this._handlerId=n}runCommand(e,n){const i=e.get(Yr).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,n)}}function tR(t,e){vat(new yat("default:"+t,t)),vat(new yat(t,t,e))}tR("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});tR("replacePreviousChar");tR("compositionType");tR("compositionStart");tR("compositionEnd");tR("paste");tR("cut");class z0i{constructor(e,n,i,r){this.configuration=e,this.viewModel=n,this.userInputEvents=i,this.commandDelegate=r}paste(e,n,i,r){this.commandDelegate.paste(e,n,i,r)}type(e){this.commandDelegate.type(e)}compositionType(e,n,i,r){this.commandDelegate.compositionType(e,n,i,r)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Sc.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const n=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<n?new ot(e.lineNumber,n):e}_hasMulticursorModifier(e){switch(this.configuration.options.get(78)){case"altKey":return e.altKey;case"ctrlKey":return e.ctrlKey;case"metaKey":return e.metaKey;default:return!1}}_hasNonMulticursorModifier(e){switch(this.configuration.options.get(78)){case"altKey":return e.ctrlKey||e.metaKey;case"ctrlKey":return e.altKey||e.metaKey;case"metaKey":return e.ctrlKey||e.altKey;default:return!1}}dispatchMouse(e){const n=this.configuration.options,i=$h&&n.get(108),r=n.get(22);e.middleButton&&!i?this._columnSelect(e.position,e.mouseColumn,e.inSelectionMode):e.startedOnLineNumbers?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelect(e.position,e.revealType):this._createCursor(e.position,!0):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount>=4?this._selectAll():e.mouseDownCount===3?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount===2?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):r?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,n){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:n}}moveTo(e,n){Sc.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,n))}_moveToSelect(e,n){Sc.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,n))}_columnSelect(e,n,i){e=this._validateViewColumn(e),Sc.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:n,doColumnSelect:i})}_createCursor(e,n){e=this._validateViewColumn(e),Sc.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:n})}_lastCursorMoveToSelect(e,n){Sc.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,n))}_wordSelect(e,n){Sc.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,n))}_wordSelectDrag(e,n){Sc.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,n))}_lastCursorWordSelect(e,n){Sc.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,n))}_lineSelect(e,n){Sc.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,n))}_lineSelectDrag(e,n){Sc.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,n))}_lastCursorLineSelect(e,n){Sc.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,n))}_lastCursorLineSelectDrag(e,n){Sc.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,n))}_selectAll(){Sc.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class gjt{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,n){this._lines=n,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const n=e-this._rendLineNumberStart;if(n<0||n>=this._lines.length)throw new co("Illegal value for lineNumber");return this._lines[n]}onLinesDeleted(e,n){if(this.getCount()===0)return null;const i=this.getStartLineNumber(),r=this.getEndLineNumber();if(n<i){const l=n-e+1;return this._rendLineNumberStart-=l,null}if(e>r)return null;let o=0,s=0;for(let l=i;l<=r;l++){const c=l-this._rendLineNumberStart;e<=l&&l<=n&&(s===0?(o=c,s=1):s++)}if(e<i){let l=0;n<i?l=n-e+1:l=i-e,this._rendLineNumberStart-=l}return this._lines.splice(o,s)}onLinesChanged(e,n){const i=e+n-1;if(this.getCount()===0)return!1;const r=this.getStartLineNumber(),o=this.getEndLineNumber();let s=!1;for(let a=e;a<=i;a++)a>=r&&a<=o&&(this._lines[a-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(e,n){if(this.getCount()===0)return null;const i=n-e+1,r=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=r)return this._rendLineNumberStart+=i,null;if(e>o)return null;if(i+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);const s=[];for(let d=0;d<i;d++)s[d]=this._createLine();const a=e-this._rendLineNumberStart,l=this._lines.slice(0,a),c=this._lines.slice(a,this._lines.length-i),u=this._lines.slice(this._lines.length-i,this._lines.length);return this._lines=l.concat(s).concat(c),u}onTokensChanged(e){if(this.getCount()===0)return!1;const n=this.getStartLineNumber(),i=this.getEndLineNumber();let r=!1;for(let o=0,s=e.length;o<s;o++){const a=e[o];if(a.toLineNumber<n||a.fromLineNumber>i)continue;const l=Math.max(n,a.fromLineNumber),c=Math.min(i,a.toLineNumber);for(let u=l;u<=c;u++){const d=u-this._rendLineNumberStart;this._lines[d].onTokensChanged(),r=!0}}return r}}class bjt{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new gjt(()=>this._host.createVisibleLine())}_createDomNode(){const e=wo(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(146)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const n=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(n)for(let i=0,r=n.length;i<r;i++){const o=n[i].getDomNode();o==null||o.remove()}return!0}onLinesInserted(e){const n=this._linesCollection.onLinesInserted(e.fromLineNumber,e.toLineNumber);if(n)for(let i=0,r=n.length;i<r;i++){const o=n[i].getDomNode();o==null||o.remove()}return!0}onScrollChanged(e){return e.scrollTopChanged}onTokensChanged(e){return this._linesCollection.onTokensChanged(e.ranges)}onZonesChanged(e){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(e){return this._linesCollection.getLine(e)}renderLines(e){const n=this._linesCollection._get(),i=new mTe(this.domNode.domNode,this._host,e),r={rendLineNumberStart:n.rendLineNumberStart,lines:n.lines,linesLength:n.lines.length},o=i.render(r,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(o.rendLineNumberStart,o.lines)}}const B1=class B1{constructor(e,n,i){this.domNode=e,this.host=n,this.viewportData=i}render(e,n,i,r){const o={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(o.rendLineNumberStart+o.linesLength-1<n||i<o.rendLineNumberStart){o.rendLineNumberStart=n,o.linesLength=i-n+1,o.lines=[];for(let s=n;s<=i;s++)o.lines[s-n]=this.host.createVisibleLine();return this._finishRendering(o,!0,r),o}if(this._renderUntouchedLines(o,Math.max(n-o.rendLineNumberStart,0),Math.min(i-o.rendLineNumberStart,o.linesLength-1),r,n),o.rendLineNumberStart>n){const s=n,a=Math.min(i,o.rendLineNumberStart-1);s<=a&&(this._insertLinesBefore(o,s,a,r,n),o.linesLength+=a-s+1)}else if(o.rendLineNumberStart<n){const s=Math.min(o.linesLength,n-o.rendLineNumberStart);s>0&&(this._removeLinesBefore(o,s),o.linesLength-=s)}if(o.rendLineNumberStart=n,o.rendLineNumberStart+o.linesLength-1<i){const s=o.rendLineNumberStart+o.linesLength,a=i;s<=a&&(this._insertLinesAfter(o,s,a,r,n),o.linesLength+=a-s+1)}else if(o.rendLineNumberStart+o.linesLength-1>i){const s=Math.max(0,i-o.rendLineNumberStart+1),l=o.linesLength-1-s+1;l>0&&(this._removeLinesAfter(o,l),o.linesLength-=l)}return this._finishRendering(o,!1,r),o}_renderUntouchedLines(e,n,i,r,o){const s=e.rendLineNumberStart,a=e.lines;for(let l=n;l<=i;l++){const c=s+l;a[l].layoutLine(c,r[c-o],this.viewportData.lineHeight)}}_insertLinesBefore(e,n,i,r,o){const s=[];let a=0;for(let l=n;l<=i;l++)s[a++]=this.host.createVisibleLine();e.lines=s.concat(e.lines)}_removeLinesBefore(e,n){for(let i=0;i<n;i++){const r=e.lines[i].getDomNode();r==null||r.remove()}e.lines.splice(0,n)}_insertLinesAfter(e,n,i,r,o){const s=[];let a=0;for(let l=n;l<=i;l++)s[a++]=this.host.createVisibleLine();e.lines=e.lines.concat(s)}_removeLinesAfter(e,n){const i=e.linesLength-n;for(let r=0;r<n;r++){const o=e.lines[i+r].getDomNode();o==null||o.remove()}e.lines.splice(i,n)}_finishRenderingNewLines(e,n,i,r){B1._ttPolicy&&(i=B1._ttPolicy.createHTML(i));const o=this.domNode.lastChild;n||!o?this.domNode.innerHTML=i:o.insertAdjacentHTML("afterend",i);let s=this.domNode.lastChild;for(let a=e.linesLength-1;a>=0;a--){const l=e.lines[a];r[a]&&(l.setDomNode(s),s=s.previousSibling)}}_finishRenderingInvalidLines(e,n,i){const r=document.createElement("div");B1._ttPolicy&&(n=B1._ttPolicy.createHTML(n)),r.innerHTML=n;for(let o=0;o<e.linesLength;o++){const s=e.lines[o];if(i[o]){const a=r.firstChild,l=s.getDomNode();l.parentNode.replaceChild(a,l),s.setDomNode(a)}}}_finishRendering(e,n,i){const r=B1._sb,o=e.linesLength,s=e.lines,a=e.rendLineNumberStart,l=[];{r.reset();let c=!1;for(let u=0;u<o;u++){const d=s[u];l[u]=!1,!(d.getDomNode()||!d.renderLine(u+a,i[u],this.viewportData.lineHeight,this.viewportData,r))&&(l[u]=!0,c=!0)}c&&this._finishRenderingNewLines(e,n,r.build(),l)}{r.reset();let c=!1;const u=[];for(let d=0;d<o;d++){const h=s[d];u[d]=!1,!(l[d]||!h.renderLine(d+a,i[d],this.viewportData.lineHeight,this.viewportData,r))&&(u[d]=!0,c=!0)}c&&this._finishRenderingInvalidLines(e,r.build(),u)}}};B1._ttPolicy=WS("editorViewLayer",{createHTML:e=>e}),B1._sb=new I6(1e5);let mTe=B1;class vjt extends zm{constructor(e){super(e),this._visibleLines=new bjt(this),this.domNode=this._visibleLines.domNode;const i=this._context.configuration.options.get(50);su(this.domNode,i),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,n=this._dynamicOverlays.length;e<n;e++)if(this._dynamicOverlays[e].shouldRender())return!0;return!1}dispose(){super.dispose();for(let e=0,n=this._dynamicOverlays.length;e<n;e++)this._dynamicOverlays[e].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new H0i(this._dynamicOverlays)}addDynamicOverlay(e){this._dynamicOverlays.push(e)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e);const i=this._context.configuration.options.get(50);return su(this.domNode,i),!0}onFlushed(e){return this._visibleLines.onFlushed(e)}onFocusChanged(e){return this._isFocused=e.isFocused,!0}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onScrollChanged(e){return this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._visibleLines.onZonesChanged(e)}prepareRender(e){const n=this._dynamicOverlays.filter(i=>i.shouldRender());for(let i=0,r=n.length;i<r;i++){const o=n[i];o.prepareRender(e),o.onDidRender()}}render(e){this._viewOverlaysRender(e),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(e){this._visibleLines.renderLines(e.viewportData)}}class H0i{constructor(e){this._dynamicOverlays=e,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(e){this._domNode=wo(e)}onContentChanged(){}onTokensChanged(){}renderLine(e,n,i,r,o){let s="";for(let a=0,l=this._dynamicOverlays.length;a<l;a++){const c=this._dynamicOverlays[a];s+=c.render(r.startLineNumber,e)}return this._renderedContent===s?!1:(this._renderedContent=s,o.appendString('<div style="top:'),o.appendString(String(n)),o.appendString("px;height:"),o.appendString(String(i)),o.appendString('px;">'),o.appendString(s),o.appendString("</div>"),!0)}layoutLine(e,n,i){this._domNode&&(this._domNode.setTop(n),this._domNode.setHeight(i))}}class W0i extends vjt{constructor(e){super(e);const i=this._context.configuration.options.get(146);this._contentWidth=i.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const i=this._context.configuration.options.get(146);return this._contentWidth=i.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class U0i extends vjt{constructor(e){super(e);const n=this._context.configuration.options,i=n.get(146);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),su(this.domNode,n.get(50))}onConfigurationChanged(e){const n=this._context.configuration.options;su(this.domNode,n.get(50));const i=n.get(146);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const n=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(n),this.domNode.setWidth(this._contentLeft)}}class cme{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){var n;(n=this.onKeyDown)==null||n.call(this,e)}emitKeyUp(e){var n;(n=this.onKeyUp)==null||n.call(this,e)}emitContextMenu(e){var n;(n=this.onContextMenu)==null||n.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var n;(n=this.onMouseMove)==null||n.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var n;(n=this.onMouseLeave)==null||n.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var n;(n=this.onMouseDown)==null||n.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var n;(n=this.onMouseUp)==null||n.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var n;(n=this.onMouseDrag)==null||n.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var n;(n=this.onMouseDrop)==null||n.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var e;(e=this.onMouseDropCanceled)==null||e.call(this)}emitMouseWheel(e){var n;(n=this.onMouseWheel)==null||n.call(this,e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return cme.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,n){const i={...e};return i.position&&(i.position=n.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=n.convertViewRangeToModelRange(i.range)),(i.type===5||i.type===8)&&(i.detail=this.convertViewToModelViewZoneData(i.detail,n)),i}static convertViewToModelViewZoneData(e,n){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?n.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?n.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:n.convertViewPositionToModelPosition(e.position),afterLineNumber:n.convertViewPositionToModelPosition(new ot(e.afterLineNumber,1)).lineNumber}}}class K0i extends zm{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=wo(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1;const i=this._context.configuration.options.get(146),r=i.contentWidth-i.verticalScrollbarWidth;this.contentWidth!==r&&(this.contentWidth=r,e=!0);const o=i.contentLeft;return this.contentLeft!==o&&(this.contentLeft=o,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){let n=0;const i=e.getDecorationsInViewport();for(const r of i){if(!r.options.blockClassName)continue;let o=this.blocks[n];o||(o=this.blocks[n]=wo(document.createElement("div")),this.domNode.appendChild(o));let s,a;r.options.blockIsAfterEnd?(s=e.getVerticalOffsetAfterLineNumber(r.range.endLineNumber,!1),a=e.getVerticalOffsetAfterLineNumber(r.range.endLineNumber,!0)):(s=e.getVerticalOffsetForLineNumber(r.range.startLineNumber,!0),a=r.range.isEmpty()&&!r.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(r.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(r.range.endLineNumber,!0));const[l,c,u,d]=r.options.blockPadding??[0,0,0,0];o.setClassName("blockDecorations-block "+r.options.blockClassName),o.setLeft(this.contentLeft-d),o.setWidth(this.contentWidth+d+c),o.setTop(s-e.scrollTop-l),o.setHeight(a-s+l+u),n++}for(let r=n;r<this.blocks.length;r++)this.blocks[r].domNode.remove();this.blocks.length=n}}class q0i extends zm{constructor(e,n){super(e),this._viewDomNode=n,this._widgets={},this.domNode=wo(document.createElement("div")),Y0.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=wo(document.createElement("div")),Y0.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const n=Object.keys(this._widgets);for(const i of n)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){const e=Object.keys(this._widgets);for(const n of e)this._widgets[n].updateAnchorViewPosition()}addWidget(e){const n=new G0i(this._context,this._viewDomNode,e);this._widgets[n.id]=n,n.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(n.domNode):this.domNode.appendChild(n.domNode),this.setShouldRender()}setWidgetPosition(e,n,i,r,o){this._widgets[e.getId()].setPosition(n,i,r,o),this.setShouldRender()}removeWidget(e){const n=e.getId();if(this._widgets.hasOwnProperty(n)){const i=this._widgets[n];delete this._widgets[n];const r=i.domNode.domNode;r.remove(),r.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return this._widgets.hasOwnProperty(e)?this._widgets[e].suppressMouseDown:!1}onBeforeRender(e){const n=Object.keys(this._widgets);for(const i of n)this._widgets[i].onBeforeRender(e)}prepareRender(e){const n=Object.keys(this._widgets);for(const i of n)this._widgets[i].prepareRender(e)}render(e){const n=Object.keys(this._widgets);for(const i of n)this._widgets[i].render(e)}}class G0i{constructor(e,n,i){this._primaryAnchor=new KV(null,null),this._secondaryAnchor=new KV(null,null),this._context=e,this._viewDomNode=n,this._actual=i,this.domNode=wo(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const r=this._context.configuration.options,o=r.get(146);this._fixedOverflowWidgets=r.get(42),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,this._lineHeight=r.get(67),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const n=this._context.configuration.options;if(this._lineHeight=n.get(67),e.hasChanged(146)){const i=n.get(146);this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,n,i){this._affinity=e,this._primaryAnchor=r(n,this._context.viewModel,this._affinity),this._secondaryAnchor=r(i,this._context.viewModel,this._affinity);function r(o,s,a){if(!o)return new KV(null,null);const l=s.model.validatePosition(o);if(s.coordinatesConverter.modelPositionIsVisible(l)){const c=s.coordinatesConverter.convertModelPositionToViewPosition(l,a??void 0);return new KV(o,c)}return new KV(o,null)}}_getMaxWidth(){const e=this.domNode.domNode.ownerDocument,n=e.defaultView;return this.allowEditorOverflow?(n==null?void 0:n.innerWidth)||e.documentElement.offsetWidth||e.body.offsetWidth:this._contentWidth}setPosition(e,n,i,r){this._setPosition(r,e,n),this._preference=i,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,n,i,r){const o=e.top,s=o,a=e.top+e.height,l=r.viewportHeight-a,c=o-i,u=s>=i,d=a,h=l>=i;let f=e.left;return f+n>r.scrollLeft+r.viewportWidth&&(f=r.scrollLeft+r.viewportWidth-n),f<r.scrollLeft&&(f=r.scrollLeft),{fitsAbove:u,aboveTop:c,fitsBelow:h,belowTop:d,left:f}}_layoutHorizontalSegmentInPage(e,n,i,r){const a=Math.max(15,n.left-r),l=Math.min(n.left+n.width+r,e.width-15),u=this._viewDomNode.domNode.ownerDocument.defaultView;let d=n.left+i-((u==null?void 0:u.scrollX)??0);if(d+r>l){const h=d-(l-r);d-=h,i-=h}if(d<a){const h=d-a;d-=h,i-=h}return[i,d]}_layoutBoxInPage(e,n,i,r){const o=e.top-i,s=e.top+e.height,a=Ga(this._viewDomNode.domNode),l=this._viewDomNode.domNode.ownerDocument,c=l.defaultView,u=a.top+o-((c==null?void 0:c.scrollY)??0),d=a.top+s-((c==null?void 0:c.scrollY)??0),h=hk(l.body),[f,m]=this._layoutHorizontalSegmentInPage(h,a,e.left-r.scrollLeft+this._contentLeft,n),p=22,g=22,y=u>=p,_=d+i<=h.height-g;return this._fixedOverflowWidgets?{fitsAbove:y,aboveTop:Math.max(u,p),fitsBelow:_,belowTop:d,left:m}:{fitsAbove:y,aboveTop:o,fitsBelow:_,belowTop:s,left:f}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new qV(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){var s,a;const n=o(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),i=((s=this._secondaryAnchor.viewPosition)==null?void 0:s.lineNumber)===((a=this._primaryAnchor.viewPosition)==null?void 0:a.lineNumber)?this._secondaryAnchor.viewPosition:null,r=o(i,this._affinity,this._lineHeight);return{primary:n,secondary:r};function o(l,c,u){if(!l)return null;const d=e.visibleRangeForPosition(l);if(!d)return null;const h=l.column===1&&c===3?0:d.left,f=e.getVerticalOffsetForLineNumber(l.lineNumber)-e.scrollTop;return new _at(f,h,u)}}_reduceAnchorCoordinates(e,n,i){if(!n)return e;const r=this._context.configuration.options.get(50);let o=n.left;return o<e.left?o=Math.max(o,e.left-i+r.typicalFullwidthCharacterWidth):o=Math.min(o,e.left+i-r.typicalFullwidthCharacterWidth),new _at(e.top,o,e.height)}_prepareRenderWidget(e){if(!this._preference||this._preference.length===0)return null;const{primary:n,secondary:i}=this._getAnchorsCoordinates(e);if(!n)return{kind:"offViewport",preserveFocus:this.domNode.domNode.contains(this.domNode.domNode.ownerDocument.activeElement)};if(this._cachedDomNodeOffsetWidth===-1||this._cachedDomNodeOffsetHeight===-1){let s=null;if(typeof this._actual.beforeRender=="function"&&(s=t1e(this._actual.beforeRender,this._actual)),s)this._cachedDomNodeOffsetWidth=s.width,this._cachedDomNodeOffsetHeight=s.height;else{const l=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(l.width),this._cachedDomNodeOffsetHeight=Math.round(l.height)}}const r=this._reduceAnchorCoordinates(n,i,this._cachedDomNodeOffsetWidth);let o;this.allowEditorOverflow?o=this._layoutBoxInPage(r,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,e):o=this._layoutBoxInViewport(r,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,e);for(let s=1;s<=2;s++)for(const a of this._preference)if(a===1){if(!o)return null;if(s===2||o.fitsAbove)return{kind:"inViewport",coordinate:new qV(o.aboveTop,o.left),position:1}}else if(a===2){if(!o)return null;if(s===2||o.fitsBelow)return{kind:"inViewport",coordinate:new qV(o.belowTop,o.left),position:2}}else return this.allowEditorOverflow?{kind:"inViewport",coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(new qV(r.top,r.left)),position:0}:{kind:"inViewport",coordinate:new qV(r.top,r.left),position:0};return null}onBeforeRender(e){!this._primaryAnchor.viewPosition||!this._preference||this._primaryAnchor.viewPosition.lineNumber<e.startLineNumber||this._primaryAnchor.viewPosition.lineNumber>e.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){var n;if(!this._renderData||this._renderData.kind==="offViewport"){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,((n=this._renderData)==null?void 0:n.kind)==="offViewport"&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&t1e(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&t1e(this._actual.afterRender,this._actual,this._renderData.position)}}class KV{constructor(e,n){this.modelPosition=e,this.viewPosition=n}}class qV{constructor(e,n){this.top=e,this.left=n,this._coordinateBrand=void 0}}class _at{constructor(e,n,i){this.top=e,this.left=n,this.height=i,this._anchorCoordinateBrand=void 0}}function t1e(t,e,...n){try{return t.call(e,...n)}catch{return null}}class yjt extends eR{constructor(e){super(),this._context=e;const n=this._context.configuration.options,i=n.get(146);this._renderLineHighlight=n.get(97),this._renderLineHighlightOnlyWhenFocus=n.get(98),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new Pn(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const n=new Set;for(const o of this._selections)n.add(o.positionLineNumber);const i=Array.from(n);i.sort((o,s)=>o-s),Xs(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);const r=this._selections.every(o=>o.isEmpty());return this._selectionIsEmpty!==r&&(this._selectionIsEmpty=r,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const n=this._context.configuration.options,i=n.get(146);return this._renderLineHighlight=n.get(97),this._renderLineHighlightOnlyWhenFocus=n.get(98),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return this._renderLineHighlightOnlyWhenFocus?(this._focused=e.isFocused,!0):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}const n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,r=[];for(let s=n;s<=i;s++){const a=s-n;r[a]=""}if(this._wordWrap){const s=this._renderOne(e,!1);for(const a of this._cursorLineNumbers){const l=this._context.viewModel.coordinatesConverter,c=l.convertViewPositionToModelPosition(new ot(a,1)).lineNumber,u=l.convertModelPositionToViewPosition(new ot(c,1)).lineNumber,d=l.convertModelPositionToViewPosition(new ot(c,this._context.viewModel.model.getLineMaxColumn(c))).lineNumber,h=Math.max(u,n),f=Math.min(d,i);for(let m=h;m<=f;m++){const p=m-n;r[p]=s}}}const o=this._renderOne(e,!0);for(const s of this._cursorLineNumbers){if(s<n||s>i)continue;const a=s-n;r[a]=o}this._renderData=r}render(e,n){if(!this._renderData)return"";const i=n-e;return i>=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class Y0i extends yjt{_renderOne(e,n){return`<div class="${"current-line"+(this._shouldRenderInMargin()?" current-line-both":"")+(n?" current-line-exact":"")}" style="width:${Math.max(e.scrollWidth,this._contentWidth)}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class X0i extends yjt{_renderOne(e,n){return`<div class="${"current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")+(this._shouldRenderInMargin()&&n?" current-line-exact-margin":"")}" style="width:${this._contentLeft}px"></div>`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}_b((t,e)=>{const n=t.getColor(tjt);if(n&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${n}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${n}; border: none; }`)),!n||n.isTransparent()||t.defines(mat)){const i=t.getColor(mat);i&&(e.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${i}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${i}; }`),S0(t.type)&&(e.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}});class Z0i extends eR{constructor(e){super(),this._context=e;const n=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const n=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const n=e.getDecorationsInViewport();let i=[],r=0;for(let l=0,c=n.length;l<c;l++){const u=n[l];u.options.className&&(i[r++]=u)}i=i.sort((l,c)=>{if(l.options.zIndex<c.options.zIndex)return-1;if(l.options.zIndex>c.options.zIndex)return 1;const u=l.options.className,d=c.options.className;return u<d?-1:u>d?1:ve.compareRangesUsingStarts(l.range,c.range)});const o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,a=[];for(let l=o;l<=s;l++){const c=l-o;a[c]=""}this._renderWholeLineDecorations(e,i,a),this._renderNormalDecorations(e,i,a),this._renderResult=a}_renderWholeLineDecorations(e,n,i){const r=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber;for(let s=0,a=n.length;s<a;s++){const l=n[s];if(!l.options.isWholeLine)continue;const c='<div class="cdr '+l.options.className+'" style="left:0;width:100%;"></div>',u=Math.max(l.range.startLineNumber,r),d=Math.min(l.range.endLineNumber,o);for(let h=u;h<=d;h++){const f=h-r;i[f]+=c}}}_renderNormalDecorations(e,n,i){const r=e.visibleRange.startLineNumber;let o=null,s=!1,a=null,l=!1;for(let c=0,u=n.length;c<u;c++){const d=n[c];if(d.options.isWholeLine)continue;const h=d.options.className,f=!!d.options.showIfCollapsed;let m=d.range;if(f&&m.endColumn===1&&m.endLineNumber!==m.startLineNumber&&(m=new ve(m.startLineNumber,m.startColumn,m.endLineNumber-1,this._context.viewModel.getLineMaxColumn(m.endLineNumber-1))),o===h&&s===f&&ve.areIntersectingOrTouching(a,m)){a=ve.plusRange(a,m);continue}o!==null&&this._renderNormalDecoration(e,a,o,l,s,r,i),o=h,s=f,a=m,l=d.options.shouldFillLineOnLineBreak??!1}o!==null&&this._renderNormalDecoration(e,a,o,l,s,r,i)}_renderNormalDecoration(e,n,i,r,o,s,a){const l=e.linesVisibleRangesForRange(n,i==="findMatch");if(l)for(let c=0,u=l.length;c<u;c++){const d=l[c];if(d.outsideRenderedLine)continue;const h=d.lineNumber-s;if(o&&d.ranges.length===1){const f=d.ranges[0];if(f.width<this._typicalHalfwidthCharacterWidth){const m=Math.round(f.left+f.width/2),p=Math.max(0,Math.round(m-this._typicalHalfwidthCharacterWidth/2));d.ranges[0]=new ime(p,this._typicalHalfwidthCharacterWidth)}}for(let f=0,m=d.ranges.length;f<m;f++){const p=r&&d.continuesOnNextLine&&m===1,g=d.ranges[f],y='<div class="cdr '+i+'" style="left:'+String(g.left)+"px;width:"+(p?"100%;":String(g.width)+"px;")+'"></div>';a[h]+=y}}}render(e,n){if(!this._renderResult)return"";const i=n-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class Q0i extends zm{constructor(e,n,i,r){super(e);const o=this._context.configuration.options,s=o.get(104),a=o.get(75),l=o.get(40),c=o.get(107),u={listenOnDomNode:i.domNode,className:"editor-scrollable "+uTe(e.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:a,fastScrollSensitivity:l,scrollPredominantAxis:c,scrollByPage:s.scrollByPage};this.scrollbar=this._register(new rme(n.domNode,u,this._context.viewLayout.getScrollable())),Y0.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=wo(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const d=(h,f,m)=>{const p={};{const g=h.scrollTop;g&&(p.scrollTop=this._context.viewLayout.getCurrentScrollTop()+g,h.scrollTop=0)}if(m){const g=h.scrollLeft;g&&(p.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+g,h.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(p,1)};this._register(yt(i.domNode,"scroll",h=>d(i.domNode,!0,!0))),this._register(yt(n.domNode,"scroll",h=>d(n.domNode,!0,!1))),this._register(yt(r.domNode,"scroll",h=>d(r.domNode,!0,!1))),this._register(yt(this.scrollbarDomNode.domNode,"scroll",h=>d(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,n=e.get(146);this.scrollbarDomNode.setLeft(n.contentLeft),e.get(73).side==="right"?this.scrollbarDomNode.setWidth(n.contentWidth+n.minimap.minimapWidth):this.scrollbarDomNode.setWidth(n.contentWidth),this.scrollbarDomNode.setHeight(n.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(104)||e.hasChanged(75)||e.hasChanged(40)){const n=this._context.configuration.options,i=n.get(104),r=n.get(75),o=n.get(40),s=n.get(107),a={vertical:i.vertical,horizontal:i.horizontal,verticalScrollbarSize:i.verticalScrollbarSize,horizontalScrollbarSize:i.horizontalScrollbarSize,scrollByPage:i.scrollByPage,handleMouseWheel:i.handleMouseWheel,mouseWheelScrollSensitivity:r,fastScrollSensitivity:o,scrollPredominantAxis:s};this.scrollbar.updateOptions(a)}return e.hasChanged(146)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+uTe(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}class pTe{constructor(e,n,i,r,o){this.startLineNumber=e,this.endLineNumber=n,this.className=i,this.tooltip=r,this._decorationToRenderBrand=void 0,this.zIndex=o??0}}class J0i{constructor(e,n,i){this.className=e,this.zIndex=n,this.tooltip=i}}class e_i{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class _jt extends eR{_render(e,n,i){const r=[];for(let a=e;a<=n;a++){const l=a-e;r[l]=new e_i}if(i.length===0)return r;i.sort((a,l)=>a.className===l.className?a.startLineNumber===l.startLineNumber?a.endLineNumber-l.endLineNumber:a.startLineNumber-l.startLineNumber:a.className<l.className?-1:1);let o=null,s=0;for(let a=0,l=i.length;a<l;a++){const c=i[a],u=c.className,d=c.zIndex;let h=Math.max(c.startLineNumber,e)-e;const f=Math.min(c.endLineNumber,n)-e;o===u?(h=Math.max(s+1,h),s=Math.max(s,f)):(o=u,s=f);for(let m=h;m<=s;m++)r[m].add(new J0i(u,d,c.tooltip))}return r}}class t_i extends zm{constructor(e){super(e),this._widgets={},this._context=e;const n=this._context.configuration.options,i=n.get(146);this.domNode=wo(document.createElement("div")),this.domNode.setClassName("glyph-margin-widgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this._lineHeight=n.get(67),this._glyphMargin=n.get(57),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._glyphMarginDecorationLaneCount=i.glyphMarginDecorationLaneCount,this._managedDomNodes=[],this._decorationGlyphsToRender=[]}dispose(){this._managedDomNodes=[],this._decorationGlyphsToRender=[],this._widgets={},super.dispose()}getWidgets(){return Object.values(this._widgets)}onConfigurationChanged(e){const n=this._context.configuration.options,i=n.get(146);return this._lineHeight=n.get(67),this._glyphMargin=n.get(57),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._glyphMarginDecorationLaneCount=i.glyphMarginDecorationLaneCount,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}addWidget(e){const n=wo(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:e.getPosition(),domNode:n,renderInfo:null},n.setPosition("absolute"),n.setDisplay("none"),n.setAttribute("widgetId",e.getId()),this.domNode.appendChild(n),this.setShouldRender()}setWidgetPosition(e,n){const i=this._widgets[e.getId()];return i.preference.lane===n.lane&&i.preference.zIndex===n.zIndex&&ve.equalsRange(i.preference.range,n.range)?!1:(i.preference=n,this.setShouldRender(),!0)}removeWidget(e){const n=e.getId();if(this._widgets[n]){const r=this._widgets[n].domNode.domNode;delete this._widgets[n],r.remove(),this.setShouldRender()}}_collectDecorationBasedGlyphRenderRequest(e,n){var s;const i=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,o=e.getDecorationsInViewport();for(const a of o){const l=a.options.glyphMarginClassName;if(!l)continue;const c=Math.max(a.range.startLineNumber,i),u=Math.min(a.range.endLineNumber,r),d=((s=a.options.glyphMargin)==null?void 0:s.position)??Iv.Center,h=a.options.zIndex??0;for(let f=c;f<=u;f++){const m=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ot(f,0)),p=this._context.viewModel.glyphLanes.getLanesAtLine(m.lineNumber).indexOf(d);n.push(new n_i(f,p,h,l))}}}_collectWidgetBasedGlyphRenderRequest(e,n){const i=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber;for(const o of Object.values(this._widgets)){const s=o.preference.range,{startLineNumber:a,endLineNumber:l}=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(ve.lift(s));if(!a||!l||l<i||a>r)continue;const c=Math.max(a,i),u=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ot(c,0)),d=this._context.viewModel.glyphLanes.getLanesAtLine(u.lineNumber).indexOf(o.preference.lane);n.push(new i_i(c,d,o.preference.zIndex,o))}}_collectSortedGlyphRenderRequests(e){const n=[];return this._collectDecorationBasedGlyphRenderRequest(e,n),this._collectWidgetBasedGlyphRenderRequest(e,n),n.sort((i,r)=>i.lineNumber===r.lineNumber?i.laneIndex===r.laneIndex?i.zIndex===r.zIndex?r.type===i.type?i.type===0&&r.type===0?i.className<r.className?-1:1:0:r.type-i.type:r.zIndex-i.zIndex:i.laneIndex-r.laneIndex:i.lineNumber-r.lineNumber),n}prepareRender(e){if(!this._glyphMargin){this._decorationGlyphsToRender=[];return}for(const r of Object.values(this._widgets))r.renderInfo=null;const n=new uS(this._collectSortedGlyphRenderRequests(e)),i=[];for(;n.length>0;){const r=n.peek();if(!r)break;const o=n.takeWhile(a=>a.lineNumber===r.lineNumber&&a.laneIndex===r.laneIndex);if(!o||o.length===0)break;const s=o[0];if(s.type===0){const a=[];for(const l of o){if(l.zIndex!==s.zIndex||l.type!==s.type)break;(a.length===0||a[a.length-1]!==l.className)&&a.push(l.className)}i.push(s.accept(a.join(" ")))}else s.widget.renderInfo={lineNumber:s.lineNumber,laneIndex:s.laneIndex}}this._decorationGlyphsToRender=i}render(e){if(!this._glyphMargin){for(const i of Object.values(this._widgets))i.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const i=this._managedDomNodes.pop();i==null||i.domNode.remove()}return}const n=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const i of Object.values(this._widgets))if(!i.renderInfo)i.domNode.setDisplay("none");else{const r=e.viewportData.relativeVerticalOffset[i.renderInfo.lineNumber-e.viewportData.startLineNumber],o=this._glyphMarginLeft+i.renderInfo.laneIndex*this._lineHeight;i.domNode.setDisplay("block"),i.domNode.setTop(r),i.domNode.setLeft(o),i.domNode.setWidth(n),i.domNode.setHeight(this._lineHeight)}for(let i=0;i<this._decorationGlyphsToRender.length;i++){const r=this._decorationGlyphsToRender[i],o=e.viewportData.relativeVerticalOffset[r.lineNumber-e.viewportData.startLineNumber],s=this._glyphMarginLeft+r.laneIndex*this._lineHeight;let a;i<this._managedDomNodes.length?a=this._managedDomNodes[i]:(a=wo(document.createElement("div")),this._managedDomNodes.push(a),this.domNode.appendChild(a)),a.setClassName("cgmr codicon "+r.combinedClassName),a.setPosition("absolute"),a.setTop(o),a.setLeft(s),a.setWidth(n),a.setHeight(this._lineHeight)}for(;this._managedDomNodes.length>this._decorationGlyphsToRender.length;){const i=this._managedDomNodes.pop();i==null||i.domNode.remove()}}}class n_i{constructor(e,n,i,r){this.lineNumber=e,this.laneIndex=n,this.zIndex=i,this.className=r,this.type=0}accept(e){return new r_i(this.lineNumber,this.laneIndex,e)}}class i_i{constructor(e,n,i,r){this.lineNumber=e,this.laneIndex=n,this.zIndex=i,this.widget=r,this.type=1}}class r_i{constructor(e,n,i){this.lineNumber=e,this.laneIndex=n,this.combinedClassName=i}}class xjt extends ct{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function ume(t,e){let n=0,i=0;const r=t.length;for(;i<r;){const o=t.charCodeAt(i);if(o===32)n++;else if(o===9)n=n-n%e+e;else break;i++}return i===r?-1:n}var uI;(function(t){t[t.Disabled=0]="Disabled",t[t.EnabledForActive=1]="EnabledForActive",t[t.Enabled=2]="Enabled"})(uI||(uI={}));class jT{constructor(e,n,i,r,o,s){if(this.visibleColumn=e,this.column=n,this.className=i,this.horizontalLine=r,this.forWrappedLinesAfterColumn=o,this.forWrappedLinesBeforeOrAtColumn=s,e!==-1==(n!==-1))throw new Error}}class X9{constructor(e,n){this.top=e,this.endColumn=n}}class o_i extends xjt{constructor(e,n){super(),this.textModel=e,this.languageConfigurationService=n}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return ume(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,n,i){this.assertNotDisposed();const r=this.textModel.getLineCount();if(e<1||e>r)throw new co("Illegal value for lineNumber");const o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=!!(o&&o.offSide);let a=-2,l=-1,c=-2,u=-1;const d=D=>{if(a!==-1&&(a===-2||a>D-1)){a=-1,l=-1;for(let k=D-2;k>=0;k--){const M=this._computeIndentLevel(k);if(M>=0){a=k,l=M;break}}}if(c===-2){c=-1,u=-1;for(let k=D;k<r;k++){const M=this._computeIndentLevel(k);if(M>=0){c=k,u=M;break}}}};let h=-2,f=-1,m=-2,p=-1;const g=D=>{if(h===-2){h=-1,f=-1;for(let k=D-2;k>=0;k--){const M=this._computeIndentLevel(k);if(M>=0){h=k,f=M;break}}}if(m!==-1&&(m===-2||m<D-1)){m=-1,p=-1;for(let k=D;k<r;k++){const M=this._computeIndentLevel(k);if(M>=0){m=k,p=M;break}}}};let y=0,_=!0,w=0,C=!0,N=0,E=0;for(let D=0;_||C;D++){const k=e-D,M=e+D;D>1&&(k<1||k<n)&&(_=!1),D>1&&(M>r||M>i)&&(C=!1),D>5e4&&(_=!1,C=!1);let T=-1;if(_&&k>=1){const R=this._computeIndentLevel(k-1);R>=0?(c=k-1,u=R,T=Math.ceil(R/this.textModel.getOptions().indentSize)):(d(k),T=this._getIndentLevelForWhitespaceLine(s,l,u))}let A=-1;if(C&&M<=r){const R=this._computeIndentLevel(M-1);R>=0?(h=M-1,f=R,A=Math.ceil(R/this.textModel.getOptions().indentSize)):(g(M),A=this._getIndentLevelForWhitespaceLine(s,f,p))}if(D===0){E=T;continue}if(D===1){if(M<=r&&A>=0&&E+1===A){_=!1,y=M,w=M,N=A;continue}if(k>=1&&T>=0&&T-1===E){C=!1,y=k,w=k,N=T;continue}if(y=e,w=e,N=E,N===0)return{startLineNumber:y,endLineNumber:w,indent:N}}_&&(T>=N?y=k:_=!1),C&&(A>=N?w=M:C=!1)}return{startLineNumber:y,endLineNumber:w,indent:N}}getLinesBracketGuides(e,n,i,r){var d;const o=[];for(let h=e;h<=n;h++)o.push([]);const s=!0,a=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new ve(e,1,n,this.textModel.getLineMaxColumn(n))).toArray();let l;if(i&&a.length>0){const h=(e<=i.lineNumber&&i.lineNumber<=n?a:this.textModel.bracketPairs.getBracketPairsInRange(ve.fromPositions(i)).toArray()).filter(f=>ve.strictContainsPosition(f.range,i));l=(d=MH(h,f=>s))==null?void 0:d.range}const c=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,u=new wjt;for(const h of a){if(!h.closingBracketRange)continue;const f=l&&h.range.equalsRange(l);if(!f&&!r.includeInactive)continue;const m=u.getInlineClassName(h.nestingLevel,h.nestingLevelOfEqualBracketType,c)+(r.highlightActive&&f?" "+u.activeClassName:""),p=h.openingBracketRange.getStartPosition(),g=h.closingBracketRange.getStartPosition(),y=r.horizontalGuides===uI.Enabled||r.horizontalGuides===uI.EnabledForActive&&f;if(h.range.startLineNumber===h.range.endLineNumber){y&&o[h.range.startLineNumber-e].push(new jT(-1,h.openingBracketRange.getEndPosition().column,m,new X9(!1,g.column),-1,-1));continue}const _=this.getVisibleColumnFromPosition(g),w=this.getVisibleColumnFromPosition(h.openingBracketRange.getStartPosition()),C=Math.min(w,_,h.minVisibleColumnIndentation+1);let N=!1;qd(this.textModel.getLineContent(h.closingBracketRange.startLineNumber))<h.closingBracketRange.startColumn-1&&(N=!0);const k=Math.max(p.lineNumber,e),M=Math.min(g.lineNumber,n),T=N?1:0;for(let A=k;A<M+T;A++)o[A-e].push(new jT(C,-1,m,null,A===p.lineNumber?p.column:-1,A===g.lineNumber?g.column:-1));y&&(p.lineNumber>=e&&w>C&&o[p.lineNumber-e].push(new jT(C,-1,m,new X9(!1,p.column),-1,-1)),g.lineNumber<=n&&_>C&&o[g.lineNumber-e].push(new jT(C,-1,m,new X9(!N,g.column),-1,-1)))}for(const h of o)h.sort((f,m)=>f.visibleColumn-m.visibleColumn);return o}getVisibleColumnFromPosition(e){return Kl.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,n){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(n<1||n>i)throw new Error("Illegal value for endLineNumber");const r=this.textModel.getOptions(),o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=!!(o&&o.offSide),a=new Array(n-e+1);let l=-2,c=-1,u=-2,d=-1;for(let h=e;h<=n;h++){const f=h-e,m=this._computeIndentLevel(h-1);if(m>=0){l=h-1,c=m,a[f]=Math.ceil(m/r.indentSize);continue}if(l===-2){l=-1,c=-1;for(let p=h-2;p>=0;p--){const g=this._computeIndentLevel(p);if(g>=0){l=p,c=g;break}}}if(u!==-1&&(u===-2||u<h-1)){u=-1,d=-1;for(let p=h;p<i;p++){const g=this._computeIndentLevel(p);if(g>=0){u=p,d=g;break}}}a[f]=this._getIndentLevelForWhitespaceLine(s,c,d)}return a}_getIndentLevelForWhitespaceLine(e,n,i){const r=this.textModel.getOptions();return n===-1||i===-1?0:n<i?1+Math.floor(n/r.indentSize):n===i||e?Math.ceil(i/r.indentSize):1+Math.floor(i/r.indentSize)}}class wjt{constructor(){this.activeClassName="indent-active"}getInlineClassName(e,n,i){return this.getInlineClassNameOfLevel(i?n:e)}getInlineClassNameOfLevel(e){return`bracket-indent-guide lvl-${e%30}`}}class s_i extends eR{constructor(e){super(),this._context=e,this._primaryPosition=null;const n=this._context.configuration.options,i=n.get(147),r=n.get(50);this._spaceWidth=r.spaceWidth,this._maxIndentLeft=i.wrappingColumn===-1?-1:i.wrappingColumn*r.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=n.get(16),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const n=this._context.configuration.options,i=n.get(147),r=n.get(50);return this._spaceWidth=r.spaceWidth,this._maxIndentLeft=i.wrappingColumn===-1?-1:i.wrappingColumn*r.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=n.get(16),!0}onCursorStateChanged(e){var r;const i=e.selections[0].getPosition();return(r=this._primaryPosition)!=null&&r.equals(i)?!1:(this._primaryPosition=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){var l,c;if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}const n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,r=e.scrollWidth,o=this._primaryPosition,s=this.getGuidesByLine(n,Math.min(i+1,this._context.viewModel.getLineCount()),o),a=[];for(let u=n;u<=i;u++){const d=u-n,h=s[d];let f="";const m=((l=e.visibleRangeForPosition(new ot(u,1)))==null?void 0:l.left)??0;for(const p of h){const g=p.column===-1?m+(p.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new ot(u,p.column)).left;if(g>r||this._maxIndentLeft>0&&g>this._maxIndentLeft)break;const y=p.horizontalLine?p.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",_=p.horizontalLine?(((c=e.visibleRangeForPosition(new ot(u,p.horizontalLine.endColumn)))==null?void 0:c.left)??g+this._spaceWidth)-g:this._spaceWidth;f+=`<div class="core-guide ${p.className} ${y}" style="left:${g}px;width:${_}px"></div>`}a[d]=f}this._renderResult=a}getGuidesByLine(e,n,i){const r=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(e,n,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?uI.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?uI.EnabledForActive:uI.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,o=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,n):null;let s=0,a=0,l=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&i){const d=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,n);s=d.startLineNumber,a=d.endLineNumber,l=d.indent}const{indentSize:c}=this._context.viewModel.model.getOptions(),u=[];for(let d=e;d<=n;d++){const h=new Array;u.push(h);const f=r?r[d-e]:[],m=new uS(f),p=o?o[d-e]:0;for(let g=1;g<=p;g++){const y=(g-1)*c+1,_=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||f.length===0)&&s<=d&&d<=a&&g===l;h.push(...m.takeWhile(C=>C.visibleColumn<y)||[]);const w=m.peek();(!w||w.visibleColumn!==y||w.horizontalLine)&&h.push(new jT(y,-1,`core-guide-indent lvl-${(g-1)%30}`+(_?" indent-active":""),null,-1,-1))}h.push(...m.takeWhile(g=>!0)||[])}return u}render(e,n){if(!this._renderResult)return"";const i=n-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function JP(t){if(!(t&&t.isTransparent()))return t}_b((t,e)=>{const n=[{bracketColor:ojt,guideColor:Zyi,guideColorActive:i0i},{bracketColor:sjt,guideColor:Qyi,guideColorActive:r0i},{bracketColor:ajt,guideColor:Jyi,guideColorActive:o0i},{bracketColor:ljt,guideColor:e0i,guideColorActive:s0i},{bracketColor:cjt,guideColor:t0i,guideColorActive:a0i},{bracketColor:ujt,guideColor:n0i,guideColorActive:l0i}],i=new wjt,r=[{indentColor:Dq,indentColorActive:kq},{indentColor:Lyi,indentColorActive:Pyi},{indentColor:Tyi,indentColorActive:Oyi},{indentColor:Iyi,indentColorActive:jyi},{indentColor:Ayi,indentColorActive:Fyi},{indentColor:Ryi,indentColorActive:$yi}],o=n.map(a=>{const l=t.getColor(a.bracketColor),c=t.getColor(a.guideColor),u=t.getColor(a.guideColorActive),d=JP(JP(c)??(l==null?void 0:l.transparent(.3))),h=JP(JP(u)??l);if(!(!d||!h))return{guideColor:d,guideColorActive:h}}).filter(zx),s=r.map(a=>{const l=t.getColor(a.indentColor),c=t.getColor(a.indentColorActive),u=JP(l),d=JP(c);if(!(!u||!d))return{indentColor:u,indentColorActive:d}}).filter(zx);if(o.length>0){for(let a=0;a<30;a++){const l=o[a%o.length];e.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(a).replace(/ /g,".")} { --guide-color: ${l.guideColor}; --guide-color-active: ${l.guideColorActive}; }`)}e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),e.addRule(`.monaco-editor .vertical.${i.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${i.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${i.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(s.length>0){for(let a=0;a<30;a++){const l=s[a%s.length];e.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${a} { --indent-color: ${l.indentColor}; --indent-color-active: ${l.indentColorActive}; }`)}e.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),e.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}});class n1e{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,n){this._domNode=e,this.endNode=n,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class a_i{constructor(){this._currentVisibleRange=new ve(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class l_i{constructor(e,n,i,r,o,s,a){this.minimalReveal=e,this.lineNumber=n,this.startColumn=i,this.endColumn=r,this.startScrollTop=o,this.stopScrollTop=s,this.scrollType=a,this.type="range",this.minLineNumber=n,this.maxLineNumber=n}}class c_i{constructor(e,n,i,r,o){this.minimalReveal=e,this.selections=n,this.startScrollTop=i,this.stopScrollTop=r,this.scrollType=o,this.type="selections";let s=n[0].startLineNumber,a=n[0].endLineNumber;for(let l=1,c=n.length;l<c;l++){const u=n[l];s=Math.min(s,u.startLineNumber),a=Math.max(a,u.endLineNumber)}this.minLineNumber=s,this.maxLineNumber=a}}const qle=class qle extends zm{constructor(e,n){super(e),this._linesContent=n,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new bjt(this),this.domNode=this._visibleLines.domNode;const i=this._context.configuration,r=this._context.configuration.options,o=r.get(50),s=r.get(147);this._lineHeight=r.get(67),this._typicalHalfwidthCharacterWidth=o.typicalHalfwidthCharacterWidth,this._isViewportWrapping=s.isViewportWrapping,this._revealHorizontalRightPadding=r.get(101),this._cursorSurroundingLines=r.get(29),this._cursorSurroundingLinesStyle=r.get(30),this._canUseLayerHinting=!r.get(32),this._viewLineOptions=new lat(i,this._context.theme.type),Y0.write(this.domNode,8),this.domNode.setClassName(`view-lines ${S3}`),su(this.domNode,o),this._maxLineWidth=0,this._asyncUpdateLineWidths=new Wo(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new Wo(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new a_i,this._horizontalRevealRequest=null,this._stickyScrollEnabled=r.get(116).enabled,this._maxNumberStickyLines=r.get(116).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new J1(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(147)&&(this._maxLineWidth=0);const n=this._context.configuration.options,i=n.get(50),r=n.get(147);return this._lineHeight=n.get(67),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=r.isViewportWrapping,this._revealHorizontalRightPadding=n.get(101),this._cursorSurroundingLines=n.get(29),this._cursorSurroundingLinesStyle=n.get(30),this._canUseLayerHinting=!n.get(32),this._stickyScrollEnabled=n.get(116).enabled,this._maxNumberStickyLines=n.get(116).maxLineCount,su(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(146)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,n=new lat(e,this._context.theme.type);if(!this._viewLineOptions.equals(n)){this._viewLineOptions=n;const i=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();for(let o=i;o<=r;o++)this._visibleLines.getVisibleLine(o).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let r=!1;for(let o=n;o<=i;o++)r=this._visibleLines.getVisibleLine(o).onSelectionChanged()||r;return r}onDecorationsChanged(e){{const n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let r=n;r<=i;r++)this._visibleLines.getVisibleLine(r).onDecorationsChanged()}return!0}onFlushed(e){const n=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,n}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const n=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(n===-1)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:n});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new l_i(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new c_i(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const o=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,o),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const n=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTop<n||e.scrollTop>i)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,n){const i=this._getViewLineDomNode(e);if(i===null)return null;const r=this._getLineNumberFor(i);if(r===-1||r<1||r>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(r)===1)return new ot(r,1);const o=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(r<o||r>s)return null;let a=this._visibleLines.getVisibleLine(r).getColumnOfNodeOffset(e,n);const l=this._context.viewModel.getLineMinColumn(r);return a<l&&(a=l),new ot(r,a)}_getViewLineDomNode(e){for(;e&&e.nodeType===1;){if(e.className===J1.CLASS_NAME)return e;e=e.parentElement}return null}_getLineNumberFor(e){const n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let r=n;r<=i;r++){const o=this._visibleLines.getVisibleLine(r);if(e===o.getDomNode())return r}return-1}getLineWidth(e){const n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();if(e<n||e>i)return-1;const r=new n1e(this.domNode.domNode,this._textRangeRestingSpot),o=this._visibleLines.getVisibleLine(e).getWidth(r);return this._updateLineWidthsSlowIfDomDidLayout(r),o}linesVisibleRangesForRange(e,n){if(this.shouldRender())return null;const i=e.endLineNumber,r=ve.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!r)return null;const o=[];let s=0;const a=new n1e(this.domNode.domNode,this._textRangeRestingSpot);let l=0;n&&(l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ot(r.startLineNumber,1)).lineNumber);const c=this._visibleLines.getStartLineNumber(),u=this._visibleLines.getEndLineNumber();for(let d=r.startLineNumber;d<=r.endLineNumber;d++){if(d<c||d>u)continue;const h=d===r.startLineNumber?r.startColumn:1,f=d!==r.endLineNumber,m=f?this._context.viewModel.getLineMaxColumn(d):r.endColumn,p=this._visibleLines.getVisibleLine(d).getVisibleRangesForRange(d,h,m,a);if(p){if(n&&d<i){const g=l;l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ot(d+1,1)).lineNumber,g!==l&&(p.ranges[p.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}o[s++]=new Kvi(p.outsideRenderedLine,d,ime.from(p.ranges),f)}}return this._updateLineWidthsSlowIfDomDidLayout(a),s===0?null:o}_visibleRangesForLineRange(e,n,i){if(this.shouldRender()||e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber())return null;const r=new n1e(this.domNode.domNode,this._textRangeRestingSpot),o=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,n,i,r);return this._updateLineWidthsSlowIfDomDidLayout(r),o}visibleRangeForPosition(e){const n=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return n?new qvi(n.outsideRenderedLine,n.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){const n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let r=1,o=!0;for(let s=n;s<=i;s++){const a=this._visibleLines.getVisibleLine(s);if(e&&!a.getWidthIsFast()){o=!1;continue}r=Math.max(r,a.getWidth(null))}return o&&n===1&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(r),o}_checkMonospaceFontAssumptions(){let e=-1,n=-1;const i=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();for(let o=i;o<=r;o++){const s=this._visibleLines.getVisibleLine(o);if(s.needsMonospaceFontCheck()){const a=s.getWidth(null);a>n&&(n=a,e=o)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let o=i;o<=r;o++)this._visibleLines.getVisibleLine(o).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const i=this._horizontalRevealRequest;if(e.startLineNumber<=i.minLineNumber&&i.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const r=this._computeScrollLeftToReveal(i);r&&(this._isViewportWrapping||this._ensureMaxLineWidth(r.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:r.scrollLeft},i.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),$h&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const i=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();for(let o=i;o<=r;o++)if(this._visibleLines.getVisibleLine(o).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const n=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-n),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const n=Math.ceil(e);this._maxLineWidth<n&&(this._maxLineWidth=n,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(e,n,i,r,o,s){const a=e.top,l=e.height,c=a+l;let u,d,h;if(o&&o.length>0){let y=o[0].startLineNumber,_=o[0].endLineNumber;for(let w=1,C=o.length;w<C;w++){const N=o[w];y=Math.min(y,N.startLineNumber),_=Math.max(_,N.endLineNumber)}u=!1,d=this._context.viewLayout.getVerticalOffsetForLineNumber(y),h=this._context.viewLayout.getVerticalOffsetForLineNumber(_)+this._lineHeight}else if(r)u=!0,d=this._context.viewLayout.getVerticalOffsetForLineNumber(r.startLineNumber),h=this._context.viewLayout.getVerticalOffsetForLineNumber(r.endLineNumber)+this._lineHeight;else return-1;const f=(n==="mouse"||i)&&this._cursorSurroundingLinesStyle==="default";let m=0,p=0;if(f)i||(m=this._lineHeight);else{const y=Math.min(l/this._lineHeight/2,this._cursorSurroundingLines);this._stickyScrollEnabled?m=Math.max(y,this._maxNumberStickyLines)*this._lineHeight:m=y*this._lineHeight,p=Math.max(0,y-1)*this._lineHeight}i||(s===0||s===4)&&(p+=this._lineHeight),d-=m,h+=p;let g;if(h-d>l){if(!u)return-1;g=d}else if(s===5||s===6)if(s===6&&a<=d&&h<=c)g=a;else{const y=Math.max(5*this._lineHeight,l*.2),_=d-y,w=h-l;g=Math.max(w,_)}else if(s===1||s===2)if(s===2&&a<=d&&h<=c)g=a;else{const y=(d+h)/2;g=Math.max(0,y-l/2)}else g=this._computeMinimumScrolling(a,c,d,h,s===3,s===4);return g}_computeScrollLeftToReveal(e){const n=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(146),r=n.left,o=r+n.width-i.verticalScrollbarWidth;let s=1073741824,a=0;if(e.type==="range"){const c=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!c)return null;for(const u of c.ranges)s=Math.min(s,Math.round(u.left)),a=Math.max(a,Math.round(u.left+u.width))}else for(const c of e.selections){if(c.startLineNumber!==c.endLineNumber)return null;const u=this._visibleRangesForLineRange(c.startLineNumber,c.startColumn,c.endColumn);if(!u)return null;for(const d of u.ranges)s=Math.min(s,Math.round(d.left)),a=Math.max(a,Math.round(d.left+d.width))}return e.minimalReveal||(s=Math.max(0,s-qle.HORIZONTAL_EXTRA_PX),a+=this._revealHorizontalRightPadding),e.type==="selections"&&a-s>n.width?null:{scrollLeft:this._computeMinimumScrolling(r,o,s,a),maxHorizontalOffset:a}}_computeMinimumScrolling(e,n,i,r,o,s){e=e|0,n=n|0,i=i|0,r=r|0,o=!!o,s=!!s;const a=n-e;if(r-i<a){if(o)return i;if(s)return Math.max(0,r-a);if(i<e)return i;if(r>n)return Math.max(0,r-a)}else return i;return e}};qle.HORIZONTAL_EXTRA_PX=30;let gTe=qle;class u_i extends _jt{constructor(e){super(),this._context=e;const i=this._context.configuration.options.get(146);this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options.get(146);return this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const n=e.getDecorationsInViewport(),i=[];let r=0;for(let o=0,s=n.length;o<s;o++){const a=n[o],l=a.options.linesDecorationsClassName,c=a.options.zIndex;l&&(i[r++]=new pTe(a.range.startLineNumber,a.range.endLineNumber,l,a.options.linesDecorationsTooltip??null,c));const u=a.options.firstLineDecorationClassName;u&&(i[r++]=new pTe(a.range.startLineNumber,a.range.startLineNumber,u,a.options.linesDecorationsTooltip??null,c))}return i}prepareRender(e){const n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,r=this._render(n,i,this._getDecorations(e)),o=this._decorationsLeft.toString(),s=this._decorationsWidth.toString(),a='" style="left:'+o+"px;width:"+s+'px;"></div>',l=[];for(let c=n;c<=i;c++){const u=c-n,d=r[u].getDecorations();let h="";for(const f of d){let m='<div class="cldr '+f.className;f.tooltip!==null&&(m+='" title="'+f.tooltip),m+=a,h+=m}l[u]=h}this._renderResult=l}render(e,n){return this._renderResult?this._renderResult[n-e]:""}}class d_i extends _jt{constructor(e){super(),this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const n=e.getDecorationsInViewport(),i=[];let r=0;for(let o=0,s=n.length;o<s;o++){const a=n[o],l=a.options.marginClassName,c=a.options.zIndex;l&&(i[r++]=new pTe(a.range.startLineNumber,a.range.endLineNumber,l,null,c))}return i}prepareRender(e){const n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,r=this._render(n,i,this._getDecorations(e)),o=[];for(let s=n;s<=i;s++){const a=s-n,l=r[a].getDecorations();let c="";for(const u of l)c+='<div class="cmdr '+u.className+'" style=""></div>';o[a]=c}this._renderResult=o}render(e,n){return this._renderResult?this._renderResult[n-e]:""}}const fE=class fE{constructor(e,n,i,r){this._rgba8Brand=void 0,this.r=fE._clamp(e),this.g=fE._clamp(n),this.b=fE._clamp(i),this.a=fE._clamp(r)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:e|0}};fE.Empty=new fE(0,0,0,0);let RC=fE;const Gle=class Gle extends ct{static getInstance(){return this._INSTANCE||(this._INSTANCE=new Gle),this._INSTANCE}constructor(){super(),this._onDidChange=new st,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Ca.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){const e=Ca.getColorMap();if(!e){this._colors=[RC.Empty],this._backgroundIsLight=!0;return}this._colors=[RC.Empty];for(let i=1;i<e.length;i++){const r=e[i].rgba;this._colors[i]=new RC(r.r,r.g,r.b,Math.round(r.a*255))}const n=e[2].getRelativeLuminance();this._backgroundIsLight=n>=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}};Gle._INSTANCE=null;let _re=Gle;const h_i=(()=>{const t=[];for(let e=32;e<=126;e++)t.push(e);return t.push(65533),t})(),f_i=(t,e)=>(t-=32,t<0||t>96?e<=2?(t+96)%96:95:t);class KH{constructor(e,n){this.scale=n,this._minimapCharRendererBrand=void 0,this.charDataNormal=KH.soften(e,12/15),this.charDataLight=KH.soften(e,50/60)}static soften(e,n){const i=new Uint8ClampedArray(e.length);for(let r=0,o=e.length;r<o;r++)i[r]=Qie(e[r]*n);return i}renderChar(e,n,i,r,o,s,a,l,c,u,d){const h=1*this.scale,f=2*this.scale,m=d?1:f;if(n+h>e.width||i+m>e.height){console.warn("bad render request outside image data");return}const p=u?this.charDataLight:this.charDataNormal,g=f_i(r,c),y=e.width*4,_=a.r,w=a.g,C=a.b,N=o.r-_,E=o.g-w,D=o.b-C,k=Math.max(s,l),M=e.data;let T=g*h*f,A=i*y+n*4;for(let R=0;R<m;R++){let P=A;for(let O=0;O<h;O++){const V=p[T++]/255*(s/255);M[P++]=_+N*V,M[P++]=w+E*V,M[P++]=C+D*V,M[P++]=k}A+=y}}blockRenderChar(e,n,i,r,o,s,a,l){const c=1*this.scale,u=2*this.scale,d=l?1:u;if(n+c>e.width||i+d>e.height){console.warn("bad render request outside image data");return}const h=e.width*4,f=.5*(o/255),m=s.r,p=s.g,g=s.b,y=r.r-m,_=r.g-p,w=r.b-g,C=m+y*f,N=p+_*f,E=g+w*f,D=Math.max(o,a),k=e.data;let M=i*h+n*4;for(let T=0;T<d;T++){let A=M;for(let R=0;R<c;R++)k[A++]=C,k[A++]=N,k[A++]=E,k[A++]=D;M+=h}}}const xat={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},wat=t=>{const e=new Uint8ClampedArray(t.length/2);for(let n=0;n<t.length;n+=2)e[n>>1]=xat[t[n]]<<4|xat[t[n+1]]&15;return e},Cat={1:ak(()=>wat("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:ak(()=>wat("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class Z9{static create(e,n){if(this.lastCreated&&e===this.lastCreated.scale&&n===this.lastFontFamily)return this.lastCreated;let i;return Cat[e]?i=new KH(Cat[e](),e):i=Z9.createFromSampleData(Z9.createSampleData(n).data,e),this.lastFontFamily=n,this.lastCreated=i,i}static createSampleData(e){const n=document.createElement("canvas"),i=n.getContext("2d");n.style.height="16px",n.height=16,n.width=96*10,n.style.width=96*10+"px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let r=0;for(const o of h_i)i.fillText(String.fromCharCode(o),r,16/2),r+=10;return i.getImageData(0,0,96*10,16)}static createFromSampleData(e,n){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const r=Z9._downsample(e,n);return new KH(r,n)}static _downsampleChar(e,n,i,r,o){const s=1*o,a=2*o;let l=r,c=0;for(let u=0;u<a;u++){const d=u/a*16,h=(u+1)/a*16;for(let f=0;f<s;f++){const m=f/s*10,p=(f+1)/s*10;let g=0,y=0;for(let w=d;w<h;w++){const C=n+Math.floor(w)*3840,N=1-(w-Math.floor(w));for(let E=m;E<p;E++){const D=1-(E-Math.floor(E)),k=C+Math.floor(E)*4,M=D*N;y+=M,g+=e[k]*e[k+3]/255*M}}const _=g/y;c=Math.max(c,_),i[l++]=Qie(_)}}return c}static _downsample(e,n){const i=2*n*1*n,r=i*96,o=new Uint8ClampedArray(r);let s=0,a=0,l=0;for(let c=0;c<96;c++)l=Math.max(l,this._downsampleChar(e,a,o,s,n)),s+=i,a+=10*4;if(l>0){const c=255/l;for(let u=0;u<r;u++)o[u]*=c}return o}}const Cjt=Fu?'"Segoe WPC", "Segoe UI", sans-serif':xr?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif',m_i=140,p_i=2;class D3{constructor(e,n,i){const r=e.options,o=r.get(144),s=r.get(146),a=s.minimap,l=r.get(50),c=r.get(73);this.renderMinimap=a.renderMinimap,this.size=c.size,this.minimapHeightIsEditorHeight=a.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=r.get(106),this.paddingTop=r.get(84).top,this.paddingBottom=r.get(84).bottom,this.showSlider=c.showSlider,this.autohide=c.autohide,this.pixelRatio=o,this.typicalHalfwidthCharacterWidth=l.typicalHalfwidthCharacterWidth,this.lineHeight=r.get(67),this.minimapLeft=a.minimapLeft,this.minimapWidth=a.minimapWidth,this.minimapHeight=s.height,this.canvasInnerWidth=a.minimapCanvasInnerWidth,this.canvasInnerHeight=a.minimapCanvasInnerHeight,this.canvasOuterWidth=a.minimapCanvasOuterWidth,this.canvasOuterHeight=a.minimapCanvasOuterHeight,this.isSampling=a.minimapIsSampling,this.editorHeight=s.height,this.fontScale=a.minimapScale,this.minimapLineHeight=a.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.sectionHeaderFontFamily=Cjt,this.sectionHeaderFontSize=c.sectionHeaderFontSize*o,this.sectionHeaderLetterSpacing=c.sectionHeaderLetterSpacing,this.sectionHeaderFontColor=D3._getSectionHeaderColor(n,i.getColor(1)),this.charRenderer=ak(()=>Z9.create(this.fontScale,l.fontFamily)),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=D3._getMinimapBackground(n,this.defaultBackgroundColor),this.foregroundAlpha=D3._getMinimapForegroundOpacity(n)}static _getMinimapBackground(e,n){const i=e.getColor(Tbi);return i?new RC(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):n}static _getMinimapForegroundOpacity(e){const n=e.getColor(Ibi);return n?RC._clamp(Math.round(255*n.rgba.a)):255}static _getSectionHeaderColor(e,n){const i=e.getColor(Rw);return i?new RC(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):n}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.sectionHeaderFontSize===e.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===e.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class Q9{constructor(e,n,i,r,o,s,a,l,c){this.scrollTop=e,this.scrollHeight=n,this.sliderNeeded=i,this._computedSliderRatio=r,this.sliderTop=o,this.sliderHeight=s,this.topPaddingLineCount=a,this.startLineNumber=l,this.endLineNumber=c}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const n=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumber,e.endLineNumber);return n>i?null:[n,i]}getYForLineNumber(e,n){return+(e-this.startLineNumber+this.topPaddingLineCount)*n}static create(e,n,i,r,o,s,a,l,c,u,d){const h=e.pixelRatio,f=e.minimapLineHeight,m=Math.floor(e.canvasInnerHeight/f),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){let E=l*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(E+=Math.max(0,o-e.lineHeight-e.paddingBottom));const D=Math.max(1,Math.floor(o*o/E)),k=Math.max(0,e.minimapHeight-D),M=k/(u-o),T=c*M,A=k>0,R=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),P=Math.floor(e.paddingTop/e.lineHeight);return new Q9(c,u,A,M,T,D,P,1,Math.min(a,R))}let g;if(s&&i!==a){const E=i-n+1;g=Math.floor(E*f/h)}else{const E=o/p;g=Math.floor(E*f/h)}const y=Math.floor(e.paddingTop/p);let _=Math.floor(e.paddingBottom/p);if(e.scrollBeyondLastLine){const E=o/p;_=Math.max(_,E-1)}let w;if(_>0){const E=o/p;w=(y+a+_-E-1)*f/h}else w=Math.max(0,(y+a)*f/h-g);w=Math.min(e.minimapHeight-g,w);const C=w/(u-o),N=c*C;if(m>=y+a+_){const E=w>0;return new Q9(c,u,E,C,N,g,y,1,a)}else{let E;n>1?E=n+y:E=Math.max(1,c/p);let D,k=Math.max(1,Math.floor(E-N*h/f));k<y?(D=y-k+1,k=1):(D=0,k=Math.max(1,k-y)),d&&d.scrollHeight===u&&(d.scrollTop>c&&(k=Math.min(k,d.startLineNumber),D=Math.max(D,d.topPaddingLineCount)),d.scrollTop<c&&(k=Math.max(k,d.startLineNumber),D=Math.min(D,d.topPaddingLineCount)));const M=Math.min(a,k-D+m-1),T=(c-r)/p;let A;return c>=e.paddingTop?A=(n-k+D+T)*f/h:A=c/e.paddingTop*(D+T)*f/h,new Q9(c,u,!0,C,A,g,D,k,M)}}}const Yle=class Yle{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}};Yle.INVALID=new Yle(-1);let xre=Yle;class Sat{constructor(e,n,i){this.renderedLayout=e,this._imageData=n,this._renderedLines=new gjt(()=>xre.INVALID),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const i=this._renderedLines._get().lines;for(let r=0,o=i.length;r<o;r++)if(i[r].dy===-1)return!1;return!0}scrollEquals(e){return this.renderedLayout.startLineNumber===e.startLineNumber&&this.renderedLayout.endLineNumber===e.endLineNumber}_get(){const e=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines}}onLinesChanged(e,n){return this._renderedLines.onLinesChanged(e,n)}onLinesDeleted(e,n){this._renderedLines.onLinesDeleted(e,n)}onLinesInserted(e,n){this._renderedLines.onLinesInserted(e,n)}onTokensChanged(e){return this._renderedLines.onTokensChanged(e)}}class EVe{constructor(e,n,i,r){this._backgroundFillData=EVe._createBackgroundFillData(n,i,r),this._buffers=[e.createImageData(n,i),e.createImageData(n,i)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const e=this._buffers[this._lastUsedBuffer];return e.data.set(this._backgroundFillData),e}static _createBackgroundFillData(e,n,i){const r=i.r,o=i.g,s=i.b,a=i.a,l=new Uint8ClampedArray(e*n*4);let c=0;for(let u=0;u<n;u++)for(let d=0;d<e;d++)l[c]=r,l[c+1]=o,l[c+2]=s,l[c+3]=a,c+=4;return l}}class qH{static compute(e,n,i){if(e.renderMinimap===0||!e.isSampling)return[null,[]];const{minimapLineCount:r}=p3.computeContainedMinimapLineCount({viewLineCount:n,scrollBeyondLastLine:e.scrollBeyondLastLine,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:e.editorHeight,lineHeight:e.lineHeight,pixelRatio:e.pixelRatio}),o=n/r,s=o/2;if(!i||i.minimapLines.length===0){const g=[];if(g[0]=1,r>1){for(let y=0,_=r-1;y<_;y++)g[y]=Math.round(y*o+s);g[r-1]=n}return[new qH(o,g),[]]}const a=i.minimapLines,l=a.length,c=[];let u=0,d=0,h=1;const f=10;let m=[],p=null;for(let g=0;g<r;g++){const y=Math.max(h,Math.round(g*o)),_=Math.max(y,Math.round((g+1)*o));for(;u<l&&a[u]<y;){if(m.length<f){const C=u+1+d;p&&p.type==="deleted"&&p._oldIndex===u-1?p.deleteToLineNumber++:(p={type:"deleted",_oldIndex:u,deleteFromLineNumber:C,deleteToLineNumber:C},m.push(p)),d--}u++}let w;if(u<l&&a[u]<=_)w=a[u],u++;else if(g===0?w=1:g+1===r?w=n:w=Math.round(g*o+s),m.length<f){const C=u+1+d;p&&p.type==="inserted"&&p._i===g-1?p.insertToLineNumber++:(p={type:"inserted",_i:g,insertFromLineNumber:C,insertToLineNumber:C},m.push(p)),d++}c[g]=w,h=w}if(m.length<f)for(;u<l;){const g=u+1+d;p&&p.type==="deleted"&&p._oldIndex===u-1?p.deleteToLineNumber++:(p={type:"deleted",_oldIndex:u,deleteFromLineNumber:g,deleteToLineNumber:g},m.push(p)),d--,u++}else m=[{type:"flush"}];return[new qH(o,c),m]}constructor(e,n){this.samplingRatio=e,this.minimapLines=n}modelLineToMinimapLine(e){return Math.min(this.minimapLines.length,Math.max(1,Math.round(e/this.samplingRatio)))}modelLineRangeToMinimapLineRange(e,n){let i=this.modelLineToMinimapLine(e)-1;for(;i>0&&this.minimapLines[i-1]>=e;)i--;let r=this.modelLineToMinimapLine(n)-1;for(;r+1<this.minimapLines.length&&this.minimapLines[r+1]<=n;)r++;if(i===r){const o=this.minimapLines[i];if(o<e||o>n)return null}return[i+1,r+1]}decorationLineRangeToMinimapLineRange(e,n){let i=this.modelLineToMinimapLine(e),r=this.modelLineToMinimapLine(n);return e!==n&&r===i&&(r===this.minimapLines.length?i>1&&i--:r++),[i,r]}onLinesDeleted(e){const n=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,r=0;for(let o=this.minimapLines.length-1;o>=0&&!(this.minimapLines[o]<e.fromLineNumber);o--)this.minimapLines[o]<=e.toLineNumber?(this.minimapLines[o]=Math.max(1,e.fromLineNumber-1),i=Math.min(i,o),r=Math.max(r,o)):this.minimapLines[o]-=n;return[i,r]}onLinesInserted(e){const n=e.toLineNumber-e.fromLineNumber+1;for(let i=this.minimapLines.length-1;i>=0&&!(this.minimapLines[i]<e.fromLineNumber);i--)this.minimapLines[i]+=n}}class g_i extends zm{constructor(e){super(e),this._sectionHeaderCache=new Aw(10,1.5),this.tokensColorTracker=_re.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new D3(this._context.configuration,this._context.theme,this.tokensColorTracker);const[n]=qH.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=n,this._shouldCheckSampling=!1,this._actual=new p4(e.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const e=new D3(this._context.configuration,this._context.theme,this.tokensColorTracker);return this.options.equals(e)?!1:(this.options=e,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(e){return this._onOptionsMaybeChanged()}onCursorStateChanged(e){return this._selections=e.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(e){return e.affectsMinimap?this._actual.onDecorationsChanged():!1}onFlushed(e){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(e){if(this._samplingState){const n=this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber,e.fromLineNumber+e.count-1);return n?this._actual.onLinesChanged(n[0],n[1]-n[0]+1):!1}else return this._actual.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){if(this._samplingState){const[n,i]=this._samplingState.onLinesDeleted(e);return n<=i&&this._actual.onLinesChanged(n+1,i-n+1),this._shouldCheckSampling=!0,!0}else return this._actual.onLinesDeleted(e.fromLineNumber,e.toLineNumber)}onLinesInserted(e){return this._samplingState?(this._samplingState.onLinesInserted(e),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(e.fromLineNumber,e.toLineNumber)}onScrollChanged(e){return this._actual.onScrollChanged()}onThemeChanged(e){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(e){if(this._samplingState){const n=[];for(const i of e.ranges){const r=this._samplingState.modelLineRangeToMinimapLineRange(i.fromLineNumber,i.toLineNumber);r&&n.push({fromLineNumber:r[0],toLineNumber:r[1]})}return n.length?this._actual.onTokensChanged(n):!1}else return this._actual.onTokensChanged(e.ranges)}onTokensColorsChanged(e){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(e){return this._actual.onZonesChanged()}prepareRender(e){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(e){let n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber;this._samplingState&&(n=this._samplingState.modelLineToMinimapLine(n),i=this._samplingState.modelLineToMinimapLine(i));const r={viewportContainsWhitespaceGaps:e.viewportData.whitespaceViewportData.length>0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:n,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(n),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(r)}_recreateLineSampling(){this._minimapSelections=null;const e=!!this._samplingState,[n,i]=qH.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=n,e&&this._samplingState)for(const r of i)switch(r.type){case"deleted":this._actual.onLinesDeleted(r.deleteFromLineNumber,r.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(r.insertFromLineNumber,r.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,n,i){if(this._samplingState){const r=[];for(let o=0,s=n-e+1;o<s;o++)i[o]?r[o]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[e+o-1]):r[o]=null;return r}return this._context.viewModel.getMinimapLinesRenderingData(e,n,i).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const e of this._selections){const[n,i]=this._samplingState.decorationLineRangeToMinimapLineRange(e.startLineNumber,e.endLineNumber);this._minimapSelections.push(new Pn(n,e.startColumn,i,e.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(e,n){const i=this._getMinimapDecorationsInViewport(e,n).filter(r=>{var o;return!((o=r.options.minimap)!=null&&o.sectionHeaderStyle)});if(this._samplingState){const r=[];for(const o of i){if(!o.options.minimap)continue;const s=o.range,a=this._samplingState.modelLineToMinimapLine(s.startLineNumber),l=this._samplingState.modelLineToMinimapLine(s.endLineNumber);r.push(new S3t(new ve(a,s.startColumn,l,s.endColumn),o.options))}return r}return i}getSectionHeaderDecorationsInViewport(e,n){const i=this.options.minimapLineHeight,o=this.options.sectionHeaderFontSize/i;return e=Math.floor(Math.max(1,e-o)),this._getMinimapDecorationsInViewport(e,n).filter(s=>{var a;return!!((a=s.options.minimap)!=null&&a.sectionHeaderStyle)})}_getMinimapDecorationsInViewport(e,n){let i;if(this._samplingState){const r=this._samplingState.minimapLines[e-1],o=this._samplingState.minimapLines[n-1];i=new ve(r,1,o,this._context.viewModel.getLineMaxColumn(o))}else i=new ve(e,1,n,this._context.viewModel.getLineMaxColumn(n));return this._context.viewModel.getMinimapDecorationsInRange(i)}getSectionHeaderText(e,n){var s;const i=(s=e.options.minimap)==null?void 0:s.sectionHeaderText;if(!i)return null;const r=this._sectionHeaderCache.get(i);if(r)return r;const o=n(i);return this._sectionHeaderCache.set(i,o),o}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new ve(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}}class p4 extends ct{constructor(e,n){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=n,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(rat),this._domNode=wo(document.createElement("div")),Y0.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=wo(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=wo(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=wo(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=wo(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=wo(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._pointerDownListener=Fa(this._domNode.domNode,Yt.POINTER_DOWN,i=>{if(i.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(i.button===0&&this._lastRenderData){const c=Ga(this._slider.domNode),u=c.top+c.height/2;this._startSliderDragging(i,u,this._lastRenderData.renderedLayout)}return}const o=this._model.options.minimapLineHeight,s=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*i.offsetY;let l=Math.floor(s/o)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;l=Math.min(l,this._model.getLineCount()),this._model.revealLineNumber(l)}),this._sliderPointerMoveMonitor=new R6,this._sliderPointerDownListener=Fa(this._slider.domNode,Yt.POINTER_DOWN,i=>{i.preventDefault(),i.stopPropagation(),i.button===0&&this._lastRenderData&&this._startSliderDragging(i,i.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=xd.addTarget(this._domNode.domNode),this._sliderTouchStartListener=yt(this._domNode.domNode,hs.Start,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(i))},{passive:!1}),this._sliderTouchMoveListener=yt(this._domNode.domNode,hs.Change,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(i)},{passive:!1}),this._sliderTouchEndListener=Fa(this._domNode.domNode,hs.End,i=>{i.preventDefault(),i.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,n,i){if(!e.target||!(e.target instanceof Element))return;const r=e.pageX;this._slider.toggleClassName("active",!0);const o=(s,a)=>{const l=Ga(this._domNode.domNode),c=Math.min(Math.abs(a-r),Math.abs(a-l.left),Math.abs(a-l.left-l.width));if(Fu&&c>m_i){this._model.setScrollTop(i.scrollTop);return}const u=s-n;this._model.setScrollTop(i.getDesiredScrollTopFromDelta(u))};e.pageY!==n&&o(e.pageY,r),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,s=>o(s.pageY,s.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){const n=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-n);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return this._model.options.showSlider==="always"?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new EVe(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,n){return this._lastRenderData?this._lastRenderData.onLinesChanged(e,n):!1}onLinesDeleted(e,n){var i;return(i=this._lastRenderData)==null||i.onLinesDeleted(e,n),!0}onLinesInserted(e,n){var i;return(i=this._lastRenderData)==null||i.onLinesInserted(e,n),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(rat),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const i=Q9.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(i.sliderNeeded?"block":"none"),this._slider.setTop(i.sliderTop),this._slider.setHeight(i.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(i.sliderHeight),this.renderDecorations(i),this._lastRenderData=this.renderLines(i)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const n=this._model.getSelections();n.sort(ve.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort((h,f)=>(h.options.zIndex||0)-(f.options.zIndex||0));const{canvasInnerWidth:r,canvasInnerHeight:o}=this._model.options,s=this._model.options.minimapLineHeight,a=this._model.options.minimapCharWidth,l=this._model.getOptions().tabSize,c=this._decorationsCanvas.domNode.getContext("2d");c.clearRect(0,0,r,o);const u=new Nat(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(c,n,u,e,s),this._renderDecorationsLineHighlights(c,i,u,e,s);const d=new Nat(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(c,n,d,e,s,l,a,r),this._renderDecorationsHighlights(c,i,d,e,s,l,a,r),this._renderSectionHeaders(e)}}_renderSelectionLineHighlights(e,n,i,r,o){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let s=0,a=0;for(const l of n){const c=r.intersectWithViewport(l);if(!c)continue;const[u,d]=c;for(let m=u;m<=d;m++)i.set(m,!0);const h=r.getYForLineNumber(u,o),f=r.getYForLineNumber(d,o);a>=h||(a>s&&e.fillRect(q_,s,e.canvas.width,a-s),s=h),a=f}a>s&&e.fillRect(q_,s,e.canvas.width,a-s)}_renderDecorationsLineHighlights(e,n,i,r,o){const s=new Map;for(let a=n.length-1;a>=0;a--){const l=n[a],c=l.options.minimap;if(!c||c.position!==1)continue;const u=r.intersectWithViewport(l.range);if(!u)continue;const[d,h]=u,f=c.getColor(this._theme.value);if(!f||f.isTransparent())continue;let m=s.get(f.toString());m||(m=f.transparent(.5).toString(),s.set(f.toString(),m)),e.fillStyle=m;for(let p=d;p<=h;p++){if(i.has(p))continue;i.set(p,!0);const g=r.getYForLineNumber(d,o);e.fillRect(q_,g,e.canvas.width,o)}}}_renderSelectionsHighlights(e,n,i,r,o,s,a,l){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const c of n){const u=r.intersectWithViewport(c);if(!u)continue;const[d,h]=u;for(let f=d;f<=h;f++)this.renderDecorationOnLine(e,i,c,this._selectionColor,r,f,o,o,s,a,l)}}_renderDecorationsHighlights(e,n,i,r,o,s,a,l){for(const c of n){const u=c.options.minimap;if(!u)continue;const d=r.intersectWithViewport(c.range);if(!d)continue;const[h,f]=d,m=u.getColor(this._theme.value);if(!(!m||m.isTransparent()))for(let p=h;p<=f;p++)switch(u.position){case 1:this.renderDecorationOnLine(e,i,c.range,m,r,p,o,o,s,a,l);continue;case 2:{const g=r.getYForLineNumber(p,o);this.renderDecoration(e,m,2,g,p_i,o);continue}}}}renderDecorationOnLine(e,n,i,r,o,s,a,l,c,u,d){const h=o.getYForLineNumber(s,l);if(h+a<0||h>this._model.options.canvasInnerHeight)return;const{startLineNumber:f,endLineNumber:m}=i,p=f===s?i.startColumn:1,g=m===s?i.endColumn:this._model.getLineMaxColumn(s),y=this.getXOffsetForPosition(n,s,p,c,u,d),_=this.getXOffsetForPosition(n,s,g,c,u,d);this.renderDecoration(e,r,y,h,_-y,a)}getXOffsetForPosition(e,n,i,r,o,s){if(i===1)return q_;if((i-1)*o>=s)return s;let l=e.get(n);if(!l){const c=this._model.getLineContent(n);l=[q_];let u=q_;for(let d=1;d<c.length+1;d++){const h=c.charCodeAt(d-1),f=h===9?r*o:uk(h)?2*o:o,m=u+f;if(m>=s){l[d]=s;break}l[d]=m,u=m}e.set(n,l)}return i-1<l.length?l[i-1]:s}renderDecoration(e,n,i,r,o,s){e.fillStyle=n&&n.toString()||"",e.fillRect(i,r,o,s)}_renderSectionHeaders(e){var p;const n=this._model.options.minimapLineHeight,i=this._model.options.sectionHeaderFontSize,r=this._model.options.sectionHeaderLetterSpacing,o=i*1.5,{canvasInnerWidth:s}=this._model.options,a=this._model.options.backgroundColor,l=`rgb(${a.r} ${a.g} ${a.b} / .7)`,c=this._model.options.sectionHeaderFontColor,u=`rgb(${c.r} ${c.g} ${c.b})`,d=u,h=this._decorationsCanvas.domNode.getContext("2d");h.letterSpacing=r+"px",h.font="500 "+i+"px "+this._model.options.sectionHeaderFontFamily,h.strokeStyle=d,h.lineWidth=.2;const f=this._model.getSectionHeaderDecorationsInViewport(e.startLineNumber,e.endLineNumber);f.sort((g,y)=>g.range.startLineNumber-y.range.startLineNumber);const m=p4._fitSectionHeader.bind(null,h,s-q_);for(const g of f){const y=e.getYForLineNumber(g.range.startLineNumber,n)+i,_=y-i,w=_+2,C=this._model.getSectionHeaderText(g,m);p4._renderSectionLabel(h,C,((p=g.options.minimap)==null?void 0:p.sectionHeaderStyle)===2,l,u,s,_,o,y,w)}}static _fitSectionHeader(e,n,i){if(!i)return i;const r="…",o=e.measureText(i).width,s=e.measureText(r).width;if(o<=n||o<=s)return i;const a=i.length,l=o/i.length,c=Math.floor((n-s)/l)-1;let u=Math.ceil(c/2);for(;u>0&&/\s/.test(i[u-1]);)--u;return i.substring(0,u)+r+i.substring(a-(c-u))}static _renderSectionLabel(e,n,i,r,o,s,a,l,c,u){n&&(e.fillStyle=r,e.fillRect(0,a,s,l),e.fillStyle=o,e.fillText(n,q_,c)),i&&(e.beginPath(),e.moveTo(0,u),e.lineTo(s,u),e.closePath(),e.stroke())}renderLines(e){const n=e.startLineNumber,i=e.endLineNumber,r=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const V=this._lastRenderData._get();return new Sat(e,V.imageData,V.lines)}const o=this._getBuffer();if(!o)return null;const[s,a,l]=p4._renderUntouchedLines(o,e.topPaddingLineCount,n,i,r,this._lastRenderData),c=this._model.getMinimapLinesRenderingData(n,i,l),u=this._model.getOptions().tabSize,d=this._model.options.defaultBackgroundColor,h=this._model.options.backgroundColor,f=this._model.options.foregroundAlpha,m=this._model.tokensColorTracker,p=m.backgroundIsLight(),g=this._model.options.renderMinimap,y=this._model.options.charRenderer(),_=this._model.options.fontScale,w=this._model.options.minimapCharWidth,N=(g===1?2:3)*_,E=r>N?Math.floor((r-N)/2):0,D=h.a/255,k=new RC(Math.round((h.r-d.r)*D+d.r),Math.round((h.g-d.g)*D+d.g),Math.round((h.b-d.b)*D+d.b),255);let M=e.topPaddingLineCount*r;const T=[];for(let V=0,F=i-n+1;V<F;V++)l[V]&&p4._renderLine(o,k,h.a,p,g,w,m,f,y,M,E,u,c[V],_,r),T[V]=new xre(M),M+=r;const A=s===-1?0:s,P=(a===-1?o.height:a)-A;return this._canvas.domNode.getContext("2d").putImageData(o,0,0,0,A,o.width,P),new Sat(e,o,T)}static _renderUntouchedLines(e,n,i,r,o,s){const a=[];if(!s){for(let M=0,T=r-i+1;M<T;M++)a[M]=!0;return[-1,-1,a]}const l=s._get(),c=l.imageData.data,u=l.rendLineNumberStart,d=l.lines,h=d.length,f=e.width,m=e.data,p=(r-i+1)*o*f*4;let g=-1,y=-1,_=-1,w=-1,C=-1,N=-1,E=n*o;for(let M=i;M<=r;M++){const T=M-i,A=M-u,R=A>=0&&A<h?d[A].dy:-1;if(R===-1){a[T]=!0,E+=o;continue}const P=R*f*4,O=(R+o)*f*4,V=E*f*4,F=(E+o)*f*4;w===P&&N===V?(w=O,N=F):(_!==-1&&(m.set(c.subarray(_,w),C),g===-1&&_===0&&_===C&&(g=w),y===-1&&w===p&&_===C&&(y=_)),_=P,w=O,C=V,N=F),a[T]=!1,E+=o}_!==-1&&(m.set(c.subarray(_,w),C),g===-1&&_===0&&_===C&&(g=w),y===-1&&w===p&&_===C&&(y=_));const D=g===-1?-1:g/(f*4),k=y===-1?-1:y/(f*4);return[D,k,a]}static _renderLine(e,n,i,r,o,s,a,l,c,u,d,h,f,m,p){const g=f.content,y=f.tokens,_=e.width-s,w=p===1;let C=q_,N=0,E=0;for(let D=0,k=y.getCount();D<k;D++){const M=y.getEndOffset(D),T=y.getForeground(D),A=a.getColor(T);for(;N<M;N++){if(C>_)return;const R=g.charCodeAt(N);if(R===9){const P=h-(N+E)%h;E+=P-1,C+=P*s}else if(R===32)C+=s;else{const P=uk(R)?2:1;for(let O=0;O<P;O++)if(o===2?c.blockRenderChar(e,C,u+d,A,l,n,i,w):c.renderChar(e,C,u+d,R,A,l,n,i,m,r,w),C+=s,C>_)return}}}}}class Nat{constructor(e,n,i){this._startLineNumber=e,this._endLineNumber=n,this._defaultValue=i,this._values=[];for(let r=0,o=this._endLineNumber-this._startLineNumber+1;r<o;r++)this._values[r]=i}has(e){return this.get(e)!==this._defaultValue}set(e,n){e<this._startLineNumber||e>this._endLineNumber||(this._values[e-this._startLineNumber]=n)}get(e){return e<this._startLineNumber||e>this._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}class b_i extends zm{constructor(e,n){super(e),this._viewDomNode=n;const r=this._context.configuration.options.get(146);this._widgets={},this._verticalScrollbarWidth=r.verticalScrollbarWidth,this._minimapWidth=r.minimap.minimapWidth,this._horizontalScrollbarHeight=r.horizontalScrollbarHeight,this._editorHeight=r.height,this._editorWidth=r.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=wo(document.createElement("div")),Y0.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=wo(document.createElement("div")),Y0.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const i=this._context.configuration.options.get(146);return this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,!0}addWidget(e){const n=wo(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:n},n.setPosition("absolute"),n.setAttribute("widgetId",e.getId()),e.allowEditorOverflow?this.overflowingOverlayWidgetsDomNode.appendChild(n):this._domNode.appendChild(n),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,n){const i=this._widgets[e.getId()],r=n?n.preference:null,o=n==null?void 0:n.stackOridinal;return i.preference===r&&i.stack===o?(this._updateMaxMinWidth(),!1):(i.preference=r,i.stack=o,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const n=e.getId();if(this._widgets.hasOwnProperty(n)){const r=this._widgets[n].domNode.domNode;delete this._widgets[n],r.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var i,r;let e=0;const n=Object.keys(this._widgets);for(let o=0,s=n.length;o<s;o++){const a=n[o],c=(r=(i=this._widgets[a].widget).getMinContentWidthInPx)==null?void 0:r.call(i);typeof c<"u"&&(e=Math.max(e,c))}this._context.viewLayout.setOverlayWidgetsMinWidth(e)}_renderWidget(e,n){const i=e.domNode;if(e.preference===null){i.setTop("");return}const r=2*this._verticalScrollbarWidth+this._minimapWidth;if(e.preference===0||e.preference===1){if(e.preference===1){const o=i.domNode.clientHeight;i.setTop(this._editorHeight-o-2*this._horizontalScrollbarHeight)}else i.setTop(0);e.stack!==void 0?(i.setTop(n[e.preference]),n[e.preference]+=i.domNode.clientWidth):i.setRight(r)}else if(e.preference===2)i.domNode.style.right="50%",e.stack!==void 0?(i.setTop(n[2]),n[2]+=i.domNode.clientHeight):i.setTop(0);else{const{top:o,left:s}=e.preference;if(this._context.configuration.options.get(42)&&e.widget.allowEditorOverflow){const l=this._viewDomNodeRect;i.setTop(o+l.top),i.setLeft(s+l.left),i.setPosition("fixed")}else i.setTop(o),i.setLeft(s),i.setPosition("absolute")}}prepareRender(e){this._viewDomNodeRect=Ga(this._viewDomNode.domNode)}render(e){this._domNode.setWidth(this._editorWidth);const n=Object.keys(this._widgets),i=Array.from({length:3},()=>0);n.sort((r,o)=>(this._widgets[r].stack||0)-(this._widgets[o].stack||0));for(let r=0,o=n.length;r<o;r++){const s=n[r];this._renderWidget(this._widgets[s],i)}}}class v_i{constructor(e,n){const i=e.options;this.lineHeight=i.get(67),this.pixelRatio=i.get(144),this.overviewRulerLanes=i.get(83),this.renderBorder=i.get(82);const r=n.getColor(zyi);this.borderColor=r?r.toString():null,this.hideCursor=i.get(59);const o=n.getColor(ome);this.cursorColorSingle=o?o.transparent(.7).toString():null;const s=n.getColor(njt);this.cursorColorPrimary=s?s.transparent(.7).toString():null;const a=n.getColor(ijt);this.cursorColorSecondary=a?a.transparent(.7).toString():null,this.themeType=n.type;const l=i.get(73),c=l.enabled,u=l.side,d=n.getColor(Hyi),h=Ca.getDefaultBackground();d?this.backgroundColor=d:c&&u==="right"?this.backgroundColor=h:this.backgroundColor=null;const m=i.get(146).overviewRuler;this.top=m.top,this.right=m.right,this.domWidth=m.width,this.domHeight=m.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[p,g]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=p,this.w=g}_initLanes(e,n,i){const r=n-e;if(i>=3){const o=Math.floor(r/3),s=Math.floor(r/3),a=r-o-s,l=e,c=l+o,u=l+o+a;return[[0,l,c,l,u,l,c,l],[0,o,a,o+a,s,o+a+s,a+s,o+a+s]]}else if(i===2){const o=Math.floor(r/2),s=r-o,a=e,l=a+o;return[[0,a,a,a,l,a,a,a],[0,o,o,o,s,o+s,o+s,o+s]]}else{const o=e,s=r;return[[0,o,o,o,o,o,o,o],[0,s,s,s,s,s,s,s]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColorSingle===e.cursorColorSingle&&this.cursorColorPrimary===e.cursorColorPrimary&&this.cursorColorSecondary===e.cursorColorSecondary&&this.themeType===e.themeType&&Rt.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class y_i extends zm{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=wo(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Ca.onDidChange(n=>{n.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[{position:new ot(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const n=new v_i(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(n)?!1:(this._settings=n,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}onCursorStateChanged(e){this._cursorPositions=[];for(let n=0,i=e.selections.length;n<i;n++){let r=this._settings.cursorColorSingle;i>1&&(r=n===0?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:e.selections[n].getPosition(),color:r})}return this._cursorPositions.sort((n,i)=>ot.compare(n.position,i.position)),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(e){return e.affectsOverviewRuler?this._markRenderingIsMaybeNeeded():!1}onFlushed(e){return this._markRenderingIsNeeded()}onScrollChanged(e){return e.scrollHeightChanged?this._markRenderingIsNeeded():!1}onZonesChanged(e){return this._markRenderingIsNeeded()}onThemeChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render(),this._actualShouldRender=0}_render(){const e=this._settings.backgroundColor;if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(e?Rt.Format.CSS.formatHexA(e):""),this._domNode.setDisplay("none");return}const n=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(n.sort(AH.compareByRenderingProps),this._actualShouldRender===1&&!AH.equalsArr(this._renderedDecorations,n)&&(this._actualShouldRender=2),this._actualShouldRender===1&&!Xs(this._renderedCursorPositions,this._cursorPositions,(m,p)=>m.position.lineNumber===p.position.lineNumber&&m.color===p.color)&&(this._actualShouldRender=2),this._actualShouldRender===1)return;this._renderedDecorations=n,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const i=this._settings.canvasWidth,r=this._settings.canvasHeight,o=this._settings.lineHeight,s=this._context.viewLayout,a=this._context.viewLayout.getScrollHeight(),l=r/a,c=6*this._settings.pixelRatio|0,u=c/2|0,d=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(d.fillStyle=Rt.Format.CSS.formatHexA(e),d.fillRect(0,0,i,r)):(d.clearRect(0,0,i,r),d.fillStyle=Rt.Format.CSS.formatHexA(e),d.fillRect(0,0,i,r)):d.clearRect(0,0,i,r);const h=this._settings.x,f=this._settings.w;for(const m of n){const p=m.color,g=m.data;d.fillStyle=p;let y=0,_=0,w=0;for(let C=0,N=g.length/3;C<N;C++){const E=g[3*C],D=g[3*C+1],k=g[3*C+2];let M=s.getVerticalOffsetForLineNumber(D)*l|0,T=(s.getVerticalOffsetForLineNumber(k)+o)*l|0;if(T-M<c){let R=(M+T)/2|0;R<u?R=u:R+u>r&&(R=r-u),M=R-u,T=R+u}M>w+1||E!==y?(C!==0&&d.fillRect(h[y],_,f[y],w-_),y=E,_=M,w=T):T>w&&(w=T)}d.fillRect(h[y],_,f[y],w-_)}if(!this._settings.hideCursor){const m=2*this._settings.pixelRatio|0,p=m/2|0,g=this._settings.x[7],y=this._settings.w[7];let _=-100,w=-100,C=null;for(let N=0,E=this._cursorPositions.length;N<E;N++){const D=this._cursorPositions[N].color;if(!D)continue;const k=this._cursorPositions[N].position;let M=s.getVerticalOffsetForLineNumber(k.lineNumber)*l|0;M<p?M=p:M+p>r&&(M=r-p);const T=M-p,A=T+m;T>w+1||D!==C?(N!==0&&C&&d.fillRect(g,_,y,w-_),_=T,w=A):A>w&&(w=A),C=D,d.fillStyle=D}C&&d.fillRect(g,_,y,w-_)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(d.beginPath(),d.lineWidth=1,d.strokeStyle=this._settings.borderColor,d.moveTo(0,0),d.lineTo(0,r),d.moveTo(1,0),d.lineTo(i,0),d.stroke())}}class Eat{constructor(e,n,i){this._colorZoneBrand=void 0,this.from=e|0,this.to=n|0,this.colorId=i|0}static compare(e,n){return e.colorId===n.colorId?e.from===n.from?e.to-n.to:e.from-n.from:e.colorId-n.colorId}}class Sjt{constructor(e,n,i,r){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=n,this.heightInLines=i,this.color=r,this._colorZone=null}static compare(e,n){return e.color===n.color?e.startLineNumber===n.startLineNumber?e.heightInLines===n.heightInLines?e.endLineNumber-n.endLineNumber:e.heightInLines-n.heightInLines:e.startLineNumber-n.startLineNumber:e.color<n.color?-1:1}setColorZone(e){this._colorZone=e}getColorZones(){return this._colorZone}}class __i{constructor(e){this._getVerticalOffsetForLine=e,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(e){this._zones=e,this._zones.sort(Sjt.compare)}setLineHeight(e){return this._lineHeight===e?!1:(this._lineHeight=e,this._colorZonesInvalid=!0,!0)}setPixelRatio(e){this._pixelRatio=e,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(e){return this._domWidth===e?!1:(this._domWidth=e,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(e){return this._domHeight===e?!1:(this._domHeight=e,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(e){return this._outerHeight===e?!1:(this._outerHeight=e,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const e=this._colorZonesInvalid,n=Math.floor(this._lineHeight),i=Math.floor(this.getCanvasHeight()),r=Math.floor(this._outerHeight),o=i/r,s=Math.floor(4*this._pixelRatio/2),a=[];for(let l=0,c=this._zones.length;l<c;l++){const u=this._zones[l];if(!e){const C=u.getColorZones();if(C){a.push(C);continue}}const d=this._getVerticalOffsetForLine(u.startLineNumber),h=u.heightInLines===0?this._getVerticalOffsetForLine(u.endLineNumber)+n:d+u.heightInLines*n,f=Math.floor(o*d),m=Math.floor(o*h);let p=Math.floor((f+m)/2),g=m-p;g<s&&(g=s),p-g<0&&(p=g),p+g>i&&(p=i-g);const y=u.color;let _=this._color2Id[y];_||(_=++this._lastAssignedId,this._color2Id[y]=_,this._id2Color[_]=y);const w=new Eat(p-g,p+g,_);u.setColorZone(w),a.push(w)}return this._colorZonesInvalid=!1,a.sort(Eat.compare),a}}class x_i extends Nq{constructor(e,n){super(),this._context=e;const i=this._context.configuration.options;this._domNode=wo(document.createElement("canvas")),this._domNode.setClassName(n),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new __i(r=>this._context.viewLayout.getVerticalOffsetForLineNumber(r)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(67)),this._zoneManager.setPixelRatio(i.get(144)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const n=this._context.configuration.options;return e.hasChanged(67)&&(this._zoneManager.setLineHeight(n.get(67)),this._render()),e.hasChanged(144)&&(this._zoneManager.setPixelRatio(n.get(144)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let n=!1;n=this._zoneManager.setDOMWidth(e.width)||n,n=this._zoneManager.setDOMHeight(e.height)||n,n&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const e=this._zoneManager.getCanvasWidth(),n=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),r=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,n),i.length>0&&this._renderOneLane(o,i,r,e),!0}_renderOneLane(e,n,i,r){let o=0,s=0,a=0;for(const l of n){const c=l.colorId,u=l.from,d=l.to;c!==o?(e.fillRect(0,s,r,a-s),o=c,e.fillStyle=i[o],s=u,a=d):a>=u?a=Math.max(a,d):(e.fillRect(0,s,r,a-s),s=u,a=d)}e.fillRect(0,s,r,a-s)}}class w_i extends zm{constructor(e){super(e),this.domNode=wo(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const n=this._context.configuration.options;this._rulers=n.get(103),this._typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const n=this._context.configuration.options;return this._rulers=n.get(103),this._typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,n=this._rulers.length;if(e===n)return;if(e<n){const{tabSize:r}=this._context.viewModel.model.getOptions(),o=r;let s=n-e;for(;s>0;){const a=wo(document.createElement("div"));a.setClassName("view-ruler"),a.setWidth(o),this.domNode.appendChild(a),this._renderedRulers.push(a),s--}return}let i=e-n;for(;i>0;){const r=this._renderedRulers.pop();this.domNode.removeChild(r),i--}}render(e){this._ensureRulersCount();for(let n=0,i=this._rulers.length;n<i;n++){const r=this._renderedRulers[n],o=this._rulers[n];r.setBoxShadow(o.color?`1px 0 0 0 ${o.color} inset`:""),r.setHeight(Math.min(e.scrollHeight,1e6)),r.setLeft(o.column*this._typicalHalfwidthCharacterWidth)}}}class C_i extends zm{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const i=this._context.configuration.options.get(104);this._useShadows=i.useShadows,this._domNode=wo(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const n=this._context.configuration.options.get(146);n.minimap.renderMinimap===0||n.minimap.minimapWidth>0&&n.minimap.minimapLeft===0?this._width=n.width:this._width=n.width-n.verticalScrollbarWidth}onConfigurationChanged(e){const i=this._context.configuration.options.get(104);return this._useShadows=i.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}class S_i{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class N_i{constructor(e,n){this.lineNumber=e,this.ranges=n}}function E_i(t){return new S_i(t)}function D_i(t){return new N_i(t.lineNumber,t.ranges.map(E_i))}const za=class za extends eR{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const n=this._context.configuration.options;this._roundedSelection=n.get(102),this._typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const n=this._context.configuration.options;return this._roundedSelection=n.get(102),this._typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let n=0,i=e.length;n<i;n++)if(e[n].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(e,n,i){const r=this._typicalHalfwidthCharacterWidth/4;let o=null,s=null;if(i&&i.length>0&&n.length>0){const a=n[0].lineNumber;if(a===e.startLineNumber)for(let c=0;!o&&c<i.length;c++)i[c].lineNumber===a&&(o=i[c].ranges[0]);const l=n[n.length-1].lineNumber;if(l===e.endLineNumber)for(let c=i.length-1;!s&&c>=0;c--)i[c].lineNumber===l&&(s=i[c].ranges[0]);o&&!o.startStyle&&(o=null),s&&!s.startStyle&&(s=null)}for(let a=0,l=n.length;a<l;a++){const c=n[a].ranges[0],u=c.left,d=c.left+c.width,h={top:0,bottom:0},f={top:0,bottom:0};if(a>0){const m=n[a-1].ranges[0].left,p=n[a-1].ranges[0].left+n[a-1].ranges[0].width;bQ(u-m)<r?h.top=2:u>m&&(h.top=1),bQ(d-p)<r?f.top=2:m<d&&d<p&&(f.top=1)}else o&&(h.top=o.startStyle.top,f.top=o.endStyle.top);if(a+1<l){const m=n[a+1].ranges[0].left,p=n[a+1].ranges[0].left+n[a+1].ranges[0].width;bQ(u-m)<r?h.bottom=2:m<u&&u<p&&(h.bottom=1),bQ(d-p)<r?f.bottom=2:d<p&&(f.bottom=1)}else s&&(h.bottom=s.startStyle.bottom,f.bottom=s.endStyle.bottom);c.startStyle=h,c.endStyle=f}}_getVisibleRangesWithStyle(e,n,i){const o=(n.linesVisibleRangesForRange(e,!0)||[]).map(D_i);return!this._visibleRangesHaveGaps(o)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(n.visibleRange,o,i),o}_createSelectionPiece(e,n,i,r,o){return'<div class="cslr '+i+'" style="top:'+e.toString()+"px;bottom:"+n.toString()+"px;left:"+r.toString()+"px;width:"+o.toString()+'px;"></div>'}_actualRenderOneSelection(e,n,i,r){if(r.length===0)return;const o=!!r[0].ranges[0].startStyle,s=r[0].lineNumber,a=r[r.length-1].lineNumber;for(let l=0,c=r.length;l<c;l++){const u=r[l],d=u.lineNumber,h=d-n,f=i&&d===s?1:0,m=i&&d!==s&&d===a?1:0;let p="",g="";for(let y=0,_=u.ranges.length;y<_;y++){const w=u.ranges[y];if(o){const N=w.startStyle,E=w.endStyle;if(N.top===1||N.bottom===1){p+=this._createSelectionPiece(f,m,za.SELECTION_CLASS_NAME,w.left-za.ROUNDED_PIECE_WIDTH,za.ROUNDED_PIECE_WIDTH);let D=za.EDITOR_BACKGROUND_CLASS_NAME;N.top===1&&(D+=" "+za.SELECTION_TOP_RIGHT),N.bottom===1&&(D+=" "+za.SELECTION_BOTTOM_RIGHT),p+=this._createSelectionPiece(f,m,D,w.left-za.ROUNDED_PIECE_WIDTH,za.ROUNDED_PIECE_WIDTH)}if(E.top===1||E.bottom===1){p+=this._createSelectionPiece(f,m,za.SELECTION_CLASS_NAME,w.left+w.width,za.ROUNDED_PIECE_WIDTH);let D=za.EDITOR_BACKGROUND_CLASS_NAME;E.top===1&&(D+=" "+za.SELECTION_TOP_LEFT),E.bottom===1&&(D+=" "+za.SELECTION_BOTTOM_LEFT),p+=this._createSelectionPiece(f,m,D,w.left+w.width,za.ROUNDED_PIECE_WIDTH)}}let C=za.SELECTION_CLASS_NAME;if(o){const N=w.startStyle,E=w.endStyle;N.top===0&&(C+=" "+za.SELECTION_TOP_LEFT),N.bottom===0&&(C+=" "+za.SELECTION_BOTTOM_LEFT),E.top===0&&(C+=" "+za.SELECTION_TOP_RIGHT),E.bottom===0&&(C+=" "+za.SELECTION_BOTTOM_RIGHT)}g+=this._createSelectionPiece(f,m,C,w.left,w.width)}e[h][0]+=p,e[h][1]+=g}}prepareRender(e){const n=[],i=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber;for(let s=i;s<=r;s++){const a=s-i;n[a]=["",""]}const o=[];for(let s=0,a=this._selections.length;s<a;s++){const l=this._selections[s];if(l.isEmpty()){o[s]=null;continue}const c=this._getVisibleRangesWithStyle(l,e,this._previousFrameVisibleRangesWithStyle[s]);o[s]=c,this._actualRenderOneSelection(n,i,this._selections.length>1,c)}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=n.map(([s,a])=>s+a)}render(e,n){if(!this._renderResult)return"";const i=n-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}};za.SELECTION_CLASS_NAME="selected-text",za.SELECTION_TOP_LEFT="top-left-radius",za.SELECTION_BOTTOM_LEFT="bottom-left-radius",za.SELECTION_TOP_RIGHT="top-right-radius",za.SELECTION_BOTTOM_RIGHT="bottom-right-radius",za.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",za.ROUNDED_PIECE_WIDTH=10;let bTe=za;_b((t,e)=>{const n=t.getColor(cbi);n&&!n.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${n}; }`)});function bQ(t){return t<0?-t:t}class Dat{constructor(e,n,i,r,o,s,a){this.top=e,this.left=n,this.paddingLeft=i,this.width=r,this.height=o,this.textContent=s,this.textContentClassName=a}}var cC;(function(t){t[t.Single=0]="Single",t[t.MultiPrimary=1]="MultiPrimary",t[t.MultiSecondary=2]="MultiSecondary"})(cC||(cC={}));class kat{constructor(e,n){this._context=e;const i=this._context.configuration.options,r=i.get(50);this._cursorStyle=i.get(28),this._lineHeight=i.get(67),this._typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=wo(document.createElement("div")),this._domNode.setClassName(`cursor ${S3}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),su(this._domNode,r),this._domNode.setDisplay("none"),this._position=new ot(1,1),this._pluralityClass="",this.setPlurality(n),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(e){switch(e){default:case cC.Single:this._pluralityClass="";break;case cC.MultiPrimary:this._pluralityClass="cursor-primary";break;case cC.MultiSecondary:this._pluralityClass="cursor-secondary";break}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const n=this._context.configuration.options,i=n.get(50);return this._cursorStyle=n.get(28),this._lineHeight=n.get(67),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(n.get(31),this._typicalHalfwidthCharacterWidth),su(this._domNode,i),!0}onCursorPositionChanged(e,n){return n?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:n}=this._position,i=this._context.viewModel.getLineContent(e),[r,o]=Qdi(i,n-1);return[new ot(e,r+1),i.substring(r,o)]}_prepareRender(e){let n="",i="";const[r,o]=this._getGraphemeAwarePosition();if(this._cursorStyle===Qc.Line||this._cursorStyle===Qc.LineThin){const h=e.visibleRangeForPosition(r);if(!h||h.outsideRenderedLine)return null;const f=ei(this._domNode.domNode);let m;this._cursorStyle===Qc.Line?(m=Xot(f,this._lineCursorWidth>0?this._lineCursorWidth:2),m>2&&(n=o,i=this._getTokenClassName(r))):m=Xot(f,1);let p=h.left,g=0;m>=2&&p>=1&&(g=1,p-=g);const y=e.getVerticalOffsetForLineNumber(r.lineNumber)-e.bigNumbersDelta;return new Dat(y,p,g,m,this._lineHeight,n,i)}const s=e.linesVisibleRangesForRange(new ve(r.lineNumber,r.column,r.lineNumber,r.column+o.length),!1);if(!s||s.length===0)return null;const a=s[0];if(a.outsideRenderedLine||a.ranges.length===0)return null;const l=a.ranges[0],c=o==="	"?this._typicalHalfwidthCharacterWidth:l.width<1?this._typicalHalfwidthCharacterWidth:l.width;this._cursorStyle===Qc.Block&&(n=o,i=this._getTokenClassName(r));let u=e.getVerticalOffsetForLineNumber(r.lineNumber)-e.bigNumbersDelta,d=this._lineHeight;return(this._cursorStyle===Qc.Underline||this._cursorStyle===Qc.UnderlineThin)&&(u+=this._lineHeight-2,d=2),new Dat(u,l.left,0,c,d,n,i)}_getTokenClassName(e){const n=this._context.viewModel.getViewLineData(e.lineNumber),i=n.tokens.findTokenIndexAtOffset(e.column-1);return n.tokens.getClassName(i)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${S3} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}const JB=class JB extends zm{constructor(e){super(e);const n=this._context.configuration.options;this._readOnly=n.get(92),this._cursorBlinking=n.get(26),this._cursorStyle=n.get(28),this._cursorSmoothCaretAnimation=n.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new kat(this._context,cC.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=wo(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new Gv,this._cursorFlatBlinkInterval=new T8e,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const n=this._context.configuration.options;this._readOnly=n.get(92),this._cursorBlinking=n.get(26),this._cursorStyle=n.get(28),this._cursorSmoothCaretAnimation=n.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let i=0,r=this._secondaryCursors.length;i<r;i++)this._secondaryCursors[i].onConfigurationChanged(e);return!0}_onCursorPositionChanged(e,n,i){const r=this._secondaryCursors.length!==n.length||this._cursorSmoothCaretAnimation==="explicit"&&i!==3;if(this._primaryCursor.setPlurality(n.length?cC.MultiPrimary:cC.Single),this._primaryCursor.onCursorPositionChanged(e,r),this._updateBlinking(),this._secondaryCursors.length<n.length){const o=n.length-this._secondaryCursors.length;for(let s=0;s<o;s++){const a=new kat(this._context,cC.MultiSecondary);this._domNode.domNode.insertBefore(a.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(a)}}else if(this._secondaryCursors.length>n.length){const o=this._secondaryCursors.length-n.length;for(let s=0;s<o;s++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let o=0;o<n.length;o++)this._secondaryCursors[o].onCursorPositionChanged(n[o],r)}onCursorStateChanged(e){const n=[];for(let r=0,o=e.selections.length;r<o;r++)n[r]=e.selections[r].getPosition();this._onCursorPositionChanged(n[0],n.slice(1),e.reason);const i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,this._updateDomClassName()),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onFocusChanged(e){return this._editorHasFocus=e.isFocused,this._updateBlinking(),!1}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onTokensChanged(e){const n=i=>{for(let r=0,o=e.ranges.length;r<o;r++)if(e.ranges[r].fromLineNumber<=i.lineNumber&&i.lineNumber<=e.ranges[r].toLineNumber)return!0;return!1};if(n(this._primaryCursor.getPosition()))return!0;for(const i of this._secondaryCursors)if(n(i.getPosition()))return!0;return!1}onZonesChanged(e){return!0}_getCursorBlinking(){return this._isComposingInput||!this._editorHasFocus?0:this._readOnly?5:this._cursorBlinking}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const e=this._getCursorBlinking(),n=e===0,i=e===5;n?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!n&&!i&&(e===1?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},JB.BLINK_INTERVAL,ei(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},JB.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case Qc.Line:e+=" cursor-line-style";break;case Qc.Block:e+=" cursor-block-style";break;case Qc.Underline:e+=" cursor-underline-style";break;case Qc.LineThin:e+=" cursor-line-thin-style";break;case Qc.BlockOutline:e+=" cursor-block-outline-style";break;case Qc.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,n=this._secondaryCursors.length;e<n;e++)this._secondaryCursors[e].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let e=0,n=this._secondaryCursors.length;e<n;e++)this._secondaryCursors[e].hide();this._isVisible=!1}prepareRender(e){this._primaryCursor.prepareRender(e);for(let n=0,i=this._secondaryCursors.length;n<i;n++)this._secondaryCursors[n].prepareRender(e)}render(e){const n=[];let i=0;const r=this._primaryCursor.render(e);r&&(n[i++]=r);for(let o=0,s=this._secondaryCursors.length;o<s;o++){const a=this._secondaryCursors[o].render(e);a&&(n[i++]=a)}this._renderData=n}getLastRenderData(){return this._renderData}};JB.BLINK_INTERVAL=500;let vTe=JB;_b((t,e)=>{const n=[{class:".cursor",foreground:ome,background:gVe},{class:".cursor-primary",foreground:njt,background:Nyi},{class:".cursor-secondary",foreground:ijt,background:Eyi}];for(const i of n){const r=t.getColor(i.foreground);if(r){let o=t.getColor(i.background);o||(o=r.opposite()),e.addRule(`.monaco-editor .cursors-layer ${i.class} { background-color: ${r}; border-color: ${r}; color: ${o}; }`),S0(t.type)&&e.addRule(`.monaco-editor .cursors-layer.has-selection ${i.class} { border-left: 1px solid ${o}; border-right: 1px solid ${o}; }`)}}});const i1e=()=>{throw new Error("Invalid change accessor")};class k_i extends zm{constructor(e){super(e);const n=this._context.configuration.options,i=n.get(146);this._lineHeight=n.get(67),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=wo(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=wo(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),n=new Map;for(const r of e)n.set(r.id,r);let i=!1;return this._context.viewModel.changeWhitespace(r=>{const o=Object.keys(this._zones);for(let s=0,a=o.length;s<a;s++){const l=o[s],c=this._zones[l],u=this._computeWhitespaceProps(c.delegate);c.isInHiddenArea=u.isInHiddenArea;const d=n.get(l);d&&(d.afterLineNumber!==u.afterViewLineNumber||d.height!==u.heightInPx)&&(r.changeOneWhitespace(l,u.afterViewLineNumber,u.heightInPx),this._safeCallOnComputedHeight(c.delegate,u.heightInPx),i=!0)}}),i}onConfigurationChanged(e){const n=this._context.configuration.options,i=n.get(146);return this._lineHeight=n.get(67),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,e.hasChanged(67)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(e){return this._recomputeWhitespacesProps()}onLinesDeleted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}onLinesInserted(e){return!0}_getZoneOrdinal(e){return e.ordinal??e.afterColumn??1e4}_computeWhitespaceProps(e){if(e.afterLineNumber===0)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(e),minWidthInPx:this._minWidthInPixels(e)};let n;if(typeof e.afterColumn<"u")n=this._context.viewModel.model.validatePosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{const s=this._context.viewModel.model.validatePosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;n=new ot(s,this._context.viewModel.model.getLineMaxColumn(s))}let i;n.column===this._context.viewModel.model.getLineMaxColumn(n.lineNumber)?i=this._context.viewModel.model.validatePosition({lineNumber:n.lineNumber+1,column:1}):i=this._context.viewModel.model.validatePosition({lineNumber:n.lineNumber,column:n.column+1});const r=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n,e.afterColumnAffinity,!0),o=e.showInHiddenAreas||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(i);return{isInHiddenArea:!o,afterViewLineNumber:r.lineNumber,heightInPx:o?this._heightInPixels(e):0,minWidthInPx:this._minWidthInPixels(e)}}changeViewZones(e){let n=!1;return this._context.viewModel.changeWhitespace(i=>{const r={addZone:o=>(n=!0,this._addZone(i,o)),removeZone:o=>{o&&(n=this._removeZone(i,o)||n)},layoutZone:o=>{o&&(n=this._layoutZone(i,o)||n)}};M_i(e,r),r.addZone=i1e,r.removeZone=i1e,r.layoutZone=i1e}),n}_addZone(e,n){const i=this._computeWhitespaceProps(n),o={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(n),i.heightInPx,i.minWidthInPx),delegate:n,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:wo(n.domNode),marginDomNode:n.marginDomNode?wo(n.marginDomNode):null};return this._safeCallOnComputedHeight(o.delegate,i.heightInPx),o.domNode.setPosition("absolute"),o.domNode.domNode.style.width="100%",o.domNode.setDisplay("none"),o.domNode.setAttribute("monaco-view-zone",o.whitespaceId),this.domNode.appendChild(o.domNode),o.marginDomNode&&(o.marginDomNode.setPosition("absolute"),o.marginDomNode.domNode.style.width="100%",o.marginDomNode.setDisplay("none"),o.marginDomNode.setAttribute("monaco-view-zone",o.whitespaceId),this.marginDomNode.appendChild(o.marginDomNode)),this._zones[o.whitespaceId]=o,this.setShouldRender(),o.whitespaceId}_removeZone(e,n){if(this._zones.hasOwnProperty(n)){const i=this._zones[n];return delete this._zones[n],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.remove(),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.remove()),this.setShouldRender(),!0}return!1}_layoutZone(e,n){if(this._zones.hasOwnProperty(n)){const i=this._zones[n],r=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=r.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,r.afterViewLineNumber,r.heightInPx),this._safeCallOnComputedHeight(i.delegate,r.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){return this._zones.hasOwnProperty(e)?!!this._zones[e].delegate.suppressMouseDown:!1}_heightInPixels(e){return typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,n){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(n)}catch(i){ji(i)}}_safeCallOnDomNodeTop(e,n){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(n)}catch(i){ji(i)}}prepareRender(e){}render(e){const n=e.viewportData.whitespaceViewportData,i={};let r=!1;for(const s of n)this._zones[s.id].isInHiddenArea||(i[s.id]=s,r=!0);const o=Object.keys(this._zones);for(let s=0,a=o.length;s<a;s++){const l=o[s],c=this._zones[l];let u=0,d=0,h="none";i.hasOwnProperty(l)?(u=i[l].verticalOffset-e.bigNumbersDelta,d=i[l].height,h="block",c.isVisible||(c.domNode.setAttribute("monaco-visible-view-zone","true"),c.isVisible=!0),this._safeCallOnDomNodeTop(c.delegate,e.getScrolledTopFromAbsoluteTop(i[l].verticalOffset))):(c.isVisible&&(c.domNode.removeAttribute("monaco-visible-view-zone"),c.isVisible=!1),this._safeCallOnDomNodeTop(c.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),c.domNode.setTop(u),c.domNode.setHeight(d),c.domNode.setDisplay(h),c.marginDomNode&&(c.marginDomNode.setTop(u),c.marginDomNode.setHeight(d),c.marginDomNode.setDisplay(h))}r&&(this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}function M_i(t,e){try{return t(e)}catch(n){ji(n)}}class L_i extends eR{constructor(e){super(),this._context=e,this._options=new Mat(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const n=new Mat(this._context.configuration);return this._options.equals(n)?e.hasChanged(146):(this._options=n,!0)}onCursorStateChanged(e){return this._selection=e.selections,this._options.renderWhitespace==="selection"}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}prepareRender(e){if(this._options.renderWhitespace==="none"){this._renderResult=null;return}const n=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber-n+1,o=new Array(r);for(let a=0;a<r;a++)o[a]=!0;const s=this._context.viewModel.getMinimapLinesRenderingData(e.viewportData.startLineNumber,e.viewportData.endLineNumber,o);this._renderResult=[];for(let a=e.viewportData.startLineNumber;a<=e.viewportData.endLineNumber;a++){const l=a-e.viewportData.startLineNumber,c=s.data[l];let u=null;if(this._options.renderWhitespace==="selection"){const d=this._selection;for(const h of d){if(h.endLineNumber<a||h.startLineNumber>a)continue;const f=h.startLineNumber===a?h.startColumn:c.minColumn,m=h.endLineNumber===a?h.endColumn:c.maxColumn;f<m&&(u||(u=[]),u.push(new x3t(f-1,m-1)))}}this._renderResult[l]=this._applyRenderWhitespace(e,a,u,c)}}_applyRenderWhitespace(e,n,i,r){if(this._options.renderWhitespace==="selection"&&!i||this._options.renderWhitespace==="trailing"&&r.continuesWithWrappedLine)return"";const o=this._context.theme.getColor(bVe),s=this._options.renderWithSVG,a=r.content,l=this._options.stopRenderingLineAfter===-1?a.length:Math.min(this._options.stopRenderingLineAfter,a.length),c=r.continuesWithWrappedLine,u=r.minColumn-1,d=this._options.renderWhitespace==="boundary",h=this._options.renderWhitespace==="trailing",f=this._options.lineHeight,m=this._options.middotWidth,p=this._options.wsmiddotWidth,g=this._options.spaceWidth,y=Math.abs(p-g),_=Math.abs(m-g),w=y<_?11825:183,C=this._options.canUseHalfwidthRightwardsArrow;let N="",E=!1,D=qd(a),k;D===-1?(E=!0,D=l,k=l):k=w0(a);let M=0,T=i&&i[M],A=0;for(let R=u;R<l;R++){const P=a.charCodeAt(R);if(T&&R>=T.endOffset&&(M++,T=i&&i[M]),P!==9&&P!==32||h&&!E&&R<=k)continue;if(d&&R>=D&&R<=k&&P===32){const V=R-1>=0?a.charCodeAt(R-1):0,F=R+1<l?a.charCodeAt(R+1):0;if(V!==32&&F!==32)continue}if(d&&c&&R===l-1){const V=R-1>=0?a.charCodeAt(R-1):0;if(P===32&&V!==32&&V!==9)continue}if(i&&(!T||T.startOffset>R||T.endOffset<=R))continue;const O=e.visibleRangeForPosition(new ot(n,R+1));O&&(s?(A=Math.max(A,O.left),P===9?N+=this._renderArrow(f,g,O.left):N+=`<circle cx="${(O.left+g/2).toFixed(2)}" cy="${(f/2).toFixed(2)}" r="${(g/7).toFixed(2)}" />`):P===9?N+=`<div class="mwh" style="left:${O.left}px;height:${f}px;">${C?"￫":"→"}</div>`:N+=`<div class="mwh" style="left:${O.left}px;height:${f}px;">${String.fromCharCode(w)}</div>`)}return s?(A=Math.round(A+g),`<svg style="bottom:0;position:absolute;width:${A}px;height:${f}px" viewBox="0 0 ${A} ${f}" xmlns="http://www.w3.org/2000/svg" fill="${o}">`+N+"</svg>"):N}_renderArrow(e,n,i){const r=n/7,o=n,s=e/2,a=i,l={x:0,y:r/2},c={x:100/125*o,y:l.y},u={x:c.x-.2*c.x,y:c.y+.2*c.x},d={x:u.x+.1*c.x,y:u.y+.1*c.x},h={x:d.x+.35*c.x,y:d.y-.35*c.x},f={x:h.x,y:-h.y},m={x:d.x,y:-d.y},p={x:u.x,y:-u.y},g={x:c.x,y:-c.y},y={x:l.x,y:-l.y};return`<path d="M ${[l,c,u,d,h,f,m,p,g,y].map(C=>`${(a+C.x).toFixed(2)} ${(s+C.y).toFixed(2)}`).join(" L ")}" />`}render(e,n){if(!this._renderResult)return"";const i=n-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class Mat{constructor(e){const n=e.options,i=n.get(50),r=n.get(38);r==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):r==="svg"?(this.renderWhitespace=n.get(100),this.renderWithSVG=!0):(this.renderWhitespace=n.get(100),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(67),this.stopRenderingLineAfter=n.get(118)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}class T_i{constructor(e,n,i,r){this.selections=e,this.startLineNumber=n.startLineNumber|0,this.endLineNumber=n.endLineNumber|0,this.relativeVerticalOffset=n.relativeVerticalOffset,this.bigNumbersDelta=n.bigNumbersDelta|0,this.lineHeight=n.lineHeight|0,this.whitespaceViewportData=i,this._model=r,this.visibleRange=new ve(n.startLineNumber,this._model.getLineMinColumn(n.startLineNumber),n.endLineNumber,this._model.getLineMaxColumn(n.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class I_i{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class A_i{constructor(e,n,i){this.configuration=e,this.theme=new I_i(n),this.viewModel=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}var R_i=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},P_i=function(t,e){return function(n,i){e(n,i,t)}};let yTe=class extends Nq{constructor(e,n,i,r,o,s,a){super(),this._instantiationService=a,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new Pn(1,1,1,1)],this._renderAnimationFrame=null,this._overflowWidgetsDomNode=s??null;const l=new z0i(n,r,o,e);this._context=new A_i(n,i,r),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(dTe,this._context,l,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=wo(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=wo(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=wo(document.createElement("div")),Y0.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new Q0i(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new gTe(this._context,this._linesContent),this._viewZones=new k_i(this._context),this._viewParts.push(this._viewZones);const c=new y_i(this._context);this._viewParts.push(c);const u=new C_i(this._context);this._viewParts.push(u);const d=new W0i(this._context);this._viewParts.push(d),d.addDynamicOverlay(new Y0i(this._context)),d.addDynamicOverlay(new bTe(this._context)),d.addDynamicOverlay(new s_i(this._context)),d.addDynamicOverlay(new Z0i(this._context)),d.addDynamicOverlay(new L_i(this._context));const h=new U0i(this._context);this._viewParts.push(h),h.addDynamicOverlay(new X0i(this._context)),h.addDynamicOverlay(new d_i(this._context)),h.addDynamicOverlay(new u_i(this._context)),h.addDynamicOverlay(new pre(this._context)),this._glyphMarginWidgets=new t_i(this._context),this._viewParts.push(this._glyphMarginWidgets);const f=new gre(this._context);f.getDomNode().appendChild(this._viewZones.marginDomNode),f.getDomNode().appendChild(h.getDomNode()),f.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(f),this._contentWidgets=new q0i(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new vTe(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new b_i(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);const m=new w_i(this._context);this._viewParts.push(m);const p=new K0i(this._context);this._viewParts.push(p);const g=new g_i(this._context);if(this._viewParts.push(g),c){const y=this._scrollbar.getOverviewRulerLayoutInfo();y.parent.insertBefore(c.getDomNode(),y.insertBefore)}this._linesContent.appendChild(d.getDomNode()),this._linesContent.appendChild(m.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(f.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(u.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(g.getDomNode()),this._overflowGuardContainer.appendChild(p.domNode),this.domNode.appendChild(this._overflowGuardContainer),s?(s.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),s.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new wyi(this._context,l,this._createPointerHandlerHelper()))}_computeGlyphMarginLanes(){const e=this._context.viewModel.model,n=this._context.viewModel.glyphLanes;let i=[],r=0;i=i.concat(e.getAllMarginDecorations().map(o=>{var a,l;const s=((a=o.options.glyphMargin)==null?void 0:a.position)??Iv.Center;return r=Math.max(r,o.range.endLineNumber),{range:o.range,lane:s,persist:(l=o.options.glyphMargin)==null?void 0:l.persistLane}})),i=i.concat(this._glyphMarginWidgets.getWidgets().map(o=>{const s=e.validateRange(o.preference.range);return r=Math.max(r,s.endLineNumber),{range:s,lane:o.preference.lane}})),i.sort((o,s)=>ve.compareRangesUsingStarts(o.range,s.range)),n.reset(r);for(const o of i)n.push(o.lane,o.range,o.persist);return n}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,overflowWidgetsDomNode:this._overflowWidgetsDomNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],n=this._textAreaHandler.getLastRenderData();return new Qvi(e,n)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,n)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,n)),visibleRangeForPosition:(e,n)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new ot(e,n))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const n=this._context.configuration.options.get(146);this.domNode.setWidth(n.width),this.domNode.setHeight(n.height),this._overflowGuardContainer.setWidth(n.width),this._overflowGuardContainer.setHeight(n.height),this._linesContent.setWidth(16777216),this._linesContent.setHeight(16777216)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(143)+" "+uTe(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new co;if(this._renderAnimationFrame===null){const e=this._createCoordinatedRendering();this._renderAnimationFrame=_Te.INSTANCE.scheduleCoordinatedRendering({window:ei(this.domNode.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new co;try{return e.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new co;return e.renderText()},prepareRender:(n,i)=>{if(this._store.isDisposed)throw new co;return e.prepareRender(n,i)},render:(n,i)=>{if(this._store.isDisposed)throw new co;return e.render(n,i)}})}}_flushAccumulatedAndRenderNow(){const e=this._createCoordinatedRendering();UE(()=>e.prepareRenderText());const n=UE(()=>e.renderText());if(n){const[i,r]=n;UE(()=>e.prepareRender(i,r)),UE(()=>e.render(i,r))}}_getViewPartsToRender(){const e=[];let n=0;for(const i of this._viewParts)i.shouldRender()&&(e[n++]=i);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=!1;const e=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(e.requiredLanes)}zE.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return null;const n=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(n.startLineNumber,n.endLineNumber,n.centeredLineNumber);const i=new T_i(this._selections,n,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender()),[e,new Uvi(this._context.viewLayout,i,this._viewLines)]},prepareRender:(e,n)=>{for(const i of e)i.prepareRender(n)},render:(e,n)=>{for(const i of e)i.render(n),i.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,n){const i=this._context.viewModel.model.validatePosition({lineNumber:e,column:n}),r=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const o=this._viewLines.visibleRangeForPosition(new ot(r.lineNumber,r.column));return o?o.left:-1}getTargetAtClientPoint(e,n){const i=this._pointerHandler.getTargetAtClientPoint(e,n);return i?cme.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new x_i(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,n){if(n){this._viewLines.forceShouldRender();for(const i of this._viewParts)i.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var n,i,r,o;this._contentWidgets.setWidgetPosition(e.widget,((n=e.position)==null?void 0:n.position)??null,((i=e.position)==null?void 0:i.secondaryPosition)??null,((r=e.position)==null?void 0:r.preference)??null,((o=e.position)==null?void 0:o.positionAffinity)??null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){this._overlayWidgets.setWidgetPosition(e.widget,e.position)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){const n=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,n)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};yTe=R_i([P_i(6,qn)],yTe);function UE(t){try{return t()}catch(e){return ji(e),null}}const Xle=class Xle{constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{const n=this._coordinatedRenderings.indexOf(e);if(n!==-1&&(this._coordinatedRenderings.splice(n,1),this._coordinatedRenderings.length===0)){for(const[i,r]of this._animationFrameRunners)r.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){const n=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,Wie(e,n,100))}}_onRenderScheduled(){const e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(const i of e)UE(()=>i.prepareRenderText());const n=[];for(let i=0,r=e.length;i<r;i++){const o=e[i];n[i]=UE(()=>o.renderText())}for(let i=0,r=e.length;i<r;i++){const o=e[i],s=n[i];if(!s)continue;const[a,l]=s;UE(()=>o.prepareRender(a,l))}for(let i=0,r=e.length;i<r;i++){const o=e[i],s=n[i];if(!s)continue;const[a,l]=s;UE(()=>o.render(a,l))}}};Xle.INSTANCE=new Xle;let _Te=Xle;class J9{constructor(e,n,i,r,o){this.injectionOffsets=e,this.injectionOptions=n,this.breakOffsets=i,this.breakOffsetsVisibleColumn=r,this.wrappedTextIndentLength=o}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){const n=e>0?this.breakOffsets[e-1]:0;let r=this.breakOffsets[e]-n;return e>0&&(r+=this.wrappedTextIndentLength),r}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,n){e>0&&(n=Math.max(0,n-this.wrappedTextIndentLength));let r=e===0?n:this.breakOffsets[e-1]+n;if(this.injectionOffsets!==null)for(let o=0;o<this.injectionOffsets.length&&r>this.injectionOffsets[o];o++)r<this.injectionOffsets[o]+this.injectionOptions[o].content.length?r=this.injectionOffsets[o]:r-=this.injectionOptions[o].content.length;return r}translateToOutputPosition(e,n=2){let i=e;if(this.injectionOffsets!==null)for(let r=0;r<this.injectionOffsets.length&&!(e<this.injectionOffsets[r]||n!==1&&e===this.injectionOffsets[r]);r++)i+=this.injectionOptions[r].content.length;return this.offsetInInputWithInjectionsToOutputPosition(i,n)}offsetInInputWithInjectionsToOutputPosition(e,n=2){let i=0,r=this.breakOffsets.length-1,o=0,s=0;for(;i<=r;){o=i+(r-i)/2|0;const l=this.breakOffsets[o];if(s=o>0?this.breakOffsets[o-1]:0,n===0)if(e<=s)r=o-1;else if(e>l)i=o+1;else break;else if(e<s)r=o-1;else if(e>=l)i=o+1;else break}let a=e-s;return o>0&&(a+=this.wrappedTextIndentLength),new vQ(o,a)}normalizeOutputPosition(e,n,i){if(this.injectionOffsets!==null){const r=this.outputPositionToOffsetInInputWithInjections(e,n),o=this.normalizeOffsetInInputWithInjectionsAroundInjections(r,i);if(o!==r)return this.offsetInInputWithInjectionsToOutputPosition(o,i)}if(i===0){if(e>0&&n===this.getMinOutputOffset(e))return new vQ(e-1,this.getMaxOutputOffset(e-1))}else if(i===1){const r=this.getOutputLineCount()-1;if(e<r&&n===this.getMaxOutputOffset(e))return new vQ(e+1,this.getMinOutputOffset(e+1))}return new vQ(e,n)}outputPositionToOffsetInInputWithInjections(e,n){return e>0&&(n=Math.max(0,n-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+n}normalizeOffsetInInputWithInjectionsAroundInjections(e,n){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(n===2){if(e===i.offsetInInputWithInjections+i.length&&Lat(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let r=i.offsetInInputWithInjections;if(Tat(this.injectionOptions[i.injectedTextIndex].cursorStops))return r;let o=i.injectedTextIndex-1;for(;o>=0&&this.injectionOffsets[o]===this.injectionOffsets[i.injectedTextIndex]&&!(Lat(this.injectionOptions[o].cursorStops)||(r-=this.injectionOptions[o].content.length,Tat(this.injectionOptions[o].cursorStops)));)o--;return r}}else if(n===1||n===4){let r=i.offsetInInputWithInjections+i.length,o=i.injectedTextIndex;for(;o+1<this.injectionOffsets.length&&this.injectionOffsets[o+1]===this.injectionOffsets[o];)r+=this.injectionOptions[o+1].content.length,o++;return r}else if(n===0||n===3){let r=i.offsetInInputWithInjections,o=i.injectedTextIndex;for(;o-1>=0&&this.injectionOffsets[o-1]===this.injectionOffsets[o];)r-=this.injectionOptions[o-1].content.length,o--;return r}Hfe()}getInjectedText(e,n){const i=this.outputPositionToOffsetInInputWithInjections(e,n),r=this.getInjectedTextAtOffset(i);return r?{options:this.injectionOptions[r.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const n=this.injectionOffsets,i=this.injectionOptions;if(n!==null){let r=0;for(let o=0;o<n.length;o++){const s=i[o].content.length,a=n[o]+r,l=n[o]+r+s;if(a>e)break;if(e<=l)return{injectedTextIndex:o,offsetInInputWithInjections:a,length:s};r+=s}}}}function Lat(t){return t==null?!0:t===dv.Right||t===dv.Both}function Tat(t){return t==null?!0:t===dv.Left||t===dv.Both}class vQ{constructor(e,n){this.outputLineIndex=e,this.outputOffset=n}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new ot(e+this.outputLineIndex,this.outputOffset+1)}}class O_i{constructor(){this.changeType=1}}class X0{static applyInjectedText(e,n){if(!n||n.length===0)return e;let i="",r=0;for(const o of n)i+=e.substring(r,o.column-1),r=o.column-1,i+=o.options.content;return i+=e.substring(r),i}static fromDecorations(e){const n=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&n.push(new X0(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&n.push(new X0(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return n.sort((i,r)=>i.lineNumber===r.lineNumber?i.column===r.column?i.order-r.order:i.column-r.column:i.lineNumber-r.lineNumber),n}constructor(e,n,i,r,o){this.ownerId=e,this.lineNumber=n,this.column=i,this.options=r,this.order=o}}class Iat{constructor(e,n,i){this.changeType=2,this.lineNumber=e,this.detail=n,this.injectedText=i}}class j_i{constructor(e,n){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=n}}class F_i{constructor(e,n,i,r){this.changeType=4,this.injectedTexts=r,this.fromLineNumber=e,this.toLineNumber=n,this.detail=i}}class $_i{constructor(){this.changeType=5}}class k3{constructor(e,n,i,r){this.changes=e,this.versionId=n,this.isUndoing=i,this.isRedoing=r,this.resultingSelection=null}containsEvent(e){for(let n=0,i=this.changes.length;n<i;n++)if(this.changes[n].changeType===e)return!0;return!1}static merge(e,n){const i=[].concat(e.changes).concat(n.changes),r=n.versionId,o=e.isUndoing||n.isUndoing,s=e.isRedoing||n.isRedoing;return new k3(i,r,o,s)}}class Njt{constructor(e){this.changes=e}}class dI{constructor(e,n){this.rawContentChangedEvent=e,this.contentChangedEvent=n}merge(e){const n=k3.merge(this.rawContentChangedEvent,e.rawContentChangedEvent),i=dI._mergeChangeEvents(this.contentChangedEvent,e.contentChangedEvent);return new dI(n,i)}static _mergeChangeEvents(e,n){const i=[].concat(e.changes).concat(n.changes),r=n.eol,o=n.versionId,s=e.isUndoing||n.isUndoing,a=e.isRedoing||n.isRedoing,l=e.isFlush||n.isFlush,c=e.isEolChange&&n.isEolChange;return{changes:i,eol:r,isEolChange:c,versionId:o,isUndoing:s,isRedoing:a,isFlush:l}}}const r1e=WS("domLineBreaksComputer",{createHTML:t=>t});class DVe{static create(e){return new DVe(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,n,i,r,o){const s=[],a=[];return{addRequest:(l,c,u)=>{s.push(l),a.push(c)},finalize:()=>V_i(VE(this.targetWindow.deref()),s,e,n,i,r,o,a)}}}function V_i(t,e,n,i,r,o,s,a){function l(M){const T=a[M];if(T){const A=X0.applyInjectedText(e[M],T),R=T.map(O=>O.options),P=T.map(O=>O.column-1);return new J9(P,R,[A.length],[],0)}else return null}if(r===-1){const M=[];for(let T=0,A=e.length;T<A;T++)M[T]=l(T);return M}const c=Math.round(r*n.typicalHalfwidthCharacterWidth),d=Math.round(i*(o===3?2:o===2?1:0)),h=Math.ceil(n.spaceWidth*d),f=document.createElement("div");su(f,n);const m=new I6(1e4),p=[],g=[],y=[],_=[],w=[];for(let M=0;M<e.length;M++){const T=X0.applyInjectedText(e[M],a[M]);let A=0,R=0,P=c;if(o!==0)if(A=qd(T),A===-1)A=0;else{for(let $=0;$<A;$++){const B=T.charCodeAt($)===9?i-R%i:1;R+=B}const F=Math.ceil(n.spaceWidth*R);F+n.typicalFullwidthCharacterWidth>c?(A=0,R=0):P=c-F}const O=T.substr(A),V=B_i(O,R,i,P,m,h);p[M]=A,g[M]=R,y[M]=O,_[M]=V[0],w[M]=V[1]}const C=m.build(),N=(r1e==null?void 0:r1e.createHTML(C))??C;f.innerHTML=N,f.style.position="absolute",f.style.top="10000",s==="keepAll"?(f.style.wordBreak="keep-all",f.style.overflowWrap="anywhere"):(f.style.wordBreak="inherit",f.style.overflowWrap="break-word"),t.document.body.appendChild(f);const E=document.createRange(),D=Array.prototype.slice.call(f.children,0),k=[];for(let M=0;M<e.length;M++){const T=D[M],A=z_i(E,T,y[M],_[M]);if(A===null){k[M]=l(M);continue}const R=p[M],P=g[M]+d,O=w[M],V=[];for(let z=0,H=A.length;z<H;z++)V[z]=O[A[z]];if(R!==0)for(let z=0,H=A.length;z<H;z++)A[z]+=R;let F,$;const B=a[M];B?(F=B.map(z=>z.options),$=B.map(z=>z.column-1)):(F=null,$=null),k[M]=new J9($,F,A,V,P)}return f.remove(),k}function B_i(t,e,n,i,r,o){if(o!==0){const h=String(o);r.appendString('<div style="text-indent: -'),r.appendString(h),r.appendString("px; padding-left: "),r.appendString(h),r.appendString("px; box-sizing: border-box; width:")}else r.appendString('<div style="width:');r.appendString(String(i)),r.appendString('px;">');const s=t.length;let a=e,l=0;const c=[],u=[];let d=0<s?t.charCodeAt(0):0;r.appendString("<span>");for(let h=0;h<s;h++){h!==0&&h%16384===0&&r.appendString("</span><span>"),c[h]=l,u[h]=a;const f=d;d=h+1<s?t.charCodeAt(h+1):0;let m=1,p=1;switch(f){case 9:m=n-a%n,p=m;for(let g=1;g<=m;g++)g<m?r.appendCharCode(160):r.appendASCIICharCode(32);break;case 32:d===32?r.appendCharCode(160):r.appendASCIICharCode(32);break;case 60:r.appendString("&lt;");break;case 62:r.appendString("&gt;");break;case 38:r.appendString("&amp;");break;case 0:r.appendString("&#00;");break;case 65279:case 8232:case 8233:case 133:r.appendCharCode(65533);break;default:uk(f)&&p++,f<32?r.appendCharCode(9216+f):r.appendCharCode(f)}l+=m,a+=p}return r.appendString("</span>"),c[t.length]=l,u[t.length]=a,r.appendString("</div>"),[c,u]}function z_i(t,e,n,i){if(n.length<=1)return null;const r=Array.prototype.slice.call(e.children,0),o=[];try{xTe(t,r,i,0,null,n.length-1,null,o)}catch(s){return console.log(s),null}return o.length===0?null:(o.push(n.length),o)}function xTe(t,e,n,i,r,o,s,a){if(i===o||(r=r||o1e(t,e,n[i],n[i+1]),s=s||o1e(t,e,n[o],n[o+1]),Math.abs(r[0].top-s[0].top)<=.1))return;if(i+1===o){a.push(o);return}const l=i+(o-i)/2|0,c=o1e(t,e,n[l],n[l+1]);xTe(t,e,n,i,r,l,c,a),xTe(t,e,n,l,c,o,s,a)}function o1e(t,e,n,i){return t.setStart(e[n/16384|0].firstChild,n%16384),t.setEnd(e[i/16384|0].firstChild,i%16384),t.getClientRects()}class H_i extends ct{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new m8e),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,n,i){this._editor=e,this._instantiationService=i;for(const r of n){if(this._pending.has(r.id)){ji(new Error(`Cannot have two contributions with the same id ${r.id}`));continue}this._pending.set(r.id,r)}this._instantiateSome(0),this._register(q7(ei(this._editor.getDomNode()),()=>{this._instantiateSome(1)})),this._register(q7(ei(this._editor.getDomNode()),()=>{this._instantiateSome(2)})),this._register(q7(ei(this._editor.getDomNode()),()=>{this._instantiateSome(3)},5e3))}saveViewState(){const e={};for(const[n,i]of this._instances)typeof i.saveViewState=="function"&&(e[n]=i.saveViewState());return e}restoreViewState(e){for(const[n,i]of this._instances)typeof i.restoreViewState=="function"&&i.restoreViewState(e[n])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){var e;return q7(ei((e=this._editor)==null?void 0:e.getDomNode()),()=>{this._instantiateSome(1)},50)}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const n=this._findPendingContributionsByInstantiation(e);for(const i of n)this._instantiateById(i.id)}_findPendingContributionsByInstantiation(e){const n=[];for(const[,i]of this._pending)i.instantiation===e&&n.push(i);return n}_instantiateById(e){const n=this._pending.get(e);if(n){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const i=this._instantiationService.createInstance(n.ctor,this._editor);this._instances.set(n.id,i),typeof i.restoreViewState=="function"&&n.instantiation!==0&&console.warn(`Editor contribution '${n.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(i){ji(i)}}}}class Ejt{constructor(e,n,i,r,o,s,a){this.id=e,this.label=n,this.alias=i,this.metadata=r,this._precondition=o,this._run=s,this._contextKeyService=a}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}function gk(t){let e=0,n=0,i=0,r=0;for(let o=0,s=t.length;o<s;o++){const a=t.charCodeAt(o);a===13?(e===0&&(n=o),e++,o+1<s&&t.charCodeAt(o+1)===10?(r|=2,o++):r|=3,i=o+1):a===10&&(r|=1,e===0&&(n=o),e++,i=o+1)}return e===0&&(n=t.length),[e,n,t.length-i,r]}class Aat{constructor(e,n,i,r){this.range=e,this.nestingLevel=n,this.nestingLevelOfEqualBracketType=i,this.isInvalid=r}}class W_i{constructor(e,n,i,r,o,s){this.range=e,this.openingBracketRange=n,this.closingBracketRange=i,this.nestingLevel=r,this.nestingLevelOfEqualBracketType=o,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}class U_i extends W_i{constructor(e,n,i,r,o,s,a){super(e,n,i,r,o,s),this.minVisibleColumnIndentation=a}}function K_i(t,e,n,i){return t!==n?al(n-t,i):al(0,i-e)}const Nh=0;function wre(t){return t===0}const wp=2**26;function al(t,e){return t*wp+e}function eb(t){const e=t,n=Math.floor(e/wp),i=e-n*wp;return new Av(n,i)}function q_i(t){return Math.floor(t/wp)}function Ea(t,e){let n=t+e;return e>=wp&&(n=n-t%wp),n}function G_i(t,e){return t.reduce((n,i)=>Ea(n,e(i)),Nh)}function Djt(t,e){return t===e}function GH(t,e){const n=t,i=e;if(i-n<=0)return Nh;const o=Math.floor(n/wp),s=Math.floor(i/wp),a=i-s*wp;if(o===s){const l=n-o*wp;return al(0,a-l)}else return al(s-o,a)}function M3(t,e){return t<e}function L3(t,e){return t<=e}function X7(t,e){return t>=e}function g4(t){return al(t.lineNumber-1,t.column-1)}function hI(t,e){const n=t,i=Math.floor(n/wp),r=n-i*wp,o=e,s=Math.floor(o/wp),a=o-s*wp;return new ve(i+1,r+1,s+1,a+1)}function Y_i(t){const e=Tw(t);return al(e.length-1,e[e.length-1].length)}class uC{static fromModelContentChanges(e){return e.map(i=>{const r=ve.lift(i.range);return new uC(g4(r.getStartPosition()),g4(r.getEndPosition()),Y_i(i.text))}).reverse()}constructor(e,n,i){this.startOffset=e,this.endOffset=n,this.newLength=i}toString(){return`[${eb(this.startOffset)}...${eb(this.endOffset)}) -> ${eb(this.newLength)}`}}class X_i{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(n=>kVe.from(n))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const n=this.edits[this.nextEditIdx],i=n?this.translateOldToCur(n.offsetObj):null;return i===null?null:GH(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?al(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):al(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const n=eb(e);return n.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?al(n.lineCount-this.deltaOldToNewLineCount,n.columnCount-this.deltaOldToNewColumnCount):al(n.lineCount-this.deltaOldToNewLineCount,n.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx<this.edits.length;){const n=this.edits[this.nextEditIdx],i=this.translateOldToCur(n.endOffsetAfterObj);if(L3(i,e)){this.nextEditIdx++;const r=eb(i),o=eb(this.translateOldToCur(n.endOffsetBeforeObj)),s=r.lineCount-o.lineCount;this.deltaOldToNewLineCount+=s;const a=this.deltaLineIdxInOld===n.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,l=r.columnCount-o.columnCount;this.deltaOldToNewColumnCount=a+l,this.deltaLineIdxInOld=n.endOffsetBeforeObj.lineCount}else break}}}class kVe{static from(e){return new kVe(e.startOffset,e.endOffset,e.newLength)}constructor(e,n,i){this.endOffsetBeforeObj=eb(n),this.endOffsetAfterObj=eb(Ea(e,i)),this.offsetObj=eb(e)}}const yQ=[],Eg=class Eg{static create(e,n){if(e<=128&&n.length===0){let i=Eg.cache[e];return i||(i=new Eg(e,n),Eg.cache[e]=i),i}return new Eg(e,n)}static getEmpty(){return this.empty}constructor(e,n){this.items=e,this.additionalItems=n}add(e,n){const i=n.getKey(e);let r=i>>5;if(r===0){const s=1<<i|this.items;return s===this.items?this:Eg.create(s,this.additionalItems)}r--;const o=this.additionalItems.slice(0);for(;o.length<r;)o.push(0);return o[r]|=1<<(i&31),Eg.create(this.items,o)}merge(e){const n=this.items|e.items;if(this.additionalItems===yQ&&e.additionalItems===yQ)return n===this.items?this:n===e.items?e:Eg.create(n,yQ);const i=[];for(let r=0;r<Math.max(this.additionalItems.length,e.additionalItems.length);r++){const o=this.additionalItems[r]||0,s=e.additionalItems[r]||0;i.push(o|s)}return Eg.create(n,i)}intersects(e){if(this.items&e.items)return!0;for(let n=0;n<Math.min(this.additionalItems.length,e.additionalItems.length);n++)if(this.additionalItems[n]&e.additionalItems[n])return!0;return!1}};Eg.cache=new Array(129),Eg.empty=Eg.create(0,yQ);let dm=Eg;const Rat={getKey(t){return t}};class kjt{constructor(){this.items=new Map}getKey(e){let n=this.items.get(e);return n===void 0&&(n=this.items.size,this.items.set(e,n)),n}}class MVe{get length(){return this._length}constructor(e){this._length=e}}class YH extends MVe{static create(e,n,i){let r=e.length;return n&&(r=Ea(r,n.length)),i&&(r=Ea(r,i.length)),new YH(r,e,n,i,n?n.missingOpeningBracketIds:dm.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,n,i,r,o){super(e),this.openingBracket=n,this.child=i,this.closingBracket=r,this.missingOpeningBracketIds=o}canBeReused(e){return!(this.closingBracket===null||e.intersects(this.missingOpeningBracketIds))}deepClone(){return new YH(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,n){return this.child?this.child.computeMinIndentation(Ea(e,this.openingBracket.length),n):Number.MAX_SAFE_INTEGER}}class pw extends MVe{static create23(e,n,i,r=!1){let o=e.length,s=e.missingOpeningBracketIds;if(e.listHeight!==n.listHeight)throw new Error("Invalid list heights");if(o=Ea(o,n.length),s=s.merge(n.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");o=Ea(o,i.length),s=s.merge(i.missingOpeningBracketIds)}return r?new Z_i(o,e.listHeight+1,e,n,i,s):new XH(o,e.listHeight+1,e,n,i,s)}static getEmpty(){return new Q_i(Nh,0,[],dm.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,n,i){super(e),this.listHeight=n,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(e===0)return;const n=this.getChild(e-1),i=n.kind===4?n.toMutable():n;return n!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;const n=this.getChild(0),i=n.kind===4?n.toMutable():n;return n!==i&&this.setChild(0,i),i}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds)||this.childrenLength===0)return!1;let n=this;for(;n.kind===4;){const i=n.childrenLength;if(i===0)throw new co;n=n.getChild(i-1)}return n.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let n=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let r=1;r<e;r++){const o=this.getChild(r);n=Ea(n,o.length),i=i.merge(o.missingOpeningBracketIds)}this._length=n,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}computeMinIndentation(e,n){if(this.cachedMinIndentation!==-1)return this.cachedMinIndentation;let i=Number.MAX_SAFE_INTEGER,r=e;for(let o=0;o<this.childrenLength;o++){const s=this.getChild(o);s&&(i=Math.min(i,s.computeMinIndentation(r,n)),r=Ea(r,s.length))}return this.cachedMinIndentation=i,i}}class XH extends pw{get childrenLength(){return this._item3!==null?3:2}getChild(e){switch(e){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(e,n){switch(e){case 0:this._item1=n;return;case 1:this._item2=n;return;case 2:this._item3=n;return}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}constructor(e,n,i,r,o,s){super(e,n,s),this._item1=i,this._item2=r,this._item3=o}deepClone(){return new XH(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=e,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item3;return this._item3=null,this.handleChildrenChanged(),e}prependChildOfSameHeight(e){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=e,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),e}toMutable(){return this}}class Z_i extends XH{toMutable(){return new XH(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class Cre extends pw{get childrenLength(){return this._children.length}getChild(e){return this._children[e]}setChild(e,n){this._children[e]=n}get children(){return this._children}constructor(e,n,i,r){super(e,n,r),this._children=i}deepClone(){const e=new Array(this._children.length);for(let n=0;n<this._children.length;n++)e[n]=this._children[n].deepClone();return new Cre(this.length,this.listHeight,e,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){this.throwIfImmutable(),this._children.push(e),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const e=this._children.pop();return this.handleChildrenChanged(),e}prependChildOfSameHeight(e){this.throwIfImmutable(),this._children.unshift(e),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const e=this._children.shift();return this.handleChildrenChanged(),e}toMutable(){return this}}class Q_i extends Cre{toMutable(){return new Cre(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const J_i=[];class LVe extends MVe{get listHeight(){return 0}get childrenLength(){return 0}getChild(e){return null}get children(){return J_i}deepClone(){return this}}class cT extends LVe{get kind(){return 0}get missingOpeningBracketIds(){return dm.getEmpty()}canBeReused(e){return!0}computeMinIndentation(e,n){const i=eb(e),r=(i.columnCount===0?i.lineCount:i.lineCount+1)+1,o=q_i(Ea(e,this.length))+1;let s=Number.MAX_SAFE_INTEGER;for(let a=r;a<=o;a++){const l=n.getLineFirstNonWhitespaceColumn(a),c=n.getLineContent(a);if(l===0)continue;const u=Kl.visibleColumnFromColumn(c,l,n.getOptions().tabSize);s=Math.min(s,u)}return s}}class Sre extends LVe{static create(e,n,i){return new Sre(e,n,i)}get kind(){return 1}get missingOpeningBracketIds(){return dm.getEmpty()}constructor(e,n,i){super(e),this.bracketInfo=n,this.bracketIds=i}get text(){return this.bracketInfo.bracketText}get languageId(){return this.bracketInfo.languageId}canBeReused(e){return!1}computeMinIndentation(e,n){return Number.MAX_SAFE_INTEGER}}class exi extends LVe{get kind(){return 3}constructor(e,n){super(n),this.missingOpeningBracketIds=e}canBeReused(e){return!e.intersects(this.missingOpeningBracketIds)}computeMinIndentation(e,n){return Number.MAX_SAFE_INTEGER}}let EE=class{constructor(e,n,i,r,o){this.length=e,this.kind=n,this.bracketId=i,this.bracketIds=r,this.astNode=o}};class Mjt{constructor(e,n){this.textModel=e,this.bracketTokens=n,this.reader=new txi(this.textModel,this.bracketTokens),this._offset=Nh,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return al(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=Ea(this._offset,e);const n=eb(this._offset);this.reader.setPosition(n.lineCount,n.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=Ea(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class txi{constructor(e,n){this.textModel=e,this.bracketTokens=n,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,n){e===this.lineIdx?(this.lineCharOffset=n,this.line!==null&&(this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=n,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const o=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=o.length,o}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,n=this.lineCharOffset;let i=0;for(;;){const o=this.lineTokens,s=o.getCount();let a=null;if(this.lineTokenOffset<s){const l=o.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<s&&l===o.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const c=mf.getTokenType(l)===0,u=mf.containsBalancedBrackets(l),d=o.getEndOffset(this.lineTokenOffset);if(u&&c&&this.lineCharOffset<d){const h=o.getLanguageId(this.lineTokenOffset),f=this.line.substring(this.lineCharOffset,d),m=this.bracketTokens.getSingleLanguageBracketTokens(h),p=m.regExpGlobal;if(p){p.lastIndex=0;const g=p.exec(f);g&&(a=m.getToken(g[0]),a&&(this.lineCharOffset+=g.index))}}if(i+=d-this.lineCharOffset,a)if(e!==this.lineIdx||n!==this.lineCharOffset){this.peekedToken=a;break}else return this.lineCharOffset+=a.length,a;else this.lineTokenOffset++,this.lineCharOffset=d}else if(this.lineIdx===this.textBufferLineCount-1||(this.lineIdx++,this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,i+=33,i>1e3))break;if(i>1500)break}const r=K_i(e,n,this.lineIdx,this.lineCharOffset);return new EE(r,0,-1,dm.getEmpty(),new cT(r))}}class nxi{constructor(e,n){this.text=e,this._offset=Nh,this.idx=0;const i=n.getRegExpStr(),r=i?new RegExp(i+`|
`,"gi"):null,o=[];let s,a=0,l=0,c=0,u=0;const d=[];for(let m=0;m<60;m++)d.push(new EE(al(0,m),0,-1,dm.getEmpty(),new cT(al(0,m))));const h=[];for(let m=0;m<60;m++)h.push(new EE(al(1,m),0,-1,dm.getEmpty(),new cT(al(1,m))));if(r)for(r.lastIndex=0;(s=r.exec(e))!==null;){const m=s.index,p=s[0];if(p===`
`)a++,l=m+1;else{if(c!==m){let g;if(u===a){const y=m-c;if(y<d.length)g=d[y];else{const _=al(0,y);g=new EE(_,0,-1,dm.getEmpty(),new cT(_))}}else{const y=a-u,_=m-l;if(y===1&&_<h.length)g=h[_];else{const w=al(y,_);g=new EE(w,0,-1,dm.getEmpty(),new cT(w))}}o.push(g)}o.push(n.getToken(p)),c=m+p.length,u=a}}const f=e.length;if(c!==f){const m=u===a?al(0,f-c):al(a-u,f-l);o.push(new EE(m,0,-1,dm.getEmpty(),new cT(m)))}this.length=al(a,f-l),this.tokens=o}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(e){throw new edi}}class TVe{static createFromLanguage(e,n){function i(o){return n.getKey(`${o.languageId}:::${o.bracketText}`)}const r=new Map;for(const o of e.bracketsNew.openingBrackets){const s=al(0,o.bracketText.length),a=i(o),l=dm.getEmpty().add(a,Rat);r.set(o.bracketText,new EE(s,1,a,l,Sre.create(s,o,l)))}for(const o of e.bracketsNew.closingBrackets){const s=al(0,o.bracketText.length);let a=dm.getEmpty();const l=o.getOpeningBrackets();for(const c of l)a=a.add(i(c),Rat);r.set(o.bracketText,new EE(s,2,i(l[0]),a,Sre.create(s,o,a)))}return new TVe(r)}constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map(n=>ixi(n)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[n,i]of this.map)if(i.kind===2&&i.bracketIds.intersects(e))return n}get isEmpty(){return this.map.size===0}}function ixi(t){let e=Hp(t);return/^[\w ]+/.test(t)&&(e=`\\b${e}`),/[\w ]+$/.test(t)&&(e=`${e}\\b`),e}class Ljt{constructor(e,n){this.denseKeyProvider=e,this.getLanguageConfiguration=n,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let n=this.languageIdToBracketTokens.get(e);return n||(n=TVe.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,n)),n}}function rxi(t){if(t.length===0)return null;if(t.length===1)return t[0];let e=0;function n(){if(e>=t.length)return null;const s=e,a=t[s].listHeight;for(e++;e<t.length&&t[e].listHeight===a;)e++;return e-s>=2?Tjt(s===0&&e===t.length?t:t.slice(s,e),!1):t[s]}let i=n(),r=n();if(!r)return i;for(let s=n();s;s=n())Pat(i,r)<=Pat(r,s)?(i=s1e(i,r),r=s):r=s1e(r,s);return s1e(i,r)}function Tjt(t,e=!1){if(t.length===0)return null;if(t.length===1)return t[0];let n=t.length;for(;n>3;){const i=n>>1;for(let r=0;r<i;r++){const o=r<<1;t[r]=pw.create23(t[o],t[o+1],o+3===n?t[o+2]:null,e)}n=i}return pw.create23(t[0],t[1],n>=3?t[2]:null,e)}function Pat(t,e){return Math.abs(t.listHeight-e.listHeight)}function s1e(t,e){return t.listHeight===e.listHeight?pw.create23(t,e,null,!1):t.listHeight>e.listHeight?oxi(t,e):sxi(e,t)}function oxi(t,e){t=t.toMutable();let n=t;const i=[];let r;for(;;){if(e.listHeight===n.listHeight){r=e;break}if(n.kind!==4)throw new Error("unexpected");i.push(n),n=n.makeLastElementMutable()}for(let o=i.length-1;o>=0;o--){const s=i[o];r?s.childrenLength>=3?r=pw.create23(s.unappendChild(),r,null,!1):(s.appendChildOfSameHeight(r),r=void 0):s.handleChildrenChanged()}return r?pw.create23(t,r,null,!1):t}function sxi(t,e){t=t.toMutable();let n=t;const i=[];for(;e.listHeight!==n.listHeight;){if(n.kind!==4)throw new Error("unexpected");i.push(n),n=n.makeFirstElementMutable()}let r=e;for(let o=i.length-1;o>=0;o--){const s=i[o];r?s.childrenLength>=3?r=pw.create23(r,s.unprependChild(),null,!1):(s.prependChildOfSameHeight(r),r=void 0):s.handleChildrenChanged()}return r?pw.create23(r,t,null,!1):t}class axi{constructor(e){this.lastOffset=Nh,this.nextNodes=[e],this.offsets=[Nh],this.idxs=[]}readLongestNodeAt(e,n){if(M3(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=GV(this.nextNodes);if(!i)return;const r=GV(this.offsets);if(M3(e,r))return;if(M3(r,e))if(Ea(r,i.length)<=e)this.nextNodeAfterCurrent();else{const o=a1e(i);o!==-1?(this.nextNodes.push(i.getChild(o)),this.offsets.push(r),this.idxs.push(o)):this.nextNodeAfterCurrent()}else{if(n(i))return this.nextNodeAfterCurrent(),i;{const o=a1e(i);if(o===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(i.getChild(o)),this.offsets.push(r),this.idxs.push(o)}}}}nextNodeAfterCurrent(){for(;;){const e=GV(this.offsets),n=GV(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const i=GV(this.nextNodes),r=a1e(i,this.idxs[this.idxs.length-1]);if(r!==-1){this.nextNodes.push(i.getChild(r)),this.offsets.push(Ea(e,n.length)),this.idxs[this.idxs.length-1]=r;break}else this.idxs.pop()}}}function a1e(t,e=-1){for(;;){if(e++,e>=t.childrenLength)return-1;if(t.getChild(e))return e}}function GV(t){return t.length>0?t[t.length-1]:void 0}function wTe(t,e,n,i){return new lxi(t,e,n,i).parseDocument()}class lxi{constructor(e,n,i,r){if(this.tokenizer=e,this.createImmutableLists=r,this._itemsConstructed=0,this._itemsFromCache=0,i&&r)throw new Error("Not supported");this.oldNodeReader=i?new axi(i):void 0,this.positionMapper=new X_i(n)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(dm.getEmpty(),0);return e||(e=pw.getEmpty()),e}parseList(e,n){const i=[];for(;;){let o=this.tryReadChildFromCache(e);if(!o){const s=this.tokenizer.peek();if(!s||s.kind===2&&s.bracketIds.intersects(e))break;o=this.parseChild(e,n+1)}o.kind===4&&o.childrenLength===0||i.push(o)}return this.oldNodeReader?rxi(i):Tjt(i,this.createImmutableLists)}tryReadChildFromCache(e){if(this.oldNodeReader){const n=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(n===null||!wre(n)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),r=>n!==null&&!M3(r.length,n)?!1:r.canBeReused(e));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(e,n){this._itemsConstructed++;const i=this.tokenizer.read();switch(i.kind){case 2:return new exi(i.bracketIds,i.length);case 0:return i.astNode;case 1:{if(n>300)return new cT(i.length);const r=e.merge(i.bracketIds),o=this.parseList(r,n+1),s=this.tokenizer.peek();return s&&s.kind===2&&(s.bracketId===i.bracketId||s.bracketIds.intersects(i.bracketIds))?(this.tokenizer.read(),YH.create(i.astNode,o,s.astNode)):YH.create(i.astNode,o,null)}default:throw new Error("unexpected")}}}function Nre(t,e){if(t.length===0)return e;if(e.length===0)return t;const n=new uS(Oat(t)),i=Oat(e);i.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let r=n.dequeue();function o(c){if(c===void 0){const d=n.takeWhile(h=>!0)||[];return r&&d.unshift(r),d}const u=[];for(;r&&!wre(c);){const[d,h]=r.splitAt(c);u.push(d),c=GH(d.lengthAfter,c),r=h??n.dequeue()}return wre(c)||u.push(new KE(!1,c,c)),u}const s=[];function a(c,u,d){if(s.length>0&&Djt(s[s.length-1].endOffset,c)){const h=s[s.length-1];s[s.length-1]=new uC(h.startOffset,u,Ea(h.newLength,d))}else s.push({startOffset:c,endOffset:u,newLength:d})}let l=Nh;for(const c of i){const u=o(c.lengthBefore);if(c.modified){const d=G_i(u,f=>f.lengthBefore),h=Ea(l,d);a(l,h,c.lengthAfter),l=h}else for(const d of u){const h=l;l=Ea(l,d.lengthBefore),d.modified&&a(h,l,d.lengthAfter)}}return s}class KE{constructor(e,n,i){this.modified=e,this.lengthBefore=n,this.lengthAfter=i}splitAt(e){const n=GH(e,this.lengthAfter);return Djt(n,Nh)?[this,void 0]:this.modified?[new KE(this.modified,this.lengthBefore,e),new KE(this.modified,Nh,n)]:[new KE(this.modified,e,e),new KE(this.modified,n,n)]}toString(){return`${this.modified?"M":"U"}:${eb(this.lengthBefore)} -> ${eb(this.lengthAfter)}`}}function Oat(t){const e=[];let n=Nh;for(const i of t){const r=GH(n,i.startOffset);wre(r)||e.push(new KE(!1,r,r));const o=GH(i.startOffset,i.endOffset);e.push(new KE(!0,o,i.newLength)),n=i.endOffset}return e}class cxi extends ct{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,n){if(super(),this.textModel=e,this.getLanguageConfiguration=n,this.didChangeEmitter=new st,this.denseKeyProvider=new kjt,this.brackets=new Ljt(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)e.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const i=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),r=new nxi(this.textModel.getValue(),i);this.initialAstWithoutTokens=wTe(r,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const e=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const n=e.map(i=>new uC(al(i.fromLineNumber-1,0),al(i.toLineNumber,0),al(i.toLineNumber-i.fromLineNumber+1,0)));this.handleEdits(n,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const n=uC.fromModelContentChanges(e.changes);this.handleEdits(n,!1)}handleEdits(e,n){const i=Nre(this.queuedTextEdits,e);this.queuedTextEdits=i,this.initialAstWithoutTokens&&!n&&(this.queuedTextEditsForInitialAstWithoutTokens=Nre(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,n,i){const r=n,o=new Mjt(this.textModel,this.brackets);return wTe(o,e,r,i)}getBracketsInRange(e,n){this.flushQueue();const i=al(e.startLineNumber-1,e.startColumn-1),r=al(e.endLineNumber-1,e.endColumn-1);return new iI(o=>{const s=this.initialAstWithoutTokens||this.astWithTokens;CTe(s,Nh,s.length,i,r,o,0,0,new Map,n)})}getBracketPairsInRange(e,n){this.flushQueue();const i=g4(e.getStartPosition()),r=g4(e.getEndPosition());return new iI(o=>{const s=this.initialAstWithoutTokens||this.astWithTokens,a=new uxi(o,n,this.textModel);STe(s,Nh,s.length,i,r,a,0,new Map)})}getFirstBracketAfter(e){this.flushQueue();const n=this.initialAstWithoutTokens||this.astWithTokens;return Ajt(n,Nh,n.length,g4(e))}getFirstBracketBefore(e){this.flushQueue();const n=this.initialAstWithoutTokens||this.astWithTokens;return Ijt(n,Nh,n.length,g4(e))}}function Ijt(t,e,n,i){if(t.kind===4||t.kind===2){const r=[];for(const o of t.children)n=Ea(e,o.length),r.push({nodeOffsetStart:e,nodeOffsetEnd:n}),e=n;for(let o=r.length-1;o>=0;o--){const{nodeOffsetStart:s,nodeOffsetEnd:a}=r[o];if(M3(s,i)){const l=Ijt(t.children[o],s,a,i);if(l)return l}}return null}else{if(t.kind===3)return null;if(t.kind===1){const r=hI(e,n);return{bracketInfo:t.bracketInfo,range:r}}}return null}function Ajt(t,e,n,i){if(t.kind===4||t.kind===2){for(const r of t.children){if(n=Ea(e,r.length),M3(i,n)){const o=Ajt(r,e,n,i);if(o)return o}e=n}return null}else{if(t.kind===3)return null;if(t.kind===1){const r=hI(e,n);return{bracketInfo:t.bracketInfo,range:r}}}return null}function CTe(t,e,n,i,r,o,s,a,l,c,u=!1){if(s>200)return!0;e:for(;;)switch(t.kind){case 4:{const d=t.childrenLength;for(let h=0;h<d;h++){const f=t.getChild(h);if(f){if(n=Ea(e,f.length),L3(e,r)&&X7(n,i)){if(X7(n,r)){t=f;continue e}if(!CTe(f,e,n,i,r,o,s,0,l,c))return!1}e=n}}return!0}case 2:{const d=!c||!t.closingBracket||t.closingBracket.bracketInfo.closesColorized(t.openingBracket.bracketInfo);let h=0;if(l){let m=l.get(t.openingBracket.text);m===void 0&&(m=0),h=m,d&&(m++,l.set(t.openingBracket.text,m))}const f=t.childrenLength;for(let m=0;m<f;m++){const p=t.getChild(m);if(p){if(n=Ea(e,p.length),L3(e,r)&&X7(n,i)){if(X7(n,r)&&p.kind!==1){t=p,d?(s++,a=h+1):a=h;continue e}if((d||p.kind!==1||!t.closingBracket)&&!CTe(p,e,n,i,r,o,d?s+1:s,d?h+1:h,l,c,!t.closingBracket))return!1}e=n}}return l==null||l.set(t.openingBracket.text,h),!0}case 3:{const d=hI(e,n);return o(new Aat(d,s-1,0,!0))}case 1:{const d=hI(e,n);return o(new Aat(d,s-1,a-1,u))}case 0:return!0}}class uxi{constructor(e,n,i){this.push=e,this.includeMinIndentation=n,this.textModel=i}}function STe(t,e,n,i,r,o,s,a){var c;if(s>200)return!0;let l=!0;if(t.kind===2){let u=0;if(a){let f=a.get(t.openingBracket.text);f===void 0&&(f=0),u=f,f++,a.set(t.openingBracket.text,f)}const d=Ea(e,t.openingBracket.length);let h=-1;if(o.includeMinIndentation&&(h=t.computeMinIndentation(e,o.textModel)),l=o.push(new U_i(hI(e,n),hI(e,d),t.closingBracket?hI(Ea(d,((c=t.child)==null?void 0:c.length)||Nh),n):void 0,s,u,t,h)),e=d,l&&t.child){const f=t.child;if(n=Ea(e,f.length),L3(e,r)&&X7(n,i)&&(l=STe(f,e,n,i,r,o,s+1,a),!l))return!1}a==null||a.set(t.openingBracket.text,u)}else{let u=e;for(const d of t.children){const h=u;if(u=Ea(u,d.length),L3(h,r)&&L3(i,u)&&(l=STe(d,h,u,i,r,o,s,a),!l))return!1}}return l}class dxi extends ct{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,n){super(),this.textModel=e,this.languageConfigurationService=n,this.bracketPairsTree=this._register(new mc),this.onDidChangeEmitter=new st,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1}handleLanguageConfigurationServiceChange(e){var n;(!e.languageId||(n=this.bracketPairsTree.value)!=null&&n.object.didLanguageChange(e.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var n;(n=this.bracketPairsTree.value)==null||n.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;(e=this.bracketPairsTree.value)==null||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var n;(n=this.bracketPairsTree.value)==null||n.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const e=new Lt;this.bracketPairsTree.value=hxi(e.add(new cxi(this.textModel,n=>this.languageConfigurationService.getLanguageConfiguration(n))),e),e.add(this.bracketPairsTree.value.object.onDidChange(n=>this.onDidChangeEmitter.fire(n))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){var n;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((n=this.bracketPairsTree.value)==null?void 0:n.object.getBracketPairsInRange(e,!1))||iI.empty}getBracketPairsInRangeWithMinIndentation(e){var n;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((n=this.bracketPairsTree.value)==null?void 0:n.object.getBracketPairsInRange(e,!0))||iI.empty}getBracketsInRange(e,n=!1){var i;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((i=this.bracketPairsTree.value)==null?void 0:i.object.getBracketsInRange(e,n))||iI.empty}findMatchingBracketUp(e,n,i){const r=this.textModel.validatePosition(n),o=this.textModel.getLanguageIdAtPosition(r.lineNumber,r.column);if(this.canBuildAST){const s=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew.getClosingBracketInfo(e);if(!s)return null;const a=this.getBracketPairsInRange(ve.fromPositions(n,n)).findLast(l=>s.closes(l.openingBracketInfo));return a?a.openingBracketRange:null}else{const s=e.toLowerCase(),a=this.languageConfigurationService.getLanguageConfiguration(o).brackets;if(!a)return null;const l=a.textIsBracket[s];return l?_Q(this._findMatchingBracketUp(l,r,l1e(i))):null}}matchBracket(e,n){if(this.canBuildAST){const i=this.getBracketPairsInRange(ve.fromPositions(e,e)).filter(r=>r.closingBracketRange!==void 0&&(r.openingBracketRange.containsPosition(e)||r.closingBracketRange.containsPosition(e))).findLastMaxBy(Ah(r=>r.openingBracketRange.containsPosition(e)?r.openingBracketRange:r.closingBracketRange,ve.compareRangesUsingStarts));return i?[i.openingBracketRange,i.closingBracketRange]:null}else{const i=l1e(n);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,n,i,r){const o=n.getCount(),s=n.getLanguageId(r);let a=Math.max(0,e.column-1-i.maxBracketLength);for(let c=r-1;c>=0;c--){const u=n.getEndOffset(c);if(u<=a)break;if(G_(n.getStandardTokenType(c))||n.getLanguageId(c)!==s){a=u;break}}let l=Math.min(n.getLineContent().length,e.column-1+i.maxBracketLength);for(let c=r+1;c<o;c++){const u=n.getStartOffset(c);if(u>=l)break;if(G_(n.getStandardTokenType(c))||n.getLanguageId(c)!==s){l=u;break}}return{searchStartOffset:a,searchEndOffset:l}}_matchBracket(e,n){const i=e.lineNumber,r=this.textModel.tokenization.getLineTokens(i),o=this.textModel.getLineContent(i),s=r.findTokenIndexAtOffset(e.column-1);if(s<0)return null;const a=this.languageConfigurationService.getLanguageConfiguration(r.getLanguageId(s)).brackets;if(a&&!G_(r.getStandardTokenType(s))){let{searchStartOffset:l,searchEndOffset:c}=this._establishBracketSearchOffsets(e,r,a,s),u=null;for(;;){const d=Hb.findNextBracketInRange(a.forwardRegex,i,o,l,c);if(!d)break;if(d.startColumn<=e.column&&e.column<=d.endColumn){const h=o.substring(d.startColumn-1,d.endColumn-1).toLowerCase(),f=this._matchFoundBracket(d,a.textIsBracket[h],a.textIsOpenBracket[h],n);if(f){if(f instanceof K1)return null;u=f}}l=d.endColumn-1}if(u)return u}if(s>0&&r.getStartOffset(s)===e.column-1){const l=s-1,c=this.languageConfigurationService.getLanguageConfiguration(r.getLanguageId(l)).brackets;if(c&&!G_(r.getStandardTokenType(l))){const{searchStartOffset:u,searchEndOffset:d}=this._establishBracketSearchOffsets(e,r,c,l),h=Hb.findPrevBracketInRange(c.reversedRegex,i,o,u,d);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){const f=o.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),m=this._matchFoundBracket(h,c.textIsBracket[f],c.textIsOpenBracket[f],n);if(m)return m instanceof K1?null:m}}}return null}_matchFoundBracket(e,n,i,r){if(!n)return null;const o=i?this._findMatchingBracketDown(n,e.getEndPosition(),r):this._findMatchingBracketUp(n,e.getStartPosition(),r);return o?o instanceof K1?o:[e,o]:null}_findMatchingBracketUp(e,n,i){const r=e.languageId,o=e.reversedRegex;let s=-1,a=0;const l=(c,u,d,h)=>{for(;;){if(i&&++a%100===0&&!i())return K1.INSTANCE;const f=Hb.findPrevBracketInRange(o,c,u,d,h);if(!f)break;const m=u.substring(f.startColumn-1,f.endColumn-1).toLowerCase();if(e.isOpen(m)?s++:e.isClose(m)&&s--,s===0)return f;h=f.startColumn-1}return null};for(let c=n.lineNumber;c>=1;c--){const u=this.textModel.tokenization.getLineTokens(c),d=u.getCount(),h=this.textModel.getLineContent(c);let f=d-1,m=h.length,p=h.length;c===n.lineNumber&&(f=u.findTokenIndexAtOffset(n.column-1),m=n.column-1,p=n.column-1);let g=!0;for(;f>=0;f--){const y=u.getLanguageId(f)===r&&!G_(u.getStandardTokenType(f));if(y)g?m=u.getStartOffset(f):(m=u.getStartOffset(f),p=u.getEndOffset(f));else if(g&&m!==p){const _=l(c,h,m,p);if(_)return _}g=y}if(g&&m!==p){const y=l(c,h,m,p);if(y)return y}}return null}_findMatchingBracketDown(e,n,i){const r=e.languageId,o=e.forwardRegex;let s=1,a=0;const l=(u,d,h,f)=>{for(;;){if(i&&++a%100===0&&!i())return K1.INSTANCE;const m=Hb.findNextBracketInRange(o,u,d,h,f);if(!m)break;const p=d.substring(m.startColumn-1,m.endColumn-1).toLowerCase();if(e.isOpen(p)?s++:e.isClose(p)&&s--,s===0)return m;h=m.endColumn-1}return null},c=this.textModel.getLineCount();for(let u=n.lineNumber;u<=c;u++){const d=this.textModel.tokenization.getLineTokens(u),h=d.getCount(),f=this.textModel.getLineContent(u);let m=0,p=0,g=0;u===n.lineNumber&&(m=d.findTokenIndexAtOffset(n.column-1),p=n.column-1,g=n.column-1);let y=!0;for(;m<h;m++){const _=d.getLanguageId(m)===r&&!G_(d.getStandardTokenType(m));if(_)y||(p=d.getStartOffset(m)),g=d.getEndOffset(m);else if(y&&p!==g){const w=l(u,f,p,g);if(w)return w}y=_}if(y&&p!==g){const _=l(u,f,p,g);if(_)return _}}return null}findPrevBracket(e){var s;const n=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((s=this.bracketPairsTree.value)==null?void 0:s.object.getFirstBracketBefore(n))||null;let i=null,r=null,o=null;for(let a=n.lineNumber;a>=1;a--){const l=this.textModel.tokenization.getLineTokens(a),c=l.getCount(),u=this.textModel.getLineContent(a);let d=c-1,h=u.length,f=u.length;if(a===n.lineNumber){d=l.findTokenIndexAtOffset(n.column-1),h=n.column-1,f=n.column-1;const p=l.getLanguageId(d);i!==p&&(i=p,r=this.languageConfigurationService.getLanguageConfiguration(i).brackets,o=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew)}let m=!0;for(;d>=0;d--){const p=l.getLanguageId(d);if(i!==p){if(r&&o&&m&&h!==f){const y=Hb.findPrevBracketInRange(r.reversedRegex,a,u,h,f);if(y)return this._toFoundBracket(o,y);m=!1}i=p,r=this.languageConfigurationService.getLanguageConfiguration(i).brackets,o=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew}const g=!!r&&!G_(l.getStandardTokenType(d));if(g)m?h=l.getStartOffset(d):(h=l.getStartOffset(d),f=l.getEndOffset(d));else if(o&&r&&m&&h!==f){const y=Hb.findPrevBracketInRange(r.reversedRegex,a,u,h,f);if(y)return this._toFoundBracket(o,y)}m=g}if(o&&r&&m&&h!==f){const p=Hb.findPrevBracketInRange(r.reversedRegex,a,u,h,f);if(p)return this._toFoundBracket(o,p)}}return null}findNextBracket(e){var a;const n=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((a=this.bracketPairsTree.value)==null?void 0:a.object.getFirstBracketAfter(n))||null;const i=this.textModel.getLineCount();let r=null,o=null,s=null;for(let l=n.lineNumber;l<=i;l++){const c=this.textModel.tokenization.getLineTokens(l),u=c.getCount(),d=this.textModel.getLineContent(l);let h=0,f=0,m=0;if(l===n.lineNumber){h=c.findTokenIndexAtOffset(n.column-1),f=n.column-1,m=n.column-1;const g=c.getLanguageId(h);r!==g&&(r=g,o=this.languageConfigurationService.getLanguageConfiguration(r).brackets,s=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew)}let p=!0;for(;h<u;h++){const g=c.getLanguageId(h);if(r!==g){if(s&&o&&p&&f!==m){const _=Hb.findNextBracketInRange(o.forwardRegex,l,d,f,m);if(_)return this._toFoundBracket(s,_);p=!1}r=g,o=this.languageConfigurationService.getLanguageConfiguration(r).brackets,s=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew}const y=!!o&&!G_(c.getStandardTokenType(h));if(y)p||(f=c.getStartOffset(h)),m=c.getEndOffset(h);else if(s&&o&&p&&f!==m){const _=Hb.findNextBracketInRange(o.forwardRegex,l,d,f,m);if(_)return this._toFoundBracket(s,_)}p=y}if(s&&o&&p&&f!==m){const g=Hb.findNextBracketInRange(o.forwardRegex,l,d,f,m);if(g)return this._toFoundBracket(s,g)}}return null}findEnclosingBrackets(e,n){const i=this.textModel.validatePosition(e);if(this.canBuildAST){const f=ve.fromPositions(i),m=this.getBracketPairsInRange(ve.fromPositions(i,i)).findLast(p=>p.closingBracketRange!==void 0&&p.range.strictContainsRange(f));return m?[m.openingBracketRange,m.closingBracketRange]:null}const r=l1e(n),o=this.textModel.getLineCount(),s=new Map;let a=[];const l=(f,m)=>{if(!s.has(f)){const p=[];for(let g=0,y=m?m.brackets.length:0;g<y;g++)p[g]=0;s.set(f,p)}a=s.get(f)};let c=0;const u=(f,m,p,g,y)=>{for(;;){if(r&&++c%100===0&&!r())return K1.INSTANCE;const _=Hb.findNextBracketInRange(f.forwardRegex,m,p,g,y);if(!_)break;const w=p.substring(_.startColumn-1,_.endColumn-1).toLowerCase(),C=f.textIsBracket[w];if(C&&(C.isOpen(w)?a[C.index]++:C.isClose(w)&&a[C.index]--,a[C.index]===-1))return this._matchFoundBracket(_,C,!1,r);g=_.endColumn-1}return null};let d=null,h=null;for(let f=i.lineNumber;f<=o;f++){const m=this.textModel.tokenization.getLineTokens(f),p=m.getCount(),g=this.textModel.getLineContent(f);let y=0,_=0,w=0;if(f===i.lineNumber){y=m.findTokenIndexAtOffset(i.column-1),_=i.column-1,w=i.column-1;const N=m.getLanguageId(y);d!==N&&(d=N,h=this.languageConfigurationService.getLanguageConfiguration(d).brackets,l(d,h))}let C=!0;for(;y<p;y++){const N=m.getLanguageId(y);if(d!==N){if(h&&C&&_!==w){const D=u(h,f,g,_,w);if(D)return _Q(D);C=!1}d=N,h=this.languageConfigurationService.getLanguageConfiguration(d).brackets,l(d,h)}const E=!!h&&!G_(m.getStandardTokenType(y));if(E)C||(_=m.getStartOffset(y)),w=m.getEndOffset(y);else if(h&&C&&_!==w){const D=u(h,f,g,_,w);if(D)return _Q(D)}C=E}if(h&&C&&_!==w){const N=u(h,f,g,_,w);if(N)return _Q(N)}}return null}_toFoundBracket(e,n){if(!n)return null;let i=this.textModel.getValueInRange(n);i=i.toLowerCase();const r=e.getBracketInfo(i);return r?{range:n,bracketInfo:r}:null}}function hxi(t,e){return{object:t,dispose:()=>e==null?void 0:e.dispose()}}function l1e(t){if(typeof t>"u")return()=>!0;{const e=Date.now();return()=>Date.now()-e<=t}}const Zle=class Zle{constructor(){this._searchCanceledBrand=void 0}};Zle.INSTANCE=new Zle;let K1=Zle;function _Q(t){return t instanceof K1?null:t}class fxi extends ct{constructor(e){super(),this.textModel=e,this.colorProvider=new Rjt,this.onDidChangeEmitter=new st,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(n=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,n,i,r){return r?[]:n===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map(s=>({id:`bracket${s.range.toString()}-${s.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(s,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:s.range})).toArray():[]}getAllDecorations(e,n){return e===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new ve(1,1,this.textModel.getLineCount(),1),e,n):[]}}class Rjt{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,n){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(n?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}}_b((t,e)=>{const n=[ojt,sjt,ajt,ljt,cjt,ujt],i=new Rjt;e.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${t.getColor(Xyi)}; }`);const r=n.map(o=>t.getColor(o)).filter(o=>!!o).filter(o=>!o.isTransparent());for(let o=0;o<30;o++){const s=r[o%r.length];e.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(o)} { color: ${s}; }`)}});function xQ(t){return t.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class xu{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,n,i,r){this.oldPosition=e,this.oldText=n,this.newPosition=i,this.newText=r}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${xQ(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${xQ(this.oldText)}")`:`(replace@${this.oldPosition} "${xQ(this.oldText)}" with "${xQ(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,n,i){const r=n.length;Ay(e,r,i),i+=4;for(let o=0;o<r;o++)gmi(e,n.charCodeAt(o),i),i+=2;return i}static _readString(e,n){const i=Iy(e,n);return n+=4,vmi(e,n,i)}writeSize(){return 8+xu._writeStringSize(this.oldText)+xu._writeStringSize(this.newText)}write(e,n){return Ay(e,this.oldPosition,n),n+=4,Ay(e,this.newPosition,n),n+=4,n=xu._writeString(e,this.oldText,n),n=xu._writeString(e,this.newText,n),n}static read(e,n,i){const r=Iy(e,n);n+=4;const o=Iy(e,n);n+=4;const s=xu._readString(e,n);n+=xu._writeStringSize(s);const a=xu._readString(e,n);return n+=xu._writeStringSize(a),i.push(new xu(r,s,o,a)),n}}function mxi(t,e){return t===null||t.length===0?e:new ex(t,e).compress()}class ex{constructor(e,n){this._prevEdits=e,this._currEdits=n,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let e=0,n=0,i=this._getPrev(e),r=this._getCurr(n);for(;e<this._prevLen||n<this._currLen;){if(i===null){this._acceptCurr(r),r=this._getCurr(++n);continue}if(r===null){this._acceptPrev(i),i=this._getPrev(++e);continue}if(r.oldEnd<=i.newPosition){this._acceptCurr(r),r=this._getCurr(++n);continue}if(i.newEnd<=r.oldPosition){this._acceptPrev(i),i=this._getPrev(++e);continue}if(r.oldPosition<i.newPosition){const[c,u]=ex._splitCurr(r,i.newPosition-r.oldPosition);this._acceptCurr(c),r=u;continue}if(i.newPosition<r.oldPosition){const[c,u]=ex._splitPrev(i,r.oldPosition-i.newPosition);this._acceptPrev(c),i=u;continue}let a,l;if(r.oldEnd===i.newEnd)a=i,l=r,i=this._getPrev(++e),r=this._getCurr(++n);else if(r.oldEnd<i.newEnd){const[c,u]=ex._splitPrev(i,r.oldLength);a=c,l=r,i=u,r=this._getCurr(++n)}else{const[c,u]=ex._splitCurr(r,i.newLength);a=i,l=c,i=this._getPrev(++e),r=u}this._result[this._resultLen++]=new xu(a.oldPosition,a.oldText,l.newPosition,l.newText),this._prevDeltaOffset+=a.newLength-a.oldLength,this._currDeltaOffset+=l.newLength-l.oldLength}const o=ex._merge(this._result);return ex._removeNoOps(o)}_acceptCurr(e){this._result[this._resultLen++]=ex._rebaseCurr(this._prevDeltaOffset,e),this._currDeltaOffset+=e.newLength-e.oldLength}_getCurr(e){return e<this._currLen?this._currEdits[e]:null}_acceptPrev(e){this._result[this._resultLen++]=ex._rebasePrev(this._currDeltaOffset,e),this._prevDeltaOffset+=e.newLength-e.oldLength}_getPrev(e){return e<this._prevLen?this._prevEdits[e]:null}static _rebaseCurr(e,n){return new xu(n.oldPosition-e,n.oldText,n.newPosition,n.newText)}static _rebasePrev(e,n){return new xu(n.oldPosition,n.oldText,n.newPosition+e,n.newText)}static _splitPrev(e,n){const i=e.newText.substr(0,n),r=e.newText.substr(n);return[new xu(e.oldPosition,e.oldText,e.newPosition,i),new xu(e.oldEnd,"",e.newPosition+n,r)]}static _splitCurr(e,n){const i=e.oldText.substr(0,n),r=e.oldText.substr(n);return[new xu(e.oldPosition,i,e.newPosition,e.newText),new xu(e.oldPosition+n,r,e.newEnd,"")]}static _merge(e){if(e.length===0)return e;const n=[];let i=0,r=e[0];for(let o=1;o<e.length;o++){const s=e[o];r.oldEnd===s.oldPosition?r=new xu(r.oldPosition,r.oldText+s.oldText,r.newPosition,r.newText+s.newText):(n[i++]=r,r=s)}return n[i++]=r,n}static _removeNoOps(e){if(e.length===0)return e;const n=[];let i=0;for(let r=0;r<e.length;r++){const o=e[r];o.oldText!==o.newText&&(n[i++]=o)}return n}}function FN(t){return t===47||t===92}function Pjt(t){return t.replace(/[\\/]/g,Dl.sep)}function pxi(t){return t.indexOf("/")===-1&&(t=Pjt(t)),/^[a-zA-Z]:(\/|$)/.test(t)&&(t="/"+t),t}function jat(t,e=Dl.sep){if(!t)return"";const n=t.length,i=t.charCodeAt(0);if(FN(i)){if(FN(t.charCodeAt(1))&&!FN(t.charCodeAt(2))){let o=3;const s=o;for(;o<n&&!FN(t.charCodeAt(o));o++);if(s!==o&&!FN(t.charCodeAt(o+1))){for(o+=1;o<n;o++)if(FN(t.charCodeAt(o)))return t.slice(0,o+1).replace(/[\\/]/g,e)}}return e}else if(Ojt(i)&&t.charCodeAt(1)===58)return FN(t.charCodeAt(2))?t.slice(0,2)+e:t.slice(0,2);let r=t.indexOf("://");if(r!==-1){for(r+=3;r<n;r++)if(FN(t.charCodeAt(r)))return t.slice(0,r+1)}return""}function NTe(t,e,n,i=_0){if(t===e)return!0;if(!t||!e||e.length>t.length)return!1;if(n){if(!_8e(t,e))return!1;if(e.length===t.length)return!0;let o=e.length;return e.charAt(e.length-1)===i&&o--,t.charAt(o)===i}return e.charAt(e.length-1)!==i&&(e+=i),t.indexOf(e)===0}function Ojt(t){return t>=65&&t<=90||t>=97&&t<=122}function gxi(t,e=Fu){return e?Ojt(t.charCodeAt(0))&&t.charCodeAt(1)===58:!1}function Y_(t){return Pie(t,!0)}class bxi{constructor(e){this._ignorePathCasing=e}compare(e,n,i=!1){return e===n?0:CH(this.getComparisonKey(e,i),this.getComparisonKey(n,i))}isEqual(e,n,i=!1){return e===n?!0:!e||!n?!1:this.getComparisonKey(e,i)===this.getComparisonKey(n,i)}getComparisonKey(e,n=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:n?null:void 0}).toString()}isEqualOrParent(e,n,i=!1){if(e.scheme===n.scheme){if(e.scheme===Ti.file)return NTe(Y_(e),Y_(n),this._ignorePathCasing(e))&&e.query===n.query&&(i||e.fragment===n.fragment);if($at(e.authority,n.authority))return NTe(e.path,n.path,this._ignorePathCasing(e),"/")&&e.query===n.query&&(i||e.fragment===n.fragment)}return!1}joinPath(e,...n){return ri.joinPath(e,...n)}basenameOrAuthority(e){return cb(e)||e.authority}basename(e){return Dl.basename(e.path)}extname(e){return Dl.extname(e.path)}dirname(e){if(e.path.length===0)return e;let n;return e.scheme===Ti.file?n=ri.file(JOt(Y_(e))).path:(n=Dl.dirname(e.path),e.authority&&n.length&&n.charCodeAt(0)!==47&&(console.error(`dirname("${e.toString})) resulted in a relative path`),n="/")),e.with({path:n})}normalizePath(e){if(!e.path.length)return e;let n;return e.scheme===Ti.file?n=ri.file(QOt(Y_(e))).path:n=Dl.normalize(e.path),e.with({path:n})}relativePath(e,n){if(e.scheme!==n.scheme||!$at(e.authority,n.authority))return;if(e.scheme===Ti.file){const o=Cdi(Y_(e),Y_(n));return Fu?Pjt(o):o}let i=e.path||"/";const r=n.path||"/";if(this._ignorePathCasing(e)){let o=0;for(const s=Math.min(i.length,r.length);o<s&&!(i.charCodeAt(o)!==r.charCodeAt(o)&&i.charAt(o).toLowerCase()!==r.charAt(o).toLowerCase());o++);i=r.substr(0,o)+i.substr(o)}return Dl.relative(i,r)}resolvePath(e,n){if(e.scheme===Ti.file){const i=ri.file(wdi(Y_(e),n));return e.with({authority:i.authority,path:i.path})}return n=pxi(n),e.with({path:Dl.resolve(e.path,n)})}isAbsolutePath(e){return!!e.path&&e.path[0]==="/"}isEqualAuthority(e,n){return e===n||e!==void 0&&n!==void 0&&l4(e,n)}hasTrailingPathSeparator(e,n=_0){if(e.scheme===Ti.file){const i=Y_(e);return i.length>jat(i).length&&i[i.length-1]===n}else{const i=e.path;return i.length>1&&i.charCodeAt(i.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,n=_0){return Vat(e,n)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,n=_0){let i=!1;if(e.scheme===Ti.file){const r=Y_(e);i=r!==void 0&&r.length===jat(r).length&&r[r.length-1]===n}else{n="/";const r=e.path;i=r.length===1&&r.charCodeAt(r.length-1)===47}return!i&&!Vat(e,n)?e.with({path:e.path+"/"}):e}}const zs=new bxi(()=>!1),IVe=zs.isEqual.bind(zs);zs.isEqualOrParent.bind(zs);zs.getComparisonKey.bind(zs);const vxi=zs.basenameOrAuthority.bind(zs),cb=zs.basename.bind(zs),yxi=zs.extname.bind(zs),dme=zs.dirname.bind(zs),_xi=zs.joinPath.bind(zs),xxi=zs.normalizePath.bind(zs),wxi=zs.relativePath.bind(zs),Fat=zs.resolvePath.bind(zs);zs.isAbsolutePath.bind(zs);const $at=zs.isEqualAuthority.bind(zs),Vat=zs.hasTrailingPathSeparator.bind(zs);zs.removeTrailingPathSeparator.bind(zs);zs.addTrailingPathSeparator.bind(zs);var bk;(function(t){t.META_DATA_LABEL="label",t.META_DATA_DESCRIPTION="description",t.META_DATA_SIZE="size",t.META_DATA_MIME="mime";function e(n){const i=new Map;n.path.substring(n.path.indexOf(";")+1,n.path.lastIndexOf(";")).split(";").forEach(s=>{const[a,l]=s.split(":");a&&l&&i.set(a,l)});const o=n.path.substring(0,n.path.indexOf(";"));return o&&i.set(t.META_DATA_MIME,o),i}t.parseMetaData=e})(bk||(bk={}));function eO(t){return t.toString()}class Nc{static create(e,n){const i=e.getAlternativeVersionId(),r=ETe(e);return new Nc(i,i,r,r,n,n,[])}constructor(e,n,i,r,o,s,a){this.beforeVersionId=e,this.afterVersionId=n,this.beforeEOL=i,this.afterEOL=r,this.beforeCursorState=o,this.afterCursorState=s,this.changes=a}append(e,n,i,r,o){n.length>0&&(this.changes=mxi(this.changes,n)),this.afterEOL=i,this.afterVersionId=r,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+4*4*(e?e.length:0)}static _writeSelections(e,n,i){if(Ay(e,n?n.length:0,i),i+=4,n)for(const r of n)Ay(e,r.selectionStartLineNumber,i),i+=4,Ay(e,r.selectionStartColumn,i),i+=4,Ay(e,r.positionLineNumber,i),i+=4,Ay(e,r.positionColumn,i),i+=4;return i}static _readSelections(e,n,i){const r=Iy(e,n);n+=4;for(let o=0;o<r;o++){const s=Iy(e,n);n+=4;const a=Iy(e,n);n+=4;const l=Iy(e,n);n+=4;const c=Iy(e,n);n+=4,i.push(new Pn(s,a,l,c))}return n}serialize(){let e=10+Nc._writeSelectionsSize(this.beforeCursorState)+Nc._writeSelectionsSize(this.afterCursorState)+4;for(const r of this.changes)e+=r.writeSize();const n=new Uint8Array(e);let i=0;Ay(n,this.beforeVersionId,i),i+=4,Ay(n,this.afterVersionId,i),i+=4,sst(n,this.beforeEOL,i),i+=1,sst(n,this.afterEOL,i),i+=1,i=Nc._writeSelections(n,this.beforeCursorState,i),i=Nc._writeSelections(n,this.afterCursorState,i),Ay(n,this.changes.length,i),i+=4;for(const r of this.changes)i=r.write(n,i);return n.buffer}static deserialize(e){const n=new Uint8Array(e);let i=0;const r=Iy(n,i);i+=4;const o=Iy(n,i);i+=4;const s=ost(n,i);i+=1;const a=ost(n,i);i+=1;const l=[];i=Nc._readSelections(n,i,l);const c=[];i=Nc._readSelections(n,i,c);const u=Iy(n,i);i+=4;const d=[];for(let h=0;h<u;h++)i=xu.read(n,i,d);return new Nc(r,o,s,a,l,c,d)}}class jjt{get type(){return 0}get resource(){return ri.isUri(this.model)?this.model:this.model.uri}constructor(e,n,i,r){this.label=e,this.code=n,this.model=i,this._data=Nc.create(i,r)}toString(){return(this._data instanceof Nc?this._data:Nc.deserialize(this._data)).changes.map(n=>n.toString()).join(", ")}matchesResource(e){return(ri.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof Nc}append(e,n,i,r,o){this._data instanceof Nc&&this._data.append(e,n,i,r,o)}close(){this._data instanceof Nc&&(this._data=this._data.serialize())}open(){this._data instanceof Nc||(this._data=Nc.deserialize(this._data))}undo(){if(ri.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Nc&&(this._data=this._data.serialize());const e=Nc.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(ri.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Nc&&(this._data=this._data.serialize());const e=Nc.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof Nc&&(this._data=this._data.serialize()),this._data.byteLength+168}}class Cxi{get resources(){return this._editStackElementsArr.map(e=>e.resource)}constructor(e,n,i){this.label=e,this.code=n,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map;for(const r of this._editStackElementsArr){const o=eO(r.resource);this._editStackElementsMap.set(o,r)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const n=eO(e);return this._editStackElementsMap.has(n)}setModel(e){const n=eO(ri.isUri(e)?e:e.uri);this._editStackElementsMap.has(n)&&this._editStackElementsMap.get(n).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const n=eO(e.uri);return this._editStackElementsMap.has(n)?this._editStackElementsMap.get(n).canAppend(e):!1}append(e,n,i,r,o){const s=eO(e.uri);this._editStackElementsMap.get(s).append(e,n,i,r,o)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const n=eO(e);return this._editStackElementsMap.has(n)?this._editStackElementsMap.get(n).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const n of this._editStackElementsArr)e.push(`${cb(n.resource)}: ${n}`);return`{${e.join(", ")}}`}}function ETe(t){return t.getEOL()===`
`?0:1}function q1(t){return t?t instanceof jjt||t instanceof Cxi:!1}class AVe{constructor(e,n){this._model=e,this._undoRedoService=n}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);q1(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);q1(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,n){const i=this._undoRedoService.getLastElement(this._model.uri);if(q1(i)&&i.canAppend(this._model))return i;const r=new jjt(I("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(r,n),r}pushEOL(e){const n=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),n.append(this._model,[],ETe(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,n,i,r){const o=this._getOrCreateEditStackElement(e,r),s=this._model.applyEdits(n,!0),a=AVe._computeCursorState(i,s),l=s.map((c,u)=>({index:u,textChange:c.textChange}));return l.sort((c,u)=>c.textChange.oldPosition===u.textChange.oldPosition?c.index-u.index:c.textChange.oldPosition-u.textChange.oldPosition),o.append(this._model,l.map(c=>c.textChange),ETe(this._model),this._model.getAlternativeVersionId(),a),a}static _computeCursorState(e,n){try{return e?e(n):null}catch(i){return ji(i),null}}}class Sxi{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function Nxi(t,e,n,i,r){r.spacesDiff=0,r.looksLikeAlignment=!1;let o;for(o=0;o<e&&o<i;o++){const h=t.charCodeAt(o),f=n.charCodeAt(o);if(h!==f)break}let s=0,a=0;for(let h=o;h<e;h++)t.charCodeAt(h)===32?s++:a++;let l=0,c=0;for(let h=o;h<i;h++)n.charCodeAt(h)===32?l++:c++;if(s>0&&a>0||l>0&&c>0)return;const u=Math.abs(a-c),d=Math.abs(s-l);if(u===0){r.spacesDiff=d,d>0&&0<=l-1&&l-1<t.length&&l<n.length&&n.charCodeAt(l)!==32&&t.charCodeAt(l-1)===32&&t.charCodeAt(t.length-1)===44&&(r.looksLikeAlignment=!0);return}if(d%u===0){r.spacesDiff=d/u;return}}function Bat(t,e,n){const i=Math.min(t.getLineCount(),1e4);let r=0,o=0,s="",a=0;const l=[2,4,6,8,3,5,7],c=8,u=[0,0,0,0,0,0,0,0,0],d=new Sxi;for(let m=1;m<=i;m++){const p=t.getLineLength(m),g=t.getLineContent(m),y=p<=65536;let _=!1,w=0,C=0,N=0;for(let D=0,k=p;D<k;D++){const M=y?g.charCodeAt(D):t.getLineCharCode(m,D);if(M===9)N++;else if(M===32)C++;else{_=!0,w=D;break}}if(!_||(N>0?r++:C>1&&o++,Nxi(s,a,g,w,d),d.looksLikeAlignment&&!(n&&e===d.spacesDiff)))continue;const E=d.spacesDiff;E<=c&&u[E]++,s=g,a=w}let h=n;r!==o&&(h=r<o);let f=e;if(h){let m=h?0:.1*i;l.forEach(p=>{const g=u[p];g>m&&(m=g,f=p)}),f===4&&u[4]>0&&u[2]>0&&u[2]>=u[4]/2&&(f=2)}return{insertSpaces:h,tabSize:f}}function of(t){return(t.metadata&1)>>>0}function As(t,e){t.metadata=t.metadata&254|e<<0}function Ru(t){return(t.metadata&2)>>>1===1}function Ss(t,e){t.metadata=t.metadata&253|(e?1:0)<<1}function Fjt(t){return(t.metadata&4)>>>2===1}function zat(t,e){t.metadata=t.metadata&251|(e?1:0)<<2}function $jt(t){return(t.metadata&64)>>>6===1}function Hat(t,e){t.metadata=t.metadata&191|(e?1:0)<<6}function Exi(t){return(t.metadata&24)>>>3}function Wat(t,e){t.metadata=t.metadata&231|e<<3}function Dxi(t){return(t.metadata&32)>>>5===1}function Uat(t,e){t.metadata=t.metadata&223|(e?1:0)<<5}class Vjt{constructor(e,n,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,As(this,1),this.start=n,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,zat(this,!1),Hat(this,!1),Wat(this,1),Uat(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=n,this.cachedAbsoluteEnd=i,this.range=null,Ss(this,!1)}reset(e,n,i,r){this.start=n,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=n,this.cachedAbsoluteEnd=i,this.range=r}setOptions(e){this.options=e;const n=this.options.className;zat(this,n==="squiggly-error"||n==="squiggly-warning"||n==="squiggly-info"),Hat(this,this.options.glyphMarginClassName!==null),Wat(this,this.options.stickiness),Uat(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,n,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=n}detach(){this.parent=null,this.left=null,this.right=null}}const _r=new Vjt(null,0,0);_r.parent=_r;_r.left=_r;_r.right=_r;As(_r,0);class c1e{constructor(){this.root=_r,this.requestNormalizeDelta=!1}intervalSearch(e,n,i,r,o,s){return this.root===_r?[]:Pxi(this,e,n,i,r,o,s)}search(e,n,i,r){return this.root===_r?[]:Rxi(this,e,n,i,r)}collectNodesFromOwner(e){return Ixi(this,e)}collectNodesPostOrder(){return Axi(this)}insert(e){Kat(this,e),this._normalizeDeltaIfNecessary()}delete(e){qat(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,n){const i=e;let r=0;for(;e!==this.root;)e===e.parent.right&&(r+=e.parent.delta),e=e.parent;const o=i.start+r,s=i.end+r;i.setCachedOffsets(o,s,n)}acceptReplace(e,n,i,r){const o=Lxi(this,e,e+n);for(let s=0,a=o.length;s<a;s++){const l=o[s];qat(this,l)}this._normalizeDeltaIfNecessary(),Txi(this,e,e+n,i),this._normalizeDeltaIfNecessary();for(let s=0,a=o.length;s<a;s++){const l=o[s];l.start=l.cachedAbsoluteStart,l.end=l.cachedAbsoluteEnd,Mxi(l,e,e+n,i,r),l.maxEnd=l.end,Kat(this,l)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,kxi(this))}}function kxi(t){let e=t.root,n=0;for(;e!==_r;){if(e.left!==_r&&!Ru(e.left)){e=e.left;continue}if(e.right!==_r&&!Ru(e.right)){n+=e.delta,e=e.right;continue}e.start=n+e.start,e.end=n+e.end,e.delta=0,vk(e),Ss(e,!0),Ss(e.left,!1),Ss(e.right,!1),e===e.parent.right&&(n-=e.parent.delta),e=e.parent}Ss(t.root,!1)}function tO(t,e,n,i){return t<n?!0:t>n||i===1?!1:i===2?!0:e}function Mxi(t,e,n,i,r){const o=Exi(t),s=o===0||o===2,a=o===1||o===2,l=n-e,c=i,u=Math.min(l,c),d=t.start;let h=!1;const f=t.end;let m=!1;e<=d&&f<=n&&Dxi(t)&&(t.start=e,h=!0,t.end=e,m=!0);{const g=r?1:l>0?2:0;!h&&tO(d,s,e,g)&&(h=!0),!m&&tO(f,a,e,g)&&(m=!0)}if(u>0&&!r){const g=l>c?2:0;!h&&tO(d,s,e+u,g)&&(h=!0),!m&&tO(f,a,e+u,g)&&(m=!0)}{const g=r?1:0;!h&&tO(d,s,n,g)&&(t.start=e+c,h=!0),!m&&tO(f,a,n,g)&&(t.end=e+c,m=!0)}const p=c-l;h||(t.start=Math.max(0,d+p)),m||(t.end=Math.max(0,f+p)),t.start>t.end&&(t.end=t.start)}function Lxi(t,e,n){let i=t.root,r=0,o=0,s=0,a=0;const l=[];let c=0;for(;i!==_r;){if(Ru(i)){Ss(i.left,!1),Ss(i.right,!1),i===i.parent.right&&(r-=i.parent.delta),i=i.parent;continue}if(!Ru(i.left)){if(o=r+i.maxEnd,o<e){Ss(i,!0);continue}if(i.left!==_r){i=i.left;continue}}if(s=r+i.start,s>n){Ss(i,!0);continue}if(a=r+i.end,a>=e&&(i.setCachedOffsets(s,a,0),l[c++]=i),Ss(i,!0),i.right!==_r&&!Ru(i.right)){r+=i.delta,i=i.right;continue}}return Ss(t.root,!1),l}function Txi(t,e,n,i){let r=t.root,o=0,s=0,a=0;const l=i-(n-e);for(;r!==_r;){if(Ru(r)){Ss(r.left,!1),Ss(r.right,!1),r===r.parent.right&&(o-=r.parent.delta),vk(r),r=r.parent;continue}if(!Ru(r.left)){if(s=o+r.maxEnd,s<e){Ss(r,!0);continue}if(r.left!==_r){r=r.left;continue}}if(a=o+r.start,a>n){r.start+=l,r.end+=l,r.delta+=l,(r.delta<-1073741824||r.delta>1073741824)&&(t.requestNormalizeDelta=!0),Ss(r,!0);continue}if(Ss(r,!0),r.right!==_r&&!Ru(r.right)){o+=r.delta,r=r.right;continue}}Ss(t.root,!1)}function Ixi(t,e){let n=t.root;const i=[];let r=0;for(;n!==_r;){if(Ru(n)){Ss(n.left,!1),Ss(n.right,!1),n=n.parent;continue}if(n.left!==_r&&!Ru(n.left)){n=n.left;continue}if(n.ownerId===e&&(i[r++]=n),Ss(n,!0),n.right!==_r&&!Ru(n.right)){n=n.right;continue}}return Ss(t.root,!1),i}function Axi(t){let e=t.root;const n=[];let i=0;for(;e!==_r;){if(Ru(e)){Ss(e.left,!1),Ss(e.right,!1),e=e.parent;continue}if(e.left!==_r&&!Ru(e.left)){e=e.left;continue}if(e.right!==_r&&!Ru(e.right)){e=e.right;continue}n[i++]=e,Ss(e,!0)}return Ss(t.root,!1),n}function Rxi(t,e,n,i,r){let o=t.root,s=0,a=0,l=0;const c=[];let u=0;for(;o!==_r;){if(Ru(o)){Ss(o.left,!1),Ss(o.right,!1),o===o.parent.right&&(s-=o.parent.delta),o=o.parent;continue}if(o.left!==_r&&!Ru(o.left)){o=o.left;continue}a=s+o.start,l=s+o.end,o.setCachedOffsets(a,l,i);let d=!0;if(e&&o.ownerId&&o.ownerId!==e&&(d=!1),n&&Fjt(o)&&(d=!1),r&&!$jt(o)&&(d=!1),d&&(c[u++]=o),Ss(o,!0),o.right!==_r&&!Ru(o.right)){s+=o.delta,o=o.right;continue}}return Ss(t.root,!1),c}function Pxi(t,e,n,i,r,o,s){let a=t.root,l=0,c=0,u=0,d=0;const h=[];let f=0;for(;a!==_r;){if(Ru(a)){Ss(a.left,!1),Ss(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;continue}if(!Ru(a.left)){if(c=l+a.maxEnd,c<e){Ss(a,!0);continue}if(a.left!==_r){a=a.left;continue}}if(u=l+a.start,u>n){Ss(a,!0);continue}if(d=l+a.end,d>=e){a.setCachedOffsets(u,d,o);let m=!0;i&&a.ownerId&&a.ownerId!==i&&(m=!1),r&&Fjt(a)&&(m=!1),s&&!$jt(a)&&(m=!1),m&&(h[f++]=a)}if(Ss(a,!0),a.right!==_r&&!Ru(a.right)){l+=a.delta,a=a.right;continue}}return Ss(t.root,!1),h}function Kat(t,e){if(t.root===_r)return e.parent=_r,e.left=_r,e.right=_r,As(e,0),t.root=e,t.root;Oxi(t,e),YN(e.parent);let n=e;for(;n!==t.root&&of(n.parent)===1;)if(n.parent===n.parent.parent.left){const i=n.parent.parent.right;of(i)===1?(As(n.parent,0),As(i,0),As(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&(n=n.parent,eB(t,n)),As(n.parent,0),As(n.parent.parent,1),tB(t,n.parent.parent))}else{const i=n.parent.parent.left;of(i)===1?(As(n.parent,0),As(i,0),As(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&(n=n.parent,tB(t,n)),As(n.parent,0),As(n.parent.parent,1),eB(t,n.parent.parent))}return As(t.root,0),e}function Oxi(t,e){let n=0,i=t.root;const r=e.start,o=e.end;for(;;)if(Fxi(r,o,i.start+n,i.end+n)<0)if(i.left===_r){e.start-=n,e.end-=n,e.maxEnd-=n,i.left=e;break}else i=i.left;else if(i.right===_r){e.start-=n+i.delta,e.end-=n+i.delta,e.maxEnd-=n+i.delta,i.right=e;break}else n+=i.delta,i=i.right;e.parent=i,e.left=_r,e.right=_r,As(e,1)}function qat(t,e){let n,i;if(e.left===_r?(n=e.right,i=e,n.delta+=e.delta,(n.delta<-1073741824||n.delta>1073741824)&&(t.requestNormalizeDelta=!0),n.start+=e.delta,n.end+=e.delta):e.right===_r?(n=e.left,i=e):(i=jxi(e.right),n=i.right,n.start+=i.delta,n.end+=i.delta,n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(t.requestNormalizeDelta=!0),i.start+=e.delta,i.end+=e.delta,i.delta=e.delta,(i.delta<-1073741824||i.delta>1073741824)&&(t.requestNormalizeDelta=!0)),i===t.root){t.root=n,As(n,0),e.detach(),u1e(),vk(n),t.root.parent=_r;return}const r=of(i)===1;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===e?n.parent=i.parent:(i.parent===e?n.parent=i:n.parent=i.parent,i.left=e.left,i.right=e.right,i.parent=e.parent,As(i,of(e)),e===t.root?t.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left!==_r&&(i.left.parent=i),i.right!==_r&&(i.right.parent=i)),e.detach(),r){YN(n.parent),i!==e&&(YN(i),YN(i.parent)),u1e();return}YN(n),YN(n.parent),i!==e&&(YN(i),YN(i.parent));let o;for(;n!==t.root&&of(n)===0;)n===n.parent.left?(o=n.parent.right,of(o)===1&&(As(o,0),As(n.parent,1),eB(t,n.parent),o=n.parent.right),of(o.left)===0&&of(o.right)===0?(As(o,1),n=n.parent):(of(o.right)===0&&(As(o.left,0),As(o,1),tB(t,o),o=n.parent.right),As(o,of(n.parent)),As(n.parent,0),As(o.right,0),eB(t,n.parent),n=t.root)):(o=n.parent.left,of(o)===1&&(As(o,0),As(n.parent,1),tB(t,n.parent),o=n.parent.left),of(o.left)===0&&of(o.right)===0?(As(o,1),n=n.parent):(of(o.left)===0&&(As(o.right,0),As(o,1),eB(t,o),o=n.parent.left),As(o,of(n.parent)),As(n.parent,0),As(o.left,0),tB(t,n.parent),n=t.root));As(n,0),u1e()}function jxi(t){for(;t.left!==_r;)t=t.left;return t}function u1e(){_r.parent=_r,_r.delta=0,_r.start=0,_r.end=0}function eB(t,e){const n=e.right;n.delta+=e.delta,(n.delta<-1073741824||n.delta>1073741824)&&(t.requestNormalizeDelta=!0),n.start+=e.delta,n.end+=e.delta,e.right=n.left,n.left!==_r&&(n.left.parent=e),n.parent=e.parent,e.parent===_r?t.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left=e,e.parent=n,vk(e),vk(n)}function tB(t,e){const n=e.left;e.delta-=n.delta,(e.delta<-1073741824||e.delta>1073741824)&&(t.requestNormalizeDelta=!0),e.start-=n.delta,e.end-=n.delta,e.left=n.right,n.right!==_r&&(n.right.parent=e),n.parent=e.parent,e.parent===_r?t.root=n:e===e.parent.right?e.parent.right=n:e.parent.left=n,n.right=e,e.parent=n,vk(e),vk(n)}function Bjt(t){let e=t.end;if(t.left!==_r){const n=t.left.maxEnd;n>e&&(e=n)}if(t.right!==_r){const n=t.right.maxEnd+t.delta;n>e&&(e=n)}return e}function vk(t){t.maxEnd=Bjt(t)}function YN(t){for(;t!==_r;){const e=Bjt(t);if(t.maxEnd===e)return;t.maxEnd=e,t=t.parent}}function Fxi(t,e,n,i){return t===n?e-i:t-n}class DTe{constructor(e,n){this.piece=e,this.color=n,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==Xi)return RVe(this.right);let e=this;for(;e.parent!==Xi&&e.parent.left!==e;)e=e.parent;return e.parent===Xi?Xi:e.parent}prev(){if(this.left!==Xi)return zjt(this.left);let e=this;for(;e.parent!==Xi&&e.parent.right!==e;)e=e.parent;return e.parent===Xi?Xi:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const Xi=new DTe(null,0);Xi.parent=Xi;Xi.left=Xi;Xi.right=Xi;Xi.color=0;function RVe(t){for(;t.left!==Xi;)t=t.left;return t}function zjt(t){for(;t.right!==Xi;)t=t.right;return t}function PVe(t){return t===Xi?0:t.size_left+t.piece.length+PVe(t.right)}function OVe(t){return t===Xi?0:t.lf_left+t.piece.lineFeedCnt+OVe(t.right)}function d1e(){Xi.parent=Xi}function nB(t,e){const n=e.right;n.size_left+=e.size_left+(e.piece?e.piece.length:0),n.lf_left+=e.lf_left+(e.piece?e.piece.lineFeedCnt:0),e.right=n.left,n.left!==Xi&&(n.left.parent=e),n.parent=e.parent,e.parent===Xi?t.root=n:e.parent.left===e?e.parent.left=n:e.parent.right=n,n.left=e,e.parent=n}function iB(t,e){const n=e.left;e.left=n.right,n.right!==Xi&&(n.right.parent=e),n.parent=e.parent,e.size_left-=n.size_left+(n.piece?n.piece.length:0),e.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),e.parent===Xi?t.root=n:e===e.parent.right?e.parent.right=n:e.parent.left=n,n.right=e,e.parent=n}function wQ(t,e){let n,i;if(e.left===Xi?(i=e,n=i.right):e.right===Xi?(i=e,n=i.left):(i=RVe(e.right),n=i.right),i===t.root){t.root=n,n.color=0,e.detach(),d1e(),t.root.parent=Xi;return}const r=i.color===1;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===e?(n.parent=i.parent,Z7(t,n)):(i.parent===e?n.parent=i:n.parent=i.parent,Z7(t,n),i.left=e.left,i.right=e.right,i.parent=e.parent,i.color=e.color,e===t.root?t.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left!==Xi&&(i.left.parent=i),i.right!==Xi&&(i.right.parent=i),i.size_left=e.size_left,i.lf_left=e.lf_left,Z7(t,i)),e.detach(),n.parent.left===n){const s=PVe(n),a=OVe(n);if(s!==n.parent.size_left||a!==n.parent.lf_left){const l=s-n.parent.size_left,c=a-n.parent.lf_left;n.parent.size_left=s,n.parent.lf_left=a,L1(t,n.parent,l,c)}}if(Z7(t,n.parent),r){d1e();return}let o;for(;n!==t.root&&n.color===0;)n===n.parent.left?(o=n.parent.right,o.color===1&&(o.color=0,n.parent.color=1,nB(t,n.parent),o=n.parent.right),o.left.color===0&&o.right.color===0?(o.color=1,n=n.parent):(o.right.color===0&&(o.left.color=0,o.color=1,iB(t,o),o=n.parent.right),o.color=n.parent.color,n.parent.color=0,o.right.color=0,nB(t,n.parent),n=t.root)):(o=n.parent.left,o.color===1&&(o.color=0,n.parent.color=1,iB(t,n.parent),o=n.parent.left),o.left.color===0&&o.right.color===0?(o.color=1,n=n.parent):(o.left.color===0&&(o.right.color=0,o.color=1,nB(t,o),o=n.parent.left),o.color=n.parent.color,n.parent.color=0,o.left.color=0,iB(t,n.parent),n=t.root));n.color=0,d1e()}function Gat(t,e){for(Z7(t,e);e!==t.root&&e.parent.color===1;)if(e.parent===e.parent.parent.left){const n=e.parent.parent.right;n.color===1?(e.parent.color=0,n.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.right&&(e=e.parent,nB(t,e)),e.parent.color=0,e.parent.parent.color=1,iB(t,e.parent.parent))}else{const n=e.parent.parent.left;n.color===1?(e.parent.color=0,n.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.left&&(e=e.parent,iB(t,e)),e.parent.color=0,e.parent.parent.color=1,nB(t,e.parent.parent))}t.root.color=0}function L1(t,e,n,i){for(;e!==t.root&&e!==Xi;)e.parent.left===e&&(e.parent.size_left+=n,e.parent.lf_left+=i),e=e.parent}function Z7(t,e){let n=0,i=0;if(e!==t.root){for(;e!==t.root&&e===e.parent.right;)e=e.parent;if(e!==t.root)for(e=e.parent,n=PVe(e.left)-e.size_left,i=OVe(e.left)-e.lf_left,e.size_left+=n,e.lf_left+=i;e!==t.root&&(n!==0||i!==0);)e.parent.left===e&&(e.parent.size_left+=n,e.parent.lf_left+=i),e=e.parent}}const g1=65535;function Hjt(t){let e;return t[t.length-1]<65536?e=new Uint16Array(t.length):e=new Uint32Array(t.length),e.set(t,0),e}class $xi{constructor(e,n,i,r,o){this.lineStarts=e,this.cr=n,this.lf=i,this.crlf=r,this.isBasicASCII=o}}function A1(t,e=!0){const n=[0];let i=1;for(let r=0,o=t.length;r<o;r++){const s=t.charCodeAt(r);s===13?r+1<o&&t.charCodeAt(r+1)===10?(n[i++]=r+2,r++):n[i++]=r+1:s===10&&(n[i++]=r+1)}return e?Hjt(n):n}function Vxi(t,e){t.length=0,t[0]=0;let n=1,i=0,r=0,o=0,s=!0;for(let l=0,c=e.length;l<c;l++){const u=e.charCodeAt(l);u===13?l+1<c&&e.charCodeAt(l+1)===10?(o++,t[n++]=l+2,l++):(i++,t[n++]=l+1):u===10?(r++,t[n++]=l+1):s&&u!==9&&(u<32||u>126)&&(s=!1)}const a=new $xi(Hjt(t),i,r,o,s);return t.length=0,a}class Uf{constructor(e,n,i,r,o){this.bufferIndex=e,this.start=n,this.end=i,this.lineFeedCnt=r,this.length=o}}class uT{constructor(e,n){this.buffer=e,this.lineStarts=n}}class Bxi{constructor(e,n){this._pieces=[],this._tree=e,this._BOM=n,this._index=0,e.root!==Xi&&e.iterate(e.root,i=>(i!==Xi&&this._pieces.push(i.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class zxi{constructor(e){this._limit=e,this._cache=[]}get(e){for(let n=this._cache.length-1;n>=0;n--){const i=this._cache[n];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let n=this._cache.length-1;n>=0;n--){const i=this._cache[n];if(i.nodeStartLineNumber&&i.nodeStartLineNumber<e&&i.nodeStartLineNumber+i.node.piece.lineFeedCnt>=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let n=!1;const i=this._cache;for(let r=0;r<i.length;r++){const o=i[r];if(o.node.parent===null||o.nodeStartOffset>=e){i[r]=null,n=!0;continue}}if(n){const r=[];for(const o of i)o!==null&&r.push(o);this._cache=r}}}class Hxi{constructor(e,n,i){this.create(e,n,i)}create(e,n,i){this._buffers=[new uT("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=Xi,this._lineCnt=1,this._length=0,this._EOL=n,this._EOLLength=n.length,this._EOLNormalized=i;let r=null;for(let o=0,s=e.length;o<s;o++)if(e[o].buffer.length>0){e[o].lineStarts||(e[o].lineStarts=A1(e[o].buffer));const a=new Uf(o+1,{line:0,column:0},{line:e[o].lineStarts.length-1,column:e[o].buffer.length-e[o].lineStarts[e[o].lineStarts.length-1]},e[o].lineStarts.length-1,e[o].buffer.length);this._buffers.push(e[o]),r=this.rbInsertRight(r,a)}this._searchCache=new zxi(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const n=g1,i=n-Math.floor(n/3),r=i*2;let o="",s=0;const a=[];if(this.iterate(this.root,l=>{const c=this.getNodeContent(l),u=c.length;if(s<=i||s+u<r)return o+=c,s+=u,!0;const d=o.replace(/\r\n|\r|\n/g,e);return a.push(new uT(d,A1(d))),o=c,s=u,!0}),s>0){const l=o.replace(/\r\n|\r|\n/g,e);a.push(new uT(l,A1(l)))}this.create(a,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new Bxi(this,e)}getOffsetAt(e,n){let i=0,r=this.root;for(;r!==Xi;)if(r.left!==Xi&&r.lf_left+1>=e)r=r.left;else if(r.lf_left+r.piece.lineFeedCnt+1>=e){i+=r.size_left;const o=this.getAccumulatedValue(r,e-r.lf_left-2);return i+=o+n-1}else e-=r.lf_left+r.piece.lineFeedCnt,i+=r.size_left+r.piece.length,r=r.right;return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let n=this.root,i=0;const r=e;for(;n!==Xi;)if(n.size_left!==0&&n.size_left>=e)n=n.left;else if(n.size_left+n.piece.length>=e){const o=this.getIndexOf(n,e-n.size_left);if(i+=n.lf_left+o.index,o.index===0){const s=this.getOffsetAt(i+1,1),a=r-s;return new ot(i+1,a+1)}return new ot(i+1,o.remainder+1)}else if(e-=n.size_left+n.piece.length,i+=n.lf_left+n.piece.lineFeedCnt,n.right===Xi){const o=this.getOffsetAt(i+1,1),s=r-e-o;return new ot(i+1,s+1)}else n=n.right;return new ot(1,1)}getValueInRange(e,n){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const i=this.nodeAt2(e.startLineNumber,e.startColumn),r=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(i,r);return n?n!==this._EOL||!this._EOLNormalized?o.replace(/\r\n|\r|\n/g,n):n===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,n):o}getValueInRange2(e,n){if(e.node===n.node){const a=e.node,l=this._buffers[a.piece.bufferIndex].buffer,c=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return l.substring(c+e.remainder,c+n.remainder)}let i=e.node;const r=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let s=r.substring(o+e.remainder,o+i.piece.length);for(i=i.next();i!==Xi;){const a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===n.node){s+=a.substring(l,l+n.remainder);break}else s+=a.substr(l,i.piece.length);i=i.next()}return s}getLinesContent(){const e=[];let n=0,i="",r=!1;return this.iterate(this.root,o=>{if(o===Xi)return!0;const s=o.piece;let a=s.length;if(a===0)return!0;const l=this._buffers[s.bufferIndex].buffer,c=this._buffers[s.bufferIndex].lineStarts,u=s.start.line,d=s.end.line;let h=c[u]+s.start.column;if(r&&(l.charCodeAt(h)===10&&(h++,a--),e[n++]=i,i="",r=!1,a===0))return!0;if(u===d)return!this._EOLNormalized&&l.charCodeAt(h+a-1)===13?(r=!0,i+=l.substr(h,a-1)):i+=l.substr(h,a),!0;i+=this._EOLNormalized?l.substring(h,Math.max(h,c[u+1]-this._EOLLength)):l.substring(h,c[u+1]).replace(/(\r\n|\r|\n)$/,""),e[n++]=i;for(let f=u+1;f<d;f++)i=this._EOLNormalized?l.substring(c[f],c[f+1]-this._EOLLength):l.substring(c[f],c[f+1]).replace(/(\r\n|\r|\n)$/,""),e[n++]=i;return!this._EOLNormalized&&l.charCodeAt(c[d]+s.end.column-1)===13?(r=!0,s.end.column===0?n--:i=l.substr(c[d],s.end.column-1)):i=l.substr(c[d],s.end.column),!0}),r&&(e[n++]=i,i=""),e[n++]=i,e}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(e){return this._lastVisitedLine.lineNumber===e?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)}_getCharCode(e){if(e.remainder===e.node.piece.length){const n=e.node.next();if(!n)return 0;const i=this._buffers[n.piece.bufferIndex],r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.buffer.charCodeAt(r)}else{const n=this._buffers[e.node.piece.bufferIndex],r=this.offsetInBuffer(e.node.piece.bufferIndex,e.node.piece.start)+e.remainder;return n.buffer.charCodeAt(r)}}getLineCharCode(e,n){const i=this.nodeAt2(e,n+1);return this._getCharCode(i)}getLineLength(e){if(e===this.getLineCount()){const n=this.getOffsetAt(e,1);return this.getLength()-n}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength}findMatchesInNode(e,n,i,r,o,s,a,l,c,u,d){const h=this._buffers[e.piece.bufferIndex],f=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),m=this.offsetInBuffer(e.piece.bufferIndex,o),p=this.offsetInBuffer(e.piece.bufferIndex,s);let g;const y={line:0,column:0};let _,w;n._wordSeparators?(_=h.buffer.substring(m,p),w=C=>C+m,n.reset(0)):(_=h.buffer,w=C=>C,n.reset(m));do if(g=n.next(_),g){if(w(g.index)>=p)return u;this.positionInBuffer(e,w(g.index)-f,y);const C=this.getLineFeedCnt(e.piece.bufferIndex,o,y),N=y.line===o.line?y.column-o.column+r:y.column+1,E=N+g[0].length;if(d[u++]=iT(new ve(i+C,N,i+C,E),g,l),w(g.index)+g[0].length>=p||u>=c)return u}while(g);return u}findMatchesLineByLine(e,n,i,r){const o=[];let s=0;const a=new u4(n.wordSeparators,n.regex);let l=this.nodeAt2(e.startLineNumber,e.startColumn);if(l===null)return[];const c=this.nodeAt2(e.endLineNumber,e.endColumn);if(c===null)return[];let u=this.positionInBuffer(l.node,l.remainder);const d=this.positionInBuffer(c.node,c.remainder);if(l.node===c.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,u,d,n,i,r,s,o),o;let h=e.startLineNumber,f=l.node;for(;f!==c.node;){const p=this.getLineFeedCnt(f.piece.bufferIndex,u,f.piece.end);if(p>=1){const y=this._buffers[f.piece.bufferIndex].lineStarts,_=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start),w=y[u.line+p],C=h===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(f,a,h,C,u,this.positionInBuffer(f,w-_),n,i,r,s,o),s>=r)return o;h+=p}const g=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){const y=this.getLineContent(h).substring(g,e.endColumn-1);return s=this._findMatchesInLine(n,a,y,e.endLineNumber,g,s,o,i,r),o}if(s=this._findMatchesInLine(n,a,this.getLineContent(h).substr(g),h,g,s,o,i,r),s>=r)return o;h++,l=this.nodeAt2(h,1),f=l.node,u=this.positionInBuffer(l.node,l.remainder)}if(h===e.endLineNumber){const p=h===e.startLineNumber?e.startColumn-1:0,g=this.getLineContent(h).substring(p,e.endColumn-1);return s=this._findMatchesInLine(n,a,g,e.endLineNumber,p,s,o,i,r),o}const m=h===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(c.node,a,h,m,u,d,n,i,r,s,o),o}_findMatchesInLine(e,n,i,r,o,s,a,l,c){const u=e.wordSeparators;if(!l&&e.simpleSearch){const h=e.simpleSearch,f=h.length,m=i.length;let p=-f;for(;(p=i.indexOf(h,p+f))!==-1;)if((!u||B8e(u,i,m,p,f))&&(a[s++]=new kH(new ve(r,p+1+o,r,p+1+f+o),null),s>=c))return s;return s}let d;n.reset(0);do if(d=n.next(i),d&&(a[s++]=iT(new ve(r,d.index+1+o,r,d.index+1+d[0].length+o),d,l),s>=c))return s;while(d);return s}insert(e,n,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==Xi){const{node:r,remainder:o,nodeStartOffset:s}=this.nodeAt(e),a=r.piece,l=a.bufferIndex,c=this.positionInBuffer(r,o);if(r.piece.bufferIndex===0&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===e&&n.length<g1){this.appendToNode(r,n),this.computeBufferMetadata();return}if(s===e)this.insertContentToNodeLeft(n,r),this._searchCache.validate(e);else if(s+r.piece.length>e){const u=[];let d=new Uf(a.bufferIndex,c,a.end,this.getLineFeedCnt(a.bufferIndex,c,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,c));if(this.shouldCheckCRLF()&&this.endWithCR(n)&&this.nodeCharCodeAt(r,o)===10){const p={line:d.start.line+1,column:0};d=new Uf(d.bufferIndex,p,d.end,this.getLineFeedCnt(d.bufferIndex,p,d.end),d.length-1),n+=`
`}if(this.shouldCheckCRLF()&&this.startWithLF(n))if(this.nodeCharCodeAt(r,o-1)===13){const p=this.positionInBuffer(r,o-1);this.deleteNodeTail(r,p),n="\r"+n,r.piece.length===0&&u.push(r)}else this.deleteNodeTail(r,c);else this.deleteNodeTail(r,c);const h=this.createNewPieces(n);d.length>0&&this.rbInsertRight(r,d);let f=r;for(let m=0;m<h.length;m++)f=this.rbInsertRight(f,h[m]);this.deleteNodes(u)}else this.insertContentToNodeRight(n,r)}else{const r=this.createNewPieces(n);let o=this.rbInsertLeft(null,r[0]);for(let s=1;s<r.length;s++)o=this.rbInsertRight(o,r[s])}this.computeBufferMetadata()}delete(e,n){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",n<=0||this.root===Xi)return;const i=this.nodeAt(e),r=this.nodeAt(e+n),o=i.node,s=r.node;if(o===s){const h=this.positionInBuffer(o,i.remainder),f=this.positionInBuffer(o,r.remainder);if(i.nodeStartOffset===e){if(n===o.piece.length){const m=o.next();wQ(this,o),this.validateCRLFWithPrevNode(m),this.computeBufferMetadata();return}this.deleteNodeHead(o,f),this._searchCache.validate(e),this.validateCRLFWithPrevNode(o),this.computeBufferMetadata();return}if(i.nodeStartOffset+o.piece.length===e+n){this.deleteNodeTail(o,h),this.validateCRLFWithNextNode(o),this.computeBufferMetadata();return}this.shrinkNode(o,h,f),this.computeBufferMetadata();return}const a=[],l=this.positionInBuffer(o,i.remainder);this.deleteNodeTail(o,l),this._searchCache.validate(e),o.piece.length===0&&a.push(o);const c=this.positionInBuffer(s,r.remainder);this.deleteNodeHead(s,c),s.piece.length===0&&a.push(s);const u=o.next();for(let h=u;h!==Xi&&h!==s;h=h.next())a.push(h);const d=o.piece.length===0?o.prev():o;this.deleteNodes(a),this.validateCRLFWithNextNode(d),this.computeBufferMetadata()}insertContentToNodeLeft(e,n){const i=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(n)){const s=n.piece,a={line:s.start.line+1,column:0},l=new Uf(s.bufferIndex,a,s.end,this.getLineFeedCnt(s.bufferIndex,a,s.end),s.length-1);n.piece=l,e+=`
`,L1(this,n,-1,-1),n.piece.length===0&&i.push(n)}const r=this.createNewPieces(e);let o=this.rbInsertLeft(n,r[r.length-1]);for(let s=r.length-2;s>=0;s--)o=this.rbInsertLeft(o,r[s]);this.validateCRLFWithPrevNode(o),this.deleteNodes(i)}insertContentToNodeRight(e,n){this.adjustCarriageReturnFromNext(e,n)&&(e+=`
`);const i=this.createNewPieces(e),r=this.rbInsertRight(n,i[0]);let o=r;for(let s=1;s<i.length;s++)o=this.rbInsertRight(o,i[s]);this.validateCRLFWithPrevNode(r)}positionInBuffer(e,n,i){const r=e.piece,o=e.piece.bufferIndex,s=this._buffers[o].lineStarts,l=s[r.start.line]+r.start.column+n;let c=r.start.line,u=r.end.line,d=0,h=0,f=0;for(;c<=u&&(d=c+(u-c)/2|0,f=s[d],d!==u);)if(h=s[d+1],l<f)u=d-1;else if(l>=h)c=d+1;else break;return i?(i.line=d,i.column=l-f,null):{line:d,column:l-f}}getLineFeedCnt(e,n,i){if(i.column===0)return i.line-n.line;const r=this._buffers[e].lineStarts;if(i.line===r.length-1)return i.line-n.line;const o=r[i.line+1],s=r[i.line]+i.column;if(o>s+1)return i.line-n.line;const a=s-1;return this._buffers[e].buffer.charCodeAt(a)===13?i.line-n.line+1:i.line-n.line}offsetInBuffer(e,n){return this._buffers[e].lineStarts[n.line]+n.column}deleteNodes(e){for(let n=0;n<e.length;n++)wQ(this,e[n])}createNewPieces(e){if(e.length>g1){const u=[];for(;e.length>g1;){const h=e.charCodeAt(g1-1);let f;h===13||h>=55296&&h<=56319?(f=e.substring(0,g1-1),e=e.substring(g1-1)):(f=e.substring(0,g1),e=e.substring(g1));const m=A1(f);u.push(new Uf(this._buffers.length,{line:0,column:0},{line:m.length-1,column:f.length-m[m.length-1]},m.length-1,f.length)),this._buffers.push(new uT(f,m))}const d=A1(e);return u.push(new Uf(this._buffers.length,{line:0,column:0},{line:d.length-1,column:e.length-d[d.length-1]},d.length-1,e.length)),this._buffers.push(new uT(e,d)),u}let n=this._buffers[0].buffer.length;const i=A1(e,!1);let r=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===n&&n!==0&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},r=this._lastChangeBufferPos;for(let u=0;u<i.length;u++)i[u]+=n+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+="_"+e,n+=1}else{if(n!==0)for(let u=0;u<i.length;u++)i[u]+=n;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+=e}const o=this._buffers[0].buffer.length,s=this._buffers[0].lineStarts.length-1,a=o-this._buffers[0].lineStarts[s],l={line:s,column:a},c=new Uf(0,r,l,this.getLineFeedCnt(0,r,l),o-n);return this._lastChangeBufferPos=l,[c]}getLineRawContent(e,n=0){let i=this.root,r="";const o=this._searchCache.get2(e);if(o){i=o.node;const s=this.getAccumulatedValue(i,e-o.nodeStartLineNumber-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(o.nodeStartLineNumber+i.piece.lineFeedCnt===e)r=a.substring(l+s,l+i.piece.length);else{const c=this.getAccumulatedValue(i,e-o.nodeStartLineNumber);return a.substring(l+s,l+c-n)}}else{let s=0;const a=e;for(;i!==Xi;)if(i.left!==Xi&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){const l=this.getAccumulatedValue(i,e-i.lf_left-2),c=this.getAccumulatedValue(i,e-i.lf_left-1),u=this._buffers[i.piece.bufferIndex].buffer,d=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return s+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:s,nodeStartLineNumber:a-(e-1-i.lf_left)}),u.substring(d+l,d+c-n)}else if(i.lf_left+i.piece.lineFeedCnt===e-1){const l=this.getAccumulatedValue(i,e-i.lf_left-2),c=this._buffers[i.piece.bufferIndex].buffer,u=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);r=c.substring(u+l,u+i.piece.length);break}else e-=i.lf_left+i.piece.lineFeedCnt,s+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==Xi;){const s=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const a=this.getAccumulatedValue(i,0),l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return r+=s.substring(l,l+a-n),r}else{const a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);r+=s.substr(a,i.piece.length)}i=i.next()}return r}computeBufferMetadata(){let e=this.root,n=1,i=0;for(;e!==Xi;)n+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=n,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,n){const i=e.piece,r=this.positionInBuffer(e,n),o=r.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===n){const s=this.getLineFeedCnt(e.piece.bufferIndex,i.start,r);if(s!==o)return{index:s,remainder:0}}return{index:o,remainder:r.column}}getAccumulatedValue(e,n){if(n<0)return 0;const i=e.piece,r=this._buffers[i.bufferIndex].lineStarts,o=i.start.line+n+1;return o>i.end.line?r[i.end.line]+i.end.column-r[i.start.line]-i.start.column:r[o]-r[i.start.line]-i.start.column}deleteNodeTail(e,n){const i=e.piece,r=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.end),s=n,a=this.offsetInBuffer(i.bufferIndex,s),l=this.getLineFeedCnt(i.bufferIndex,i.start,s),c=l-r,u=a-o,d=i.length+u;e.piece=new Uf(i.bufferIndex,i.start,s,l,d),L1(this,e,u,c)}deleteNodeHead(e,n){const i=e.piece,r=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.start),s=n,a=this.getLineFeedCnt(i.bufferIndex,s,i.end),l=this.offsetInBuffer(i.bufferIndex,s),c=a-r,u=o-l,d=i.length+u;e.piece=new Uf(i.bufferIndex,s,i.end,a,d),L1(this,e,u,c)}shrinkNode(e,n,i){const r=e.piece,o=r.start,s=r.end,a=r.length,l=r.lineFeedCnt,c=n,u=this.getLineFeedCnt(r.bufferIndex,r.start,c),d=this.offsetInBuffer(r.bufferIndex,n)-this.offsetInBuffer(r.bufferIndex,o);e.piece=new Uf(r.bufferIndex,r.start,c,u,d),L1(this,e,d-a,u-l);const h=new Uf(r.bufferIndex,i,s,this.getLineFeedCnt(r.bufferIndex,i,s),this.offsetInBuffer(r.bufferIndex,s)-this.offsetInBuffer(r.bufferIndex,i)),f=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(f)}appendToNode(e,n){this.adjustCarriageReturnFromNext(n,e)&&(n+=`
`);const i=this.shouldCheckCRLF()&&this.startWithLF(n)&&this.endWithCR(e),r=this._buffers[0].buffer.length;this._buffers[0].buffer+=n;const o=A1(n,!1);for(let f=0;f<o.length;f++)o[f]+=r;if(i){const f=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:r-f}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(o.slice(1));const s=this._buffers[0].lineStarts.length-1,a=this._buffers[0].buffer.length-this._buffers[0].lineStarts[s],l={line:s,column:a},c=e.piece.length+n.length,u=e.piece.lineFeedCnt,d=this.getLineFeedCnt(0,e.piece.start,l),h=d-u;e.piece=new Uf(e.piece.bufferIndex,e.piece.start,l,d,c),this._lastChangeBufferPos=l,L1(this,e,n.length,h)}nodeAt(e){let n=this.root;const i=this._searchCache.get(e);if(i)return{node:i.node,nodeStartOffset:i.nodeStartOffset,remainder:e-i.nodeStartOffset};let r=0;for(;n!==Xi;)if(n.size_left>e)n=n.left;else if(n.size_left+n.piece.length>=e){r+=n.size_left;const o={node:n,remainder:e-n.size_left,nodeStartOffset:r};return this._searchCache.set(o),o}else e-=n.size_left+n.piece.length,r+=n.size_left+n.piece.length,n=n.right;return null}nodeAt2(e,n){let i=this.root,r=0;for(;i!==Xi;)if(i.left!==Xi&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1);return r+=i.size_left,{node:i,remainder:Math.min(o+n-1,s),nodeStartOffset:r}}else if(i.lf_left+i.piece.lineFeedCnt===e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2);if(o+n-1<=i.piece.length)return{node:i,remainder:o+n-1,nodeStartOffset:r};n-=i.piece.length-o;break}else e-=i.lf_left+i.piece.lineFeedCnt,r+=i.size_left+i.piece.length,i=i.right;for(i=i.next();i!==Xi;){if(i.piece.lineFeedCnt>0){const o=this.getAccumulatedValue(i,0),s=this.offsetOfNode(i);return{node:i,remainder:Math.min(n-1,o),nodeStartOffset:s}}else if(i.piece.length>=n-1){const o=this.offsetOfNode(i);return{node:i,remainder:n-1,nodeStartOffset:o}}else n-=i.piece.length;i=i.next()}return null}nodeCharCodeAt(e,n){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],r=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+n;return i.buffer.charCodeAt(r)}offsetOfNode(e){if(!e)return 0;let n=e.size_left;for(;e!==this.root;)e.parent.right===e&&(n+=e.parent.size_left+e.parent.piece.length),e=e.parent;return n}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===`
`)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===Xi||e.piece.lineFeedCnt===0)return!1;const n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,r=n.start.line,o=i[r]+n.start.column;return r===i.length-1||i[r+1]>o+1?!1:this._buffers[n.bufferIndex].buffer.charCodeAt(o)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===Xi||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const n=e.prev();this.endWithCR(n)&&this.fixCRLF(n,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const n=e.next();this.startWithLF(n)&&this.fixCRLF(e,n)}}fixCRLF(e,n){const i=[],r=this._buffers[e.piece.bufferIndex].lineStarts;let o;e.piece.end.column===0?o={line:e.piece.end.line-1,column:r[e.piece.end.line]-r[e.piece.end.line-1]-1}:o={line:e.piece.end.line,column:e.piece.end.column-1};const s=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new Uf(e.piece.bufferIndex,e.piece.start,o,a,s),L1(this,e,-1,-1),e.piece.length===0&&i.push(e);const l={line:n.piece.start.line+1,column:0},c=n.piece.length-1,u=this.getLineFeedCnt(n.piece.bufferIndex,l,n.piece.end);n.piece=new Uf(n.piece.bufferIndex,l,n.piece.end,u,c),L1(this,n,-1,-1),n.piece.length===0&&i.push(n);const d=this.createNewPieces(`\r
`);this.rbInsertRight(e,d[0]);for(let h=0;h<i.length;h++)wQ(this,i[h])}adjustCarriageReturnFromNext(e,n){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const i=n.next();if(this.startWithLF(i)){if(e+=`
`,i.piece.length===1)wQ(this,i);else{const r=i.piece,o={line:r.start.line+1,column:0},s=r.length-1,a=this.getLineFeedCnt(r.bufferIndex,o,r.end);i.piece=new Uf(r.bufferIndex,o,r.end,a,s),L1(this,i,-1,-1)}return!0}}return!1}iterate(e,n){if(e===Xi)return n(Xi);const i=this.iterate(e.left,n);return i&&n(e)&&this.iterate(e.right,n)}getNodeContent(e){if(e===Xi)return"";const n=this._buffers[e.piece.bufferIndex],i=e.piece,r=this.offsetInBuffer(i.bufferIndex,i.start),o=this.offsetInBuffer(i.bufferIndex,i.end);return n.buffer.substring(r,o)}getPieceContent(e){const n=this._buffers[e.bufferIndex],i=this.offsetInBuffer(e.bufferIndex,e.start),r=this.offsetInBuffer(e.bufferIndex,e.end);return n.buffer.substring(i,r)}rbInsertRight(e,n){const i=new DTe(n,1);if(i.left=Xi,i.right=Xi,i.parent=Xi,i.size_left=0,i.lf_left=0,this.root===Xi)this.root=i,i.color=0;else if(e.right===Xi)e.right=i,i.parent=e;else{const o=RVe(e.right);o.left=i,i.parent=o}return Gat(this,i),i}rbInsertLeft(e,n){const i=new DTe(n,1);if(i.left=Xi,i.right=Xi,i.parent=Xi,i.size_left=0,i.lf_left=0,this.root===Xi)this.root=i,i.color=0;else if(e.left===Xi)e.left=i,i.parent=e;else{const r=zjt(e.left);r.right=i,i.parent=r}return Gat(this,i),i}}class T3 extends ct{constructor(e,n,i,r,o,s,a){super(),this._onDidChangeContent=this._register(new st),this._BOM=n,this._mightContainNonBasicASCII=!s,this._mightContainRTL=r,this._mightContainUnusualLineTerminators=o,this._pieceTree=new Hxi(e,i,a)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,n){return this._pieceTree.getOffsetAt(e,n)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,n){const i=e+n,r=this.getPositionAt(e),o=this.getPositionAt(i);return new ve(r.lineNumber,r.column,o.lineNumber,o.column)}getValueInRange(e,n=0){if(e.isEmpty())return"";const i=this._getEndOfLine(n);return this._pieceTree.getValueInRange(e,i)}getValueLengthInRange(e,n=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;const i=this.getOffsetAt(e.startLineNumber,e.startColumn),r=this.getOffsetAt(e.endLineNumber,e.endColumn);let o=0;const s=this._getEndOfLine(n),a=this.getEOL();if(s.length!==a.length){const l=s.length-a.length,c=e.endLineNumber-e.startLineNumber;o=l*c}return r-i+o}getCharacterCountInRange(e,n=0){if(this._mightContainNonBasicASCII){let i=0;const r=e.startLineNumber,o=e.endLineNumber;for(let s=r;s<=o;s++){const a=this.getLineContent(s),l=s===r?e.startColumn-1:0,c=s===o?e.endColumn-1:a.length;for(let u=l;u<c;u++)sc(a.charCodeAt(u))?(i=i+1,u=u+1):i=i+1}return i+=this._getEndOfLine(n).length*(o-r),i}return this.getValueLengthInRange(e,n)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,n){return this._pieceTree.getLineCharCode(e,n)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineFirstNonWhitespaceColumn(e){const n=qd(this.getLineContent(e));return n===-1?0:n+1}getLineLastNonWhitespaceColumn(e){const n=w0(this.getLineContent(e));return n===-1?0:n+2}_getEndOfLine(e){switch(e){case 1:return`
`;case 2:return`\r
`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,n,i){let r=this._mightContainRTL,o=this._mightContainUnusualLineTerminators,s=this._mightContainNonBasicASCII,a=!0,l=[];for(let p=0;p<e.length;p++){const g=e[p];a&&g._isTracked&&(a=!1);const y=g.range;if(g.text){let E=!0;s||(E=!gq(g.text),s=E),!r&&E&&(r=n5(g.text)),!o&&E&&(o=h4t(g.text))}let _="",w=0,C=0,N=0;if(g.text){let E;[w,C,N,E]=gk(g.text);const D=this.getEOL();E===0||E===(D===`\r
`?2:1)?_=g.text:_=g.text.replace(/\r\n|\r|\n/g,D)}l[p]={sortIndex:p,identifier:g.identifier||null,range:y,rangeOffset:this.getOffsetAt(y.startLineNumber,y.startColumn),rangeLength:this.getValueLengthInRange(y),text:_,eolCount:w,firstLineLength:C,lastLineLength:N,forceMoveMarkers:!!g.forceMoveMarkers,isAutoWhitespaceEdit:g.isAutoWhitespaceEdit||!1}}l.sort(T3._sortOpsAscending);let c=!1;for(let p=0,g=l.length-1;p<g;p++){const y=l[p].range.getEndPosition(),_=l[p+1].range.getStartPosition();if(_.isBeforeOrEqual(y)){if(_.isBefore(y))throw new Error("Overlapping ranges are not allowed!");c=!0}}a&&(l=this._reduceOperations(l));const u=i||n?T3._getInverseEditRanges(l):[],d=[];if(n)for(let p=0;p<l.length;p++){const g=l[p],y=u[p];if(g.isAutoWhitespaceEdit&&g.range.isEmpty())for(let _=y.startLineNumber;_<=y.endLineNumber;_++){let w="";_===y.startLineNumber&&(w=this.getLineContent(g.range.startLineNumber),qd(w)!==-1)||d.push({lineNumber:_,oldContent:w})}}let h=null;if(i){let p=0;h=[];for(let g=0;g<l.length;g++){const y=l[g],_=u[g],w=this.getValueInRange(y.range),C=y.rangeOffset+p;p+=y.text.length-w.length,h[g]={sortIndex:y.sortIndex,identifier:y.identifier,range:_,text:w,textChange:new xu(y.rangeOffset,w,C,y.text)}}c||h.sort((g,y)=>g.sortIndex-y.sortIndex)}this._mightContainRTL=r,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=s;const f=this._doApplyEdits(l);let m=null;if(n&&d.length>0){d.sort((p,g)=>g.lineNumber-p.lineNumber),m=[];for(let p=0,g=d.length;p<g;p++){const y=d[p].lineNumber;if(p>0&&d[p-1].lineNumber===y)continue;const _=d[p].oldContent,w=this.getLineContent(y);w.length===0||w===_||qd(w)!==-1||m.push(y)}}return this._onDidChangeContent.fire(),new hpi(h,f,m)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let n=!1;const i=e[0].range,r=e[e.length-1].range,o=new ve(i.startLineNumber,i.startColumn,r.endLineNumber,r.endColumn);let s=i.startLineNumber,a=i.startColumn;const l=[];for(let f=0,m=e.length;f<m;f++){const p=e[f],g=p.range;n=n||p.forceMoveMarkers,l.push(this.getValueInRange(new ve(s,a,g.startLineNumber,g.startColumn))),p.text.length>0&&l.push(p.text),s=g.endLineNumber,a=g.endColumn}const c=l.join(""),[u,d,h]=gk(c);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:c,eolCount:u,firstLineLength:d,lastLineLength:h,forceMoveMarkers:n,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(T3._sortOpsDescending);const n=[];for(let i=0;i<e.length;i++){const r=e[i],o=r.range.startLineNumber,s=r.range.startColumn,a=r.range.endLineNumber,l=r.range.endColumn;if(o===a&&s===l&&r.text.length===0)continue;r.text?(this._pieceTree.delete(r.rangeOffset,r.rangeLength),this._pieceTree.insert(r.rangeOffset,r.text,!0)):this._pieceTree.delete(r.rangeOffset,r.rangeLength);const c=new ve(o,s,a,l);n.push({range:c,rangeLength:r.rangeLength,text:r.text,rangeOffset:r.rangeOffset,forceMoveMarkers:r.forceMoveMarkers})}return n}findMatchesLineByLine(e,n,i,r){return this._pieceTree.findMatchesLineByLine(e,n,i,r)}static _getInverseEditRanges(e){const n=[];let i=0,r=0,o=null;for(let s=0,a=e.length;s<a;s++){const l=e[s];let c,u;o?o.range.endLineNumber===l.range.startLineNumber?(c=i,u=r+(l.range.startColumn-o.range.endColumn)):(c=i+(l.range.startLineNumber-o.range.endLineNumber),u=l.range.startColumn):(c=l.range.startLineNumber,u=l.range.startColumn);let d;if(l.text.length>0){const h=l.eolCount+1;h===1?d=new ve(c,u,c,u+l.firstLineLength):d=new ve(c,u,c+h-1,l.lastLineLength+1)}else d=new ve(c,u,c,u);i=d.endLineNumber,r=d.endColumn,n.push(d),o=l}return n}static _sortOpsAscending(e,n){const i=ve.compareRangesUsingEnds(e.range,n.range);return i===0?e.sortIndex-n.sortIndex:i}static _sortOpsDescending(e,n){const i=ve.compareRangesUsingEnds(e.range,n.range);return i===0?n.sortIndex-e.sortIndex:-i}}class Wxi{constructor(e,n,i,r,o,s,a,l,c){this._chunks=e,this._bom=n,this._cr=i,this._lf=r,this._crlf=o,this._containsRTL=s,this._containsUnusualLineTerminators=a,this._isBasicASCII=l,this._normalizeEOL=c}_getEOL(e){const n=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return n===0?e===1?`
`:`\r
`:i>n/2?`\r
`:`
`}create(e){const n=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&(n===`\r
`&&(this._cr>0||this._lf>0)||n===`
`&&(this._cr>0||this._crlf>0)))for(let o=0,s=i.length;o<s;o++){const a=i[o].buffer.replace(/\r\n|\r|\n/g,n),l=A1(a);i[o]=new uT(a,l)}const r=new T3(i,this._bom,n,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:r,disposable:r}}}class Wjt{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(e){if(e.length===0)return;this.chunks.length===0&&N8e(e)&&(this.BOM=thi,e=e.substr(1));const n=e.charCodeAt(e.length-1);n===13||n>=55296&&n<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=n):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=n)}_acceptChunk1(e,n){!n&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const n=Vxi(this._tmpLineStarts,e);this.chunks.push(new uT(e,n.lineStarts)),this.cr+=n.cr,this.lf+=n.lf,this.crlf+=n.crlf,n.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=n5(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=h4t(e)))}finish(e=!0){return this._finish(),new Wxi(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const n=A1(e.buffer);e.lineStarts=n,this._previousChar===13&&this.cr++}}}class Uxi{constructor(e){this._default=e,this._store=[]}get(e){return e<this._store.length?this._store[e]:this._default}set(e,n){for(;e>=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=n}replace(e,n,i){if(e>=this._store.length)return;if(n===0){this.insert(e,i);return}else if(i===0){this.delete(e,n);return}const r=this._store.slice(0,e),o=this._store.slice(e+n),s=Kxi(i,this._default);this._store=r.concat(s,o)}delete(e,n){n===0||e>=this._store.length||this._store.splice(e,n)}insert(e,n){if(n===0||e>=this._store.length)return;const i=[];for(let r=0;r<n;r++)i[r]=this._default;this._store=Nfe(this._store,e,i)}}function Kxi(t,e){const n=[];for(let i=0;i<t;i++)n[i]=e;return n}class qxi{get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}constructor(e,n){this._startLineNumber=e,this._tokens=n}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}class kTe{constructor(){this._tokens=[]}add(e,n){if(this._tokens.length>0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e){i.appendLineTokens(n);return}}this._tokens.push(new qxi(e,[n]))}finalize(){return this._tokens}}class Gxi{constructor(e,n){this.tokenizationSupport=n,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new MTe(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}class Yxi extends Gxi{constructor(e,n,i,r){super(e,n),this._textModel=i,this._languageIdCodec=r}updateTokensUntilLine(e,n){const i=this._textModel.getLanguageId();for(;;){const r=this.getFirstInvalidLine();if(!r||r.lineNumber>n)break;const o=this._textModel.getLineContent(r.lineNumber),s=YV(this._languageIdCodec,i,this.tokenizationSupport,o,!0,r.startState);e.add(r.lineNumber,s.tokens),this.store.setEndState(r.lineNumber,s.endState)}}getTokenTypeIfInsertingCharacter(e,n){const i=this.getStartState(e.lineNumber);if(!i)return 0;const r=this._textModel.getLanguageId(),o=this._textModel.getLineContent(e.lineNumber),s=o.substring(0,e.column-1)+n+o.substring(e.column-1),a=YV(this._languageIdCodec,r,this.tokenizationSupport,s,!0,i),l=new $u(a.tokens,s,this._languageIdCodec);if(l.getCount()===0)return 0;const c=l.findTokenIndexAtOffset(e.column-1);return l.getStandardTokenType(c)}tokenizeLineWithEdit(e,n,i){const r=e.lineNumber,o=e.column,s=this.getStartState(r);if(!s)return null;const a=this._textModel.getLineContent(r),l=a.substring(0,o-1)+i+a.substring(o-1+n),c=this._textModel.getLanguageIdAtPosition(r,0),u=YV(this._languageIdCodec,c,this.tokenizationSupport,l,!0,s);return new $u(u.tokens,l,this._languageIdCodec)}hasAccurateTokensForLine(e){const n=this.store.getFirstInvalidEndStateLineNumberOrMax();return e<n}isCheapToTokenize(e){const n=this.store.getFirstInvalidEndStateLineNumberOrMax();return e<n||e===n&&this._textModel.getLineLength(e)<2048}tokenizeHeuristically(e,n,i){if(i<=this.store.getFirstInvalidEndStateLineNumberOrMax())return{heuristicTokens:!1};if(n<=this.store.getFirstInvalidEndStateLineNumberOrMax())return this.updateTokensUntilLine(e,i),{heuristicTokens:!1};let r=this.guessStartState(n);const o=this._textModel.getLanguageId();for(let s=n;s<=i;s++){const a=this._textModel.getLineContent(s),l=YV(this._languageIdCodec,o,this.tokenizationSupport,a,!0,r);e.add(s,l.tokens),r=l.endState}return{heuristicTokens:!0}}guessStartState(e){let n=this._textModel.getLineFirstNonWhitespaceColumn(e);const i=[];let r=null;for(let a=e-1;n>1&&a>=1;a--){const l=this._textModel.getLineFirstNonWhitespaceColumn(a);if(l!==0&&l<n&&(i.push(this._textModel.getLineContent(a)),n=l,r=this.getStartState(a),r))break}r||(r=this.tokenizationSupport.getInitialState()),i.reverse();const o=this._textModel.getLanguageId();let s=r;for(const a of i)s=YV(this._languageIdCodec,o,this.tokenizationSupport,a,!1,s).endState;return s}}class MTe{constructor(e){this.lineCount=e,this._tokenizationStateStore=new Xxi,this._invalidEndStatesLineNumbers=new Zxi,this._invalidEndStatesLineNumbers.addRange(new dr(1,e+1))}getEndState(e){return this._tokenizationStateStore.getEndState(e)}setEndState(e,n){if(!n)throw new co("Cannot set null/undefined state");this._invalidEndStatesLineNumbers.delete(e);const i=this._tokenizationStateStore.setEndState(e,n);return i&&e<this.lineCount&&this._invalidEndStatesLineNumbers.addRange(new dr(e+1,e+2)),i}acceptChange(e,n){this.lineCount+=n-e.length,this._tokenizationStateStore.acceptChange(e,n),this._invalidEndStatesLineNumbers.addRangeAndResize(new dr(e.startLineNumber,e.endLineNumberExclusive),n)}acceptChanges(e){for(const n of e){const[i]=gk(n.text);this.acceptChange(new Ki(n.range.startLineNumber,n.range.endLineNumber+1),i+1)}}invalidateEndStateRange(e){this._invalidEndStatesLineNumbers.addRange(new dr(e.startLineNumber,e.endLineNumberExclusive))}getFirstInvalidEndStateLineNumber(){return this._invalidEndStatesLineNumbers.min}getFirstInvalidEndStateLineNumberOrMax(){return this.getFirstInvalidEndStateLineNumber()||Number.MAX_SAFE_INTEGER}allStatesValid(){return this._invalidEndStatesLineNumbers.min===null}getStartState(e,n){return e===1?n:this.getEndState(e-1)}getFirstInvalidLine(e){const n=this.getFirstInvalidEndStateLineNumber();if(n===null)return null;const i=this.getStartState(n,e);if(!i)throw new co("Start state must be defined");return{lineNumber:n,startState:i}}}class Xxi{constructor(){this._lineEndStates=new Uxi(null)}getEndState(e){return this._lineEndStates.get(e)}setEndState(e,n){const i=this._lineEndStates.get(e);return i&&i.equals(n)?!1:(this._lineEndStates.set(e,n),!0)}acceptChange(e,n){let i=e.length;n>0&&i>0&&(i--,n--),this._lineEndStates.replace(e.startLineNumber,i,n)}}class Zxi{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}delete(e){const n=this._ranges.findIndex(i=>i.contains(e));if(n!==-1){const i=this._ranges[n];i.start===e?i.endExclusive===e+1?this._ranges.splice(n,1):this._ranges[n]=new dr(e+1,i.endExclusive):i.endExclusive===e+1?this._ranges[n]=new dr(i.start,e):this._ranges.splice(n,1,new dr(i.start,e),new dr(e+1,i.endExclusive))}}addRange(e){dr.addRange(e,this._ranges)}addRangeAndResize(e,n){let i=0;for(;!(i>=this._ranges.length||e.start<=this._ranges[i].endExclusive);)i++;let r=i;for(;!(r>=this._ranges.length||e.endExclusive<this._ranges[r].start);)r++;const o=n-e.length;for(let s=r;s<this._ranges.length;s++)this._ranges[s]=this._ranges[s].delta(o);if(i===r){const s=new dr(e.start,e.start+n);s.isEmpty||this._ranges.splice(i,0,s)}else{const s=Math.min(e.start,this._ranges[i].start),a=Math.max(e.endExclusive,this._ranges[r-1].endExclusive),l=new dr(s,a+o);l.isEmpty?this._ranges.splice(i,r-i):this._ranges.splice(i,r-i,l)}}toString(){return this._ranges.map(e=>e.toString()).join(" + ")}}function YV(t,e,n,i,r,o){let s=null;if(n)try{s=n.tokenizeEncoded(i,r,o.clone())}catch(a){ji(a)}return s||(s=Gfe(t.encodeLanguageId(e),o)),$u.convertToEndOffset(s.tokens,i.length),s}class Qxi{constructor(e,n){this._tokenizerWithStateStore=e,this._backgroundTokenStore=n,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,y4t(e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){const n=Date.now()+e.timeRemaining(),i=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()<n?FOt(i):this._beginBackgroundTokenization())};i()}_backgroundTokenizeForAtLeast1ms(){const e=this._tokenizerWithStateStore._textModel.getLineCount(),n=new kTe,i=cu.create(!1);do if(i.elapsed()>1||this._tokenizeOneInvalidLine(n)>=e)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(n.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.allStatesValid():!1}_tokenizeOneInvalidLine(e){var i;const n=(i=this._tokenizerWithStateStore)==null?void 0:i.getFirstInvalidLine();return n?(this._tokenizerWithStateStore.updateTokensUntilLine(e,n.lineNumber),n.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,n){this._tokenizerWithStateStore.store.invalidateEndStateRange(new Ki(e,n))}}const R1=new Uint32Array(0).buffer;class dx{static deleteBeginning(e,n){return e===null||e===R1?e:dx.delete(e,0,n)}static deleteEnding(e,n){if(e===null||e===R1)return e;const i=eC(e),r=i[i.length-2];return dx.delete(e,n,r)}static delete(e,n,i){if(e===null||e===R1||n===i)return e;const r=eC(e),o=r.length>>>1;if(n===0&&r[r.length-2]===i)return R1;const s=$u.findIndexInTokensArray(r,n),a=s>0?r[s-1<<1]:0,l=r[s<<1];if(i<l){const f=i-n;for(let m=s;m<o;m++)r[m<<1]-=f;return e}let c,u;a!==n?(r[s<<1]=n,c=s+1<<1,u=n):(c=s<<1,u=a);const d=i-n;for(let f=s+1;f<o;f++){const m=r[f<<1]-d;m>u&&(r[c++]=m,r[c++]=r[(f<<1)+1],u=m)}if(c===r.length)return e;const h=new Uint32Array(c);return h.set(r.subarray(0,c),0),h.buffer}static append(e,n){if(n===R1)return e;if(e===R1)return n;if(e===null)return e;if(n===null)return null;const i=eC(e),r=eC(n),o=r.length>>>1,s=new Uint32Array(i.length+r.length);s.set(i,0);let a=i.length;const l=i[i.length-2];for(let c=0;c<o;c++)s[a++]=r[c<<1]+l,s[a++]=r[(c<<1)+1];return s.buffer}static insert(e,n,i){if(e===null||e===R1)return e;const r=eC(e),o=r.length>>>1;let s=$u.findIndexInTokensArray(r,n);s>0&&r[s-1<<1]===n&&s--;for(let a=s;a<o;a++)r[a<<1]+=i;return e}}function eC(t){return t instanceof Uint32Array?t:new Uint32Array(t)}class ZH{constructor(e){this._lineTokens=[],this._len=0,this._languageIdCodec=e}flush(){this._lineTokens=[],this._len=0}get hasTokens(){return this._lineTokens.length>0}getTokens(e,n,i){let r=null;if(n<this._len&&(r=this._lineTokens[n]),r!==null&&r!==R1)return new $u(eC(r),i,this._languageIdCodec);const o=new Uint32Array(2);return o[0]=i.length,o[1]=Yat(this._languageIdCodec.encodeLanguageId(e)),new $u(o,i,this._languageIdCodec)}static _massageTokens(e,n,i){const r=i?eC(i):null;if(n===0){let o=!1;if(r&&r.length>1&&(o=mf.getLanguageId(r[1])!==e),!o)return R1}if(!r||r.length===0){const o=new Uint32Array(2);return o[0]=n,o[1]=Yat(e),o.buffer}return r[r.length-2]=n,r.byteOffset===0&&r.byteLength===r.buffer.byteLength?r.buffer:r}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,n){n!==0&&(e+n>this._len&&(n=this._len-e),this._lineTokens.splice(e,n),this._len-=n)}_insertLines(e,n){if(n===0)return;const i=[];for(let r=0;r<n;r++)i[r]=null;this._lineTokens=Nfe(this._lineTokens,e,i),this._len+=n}setTokens(e,n,i,r,o){const s=ZH._massageTokens(this._languageIdCodec.encodeLanguageId(e),i,r);this._ensureLine(n);const a=this._lineTokens[n];return this._lineTokens[n]=s,o?!ZH._equals(a,s):!1}static _equals(e,n){if(!e||!n)return!e&&!n;const i=eC(e),r=eC(n);if(i.length!==r.length)return!1;for(let o=0,s=i.length;o<s;o++)if(i[o]!==r[o])return!1;return!0}acceptEdit(e,n,i){this._acceptDeleteRange(e),this._acceptInsertText(new ot(e.startLineNumber,e.startColumn),n,i)}_acceptDeleteRange(e){const n=e.startLineNumber-1;if(n>=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[n]=dx.delete(this._lineTokens[n],e.startColumn-1,e.endColumn-1);return}this._lineTokens[n]=dx.deleteEnding(this._lineTokens[n],e.startColumn-1);const i=e.endLineNumber-1;let r=null;i<this._len&&(r=dx.deleteBeginning(this._lineTokens[i],e.endColumn-1)),this._lineTokens[n]=dx.append(this._lineTokens[n],r),this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,n,i){if(n===0&&i===0)return;const r=e.lineNumber-1;if(!(r>=this._len)){if(n===0){this._lineTokens[r]=dx.insert(this._lineTokens[r],e.column-1,i);return}this._lineTokens[r]=dx.deleteEnding(this._lineTokens[r],e.column-1),this._lineTokens[r]=dx.insert(this._lineTokens[r],e.column-1,i),this._insertLines(e.lineNumber,n)}}setMultilineTokens(e,n){if(e.length===0)return{changes:[]};const i=[];for(let r=0,o=e.length;r<o;r++){const s=e[r];let a=0,l=0,c=!1;for(let u=s.startLineNumber;u<=s.endLineNumber;u++)c?(this.setTokens(n.getLanguageId(),u-1,n.getLineLength(u),s.getLineTokens(u),!1),l=u):this.setTokens(n.getLanguageId(),u-1,n.getLineLength(u),s.getLineTokens(u),!0)&&(c=!0,a=u,l=u);c&&i.push({fromLineNumber:a,toLineNumber:l})}return{changes:i}}}function Yat(t){return(t<<0|0|0|32768|2<<24|1024)>>>0}class jVe{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,n){this._pieces=e||[],this._isComplete=n}setPartial(e,n){let i=e;if(n.length>0){const o=n[0].getRange(),s=n[n.length-1].getRange();if(!o||!s)return e;i=e.plusRange(o).plusRange(s)}let r=null;for(let o=0,s=this._pieces.length;o<s;o++){const a=this._pieces[o];if(a.endLineNumber<i.startLineNumber)continue;if(a.startLineNumber>i.endLineNumber){r=r||{index:o};break}if(a.removeTokens(i),a.isEmpty()){this._pieces.splice(o,1),o--,s--;continue}if(a.endLineNumber<i.startLineNumber)continue;if(a.startLineNumber>i.endLineNumber){r=r||{index:o};continue}const[l,c]=a.split(i);if(l.isEmpty()){r=r||{index:o};continue}c.isEmpty()||(this._pieces.splice(o,1,l,c),o++,s++,r=r||{index:o})}return r=r||{index:this._pieces.length},n.length>0&&(this._pieces=Nfe(this._pieces,r.index,n)),i}isComplete(){return this._isComplete}addSparseTokens(e,n){if(n.getLineContent().length===0)return n;const i=this._pieces;if(i.length===0)return n;const r=jVe._findFirstPieceWithLine(i,e),o=i[r].getLineTokens(e);if(!o)return n;const s=n.getCount(),a=o.getCount();let l=0;const c=[];let u=0,d=0;const h=(f,m)=>{f!==d&&(d=f,c[u++]=f,c[u++]=m)};for(let f=0;f<a;f++){const m=o.getStartCharacter(f),p=o.getEndCharacter(f),g=o.getMetadata(f),y=((g&1?2048:0)|(g&2?4096:0)|(g&4?8192:0)|(g&8?16384:0)|(g&16?16744448:0)|(g&32?4278190080:0))>>>0,_=~y>>>0;for(;l<s&&n.getEndOffset(l)<=m;)h(n.getEndOffset(l),n.getMetadata(l)),l++;for(l<s&&n.getStartOffset(l)<m&&h(m,n.getMetadata(l));l<s&&n.getEndOffset(l)<p;)h(n.getEndOffset(l),n.getMetadata(l)&_|g&y),l++;if(l<s)h(p,n.getMetadata(l)&_|g&y),n.getEndOffset(l)===p&&l++;else{const w=Math.min(Math.max(0,l-1),s-1);h(p,n.getMetadata(w)&_|g&y)}}for(;l<s;)h(n.getEndOffset(l),n.getMetadata(l)),l++;return new $u(new Uint32Array(c),n.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(e,n){let i=0,r=e.length-1;for(;i<r;){let o=i+Math.floor((r-i)/2);if(e[o].endLineNumber<n)i=o+1;else if(e[o].startLineNumber>n)r=o-1;else{for(;o>i&&e[o-1].startLineNumber<=n&&n<=e[o-1].endLineNumber;)o--;return o}}return i}acceptEdit(e,n,i,r,o){for(const s of this._pieces)s.acceptEdit(e,n,i,r,o)}}class Ere extends xjt{constructor(e,n,i,r,o,s){super(),this._languageService=e,this._languageConfigurationService=n,this._textModel=i,this._bracketPairsTextModelPart=r,this._languageId=o,this._attachedViews=s,this._semanticTokens=new jVe(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new st),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new st),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new st),this.onDidChangeTokens=this._onDidChangeTokens.event,this.grammarTokens=this._register(new Jxi(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews)),this._register(this.grammarTokens.onDidChangeTokens(a=>{this._emitModelTokensChangedEvent(a)})),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState(a=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))}handleLanguageConfigurationServiceChange(e){e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const n of e.changes){const[i,r,o]=gk(n.text);this._semanticTokens.acceptEdit(n.range,i,r,o,n.text.length>0?n.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(e)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const n=this.grammarTokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,n)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new co("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this.grammarTokens.forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this.grammarTokens.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this.grammarTokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this.grammarTokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,n,i){return this.grammarTokens.getTokenTypeIfInsertingCharacter(e,n,i)}tokenizeLineWithEdit(e,n,i){return this.grammarTokens.tokenizeLineWithEdit(e,n,i)}setSemanticTokens(e,n){this._semanticTokens.set(e,n),this._emitModelTokensChangedEvent({semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,n){if(this.hasCompleteSemanticTokens())return;const i=this._textModel.validateRange(this._semanticTokens.setPartial(e,n));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const n=this._textModel.validatePosition(e),i=this._textModel.getLineContent(n.lineNumber),r=this.getLineTokens(n.lineNumber),o=r.findTokenIndexAtOffset(n.column-1),[s,a]=Ere._findLanguageBoundaries(r,o),l=gH(n.column,this.getLanguageConfiguration(r.getLanguageId(o)).getWordDefinition(),i.substring(s,a),s);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(o>0&&s===n.column-1){const[c,u]=Ere._findLanguageBoundaries(r,o-1),d=gH(n.column,this.getLanguageConfiguration(r.getLanguageId(o-1)).getWordDefinition(),i.substring(c,u),c);if(d&&d.startColumn<=e.column&&e.column<=d.endColumn)return d}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,n){const i=e.getLanguageId(n);let r=0;for(let s=n;s>=0&&e.getLanguageId(s)===i;s--)r=e.getStartOffset(s);let o=e.getLineContent().length;for(let s=n,a=e.getCount();s<a&&e.getLanguageId(s)===i;s++)o=e.getEndOffset(s);return[r,o]}getWordUntilPosition(e){const n=this.getWordAtPosition(e);return n?{word:n.word.substr(0,e.column-n.startColumn),startColumn:n.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}}getLanguageId(){return this._languageId}getLanguageIdAtPosition(e,n){const i=this._textModel.validatePosition(new ot(e,n)),r=this.getLineTokens(i.lineNumber);return r.getLanguageId(r.findTokenIndexAtOffset(i.column-1))}setLanguageId(e,n="api"){if(this._languageId===e)return;const i={oldLanguage:this._languageId,newLanguage:e,source:n};this._languageId=e,this._bracketPairsTextModelPart.handleDidChangeLanguage(i),this.grammarTokens.resetTokenization(),this._onDidChangeLanguage.fire(i),this._onDidChangeLanguageConfiguration.fire({})}}class Jxi extends ct{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,n,i,r){super(),this._languageIdCodec=e,this._textModel=n,this.getLanguageId=i,this._tokenizer=null,this._defaultBackgroundTokenizer=null,this._backgroundTokenizer=this._register(new mc),this._tokens=new ZH(this._languageIdCodec),this._debugBackgroundTokenizer=this._register(new mc),this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new st),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new st),this.onDidChangeTokens=this._onDidChangeTokens.event,this._attachedViewStates=this._register(new m8e),this._register(Ca.onDidChange(o=>{const s=this.getLanguageId();o.changedLanguages.indexOf(s)!==-1&&this.resetTokenization()})),this.resetTokenization(),this._register(r.onDidChangeVisibleRanges(({view:o,state:s})=>{if(s){let a=this._attachedViewStates.get(o);a||(a=new ewi(()=>this.refreshRanges(a.lineRanges)),this._attachedViewStates.set(o,a)),a.handleStateChange(s)}else this._attachedViewStates.deleteAndDispose(o)}))}resetTokenization(e=!0){var o;this._tokens.flush(),(o=this._debugBackgroundTokens)==null||o.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new MTe(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const n=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const s=Ca.get(this.getLanguageId());if(!s)return[null,null];let a;try{a=s.getInitialState()}catch(l){return ji(l),[null,null]}return[s,a]},[i,r]=n();if(i&&r?this._tokenizer=new Yxi(this._textModel.getLineCount(),i,this._textModel,this._languageIdCodec):this._tokenizer=null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const s={setTokens:a=>{this.setTokens(a)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;const a=2;this._backgroundTokenizationState=a,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(a,l)=>{var u;if(!this._tokenizer)return;const c=this._tokenizer.store.getFirstInvalidEndStateLineNumber();c!==null&&a>=c&&((u=this._tokenizer)==null||u.store.setEndState(a,l))}};i&&i.createBackgroundTokenizer&&!i.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,s)),!this._backgroundTokenizer.value&&!this._textModel.isTooLargeForTokenization()&&(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new Qxi(this._tokenizer,s),this._defaultBackgroundTokenizer.handleChanges()),i!=null&&i.backgroundTokenizerShouldOnlyVerifyTokens&&i.createBackgroundTokenizer?(this._debugBackgroundTokens=new ZH(this._languageIdCodec),this._debugBackgroundStates=new MTe(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,{setTokens:a=>{var l;(l=this._debugBackgroundTokens)==null||l.setMultilineTokens(a,this._textModel)},backgroundTokenizationFinished(){},setEndState:(a,l)=>{var c;(c=this._debugBackgroundStates)==null||c.setEndState(a,l)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var e;(e=this._defaultBackgroundTokenizer)==null||e.handleChanges()}handleDidChangeContent(e){var n,i,r;if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const o of e.changes){const[s,a]=gk(o.text);this._tokens.acceptEdit(o.range,s,a),(n=this._debugBackgroundTokens)==null||n.acceptEdit(o.range,s,a)}(i=this._debugBackgroundStates)==null||i.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),(r=this._defaultBackgroundTokenizer)==null||r.handleChanges()}}setTokens(e){const{changes:n}=this._tokens.setMultilineTokens(e,this._textModel);return n.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:n}),{changes:n}}refreshAllVisibleLineTokens(){const e=Ki.joinMany([...this._attachedViewStates].map(([n,i])=>i.lineRanges));this.refreshRanges(e)}refreshRanges(e){for(const n of e)this.refreshRange(n.startLineNumber,n.endLineNumberExclusive-1)}refreshRange(e,n){var s,a;if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),n=Math.min(this._textModel.getLineCount(),n);const i=new kTe,{heuristicTokens:r}=this._tokenizer.tokenizeHeuristically(i,e,n),o=this.setTokens(i.finalize());if(r)for(const l of o.changes)(s=this._backgroundTokenizer.value)==null||s.requestTokens(l.fromLineNumber,l.toLineNumber+1);(a=this._defaultBackgroundTokenizer)==null||a.checkFinished()}forceTokenization(e){var i,r;const n=new kTe;(i=this._tokenizer)==null||i.updateTokensUntilLine(n,e),this.setTokens(n.finalize()),(r=this._defaultBackgroundTokenizer)==null||r.checkFinished()}hasAccurateTokensForLine(e){return this._tokenizer?this._tokenizer.hasAccurateTokensForLine(e):!0}isCheapToTokenize(e){return this._tokenizer?this._tokenizer.isCheapToTokenize(e):!0}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){var r;const n=this._textModel.getLineContent(e),i=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,n);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const o=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,n);!i.equals(o)&&((r=this._debugBackgroundTokenizer.value)!=null&&r.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return i}getTokenTypeIfInsertingCharacter(e,n,i){if(!this._tokenizer)return 0;const r=this._textModel.validatePosition(new ot(e,n));return this.forceTokenization(r.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(r,i)}tokenizeLineWithEdit(e,n,i){if(!this._tokenizer)return null;const r=this._textModel.validatePosition(e);return this.forceTokenization(r.lineNumber),this._tokenizer.tokenizeLineWithEdit(r,n,i)}get hasTokens(){return this._tokens.hasTokens}}class ewi extends ct{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new Wo(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){Xs(this._computedLineRanges,this._lineRanges,(e,n)=>e.equals(n))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}const hme=Sr("undoRedoService");class Ujt{constructor(e,n){this.resource=e,this.elements=n}}const U4=class U4{constructor(){this.id=U4._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}};U4._ID=0,U4.None=new U4;let LTe=U4;const K4=class K4{constructor(){this.id=K4._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}};K4._ID=0,K4.None=new K4;let dT=K4;var twi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},h1e=function(t,e){return function(n,i){e(n,i,t)}},PL;function nwi(t){const e=new Wjt;return e.acceptChunk(t),e.finish()}function iwi(t){const e=new Wjt;let n;for(;typeof(n=t.read())=="string";)e.acceptChunk(n);return e.finish()}function Xat(t,e){let n;return typeof t=="string"?n=nwi(t):upi(t)?n=iwi(t):n=t,n.create(e)}let CQ=0;const rwi=999,owi=1e4;class swi{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let n=0,i=0;do{const r=this._source.read();if(r===null)return this._eos=!0,n===0?null:e.join("");if(r.length>0&&(e[n++]=r,i+=r.length),i>=64*1024)return e.join("")}while(!0)}}const XV=()=>{throw new Error("Invalid change accessor")};var Xy;let l0=(Xy=class extends ct{static resolveOptions(e,n){if(n.detectIndentation){const i=Bat(e,n.tabSize,n.insertSpaces);return new rte({tabSize:i.tabSize,indentSize:"tabSize",insertSpaces:i.insertSpaces,trimAutoWhitespace:n.trimAutoWhitespace,defaultEOL:n.defaultEOL,bracketPairColorizationOptions:n.bracketPairColorizationOptions})}return new rte(n)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent(n=>e(n.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return yv(this._eventEmitter.fastEvent(n=>e(n)),this._onDidChangeInjectedText.event(n=>e(n)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,n,i,r=null,o,s,a){super(),this._undoRedoService=o,this._languageService=s,this._languageConfigurationService=a,this._onWillDispose=this._register(new st),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new hwi(f=>this.handleBeforeFireDecorationsChangedEvent(f))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new st),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new st),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new st),this._eventEmitter=this._register(new fwi),this._languageSelectionListener=this._register(new mc),this._deltaDecorationCallCnt=0,this._attachedViews=new mwi,CQ++,this.id="$model"+CQ,this.isForSimpleWidget=i.isForSimpleWidget,typeof r>"u"||r===null?this._associatedResource=ri.parse("inmemory://model/"+CQ):this._associatedResource=r,this._attachedEditorCount=0;const{textBuffer:l,disposable:c}=Xat(e,i.defaultEOL);this._buffer=l,this._bufferDisposable=c,this._options=PL.resolveOptions(this._buffer,i);const u=typeof n=="string"?n:n.languageId;typeof n!="string"&&(this._languageSelectionListener.value=n.onDidChange(()=>this._setLanguage(n.languageId))),this._bracketPairs=this._register(new dxi(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new o_i(this,this._languageConfigurationService)),this._decorationProvider=this._register(new fxi(this)),this._tokenizationTextModelPart=new Ere(this._languageService,this._languageConfigurationService,this,this._bracketPairs,u,this._attachedViews);const d=this._buffer.getLineCount(),h=this._buffer.getValueLengthInRange(new ve(1,1,d,this._buffer.getLineLength(d)+1),0);i.largeFileOptimizations?(this._isTooLargeForTokenization=h>PL.LARGE_FILE_SIZE_THRESHOLD||d>PL.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=h>PL.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=h>PL._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=f4t(CQ),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Zat,this._commandManager=new AVe(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})),this._languageService.requestRichLanguageFeatures(u),this._register(this._languageConfigurationService.onDidChange(f=>{this._bracketPairs.handleLanguageConfigurationServiceChange(f),this._tokenizationTextModelPart.handleLanguageConfigurationServiceChange(f)}))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new T3([],"",`
`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=ct.None}_assertNotDisposed(){if(this._isDisposed)throw new co("Model is disposed!")}_emitContentChangedEvent(e,n){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(n),this._bracketPairs.handleDidChangeContent(n),this._eventEmitter.fire(new dI(e,n)))}setValue(e){if(this._assertNotDisposed(),e==null)throw Jg();const{textBuffer:n,disposable:i}=Xat(e,this._options.defaultEOL);this._setValueFromTextBuffer(n,i)}_createContentChanged2(e,n,i,r,o,s,a,l){return{changes:[{range:e,rangeOffset:n,rangeLength:i,text:r}],eol:this._buffer.getEOL(),isEolChange:l,versionId:this.getVersionId(),isUndoing:o,isRedoing:s,isFlush:a}}_setValueFromTextBuffer(e,n){this._assertNotDisposed();const i=this.getFullModelRange(),r=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=n,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new Zat,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new k3([new O_i],this._versionId,!1,!1),this._createContentChanged2(new ve(1,1,o,s),0,r,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const n=e===1?`\r
`:`
`;if(this._buffer.getEOL()===n)return;const i=this.getFullModelRange(),r=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(n),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new k3([new $_i],this._versionId,!1,!1),this._createContentChanged2(new ve(1,1,o,s),0,r,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),n=this._decorationsTree.collectNodesPostOrder();for(let i=0,r=n.length;i<r;i++){const o=n[i],s=o.range,a=o.cachedAbsoluteStart-o.start,l=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),c=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);o.cachedAbsoluteStart=l,o.cachedAbsoluteEnd=c,o.cachedVersionId=e,o.start=l-a,o.end=c-a,vk(o)}}onBeforeAttached(){return this._attachedEditorCount++,this._attachedEditorCount===1&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.attachView()}onBeforeDetached(e){this._attachedEditorCount--,this._attachedEditorCount===0&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.detachView(e)}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,n=0;const i=this._buffer.getLineCount();for(let r=1;r<=i;r++){const o=this._buffer.getLineLength(r);o>=owi?n+=o:e+=o}return n>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const n=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,i=typeof e.indentSize<"u"?e.indentSize:this._options.originalIndentSize,r=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,o=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new rte({tabSize:n,indentSize:i,insertSpaces:r,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o,bracketPairColorizationOptions:s});if(this._options.equals(a))return;const l=this._options.createChangeEvent(a);this._options=a,this._bracketPairs.handleDidChangeOptions(l),this._decorationProvider.handleDidChangeOptions(l),this._onDidChangeOptions.fire(l)}detectIndentation(e,n){this._assertNotDisposed();const i=Bat(this._buffer,n,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),vVe(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const n=this.findMatches(d4t.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,n.map(i=>({range:i.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const n=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(n.lineNumber,n.column)}getPositionAt(e){this._assertNotDisposed();const n=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(n)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,n=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new co("Operation would exceed heap memory limits");const i=this.getFullModelRange(),r=this.getValueInRange(i,e);return n?this._buffer.getBOM()+r:r}createSnapshot(e=!1){return new swi(this._buffer.createSnapshot(e))}getValueLength(e,n=!1){this._assertNotDisposed();const i=this.getFullModelRange(),r=this.getValueLengthInRange(i,e);return n?this._buffer.getBOM().length+r:r}getValueInRange(e,n=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),n)}getValueLengthInRange(e,n=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),n)}getCharacterCountInRange(e,n=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),n)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new co("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new co("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new co("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===`
`?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new co("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new co("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new co("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const n=this._buffer.getLineCount(),i=e.startLineNumber,r=e.startColumn;let o=Math.floor(typeof i=="number"&&!isNaN(i)?i:1),s=Math.floor(typeof r=="number"&&!isNaN(r)?r:1);if(o<1)o=1,s=1;else if(o>n)o=n,s=this.getLineMaxColumn(o);else if(s<=1)s=1;else{const d=this.getLineMaxColumn(o);s>=d&&(s=d)}const a=e.endLineNumber,l=e.endColumn;let c=Math.floor(typeof a=="number"&&!isNaN(a)?a:1),u=Math.floor(typeof l=="number"&&!isNaN(l)?l:1);if(c<1)c=1,u=1;else if(c>n)c=n,u=this.getLineMaxColumn(c);else if(u<=1)u=1;else{const d=this.getLineMaxColumn(c);u>=d&&(u=d)}return i===o&&r===s&&a===c&&l===u&&e instanceof ve&&!(e instanceof Pn)?e:new ve(o,s,c,u)}_isValidPosition(e,n,i){if(typeof e!="number"||typeof n!="number"||isNaN(e)||isNaN(n)||e<1||n<1||(e|0)!==e||(n|0)!==n)return!1;const r=this._buffer.getLineCount();if(e>r)return!1;if(n===1)return!0;const o=this.getLineMaxColumn(e);if(n>o)return!1;if(i===1){const s=this._buffer.getLineCharCode(e,n-2);if(sc(s))return!1}return!0}_validatePosition(e,n,i){const r=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),o=Math.floor(typeof n=="number"&&!isNaN(n)?n:1),s=this._buffer.getLineCount();if(r<1)return new ot(1,1);if(r>s)return new ot(s,this.getLineMaxColumn(s));if(o<=1)return new ot(r,1);const a=this.getLineMaxColumn(r);if(o>=a)return new ot(r,a);if(i===1){const l=this._buffer.getLineCharCode(r,o-2);if(sc(l))return new ot(r,o-1)}return new ot(r,o)}validatePosition(e){return this._assertNotDisposed(),e instanceof ot&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,n){const i=e.startLineNumber,r=e.startColumn,o=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(i,r,0)||!this._isValidPosition(o,s,0))return!1;if(n===1){const a=r>1?this._buffer.getLineCharCode(i,r-2):0,l=s>1&&s<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,s-2):0,c=sc(a),u=sc(l);return!c&&!u}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof ve&&!(e instanceof Pn)&&this._isValidRange(e,1))return e;const i=this._validatePosition(e.startLineNumber,e.startColumn,0),r=this._validatePosition(e.endLineNumber,e.endColumn,0),o=i.lineNumber,s=i.column,a=r.lineNumber,l=r.column;{const c=s>1?this._buffer.getLineCharCode(o,s-2):0,u=l>1&&l<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,l-2):0,d=sc(c),h=sc(u);return!d&&!h?new ve(o,s,a,l):o===a&&s===l?new ve(o,s-1,a,l-1):d&&h?new ve(o,s-1,a,l+1):d?new ve(o,s-1,a,l):new ve(o,s,a,l+1)}}modifyPosition(e,n){this._assertNotDisposed();const i=this.getOffsetAt(e)+n;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new ve(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,n,i,r){return this._buffer.findMatchesLineByLine(e,n,i,r)}findMatches(e,n,i,r,o,s,a=rwi){this._assertNotDisposed();let l=null;n!==null&&(Array.isArray(n)||(n=[n]),n.every(d=>ve.isIRange(d))&&(l=n.map(d=>this.validateRange(d)))),l===null&&(l=[this.getFullModelRange()]),l=l.sort((d,h)=>d.startLineNumber-h.startLineNumber||d.startColumn-h.startColumn);const c=[];c.push(l.reduce((d,h)=>ve.areIntersecting(d,h)?d.plusRange(h):(c.push(d),h)));let u;if(!i&&e.indexOf(`
`)<0){const h=new AL(e,i,r,o).parseSearchRequest();if(!h)return[];u=f=>this.findMatchesLineByLine(f,h,s,a)}else u=d=>fQ.findMatches(this,new AL(e,i,r,o),d,s,a);return c.map(u).reduce((d,h)=>d.concat(h),[])}findNextMatch(e,n,i,r,o,s){this._assertNotDisposed();const a=this.validatePosition(n);if(!i&&e.indexOf(`
`)<0){const c=new AL(e,i,r,o).parseSearchRequest();if(!c)return null;const u=this.getLineCount();let d=new ve(a.lineNumber,a.column,u,this.getLineMaxColumn(u)),h=this.findMatchesLineByLine(d,c,s,1);return fQ.findNextMatch(this,new AL(e,i,r,o),a,s),h.length>0||(d=new ve(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),h=this.findMatchesLineByLine(d,c,s,1),h.length>0)?h[0]:null}return fQ.findNextMatch(this,new AL(e,i,r,o),a,s)}findPreviousMatch(e,n,i,r,o,s){this._assertNotDisposed();const a=this.validatePosition(n);return fQ.findPreviousMatch(this,new AL(e,i,r,o),a,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===`
`?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof Wwe?e:new Wwe(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const n=[];for(let i=0,r=e.length;i<r;i++)n[i]=this._validateEditOperation(e[i]);return n}pushEditOperations(e,n,i,r){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(n),i,r)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,n,i,r){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const o=n.map(a=>({range:this.validateRange(a.range),text:a.text}));let s=!0;if(e)for(let a=0,l=e.length;a<l;a++){const c=e[a];let u=!1;for(let d=0,h=o.length;d<h;d++){const f=o[d].range,m=f.startLineNumber>c.endLineNumber,p=c.startLineNumber>f.endLineNumber;if(!m&&!p){u=!0;break}}if(!u){s=!1;break}}if(s)for(let a=0,l=this._trimAutoWhitespaceLines.length;a<l;a++){const c=this._trimAutoWhitespaceLines[a],u=this.getLineMaxColumn(c);let d=!0;for(let h=0,f=o.length;h<f;h++){const m=o[h].range,p=o[h].text;if(!(c<m.startLineNumber||c>m.endLineNumber)&&!(c===m.startLineNumber&&m.startColumn===u&&m.isEmpty()&&p&&p.length>0&&p.charAt(0)===`
`)&&!(c===m.startLineNumber&&m.startColumn===1&&m.isEmpty()&&p&&p.length>0&&p.charAt(p.length-1)===`
`)){d=!1;break}}if(d){const h=new ve(c,1,c,u);n.push(new Wwe(null,h,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,n,i,r)}_applyUndo(e,n,i,r){const o=e.map(s=>{const a=this.getPositionAt(s.newPosition),l=this.getPositionAt(s.newEnd);return{range:new ve(a.lineNumber,a.column,l.lineNumber,l.column),text:s.oldText}});this._applyUndoRedoEdits(o,n,!0,!1,i,r)}_applyRedo(e,n,i,r){const o=e.map(s=>{const a=this.getPositionAt(s.oldPosition),l=this.getPositionAt(s.oldEnd);return{range:new ve(a.lineNumber,a.column,l.lineNumber,l.column),text:s.newText}});this._applyUndoRedoEdits(o,n,!1,!0,i,r)}_applyUndoRedoEdits(e,n,i,r,o,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=r,this.applyEdits(e,!1),this.setEOL(n),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,n=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,n)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,n){const i=this._buffer.getLineCount(),r=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,n),o=this._buffer.getLineCount(),s=r.changes;if(this._trimAutoWhitespaceLines=r.trimAutoWhitespaceLineNumbers,s.length!==0){for(let c=0,u=s.length;c<u;c++){const d=s[c];this._decorationsTree.acceptReplace(d.rangeOffset,d.rangeLength,d.text.length,d.forceMoveMarkers)}const a=[];this._increaseVersionId();let l=i;for(let c=0,u=s.length;c<u;c++){const d=s[c],[h]=gk(d.text);this._onDidChangeDecorations.fire();const f=d.range.startLineNumber,m=d.range.endLineNumber,p=m-f,g=h,y=Math.min(p,g),_=g-p,w=o-l-_+f,C=w,N=w+g,E=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new ot(C,1)),this.getOffsetAt(new ot(N,this.getLineMaxColumn(N))),0),D=X0.fromDecorations(E),k=new uS(D);for(let M=y;M>=0;M--){const T=f+M,A=w+M;k.takeFromEndWhile(P=>P.lineNumber>A);const R=k.takeFromEndWhile(P=>P.lineNumber===A);a.push(new Iat(T,this.getLineContent(A),R))}if(y<p){const M=f+y;a.push(new j_i(M+1,m))}if(y<g){const M=new uS(D),T=f+y,A=g-y,R=o-l-A+T+1,P=[],O=[];for(let V=0;V<A;V++){const F=R+V;O[V]=this.getLineContent(F),M.takeWhile($=>$.lineNumber<F),P[V]=M.takeWhile($=>$.lineNumber===F)}a.push(new F_i(T+1,f+g,O,P))}l+=_}this._emitContentChangedEvent(new k3(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return r.reverseEdits===null?void 0:r.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(e===null||e.size===0)return;const i=Array.from(e).map(r=>new Iat(r,this.getLineContent(r),this._getInjectedTextInLine(r)));this._onDidChangeInjectedText.fire(new Njt(i))}changeDecorations(e,n=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(n,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,n){const i={addDecoration:(o,s)=>this._deltaDecorationsImpl(e,[],[{range:o,options:s}])[0],changeDecoration:(o,s)=>{this._changeDecorationImpl(o,s)},changeDecorationOptions:(o,s)=>{this._changeDecorationOptionsImpl(o,Jat(s))},removeDecoration:o=>{this._deltaDecorationsImpl(e,[o],[])},deltaDecorations:(o,s)=>o.length===0&&s.length===0?[]:this._deltaDecorationsImpl(e,o,s)};let r=null;try{r=n(i)}catch(o){ji(o)}return i.addDecoration=XV,i.changeDecoration=XV,i.changeDecorationOptions=XV,i.removeDecoration=XV,i.deltaDecorations=XV,r}deltaDecorations(e,n,i=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&n.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),ji(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,n)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,n,i){const r=e?this._decorations[e]:null;if(!r)return n?this._deltaDecorationsImpl(0,[],[{range:n,options:Qat[i]}],!0)[0]:null;if(!n)return this._decorationsTree.delete(r),delete this._decorations[r.id],null;const o=this._validateRangeRelaxedNoAllocations(n),s=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),a=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(r),r.reset(this.getVersionId(),s,a,o),r.setOptions(Qat[i]),this._decorationsTree.insert(r),r.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const n=this._decorationsTree.collectNodesFromOwner(e);for(let i=0,r=n.length;i<r;i++){const o=n[i];this._decorationsTree.delete(o),delete this._decorations[o.id]}}getDecorationOptions(e){const n=this._decorations[e];return n?n.options:null}getDecorationRange(e){const n=this._decorations[e];return n?this._decorationsTree.getNodeRange(this,n):null}getLineDecorations(e,n=0,i=!1){return e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,n,i)}getLinesDecorations(e,n,i=0,r=!1,o=!1){const s=this.getLineCount(),a=Math.min(s,Math.max(1,e)),l=Math.min(s,Math.max(1,n)),c=this.getLineMaxColumn(l),u=new ve(a,1,l,c),d=this._getDecorationsInRange(u,i,r,o);return dMe(d,this._decorationProvider.getDecorationsInRange(u,i,r)),d}getDecorationsInRange(e,n=0,i=!1,r=!1,o=!1){const s=this.validateRange(e),a=this._getDecorationsInRange(s,n,i,o);return dMe(a,this._decorationProvider.getDecorationsInRange(s,n,i,r)),a}getOverviewRulerDecorations(e=0,n=!1){return this._decorationsTree.getAll(this,e,n,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const n=this._buffer.getOffsetAt(e,1),i=n+this._buffer.getLineLength(e),r=this._decorationsTree.getInjectedTextInInterval(this,n,i,0);return X0.fromDecorations(r).filter(o=>o.lineNumber===e)}getAllDecorations(e=0,n=!1){let i=this._decorationsTree.getAll(this,e,n,!1,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,n)),i}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,n,i,r){const o=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,o,s,n,i,r)}getRangeAt(e,n){return this._buffer.getRangeAt(e,n-e)}_changeDecorationImpl(e,n){const i=this._decorations[e];if(!i)return;if(i.options.after){const a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.endLineNumber)}if(i.options.before){const a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.startLineNumber)}const r=this._validateRangeRelaxedNoAllocations(n),o=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),s=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),o,s,r),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.startLineNumber)}_changeDecorationOptionsImpl(e,n){const i=this._decorations[e];if(!i)return;const r=!!(i.options.overviewRuler&&i.options.overviewRuler.color),o=!!(n.overviewRuler&&n.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(n),i.options.after||n.after){const l=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(l.endLineNumber)}if(i.options.before||n.before){const l=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(l.startLineNumber)}const s=r!==o,a=lwi(n)!==hte(i);s||a?(this._decorationsTree.delete(i),i.setOptions(n),this._decorationsTree.insert(i)):i.setOptions(n)}_deltaDecorationsImpl(e,n,i,r=!1){const o=this.getVersionId(),s=n.length;let a=0;const l=i.length;let c=0;this._onDidChangeDecorations.beginDeferredEmit();try{const u=new Array(l);for(;a<s||c<l;){let d=null;if(a<s){do d=this._decorations[n[a++]];while(!d&&a<s);if(d){if(d.options.after){const h=this._decorationsTree.getNodeRange(this,d);this._onDidChangeDecorations.recordLineAffectedByInjectedText(h.endLineNumber)}if(d.options.before){const h=this._decorationsTree.getNodeRange(this,d);this._onDidChangeDecorations.recordLineAffectedByInjectedText(h.startLineNumber)}this._decorationsTree.delete(d),r||this._onDidChangeDecorations.checkAffectedAndFire(d.options)}}if(c<l){if(!d){const y=++this._lastDecorationId,_=`${this._instanceId};${y}`;d=new Vjt(_,0,0),this._decorations[_]=d}const h=i[c],f=this._validateRangeRelaxedNoAllocations(h.range),m=Jat(h.options),p=this._buffer.getOffsetAt(f.startLineNumber,f.startColumn),g=this._buffer.getOffsetAt(f.endLineNumber,f.endColumn);d.ownerId=e,d.reset(o,p,g,f),d.setOptions(m),d.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(f.endLineNumber),d.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(f.startLineNumber),r||this._onDidChangeDecorations.checkAffectedAndFire(m),this._decorationsTree.insert(d),u[c]=d.id,c++}else d&&delete this._decorations[d.id]}return u}finally{this._onDidChangeDecorations.endDeferredEmit()}}getLanguageId(){return this.tokenization.getLanguageId()}setLanguage(e,n){typeof e=="string"?(this._languageSelectionListener.clear(),this._setLanguage(e,n)):(this._languageSelectionListener.value=e.onDidChange(()=>this._setLanguage(e.languageId,n)),this._setLanguage(e.languageId,n))}_setLanguage(e,n){this.tokenization.setLanguageId(e,n),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,n){return this.tokenization.getLanguageIdAtPosition(e,n)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,n){return e}getLineIndentColumn(e){return awi(this.getLineContent(e))+1}},PL=Xy,Xy._MODEL_SYNC_LIMIT=50*1024*1024,Xy.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024,Xy.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3,Xy.LARGE_FILE_HEAP_OPERATION_THRESHOLD=256*1024*1024,Xy.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:id.tabSize,indentSize:id.indentSize,insertSpaces:id.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:id.trimAutoWhitespace,largeFileOptimizations:id.largeFileOptimizations,bracketPairColorizationOptions:id.bracketPairColorizationOptions},Xy);l0=PL=twi([h1e(4,hme),h1e(5,Qs),h1e(6,bs)],l0);function awi(t){let e=0;for(const n of t)if(n===" "||n==="	")e++;else break;return e}function f1e(t){return!!(t.options.overviewRuler&&t.options.overviewRuler.color)}function lwi(t){return!!t.after||!!t.before}function hte(t){return!!t.options.after||!!t.options.before}class Zat{constructor(){this._decorationsTree0=new c1e,this._decorationsTree1=new c1e,this._injectedTextDecorationsTree=new c1e}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,n){for(const i of n)i.range===null&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return n}getAllInInterval(e,n,i,r,o,s){const a=e.getVersionId(),l=this._intervalSearch(n,i,r,o,a,s);return this._ensureNodesHaveRanges(e,l)}_intervalSearch(e,n,i,r,o,s){const a=this._decorationsTree0.intervalSearch(e,n,i,r,o,s),l=this._decorationsTree1.intervalSearch(e,n,i,r,o,s),c=this._injectedTextDecorationsTree.intervalSearch(e,n,i,r,o,s);return a.concat(l).concat(c)}getInjectedTextInInterval(e,n,i,r){const o=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(n,i,r,!1,o,!1);return this._ensureNodesHaveRanges(e,s).filter(a=>a.options.showIfCollapsed||!a.range.isEmpty())}getAllInjectedText(e,n){const i=e.getVersionId(),r=this._injectedTextDecorationsTree.search(n,!1,i,!1);return this._ensureNodesHaveRanges(e,r).filter(o=>o.options.showIfCollapsed||!o.range.isEmpty())}getAll(e,n,i,r,o){const s=e.getVersionId(),a=this._search(n,i,r,s,o);return this._ensureNodesHaveRanges(e,a)}_search(e,n,i,r,o){if(i)return this._decorationsTree1.search(e,n,r,o);{const s=this._decorationsTree0.search(e,n,r,o),a=this._decorationsTree1.search(e,n,r,o),l=this._injectedTextDecorationsTree.search(e,n,r,o);return s.concat(a).concat(l)}}collectNodesFromOwner(e){const n=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),r=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return n.concat(i).concat(r)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),n=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(n).concat(i)}insert(e){hte(e)?this._injectedTextDecorationsTree.insert(e):f1e(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){hte(e)?this._injectedTextDecorationsTree.delete(e):f1e(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,n){const i=e.getVersionId();return n.cachedVersionId!==i&&this._resolveNode(n,i),n.range===null&&(n.range=e.getRangeAt(n.cachedAbsoluteStart,n.cachedAbsoluteEnd)),n.range}_resolveNode(e,n){hte(e)?this._injectedTextDecorationsTree.resolveNode(e,n):f1e(e)?this._decorationsTree1.resolveNode(e,n):this._decorationsTree0.resolveNode(e,n)}acceptReplace(e,n,i,r){this._decorationsTree0.acceptReplace(e,n,i,r),this._decorationsTree1.acceptReplace(e,n,i,r),this._injectedTextDecorationsTree.acceptReplace(e,n,i,r)}}function O_(t){return t.replace(/[^a-z0-9\-_]/gi," ")}class Kjt{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class cwi extends Kjt{constructor(e){super(e),this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:Tp.Center}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,n){if(typeof e=="string")return e;const i=e?n.getColor(e.id):null;return i?i.toString():""}}class uwi{constructor(e){this.position=(e==null?void 0:e.position)??Iv.Center,this.persistLane=e==null?void 0:e.persistLane}}class dwi extends Kjt{constructor(e){super(e),this.position=e.position,this.sectionHeaderStyle=e.sectionHeaderStyle??null,this.sectionHeaderText=e.sectionHeaderText??null}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,n){return typeof e=="string"?Rt.fromHex(e):n.getColor(e.id)}}class yk{static from(e){return e instanceof yk?e:new yk(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class Hi{static register(e){return new Hi(e)}static createDynamic(e){return new Hi(e)}constructor(e){this.description=e.description,this.blockClassName=e.blockClassName?O_(e.blockClassName):null,this.blockDoesNotCollapse=e.blockDoesNotCollapse??null,this.blockIsAfterEnd=e.blockIsAfterEnd??null,this.blockPadding=e.blockPadding??null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?O_(e.className):null,this.shouldFillLineOnLineBreak=e.shouldFillLineOnLineBreak??null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new cwi(e.overviewRuler):null,this.minimap=e.minimap?new dwi(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new uwi(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?O_(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?O_(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?O_(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?Udi(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?O_(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?O_(e.marginClassName):null,this.inlineClassName=e.inlineClassName?O_(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?O_(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?O_(e.afterContentClassName):null,this.after=e.after?yk.from(e.after):null,this.before=e.before?yk.from(e.before):null,this.hideInCommentTokens=e.hideInCommentTokens??!1,this.hideInStringTokens=e.hideInStringTokens??!1}}Hi.EMPTY=Hi.register({description:"empty"});const Qat=[Hi.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Hi.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Hi.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Hi.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function Jat(t){return t instanceof Hi?t:Hi.createDynamic(t)}class hwi extends ct{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new st),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),(e=this._affectedInjectedTextLines)==null||e.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){var n,i;this._affectsMinimap||(this._affectsMinimap=!!((n=e.minimap)!=null&&n.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!((i=e.overviewRuler)!=null&&i.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!e.glyphMarginClassName),this._affectsLineNumber||(this._affectsLineNumber=!!e.lineNumberClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class fwi extends ct{constructor(){super(),this._fastEmitter=this._register(new st),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new st),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const n=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(n),this._slowEmitter.fire(n)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}}class mwi{constructor(){this._onDidChangeVisibleRanges=new st,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new pwi(n=>{this._onDidChangeVisibleRanges.fire({view:e,state:n})});return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class pwi{constructor(e){this.handleStateChange=e}setVisibleLines(e,n){const i=e.map(r=>new Ki(r.startLineNumber,r.endLineNumber+1));this.handleStateChange({visibleLineRanges:i,stabilized:n})}}class FVe{static create(e){return new FVe(e.get(135),e.get(134))}constructor(e,n){this.classifier=new gwi(e,n)}createLineBreaksComputer(e,n,i,r,o){const s=[],a=[],l=[];return{addRequest:(c,u,d)=>{s.push(c),a.push(u),l.push(d)},finalize:()=>{const c=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,u=[];for(let d=0,h=s.length;d<h;d++){const f=a[d],m=l[d];m&&!m.injectionOptions&&!f?u[d]=bwi(this.classifier,m,s[d],n,i,c,r,o):u[d]=vwi(this.classifier,s[d],f,n,i,c,r,o)}return TTe.length=0,ITe.length=0,u}}}}class gwi extends A6{constructor(e,n){super(0);for(let i=0;i<e.length;i++)this.set(e.charCodeAt(i),1);for(let i=0;i<n.length;i++)this.set(n.charCodeAt(i),2)}get(e){return e>=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let TTe=[],ITe=[];function bwi(t,e,n,i,r,o,s,a){if(r===-1)return null;const l=n.length;if(l<=1)return null;const c=a==="keepAll",u=e.breakOffsets,d=e.breakOffsetsVisibleColumn,h=qjt(n,i,r,o,s),f=r-h,m=TTe,p=ITe;let g=0,y=0,_=0,w=r;const C=u.length;let N=0;if(N>=0){let E=Math.abs(d[N]-w);for(;N+1<C;){const D=Math.abs(d[N+1]-w);if(D>=E)break;E=D,N++}}for(;N<C;){let E=N<0?0:u[N],D=N<0?0:d[N];y>E&&(E=y,D=_);let k=0,M=0,T=0,A=0;if(D<=w){let P=D,O=E===0?0:n.charCodeAt(E-1),V=E===0?0:t.get(O),F=!0;for(let $=E;$<l;$++){const B=$,z=n.charCodeAt($);let H,K;if(sc(z)?($++,H=0,K=2):(H=t.get(z),K=rB(z,P,i,o)),B>y&&ATe(O,V,z,H,c)&&(k=B,M=P),P+=K,P>w){B>y?(T=B,A=P-K):(T=$+1,A=P),P-M>f&&(k=0),F=!1;break}O=z,V=H}if(F){g>0&&(m[g]=u[u.length-1],p[g]=d[u.length-1],g++);break}}if(k===0){let P=D,O=n.charCodeAt(E),V=t.get(O),F=!1;for(let $=E-1;$>=y;$--){const B=$+1,z=n.charCodeAt($);if(z===9){F=!0;break}let H,K;if(z2(z)?($--,H=0,K=2):(H=t.get(z),K=uk(z)?o:1),P<=w){if(T===0&&(T=B,A=P),P<=w-f)break;if(ATe(z,H,O,V,c)){k=B,M=P;break}}P-=K,O=z,V=H}if(k!==0){const $=f-(A-M);if($<=i){const B=n.charCodeAt(T);let z;sc(B)?z=2:z=rB(B,A,i,o),$-z<0&&(k=0)}}if(F){N--;continue}}if(k===0&&(k=T,M=A),k<=y){const P=n.charCodeAt(y);sc(P)?(k=y+2,M=_+2):(k=y+1,M=_+rB(P,_,i,o))}for(y=k,m[g]=k,_=M,p[g]=M,g++,w=M+f;N<0||N<C&&d[N]<M;)N++;let R=Math.abs(d[N]-w);for(;N+1<C;){const P=Math.abs(d[N+1]-w);if(P>=R)break;R=P,N++}}return g===0?null:(m.length=g,p.length=g,TTe=e.breakOffsets,ITe=e.breakOffsetsVisibleColumn,e.breakOffsets=m,e.breakOffsetsVisibleColumn=p,e.wrappedTextIndentLength=h,e)}function vwi(t,e,n,i,r,o,s,a){const l=X0.applyInjectedText(e,n);let c,u;if(n&&n.length>0?(c=n.map(M=>M.options),u=n.map(M=>M.column-1)):(c=null,u=null),r===-1)return c?new J9(u,c,[l.length],[],0):null;const d=l.length;if(d<=1)return c?new J9(u,c,[l.length],[],0):null;const h=a==="keepAll",f=qjt(l,i,r,o,s),m=r-f,p=[],g=[];let y=0,_=0,w=0,C=r,N=l.charCodeAt(0),E=t.get(N),D=rB(N,0,i,o),k=1;sc(N)&&(D+=1,N=l.charCodeAt(1),E=t.get(N),k++);for(let M=k;M<d;M++){const T=M,A=l.charCodeAt(M);let R,P;sc(A)?(M++,R=0,P=2):(R=t.get(A),P=rB(A,D,i,o)),ATe(N,E,A,R,h)&&(_=T,w=D),D+=P,D>C&&((_===0||D-w>m)&&(_=T,w=D-P),p[y]=_,g[y]=w,y++,C=w+m,_=0),N=A,E=R}return y===0&&(!n||n.length===0)?null:(p[y]=d,g[y]=D,new J9(u,c,p,g,f))}function rB(t,e,n,i){return t===9?n-e%n:uk(t)||t<32?i:1}function elt(t,e){return e-t%e}function ATe(t,e,n,i,r){return n!==32&&(e===2&&i!==2||e!==1&&i===1||!r&&e===3&&i!==2||!r&&i===3&&e!==1)}function qjt(t,e,n,i,r){let o=0;if(r!==0){const s=qd(t);if(s!==-1){for(let l=0;l<s;l++){const c=t.charCodeAt(l)===9?elt(o,e):1;o+=c}const a=r===3?2:r===2?1:0;for(let l=0;l<a;l++){const c=elt(o,e);o+=c}o+i>n&&(o=0)}}return o}let tlt=class Gjt{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new Xc(new ve(1,1,1,1),0,0,new ot(1,1),0),new Xc(new ve(1,1,1,1),0,0,new ot(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new Kr(this.modelState,this.viewState)}readSelectionFromMarkers(e){const n=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!n.isEmpty()?Pn.fromRange(n.collapseToEnd(),this.modelState.selection.getDirection()):Pn.fromRange(n,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,n,i){this._setState(e,n,i)}static _validatePositionWithCache(e,n,i,r){return n.equals(i)?r:e.normalizePosition(n,2)}static _validateViewState(e,n){const i=n.position,r=n.selectionStart.getStartPosition(),o=n.selectionStart.getEndPosition(),s=e.normalizePosition(i,2),a=this._validatePositionWithCache(e,r,i,s),l=this._validatePositionWithCache(e,o,r,a);return i.equals(s)&&r.equals(a)&&o.equals(l)?n:new Xc(ve.fromPositions(a,l),n.selectionStartKind,n.selectionStartLeftoverVisibleColumns+r.column-a.column,s,n.leftoverVisibleColumns+i.column-s.column)}_setState(e,n,i){if(i&&(i=Gjt._validateViewState(e.viewModel,i)),n){const r=e.model.validateRange(n.selectionStart),o=n.selectionStart.equalsRange(r)?n.selectionStartLeftoverVisibleColumns:0,s=e.model.validatePosition(n.position),a=n.position.equals(s)?n.leftoverVisibleColumns:0;n=new Xc(r,n.selectionStartKind,o,s,a)}else{if(!i)return;const r=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),o=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));n=new Xc(r,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,o,i.leftoverVisibleColumns)}if(i){const r=e.coordinatesConverter.validateViewRange(i.selectionStart,n.selectionStart),o=e.coordinatesConverter.validateViewPosition(i.position,n.position);i=new Xc(r,n.selectionStartKind,n.selectionStartLeftoverVisibleColumns,o,n.leftoverVisibleColumns)}else{const r=e.coordinatesConverter.convertModelPositionToViewPosition(new ot(n.selectionStart.startLineNumber,n.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new ot(n.selectionStart.endLineNumber,n.selectionStart.endColumn)),s=new ve(r.lineNumber,r.column,o.lineNumber,o.column),a=e.coordinatesConverter.convertModelPositionToViewPosition(n.position);i=new Xc(s,n.selectionStartKind,n.selectionStartLeftoverVisibleColumns,a,n.leftoverVisibleColumns)}this.modelState=n,this.viewState=i,this._updateTrackedRange(e)}};class nlt{constructor(e){this.context=e,this.cursors=[new tlt(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(e=>e.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(e=>e.asCursorState())}getViewPositions(){return this.cursors.map(e=>e.viewState.position)}getTopMostViewPosition(){return xpi(this.cursors,Ah(e=>e.viewState.position,ot.compare)).viewState.position}getBottomMostViewPosition(){return _pi(this.cursors,Ah(e=>e.viewState.position,ot.compare)).viewState.position}getSelections(){return this.cursors.map(e=>e.modelState.selection)}getViewSelections(){return this.cursors.map(e=>e.viewState.selection)}setSelections(e){this.setStates(Kr.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){e!==null&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const n=this.cursors.length-1,i=e.length;if(n<i){const r=i-n;for(let o=0;o<r;o++)this._addSecondaryCursor()}else if(n>i){const r=n-i;for(let o=0;o<r;o++)this._removeSecondaryCursor(this.cursors.length-2)}for(let r=0;r<i;r++)this.cursors[r+1].setState(this.context,e[r].modelState,e[r].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.cursors.push(new tlt(this.context)),this.lastAddedCursorIndex=this.cursors.length-1}getLastAddedCursorIndex(){return this.cursors.length===1||this.lastAddedCursorIndex===0?0:this.lastAddedCursorIndex}_removeSecondaryCursor(e){this.lastAddedCursorIndex>=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(this.cursors.length===1)return;const e=this.cursors.slice(0),n=[];for(let i=0,r=e.length;i<r;i++)n.push({index:i,selection:e[i].modelState.selection});n.sort(Ah(i=>i.selection,ve.compareRangesUsingStarts));for(let i=0;i<n.length-1;i++){const r=n[i],o=n[i+1],s=r.selection,a=o.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let l;if(a.isEmpty()||s.isEmpty()?l=a.getStartPosition().isBeforeOrEqual(s.getEndPosition()):l=a.getStartPosition().isBefore(s.getEndPosition()),l){const c=r.index<o.index?i:i+1,u=r.index<o.index?i+1:i,d=n[u].index,h=n[c].index,f=n[u].selection,m=n[c].selection;if(!f.equalsSelection(m)){const p=f.plusRange(m),g=f.selectionStartLineNumber===f.startLineNumber&&f.selectionStartColumn===f.startColumn,y=m.selectionStartLineNumber===m.startLineNumber&&m.selectionStartColumn===m.startColumn;let _;d===this.lastAddedCursorIndex?(_=g,this.lastAddedCursorIndex=h):_=y;let w;_?w=new Pn(p.startLineNumber,p.startColumn,p.endLineNumber,p.endColumn):w=new Pn(p.endLineNumber,p.endColumn,p.startLineNumber,p.startColumn),n[c].selection=w;const C=Kr.fromModelSelection(w);e[h].setState(this.context,C.modelState,C.viewState)}for(const p of n)p.index>d&&p.index--;e.splice(d,1),n.splice(u,1),this._removeSecondaryCursor(d-1),i--}}}}class ilt{constructor(e,n,i,r){this._cursorContextBrand=void 0,this.model=e,this.viewModel=n,this.coordinatesConverter=i,this.cursorConfig=r}}class ywi{constructor(){this.type=0}}class _wi{constructor(){this.type=1}}class xwi{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class wwi{constructor(e,n,i){this.selections=e,this.modelSelections=n,this.reason=i,this.type=3}}class hL{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin,this.affectsLineNumber=e.affectsLineNumber):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0,this.affectsLineNumber=!0)}}class SQ{constructor(){this.type=5}}class Cwi{constructor(e){this.type=6,this.isFocused=e}}class Swi{constructor(){this.type=7}}class NQ{constructor(){this.type=8}}class Yjt{constructor(e,n){this.fromLineNumber=e,this.count=n,this.type=9}}class RTe{constructor(e,n){this.type=10,this.fromLineNumber=e,this.toLineNumber=n}}class PTe{constructor(e,n){this.type=11,this.fromLineNumber=e,this.toLineNumber=n}}class oB{constructor(e,n,i,r,o,s,a){this.source=e,this.minimalReveal=n,this.range=i,this.selections=r,this.verticalType=o,this.revealHorizontal=s,this.scrollType=a,this.type=12}}class Nwi{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class Ewi{constructor(e){this.theme=e,this.type=14}}class Dwi{constructor(e){this.type=15,this.ranges=e}}class kwi{constructor(){this.type=16}}let Mwi=class{constructor(){this.type=17}};class Lwi extends ct{constructor(){super(),this._onEvent=this._register(new st),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let n=0,i=this._outgoingEvents.length;n<i;n++){const r=this._outgoingEvents[n].kind===e.kind?this._outgoingEvents[n].attemptToMerge(e):null;if(r){this._outgoingEvents[n]=r;return}}this._outgoingEvents.push(e)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let n=0,i=this._eventHandlers.length;n<i;n++)this._eventHandlers[n]===e&&console.warn("Detected duplicate listener in ViewEventDispatcher",e);this._eventHandlers.push(e)}removeViewEventHandler(e){for(let n=0;n<this._eventHandlers.length;n++)if(this._eventHandlers[n]===e){this._eventHandlers.splice(n,1);break}}beginEmitViewEvents(){return this._collectorCnt++,this._collectorCnt===1&&(this._collector=new Twi),this._collector}endEmitViewEvents(){if(this._collectorCnt--,this._collectorCnt===0){const e=this._collector.outgoingEvents,n=this._collector.viewEvents;this._collector=null;for(const i of e)this._addOutgoingEvent(i);n.length>0&&this._emitMany(n)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const n=this._eventHandlers.slice(0);for(const i of n)i.handleEvents(e)}}}class Twi{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class $Ve{constructor(e,n,i,r){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=n,this.contentWidth=i,this.contentHeight=r,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new $Ve(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class VVe{constructor(e,n){this.kind=1,this.oldHasFocus=e,this.hasFocus=n}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new VVe(this.oldHasFocus,e.hasFocus)}}class BVe{constructor(e,n,i,r,o,s,a,l){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=n,this._oldScrollHeight=i,this._oldScrollTop=r,this.scrollWidth=o,this.scrollLeft=s,this.scrollHeight=a,this.scrollTop=l,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new BVe(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class Iwi{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class Awi{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class Dre{constructor(e,n,i,r,o,s,a){this.kind=6,this.oldSelections=e,this.selections=n,this.oldModelVersionId=i,this.modelVersionId=r,this.source=o,this.reason=s,this.reachedMaxCursorCount=a}static _selectionsAreEqual(e,n){if(!e&&!n)return!0;if(!e||!n)return!1;const i=e.length,r=n.length;if(i!==r)return!1;for(let o=0;o<i;o++)if(!e[o].equalsSelection(n[o]))return!1;return!0}isNoOp(){return Dre._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}attemptToMerge(e){return e.kind!==this.kind?null:new Dre(this.oldSelections,e.selections,this.oldModelVersionId,e.modelVersionId,e.source,e.reason,this.reachedMaxCursorCount||e.reachedMaxCursorCount)}}class Rwi{constructor(){this.kind=5}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class Pwi{constructor(e){this.event=e,this.kind=7}isNoOp(){return!1}attemptToMerge(e){return null}}class Owi{constructor(e){this.event=e,this.kind=8}isNoOp(){return!1}attemptToMerge(e){return null}}class jwi{constructor(e){this.event=e,this.kind=9}isNoOp(){return!1}attemptToMerge(e){return null}}class Fwi{constructor(e){this.event=e,this.kind=10}isNoOp(){return!1}attemptToMerge(e){return null}}class $wi{constructor(e){this.event=e,this.kind=11}isNoOp(){return!1}attemptToMerge(e){return null}}class Vwi{constructor(e){this.event=e,this.kind=12}isNoOp(){return!1}attemptToMerge(e){return null}}class Bwi extends ct{constructor(e,n,i,r){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=n,this._coordinatesConverter=i,this.context=new ilt(this._model,this._viewModel,this._coordinatesConverter,r),this._cursors=new nlt(this.context),this._hasFocus=!1,this._isHandling=!1,this._compositionState=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=Jo(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new ilt(this._model,this._viewModel,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){const e=this._cursors.getSelections();for(let n=0;n<this._autoClosedActions.length;n++){const i=this._autoClosedActions[n];i.isValid(e)||(i.dispose(),this._autoClosedActions.splice(n,1),n--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(e,n,i,r){let o=!1;const s=this.context.cursorConfig.multiCursorLimit;r!==null&&r.length>s&&(r=r.slice(0,s),o=!0);const a=sB.from(this._model,this);return this._cursors.setStates(r),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,n,i,a,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealAll(e,n,i,r,o,s){const a=this._cursors.getViewPositions();let l=null,c=null;a.length>1?c=this._cursors.getViewSelections():l=ve.fromPositions(a[0],a[0]),e.emitViewEvent(new oB(n,i,l,c,r,o,s))}revealPrimary(e,n,i,r,o,s){const l=[this._cursors.getPrimaryCursor().viewState.selection];e.emitViewEvent(new oB(n,i,null,l,r,o,s))}saveState(){const e=[],n=this._cursors.getSelections();for(let i=0,r=n.length;i<r;i++){const o=n[i];e.push({inSelectionMode:!o.isEmpty(),selectionStart:{lineNumber:o.selectionStartLineNumber,column:o.selectionStartColumn},position:{lineNumber:o.positionLineNumber,column:o.positionColumn}})}return e}restoreState(e,n){const i=[];for(let r=0,o=n.length;r<o;r++){const s=n[r];let a=1,l=1;s.position&&s.position.lineNumber&&(a=s.position.lineNumber),s.position&&s.position.column&&(l=s.position.column);let c=a,u=l;s.selectionStart&&s.selectionStart.lineNumber&&(c=s.selectionStart.lineNumber),s.selectionStart&&s.selectionStart.column&&(u=s.selectionStart.column),i.push({selectionStartLineNumber:c,selectionStartColumn:u,positionLineNumber:a,positionColumn:l})}this.setStates(e,"restoreState",0,Kr.fromModelSelections(i)),this.revealAll(e,"restoreState",!1,0,!0,1)}onModelContentChanged(e,n){if(n instanceof Njt){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(e,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{const i=n.rawContentChangedEvent;if(this._knownModelVersionId=i.versionId,this._isHandling)return;const r=i.containsEvent(1);if(this._prevEditOperationType=0,r)this._cursors.dispose(),this._cursors=new nlt(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,"model",1,null,!1);else if(this._hasFocus&&i.resultingSelection&&i.resultingSelection.length>0){const o=Kr.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,o)&&this.revealAll(e,"modelChange",!1,0,!0,0)}else{const o=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,Kr.fromModelSelections(o))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),n=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:n.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,n),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,n,i,r){this.setStates(e,n,r,Kr.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,n){const i=[],r=[];for(let a=0,l=e.length;a<l;a++)i.push({range:e[a],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),r.push({range:n[a],options:{description:"auto-closed-enclosing",stickiness:1}});const o=this._model.deltaDecorations([],i),s=this._model.deltaDecorations([],r);this._autoClosedActions.push(new rlt(this._model,o,s))}_executeEditOperation(e){if(!e)return;e.shouldPushStackElementBefore&&this._model.pushStackElement();const n=zwi.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(n){this._interpretCommandResult(n);const i=[],r=[];for(let o=0;o<e.commands.length;o++){const s=e.commands[o];s instanceof CVe&&s.enclosingRange&&s.closeCharacterRange&&(i.push(s.closeCharacterRange),r.push(s.enclosingRange))}i.length>0&&this._pushAutoClosedAction(i,r),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,n,i,r,o){const s=sB.from(this._model,this);if(s.equals(r))return!1;const a=this._cursors.getSelections(),l=this._cursors.getViewSelections();if(e.emitViewEvent(new wwi(l,a,i)),!r||r.cursorState.length!==s.cursorState.length||s.cursorState.some((c,u)=>!c.modelState.equals(r.cursorState[u].modelState))){const c=r?r.cursorState.map(d=>d.modelState.selection):null,u=r?r.modelVersionId:0;e.emitOutgoingEvent(new Dre(c,a,u,s.modelVersionId,n||"keyboard",i,o))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const n=[];for(let i=0,r=e.length;i<r;i++){const o=e[i];if(!o.text||o.text.indexOf(`
`)>=0)return null;const s=o.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!s)return null;const a=s[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;const c=l[0].open,u=o.text.length-s[2].length-1,d=o.text.lastIndexOf(c,u-1);if(d===-1)return null;n.push([d,u])}return n}executeEdits(e,n,i,r){let o=null;n==="snippet"&&(o=this._findAutoClosingPairs(i)),o&&(i[0]._isTracked=!0);const s=[],a=[],l=this._model.pushEditOperations(this.getSelections(),i,c=>{if(o)for(let d=0,h=o.length;d<h;d++){const[f,m]=o[d],p=c[d],g=p.range.startLineNumber,y=p.range.startColumn-1+f,_=p.range.startColumn-1+m;s.push(new ve(g,_+1,g,_+2)),a.push(new ve(g,y+1,g,_+2))}const u=r(c);return u&&(this._isHandling=!0),u});l&&(this._isHandling=!1,this.setSelections(e,n,l,0)),s.length>0&&this._pushAutoClosedAction(s,a)}_executeEdit(e,n,i,r=0){if(this.context.cursorConfig.readOnly)return;const o=sB.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(s){ji(s)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(n,i,r,o,!1)&&this.revealAll(n,i,!1,0,!0,0)}getAutoClosedCharacters(){return rlt.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new aB(this._model,this.getSelections())}endComposition(e,n){const i=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{n==="keyboard"&&this._executeEditOperation(NE.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,i,this.getSelections(),this.getAutoClosedCharacters()))},e,n)}type(e,n,i){this._executeEdit(()=>{if(i==="keyboard"){const r=n.length;let o=0;for(;o<r;){const s=C8e(n,o),a=n.substr(o,s);this._executeEditOperation(NE.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),a)),o+=s}}else this._executeEditOperation(NE.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),n))},e,i)}compositionType(e,n,i,r,o,s){if(n.length===0&&i===0&&r===0){if(o!==0){const a=this.getSelections().map(l=>{const c=l.getPosition();return new Pn(c.lineNumber,c.column+o,c.lineNumber,c.column+o)});this.setSelections(e,s,a,0)}return}this._executeEdit(()=>{this._executeEditOperation(NE.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),n,i,r,o))},e,s)}paste(e,n,i,r,o){this._executeEdit(()=>{this._executeEditOperation(NE.paste(this.context.cursorConfig,this._model,this.getSelections(),n,i,r||[]))},e,o,4)}cut(e,n){this._executeEdit(()=>{this._executeEditOperation(G2.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,n)}executeCommand(e,n,i){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new Mf(0,[n],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}executeCommands(e,n,i){this._executeEdit(()=>{this._executeEditOperation(new Mf(0,n,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}}class sB{static from(e,n){return new sB(e.getVersionId(),n.getCursorStates())}constructor(e,n){this.modelVersionId=e,this.cursorState=n}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let n=0,i=this.cursorState.length;n<i;n++)if(!this.cursorState[n].equals(e.cursorState[n]))return!1;return!0}}class rlt{static getAllAutoClosedCharacters(e){let n=[];for(const i of e)n=n.concat(i.getAutoClosedCharactersRanges());return n}constructor(e,n,i){this._model=e,this._autoClosedCharactersDecorations=n,this._autoClosedEnclosingDecorations=i}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const e=[];for(let n=0;n<this._autoClosedCharactersDecorations.length;n++){const i=this._model.getDecorationRange(this._autoClosedCharactersDecorations[n]);i&&e.push(i)}return e}isValid(e){const n=[];for(let i=0;i<this._autoClosedEnclosingDecorations.length;i++){const r=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[i]);if(r&&(n.push(r),r.startLineNumber!==r.endLineNumber))return!1}n.sort(ve.compareRangesUsingStarts),e.sort(ve.compareRangesUsingStarts);for(let i=0;i<e.length;i++)if(i>=n.length||!n[i].strictContainsRange(e[i]))return!1;return!0}}class zwi{static executeCommands(e,n,i){const r={model:e,selectionsBefore:n,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(r,i);for(let s=0,a=r.trackedRanges.length;s<a;s++)r.model._setTrackedRange(r.trackedRanges[s],null,0);return o}static _innerExecuteCommands(e,n){if(this._arrayIsEmpty(n))return null;const i=this._getEditOperations(e,n);if(i.operations.length===0)return null;const r=i.operations,o=this._getLoserCursorMap(r);if(o.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;const s=[];for(let c=0,u=r.length;c<u;c++)o.hasOwnProperty(r[c].identifier.major.toString())||s.push(r[c]);i.hadTrackedEditOperation&&s.length>0&&(s[0]._isTracked=!0);let a=e.model.pushEditOperations(e.selectionsBefore,s,c=>{const u=[];for(let f=0;f<e.selectionsBefore.length;f++)u[f]=[];for(const f of c)f.identifier&&u[f.identifier.major].push(f);const d=(f,m)=>f.identifier.minor-m.identifier.minor,h=[];for(let f=0;f<e.selectionsBefore.length;f++)u[f].length>0?(u[f].sort(d),h[f]=n[f].computeCursorState(e.model,{getInverseEditOperations:()=>u[f],getTrackedSelection:m=>{const p=parseInt(m,10),g=e.model._getTrackedRange(e.trackedRanges[p]);return e.trackedRangesDirection[p]===0?new Pn(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn):new Pn(g.endLineNumber,g.endColumn,g.startLineNumber,g.startColumn)}})):h[f]=e.selectionsBefore[f];return h});a||(a=e.selectionsBefore);const l=[];for(const c in o)o.hasOwnProperty(c)&&l.push(parseInt(c,10));l.sort((c,u)=>u-c);for(const c of l)a.splice(c,1);return a}static _arrayIsEmpty(e){for(let n=0,i=e.length;n<i;n++)if(e[n])return!1;return!0}static _getEditOperations(e,n){let i=[],r=!1;for(let o=0,s=n.length;o<s;o++){const a=n[o];if(a){const l=this._getEditOperationsFromCommand(e,o,a);i=i.concat(l.operations),r=r||l.hadTrackedEditOperation}}return{operations:i,hadTrackedEditOperation:r}}static _getEditOperationsFromCommand(e,n,i){const r=[];let o=0;const s=(d,h,f=!1)=>{ve.isEmpty(d)&&h===""||r.push({identifier:{major:n,minor:o++},range:d,text:h,forceMoveMarkers:f,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let a=!1;const u={addEditOperation:s,addTrackedEditOperation:(d,h,f)=>{a=!0,s(d,h,f)},trackSelection:(d,h)=>{const f=Pn.liftSelection(d);let m;if(f.isEmpty())if(typeof h=="boolean")h?m=2:m=3;else{const y=e.model.getLineMaxColumn(f.startLineNumber);f.startColumn===y?m=2:m=3}else m=1;const p=e.trackedRanges.length,g=e.model._setTrackedRange(null,f,m);return e.trackedRanges[p]=g,e.trackedRangesDirection[p]=f.getDirection(),p.toString()}};try{i.getEditOperations(e.model,u)}catch(d){return ji(d),{operations:[],hadTrackedEditOperation:!1}}return{operations:r,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((i,r)=>-ve.compareRangesUsingEnds(i.range,r.range));const n={};for(let i=1;i<e.length;i++){const r=e[i-1],o=e[i];if(ve.getStartPosition(r.range).isBefore(ve.getEndPosition(o.range))){let s;r.identifier.major>o.identifier.major?s=r.identifier.major:s=o.identifier.major,n[s.toString()]=!0;for(let a=0;a<e.length;a++)e[a].identifier.major===s&&(e.splice(a,1),a<i&&i--,a--);i>0&&i--}}return n}}class Hwi{constructor(e,n,i){this.text=e,this.startSelection=n,this.endSelection=i}}class aB{static _capture(e,n){const i=[];for(const r of n){if(r.startLineNumber!==r.endLineNumber)return null;i.push(new Hwi(e.getLineContent(r.startLineNumber),r.startColumn-1,r.endColumn-1))}return i}constructor(e,n){this._original=aB._capture(e,n)}deduceOutcome(e,n){if(!this._original)return null;const i=aB._capture(e,n);if(!i||this._original.length!==i.length)return null;const r=[];for(let o=0,s=this._original.length;o<s;o++)r.push(aB._deduceOutcome(this._original[o],i[o]));return r}static _deduceOutcome(e,n){const i=Math.min(e.startSelection,n.startSelection,ck(e.text,n.text)),r=Math.min(e.text.length-e.endSelection,n.text.length-n.endSelection,$ie(e.text,n.text)),o=e.text.substring(i,e.text.length-r),s=n.text.substring(i,n.text.length-r);return new V0i(o,e.startSelection-i,e.endSelection-i,s,n.startSelection-i,n.endSelection-i)}}const olt={getInitialState:()=>s5,tokenizeEncoded:(t,e,n)=>Gfe(0,n)};async function Wwi(t,e,n){if(!n)return slt(e,t.languageIdCodec,olt);const i=await Ca.getOrCreate(n);return slt(e,t.languageIdCodec,i||olt)}function Uwi(t,e,n,i,r,o,s){let a="<div>",l=i,c=0,u=!0;for(let d=0,h=e.getCount();d<h;d++){const f=e.getEndOffset(d);if(f<=i)continue;let m="";for(;l<f&&l<r;l++){const p=t.charCodeAt(l);switch(p){case 9:{let g=o-(l+c)%o;for(c+=g-1;g>0;)s&&u?(m+="&#160;",u=!1):(m+=" ",u=!0),g--;break}case 60:m+="&lt;",u=!1;break;case 62:m+="&gt;",u=!1;break;case 38:m+="&amp;",u=!1;break;case 0:m+="&#00;",u=!1;break;case 65279:case 8232:case 8233:case 133:m+="�",u=!1;break;case 13:m+="&#8203",u=!1;break;case 32:s&&u?(m+="&#160;",u=!1):(m+=" ",u=!0);break;default:m+=String.fromCharCode(p),u=!1}}if(a+=`<span style="${e.getInlineStyle(d,n)}">${m}</span>`,f>r||l>=r)break}return a+="</div>",a}function slt(t,e,n){let i='<div class="monaco-tokenized-source">';const r=Tw(t);let o=n.getInitialState();for(let s=0,a=r.length;s<a;s++){const l=r[s];s>0&&(i+="<br/>");const c=n.tokenizeEncoded(l,!0,o);$u.convertToEndOffset(c.tokens,l.length);const d=new $u(c.tokens,l,e).inflate();let h=0;for(let f=0,m=d.getCount();f<m;f++){const p=d.getClassName(f),g=d.getEndOffset(f);i+=`<span class="${p}">${z9(l.substring(h,g))}</span>`,h=g}o=c.endState}return i+="</div>",i}class Kwi{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const n=this._inserts,i=this._changes,r=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(n,i,r)}}class qwi{constructor(e,n,i,r,o){this.id=e,this.afterLineNumber=n,this.ordinal=i,this.height=r,this.minWidth=o,this.prefixSum=0}}var ED;let Gwi=(ED=class{constructor(e,n,i,r){this._instanceId=f4t(++ED.INSTANCE_COUNT),this._pendingChanges=new Kwi,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=n,this._paddingTop=i,this._paddingBottom=r}static findInsertionIndex(e,n,i){let r=0,o=e.length;for(;r<o;){const s=r+o>>>1;n===e[s].afterLineNumber?i<e[s].ordinal?o=s:r=s+1:n<e[s].afterLineNumber?o=s:r=s+1}return r}setLineHeight(e){this._checkPendingChanges(),this._lineHeight=e}setPadding(e,n){this._paddingTop=e,this._paddingBottom=n}onFlushed(e){this._checkPendingChanges(),this._lineCount=e}changeWhitespace(e){let n=!1;try{e({insertWhitespace:(r,o,s,a)=>{n=!0,r=r|0,o=o|0,s=s|0,a=a|0;const l=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new qwi(l,r,o,s,a)),l},changeOneWhitespace:(r,o,s)=>{n=!0,o=o|0,s=s|0,this._pendingChanges.change({id:r,newAfterLineNumber:o,newHeight:s})},removeWhitespace:r=>{n=!0,this._pendingChanges.remove({id:r})}})}finally{this._pendingChanges.commit(this)}return n}_commitPendingChanges(e,n,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+n.length+i.length<=1){for(const l of e)this._insertWhitespace(l);for(const l of n)this._changeOneWhitespace(l.id,l.newAfterLineNumber,l.newHeight);for(const l of i){const c=this._findWhitespaceIndex(l.id);c!==-1&&this._removeWhitespace(c)}return}const r=new Set;for(const l of i)r.add(l.id);const o=new Map;for(const l of n)o.set(l.id,l);const s=l=>{const c=[];for(const u of l)if(!r.has(u.id)){if(o.has(u.id)){const d=o.get(u.id);u.afterLineNumber=d.newAfterLineNumber,u.height=d.newHeight}c.push(u)}return c},a=s(this._arr).concat(s(e));a.sort((l,c)=>l.afterLineNumber===c.afterLineNumber?l.ordinal-c.ordinal:l.afterLineNumber-c.afterLineNumber),this._arr=a,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const n=ED.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(n,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1)}_findWhitespaceIndex(e){const n=this._arr;for(let i=0,r=n.length;i<r;i++)if(n[i].id===e)return i;return-1}_changeOneWhitespace(e,n,i){const r=this._findWhitespaceIndex(e);if(r!==-1&&(this._arr[r].height!==i&&(this._arr[r].height=i,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,r-1)),this._arr[r].afterLineNumber!==n)){const o=this._arr[r];this._removeWhitespace(r),o.afterLineNumber=n,this._insertWhitespace(o)}}_removeWhitespace(e){this._arr.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1)}onLinesDeleted(e,n){this._checkPendingChanges(),e=e|0,n=n|0,this._lineCount-=n-e+1;for(let i=0,r=this._arr.length;i<r;i++){const o=this._arr[i].afterLineNumber;e<=o&&o<=n?this._arr[i].afterLineNumber=e-1:o>n&&(this._arr[i].afterLineNumber-=n-e+1)}}onLinesInserted(e,n){this._checkPendingChanges(),e=e|0,n=n|0,this._lineCount+=n-e+1;for(let i=0,r=this._arr.length;i<r;i++){const o=this._arr[i].afterLineNumber;e<=o&&(this._arr[i].afterLineNumber+=n-e+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),this._arr.length===0?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(e){this._checkPendingChanges(),e=e|0;let n=Math.max(0,this._prefixSumValidIndex+1);n===0&&(this._arr[0].prefixSum=this._arr[0].height,n++);for(let i=n;i<=e;i++)this._arr[i].prefixSum=this._arr[i-1].prefixSum+this._arr[i].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,e),this._arr[e].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const e=this._lineHeight*this._lineCount,n=this.getWhitespacesTotalHeight();return e+n+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(e){this._checkPendingChanges(),e=e|0;const n=this._findLastWhitespaceBeforeLineNumber(e);return n===-1?0:this.getWhitespacesAccumulatedHeight(n)}_findLastWhitespaceBeforeLineNumber(e){e=e|0;const n=this._arr;let i=0,r=n.length-1;for(;i<=r;){const s=(r-i|0)/2|0,a=i+s|0;if(n[a].afterLineNumber<e){if(a+1>=n.length||n[a+1].afterLineNumber>=e)return a;i=a+1|0}else r=a-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;const i=this._findLastWhitespaceBeforeLineNumber(e)+1;return i<this._arr.length?i:-1}getFirstWhitespaceIndexAfterLineNumber(e){return this._checkPendingChanges(),e=e|0,this._findFirstWhitespaceAfterLineNumber(e)}getVerticalOffsetForLineNumber(e,n=!1){this._checkPendingChanges(),e=e|0;let i;e>1?i=this._lineHeight*(e-1):i=0;const r=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(n?1:0));return i+r+this._paddingTop}getVerticalOffsetAfterLineNumber(e,n=!1){this._checkPendingChanges(),e=e|0;const i=this._lineHeight*e,r=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(n?1:0));return i+r+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let e=0;for(let n=0,i=this._arr.length;n<i;n++)e=Math.max(e,this._arr[n].minWidth);this._minWidth=e}return this._minWidth}isAfterLines(e){this._checkPendingChanges();const n=this.getLinesTotalHeight();return e>n}isInTopPadding(e){return this._paddingTop===0?!1:(this._checkPendingChanges(),e<this._paddingTop)}isInBottomPadding(e){if(this._paddingBottom===0)return!1;this._checkPendingChanges();const n=this.getLinesTotalHeight();return e>=n-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e=e|0,e<0)return 1;const n=this._lineCount|0,i=this._lineHeight;let r=1,o=n;for(;r<o;){const s=(r+o)/2|0,a=this.getVerticalOffsetForLineNumber(s)|0;if(e>=a+i)r=s+1;else{if(e>=a)return s;o=s}}return r>n?n:r}getLinesViewportData(e,n){this._checkPendingChanges(),e=e|0,n=n|0;const i=this._lineHeight,r=this.getLineNumberAtOrAfterVerticalOffset(e)|0,o=this.getVerticalOffsetForLineNumber(r)|0;let s=this._lineCount|0,a=this.getFirstWhitespaceIndexAfterLineNumber(r)|0;const l=this.getWhitespacesCount()|0;let c,u;a===-1?(a=l,u=s+1,c=0):(u=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);let d=o,h=d;const f=5e5;let m=0;o>=f&&(m=Math.floor(o/f)*f,m=Math.floor(m/i)*i,h-=m);const p=[],g=e+(n-e)/2;let y=-1;for(let N=r;N<=s;N++){if(y===-1){const E=d,D=d+i;(E<=g&&g<D||E>g)&&(y=N)}for(d+=i,p[N-r]=h,h+=i;u===N;)h+=c,d+=c,a++,a>=l?u=s+1:(u=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);if(d>=n){s=N;break}}y===-1&&(y=s);const _=this.getVerticalOffsetForLineNumber(s)|0;let w=r,C=s;return w<C&&o<e&&w++,w<C&&_+i>n&&C--,{bigNumbersDelta:m,startLineNumber:r,endLineNumber:s,relativeVerticalOffset:p,centeredLineNumber:y,completelyVisibleStartLineNumber:w,completelyVisibleEndLineNumber:C,lineHeight:this._lineHeight}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e=e|0;const n=this.getAfterLineNumberForWhitespaceIndex(e);let i;n>=1?i=this._lineHeight*n:i=0;let r;return e>0?r=this.getWhitespacesAccumulatedHeight(e-1):r=0,i+r+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e=e|0;let n=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;const r=this.getVerticalOffsetForWhitespaceIndex(i),o=this.getHeightForWhitespaceIndex(i);if(e>=r+o)return-1;for(;n<i;){const s=Math.floor((n+i)/2),a=this.getVerticalOffsetForWhitespaceIndex(s),l=this.getHeightForWhitespaceIndex(s);if(e>=a+l)n=s+1;else{if(e>=a)return s;i=s}}return n}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e=e|0;const n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(n<0||n>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(n);if(i>e)return null;const r=this.getHeightForWhitespaceIndex(n),o=this.getIdForWhitespaceIndex(n),s=this.getAfterLineNumberForWhitespaceIndex(n);return{id:o,afterLineNumber:s,verticalOffset:i,height:r}}getWhitespaceViewportData(e,n){this._checkPendingChanges(),e=e|0,n=n|0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),r=this.getWhitespacesCount()-1;if(i<0)return[];const o=[];for(let s=i;s<=r;s++){const a=this.getVerticalOffsetForWhitespaceIndex(s),l=this.getHeightForWhitespaceIndex(s);if(a>=n)break;o.push({id:this.getIdForWhitespaceIndex(s),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(s),verticalOffset:a,height:l})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].height}},ED.INSTANCE_COUNT=0,ED);const Ywi=125;class Q7{constructor(e,n,i,r){e=e|0,n=n|0,i=i|0,r=r|0,e<0&&(e=0),n<0&&(n=0),i<0&&(i=0),r<0&&(r=0),this.width=e,this.contentWidth=n,this.scrollWidth=Math.max(e,n),this.height=i,this.contentHeight=r,this.scrollHeight=Math.max(i,r)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class Xwi extends ct{constructor(e,n){super(),this._onDidContentSizeChange=this._register(new st),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new Q7(0,0,0,0),this._scrollable=this._register(new O6({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:n})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const n=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=n.contentWidth!==e.contentWidth,r=n.contentHeight!==e.contentHeight;(i||r)&&this._onDidContentSizeChange.fire(new $Ve(n.contentWidth,n.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class Zwi extends ct{constructor(e,n,i){super(),this._configuration=e;const r=this._configuration.options,o=r.get(146),s=r.get(84);this._linesLayout=new Gwi(n,r.get(67),s.top,s.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new Xwi(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new Q7(o.contentWidth,0,o.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(115)?Ywi:0)}onConfigurationChanged(e){const n=this._configuration.options;if(e.hasChanged(67)&&this._linesLayout.setLineHeight(n.get(67)),e.hasChanged(84)){const i=n.get(84);this._linesLayout.setPadding(i.top,i.bottom)}if(e.hasChanged(146)){const i=n.get(146),r=i.contentWidth,o=i.height,s=this._scrollable.getScrollDimensions(),a=s.contentWidth;this._scrollable.setScrollDimensions(new Q7(r,s.contentWidth,o,this._getContentHeight(r,o,a)))}else this._updateHeight();e.hasChanged(115)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,n){this._linesLayout.onLinesDeleted(e,n)}onLinesInserted(e,n){this._linesLayout.onLinesInserted(e,n)}_getHorizontalScrollbarHeight(e,n){const r=this._configuration.options.get(104);return r.horizontal===2||e>=n?0:r.horizontalScrollbarSize}_getContentHeight(e,n,i){const r=this._configuration.options;let o=this._linesLayout.getLinesTotalHeight();return r.get(106)?o+=Math.max(0,n-r.get(67)-r.get(84).bottom):r.get(104).ignoreHorizontalScrollbarInContentHeight||(o+=this._getHorizontalScrollbarHeight(e,i)),o}_updateHeight(){const e=this._scrollable.getScrollDimensions(),n=e.width,i=e.height,r=e.contentWidth;this._scrollable.setScrollDimensions(new Q7(n,e.contentWidth,i,this._getContentHeight(n,i,r)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),n=this._scrollable.getCurrentScrollPosition();return new Ust(n.scrollTop,n.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),n=this._scrollable.getFutureScrollPosition();return new Ust(n.scrollTop,n.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,n=this._maxLineWidth,i=e.get(147),r=e.get(50),o=e.get(146);if(i.isViewportWrapping){const s=e.get(73);return n>o.contentWidth+r.typicalHalfwidthCharacterWidth&&s.enabled&&s.side==="right"?n+o.verticalScrollbarWidth:n}else{const s=e.get(105)*r.typicalHalfwidthCharacterWidth,a=this._linesLayout.getWhitespaceMinWidth();return Math.max(n+s+o.verticalScrollbarWidth,a,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Q7(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),n=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(n),r=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i);return{scrollTop:n,scrollTopWithoutViewZones:n-r,scrollLeft:e.scrollLeft}}changeWhitespace(e){const n=this._linesLayout.changeWhitespace(e);return n&&this.onHeightMaybeChanged(),n}getVerticalOffsetForLineNumber(e,n=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,n)}getVerticalOffsetAfterLineNumber(e,n=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,n)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const n=this._scrollable.getScrollDimensions();return e+n.height>n.scrollHeight&&(e=n.scrollHeight-n.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+n.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,n){n===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,n){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+n})}}class Qwi{constructor(e,n,i,r,o){this.editorId=e,this.model=n,this.configuration=i,this._linesCollection=r,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const n=e.id;let i=this._decorationsCache[n];if(!i){const r=e.range,o=e.options;let s;if(o.isWholeLine){const a=this._coordinatesConverter.convertModelPositionToViewPosition(new ot(r.startLineNumber,1),0,!1,!0),l=this._coordinatesConverter.convertModelPositionToViewPosition(new ot(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber)),1);s=new ve(a.lineNumber,a.column,l.lineNumber,l.column)}else s=this._coordinatesConverter.convertModelRangeToViewRange(r,1);i=new S3t(s,o),this._decorationsCache[n]=i}return i}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let n=this._cachedModelDecorationsResolver!==null;return n=n&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),n||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,n=!1,i=!1){const r=new ve(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(r,n,i).inlineDecorations[0]}_getDecorationsInRange(e,n,i){const r=this._linesCollection.getDecorationsInRange(e,this.editorId,Tie(this.configuration.options),n,i),o=e.startLineNumber,s=e.endLineNumber,a=[];let l=0;const c=[];for(let u=o;u<=s;u++)c[u-o]=[];for(let u=0,d=r.length;u<d;u++){const h=r[u],f=h.options;if(!zVe(this.model,h))continue;const m=this._getOrCreateViewModelDecoration(h),p=m.range;if(a[l++]=m,f.inlineClassName){const g=new K9(p,f.inlineClassName,f.inlineClassNameAffectsLetterSpacing?3:0),y=Math.max(o,p.startLineNumber),_=Math.min(s,p.endLineNumber);for(let w=y;w<=_;w++)c[w-o].push(g)}if(f.beforeContentClassName&&o<=p.startLineNumber&&p.startLineNumber<=s){const g=new K9(new ve(p.startLineNumber,p.startColumn,p.startLineNumber,p.startColumn),f.beforeContentClassName,1);c[p.startLineNumber-o].push(g)}if(f.afterContentClassName&&o<=p.endLineNumber&&p.endLineNumber<=s){const g=new K9(new ve(p.endLineNumber,p.endColumn,p.endLineNumber,p.endColumn),f.afterContentClassName,2);c[p.endLineNumber-o].push(g)}}return{decorations:a,inlineDecorations:c}}}function zVe(t,e){return!(e.options.hideInCommentTokens&&HVe(t,e)||e.options.hideInStringTokens&&WVe(t,e))}function HVe(t,e){return Xjt(t,e.range,n=>n===1)}function WVe(t,e){return Xjt(t,e.range,n=>n===2)}function Xjt(t,e,n){for(let i=e.startLineNumber;i<=e.endLineNumber;i++){const r=t.tokenization.getLineTokens(i),o=i===e.startLineNumber,s=i===e.endLineNumber;let a=o?r.findTokenIndexAtOffset(e.startColumn-1):0;for(;a<r.getCount()&&!(s&&r.getStartOffset(a)>e.endColumn-1);){if(!n(r.getStandardTokenType(a)))return!1;a++}}return!0}function m1e(t,e){return t===null?e?kre.INSTANCE:Mre.INSTANCE:new Jwi(t,e)}class Jwi{constructor(e,n){this._projectionData=e,this._isVisible=n}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,n,i){this._assertVisible();const r=i>0?this._projectionData.breakOffsets[i-1]:0,o=this._projectionData.breakOffsets[i];let s;if(this._projectionData.injectionOffsets!==null){const a=this._projectionData.injectionOffsets.map((c,u)=>new X0(0,0,c+1,this._projectionData.injectionOptions[u],0));s=X0.applyInjectedText(e.getLineContent(n),a).substring(r,o)}else s=e.getValueInRange({startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:o+1});return i>0&&(s=alt(this._projectionData.wrappedTextIndentLength)+s),s}getViewLineLength(e,n,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,n,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,n,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,n,i){const r=new Array;return this.getViewLinesData(e,n,i,1,0,[!0],r),r[0]}getViewLinesData(e,n,i,r,o,s,a){this._assertVisible();const l=this._projectionData,c=l.injectionOffsets,u=l.injectionOptions;let d=null;if(c){d=[];let f=0,m=0;for(let p=0;p<l.getOutputLineCount();p++){const g=new Array;d[p]=g;const y=p>0?l.breakOffsets[p-1]:0,_=l.breakOffsets[p];for(;m<c.length;){const w=u[m].content.length,C=c[m]+f,N=C+w;if(C>_)break;if(y<N){const E=u[m];if(E.inlineClassName){const D=p>0?l.wrappedTextIndentLength:0,k=D+Math.max(C-y,0),M=D+Math.min(N-y,_-y);k!==M&&g.push(new Egi(k,M,E.inlineClassName,E.inlineClassNameAffectsLetterSpacing))}}if(N<=_)f+=w,m++;else break}}}let h;c?h=e.tokenization.getLineTokens(n).withInserted(c.map((f,m)=>({offset:f,text:u[m].content,tokenMetadata:$u.defaultTokenMetadata}))):h=e.tokenization.getLineTokens(n);for(let f=i;f<i+r;f++){const m=o+f-i;if(!s[m]){a[m]=null;continue}a[m]=this._getViewLineData(h,d?d[f]:null,f)}}_getViewLineData(e,n,i){this._assertVisible();const r=this._projectionData,o=i>0?r.wrappedTextIndentLength:0,s=i>0?r.breakOffsets[i-1]:0,a=r.breakOffsets[i],l=e.sliceAndInflate(s,a,o);let c=l.getLineContent();i>0&&(c=alt(r.wrappedTextIndentLength)+c);const u=this._projectionData.getMinOutputOffset(i)+1,d=c.length+1,h=i+1<this.getViewLineCount(),f=i===0?0:r.breakOffsetsVisibleColumn[i-1];return new Z8e(c,h,u,d,f,l,n)}getModelColumnOfViewPosition(e,n){return this._assertVisible(),this._projectionData.translateToInputOffset(e,n-1)+1}getViewPositionOfModelPosition(e,n,i=2){return this._assertVisible(),this._projectionData.translateToOutputPosition(n-1,i).toPosition(e)}getViewLineNumberOfModelPosition(e,n){this._assertVisible();const i=this._projectionData.translateToOutputPosition(n-1);return e+i.outputLineIndex}normalizePosition(e,n,i){const r=n.lineNumber-e;return this._projectionData.normalizeOutputPosition(e,n.column-1,i).toPosition(r)}getInjectedTextAt(e,n){return this._projectionData.getInjectedText(e,n-1)}_assertVisible(){if(!this._isVisible)throw new Error("Not supported")}}const Qle=class Qle{constructor(){}isVisible(){return!0}setVisible(e){return e?this:Mre.INSTANCE}getProjectionData(){return null}getViewLineCount(){return 1}getViewLineContent(e,n,i){return e.getLineContent(n)}getViewLineLength(e,n,i){return e.getLineLength(n)}getViewLineMinColumn(e,n,i){return e.getLineMinColumn(n)}getViewLineMaxColumn(e,n,i){return e.getLineMaxColumn(n)}getViewLineData(e,n,i){const r=e.tokenization.getLineTokens(n),o=r.getLineContent();return new Z8e(o,!1,1,o.length+1,0,r.inflate(),null)}getViewLinesData(e,n,i,r,o,s,a){if(!s[o]){a[o]=null;return}a[o]=this.getViewLineData(e,n,0)}getModelColumnOfViewPosition(e,n){return n}getViewPositionOfModelPosition(e,n){return new ot(e,n)}getViewLineNumberOfModelPosition(e,n){return e}normalizePosition(e,n,i){return n}getInjectedTextAt(e,n){return null}};Qle.INSTANCE=new Qle;let kre=Qle;const Jle=class Jle{constructor(){}isVisible(){return!1}setVisible(e){return e?kre.INSTANCE:this}getProjectionData(){return null}getViewLineCount(){return 0}getViewLineContent(e,n,i){throw new Error("Not supported")}getViewLineLength(e,n,i){throw new Error("Not supported")}getViewLineMinColumn(e,n,i){throw new Error("Not supported")}getViewLineMaxColumn(e,n,i){throw new Error("Not supported")}getViewLineData(e,n,i){throw new Error("Not supported")}getViewLinesData(e,n,i,r,o,s,a){throw new Error("Not supported")}getModelColumnOfViewPosition(e,n){throw new Error("Not supported")}getViewPositionOfModelPosition(e,n){throw new Error("Not supported")}getViewLineNumberOfModelPosition(e,n){throw new Error("Not supported")}normalizePosition(e,n,i){throw new Error("Not supported")}getInjectedTextAt(e,n){throw new Error("Not supported")}};Jle.INSTANCE=new Jle;let Mre=Jle;const p1e=[""];function alt(t){if(t>=p1e.length)for(let e=1;e<=t;e++)p1e[e]=e1i(e);return p1e[t]}function e1i(t){return new Array(t+1).join(" ")}class t1i{constructor(e,n,i,r,o,s,a,l,c,u){this._editorId=e,this.model=n,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=r,this.fontInfo=o,this.tabSize=s,this.wrappingStrategy=a,this.wrappingColumn=l,this.wrappingIndent=c,this.wordBreak=u,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new i1i(this)}_constructLines(e,n){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const i=this.model.getLinesContent(),r=this.model.getInjectedTextDecorations(this._editorId),o=i.length,s=this.createLineBreaksComputer(),a=new uS(X0.fromDecorations(r));for(let p=0;p<o;p++){const g=a.takeWhile(y=>y.lineNumber===p+1);s.addRequest(i[p],g,n?n[p]:null)}const l=s.finalize(),c=[],u=this.hiddenAreasDecorationIds.map(p=>this.model.getDecorationRange(p)).sort(ve.compareRangesUsingStarts);let d=1,h=0,f=-1,m=f+1<u.length?h+1:o+2;for(let p=0;p<o;p++){const g=p+1;g===m&&(f++,d=u[f].startLineNumber,h=u[f].endLineNumber,m=f+1<u.length?h+1:o+2);const y=g>=d&&g<=h,_=m1e(l[p],!y);c[p]=_.getViewLineCount(),this.modelLineProjections[p]=_}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new Zmi(c)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){const n=e.map(h=>this.model.validateRange(h)),i=n1i(n),r=this.hiddenAreasDecorationIds.map(h=>this.model.getDecorationRange(h)).sort(ve.compareRangesUsingStarts);if(i.length===r.length){let h=!1;for(let f=0;f<i.length;f++)if(!i[f].equalsRange(r[f])){h=!0;break}if(!h)return!1}const o=i.map(h=>({range:h,options:Hi.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,o);const s=i;let a=1,l=0,c=-1,u=c+1<s.length?l+1:this.modelLineProjections.length+2,d=!1;for(let h=0;h<this.modelLineProjections.length;h++){const f=h+1;f===u&&(c++,a=s[c].startLineNumber,l=s[c].endLineNumber,u=c+1<s.length?l+1:this.modelLineProjections.length+2);let m=!1;if(f>=a&&f<=l?this.modelLineProjections[h].isVisible()&&(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!1),m=!0):(d=!0,this.modelLineProjections[h].isVisible()||(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!0),m=!0)),m){const p=this.modelLineProjections[h].getViewLineCount();this.projectedModelLineLineCounts.setValue(h,p)}}return d||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,n){return e<1||e>this.modelLineProjections.length?!1:this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,n,i,r,o){const s=this.fontInfo.equals(e),a=this.wrappingStrategy===n,l=this.wrappingColumn===i,c=this.wrappingIndent===r,u=this.wordBreak===o;if(s&&a&&l&&c&&u)return!1;const d=s&&a&&!l&&c&&u;this.fontInfo=e,this.wrappingStrategy=n,this.wrappingColumn=i,this.wrappingIndent=r,this.wordBreak=o;let h=null;if(d){h=[];for(let f=0,m=this.modelLineProjections.length;f<m;f++)h[f]=this.modelLineProjections[f].getProjectionData()}return this._constructLines(!1,h),!0}createLineBreaksComputer(){return(this.wrappingStrategy==="advanced"?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent,this.wordBreak)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(e,n,i){if(!e||e<=this._validModelVersionId)return null;const r=n===1?1:this.projectedModelLineLineCounts.getPrefixSum(n-1)+1,o=this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections.splice(n-1,i-n+1),this.projectedModelLineLineCounts.removeValues(n-1,i-n+1),new RTe(r,o)}onModelLinesInserted(e,n,i,r){if(!e||e<=this._validModelVersionId)return null;const o=n>2&&!this.modelLineProjections[n-2].isVisible(),s=n===1?1:this.projectedModelLineLineCounts.getPrefixSum(n-1)+1;let a=0;const l=[],c=[];for(let u=0,d=r.length;u<d;u++){const h=m1e(r[u],!o);l.push(h);const f=h.getViewLineCount();a+=f,c[u]=f}return this.modelLineProjections=this.modelLineProjections.slice(0,n-1).concat(l).concat(this.modelLineProjections.slice(n-1)),this.projectedModelLineLineCounts.insertValues(n-1,c),new PTe(s,s+a-1)}onModelLineChanged(e,n,i){if(e!==null&&e<=this._validModelVersionId)return[!1,null,null,null];const r=n-1,o=this.modelLineProjections[r].getViewLineCount(),s=this.modelLineProjections[r].isVisible(),a=m1e(i,s);this.modelLineProjections[r]=a;const l=this.modelLineProjections[r].getViewLineCount();let c=!1,u=0,d=-1,h=0,f=-1,m=0,p=-1;o>l?(u=this.projectedModelLineLineCounts.getPrefixSum(n-1)+1,d=u+l-1,m=d+1,p=m+(o-l)-1,c=!0):o<l?(u=this.projectedModelLineLineCounts.getPrefixSum(n-1)+1,d=u+o-1,h=d+1,f=h+(l-o)-1,c=!0):(u=this.projectedModelLineLineCounts.getPrefixSum(n-1)+1,d=u+l-1),this.projectedModelLineLineCounts.setValue(r,l);const g=u<=d?new Yjt(u,d-u+1):null,y=h<=f?new PTe(h,f):null,_=m<=p?new RTe(m,p):null;return[c,g,y,_]}acceptVersionId(e){this._validModelVersionId=e,this.modelLineProjections.length===1&&!this.modelLineProjections[0].isVisible()&&this.setHiddenAreas([])}getViewLineCount(){return this.projectedModelLineLineCounts.getTotalSum()}_toValidViewLineNumber(e){if(e<1)return 1;const n=this.getViewLineCount();return e>n?n:e|0}getActiveIndentGuide(e,n,i){e=this._toValidViewLineNumber(e),n=this._toValidViewLineNumber(n),i=this._toValidViewLineNumber(i);const r=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),s=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),a=this.model.guides.getActiveIndentGuide(r.lineNumber,o.lineNumber,s.lineNumber),l=this.convertModelPositionToViewPosition(a.startLineNumber,1),c=this.convertModelPositionToViewPosition(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber));return{startLineNumber:l.lineNumber,endLineNumber:c.lineNumber,indent:a.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),i=n.index,r=n.remainder;return new llt(i+1,r)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const n=this.modelLineProjections[e.modelLineNumber-1],i=n.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),r=n.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new ot(e.modelLineNumber,r)}getModelEndPositionOfViewLine(e){const n=this.modelLineProjections[e.modelLineNumber-1],i=n.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),r=n.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new ot(e.modelLineNumber,r)}getViewLineInfosGroupedByModelRanges(e,n){const i=this.getViewLineInfo(e),r=this.getViewLineInfo(n),o=new Array;let s=this.getModelStartPositionOfViewLine(i),a=new Array;for(let l=i.modelLineNumber;l<=r.modelLineNumber;l++){const c=this.modelLineProjections[l-1];if(c.isVisible()){const u=l===i.modelLineNumber?i.modelLineWrappedLineIdx:0,d=l===r.modelLineNumber?r.modelLineWrappedLineIdx+1:c.getViewLineCount();for(let h=u;h<d;h++)a.push(new llt(l,h))}if(!c.isVisible()&&s){const u=new ot(l-1,this.model.getLineMaxColumn(l-1)+1),d=ve.fromPositions(s,u);o.push(new clt(d,a)),a=[],s=null}else c.isVisible()&&!s&&(s=new ot(l,1))}if(s){const l=ve.fromPositions(s,this.getModelEndPositionOfViewLine(r));o.push(new clt(l,a))}return o}getViewLinesBracketGuides(e,n,i,r){const o=i?this.convertViewPositionToModelPosition(i.lineNumber,i.column):null,s=[];for(const a of this.getViewLineInfosGroupedByModelRanges(e,n)){const l=a.modelRange.startLineNumber,c=this.model.guides.getLinesBracketGuides(l,a.modelRange.endLineNumber,o,r);for(const u of a.viewLines){const h=c[u.modelLineNumber-l].map(f=>{if(f.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[u.modelLineNumber-1].getViewPositionOfModelPosition(0,f.forWrappedLinesAfterColumn).lineNumber>=u.modelLineWrappedLineIdx||f.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[u.modelLineNumber-1].getViewPositionOfModelPosition(0,f.forWrappedLinesBeforeOrAtColumn).lineNumber<u.modelLineWrappedLineIdx)return;if(!f.horizontalLine)return f;let m=-1;if(f.column!==-1){const y=this.modelLineProjections[u.modelLineNumber-1].getViewPositionOfModelPosition(0,f.column);if(y.lineNumber===u.modelLineWrappedLineIdx)m=y.column;else if(y.lineNumber<u.modelLineWrappedLineIdx)m=this.getMinColumnOfViewLine(u);else if(y.lineNumber>u.modelLineWrappedLineIdx)return}const p=this.convertModelPositionToViewPosition(u.modelLineNumber,f.horizontalLine.endColumn),g=this.modelLineProjections[u.modelLineNumber-1].getViewPositionOfModelPosition(0,f.horizontalLine.endColumn);return g.lineNumber===u.modelLineWrappedLineIdx?new jT(f.visibleColumn,m,f.className,new X9(f.horizontalLine.top,p.column),-1,-1):g.lineNumber<u.modelLineWrappedLineIdx||f.visibleColumn!==-1?void 0:new jT(f.visibleColumn,m,f.className,new X9(f.horizontalLine.top,this.getMaxColumnOfViewLine(u)),-1,-1)});s.push(h.filter(f=>!!f))}}return s}getViewLinesIndentGuides(e,n){e=this._toValidViewLineNumber(e),n=this._toValidViewLineNumber(n);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),r=this.convertViewPositionToModelPosition(n,this.getViewLineMaxColumn(n));let o=[];const s=[],a=[],l=i.lineNumber-1,c=r.lineNumber-1;let u=null;for(let m=l;m<=c;m++){const p=this.modelLineProjections[m];if(p.isVisible()){const g=p.getViewLineNumberOfModelPosition(0,m===l?i.column:1),y=p.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(m+1)),_=y-g+1;let w=0;_>1&&p.getViewLineMinColumn(this.model,m+1,y)===1&&(w=g===0?1:2),s.push(_),a.push(w),u===null&&(u=new ot(m+1,0))}else u!==null&&(o=o.concat(this.model.guides.getLinesIndentGuides(u.lineNumber,m)),u=null)}u!==null&&(o=o.concat(this.model.guides.getLinesIndentGuides(u.lineNumber,r.lineNumber)),u=null);const d=n-e+1,h=new Array(d);let f=0;for(let m=0,p=o.length;m<p;m++){let g=o[m];const y=Math.min(d-f,s[m]),_=a[m];let w;_===2?w=0:_===1?w=1:w=y;for(let C=0;C<y;C++)C===w&&(g=0),h[f++]=g}return h}getViewLineContent(e){const n=this.getViewLineInfo(e);return this.modelLineProjections[n.modelLineNumber-1].getViewLineContent(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx)}getViewLineLength(e){const n=this.getViewLineInfo(e);return this.modelLineProjections[n.modelLineNumber-1].getViewLineLength(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx)}getViewLineMinColumn(e){const n=this.getViewLineInfo(e);return this.modelLineProjections[n.modelLineNumber-1].getViewLineMinColumn(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx)}getViewLineMaxColumn(e){const n=this.getViewLineInfo(e);return this.modelLineProjections[n.modelLineNumber-1].getViewLineMaxColumn(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx)}getViewLineData(e){const n=this.getViewLineInfo(e);return this.modelLineProjections[n.modelLineNumber-1].getViewLineData(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx)}getViewLinesData(e,n,i){e=this._toValidViewLineNumber(e),n=this._toValidViewLineNumber(n);const r=this.projectedModelLineLineCounts.getIndexOf(e-1);let o=e;const s=r.index,a=r.remainder,l=[];for(let c=s,u=this.model.getLineCount();c<u;c++){const d=this.modelLineProjections[c];if(!d.isVisible())continue;const h=c===s?a:0;let f=d.getViewLineCount()-h,m=!1;if(o+f>n&&(m=!0,f=n-o+1),d.getViewLinesData(this.model,c+1,h,f,o-e,i,l),o+=f,m)break}return l}validateViewPosition(e,n,i){e=this._toValidViewLineNumber(e);const r=this.projectedModelLineLineCounts.getIndexOf(e-1),o=r.index,s=r.remainder,a=this.modelLineProjections[o],l=a.getViewLineMinColumn(this.model,o+1,s),c=a.getViewLineMaxColumn(this.model,o+1,s);n<l&&(n=l),n>c&&(n=c);const u=a.getModelColumnOfViewPosition(s,n);return this.model.validatePosition(new ot(o+1,u)).equals(i)?new ot(e,n):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,n){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,n.getStartPosition()),r=this.validateViewPosition(e.endLineNumber,e.endColumn,n.getEndPosition());return new ve(i.lineNumber,i.column,r.lineNumber,r.column)}convertViewPositionToModelPosition(e,n){const i=this.getViewLineInfo(e),r=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,n);return this.model.validatePosition(new ot(i.modelLineNumber,r))}convertViewRangeToModelRange(e){const n=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new ve(n.lineNumber,n.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,n,i=2,r=!1,o=!1){const s=this.model.validatePosition(new ot(e,n)),a=s.lineNumber,l=s.column;let c=a-1,u=!1;if(o)for(;c<this.modelLineProjections.length&&!this.modelLineProjections[c].isVisible();)c++,u=!0;else for(;c>0&&!this.modelLineProjections[c].isVisible();)c--,u=!0;if(c===0&&!this.modelLineProjections[c].isVisible())return new ot(r?0:1,1);const d=1+this.projectedModelLineLineCounts.getPrefixSum(c);let h;return u?o?h=this.modelLineProjections[c].getViewPositionOfModelPosition(d,1,i):h=this.modelLineProjections[c].getViewPositionOfModelPosition(d,this.model.getLineMaxColumn(c+1),i):h=this.modelLineProjections[a-1].getViewPositionOfModelPosition(d,l,i),h}convertModelRangeToViewRange(e,n=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,n);return ve.fromPositions(i)}else{const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),r=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new ve(i.lineNumber,i.column,r.lineNumber,r.column)}}getViewLineNumberOfModelPosition(e,n){let i=e-1;if(this.modelLineProjections[i].isVisible()){const o=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(o,n)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(i===0&&!this.modelLineProjections[i].isVisible())return 1;const r=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(r,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,n,i,r,o){const s=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),a=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(a.lineNumber-s.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new ve(s.lineNumber,1,a.lineNumber,a.column),n,i,r,o);let l=[];const c=s.lineNumber-1,u=a.lineNumber-1;let d=null;for(let p=c;p<=u;p++)if(this.modelLineProjections[p].isVisible())d===null&&(d=new ot(p+1,p===c?s.column:1));else if(d!==null){const y=this.model.getLineMaxColumn(p);l=l.concat(this.model.getDecorationsInRange(new ve(d.lineNumber,d.column,p,y),n,i,r)),d=null}d!==null&&(l=l.concat(this.model.getDecorationsInRange(new ve(d.lineNumber,d.column,a.lineNumber,a.column),n,i,r)),d=null),l.sort((p,g)=>{const y=ve.compareRangesUsingStarts(p.range,g.range);return y===0?p.id<g.id?-1:p.id>g.id?1:0:y});const h=[];let f=0,m=null;for(const p of l){const g=p.id;m!==g&&(m=g,h[f++]=p)}return h}getInjectedTextAt(e){const n=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[n.modelLineNumber-1].getInjectedTextAt(n.modelLineWrappedLineIdx,e.column)}normalizePosition(e,n){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,n)}getLineIndentColumn(e){const n=this.getViewLineInfo(e);return n.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(n.modelLineNumber):0}}function n1i(t){if(t.length===0)return[];const e=t.slice();e.sort(ve.compareRangesUsingStarts);const n=[];let i=e[0].startLineNumber,r=e[0].endLineNumber;for(let o=1,s=e.length;o<s;o++){const a=e[o];a.startLineNumber>r+1?(n.push(new ve(i,1,r,1)),i=a.startLineNumber,r=a.endLineNumber):a.endLineNumber>r&&(r=a.endLineNumber)}return n.push(new ve(i,1,r,1)),n}class llt{constructor(e,n){this.modelLineNumber=e,this.modelLineWrappedLineIdx=n}}class clt{constructor(e,n){this.modelRange=e,this.viewLines=n}}class i1i{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,n){return this._lines.validateViewPosition(e.lineNumber,e.column,n)}validateViewRange(e,n){return this._lines.validateViewRange(e,n)}convertModelPositionToViewPosition(e,n,i,r){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,n,i,r)}convertModelRangeToViewRange(e,n){return this._lines.convertModelRangeToViewRange(e,n)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,n){return this._lines.getViewLineNumberOfModelPosition(e,n)}}class r1i{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new o1i(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,n,i,r){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(n,i,r)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,n,i){return new RTe(n,i)}onModelLinesInserted(e,n,i,r){return new PTe(n,i)}onModelLineChanged(e,n,i){return[!1,new Yjt(n,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,n,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,n,i){return new Array(n-e+1).fill([])}getViewLinesIndentGuides(e,n){const i=n-e+1,r=new Array(i);for(let o=0;o<i;o++)r[o]=0;return r}getViewLineContent(e){return this.model.getLineContent(e)}getViewLineLength(e){return this.model.getLineLength(e)}getViewLineMinColumn(e){return this.model.getLineMinColumn(e)}getViewLineMaxColumn(e){return this.model.getLineMaxColumn(e)}getViewLineData(e){const n=this.model.tokenization.getLineTokens(e),i=n.getLineContent();return new Z8e(i,!1,1,i.length+1,0,n.inflate(),null)}getViewLinesData(e,n,i){const r=this.model.getLineCount();e=Math.min(Math.max(1,e),r),n=Math.min(Math.max(1,n),r);const o=[];for(let s=e;s<=n;s++){const a=s-e;o[a]=i[a]?this.getViewLineData(s):null}return o}getDecorationsInRange(e,n,i,r,o){return this.model.getDecorationsInRange(e,n,i,r,o)}normalizePosition(e,n){return this.model.normalizePosition(e,n)}getLineIndentColumn(e){return this.model.getLineIndentColumn(e)}getInjectedTextAt(e){return null}}class o1i{constructor(e){this._lines=e}_validPosition(e){return this._lines.model.validatePosition(e)}_validRange(e){return this._lines.model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,n){return this._validPosition(n)}validateViewRange(e,n){return this._validRange(n)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){const n=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>n)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,n){return e}}const fL=Iv.Right;class s1i{constructor(e){this.persist=0,this._requiredLanes=1,this.lanes=new Uint8Array(Math.ceil((e+1)*fL/8))}reset(e){const n=Math.ceil((e+1)*fL/8);this.lanes.length<n?this.lanes=new Uint8Array(n):this.lanes.fill(0),this._requiredLanes=1}get requiredLanes(){return this._requiredLanes}push(e,n,i){i&&(this.persist|=1<<e-1);for(let r=n.startLineNumber;r<=n.endLineNumber;r++){const o=fL*r+(e-1);this.lanes[o>>>3]|=1<<o%8,this._requiredLanes=Math.max(this._requiredLanes,this.countAtLine(r))}}getLanesAtLine(e){const n=[];let i=fL*e;for(let r=0;r<fL;r++)(this.persist&1<<r||this.lanes[i>>>3]&1<<i%8)&&n.push(r+1),i++;return n.length?n:[Iv.Center]}countAtLine(e){let n=fL*e,i=0;for(let r=0;r<fL;r++)(this.persist&1<<r||this.lanes[n>>>3]&1<<n%8)&&i++,n++;return i}}let a1i=class extends ct{constructor(e,n,i,r,o,s,a,l,c,u){if(super(),this.languageConfigurationService=a,this._themeService=l,this._attachedView=c,this._transactionalTarget=u,this.hiddenAreasModel=new c1i,this.previousHiddenAreas=[],this._editorId=e,this._configuration=n,this.model=i,this._eventDispatcher=new Lwi,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new QP(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new Wo(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=UVe.create(this.model),this.glyphLanes=new s1i(0),this.model.isTooLargeForTokenization())this._lines=new r1i(this.model);else{const d=this._configuration.options,h=d.get(50),f=d.get(140),m=d.get(147),p=d.get(139),g=d.get(130);this._lines=new t1i(this._editorId,this.model,r,o,h,this.model.getOptions().tabSize,f,m.wrappingColumn,p,g)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new Bwi(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new Zwi(this._configuration,this.getLineCount(),s)),this._register(this.viewLayout.onDidScroll(d=>{d.scrollTopChanged&&this._handleVisibleLinesChanged(),d.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new Nwi(d)),this._eventDispatcher.emitOutgoingEvent(new BVe(d.oldScrollWidth,d.oldScrollLeft,d.oldScrollHeight,d.oldScrollTop,d.scrollWidth,d.scrollLeft,d.scrollHeight,d.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(d=>{this._eventDispatcher.emitOutgoingEvent(d)})),this._decorations=new Qwi(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(d=>{try{const h=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(h,d)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(_re.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new kwi)})),this._register(this._themeService.onDidColorThemeChange(d=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new Ewi(d))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),n=new ve(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(n)}visibleLinesStabilized(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new Cwi(e)),this._eventDispatcher.emitOutgoingEvent(new VVe(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new ywi)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new _wi)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new ot(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),n=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new dlt(n,this._viewportStart.startLineDelta)}return new dlt(null,0)}_onConfigurationChanged(e,n){const i=this._captureStableViewport(),r=this._configuration.options,o=r.get(50),s=r.get(140),a=r.get(147),l=r.get(139),c=r.get(130);this._lines.setWrappingSettings(o,s,a.wrappingColumn,l,c)&&(e.emitViewEvent(new SQ),e.emitViewEvent(new NQ),e.emitViewEvent(new hL(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),n.hasChanged(92)&&(this._decorations.reset(),e.emitViewEvent(new hL(null))),n.hasChanged(99)&&(this._decorations.reset(),e.emitViewEvent(new hL(null))),e.emitViewEvent(new xwi(n)),this.viewLayout.onConfigurationChanged(n),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout),QP.shouldRecreate(n)&&(this.cursorConfig=new QP(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(e=>{try{const i=this._eventDispatcher.beginEmitViewEvents();let r=!1,o=!1;const s=e instanceof dI?e.rawContentChangedEvent.changes:e.changes,a=e instanceof dI?e.rawContentChangedEvent.versionId:null,l=this._lines.createLineBreaksComputer();for(const d of s)switch(d.changeType){case 4:{for(let h=0;h<d.detail.length;h++){const f=d.detail[h];let m=d.injectedTexts[h];m&&(m=m.filter(p=>!p.ownerId||p.ownerId===this._editorId)),l.addRequest(f,m,null)}break}case 2:{let h=null;d.injectedText&&(h=d.injectedText.filter(f=>!f.ownerId||f.ownerId===this._editorId)),l.addRequest(d.detail,h,null);break}}const c=l.finalize(),u=new uS(c);for(const d of s)switch(d.changeType){case 1:{this._lines.onModelFlushed(),i.emitViewEvent(new SQ),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),r=!0;break}case 3:{const h=this._lines.onModelLinesDeleted(a,d.fromLineNumber,d.toLineNumber);h!==null&&(i.emitViewEvent(h),this.viewLayout.onLinesDeleted(h.fromLineNumber,h.toLineNumber)),r=!0;break}case 4:{const h=u.takeCount(d.detail.length),f=this._lines.onModelLinesInserted(a,d.fromLineNumber,d.toLineNumber,h);f!==null&&(i.emitViewEvent(f),this.viewLayout.onLinesInserted(f.fromLineNumber,f.toLineNumber)),r=!0;break}case 2:{const h=u.dequeue(),[f,m,p,g]=this._lines.onModelLineChanged(a,d.lineNumber,h);o=f,m&&i.emitViewEvent(m),p&&(i.emitViewEvent(p),this.viewLayout.onLinesInserted(p.fromLineNumber,p.toLineNumber)),g&&(i.emitViewEvent(g),this.viewLayout.onLinesDeleted(g.fromLineNumber,g.toLineNumber));break}case 5:break}a!==null&&this._lines.acceptVersionId(a),this.viewLayout.onHeightMaybeChanged(),!r&&o&&(i.emitViewEvent(new NQ),i.emitViewEvent(new hL(null)),this._cursor.onLineMappingChanged(i),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const n=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&n){const i=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(i){const r=this.coordinatesConverter.convertModelPositionToViewPosition(i.getStartPosition()),o=this.viewLayout.getVerticalOffsetForLineNumber(r.lineNumber);this.viewLayout.setScrollPosition({scrollTop:o+this._viewportStart.startLineDelta},1)}}try{const i=this._eventDispatcher.beginEmitViewEvents();e instanceof dI&&i.emitOutgoingEvent(new Fwi(e.contentChangedEvent)),this._cursor.onModelContentChanged(i,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(e=>{const n=[];for(let i=0,r=e.ranges.length;i<r;i++){const o=e.ranges[i],s=this.coordinatesConverter.convertModelPositionToViewPosition(new ot(o.fromLineNumber,1)).lineNumber,a=this.coordinatesConverter.convertModelPositionToViewPosition(new ot(o.toLineNumber,this.model.getLineMaxColumn(o.toLineNumber))).lineNumber;n[i]={fromLineNumber:s,toLineNumber:a}}this._eventDispatcher.emitSingleViewEvent(new Dwi(n)),this._eventDispatcher.emitOutgoingEvent(new Vwi(e))})),this._register(this.model.onDidChangeLanguageConfiguration(e=>{this._eventDispatcher.emitSingleViewEvent(new Swi),this.cursorConfig=new QP(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new jwi(e))})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new QP(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new Owi(e))})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const n=this._eventDispatcher.beginEmitViewEvents();n.emitViewEvent(new SQ),n.emitViewEvent(new NQ),n.emitViewEvent(new hL(null)),this._cursor.onLineMappingChanged(n),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new QP(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new $wi(e))})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new hL(e)),this._eventDispatcher.emitOutgoingEvent(new Pwi(e))}))}setHiddenAreas(e,n){var s;this.hiddenAreasModel.setHiddenAreas(n,e);const i=this.hiddenAreasModel.getMergedRanges();if(i===this.previousHiddenAreas)return;this.previousHiddenAreas=i;const r=this._captureStableViewport();let o=!1;try{const a=this._eventDispatcher.beginEmitViewEvents();o=this._lines.setHiddenAreas(i),o&&(a.emitViewEvent(new SQ),a.emitViewEvent(new NQ),a.emitViewEvent(new hL(null)),this._cursor.onLineMappingChanged(a),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());const l=(s=r.viewportStartModelPosition)==null?void 0:s.lineNumber;l&&i.some(u=>u.startLineNumber<=l&&l<=u.endLineNumber)||r.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),o&&this._eventDispatcher.emitOutgoingEvent(new Awi)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(146),n=this._configuration.options.get(67),i=Math.max(20,Math.round(e.height/n)),r=this.viewLayout.getLinesViewportData(),o=Math.max(1,r.completelyVisibleStartLineNumber-i),s=Math.min(this.getLineCount(),r.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new ve(o,this.getLineMinColumn(o),s,this.getLineMaxColumn(s)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const n=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(i.length===0)return[n];const r=[];let o=0,s=n.startLineNumber,a=n.startColumn;const l=n.endLineNumber,c=n.endColumn;for(let u=0,d=i.length;u<d;u++){const h=i[u].startLineNumber,f=i[u].endLineNumber;f<s||h>l||(s<h&&(r[o++]=new ve(s,a,h-1,this.model.getLineMaxColumn(h-1))),s=f+1,a=1)}return(s<l||s===l&&a<c)&&(r[o++]=new ve(s,a,l,c)),r}getCompletelyVisibleViewRange(){const e=this.viewLayout.getLinesViewportData(),n=e.completelyVisibleStartLineNumber,i=e.completelyVisibleEndLineNumber;return new ve(n,this.getLineMinColumn(n),i,this.getLineMaxColumn(i))}getCompletelyVisibleViewRangeAtScrollTop(e){const n=this.viewLayout.getLinesViewportDataAtScrollTop(e),i=n.completelyVisibleStartLineNumber,r=n.completelyVisibleEndLineNumber;return new ve(i,this.getLineMinColumn(i),r,this.getLineMaxColumn(r))}saveState(){const e=this.viewLayout.saveState(),n=e.scrollTop,i=this.viewLayout.getLineNumberAtVerticalOffset(n),r=this.coordinatesConverter.convertViewPositionToModelPosition(new ot(i,this.getLineMinColumn(i))),o=this.viewLayout.getVerticalOffsetForLineNumber(i)-n;return{scrollLeft:e.scrollLeft,firstPosition:r,firstPositionDeltaTop:o}}reduceRestoreState(e){if(typeof e.firstPosition>"u")return this._reduceRestoreStateCompatibility(e);const n=this.model.validatePosition(e.firstPosition),i=this.coordinatesConverter.convertModelPositionToViewPosition(n),r=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:r}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,n,i){this._viewportStart.update(this,e)}getActiveIndentGuide(e,n,i){return this._lines.getActiveIndentGuide(e,n,i)}getLinesIndentGuides(e,n){return this._lines.getViewLinesIndentGuides(e,n)}getBracketGuidesInRangeByLine(e,n,i,r){return this._lines.getViewLinesBracketGuides(e,n,i,r)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const n=qd(this.getLineContent(e));return n===-1?0:n+1}getLineLastNonWhitespaceColumn(e){const n=w0(this.getLineContent(e));return n===-1?0:n+2}getMinimapDecorationsInRange(e){return this._decorations.getMinimapDecorationsInRange(e)}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewportViewLineRenderingData(e,n){const r=this._decorations.getDecorationsViewportData(e).inlineDecorations[n-e.startLineNumber];return this._getViewLineRenderingData(n,r)}getViewLineRenderingData(e){const n=this._decorations.getInlineDecorationsOnLine(e);return this._getViewLineRenderingData(e,n)}_getViewLineRenderingData(e,n){const i=this.model.mightContainRTL(),r=this.model.mightContainNonBasicASCII(),o=this.getTabSize(),s=this._lines.getViewLineData(e);return s.inlineDecorations&&(n=[...n,...s.inlineDecorations.map(a=>a.toInlineDecoration(e))]),new Up(s.minColumn,s.maxColumn,s.content,s.continuesWithWrappedLine,i,r,s.tokens,n,o,s.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,n,i){const r=this._lines.getViewLinesData(e,n,i);return new Ngi(this.getTabSize(),r)}getAllOverviewRulerDecorations(e){const n=this.model.getOverviewRulerDecorations(this._editorId,Tie(this._configuration.options)),i=new l1i;for(const r of n){const o=r.options,s=o.overviewRuler;if(!s)continue;const a=s.position;if(a===0)continue;const l=s.getColor(e.value),c=this.coordinatesConverter.getViewLineNumberOfModelPosition(r.range.startLineNumber,r.range.startColumn),u=this.coordinatesConverter.getViewLineNumberOfModelPosition(r.range.endLineNumber,r.range.endColumn);i.accept(l,o.zIndex,c,u,a)}return i.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const n of e){const i=n.options.overviewRuler;i==null||i.invalidateCachedColor();const r=n.options.minimap;r==null||r.invalidateCachedColor()}}getValueInRange(e,n){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,n)}getValueLengthInRange(e,n){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(i,n)}modifyPosition(e,n){const i=this.coordinatesConverter.convertViewPositionToModelPosition(e),r=this.model.modifyPosition(i,n);return this.coordinatesConverter.convertModelPositionToViewPosition(r)}deduceModelPositionRelativeToViewPosition(e,n,i){const r=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(n<0?n-=i:n+=i);const s=this.model.getOffsetAt(r)+n;return this.model.getPositionAt(s)}getPlainTextToCopy(e,n,i){const r=i?`\r
`:this.model.getEOL();e=e.slice(0),e.sort(ve.compareRangesUsingStarts);let o=!1,s=!1;for(const l of e)l.isEmpty()?o=!0:s=!0;if(!s){if(!n)return"";const l=e.map(u=>u.startLineNumber);let c="";for(let u=0;u<l.length;u++)u>0&&l[u-1]===l[u]||(c+=this.model.getLineContent(l[u])+r);return c}if(o&&n){const l=[];let c=0;for(const u of e){const d=u.startLineNumber;u.isEmpty()?d!==c&&l.push(this.model.getLineContent(d)):l.push(this.model.getValueInRange(u,i?2:0)),c=d}return l.length===1?l[0]:l}const a=[];for(const l of e)l.isEmpty()||a.push(this.model.getValueInRange(l,i?2:0));return a.length===1?a[0]:a}getRichTextToCopy(e,n){const i=this.model.getLanguageId();if(i===Ph||e.length!==1)return null;let r=e[0];if(r.isEmpty()){if(!n)return null;const u=r.startLineNumber;r=new ve(u,this.model.getLineMinColumn(u),u,this.model.getLineMaxColumn(u))}const o=this._configuration.options.get(50),s=this._getColorMap(),l=/[:;\\\/<>]/.test(o.fontFamily)||o.fontFamily===Rh.fontFamily;let c;return l?c=Rh.fontFamily:(c=o.fontFamily,c=c.replace(/"/g,"'"),/[,']/.test(c)||/[+ ]/.test(c)&&(c=`'${c}'`),c=`${c}, ${Rh.fontFamily}`),{mode:i,html:`<div style="color: ${s[1]};background-color: ${s[2]};font-family: ${c};font-weight: ${o.fontWeight};font-size: ${o.fontSize}px;line-height: ${o.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(r,s)+"</div>"}}_getHTMLToCopy(e,n){const i=e.startLineNumber,r=e.startColumn,o=e.endLineNumber,s=e.endColumn,a=this.getTabSize();let l="";for(let c=i;c<=o;c++){const u=this.model.tokenization.getLineTokens(c),d=u.getLineContent(),h=c===i?r-1:0,f=c===o?s-1:d.length;d===""?l+="<br>":l+=Uwi(d,u.inflate(),n,h,f,a,Fu)}return l}_getColorMap(){const e=Ca.getColorMap(),n=["#000000"];if(e)for(let i=1,r=e.length;i<r;i++)n[i]=Rt.Format.CSS.formatHex(e[i]);return n}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(e,n,i){return this._withViewEventsCollector(r=>this._cursor.setStates(r,e,n,i))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,n,i=0){this._withViewEventsCollector(r=>this._cursor.setSelections(r,e,n,i))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(n=>this._cursor.restoreState(n,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new Rwi);return}this._withViewEventsCollector(e)}executeEdits(e,n,i){this._executeCursorEdit(r=>this._cursor.executeEdits(r,e,n,i))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(n=>this._cursor.endComposition(n,e))}type(e,n){this._executeCursorEdit(i=>this._cursor.type(i,e,n))}compositionType(e,n,i,r,o){this._executeCursorEdit(s=>this._cursor.compositionType(s,e,n,i,r,o))}paste(e,n,i,r){this._executeCursorEdit(o=>this._cursor.paste(o,e,n,i,r))}cut(e){this._executeCursorEdit(n=>this._cursor.cut(n,e))}executeCommand(e,n){this._executeCursorEdit(i=>this._cursor.executeCommand(i,e,n))}executeCommands(e,n){this._executeCursorEdit(i=>this._cursor.executeCommands(i,e,n))}revealAllCursors(e,n,i=!1){this._withViewEventsCollector(r=>this._cursor.revealAll(r,e,i,0,n,0))}revealPrimaryCursor(e,n,i=!1){this._withViewEventsCollector(r=>this._cursor.revealPrimary(r,e,i,0,n,0))}revealTopMostCursor(e){const n=this._cursor.getTopMostViewPosition(),i=new ve(n.lineNumber,n.column,n.lineNumber,n.column);this._withViewEventsCollector(r=>r.emitViewEvent(new oB(e,!1,i,null,0,!0,0)))}revealBottomMostCursor(e){const n=this._cursor.getBottomMostViewPosition(),i=new ve(n.lineNumber,n.column,n.lineNumber,n.column);this._withViewEventsCollector(r=>r.emitViewEvent(new oB(e,!1,i,null,0,!0,0)))}revealRange(e,n,i,r,o){this._withViewEventsCollector(s=>s.emitViewEvent(new oB(e,!1,i,null,r,n,o)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new Mwi),this._eventDispatcher.emitOutgoingEvent(new Iwi))}_withViewEventsCollector(e){return this._transactionalTarget.batchChanges(()=>{try{const n=this._eventDispatcher.beginEmitViewEvents();return e(n)}finally{this._eventDispatcher.endEmitViewEvents()}})}batchEvents(e){this._withViewEventsCollector(()=>{e()})}normalizePosition(e,n){return this._lines.normalizePosition(e,n)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}};class UVe{static create(e){const n=e._setTrackedRange(null,new ve(1,1,1,1),1);return new UVe(e,1,!1,n,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,n,i,r,o){this._model=e,this._viewLineNumber=n,this._isValid=i,this._modelTrackedRange=r,this._startLineDelta=o}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,n){const i=e.coordinatesConverter.convertViewPositionToModelPosition(new ot(n,e.getLineMinColumn(n))),r=e.model._setTrackedRange(this._modelTrackedRange,new ve(i.lineNumber,i.column,i.lineNumber,i.column),1),o=e.viewLayout.getVerticalOffsetForLineNumber(n),s=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=n,this._isValid=!0,this._modelTrackedRange=r,this._startLineDelta=s-o}invalidate(){this._isValid=!1}}class l1i{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,n,i,r,o){const s=this._asMap[e];if(s){const a=s.data,l=a[a.length-3],c=a[a.length-1];if(l===o&&c+1>=i){r>c&&(a[a.length-1]=r);return}a.push(o,i,r)}else{const a=new AH(e,n,[o,i,r]);this._asMap[e]=a,this.asArray.push(a)}}}class c1i{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,n){const i=this.hiddenAreas.get(e);i&&ult(i,n)||(this.hiddenAreas.set(e,n),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce((n,i)=>u1i(n,i),[]);return ult(this.ranges,e)?this.ranges:(this.ranges=e,this.ranges)}}function u1i(t,e){const n=[];let i=0,r=0;for(;i<t.length&&r<e.length;){const o=t[i],s=e[r];if(o.endLineNumber<s.startLineNumber-1)n.push(t[i++]);else if(s.endLineNumber<o.startLineNumber-1)n.push(e[r++]);else{const a=Math.min(o.startLineNumber,s.startLineNumber),l=Math.max(o.endLineNumber,s.endLineNumber);n.push(new ve(a,1,l,1)),i++,r++}}for(;i<t.length;)n.push(t[i++]);for(;r<e.length;)n.push(e[r++]);return n}function ult(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].equalsRange(e[n]))return!1;return!0}class dlt{constructor(e,n){this.viewportStartModelPosition=e,this.startLineDelta=n}recoverViewportStart(e,n){if(!this.viewportStartModelPosition)return;const i=e.convertModelPositionToViewPosition(this.viewportStartModelPosition),r=n.getVerticalOffsetForLineNumber(i.lineNumber);n.setScrollPosition({scrollTop:r+this.startLineDelta},1)}}class Mq{constructor(...e){this._entries=new Map;for(const[n,i]of e)this.set(n,i)}set(e,n){const i=this._entries.get(e);return this._entries.set(e,n),i}get(e){return this._entries.get(e)}}var QH;(function(t){t[t.Ignore=0]="Ignore",t[t.Info=1]="Info",t[t.Warning=2]="Warning",t[t.Error=3]="Error"})(QH||(QH={}));(function(t){const e="error",n="warning",i="warn",r="info",o="ignore";function s(l){return l?l4(e,l)?t.Error:l4(n,l)||l4(i,l)?t.Warning:l4(r,l)?t.Info:t.Ignore:t.Ignore}t.fromValue=s;function a(l){switch(l){case t.Error:return e;case t.Warning:return n;case t.Info:return r;default:return o}}t.toString=a})(QH||(QH={}));const qa=QH;var fme=qa;const tl=Sr("notificationService");class d1i{}var h1i=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},b1=function(t,e){return function(n,i){e(n,i,t)}},OL,EI;let JH=(EI=class extends ct{get isSimpleWidget(){return this._configuration.isSimpleWidget}get contextMenuId(){return this._configuration.contextMenuId}constructor(e,n,i,r,o,s,a,l,c,u,d,h){super(),this.languageConfigurationService=d,this._deliveryQueue=ldi(),this._contributions=this._register(new H_i),this._onDidDispose=this._register(new st),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new st({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new st({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new st({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new st({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new st({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new st({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new st({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onWillChangeModel=this._register(new st({deliveryQueue:this._deliveryQueue})),this.onWillChangeModel=this._onWillChangeModel.event,this._onDidChangeModel=this._register(new st({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new st({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new st({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new st({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new hlt({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new hlt({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new Ad(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new st({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new st({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new st({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new st({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._updateCounter=0,this._onBeginUpdate=this._register(new st),this.onBeginUpdate=this._onBeginUpdate.event,this._onEndUpdate=this._register(new st),this.onEndUpdate=this._onEndUpdate.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),o.willCreateCodeEditor();const f={...n};this._domElement=e,this._overflowWidgetsDomNode=f.overflowWidgetsDomNode,delete f.overflowWidgetsDomNode,this._id=++f1i,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,i.contextMenuId??(i.isSimpleWidget?Rn.SimpleEditorContext:Rn.EditorContext),f,u)),this._register(this._configuration.onDidChange(g=>{this._onDidChangeConfiguration.fire(g);const y=this._configuration.options;if(g.hasChanged(146)){const _=y.get(146);this._onDidLayoutChange.fire(_)}})),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=c,this._codeEditorService=o,this._commandService=s,this._themeService=l,this._register(new p1i(this,this._contextKeyService)),this._register(new g1i(this,this._contextKeyService,h)),this._instantiationService=this._register(r.createChild(new Mq([vi,this._contextKeyService]))),this._modelData=null,this._focusTracker=new b1i(e,this._overflowWidgetsDomNode),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let m;Array.isArray(i.contributions)?m=i.contributions:m=lI.getEditorContributions(),this._contributions.initialize(this,m,this._instantiationService);for(const g of lI.getEditorActions()){if(this._actions.has(g.id)){ji(new Error(`Cannot have two actions with the same id ${g.id}`));continue}const y=new Ejt(g.id,g.label,g.alias,g.metadata,g.precondition??void 0,_=>this._instantiationService.invokeFunction(w=>Promise.resolve(g.runEditorCommand(w,this,_))),this._contextKeyService);this._actions.set(y.id,y)}const p=()=>!this._configuration.options.get(92)&&this._configuration.options.get(36).enabled;this._register(new xfi(this._domElement,{onDragOver:g=>{if(!p())return;const y=this.getTargetAtClientPoint(g.clientX,g.clientY);y!=null&&y.position&&this.showDropIndicatorAt(y.position)},onDrop:async g=>{if(!p()||(this.removeDropIndicator(),!g.dataTransfer))return;const y=this.getTargetAtClientPoint(g.clientX,g.clientY);y!=null&&y.position&&this._onDropIntoEditor.fire({position:y.position,event:g})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){var n;(n=this._modelData)==null||n.view.writeScreenReaderContent(e)}_createConfiguration(e,n,i,r){return new XLe(e,n,i,this._domElement,r)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return xq.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?yo.getWordAtPosition(this._modelData.model,this._configuration.options.get(132),this._configuration.options.get(131),e):null}getValue(e=null){if(!this._modelData)return"";const n=!!(e&&e.preserveBOM);let i=0;return e&&e.lineEnding&&e.lineEnding===`
`?i=1:e&&e.lineEnding&&e.lineEnding===`\r
`&&(i=2),this._modelData.model.getValue(i,n)}setValue(e){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(e)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){var n;try{this._beginUpdate();const i=e;if(this._modelData===null&&i===null||this._modelData&&this._modelData.model===i)return;const r={oldModelUrl:((n=this._modelData)==null?void 0:n.model.uri)||null,newModelUrl:(i==null?void 0:i.uri)||null};this._onWillChangeModel.fire(r);const o=this.hasTextFocus(),s=this._detachModel();this._attachModel(i),o&&this.hasModel()&&this.focus(),this._removeDecorationTypes(),this._onDidChangeModel.fire(r),this._postDetachModelCleanup(s),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const n=this._decorationTypeSubtypes[e];for(const i in n)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,n,i,r){const o=e.model.validatePosition({lineNumber:n,column:i}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(s.lineNumber,r)}getTopForLineNumber(e,n=!1){return this._modelData?OL._getVerticalOffsetForPosition(this._modelData,e,1,n):-1}getTopForPosition(e,n){return this._modelData?OL._getVerticalOffsetForPosition(this._modelData,e,n,!1):-1}static _getVerticalOffsetForPosition(e,n,i,r=!1){const o=e.model.validatePosition({lineNumber:n,column:i}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber,r)}getBottomForLineNumber(e,n=!1){return this._modelData?OL._getVerticalOffsetAfterPosition(this._modelData,e,1,n):-1}setHiddenAreas(e,n){var i;(i=this._modelData)==null||i.viewModel.setHiddenAreas(e.map(r=>ve.lift(r)),n)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const n=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return Kl.visibleColumnFromColumn(this._modelData.model.getLineContent(n.lineNumber),n.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,n="api"){if(this._modelData){if(!ot.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(n,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,n,i,r){if(!this._modelData)return;if(!ve.isIRange(e))throw new Error("Invalid arguments");const o=this._modelData.model.validateRange(e),s=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",i,s,n,r)}revealLine(e,n=0){this._revealLine(e,0,n)}revealLineInCenter(e,n=0){this._revealLine(e,1,n)}revealLineInCenterIfOutsideViewport(e,n=0){this._revealLine(e,2,n)}revealLineNearTop(e,n=0){this._revealLine(e,5,n)}_revealLine(e,n,i){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new ve(e,1,e,1),n,!1,i)}revealPosition(e,n=0){this._revealPosition(e,0,!0,n)}revealPositionInCenter(e,n=0){this._revealPosition(e,1,!0,n)}revealPositionInCenterIfOutsideViewport(e,n=0){this._revealPosition(e,2,!0,n)}revealPositionNearTop(e,n=0){this._revealPosition(e,5,!0,n)}_revealPosition(e,n,i,r){if(!ot.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new ve(e.lineNumber,e.column,e.lineNumber,e.column),n,i,r)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,n="api"){const i=Pn.isISelection(e),r=ve.isIRange(e);if(!i&&!r)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,n);else if(r){const o={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(o,n)}}_setSelectionImpl(e,n){if(!this._modelData)return;const i=new Pn(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(n,[i])}revealLines(e,n,i=0){this._revealLines(e,n,0,i)}revealLinesInCenter(e,n,i=0){this._revealLines(e,n,1,i)}revealLinesInCenterIfOutsideViewport(e,n,i=0){this._revealLines(e,n,2,i)}revealLinesNearTop(e,n,i=0){this._revealLines(e,n,5,i)}_revealLines(e,n,i,r){if(typeof e!="number"||typeof n!="number")throw new Error("Invalid arguments");this._sendRevealRange(new ve(e,1,n,1),i,!1,r)}revealRange(e,n=0,i=!1,r=!0){this._revealRange(e,i?1:0,r,n)}revealRangeInCenter(e,n=0){this._revealRange(e,1,!0,n)}revealRangeInCenterIfOutsideViewport(e,n=0){this._revealRange(e,2,!0,n)}revealRangeNearTop(e,n=0){this._revealRange(e,5,!0,n)}revealRangeNearTopIfOutsideViewport(e,n=0){this._revealRange(e,6,!0,n)}revealRangeAtTop(e,n=0){this._revealRange(e,3,!0,n)}_revealRange(e,n,i,r){if(!ve.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(ve.lift(e),n,i,r)}setSelections(e,n="api",i=0){if(this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let r=0,o=e.length;r<o;r++)if(!Pn.isISelection(e[r]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(n,e,i)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(e,n=1){if(this._modelData){if(typeof e!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollLeft:e},n)}}setScrollTop(e,n=1){if(this._modelData){if(typeof e!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollTop:e},n)}}setScrollPosition(e,n=1){this._modelData&&this._modelData.viewModel.viewLayout.setScrollPosition(e,n)}hasPendingScrollAnimation(){return this._modelData?this._modelData.viewModel.viewLayout.hasPendingScrollAnimation():!1}saveViewState(){if(!this._modelData)return null;const e=this._contributions.saveViewState(),n=this._modelData.viewModel.saveCursorState(),i=this._modelData.viewModel.saveState();return{cursorState:n,viewState:i,contributionsState:e}}restoreViewState(e){if(!this._modelData||!this._modelData.hasRealView)return;const n=e;if(n&&n.cursorState&&n.viewState){const i=n.cursorState;Array.isArray(i)?i.length>0&&this._modelData.viewModel.restoreCursorState(i):this._modelData.viewModel.restoreCursorState([i]),this._contributions.restoreViewState(n.contributionsState||{});const r=this._modelData.viewModel.reduceRestoreState(n.viewState);this._modelData.view.restoreState(r)}}handleInitialized(){var e;(e=this._getViewModel())==null||e.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter(n=>n.isSupported()),e}getAction(e){return this._actions.get(e)||null}trigger(e,n,i){i=i||{};try{switch(this._beginUpdate(),n){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{const o=i;this._type(e,o.text||"");return}case"replacePreviousChar":{const o=i;this._compositionType(e,o.text||"",o.replaceCharCnt||0,0,0);return}case"compositionType":{const o=i;this._compositionType(e,o.text||"",o.replacePrevCharCnt||0,o.replaceNextCharCnt||0,o.positionDelta||0);return}case"paste":{const o=i;this._paste(e,o.text||"",o.pasteOnNewLine||!1,o.multicursorText||null,o.mode||null,o.clipboardEvent);return}case"cut":this._cut(e);return}const r=this.getAction(n);if(r){Promise.resolve(r.run(i)).then(void 0,ji);return}if(!this._modelData||this._triggerEditorCommand(e,n,i))return;this._triggerCommand(n,i)}finally{this._endUpdate()}}_triggerCommand(e,n){this._commandService.executeCommand(e,n)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,n){!this._modelData||n.length===0||(e==="keyboard"&&this._onWillType.fire(n),this._modelData.viewModel.type(n,e),e==="keyboard"&&this._onDidType.fire(n))}_compositionType(e,n,i,r,o){this._modelData&&this._modelData.viewModel.compositionType(n,i,r,o,e)}_paste(e,n,i,r,o,s){if(!this._modelData)return;const a=this._modelData.viewModel,l=a.getSelection().getStartPosition();a.paste(n,i,r,e);const c=a.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({clipboardEvent:s,range:new ve(l.lineNumber,l.column,c.lineNumber,c.column),languageId:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,n,i){const r=lI.getEditorCommand(n);return r?(i=i||{},i.source=e,this._instantiationService.invokeFunction(o=>{Promise.resolve(r.runEditorCommand(o,this,i)).then(void 0,ji)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(92)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(92)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(e,n,i){if(!this._modelData||this._configuration.options.get(92))return!1;let r;return i?Array.isArray(i)?r=()=>i:r=i:r=()=>null,this._modelData.viewModel.executeEdits(e,n,r),!0}executeCommand(e,n){this._modelData&&this._modelData.viewModel.executeCommand(n,e)}executeCommands(e,n){this._modelData&&this._modelData.viewModel.executeCommands(n,e)}createDecorationsCollection(e){return new v1i(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,Tie(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,Tie(this._configuration.options)):null}deltaDecorations(e,n){return this._modelData?e.length===0&&n.length===0?e:this._modelData.model.deltaDecorations(e,n,this._id):[]}removeDecorations(e){!this._modelData||e.length===0||this._modelData.model.changeDecorations(n=>{n.deltaDecorations(e,[])})}removeDecorationsByType(e){const n=this._decorationTypeKeysToIds[e];n&&this.changeDecorations(i=>i.deltaDecorations(n,[])),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(146)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,n=!1){this._configuration.observeContainer(e),n||this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const n={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=n,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(n)}layoutContentWidget(e){const n=e.getId();if(this._contentWidgets.hasOwnProperty(n)){const i=this._contentWidgets[n];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const n=e.getId();if(this._contentWidgets.hasOwnProperty(n)){const i=this._contentWidgets[n];delete this._contentWidgets[n],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(i)}}addOverlayWidget(e){const n={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=n,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(n)}layoutOverlayWidget(e){const n=e.getId();if(this._overlayWidgets.hasOwnProperty(n)){const i=this._overlayWidgets[n];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const n=e.getId();if(this._overlayWidgets.hasOwnProperty(n)){const i=this._overlayWidgets[n];delete this._overlayWidgets[n],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(i)}}addGlyphMarginWidget(e){const n={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=n,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(n)}layoutGlyphMarginWidget(e){const n=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(n)){const i=this._glyphMarginWidgets[n];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(i)}}removeGlyphMarginWidget(e){const n=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(n)){const i=this._glyphMarginWidgets[n];delete this._glyphMarginWidgets[n],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(i)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,n){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,n)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const n=this._modelData.model.validatePosition(e),i=this._configuration.options,r=i.get(146),o=OL._getVerticalOffsetForPosition(this._modelData,n.lineNumber,n.column)-this.getScrollTop(),s=this._modelData.view.getOffsetForColumn(n.lineNumber,n.column)+r.glyphMarginWidth+r.lineNumbersWidth+r.decorationsWidth-this.getScrollLeft();return{top:o,left:s,height:i.get(67)}}getOffsetForColumn(e,n){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,n)}render(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.viewModel.batchEvents(()=>{this._modelData.view.render(!0,e)})}setAriaOptions(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(e)}applyFontInfo(e){su(e,this._configuration.options.get(50))}setBanner(e,n){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),this._bannerDomNode=e,this._configuration.setReservedHeight(e?n:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}const n=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());const i=e.onBeforeAttached(),r=new a1i(this._id,this._configuration,e,DVe.create(ei(this._domElement)),FVe.create(this._configuration.options),a=>Im(ei(this._domElement),a),this.languageConfigurationService,this._themeService,i,{batchChanges:a=>{try{return this._beginUpdate(),a()}finally{this._endUpdate()}}});n.push(e.onWillDispose(()=>this.setModel(null))),n.push(r.onEvent(a=>{switch(a.kind){case 0:this._onDidContentSizeChange.fire(a);break;case 1:this._editorTextFocus.setValue(a.hasFocus);break;case 2:this._onDidScrollChange.fire(a);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(a.reachedMaxCursorCount){const d=this.getOption(80),h=I("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",d);this._notificationService.prompt(fme.Warning,h,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:I("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const l=[];for(let d=0,h=a.selections.length;d<h;d++)l[d]=a.selections[d].getPosition();const c={position:l[0],secondaryPositions:l.slice(1),reason:a.reason,source:a.source};this._onDidChangeCursorPosition.fire(c);const u={selection:a.selections[0],secondarySelections:a.selections.slice(1),modelVersionId:a.modelVersionId,oldSelections:a.oldSelections,oldModelVersionId:a.oldModelVersionId,source:a.source,reason:a.reason};this._onDidChangeCursorSelection.fire(u);break}case 7:this._onDidChangeModelDecorations.fire(a.event);break;case 8:this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._onDidChangeModelLanguage.fire(a.event);break;case 9:this._onDidChangeModelLanguageConfiguration.fire(a.event);break;case 10:this._onDidChangeModelContent.fire(a.event);break;case 11:this._onDidChangeModelOptions.fire(a.event);break;case 12:this._onDidChangeModelTokens.fire(a.event);break}}));const[o,s]=this._createView(r);if(s){this._domElement.appendChild(o.domNode.domNode);let a=Object.keys(this._contentWidgets);for(let l=0,c=a.length;l<c;l++){const u=a[l];o.addContentWidget(this._contentWidgets[u])}a=Object.keys(this._overlayWidgets);for(let l=0,c=a.length;l<c;l++){const u=a[l];o.addOverlayWidget(this._overlayWidgets[u])}a=Object.keys(this._glyphMarginWidgets);for(let l=0,c=a.length;l<c;l++){const u=a[l];o.addGlyphMarginWidget(this._glyphMarginWidgets[u])}o.render(!1,!0),o.domNode.domNode.setAttribute("data-uri",e.uri.toString())}this._modelData=new m1i(e,r,o,s,n,i)}_createView(e){let n;this.isSimpleWidget?n={paste:(o,s,a,l)=>{this._paste("keyboard",o,s,a,l)},type:o=>{this._type("keyboard",o)},compositionType:(o,s,a,l)=>{this._compositionType("keyboard",o,s,a,l)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:n={paste:(o,s,a,l)=>{const c={text:o,pasteOnNewLine:s,multicursorText:a,mode:l};this._commandService.executeCommand("paste",c)},type:o=>{const s={text:o};this._commandService.executeCommand("type",s)},compositionType:(o,s,a,l)=>{if(a||l){const c={text:o,replacePrevCharCnt:s,replaceNextCharCnt:a,positionDelta:l};this._commandService.executeCommand("compositionType",c)}else{const c={text:o,replaceCharCnt:s};this._commandService.executeCommand("replacePreviousChar",c)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new cme(e.coordinatesConverter);return i.onKeyDown=o=>this._onKeyDown.fire(o),i.onKeyUp=o=>this._onKeyUp.fire(o),i.onContextMenu=o=>this._onContextMenu.fire(o),i.onMouseMove=o=>this._onMouseMove.fire(o),i.onMouseLeave=o=>this._onMouseLeave.fire(o),i.onMouseDown=o=>this._onMouseDown.fire(o),i.onMouseUp=o=>this._onMouseUp.fire(o),i.onMouseDrag=o=>this._onMouseDrag.fire(o),i.onMouseDrop=o=>this._onMouseDrop.fire(o),i.onMouseDropCanceled=o=>this._onMouseDropCanceled.fire(o),i.onMouseWheel=o=>this._onMouseWheel.fire(o),[new yTe(n,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){e==null||e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){var i;if((i=this._contributionsDisposable)==null||i.dispose(),this._contributionsDisposable=void 0,!this._modelData)return null;const e=this._modelData.model,n=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),n&&this._domElement.contains(n)&&n.remove(),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}showDropIndicatorAt(e){const n=[{range:new ve(e.lineNumber,e.column,e.lineNumber,e.column),options:OL.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(n),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,n){this._contextKeyService.createKey(e,n)}_beginUpdate(){this._updateCounter++,this._updateCounter===1&&this._onBeginUpdate.fire()}_endUpdate(){this._updateCounter--,this._updateCounter===0&&this._onEndUpdate.fire()}},OL=EI,EI.dropIntoEditorDecorationOptions=Hi.register({description:"workbench-dnd-target",className:"dnd-target"}),EI);JH=OL=h1i([b1(3,qn),b1(4,Yr),b1(5,gs),b1(6,vi),b1(7,Ql),b1(8,tl),b1(9,Bm),b1(10,bs),b1(11,Ln)],JH);let f1i=0,m1i=class{constructor(e,n,i,r,o,s){this.model=e,this.viewModel=n,this.view=i,this.hasRealView=r,this.listenersToRemove=o,this.attachedView=s}dispose(){Jo(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}};class hlt extends ct{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new st(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new st(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const n=e?2:1;this._value!==n&&(this._value=n,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}class Ad extends st{constructor(e,n){super({deliveryQueue:n}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class p1i extends ct{constructor(e,n){super(),this._editor=e,n.createKey("editorId",e.getId()),this._editorSimpleInput=Re.editorSimpleInput.bindTo(n),this._editorFocus=Re.focus.bindTo(n),this._textInputFocus=Re.textInputFocus.bindTo(n),this._editorTextFocus=Re.editorTextFocus.bindTo(n),this._tabMovesFocus=Re.tabMovesFocus.bindTo(n),this._editorReadonly=Re.readOnly.bindTo(n),this._inDiffEditor=Re.inDiffEditor.bindTo(n),this._editorColumnSelection=Re.columnSelection.bindTo(n),this._hasMultipleSelections=Re.hasMultipleSelections.bindTo(n),this._hasNonEmptySelection=Re.hasNonEmptySelection.bindTo(n),this._canUndo=Re.canUndo.bindTo(n),this._canRedo=Re.canRedo.bindTo(n),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(a5.onDidChangeTabFocus(i=>this._tabMovesFocus.set(i))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._tabMovesFocus.set(a5.getTabFocusMode()),this._editorReadonly.set(e.get(92)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(n=>!n.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(!!(e&&e.canUndo())),this._canRedo.set(!!(e&&e.canRedo()))}}class g1i extends ct{constructor(e,n,i){super(),this._editor=e,this._contextKeyService=n,this._languageFeaturesService=i,this._langId=Re.languageId.bindTo(n),this._hasCompletionItemProvider=Re.hasCompletionItemProvider.bindTo(n),this._hasCodeActionsProvider=Re.hasCodeActionsProvider.bindTo(n),this._hasCodeLensProvider=Re.hasCodeLensProvider.bindTo(n),this._hasDefinitionProvider=Re.hasDefinitionProvider.bindTo(n),this._hasDeclarationProvider=Re.hasDeclarationProvider.bindTo(n),this._hasImplementationProvider=Re.hasImplementationProvider.bindTo(n),this._hasTypeDefinitionProvider=Re.hasTypeDefinitionProvider.bindTo(n),this._hasHoverProvider=Re.hasHoverProvider.bindTo(n),this._hasDocumentHighlightProvider=Re.hasDocumentHighlightProvider.bindTo(n),this._hasDocumentSymbolProvider=Re.hasDocumentSymbolProvider.bindTo(n),this._hasReferenceProvider=Re.hasReferenceProvider.bindTo(n),this._hasRenameProvider=Re.hasRenameProvider.bindTo(n),this._hasSignatureHelpProvider=Re.hasSignatureHelpProvider.bindTo(n),this._hasInlayHintsProvider=Re.hasInlayHintsProvider.bindTo(n),this._hasDocumentFormattingProvider=Re.hasDocumentFormattingProvider.bindTo(n),this._hasDocumentSelectionFormattingProvider=Re.hasDocumentSelectionFormattingProvider.bindTo(n),this._hasMultipleDocumentFormattingProvider=Re.hasMultipleDocumentFormattingProvider.bindTo(n),this._hasMultipleDocumentSelectionFormattingProvider=Re.hasMultipleDocumentSelectionFormattingProvider.bindTo(n),this._isInEmbeddedEditor=Re.isInEmbeddedEditor.bindTo(n);const r=()=>this._update();this._register(e.onDidChangeModel(r)),this._register(e.onDidChangeModelLanguage(r)),this._register(i.completionProvider.onDidChange(r)),this._register(i.codeActionProvider.onDidChange(r)),this._register(i.codeLensProvider.onDidChange(r)),this._register(i.definitionProvider.onDidChange(r)),this._register(i.declarationProvider.onDidChange(r)),this._register(i.implementationProvider.onDidChange(r)),this._register(i.typeDefinitionProvider.onDidChange(r)),this._register(i.hoverProvider.onDidChange(r)),this._register(i.documentHighlightProvider.onDidChange(r)),this._register(i.documentSymbolProvider.onDidChange(r)),this._register(i.referenceProvider.onDidChange(r)),this._register(i.renameProvider.onDidChange(r)),this._register(i.documentFormattingEditProvider.onDidChange(r)),this._register(i.documentRangeFormattingEditProvider.onDidChange(r)),this._register(i.signatureHelpProvider.onDidChange(r)),this._register(i.inlayHintsProvider.onDidChange(r)),r()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInEmbeddedEditor.reset()})}_update(){const e=this._editor.getModel();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInEmbeddedEditor.set(e.uri.scheme===Ti.walkThroughSnippet||e.uri.scheme===Ti.vscodeChatCodeBlock)})}}class b1i extends ct{constructor(e,n){super(),this._onChange=this._register(new st),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(q0(e)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus(()=>{this._hasDomElementFocus=!0,this._update()})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasDomElementFocus=!1,this._update()})),n&&(this._overflowWidgetsDomNode=this._register(q0(n)),this._register(this._overflowWidgetsDomNode.onDidFocus(()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()})),this._register(this._overflowWidgetsDomNode.onDidBlur(()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()})))}_update(){const e=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==e&&(this._hadFocus=e,this._onChange.fire(void 0))}hasFocus(){return this._hadFocus??!1}}class v1i{get length(){return this._decorationIds.length}constructor(e,n){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(n)&&n.length>0&&this.set(n)}onDidChange(e,n,i){return this._editor.onDidChangeModelDecorations(r=>{this._isChangingDecorations||e.call(n,r)},i)}getRange(e){return!this._editor.hasModel()||e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e])}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),n=[];for(const i of this._decorationIds){const r=e.getDecorationRange(i);r&&n.push(r)}return n}has(e){return this._decorationIds.includes(e.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations(n=>{this._decorationIds=n.deltaDecorations(this._decorationIds,e)})}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let n=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations(i=>{n=i.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(n)})}finally{this._isChangingDecorations=!1}return n}}const y1i=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),_1i=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function g1e(t){return y1i+encodeURIComponent(t.toString())+_1i}const x1i=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),w1i=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function C1i(t){return x1i+encodeURIComponent(t.toString())+w1i}_b((t,e)=>{const n=t.getColor(Zfe);n&&e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${g1e(n)}") repeat-x bottom left; }`);const i=t.getColor(mS);i&&e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${g1e(i)}") repeat-x bottom left; }`);const r=t.getColor(mw);r&&e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${g1e(r)}") repeat-x bottom left; }`);const o=t.getColor(abi);o&&e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${C1i(o)}") no-repeat bottom left; }`);const s=t.getColor(Wyi);s&&e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${s.rgba.a}; }`)});var S1i=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},N1i=function(t,e){return function(n,i){e(n,i,t)}};let OTe=class extends ct{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new st),this._onCodeEditorAdd=this._register(new st),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new st),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new st),this._onDiffEditorAdd=this._register(new st),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new st),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new Ch,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null;const n=this.listCodeEditors();for(const i of n){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){const n=this._decorationOptionProviders.get(e);n&&(n.refCount--,n.refCount<=0&&(this._decorationOptionProviders.delete(e),n.dispose(),this.listCodeEditors().forEach(i=>i.removeDecorationsByType(e))))}setModelProperty(e,n,i){const r=e.toString();let o;this._modelProperties.has(r)?o=this._modelProperties.get(r):(o=new Map,this._modelProperties.set(r,o)),o.set(n,i)}getModelProperty(e,n){const i=e.toString();if(this._modelProperties.has(i))return this._modelProperties.get(i).get(n)}async openCodeEditor(e,n,i){for(const r of this._codeEditorOpenHandlers){const o=await r(e,n,i);if(o!==null)return o}return null}registerCodeEditorOpenHandler(e){const n=this._codeEditorOpenHandlers.unshift(e);return Kn(n)}};OTe=S1i([N1i(0,Ql)],OTe);var E1i=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},flt=function(t,e){return function(n,i){e(n,i,t)}};let Lre=class extends OTe{constructor(e,n){super(n),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler(async(i,r,o)=>r?this.doOpenEditor(r,i):null))}_checkContextKey(){let e=!1;for(const n of this.listCodeEditors())if(!n.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,n){if(!this.findModel(e,n.resource)){if(n.resource){const o=n.resource.scheme;if(o===Ti.http||o===Ti.https)return V4t(n.resource.toString()),e}return null}const r=n.options?n.options.selection:null;if(r)if(typeof r.endLineNumber=="number"&&typeof r.endColumn=="number")e.setSelection(r),e.revealRangeInCenter(r,1);else{const o={lineNumber:r.startLineNumber,column:r.startColumn};e.setPosition(o),e.revealPositionInCenter(o,1)}return e}findModel(e,n){const i=e.getModel();return i&&i.uri.toString()!==n.toString()?null:i}};Lre=E1i([flt(0,vi),flt(1,Ql)],Lre);Rr(Yr,Lre,0);const iM=Sr("layoutService");var Zjt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Qjt=function(t,e){return function(n,i){e(n,i,t)}};let Tre=class{get mainContainer(){var e;return((e=s8e(this._codeEditorService.listCodeEditors()))==null?void 0:e.getContainerDomNode())??Go.document.body}get activeContainer(){const e=this._codeEditorService.getFocusedCodeEditor()??this._codeEditorService.getActiveCodeEditor();return(e==null?void 0:e.getContainerDomNode())??this.mainContainer}get mainContainerDimension(){return hk(this.mainContainer)}get activeContainerDimension(){return hk(this.activeContainer)}get containers(){return H0(this._codeEditorService.listCodeEditors().map(e=>e.getContainerDomNode()))}getContainer(){return this.activeContainer}whenContainerStylesLoaded(){}focus(){var e;(e=this._codeEditorService.getFocusedCodeEditor())==null||e.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=rn.None,this.onDidLayoutActiveContainer=rn.None,this.onDidLayoutContainer=rn.None,this.onDidChangeActiveContainer=rn.None,this.onDidAddContainer=rn.None,this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};Tre=Zjt([Qjt(0,Yr)],Tre);let jTe=class extends Tre{get mainContainer(){return this._container}constructor(e,n){super(n),this._container=e}};jTe=Zjt([Qjt(1,Yr)],jTe);Rr(iM,Tre,1);const Lq=Sr("dialogService");var D1i=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},mlt=function(t,e){return function(n,i){e(n,i,t)}};function EQ(t){return t.scheme===Ti.file?t.fsPath:t.path}let Jjt=0;class DQ{constructor(e,n,i,r,o,s,a){this.id=++Jjt,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=n,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=r,this.groupOrder=o,this.sourceId=s,this.sourceOrder=a,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?"  VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class plt{constructor(e,n){this.resourceLabel=e,this.reason=n}}class glt{constructor(){this.elements=new Map}createMessage(){const e=[],n=[];for(const[,r]of this.elements)(r.reason===0?e:n).push(r.resourceLabel);const i=[];return e.length>0&&i.push(I({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),n.length>0&&i.push(I({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",n.join(", "))),i.join(`
`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,n){this.elements.set(e,n)}delete(e){return this.elements.delete(e)}}class k1i{constructor(e,n,i,r,o,s,a){this.id=++Jjt,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=n,this.strResources=i,this.groupId=r,this.groupOrder=o,this.sourceId=s,this.sourceOrder=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,n,i){this.removedResources||(this.removedResources=new glt),this.removedResources.has(n)||this.removedResources.set(n,new plt(e,i))}setValid(e,n,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(n),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new glt),this.invalidatedResources.has(n)||this.invalidatedResources.set(n,new plt(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":"  VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class e5t{constructor(e,n){this.resourceLabel=e,this.strResource=n,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let n=0;n<this._past.length;n++)e.push(`   * [UNDO] ${this._past[n]}`);for(let n=this._future.length-1;n>=0;n--)e.push(`   * [REDO] ${this._future[n]}`);return e.join(`
`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,n){e.type===1?e.setValid(this.resourceLabel,this.strResource,n):e.setValid(n)}setElementsValidFlag(e,n){for(const i of this._past)n(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)n(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const n of this._future)n.type===1&&n.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const n=[];for(let i=0,r=this._past.length;i<r;i++)n.push(this._past[i].id);for(let i=this._future.length-1;i>=0;i--)n.push(this._future[i].id);return new Ujt(e,n)}restoreSnapshot(e){const n=e.elements.length;let i=!0,r=0,o=-1;for(let a=0,l=this._past.length;a<l;a++,r++){const c=this._past[a];i&&(r>=n||c.id!==e.elements[r])&&(i=!1,o=0),!i&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}let s=-1;for(let a=this._future.length-1;a>=0;a--,r++){const l=this._future[a];i&&(r>=n||l.id!==e.elements[r])&&(i=!1,s=a),!i&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}o!==-1&&(this._past=this._past.slice(0,o)),s!==-1&&(this._future=this._future.slice(s+1)),this.versionId++}getElements(){const e=[],n=[];for(const i of this._past)e.push(i.actual);for(const i of this._future)n.push(i.actual);return{past:e,future:n}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,n){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){n.has(this.strResource)?this._past[i]=n.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,n){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){n.has(this.strResource)?this._future[i]=n.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class b1e{constructor(e){this.editStacks=e,this._versionIds=[];for(let n=0,i=this.editStacks.length;n<i;n++)this._versionIds[n]=this.editStacks[n].versionId}isValid(){for(let e=0,n=this.editStacks.length;e<n;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}}const t5t=new e5t("","");t5t.locked=!0;let FTe=class{constructor(e,n){this._dialogService=e,this._notificationService=n,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(e){for(const n of this._uriComparisonKeyComputers)if(n[0]===e.scheme)return n[1].getComparisonKey(e);return e.toString()}_print(e){console.log("------------------------------------"),console.log(`AFTER ${e}: `);const n=[];for(const i of this._editStacks)n.push(i[1].toString());console.log(n.join(`
`))}pushElement(e,n=LTe.None,i=dT.None){if(e.type===0){const r=EQ(e.resource),o=this.getUriComparisonKey(e.resource);this._pushElement(new DQ(e,r,o,n.id,n.nextOrder(),i.id,i.nextOrder()))}else{const r=new Set,o=[],s=[];for(const a of e.resources){const l=EQ(a),c=this.getUriComparisonKey(a);r.has(c)||(r.add(c),o.push(l),s.push(c))}o.length===1?this._pushElement(new DQ(e,o[0],s[0],n.id,n.nextOrder(),i.id,i.nextOrder())):this._pushElement(new k1i(e,o,s,n.id,n.nextOrder(),i.id,i.nextOrder()))}}_pushElement(e){for(let n=0,i=e.strResources.length;n<i;n++){const r=e.resourceLabels[n],o=e.strResources[n];let s;this._editStacks.has(o)?s=this._editStacks.get(o):(s=new e5t(r,o),this._editStacks.set(o,s)),s.pushElement(e)}}getLastElement(e){const n=this.getUriComparisonKey(e);if(this._editStacks.has(n)){const i=this._editStacks.get(n);if(i.hasFutureElements())return null;const r=i.getClosestPastElement();return r?r.actual:null}return null}_splitPastWorkspaceElement(e,n){const i=e.actual.split(),r=new Map;for(const o of i){const s=EQ(o.resource),a=this.getUriComparisonKey(o.resource),l=new DQ(o,s,a,0,0,0,0);r.set(l.strResource,l)}for(const o of e.strResources){if(n&&n.has(o))continue;this._editStacks.get(o).splitPastWorkspaceElement(e,r)}}_splitFutureWorkspaceElement(e,n){const i=e.actual.split(),r=new Map;for(const o of i){const s=EQ(o.resource),a=this.getUriComparisonKey(o.resource),l=new DQ(o,s,a,0,0,0,0);r.set(l.strResource,l)}for(const o of e.strResources){if(n&&n.has(o))continue;this._editStacks.get(o).splitFutureWorkspaceElement(e,r)}}removeElements(e){const n=typeof e=="string"?e:this.getUriComparisonKey(e);this._editStacks.has(n)&&(this._editStacks.get(n).dispose(),this._editStacks.delete(n))}setElementsValidFlag(e,n,i){const r=this.getUriComparisonKey(e);this._editStacks.has(r)&&this._editStacks.get(r).setElementsValidFlag(n,i)}createSnapshot(e){const n=this.getUriComparisonKey(e);return this._editStacks.has(n)?this._editStacks.get(n).createSnapshot(e):new Ujt(e,[])}restoreSnapshot(e){const n=this.getUriComparisonKey(e.resource);if(this._editStacks.has(n)){const i=this._editStacks.get(n);i.restoreSnapshot(e),!i.hasPastElements()&&!i.hasFutureElements()&&(i.dispose(),this._editStacks.delete(n))}}getElements(e){const n=this.getUriComparisonKey(e);return this._editStacks.has(n)?this._editStacks.get(n).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(e){if(!e)return[null,null];let n=null,i=null;for(const[r,o]of this._editStacks){const s=o.getClosestPastElement();s&&s.sourceId===e&&(!n||s.sourceOrder>n.sourceOrder)&&(n=s,i=r)}return[n,i]}canUndo(e){if(e instanceof dT){const[,i]=this._findClosestUndoElementWithSource(e.id);return!!i}const n=this.getUriComparisonKey(e);return this._editStacks.has(n)?this._editStacks.get(n).hasPastElements():!1}_onError(e,n){ji(e);for(const i of n.strResources)this.removeElements(i);this._notificationService.error(e)}_acquireLocks(e){for(const n of e.editStacks)if(n.locked)throw new Error("Cannot acquire edit stack lock");for(const n of e.editStacks)n.locked=!0;return()=>{for(const n of e.editStacks)n.locked=!1}}_safeInvokeWithLocks(e,n,i,r,o){const s=this._acquireLocks(i);let a;try{a=n()}catch(l){return s(),r.dispose(),this._onError(l,e)}return a?a.then(()=>(s(),r.dispose(),o()),l=>(s(),r.dispose(),this._onError(l,e))):(s(),r.dispose(),o())}async _invokeWorkspacePrepare(e){if(typeof e.actual.prepareUndoRedo>"u")return ct.None;const n=e.actual.prepareUndoRedo();return typeof n>"u"?ct.None:n}_invokeResourcePrepare(e,n){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return n(ct.None);const i=e.actual.prepareUndoRedo();return i?kfe(i)?n(i):i.then(r=>n(r)):n(ct.None)}_getAffectedEditStacks(e){const n=[];for(const i of e.strResources)n.push(this._editStacks.get(i)||t5t);return new b1e(n)}_tryToSplitAndUndo(e,n,i,r){if(n.canSplit())return this._splitPastWorkspaceElement(n,i),this._notificationService.warn(r),new kQ(this._undo(e,0,!0));for(const o of n.strResources)this.removeElements(o);return this._notificationService.warn(r),new kQ}_checkWorkspaceUndo(e,n,i,r){if(n.removedResources)return this._tryToSplitAndUndo(e,n,n.removedResources,I({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",n.label,n.removedResources.createMessage()));if(r&&n.invalidatedResources)return this._tryToSplitAndUndo(e,n,n.invalidatedResources,I({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",n.label,n.invalidatedResources.createMessage()));const o=[];for(const a of i.editStacks)a.getClosestPastElement()!==n&&o.push(a.resourceLabel);if(o.length>0)return this._tryToSplitAndUndo(e,n,null,I({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",n.label,o.join(", ")));const s=[];for(const a of i.editStacks)a.locked&&s.push(a.resourceLabel);return s.length>0?this._tryToSplitAndUndo(e,n,null,I({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",n.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,n,null,I({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",n.label))}_workspaceUndo(e,n,i){const r=this._getAffectedEditStacks(n),o=this._checkWorkspaceUndo(e,n,r,!1);return o?o.returnValue:this._confirmAndExecuteWorkspaceUndo(e,n,r,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,n]of this._editStacks){const i=n.getClosestPastElement();if(i){if(i===e){const r=n.getSecondClosestPastElement();if(r&&r.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,n,i,r){if(n.canSplit()&&!this._isPartOfUndoGroup(n)){let a;(function(u){u[u.All=0]="All",u[u.This=1]="This",u[u.Cancel=2]="Cancel"})(a||(a={}));const{result:l}=await this._dialogService.prompt({type:qa.Info,message:I("confirmWorkspace","Would you like to undo '{0}' across all files?",n.label),buttons:[{label:I({key:"ok",comment:["{0} denotes a number that is > 1, && denotes a mnemonic"]},"&&Undo in {0} Files",i.editStacks.length),run:()=>a.All},{label:I({key:"nok",comment:["&& denotes a mnemonic"]},"Undo this &&File"),run:()=>a.This}],cancelButton:{run:()=>a.Cancel}});if(l===a.Cancel)return;if(l===a.This)return this._splitPastWorkspaceElement(n,null),this._undo(e,0,!0);const c=this._checkWorkspaceUndo(e,n,i,!1);if(c)return c.returnValue;r=!0}let o;try{o=await this._invokeWorkspacePrepare(n)}catch(a){return this._onError(a,n)}const s=this._checkWorkspaceUndo(e,n,i,!0);if(s)return o.dispose(),s.returnValue;for(const a of i.editStacks)a.moveBackward(n);return this._safeInvokeWithLocks(n,()=>n.actual.undo(),i,o,()=>this._continueUndoInGroup(n.groupId,r))}_resourceUndo(e,n,i){if(!n.isValid){e.flushAllElements();return}if(e.locked){const r=I({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",n.label);this._notificationService.warn(r);return}return this._invokeResourcePrepare(n,r=>(e.moveBackward(n),this._safeInvokeWithLocks(n,()=>n.actual.undo(),new b1e([e]),r,()=>this._continueUndoInGroup(n.groupId,i))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let n=null,i=null;for(const[r,o]of this._editStacks){const s=o.getClosestPastElement();s&&s.groupId===e&&(!n||s.groupOrder>n.groupOrder)&&(n=s,i=r)}return[n,i]}_continueUndoInGroup(e,n){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);if(i)return this._undo(i,0,n)}undo(e){if(e instanceof dT){const[,n]=this._findClosestUndoElementWithSource(e.id);return n?this._undo(n,e.id,!1):void 0}return typeof e=="string"?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,n=0,i){if(!this._editStacks.has(e))return;const r=this._editStacks.get(e),o=r.getClosestPastElement();if(!o)return;if(o.groupId){const[a,l]=this._findClosestUndoElementInGroup(o.groupId);if(o!==a&&l)return this._undo(l,n,i)}if((o.sourceId!==n||o.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,n,o);try{return o.type===1?this._workspaceUndo(e,o,i):this._resourceUndo(r,o,i)}finally{}}async _confirmAndContinueUndo(e,n,i){if((await this._dialogService.confirm({message:I("confirmDifferentSource","Would you like to undo '{0}'?",i.label),primaryButton:I({key:"confirmDifferentSource.yes",comment:["&& denotes a mnemonic"]},"&&Yes"),cancelButton:I("confirmDifferentSource.no","No")})).confirmed)return this._undo(e,n,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let n=null,i=null;for(const[r,o]of this._editStacks){const s=o.getClosestFutureElement();s&&s.sourceId===e&&(!n||s.sourceOrder<n.sourceOrder)&&(n=s,i=r)}return[n,i]}canRedo(e){if(e instanceof dT){const[,i]=this._findClosestRedoElementWithSource(e.id);return!!i}const n=this.getUriComparisonKey(e);return this._editStacks.has(n)?this._editStacks.get(n).hasFutureElements():!1}_tryToSplitAndRedo(e,n,i,r){if(n.canSplit())return this._splitFutureWorkspaceElement(n,i),this._notificationService.warn(r),new kQ(this._redo(e));for(const o of n.strResources)this.removeElements(o);return this._notificationService.warn(r),new kQ}_checkWorkspaceRedo(e,n,i,r){if(n.removedResources)return this._tryToSplitAndRedo(e,n,n.removedResources,I({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",n.label,n.removedResources.createMessage()));if(r&&n.invalidatedResources)return this._tryToSplitAndRedo(e,n,n.invalidatedResources,I({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",n.label,n.invalidatedResources.createMessage()));const o=[];for(const a of i.editStacks)a.getClosestFutureElement()!==n&&o.push(a.resourceLabel);if(o.length>0)return this._tryToSplitAndRedo(e,n,null,I({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",n.label,o.join(", ")));const s=[];for(const a of i.editStacks)a.locked&&s.push(a.resourceLabel);return s.length>0?this._tryToSplitAndRedo(e,n,null,I({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",n.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,n,null,I({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",n.label))}_workspaceRedo(e,n){const i=this._getAffectedEditStacks(n),r=this._checkWorkspaceRedo(e,n,i,!1);return r?r.returnValue:this._executeWorkspaceRedo(e,n,i)}async _executeWorkspaceRedo(e,n,i){let r;try{r=await this._invokeWorkspacePrepare(n)}catch(s){return this._onError(s,n)}const o=this._checkWorkspaceRedo(e,n,i,!0);if(o)return r.dispose(),o.returnValue;for(const s of i.editStacks)s.moveForward(n);return this._safeInvokeWithLocks(n,()=>n.actual.redo(),i,r,()=>this._continueRedoInGroup(n.groupId))}_resourceRedo(e,n){if(!n.isValid){e.flushAllElements();return}if(e.locked){const i=I({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",n.label);this._notificationService.warn(i);return}return this._invokeResourcePrepare(n,i=>(e.moveForward(n),this._safeInvokeWithLocks(n,()=>n.actual.redo(),new b1e([e]),i,()=>this._continueRedoInGroup(n.groupId))))}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let n=null,i=null;for(const[r,o]of this._editStacks){const s=o.getClosestFutureElement();s&&s.groupId===e&&(!n||s.groupOrder<n.groupOrder)&&(n=s,i=r)}return[n,i]}_continueRedoInGroup(e){if(!e)return;const[,n]=this._findClosestRedoElementInGroup(e);if(n)return this._redo(n)}redo(e){if(e instanceof dT){const[,n]=this._findClosestRedoElementWithSource(e.id);return n?this._redo(n):void 0}return typeof e=="string"?this._redo(e):this._redo(this.getUriComparisonKey(e))}_redo(e){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),i=n.getClosestFutureElement();if(i){if(i.groupId){const[r,o]=this._findClosestRedoElementInGroup(i.groupId);if(i!==r&&o)return this._redo(o)}try{return i.type===1?this._workspaceRedo(e,i):this._resourceRedo(n,i)}finally{}}}};FTe=D1i([mlt(0,Lq),mlt(1,tl)],FTe);class kQ{constructor(e){this.returnValue=e}}Rr(hme,FTe,1);function bh(t,e,n){return Math.min(Math.max(t,e),n)}class n5t{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class M1i{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const n=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=n,this._sum+=e,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}const KVe=Sr("environmentService");var L1i=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},blt=function(t,e){return function(n,i){e(n,i,t)}};const tg=Sr("ILanguageFeatureDebounceService");var Ire;(function(t){const e=new WeakMap;let n=0;function i(r){let o=e.get(r);return o===void 0&&(o=++n,e.set(r,o)),o}t.of=i})(Ire||(Ire={}));class T1i{constructor(e){this._default=e}get(e){return this._default}update(e,n){return this._default}default(){return this._default}}class I1i{constructor(e,n,i,r,o,s){this._logService=e,this._name=n,this._registry=i,this._default=r,this._min=o,this._max=s,this._cache=new Aw(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((n,i)=>Tfe(Ire.of(i),n),0)}get(e){const n=this._key(e),i=this._cache.get(n);return i?bh(i.value,this._min,this._max):this.default()}update(e,n){const i=this._key(e);let r=this._cache.get(i);r||(r=new M1i(6),this._cache.set(i,r));const o=bh(r.update(n),this._min,this._max);return M8e(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${o}ms`),o}_overall(){const e=new n5t;for(const[,n]of this._cache)e.update(n.value);return e.value}default(){const e=this._overall()|0||this._default;return bh(e,this._min,this._max)}}let $Te=class{constructor(e,n){this._logService=e,this._data=new Map,this._isDev=n.isExtensionDevelopment||!n.isBuilt}for(e,n,i){const r=(i==null?void 0:i.min)??50,o=(i==null?void 0:i.max)??r**2,s=(i==null?void 0:i.key)??void 0,a=`${Ire.of(e)},${r}${s?","+s:""}`;let l=this._data.get(a);return l||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${n}] is disabled in developed mode`),l=new T1i(r*1.5)):l=new I1i(this._logService,n,e,this._overallAverage()|0||r*1.5,r,o),this._data.set(a,l)),l}_overallAverage(){const e=new n5t;for(const n of this._data.values())e.update(n.default());return e.value}};$Te=L1i([blt(0,Nd),blt(1,KVe)],$Te);Rr(tg,$Te,1);class lB{static create(e,n){return new lB(e,new Are(n))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,n){this._startLineNumber=e,this._tokens=n,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e&&new ve(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn)}removeTokens(e){const n=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(n,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const n=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[r,o,s]=this._tokens.split(n,e.startColumn-1,i,e.endColumn-1);return[new lB(this._startLineNumber,r),new lB(this._startLineNumber+s,o)]}applyEdit(e,n){const[i,r,o]=gk(n);this.acceptEdit(e,i,r,o,n.length>0?n.charCodeAt(0):0)}acceptEdit(e,n,i,r,o){this._acceptDeleteRange(e),this._acceptInsertText(new ot(e.startLineNumber,e.startColumn),n,i,r,o),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const n=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){const o=i-n;this._startLineNumber-=o;return}const r=this._tokens.getMaxDeltaLine();if(!(n>=r+1)){if(n<0&&i>=r+1){this._startLineNumber=0,this._tokens.clear();return}if(n<0){const o=-n;this._startLineNumber-=o,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,n,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,n,i,r,o){if(n===0&&i===0)return;const s=e.lineNumber-this._startLineNumber;if(s<0){this._startLineNumber+=n;return}const a=this._tokens.getMaxDeltaLine();s>=a+1||this._tokens.acceptInsertText(s,e.column-1,n,i,r,o)}}class Are{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const n=[];for(let i=0;i<this._tokenCount;i++)n.push(`(${this._getDeltaLine(i)+e},${this._getStartCharacter(i)}-${this._getEndCharacter(i)})`);return`[${n.join(",")}]`}getMaxDeltaLine(){const e=this._getTokenCount();return e===0?-1:this._getDeltaLine(e-1)}getRange(){const e=this._getTokenCount();if(e===0)return null;const n=this._getStartCharacter(0),i=this._getDeltaLine(e-1),r=this._getEndCharacter(e-1);return new ve(0,n+1,i,r+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(e){return this._tokens[4*e]}_getStartCharacter(e){return this._tokens[4*e+1]}_getEndCharacter(e){return this._tokens[4*e+2]}isEmpty(){return this._getTokenCount()===0}getLineTokens(e){let n=0,i=this._getTokenCount()-1;for(;n<i;){const r=n+Math.floor((i-n)/2),o=this._getDeltaLine(r);if(o<e)n=r+1;else if(o>e)i=r-1;else{let s=r;for(;s>n&&this._getDeltaLine(s-1)===e;)s--;let a=r;for(;a<i&&this._getDeltaLine(a+1)===e;)a++;return new vlt(this._tokens.subarray(4*s,4*a+4))}}return this._getDeltaLine(n)===e?new vlt(this._tokens.subarray(4*n,4*n+4)):null}clear(){this._tokenCount=0}removeTokens(e,n,i,r){const o=this._tokens,s=this._tokenCount;let a=0,l=!1,c=0;for(let u=0;u<s;u++){const d=4*u,h=o[d],f=o[d+1],m=o[d+2],p=o[d+3];if((h>e||h===e&&m>=n)&&(h<i||h===i&&f<=r))l=!0;else{if(a===0&&(c=h),l){const g=4*a;o[g]=h-c,o[g+1]=f,o[g+2]=m,o[g+3]=p}a++}}return this._tokenCount=a,c}split(e,n,i,r){const o=this._tokens,s=this._tokenCount,a=[],l=[];let c=a,u=0,d=0;for(let h=0;h<s;h++){const f=4*h,m=o[f],p=o[f+1],g=o[f+2],y=o[f+3];if(m>e||m===e&&g>=n){if(m<i||m===i&&p<=r)continue;c!==l&&(c=l,u=0,d=m)}c[u++]=m-d,c[u++]=p,c[u++]=g,c[u++]=y}return[new Are(new Uint32Array(a)),new Are(new Uint32Array(l)),d]}acceptDeleteRange(e,n,i,r,o){const s=this._tokens,a=this._tokenCount,l=r-n;let c=0,u=!1;for(let d=0;d<a;d++){const h=4*d;let f=s[h],m=s[h+1],p=s[h+2];const g=s[h+3];if(f<n||f===n&&p<=i){c++;continue}else if(f===n&&m<i)f===r&&p>o?p-=o-i:p=i;else if(f===n&&m===i)if(f===r&&p>o)p-=o-i;else{u=!0;continue}else if(f<r||f===r&&m<o)if(f===r&&p>o)f=n,m=i,p=m+(p-o);else{u=!0;continue}else if(f>r){if(l===0&&!u){c=a;break}f-=l}else if(f===r&&m>=o)e&&f===0&&(m+=e,p+=e),f-=l,m-=o-i,p-=o-i;else throw new Error("Not possible!");const y=4*c;s[y]=f,s[y+1]=m,s[y+2]=p,s[y+3]=g,c++}this._tokenCount=c}acceptInsertText(e,n,i,r,o,s){const a=i===0&&r===1&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),l=this._tokens,c=this._tokenCount;for(let u=0;u<c;u++){const d=4*u;let h=l[d],f=l[d+1],m=l[d+2];if(!(h<e||h===e&&m<n)){if(h===e&&m===n)if(a)m+=1;else continue;else if(h===e&&f<n&&n<m)i===0?m+=r:m=n;else{if(h===e&&f===n&&a)continue;if(h===e)if(h+=i,i===0)f+=r,m+=r;else{const p=m-f;f=o+(f-n),m=f+p}else h+=i}l[d]=h,l[d+1]=f,l[d+2]=m}}}}class vlt{constructor(e){this._tokens=e}getCount(){return this._tokens.length/4}getStartCharacter(e){return this._tokens[4*e+1]}getEndCharacter(e){return this._tokens[4*e+2]}getMetadata(e){return this._tokens[4*e+3]}}var A1i=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},v1e=function(t,e){return function(n,i){e(n,i,t)}};let VTe=class{constructor(e,n,i,r){this._legend=e,this._themeService=n,this._languageService=i,this._logService=r,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new BTe}getMetadata(e,n,i){const r=this._languageService.languageIdCodec.encodeLanguageId(i),o=this._hashTable.get(e,n,r);let s;if(o)s=o.metadata;else{let a=this._legend.tokenTypes[e];const l=[];if(a){let c=n;for(let d=0;c>0&&d<this._legend.tokenModifiers.length;d++)c&1&&l.push(this._legend.tokenModifiers[d]),c=c>>1;const u=this._themeService.getColorTheme().getTokenStyleMetadata(a,l,i);if(typeof u>"u")s=2147483647;else{if(s=0,typeof u.italic<"u"){const d=(u.italic?1:0)<<11;s|=d|1}if(typeof u.bold<"u"){const d=(u.bold?2:0)<<11;s|=d|2}if(typeof u.underline<"u"){const d=(u.underline?4:0)<<11;s|=d|4}if(typeof u.strikethrough<"u"){const d=(u.strikethrough?8:0)<<11;s|=d|8}if(u.foreground){const d=u.foreground<<15;s|=d|16}s===0&&(s=2147483647)}}else s=2147483647,a="not-in-legend";this._hashTable.add(e,n,r,s)}return s}warnOverlappingSemanticTokens(e,n){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${n}`))}warnInvalidLengthSemanticTokens(e,n){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${n}`))}warnInvalidEditStart(e,n,i,r,o){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${n}) at edit #${i}: The provided start offset ${r} is outside the previous data (length ${o}).`))}};VTe=A1i([v1e(1,Ql),v1e(2,Qs),v1e(3,Nd)],VTe);function i5t(t,e,n){const i=t.data,r=t.data.length/5|0,o=Math.max(Math.ceil(r/1024),400),s=[];let a=0,l=1,c=0;for(;a<r;){const u=a;let d=Math.min(u+o,r);if(d<r){let _=d;for(;_-1>u&&i[5*_]===0;)_--;if(_-1===u){let w=d;for(;w+1<r&&i[5*w]===0;)w++;d=w}else d=_}let h=new Uint32Array((d-u)*4),f=0,m=0,p=0,g=0;for(;a<d;){const _=5*a,w=i[_],C=i[_+1],N=l+w|0,E=w===0?c+C|0:C,D=i[_+2],k=E+D|0,M=i[_+3],T=i[_+4];if(k<=E)e.warnInvalidLengthSemanticTokens(N,E+1);else if(p===N&&g>E)e.warnOverlappingSemanticTokens(N,E+1);else{const A=e.getMetadata(M,T,n);A!==2147483647&&(m===0&&(m=N),h[f]=N-m,h[f+1]=E,h[f+2]=k,h[f+3]=A,f+=4,p=N,g=k)}l=N,c=E,a++}f!==h.length&&(h=h.subarray(0,f));const y=lB.create(m,h);s.push(y)}return s}class R1i{constructor(e,n,i,r){this.tokenTypeIndex=e,this.tokenModifierSet=n,this.languageId=i,this.metadata=r,this.next=null}}const z1=class z1{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=z1._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<z1._SIZES.length?2/3*this._currentLength:0),this._elements=[],z1._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,n){for(let i=0;i<n;i++)e[i]=null}_hash2(e,n){return(e<<5)-e+n|0}_hashFunc(e,n,i){return this._hash2(this._hash2(e,n),i)%this._currentLength}get(e,n,i){const r=this._hashFunc(e,n,i);let o=this._elements[r];for(;o;){if(o.tokenTypeIndex===e&&o.tokenModifierSet===n&&o.languageId===i)return o;o=o.next}return null}add(e,n,i,r){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const o=this._elements;this._currentLengthIndex++,this._currentLength=z1._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<z1._SIZES.length?2/3*this._currentLength:0),this._elements=[],z1._nullOutEntries(this._elements,this._currentLength);for(const s of o){let a=s;for(;a;){const l=a.next;a.next=null,this._add(a),a=l}}}this._add(new R1i(e,n,i,r))}_add(e){const n=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[n],this._elements[n]=e}};z1._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143];let BTe=z1;const mme=Sr("semanticTokensStylingService");var P1i=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},y1e=function(t,e){return function(n,i){e(n,i,t)}};let zTe=class extends ct{constructor(e,n,i){super(),this._themeService=e,this._logService=n,this._languageService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new VTe(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};zTe=P1i([y1e(0,Ql),y1e(1,Nd),y1e(2,Qs)],zTe);Rr(mme,zTe,1);const MQ="**",ylt="/",fte="[/\\\\]",mte="[^/\\\\]",O1i=/\//g;function _lt(t,e){switch(t){case 0:return"";case 1:return`${mte}*?`;default:return`(?:${fte}|${mte}+${fte}${e?`|${fte}${mte}+`:""})*?`}}function xlt(t,e){if(!t)return[];const n=[];let i=!1,r=!1,o="";for(const s of t){switch(s){case e:if(!i&&!r){n.push(o),o="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":r=!0;break;case"]":r=!1;break}o+=s}return o&&n.push(o),n}function r5t(t){if(!t)return"";let e="";const n=xlt(t,ylt);if(n.every(i=>i===MQ))e=".*";else{let i=!1;n.forEach((r,o)=>{if(r===MQ){if(i)return;e+=_lt(2,o===n.length-1)}else{let s=!1,a="",l=!1,c="";for(const u of r){if(u!=="}"&&s){a+=u;continue}if(l&&(u!=="]"||!c)){let d;u==="-"?d=u:(u==="^"||u==="!")&&!c?d="^":u===ylt?d="":d=Hp(u),c+=d;continue}switch(u){case"{":s=!0;continue;case"[":l=!0;continue;case"}":{const h=`(?:${xlt(a,",").map(f=>r5t(f)).join("|")})`;e+=h,s=!1,a="";break}case"]":{e+="["+c+"]",l=!1,c="";break}case"?":e+=mte;continue;case"*":e+=_lt(1);continue;default:e+=Hp(u)}}o<n.length-1&&(n[o+1]!==MQ||o+2<n.length)&&(e+=fte)}i=r===MQ})}return e}const j1i=/^\*\*\/\*\.[\w\.-]+$/,F1i=/^\*\*\/([\w\.-]+)\/?$/,$1i=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,V1i=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,B1i=/^\*\*((\/[\w\.-]+)+)\/?$/,z1i=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,wlt=new Aw(1e4),Clt=function(){return!1},Wx=function(){return null};function qVe(t,e){if(!t)return Wx;let n;typeof t!="string"?n=t.pattern:n=t,n=n.trim();const i=`${n}_${!!e.trimForExclusions}`;let r=wlt.get(i);if(r)return Slt(r,t);let o;return j1i.test(n)?r=H1i(n.substr(4),n):(o=F1i.exec(_1e(n,e)))?r=W1i(o[1],n):(e.trimForExclusions?V1i:$1i).test(n)?r=U1i(n,e):(o=B1i.exec(_1e(n,e)))?r=Nlt(o[1].substr(1),n,!0):(o=z1i.exec(_1e(n,e)))?r=Nlt(o[1],n,!1):r=K1i(n),wlt.set(i,r),Slt(r,t)}function Slt(t,e){if(typeof e=="string")return t;const n=function(i,r){return NTe(i,e.base,!$h)?t(mq(i.substr(e.base.length),_0),r):null};return n.allBasenames=t.allBasenames,n.allPaths=t.allPaths,n.basenames=t.basenames,n.patterns=t.patterns,n}function _1e(t,e){return e.trimForExclusions&&t.endsWith("/**")?t.substr(0,t.length-2):t}function H1i(t,e){return function(n,i){return typeof n=="string"&&n.endsWith(t)?e:null}}function W1i(t,e){const n=`/${t}`,i=`\\${t}`,r=function(s,a){return typeof s!="string"?null:a?a===t?e:null:s===t||s.endsWith(n)||s.endsWith(i)?e:null},o=[t];return r.basenames=o,r.patterns=[e],r.allBasenames=o,r}function U1i(t,e){const n=s5t(t.slice(1,-1).split(",").map(a=>qVe(a,e)).filter(a=>a!==Wx),t),i=n.length;if(!i)return Wx;if(i===1)return n[0];const r=function(a,l){for(let c=0,u=n.length;c<u;c++)if(n[c](a,l))return t;return null},o=n.find(a=>!!a.allBasenames);o&&(r.allBasenames=o.allBasenames);const s=n.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return s.length&&(r.allPaths=s),r}function Nlt(t,e,n){const i=_0===Dl.sep,r=i?t:t.replace(O1i,_0),o=_0+r,s=Dl.sep+t;let a;return n?a=function(l,c){return typeof l=="string"&&(l===r||l.endsWith(o)||!i&&(l===t||l.endsWith(s)))?e:null}:a=function(l,c){return typeof l=="string"&&(l===r||!i&&l===t)?e:null},a.allPaths=[(n?"*/":"./")+t],a}function K1i(t){try{const e=new RegExp(`^${r5t(t)}$`);return function(n){return e.lastIndex=0,typeof n=="string"&&e.test(n)?t:null}}catch{return Wx}}function q1i(t,e,n){return!t||typeof e!="string"?!1:o5t(t)(e,void 0,n)}function o5t(t,e={}){if(!t)return Clt;if(typeof t=="string"||G1i(t)){const n=qVe(t,e);if(n===Wx)return Clt;const i=function(r,o){return!!n(r,o)};return n.allBasenames&&(i.allBasenames=n.allBasenames),n.allPaths&&(i.allPaths=n.allPaths),i}return Y1i(t,e)}function G1i(t){const e=t;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function Y1i(t,e){const n=s5t(Object.getOwnPropertyNames(t).map(a=>X1i(a,t[a],e)).filter(a=>a!==Wx)),i=n.length;if(!i)return Wx;if(!n.some(a=>!!a.requiresSiblings)){if(i===1)return n[0];const a=function(u,d){let h;for(let f=0,m=n.length;f<m;f++){const p=n[f](u,d);if(typeof p=="string")return p;_Le(p)&&(h||(h=[]),h.push(p))}return h?(async()=>{for(const f of h){const m=await f;if(typeof m=="string")return m}return null})():null},l=n.find(u=>!!u.allBasenames);l&&(a.allBasenames=l.allBasenames);const c=n.reduce((u,d)=>d.allPaths?u.concat(d.allPaths):u,[]);return c.length&&(a.allPaths=c),a}const r=function(a,l,c){let u,d;for(let h=0,f=n.length;h<f;h++){const m=n[h];m.requiresSiblings&&c&&(l||(l=pD(a)),u||(u=l.substr(0,l.length-Sdi(a).length)));const p=m(a,l,u,c);if(typeof p=="string")return p;_Le(p)&&(d||(d=[]),d.push(p))}return d?(async()=>{for(const h of d){const f=await h;if(typeof f=="string")return f}return null})():null},o=n.find(a=>!!a.allBasenames);o&&(r.allBasenames=o.allBasenames);const s=n.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return s.length&&(r.allPaths=s),r}function X1i(t,e,n){if(e===!1)return Wx;const i=qVe(t,n);if(i===Wx)return Wx;if(typeof e=="boolean")return i;if(e){const r=e.when;if(typeof r=="string"){const o=(s,a,l,c)=>{if(!c||!i(s,a))return null;const u=r.replace("$(basename)",()=>l),d=c(u);return _Le(d)?d.then(h=>h?t:null):d?t:null};return o.requiresSiblings=!0,o}}return i}function s5t(t,e){const n=t.filter(a=>!!a.basenames);if(n.length<2)return t;const i=n.reduce((a,l)=>{const c=l.basenames;return c?a.concat(c):a},[]);let r;if(e){r=[];for(let a=0,l=i.length;a<l;a++)r.push(e)}else r=n.reduce((a,l)=>{const c=l.patterns;return c?a.concat(c):a},[]);const o=function(a,l){if(typeof a!="string")return null;if(!l){let u;for(u=a.length;u>0;u--){const d=a.charCodeAt(u-1);if(d===47||d===92)break}l=a.substr(u)}const c=i.indexOf(l);return c!==-1?r[c]:null};o.basenames=i,o.patterns=r,o.allBasenames=i;const s=t.filter(a=>!a.basenames);return s.push(o),s}function GVe(t,e,n,i,r,o){if(Array.isArray(t)){let s=0;for(const a of t){const l=GVe(a,e,n,i,r,o);if(l===10)return l;l>s&&(s=l)}return s}else{if(typeof t=="string")return i?t==="*"?5:t===n?10:0:0;if(t){const{language:s,pattern:a,scheme:l,hasAccessToAllModels:c,notebookType:u}=t;if(!i&&!c)return 0;u&&r&&(e=r);let d=0;if(l)if(l===e.scheme)d=10;else if(l==="*")d=5;else return 0;if(s)if(s===n)d=10;else if(s==="*")d=Math.max(d,5);else return 0;if(u)if(u===o)d=10;else if(u==="*"&&o!==void 0)d=Math.max(d,5);else return 0;if(a){let h;if(typeof a=="string"?h=a:h={...a,base:QOt(a.base)},h===e.fsPath||q1i(h,e.fsPath))d=10;else return 0}return d}else return 0}}function a5t(t){return typeof t=="string"?!1:Array.isArray(t)?t.every(a5t):!!t.exclusive}class Elt{constructor(e,n,i,r,o){this.uri=e,this.languageId=n,this.notebookUri=i,this.notebookType=r,this.recursive=o}equals(e){var n,i;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&((n=this.notebookUri)==null?void 0:n.toString())===((i=e.notebookUri)==null?void 0:i.toString())&&this.recursive===e.recursive}}class ta{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new st,this.onDidChange=this._onDidChange.event}register(e,n){let i={selector:e,provider:n,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),Kn(()=>{if(i){const r=this._entries.indexOf(i);r>=0&&(this._entries.splice(r,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);const n=[];for(const i of this._entries)i._score>0&&n.push(i.provider);return n}ordered(e,n=!1){const i=[];return this._orderedForEach(e,n,r=>i.push(r.provider)),i}orderedGroups(e){const n=[];let i,r;return this._orderedForEach(e,!1,o=>{i&&r===o._score?i.push(o.provider):(r=o._score,i=[o.provider],n.push(i))}),n}_orderedForEach(e,n,i){this._updateScores(e,n);for(const r of this._entries)r._score>0&&i(r)}_updateScores(e,n){var o,s;const i=(o=this._notebookInfoResolver)==null?void 0:o.call(this,e.uri),r=i?new Elt(e.uri,e.getLanguageId(),i.uri,i.type,n):new Elt(e.uri,e.getLanguageId(),void 0,void 0,n);if(!((s=this._lastCandidate)!=null&&s.equals(r))){this._lastCandidate=r;for(const a of this._entries)if(a._score=GVe(a.selector,r.uri,r.languageId,h3t(e),r.notebookUri,r.notebookType),a5t(a.selector)&&a._score>0)if(n)a._score=0;else{for(const l of this._entries)l._score=0;a._score=1e3;break}this._entries.sort(ta._compareByScoreAndTime)}}static _compareByScoreAndTime(e,n){return e._score<n._score?1:e._score>n._score?-1:J7(e.selector)&&!J7(n.selector)?1:!J7(e.selector)&&J7(n.selector)?-1:e._time<n._time?1:e._time>n._time?-1:0}}function J7(t){return typeof t=="string"?!1:Array.isArray(t)?t.some(J7):!!t.isBuiltin}class Z1i{constructor(){this.referenceProvider=new ta(this._score.bind(this)),this.renameProvider=new ta(this._score.bind(this)),this.newSymbolNamesProvider=new ta(this._score.bind(this)),this.codeActionProvider=new ta(this._score.bind(this)),this.definitionProvider=new ta(this._score.bind(this)),this.typeDefinitionProvider=new ta(this._score.bind(this)),this.declarationProvider=new ta(this._score.bind(this)),this.implementationProvider=new ta(this._score.bind(this)),this.documentSymbolProvider=new ta(this._score.bind(this)),this.inlayHintsProvider=new ta(this._score.bind(this)),this.colorProvider=new ta(this._score.bind(this)),this.codeLensProvider=new ta(this._score.bind(this)),this.documentFormattingEditProvider=new ta(this._score.bind(this)),this.documentRangeFormattingEditProvider=new ta(this._score.bind(this)),this.onTypeFormattingEditProvider=new ta(this._score.bind(this)),this.signatureHelpProvider=new ta(this._score.bind(this)),this.hoverProvider=new ta(this._score.bind(this)),this.documentHighlightProvider=new ta(this._score.bind(this)),this.multiDocumentHighlightProvider=new ta(this._score.bind(this)),this.selectionRangeProvider=new ta(this._score.bind(this)),this.foldingRangeProvider=new ta(this._score.bind(this)),this.linkProvider=new ta(this._score.bind(this)),this.inlineCompletionsProvider=new ta(this._score.bind(this)),this.inlineEditProvider=new ta(this._score.bind(this)),this.completionProvider=new ta(this._score.bind(this)),this.linkedEditingRangeProvider=new ta(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new ta(this._score.bind(this)),this.documentSemanticTokensProvider=new ta(this._score.bind(this)),this.documentDropEditProvider=new ta(this._score.bind(this)),this.documentPasteEditProvider=new ta(this._score.bind(this))}_score(e){var n;return(n=this._notebookTypeResolver)==null?void 0:n.call(this,e)}}Rr(Ln,Z1i,1);var Q1i=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Dlt=function(t,e){return function(n,i){e(n,i,t)}};const Pw=Sr("hoverService");let m5=class extends ct{get delay(){return this.isInstantlyHovering()?0:this._delay}constructor(e,n,i={},r,o){super(),this.placement=e,this.instantHover=n,this.overrideOptions=i,this.configurationService=r,this.hoverService=o,this.lastHoverHideTime=0,this.timeLimit=200,this.hoverDisposables=this._register(new Lt),this._delay=this.configurationService.getValue("workbench.hover.delay"),this._register(this.configurationService.onDidChangeConfiguration(s=>{s.affectsConfiguration("workbench.hover.delay")&&(this._delay=this.configurationService.getValue("workbench.hover.delay"))}))}showHover(e,n){const i=typeof this.overrideOptions=="function"?this.overrideOptions(e,n):this.overrideOptions;this.hoverDisposables.clear();const r=uc(e.target)?[e.target]:e.target.targetElements;for(const s of r)this.hoverDisposables.add(Fa(s,"keydown",a=>{a.equals(9)&&this.hoverService.hideHover()}));const o=uc(e.content)?void 0:e.content.toString();return this.hoverService.showHover({...e,...i,persistence:{hideOnKeyDown:!0,...i.persistence},id:o,appearance:{...e.appearance,compact:!0,skipFadeInAnimation:this.isInstantlyHovering(),...i.appearance}},n)}isInstantlyHovering(){return this.instantHover&&Date.now()-this.lastHoverHideTime<this.timeLimit}onDidHideHover(){this.hoverDisposables.clear(),this.instantHover&&(this.lastHoverHideTime=Date.now())}};m5=Q1i([Dlt(3,cr),Dlt(4,Pw)],m5);const US=Sr("contextViewService"),Hm=Sr("contextMenuService"),LQ=Xt;let YVe=class extends ct{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new Eq(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}};class pme extends ct{static render(e,n,i){return new pme(e,n,i)}constructor(e,n,i){super(),this.actionLabel=n.label,this.actionKeybindingLabel=i,this.actionContainer=jt(e,LQ("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=jt(this.actionContainer,LQ("a.action")),this.action.setAttribute("role","button"),n.iconClass&&jt(this.action,LQ(`span.icon.${n.iconClass}`));const r=jt(this.action,LQ("span"));r.textContent=i?`${n.label} (${i})`:n.label,this._store.add(new c5t(this.actionContainer,n.run)),this._store.add(new u5t(this.actionContainer,n.run,[3,10])),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}function l5t(t,e){return t&&e?I("acessibleViewHint","Inspect this in the accessible view with {0}.",e):t?I("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}class c5t extends ct{constructor(e,n){super(),this._register(yt(e,Yt.CLICK,i=>{i.stopPropagation(),i.preventDefault(),n(e)}))}}class u5t extends ct{constructor(e,n,i){super(),this._register(yt(e,Yt.KEY_DOWN,r=>{const o=new as(r);i.some(s=>o.equals(s))&&(r.stopPropagation(),r.preventDefault(),n(e))}))}}const Wm=Sr("openerService");function J1i(t){let e;const n=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(t.fragment);return n&&(e={startLineNumber:parseInt(n[1]),startColumn:n[2]?parseInt(n[2]):1,endLineNumber:n[4]?parseInt(n[4]):void 0,endColumn:n[4]?n[5]?parseInt(n[5]):1:void 0},t=t.with({fragment:""})),{selection:e,uri:t}}function eCi(t,e={}){const n=XVe(e);return n.textContent=t,n}function tCi(t,e={}){const n=XVe(e);return d5t(n,iCi(t,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),n}function XVe(t){const e=t.inline?"span":"div",n=document.createElement(e);return t.className&&(n.className=t.className),n}class nCi{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function d5t(t,e,n,i){let r;if(e.type===2)r=document.createTextNode(e.content||"");else if(e.type===3)r=document.createElement("b");else if(e.type===4)r=document.createElement("i");else if(e.type===7&&i)r=document.createElement("code");else if(e.type===5&&n){const o=document.createElement("a");n.disposables.add(Fa(o,"click",s=>{n.callback(String(e.index),s)})),r=o}else e.type===8?r=document.createElement("br"):e.type===1&&(r=t);r&&t!==r&&t.appendChild(r),r&&Array.isArray(e.children)&&e.children.forEach(o=>{d5t(r,o,n,i)})}function iCi(t,e){const n={type:1,children:[]};let i=0,r=n;const o=[],s=new nCi(t);for(;!s.eos();){let a=s.next();const l=a==="\\"&&HTe(s.peek(),e)!==0;if(l&&(a=s.next()),!l&&rCi(a,e)&&a===s.peek()){s.advance(),r.type===2&&(r=o.pop());const c=HTe(a,e);if(r.type===c||r.type===5&&c===6)r=o.pop();else{const u={type:c,children:[]};c===5&&(u.index=i,i++),r.children.push(u),o.push(r),r=u}}else if(a===`
`)r.type===2&&(r=o.pop()),r.children.push({type:8});else if(r.type!==2){const c={type:2,content:a};r.children.push(c),o.push(r),r=c}else r.content+=a}return r.type===2&&(r=o.pop()),n}function rCi(t,e){return HTe(t,e)!==0}function HTe(t,e){switch(t){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}const oCi=new RegExp(`(\\\\)?\\$\\((${ci.iconNameExpression}(?:${ci.iconModifierExpression})?)\\)`,"g");function bD(t){const e=new Array;let n,i=0,r=0;for(;(n=oCi.exec(t))!==null;){r=n.index||0,i<r&&e.push(t.substring(i,r)),i=(n.index||0)+n[0].length;const[,o,s]=n;e.push(o?`$(${s})`:Y2({id:s}))}return i<t.length&&e.push(t.substring(i)),e}function Y2(t){const e=Xt("span");return e.classList.add(...ci.asClassNameArray(t)),e}function sCi(t){const e=aCi(t);if(e&&e.length>0)return new Uint32Array(e)}let rp=0;const DE=new Uint32Array(10);function aCi(t){if(rp=0,j_(t,x1e,4352),rp>0||(j_(t,w1e,4449),rp>0)||(j_(t,C1e,4520),rp>0)||(j_(t,mL,12593),rp))return DE.subarray(0,rp);if(t>=44032&&t<=55203){const e=t-44032,n=e%588,i=Math.floor(e/588),r=Math.floor(n/28),o=n%28-1;if(i<x1e.length?j_(i,x1e,0):4352+i-12593<mL.length&&j_(4352+i,mL,12593),r<w1e.length?j_(r,w1e,0):4449+r-12593<mL.length&&j_(4449+r-12593,mL,12593),o>=0&&(o<C1e.length?j_(o,C1e,0):4520+o-12593<mL.length&&j_(4520+o-12593,mL,12593)),rp>0)return DE.subarray(0,rp)}}function j_(t,e,n){t>=n&&t<n+e.length&&lCi(e[t-n])}function lCi(t){t!==0&&(DE[rp++]=t&255,t>>8&&(DE[rp++]=t>>8&255),t>>16&&(DE[rp++]=t>>16&255))}const x1e=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),w1e=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),C1e=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),mL=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]);function ZVe(...t){return function(e,n){for(let i=0,r=t.length;i<r;i++){const o=t[i](e,n);if(o)return o}return null}}h5t.bind(void 0,!1);const eW=h5t.bind(void 0,!0);function h5t(t,e,n){if(!n||n.length<e.length)return null;let i;return t?i=_8e(n,e):i=n.indexOf(e)===0,i?e.length>0?[{start:0,end:e.length}]:[]:null}function f5t(t,e){const n=e.toLowerCase().indexOf(t.toLowerCase());return n===-1?null:[{start:n,end:n+t.length}]}function m5t(t,e){return WTe(t.toLowerCase(),e.toLowerCase(),0,0)}function WTe(t,e,n,i){if(n===t.length)return[];if(i===e.length)return null;if(t[n]===e[i]){let r=null;return(r=WTe(t,e,n+1,i+1))?e7e({start:i,end:i+1},r):null}return WTe(t,e,n,i+1)}function QVe(t){return 97<=t&&t<=122}function gme(t){return 65<=t&&t<=90}function JVe(t){return 48<=t&&t<=57}function p5t(t){return t===32||t===9||t===10||t===13}const g5t=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(t=>g5t.add(t.charCodeAt(0)));function Rre(t){return p5t(t)||g5t.has(t)}function klt(t,e){return t===e||Rre(t)&&Rre(e)}const S1e=new Map;function Mlt(t){if(S1e.has(t))return S1e.get(t);let e;const n=sCi(t);return n&&(e=n),S1e.set(t,e),e}function b5t(t){return QVe(t)||gme(t)||JVe(t)}function e7e(t,e){return e.length===0?e=[t]:t.end===e[0].start?e[0].start=t.start:e.unshift(t),e}function v5t(t,e){for(let n=e;n<t.length;n++){const i=t.charCodeAt(n);if(gme(i)||JVe(i)||n>0&&!b5t(t.charCodeAt(n-1)))return n}return t.length}function UTe(t,e,n,i){if(n===t.length)return[];if(i===e.length)return null;if(t[n]!==e[i].toLowerCase())return null;{let r=null,o=i+1;for(r=UTe(t,e,n+1,i+1);!r&&(o=v5t(e,o))<e.length;)r=UTe(t,e,n+1,o),o++;return r===null?null:e7e({start:i,end:i+1},r)}}function cCi(t){let e=0,n=0,i=0,r=0,o=0;for(let u=0;u<t.length;u++)o=t.charCodeAt(u),gme(o)&&e++,QVe(o)&&n++,b5t(o)&&i++,JVe(o)&&r++;const s=e/t.length,a=n/t.length,l=i/t.length,c=r/t.length;return{upperPercent:s,lowerPercent:a,alphaPercent:l,numericPercent:c}}function uCi(t){const{upperPercent:e,lowerPercent:n}=t;return n===0&&e>.6}function dCi(t){const{upperPercent:e,lowerPercent:n,alphaPercent:i,numericPercent:r}=t;return n>.2&&e<.8&&i>.6&&r<.2}function hCi(t){let e=0,n=0,i=0,r=0;for(let o=0;o<t.length;o++)i=t.charCodeAt(o),gme(i)&&e++,QVe(i)&&n++,p5t(i)&&r++;return(e===0||n===0)&&r===0?t.length<=30:e<=5}function y5t(t,e){if(!e||(e=e.trim(),e.length===0)||!hCi(t))return null;e.length>60&&(e=e.substring(0,60));const n=cCi(e);if(!dCi(n)){if(!uCi(n))return null;e=e.toLowerCase()}let i=null,r=0;for(t=t.toLowerCase();r<e.length&&(i=UTe(t,e,0,r))===null;)r=v5t(e,r+1);return i}function fCi(t,e,n=!1){if(!e||e.length===0)return null;let i=null,r=0;for(t=t.toLowerCase(),e=e.toLowerCase();r<e.length&&(i=KTe(t,e,0,r,n),i===null);)r=_5t(e,r+1);return i}function KTe(t,e,n,i,r){let o=0;if(n===t.length)return[];if(i===e.length)return null;if(!klt(t.charCodeAt(n),e.charCodeAt(i))){const l=Mlt(t.charCodeAt(n));if(!l)return null;for(let c=0;c<l.length;c++)if(!klt(l[c],e.charCodeAt(i+c)))return null;o+=l.length-1}let s=null,a=i+o+1;if(s=KTe(t,e,n+1,a,r),!r)for(;!s&&(a=_5t(e,a))<e.length;)s=KTe(t,e,n+1,a,r),a++;if(!s)return null;if(t.charCodeAt(n)!==e.charCodeAt(i)){const l=Mlt(t.charCodeAt(n));if(!l)return s;for(let c=0;c<l.length;c++)if(l[c]!==e.charCodeAt(i+c))return s}return e7e({start:i,end:i+o+1},s)}function _5t(t,e){for(let n=e;n<t.length;n++)if(Rre(t.charCodeAt(n))||n>0&&Rre(t.charCodeAt(n-1)))return n;return t.length}const mCi=ZVe(eW,y5t,f5t),pCi=ZVe(eW,y5t,m5t),Llt=new Aw(1e4);function Tlt(t,e,n=!1){if(typeof t!="string"||typeof e!="string")return null;let i=Llt.get(t);i||(i=new RegExp(qdi(t),"i"),Llt.set(t,i));const r=i.exec(e);return r?[{start:r.index,end:r.index+r[0].length}]:n?pCi(t,e):mCi(t,e)}function gCi(t,e){const n=X2(t,t.toLowerCase(),0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return n?Tq(n):null}function bCi(t,e,n,i,r,o){const s=Math.min(13,t.length);for(;n<s;n++){const a=X2(t,e,n,i,r,o,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(a)return a}return[0,o]}function Tq(t){if(typeof t>"u")return[];const e=[],n=t[1];for(let i=t.length-1;i>1;i--){const r=t[i]+n,o=e[e.length-1];o&&o.end===r?o.end=r+1:e.push({start:r,end:r+1})}return e}const qE=128;function t7e(){const t=[],e=[];for(let n=0;n<=qE;n++)e[n]=0;for(let n=0;n<=qE;n++)t.push(e.slice(0));return t}function x5t(t){const e=[];for(let n=0;n<=t;n++)e[n]=0;return e}const w5t=x5t(2*qE),qTe=x5t(2*qE),v1=t7e(),pL=t7e(),TQ=t7e();function IQ(t,e){if(e<0||e>=t.length)return!1;const n=t.codePointAt(e);switch(n){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!S8e(n)}}function Ilt(t,e){if(e<0||e>=t.length)return!1;switch(t.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function pte(t,e,n){return e[t]!==n[t]}function vCi(t,e,n,i,r,o,s=!1){for(;e<n&&r<o;)t[e]===i[r]&&(s&&(w5t[e]=r),e+=1),r+=1;return e===n}var N0;(function(t){t.Default=[-100,0];function e(n){return!n||n.length===2&&n[0]===-100&&n[1]===0}t.isDefault=e})(N0||(N0={}));const qWe=class qWe{constructor(e,n){this.firstMatchCanBeWeak=e,this.boostFullMatch=n}};qWe.default={boostFullMatch:!0,firstMatchCanBeWeak:!1};let tW=qWe;function X2(t,e,n,i,r,o,s=tW.default){const a=t.length>qE?qE:t.length,l=i.length>qE?qE:i.length;if(n>=a||o>=l||a-n>l-o||!vCi(e,n,a,r,o,l,!0))return;yCi(a,l,n,o,e,r);let c=1,u=1,d=n,h=o;const f=[!1];for(c=1,d=n;d<a;c++,d++){const _=w5t[d],w=qTe[d],C=d+1<a?qTe[d+1]:l;for(u=_-o+1,h=_;h<C;u++,h++){let N=Number.MIN_SAFE_INTEGER,E=!1;h<=w&&(N=_Ci(t,e,d,n,i,r,h,l,o,v1[c-1][u-1]===0,f));let D=0;N!==Number.MAX_SAFE_INTEGER&&(E=!0,D=N+pL[c-1][u-1]);const k=h>_,M=k?pL[c][u-1]+(v1[c][u-1]>0?-5:0):0,T=h>_+1&&v1[c][u-1]>0,A=T?pL[c][u-2]+(v1[c][u-2]>0?-5:0):0;if(T&&(!k||A>=M)&&(!E||A>=D))pL[c][u]=A,TQ[c][u]=3,v1[c][u]=0;else if(k&&(!E||M>=D))pL[c][u]=M,TQ[c][u]=2,v1[c][u]=0;else if(E)pL[c][u]=D,TQ[c][u]=1,v1[c][u]=v1[c-1][u-1]+1;else throw new Error("not possible")}}if(!f[0]&&!s.firstMatchCanBeWeak)return;c--,u--;const m=[pL[c][u],o];let p=0,g=0;for(;c>=1;){let _=u;do{const w=TQ[c][_];if(w===3)_=_-2;else if(w===2)_=_-1;else break}while(_>=1);p>1&&e[n+c-1]===r[o+u-1]&&!pte(_+o-1,i,r)&&p+1>v1[c][_]&&(_=u),_===u?p++:p=1,g||(g=_),c--,u=_-1,m.push(u)}l-o===a&&s.boostFullMatch&&(m[0]+=2);const y=g-a;return m[0]-=y,m}function yCi(t,e,n,i,r,o){let s=t-1,a=e-1;for(;s>=n&&a>=i;)r[s]===o[a]&&(qTe[s]=a,s--),a--}function _Ci(t,e,n,i,r,o,s,a,l,c,u){if(e[n]!==o[s])return Number.MIN_SAFE_INTEGER;let d=1,h=!1;return s===n-i?d=t[n]===r[s]?7:5:pte(s,r,o)&&(s===0||!pte(s-1,r,o))?(d=t[n]===r[s]?7:5,h=!0):IQ(o,s)&&(s===0||!IQ(o,s-1))?d=5:(IQ(o,s-1)||Ilt(o,s-1))&&(d=5,h=!0),d>1&&n===i&&(u[0]=!0),h||(h=pte(s,r,o)||IQ(o,s-1)||Ilt(o,s-1)),n===i?s>l&&(d-=h?3:5):c?d+=h?2:0:d+=h?0:1,s+1===a&&(d-=h?3:5),d}function xCi(t,e,n,i,r,o,s){return wCi(t,e,n,i,r,o,!0,s)}function wCi(t,e,n,i,r,o,s,a){let l=X2(t,e,n,i,r,o,a);if(l&&!s)return l;if(t.length>=3){const c=Math.min(7,t.length-1);for(let u=n+1;u<c;u++){const d=CCi(t,u);if(d){const h=X2(d,d.toLowerCase(),n,i,r,o,a);h&&(h[0]-=3,(!l||h[0]>l[0])&&(l=h))}}}return l}function CCi(t,e){if(e+1>=t.length)return;const n=t[e],i=t[e+1];if(n!==i)return t.slice(0,e)+i+n+t.slice(e+2)}const SCi="$(",n7e=new RegExp(`\\$\\(${ci.iconNameExpression}(?:${ci.iconModifierExpression})?\\)`,"g"),NCi=new RegExp(`(\\\\)?${n7e.source}`,"g");function ECi(t){return t.replace(NCi,(e,n)=>n?e:`\\${e}`)}const DCi=new RegExp(`\\\\${n7e.source}`,"g");function kCi(t){return t.replace(DCi,e=>`\\${e}`)}const MCi=new RegExp(`(\\s)?(\\\\)?${n7e.source}(\\s)?`,"g");function i7e(t){return t.indexOf(SCi)===-1?t:t.replace(MCi,(e,n,i,r)=>i?e:n||r||"")}function LCi(t){return t?t.replace(/\$\((.*?)\)/g,(e,n)=>` ${n} `).trim():""}const N1e=new RegExp(`\\$\\(${ci.iconNameCharacter}+\\)`,"g");function e9(t){N1e.lastIndex=0;let e="";const n=[];let i=0;for(;;){const r=N1e.lastIndex,o=N1e.exec(t),s=t.substring(r,o==null?void 0:o.index);if(s.length>0){e+=s;for(let a=0;a<s.length;a++)n.push(i)}if(!o)break;i+=o[0].length}return{text:e,iconOffsets:n}}function E1e(t,e,n=!1){const{text:i,iconOffsets:r}=e;if(!r||r.length===0)return Tlt(t,i,n);const o=mq(i," "),s=i.length-o.length,a=Tlt(t,o,n);if(a)for(const l of a){const c=r[l.start+s]+s;l.start+=c,l.end+=c}return a}class rd{constructor(e="",n=!1){if(this.value=e,typeof this.value!="string")throw Jg("value");typeof n=="boolean"?(this.isTrusted=n,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=n.isTrusted??void 0,this.supportThemeIcons=n.supportThemeIcons??!1,this.supportHtml=n.supportHtml??!1)}appendText(e,n=0){return this.value+=ICi(this.supportThemeIcons?ECi(e):e).replace(/([ \t]+)/g,(i,r)=>"&nbsp;".repeat(r.length)).replace(/\>/gm,"\\>").replace(/\n/g,n===1?`\\
`:`

`),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,n){return this.value+=`
${ACi(n,e)}
`,this}appendLink(e,n,i){return this.value+="[",this.value+=this._escape(n,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,n){const i=new RegExp(Hp(n),"g");return e.replace(i,(r,o)=>e.charAt(o-1)!=="\\"?`\\${r}`:r)}}function p5(t){return E0(t)?!t.value:Array.isArray(t)?t.every(p5):!0}function E0(t){return t instanceof rd?!0:t&&typeof t=="object"?typeof t.value=="string"&&(typeof t.isTrusted=="boolean"||typeof t.isTrusted=="object"||t.isTrusted===void 0)&&(typeof t.supportThemeIcons=="boolean"||t.supportThemeIcons===void 0):!1}function TCi(t,e){return t===e?!0:!t||!e?!1:t.value===e.value&&t.isTrusted===e.isTrusted&&t.supportThemeIcons===e.supportThemeIcons&&t.supportHtml===e.supportHtml&&(t.baseUri===e.baseUri||!!t.baseUri&&!!e.baseUri&&IVe(ri.from(t.baseUri),ri.from(e.baseUri)))}function ICi(t){return t.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}function ACi(t,e){var r;const n=((r=t.match(/^`+/gm))==null?void 0:r.reduce((o,s)=>o.length>s.length?o:s).length)??0,i=n>=3?n+1:3;return[`${"`".repeat(i)}${e}`,t,`${"`".repeat(i)}`].join(`
`)}function AQ(t){return t.replace(/"/g,"&quot;")}function D1e(t){return t&&t.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}function RCi(t){const e=[],n=t.split("|").map(r=>r.trim());t=n[0];const i=n[1];if(i){const r=/height=(\d+)/.exec(i),o=/width=(\d+)/.exec(i),s=r?r[1]:"",a=o?o[1]:"",l=isFinite(parseInt(a)),c=isFinite(parseInt(s));l&&e.push(`width="${a}"`),c&&e.push(`height="${s}"`)}return{href:t,dimensions:e}}class r7e{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const GTe=new r7e("id#");let Gh={};(function(){function t(e,n){n(Gh)}t.amd=!0,function(e,n){typeof t=="function"&&t.amd?t(["exports"],n):typeof exports=="object"&&typeof module<"u"?n(exports):(e=typeof globalThis<"u"?globalThis:e||self,n(e.marked={}))}(this,function(e){function n(ge,he){for(var me=0;me<he.length;me++){var X=he[me];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(ge,X.key,X)}}function i(ge,he,me){return me&&n(ge,me),Object.defineProperty(ge,"prototype",{writable:!1}),ge}function r(ge,he){if(ge){if(typeof ge=="string")return o(ge,he);var me=Object.prototype.toString.call(ge).slice(8,-1);if(me==="Object"&&ge.constructor&&(me=ge.constructor.name),me==="Map"||me==="Set")return Array.from(ge);if(me==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(me))return o(ge,he)}}function o(ge,he){(he==null||he>ge.length)&&(he=ge.length);for(var me=0,X=new Array(he);me<he;me++)X[me]=ge[me];return X}function s(ge,he){var me=typeof Symbol<"u"&&ge[Symbol.iterator]||ge["@@iterator"];if(me)return(me=me.call(ge)).next.bind(me);if(Array.isArray(ge)||(me=r(ge))||he){me&&(ge=me);var X=0;return function(){return X>=ge.length?{done:!0}:{done:!1,value:ge[X++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.defaults=a();function l(ge){e.defaults=ge}var c=/[&<>"']/,u=/[&<>"']/g,d=/[<>"']|&(?!#?\w+;)/,h=/[<>"']|&(?!#?\w+;)/g,f={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},m=function(he){return f[he]};function p(ge,he){if(he){if(c.test(ge))return ge.replace(u,m)}else if(d.test(ge))return ge.replace(h,m);return ge}var g=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function y(ge){return ge.replace(g,function(he,me){return me=me.toLowerCase(),me==="colon"?":":me.charAt(0)==="#"?me.charAt(1)==="x"?String.fromCharCode(parseInt(me.substring(2),16)):String.fromCharCode(+me.substring(1)):""})}var _=/(^|[^\[])\^/g;function w(ge,he){ge=typeof ge=="string"?ge:ge.source,he=he||"";var me={replace:function(re,we){return we=we.source||we,we=we.replace(_,"$1"),ge=ge.replace(re,we),me},getRegex:function(){return new RegExp(ge,he)}};return me}var C=/[^\w:]/g,N=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function E(ge,he,me){if(ge){var X;try{X=decodeURIComponent(y(me)).replace(C,"").toLowerCase()}catch{return null}if(X.indexOf("javascript:")===0||X.indexOf("vbscript:")===0||X.indexOf("data:")===0)return null}he&&!N.test(me)&&(me=A(he,me));try{me=encodeURI(me).replace(/%25/g,"%")}catch{return null}return me}var D={},k=/^[^:]+:\/*[^/]*$/,M=/^([^:]+:)[\s\S]*$/,T=/^([^:]+:\/*[^/]*)[\s\S]*$/;function A(ge,he){D[" "+ge]||(k.test(ge)?D[" "+ge]=ge+"/":D[" "+ge]=V(ge,"/",!0)),ge=D[" "+ge];var me=ge.indexOf(":")===-1;return he.substring(0,2)==="//"?me?he:ge.replace(M,"$1")+he:he.charAt(0)==="/"?me?he:ge.replace(T,"$1")+he:ge+he}var R={exec:function(){}};function P(ge){for(var he=1,me,X;he<arguments.length;he++){me=arguments[he];for(X in me)Object.prototype.hasOwnProperty.call(me,X)&&(ge[X]=me[X])}return ge}function O(ge,he){var me=ge.replace(/\|/g,function(we,ue,Ce){for(var ze=!1,Ye=ue;--Ye>=0&&Ce[Ye]==="\\";)ze=!ze;return ze?"|":" |"}),X=me.split(/ \|/),re=0;if(X[0].trim()||X.shift(),X.length>0&&!X[X.length-1].trim()&&X.pop(),X.length>he)X.splice(he);else for(;X.length<he;)X.push("");for(;re<X.length;re++)X[re]=X[re].trim().replace(/\\\|/g,"|");return X}function V(ge,he,me){var X=ge.length;if(X===0)return"";for(var re=0;re<X;){var we=ge.charAt(X-re-1);if(we===he&&!me)re++;else if(we!==he&&me)re++;else break}return ge.slice(0,X-re)}function F(ge,he){if(ge.indexOf(he[1])===-1)return-1;for(var me=ge.length,X=0,re=0;re<me;re++)if(ge[re]==="\\")re++;else if(ge[re]===he[0])X++;else if(ge[re]===he[1]&&(X--,X<0))return re;return-1}function $(ge){ge&&ge.sanitize&&!ge.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function B(ge,he){if(he<1)return"";for(var me="";he>1;)he&1&&(me+=ge),he>>=1,ge+=ge;return me+ge}function z(ge,he,me,X){var re=he.href,we=he.title?p(he.title):null,ue=ge[1].replace(/\\([\[\]])/g,"$1");if(ge[0].charAt(0)!=="!"){X.state.inLink=!0;var Ce={type:"link",raw:me,href:re,title:we,text:ue,tokens:X.inlineTokens(ue)};return X.state.inLink=!1,Ce}return{type:"image",raw:me,href:re,title:we,text:p(ue)}}function H(ge,he){var me=ge.match(/^(\s+)(?:```)/);if(me===null)return he;var X=me[1];return he.split(`
`).map(function(re){var we=re.match(/^\s+/);if(we===null)return re;var ue=we[0];return ue.length>=X.length?re.slice(X.length):re}).join(`
`)}var K=function(){function ge(me){this.options=me||e.defaults}var he=ge.prototype;return he.space=function(X){var re=this.rules.block.newline.exec(X);if(re&&re[0].length>0)return{type:"space",raw:re[0]}},he.code=function(X){var re=this.rules.block.code.exec(X);if(re){var we=re[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:re[0],codeBlockStyle:"indented",text:this.options.pedantic?we:V(we,`
`)}}},he.fences=function(X){var re=this.rules.block.fences.exec(X);if(re){var we=re[0],ue=H(we,re[3]||"");return{type:"code",raw:we,lang:re[2]?re[2].trim():re[2],text:ue}}},he.heading=function(X){var re=this.rules.block.heading.exec(X);if(re){var we=re[2].trim();if(/#$/.test(we)){var ue=V(we,"#");(this.options.pedantic||!ue||/ $/.test(ue))&&(we=ue.trim())}return{type:"heading",raw:re[0],depth:re[1].length,text:we,tokens:this.lexer.inline(we)}}},he.hr=function(X){var re=this.rules.block.hr.exec(X);if(re)return{type:"hr",raw:re[0]}},he.blockquote=function(X){var re=this.rules.block.blockquote.exec(X);if(re){var we=re[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:re[0],tokens:this.lexer.blockTokens(we,[]),text:we}}},he.list=function(X){var re=this.rules.block.list.exec(X);if(re){var we,ue,Ce,ze,Ye,Ke,Xe,it,ut,Ge,Ee,Se,je=re[1].trim(),nt=je.length>1,rt={type:"list",raw:"",ordered:nt,start:nt?+je.slice(0,-1):"",loose:!1,items:[]};je=nt?"\\d{1,9}\\"+je.slice(-1):"\\"+je,this.options.pedantic&&(je=nt?je:"[*+-]");for(var St=new RegExp("^( {0,3}"+je+")((?:[	 ][^\\n]*)?(?:\\n|$))");X&&(Se=!1,!(!(re=St.exec(X))||this.rules.block.hr.test(X)));){if(we=re[0],X=X.substring(we.length),it=re[2].split(`
`,1)[0],ut=X.split(`
`,1)[0],this.options.pedantic?(ze=2,Ee=it.trimLeft()):(ze=re[2].search(/[^ ]/),ze=ze>4?1:ze,Ee=it.slice(ze),ze+=re[1].length),Ke=!1,!it&&/^ *$/.test(ut)&&(we+=ut+`
`,X=X.substring(ut.length+1),Se=!0),!Se)for(var At=new RegExp("^ {0,"+Math.min(3,ze-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),Nt=new RegExp("^ {0,"+Math.min(3,ze-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),vt=new RegExp("^ {0,"+Math.min(3,ze-1)+"}(?:```|~~~)"),$t=new RegExp("^ {0,"+Math.min(3,ze-1)+"}#");X&&(Ge=X.split(`
`,1)[0],it=Ge,this.options.pedantic&&(it=it.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),!(vt.test(it)||$t.test(it)||At.test(it)||Nt.test(X)));){if(it.search(/[^ ]/)>=ze||!it.trim())Ee+=`
`+it.slice(ze);else if(!Ke)Ee+=`
`+it;else break;!Ke&&!it.trim()&&(Ke=!0),we+=Ge+`
`,X=X.substring(Ge.length+1)}rt.loose||(Xe?rt.loose=!0:/\n *\n *$/.test(we)&&(Xe=!0)),this.options.gfm&&(ue=/^\[[ xX]\] /.exec(Ee),ue&&(Ce=ue[0]!=="[ ] ",Ee=Ee.replace(/^\[[ xX]\] +/,""))),rt.items.push({type:"list_item",raw:we,task:!!ue,checked:Ce,loose:!1,text:Ee}),rt.raw+=we}rt.items[rt.items.length-1].raw=we.trimRight(),rt.items[rt.items.length-1].text=Ee.trimRight(),rt.raw=rt.raw.trimRight();var ln=rt.items.length;for(Ye=0;Ye<ln;Ye++){this.lexer.state.top=!1,rt.items[Ye].tokens=this.lexer.blockTokens(rt.items[Ye].text,[]);var Jt=rt.items[Ye].tokens.filter(function(Ft){return Ft.type==="space"}),en=Jt.every(function(Ft){for(var dn=Ft.raw.split(""),Ze=0,dt=s(dn),at;!(at=dt()).done;){var mt=at.value;if(mt===`
`&&(Ze+=1),Ze>1)return!0}return!1});!rt.loose&&Jt.length&&en&&(rt.loose=!0,rt.items[Ye].loose=!0)}return rt}},he.html=function(X){var re=this.rules.block.html.exec(X);if(re){var we={type:"html",raw:re[0],pre:!this.options.sanitizer&&(re[1]==="pre"||re[1]==="script"||re[1]==="style"),text:re[0]};if(this.options.sanitize){var ue=this.options.sanitizer?this.options.sanitizer(re[0]):p(re[0]);we.type="paragraph",we.text=ue,we.tokens=this.lexer.inline(ue)}return we}},he.def=function(X){var re=this.rules.block.def.exec(X);if(re){re[3]&&(re[3]=re[3].substring(1,re[3].length-1));var we=re[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:we,raw:re[0],href:re[2],title:re[3]}}},he.table=function(X){var re=this.rules.block.table.exec(X);if(re){var we={type:"table",header:O(re[1]).map(function(Xe){return{text:Xe}}),align:re[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:re[3]&&re[3].trim()?re[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(we.header.length===we.align.length){we.raw=re[0];var ue=we.align.length,Ce,ze,Ye,Ke;for(Ce=0;Ce<ue;Ce++)/^ *-+: *$/.test(we.align[Ce])?we.align[Ce]="right":/^ *:-+: *$/.test(we.align[Ce])?we.align[Ce]="center":/^ *:-+ *$/.test(we.align[Ce])?we.align[Ce]="left":we.align[Ce]=null;for(ue=we.rows.length,Ce=0;Ce<ue;Ce++)we.rows[Ce]=O(we.rows[Ce],we.header.length).map(function(Xe){return{text:Xe}});for(ue=we.header.length,ze=0;ze<ue;ze++)we.header[ze].tokens=this.lexer.inline(we.header[ze].text);for(ue=we.rows.length,ze=0;ze<ue;ze++)for(Ke=we.rows[ze],Ye=0;Ye<Ke.length;Ye++)Ke[Ye].tokens=this.lexer.inline(Ke[Ye].text);return we}}},he.lheading=function(X){var re=this.rules.block.lheading.exec(X);if(re)return{type:"heading",raw:re[0],depth:re[2].charAt(0)==="="?1:2,text:re[1],tokens:this.lexer.inline(re[1])}},he.paragraph=function(X){var re=this.rules.block.paragraph.exec(X);if(re){var we=re[1].charAt(re[1].length-1)===`
`?re[1].slice(0,-1):re[1];return{type:"paragraph",raw:re[0],text:we,tokens:this.lexer.inline(we)}}},he.text=function(X){var re=this.rules.block.text.exec(X);if(re)return{type:"text",raw:re[0],text:re[0],tokens:this.lexer.inline(re[0])}},he.escape=function(X){var re=this.rules.inline.escape.exec(X);if(re)return{type:"escape",raw:re[0],text:p(re[1])}},he.tag=function(X){var re=this.rules.inline.tag.exec(X);if(re)return!this.lexer.state.inLink&&/^<a /i.test(re[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(re[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(re[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(re[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:re[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(re[0]):p(re[0]):re[0]}},he.link=function(X){var re=this.rules.inline.link.exec(X);if(re){var we=re[2].trim();if(!this.options.pedantic&&/^</.test(we)){if(!/>$/.test(we))return;var ue=V(we.slice(0,-1),"\\");if((we.length-ue.length)%2===0)return}else{var Ce=F(re[2],"()");if(Ce>-1){var ze=re[0].indexOf("!")===0?5:4,Ye=ze+re[1].length+Ce;re[2]=re[2].substring(0,Ce),re[0]=re[0].substring(0,Ye).trim(),re[3]=""}}var Ke=re[2],Xe="";if(this.options.pedantic){var it=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ke);it&&(Ke=it[1],Xe=it[3])}else Xe=re[3]?re[3].slice(1,-1):"";return Ke=Ke.trim(),/^</.test(Ke)&&(this.options.pedantic&&!/>$/.test(we)?Ke=Ke.slice(1):Ke=Ke.slice(1,-1)),z(re,{href:Ke&&Ke.replace(this.rules.inline._escapes,"$1"),title:Xe&&Xe.replace(this.rules.inline._escapes,"$1")},re[0],this.lexer)}},he.reflink=function(X,re){var we;if((we=this.rules.inline.reflink.exec(X))||(we=this.rules.inline.nolink.exec(X))){var ue=(we[2]||we[1]).replace(/\s+/g," ");if(ue=re[ue.toLowerCase()],!ue||!ue.href){var Ce=we[0].charAt(0);return{type:"text",raw:Ce,text:Ce}}return z(we,ue,we[0],this.lexer)}},he.emStrong=function(X,re,we){we===void 0&&(we="");var ue=this.rules.inline.emStrong.lDelim.exec(X);if(ue&&!(ue[3]&&we.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var Ce=ue[1]||ue[2]||"";if(!Ce||Ce&&(we===""||this.rules.inline.punctuation.exec(we))){var ze=ue[0].length-1,Ye,Ke,Xe=ze,it=0,ut=ue[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(ut.lastIndex=0,re=re.slice(-1*X.length+ze);(ue=ut.exec(re))!=null;)if(Ye=ue[1]||ue[2]||ue[3]||ue[4]||ue[5]||ue[6],!!Ye){if(Ke=Ye.length,ue[3]||ue[4]){Xe+=Ke;continue}else if((ue[5]||ue[6])&&ze%3&&!((ze+Ke)%3)){it+=Ke;continue}if(Xe-=Ke,!(Xe>0)){if(Ke=Math.min(Ke,Ke+Xe+it),Math.min(ze,Ke)%2){var Ge=X.slice(1,ze+ue.index+Ke);return{type:"em",raw:X.slice(0,ze+ue.index+Ke+1),text:Ge,tokens:this.lexer.inlineTokens(Ge)}}var Ee=X.slice(2,ze+ue.index+Ke-1);return{type:"strong",raw:X.slice(0,ze+ue.index+Ke+1),text:Ee,tokens:this.lexer.inlineTokens(Ee)}}}}}},he.codespan=function(X){var re=this.rules.inline.code.exec(X);if(re){var we=re[2].replace(/\n/g," "),ue=/[^ ]/.test(we),Ce=/^ /.test(we)&&/ $/.test(we);return ue&&Ce&&(we=we.substring(1,we.length-1)),we=p(we,!0),{type:"codespan",raw:re[0],text:we}}},he.br=function(X){var re=this.rules.inline.br.exec(X);if(re)return{type:"br",raw:re[0]}},he.del=function(X){var re=this.rules.inline.del.exec(X);if(re)return{type:"del",raw:re[0],text:re[2],tokens:this.lexer.inlineTokens(re[2])}},he.autolink=function(X,re){var we=this.rules.inline.autolink.exec(X);if(we){var ue,Ce;return we[2]==="@"?(ue=p(this.options.mangle?re(we[1]):we[1]),Ce="mailto:"+ue):(ue=p(we[1]),Ce=ue),{type:"link",raw:we[0],text:ue,href:Ce,tokens:[{type:"text",raw:ue,text:ue}]}}},he.url=function(X,re){var we;if(we=this.rules.inline.url.exec(X)){var ue,Ce;if(we[2]==="@")ue=p(this.options.mangle?re(we[0]):we[0]),Ce="mailto:"+ue;else{var ze;do ze=we[0],we[0]=this.rules.inline._backpedal.exec(we[0])[0];while(ze!==we[0]);ue=p(we[0]),we[1]==="www."?Ce="http://"+ue:Ce=ue}return{type:"link",raw:we[0],text:ue,href:Ce,tokens:[{type:"text",raw:ue,text:ue}]}}},he.inlineText=function(X,re){var we=this.rules.inline.text.exec(X);if(we){var ue;return this.lexer.state.inRawBlock?ue=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(we[0]):p(we[0]):we[0]:ue=p(this.options.smartypants?re(we[0]):we[0]),{type:"text",raw:we[0],text:ue}}},ge}(),q={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:R,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};q._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,q._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,q.def=w(q.def).replace("label",q._label).replace("title",q._title).getRegex(),q.bullet=/(?:[*+-]|\d{1,9}[.)])/,q.listItemStart=w(/^( *)(bull) */).replace("bull",q.bullet).getRegex(),q.list=w(q.list).replace(/bull/g,q.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+q.def.source+")").getRegex(),q._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",q._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,q.html=w(q.html,"i").replace("comment",q._comment).replace("tag",q._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),q.paragraph=w(q._paragraph).replace("hr",q.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q._tag).getRegex(),q.blockquote=w(q.blockquote).replace("paragraph",q.paragraph).getRegex(),q.normal=P({},q),q.gfm=P({},q.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),q.gfm.table=w(q.gfm.table).replace("hr",q.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q._tag).getRegex(),q.gfm.paragraph=w(q._paragraph).replace("hr",q.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",q.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q._tag).getRegex(),q.pedantic=P({},q.normal,{html:w(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",q._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:R,paragraph:w(q.normal._paragraph).replace("hr",q.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",q.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var U={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:R,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:R,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};U._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",U.punctuation=w(U.punctuation).replace(/punctuation/g,U._punctuation).getRegex(),U.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,U.escapedEmSt=/\\\*|\\_/g,U._comment=w(q._comment).replace("(?:-->|$)","-->").getRegex(),U.emStrong.lDelim=w(U.emStrong.lDelim).replace(/punct/g,U._punctuation).getRegex(),U.emStrong.rDelimAst=w(U.emStrong.rDelimAst,"g").replace(/punct/g,U._punctuation).getRegex(),U.emStrong.rDelimUnd=w(U.emStrong.rDelimUnd,"g").replace(/punct/g,U._punctuation).getRegex(),U._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,U._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,U._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,U.autolink=w(U.autolink).replace("scheme",U._scheme).replace("email",U._email).getRegex(),U._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,U.tag=w(U.tag).replace("comment",U._comment).replace("attribute",U._attribute).getRegex(),U._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,U._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,U._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,U.link=w(U.link).replace("label",U._label).replace("href",U._href).replace("title",U._title).getRegex(),U.reflink=w(U.reflink).replace("label",U._label).replace("ref",q._label).getRegex(),U.nolink=w(U.nolink).replace("ref",q._label).getRegex(),U.reflinkSearch=w(U.reflinkSearch,"g").replace("reflink",U.reflink).replace("nolink",U.nolink).getRegex(),U.normal=P({},U),U.pedantic=P({},U.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:w(/^!?\[(label)\]\((.*?)\)/).replace("label",U._label).getRegex(),reflink:w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",U._label).getRegex()}),U.gfm=P({},U.normal,{escape:w(U.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),U.gfm.url=w(U.gfm.url,"i").replace("email",U.gfm._extended_email).getRegex(),U.breaks=P({},U.gfm,{br:w(U.br).replace("{2,}","*").getRegex(),text:w(U.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function Y(ge){return ge.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function J(ge){var he="",me,X,re=ge.length;for(me=0;me<re;me++)X=ge.charCodeAt(me),Math.random()>.5&&(X="x"+X.toString(16)),he+="&#"+X+";";return he}var ae=function(){function ge(me){this.tokens=[],this.tokens.links=Object.create(null),this.options=me||e.defaults,this.options.tokenizer=this.options.tokenizer||new K,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var X={block:q.normal,inline:U.normal};this.options.pedantic?(X.block=q.pedantic,X.inline=U.pedantic):this.options.gfm&&(X.block=q.gfm,this.options.breaks?X.inline=U.breaks:X.inline=U.gfm),this.tokenizer.rules=X}ge.lex=function(X,re){var we=new ge(re);return we.lex(X)},ge.lexInline=function(X,re){var we=new ge(re);return we.inlineTokens(X)};var he=ge.prototype;return he.lex=function(X){X=X.replace(/\r\n|\r/g,`
`),this.blockTokens(X,this.tokens);for(var re;re=this.inlineQueue.shift();)this.inlineTokens(re.src,re.tokens);return this.tokens},he.blockTokens=function(X,re){var we=this;re===void 0&&(re=[]),this.options.pedantic?X=X.replace(/\t/g,"    ").replace(/^ +$/gm,""):X=X.replace(/^( *)(\t+)/gm,function(Xe,it,ut){return it+"    ".repeat(ut.length)});for(var ue,Ce,ze,Ye;X;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(Xe){return(ue=Xe.call({lexer:we},X,re))?(X=X.substring(ue.raw.length),re.push(ue),!0):!1}))){if(ue=this.tokenizer.space(X)){X=X.substring(ue.raw.length),ue.raw.length===1&&re.length>0?re[re.length-1].raw+=`
`:re.push(ue);continue}if(ue=this.tokenizer.code(X)){X=X.substring(ue.raw.length),Ce=re[re.length-1],Ce&&(Ce.type==="paragraph"||Ce.type==="text")?(Ce.raw+=`
`+ue.raw,Ce.text+=`
`+ue.text,this.inlineQueue[this.inlineQueue.length-1].src=Ce.text):re.push(ue);continue}if(ue=this.tokenizer.fences(X)){X=X.substring(ue.raw.length),re.push(ue);continue}if(ue=this.tokenizer.heading(X)){X=X.substring(ue.raw.length),re.push(ue);continue}if(ue=this.tokenizer.hr(X)){X=X.substring(ue.raw.length),re.push(ue);continue}if(ue=this.tokenizer.blockquote(X)){X=X.substring(ue.raw.length),re.push(ue);continue}if(ue=this.tokenizer.list(X)){X=X.substring(ue.raw.length),re.push(ue);continue}if(ue=this.tokenizer.html(X)){X=X.substring(ue.raw.length),re.push(ue);continue}if(ue=this.tokenizer.def(X)){X=X.substring(ue.raw.length),Ce=re[re.length-1],Ce&&(Ce.type==="paragraph"||Ce.type==="text")?(Ce.raw+=`
`+ue.raw,Ce.text+=`
`+ue.raw,this.inlineQueue[this.inlineQueue.length-1].src=Ce.text):this.tokens.links[ue.tag]||(this.tokens.links[ue.tag]={href:ue.href,title:ue.title});continue}if(ue=this.tokenizer.table(X)){X=X.substring(ue.raw.length),re.push(ue);continue}if(ue=this.tokenizer.lheading(X)){X=X.substring(ue.raw.length),re.push(ue);continue}if(ze=X,this.options.extensions&&this.options.extensions.startBlock&&function(){var Xe=1/0,it=X.slice(1),ut=void 0;we.options.extensions.startBlock.forEach(function(Ge){ut=Ge.call({lexer:this},it),typeof ut=="number"&&ut>=0&&(Xe=Math.min(Xe,ut))}),Xe<1/0&&Xe>=0&&(ze=X.substring(0,Xe+1))}(),this.state.top&&(ue=this.tokenizer.paragraph(ze))){Ce=re[re.length-1],Ye&&Ce.type==="paragraph"?(Ce.raw+=`
`+ue.raw,Ce.text+=`
`+ue.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=Ce.text):re.push(ue),Ye=ze.length!==X.length,X=X.substring(ue.raw.length);continue}if(ue=this.tokenizer.text(X)){X=X.substring(ue.raw.length),Ce=re[re.length-1],Ce&&Ce.type==="text"?(Ce.raw+=`
`+ue.raw,Ce.text+=`
`+ue.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=Ce.text):re.push(ue);continue}if(X){var Ke="Infinite loop on byte: "+X.charCodeAt(0);if(this.options.silent){console.error(Ke);break}else throw new Error(Ke)}}return this.state.top=!0,re},he.inline=function(X,re){return re===void 0&&(re=[]),this.inlineQueue.push({src:X,tokens:re}),re},he.inlineTokens=function(X,re){var we=this;re===void 0&&(re=[]);var ue,Ce,ze,Ye=X,Ke,Xe,it;if(this.tokens.links){var ut=Object.keys(this.tokens.links);if(ut.length>0)for(;(Ke=this.tokenizer.rules.inline.reflinkSearch.exec(Ye))!=null;)ut.includes(Ke[0].slice(Ke[0].lastIndexOf("[")+1,-1))&&(Ye=Ye.slice(0,Ke.index)+"["+B("a",Ke[0].length-2)+"]"+Ye.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ke=this.tokenizer.rules.inline.blockSkip.exec(Ye))!=null;)Ye=Ye.slice(0,Ke.index)+"["+B("a",Ke[0].length-2)+"]"+Ye.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Ke=this.tokenizer.rules.inline.escapedEmSt.exec(Ye))!=null;)Ye=Ye.slice(0,Ke.index)+"++"+Ye.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;X;)if(Xe||(it=""),Xe=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(Ee){return(ue=Ee.call({lexer:we},X,re))?(X=X.substring(ue.raw.length),re.push(ue),!0):!1}))){if(ue=this.tokenizer.escape(X)){X=X.substring(ue.raw.length),re.push(ue);continue}if(ue=this.tokenizer.tag(X)){X=X.substring(ue.raw.length),Ce=re[re.length-1],Ce&&ue.type==="text"&&Ce.type==="text"?(Ce.raw+=ue.raw,Ce.text+=ue.text):re.push(ue);continue}if(ue=this.tokenizer.link(X)){X=X.substring(ue.raw.length),re.push(ue);continue}if(ue=this.tokenizer.reflink(X,this.tokens.links)){X=X.substring(ue.raw.length),Ce=re[re.length-1],Ce&&ue.type==="text"&&Ce.type==="text"?(Ce.raw+=ue.raw,Ce.text+=ue.text):re.push(ue);continue}if(ue=this.tokenizer.emStrong(X,Ye,it)){X=X.substring(ue.raw.length),re.push(ue);continue}if(ue=this.tokenizer.codespan(X)){X=X.substring(ue.raw.length),re.push(ue);continue}if(ue=this.tokenizer.br(X)){X=X.substring(ue.raw.length),re.push(ue);continue}if(ue=this.tokenizer.del(X)){X=X.substring(ue.raw.length),re.push(ue);continue}if(ue=this.tokenizer.autolink(X,J)){X=X.substring(ue.raw.length),re.push(ue);continue}if(!this.state.inLink&&(ue=this.tokenizer.url(X,J))){X=X.substring(ue.raw.length),re.push(ue);continue}if(ze=X,this.options.extensions&&this.options.extensions.startInline&&function(){var Ee=1/0,Se=X.slice(1),je=void 0;we.options.extensions.startInline.forEach(function(nt){je=nt.call({lexer:this},Se),typeof je=="number"&&je>=0&&(Ee=Math.min(Ee,je))}),Ee<1/0&&Ee>=0&&(ze=X.substring(0,Ee+1))}(),ue=this.tokenizer.inlineText(ze,Y)){X=X.substring(ue.raw.length),ue.raw.slice(-1)!=="_"&&(it=ue.raw.slice(-1)),Xe=!0,Ce=re[re.length-1],Ce&&Ce.type==="text"?(Ce.raw+=ue.raw,Ce.text+=ue.text):re.push(ue);continue}if(X){var Ge="Infinite loop on byte: "+X.charCodeAt(0);if(this.options.silent){console.error(Ge);break}else throw new Error(Ge)}}return re},i(ge,null,[{key:"rules",get:function(){return{block:q,inline:U}}}]),ge}(),se=function(){function ge(me){this.options=me||e.defaults}var he=ge.prototype;return he.code=function(X,re,we){var ue=(re||"").match(/\S*/)[0];if(this.options.highlight){var Ce=this.options.highlight(X,ue);Ce!=null&&Ce!==X&&(we=!0,X=Ce)}return X=X.replace(/\n$/,"")+`
`,ue?'<pre><code class="'+this.options.langPrefix+p(ue,!0)+'">'+(we?X:p(X,!0))+`</code></pre>
`:"<pre><code>"+(we?X:p(X,!0))+`</code></pre>
`},he.blockquote=function(X){return`<blockquote>
`+X+`</blockquote>
`},he.html=function(X){return X},he.heading=function(X,re,we,ue){if(this.options.headerIds){var Ce=this.options.headerPrefix+ue.slug(we);return"<h"+re+' id="'+Ce+'">'+X+"</h"+re+`>
`}return"<h"+re+">"+X+"</h"+re+`>
`},he.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},he.list=function(X,re,we){var ue=re?"ol":"ul",Ce=re&&we!==1?' start="'+we+'"':"";return"<"+ue+Ce+`>
`+X+"</"+ue+`>
`},he.listitem=function(X){return"<li>"+X+`</li>
`},he.checkbox=function(X){return"<input "+(X?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},he.paragraph=function(X){return"<p>"+X+`</p>
`},he.table=function(X,re){return re&&(re="<tbody>"+re+"</tbody>"),`<table>
<thead>
`+X+`</thead>
`+re+`</table>
`},he.tablerow=function(X){return`<tr>
`+X+`</tr>
`},he.tablecell=function(X,re){var we=re.header?"th":"td",ue=re.align?"<"+we+' align="'+re.align+'">':"<"+we+">";return ue+X+("</"+we+`>
`)},he.strong=function(X){return"<strong>"+X+"</strong>"},he.em=function(X){return"<em>"+X+"</em>"},he.codespan=function(X){return"<code>"+X+"</code>"},he.br=function(){return this.options.xhtml?"<br/>":"<br>"},he.del=function(X){return"<del>"+X+"</del>"},he.link=function(X,re,we){if(X=E(this.options.sanitize,this.options.baseUrl,X),X===null)return we;var ue='<a href="'+p(X)+'"';return re&&(ue+=' title="'+re+'"'),ue+=">"+we+"</a>",ue},he.image=function(X,re,we){if(X=E(this.options.sanitize,this.options.baseUrl,X),X===null)return we;var ue='<img src="'+X+'" alt="'+we+'"';return re&&(ue+=' title="'+re+'"'),ue+=this.options.xhtml?"/>":">",ue},he.text=function(X){return X},ge}(),oe=function(){function ge(){}var he=ge.prototype;return he.strong=function(X){return X},he.em=function(X){return X},he.codespan=function(X){return X},he.del=function(X){return X},he.html=function(X){return X},he.text=function(X){return X},he.link=function(X,re,we){return""+we},he.image=function(X,re,we){return""+we},he.br=function(){return""},ge}(),fe=function(){function ge(){this.seen={}}var he=ge.prototype;return he.serialize=function(X){return X.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},he.getNextSafeSlug=function(X,re){var we=X,ue=0;if(this.seen.hasOwnProperty(we)){ue=this.seen[X];do ue++,we=X+"-"+ue;while(this.seen.hasOwnProperty(we))}return re||(this.seen[X]=ue,this.seen[we]=0),we},he.slug=function(X,re){re===void 0&&(re={});var we=this.serialize(X);return this.getNextSafeSlug(we,re.dryrun)},ge}(),de=function(){function ge(me){this.options=me||e.defaults,this.options.renderer=this.options.renderer||new se,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new oe,this.slugger=new fe}ge.parse=function(X,re){var we=new ge(re);return we.parse(X)},ge.parseInline=function(X,re){var we=new ge(re);return we.parseInline(X)};var he=ge.prototype;return he.parse=function(X,re){re===void 0&&(re=!0);var we="",ue,Ce,ze,Ye,Ke,Xe,it,ut,Ge,Ee,Se,je,nt,rt,St,At,Nt,vt,$t,ln=X.length;for(ue=0;ue<ln;ue++){if(Ee=X[ue],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[Ee.type]&&($t=this.options.extensions.renderers[Ee.type].call({parser:this},Ee),$t!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(Ee.type))){we+=$t||"";continue}switch(Ee.type){case"space":continue;case"hr":{we+=this.renderer.hr();continue}case"heading":{we+=this.renderer.heading(this.parseInline(Ee.tokens),Ee.depth,y(this.parseInline(Ee.tokens,this.textRenderer)),this.slugger);continue}case"code":{we+=this.renderer.code(Ee.text,Ee.lang,Ee.escaped);continue}case"table":{for(ut="",it="",Ye=Ee.header.length,Ce=0;Ce<Ye;Ce++)it+=this.renderer.tablecell(this.parseInline(Ee.header[Ce].tokens),{header:!0,align:Ee.align[Ce]});for(ut+=this.renderer.tablerow(it),Ge="",Ye=Ee.rows.length,Ce=0;Ce<Ye;Ce++){for(Xe=Ee.rows[Ce],it="",Ke=Xe.length,ze=0;ze<Ke;ze++)it+=this.renderer.tablecell(this.parseInline(Xe[ze].tokens),{header:!1,align:Ee.align[ze]});Ge+=this.renderer.tablerow(it)}we+=this.renderer.table(ut,Ge);continue}case"blockquote":{Ge=this.parse(Ee.tokens),we+=this.renderer.blockquote(Ge);continue}case"list":{for(Se=Ee.ordered,je=Ee.start,nt=Ee.loose,Ye=Ee.items.length,Ge="",Ce=0;Ce<Ye;Ce++)St=Ee.items[Ce],At=St.checked,Nt=St.task,rt="",St.task&&(vt=this.renderer.checkbox(At),nt?St.tokens.length>0&&St.tokens[0].type==="paragraph"?(St.tokens[0].text=vt+" "+St.tokens[0].text,St.tokens[0].tokens&&St.tokens[0].tokens.length>0&&St.tokens[0].tokens[0].type==="text"&&(St.tokens[0].tokens[0].text=vt+" "+St.tokens[0].tokens[0].text)):St.tokens.unshift({type:"text",text:vt}):rt+=vt),rt+=this.parse(St.tokens,nt),Ge+=this.renderer.listitem(rt,Nt,At);we+=this.renderer.list(Ge,Se,je);continue}case"html":{we+=this.renderer.html(Ee.text);continue}case"paragraph":{we+=this.renderer.paragraph(this.parseInline(Ee.tokens));continue}case"text":{for(Ge=Ee.tokens?this.parseInline(Ee.tokens):Ee.text;ue+1<ln&&X[ue+1].type==="text";)Ee=X[++ue],Ge+=`
`+(Ee.tokens?this.parseInline(Ee.tokens):Ee.text);we+=re?this.renderer.paragraph(Ge):Ge;continue}default:{var Jt='Token with "'+Ee.type+'" type was not found.';if(this.options.silent){console.error(Jt);return}else throw new Error(Jt)}}}return we},he.parseInline=function(X,re){re=re||this.renderer;var we="",ue,Ce,ze,Ye=X.length;for(ue=0;ue<Ye;ue++){if(Ce=X[ue],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[Ce.type]&&(ze=this.options.extensions.renderers[Ce.type].call({parser:this},Ce),ze!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(Ce.type))){we+=ze||"";continue}switch(Ce.type){case"escape":{we+=re.text(Ce.text);break}case"html":{we+=re.html(Ce.text);break}case"link":{we+=re.link(Ce.href,Ce.title,this.parseInline(Ce.tokens,re));break}case"image":{we+=re.image(Ce.href,Ce.title,Ce.text);break}case"strong":{we+=re.strong(this.parseInline(Ce.tokens,re));break}case"em":{we+=re.em(this.parseInline(Ce.tokens,re));break}case"codespan":{we+=re.codespan(Ce.text);break}case"br":{we+=re.br();break}case"del":{we+=re.del(this.parseInline(Ce.tokens,re));break}case"text":{we+=re.text(Ce.text);break}default:{var Ke='Token with "'+Ce.type+'" type was not found.';if(this.options.silent){console.error(Ke);return}else throw new Error(Ke)}}}return we},ge}();function ie(ge,he,me){if(typeof ge>"u"||ge===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ge!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ge)+", string expected");if(typeof he=="function"&&(me=he,he=null),he=P({},ie.defaults,he||{}),$(he),me){var X=he.highlight,re;try{re=ae.lex(ge,he)}catch(Ye){return me(Ye)}var we=function(Ke){var Xe;if(!Ke)try{he.walkTokens&&ie.walkTokens(re,he.walkTokens),Xe=de.parse(re,he)}catch(it){Ke=it}return he.highlight=X,Ke?me(Ke):me(null,Xe)};if(!X||X.length<3||(delete he.highlight,!re.length))return we();var ue=0;ie.walkTokens(re,function(Ye){Ye.type==="code"&&(ue++,setTimeout(function(){X(Ye.text,Ye.lang,function(Ke,Xe){if(Ke)return we(Ke);Xe!=null&&Xe!==Ye.text&&(Ye.text=Xe,Ye.escaped=!0),ue--,ue===0&&we()})},0))}),ue===0&&we();return}function Ce(Ye){if(Ye.message+=`
Please report this to https://github.com/markedjs/marked.`,he.silent)return"<p>An error occurred:</p><pre>"+p(Ye.message+"",!0)+"</pre>";throw Ye}try{var ze=ae.lex(ge,he);if(he.walkTokens){if(he.async)return Promise.all(ie.walkTokens(ze,he.walkTokens)).then(function(){return de.parse(ze,he)}).catch(Ce);ie.walkTokens(ze,he.walkTokens)}return de.parse(ze,he)}catch(Ye){Ce(Ye)}}ie.options=ie.setOptions=function(ge){return P(ie.defaults,ge),l(ie.defaults),ie},ie.getDefaults=a,ie.defaults=e.defaults,ie.use=function(){for(var ge=arguments.length,he=new Array(ge),me=0;me<ge;me++)he[me]=arguments[me];var X=P.apply(void 0,[{}].concat(he)),re=ie.defaults.extensions||{renderers:{},childTokens:{}},we;he.forEach(function(ue){if(ue.extensions&&(we=!0,ue.extensions.forEach(function(ze){if(!ze.name)throw new Error("extension name required");if(ze.renderer){var Ye=re.renderers?re.renderers[ze.name]:null;Ye?re.renderers[ze.name]=function(){for(var Ke=arguments.length,Xe=new Array(Ke),it=0;it<Ke;it++)Xe[it]=arguments[it];var ut=ze.renderer.apply(this,Xe);return ut===!1&&(ut=Ye.apply(this,Xe)),ut}:re.renderers[ze.name]=ze.renderer}if(ze.tokenizer){if(!ze.level||ze.level!=="block"&&ze.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");re[ze.level]?re[ze.level].unshift(ze.tokenizer):re[ze.level]=[ze.tokenizer],ze.start&&(ze.level==="block"?re.startBlock?re.startBlock.push(ze.start):re.startBlock=[ze.start]:ze.level==="inline"&&(re.startInline?re.startInline.push(ze.start):re.startInline=[ze.start]))}ze.childTokens&&(re.childTokens[ze.name]=ze.childTokens)})),ue.renderer&&function(){var ze=ie.defaults.renderer||new se,Ye=function(it){var ut=ze[it];ze[it]=function(){for(var Ge=arguments.length,Ee=new Array(Ge),Se=0;Se<Ge;Se++)Ee[Se]=arguments[Se];var je=ue.renderer[it].apply(ze,Ee);return je===!1&&(je=ut.apply(ze,Ee)),je}};for(var Ke in ue.renderer)Ye(Ke);X.renderer=ze}(),ue.tokenizer&&function(){var ze=ie.defaults.tokenizer||new K,Ye=function(it){var ut=ze[it];ze[it]=function(){for(var Ge=arguments.length,Ee=new Array(Ge),Se=0;Se<Ge;Se++)Ee[Se]=arguments[Se];var je=ue.tokenizer[it].apply(ze,Ee);return je===!1&&(je=ut.apply(ze,Ee)),je}};for(var Ke in ue.tokenizer)Ye(Ke);X.tokenizer=ze}(),ue.walkTokens){var Ce=ie.defaults.walkTokens;X.walkTokens=function(ze){var Ye=[];return Ye.push(ue.walkTokens.call(this,ze)),Ce&&(Ye=Ye.concat(Ce.call(this,ze))),Ye}}we&&(X.extensions=re),ie.setOptions(X)})},ie.walkTokens=function(ge,he){for(var me=[],X=function(){var Ce=we.value;switch(me=me.concat(he.call(ie,Ce)),Ce.type){case"table":{for(var ze=s(Ce.header),Ye;!(Ye=ze()).done;){var Ke=Ye.value;me=me.concat(ie.walkTokens(Ke.tokens,he))}for(var Xe=s(Ce.rows),it;!(it=Xe()).done;)for(var ut=it.value,Ge=s(ut),Ee;!(Ee=Ge()).done;){var Se=Ee.value;me=me.concat(ie.walkTokens(Se.tokens,he))}break}case"list":{me=me.concat(ie.walkTokens(Ce.items,he));break}default:ie.defaults.extensions&&ie.defaults.extensions.childTokens&&ie.defaults.extensions.childTokens[Ce.type]?ie.defaults.extensions.childTokens[Ce.type].forEach(function(je){me=me.concat(ie.walkTokens(Ce[je],he))}):Ce.tokens&&(me=me.concat(ie.walkTokens(Ce.tokens,he)))}},re=s(ge),we;!(we=re()).done;)X();return me},ie.parseInline=function(ge,he){if(typeof ge>"u"||ge===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof ge!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(ge)+", string expected");he=P({},ie.defaults,he||{}),$(he);try{var me=ae.lexInline(ge,he);return he.walkTokens&&ie.walkTokens(me,he.walkTokens),de.parseInline(me,he)}catch(X){if(X.message+=`
Please report this to https://github.com/markedjs/marked.`,he.silent)return"<p>An error occurred:</p><pre>"+p(X.message+"",!0)+"</pre>";throw X}},ie.Parser=de,ie.parser=de.parse,ie.Renderer=se,ie.TextRenderer=oe,ie.Lexer=ae,ie.lexer=ae.lex,ie.Tokenizer=K,ie.Slugger=fe,ie.parse=ie;var Q=ie.options,be=ie.setOptions,le=ie.use,Ne=ie.walkTokens,Le=ie.parseInline,Te=ie,De=de.parse,Pe=ae.lex;e.Lexer=ae,e.Parser=de,e.Renderer=se,e.Slugger=fe,e.TextRenderer=oe,e.Tokenizer=K,e.getDefaults=a,e.lexer=Pe,e.marked=ie,e.options=Q,e.parse=Te,e.parseInline=Le,e.parser=De,e.setOptions=be,e.use=le,e.walkTokens=Ne,Object.defineProperty(e,"__esModule",{value:!0})})})();Gh.Lexer||exports.Lexer;Gh.Parser||exports.Parser;Gh.Renderer||exports.Renderer;Gh.Slugger||exports.Slugger;Gh.TextRenderer||exports.TextRenderer;Gh.Tokenizer||exports.Tokenizer;Gh.getDefaults||exports.getDefaults;Gh.lexer||exports.lexer;var t0=Gh.marked||exports.marked;Gh.options||exports.options;Gh.parse||exports.parse;Gh.parseInline||exports.parseInline;Gh.parser||exports.parser;Gh.setOptions||exports.setOptions;Gh.use||exports.use;Gh.walkTokens||exports.walkTokens;function PCi(t){return JSON.stringify(t,OCi)}function YTe(t){let e=JSON.parse(t);return e=XTe(e),e}function OCi(t,e){return e instanceof RegExp?{$mid:2,source:e.source,flags:e.flags}:e}function XTe(t,e=0){if(!t||e>200)return t;if(typeof t=="object"){switch(t.$mid){case 1:return ri.revive(t);case 2:return new RegExp(t.source,t.flags);case 17:return new Date(t.source)}if(t instanceof Ufe||t instanceof Uint8Array)return t;if(Array.isArray(t))for(let n=0;n<t.length;++n)t[n]=XTe(t[n],e+1);else for(const n in t)Object.hasOwnProperty.call(t,n)&&(t[n]=XTe(t[n],e+1))}return t}const k1e=Object.freeze({image:(t,e,n)=>{let i=[],r=[];return t&&({href:t,dimensions:i}=RCi(t),r.push(`src="${AQ(t)}"`)),n&&r.push(`alt="${AQ(n)}"`),e&&r.push(`title="${AQ(e)}"`),i.length&&(r=r.concat(i)),"<img "+r.join(" ")+">"},paragraph:t=>`<p>${t}</p>`,link:(t,e,n)=>typeof t!="string"?"":(t===n&&(n=D1e(n)),e=typeof e=="string"?AQ(D1e(e)):"",t=D1e(t),t=t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),`<a href="${t}" title="${e||t}" draggable="false">${n}</a>`)});function bme(t,e={},n={}){const i=new Lt;let r=!1;const o=XVe(e),s=function(p){let g;try{g=YTe(decodeURIComponent(p))}catch{}return g?(g=IOt(g,y=>{if(t.uris&&t.uris[y])return ri.revive(t.uris[y])}),encodeURIComponent(JSON.stringify(g))):p},a=function(p,g){const y=t.uris&&t.uris[p];let _=ri.revive(y);return g?p.startsWith(Ti.data+":")?p:(_||(_=ri.parse(p)),M4t.uriToBrowserUri(_).toString(!0)):!_||ri.parse(p).toString()===_.toString()?p:(_.query&&(_=_.with({query:s(_.query)})),_.toString())},l=new t0.Renderer;l.image=k1e.image,l.link=k1e.link,l.paragraph=k1e.paragraph;const c=[],u=[];if(e.codeBlockRendererSync?l.code=(p,g)=>{const y=GTe.nextId(),_=e.codeBlockRendererSync(Alt(g),p);return u.push([y,_]),`<div class="code" data-code="${y}">${z9(p)}</div>`}:e.codeBlockRenderer&&(l.code=(p,g)=>{const y=GTe.nextId(),_=e.codeBlockRenderer(Alt(g),p);return c.push(_.then(w=>[y,w])),`<div class="code" data-code="${y}">${z9(p)}</div>`}),e.actionHandler){const p=function(_){let w=_.target;if(!(w.tagName!=="A"&&(w=w.parentElement,!w||w.tagName!=="A")))try{let C=w.dataset.href;C&&(t.baseUri&&(C=M1e(ri.from(t.baseUri),C)),e.actionHandler.callback(C,_))}catch(C){ji(C)}finally{_.preventDefault()}},g=e.actionHandler.disposables.add(new Er(o,"click")),y=e.actionHandler.disposables.add(new Er(o,"auxclick"));e.actionHandler.disposables.add(rn.any(g.event,y.event)(_=>{const w=new uv(ei(o),_);!w.leftButton&&!w.middleButton||p(w)})),e.actionHandler.disposables.add(yt(o,"keydown",_=>{const w=new as(_);!w.equals(10)&&!w.equals(3)||p(w)}))}t.supportHtml||(n.sanitizer=p=>{var y;return(y=e.sanitizerOptions)!=null&&y.replaceWithPlaintext?z9(p):(t.isTrusted?p.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?p:""},n.sanitize=!0,n.silent=!0),n.renderer=l;let d=t.value??"";d.length>1e5&&(d=`${d.substr(0,1e5)}…`),t.supportThemeIcons&&(d=kCi(d));let h;if(e.fillInIncompleteTokens){const p={...t0.defaults,...n},g=t0.lexer(d,p),y=YCi(g);h=t0.parser(y,p)}else h=t0.parse(d,n);t.supportThemeIcons&&(h=bD(h).map(g=>typeof g=="string"?g:g.outerHTML).join(""));const m=new DOMParser().parseFromString(ZTe({isTrusted:t.isTrusted,...e.sanitizerOptions},h),"text/html");if(m.body.querySelectorAll("img, audio, video, source").forEach(p=>{const g=p.getAttribute("src");if(g){let y=g;try{t.baseUri&&(y=M1e(ri.from(t.baseUri),y))}catch{}if(p.setAttribute("src",a(y,!0)),e.remoteImageIsAllowed){const _=ri.parse(y);_.scheme!==Ti.file&&_.scheme!==Ti.data&&!e.remoteImageIsAllowed(_)&&p.replaceWith(Xt("",void 0,p.outerHTML))}}}),m.body.querySelectorAll("a").forEach(p=>{const g=p.getAttribute("href");if(p.setAttribute("href",""),!g||/^data:|javascript:/i.test(g)||/^command:/i.test(g)&&!t.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(g))p.replaceWith(...p.childNodes);else{let y=a(g,!1);t.baseUri&&(y=M1e(ri.from(t.baseUri),g)),p.dataset.href=y}}),o.innerHTML=ZTe({isTrusted:t.isTrusted,...e.sanitizerOptions},m.body.innerHTML),c.length>0)Promise.all(c).then(p=>{var _;if(r)return;const g=new Map(p),y=o.querySelectorAll("div[data-code]");for(const w of y){const C=g.get(w.dataset.code??"");C&&ou(w,C)}(_=e.asyncRenderCallback)==null||_.call(e)});else if(u.length>0){const p=new Map(u),g=o.querySelectorAll("div[data-code]");for(const y of g){const _=p.get(y.dataset.code??"");_&&ou(y,_)}}if(e.asyncRenderCallback)for(const p of o.getElementsByTagName("img")){const g=i.add(yt(p,"load",()=>{g.dispose(),e.asyncRenderCallback()}))}return{element:o,dispose:()=>{r=!0,i.dispose()}}}function Alt(t){if(!t)return"";const e=t.split(/[\s+|:|,|\{|\?]/,1);return e.length?e[0]:t}function M1e(t,e){return/^\w[\w\d+.-]*:/.test(e)?e:t.path.endsWith("/")?Fat(t,e).toString():Fat(dme(t),e).toString()}const jCi=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function ZTe(t,e){const{config:n,allowedSchemes:i}=$Ci(t),r=new Lt;r.add(Rlt("uponSanitizeAttribute",(o,s)=>{var a;if(s.attrName==="style"||s.attrName==="class"){if(o.tagName==="SPAN"){if(s.attrName==="style"){s.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(border-radius:[0-9]+px;)?$/.test(s.attrValue);return}else if(s.attrName==="class"){s.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(s.attrValue);return}}s.keepAttr=!1;return}else if(o.tagName==="INPUT"&&((a=o.attributes.getNamedItem("type"))==null?void 0:a.value)==="checkbox"){if(s.attrName==="type"&&s.attrValue==="checkbox"||s.attrName==="disabled"||s.attrName==="checked"){s.keepAttr=!0;return}s.keepAttr=!1}})),r.add(Rlt("uponSanitizeElement",(o,s)=>{var a;if(s.tagName==="input"&&(((a=o.attributes.getNamedItem("type"))==null?void 0:a.value)==="checkbox"?o.setAttribute("disabled",""):t.replaceWithPlaintext||o.remove()),t.replaceWithPlaintext&&!s.allowedTags[s.tagName]&&s.tagName!=="body"&&o.parentElement){let l,c;if(s.tagName==="#comment")l=`<!--${o.textContent}-->`;else{const f=jCi.includes(s.tagName),m=o.attributes.length?" "+Array.from(o.attributes).map(p=>`${p.name}="${p.value}"`).join(" "):"";l=`<${s.tagName}${m}>`,f||(c=`</${s.tagName}>`)}const u=document.createDocumentFragment(),d=o.parentElement.ownerDocument.createTextNode(l);u.appendChild(d);const h=c?o.parentElement.ownerDocument.createTextNode(c):void 0;for(;o.firstChild;)u.appendChild(o.firstChild);h&&u.appendChild(h),o.parentElement.replaceChild(u,o)}})),r.add(yfi(i));try{return N4t(e,{...n,RETURN_TRUSTED_TYPE:!0})}finally{r.dispose()}}const FCi=["align","autoplay","alt","checked","class","colspan","controls","data-code","data-href","disabled","draggable","height","href","loop","muted","playsinline","poster","rowspan","src","style","target","title","type","width","start"];function $Ci(t){const e=[Ti.http,Ti.https,Ti.mailto,Ti.data,Ti.file,Ti.vscodeFileResource,Ti.vscodeRemote,Ti.vscodeRemoteResource];return t.isTrusted&&e.push(Ti.command),{config:{ALLOWED_TAGS:t.allowedTags??[..._fi],ALLOWED_ATTR:FCi,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:e}}function VCi(t){return typeof t=="string"?t:BCi(t)}function BCi(t,e){let n=t.value??"";n.length>1e5&&(n=`${n.substr(0,1e5)}…`);const i=t0.parse(n,{renderer:WCi.value}).replace(/&(#\d+|[a-zA-Z]+);/g,r=>zCi.get(r)??r);return ZTe({isTrusted:!1},i).toString()}const zCi=new Map([["&quot;",'"'],["&nbsp;"," "],["&amp;","&"],["&#39;","'"],["&lt;","<"],["&gt;",">"]]);function HCi(){const t=new t0.Renderer;return t.code=e=>e,t.blockquote=e=>e,t.html=e=>"",t.heading=(e,n,i)=>e+`
`,t.hr=()=>"",t.list=(e,n)=>e,t.listitem=e=>e+`
`,t.paragraph=e=>e+`
`,t.table=(e,n)=>e+n+`
`,t.tablerow=e=>e,t.tablecell=(e,n)=>e+" ",t.strong=e=>e,t.em=e=>e,t.codespan=e=>e,t.br=()=>`
`,t.del=e=>e,t.image=(e,n,i)=>"",t.text=e=>e,t.link=(e,n,i)=>i,t}const WCi=new U0(t=>HCi());function nW(t){let e="";return t.forEach(n=>{e+=n.raw}),e}function C5t(t){var e,n;if(t.tokens)for(let i=t.tokens.length-1;i>=0;i--){const r=t.tokens[i];if(r.type==="text"){const o=r.raw.split(`
`),s=o[o.length-1];if(s.includes("`"))return QCi(t);if(s.includes("**"))return rSi(t);if(s.match(/\*\w/))return JCi(t);if(s.match(/(^|\s)__\w/))return oSi(t);if(s.match(/(^|\s)_\w/))return eSi(t);if(UCi(s)||KCi(s)&&t.tokens.slice(0,i).some(a=>a.type==="text"&&a.raw.match(/\[[^\]]*$/))){const a=t.tokens.slice(i+1);return((e=a[0])==null?void 0:e.type)==="link"&&((n=a[1])==null?void 0:n.type)==="text"&&a[1].raw.match(/^ *"[^"]*$/)||s.match(/^[^"]* +"[^"]*$/)?nSi(t):tSi(t)}else if(s.match(/(^|\s)\[\w*/))return iSi(t)}}}function UCi(t){return!!t.match(/(^|\s)\[.*\]\(\w*/)}function KCi(t){return!!t.match(/^[^\[]*\]\([^\)]*$/)}function qCi(t){var l;const e=t.items[t.items.length-1],n=e.tokens?e.tokens[e.tokens.length-1]:void 0;let i;if((n==null?void 0:n.type)==="text"&&!("inRawBlock"in e)&&(i=C5t(n)),!i||i.type!=="paragraph")return;const r=nW(t.items.slice(0,-1)),o=(l=e.raw.match(/^(\s*(-|\d+\.|\*) +)/))==null?void 0:l[0];if(!o)return;const s=o+nW(e.tokens.slice(0,-1))+i.raw,a=t0.lexer(r+s)[0];if(a.type==="list")return a}const GCi=3;function YCi(t){for(let e=0;e<GCi;e++){const n=XCi(t);if(n)t=n;else break}return t}function XCi(t){let e,n;for(e=0;e<t.length;e++){const i=t[e];let r;if(i.type==="paragraph"&&(r=i.raw.match(/(\n|^)(````*)/))){const o=r[2];n=ZCi(t.slice(e),o);break}if(i.type==="paragraph"&&i.raw.match(/(\n|^)\|/)){n=sSi(t.slice(e));break}if(e===t.length-1&&i.type==="list"){const o=qCi(i);if(o){n=[o];break}}if(e===t.length-1&&i.type==="paragraph"){const o=C5t(i);if(o){n=[o];break}}}if(n){const i=[...t.slice(0,e),...n];return i.links=t.links,i}return null}function ZCi(t,e){const n=nW(t);return t0.lexer(n+`
${e}`)}function QCi(t){return rM(t,"`")}function JCi(t){return rM(t,"*")}function eSi(t){return rM(t,"_")}function tSi(t){return rM(t,")")}function nSi(t){return rM(t,'")')}function iSi(t){return rM(t,"](https://microsoft.com)")}function rSi(t){return rM(t,"**")}function oSi(t){return rM(t,"__")}function rM(t,e){const n=nW(Array.isArray(t)?t:[t]);return t0.lexer(n+e)[0]}function sSi(t){const e=nW(t),n=e.split(`
`);let i,r=!1;for(let o=0;o<n.length;o++){const s=n[o].trim();if(typeof i>"u"&&s.match(/^\s*\|/)){const a=s.match(/(\|[^\|]+)(?=\||$)/g);a&&(i=a.length)}else if(typeof i=="number")if(s.match(/^\s*\|/)){if(o!==n.length-1)return;r=!0}else return}if(typeof i=="number"&&i>0){const o=r?n.slice(0,-1).join(`
`):e,s=!!o.match(/\|\s*$/),a=o+(s?"":"|")+`
|${" --- |".repeat(i)}`;return t0.lexer(a)}}function Rlt(t,e){return E4t(t,e),Kn(()=>D4t(t))}var aSi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Plt=function(t,e){return function(n,i){e(n,i,t)}},QTe,DI;let pS=(DI=class{constructor(e,n,i){this._options=e,this._languageService=n,this._openerService=i,this._onDidRenderAsync=new st,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,n,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const r=new Lt,o=r.add(bme(e,{...this._getRenderOptions(e,r),...n},i));return o.element.classList.add("rendered-markdown"),{element:o.element,dispose:()=>r.dispose()}}_getRenderOptions(e,n){return{codeBlockRenderer:async(i,r)=>{var l,c;let o;i?o=this._languageService.getLanguageIdByLanguageName(i):this._options.editor&&(o=(l=this._options.editor.getModel())==null?void 0:l.getLanguageId()),o||(o=Ph);const s=await Wwi(this._languageService,r,o),a=document.createElement("span");if(a.innerHTML=((c=QTe._ttpTokenizer)==null?void 0:c.createHTML(s))??s,this._options.editor){const u=this._options.editor.getOption(50);su(a,u)}else this._options.codeBlockFontFamily&&(a.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(a.style.fontSize=this._options.codeBlockFontSize),a},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:i=>o7e(this._openerService,i,e.isTrusted),disposables:n}}}},QTe=DI,DI._ttpTokenizer=WS("tokenizeToString",{createHTML(e){return e}}),DI);pS=QTe=aSi([Plt(1,Qs),Plt(2,Wm)],pS);async function o7e(t,e,n){try{return await t.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:lSi(n)})}catch(i){return ji(i),!1}}function lSi(t){return t===!0?!0:t&&Array.isArray(t.enabledCommands)?t.enabledCommands:!1}var cSi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},ZV=function(t,e){return function(n,i){e(n,i,t)}};const F_=Xt;let JTe=class extends eg{get _targetWindow(){return ei(this._target.targetElements[0])}get _targetDocumentElement(){return ei(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return this._hoverPosition===2?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this._hoverContainer.classList.toggle("locked",this._isLocked))}constructor(e,n,i,r,o,s){var h,f,m,p,g,y,_;super(),this._keybindingService=n,this._configurationService=i,this._openerService=r,this._instantiationService=o,this._accessibilityService=s,this._messageListeners=new Lt,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._onDispose=this._register(new st),this._onRequestLayout=this._register(new st),this._linkHandler=e.linkHandler||(w=>o7e(this._openerService,w,E0(e.content)?e.content.isTrusted:void 0)),this._target="targetElements"in e.target?e.target:new uSi(e.target),this._hoverPointer=(h=e.appearance)!=null&&h.showPointer?F_("div.workbench-hover-pointer"):void 0,this._hover=this._register(new YVe),this._hover.containerDomNode.classList.add("workbench-hover","fadeIn"),(f=e.appearance)!=null&&f.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),(m=e.appearance)!=null&&m.skipFadeInAnimation&&this._hover.containerDomNode.classList.add("skip-fade-in"),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),(p=e.position)!=null&&p.forcePosition&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0),this._hoverPosition=((g=e.position)==null?void 0:g.hoverPosition)??3,this.onmousedown(this._hover.containerDomNode,w=>w.stopPropagation()),this.onkeydown(this._hover.containerDomNode,w=>{w.equals(9)&&this.dispose()}),this._register(yt(this._targetWindow,"blur",()=>this.dispose()));const a=F_("div.hover-row.markdown-hover"),l=F_("div.hover-contents");if(typeof e.content=="string")l.textContent=e.content,l.style.whiteSpace="pre-wrap";else if(uc(e.content))l.appendChild(e.content),l.classList.add("html-hover-contents");else{const w=e.content,C=this._instantiationService.createInstance(pS,{codeBlockFontFamily:this._configurationService.getValue("editor").fontFamily||Rh.fontFamily}),{element:N}=C.render(w,{actionHandler:{callback:E=>this._linkHandler(E),disposables:this._messageListeners},asyncRenderCallback:()=>{l.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}});l.appendChild(N)}if(a.appendChild(l),this._hover.contentsDomNode.appendChild(a),e.actions&&e.actions.length>0){const w=F_("div.hover-row.status-bar"),C=F_("div.actions");e.actions.forEach(N=>{const E=this._keybindingService.lookupKeybinding(N.commandId),D=E?E.getLabel():null;pme.render(C,{label:N.label,commandId:N.commandId,run:k=>{N.run(k),this.dispose()},iconClass:N.iconClass},D)}),w.appendChild(C),this._hover.containerDomNode.appendChild(w)}this._hoverContainer=F_("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode);let c;if(e.actions&&e.actions.length>0?c=!1:((y=e.persistence)==null?void 0:y.hideOnHover)===void 0?c=typeof e.content=="string"||E0(e.content)&&!e.content.value.includes("](")&&!e.content.value.includes("</a>"):c=e.persistence.hideOnHover,c&&((_=e.appearance)!=null&&_.showHoverHint)){const w=F_("div.hover-row.status-bar"),C=F_("div.info");C.textContent=I("hoverhint","Hold {0} key to mouse over",xr?"Option":"Alt"),w.appendChild(C),this._hover.containerDomNode.appendChild(w)}const u=[...this._target.targetElements];c||u.push(this._hoverContainer);const d=this._register(new Olt(u));if(this._register(d.onMouseOut(()=>{this._isLocked||this.dispose()})),c){const w=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new Olt(w)),this._register(this._lockMouseTracker.onMouseOut(()=>{this._isLocked||this.dispose()}))}else this._lockMouseTracker=d}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;const e=this._hover.containerDomNode,n=this.findLastFocusableChild(this._hover.containerDomNode);if(n){const i=R8e(this._hoverContainer,F_("div")),r=jt(this._hoverContainer,F_("div"));i.tabIndex=0,r.tabIndex=0,this._register(yt(r,"focus",o=>{e.focus(),o.preventDefault()})),this._register(yt(i,"focus",o=>{n.focus(),o.preventDefault()}))}}findLastFocusableChild(e){if(e.hasChildNodes())for(let n=0;n<e.childNodes.length;n++){const i=e.childNodes.item(e.childNodes.length-n-1);if(i.nodeType===i.ELEMENT_NODE){const o=i;if(typeof o.tabIndex=="number"&&o.tabIndex>=0)return o}const r=this.findLastFocusableChild(i);if(r)return r}}render(e){var r;e.appendChild(this._hoverContainer);const i=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement)&&l5t(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(r=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))==null?void 0:r.getAriaLabel());i&&hw(i),this.layout(),this.addFocusTrap()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";const e=u=>{const d=A4t(u),h=u.getBoundingClientRect();return{top:h.top*d,bottom:h.bottom*d,right:h.right*d,left:h.left*d}},n=this._target.targetElements.map(u=>e(u)),{top:i,right:r,bottom:o,left:s}=n[0],a=r-s,l=o-i,c={top:i,right:r,bottom:o,left:s,width:a,height:l,center:{x:s+a/2,y:i+l/2}};if(this.adjustHorizontalHoverPosition(c),this.adjustVerticalHoverPosition(c),this.adjustHoverMaxHeight(c),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:c.left+=3,c.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:c.left-=3,c.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:c.top+=3,c.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:c.top-=3,c.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px";break}c.center.x=c.left+a/2,c.center.y=c.top+l/2}this.computeXCordinate(c),this.computeYCordinate(c),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(c)),this._hover.onContentsChanged()}computeXCordinate(e){const n=this._hover.containerDomNode.clientWidth+2;this._target.x!==void 0?this._x=this._target.x:this._hoverPosition===1?this._x=e.right:this._hoverPosition===0?this._x=e.left-n:(this._hoverPointer?this._x=e.center.x-this._hover.containerDomNode.clientWidth/2:this._x=e.left,this._x+n>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(this._targetDocumentElement.clientWidth-n-2,this._targetDocumentElement.clientLeft))),this._x<this._targetDocumentElement.clientLeft&&(this._x=e.left+2)}computeYCordinate(e){this._target.y!==void 0?this._y=this._target.y:this._hoverPosition===3?this._y=e.top:this._hoverPosition===2?this._y=e.bottom-2:this._hoverPointer?this._y=e.center.y+this._hover.containerDomNode.clientHeight/2:this._y=e.bottom,this._y>this._targetWindow.innerHeight&&(this._y=e.bottom)}adjustHorizontalHoverPosition(e){if(this._target.x!==void 0)return;const n=this._hoverPointer?3:0;if(this._forcePosition){const i=n+2;this._hoverPosition===1?this._hover.containerDomNode.style.maxWidth=`${this._targetDocumentElement.clientWidth-e.right-i}px`:this._hoverPosition===0&&(this._hover.containerDomNode.style.maxWidth=`${e.left-i}px`);return}this._hoverPosition===1?this._targetDocumentElement.clientWidth-e.right<this._hover.containerDomNode.clientWidth+n&&(e.left>=this._hover.containerDomNode.clientWidth+n?this._hoverPosition=0:this._hoverPosition=2):this._hoverPosition===0&&(e.left<this._hover.containerDomNode.clientWidth+n&&(this._targetDocumentElement.clientWidth-e.right>=this._hover.containerDomNode.clientWidth+n?this._hoverPosition=1:this._hoverPosition=2),e.left-this._hover.containerDomNode.clientWidth-n<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1))}adjustVerticalHoverPosition(e){if(this._target.y!==void 0||this._forcePosition)return;const n=this._hoverPointer?3:0;this._hoverPosition===3?e.top-this._hover.containerDomNode.clientHeight-n<0&&(this._hoverPosition=2):this._hoverPosition===2&&e.bottom+this._hover.containerDomNode.clientHeight+n>this._targetWindow.innerHeight&&(this._hoverPosition=3)}adjustHoverMaxHeight(e){let n=this._targetWindow.innerHeight/2;if(this._forcePosition){const i=(this._hoverPointer?3:0)+2;this._hoverPosition===3?n=Math.min(n,e.top-i):this._hoverPosition===2&&(n=Math.min(n,this._targetWindow.innerHeight-e.bottom-i))}if(this._hover.containerDomNode.style.maxHeight=`${n}px`,this._hover.contentsDomNode.clientHeight<this._hover.contentsDomNode.scrollHeight){const i=`${this._hover.scrollbar.options.verticalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingRight!==i&&(this._hover.contentsDomNode.style.paddingRight=i)}}setHoverPointerPosition(e){if(this._hoverPointer)switch(this._hoverPosition){case 0:case 1:{this._hoverPointer.classList.add(this._hoverPosition===0?"right":"left");const n=this._hover.containerDomNode.clientHeight;n>e.height?this._hoverPointer.style.top=`${e.center.y-(this._y-n)-3}px`:this._hoverPointer.style.top=`${Math.round(n/2)-3}px`;break}case 3:case 2:{this._hoverPointer.classList.add(this._hoverPosition===3?"bottom":"top");const n=this._hover.containerDomNode.clientWidth;let i=Math.round(n/2)-3;const r=this._x+i;(r<e.left||r>e.right)&&(i=e.center.x-this._x-3),this._hoverPointer.style.left=`${i}px`;break}}}focus(){this._hover.containerDomNode.focus()}dispose(){this._isDisposed||(this._onDispose.fire(),this._hoverContainer.remove(),this._messageListeners.dispose(),this._target.dispose(),super.dispose()),this._isDisposed=!0}};JTe=cSi([ZV(1,vo),ZV(2,cr),ZV(3,Wm),ZV(4,qn),ZV(5,Bm)],JTe);class Olt extends eg{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(e){super(),this._elements=e,this._isMouseIn=!0,this._onMouseOut=this._register(new st),this._elements.forEach(n=>this.onmouseover(n,()=>this._onTargetMouseOver(n))),this._elements.forEach(n=>this.onmouseleave(n,()=>this._onTargetMouseLeave(n)))}_onTargetMouseOver(e){this._isMouseIn=!0,this._clearEvaluateMouseStateTimeout(e)}_onTargetMouseLeave(e){this._isMouseIn=!1,this._evaluateMouseState(e)}_evaluateMouseState(e){this._clearEvaluateMouseStateTimeout(e),this._mouseTimeout=ei(e).setTimeout(()=>this._fireIfMouseOutside(),0)}_clearEvaluateMouseStateTimeout(e){this._mouseTimeout&&(ei(e).clearTimeout(this._mouseTimeout),this._mouseTimeout=void 0)}_fireIfMouseOutside(){this._isMouseIn||this._onMouseOut.fire()}}class uSi{constructor(e){this._element=e,this.targetElements=[this._element]}dispose(){}}var ed;(function(t){function e(o,s){if(o.start>=s.end||s.start>=o.end)return{start:0,end:0};const a=Math.max(o.start,s.start),l=Math.min(o.end,s.end);return l-a<=0?{start:0,end:0}:{start:a,end:l}}t.intersect=e;function n(o){return o.end-o.start<=0}t.isEmpty=n;function i(o,s){return!n(e(o,s))}t.intersects=i;function r(o,s){const a=[],l={start:o.start,end:Math.min(s.start,o.end)},c={start:Math.max(s.end,o.start),end:o.end};return n(l)||a.push(l),n(c)||a.push(c),a}t.relativeComplement=r})(ed||(ed={}));function dSi(t){const e=t;return!!e&&typeof e.x=="number"&&typeof e.y=="number"}var GE;(function(t){t[t.AVOID=0]="AVOID",t[t.ALIGN=1]="ALIGN"})(GE||(GE={}));function b4(t,e,n){const i=n.mode===GE.ALIGN?n.offset:n.offset+n.size,r=n.mode===GE.ALIGN?n.offset+n.size:n.offset;return n.position===0?e<=t-i?i:e<=r?r-e:Math.max(t-e,0):e<=r?r-e:e<=t-i?i:0}const q4=class q4 extends ct{constructor(e,n){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=ct.None,this.toDisposeOnSetContainer=ct.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=Xt(".context-view"),yh(this.view),this.setContainer(e,n),this._register(Kn(()=>this.setContainer(null,1)))}setContainer(e,n){var r;this.useFixedPosition=n!==1;const i=this.useShadowDOM;if(this.useShadowDOM=n===3,!(e===this.container&&i===this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.view.remove(),this.shadowRoot&&(this.shadowRoot=null,(r=this.shadowRootHostElement)==null||r.remove(),this.shadowRootHostElement=null),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=Xt(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const s=document.createElement("style");s.textContent=hSi,this.shadowRoot.appendChild(s),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(Xt("slot"))}else this.container.appendChild(this.view);const o=new Lt;q4.BUBBLE_UP_EVENTS.forEach(s=>{o.add(Fa(this.container,s,a=>{this.onDOMEvent(a,!1)}))}),q4.BUBBLE_DOWN_EVENTS.forEach(s=>{o.add(Fa(this.container,s,a=>{this.onDOMEvent(a,!0)},!0))}),this.toDisposeOnSetContainer=o}}show(e){var n,i;this.isVisible()&&this.hide(),ru(this.view),this.view.className="context-view monaco-component",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex=`${2575+(e.layer??0)}`,this.view.style.position=this.useFixedPosition?"fixed":"absolute",um(this.view),this.toDisposeOnClean=e.render(this.view)||ct.None,this.delegate=e,this.doLayout(),(i=(n=this.delegate).focus)==null||i.call(n)}getViewElement(){return this.view}layout(){var e,n;if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(W0&&E8e.pointerEvents)){this.hide();return}(n=(e=this.delegate)==null?void 0:e.layout)==null||n.call(e),this.doLayout()}}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let n;if(uc(e)){const h=Ga(e),f=A4t(e);n={top:h.top*f,left:h.left*f,width:h.width*f,height:h.height*f}}else dSi(e)?n={top:e.y,left:e.x,width:e.width||1,height:e.height||2}:n={top:e.posy,left:e.posx,width:2,height:2};const i=Jf(this.view),r=oC(this.view),o=this.delegate.anchorPosition||0,s=this.delegate.anchorAlignment||0,a=this.delegate.anchorAxisAlignment||0;let l,c;const u=tte();if(a===0){const h={offset:n.top-u.pageYOffset,size:n.height,position:o===0?0:1},f={offset:n.left,size:n.width,position:s===0?0:1,mode:GE.ALIGN};l=b4(u.innerHeight,r,h)+u.pageYOffset,ed.intersects({start:l,end:l+r},{start:h.offset,end:h.offset+h.size})&&(f.mode=GE.AVOID),c=b4(u.innerWidth,i,f)}else{const h={offset:n.left,size:n.width,position:s===0?0:1},f={offset:n.top,size:n.height,position:o===0?0:1,mode:GE.ALIGN};c=b4(u.innerWidth,i,h),ed.intersects({start:c,end:c+i},{start:h.offset,end:h.offset+h.size})&&(f.mode=GE.AVOID),l=b4(u.innerHeight,r,f)+u.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(o===0?"bottom":"top"),this.view.classList.add(s===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const d=Ga(this.container);this.view.style.top=`${l-(this.useFixedPosition?Ga(this.view).top:d.top)}px`,this.view.style.left=`${c-(this.useFixedPosition?Ga(this.view).left:d.left)}px`,this.view.style.width="initial"}hide(e){const n=this.delegate;this.delegate=null,n!=null&&n.onHide&&n.onHide(e),this.toDisposeOnClean.dispose(),yh(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,n){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,ei(e).document.activeElement):n&&!ac(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}};q4.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],q4.BUBBLE_DOWN_EVENTS=["click"];let eIe=q4;const hSi=`
	:host {
		all: initial; /* 1st rule so subsequent properties are reset. */
	}

	.codicon[class*='codicon-'] {
		font: normal normal normal 16px/1 codicon;
		display: inline-block;
		text-decoration: none;
		text-rendering: auto;
		text-align: center;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
		user-select: none;
		-webkit-user-select: none;
		-ms-user-select: none;
	}

	:host {
		font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;
	}

	:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
	:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }
	:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }
	:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }
	:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }

	:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }
	:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }
	:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }
	:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }
	:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }

	:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }
	:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }
	:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }
	:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }
	:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }
`;var fSi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},mSi=function(t,e){return function(n,i){e(n,i,t)}};let Pre=class extends ct{constructor(e){super(),this.layoutService=e,this.contextView=this._register(new eIe(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer(()=>this.layout()))}showContextView(e,n,i){let r;n?n===this.layoutService.getContainer(ei(n))?r=1:i?r=3:r=2:r=1,this.contextView.setContainer(n??this.layoutService.activeContainer,r),this.contextView.show(e);const o={close:()=>{this.openContextView===o&&this.hideContextView()}};return this.openContextView=o,o}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e),this.openContextView=void 0}};Pre=fSi([mSi(0,iM)],Pre);class pSi extends Pre{getContextViewElement(){return this.contextView.getViewElement()}}class gSi{constructor(e,n,i){this.hoverDelegate=e,this.target=n,this.fadeInAnimation=i}async update(e,n,i){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let r;if(e===void 0||Cf(e)||uc(e))r=e;else if(!pH(e.markdown))r=e.markdown??e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(I("iconLabel.loading","Loading..."),n,i),this._cancellationTokenSource=new oa;const o=this._cancellationTokenSource.token;if(r=await e.markdown(o),r===void 0&&(r=e.markdownNotSupportedFallback),this.isDisposed||o.isCancellationRequested)return}this.show(r,n,i)}show(e,n,i){const r=this._hoverWidget;if(this.hasContent(e)){const o={content:e,target:this.target,appearance:{showPointer:this.hoverDelegate.placement==="element",skipFadeInAnimation:!this.fadeInAnimation||!!r},position:{hoverPosition:2},...i};this._hoverWidget=this.hoverDelegate.showHover(o,n)}r==null||r.dispose()}hasContent(e){return e?E0(e)?!!e.value:!0:!1}get isDisposed(){var e;return(e=this._hoverWidget)==null?void 0:e.isDisposed}dispose(){var e,n;(e=this._hoverWidget)==null||e.dispose(),(n=this._cancellationTokenSource)==null||n.dispose(!0),this._cancellationTokenSource=void 0}}var bSi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},QV=function(t,e){return function(n,i){e(n,i,t)}};let tIe=class extends ct{constructor(e,n,i,r,o){super(),this._instantiationService=e,this._keybindingService=i,this._layoutService=r,this._accessibilityService=o,this._managedHovers=new Map,n.onDidShowContextMenu(()=>this.hideHover()),this._contextViewHandler=this._register(new Pre(this._layoutService))}showHover(e,n,i){var l,c,u,d;if(jlt(this._currentHoverOptions)===jlt(e)||this._currentHover&&((c=(l=this._currentHoverOptions)==null?void 0:l.persistence)!=null&&c.sticky))return;this._currentHoverOptions=e,this._lastHoverOptions=e;const r=e.trapFocus||this._accessibilityService.isScreenReaderOptimized(),o=Au();i||(r&&o?o.classList.contains("monaco-hover")||(this._lastFocusedElementBeforeOpen=o):this._lastFocusedElementBeforeOpen=void 0);const s=new Lt,a=this._instantiationService.createInstance(JTe,e);if((u=e.persistence)!=null&&u.sticky&&(a.isLocked=!0),a.onDispose(()=>{var f,m;((f=this._currentHover)==null?void 0:f.domNode)&&P4t(this._currentHover.domNode)&&((m=this._lastFocusedElementBeforeOpen)==null||m.focus()),this._currentHoverOptions===e&&(this._currentHoverOptions=void 0),s.dispose()},void 0,s),!e.container){const h=uc(e.target)?e.target:e.target.targetElements[0];e.container=this._layoutService.getContainer(ei(h))}if(this._contextViewHandler.showContextView(new vSi(a,n),e.container),a.onRequestLayout(()=>this._contextViewHandler.layout(),void 0,s),(d=e.persistence)!=null&&d.sticky)s.add(yt(ei(e.container).document,Yt.MOUSE_DOWN,h=>{ac(h.target,a.domNode)||this.doHideHover()}));else{if("targetElements"in e.target)for(const f of e.target.targetElements)s.add(yt(f,Yt.CLICK,()=>this.hideHover()));else s.add(yt(e.target,Yt.CLICK,()=>this.hideHover()));const h=Au();if(h){const f=ei(h).document;s.add(yt(h,Yt.KEY_DOWN,m=>{var p;return this._keyDown(m,a,!!((p=e.persistence)!=null&&p.hideOnKeyDown))})),s.add(yt(f,Yt.KEY_DOWN,m=>{var p;return this._keyDown(m,a,!!((p=e.persistence)!=null&&p.hideOnKeyDown))})),s.add(yt(h,Yt.KEY_UP,m=>this._keyUp(m,a))),s.add(yt(f,Yt.KEY_UP,m=>this._keyUp(m,a)))}}if("IntersectionObserver"in Go){const h=new IntersectionObserver(m=>this._intersectionChange(m,a),{threshold:0}),f="targetElements"in e.target?e.target.targetElements[0]:e.target;h.observe(f),s.add(Kn(()=>h.disconnect()))}return this._currentHover=a,a}hideHover(){var e;(e=this._currentHover)!=null&&e.isLocked||!this._currentHoverOptions||this.doHideHover()}doHideHover(){this._currentHover=void 0,this._currentHoverOptions=void 0,this._contextViewHandler.hideContextView()}_intersectionChange(e,n){e[e.length-1].isIntersecting||n.dispose()}showAndFocusLastHover(){this._lastHoverOptions&&this.showHover(this._lastHoverOptions,!0,!0)}_keyDown(e,n,i){var s,a;if(e.key==="Alt"){n.isLocked=!0;return}const r=new as(e);this._keybindingService.resolveKeyboardEvent(r).getSingleModifierDispatchChords().some(l=>!!l)||this._keybindingService.softDispatch(r,r.target).kind!==0||i&&(!((s=this._currentHoverOptions)!=null&&s.trapFocus)||e.key!=="Tab")&&(this.hideHover(),(a=this._lastFocusedElementBeforeOpen)==null||a.focus())}_keyUp(e,n){var i;e.key==="Alt"&&(n.isLocked=!1,n.isMouseIn||(this.hideHover(),(i=this._lastFocusedElementBeforeOpen)==null||i.focus()))}setupManagedHover(e,n,i,r){n.setAttribute("custom-hover","true"),n.title!==""&&(console.warn("HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute."),console.trace("Stack trace:",n.title),n.title="");let o,s;const a=(w,C)=>{var E;const N=s!==void 0;w&&(s==null||s.dispose(),s=void 0),C&&(o==null||o.dispose(),o=void 0),N&&((E=e.onDidHideHover)==null||E.call(e),s=void 0)},l=(w,C,N,E)=>new Gv(async()=>{(!s||s.isDisposed)&&(s=new gSi(e,N||n,w>0),await s.update(typeof i=="function"?i():i,C,{...r,trapFocus:E}))},w);let c=!1;const u=yt(n,Yt.MOUSE_DOWN,()=>{c=!0,a(!0,!0)},!0),d=yt(n,Yt.MOUSE_UP,()=>{c=!1},!0),h=yt(n,Yt.MOUSE_LEAVE,w=>{c=!1,a(!1,w.fromElement===n)},!0),f=w=>{if(o)return;const C=new Lt,N={targetElements:[n],dispose:()=>{}};if(e.placement===void 0||e.placement==="mouse"){const E=D=>{N.x=D.x+10,uc(D.target)&&Flt(D.target,n)!==n&&a(!0,!0)};C.add(yt(n,Yt.MOUSE_MOVE,E,!0))}o=C,!(uc(w.target)&&Flt(w.target,n)!==n)&&C.add(l(e.delay,!1,N))},m=yt(n,Yt.MOUSE_OVER,f,!0),p=()=>{if(c||o)return;const w={targetElements:[n],dispose:()=>{}},C=new Lt,N=()=>a(!0,!0);C.add(yt(n,Yt.BLUR,N,!0)),C.add(l(e.delay,!1,w)),o=C};let g;const y=n.tagName.toLowerCase();y!=="input"&&y!=="textarea"&&(g=yt(n,Yt.FOCUS,p,!0));const _={show:w=>{a(!1,!0),l(0,w,void 0,w)},hide:()=>{a(!0,!0)},update:async(w,C)=>{i=w,await(s==null?void 0:s.update(i,void 0,C))},dispose:()=>{this._managedHovers.delete(n),m.dispose(),h.dispose(),u.dispose(),d.dispose(),g==null||g.dispose(),a(!0,!0)}};return this._managedHovers.set(n,_),_}showManagedHover(e){const n=this._managedHovers.get(e);n&&n.show(!0)}dispose(){this._managedHovers.forEach(e=>e.dispose()),super.dispose()}};tIe=bSi([QV(0,qn),QV(1,Hm),QV(2,vo),QV(3,iM),QV(4,Bm)],tIe);function jlt(t){if(t!==void 0)return(t==null?void 0:t.id)??t}class vSi{get anchorPosition(){return this._hover.anchor}constructor(e,n=!1){this._hover=e,this._focus=n,this.layer=1}render(e){return this._hover.render(e),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}}function Flt(t,e){for(e=e??ei(t).document.body;!t.hasAttribute("custom-hover")&&t!==e;)t=t.parentElement;return t}Rr(Pw,tIe,1);_b((t,e)=>{const n=t.getColor(P3t);n&&(e.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${n.transparent(.5)}; }`),e.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${n.transparent(.5)}; }`))});const Iq=Sr("IWorkspaceEditService");class s7e{constructor(e){this.metadata=e}static convert(e){return e.edits.map(n=>{if(vD.is(n))return vD.lift(n);if(I3.is(n))return I3.lift(n);throw new Error("Unsupported edit")})}}class vD extends s7e{static is(e){return e instanceof vD?!0:Ic(e)&&ri.isUri(e.resource)&&Ic(e.textEdit)}static lift(e){return e instanceof vD?e:new vD(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,n,i=void 0,r){super(r),this.resource=e,this.textEdit=n,this.versionId=i}}class I3 extends s7e{static is(e){return e instanceof I3?!0:Ic(e)&&(!!e.newResource||!!e.oldResource)}static lift(e){return e instanceof I3?e:new I3(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,n,i={},r){super(r),this.oldResource=e,this.newResource=n,this.options=i}}const mu={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,renderGutterMenu:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0,useTrueInlineView:!1},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0,compactMode:!1},Aq=Object.freeze({id:"editor",order:5,type:"object",title:I("editorConfigurationTitle","Editor"),scope:5}),Ore={...Aq,properties:{"editor.tabSize":{type:"number",default:id.tabSize,minimum:1,markdownDescription:I("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:I("indentSize",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:id.insertSpaces,markdownDescription:I("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:id.detectIndentation,markdownDescription:I("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:id.trimAutoWhitespace,description:I("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:id.largeFileOptimizations,description:I("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[I("wordBasedSuggestions.off","Turn off Word Based Suggestions."),I("wordBasedSuggestions.currentDocument","Only suggest words from the active document."),I("wordBasedSuggestions.matchingDocuments","Suggest words from all open documents of the same language."),I("wordBasedSuggestions.allDocuments","Suggest words from all open documents.")],description:I("wordBasedSuggestions","Controls whether completions should be computed based on words in the document and from which documents they are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[I("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),I("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),I("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:I("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:I("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:I("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:I("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:I("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:I("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:I("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:I("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:I("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:I("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:I("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:I("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:mu.maxComputationTime,description:I("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:mu.maxFileSize,description:I("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:mu.renderSideBySide,description:I("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:mu.renderSideBySideInlineBreakpoint,description:I("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:mu.useInlineViewWhenSpaceIsLimited,description:I("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:mu.renderMarginRevertIcon,description:I("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.renderGutterMenu":{type:"boolean",default:mu.renderGutterMenu,description:I("renderGutterMenu","When enabled, the diff editor shows a special gutter for revert and stage actions.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:mu.ignoreTrimWhitespace,description:I("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:mu.renderIndicators,description:I("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:mu.diffCodeLens,description:I("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:mu.diffWordWrap,markdownEnumDescriptions:[I("wordWrap.off","Lines will never wrap."),I("wordWrap.on","Lines will wrap at the viewport width."),I("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:mu.diffAlgorithm,markdownEnumDescriptions:[I("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),I("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:mu.hideUnchangedRegions.enabled,markdownDescription:I("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:mu.hideUnchangedRegions.revealLineCount,markdownDescription:I("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:mu.hideUnchangedRegions.minimumLineCount,markdownDescription:I("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:mu.hideUnchangedRegions.contextLineCount,markdownDescription:I("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:mu.experimental.showMoves,markdownDescription:I("showMoves","Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:mu.experimental.showEmptyDecorations,description:I("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")},"diffEditor.experimental.useTrueInlineView":{type:"boolean",default:mu.experimental.useTrueInlineView,description:I("useTrueInlineView","If enabled and the editor uses the inline view, word changes are rendered inline.")}}};function ySi(t){return typeof t.type<"u"||typeof t.anyOf<"u"}for(const t of a4){const e=t.schema;if(typeof e<"u")if(ySi(e))Ore.properties[`editor.${t.name}`]=e;else for(const n in e)Object.hasOwnProperty.call(e,n)&&(Ore.properties[n]=e[n])}let RQ=null;function S5t(){return RQ===null&&(RQ=Object.create(null),Object.keys(Ore.properties).forEach(t=>{RQ[t]=!0})),RQ}function _Si(t){return S5t()[`editor.${t}`]||!1}function xSi(t){return S5t()[`diffEditor.${t}`]||!1}const wSi=la.as(Yv.Configuration);wSi.registerConfiguration(Ore);class ia{static insert(e,n){return{range:new ve(e.lineNumber,e.column,e.lineNumber,e.column),text:n,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,n){return{range:e,text:n}}static replaceMove(e,n){return{range:e,text:n,forceMoveMarkers:!0}}}function PQ(t){return Object.isFrozen(t)?t:Hci(t)}class Jc{static createEmptyModel(e){return new Jc({},[],[],void 0,e)}constructor(e,n,i,r,o){this._contents=e,this._keys=n,this._overrides=i,this.raw=r,this.logService=o,this.overrideConfigurations=new Map}get rawConfiguration(){var e;if(!this._rawConfiguration)if((e=this.raw)!=null&&e.length){const n=this.raw.map(i=>{if(i instanceof Jc)return i;const r=new CSi("",this.logService);return r.parseRaw(i),r.configurationModel});this._rawConfiguration=n.reduce((i,r)=>r===i?r:i.merge(r),n[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?ast(this.contents,e):this.contents}inspect(e,n){const i=this;return{get value(){return PQ(i.rawConfiguration.getValue(e))},get override(){return n?PQ(i.rawConfiguration.getOverrideValue(e,n)):void 0},get merged(){return PQ(n?i.rawConfiguration.override(n).getValue(e):i.rawConfiguration.getValue(e))},get overrides(){const r=[];for(const{contents:o,identifiers:s,keys:a}of i.rawConfiguration.overrides){const l=new Jc(o,a,[],void 0,i.logService).getValue(e);l!==void 0&&r.push({identifiers:s,value:l})}return r.length?PQ(r):void 0}}}getOverrideValue(e,n){const i=this.getContentsForOverrideIdentifer(n);return i?e?ast(i,e):i:void 0}override(e){let n=this.overrideConfigurations.get(e);return n||(n=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,n)),n}merge(...e){var s,a;const n=W1(this.contents),i=W1(this.overrides),r=[...this.keys],o=(s=this.raw)!=null&&s.length?[...this.raw]:[this];for(const l of e)if(o.push(...(a=l.raw)!=null&&a.length?l.raw:[l]),!l.isEmpty()){this.mergeContents(n,l.contents);for(const c of l.overrides){const[u]=i.filter(d=>Xs(d.identifiers,c.identifiers));u?(this.mergeContents(u.contents,c.contents),u.keys.push(...c.keys),u.keys=cS(u.keys)):i.push(W1(c))}for(const c of l.keys)r.indexOf(c)===-1&&r.push(c)}return new Jc(n,r,i,o.every(l=>l instanceof Jc)?void 0:o,this.logService)}createOverrideConfigurationModel(e){const n=this.getContentsForOverrideIdentifer(e);if(!n||typeof n!="object"||!Object.keys(n).length)return this;const i={};for(const r of cS([...Object.keys(this.contents),...Object.keys(n)])){let o=this.contents[r];const s=n[r];s&&(typeof o=="object"&&typeof s=="object"?(o=W1(o),this.mergeContents(o,s)):o=s),i[r]=o}return new Jc(i,this.keys,this.overrides,void 0,this.logService)}mergeContents(e,n){for(const i of Object.keys(n)){if(i in e&&Ic(e[i])&&Ic(n[i])){this.mergeContents(e[i],n[i]);continue}e[i]=W1(n[i])}}getContentsForOverrideIdentifer(e){let n=null,i=null;const r=o=>{o&&(i?this.mergeContents(i,o):i=W1(o))};for(const o of this.overrides)o.identifiers.length===1&&o.identifiers[0]===e?n=o.contents:o.identifiers.includes(e)&&r(o.contents);return r(n),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,n){this.updateValue(e,n,!1)}removeValue(e){const n=this.keys.indexOf(e);n!==-1&&(this.keys.splice(n,1),Mmi(this.contents,e),fk.test(e)&&this.overrides.splice(this.overrides.findIndex(i=>Xs(i.identifiers,Zie(e))),1))}updateValue(e,n,i){if(r3t(this.contents,e,n,r=>this.logService.error(r)),i=i||this.keys.indexOf(e)===-1,i&&this.keys.push(e),fk.test(e)){const r=Zie(e),o={identifiers:r,keys:Object.keys(this.contents[e]),contents:OLe(this.contents[e],a=>this.logService.error(a))},s=this.overrides.findIndex(a=>Xs(a.identifiers,r));s!==-1?this.overrides[s]=o:this.overrides.push(o)}}}class CSi{constructor(e,n){this._name=e,this.logService=n,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||Jc.createEmptyModel(this.logService)}parseRaw(e,n){this._raw=e;const{contents:i,keys:r,overrides:o,restricted:s,hasExcludedProperties:a}=this.doParseRaw(e,n);this._configurationModel=new Jc(i,r,o,a?[e]:void 0,this.logService),this._restrictedConfigurations=s||[]}doParseRaw(e,n){const i=la.as(Yv.Configuration).getConfigurationProperties(),r=this.filter(e,i,!0,n);e=r.raw;const o=OLe(e,l=>this.logService.error(`Conflict in settings file ${this._name}: ${l}`)),s=Object.keys(e),a=this.toOverrides(e,l=>this.logService.error(`Conflict in settings file ${this._name}: ${l}`));return{contents:o,keys:s,overrides:a,restricted:r.restricted,hasExcludedProperties:r.hasExcludedProperties}}filter(e,n,i,r){var l,c,u;let o=!1;if(!(r!=null&&r.scopes)&&!(r!=null&&r.skipRestricted)&&!((l=r==null?void 0:r.exclude)!=null&&l.length))return{raw:e,restricted:[],hasExcludedProperties:o};const s={},a=[];for(const d in e)if(fk.test(d)&&i){const h=this.filter(e[d],n,!1,r);s[d]=h.raw,o=o||h.hasExcludedProperties,a.push(...h.restricted)}else{const h=n[d],f=h?typeof h.scope<"u"?h.scope:3:void 0;h!=null&&h.restricted&&a.push(d),!((c=r.exclude)!=null&&c.includes(d))&&((u=r.include)!=null&&u.includes(d)||(f===void 0||r.scopes===void 0||r.scopes.includes(f))&&!(r.skipRestricted&&(h!=null&&h.restricted)))?s[d]=e[d]:o=!0}return{raw:s,restricted:a,hasExcludedProperties:o}}toOverrides(e,n){const i=[];for(const r of Object.keys(e))if(fk.test(r)){const o={};for(const s in e[r])o[s]=e[r][s];i.push({identifiers:Zie(r),keys:Object.keys(o),contents:OLe(o,n)})}return i}}class SSi{constructor(e,n,i,r,o,s,a,l,c,u,d,h,f){this.key=e,this.overrides=n,this._value=i,this.overrideIdentifiers=r,this.defaultConfiguration=o,this.policyConfiguration=s,this.applicationConfiguration=a,this.userConfiguration=l,this.localUserConfiguration=c,this.remoteUserConfiguration=u,this.workspaceConfiguration=d,this.folderConfigurationModel=h,this.memoryConfigurationModel=f}toInspectValue(e){return(e==null?void 0:e.value)!==void 0||(e==null?void 0:e.override)!==void 0||(e==null?void 0:e.overrides)!==void 0?e:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.toInspectValue(this.userInspectValue)}}let N5t=class E5t{constructor(e,n,i,r,o,s,a,l,c,u){this._defaultConfiguration=e,this._policyConfiguration=n,this._applicationConfiguration=i,this._localUserConfiguration=r,this._remoteUserConfiguration=o,this._workspaceConfiguration=s,this._folderConfigurations=a,this._memoryConfiguration=l,this._memoryConfigurationByResource=c,this.logService=u,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new Xl,this._userConfiguration=null}getValue(e,n,i){return this.getConsolidatedConfigurationModel(e,n,i).getValue(e)}updateValue(e,n,i={}){let r;i.resource?(r=this._memoryConfigurationByResource.get(i.resource),r||(r=Jc.createEmptyModel(this.logService),this._memoryConfigurationByResource.set(i.resource,r))):r=this._memoryConfiguration,n===void 0?r.removeValue(e):r.setValue(e,n),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,n,i){const r=this.getConsolidatedConfigurationModel(e,n,i),o=this.getFolderConfigurationModelForResource(n.resource,i),s=n.resource?this._memoryConfigurationByResource.get(n.resource)||this._memoryConfiguration:this._memoryConfiguration,a=new Set;for(const l of r.overrides)for(const c of l.identifiers)r.getOverrideValue(e,c)!==void 0&&a.add(c);return new SSi(e,n,r.getValue(e),a.size?[...a]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,i?this._workspaceConfiguration:void 0,o||void 0,s)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,n,i){let r=this.getConsolidatedConfigurationModelForResource(n,i);return n.overrideIdentifier&&(r=r.override(n.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(e)!==void 0&&(r=r.merge(this._policyConfiguration)),r}getConsolidatedConfigurationModelForResource({resource:e},n){let i=this.getWorkspaceConsolidatedConfiguration();if(n&&e){const r=n.getFolder(e);r&&(i=this.getFolderConsolidatedConfiguration(r.uri)||i);const o=this._memoryConfigurationByResource.get(e);o&&(i=i.merge(o))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let n=this._foldersConsolidatedConfigurations.get(e);if(!n){const i=this.getWorkspaceConsolidatedConfiguration(),r=this._folderConfigurations.get(e);r?(n=i.merge(r),this._foldersConsolidatedConfigurations.set(e,n)):n=i}return n}getFolderConfigurationModelForResource(e,n){if(n&&e){const i=n.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,n)=>{const{contents:i,overrides:r,keys:o}=this._folderConfigurations.get(n);return e.push([n,{contents:i,overrides:r,keys:o}]),e},[])}}static parse(e,n){const i=this.parseConfigurationModel(e.defaults,n),r=this.parseConfigurationModel(e.policy,n),o=this.parseConfigurationModel(e.application,n),s=this.parseConfigurationModel(e.user,n),a=this.parseConfigurationModel(e.workspace,n),l=e.folders.reduce((c,u)=>(c.set(ri.revive(u[0]),this.parseConfigurationModel(u[1],n)),c),new Xl);return new E5t(i,r,o,s,Jc.createEmptyModel(n),a,l,Jc.createEmptyModel(n),new Xl,n)}static parseConfigurationModel(e,n){return new Jc(e.contents,e.keys,e.overrides,void 0,n)}};class NSi{constructor(e,n,i,r,o){this.change=e,this.previous=n,this.currentConfiguraiton=i,this.currentWorkspace=r,this.logService=o,this._marker=`
`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=46,this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const s of e.keys)this.affectedKeys.add(s);for(const[,s]of e.overrides)for(const a of s)this.affectedKeys.add(a);this._affectsConfigStr=this._marker;for(const s of this.affectedKeys)this._affectsConfigStr+=s+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=N5t.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(e,n){var a;const i=this._marker+e,r=this._affectsConfigStr.indexOf(i);if(r<0)return!1;const o=r+i.length;if(o>=this._affectsConfigStr.length)return!1;const s=this._affectsConfigStr.charCodeAt(o);if(s!==this._markerCode1&&s!==this._markerCode2)return!1;if(n){const l=this.previousConfiguration?this.previousConfiguration.getValue(e,n,(a=this.previous)==null?void 0:a.workspace):void 0,c=this.currentConfiguraiton.getValue(e,n,this.currentWorkspace);return!Lp(l,c)}return!0}}const jre={kind:0},ESi={kind:1};function DSi(t,e,n){return{kind:2,commandId:t,commandArgs:e,isBubble:n}}class cB{constructor(e,n,i){var r;this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const o of e){const s=o.command;s&&s.charAt(0)!=="-"&&this._defaultBoundCommands.set(s,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=cB.handleRemovals([].concat(e).concat(n));for(let o=0,s=this._keybindings.length;o<s;o++){const a=this._keybindings[o];if(a.chords.length===0)continue;const l=(r=a.when)==null?void 0:r.substituteConstants();l&&l.type===0||this._addKeyPress(a.chords[0],a)}}static _isTargetedForRemoval(e,n,i){if(n){for(let r=0;r<n.length;r++)if(n[r]!==e.chords[r])return!1}return!(i&&i.type!==1&&(!e.when||!Wfi(i,e.when)))}static handleRemovals(e){const n=new Map;for(let r=0,o=e.length;r<o;r++){const s=e[r];if(s.command&&s.command.charAt(0)==="-"){const a=s.command.substring(1);n.has(a)?n.get(a).push(s):n.set(a,[s])}}if(n.size===0)return e;const i=[];for(let r=0,o=e.length;r<o;r++){const s=e[r];if(!s.command||s.command.length===0){i.push(s);continue}if(s.command.charAt(0)==="-")continue;const a=n.get(s.command);if(!a||!s.isDefault){i.push(s);continue}let l=!1;for(const c of a){const u=c.when;if(this._isTargetedForRemoval(s,c.chords,u)){l=!0;break}}if(!l){i.push(s);continue}}return i}_addKeyPress(e,n){const i=this._map.get(e);if(typeof i>"u"){this._map.set(e,[n]),this._addToLookupMap(n);return}for(let r=i.length-1;r>=0;r--){const o=i[r];if(o.command===n.command)continue;let s=!0;for(let a=1;a<o.chords.length&&a<n.chords.length;a++)if(o.chords[a]!==n.chords[a]){s=!1;break}s&&cB.whenIsEntirelyIncluded(o.when,n.when)&&this._removeFromLookupMap(o)}i.push(n),this._addToLookupMap(n)}_addToLookupMap(e){if(!e.command)return;let n=this._lookupMap.get(e.command);typeof n>"u"?(n=[e],this._lookupMap.set(e.command,n)):n.push(e)}_removeFromLookupMap(e){if(!e.command)return;const n=this._lookupMap.get(e.command);if(!(typeof n>"u")){for(let i=0,r=n.length;i<r;i++)if(n[i]===e){n.splice(i,1);return}}}static whenIsEntirelyIncluded(e,n){return!n||n.type===1?!0:!e||e.type===1?!1:ILe(e,n)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(e,n){const i=this._lookupMap.get(e);if(typeof i>"u"||i.length===0)return null;if(i.length===1)return i[0];for(let r=i.length-1;r>=0;r--){const o=i[r];if(n.contextMatchesRules(o.when))return o}return i[i.length-1]}resolve(e,n,i){const r=[...n,i];this._log(`| Resolving ${r}`);const o=this._map.get(r[0]);if(o===void 0)return this._log("\\ No keybinding entries."),jre;let s=null;if(r.length<2)s=o;else{s=[];for(let l=0,c=o.length;l<c;l++){const u=o[l];if(r.length>u.chords.length)continue;let d=!0;for(let h=1;h<r.length;h++)if(u.chords[h]!==r[h]){d=!1;break}d&&s.push(u)}}const a=this._findCommand(e,s);return a?r.length<a.chords.length?(this._log(`\\ From ${s.length} keybinding entries, awaiting ${a.chords.length-r.length} more chord(s), when: ${$lt(a.when)}, source: ${Vlt(a)}.`),ESi):(this._log(`\\ From ${s.length} keybinding entries, matched ${a.command}, when: ${$lt(a.when)}, source: ${Vlt(a)}.`),DSi(a.command,a.commandArgs,a.bubble)):(this._log(`\\ From ${s.length} keybinding entries, no when clauses matched the context.`),jre)}_findCommand(e,n){for(let i=n.length-1;i>=0;i--){const r=n[i];if(cB._contextMatchesRules(e,r.when))return r}return null}static _contextMatchesRules(e,n){return n?n.evaluate(e):!0}}function $lt(t){return t?`${t.serialize()}`:"no when condition"}function Vlt(t){return t.extensionId?t.isBuiltinExtension?`built-in extension ${t.extensionId}`:`user extension ${t.extensionId}`:t.isDefault?"built-in":"user"}const kSi=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class MSi extends ct{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:rn.None}get inChordMode(){return this._currentChords.length>0}constructor(e,n,i,r,o){super(),this._contextKeyService=e,this._commandService=n,this._telemetryService=i,this._notificationService=r,this._logService=o,this._onDidUpdateKeybindings=this._register(new st),this._currentChords=[],this._currentChordChecker=new k8e,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=v4.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new Gv,this._currentlyDispatchingCommandId=null,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,n){const i=this._getResolver().lookupPrimaryKeybinding(e,n||this._contextKeyService);if(i)return i.resolvedKeybinding}dispatchEvent(e,n){return this._dispatch(e,n)}softDispatch(e,n){this._log("/ Soft dispatching keyboard event");const i=this.resolveKeyboardEvent(e);if(i.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),jre;const[r]=i.getDispatchChords();if(r===null)return this._log("\\ Keyboard event cannot be dispatched"),jre;const o=this._contextKeyService.getContext(n),s=this._currentChords.map(({keypress:a})=>a);return this._getResolver().resolve(o,s,r)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-e>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(e,n){switch(this._currentChords.push({keypress:e,label:n}),this._currentChords.length){case 0:throw f8e("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(I("first.chord","({0}) was pressed. Waiting for second key of chord...",n));break;default:{const i=this._currentChords.map(({label:r})=>r).join(", ");this._currentChordStatusMessage=this._notificationService.status(I("next.chord","({0}) was pressed. Waiting for next key of chord...",i))}}this._scheduleLeaveChordMode(),G9.enabled&&G9.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],G9.enable()}_dispatch(e,n){return this._doDispatch(this.resolveKeyboardEvent(e),n,!1)}_singleModifierDispatch(e,n){const i=this.resolveKeyboardEvent(e),[r]=i.getSingleModifierDispatchChords();if(r)return this._ignoreSingleModifiers.has(r)?(this._log(`+ Ignoring single modifier ${r} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=v4.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=v4.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${r}.`),this._currentSingleModifier=r,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):r===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${r} ${r}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,n,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${r}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[o]=i.getChords();return this._ignoreSingleModifiers=new v4(o),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,n,i=!1){let r=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let o=null,s=null;if(i){const[u]=e.getSingleModifierDispatchChords();o=u,s=u?[u]:[]}else[o]=e.getDispatchChords(),s=this._currentChords.map(({keypress:u})=>u);if(o===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),r;const a=this._contextKeyService.getContext(n),l=e.getLabel(),c=this._getResolver().resolve(a,s,o);switch(c.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",l,"[ No matching keybinding ]"),this.inChordMode){const u=this._currentChords.map(({label:d})=>d).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${u}, ${l}".`),this._notificationService.status(I("missing.chord","The key combination ({0}, {1}) is not a command.",u,l),{hideAfter:10*1e3}),this._leaveChordMode(),r=!0}return r}case 1:return this._logService.trace("KeybindingService#dispatch",l,"[ Several keybindings match - more chords needed ]"),r=!0,this._expectAnotherChord(o,l),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),r;case 2:{if(this._logService.trace("KeybindingService#dispatch",l,`[ Will dispatch command ${c.commandId} ]`),c.commandId===null||c.commandId===""){if(this.inChordMode){const u=this._currentChords.map(({label:d})=>d).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${u}, ${l}".`),this._notificationService.status(I("missing.chord","The key combination ({0}, {1}) is not a command.",u,l),{hideAfter:10*1e3}),this._leaveChordMode(),r=!0}}else{this.inChordMode&&this._leaveChordMode(),c.isBubble||(r=!0),this._log(`+ Invoking command ${c.commandId}.`),this._currentlyDispatchingCommandId=c.commandId;try{typeof c.commandArgs>"u"?this._commandService.executeCommand(c.commandId).then(void 0,u=>this._notificationService.warn(u)):this._commandService.executeCommand(c.commandId,c.commandArgs).then(void 0,u=>this._notificationService.warn(u))}finally{this._currentlyDispatchingCommandId=null}kSi.test(c.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:c.commandId,from:"keybinding",detail:e.getUserSettingsLabel()??void 0})}return r}}}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}}const ece=class ece{constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}};ece.EMPTY=new ece(null);let v4=ece;class Blt{constructor(e,n,i,r,o,s,a){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?nIe(e.getDispatchChords()):[],e&&this.chords.length===0&&(this.chords=nIe(e.getSingleModifierDispatchChords())),this.bubble=n?n.charCodeAt(0)===94:!1,this.command=this.bubble?n.substr(1):n,this.commandArgs=i,this.when=r,this.isDefault=o,this.extensionId=s,this.isBuiltinExtension=a}}function nIe(t){const e=[];for(let n=0,i=t.length;n<i;n++){const r=t[n];if(!r)return[];e.push(r)}return e}class vme{constructor(e,n,i=n){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=n,this.modifierLabels[3]=i}toLabel(e,n,i){if(n.length===0)return null;const r=[];for(let o=0,s=n.length;o<s;o++){const a=n[o],l=i(a);if(l===null)return null;r[o]=ASi(a,l,this.modifierLabels[e])}return r.join(" ")}}const a7e=new vme({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:I({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:I({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:I({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:I({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:I({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:I({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:I({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:I({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),LSi=new vme({ctrlKey:I({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:I({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:I({key:"optKey.long",comment:["This is the long form for the Alt/Option key on the keyboard"]},"Option"),metaKey:I({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:I({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:I({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:I({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:I({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:I({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:I({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:I({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:I({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"}),TSi=new vme({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"}),ISi=new vme({ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"cmd",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"win",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"meta",separator:"+"});function ASi(t,e,n){if(e===null)return"";const i=[];return t.ctrlKey&&i.push(n.ctrlKey),t.shiftKey&&i.push(n.shiftKey),t.altKey&&i.push(n.altKey),t.metaKey&&i.push(n.metaKey),e!==""&&i.push(e),i.join(n.separator)}class RSi extends uhi{constructor(e,n){if(super(),n.length===0)throw Jg("chords");this._os=e,this._chords=n}getLabel(){return a7e.toLabel(this._os,this._chords,e=>this._getLabel(e))}getAriaLabel(){return LSi.toLabel(this._os,this._chords,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:TSi.toLabel(this._os,this._chords,e=>this._getElectronAccelerator(e))}getUserSettingsLabel(){return ISi.toLabel(this._os,this._chords,e=>this._getUserSettingsLabel(e))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(e=>this._getChord(e))}_getChord(e){return new chi(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map(e=>this._getChordDispatch(e))}getSingleModifierDispatchChords(){return this._chords.map(e=>this._getSingleModifierChordDispatch(e))}}class iW extends RSi{constructor(e,n){super(n,e)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return Z1.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":Z1.toString(e.keyCode)}_getElectronAccelerator(e){return Z1.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const n=Z1.toUserSettingsUS(e.keyCode);return n&&n.toLowerCase()}_getChordDispatch(e){return iW.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let n="";return e.ctrlKey&&(n+="ctrl+"),e.shiftKey&&(n+="shift+"),e.altKey&&(n+="alt+"),e.metaKey&&(n+="meta+"),n+=Z1.toString(e.keyCode),n}_getSingleModifierChordDispatch(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){const n=b8e[e];if(n!==-1)return n;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof hS)return e;const n=this._scanCodeToKeyCode(e.scanCode);return n===0?null:new hS(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,n)}static resolveKeybinding(e,n){const i=nIe(e.chords.map(r=>this._toKeyCodeChord(r)));return i.length>0?[new iW(i,n)]:[]}}const g5=Sr("labelService"),D5t=Sr("progressService"),GWe=class GWe{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}};GWe.None=Object.freeze({report(){}});let Ux=GWe;const oM=Sr("editorProgressService");class PSi{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(e){const n=e.charCodeAt(0),i=this._value.charCodeAt(this._pos);return n-i}value(){return this._value[this._pos]}}class OSi{constructor(e=!0){this._caseSensitive=e}reset(e){return this._value=e,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(e)this._from++;else break;else e=!1;return this}cmp(e){return this._caseSensitive?y8e(e,this._value,0,e.length,this._from,this._to):pq(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class jSi{constructor(e=!0,n=!0){this._splitOnBackslash=e,this._caseSensitive=n}reset(e){this._from=0,this._to=0,this._value=e,this._valueLen=e.length;for(let n=e.length-1;n>=0;n--,this._valueLen--){const i=this._value.charCodeAt(n);if(!(i===47||this._splitOnBackslash&&i===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let e=!0;for(;this._to<this._valueLen;this._to++){const n=this._value.charCodeAt(this._to);if(n===47||this._splitOnBackslash&&n===92)if(e)this._from++;else break;else e=!1}return this}cmp(e){return this._caseSensitive?y8e(e,this._value,0,e.length,this._from,this._to):pq(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class FSi{constructor(e,n){this._ignorePathCasing=e,this._ignoreQueryAndFragment=n,this._states=[],this._stateIdx=0}reset(e){return this._value=e,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new jSi(!1,!this._ignorePathCasing(e)),this._pathIterator.reset(e.path),this._pathIterator.value()&&this._states.push(3)),this._ignoreQueryAndFragment(e)||(this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5)),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(e){if(this._states[this._stateIdx]===1)return bLe(e,this._value.scheme);if(this._states[this._stateIdx]===2)return bLe(e,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(e);if(this._states[this._stateIdx]===4)return CH(e,this._value.query);if(this._states[this._stateIdx]===5)return CH(e,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.fragment;throw new Error}}class OQ{constructor(){this.height=1}rotateLeft(){const e=this.right;return this.right=e.left,e.left=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){const e=this.left;return this.left=e.right,e.right=this,this.updateHeight(),e.updateHeight(),e}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){var e;return((e=this.left)==null?void 0:e.height)??0}get heightRight(){var e;return((e=this.right)==null?void 0:e.height)??0}}class A3{static forUris(e=()=>!1,n=()=>!1){return new A3(new FSi(e,n))}static forStrings(){return new A3(new PSi)}static forConfigKeys(){return new A3(new OSi)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,n){const i=this._iter.reset(e);let r;this._root||(this._root=new OQ,this._root.segment=i.value());const o=[];for(r=this._root;;){const a=i.cmp(r.segment);if(a>0)r.left||(r.left=new OQ,r.left.segment=i.value()),o.push([-1,r]),r=r.left;else if(a<0)r.right||(r.right=new OQ,r.right.segment=i.value()),o.push([1,r]),r=r.right;else if(i.hasNext())i.next(),r.mid||(r.mid=new OQ,r.mid.segment=i.value()),o.push([0,r]),r=r.mid;else break}const s=r.value;r.value=n,r.key=e;for(let a=o.length-1;a>=0;a--){const l=o[a][1];l.updateHeight();const c=l.balanceFactor();if(c<-1||c>1){const u=o[a][0],d=o[a+1][0];if(u===1&&d===1)o[a][1]=l.rotateLeft();else if(u===-1&&d===-1)o[a][1]=l.rotateRight();else if(u===1&&d===-1)l.right=o[a+1][1]=o[a+1][1].rotateRight(),o[a][1]=l.rotateLeft();else if(u===-1&&d===1)l.left=o[a+1][1]=o[a+1][1].rotateLeft(),o[a][1]=l.rotateRight();else throw new Error;if(a>0)switch(o[a-1][0]){case-1:o[a-1][1].left=o[a][1];break;case 1:o[a-1][1].right=o[a][1];break;case 0:o[a-1][1].mid=o[a][1];break}else this._root=o[0][1]}}return s}get(e){var n;return(n=this._getNode(e))==null?void 0:n.value}_getNode(e){const n=this._iter.reset(e);let i=this._root;for(;i;){const r=n.cmp(i.segment);if(r>0)i=i.left;else if(r<0)i=i.right;else if(n.hasNext())n.next(),i=i.mid;else break}return i}has(e){const n=this._getNode(e);return!((n==null?void 0:n.value)===void 0&&(n==null?void 0:n.mid)===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,n){const i=this._iter.reset(e),r=[];let o=this._root;for(;o;){const s=i.cmp(o.segment);if(s>0)r.push([-1,o]),o=o.left;else if(s<0)r.push([1,o]),o=o.right;else if(i.hasNext())i.next(),r.push([0,o]),o=o.mid;else break}if(o){if(n?(o.left=void 0,o.mid=void 0,o.right=void 0,o.height=1):(o.key=void 0,o.value=void 0),!o.mid&&!o.value)if(o.left&&o.right){const s=this._min(o.right);if(s.key){const{key:a,value:l,segment:c}=s;this._delete(s.key,!1),o.key=a,o.value=l,o.segment=c}}else{const s=o.left??o.right;if(r.length>0){const[a,l]=r[r.length-1];switch(a){case-1:l.left=s;break;case 0:l.mid=s;break;case 1:l.right=s;break}}else this._root=s}for(let s=r.length-1;s>=0;s--){const a=r[s][1];a.updateHeight();const l=a.balanceFactor();if(l>1?(a.right.balanceFactor()>=0||(a.right=a.right.rotateRight()),r[s][1]=a.rotateLeft()):l<-1&&(a.left.balanceFactor()<=0||(a.left=a.left.rotateLeft()),r[s][1]=a.rotateRight()),s>0)switch(r[s-1][0]){case-1:r[s-1][1].left=r[s][1];break;case 1:r[s-1][1].right=r[s][1];break;case 0:r[s-1][1].mid=r[s][1];break}else this._root=r[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const n=this._iter.reset(e);let i=this._root,r;for(;i;){const o=n.cmp(i.segment);if(o>0)i=i.left;else if(o<0)i=i.right;else if(n.hasNext())n.next(),r=i.value||r,i=i.mid;else break}return i&&i.value||r}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,n){const i=this._iter.reset(e);let r=this._root;for(;r;){const o=i.cmp(r.segment);if(o>0)r=r.left;else if(o<0)r=r.right;else if(i.hasNext())i.next(),r=r.mid;else return r.mid?this._entries(r.mid):n?r.value:void 0}}forEach(e){for(const[n,i]of this)e(i,n)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const n=[];return this._dfsEntries(e,n),n[Symbol.iterator]()}_dfsEntries(e,n){e&&(e.left&&this._dfsEntries(e.left,n),e.value&&n.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,n),e.right&&this._dfsEntries(e.right,n))}}const Z2=Sr("contextService");function iIe(t){const e=t;return typeof(e==null?void 0:e.id)=="string"&&ri.isUri(e.uri)}function $Si(t){const e=t;return typeof(e==null?void 0:e.id)=="string"&&!iIe(t)&&!zSi(t)}const VSi={id:"empty-window"};function BSi(t,e){if(typeof t=="string"||typeof t>"u")return typeof t=="string"?{id:pD(t)}:VSi;const n=t;return n.configuration?{id:n.id,configPath:n.configuration}:n.folders.length===1?{id:n.id,uri:n.folders[0].uri}:{id:n.id}}function zSi(t){const e=t;return typeof(e==null?void 0:e.id)=="string"&&ri.isUri(e.configPath)}class HSi{constructor(e,n){this.raw=n,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const rIe="code-workspace";I("codeWorkspace","Code Workspace");const k5t="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function WSi(t){return t.id===k5t}var oIe;(function(t){t.inspectTokensAction=I("inspectTokens","Developer: Inspect Tokens")})(oIe||(oIe={}));var Fre;(function(t){t.gotoLineActionLabel=I("gotoLineActionLabel","Go to Line/Column...")})(Fre||(Fre={}));var sIe;(function(t){t.helpQuickAccessActionLabel=I("helpQuickAccess","Show all Quick Access Providers")})(sIe||(sIe={}));var $re;(function(t){t.quickCommandActionLabel=I("quickCommandActionLabel","Command Palette"),t.quickCommandHelp=I("quickCommandActionHelp","Show And Run Commands")})($re||($re={}));var rW;(function(t){t.quickOutlineActionLabel=I("quickOutlineActionLabel","Go to Symbol..."),t.quickOutlineByCategoryActionLabel=I("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(rW||(rW={}));var Vre;(function(t){t.editorViewAccessibleLabel=I("editorViewAccessibleLabel","Editor content"),t.accessibilityHelpMessage=I("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(Vre||(Vre={}));var aIe;(function(t){t.toggleHighContrast=I("toggleHighContrast","Toggle High Contrast Theme")})(aIe||(aIe={}));var lIe;(function(t){t.bulkEditServiceSummary=I("bulkEditServiceSummary","Made {0} edits in {1} files")})(lIe||(lIe={}));const M5t=Sr("workspaceTrustManagementService");let b5=[],l7e=[],L5t=[];function jQ(t,e=!1){USi(t,!1,e)}function USi(t,e,n){const i=KSi(t,e);b5.push(i),i.userConfigured?L5t.push(i):l7e.push(i),n&&!i.userConfigured&&b5.forEach(r=>{r.mime===i.mime||r.userConfigured||(i.extension&&r.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&r.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&r.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&r.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))})}function KSi(t,e){return{id:t.id,mime:t.mime,filename:t.filename,extension:t.extension,filepattern:t.filepattern,firstline:t.firstline,userConfigured:e,filenameLowercase:t.filename?t.filename.toLowerCase():void 0,extensionLowercase:t.extension?t.extension.toLowerCase():void 0,filepatternLowercase:t.filepattern?o5t(t.filepattern.toLowerCase()):void 0,filepatternOnPath:t.filepattern?t.filepattern.indexOf(Dl.sep)>=0:!1}}function qSi(){b5=b5.filter(t=>t.userConfigured),l7e=[]}function GSi(t,e){return YSi(t,e).map(n=>n.id)}function YSi(t,e){let n;if(t)switch(t.scheme){case Ti.file:n=t.fsPath;break;case Ti.data:{n=bk.parseMetaData(t).get(bk.META_DATA_LABEL);break}case Ti.vscodeNotebookCell:n=void 0;break;default:n=t.path}if(!n)return[{id:"unknown",mime:Pa.unknown}];n=n.toLowerCase();const i=pD(n),r=zlt(n,i,L5t);if(r)return[r,{id:Ph,mime:Pa.text}];const o=zlt(n,i,l7e);if(o)return[o,{id:Ph,mime:Pa.text}];if(e){const s=XSi(e);if(s)return[s,{id:Ph,mime:Pa.text}]}return[{id:"unknown",mime:Pa.unknown}]}function zlt(t,e,n){var s;let i,r,o;for(let a=n.length-1;a>=0;a--){const l=n[a];if(e===l.filenameLowercase){i=l;break}if(l.filepattern&&(!r||l.filepattern.length>r.filepattern.length)){const c=l.filepatternOnPath?t:e;(s=l.filepatternLowercase)!=null&&s.call(l,c)&&(r=l)}l.extension&&(!o||l.extension.length>o.extension.length)&&e.endsWith(l.extensionLowercase)&&(o=l)}if(i)return i;if(r)return r;if(o)return o}function XSi(t){if(N8e(t)&&(t=t.substr(1)),t.length>0)for(let e=b5.length-1;e>=0;e--){const n=b5[e];if(!n.firstline)continue;const i=t.match(n.firstline);if(i&&i.length>0)return n}}const FQ=Object.prototype.hasOwnProperty,Hlt="vs.editor.nullLanguage";class ZSi{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(Hlt,0),this._register(Ph,1),this._nextLanguageId=2}_register(e,n){this._languageIdToLanguage[n]=e,this._languageToLanguageId.set(e,n)}register(e){if(this._languageToLanguageId.has(e))return;const n=this._nextLanguageId++;this._register(e,n)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||Hlt}}const ez=class ez extends ct{constructor(e=!0,n=!1){super(),this._onDidChange=this._register(new st),this.onDidChange=this._onDidChange.event,ez.instanceCount++,this._warnOnOverwrite=n,this.languageIdCodec=new ZSi,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(r5.onDidChangeLanguages(i=>{this._initializeFromRegistry()})))}dispose(){ez.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},qSi();const e=[].concat(r5.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const n of e)this._registerLanguage(n);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(n=>{const i=this._languages[n];i.name&&(this._nameMap[i.name]=i.identifier),i.aliases.forEach(r=>{this._lowercaseNameMap[r.toLowerCase()]=i.identifier}),i.mimetypes.forEach(r=>{this._mimeTypesMap[r]=i.identifier})}),la.as(Yv.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const n=e.id;let i;FQ.call(this._languages,n)?i=this._languages[n]:(this.languageIdCodec.register(n),i={identifier:n,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[n]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,n){const i=n.id;let r=null;if(Array.isArray(n.mimetypes)&&n.mimetypes.length>0&&(e.mimetypes.push(...n.mimetypes),r=n.mimetypes[0]),r||(r=`text/x-${i}`,e.mimetypes.push(r)),Array.isArray(n.extensions)){n.configuration?e.extensions=n.extensions.concat(e.extensions):e.extensions=e.extensions.concat(n.extensions);for(const a of n.extensions)jQ({id:i,mime:r,extension:a},this._warnOnOverwrite)}if(Array.isArray(n.filenames))for(const a of n.filenames)jQ({id:i,mime:r,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(n.filenamePatterns))for(const a of n.filenamePatterns)jQ({id:i,mime:r,filepattern:a},this._warnOnOverwrite);if(typeof n.firstLine=="string"&&n.firstLine.length>0){let a=n.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{const l=new RegExp(a);Ydi(l)||jQ({id:i,mime:r,firstline:l},this._warnOnOverwrite)}catch(l){console.warn(`[${n.id}]: Invalid regular expression \`${a}\`: `,l)}}e.aliases.push(i);let o=null;if(typeof n.aliases<"u"&&Array.isArray(n.aliases)&&(n.aliases.length===0?o=[null]:o=n.aliases),o!==null)for(const a of o)!a||a.length===0||e.aliases.push(a);const s=o!==null&&o.length>0;if(!(s&&o[0]===null)){const a=(s?o[0]:null)||i;(s||!e.name)&&(e.name=a)}n.configuration&&e.configurationFiles.push(n.configuration),n.icon&&e.icons.push(n.icon)}isRegisteredLanguageId(e){return e?FQ.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const n=e.toLowerCase();return FQ.call(this._lowercaseNameMap,n)?this._lowercaseNameMap[n]:null}getLanguageIdByMimeType(e){return e&&FQ.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,n){return!e&&!n?[]:GSi(e,n)}};ez.instanceCount=0;let cIe=ez;const tz=class tz extends ct{constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new st),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new st),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new st({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,tz.instanceCount++,this._registry=this._register(new cIe(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){tz.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,n){const i=this._registry.guessLanguageIdByFilepathOrFirstLine(e,n);return s8e(i,null)}createById(e){return new Wlt(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,n){return new Wlt(this.onDidChange,()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,n);return this._createAndGetLanguageIdentifier(i)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=Ph),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),Ca.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}};tz.instanceCount=0;let uIe=tz;class Wlt{constructor(e,n){this._onDidChangeLanguages=e,this._selector=n,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new st({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var n;const e=this._selector();e!==this.languageId&&(this.languageId=e,(n=this._emitter)==null||n.fire(this.languageId))}}const oW={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:Pa.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"},QSi=()=>({get delay(){return-1},dispose:()=>{},showHover:()=>{}});let yme=QSi;const JSi=new U0(()=>yme("mouse",!1)),eNi=new U0(()=>yme("element",!1));function tNi(t){yme=t}function Yh(t){return t==="element"?eNi.value:JSi.value}function v5(){return yme("element",!0)}let T5t={showHover:()=>{},hideHover:()=>{},showAndFocusLastHover:()=>{},setupManagedHover:()=>null,showManagedHover:()=>{}};function nNi(t){T5t=t}function d_(){return T5t}class iNi{constructor(e){this.spliceables=e}splice(e,n,i){this.spliceables.forEach(r=>r.splice(e,n,i))}}class gL extends Error{constructor(e,n){super(`ListError [${e}] ${n}`)}}function Ult(t,e){const n=[];for(const i of e){if(t.start>=i.range.end)continue;if(t.end<i.range.start)break;const r=ed.intersect(t,i.range);ed.isEmpty(r)||n.push({range:r,size:i.size})}return n}function dIe({start:t,end:e},n){return{start:t+n,end:e+n}}function rNi(t){const e=[];let n=null;for(const i of t){const r=i.range.start,o=i.range.end,s=i.size;if(n&&s===n.size){n.range.end=o;continue}n={range:{start:r,end:o},size:s},e.push(n)}return e}function oNi(...t){return rNi(t.reduce((e,n)=>e.concat(n),[]))}class sNi{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,n,i=[]){const r=i.length-n,o=Ult({start:0,end:e},this.groups),s=Ult({start:e+n,end:Number.POSITIVE_INFINITY},this.groups).map(l=>({range:dIe(l.range,r),size:l.size})),a=i.map((l,c)=>({range:{start:e+c,end:e+c+1},size:l.size}));this.groups=oNi(o,a,s),this._size=this._paddingTop+this.groups.reduce((l,c)=>l+c.size*(c.range.end-c.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e<this._paddingTop)return 0;let n=0,i=this._paddingTop;for(const r of this.groups){const o=r.range.end-r.range.start,s=i+o*r.size;if(e<s)return n+Math.floor((e-i)/r.size);n+=o,i=s}return n}indexAfter(e){return Math.min(this.indexAt(e)+1,this.count)}positionAt(e){if(e<0)return-1;let n=0,i=0;for(const r of this.groups){const o=r.range.end-r.range.start,s=i+o;if(e<s)return this._paddingTop+n+(e-i)*r.size;n+=o*r.size,i=s}return-1}}class aNi{constructor(e){this.renderers=e,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(e){let n=this.getTemplateCache(e).pop(),i=!1;if(n)i=this.transactionNodesPendingRemoval.has(n.domNode),i&&this.transactionNodesPendingRemoval.delete(n.domNode);else{const r=Xt(".monaco-list-row"),s=this.getRenderer(e).renderTemplate(r);n={domNode:r,templateId:e,templateData:s}}return{row:n,isReusingConnectedDomNode:i}}release(e){e&&this.releaseRow(e)}transact(e){if(this.inTransaction)throw new Error("Already in transaction");this.inTransaction=!0;try{e()}finally{for(const n of this.transactionNodesPendingRemoval)this.doRemoveNode(n);this.transactionNodesPendingRemoval.clear(),this.inTransaction=!1}}releaseRow(e){const{domNode:n,templateId:i}=e;n&&(this.inTransaction?this.transactionNodesPendingRemoval.add(n):this.doRemoveNode(n)),this.getTemplateCache(i).push(e)}doRemoveNode(e){e.classList.remove("scrolling"),e.remove()}getTemplateCache(e){let n=this.cache.get(e);return n||(n=[],this.cache.set(e,n)),n}dispose(){this.cache.forEach((e,n)=>{for(const i of e)this.getRenderer(n).disposeTemplate(i.templateData),i.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const n=this.renderers.get(e);if(!n)throw new Error(`No renderer found for ${e}`);return n}}var KS=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};const bL={CurrentDragAndDropData:void 0},$_={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(t){return[t]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class Rq{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class lNi{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class cNi{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let n=0;n<e.files.length;n++){const i=e.files.item(n);i&&(i.size||i.type)&&this.files.push(i)}}}getData(){return{types:this.types,files:this.files}}}function uNi(t,e){return Array.isArray(t)&&Array.isArray(e)?Xs(t,e):t===e}class dNi{constructor(e){e!=null&&e.getSetSize?this.getSetSize=e.getSetSize.bind(e):this.getSetSize=(n,i,r)=>r,e!=null&&e.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(n,i)=>i+1,e!=null&&e.getRole?this.getRole=e.getRole.bind(e):this.getRole=n=>"listitem",e!=null&&e.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=n=>{}}}const tce=class tce{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const n of this.items)this.measureItemWidth(n);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:Lwe(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,n,i,r=$_){var s,a;if(this.virtualDelegate=n,this.domId=`list_id_${++tce.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new Lv(50),this.splicing=!1,this.dragOverAnimationStopDisposable=ct.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=ct.None,this.onDragLeaveTimeout=ct.None,this.disposables=new Lt,this._onDidChangeContentHeight=new st,this._onDidChangeContentWidth=new st,this.onDidChangeContentHeight=rn.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,r.horizontalScrolling&&r.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=this.createRangeMap(r.paddingTop??0);for(const l of i)this.renderers.set(l.templateId,l);this.cache=this.disposables.add(new aNi(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof r.mouseSupport=="boolean"?r.mouseSupport:!0),this._horizontalScrolling=r.horizontalScrolling??$_.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=typeof r.paddingBottom>"u"?0:r.paddingBottom,this.accessibilityProvider=new dNi(r.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(r.transformOptimization??$_.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(xd.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new O6({forceIntegerValues:!0,smoothScrollDuration:r.smoothScrolling??!1?125:0,scheduleAtNextAnimationFrame:l=>Im(ei(this.domNode),l)})),this.scrollableElement=this.disposables.add(new rme(this.rowsContainer,{alwaysConsumeMouseWheel:r.alwaysConsumeMouseWheel??$_.alwaysConsumeMouseWheel,horizontal:1,vertical:r.verticalScrollMode??$_.verticalScrollMode,useShadows:r.useShadows??$_.useShadows,mouseWheelScrollSensitivity:r.mouseWheelScrollSensitivity,fastScrollSensitivity:r.fastScrollSensitivity,scrollByPage:r.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(yt(this.rowsContainer,hs.Change,l=>this.onTouchChange(l))),this.disposables.add(yt(this.scrollableElement.getDomNode(),"scroll",l=>l.target.scrollTop=0)),this.disposables.add(yt(this.domNode,"dragover",l=>this.onDragOver(this.toDragEvent(l)))),this.disposables.add(yt(this.domNode,"drop",l=>this.onDrop(this.toDragEvent(l)))),this.disposables.add(yt(this.domNode,"dragleave",l=>this.onDragLeave(this.toDragEvent(l)))),this.disposables.add(yt(this.domNode,"dragend",l=>this.onDragEnd(l))),this.setRowLineHeight=r.setRowLineHeight??$_.setRowLineHeight,this.setRowHeight=r.setRowHeight??$_.setRowHeight,this.supportDynamicHeights=r.supportDynamicHeights??$_.supportDynamicHeights,this.dnd=r.dnd??this.disposables.add($_.dnd),this.layout((s=r.initialSize)==null?void 0:s.height,(a=r.initialSize)==null?void 0:a.width)}updateOptions(e){e.paddingBottom!==void 0&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling);let n;if(e.scrollByPage!==void 0&&(n={...n??{},scrollByPage:e.scrollByPage}),e.mouseWheelScrollSensitivity!==void 0&&(n={...n??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&(n={...n??{},fastScrollSensitivity:e.fastScrollSensitivity}),n&&this.scrollableElement.updateOptions(n),e.paddingTop!==void 0&&e.paddingTop!==this.rangeMap.paddingTop){const i=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),r=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(i,Math.max(0,this.lastRenderTop+r),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}createRangeMap(e){return new sNi(e)}splice(e,n,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,n,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,n,i=[]){const r=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o={start:e,end:e+n},s=ed.intersect(r,o),a=new Map;for(let N=s.end-1;N>=s.start;N--){const E=this.items[N];if(E.dragStartDisposable.dispose(),E.checkedDisposable.dispose(),E.row){let D=a.get(E.templateId);D||(D=[],a.set(E.templateId,D));const k=this.renderers.get(E.templateId);k&&k.disposeElement&&k.disposeElement(E.element,N,E.row.templateData,E.size),D.unshift(E.row)}E.row=null,E.stale=!0}const l={start:e+n,end:this.items.length},c=ed.intersect(l,r),u=ed.relativeComplement(l,r),d=i.map(N=>({id:String(this.itemId++),element:N,templateId:this.virtualDelegate.getTemplateId(N),size:this.virtualDelegate.getHeight(N),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(N),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:ct.None,checkedDisposable:ct.None,stale:!1}));let h;e===0&&n>=this.items.length?(this.rangeMap=this.createRangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,d),h=this.items,this.items=d):(this.rangeMap.splice(e,n,d),h=this.items.splice(e,n,...d));const f=i.length-n,m=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),p=dIe(c,f),g=ed.intersect(m,p);for(let N=g.start;N<g.end;N++)this.updateItemInDOM(this.items[N],N);const y=ed.relativeComplement(p,m);for(const N of y)for(let E=N.start;E<N.end;E++)this.removeItemFromDOM(E);const _=u.map(N=>dIe(N,f)),C=[{start:e,end:e+i.length},..._].map(N=>ed.intersect(m,N)).reverse();for(const N of C)for(let E=N.end-1;E>=N.start;E--){const D=this.items[E],k=a.get(D.templateId),M=k==null?void 0:k.pop();this.insertItemInDOM(E,M)}for(const N of a.values())for(const E of N)this.cache.release(E);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),h.map(N=>N.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=Im(ei(this.domNode),()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const n of this.items)typeof n.width<"u"&&(e=Math.max(e,n.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getRenderRange(this.lastRenderTop,this.lastRenderHeight).start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex(n=>n.element===e)}domElement(e){const n=this.items[e].row;return n&&n.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,n){const i={height:typeof e=="number"?e:ofi(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),typeof n<"u"&&(this.renderWidth=n,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof n=="number"?n:Lwe(this.domNode)})}render(e,n,i,r,o,s=!1){const a=this.getRenderRange(n,i),l=ed.relativeComplement(a,e).reverse(),c=ed.relativeComplement(e,a);if(s){const u=ed.intersect(e,a);for(let d=u.start;d<u.end;d++)this.updateItemInDOM(this.items[d],d)}this.cache.transact(()=>{for(const u of c)for(let d=u.start;d<u.end;d++)this.removeItemFromDOM(d);for(const u of l)for(let d=u.end-1;d>=u.start;d--)this.insertItemInDOM(d)}),r!==void 0&&(this.rowsContainer.style.left=`-${r}px`),this.rowsContainer.style.top=`-${n}px`,this.horizontalScrolling&&o!==void 0&&(this.rowsContainer.style.width=`${Math.max(o,this.renderWidth)}px`),this.lastRenderTop=n,this.lastRenderHeight=i}insertItemInDOM(e,n){var l,c;const i=this.items[e];if(!i.row)if(n)i.row=n,i.stale=!0;else{const u=this.cache.alloc(i.templateId);i.row=u.row,i.stale||(i.stale=u.isReusingConnectedDomNode)}const r=this.accessibilityProvider.getRole(i.element)||"listitem";i.row.domNode.setAttribute("role",r);const o=this.accessibilityProvider.isChecked(i.element);if(typeof o=="boolean")i.row.domNode.setAttribute("aria-checked",String(!!o));else if(o){const u=d=>i.row.domNode.setAttribute("aria-checked",String(!!d));u(o.value),i.checkedDisposable=o.onDidChange(()=>u(o.value))}if(i.stale||!i.row.domNode.parentElement){const u=((c=(l=this.items.at(e+1))==null?void 0:l.row)==null?void 0:c.domNode)??null;(i.row.domNode.parentElement!==this.rowsContainer||i.row.domNode.nextElementSibling!==u)&&this.rowsContainer.insertBefore(i.row.domNode,u),i.stale=!1}this.updateItemInDOM(i,e);const s=this.renderers.get(i.templateId);if(!s)throw new Error(`No renderer found for template id ${i.templateId}`);s==null||s.renderElement(i.element,e,i.row.templateData,i.size);const a=this.dnd.getDragURI(i.element);i.dragStartDisposable.dispose(),i.row.domNode.draggable=!!a,a&&(i.dragStartDisposable=yt(i.row.domNode,"dragstart",u=>this.onDragStart(i.element,a,u))),this.horizontalScrolling&&(this.measureItemWidth(i),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=Lwe(e.row.domNode);const n=ei(e.row.domNode).getComputedStyle(e.row.domNode);n.paddingLeft&&(e.width+=parseFloat(n.paddingLeft)),n.paddingRight&&(e.width+=parseFloat(n.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,n){e.row.domNode.style.top=`${this.elementTop(n)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${n}`),e.row.domNode.setAttribute("data-last-element",n===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",n%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,n,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,n))),e.row.domNode.setAttribute("id",this.getElementDomId(n)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const n=this.items[e];if(n.dragStartDisposable.dispose(),n.checkedDisposable.dispose(),n.row){const i=this.renderers.get(n.templateId);i&&i.disposeElement&&i.disposeElement(n.element,e,n.row.templateData,n.size),this.cache.release(n.row),n.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,n){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:n})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return rn.map(this.disposables.add(new Er(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return rn.map(this.disposables.add(new Er(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return rn.filter(rn.map(this.disposables.add(new Er(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>e.browserEvent.button===1,this.disposables)}get onMouseDown(){return rn.map(this.disposables.add(new Er(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return rn.map(this.disposables.add(new Er(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOut(){return rn.map(this.disposables.add(new Er(this.domNode,"mouseout")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return rn.any(rn.map(this.disposables.add(new Er(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),rn.map(this.disposables.add(new Er(this.domNode,hs.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return rn.map(this.disposables.add(new Er(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return rn.map(this.disposables.add(new Er(this.rowsContainer,hs.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){const n=this.getItemIndexFromEventTarget(e.target||null),i=typeof n>"u"?void 0:this.items[n],r=i&&i.element;return{browserEvent:e,index:n,element:r}}toTouchEvent(e){const n=this.getItemIndexFromEventTarget(e.target||null),i=typeof n>"u"?void 0:this.items[n],r=i&&i.element;return{browserEvent:e,index:n,element:r}}toGestureEvent(e){const n=this.getItemIndexFromEventTarget(e.initialTarget||null),i=typeof n>"u"?void 0:this.items[n],r=i&&i.element;return{browserEvent:e,index:n,element:r}}toDragEvent(e){const n=this.getItemIndexFromEventTarget(e.target||null),i=typeof n>"u"?void 0:this.items[n],r=i&&i.element,o=this.getTargetSector(e,n);return{browserEvent:e,index:n,element:r,sector:o}}onScroll(e){try{const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(n,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(n){throw console.error("Got bad scroll event:",e),n}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,n,i){var o,s;if(!i.dataTransfer)return;const r=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(oW.TEXT,n),i.dataTransfer.setDragImage){let a;this.dnd.getDragLabel&&(a=this.dnd.getDragLabel(r,i)),typeof a>"u"&&(a=String(r.length));const l=Xt(".monaco-drag-image");l.textContent=a,(d=>{for(;d&&!d.classList.contains("monaco-workbench");)d=d.parentElement;return d||this.domNode.ownerDocument})(this.domNode).appendChild(l),i.dataTransfer.setDragImage(l,-10,-10),setTimeout(()=>l.remove(),0)}this.domNode.classList.add("dragging"),this.currentDragData=new Rq(r),bL.CurrentDragAndDropData=new lNi(r),(s=(o=this.dnd).onDragStart)==null||s.call(o,this.currentDragData,i)}onDragOver(e){var o,s;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),bL.CurrentDragAndDropData&&bL.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(bL.CurrentDragAndDropData)this.currentDragData=bL.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new cNi}const n=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop=typeof n=="boolean"?n:n.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof n!="boolean"&&((o=n.effect)==null?void 0:o.type)===0?"copy":"move";let i;typeof n!="boolean"&&n.feedback?i=n.feedback:typeof e.index>"u"?i=[-1]:i=[e.index],i=cS(i).filter(a=>a>=-1&&a<this.length).sort((a,l)=>a-l),i=i[0]===-1?[-1]:i;let r=typeof n!="boolean"&&n.effect&&n.effect.position?n.effect.position:"drop-target";if(uNi(this.currentDragFeedback,i)&&this.currentDragFeedbackPosition===r)return!0;if(this.currentDragFeedback=i,this.currentDragFeedbackPosition=r,this.currentDragFeedbackDisposable.dispose(),i[0]===-1)this.domNode.classList.add(r),this.rowsContainer.classList.add(r),this.currentDragFeedbackDisposable=Kn(()=>{this.domNode.classList.remove(r),this.rowsContainer.classList.remove(r)});else{if(i.length>1&&r!=="drop-target")throw new Error("Can't use multiple feedbacks with position different than 'over'");r==="drop-target-after"&&i[0]<this.length-1&&(i[0]+=1,r="drop-target-before");for(const a of i){const l=this.items[a];l.dropTarget=!0,(s=l.row)==null||s.domNode.classList.add(r)}this.currentDragFeedbackDisposable=Kn(()=>{var a;for(const l of i){const c=this.items[l];c.dropTarget=!1,(a=c.row)==null||a.domNode.classList.remove(r)}})}return!0}onDragLeave(e){var n,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=dk(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&((i=(n=this.dnd).onDragLeave)==null||i.call(n,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const n=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,bL.CurrentDragAndDropData=void 0,!(!n||!e.browserEvent.dataTransfer)&&(e.browserEvent.preventDefault(),n.update(e.browserEvent.dataTransfer),this.dnd.drop(n,e.element,e.index,e.sector,e.browserEvent))}onDragEnd(e){var n,i;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,bL.CurrentDragAndDropData=void 0,(i=(n=this.dnd).onDragEnd)==null||i.call(n,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=ct.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const n=I4t(this.domNode).top;this.dragOverAnimationDisposable=vfi(ei(this.domNode),this.animateDragAndDropScrollTop.bind(this,n))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=dk(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)return;const n=this.dragOverMouseY-e,i=this.renderHeight-35;n<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(n-35))):n>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(n-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getTargetSector(e,n){if(n===void 0)return;const i=e.offsetY/this.items[n].size,r=Math.floor(i/.25);return bh(r,0,3)}getItemIndexFromEventTarget(e){const n=this.scrollableElement.getDomNode();let i=e;for(;(uc(i)||dfi(i))&&i!==this.rowsContainer&&n.contains(i);){const r=i.getAttribute("data-index");if(r){const o=Number(r);if(!isNaN(o))return o}i=i.parentElement}}getRenderRange(e,n){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+n-1)}}_rerender(e,n,i){const r=this.getRenderRange(e,n);let o,s;e===this.elementTop(r.start)?(o=r.start,s=0):r.end-r.start>1&&(o=r.start+1,s=this.elementTop(o)-e);let a=0;for(;;){const l=this.getRenderRange(e,n);let c=!1;for(let u=l.start;u<l.end;u++){const d=this.probeDynamicHeight(u);d!==0&&this.rangeMap.splice(u,1,[this.items[u]]),a+=d,c=c||d!==0}if(!c){a!==0&&this.eventuallyUpdateScrollDimensions();const u=ed.relativeComplement(r,l);for(const h of u)for(let f=h.start;f<h.end;f++)this.items[f].row&&this.removeItemFromDOM(f);const d=ed.relativeComplement(l,r).reverse();for(const h of d)for(let f=h.end-1;f>=h.start;f--)this.insertItemInDOM(f);for(let h=l.start;h<l.end;h++)this.items[h].row&&this.updateItemInDOM(this.items[h],h);if(typeof o=="number"){const h=this.scrollable.getFutureScrollPosition().scrollTop-e,f=this.elementTop(o)-s+h;this.setScrollTop(f,i)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(e){var s,a,l;const n=this.items[e];if(this.virtualDelegate.getDynamicHeight){const c=this.virtualDelegate.getDynamicHeight(n.element);if(c!==null){const u=n.size;return n.size=c,n.lastDynamicHeightWidth=this.renderWidth,c-u}}if(!n.hasDynamicHeight||n.lastDynamicHeightWidth===this.renderWidth||this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(n.element))return 0;const i=n.size;if(n.row)return n.row.domNode.style.height="",n.size=n.row.domNode.offsetHeight,n.size===0&&!ac(n.row.domNode,ei(n.row.domNode).document.body)&&console.warn("Measuring item node that is not in DOM! Add ListView to the DOM before measuring row height!"),n.lastDynamicHeightWidth=this.renderWidth,n.size-i;const{row:r}=this.cache.alloc(n.templateId);r.domNode.style.height="",this.rowsContainer.appendChild(r.domNode);const o=this.renderers.get(n.templateId);if(!o)throw new co("Missing renderer for templateId: "+n.templateId);return o.renderElement(n.element,e,r.templateData,void 0),n.size=r.domNode.offsetHeight,(s=o.disposeElement)==null||s.call(o,n.element,e,r.templateData,void 0),(l=(a=this.virtualDelegate).setDynamicHeight)==null||l.call(a,n.element,n.size),n.lastDynamicHeightWidth=this.renderWidth,r.domNode.remove(),this.cache.release(r),n.size-i}getElementDomId(e){return`${this.domId}_${e}`}dispose(){var e,n,i;for(const r of this.items)if(r.dragStartDisposable.dispose(),r.checkedDisposable.dispose(),r.row){const o=this.renderers.get(r.row.templateId);o&&((e=o.disposeElement)==null||e.call(o,r.element,-1,r.row.templateData,void 0),o.disposeTemplate(r.row.templateData))}this.items=[],(n=this.domNode)==null||n.remove(),(i=this.dragOverAnimationDisposable)==null||i.dispose(),this.disposables.dispose()}};tce.InstanceCount=0;let Rv=tce;KS([el],Rv.prototype,"onMouseClick",null);KS([el],Rv.prototype,"onMouseDblClick",null);KS([el],Rv.prototype,"onMouseMiddleClick",null);KS([el],Rv.prototype,"onMouseDown",null);KS([el],Rv.prototype,"onMouseOver",null);KS([el],Rv.prototype,"onMouseOut",null);KS([el],Rv.prototype,"onContextMenu",null);KS([el],Rv.prototype,"onTouchStart",null);KS([el],Rv.prototype,"onTap",null);const Kp=(t,e)=>t===e;function Bre(t=Kp){return(e,n)=>Xs(e,n,t)}function hNi(){return(t,e)=>t.equals(e)}function hIe(t,e,n){if(n!==void 0){const i=t;return i==null||e===void 0||e===null?e===i:n(i,e)}else{const i=t;return(r,o)=>r==null||o===void 0||o===null?o===r:i(r,o)}}function zre(t,e){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!zre(t[n],e[n]))return!1;return!0}if(t&&typeof t=="object"&&e&&typeof e=="object"&&Object.getPrototypeOf(t)===Object.prototype&&Object.getPrototypeOf(e)===Object.prototype){const n=t,i=e,r=Object.keys(n),o=Object.keys(i),s=new Set(o);if(r.length!==o.length)return!1;for(const a of r)if(!s.has(a)||!zre(n[a],i[a]))return!1;return!0}return!1}class wd{constructor(e,n,i){this.owner=e,this.debugNameSource=n,this.referenceFn=i}getDebugName(e){return fNi(e,this)}}const Klt=new Map,fIe=new WeakMap;function fNi(t,e){const n=fIe.get(t);if(n)return n;const i=mNi(t,e);if(i){let r=Klt.get(i)??0;r++,Klt.set(i,r);const o=r===1?i:`${i}#${r}`;return fIe.set(t,o),o}}function mNi(t,e){const n=fIe.get(t);if(n)return n;const i=e.owner?gNi(e.owner)+".":"";let r;const o=e.debugNameSource;if(o!==void 0)if(typeof o=="function"){if(r=o(),r!==void 0)return i+r}else return i+o;const s=e.referenceFn;if(s!==void 0&&(r=c7e(s),r!==void 0))return i+r;if(e.owner!==void 0){const a=pNi(e.owner,t);if(a!==void 0)return i+a}}function pNi(t,e){for(const n in t)if(t[n]===e)return n}const qlt=new Map,Glt=new WeakMap;function gNi(t){const e=Glt.get(t);if(e)return e;const n=bNi(t);let i=qlt.get(n)??0;i++,qlt.set(n,i);const r=i===1?n:`${n}#${i}`;return Glt.set(t,r),r}function bNi(t){const e=t.constructor;return e?e.name:"Object"}function c7e(t){const e=t.toString(),i=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(e),r=i?i[1]:void 0;return r==null?void 0:r.trim()}let vNi;function I5t(){return vNi}let A5t;function yNi(t){A5t=t}let R5t;function _Ni(t){R5t=t}let mIe;function xNi(t){mIe=t}class P5t{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,n){const i=n===void 0?void 0:e,r=n===void 0?e:n;return mIe({owner:i,debugName:()=>{const o=c7e(r);if(o!==void 0)return o;const a=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(r.toString());if(a)return`${this.debugName}.${a[2]}`;if(!i)return`${this.debugName} (mapped)`},debugReferenceFn:r},o=>r(this.read(o),o))}flatten(){return mIe({owner:void 0,debugName:()=>`${this.debugName} (flattened)`},e=>this.read(e).read(e))}recomputeInitiallyAndOnChange(e,n){return e.add(A5t(this,n)),this}keepObserved(e){return e.add(R5t(this)),this}}class F6 extends P5t{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const n=this.observers.size;this.observers.add(e),n===0&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function ma(t,e){const n=new $6(t,e);try{t(n)}finally{n.finish()}}let $Q;function t9(t){if($Q)t($Q);else{const e=new $6(t,void 0);$Q=e;try{t(e)}finally{e.finish(),$Q=void 0}}}async function O5t(t,e){const n=new $6(t,e);try{await t(n)}finally{n.finish()}}function Q2(t,e,n){t?e(t):ma(e,n)}class $6{constructor(e,n){this._fn=e,this._getDebugName=n,this.updatingObservers=[]}getDebugName(){return this._getDebugName?this._getDebugName():c7e(this._fn)}updateObserver(e,n){this.updatingObservers.push({observer:e,observable:n}),e.beginUpdate(n)}finish(){const e=this.updatingObservers;for(let n=0;n<e.length;n++){const{observer:i,observable:r}=e[n];i.endUpdate(r)}this.updatingObservers=null}}function lr(t,e){let n;return typeof t=="string"?n=new wd(void 0,t,void 0):n=new wd(t,void 0,void 0),new u7e(n,e,Kp)}class u7e extends F6{get debugName(){return this._debugNameData.getDebugName(this)??"ObservableValue"}constructor(e,n,i){super(),this._debugNameData=e,this._equalityComparator=i,this._value=n}get(){return this._value}set(e,n,i){var o;if(i===void 0&&this._equalityComparator(this._value,e))return;let r;n||(n=r=new $6(()=>{},()=>`Setting ${this.debugName}`));try{const s=this._value;this._setValue(e),(o=I5t())==null||o.handleObservableChanged(this,{oldValue:s,newValue:e,change:i,didChange:!0,hadValue:!0});for(const a of this.observers)n.updateObserver(a,this),a.handleChange(this,i)}finally{r&&r.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function sW(t,e){let n;return typeof t=="string"?n=new wd(void 0,t,void 0):n=new wd(t,void 0,void 0),new wNi(n,e,Kp)}class wNi extends u7e{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;(e=this._value)==null||e.dispose()}}function Vn(t,e){return e!==void 0?new J2(new wd(t,void 0,e),e,void 0,void 0,void 0,Kp):new J2(new wd(void 0,void 0,t),t,void 0,void 0,void 0,Kp)}function Pq(t,e,n){return new CNi(new wd(t,void 0,e),e,void 0,void 0,void 0,Kp,n)}function gp(t,e){return new J2(new wd(t.owner,t.debugName,t.debugReferenceFn),e,void 0,void 0,t.onLastObserverRemoved,t.equalsFn??Kp)}xNi(gp);function j5t(t,e){return new J2(new wd(t.owner,t.debugName,void 0),e,t.createEmptyChangeSummary,t.handleChange,void 0,t.equalityComparer??Kp)}function sM(t,e){let n,i;e===void 0?(n=t,i=void 0):(i=t,n=e);const r=new Lt;return new J2(new wd(i,void 0,n),o=>(r.clear(),n(o,r)),void 0,void 0,()=>r.dispose(),Kp)}function Vd(t,e){let n,i;e===void 0?(n=t,i=void 0):(i=t,n=e);let r;return new J2(new wd(i,void 0,n),o=>{r?r.clear():r=new Lt;const s=n(o);return s&&r.add(s),s},void 0,void 0,()=>{r&&(r.dispose(),r=void 0)},Kp)}class J2 extends F6{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,n,i,r,o=void 0,s){var a;super(),this._debugNameData=e,this._computeFn=n,this.createChangeSummary=i,this._handleChange=r,this._handleLastObserverRemoved=o,this._equalityComparator=s,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=(a=this.createChangeSummary)==null?void 0:a.call(this)}onLastObserverRemoved(){var e;this.state=0,this.value=void 0;for(const n of this.dependencies)n.removeObserver(this);this.dependencies.clear(),(e=this._handleLastObserverRemoved)==null||e.call(this)}get(){var e;if(this.observers.size===0){const n=this._computeFn(this,(e=this.createChangeSummary)==null?void 0:e.call(this));return this.onLastObserverRemoved(),n}else{do{if(this.state===1){for(const n of this.dependencies)if(n.reportChanges(),this.state===2)break}this.state===1&&(this.state=3),this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var s;if(this.state===3)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e;const n=this.state!==0,i=this.value;this.state=3;const r=this.changeSummary;this.changeSummary=(s=this.createChangeSummary)==null?void 0:s.call(this);try{this.value=this._computeFn(this,r)}finally{for(const a of this.dependenciesToBeRemoved)a.removeObserver(this);this.dependenciesToBeRemoved.clear()}if(n&&!this._equalityComparator(i,this.value))for(const a of this.observers)a.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const n=this.updateCount===1;if(this.state===3&&(this.state=1,!n))for(const i of this.observers)i.handlePossibleChange(this);if(n)for(const i of this.observers)i.beginUpdate(this)}endUpdate(e){if(this.updateCount--,this.updateCount===0){const n=[...this.observers];for(const i of n)i.endUpdate(this)}K2(()=>this.updateCount>=0)}handlePossibleChange(e){if(this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const n of this.observers)n.handlePossibleChange(this)}}handleChange(e,n){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const i=this._handleChange?this._handleChange({changedObservable:e,change:n,didChange:o=>o===e},this.changeSummary):!0,r=this.state===3;if(i&&(this.state===1||r)&&(this.state=2,r))for(const o of this.observers)o.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const n=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),n}addObserver(e){const n=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),n&&e.beginUpdate(this)}removeObserver(e){const n=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),n&&e.endUpdate(this)}}class CNi extends J2{constructor(e,n,i,r,o=void 0,s,a){super(e,n,i,r,o,s),this.set=a}}function ki(t){return new _me(new wd(void 0,void 0,t),t,void 0,void 0)}function Oq(t,e){return new _me(new wd(t.owner,t.debugName,t.debugReferenceFn??e),e,void 0,void 0)}function jq(t,e){return new _me(new wd(t.owner,t.debugName,t.debugReferenceFn??e),e,t.createEmptyChangeSummary,t.handleChange)}function SNi(t,e){const n=new Lt,i=jq({owner:t.owner,debugName:t.debugName,debugReferenceFn:t.debugReferenceFn??e,createEmptyChangeSummary:t.createEmptyChangeSummary,handleChange:t.handleChange},(r,o)=>{n.clear(),e(r,o,n)});return Kn(()=>{i.dispose(),n.dispose()})}function Sf(t){const e=new Lt,n=Oq({owner:void 0,debugName:void 0,debugReferenceFn:t},i=>{e.clear(),t(i,e)});return Kn(()=>{n.dispose(),e.dispose()})}class _me{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,n,i,r){var o;this._debugNameData=e,this._runFn=n,this.createChangeSummary=i,this._handleChange=r,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=(o=this.createChangeSummary)==null?void 0:o.call(this),this._runIfNeeded()}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}_runIfNeeded(){var i,r;if(this.state===3)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e,this.state=3;const n=this.disposed;try{if(!n){(i=I5t())==null||i.handleAutorunTriggered(this);const o=this.changeSummary;this.changeSummary=(r=this.createChangeSummary)==null?void 0:r.call(this),this._runFn(this,o)}}finally{for(const o of this.dependenciesToBeRemoved)o.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,K2(()=>this.updateCount>=0)}handlePossibleChange(e){this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,n){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:n,didChange:r=>r===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const n=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),n}}(function(t){t.Observer=_me})(ki||(ki={}));function Gg(t){return new NNi(t)}class NNi extends P5t{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function Oo(...t){let e,n,i;return t.length===3?[e,n,i]=t:[n,i]=t,new YE(new wd(e,void 0,i),n,i,()=>YE.globalTransaction,Kp)}function ENi(t,e,n){return new YE(new wd(t.owner,t.debugName,t.debugReferenceFn??n),e,n,()=>YE.globalTransaction,t.equalsFn??Kp)}class YE extends F6{constructor(e,n,i,r,o){super(),this._debugNameData=e,this.event=n,this._getValue=i,this._getTransaction=r,this._equalityComparator=o,this.hasValue=!1,this.handleEvent=s=>{const a=this._getValue(s),l=this.value;(!this.hasValue||!this._equalityComparator(l,a))&&(this.value=a,this.hasValue&&Q2(this._getTransaction(),u=>{for(const d of this.observers)u.updateObserver(d,this),d.handleChange(this,void 0)},()=>{const u=this.getDebugName();return"Event fired"+(u?`: ${u}`:"")}),this.hasValue=!0)}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}}(function(t){t.Observer=YE;function e(n,i){let r=!1;YE.globalTransaction===void 0&&(YE.globalTransaction=n,r=!0);try{i()}finally{r&&(YE.globalTransaction=void 0)}}t.batchEventsGlobally=e})(Oo||(Oo={}));function Nu(t,e){return new DNi(t,e)}class DNi extends F6{constructor(e,n){super(),this.debugName=e,this.event=n,this.handleEvent=()=>{ma(i=>{for(const r of this.observers)i.updateObserver(r,this),r.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function V6(t){return typeof t=="string"?new Ylt(t):new Ylt(void 0,t)}class Ylt extends F6{get debugName(){return new wd(this._owner,this._debugName,void 0).getDebugName(this)??"Observable Signal"}toString(){return this.debugName}constructor(e,n){super(),this._debugName=e,this._owner=n}trigger(e,n){if(!e){ma(i=>{this.trigger(i,n)},()=>`Trigger signal ${this.debugName}`);return}for(const i of this.observers)e.updateObserver(i,this),i.handleChange(this,n)}get(){}}function kNi(t){const e=new F5t(!1,void 0);return t.addObserver(e),Kn(()=>{t.removeObserver(e)})}_Ni(kNi);function B6(t,e){const n=new F5t(!0,e);return t.addObserver(n),e?e(t.get()):t.reportChanges(),Kn(()=>{t.removeObserver(n)})}yNi(B6);class F5t{constructor(e,n){this._forceRecompute=e,this._handleValue=n,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,this._counter===0&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,n){}}function Fq(t,e){let n;return gp({owner:t,debugReferenceFn:e},r=>(n=e(r,n),n))}function MNi(t,e,n,i){let r=new Xlt(n,i);return gp({debugReferenceFn:n,owner:t,onLastObserverRemoved:()=>{r.dispose(),r=new Xlt(n)}},s=>(r.setItems(e.read(s)),r.getItems()))}class Xlt{constructor(e,n){this._map=e,this._keySelector=n,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach(e=>e.store.dispose()),this._cache.clear()}setItems(e){const n=[],i=new Set(this._cache.keys());for(const r of e){const o=this._keySelector?this._keySelector(r):r;let s=this._cache.get(o);if(s)i.delete(o);else{const a=new Lt;s={out:this._map(r,a),store:a},this._cache.set(o,s)}n.push(s.out)}for(const r of i)this._cache.get(r).store.dispose(),this._cache.delete(r);this._items=n}getItems(){return this._items}}function LNi(t,e){return Fq(t,(n,i)=>i??e(n))}class xme{static fromFn(e){return new xme(e())}constructor(e){this._value=lr(this,void 0),this.promiseResult=this._value,this.promise=e.then(n=>(ma(i=>{this._value.set(new Zlt(n,void 0),i)}),n),n=>{throw ma(i=>{this._value.set(new Zlt(void 0,n),i)}),n})}}class Zlt{constructor(e,n){this.data=e,this.error=n}}function $5t(t,e,n,i){return e||(e=r=>r!=null),new Promise((r,o)=>{let s=!0,a=!1;const l=t.map(u=>({isFinished:e(u),error:n?n(u):!1,state:u})),c=ki(u=>{const{isFinished:d,error:h,state:f}=l.read(u);(d||h)&&(s?a=!0:c.dispose(),h?o(h===!0?f:h):r(f))});if(i){const u=i.onCancellationRequested(()=>{c.dispose(),u.dispose(),o(new Mv)});if(i.isCancellationRequested){c.dispose(),u.dispose(),o(new Mv);return}}s=!1,a&&c.dispose()})}class TNi extends F6{get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,n,i){super(),this._debugNameData=e,this._equalityComparator=i,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=n}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(const e of this.observers)for(const n of this._deltas)e.handleChange(this,n);this._deltas.length=0}else for(const e of this.observers)e.handleChange(this,void 0)}_beginUpdate(){if(this._updateCounter++,this._updateCounter===1)for(const e of this.observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,this._updateCounter===0){this._update();const e=[...this.observers];for(const n of e)n.endUpdate(this)}}addObserver(e){const n=!this.observers.has(e)&&this._updateCounter>0;super.addObserver(e),n&&e.beginUpdate(this)}removeObserver(e){const n=this.observers.has(e)&&this._updateCounter>0;super.removeObserver(e),n&&e.endUpdate(this)}set(e,n,i){if(i===void 0&&this._equalityComparator(this._value,e))return;let r;n||(n=r=new $6(()=>{},()=>`Setting ${this.debugName}`));try{if(this._isUpToDate=!1,this._setValue(e),i!==void 0&&this._deltas.push(i),n.updateObserver({beginUpdate:()=>this._beginUpdate(),endUpdate:()=>this._endUpdate(),handleChange:(o,s)=>{},handlePossibleChange:o=>{}},this),this._updateCounter>1)for(const o of this.observers)o.handlePossibleChange(this)}finally{r&&r.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function pIe(t,e){return t.lazy?new TNi(new wd(t.owner,t.debugName,void 0),e,t.equalsFn??Kp):new u7e(new wd(t.owner,t.debugName,void 0),e,t.equalsFn??Kp)}var aM=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class INi{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,n,i){const r=this.renderedElements.findIndex(o=>o.templateData===i);if(r>=0){const o=this.renderedElements[r];this.trait.unrender(i),o.index=n}else{const o={index:n,templateData:i};this.renderedElements.push(o)}this.trait.renderIndex(n,i)}splice(e,n,i){const r=[];for(const o of this.renderedElements)o.index<e?r.push(o):o.index>=e+n&&r.push({index:o.index+i-n,templateData:o.templateData});this.renderedElements=r}renderIndexes(e){for(const{index:n,templateData:i}of this.renderedElements)e.indexOf(n)>-1&&this.trait.renderIndex(n,i)}disposeTemplate(e){const n=this.renderedElements.findIndex(i=>i.templateData===e);n<0||this.renderedElements.splice(n,1)}}let Hre=class{get name(){return this._trait}get renderer(){return new INi(this)}constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new st,this.onChange=this._onChange.event}splice(e,n,i){const r=i.length-n,o=e+n,s=[];let a=0;for(;a<this.sortedIndexes.length&&this.sortedIndexes[a]<e;)s.push(this.sortedIndexes[a++]);for(let l=0;l<i.length;l++)i[l]&&s.push(l+e);for(;a<this.sortedIndexes.length&&this.sortedIndexes[a]>=o;)s.push(this.sortedIndexes[a++]+r);this.renderer.splice(e,n,i.length),this._set(s,s)}renderIndex(e,n){n.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,n){return this._set(e,[...e].sort(Jlt),n)}_set(e,n,i){const r=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=n;const s=gIe(o,e);return this.renderer.renderIndexes(s),this._onChange.fire({indexes:e,browserEvent:i}),r}get(){return this.indexes}contains(e){return fH(this.sortedIndexes,e,Jlt)>=0}dispose(){Jo(this._onChange)}};aM([el],Hre.prototype,"renderer",null);class ANi extends Hre{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,n){super.renderIndex(e,n),this.setAriaSelected&&(this.contains(e)?n.setAttribute("aria-selected","true"):n.setAttribute("aria-selected","false"))}}class L1e{constructor(e,n,i){this.trait=e,this.view=n,this.identityProvider=i}splice(e,n,i){if(!this.identityProvider)return this.trait.splice(e,n,new Array(i.length).fill(!1));const r=this.trait.get().map(a=>this.identityProvider.getId(this.view.element(a)).toString());if(r.length===0)return this.trait.splice(e,n,new Array(i.length).fill(!1));const o=new Set(r),s=i.map(a=>o.has(this.identityProvider.getId(a).toString()));this.trait.splice(e,n,s)}}function yD(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"}function $q(t,e){return t.classList.contains(e)?!0:t.classList.contains("monaco-list")||!t.parentElement?!1:$q(t.parentElement,e)}function n9(t){return $q(t,"monaco-editor")}function RNi(t){return $q(t,"monaco-custom-toggle")}function PNi(t){return $q(t,"action-item")}function uB(t){return $q(t,"monaco-tree-sticky-row")}function aW(t){return t.classList.contains("monaco-tree-sticky-container")}function V5t(t){return t.tagName==="A"&&t.classList.contains("monaco-button")||t.tagName==="DIV"&&t.classList.contains("monaco-button-dropdown")?!0:t.classList.contains("monaco-list")||!t.parentElement?!1:V5t(t.parentElement)}class B5t{get onKeyDown(){return rn.chain(this.disposables.add(new Er(this.view.domNode,"keydown")).event,e=>e.filter(n=>!yD(n.target)).map(n=>new as(n)))}constructor(e,n,i){this.list=e,this.view=n,this.disposables=new Lt,this.multipleSelectionDisposables=new Lt,this.multipleSelectionSupport=i.multipleSelectionSupport,this.disposables.add(this.onKeyDown(r=>{switch(r.keyCode){case 3:return this.onEnter(r);case 16:return this.onUpArrow(r);case 18:return this.onDownArrow(r);case 11:return this.onPageUpArrow(r);case 12:return this.onPageDownArrow(r);case 9:return this.onEscape(r);case 31:this.multipleSelectionSupport&&(xr?r.metaKey:r.ctrlKey)&&this.onCtrlA(r)}}))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const n=this.list.getFocus()[0];this.list.setAnchor(n),this.list.reveal(n),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const n=this.list.getFocus()[0];this.list.setAnchor(n),this.list.reveal(n),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const n=this.list.getFocus()[0];this.list.setAnchor(n),this.list.reveal(n),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const n=this.list.getFocus()[0];this.list.setAnchor(n),this.list.reveal(n),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(sf(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}aM([el],B5t.prototype,"onKeyDown",null);var Cx;(function(t){t[t.Automatic=0]="Automatic",t[t.Trigger=1]="Trigger"})(Cx||(Cx={}));var y4;(function(t){t[t.Idle=0]="Idle",t[t.Typing=1]="Typing"})(y4||(y4={}));const ONi=new class{mightProducePrintableCharacter(t){return t.ctrlKey||t.metaKey||t.altKey?!1:t.keyCode>=31&&t.keyCode<=56||t.keyCode>=21&&t.keyCode<=30||t.keyCode>=98&&t.keyCode<=107||t.keyCode>=85&&t.keyCode<=95}};class jNi{constructor(e,n,i,r,o){this.list=e,this.view=n,this.keyboardNavigationLabelProvider=i,this.keyboardNavigationEventFilter=r,this.delegate=o,this.enabled=!1,this.state=y4.Idle,this.mode=Cx.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new Lt,this.disposables=new Lt,this.updateOptions(e.options)}updateOptions(e){e.typeNavigationEnabled??!0?this.enable():this.disable(),this.mode=e.typeNavigationMode??Cx.Automatic}enable(){if(this.enabled)return;let e=!1;const n=rn.chain(this.enabledDisposables.add(new Er(this.view.domNode,"keydown")).event,o=>o.filter(s=>!yD(s.target)).filter(()=>this.mode===Cx.Automatic||this.triggered).map(s=>new as(s)).filter(s=>e||this.keyboardNavigationEventFilter(s)).filter(s=>this.delegate.mightProducePrintableCharacter(s)).forEach(s=>Mr.stop(s,!0)).map(s=>s.browserEvent.key)),i=rn.debounce(n,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);rn.reduce(rn.any(n,i),(o,s)=>s===null?null:(o||"")+s,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),i(this.onClear,this,this.enabledDisposables),n(()=>e=!0,void 0,this.enabledDisposables),i(()=>e=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var n;const e=this.list.getFocus();if(e.length>0&&e[0]===this.previouslyFocused){const i=(n=this.list.options.accessibilityProvider)==null?void 0:n.getAriaLabel(this.list.element(e[0]));typeof i=="string"?Am(i):i&&Am(i.get())}this.previouslyFocused=-1}onInput(e){if(!e){this.state=y4.Idle,this.triggered=!1;return}const n=this.list.getFocus(),i=n.length>0?n[0]:0,r=this.state===y4.Idle?1:0;this.state=y4.Typing;for(let o=0;o<this.list.length;o++){const s=(i+o+r)%this.list.length,a=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(s)),l=a&&a.toString();if(this.list.options.typeNavigationEnabled){if(typeof l<"u"){if(eW(e,l)){this.previouslyFocused=i,this.list.setFocus([s]),this.list.reveal(s);return}const c=gCi(e,l);if(c&&c[0].end-c[0].start>1&&c.length===1){this.previouslyFocused=i,this.list.setFocus([s]),this.list.reveal(s);return}}}else if(typeof l>"u"||eW(e,l)){this.previouslyFocused=i,this.list.setFocus([s]),this.list.reveal(s);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class FNi{constructor(e,n){this.list=e,this.view=n,this.disposables=new Lt;const i=rn.chain(this.disposables.add(new Er(n.domNode,"keydown")).event,o=>o.filter(s=>!yD(s.target)).map(s=>new as(s)));rn.chain(i,o=>o.filter(s=>s.keyCode===2&&!s.ctrlKey&&!s.metaKey&&!s.shiftKey&&!s.altKey))(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const n=this.list.getFocus();if(n.length===0)return;const i=this.view.domElement(n[0]);if(!i)return;const r=i.querySelector("[tabIndex]");if(!r||!uc(r)||r.tabIndex===-1)return;const o=ei(r).getComputedStyle(r);o.visibility==="hidden"||o.display==="none"||(e.preventDefault(),e.stopPropagation(),r.focus())}dispose(){this.disposables.dispose()}}function z5t(t){return xr?t.browserEvent.metaKey:t.browserEvent.ctrlKey}function H5t(t){return t.browserEvent.shiftKey}function $Ni(t){return A8e(t)&&t.button===2}const Qlt={isSelectionSingleChangeEvent:z5t,isSelectionRangeChangeEvent:H5t};class W5t{constructor(e){this.list=e,this.disposables=new Lt,this._onPointer=new st,this.onPointer=this._onPointer.event,e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||Qlt),this.mouseSupport=typeof e.options.mouseSupport>"u"||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(xd.addTarget(e.getHTMLElement()))),rn.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||Qlt))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){n9(e.browserEvent.target)||Au()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(yD(e.browserEvent.target)||n9(e.browserEvent.target))return;const n=typeof e.index>"u"?[]:[e.index];this.list.setFocus(n,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||yD(e.browserEvent.target)||n9(e.browserEvent.target)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const n=e.index;if(typeof n>"u"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([n],e.browserEvent),this.list.setAnchor(n),$Ni(e.browserEvent)||this.list.setSelection([n],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(yD(e.browserEvent.target)||n9(e.browserEvent.target)||this.isSelectionChangeEvent(e)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const n=this.list.getFocus();this.list.setSelection(n,e.browserEvent)}changeSelection(e){const n=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){typeof i>"u"&&(i=this.list.getFocus()[0]??n,this.list.setAnchor(i));const r=Math.min(i,n),o=Math.max(i,n),s=sf(r,o+1),a=this.list.getSelection(),l=zNi(gIe(a,[i]),i);if(l.length===0)return;const c=gIe(s,HNi(a,l));this.list.setSelection(c,e.browserEvent),this.list.setFocus([n],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const r=this.list.getSelection(),o=r.filter(s=>s!==n);this.list.setFocus([n]),this.list.setAnchor(n),r.length===o.length?this.list.setSelection([...o,n],e.browserEvent):this.list.setSelection(o,e.browserEvent)}}dispose(){this.disposables.dispose()}}class U5t{constructor(e,n){this.styleElement=e,this.selectorSuffix=n}style(e){const n=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&i.push(`.monaco-list${n} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(i.push(`.monaco-list${n}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${n}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${n}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${n}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${n}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${n}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&i.push(`.monaco-list${n}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&i.push(`
				.monaco-drag-image,
				.monaco-list${n}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }
			`),e.listFocusAndSelectionForeground&&i.push(`
				.monaco-drag-image,
				.monaco-list${n}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }
			`),e.listInactiveFocusForeground&&(i.push(`.monaco-list${n} .monaco-list-row.focused { color:  ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${n} .monaco-list-row.focused:hover { color:  ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&i.push(`.monaco-list${n} .monaco-list-row.focused .codicon { color:  ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${n} .monaco-list-row.focused { background-color:  ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${n} .monaco-list-row.focused:hover { background-color:  ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${n} .monaco-list-row.selected { background-color:  ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${n} .monaco-list-row.selected:hover { background-color:  ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${n} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${n}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${n}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color:  ${e.listHoverForeground}; }`);const r=TC(e.listFocusAndSelectionOutline,TC(e.listSelectionOutline,e.listFocusOutline??""));r&&i.push(`.monaco-list${n}:focus .monaco-list-row.focused.selected { outline: 1px solid ${r}; outline-offset: -1px;}`),e.listFocusOutline&&i.push(`
				.monaco-drag-image,
				.monaco-list${n}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }
				.monaco-workbench.context-menu-visible .monaco-list${n}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }
			`);const o=TC(e.listSelectionOutline,e.listInactiveFocusOutline??"");o&&i.push(`.monaco-list${n} .monaco-list-row.focused.selected { outline: 1px dotted ${o}; outline-offset: -1px; }`),e.listSelectionOutline&&i.push(`.monaco-list${n} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&i.push(`.monaco-list${n} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${n} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropOverBackground&&i.push(`
				.monaco-list${n}.drop-target,
				.monaco-list${n} .monaco-list-rows.drop-target,
				.monaco-list${n} .monaco-list-row.drop-target { background-color: ${e.listDropOverBackground} !important; color: inherit !important; }
			`),e.listDropBetweenBackground&&(i.push(`
			.monaco-list${n} .monaco-list-rows.drop-target-before .monaco-list-row:first-child::before,
			.monaco-list${n} .monaco-list-row.drop-target-before::before {
				content: ""; position: absolute; top: 0px; left: 0px; width: 100%; height: 1px;
				background-color: ${e.listDropBetweenBackground};
			}`),i.push(`
			.monaco-list${n} .monaco-list-rows.drop-target-after .monaco-list-row:last-child::after,
			.monaco-list${n} .monaco-list-row.drop-target-after::after {
				content: ""; position: absolute; bottom: 0px; left: 0px; width: 100%; height: 1px;
				background-color: ${e.listDropBetweenBackground};
			}`)),e.tableColumnsBorder&&i.push(`
				.monaco-table > .monaco-split-view2,
				.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,
				.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2,
				.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {
					border-color: ${e.tableColumnsBorder};
				}

				.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,
				.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {
					border-color: transparent;
				}
			`),e.tableOddRowsBackgroundColor&&i.push(`
				.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,
				.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,
				.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {
					background-color: ${e.tableOddRowsBackgroundColor};
				}
			`),this.styleElement.textContent=i.join(`
`)}}const VNi={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:Rt.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:Rt.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:Rt.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},BNi={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function zNi(t,e){const n=t.indexOf(e);if(n===-1)return[];const i=[];let r=n-1;for(;r>=0&&t[r]===e-(n-r);)i.push(t[r--]);for(i.reverse(),r=n;r<t.length&&t[r]===e+(r-n);)i.push(t[r++]);return i}function gIe(t,e){const n=[];let i=0,r=0;for(;i<t.length||r<e.length;)if(i>=t.length)n.push(e[r++]);else if(r>=e.length)n.push(t[i++]);else if(t[i]===e[r]){n.push(t[i]),i++,r++;continue}else t[i]<e[r]?n.push(t[i++]):n.push(e[r++]);return n}function HNi(t,e){const n=[];let i=0,r=0;for(;i<t.length||r<e.length;)if(i>=t.length)n.push(e[r++]);else if(r>=e.length)n.push(t[i++]);else if(t[i]===e[r]){i++,r++;continue}else t[i]<e[r]?n.push(t[i++]):r++;return n}const Jlt=(t,e)=>t-e;class WNi{constructor(e,n){this._templateId=e,this.renderers=n}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(n=>n.renderTemplate(e))}renderElement(e,n,i,r){let o=0;for(const s of this.renderers)s.renderElement(e,n,i[o++],r)}disposeElement(e,n,i,r){var s;let o=0;for(const a of this.renderers)(s=a.disposeElement)==null||s.call(a,e,n,i[o],r),o+=1}disposeTemplate(e){let n=0;for(const i of this.renderers)i.disposeTemplate(e[n++])}}class UNi{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return{container:e,disposables:new Lt}}renderElement(e,n,i){const r=this.accessibilityProvider.getAriaLabel(e),o=r&&typeof r!="string"?r:Gg(r);i.disposables.add(ki(a=>{this.setAriaLabel(a.readObservable(o),i.container)}));const s=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof s=="number"?i.container.setAttribute("aria-level",`${s}`):i.container.removeAttribute("aria-level")}setAriaLabel(e,n){e?n.setAttribute("aria-label",e):n.removeAttribute("aria-label")}disposeElement(e,n,i,r){i.disposables.clear()}disposeTemplate(e){e.disposables.dispose()}}class KNi{constructor(e,n){this.list=e,this.dnd=n}getDragElements(e){const n=this.list.getSelectedElements();return n.indexOf(e)>-1?n:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,n){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,n)}onDragStart(e,n){var i,r;(r=(i=this.dnd).onDragStart)==null||r.call(i,e,n)}onDragOver(e,n,i,r,o){return this.dnd.onDragOver(e,n,i,r,o)}onDragLeave(e,n,i,r){var o,s;(s=(o=this.dnd).onDragLeave)==null||s.call(o,e,n,i,r)}onDragEnd(e){var n,i;(i=(n=this.dnd).onDragEnd)==null||i.call(n,e)}drop(e,n,i,r,o){this.dnd.drop(e,n,i,r,o)}dispose(){this.dnd.dispose()}}class ng{get onDidChangeFocus(){return rn.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return rn.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const n=rn.chain(this.disposables.add(new Er(this.view.domNode,"keydown")).event,o=>o.map(s=>new as(s)).filter(s=>e=s.keyCode===58||s.shiftKey&&s.keyCode===68).map(s=>Mr.stop(s,!0)).filter(()=>!1)),i=rn.chain(this.disposables.add(new Er(this.view.domNode,"keyup")).event,o=>o.forEach(()=>e=!1).map(s=>new as(s)).filter(s=>s.keyCode===58||s.shiftKey&&s.keyCode===68).map(s=>Mr.stop(s,!0)).map(({browserEvent:s})=>{const a=this.getFocus(),l=a.length?a[0]:void 0,c=typeof l<"u"?this.view.element(l):void 0,u=typeof l<"u"?this.view.domElement(l):this.view.domNode;return{index:l,element:c,anchor:u,browserEvent:s}})),r=rn.chain(this.view.onContextMenu,o=>o.filter(s=>!e).map(({element:s,index:a,browserEvent:l})=>({element:s,index:a,anchor:new uv(ei(this.view.domNode),l),browserEvent:l})));return rn.any(n,i,r)}get onKeyDown(){return this.disposables.add(new Er(this.view.domNode,"keydown")).event}get onDidFocus(){return rn.signal(this.disposables.add(new Er(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return rn.signal(this.disposables.add(new Er(this.view.domNode,"blur",!0)).event)}constructor(e,n,i,r,o=BNi){var c,u,d;this.user=e,this._options=o,this.focus=new Hre("focused"),this.anchor=new Hre("anchor"),this.eventBufferer=new fq,this._ariaLabel="",this.disposables=new Lt,this._onDidDispose=new st,this.onDidDispose=this._onDidDispose.event;const s=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(c=this._options.accessibilityProvider)==null?void 0:c.getWidgetRole():"list";this.selection=new ANi(s!=="listbox");const a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=o.accessibilityProvider,this.accessibilityProvider&&(a.push(new UNi(this.accessibilityProvider)),(d=(u=this.accessibilityProvider).onDidChangeActiveDescendant)==null||d.call(u,this.onDidChangeActiveDescendant,this,this.disposables)),r=r.map(h=>new WNi(h.templateId,[...a,h]));const l={...o,dnd:o.dnd&&new KNi(this,o.dnd)};if(this.view=this.createListView(n,i,r,l),this.view.domNode.setAttribute("role",s),o.styleController)this.styleController=o.styleController(this.view.domId);else{const h=Wp(this.view.domNode);this.styleController=new U5t(h,this.view.domId)}if(this.spliceable=new iNi([new L1e(this.focus,this.view,o.identityProvider),new L1e(this.selection,this.view,o.identityProvider),new L1e(this.anchor,this.view,o.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new FNi(this,this.view)),(typeof o.keyboardSupport!="boolean"||o.keyboardSupport)&&(this.keyboardController=new B5t(this,this.view,o),this.disposables.add(this.keyboardController)),o.keyboardNavigationLabelProvider){const h=o.keyboardNavigationDelegate||ONi;this.typeNavigationController=new jNi(this,this.view,o.keyboardNavigationLabelProvider,o.keyboardNavigationEventFilter??(()=>!0),h),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(o),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,n,i,r){return new Rv(e,n,i,r)}createMouseController(e){return new W5t(this)}updateOptions(e={}){var n,i;this._options={...this._options,...e},(n=this.typeNavigationController)==null||n.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),(i=this.keyboardController)==null||i.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,n,i=[]){if(e<0||e>this.view.length)throw new gL(this.user,`Invalid start index: ${e}`);if(n<0)throw new gL(this.user,`Invalid delete count: ${n}`);n===0&&i.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,n,i))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}indexAt(e){return this.view.indexAt(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,n){this.view.layout(e,n)}setSelection(e,n){for(const i of e)if(i<0||i>=this.length)throw new gL(this.user,`Invalid index ${i}`);this.selection.set(e,n)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(typeof e>"u"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new gL(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return s8e(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return typeof e>"u"?void 0:this.element(e)}setFocus(e,n){for(const i of e)if(i<0||i>=this.length)throw new gL(this.user,`Invalid index ${i}`);this.focus.set(e,n)}focusNext(e=1,n=!1,i,r){if(this.length===0)return;const o=this.focus.get(),s=this.findNextIndex(o.length>0?o[0]+e:0,n,r);s>-1&&this.setFocus([s],i)}focusPrevious(e=1,n=!1,i,r){if(this.length===0)return;const o=this.focus.get(),s=this.findPreviousIndex(o.length>0?o[0]-e:0,n,r);s>-1&&this.setFocus([s],i)}async focusNextPage(e,n){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=i===0?0:i-1;const r=this.getFocus()[0];if(r!==i&&(r===void 0||i>r)){const o=this.findPreviousIndex(i,!1,n);o>-1&&r!==o?this.setFocus([o],e):this.setFocus([i],e)}else{const o=this.view.getScrollTop();let s=o+this.view.renderHeight;i>r&&(s-=this.view.elementHeight(i)),this.view.setScrollTop(s),this.view.getScrollTop()!==o&&(this.setFocus([]),await uw(0),await this.focusNextPage(e,n))}}async focusPreviousPage(e,n,i=()=>0){let r;const o=i(),s=this.view.getScrollTop()+o;s===0?r=this.view.indexAt(s):r=this.view.indexAfter(s-1);const a=this.getFocus()[0];if(a!==r&&(a===void 0||a>=r)){const l=this.findNextIndex(r,!1,n);l>-1&&a!==l?this.setFocus([l],e):this.setFocus([r],e)}else{const l=s;this.view.setScrollTop(s-this.view.renderHeight-o),this.view.getScrollTop()+i()!==l&&(this.setFocus([]),await uw(0),await this.focusPreviousPage(e,n,i))}}focusLast(e,n){if(this.length===0)return;const i=this.findPreviousIndex(this.length-1,!1,n);i>-1&&this.setFocus([i],e)}focusFirst(e,n){this.focusNth(0,e,n)}focusNth(e,n,i){if(this.length===0)return;const r=this.findNextIndex(e,!1,i);r>-1&&this.setFocus([r],n)}findNextIndex(e,n=!1,i){for(let r=0;r<this.length;r++){if(e>=this.length&&!n)return-1;if(e=e%this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,n=!1,i){for(let r=0;r<this.length;r++){if(e<0&&!n)return-1;if(e=(this.length+e%this.length)%this.length,!i||i(this.element(e)))return e;e--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(e=>this.view.element(e))}reveal(e,n,i=0){if(e<0||e>=this.length)throw new gL(this.user,`Invalid index ${e}`);const r=this.view.getScrollTop(),o=this.view.elementTop(e),s=this.view.elementHeight(e);if(ok(n)){const a=s-this.view.renderHeight+i;this.view.setScrollTop(a*bh(n,0,1)+o-i)}else{const a=o+s,l=r+this.view.renderHeight;o<r+i&&a>=l||(o<r+i||a>=l&&s>=this.view.renderHeight?this.view.setScrollTop(o-i):a>=l&&this.view.setScrollTop(a-this.view.renderHeight))}}getRelativeTop(e,n=0){if(e<0||e>=this.length)throw new gL(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),r=this.view.elementTop(e),o=this.view.elementHeight(e);if(r<i+n||r+o>i+this.view.renderHeight)return null;const s=o-this.view.renderHeight+n;return Math.abs((i+n-r)/s)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:n}){return{indexes:e,elements:e.map(i=>this.view.element(i)),browserEvent:n}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var n;const e=this.focus.get();if(e.length>0){let i;(n=this.accessibilityProvider)!=null&&n.getActiveDescendantId&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(e[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(e[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}aM([el],ng.prototype,"onDidChangeFocus",null);aM([el],ng.prototype,"onDidChangeSelection",null);aM([el],ng.prototype,"onContextMenu",null);aM([el],ng.prototype,"onKeyDown",null);aM([el],ng.prototype,"onDidFocus",null);aM([el],ng.prototype,"onDidBlur",null);const FT=Xt,K5t="selectOption.entry.template";class qNi{get templateId(){return K5t}renderTemplate(e){const n=Object.create(null);return n.root=e,n.text=jt(e,FT(".option-text")),n.detail=jt(e,FT(".option-detail")),n.decoratorRight=jt(e,FT(".option-decorator-right")),n}renderElement(e,n,i){const r=i,o=e.text,s=e.detail,a=e.decoratorRight,l=e.isDisabled;r.text.textContent=o,r.detail.textContent=s||"",r.decoratorRight.innerText=a||"",l?r.root.classList.add("option-disabled"):r.root.classList.remove("option-disabled")}disposeTemplate(e){}}const ox=class ox extends ct{constructor(e,n,i,r,o){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=r,this.selectBoxOptions=o||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=ox.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new st,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(i),this.selected=n||0,e&&this.setOptions(e,n),this.initStyleSheet()}setTitle(e){!this._hover&&e?this._hover=this._register(d_().setupManagedHover(Yh("mouse"),this.selectElement,e)):this._hover&&this._hover.update(e)}getHeight(){return 22}getTemplateId(){return K5t}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=Xt(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=jt(this.selectDropDownContainer,FT(".select-box-details-pane"));const n=jt(this.selectDropDownContainer,FT(".select-box-dropdown-container-width-control")),i=jt(n,FT(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",jt(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=Wp(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(yt(this.selectDropDownContainer,Yt.DRAG_START,r=>{Mr.stop(r,!0)}))}registerListeners(){this._register(Fa(this.selectElement,"change",n=>{this.selected=n.target.selectedIndex,this._onDidSelect.fire({index:n.target.selectedIndex,selected:n.target.value}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)})),this._register(yt(this.selectElement,Yt.CLICK,n=>{Mr.stop(n),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(yt(this.selectElement,Yt.MOUSE_DOWN,n=>{Mr.stop(n)}));let e;this._register(yt(this.selectElement,"touchstart",n=>{e=this._isVisible})),this._register(yt(this.selectElement,"touchend",n=>{Mr.stop(n),e?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(yt(this.selectElement,Yt.KEY_DOWN,n=>{const i=new as(n);let r=!1;xr?(i.keyCode===18||i.keyCode===16||i.keyCode===10||i.keyCode===3)&&(r=!0):(i.keyCode===18&&i.altKey||i.keyCode===16&&i.altKey||i.keyCode===10||i.keyCode===3)&&(r=!0),r&&(this.showSelectDropDown(),Mr.stop(n,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,n){Xs(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((i,r)=>{this.selectElement.add(this.createOption(i.text,r,i.isDisabled)),typeof i.description=="string"&&(this._hasDetails=!0)})),n!==void 0&&(this.select(n),this._currentSelection=this.selected)}setOptionsList(){var e;(e=this.selectList)==null||e.splice(0,this.selectList.length,this.options)}select(e){e>=0&&e<this.options.length?this.selected=e:e>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join(`
`)}styleSelectElement(){const e=this.styles.selectBackground??"",n=this.styles.selectForeground??"",i=this.styles.selectBorder??"";this.selectElement.style.backgroundColor=e,this.selectElement.style.color=n,this.selectElement.style.borderColor=i}styleList(){const e=this.styles.selectBackground??"",n=TC(this.styles.selectListBackground,e);this.selectDropDownListContainer.style.backgroundColor=n,this.selectionDetailsPane.style.backgroundColor=n;const i=this.styles.focusBorder??"";this.selectDropDownContainer.style.outlineColor=i,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,n,i){const r=document.createElement("option");return r.value=e,r.text=e,r.disabled=!!i,r}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,n){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(n),{dispose:()=>{this.selectDropDownContainer.remove()}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((n,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const n=ei(this.selectElement),i=Ga(this.selectElement),r=ei(this.selectElement).getComputedStyle(this.selectElement),o=parseFloat(r.getPropertyValue("--dropdown-padding-top"))+parseFloat(r.getPropertyValue("--dropdown-padding-bottom")),s=n.innerHeight-i.top-i.height-(this.selectBoxOptions.minBottomMargin||0),a=i.top-ox.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,l=this.selectElement.offsetWidth,c=this.setWidthControlElement(this.widthControlElement),u=Math.max(c,Math.round(l)).toString()+"px";this.selectDropDownContainer.style.width=u,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let d=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const h=this._hasDetails?this._cachedMaxDetailsHeight:0,f=d+o+h,m=Math.floor((s-o-h)/this.getHeight()),p=Math.floor((a-o-h)/this.getHeight());if(e)return i.top+i.height>n.innerHeight-22||i.top<ox.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||m<1&&p<1?!1:(m<ox.DEFAULT_MINIMUM_VISIBLE_OPTIONS&&p>m&&this.options.length>m?(this._dropDownPosition=1,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(i.top+i.height>n.innerHeight-22||i.top<ox.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||this._dropDownPosition===0&&m<1||this._dropDownPosition===1&&p<1)return this.hideSelectDropDown(!0),!1;if(this._dropDownPosition===0){if(this._isVisible&&m+p<1)return this.hideSelectDropDown(!0),!1;f>s&&(d=m*this.getHeight())}else f>a&&(d=p*this.getHeight());return this.selectList.layout(d),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=d+o+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=d+o+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=u,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(e){let n=0;if(e){let i=0,r=0;this.options.forEach((o,s)=>{const a=o.detail?o.detail.length:0,l=o.decoratorRight?o.decoratorRight.length:0,c=o.text.length+a+l;c>r&&(i=s,r=c)}),e.textContent=this.options[i].text+(this.options[i].decoratorRight?this.options[i].decoratorRight+" ":""),n=Jf(e)}return n}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=jt(e,FT(".select-box-dropdown-list-container")),this.listRenderer=new qNi,this.selectList=this._register(new ng("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:r=>{let o=r.text;return r.detail&&(o+=`. ${r.detail}`),r.decoratorRight&&(o+=`. ${r.decoratorRight}`),r.description&&(o+=`. ${r.description}`),o},getWidgetAriaLabel:()=>I({key:"selectBox",comment:["Behave like native select dropdown element."]},"Select Box"),getRole:()=>xr?"":"option",getWidgetRole:()=>"listbox"}})),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const n=this._register(new Er(this.selectDropDownListContainer,"keydown")),i=rn.chain(n.event,r=>r.filter(()=>this.selectList.length>0).map(o=>new as(o)));this._register(rn.chain(i,r=>r.filter(o=>o.keyCode===3))(this.onEnter,this)),this._register(rn.chain(i,r=>r.filter(o=>o.keyCode===2))(this.onEnter,this)),this._register(rn.chain(i,r=>r.filter(o=>o.keyCode===9))(this.onEscape,this)),this._register(rn.chain(i,r=>r.filter(o=>o.keyCode===16))(this.onUpArrow,this)),this._register(rn.chain(i,r=>r.filter(o=>o.keyCode===18))(this.onDownArrow,this)),this._register(rn.chain(i,r=>r.filter(o=>o.keyCode===12))(this.onPageDown,this)),this._register(rn.chain(i,r=>r.filter(o=>o.keyCode===11))(this.onPageUp,this)),this._register(rn.chain(i,r=>r.filter(o=>o.keyCode===14))(this.onHome,this)),this._register(rn.chain(i,r=>r.filter(o=>o.keyCode===13))(this.onEnd,this)),this._register(rn.chain(i,r=>r.filter(o=>o.keyCode>=21&&o.keyCode<=56||o.keyCode>=85&&o.keyCode<=113))(this.onCharacter,this)),this._register(yt(this.selectList.getHTMLElement(),Yt.POINTER_UP,r=>this.onPointerUp(r))),this._register(this.selectList.onMouseOver(r=>typeof r.index<"u"&&this.selectList.setFocus([r.index]))),this._register(this.selectList.onDidChangeFocus(r=>this.onListFocus(r))),this._register(yt(this.selectDropDownContainer,Yt.FOCUS_OUT,r=>{!this._isVisible||ac(r.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;Mr.stop(e);const n=e.target;if(!n||n.classList.contains("slider"))return;const i=n.closest(".monaco-list-row");if(!i)return;const r=Number(i.getAttribute("data-index")),o=i.classList.contains("option-disabled");r>=0&&r<this.options.length&&!o&&(this.selected=r,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)),this.hideSelectDropDown(!0))}onListBlur(){this._sticky||(this.selected!==this._currentSelection&&this.select(this._currentSelection),this.hideSelectDropDown(!1))}renderDescriptionMarkdown(e,n){const i=o=>{for(let s=0;s<o.childNodes.length;s++){const a=o.childNodes.item(s);(a.tagName&&a.tagName.toLowerCase())==="img"?a.remove():i(a)}},r=bme({value:e,supportThemeIcons:!0},{actionHandler:n});return r.element.classList.add("select-box-description-markdown"),i(r.element),r.element}onListFocus(e){!this._isVisible||!this._hasDetails||this.updateDetail(e.indexes[0])}updateDetail(e){this.selectionDetailsPane.innerText="";const n=this.options[e],i=(n==null?void 0:n.description)??"",r=(n==null?void 0:n.descriptionIsMarkdown)??!1;if(i){if(r){const o=n.descriptionMarkdownActionHandler;this.selectionDetailsPane.appendChild(this.renderDescriptionMarkdown(i,o))}else this.selectionDetailsPane.innerText=i;this.selectionDetailsPane.style.display="block"}else this.selectionDetailsPane.style.display="none";this._skipLayout=!0,this.contextViewProvider.layout(),this._skipLayout=!1}onEscape(e){Mr.stop(e),this.select(this._currentSelection),this.hideSelectDropDown(!0)}onEnter(e){Mr.stop(e),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)),this.hideSelectDropDown(!0)}onDownArrow(e){if(this.selected<this.options.length-1){Mr.stop(e,!0);const n=this.options[this.selected+1].isDisabled;if(n&&this.options.length>this.selected+2)this.selected+=2;else{if(n)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(Mr.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){Mr.stop(e),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected<this.options.length-1&&(this.selected++,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onPageDown(e){Mr.stop(e),this.selectList.focusNextPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(e){Mr.stop(e),!(this.options.length<2)&&(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){Mr.stop(e),!(this.options.length<2)&&(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const n=Z1.toString(e.keyCode);let i=-1;for(let r=0;r<this.options.length-1;r++)if(i=(r+this.selected+1)%this.options.length,this.options[i].text.charAt(0).toUpperCase()===n&&!this.options[i].isDisabled){this.select(i),this.selectList.setFocus([i]),this.selectList.reveal(this.selectList.getFocus()[0]),Mr.stop(e);break}}dispose(){this.hideSelectDropDown(!1),super.dispose()}};ox.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32,ox.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2,ox.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3;let bIe=ox;class GNi extends ct{constructor(e,n,i,r){super(),this.selected=0,this.selectBoxOptions=r||Object.create(null),this.options=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=this._register(new st),this.styles=i,this.registerListeners(),this.setOptions(e,n)}registerListeners(){this._register(xd.addTarget(this.selectElement)),[hs.Tap].forEach(e=>{this._register(yt(this.selectElement,e,n=>{this.selectElement.focus()}))}),this._register(Fa(this.selectElement,"click",e=>{Mr.stop(e,!0)})),this._register(Fa(this.selectElement,"change",e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),this._register(Fa(this.selectElement,"keydown",e=>{let n=!1;xr?(e.keyCode===18||e.keyCode===16||e.keyCode===10)&&(n=!0):(e.keyCode===18&&e.altKey||e.keyCode===10||e.keyCode===3)&&(n=!0),n&&e.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,n){(!this.options||!Xs(this.options,e))&&(this.options=e,this.selectElement.options.length=0,this.options.forEach((i,r)=>{this.selectElement.add(this.createOption(i.text,r,i.isDisabled))})),n!==void 0&&this.select(n)}select(e){this.options.length===0?this.selected=0:e>=0&&e<this.options.length?this.selected=e:e>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected<this.options.length&&typeof this.options[this.selected].text=="string"?this.selectElement.title=this.options[this.selected].text:this.selectElement.title=""}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){e.classList.add("select-container"),e.appendChild(this.selectElement),this.setOptions(this.options,this.selected),this.applyStyles()}applyStyles(){this.selectElement&&(this.selectElement.style.backgroundColor=this.styles.selectBackground??"",this.selectElement.style.color=this.styles.selectForeground??"",this.selectElement.style.borderColor=this.styles.selectBorder??"")}createOption(e,n,i){const r=document.createElement("option");return r.value=e,r.text=e,r.disabled=!!i,r}}class YNi extends eg{constructor(e,n,i,r,o){super(),xr&&!(o!=null&&o.useCustomDrawn)?this.selectBoxDelegate=new GNi(e,n,r,o):this.selectBoxDelegate=new bIe(e,n,i,r,o),this._register(this.selectBoxDelegate)}get onDidSelect(){return this.selectBoxDelegate.onDidSelect}setOptions(e,n){this.selectBoxDelegate.setOptions(e,n)}select(e){this.selectBoxDelegate.select(e)}focus(){this.selectBoxDelegate.focus()}blur(){this.selectBoxDelegate.blur()}setFocusable(e){this.selectBoxDelegate.setFocusable(e)}render(e){this.selectBoxDelegate.render(e)}}class qy extends ct{get action(){return this._action}constructor(e,n,i={}){super(),this.options=i,this._context=e||this,this._action=n,n instanceof xm&&this._register(n.onDidChange(r=>{this.element&&this.handleActionChangeEvent(r)}))}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new U2)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const n=this.element=e;this._register(xd.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,sb&&this._register(yt(e,Yt.DRAG_START,r=>{var o;return(o=r.dataTransfer)==null?void 0:o.setData(oW.TEXT,this._action.label)}))),this._register(yt(n,hs.Tap,r=>this.onClick(r,!0))),this._register(yt(n,Yt.MOUSE_DOWN,r=>{i||Mr.stop(r,!0),this._action.enabled&&r.button===0&&n.classList.add("active")})),xr&&this._register(yt(n,Yt.CONTEXT_MENU,r=>{r.button===0&&r.ctrlKey===!0&&this.onClick(r)})),this._register(yt(n,Yt.CLICK,r=>{Mr.stop(r,!0),this.options&&this.options.isMenu||this.onClick(r)})),this._register(yt(n,Yt.DBLCLICK,r=>{Mr.stop(r,!0)})),[Yt.MOUSE_UP,Yt.MOUSE_OUT].forEach(r=>{this._register(yt(n,r,o=>{Mr.stop(o),n.classList.remove("active")}))})}onClick(e,n=!1){var r;Mr.stop(e,!0);const i=pp(this._context)?(r=this.options)!=null&&r.useEventAsContext?e:{preserveFocus:n}:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}updateTooltip(){var n;if(!this.element)return;const e=this.getTooltip()??"";if(this.updateAriaLabel(),(n=this.options.hoverDelegate)!=null&&n.showNativeHover)this.element.title=e;else if(!this.customHover&&e!==""){const i=this.options.hoverDelegate??Yh("element");this.customHover=this._store.add(d_().setupManagedHover(i,this.element,e))}else this.customHover&&this.customHover.update(e)}updateAriaLabel(){if(this.element){const e=this.getTooltip()??"";this.element.setAttribute("aria-label",e)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class y5 extends qy{constructor(e,n,i){super(e,n,i),this.options=i,this.options.icon=i.icon!==void 0?i.icon:!1,this.options.label=i.label!==void 0?i.label:!0,this.cssClass=""}render(e){super.render(e),Gr(this.element);const n=document.createElement("a");if(n.classList.add("action-label"),n.setAttribute("role",this.getDefaultAriaRole()),this.label=n,this.element.appendChild(n),this.options.label&&this.options.keybinding){const i=document.createElement("span");i.classList.add("keybinding"),i.textContent=this.options.keybinding,this.element.appendChild(i)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===dc.ID?"presentation":this.options.isMenu?"menuitem":this.options.isTabList?"tab":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=I({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):(e=this.label)==null||e.classList.remove("codicon")}updateEnabled(){var e,n;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),(e=this.element)==null||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),(n=this.element)==null||n.classList.add("disabled"))}updateAriaLabel(){if(this.label){const e=this.getTooltip()??"";this.label.setAttribute("aria-label",e)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.options.isTabList?this.label.setAttribute("aria-selected",this.action.checked?"true":"false"):(this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox"))):(this.label.classList.remove("checked"),this.label.removeAttribute(this.options.isTabList?"aria-selected":"aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class XNi extends qy{constructor(e,n,i,r,o,s,a){super(e,n),this.selectBox=new YNi(i,r,o,s,a),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect(e=>this.runAction(e.selected,e.index)))}runAction(e,n){this.actionRunner.run(this._action,this.getActionContext(e,n))}getActionContext(e,n){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){var e;(e=this.selectBox)==null||e.focus()}blur(){var e;(e=this.selectBox)==null||e.blur()}render(e){this.selectBox.render(e)}}class ZNi extends U2{constructor(e,n){super(),this._onDidChangeVisibility=this._register(new st),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=jt(e,Xt(".monaco-dropdown")),this._label=jt(this._element,Xt(".dropdown-label"));let i=n.labelRenderer;i||(i=o=>(o.textContent=n.label||"",null));for(const o of[Yt.CLICK,Yt.MOUSE_DOWN,hs.Tap])this._register(yt(this.element,o,s=>Mr.stop(s,!0)));for(const o of[Yt.MOUSE_DOWN,hs.Tap])this._register(yt(this._label,o,s=>{A8e(s)&&(s.detail>1||s.button!==0)||(this.visible?this.hide():this.show())}));this._register(yt(this._label,Yt.KEY_UP,o=>{const s=new as(o);(s.equals(3)||s.equals(10))&&(Mr.stop(o,!0),this.visible?this.hide():this.show())}));const r=i(this._label);r&&this._register(r),this._register(xd.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class QNi extends ZNi{constructor(e,n){super(e,n),this._options=n,this._actions=[],this.actions=n.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,n)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,n):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class Wre extends qy{constructor(e,n,i,r=Object.create(null)){super(null,e,r),this.actionItem=null,this._onDidChangeVisibility=this._register(new st),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=n,this.contextMenuProvider=i,this.options=r,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const n=o=>{this.element=jt(o,Xt("a.action-label"));let s=[];return typeof this.options.classNames=="string"?s=this.options.classNames.split(/\s+/g).filter(a=>!!a):this.options.classNames&&(s=this.options.classNames),s.find(a=>a==="icon")||s.push("codicon"),this.element.classList.add(...s),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this._action.label&&this._register(d_().setupManagedHover(this.options.hoverDelegate??Yh("mouse"),this.element,this._action.label)),this.element.ariaLabel=this._action.label||"",null},i=Array.isArray(this.menuActionsOrProvider),r={contextMenuProvider:this.contextMenuProvider,labelRenderer:n,menuAsChild:this.options.menuAsChild,actions:i?this.menuActionsOrProvider:void 0,actionProvider:i?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new QNi(e,r)),this._register(this.dropdownMenu.onDidChangeVisibility(o=>{var s;(s=this.element)==null||s.setAttribute("aria-expanded",`${o}`),this._onDidChangeVisibility.fire(o)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const o=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return o.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){var e;(e=this.dropdownMenu)==null||e.show()}updateEnabled(){var n,i;const e=!this.action.enabled;(n=this.actionItem)==null||n.classList.toggle("disabled",e),(i=this.element)==null||i.classList.toggle("disabled",e)}}function JNi(t){return t&&typeof t=="object"&&typeof t.original=="string"&&typeof t.value=="string"}function eEi(t){return t?t.condition!==void 0:!1}var R3;(function(t){t[t.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",t[t.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(R3||(R3={}));var _4;(function(t){t[t.None=0]="None",t[t.Initialized=1]="Initialized",t[t.Closed=2]="Closed"})(_4||(_4={}));const nce=class nce extends ct{constructor(e,n=Object.create(null)){super(),this.database=e,this.options=n,this._onDidChangeStorage=this._register(new V2),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=_4.None,this.cache=new Map,this.flushDelayer=this._register(new v4t(nce.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var n,i;this._onDidChangeStorage.pause();try{(n=e.changed)==null||n.forEach((r,o)=>this.acceptExternal(o,r)),(i=e.deleted)==null||i.forEach(r=>this.acceptExternal(r,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,n){if(this.state===_4.Closed)return;let i=!1;pp(n)?i=this.cache.delete(e):this.cache.get(e)!==n&&(this.cache.set(e,n),i=!0),i&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,n){const i=this.cache.get(e);return pp(i)?n:i}getBoolean(e,n){const i=this.get(e);return pp(i)?n:i==="true"}getNumber(e,n){const i=this.get(e);return pp(i)?n:parseInt(i,10)}async set(e,n,i=!1){if(this.state===_4.Closed)return;if(pp(n))return this.delete(e,i);const r=Ic(n)||Array.isArray(n)?PCi(n):String(n);if(this.cache.get(e)!==r)return this.cache.set(e,r),this.pendingInserts.set(e,r),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:i}),this.doFlush()}async delete(e,n=!1){if(!(this.state===_4.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:n}),this.doFlush()}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{var n;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(n=this.whenFlushedCallbacks.pop())==null||n()})}async doFlush(e){return this.options.hint===R3.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),e)}};nce.DEFAULT_FLUSH_DELAY=100;let dB=nce;class T1e{constructor(){this.onDidChangeItemsExternal=rn.None,this.items=new Map}async updateItems(e){var n,i;(n=e.insert)==null||n.forEach((r,o)=>this.items.set(o,r)),(i=e.delete)==null||i.forEach(r=>this.items.delete(r))}}const gte="__$__targetStorageMarker",Xv=Sr("storageService");var lW;(function(t){t[t.NONE=0]="NONE",t[t.SHUTDOWN=1]="SHUTDOWN"})(lW||(lW={}));function tEi(t){const e=t.get(gte);if(e)try{return JSON.parse(e)}catch{}return Object.create(null)}const ice=class ice extends ct{constructor(e={flushInterval:ice.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new V2),this._onDidChangeTarget=this._register(new V2),this._onWillSaveState=this._register(new st),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,n,i){return rn.filter(this._onDidChangeValue.event,r=>r.scope===e&&(n===void 0||r.key===n),i)}emitDidChangeValue(e,n){const{key:i,external:r}=n;if(i===gte){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:i,target:this.getKeyTargets(e)[i],external:r})}get(e,n,i){var r;return(r=this.getStorage(n))==null?void 0:r.get(e,i)}getBoolean(e,n,i){var r;return(r=this.getStorage(n))==null?void 0:r.getBoolean(e,i)}getNumber(e,n,i){var r;return(r=this.getStorage(n))==null?void 0:r.getNumber(e,i)}store(e,n,i,r,o=!1){if(pp(n)){this.remove(e,i,o);return}this.withPausedEmitters(()=>{var s;this.updateKeyTarget(e,i,r),(s=this.getStorage(i))==null||s.set(e,n,o)})}remove(e,n,i=!1){this.withPausedEmitters(()=>{var r;this.updateKeyTarget(e,n,void 0),(r=this.getStorage(n))==null||r.delete(e,i)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,n,i,r=!1){var s,a;const o=this.getKeyTargets(n);typeof i=="number"?o[e]!==i&&(o[e]=i,(s=this.getStorage(n))==null||s.set(gte,JSON.stringify(o),r)):typeof o[e]=="number"&&(delete o[e],(a=this.getStorage(n))==null||a.set(gte,JSON.stringify(o),r))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const n=this.getStorage(e);return n?tEi(n):Object.create(null)}};ice.DEFAULT_FLUSH_INTERVAL=60*1e3;let vIe=ice;class nEi extends vIe{constructor(){super(),this.applicationStorage=this._register(new dB(new T1e,{hint:R3.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new dB(new T1e,{hint:R3.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new dB(new T1e,{hint:R3.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e)))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}function iEi(t,e){const n={...e};for(const i in t){const r=t[i];n[i]=r!==void 0?Cn(r):void 0}return n}const rEi={keybindingLabelBackground:Cn(rvi),keybindingLabelForeground:Cn(ovi),keybindingLabelBorder:Cn(svi),keybindingLabelBottomBorder:Cn(avi),keybindingLabelShadow:Cn(P6)},oEi={buttonForeground:Cn(B3t),buttonSeparator:Cn(Wbi),buttonBackground:Cn(G7),buttonHoverBackground:Cn(Ubi),buttonSecondaryForeground:Cn(qbi),buttonSecondaryBackground:Cn(rTe),buttonSecondaryHoverBackground:Cn(Gbi),buttonBorder:Cn(Kbi)},sEi={progressBarBackground:Cn(rbi)},Ure={inputActiveOptionBorder:Cn(Jfe),inputActiveOptionForeground:Cn(eme),inputActiveOptionBackground:Cn(Sq)};Cn(Y7),Cn(Ybi),Cn(Xbi),Cn(Zbi),Cn(Qbi),Cn(Jbi),Cn(evi);Cn(tvi),Cn(ivi),Cn(nvi);Cn(Kg),Cn(nVe),Cn(P6),Cn($r),Cn(Nbi),Cn(Ebi),Cn(Dbi),Cn(nbi);const Kre={inputBackground:Cn(iTe),inputForeground:Cn($3t),inputBorder:Cn(V3t),inputValidationInfoBorder:Cn(Obi),inputValidationInfoBackground:Cn(Rbi),inputValidationInfoForeground:Cn(Pbi),inputValidationWarningBorder:Cn($bi),inputValidationWarningBackground:Cn(jbi),inputValidationWarningForeground:Cn(Fbi),inputValidationErrorBorder:Cn(zbi),inputValidationErrorBackground:Cn(Vbi),inputValidationErrorForeground:Cn(Bbi)},aEi={listFilterWidgetBackground:Cn(_vi),listFilterWidgetOutline:Cn(xvi),listFilterWidgetNoMatchesOutline:Cn(wvi),listFilterWidgetShadow:Cn(Cvi),inputBoxStyles:Kre,toggleStyles:Ure},q5t={badgeBackground:Cn(lte),badgeForeground:Cn(ibi),badgeBorder:Cn($r)};Cn(Cbi),Cn(wbi),Cn(eat),Cn(eat),Cn(Sbi);const nR={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:Cn(lvi),listFocusForeground:Cn(cvi),listFocusOutline:Cn(uvi),listActiveSelectionBackground:Cn(u5),listActiveSelectionForeground:Cn(ure),listActiveSelectionIconForeground:Cn(z3t),listFocusAndSelectionOutline:Cn(dvi),listFocusAndSelectionBackground:Cn(u5),listFocusAndSelectionForeground:Cn(ure),listInactiveSelectionBackground:Cn(hvi),listInactiveSelectionIconForeground:Cn(mvi),listInactiveSelectionForeground:Cn(fvi),listInactiveFocusBackground:Cn(pvi),listInactiveFocusOutline:Cn(gvi),listHoverBackground:Cn(H3t),listHoverForeground:Cn(W3t),listDropOverBackground:Cn(bvi),listDropBetweenBackground:Cn(vvi),listSelectionOutline:Cn(Bs),listHoverOutline:Cn(Bs),treeIndentGuidesStroke:Cn(U3t),treeInactiveIndentGuidesStroke:Cn(Svi),treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:Cn(tVe),tableColumnsBorder:Cn(Nvi),tableOddRowsBackgroundColor:Cn(Evi)};function iR(t){return iEi(t,nR)}const lEi={selectBackground:Cn(tme),selectListBackground:Cn(Hbi),selectForeground:Cn(lVe),decoratorRightForeground:Cn(K3t),selectBorder:Cn(cVe),focusBorder:Cn(fw),listFocusBackground:Cn(BH),listInactiveSelectionIconForeground:Cn(uVe),listFocusForeground:Cn(VH),listFocusOutline:Xgi(Bs,Rt.transparent.toString()),listHoverBackground:Cn(H3t),listHoverForeground:Cn(W3t),listHoverOutline:Cn(Bs),selectListBorder:Cn(iVe),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropOverBackground:void 0,listDropBetweenBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},cEi={shadowColor:Cn(P6),borderColor:Cn(Dvi),foregroundColor:Cn(kvi),backgroundColor:Cn(Mvi),selectionForegroundColor:Cn(Lvi),selectionBackgroundColor:Cn(Tvi),selectionBorderColor:Cn(Ivi),separatorColor:Cn(Avi),scrollbarShadow:Cn(tVe),scrollbarSliderBackground:Cn(T3t),scrollbarSliderHoverBackground:Cn(I3t),scrollbarSliderActiveBackground:Cn(A3t)};var wme=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},pf=function(t,e){return function(n,i){e(n,i,t)}};function uEi(t,e,n,i){let r,o,s;if(Array.isArray(t))s=t,r=e,o=n;else{const c=e;s=t.getActions(c),r=n,o=i}const a=sC.getInstance(),l=a.keyStatus.altKey||(Fu||$h)&&a.keyStatus.shiftKey;G5t(s,r,l,o?c=>c===o:c=>c==="navigation")}function Cme(t,e,n,i,r,o){let s,a,l,c,u;if(Array.isArray(t))u=t,s=e,a=n,l=i,c=r;else{const h=e;u=t.getActions(h),s=n,a=i,l=r,c=o}G5t(u,s,!1,typeof a=="string"?h=>h===a:a,l,c)}function G5t(t,e,n,i=s=>s==="navigation",r=()=>!1,o=!1){let s,a;Array.isArray(e)?(s=e,a=e):(s=e.primary,a=e.secondary);const l=new Set;for(const[c,u]of t){let d;i(c)?(d=s,d.length>0&&o&&d.push(new dc)):(d=a,d.length>0&&d.push(new dc));for(let h of u){n&&(h=h instanceof wm&&h.alt?h.alt:h);const f=d.push(h);h instanceof i5&&l.add({group:c,action:h,index:f-1})}}for(const{group:c,action:u,index:d}of l){const h=i(c)?s:a,f=u.actions;r(u,c,h.length)&&h.splice(d,1,...f)}}let _k=class extends y5{constructor(e,n,i,r,o,s,a,l){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:n==null?void 0:n.draggable,keybinding:n==null?void 0:n.keybinding,hoverDelegate:n==null?void 0:n.hoverDelegate}),this._options=n,this._keybindingService=i,this._notificationService=r,this._contextKeyService=o,this._themeService=s,this._contextMenuService=a,this._accessibilityService=l,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new mc),this._altKey=sC.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){e.preventDefault(),e.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(n){this._notificationService.error(n)}}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let n=!1;const i=()=>{var o;const r=!!((o=this._menuItemAction.alt)!=null&&o.enabled)&&(!this._accessibilityService.isMotionReduced()||n)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&n);r!==this._wantsAltCommand&&(this._wantsAltCommand=r,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(i)),this._register(yt(e,"mouseleave",r=>{n=!1,i()})),this._register(yt(e,"mouseenter",r=>{n=!0,i()})),i()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var o;const e=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),n=e&&e.getLabel(),i=this._commandAction.tooltip||this._commandAction.label;let r=n?I("titleAndKb","{0} ({1})",i,n):i;if(!this._wantsAltCommand&&((o=this._menuItemAction.alt)!=null&&o.enabled)){const s=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,a=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),l=a&&a.getLabel(),c=l?I("titleAndKb","{0} ({1})",s,l):s;r=I("titleAndKbAndAlt",`{0}
[{1}] {2}`,r,a7e.modifierLabels[pm].altKey,c)}return r}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:n,label:i}=this;if(!n||!i)return;const r=this._commandAction.checked&&eEi(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(r)if(ci.isThemeIcon(r)){const o=ci.asClassNameArray(r);i.classList.add(...o),this._itemClassDispose.value=Kn(()=>{i.classList.remove(...o)})}else i.style.backgroundImage=d5(this._themeService.getColorTheme().type)?fS(r.dark):fS(r.light),i.classList.add("icon"),this._itemClassDispose.value=yv(Kn(()=>{i.style.backgroundImage="",i.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};_k=wme([pf(2,vo),pf(3,tl),pf(4,vi),pf(5,Ql),pf(6,Hm),pf(7,Bm)],_k);class d7e extends _k{render(e){var n;this.options.label=!0,this.options.icon=!1,super.render(e),e.classList.add("text-only"),e.classList.toggle("use-comma",((n=this._options)==null?void 0:n.useComma)??!1)}updateLabel(){var n;const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const i=d7e._symbolPrintEnter(e);(n=this._options)!=null&&n.conversational?this.label.textContent=I({key:"content2",comment:['A label with keybindg like "ESC to dismiss"']},"{1} to {0}",this._action.label,i):this.label.textContent=I({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",this._action.label,i)}}static _symbolPrintEnter(e){var n;return(n=e.getLabel())==null?void 0:n.replace(/\benter\b/gi,"⏎").replace(/\bEscape\b/gi,"Esc")}}let yIe=class extends Wre{constructor(e,n,i,r,o){const s={...n,menuAsChild:(n==null?void 0:n.menuAsChild)??!1,classNames:(n==null?void 0:n.classNames)??(ci.isThemeIcon(e.item.icon)?ci.asClassName(e.item.icon):void 0),keybindingProvider:(n==null?void 0:n.keybindingProvider)??(a=>i.lookupKeybinding(a.id))};super(e,{getActions:()=>e.actions},r,s),this._keybindingService=i,this._contextMenuService=r,this._themeService=o}render(e){super.render(e),Gr(this.element),e.classList.add("menu-entry");const n=this._action,{icon:i}=n.item;if(i&&!ci.isThemeIcon(i)){this.element.classList.add("icon");const r=()=>{this.element&&(this.element.style.backgroundImage=d5(this._themeService.getColorTheme().type)?fS(i.dark):fS(i.light))};r(),this._register(this._themeService.onDidColorThemeChange(()=>{r()}))}}};yIe=wme([pf(2,vo),pf(3,Hm),pf(4,Ql)],yIe);let _Ie=class extends qy{constructor(e,n,i,r,o,s,a,l){super(null,e),this._keybindingService=i,this._notificationService=r,this._contextMenuService=o,this._menuService=s,this._instaService=a,this._storageService=l,this._container=null,this._options=n,this._storageKey=`${e.item.submenu.id}_lastActionId`;let c;const u=n!=null&&n.persistLastActionId?l.get(this._storageKey,1):void 0;u&&(c=e.actions.find(h=>u===h.id)),c||(c=e.actions[0]),this._defaultAction=this._instaService.createInstance(_k,c,{keybinding:this._getDefaultActionKeybindingLabel(c)});const d={keybindingProvider:h=>this._keybindingService.lookupKeybinding(h.id),...n,menuAsChild:(n==null?void 0:n.menuAsChild)??!0,classNames:(n==null?void 0:n.classNames)??["codicon","codicon-chevron-down"],actionRunner:(n==null?void 0:n.actionRunner)??new U2};this._dropdown=new Wre(e,e.actions,this._contextMenuService,d),this._register(this._dropdown.actionRunner.onDidRun(h=>{h.action instanceof wm&&this.update(h.action)}))}update(e){var n;(n=this._options)!=null&&n.persistLastActionId&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(_k,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends U2{async runAction(i,r){await i.run(void 0)}},this._container&&this._defaultAction.render(R8e(this._container,Xt(".action-container")))}_getDefaultActionKeybindingLabel(e){var i;let n;if((i=this._options)!=null&&i.renderKeybindingWithDefaultActionLabel){const r=this._keybindingService.lookupKeybinding(e.id);r&&(n=`(${r.getLabel()})`)}return n}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const n=Xt(".action-container");this._defaultAction.render(jt(this._container,n)),this._register(yt(n,Yt.KEY_DOWN,r=>{const o=new as(r);o.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),o.stopPropagation())}));const i=Xt(".dropdown-action-container");this._dropdown.render(jt(this._container,i)),this._register(yt(i,Yt.KEY_DOWN,r=>{var s;const o=new as(r);o.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(s=this._defaultAction.element)==null||s.focus(),o.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};_Ie=wme([pf(2,vo),pf(3,tl),pf(4,Hm),pf(5,Jp),pf(6,qn),pf(7,Xv)],_Ie);let xIe=class extends XNi{constructor(e,n){super(null,e,e.actions.map(i=>({text:i.id===dc.ID?"─────────":i.label,isDisabled:!i.enabled})),0,n,lEi,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex(i=>i.checked)))}render(e){super.render(e),e.style.borderColor=Cn(cVe)}runAction(e,n){const i=this.action.actions[n];i&&this.actionRunner.run(i)}};xIe=wme([pf(1,US)],xIe);function Y5t(t,e,n){return e instanceof wm?t.createInstance(_k,e,n):e instanceof y3?e.item.isSelection?t.createInstance(xIe,e):e.item.rememberDefaultAction?t.createInstance(_Ie,e,{...n,persistLastActionId:!0}):t.createInstance(yIe,e,n):void 0}class Ap extends ct{constructor(e,n={}){var o,s;super(),this._actionRunnerDisposables=this._register(new Lt),this.viewItemDisposables=this._register(new m8e),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new st),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new st({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new st),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new st),this.onWillRun=this._onWillRun.event,this.options=n,this._context=n.context??null,this._orientation=this.options.orientation??0,this._triggerKeys={keyDown:((o=this.options.triggerKeys)==null?void 0:o.keyDown)??!1,keys:((s=this.options.triggerKeys)==null?void 0:s.keys)??[3,10]},this._hoverDelegate=n.hoverDelegate??this._register(v5()),this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new U2,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(a=>this._onDidRun.fire(a))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(a=>this._onWillRun.fire(a))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar";let i,r;switch(this._orientation){case 0:i=[15],r=[17];break;case 1:i=[16],r=[18],this.domNode.className+=" vertical";break}this._register(yt(this.domNode,Yt.KEY_DOWN,a=>{const l=new as(a);let c=!0;const u=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;i&&(l.equals(i[0])||l.equals(i[1]))?c=this.focusPrevious():r&&(l.equals(r[0])||l.equals(r[1]))?c=this.focusNext():l.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():l.equals(14)?c=this.focusFirst():l.equals(13)?c=this.focusLast():l.equals(2)&&u instanceof qy&&u.trapsArrowNavigation?c=this.focusNext():this.isTriggerKeyEvent(l)?this._triggerKeys.keyDown?this.doTrigger(l):this.triggerKeyDown=!0:c=!1,c&&(l.preventDefault(),l.stopPropagation())})),this._register(yt(this.domNode,Yt.KEY_UP,a=>{const l=new as(a);this.isTriggerKeyEvent(l)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(l)),l.preventDefault(),l.stopPropagation()):(l.equals(2)||l.equals(1026)||l.equals(16)||l.equals(18)||l.equals(15)||l.equals(17))&&this.updateFocusedItem()})),this.focusTracker=this._register(q0(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(Au()===this.domNode||!ac(Au(),this.domNode))&&(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const n=this.viewItems.find(i=>i instanceof qy&&i.isEnabled());n instanceof qy&&n.setFocusable(!0)}else this.viewItems.forEach(n=>{n instanceof qy&&n.setFocusable(!1)})}isTriggerKeyEvent(e){let n=!1;return this._triggerKeys.keys.forEach(i=>{n=n||e.equals(i)}),n}updateFocusedItem(){var e,n;for(let i=0;i<this.actionsList.children.length;i++){const r=this.actionsList.children[i];if(ac(Au(),r)){this.focusedItem=i,(n=(e=this.viewItems[this.focusedItem])==null?void 0:e.showHover)==null||n.call(e);break}}}get context(){return this._context}set context(e){this._context=e,this.viewItems.forEach(n=>n.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(n=>this._onDidRun.fire(n))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(n=>this._onWillRun.fire(n))),this.viewItems.forEach(n=>n.actionRunner=e)}getContainer(){return this.domNode}getAction(e){var n;if(typeof e=="number")return(n=this.viewItems[e])==null?void 0:n.action;if(uc(e)){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let i=0;i<this.actionsList.childNodes.length;i++)if(this.actionsList.childNodes[i]===e)return this.viewItems[i].action}}push(e,n={}){const i=Array.isArray(e)?e:[e];let r=ok(n.index)?n.index:null;i.forEach(o=>{const s=document.createElement("li");s.className="action-item",s.setAttribute("role","presentation");let a;const l={hoverDelegate:this._hoverDelegate,...n,isTabList:this.options.ariaRole==="tablist"};this.options.actionViewItemProvider&&(a=this.options.actionViewItemProvider(o,l)),a||(a=new y5(this.context,o,l)),this.options.allowContextMenu||this.viewItemDisposables.set(a,yt(s,Yt.CONTEXT_MENU,c=>{Mr.stop(c,!0)})),a.actionRunner=this._actionRunner,a.setActionContext(this.context),a.render(s),this.focusable&&a instanceof qy&&this.viewItems.length===0&&a.setFocusable(!0),r===null||r<0||r>=this.actionsList.children.length?(this.actionsList.appendChild(s),this.viewItems.push(a)):(this.actionsList.insertBefore(s,this.actionsList.children[r]),this.viewItems.splice(r,0,a),r++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=Jo(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),ru(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(e){let n=!1,i;if(e===void 0?n=!0:typeof e=="number"?i=e:typeof e=="boolean"&&(n=e),n&&typeof this.focusedItem>"u"){const r=this.viewItems.findIndex(o=>o.isEnabled());this.focusedItem=r===-1?void 0:r,this.updateFocus(void 0,void 0,!0)}else i!==void 0&&(this.focusedItem=i),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const n=this.focusedItem;let i;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=n,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==n&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===dc.ID));return this.updateFocus(),!0}focusPrevious(e){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const n=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=n,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==n&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===dc.ID));return this.updateFocus(!0),!0}updateFocus(e,n,i=!1){var o,s;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:n}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((o=this.viewItems[this.previouslyFocusedItem])==null||o.blur());const r=this.focusedItem!==void 0?this.viewItems[this.focusedItem]:void 0;if(r){let a=!0;pH(r.focus)||(a=!1),this.options.focusOnlyEnabledItems&&pH(r.isEnabled)&&!r.isEnabled()&&(a=!1),r.action.id===dc.ID&&(a=!1),a?(i||this.previouslyFocusedItem!==this.focusedItem)&&(r.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:n}),this.previouslyFocusedItem=void 0),a&&((s=r.showHover)==null||s.call(r))}}doTrigger(e){if(typeof this.focusedItem>"u")return;const n=this.viewItems[this.focusedItem];if(n instanceof qy){const i=n._context===null||n._context===void 0?e:n._context;this.run(n._action,i)}}async run(e,n){await this._actionRunner.run(e,n)}dispose(){this._context=void 0,this.viewItems=Jo(this.viewItems),this.getContainer().remove(),super.dispose()}}const wIe=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,I1e=/(&amp;)?(&amp;)([^\s&])/g;var qre;(function(t){t[t.Right=0]="Right",t[t.Left=1]="Left"})(qre||(qre={}));var CIe;(function(t){t[t.Above=0]="Above",t[t.Below=1]="Below"})(CIe||(CIe={}));class P3 extends Ap{constructor(e,n,i,r){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const o=document.createElement("div");o.classList.add("monaco-menu"),o.setAttribute("role","presentation"),super(o,{orientation:1,actionViewItemProvider:c=>this.doGetActionViewItem(c,i,s),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...xr||$h?[10]:[]],keyDown:!0}}),this.menuStyles=r,this.menuElement=o,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,r),this._register(xd.addTarget(o)),this._register(yt(o,Yt.KEY_DOWN,c=>{new as(c).equals(2)&&c.preventDefault()})),i.enableMnemonics&&this._register(yt(o,Yt.KEY_DOWN,c=>{const u=c.key.toLocaleLowerCase();if(this.mnemonics.has(u)){Mr.stop(c,!0);const d=this.mnemonics.get(u);if(d.length===1&&(d[0]instanceof ect&&d[0].container&&this.focusItemByElement(d[0].container),d[0].onClick(c)),d.length>1){const h=d.shift();h&&h.container&&(this.focusItemByElement(h.container),d.push(h)),this.mnemonics.set(u,d)}}})),$h&&this._register(yt(o,Yt.KEY_DOWN,c=>{const u=new as(c);u.equals(14)||u.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),Mr.stop(c,!0)):(u.equals(13)||u.equals(12))&&(this.focusedItem=0,this.focusPrevious(),Mr.stop(c,!0))})),this._register(yt(this.domNode,Yt.MOUSE_OUT,c=>{const u=c.relatedTarget;ac(u,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),c.stopPropagation())})),this._register(yt(this.actionsList,Yt.MOUSE_OVER,c=>{let u=c.target;if(!(!u||!ac(u,this.actionsList)||u===this.actionsList)){for(;u.parentElement!==this.actionsList&&u.parentElement!==null;)u=u.parentElement;if(u.classList.contains("action-item")){const d=this.focusedItem;this.setFocusedItem(u),d!==this.focusedItem&&this.updateFocus()}}})),this._register(xd.addTarget(this.actionsList)),this._register(yt(this.actionsList,hs.Tap,c=>{let u=c.initialTarget;if(!(!u||!ac(u,this.actionsList)||u===this.actionsList)){for(;u.parentElement!==this.actionsList&&u.parentElement!==null;)u=u.parentElement;if(u.classList.contains("action-item")){const d=this.focusedItem;this.setFocusedItem(u),d!==this.focusedItem&&this.updateFocus()}}}));const s={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new Eq(o,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const a=this.scrollableElement.getDomNode();a.style.position="",this.styleScrollElement(a,r),this._register(yt(o,hs.Change,c=>{Mr.stop(c,!0);const u=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:u-c.translationY})})),this._register(yt(a,Yt.MOUSE_UP,c=>{c.preventDefault()}));const l=ei(e);o.style.maxHeight=`${Math.max(10,l.innerHeight-e.getBoundingClientRect().top-35)}px`,n=n.filter((c,u)=>{var d;return(d=i.submenuIds)!=null&&d.has(c.id)?(console.warn(`Found submenu cycle: ${c.id}`),!1):!(c instanceof dc&&(u===n.length-1||u===0||n[u-1]instanceof dc))}),this.push(n,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(c=>!(c instanceof tct)).forEach((c,u,d)=>{c.updatePositionInSet(u+1,d.length)})}initializeOrUpdateStyleSheet(e,n){this.styleSheet||(Uie(e)?this.styleSheet=Wp(e):(P3.globalStyleSheet||(P3.globalStyleSheet=Wp()),this.styleSheet=P3.globalStyleSheet)),this.styleSheet.textContent=hEi(n,Uie(e))}styleScrollElement(e,n){const i=n.foregroundColor??"",r=n.backgroundColor??"",o=n.borderColor?`1px solid ${n.borderColor}`:"",s="5px",a=n.shadowColor?`0 2px 8px ${n.shadowColor}`:"";e.style.outline=o,e.style.borderRadius=s,e.style.color=i,e.style.backgroundColor=r,e.style.boxShadow=a}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const n=this.focusedItem;this.setFocusedItem(e),n!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let n=0;n<this.actionsList.children.length;n++){const i=this.actionsList.children[n];if(e===i){this.focusedItem=n;break}}}updateFocus(e){super.updateFocus(e,!0,!0),typeof this.focusedItem<"u"&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(e,n,i){if(e instanceof dc)return new tct(n.context,e,{icon:!0},this.menuStyles);if(e instanceof i5){const r=new ect(e,e.actions,i,{...n,submenuIds:new Set([...n.submenuIds||[],e.id])},this.menuStyles);if(n.enableMnemonics){const o=r.getMnemonic();if(o&&r.isEnabled()){let s=[];this.mnemonics.has(o)&&(s=this.mnemonics.get(o)),s.push(r),this.mnemonics.set(o,s)}}return r}else{const r={enableMnemonics:n.enableMnemonics,useEventAsContext:n.useEventAsContext};if(n.getKeyBinding){const s=n.getKeyBinding(e);if(s){const a=s.getLabel();a&&(r.keybinding=a)}}const o=new X5t(n.context,e,r,this.menuStyles);if(n.enableMnemonics){const s=o.getMnemonic();if(s&&o.isEnabled()){let a=[];this.mnemonics.has(s)&&(a=this.mnemonics.get(s)),a.push(o),this.mnemonics.set(s,a)}}return o}}}class X5t extends qy{constructor(e,n,i,r){if(i.isMenu=!0,super(n,n,i),this.menuStyle=r,this.options=i,this.options.icon=i.icon!==void 0?i.icon:!1,this.options.label=i.label!==void 0?i.label:!0,this.cssClass="",this.options.label&&i.enableMnemonics){const o=this.action.label;if(o){const s=wIe.exec(o);s&&(this.mnemonic=(s[1]?s[1]:s[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new Wo(()=>{this.element&&(this._register(yt(this.element,Yt.MOUSE_UP,o=>{if(Mr.stop(o,!0),sb){if(new uv(ei(this.element),o).rightButton)return;this.onClick(o)}else setTimeout(()=>{this.onClick(o)},0)})),this._register(yt(this.element,Yt.CONTEXT_MENU,o=>{Mr.stop(o,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=jt(this.element,Xt("a.action-menu-item")),this._action.id===dc.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=jt(this.item,Xt("span.menu-item-check"+ci.asCSSSelector(qt.menuSelection))),this.check.setAttribute("role","none"),this.label=jt(this.item,Xt("span.action-label")),this.options.label&&this.options.keybinding&&(jt(this.item,Xt("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var e;super.focus(),(e=this.item)==null||e.focus(),this.applyStyle()}updatePositionInSet(e,n){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${n}`))}updateLabel(){var e;if(this.label&&this.options.label){ru(this.label);let n=i7e(this.action.label);if(n){const i=dEi(n);this.options.enableMnemonics||(n=i),this.label.setAttribute("aria-label",i.replace(/&&/g,"&"));const r=wIe.exec(n);if(r){n=z9(n),I1e.lastIndex=0;let o=I1e.exec(n);for(;o&&o[1];)o=I1e.exec(n);const s=a=>a.replace(/&amp;&amp;/g,"&amp;");o?this.label.append(mq(s(n.substr(0,o.index))," "),Xt("u",{"aria-hidden":"true"},o[3]),l4t(s(n.substr(o.index+o[0].length))," ")):this.label.innerText=s(n).trim(),(e=this.item)==null||e.setAttribute("aria-keyshortcuts",(r[1]?r[1]:r[3]).toLocaleLowerCase())}else this.label.innerText=n.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),e!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),n=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,r=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",o=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=n??"",this.item.style.backgroundColor=i??"",this.item.style.outline=r,this.item.style.outlineOffset=o),this.check&&(this.check.style.color=n??"")}}class ect extends X5t{constructor(e,n,i,r,o){super(e,e,r,o),this.submenuActions=n,this.parentData=i,this.submenuOptions=r,this.mysubmenu=null,this.submenuDisposables=this._register(new Lt),this.mouseOver=!1,this.expandDirection=r&&r.expandDirection!==void 0?r.expandDirection:{horizontal:qre.Right,vertical:CIe.Below},this.showScheduler=new Wo(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new Wo(()=>{this.element&&!ac(Au(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=jt(this.item,Xt("span.submenu-indicator"+ci.asCSSSelector(qt.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(yt(this.element,Yt.KEY_UP,n=>{const i=new as(n);(i.equals(17)||i.equals(3))&&(Mr.stop(n,!0),this.createSubmenu(!0))})),this._register(yt(this.element,Yt.KEY_DOWN,n=>{const i=new as(n);Au()===this.item&&(i.equals(17)||i.equals(3))&&Mr.stop(n,!0)})),this._register(yt(this.element,Yt.MOUSE_OVER,n=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(yt(this.element,Yt.MOUSE_LEAVE,n=>{this.mouseOver=!1})),this._register(yt(this.element,Yt.FOCUS_OUT,n=>{this.element&&!ac(Au(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(e){Mr.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,n,i,r){const o={top:0,left:0};return o.left=b4(e.width,n.width,{position:r.horizontal===qre.Right?0:1,offset:i.left,size:i.width}),o.left>=i.left&&o.left<i.left+i.width&&(i.left+10+n.width<=e.width&&(o.left=i.left+10),i.top+=10,i.height=0),o.top=b4(e.height,n.height,{position:0,offset:i.top,size:0}),o.top+n.height===i.top&&o.top+i.height+n.height<=e.height&&(o.top+=i.height),o}createSubmenu(e=!0){if(this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=jt(this.element,Xt("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const n=ei(this.parentData.parent.domNode).getComputedStyle(this.parentData.parent.domNode),i=parseFloat(n.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new P3(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new LLe],this.submenuOptions,this.menuStyle);const r=this.element.getBoundingClientRect(),o={top:r.top-i,left:r.left,height:r.height+2*i,width:r.width},s=this.submenuContainer.getBoundingClientRect(),a=ei(this.element),{top:l,left:c}=this.calculateSubmenuMenuLayout(new Do(a.innerWidth,a.innerHeight),Do.lift(s),o,this.expandDirection);this.submenuContainer.style.left=`${c-s.left}px`,this.submenuContainer.style.top=`${l-s.top}px`,this.submenuDisposables.add(yt(this.submenuContainer,Yt.KEY_UP,u=>{new as(u).equals(15)&&(Mr.stop(u,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(yt(this.submenuContainer,Yt.KEY_DOWN,u=>{new as(u).equals(15)&&Mr.stop(u,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var n;this.item&&((n=this.item)==null||n.setAttribute("aria-expanded",e))}applyStyle(){super.applyStyle();const n=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=n??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class tct extends y5{constructor(e,n,i,r){super(e,n,i),this.menuStyles=r}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function dEi(t){const e=wIe,n=e.exec(t);if(!n)return t;const i=!n[1];return t.replace(e,i?"$2$3":"").trim()}function nct(t){const e=i4t()[t.id];return`.codicon-${t.id}:before { content: '\\${e.toString(16)}'; }`}function hEi(t,e){let n=`
.monaco-menu {
	font-size: 13px;
	border-radius: 5px;
	min-width: 160px;
}

${nct(qt.menuSelection)}
${nct(qt.menuSubmenu)}

.monaco-menu .monaco-action-bar {
	text-align: right;
	overflow: hidden;
	white-space: nowrap;
}

.monaco-menu .monaco-action-bar .actions-container {
	display: flex;
	margin: 0 auto;
	padding: 0;
	width: 100%;
	justify-content: flex-end;
}

.monaco-menu .monaco-action-bar.vertical .actions-container {
	display: inline-block;
}

.monaco-menu .monaco-action-bar.reverse .actions-container {
	flex-direction: row-reverse;
}

.monaco-menu .monaco-action-bar .action-item {
	cursor: pointer;
	display: inline-block;
	transition: transform 50ms ease;
	position: relative;  /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */
}

.monaco-menu .monaco-action-bar .action-item.disabled {
	cursor: default;
}

.monaco-menu .monaco-action-bar .action-item .icon,
.monaco-menu .monaco-action-bar .action-item .codicon {
	display: inline-block;
}

.monaco-menu .monaco-action-bar .action-item .codicon {
	display: flex;
	align-items: center;
}

.monaco-menu .monaco-action-bar .action-label {
	font-size: 11px;
	margin-right: 4px;
}

.monaco-menu .monaco-action-bar .action-item.disabled .action-label,
.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {
	color: var(--vscode-disabledForeground);
}

/* Vertical actions */

.monaco-menu .monaco-action-bar.vertical {
	text-align: left;
}

.monaco-menu .monaco-action-bar.vertical .action-item {
	display: block;
}

.monaco-menu .monaco-action-bar.vertical .action-label.separator {
	display: block;
	border-bottom: 1px solid var(--vscode-menu-separatorBackground);
	padding-top: 1px;
	padding: 30px;
}

.monaco-menu .secondary-actions .monaco-action-bar .action-label {
	margin-left: 6px;
}

/* Action Items */
.monaco-menu .monaco-action-bar .action-item.select-container {
	overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */
	flex: 1;
	max-width: 170px;
	min-width: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 10px;
}

.monaco-menu .monaco-action-bar.vertical {
	margin-left: 0;
	overflow: visible;
}

.monaco-menu .monaco-action-bar.vertical .actions-container {
	display: block;
}

.monaco-menu .monaco-action-bar.vertical .action-item {
	padding: 0;
	transform: none;
	display: flex;
}

.monaco-menu .monaco-action-bar.vertical .action-item.active {
	transform: none;
}

.monaco-menu .monaco-action-bar.vertical .action-menu-item {
	flex: 1 1 auto;
	display: flex;
	height: 2em;
	align-items: center;
	position: relative;
	margin: 0 4px;
	border-radius: 4px;
}

.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,
.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {
	opacity: unset;
}

.monaco-menu .monaco-action-bar.vertical .action-label {
	flex: 1 1 auto;
	text-decoration: none;
	padding: 0 1em;
	background: none;
	font-size: 12px;
	line-height: 1;
}

.monaco-menu .monaco-action-bar.vertical .keybinding,
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
	display: inline-block;
	flex: 2 1 auto;
	padding: 0 1em;
	text-align: right;
	font-size: 12px;
	line-height: 1;
}

.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
	height: 100%;
}

.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {
	font-size: 16px !important;
	display: flex;
	align-items: center;
}

.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {
	margin-left: auto;
	margin-right: -20px;
}

.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {
	opacity: 0.4;
}

.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {
	display: inline-block;
	box-sizing: border-box;
	margin: 0;
}

.monaco-menu .monaco-action-bar.vertical .action-item {
	position: static;
	overflow: visible;
}

.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {
	position: absolute;
}

.monaco-menu .monaco-action-bar.vertical .action-label.separator {
	width: 100%;
	height: 0px !important;
	opacity: 1;
}

.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {
	padding: 0.7em 1em 0.1em 1em;
	font-weight: bold;
	opacity: 1;
}

.monaco-menu .monaco-action-bar.vertical .action-label:hover {
	color: inherit;
}

.monaco-menu .monaco-action-bar.vertical .menu-item-check {
	position: absolute;
	visibility: hidden;
	width: 1em;
	height: 100%;
}

.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {
	visibility: visible;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Context Menu */

.context-view.monaco-menu-container {
	outline: 0;
	border: none;
	animation: fadeIn 0.083s linear;
	-webkit-app-region: no-drag;
}

.context-view.monaco-menu-container :focus,
.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,
.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {
	outline: 0;
}

.hc-black .context-view.monaco-menu-container,
.hc-light .context-view.monaco-menu-container,
:host-context(.hc-black) .context-view.monaco-menu-container,
:host-context(.hc-light) .context-view.monaco-menu-container {
	box-shadow: none;
}

.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,
.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,
:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,
:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {
	background: none;
}

/* Vertical Action Bar Styles */

.monaco-menu .monaco-action-bar.vertical {
	padding: 4px 0;
}

.monaco-menu .monaco-action-bar.vertical .action-menu-item {
	height: 2em;
}

.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),
.monaco-menu .monaco-action-bar.vertical .keybinding {
	font-size: inherit;
	padding: 0 2em;
	max-height: 100%;
}

.monaco-menu .monaco-action-bar.vertical .menu-item-check {
	font-size: inherit;
	width: 2em;
}

.monaco-menu .monaco-action-bar.vertical .action-label.separator {
	font-size: inherit;
	margin: 5px 0 !important;
	padding: 0;
	border-radius: 0;
}

.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {
	margin-left: 0;
	margin-right: 0;
}

.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
	font-size: 60%;
	padding: 0 1.8em;
}

.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator,
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
	height: 100%;
	mask-size: 10px 10px;
	-webkit-mask-size: 10px 10px;
}

.monaco-menu .action-item {
	cursor: default;
}`;if(e){n+=`
			/* Arrows */
			.monaco-scrollable-element > .scrollbar > .scra {
				cursor: pointer;
				font-size: 11px !important;
			}

			.monaco-scrollable-element > .visible {
				opacity: 1;

				/* Background rule added for IE9 - to allow clicks on dom node */
				background:rgba(0,0,0,0);

				transition: opacity 100ms linear;
			}
			.monaco-scrollable-element > .invisible {
				opacity: 0;
				pointer-events: none;
			}
			.monaco-scrollable-element > .invisible.fade {
				transition: opacity 800ms linear;
			}

			/* Scrollable Content Inset Shadow */
			.monaco-scrollable-element > .shadow {
				position: absolute;
				display: none;
			}
			.monaco-scrollable-element > .shadow.top {
				display: block;
				top: 0;
				left: 3px;
				height: 3px;
				width: 100%;
			}
			.monaco-scrollable-element > .shadow.left {
				display: block;
				top: 3px;
				left: 0;
				height: 100%;
				width: 3px;
			}
			.monaco-scrollable-element > .shadow.top-left-corner {
				display: block;
				top: 0;
				left: 0;
				height: 3px;
				width: 3px;
			}
		`;const i=t.scrollbarShadow;i&&(n+=`
				.monaco-scrollable-element > .shadow.top {
					box-shadow: ${i} 0 6px 6px -6px inset;
				}

				.monaco-scrollable-element > .shadow.left {
					box-shadow: ${i} 6px 0 6px -6px inset;
				}

				.monaco-scrollable-element > .shadow.top.left {
					box-shadow: ${i} 6px 6px 6px -6px inset;
				}
			`);const r=t.scrollbarSliderBackground;r&&(n+=`
				.monaco-scrollable-element > .scrollbar > .slider {
					background: ${r};
				}
			`);const o=t.scrollbarSliderHoverBackground;o&&(n+=`
				.monaco-scrollable-element > .scrollbar > .slider:hover {
					background: ${o};
				}
			`);const s=t.scrollbarSliderActiveBackground;s&&(n+=`
				.monaco-scrollable-element > .scrollbar > .slider.active {
					background: ${s};
				}
			`)}return n}class fEi{constructor(e,n,i,r){this.contextViewService=e,this.telemetryService=n,this.notificationService=i,this.keybindingService=r,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const n=e.getActions();if(!n.length)return;this.focusToReturn=Au();let i;const r=uc(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:o=>{var u;this.lastContainer=o;const s=e.getMenuClassName?e.getMenuClassName():"";s&&(o.className+=" "+s),this.options.blockMouse&&(this.block=o.appendChild(Xt(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(u=this.blockDisposable)==null||u.dispose(),this.blockDisposable=yt(this.block,Yt.MOUSE_DOWN,d=>d.stopPropagation()));const a=new Lt,l=e.actionRunner||new U2;l.onWillRun(d=>this.onActionRun(d,!e.skipTelemetry),this,a),l.onDidRun(this.onDidActionRun,this,a),i=new P3(o,n,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:l,getKeyBinding:e.getKeyBinding?e.getKeyBinding:d=>this.keybindingService.lookupKeybinding(d.id)},cEi),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,a),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,a);const c=ei(o);return a.add(yt(c,Yt.BLUR,()=>this.contextViewService.hideContextView(!0))),a.add(yt(c,Yt.MOUSE_DOWN,d=>{if(d.defaultPrevented)return;const h=new uv(c,d);let f=h.target;if(!h.rightButton){for(;f;){if(f===o)return;f=f.parentElement}this.contextViewService.hideContextView(!0)}})),yv(a,i)},focus:()=>{i==null||i.focus(!!e.autoSelectFirstItem)},onHide:o=>{var s,a,l;(s=e.onHide)==null||s.call(e,!!o),this.block&&(this.block.remove(),this.block=null),(a=this.blockDisposable)==null||a.dispose(),this.blockDisposable=null,this.lastContainer&&(Au()===this.lastContainer||ac(Au(),this.lastContainer))&&((l=this.focusToReturn)==null||l.focus()),this.lastContainer=null}},r,!!r)}onActionRun(e,n){n&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!yb(e.error)&&this.notificationService.error(e.error)}}var mEi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},nO=function(t,e){return function(n,i){e(n,i,t)}};let SIe=class extends ct{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new fEi(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,n,i,r,o,s){super(),this.telemetryService=e,this.notificationService=n,this.contextViewService=i,this.keybindingService=r,this.menuService=o,this.contextKeyService=s,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new st),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new st)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=NIe.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:n=>{var i;(i=e.onHide)==null||i.call(e,n),this._onDidHideContextMenu.fire()}}),sC.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};SIe=mEi([nO(0,eh),nO(1,tl),nO(2,US),nO(3,vo),nO(4,Jp),nO(5,vi)],SIe);var NIe;(function(t){function e(i){return i&&i.menuId instanceof Rn}function n(i,r,o){if(!e(i))return i;const{menuId:s,menuActionOptions:a,contextKeyService:l}=i;return{...i,getActions:()=>{const c=[];if(s){const u=r.getMenuActions(s,l??o,a);uEi(u,c)}return i.getActions?dc.join(i.getActions(),c):c}}}t.transform=n})(NIe||(NIe={}));var Gre;(function(t){t[t.API=0]="API",t[t.USER=1]="USER"})(Gre||(Gre={}));var h7e=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Yre=function(t,e){return function(n,i){e(n,i,t)}};let EIe=class{constructor(e){this._commandService=e}async open(e,n){if(!M8e(e,Ti.command))return!1;if(!(n!=null&&n.allowCommands)||(typeof e=="string"&&(e=ri.parse(e)),Array.isArray(n.allowCommands)&&!n.allowCommands.includes(e.path)))return!0;let i=[];try{i=YTe(decodeURIComponent(e.query))}catch{try{i=YTe(e.query)}catch{}}return Array.isArray(i)||(i=[i]),await this._commandService.executeCommand(e.path,...i),!0}};EIe=h7e([Yre(0,gs)],EIe);let DIe=class{constructor(e){this._editorService=e}async open(e,n){typeof e=="string"&&(e=ri.parse(e));const{selection:i,uri:r}=J1i(e);return e=r,e.scheme===Ti.file&&(e=xxi(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:i,source:n!=null&&n.fromUserGesture?Gre.USER:Gre.API,...n==null?void 0:n.editorOptions}},this._editorService.getFocusedCodeEditor(),n==null?void 0:n.openToSide),!0}};DIe=h7e([Yre(0,Yr)],DIe);let kIe=class{constructor(e,n){this._openers=new Ch,this._validators=new Ch,this._resolvers=new Ch,this._resolvedUriTargets=new Xl(i=>i.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new Ch,this._defaultExternalOpener={openExternal:async i=>(SLe(i,Ti.http,Ti.https)?V4t(i):Go.location.href=i,!0)},this._openers.push({open:async(i,r)=>r!=null&&r.openExternal||SLe(i,Ti.mailto,Ti.http,Ti.https,Ti.vsls)?(await this._doOpenExternal(i,r),!0):!1}),this._openers.push(new EIe(n)),this._openers.push(new DIe(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}async open(e,n){const i=typeof e=="string"?ri.parse(e):e,r=this._resolvedUriTargets.get(i)??e;for(const o of this._validators)if(!await o.shouldOpen(r,n))return!1;for(const o of this._openers)if(await o.open(e,n))return!0;return!1}async resolveExternalUri(e,n){for(const i of this._resolvers)try{const r=await i.resolveExternalUri(e,n);if(r)return this._resolvedUriTargets.has(r.resolved)||this._resolvedUriTargets.set(r.resolved,e),r}catch{}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,n){const i=typeof e=="string"?ri.parse(e):e;let r;try{r=(await this.resolveExternalUri(i,n)).resolved}catch{r=i}let o;if(typeof e=="string"&&i.toString()===r.toString()?o=e:o=encodeURI(r.toString(!0)),n!=null&&n.allowContributedOpeners){const s=typeof(n==null?void 0:n.allowContributedOpeners)=="string"?n==null?void 0:n.allowContributedOpeners:void 0;for(const a of this._externalOpeners)if(await a.openExternal(o,{sourceUri:i,preferredOpenerId:s},er.None))return!0}return this._defaultExternalOpener.openExternal(o,{sourceUri:i},er.None)}dispose(){this._validators.clear()}};kIe=h7e([Yre(0,Yr),Yre(1,gs)],kIe);const xb=Sr("editorWorkerService");var Da;(function(t){t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error"})(Da||(Da={}));(function(t){function e(s,a){return a-s}t.compare=e;const n=Object.create(null);n[t.Error]=I("sev.error","Error"),n[t.Warning]=I("sev.warning","Warning"),n[t.Info]=I("sev.info","Info");function i(s){return n[s]||""}t.toString=i;function r(s){switch(s){case qa.Error:return t.Error;case qa.Warning:return t.Warning;case qa.Info:return t.Info;case qa.Ignore:return t.Hint}}t.fromSeverity=r;function o(s){switch(s){case t.Error:return qa.Error;case t.Warning:return qa.Warning;case t.Info:return qa.Info;case t.Hint:return qa.Ignore}}t.toSeverity=o})(Da||(Da={}));var Xre;(function(t){const e="";function n(r){return i(r,!0)}t.makeKey=n;function i(r,o){const s=[e];return r.source?s.push(r.source.replace("¦","\\¦")):s.push(e),r.code?typeof r.code=="string"?s.push(r.code.replace("¦","\\¦")):s.push(r.code.value.replace("¦","\\¦")):s.push(e),r.severity!==void 0&&r.severity!==null?s.push(Da.toString(r.severity)):s.push(e),r.message&&o?s.push(r.message.replace("¦","\\¦")):s.push(e),r.startLineNumber!==void 0&&r.startLineNumber!==null?s.push(r.startLineNumber.toString()):s.push(e),r.startColumn!==void 0&&r.startColumn!==null?s.push(r.startColumn.toString()):s.push(e),r.endLineNumber!==void 0&&r.endLineNumber!==null?s.push(r.endLineNumber.toString()):s.push(e),r.endColumn!==void 0&&r.endColumn!==null?s.push(r.endColumn.toString()):s.push(e),s.push(e),s.join("¦")}t.makeKeyOptionalMessage=i})(Xre||(Xre={}));const Ow=Sr("markerService");function pEi(t,e){const n=[],i=[];for(const r of t)e.has(r)||n.push(r);for(const r of e)t.has(r)||i.push(r);return{removed:n,added:i}}function gEi(t,e){const n=new Set;for(const i of e)t.has(i)&&n.add(i);return n}var bEi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},ict=function(t,e){return function(n,i){e(n,i,t)}};let MIe=class extends ct{constructor(e,n){super(),this._markerService=n,this._onDidChangeMarker=this._register(new st),this._markerDecorations=new Xl,e.getModels().forEach(i=>this._onModelAdded(i)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,n){const i=this._markerDecorations.get(e);return i&&i.getMarker(n)||null}_handleMarkerChange(e){e.forEach(n=>{const i=this._markerDecorations.get(n);i&&this._updateDecorations(i)})}_onModelAdded(e){const n=new vEi(e);this._markerDecorations.set(e.uri,n),this._updateDecorations(n)}_onModelRemoved(e){var i;const n=this._markerDecorations.get(e.uri);n&&(n.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===Ti.inMemory||e.uri.scheme===Ti.internal||e.uri.scheme===Ti.vscode)&&((i=this._markerService)==null||i.read({resource:e.uri}).map(r=>r.owner).forEach(r=>this._markerService.remove(r,[e.uri])))}_updateDecorations(e){const n=this._markerService.read({resource:e.model.uri,take:500});e.update(n)&&this._onDidChangeMarker.fire(e.model)}};MIe=bEi([ict(0,Ds),ict(1,Ow)],MIe);class vEi extends ct{constructor(e){super(),this.model=e,this._map=new lpi,this._register(Kn(()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()}))}update(e){const{added:n,removed:i}=pEi(new Set(this._map.keys()),new Set(e));if(n.length===0&&i.length===0)return!1;const r=i.map(a=>this._map.get(a)),o=n.map(a=>({range:this._createDecorationRange(this.model,a),options:this._createDecorationOption(a)})),s=this.model.deltaDecorations(r,o);for(const a of i)this._map.delete(a);for(let a=0;a<s.length;a++)this._map.set(n[a],s[a]);return!0}getMarker(e){return this._map.getKey(e.id)}_createDecorationRange(e,n){let i=ve.lift(n);if(n.severity===Da.Hint&&!this._hasMarkerTag(n,1)&&!this._hasMarkerTag(n,2)&&(i=i.setEndPosition(i.startLineNumber,i.startColumn+2)),i=e.validateRange(i),i.isEmpty()){const r=e.getLineLastNonWhitespaceColumn(i.startLineNumber)||e.getLineMaxColumn(i.startLineNumber);if(r===1||i.endColumn>=r)return i;const o=e.getWordAtPosition(i.getStartPosition());o&&(i=new ve(i.startLineNumber,o.startColumn,i.endLineNumber,o.endColumn))}else if(n.endColumn===Number.MAX_VALUE&&n.startColumn===1&&i.startLineNumber===i.endLineNumber){const r=e.getLineFirstNonWhitespaceColumn(n.startLineNumber);r<i.endColumn&&(i=new ve(i.startLineNumber,r,i.endLineNumber,i.endColumn),n.startColumn=r)}return i}_createDecorationOption(e){let n,i,r,o,s;switch(e.severity){case Da.Hint:this._hasMarkerTag(e,2)?n=void 0:this._hasMarkerTag(e,1)?n="squiggly-unnecessary":n="squiggly-hint",r=0;break;case Da.Info:n="squiggly-info",i=Sa(Yyi),r=10,s={color:Sa(kbi),position:1};break;case Da.Warning:n="squiggly-warning",i=Sa(Gyi),r=20,s={color:Sa(Mbi),position:1};break;case Da.Error:default:n="squiggly-error",i=Sa(qyi),r=30,s={color:Sa(Lbi),position:1};break}return e.tags&&(e.tags.indexOf(1)!==-1&&(o="squiggly-inline-unnecessary"),e.tags.indexOf(2)!==-1&&(o="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:n,showIfCollapsed:!0,overviewRuler:{color:i,position:Tp.Right},minimap:s,zIndex:r,inlineClassName:o}}_hasMarkerTag(e,n){return e.tags?e.tags.indexOf(n)>=0:!1}}var yEi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},JV=function(t,e){return function(n,i){e(n,i,t)}},AO;function vL(t){return t.toString()}class _Ei{constructor(e,n,i){this.model=e,this._modelEventListeners=new Lt,this.model=e,this._modelEventListeners.add(e.onWillDispose(()=>n(e))),this._modelEventListeners.add(e.onDidChangeLanguage(r=>i(e,r)))}dispose(){this._modelEventListeners.dispose()}}const xEi=$h||xr?1:2;class wEi{constructor(e,n,i,r,o,s,a,l){this.uri=e,this.initialUndoRedoSnapshot=n,this.time=i,this.sharesUndoRedoStack=r,this.heapSize=o,this.sha1=s,this.versionId=a,this.alternativeVersionId=l}}var kI;let LIe=(kI=class extends ct{constructor(e,n,i,r,o){super(),this._configurationService=e,this._resourcePropertiesService=n,this._undoRedoService=i,this._languageService=r,this._languageConfigurationService=o,this._onModelAdded=this._register(new st),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new st),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new st),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(s=>this._updateModelOptions(s))),this._updateModelOptions(void 0)}static _readModelOptions(e,n){var h;let i=id.tabSize;if(e.editor&&typeof e.editor.tabSize<"u"){const f=parseInt(e.editor.tabSize,10);isNaN(f)||(i=f),i<1&&(i=1)}let r="tabSize";if(e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"){const f=parseInt(e.editor.indentSize,10);isNaN(f)||(r=Math.max(f,1))}let o=id.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(o=e.editor.insertSpaces==="false"?!1:!!e.editor.insertSpaces);let s=xEi;const a=e.eol;a===`\r
`?s=2:a===`
`&&(s=1);let l=id.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(l=e.editor.trimAutoWhitespace==="false"?!1:!!e.editor.trimAutoWhitespace);let c=id.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(c=e.editor.detectIndentation==="false"?!1:!!e.editor.detectIndentation);let u=id.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(u=e.editor.largeFileOptimizations==="false"?!1:!!e.editor.largeFileOptimizations);let d=id.bracketPairColorizationOptions;return(h=e.editor)!=null&&h.bracketPairColorization&&typeof e.editor.bracketPairColorization=="object"&&(d={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:n,tabSize:i,indentSize:r,insertSpaces:o,detectIndentation:c,defaultEOL:s,trimAutoWhitespace:l,largeFileOptimizations:u,bracketPairColorizationOptions:d}}_getEOL(e,n){if(e)return this._resourcePropertiesService.getEOL(e,n);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:n});return i&&typeof i=="string"&&i!=="auto"?i:pm===3||pm===2?`
`:`\r
`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,n,i){const r=typeof e=="string"?e:e.languageId;let o=this._modelCreationOptionsByLanguageAndResource[r+n];if(!o){const s=this._configurationService.getValue("editor",{overrideIdentifier:r,resource:n}),a=this._getEOL(n,r);o=AO._readModelOptions({editor:s,eol:a},i),this._modelCreationOptionsByLanguageAndResource[r+n]=o}return o}_updateModelOptions(e){const n=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let r=0,o=i.length;r<o;r++){const s=i[r],a=this._models[s],l=a.model.getLanguageId(),c=a.model.uri;if(e&&!e.affectsConfiguration("editor",{overrideIdentifier:l,resource:c})&&!e.affectsConfiguration("files.eol",{overrideIdentifier:l,resource:c}))continue;const u=n[l+c],d=this.getCreationOptions(l,c,a.model.isForSimpleWidget);AO._setModelOptionsForModel(a.model,d,u)}}static _setModelOptionsForModel(e,n,i){i&&i.defaultEOL!==n.defaultEOL&&e.getLineCount()===1&&e.setEOL(n.defaultEOL===1?0:1),!(i&&i.detectIndentation===n.detectIndentation&&i.insertSpaces===n.insertSpaces&&i.tabSize===n.tabSize&&i.indentSize===n.indentSize&&i.trimAutoWhitespace===n.trimAutoWhitespace&&Lp(i.bracketPairColorizationOptions,n.bracketPairColorizationOptions))&&(n.detectIndentation?(e.detectIndentation(n.insertSpaces,n.tabSize),e.updateOptions({trimAutoWhitespace:n.trimAutoWhitespace,bracketColorizationOptions:n.bracketPairColorizationOptions})):e.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.indentSize,trimAutoWhitespace:n.trimAutoWhitespace,bracketColorizationOptions:n.bracketPairColorizationOptions}))}_insertDisposedModel(e){this._disposedModels.set(vL(e.uri),e),this._disposedModelsHeapSize+=e.heapSize}_removeDisposedModel(e){const n=this._disposedModels.get(vL(e));return n&&(this._disposedModelsHeapSize-=n.heapSize),this._disposedModels.delete(vL(e)),n}_ensureDisposedModelsHeapSize(e){if(this._disposedModelsHeapSize>e){const n=[];for(this._disposedModels.forEach(i=>{i.sharesUndoRedoStack||n.push(i)}),n.sort((i,r)=>i.time-r.time);n.length>0&&this._disposedModelsHeapSize>e;){const i=n.shift();this._removeDisposedModel(i.uri),i.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(i.initialUndoRedoSnapshot)}}}_createModelData(e,n,i,r){const o=this.getCreationOptions(n,i,r),s=new l0(e,n,o,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(vL(i))){const c=this._removeDisposedModel(i),u=this._undoRedoService.getElements(i),d=this._getSHA1Computer(),h=d.canComputeSHA1(s)?d.computeSHA1(s)===c.sha1:!1;if(h||c.sharesUndoRedoStack){for(const f of u.past)q1(f)&&f.matchesResource(i)&&f.setModel(s);for(const f of u.future)q1(f)&&f.matchesResource(i)&&f.setModel(s);this._undoRedoService.setElementsValidFlag(i,!0,f=>q1(f)&&f.matchesResource(i)),h&&(s._overwriteVersionId(c.versionId),s._overwriteAlternativeVersionId(c.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(c.initialUndoRedoSnapshot))}else c.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(c.initialUndoRedoSnapshot)}const a=vL(s.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");const l=new _Ei(s,c=>this._onWillDispose(c),(c,u)=>this._onDidChangeLanguage(c,u));return this._models[a]=l,l}createModel(e,n,i,r=!1){let o;return n?o=this._createModelData(e,n,i,r):o=this._createModelData(e,Ph,i,r),this._onModelAdded.fire(o.model),o.model}getModels(){const e=[],n=Object.keys(this._models);for(let i=0,r=n.length;i<r;i++){const o=n[i];e.push(this._models[o].model)}return e}getModel(e){const n=vL(e),i=this._models[n];return i?i.model:null}_schemaShouldMaintainUndoRedoElements(e){return e.scheme===Ti.file||e.scheme===Ti.vscodeRemote||e.scheme===Ti.vscodeUserData||e.scheme===Ti.vscodeNotebookCell||e.scheme==="fake-fs"}_onWillDispose(e){const n=vL(e.uri),i=this._models[n],r=this._undoRedoService.getUriComparisonKey(e.uri)!==e.uri.toString();let o=!1,s=0;if(r||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(e.uri)){const c=this._undoRedoService.getElements(e.uri);if(c.past.length>0||c.future.length>0){for(const u of c.past)q1(u)&&u.matchesResource(e.uri)&&(o=!0,s+=u.heapSize(e.uri),u.setModel(e.uri));for(const u of c.future)q1(u)&&u.matchesResource(e.uri)&&(o=!0,s+=u.heapSize(e.uri),u.setModel(e.uri))}}const a=AO.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,l=this._getSHA1Computer();if(o)if(!r&&(s>a||!l.canComputeSHA1(e))){const c=i.model.getInitialUndoRedoSnapshot();c!==null&&this._undoRedoService.restoreSnapshot(c)}else this._ensureDisposedModelsHeapSize(a-s),this._undoRedoService.setElementsValidFlag(e.uri,!1,c=>q1(c)&&c.matchesResource(e.uri)),this._insertDisposedModel(new wEi(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),r,s,l.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!r){const c=i.model.getInitialUndoRedoSnapshot();c!==null&&this._undoRedoService.restoreSnapshot(c)}delete this._models[n],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,n){const i=n.oldLanguage,r=e.getLanguageId(),o=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),s=this.getCreationOptions(r,e.uri,e.isForSimpleWidget);AO._setModelOptionsForModel(e,s,o),this._onModelModeChanged.fire({model:e,oldLanguageId:i})}_getSHA1Computer(){return new TIe}},AO=kI,kI.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,kI);LIe=AO=yEi([JV(0,cr),JV(1,_3t),JV(2,hme),JV(3,Qs),JV(4,bs)],LIe);const rce=class rce{canComputeSHA1(e){return e.getValueLength()<=rce.MAX_MODEL_SIZE}computeSHA1(e){const n=new ELe,i=e.createSnapshot();let r;for(;r=i.read();)n.update(r);return n.digest()}};rce.MAX_MODEL_SIZE=10*1024*1024;let TIe=rce;var IIe;(function(t){t[t.PRESERVE=0]="PRESERVE",t[t.LAST=1]="LAST"})(IIe||(IIe={}));const rR={Quickaccess:"workbench.contributions.quickaccess"};class CEi{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((n,i)=>i.prefix.length-n.prefix.length),Kn(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return H0([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(i=>e.startsWith(i.prefix))||void 0||this.defaultProvider}}la.add(rR.Quickaccess,new CEi);const SEi={ctrlCmd:!1,alt:!1};var _5;(function(t){t[t.Blur=1]="Blur",t[t.Gesture=2]="Gesture",t[t.Other=3]="Other"})(_5||(_5={}));var Vy;(function(t){t[t.NONE=0]="NONE",t[t.FIRST=1]="FIRST",t[t.SECOND=2]="SECOND",t[t.LAST=3]="LAST"})(Vy||(Vy={}));var xs;(function(t){t[t.First=1]="First",t[t.Second=2]="Second",t[t.Last=3]="Last",t[t.Next=4]="Next",t[t.Previous=5]="Previous",t[t.NextPage=6]="NextPage",t[t.PreviousPage=7]="PreviousPage",t[t.NextSeparator=8]="NextSeparator",t[t.PreviousSeparator=9]="PreviousSeparator"})(xs||(xs={}));var Zre;(function(t){t[t.Title=1]="Title",t[t.Inline=2]="Inline"})(Zre||(Zre={}));const wb=Sr("quickInputService");var NEi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},rct=function(t,e){return function(n,i){e(n,i,t)}};let AIe=class extends ct{constructor(e,n){super(),this.quickInputService=e,this.instantiationService=n,this.registry=la.as(rR.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",n){this.doShowOrPick(e,!1,n)}doShowOrPick(e,n,i){var m,p;const[r,o]=this.getOrInstantiateProvider(e,i==null?void 0:i.enabledProviderPrefixes),s=this.visibleQuickAccess,a=s==null?void 0:s.descriptor;if(s&&o&&a===o){e!==o.prefix&&!(i!=null&&i.preserveValue)&&(s.picker.value=e),this.adjustValueSelection(s.picker,o,i);return}if(o&&!(i!=null&&i.preserveValue)){let g;if(s&&a&&a!==o){const y=s.value.substr(a.prefix.length);y&&(g=`${o.prefix}${y}`)}if(!g){const y=r==null?void 0:r.defaultFilterValue;y===IIe.LAST?g=this.lastAcceptedPickerValues.get(o):typeof y=="string"&&(g=`${o.prefix}${y}`)}typeof g=="string"&&(e=g)}const l=(m=s==null?void 0:s.picker)==null?void 0:m.valueSelection,c=(p=s==null?void 0:s.picker)==null?void 0:p.value,u=new Lt,d=u.add(this.quickInputService.createQuickPick());d.value=e,this.adjustValueSelection(d,o,i),d.placeholder=(i==null?void 0:i.placeholder)??(o==null?void 0:o.placeholder),d.quickNavigate=i==null?void 0:i.quickNavigateConfiguration,d.hideInput=!!d.quickNavigate&&!s,(typeof(i==null?void 0:i.itemActivation)=="number"||i!=null&&i.quickNavigateConfiguration)&&(d.itemActivation=(i==null?void 0:i.itemActivation)??Vy.SECOND),d.contextKey=o==null?void 0:o.contextKey,d.filterValue=g=>g.substring(o?o.prefix.length:0);let h;n&&(h=new k6,u.add(rn.once(d.onWillAccept)(g=>{g.veto(),d.hide()}))),u.add(this.registerPickerListeners(d,r,o,e,i));const f=u.add(new oa);if(r&&u.add(r.provide(d,f.token,i==null?void 0:i.providerOptions)),rn.once(d.onDidHide)(()=>{d.selectedItems.length===0&&f.cancel(),u.dispose(),h==null||h.complete(d.selectedItems.slice(0))}),d.show(),l&&c===e&&(d.valueSelection=l),n)return h==null?void 0:h.p}adjustValueSelection(e,n,i){let r;i!=null&&i.preserveValue?r=[e.value.length,e.value.length]:r=[(n==null?void 0:n.prefix.length)??0,e.value.length],e.valueSelection=r}registerPickerListeners(e,n,i,r,o){const s=new Lt,a=this.visibleQuickAccess={picker:e,descriptor:i,value:r};return s.add(Kn(()=>{a===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),s.add(e.onDidChangeValue(l=>{const[c]=this.getOrInstantiateProvider(l,o==null?void 0:o.enabledProviderPrefixes);c!==n?this.show(l,{enabledProviderPrefixes:o==null?void 0:o.enabledProviderPrefixes,preserveValue:!0,providerOptions:o==null?void 0:o.providerOptions}):a.value=l})),i&&s.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,e.value)})),s}getOrInstantiateProvider(e,n){const i=this.registry.getQuickAccessProvider(e);if(!i||n&&!(n!=null&&n.includes(i.prefix)))return[void 0,void 0];let r=this.mapProviderToDescriptor.get(i);return r||(r=this.instantiationService.createInstance(i.ctor),this.mapProviderToDescriptor.set(i,r)),[r,i]}};AIe=NEi([rct(0,wb),rct(1,qn)],AIe);class z6 extends eg{constructor(e){super(),this._onChange=this._register(new st),this.onChange=this._onChange.event,this._onKeyDown=this._register(new st),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;const n=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,n.push(...ci.asClassNameArray(this._icon))),this._opts.actionClassName&&n.push(...this._opts.actionClassName.split(" ")),this._checked&&n.push("checked"),this.domNode=document.createElement("div"),this._hover=this._register(d_().setupManagedHover(e.hoverDelegate??Yh("mouse"),this.domNode,this._opts.title)),this.domNode.classList.add(...n),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,i=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),i.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,i=>{if(i.keyCode===10||i.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),i.preventDefault(),i.stopPropagation();return}this._onKeyDown.fire(i)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}var EEi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class Z5t{constructor(e){this.nodes=e}toString(){return this.nodes.map(e=>typeof e=="string"?e:e.label).join("")}}EEi([el],Z5t.prototype,"toString",null);const DEi=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;function kEi(t){const e=[];let n=0,i;for(;i=DEi.exec(t);){i.index-n>0&&e.push(t.substring(n,i.index));const[,r,o,,s]=i;s?e.push({label:r,href:o,title:s}):e.push({label:r,href:o}),n=i.index+i[0].length}return n<t.length&&e.push(t.substring(n)),new Z5t(e)}const A1e={},MEi=new r7e("quick-input-button-icon-");function LEi(t){if(!t)return;let e;const n=t.dark.toString();return A1e[n]?e=A1e[n]:(e=MEi.nextId(),Kie(`.${e}, .hc-light .${e}`,`background-image: ${fS(t.light||t.dark)}`),Kie(`.vs-dark .${e}, .hc-black .${e}`,`background-image: ${fS(t.dark)}`),A1e[n]=e),e}function hB(t,e,n){let i=t.iconClass||LEi(t.iconPath);return t.alwaysVisible&&(i=i?`${i} always-visible`:"always-visible"),{id:e,label:"",tooltip:t.tooltip||"",class:i,enabled:!0,run:n}}function TEi(t,e,n){ou(e);const i=kEi(t);let r=0;for(const o of i.nodes)if(typeof o=="string")e.append(...bD(o));else{let s=o.title;!s&&o.href.startsWith("command:")?s=I("executeCommand","Click to execute command '{0}'",o.href.substring(8)):s||(s=o.href);const a=Xt("a",{href:o.href,title:s,tabIndex:r++},o.label);a.style.textDecoration="underline";const l=f=>{hfi(f)&&Mr.stop(f,!0),n.callback(o.href)},c=n.disposables.add(new Er(a,Yt.CLICK)).event,u=n.disposables.add(new Er(a,Yt.KEY_DOWN)).event,d=rn.chain(u,f=>f.filter(m=>{const p=new as(m);return p.equals(10)||p.equals(3)}));n.disposables.add(xd.addTarget(a));const h=n.disposables.add(new Er(a,hs.Tap)).event;rn.any(c,h,d)(l,null,n.disposables),e.appendChild(a)}}var IEi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},oct=function(t,e){return function(n,i){e(n,i,t)}};const Q5t="inQuickInput",AEi=new gn(Q5t,!1,I("inQuickInput","Whether keyboard focus is inside the quick input control")),REi=Tt.has(Q5t),J5t="quickInputType",PEi=new gn(J5t,void 0,I("quickInputType","The type of the currently visible quick input")),eFt="cursorAtEndOfQuickInputBox",OEi=new gn(eFt,!1,I("cursorAtEndOfQuickInputBox","Whether the cursor in the quick input is at the end of the input box")),jEi=Tt.has(eFt),RIe={iconClass:ci.asClassName(qt.quickInputBack),tooltip:I("quickInput.back","Back"),handle:-1},oce=class oce extends ct{constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._leftButtons=[],this._rightButtons=[],this._inlineButtons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=oce.noPromptMessage,this._severity=qa.Ignore,this.onDidTriggerButtonEmitter=this._register(new st),this.onDidHideEmitter=this._register(new st),this.onWillHideEmitter=this._register(new st),this.onDisposeEmitter=this._register(new st),this.visibleDisposables=this._register(new Lt),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const n=this._ignoreFocusOut!==e&&!W0;this._ignoreFocusOut=e&&!W0,n&&this.update()}get titleButtons(){return this._leftButtons.length?[...this._leftButtons,this._rightButtons]:this._rightButtons}get buttons(){return[...this._leftButtons,...this._rightButtons,...this._inlineButtons]}set buttons(e){this._leftButtons=e.filter(n=>n===RIe),this._rightButtons=e.filter(n=>n!==RIe&&n.location!==Zre.Inline),this._inlineButtons=e.filter(n=>n.location===Zre.Inline),this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=e??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=_5.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}willHide(e=_5.Other){this.onWillHideEmitter.fire({reason:e})}update(){var r;if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:!e&&this.ui.title.innerHTML!=="&nbsp;"&&(this.ui.title.innerText=" ");const n=this.getDescription();if(this.ui.description1.textContent!==n&&(this.ui.description1.textContent=n),this.ui.description2.textContent!==n&&(this.ui.description2.textContent=n),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?ou(this.ui.widget,this._widget):ou(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new Gv,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const o=this._leftButtons.map((l,c)=>hB(l,`id-${c}`,async()=>this.onDidTriggerButtonEmitter.fire(l)));this.ui.leftActionBar.push(o,{icon:!0,label:!1}),this.ui.rightActionBar.clear();const s=this._rightButtons.map((l,c)=>hB(l,`id-${c}`,async()=>this.onDidTriggerButtonEmitter.fire(l)));this.ui.rightActionBar.push(s,{icon:!0,label:!1}),this.ui.inlineActionBar.clear();const a=this._inlineButtons.map((l,c)=>hB(l,`id-${c}`,async()=>this.onDidTriggerButtonEmitter.fire(l)));this.ui.inlineActionBar.push(a,{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const o=((r=this.toggles)==null?void 0:r.filter(s=>s instanceof z6))??[];this.ui.inputBox.toggles=o}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const i=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==i&&(this._lastValidationMessage=i,ou(this.ui.message),TEi(i,this.ui.message,{callback:o=>{this.ui.linkOpenerDelegate(o)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?I("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==qa.Ignore){const n=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=n.foreground?`${n.foreground}`:"",this.ui.message.style.backgroundColor=n.background?`${n.background}`:"",this.ui.message.style.border=n.border?`1px solid ${n.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}};oce.noPromptMessage=I("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");let Qre=oce;const sce=class sce extends Qre{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new st),this.onWillAcceptEmitter=this._register(new st),this.onDidAcceptEmitter=this._register(new st),this.onDidCustomEmitter=this._register(new st),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._keepScrollPosition=!1,this._itemActivation=Vy.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new st),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new st),this.onDidTriggerItemButtonEmitter=this._register(new st),this.onDidTriggerSeparatorButtonEmitter=this._register(new st),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this._focusEventBufferer=new fq,this.type="quickPick",this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,n){this._value!==e&&(this._value=e,n||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?SEi:this.ui.keyMods}get valueSelection(){const e=this.ui.inputBox.getSelection();if(e)return[e.start,e.end]}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.canSelectMany||this.ui.list.focus(xs.First)}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{this.doSetValue(e,!0)})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this._focusEventBufferer.wrapEvent(this.ui.list.onDidChangeFocus,(e,n)=>n)(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&Xs(e,this._activeItems,(n,i)=>n===i)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:n})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&Xs(e,this._selectedItems,(i,r)=>i===r)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(A8e(n)&&n.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{!this.canSelectMany||!this.visible||this.selectedItemsToConfirm!==this._selectedItems&&Xs(e,this._selectedItems,(n,i)=>n===i)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(e=>this.onDidTriggerSeparatorButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let n=!1;this.onWillAcceptEmitter.fire({veto:()=>n=!0}),n||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return yt(this.ui.container,Yt.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const n=new as(e),i=n.keyCode;this._quickNavigate.keybindings.some(s=>{const a=s.getChords();return a.length>1?!1:a[0].shiftKey&&i===4?!(n.ctrlKey||n.altKey||n.metaKey):!!(a[0].altKey&&i===6||a[0].ctrlKey&&i===5||a[0].metaKey&&i===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,n=!!this.description,i={title:!!this.title||!!this.step||!!this.titleButtons.length,description:n,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||n,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let r=this.ariaLabel;!r&&i.inputBox&&(r=this.placeholder||sce.DEFAULT_ARIA_LABEL,this.title&&(r+=` - ${this.title}`)),this.ui.list.ariaLabel!==r&&(this.ui.list.ariaLabel=r??null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated&&(this.itemsUpdated=!1,this._focusEventBufferer.bufferEvents(()=>{switch(this.ui.list.setElements(this.items),this.ui.list.shouldLoop=!this.canSelectMany,this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this._itemActivation){case Vy.NONE:this._itemActivation=Vy.FIRST;break;case Vy.SECOND:this.ui.list.focus(xs.Second),this._itemActivation=Vy.FIRST;break;case Vy.LAST:this.ui.list.focus(xs.Last),this._itemActivation=Vy.FIRST;break;default:this.trySelectFirst();break}})),this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(xs.First)),this.keepScrollPosition&&(this.scrollTop=e)}focus(e){this.ui.list.focus(e),this.canSelectMany&&this.ui.list.domFocus()}accept(e){e&&!this._canAcceptInBackground||this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(e??!1))}};sce.DEFAULT_ARIA_LABEL=I("quickInputBox.ariaLabel","Type to narrow down results.");let Jre=sce,FEi=class extends Qre{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new st),this.onDidAcceptEmitter=this._register(new st),this.type="inputBox",this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.titleButtons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}},PIe=class extends m5{constructor(e,n){super("element",!1,i=>this.getOverrideOptions(i),e,n)}getOverrideOptions(e){const n=(uc(e.content)?e.content.textContent??"":typeof e.content=="string"?e.content:e.content.value).includes(`
`);return{persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:n,skipFadeInAnimation:!0}}}};PIe=IEi([oct(0,cr),oct(1,Pw)],PIe);Rt.white.toString(),Rt.white.toString();class eoe extends ct{get onDidClick(){return this._onDidClick.event}constructor(e,n){super(),this._label="",this._onDidClick=this._register(new st),this._onDidEscape=this._register(new st),this.options=n,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!n.secondary);const i=n.secondary?n.buttonSecondaryBackground:n.buttonBackground,r=n.secondary?n.buttonSecondaryForeground:n.buttonForeground;this._element.style.color=r||"",this._element.style.backgroundColor=i||"",n.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),typeof n.title=="string"&&this.setTitle(n.title),typeof n.ariaLabel=="string"&&this._element.setAttribute("aria-label",n.ariaLabel),e.appendChild(this._element),this._register(xd.addTarget(this._element)),[Yt.CLICK,hs.Tap].forEach(o=>{this._register(yt(this._element,o,s=>{if(!this.enabled){Mr.stop(s);return}this._onDidClick.fire(s)}))}),this._register(yt(this._element,Yt.KEY_DOWN,o=>{const s=new as(o);let a=!1;this.enabled&&(s.equals(3)||s.equals(10))?(this._onDidClick.fire(o),a=!0):s.equals(9)&&(this._onDidEscape.fire(o),this._element.blur(),a=!0),a&&Mr.stop(s,!0)})),this._register(yt(this._element,Yt.MOUSE_OVER,o=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register(yt(this._element,Yt.MOUSE_OUT,o=>{this.updateBackground(!1)})),this.focusTracker=this._register(q0(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const n=[];for(let i of bD(e))if(typeof i=="string"){if(i=i.trim(),i==="")continue;const r=document.createElement("span");r.textContent=i,n.push(r)}else n.push(i);return n}updateBackground(e){let n;this.options.secondary?n=e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:n=e?this.options.buttonHoverBackground:this.options.buttonBackground,n&&(this._element.style.backgroundColor=n)}get element(){return this._element}set label(e){var r;if(this._label===e||E0(this._label)&&E0(e)&&TCi(this._label,e))return;this._element.classList.add("monaco-text-button");const n=this.options.supportShortLabel?this._labelElement:this._element;if(E0(e)){const o=bme(e,{inline:!0});o.dispose();const s=(r=o.element.querySelector("p"))==null?void 0:r.innerHTML;if(s){const a=N4t(s,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});n.innerHTML=a}else ou(n)}else this.options.supportIcons?ou(n,...this.getContentElements(e)):n.textContent=e;let i="";typeof this.options.title=="string"?i=this.options.title:this.options.title&&(i=VCi(e)),this.setTitle(i),typeof this.options.ariaLabel=="string"?this._element.setAttribute("aria-label",this.options.ariaLabel):this.options.ariaLabel&&this._element.setAttribute("aria-label",i),this._label=e}get label(){return this._label}set icon(e){this._element.classList.add(...ci.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}setTitle(e){!this._hover&&e!==""?this._hover=this._register(d_().setupManagedHover(this.options.hoverDelegate??Yh("mouse"),this._element,e)):this._hover&&this._hover.update(e)}}class OIe{constructor(e,n,i){this.options=n,this.styles=i,this.count=0,this.element=jt(e,Xt(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=B2(this.countFormat,this.count),this.element.title=B2(this.titleFormat,this.count),this.element.style.backgroundColor=this.styles.badgeBackground??"",this.element.style.color=this.styles.badgeForeground??"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}const sct="done",act="active",R1e="infinite",P1e="infinite-long-running",lct="discrete",ace=class ace extends ct{constructor(e,n){super(),this.progressSignal=this._register(new mc),this.workedVal=0,this.showDelayedScheduler=this._register(new Wo(()=>um(this.element),0)),this.longRunningScheduler=this._register(new Wo(()=>this.infiniteLongRunning(),ace.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,n)}create(e,n){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=(n==null?void 0:n.progressBarBackground)||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(act,R1e,P1e,lct),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel(),this.progressSignal.clear()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(sct),this.element.classList.contains(R1e)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(lct,sct,P1e),this.element.classList.add(act,R1e),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(P1e)}getContainer(){return this.element}};ace.LONG_RUNNING_INFINITE_THRESHOLD=1e4;let jIe=ace;const $Ei=I("caseDescription","Match Case"),VEi=I("wordsDescription","Match Whole Word"),BEi=I("regexDescription","Use Regular Expression");class tFt extends z6{constructor(e){super({icon:qt.caseSensitive,title:$Ei+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??Yh("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class nFt extends z6{constructor(e){super({icon:qt.wholeWord,title:VEi+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??Yh("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class iFt extends z6{constructor(e){super({icon:qt.regex,title:BEi+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??Yh("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class zEi{constructor(e,n=0,i=e.length,r=n-1){this.items=e,this.start=n,this.end=i,this.index=r}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class HEi{constructor(e=[],n=10){this._initialize(e),this._limit=n,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new zEi(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const n of e)this._history.add(n)}get _elements(){const e=[];return this._history.forEach(n=>e.push(n)),e}}const e7=Xt;class WEi extends eg{constructor(e,n,i){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new st),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new st),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=n,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=this.options.tooltip??(this.placeholder||""),this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=jt(e,e7(".monaco-inputbox.idle"));const r=this.options.flexibleHeight?"textarea":"input",o=jt(this.element,e7(".ibwrapper"));if(this.input=jt(o,e7(r+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=jt(o,e7("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new Q3t(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),jt(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(l=>this.input.scrollTop=l.scrollTop));const s=this._register(new Er(e.ownerDocument,"selectionchange")),a=rn.filter(s.event,()=>{const l=e.ownerDocument.getSelection();return(l==null?void 0:l.anchorNode)===o});this._register(a(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new Ap(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.hover?this.hover.update(e):this.hover=this._register(d_().setupManagedHover(Yh("mouse"),this.input,e))}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:oC(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return Rfe(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}getSelection(){const e=this.input.selectionStart;if(e===null)return null;const n=this.input.selectionEnd??e;return{start:e,end:n}}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const e=this.cachedContentHeight,n=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:n}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,n){if(this.state==="open"&&Lp(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${TC(i.border,"transparent")}`,this.message.content&&(this.hasFocus()||n)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e==null?void 0:e.type}stylesForType(e){const n=this.options.inputBoxStyles;switch(e){case 1:return{border:n.inputValidationInfoBorder,background:n.inputValidationInfoBackground,foreground:n.inputValidationInfoForeground};case 2:return{border:n.inputValidationWarningBorder,background:n.inputValidationWarningBackground,foreground:n.inputValidationWarningForeground};default:return{border:n.inputValidationErrorBorder,background:n.inputValidationErrorBackground,foreground:n.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const n=()=>e.style.width=Jf(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:r=>{if(!this.message)return null;e=jt(r,e7(".monaco-inputbox-container")),n();const o={inline:!0,className:"monaco-inputbox-message"},s=this.message.formatContent?tCi(this.message.content,o):eCi(this.message.content,o);s.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return s.style.backgroundColor=a.background??"",s.style.color=a.foreground??"",s.style.border=a.border?`1px solid ${a.border}`:"",jt(e,s),null},onHide:()=>{this.state="closed"},layout:n});let i;this.message.type===3?i=I("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?i=I("alertWarningMessage","Warning: {0}",this.message.content):i=I("alertInfoMessage","Info: {0}",this.message.content),Am(i),this.state="open"}_hideMessage(){this.contextViewProvider&&(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,i=e.charCodeAt(e.length-1)===10?" ":"";(e+i).replace(/\u000c/g,"")?this.mirror.textContent=e+i:this.mirror.innerText=" ",this.layout()}applyStyles(){const e=this.options.inputBoxStyles,n=e.inputBackground??"",i=e.inputForeground??"",r=e.inputBorder??"";this.element.style.backgroundColor=n,this.element.style.color=i,this.input.style.backgroundColor="inherit",this.input.style.color=i,this.element.style.border=`1px solid ${TC(r,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=oC(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const n=this.inputElement,i=n.selectionStart,r=n.selectionEnd,o=n.value;i!==null&&r!==null&&(this.value=o.substr(0,i)+e+o.substr(r),n.setSelectionRange(i+1,i+1),this.layout())}dispose(){var e;this._hideMessage(),this.message=null,(e=this.actionbar)==null||e.dispose(),super.dispose()}}class rFt extends WEi{constructor(e,n,i){const r=I({key:"history.inputbox.hint.suffix.noparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field ends in a closing parenthesis ")", for example "Filter (e.g. text, !exclude)". The character inserted into the final string is ⇅ to represent the up and down arrow keys.']}," or {0} for history","⇅"),o=I({key:"history.inputbox.hint.suffix.inparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field does NOT end in a closing parenthesis (eg. "Find"). The character inserted into the final string is ⇅ to represent the up and down arrow keys.']}," ({0} for history)","⇅");super(e,n,i),this._onDidFocus=this._register(new st),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new st),this.onDidBlur=this._onDidBlur.event,this.history=new HEi(i.history,100);const s=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(r)&&!this.placeholder.endsWith(o)&&this.history.getHistory().length){const a=this.placeholder.endsWith(")")?r:o,l=this.placeholder+a;i.showPlaceholderOnFocus&&!Rfe(this.input)?this.placeholder=l:this.setPlaceHolder(l)}};this.observer=new MutationObserver((a,l)=>{a.forEach(c=>{c.target.textContent||s()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>s()),this.onblur(this.input,()=>{const a=l=>{if(this.placeholder.endsWith(l)){const c=this.placeholder.slice(0,this.placeholder.length-l.length);return i.showPlaceholderOnFocus?this.placeholder=c:this.setPlaceHolder(c),!0}else return!1};a(o)||a(r)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",hw(this.value?this.value:I("clearedInput","Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,hw(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}const UEi=I("defaultLabel","input");class oFt extends eg{constructor(e,n,i){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new mc),this.additionalToggles=[],this._onDidOptionChange=this._register(new st),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new st),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new st),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new st),this._onKeyUp=this._register(new st),this._onCaseSensitiveKeyDown=this._register(new st),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new st),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||UEi,this.showCommonFindToggles=!!i.showCommonFindToggles;const r=i.appendCaseSensitiveLabel||"",o=i.appendWholeWordsLabel||"",s=i.appendRegexLabel||"",a=i.history||[],l=!!i.flexibleHeight,c=!!i.flexibleWidth,u=i.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new rFt(this.domNode,n,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:a,showHistoryHint:i.showHistoryHint,flexibleHeight:l,flexibleWidth:c,flexibleMaxHeight:u,inputBoxStyles:i.inputBoxStyles}));const d=this._register(v5());if(this.showCommonFindToggles){this.regex=this._register(new iFt({appendTitle:s,isChecked:!1,hoverDelegate:d,...i.toggleStyles})),this._register(this.regex.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(f=>{this._onRegexKeyDown.fire(f)})),this.wholeWords=this._register(new nFt({appendTitle:o,isChecked:!1,hoverDelegate:d,...i.toggleStyles})),this._register(this.wholeWords.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new tFt({appendTitle:r,isChecked:!1,hoverDelegate:d,...i.toggleStyles})),this._register(this.caseSensitive.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(f=>{this._onCaseSensitiveKeyDown.fire(f)}));const h=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,f=>{if(f.equals(15)||f.equals(17)||f.equals(9)){const m=h.indexOf(this.domNode.ownerDocument.activeElement);if(m>=0){let p=-1;f.equals(17)?p=(m+1)%h.length:f.equals(15)&&(m===0?p=h.length-1:p=m-1),f.equals(9)?(h[m].blur(),this.inputBox.focus()):p>=0&&h[p].focus(),Mr.stop(f,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(i==null?void 0:i.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e==null||e.appendChild(this.domNode),this._register(yt(this.inputBox.inputElement,"compositionstart",h=>{this.imeSessionInProgress=!0})),this._register(yt(this.inputBox.inputElement,"compositionend",h=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,h=>this._onKeyDown.fire(h)),this.onkeyup(this.inputBox.inputElement,h=>this._onKeyUp.fire(h)),this.oninput(this.inputBox.inputElement,h=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,h=>this._onMouseDown.fire(h))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){var e,n,i;this.domNode.classList.remove("disabled"),this.inputBox.enable(),(e=this.regex)==null||e.enable(),(n=this.wholeWords)==null||n.enable(),(i=this.caseSensitive)==null||i.enable();for(const r of this.additionalToggles)r.enable()}disable(){var e,n,i;this.domNode.classList.add("disabled"),this.inputBox.disable(),(e=this.regex)==null||e.disable(),(n=this.wholeWords)==null||n.disable(),(i=this.caseSensitive)==null||i.disable();for(const r of this.additionalToggles)r.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(const n of this.additionalToggles)n.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new Lt;for(const n of e??[])this.additionalTogglesDisposables.value.add(n),this.controls.appendChild(n.domNode),this.additionalTogglesDisposables.value.add(n.onChange(i=>{this._onDidOptionChange.fire(i),!i&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(n);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){var n,i,r;e?this.inputBox.paddingRight=0:this.inputBox.paddingRight=(((n=this.caseSensitive)==null?void 0:n.width())??0)+(((i=this.wholeWords)==null?void 0:i.width())??0)+(((r=this.regex)==null?void 0:r.width())??0)+this.additionalToggles.reduce((o,s)=>o+s.width(),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var e;return((e=this.caseSensitive)==null?void 0:e.checked)??!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){var e;return((e=this.wholeWords)==null?void 0:e.checked)??!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){var e;return((e=this.regex)==null?void 0:e.checked)??!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){var e;(e=this.caseSensitive)==null||e.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}const KEi=Xt;class qEi extends ct{constructor(e,n,i){super(),this.parent=e,this.onKeyDown=o=>Fa(this.findInput.inputBox.inputElement,Yt.KEY_DOWN,o),this.onDidChange=o=>this.findInput.onDidChange(o),this.container=jt(this.parent,KEi(".quick-input-box")),this.findInput=this._register(new oFt(this.container,void 0,{label:"",inputBoxStyles:n,toggleStyles:i}));const r=this.findInput.inputBox.inputElement;r.role="combobox",r.ariaHasPopup="menu",r.ariaAutoComplete="list",r.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}getSelection(){return this.findInput.inputBox.getSelection()}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,n){this.findInput.inputBox.inputElement.setAttribute(e,n)}showDecoration(e){e===qa.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===qa.Info?1:e===qa.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===qa.Info?1:e===qa.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}class GEi{get templateId(){return this.renderer.templateId}constructor(e,n){this.renderer=e,this.modelProvider=n}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:ct.None}}renderElement(e,n,i,r){var l;if((l=i.disposable)==null||l.dispose(),!i.data)return;const o=this.modelProvider();if(o.isResolved(e))return this.renderer.renderElement(o.get(e),e,i.data,r);const s=new oa,a=o.resolve(e,s.token);i.disposable={dispose:()=>s.cancel()},this.renderer.renderPlaceholder(e,i.data),a.then(c=>this.renderer.renderElement(c,e,i.data,r))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class YEi{constructor(e,n){this.modelProvider=e,this.accessibilityProvider=n}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const n=this.modelProvider();return n.isResolved(e)?this.accessibilityProvider.getAriaLabel(n.get(e)):null}}function XEi(t,e){return{...e,accessibilityProvider:e.accessibilityProvider&&new YEi(t,e.accessibilityProvider)}}class ZEi{constructor(e,n,i,r,o={}){const s=()=>this.model,a=r.map(l=>new GEi(l,s));this.list=new ng(e,n,i,a,XEi(s,o))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return rn.map(this.list.onMouseDblClick,({element:e,index:n,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:n,browserEvent:i}))}get onPointer(){return rn.map(this.list.onPointer,({element:e,index:n,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:n,browserEvent:i}))}get onDidChangeSelection(){return rn.map(this.list.onDidChangeSelection,({elements:e,indexes:n,browserEvent:i})=>({elements:e.map(r=>this._model.get(r)),indexes:n,browserEvent:i}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,sf(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}var H6=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};const QEi=!1;var toe;(function(t){t.North="north",t.South="south",t.East="east",t.West="west"})(toe||(toe={}));let JEi=4;const eDi=new st;let tDi=300;const nDi=new st;class f7e{constructor(e){this.el=e,this.disposables=new Lt}get onPointerMove(){return this.disposables.add(new Er(ei(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new Er(ei(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}H6([el],f7e.prototype,"onPointerMove",null);H6([el],f7e.prototype,"onPointerUp",null);class m7e{get onPointerMove(){return this.disposables.add(new Er(this.el,hs.Change)).event}get onPointerUp(){return this.disposables.add(new Er(this.el,hs.End)).event}constructor(e){this.el=e,this.disposables=new Lt}dispose(){this.disposables.dispose()}}H6([el],m7e.prototype,"onPointerMove",null);H6([el],m7e.prototype,"onPointerUp",null);class noe{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}H6([el],noe.prototype,"onPointerMove",null);H6([el],noe.prototype,"onPointerUp",null);const cct="pointer-events-disabled";class td extends ct{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const n=i=>{this.orthogonalStartDragHandleDisposables.clear(),i!==0&&(this._orthogonalStartDragHandle=jt(this.el,Xt(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(Kn(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new Er(this._orthogonalStartDragHandle,"mouseenter")).event(()=>td.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new Er(this._orthogonalStartDragHandle,"mouseleave")).event(()=>td.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(n,this)),n(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const n=i=>{this.orthogonalEndDragHandleDisposables.clear(),i!==0&&(this._orthogonalEndDragHandle=jt(this.el,Xt(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(Kn(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new Er(this._orthogonalEndDragHandle,"mouseenter")).event(()=>td.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new Er(this._orthogonalEndDragHandle,"mouseleave")).event(()=>td.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(n,this)),n(e.state)}this._orthogonalEndSash=e}}constructor(e,n,i){super(),this.hoverDelay=tDi,this.hoverDelayer=this._register(new Lv(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new st),this._onDidStart=this._register(new st),this._onDidChange=this._register(new st),this._onDidReset=this._register(new st),this._onDidEnd=this._register(new st),this.orthogonalStartSashDisposables=this._register(new Lt),this.orthogonalStartDragHandleDisposables=this._register(new Lt),this.orthogonalEndSashDisposables=this._register(new Lt),this.orthogonalEndDragHandleDisposables=this._register(new Lt),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=jt(e,Xt(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),xr&&this.el.classList.add("mac");const r=this._register(new Er(this.el,"mousedown")).event;this._register(r(d=>this.onPointerStart(d,new f7e(e)),this));const o=this._register(new Er(this.el,"dblclick")).event;this._register(o(this.onPointerDoublePress,this));const s=this._register(new Er(this.el,"mouseenter")).event;this._register(s(()=>td.onMouseEnter(this)));const a=this._register(new Er(this.el,"mouseleave")).event;this._register(a(()=>td.onMouseLeave(this))),this._register(xd.addTarget(this.el));const l=this._register(new Er(this.el,hs.Start)).event;this._register(l(d=>this.onPointerStart(d,new m7e(this.el)),this));const c=this._register(new Er(this.el,hs.Tap)).event;let u;this._register(c(d=>{if(u){clearTimeout(u),u=void 0,this.onPointerDoublePress(d);return}clearTimeout(u),u=setTimeout(()=>u=void 0,250)},this)),typeof i.size=="number"?(this.size=i.size,i.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=JEi,this._register(eDi.event(d=>{this.size=d,this.layout()}))),this._register(nDi.event(d=>this.hoverDelay=d)),this.layoutProvider=n,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",QEi),this.layout()}onPointerStart(e,n){Mr.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const m=this.getOrthogonalSash(e);m&&(i=!0,e.__orthogonalSashEvent=!0,m.onPointerStart(e,new noe(n)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new noe(n))),!this.state)return;const r=this.el.ownerDocument.getElementsByTagName("iframe");for(const m of r)m.classList.add(cct);const o=e.pageX,s=e.pageY,a=e.altKey,l={startX:o,currentX:o,startY:s,currentY:s,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const c=Wp(this.el),u=()=>{let m="";i?m="all-scroll":this.orientation===1?this.state===1?m="s-resize":this.state===2?m="n-resize":m=xr?"row-resize":"ns-resize":this.state===1?m="e-resize":this.state===2?m="w-resize":m=xr?"col-resize":"ew-resize",c.textContent=`* { cursor: ${m} !important; }`},d=new Lt;u(),i||this.onDidEnablementChange.event(u,null,d);const h=m=>{Mr.stop(m,!1);const p={startX:o,currentX:m.pageX,startY:s,currentY:m.pageY,altKey:a};this._onDidChange.fire(p)},f=m=>{Mr.stop(m,!1),c.remove(),this.el.classList.remove("active"),this._onDidEnd.fire(),d.dispose();for(const p of r)p.classList.remove(cct)};n.onPointerMove(h,null,d),n.onPointerUp(f,null,d),d.add(n)}onPointerDoublePress(e){const n=this.getOrthogonalSash(e);n&&n._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,n=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!n&&e.linkedSash&&td.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,n=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!n&&e.linkedSash&&td.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){td.onMouseLeave(this)}layout(){if(this.orientation===0){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){const n=e.initialTarget??e.target;if(!(!n||!uc(n))&&n.classList.contains("orthogonal-drag-handle"))return n.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}const iDi={separatorBorder:Rt.transparent};class sFt{set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(e,n){var i,r;if(e!==this.visible){e?(this.size=bh(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof n=="number"?n:this.size,this.size=0),this.container.classList.toggle("visible",e);try{(r=(i=this.view).setVisible)==null||r.call(i,e)}catch(o){console.error("Splitview: Failed to set visible view"),console.error(o)}}}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){return this.view.proportionalLayout??!0}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,n,i,r){this.container=e,this.view=n,this.disposable=r,this._cachedVisibleSize=void 0,typeof i=="number"?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}layout(e,n){this.layoutContainer(e);try{this.view.layout(this.size,e,n)}catch(i){console.error("Splitview: Failed to layout view"),console.error(i)}}dispose(){this.disposable.dispose()}}class rDi extends sFt{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class oDi extends sFt{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var P1;(function(t){t[t.Idle=0]="Idle",t[t.Busy=1]="Busy"})(P1||(P1={}));var ioe;(function(t){t.Distribute={type:"distribute"};function e(r){return{type:"split",index:r}}t.Split=e;function n(r){return{type:"auto",index:r}}t.Auto=n;function i(r){return{type:"invisible",cachedVisibleSize:r}}t.Invisible=i})(ioe||(ioe={}));class aFt extends ct{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const n of this.sashItems)n.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const n of this.sashItems)n.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,n={}){super(),this.size=0,this._contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=P1.Idle,this._onDidSashChange=this._register(new st),this._onDidSashReset=this._register(new st),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=n.orientation??0,this.inverseAltBehavior=n.inverseAltBehavior??!1,this.proportionalLayout=n.proportionalLayout??!0,this.getSashOrthogonalSize=n.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=jt(this.el,Xt(".sash-container")),this.viewContainer=Xt(".split-view-container"),this.scrollable=this._register(new O6({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:r=>Im(ei(this.el),r)})),this.scrollableElement=this._register(new rme(this.viewContainer,{vertical:this.orientation===0?n.scrollbarVisibility??1:2,horizontal:this.orientation===1?n.scrollbarVisibility??1:2},this.scrollable));const i=this._register(new Er(this.viewContainer,"scroll")).event;this._register(i(r=>{const o=this.scrollableElement.getScrollPosition(),s=Math.abs(this.viewContainer.scrollLeft-o.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,a=Math.abs(this.viewContainer.scrollTop-o.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(s!==void 0||a!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:s,scrollTop:a})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(r=>{r.scrollTopChanged&&(this.viewContainer.scrollTop=r.scrollTop),r.scrollLeftChanged&&(this.viewContainer.scrollLeft=r.scrollLeft)})),jt(this.el,this.scrollableElement.getDomNode()),this.style(n.styles||iDi),n.descriptor&&(this.size=n.descriptor.size,n.descriptor.views.forEach((r,o)=>{const s=Ud(r.visible)||r.visible?r.size:{type:"invisible",cachedVisibleSize:r.size},a=r.view;this.doAddView(a,s,o,!0)}),this._contentSize=this.viewItems.reduce((r,o)=>r+o.size,0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,n,i=this.viewItems.length,r){this.doAddView(e,n,i,r)}layout(e,n){const i=Math.max(this.size,this._contentSize);if(this.size=e,this.layoutContext=n,this.proportions){let r=0;for(let o=0;o<this.viewItems.length;o++){const s=this.viewItems[o],a=this.proportions[o];typeof a=="number"?r+=a:e-=s.size}for(let o=0;o<this.viewItems.length;o++){const s=this.viewItems[o],a=this.proportions[o];typeof a=="number"&&r>0&&(s.size=bh(Math.round(a*e/r),s.minimumSize,s.maximumSize))}}else{const r=sf(this.viewItems.length),o=r.filter(a=>this.viewItems[a].priority===1),s=r.filter(a=>this.viewItems[a].priority===2);this.resize(this.viewItems.length-1,e-i,void 0,o,s)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map(e=>e.proportionalLayout&&e.visible?e.size/this._contentSize:void 0))}onSashStart({sash:e,start:n,alt:i}){for(const a of this.viewItems)a.enabled=!1;const r=this.sashItems.findIndex(a=>a.sash===e),o=yv(yt(this.el.ownerDocument.body,"keydown",a=>s(this.sashDragState.current,a.altKey)),yt(this.el.ownerDocument.body,"keyup",()=>s(this.sashDragState.current,!1))),s=(a,l)=>{const c=this.viewItems.map(m=>m.size);let u=Number.NEGATIVE_INFINITY,d=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(l=!l),l)if(r===this.sashItems.length-1){const p=this.viewItems[r];u=(p.minimumSize-p.size)/2,d=(p.maximumSize-p.size)/2}else{const p=this.viewItems[r+1];u=(p.size-p.maximumSize)/2,d=(p.size-p.minimumSize)/2}let h,f;if(!l){const m=sf(r,-1),p=sf(r+1,this.viewItems.length),g=m.reduce((k,M)=>k+(this.viewItems[M].minimumSize-c[M]),0),y=m.reduce((k,M)=>k+(this.viewItems[M].viewMaximumSize-c[M]),0),_=p.length===0?Number.POSITIVE_INFINITY:p.reduce((k,M)=>k+(c[M]-this.viewItems[M].minimumSize),0),w=p.length===0?Number.NEGATIVE_INFINITY:p.reduce((k,M)=>k+(c[M]-this.viewItems[M].viewMaximumSize),0),C=Math.max(g,w),N=Math.min(_,y),E=this.findFirstSnapIndex(m),D=this.findFirstSnapIndex(p);if(typeof E=="number"){const k=this.viewItems[E],M=Math.floor(k.viewMinimumSize/2);h={index:E,limitDelta:k.visible?C-M:C+M,size:k.size}}if(typeof D=="number"){const k=this.viewItems[D],M=Math.floor(k.viewMinimumSize/2);f={index:D,limitDelta:k.visible?N+M:N-M,size:k.size}}}this.sashDragState={start:a,current:a,index:r,sizes:c,minDelta:u,maxDelta:d,alt:l,snapBefore:h,snapAfter:f,disposable:o}};s(n,i)}onSashChange({current:e}){const{index:n,start:i,sizes:r,alt:o,minDelta:s,maxDelta:a,snapBefore:l,snapAfter:c}=this.sashDragState;this.sashDragState.current=e;const u=e-i,d=this.resize(n,u,r,void 0,void 0,s,a,l,c);if(o){const h=n===this.sashItems.length-1,f=this.viewItems.map(w=>w.size),m=h?n:n+1,p=this.viewItems[m],g=p.size-p.maximumSize,y=p.size-p.minimumSize,_=h?n-1:n+1;this.resize(_,-d,f,void 0,void 0,g,y)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const n of this.viewItems)n.enabled=!0}onViewChange(e,n){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(n=typeof n=="number"?n:e.size,n=bh(n,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-n)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=n,this.relayout([i],void 0)))}resizeView(e,n){if(!(e<0||e>=this.viewItems.length)){if(this.state!==P1.Idle)throw new Error("Cant modify splitview");this.state=P1.Busy;try{const i=sf(this.viewItems.length).filter(a=>a!==e),r=[...i.filter(a=>this.viewItems[a].priority===1),e],o=i.filter(a=>this.viewItems[a].priority===2),s=this.viewItems[e];n=Math.round(n),n=bh(n,s.minimumSize,Math.min(s.maximumSize,this.size)),s.size=n,this.relayout(r,o)}finally{this.state=P1.Idle}}}distributeViewSizes(){const e=[];let n=0;for(const a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),n+=a.size);const i=Math.floor(n/e.length);for(const a of e)a.size=bh(i,a.minimumSize,a.maximumSize);const r=sf(this.viewItems.length),o=r.filter(a=>this.viewItems[a].priority===1),s=r.filter(a=>this.viewItems[a].priority===2);this.relayout(o,s)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,n,i=this.viewItems.length,r){if(this.state!==P1.Idle)throw new Error("Cant modify splitview");this.state=P1.Busy;try{const o=Xt(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(o):this.viewContainer.insertBefore(o,this.viewContainer.children.item(i));const s=e.onDidChange(h=>this.onViewChange(u,h)),a=Kn(()=>o.remove()),l=yv(s,a);let c;typeof n=="number"?c=n:(n.type==="auto"&&(this.areViewsDistributed()?n={type:"distribute"}:n={type:"split",index:n.index}),n.type==="split"?c=this.getViewSize(n.index)/2:n.type==="invisible"?c={cachedVisibleSize:n.cachedVisibleSize}:c=e.minimumSize);const u=this.orientation===0?new rDi(o,e,c,l):new oDi(o,e,c,l);if(this.viewItems.splice(i,0,u),this.viewItems.length>1){const h={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},f=this.orientation===0?new td(this.sashContainer,{getHorizontalSashTop:k=>this.getSashPosition(k),getHorizontalSashWidth:this.getSashOrthogonalSize},{...h,orientation:1}):new td(this.sashContainer,{getVerticalSashLeft:k=>this.getSashPosition(k),getVerticalSashHeight:this.getSashOrthogonalSize},{...h,orientation:0}),m=this.orientation===0?k=>({sash:f,start:k.startY,current:k.currentY,alt:k.altKey}):k=>({sash:f,start:k.startX,current:k.currentX,alt:k.altKey}),g=rn.map(f.onDidStart,m)(this.onSashStart,this),_=rn.map(f.onDidChange,m)(this.onSashChange,this),C=rn.map(f.onDidEnd,()=>this.sashItems.findIndex(k=>k.sash===f))(this.onSashEnd,this),N=f.onDidReset(()=>{const k=this.sashItems.findIndex(P=>P.sash===f),M=sf(k,-1),T=sf(k+1,this.viewItems.length),A=this.findFirstSnapIndex(M),R=this.findFirstSnapIndex(T);typeof A=="number"&&!this.viewItems[A].visible||typeof R=="number"&&!this.viewItems[R].visible||this._onDidSashReset.fire(k)}),E=yv(g,_,C,N,f),D={sash:f,disposable:E};this.sashItems.splice(i-1,0,D)}o.appendChild(e.element);let d;typeof n!="number"&&n.type==="split"&&(d=[n.index]),r||this.relayout([i],d),!r&&typeof n!="number"&&n.type==="distribute"&&this.distributeViewSizes()}finally{this.state=P1.Idle}}relayout(e,n){const i=this.viewItems.reduce((r,o)=>r+o.size,0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,n),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,n,i=this.viewItems.map(u=>u.size),r,o,s=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;const u=sf(e,-1),d=sf(e+1,this.viewItems.length);if(o)for(const D of o)bwe(u,D),bwe(d,D);if(r)for(const D of r)rQ(u,D),rQ(d,D);const h=u.map(D=>this.viewItems[D]),f=u.map(D=>i[D]),m=d.map(D=>this.viewItems[D]),p=d.map(D=>i[D]),g=u.reduce((D,k)=>D+(this.viewItems[k].minimumSize-i[k]),0),y=u.reduce((D,k)=>D+(this.viewItems[k].maximumSize-i[k]),0),_=d.length===0?Number.POSITIVE_INFINITY:d.reduce((D,k)=>D+(i[k]-this.viewItems[k].minimumSize),0),w=d.length===0?Number.NEGATIVE_INFINITY:d.reduce((D,k)=>D+(i[k]-this.viewItems[k].maximumSize),0),C=Math.max(g,w,s),N=Math.min(_,y,a);let E=!1;if(l){const D=this.viewItems[l.index],k=n>=l.limitDelta;E=k!==D.visible,D.setVisible(k,l.size)}if(!E&&c){const D=this.viewItems[c.index],k=n<c.limitDelta;E=k!==D.visible,D.setVisible(k,c.size)}if(E)return this.resize(e,n,i,r,o,s,a);n=bh(n,C,N);for(let D=0,k=n;D<h.length;D++){const M=h[D],T=bh(f[D]+k,M.minimumSize,M.maximumSize),A=T-f[D];k-=A,M.size=T}for(let D=0,k=n;D<m.length;D++){const M=m[D],T=bh(p[D]-k,M.minimumSize,M.maximumSize),A=T-p[D];k+=A,M.size=T}return n}distributeEmptySpace(e){const n=this.viewItems.reduce((a,l)=>a+l.size,0);let i=this.size-n;const r=sf(this.viewItems.length-1,-1),o=r.filter(a=>this.viewItems[a].priority===1),s=r.filter(a=>this.viewItems[a].priority===2);for(const a of s)bwe(r,a);for(const a of o)rQ(r,a);typeof e=="number"&&rQ(r,e);for(let a=0;i!==0&&a<r.length;a++){const l=this.viewItems[r[a]],c=bh(l.size+i,l.minimumSize,l.maximumSize),u=c-l.size;i-=u,l.size=c}}layoutViews(){this._contentSize=this.viewItems.reduce((n,i)=>n+i.size,0);let e=0;for(const n of this.viewItems)n.layout(e,this.layoutContext),e+=n.size;this.sashItems.forEach(n=>n.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this._contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this._contentSize})}updateSashEnablement(){let e=!1;const n=this.viewItems.map(l=>e=l.size-l.minimumSize>0||e);e=!1;const i=this.viewItems.map(l=>e=l.maximumSize-l.size>0||e),r=[...this.viewItems].reverse();e=!1;const o=r.map(l=>e=l.size-l.minimumSize>0||e).reverse();e=!1;const s=r.map(l=>e=l.maximumSize-l.size>0||e).reverse();let a=0;for(let l=0;l<this.sashItems.length;l++){const{sash:c}=this.sashItems[l],u=this.viewItems[l];a+=u.size;const d=!(n[l]&&s[l+1]),h=!(i[l]&&o[l+1]);if(d&&h){const f=sf(l,-1),m=sf(l+1,this.viewItems.length),p=this.findFirstSnapIndex(f),g=this.findFirstSnapIndex(m),y=typeof p=="number"&&!this.viewItems[p].visible,_=typeof g=="number"&&!this.viewItems[g].visible;y&&o[l]&&(a>0||this.startSnappingEnabled)?c.state=1:_&&n[l]&&(a<this._contentSize||this.endSnappingEnabled)?c.state=2:c.state=0}else d&&!h?c.state=1:!d&&h?c.state=2:c.state=3}}getSashPosition(e){let n=0;for(let i=0;i<this.sashItems.length;i++)if(n+=this.viewItems[i].size,this.sashItems[i].sash===e)return n;return 0}findFirstSnapIndex(e){for(const n of e){const i=this.viewItems[n];if(i.visible&&i.snap)return n}for(const n of e){const i=this.viewItems[n];if(i.visible&&i.maximumSize-i.minimumSize>0)return;if(!i.visible&&i.snap)return n}}areViewsDistributed(){let e,n;for(const i of this.viewItems)if(e=e===void 0?i.size:Math.min(e,i.size),n=n===void 0?i.size:Math.max(n,i.size),n-e>2)return!1;return!0}dispose(){var e;(e=this.sashDragState)==null||e.disposable.dispose(),Jo(this.viewItems),this.viewItems=[],this.sashItems.forEach(n=>n.disposable.dispose()),this.sashItems=[],super.dispose()}}const lce=class lce{constructor(e,n,i){this.columns=e,this.getColumnSize=i,this.templateId=lce.TemplateId,this.renderedTemplates=new Set;const r=new Map(n.map(o=>[o.templateId,o]));this.renderers=[];for(const o of e){const s=r.get(o.templateId);if(!s)throw new Error(`Table cell renderer for template id ${o.templateId} not found.`);this.renderers.push(s)}}renderTemplate(e){const n=jt(e,Xt(".monaco-table-tr")),i=[],r=[];for(let s=0;s<this.columns.length;s++){const a=this.renderers[s],l=jt(n,Xt(".monaco-table-td",{"data-col-index":s}));l.style.width=`${this.getColumnSize(s)}px`,i.push(l),r.push(a.renderTemplate(l))}const o={container:e,cellContainers:i,cellTemplateData:r};return this.renderedTemplates.add(o),o}renderElement(e,n,i,r){for(let o=0;o<this.columns.length;o++){const a=this.columns[o].project(e);this.renderers[o].renderElement(a,n,i.cellTemplateData[o],r)}}disposeElement(e,n,i,r){for(let o=0;o<this.columns.length;o++){const s=this.renderers[o];if(s.disposeElement){const l=this.columns[o].project(e);s.disposeElement(l,n,i.cellTemplateData[o],r)}}}disposeTemplate(e){for(let n=0;n<this.columns.length;n++)this.renderers[n].disposeTemplate(e.cellTemplateData[n]);ru(e.container),this.renderedTemplates.delete(e)}layoutColumn(e,n){for(const{cellContainers:i}of this.renderedTemplates)i[e].style.width=`${n}px`}};lce.TemplateId="row";let roe=lce;function sDi(t){return{getHeight(e){return t.getHeight(e)},getTemplateId(){return roe.TemplateId}}}class aDi extends ct{get minimumSize(){return this.column.minimumWidth??120}get maximumSize(){return this.column.maximumWidth??Number.POSITIVE_INFINITY}get onDidChange(){return this.column.onDidChangeWidthConstraints??rn.None}constructor(e,n){super(),this.column=e,this.index=n,this._onDidLayout=new st,this.onDidLayout=this._onDidLayout.event,this.element=Xt(".monaco-table-th",{"data-col-index":n},e.label),e.tooltip&&this._register(d_().setupManagedHover(Yh("mouse"),this.element,e.tooltip))}layout(e){this._onDidLayout.fire([this.index,e])}}const cce=class cce{get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onDidScroll(){return this.list.onDidScroll}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}get scrollHeight(){return this.list.scrollHeight}get renderHeight(){return this.list.renderHeight}get onDidDispose(){return this.list.onDidDispose}constructor(e,n,i,r,o,s){this.virtualDelegate=i,this.domId=`table_id_${++cce.InstanceCount}`,this.disposables=new Lt,this.cachedWidth=0,this.cachedHeight=0,this.domNode=jt(n,Xt(`.monaco-table.${this.domId}`));const a=r.map((u,d)=>this.disposables.add(new aDi(u,d))),l={size:a.reduce((u,d)=>u+d.column.weight,0),views:a.map(u=>({size:u.column.weight,view:u}))};this.splitview=this.disposables.add(new aFt(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:l})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const c=new roe(r,o,u=>this.splitview.getViewSize(u));this.list=this.disposables.add(new ng(e,this.domNode,sDi(i),[c],s)),rn.any(...a.map(u=>u.onDidLayout))(([u,d])=>c.layoutColumn(u,d),null,this.disposables),this.splitview.onDidSashReset(u=>{const d=r.reduce((f,m)=>f+m.weight,0),h=r[u].weight/d*this.cachedWidth;this.splitview.resizeView(u,h)},null,this.disposables),this.styleElement=Wp(this.domNode),this.style(VNi)}updateOptions(e){this.list.updateOptions(e)}splice(e,n,i=[]){this.list.splice(e,n,i)}getHTMLElement(){return this.domNode}style(e){const n=[];n.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {
			top: ${this.virtualDelegate.headerRowHeight+1}px;
			height: calc(100% - ${this.virtualDelegate.headerRowHeight}px);
		}`),this.styleElement.textContent=n.join(`
`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}};cce.InstanceCount=0;let FIe=cce;var ap;(function(t){t[t.Expanded=0]="Expanded",t[t.Collapsed=1]="Collapsed",t[t.PreserveOrExpanded=2]="PreserveOrExpanded",t[t.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(ap||(ap={}));var $T;(function(t){t[t.Unknown=0]="Unknown",t[t.Twistie=1]="Twistie",t[t.Element=2]="Element",t[t.Filter=3]="Filter"})($T||($T={}));class bp extends Error{constructor(e,n){super(`TreeError [${e}] ${n}`)}}class p7e{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let n=this._map.get(e);return n||(n=this.fn(e),this._map.set(e,n)),n}}function g7e(t){return typeof t=="object"&&"visibility"in t&&"data"in t}function cW(t){switch(t){case!0:return 1;case!1:return 0;default:return t}}function O1e(t){return typeof t.collapsible=="boolean"}class lDi{constructor(e,n,i,r={}){this.user=e,this.list=n,this.rootRef=[],this.eventBufferer=new fq,this._onDidChangeCollapseState=new st,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new st,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new st,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new Lv(b4t),this.collapseByDefault=typeof r.collapseByDefault>"u"?!1:r.collapseByDefault,this.allowNonCollapsibleParents=r.allowNonCollapsibleParents??!1,this.filter=r.filter,this.autoExpandSingleChildren=typeof r.autoExpandSingleChildren>"u"?!1:r.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,n,i=Ir.empty(),r={}){if(e.length===0)throw new bp(this.user,"Invalid tree location");r.diffIdentityProvider?this.spliceSmart(r.diffIdentityProvider,e,n,i,r):this.spliceSimple(e,n,i,r)}spliceSmart(e,n,i,r=Ir.empty(),o,s=o.diffDepth??0){const{parentNode:a}=this.getParentNodeWithListIndex(n);if(!a.lastDiffIds)return this.spliceSimple(n,i,r,o);const l=[...r],c=n[n.length-1],u=new wx({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,c),...l,...a.children.slice(c+i)].map(p=>e.getId(p.element).toString())}).ComputeDiff(!1);if(u.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(n,i,l,o);const d=n.slice(0,-1),h=(p,g,y)=>{if(s>0)for(let _=0;_<y;_++)p--,g--,this.spliceSmart(e,[...d,p,0],Number.MAX_SAFE_INTEGER,l[g].children,o,s-1)};let f=Math.min(a.children.length,c+i),m=l.length;for(const p of u.changes.sort((g,y)=>y.originalStart-g.originalStart))h(f,m,f-(p.originalStart+p.originalLength)),f=p.originalStart,m=p.modifiedStart-c,this.spliceSimple([...d,f],p.originalLength,Ir.slice(l,m,m+p.modifiedLength),o);h(f,m,f)}spliceSimple(e,n,i=Ir.empty(),{onDidCreateNode:r,onDidDeleteNode:o,diffIdentityProvider:s}){const{parentNode:a,listIndex:l,revealed:c,visible:u}=this.getParentNodeWithListIndex(e),d=[],h=Ir.map(i,N=>this.createTreeNode(N,a,a.visible?1:0,c,d,r)),f=e[e.length-1];let m=0;for(let N=f;N>=0&&N<a.children.length;N--){const E=a.children[N];if(E.visible){m=E.visibleChildIndex;break}}const p=[];let g=0,y=0;for(const N of h)p.push(N),y+=N.renderNodeCount,N.visible&&(N.visibleChildIndex=m+g++);const _=Sot(a.children,f,n,p);s?a.lastDiffIds?Sot(a.lastDiffIds,f,n,p.map(N=>s.getId(N.element).toString())):a.lastDiffIds=a.children.map(N=>s.getId(N.element).toString()):a.lastDiffIds=void 0;let w=0;for(const N of _)N.visible&&w++;if(w!==0)for(let N=f+p.length;N<a.children.length;N++){const E=a.children[N];E.visible&&(E.visibleChildIndex-=w)}if(a.visibleChildrenCount+=g-w,c&&u){const N=_.reduce((E,D)=>E+(D.visible?D.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(a,y-N),this.list.splice(l,N,d)}if(_.length>0&&o){const N=E=>{o(E),E.children.forEach(N)};_.forEach(N)}this._onDidSplice.fire({insertedNodes:p,deletedNodes:_});let C=a;for(;C;){if(C.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}C=C.parent}}rerender(e){if(e.length===0)throw new bp(this.user,"Invalid tree location");const{node:n,listIndex:i,revealed:r}=this.getTreeNodeWithListIndex(e);n.visible&&r&&this.list.splice(i,1,[n])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:n,visible:i,revealed:r}=this.getTreeNodeWithListIndex(e);return i&&r?n:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,n){const i=this.getTreeNode(e);typeof n>"u"&&(n=!i.collapsible);const r={collapsible:n};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,r))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,n,i){const r=this.getTreeNode(e);typeof n>"u"&&(n=!r.collapsed);const o={collapsed:n,recursive:i||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,o))}_setCollapseState(e,n){const{node:i,listIndex:r,revealed:o}=this.getTreeNodeWithListIndex(e),s=this._setListNodeCollapseState(i,r,o,n);if(i!==this.root&&this.autoExpandSingleChildren&&s&&!O1e(n)&&i.collapsible&&!i.collapsed&&!n.recursive){let a=-1;for(let l=0;l<i.children.length;l++)if(i.children[l].visible)if(a>-1){a=-1;break}else a=l;a>-1&&this._setCollapseState([...e,a],n)}return s}_setListNodeCollapseState(e,n,i,r){const o=this._setNodeCollapseState(e,r,!1);if(!i||!e.visible||!o)return o;const s=e.renderNodeCount,a=this.updateNodeAfterCollapseChange(e),l=s-(n===-1?0:1);return this.list.splice(n+1,l,a.slice(1)),o}_setNodeCollapseState(e,n,i){let r;if(e===this.root?r=!1:(O1e(n)?(r=e.collapsible!==n.collapsible,e.collapsible=n.collapsible):e.collapsible?(r=e.collapsed!==n.collapsed,e.collapsed=n.collapsed):r=!1,r&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!O1e(n)&&n.recursive)for(const o of e.children)r=this._setNodeCollapseState(o,n,!0)||r;return r}expandTo(e){this.eventBufferer.bufferEvents(()=>{let n=this.getTreeNode(e);for(;n.parent;)n=n.parent,e=e.slice(0,e.length-1),n.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){const e=this.root.renderNodeCount,n=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,n),this.refilterDelayer.cancel()}createTreeNode(e,n,i,r,o,s){const a={parent:n,element:e.element,children:[],depth:n.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed<"u",collapsed:typeof e.collapsed>"u"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},l=this._filterNode(a,i);a.visibility=l,r&&o.push(a);const c=e.children||Ir.empty(),u=r&&l!==0&&!a.collapsed;let d=0,h=1;for(const f of c){const m=this.createTreeNode(f,a,l,u,o,s);a.children.push(m),h+=m.renderNodeCount,m.visible&&(m.visibleChildIndex=d++)}return this.allowNonCollapsibleParents||(a.collapsible=a.collapsible||a.children.length>0),a.visibleChildrenCount=d,a.visible=l===2?d>0:l===1,a.visible?a.collapsed||(a.renderNodeCount=h):(a.renderNodeCount=0,r&&o.pop()),s==null||s(a),a}updateNodeAfterCollapseChange(e){const n=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-n),i}_updateNodeAfterCollapseChange(e,n){if(e.visible===!1)return 0;if(n.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,n);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const n=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-n),i}_updateNodeAfterFilterChange(e,n,i,r=!0){let o;if(e!==this.root){if(o=this._filterNode(e,n),o===0)return e.visible=!1,e.renderNodeCount=0,!1;r&&i.push(e)}const s=i.length;e.renderNodeCount=e===this.root?0:1;let a=!1;if(!e.collapsed||o!==0){let l=0;for(const c of e.children)a=this._updateNodeAfterFilterChange(c,o,i,r&&!e.collapsed)||a,c.visible&&(c.visibleChildIndex=l++);e.visibleChildrenCount=l}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=o===2?a:o===1,e.visibility=o),e.visible?e.collapsed||(e.renderNodeCount+=i.length-s):(e.renderNodeCount=0,r&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,n){if(n!==0)for(;e;)e.renderNodeCount+=n,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,n){const i=this.filter?this.filter.filter(e.element,n):1;return typeof i=="boolean"?(e.filterData=void 0,i?1:0):g7e(i)?(e.filterData=i.data,cW(i.visibility)):(e.filterData=void 0,cW(i))}hasTreeNode(e,n=this.root){if(!e||e.length===0)return!0;const[i,...r]=e;return i<0||i>n.children.length?!1:this.hasTreeNode(r,n.children[i])}getTreeNode(e,n=this.root){if(!e||e.length===0)return n;const[i,...r]=e;if(i<0||i>n.children.length)throw new bp(this.user,"Invalid tree location");return this.getTreeNode(r,n.children[i])}getTreeNodeWithListIndex(e){if(e.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:n,listIndex:i,revealed:r,visible:o}=this.getParentNodeWithListIndex(e),s=e[e.length-1];if(s<0||s>n.children.length)throw new bp(this.user,"Invalid tree location");const a=n.children[s];return{node:a,listIndex:i,revealed:r,visible:o&&a.visible}}getParentNodeWithListIndex(e,n=this.root,i=0,r=!0,o=!0){const[s,...a]=e;if(s<0||s>n.children.length)throw new bp(this.user,"Invalid tree location");for(let l=0;l<s;l++)i+=n.children[l].renderNodeCount;return r=r&&!n.collapsed,o=o&&n.visible,a.length===0?{parentNode:n,listIndex:i,revealed:r,visible:o}:this.getParentNodeWithListIndex(a,n.children[s],i+1,r,o)}getNode(e=[]){return this.getTreeNode(e)}getNodeLocation(e){const n=[];let i=e;for(;i.parent;)n.push(i.parent.children.indexOf(i)),i=i.parent;return n.reverse()}getParentNodeLocation(e){if(e.length!==0)return e.length===1?[]:Aci(e)[0]}getFirstElementChild(e){const n=this.getTreeNode(e);if(n.children.length!==0)return n.children[0].element}}class cDi extends Rq{constructor(e){super(e.elements.map(n=>n.element)),this.data=e}}function j1e(t){return t instanceof Rq?new cDi(t):t}class uDi{constructor(e,n){this.modelProvider=e,this.dnd=n,this.autoExpandDisposable=ct.None,this.disposables=new Lt}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,n){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(i=>i.element),n)}onDragStart(e,n){var i,r;(r=(i=this.dnd).onDragStart)==null||r.call(i,j1e(e),n)}onDragOver(e,n,i,r,o,s=!0){const a=this.dnd.onDragOver(j1e(e),n&&n.element,i,r,o),l=this.autoExpandNode!==n;if(l&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=n),typeof n>"u")return a;if(l&&typeof a!="boolean"&&a.autoExpand&&(this.autoExpandDisposable=dk(()=>{const f=this.modelProvider(),m=f.getNodeLocation(n);f.isCollapsed(m)&&f.setCollapsed(m,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof a=="boolean"||!a.accept||typeof a.bubble>"u"||a.feedback){if(!s){const f=typeof a=="boolean"?a:a.accept,m=typeof a=="boolean"?void 0:a.effect;return{accept:f,effect:m,feedback:[i]}}return a}if(a.bubble===1){const f=this.modelProvider(),m=f.getNodeLocation(n),p=f.getParentNodeLocation(m),g=f.getNode(p),y=p&&f.getListIndex(p);return this.onDragOver(e,g,y,r,o,!1)}const c=this.modelProvider(),u=c.getNodeLocation(n),d=c.getListIndex(u),h=c.getListRenderCount(u);return{...a,feedback:sf(d,d+h)}}drop(e,n,i,r,o){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(j1e(e),n&&n.element,i,r,o)}onDragEnd(e){var n,i;(i=(n=this.dnd).onDragEnd)==null||i.call(n,e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}function dDi(t,e){return e&&{...e,identityProvider:e.identityProvider&&{getId(n){return e.identityProvider.getId(n.element)}},dnd:e.dnd&&new uDi(t,e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(n){return e.multipleSelectionController.isSelectionSingleChangeEvent({...n,element:n.element})},isSelectionRangeChangeEvent(n){return e.multipleSelectionController.isSelectionRangeChangeEvent({...n,element:n.element})}},accessibilityProvider:e.accessibilityProvider&&{...e.accessibilityProvider,getSetSize(n){const i=t(),r=i.getNodeLocation(n),o=i.getParentNodeLocation(r);return i.getNode(o).visibleChildrenCount},getPosInSet(n){return n.visibleChildIndex+1},isChecked:e.accessibilityProvider&&e.accessibilityProvider.isChecked?n=>e.accessibilityProvider.isChecked(n.element):void 0,getRole:e.accessibilityProvider&&e.accessibilityProvider.getRole?n=>e.accessibilityProvider.getRole(n.element):()=>"treeitem",getAriaLabel(n){return e.accessibilityProvider.getAriaLabel(n.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider&&e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider&&e.accessibilityProvider.getAriaLevel?n=>e.accessibilityProvider.getAriaLevel(n.element):n=>n.depth,getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(n=>e.accessibilityProvider.getActiveDescendantId(n.element))},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(n){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n.element)}}}}class b7e{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,n){var i,r;(r=(i=this.delegate).setDynamicHeight)==null||r.call(i,e.element,n)}}var x5;(function(t){t.None="none",t.OnHover="onHover",t.Always="always"})(x5||(x5={}));class hDi{get elements(){return this._elements}constructor(e,n=[]){this._elements=n,this.disposables=new Lt,this.onDidChange=rn.forEach(e,i=>this._elements=i,this.disposables)}dispose(){this.disposables.dispose()}}const nz=class nz{constructor(e,n,i,r,o,s={}){var a;this.renderer=e,this.modelProvider=n,this.activeNodes=r,this.renderedIndentGuides=o,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=nz.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=ct.None,this.disposables=new Lt,this.templateId=e.templateId,this.updateOptions(s),rn.map(i,l=>l.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(a=e.onDidChangeTwistieState)==null||a.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent<"u"){const n=bh(e.indent,0,40);if(n!==this.indent){this.indent=n;for(const[i,r]of this.renderedNodes)this.renderTreeElement(i,r)}}if(typeof e.renderIndentGuides<"u"){const n=e.renderIndentGuides!==x5.None;if(n!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=n;for(const[i,r]of this.renderedNodes)this._renderIndentGuides(i,r);if(this.indentGuidesDisposable.dispose(),n){const i=new Lt;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,i),this.indentGuidesDisposable=i,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof e.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const n=jt(e,Xt(".monaco-tl-row")),i=jt(n,Xt(".monaco-tl-indent")),r=jt(n,Xt(".monaco-tl-twistie")),o=jt(n,Xt(".monaco-tl-contents")),s=this.renderer.renderTemplate(o);return{container:e,indent:i,twistie:r,indentGuidesDisposable:ct.None,templateData:s}}renderElement(e,n,i,r){this.renderedNodes.set(e,i),this.renderedElements.set(e.element,e),this.renderTreeElement(e,i),this.renderer.renderElement(e,n,i.templateData,r)}disposeElement(e,n,i,r){var o,s;i.indentGuidesDisposable.dispose(),(s=(o=this.renderer).disposeElement)==null||s.call(o,e,n,i.templateData,r),typeof r=="number"&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const n=this.renderedElements.get(e);n&&this.onDidChangeNodeTwistieState(n)}onDidChangeNodeTwistieState(e){const n=this.renderedNodes.get(e);n&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,n))}renderTreeElement(e,n){const i=nz.DefaultIndent+(e.depth-1)*this.indent;n.twistie.style.paddingLeft=`${i}px`,n.indent.style.width=`${i+this.indent-16}px`,e.collapsible?n.container.setAttribute("aria-expanded",String(!e.collapsed)):n.container.removeAttribute("aria-expanded"),n.twistie.classList.remove(...ci.asClassNameArray(qt.treeItemExpanded));let r=!1;this.renderer.renderTwistie&&(r=this.renderer.renderTwistie(e.element,n.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(r||n.twistie.classList.add(...ci.asClassNameArray(qt.treeItemExpanded)),n.twistie.classList.add("collapsible"),n.twistie.classList.toggle("collapsed",e.collapsed)):n.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,n)}_renderIndentGuides(e,n){if(ru(n.indent),n.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new Lt,r=this.modelProvider();for(;;){const o=r.getNodeLocation(e),s=r.getParentNodeLocation(o);if(!s)break;const a=r.getNode(s),l=Xt(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(a)&&l.classList.add("active"),n.indent.childElementCount===0?n.indent.appendChild(l):n.indent.insertBefore(l,n.indent.firstElementChild),this.renderedIndentGuides.add(a,l),i.add(Kn(()=>this.renderedIndentGuides.delete(a,l))),e=a}n.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const n=new Set,i=this.modelProvider();e.forEach(r=>{const o=i.getNodeLocation(r);try{const s=i.getParentNodeLocation(o);r.collapsible&&r.children.length>0&&!r.collapsed?n.add(r):s&&n.add(i.getNode(s))}catch{}}),this.activeIndentNodes.forEach(r=>{n.has(r)||this.renderedIndentGuides.forEach(r,o=>o.classList.remove("active"))}),n.forEach(r=>{this.activeIndentNodes.has(r)||this.renderedIndentGuides.forEach(r,o=>o.classList.add("active"))}),this.activeIndentNodes=n}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),Jo(this.disposables)}};nz.DefaultIndent=8;let $Ie=nz;class fDi{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,n,i){this.tree=e,this.keyboardNavigationLabelProvider=n,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new Lt,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,n){let i=1;if(this._filter){const s=this._filter.filter(e,n);if(typeof s=="boolean"?i=s?1:0:g7e(s)?i=cW(s.visibility):i=s,i===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:N0.Default,visibility:i};const r=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),o=Array.isArray(r)?r:[r];for(const s of o){const a=s&&s.toString();if(typeof a>"u")return{data:N0.Default,visibility:i};let l;if(this.tree.findMatchType===eA.Contiguous){const c=a.toLowerCase().indexOf(this._lowercasePattern);if(c>-1){l=[Number.MAX_SAFE_INTEGER,0];for(let u=this._lowercasePattern.length;u>0;u--)l.push(c+u-1)}}else l=X2(this._pattern,this._lowercasePattern,0,a,a.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(l)return this._matchCount++,o.length===1?{data:l,visibility:i}:{data:{label:a,score:l},visibility:i}}return this.tree.findMode===dC.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:N0.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){Jo(this.disposables)}}var dC;(function(t){t[t.Highlight=0]="Highlight",t[t.Filter=1]="Filter"})(dC||(dC={}));var eA;(function(t){t[t.Fuzzy=0]="Fuzzy",t[t.Contiguous=1]="Contiguous"})(eA||(eA={}));let mDi=class{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,n,i,r,o,s={}){this.tree=e,this.view=i,this.filter=r,this.contextViewProvider=o,this.options=s,this._pattern="",this.width=0,this._onDidChangeMode=new st,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new st,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new st,this._onDidChangeOpenState=new st,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new Lt,this.disposables=new Lt,this._mode=e.options.defaultFindMode??dC.Highlight,this._matchType=e.options.defaultFindMatchType??eA.Fuzzy,n.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){e.defaultFindMode!==void 0&&(this.mode=e.defaultFindMode),e.defaultFindMatchType!==void 0&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){var n,i,r;const e=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&e?this.tree.options.showNotFoundMessage??!0?(n=this.widget)==null||n.showMessage({type:2,content:I("not found","No elements found.")}):(i=this.widget)==null||i.showMessage({type:2}):(r=this.widget)==null||r.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!N0.isDefault(e.filterData)}layout(e){var n;this.width=e,(n=this.widget)==null||n.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}};function pDi(t,e){return t.position===e.position&&lFt(t,e)}function lFt(t,e){return t.node.element===e.node.element&&t.startIndex===e.startIndex&&t.height===e.height&&t.endIndex===e.endIndex}class gDi{constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return Xs(this.stickyNodes,e.stickyNodes,pDi)}lastNodePartiallyVisible(){if(this.count===0)return!1;const e=this.stickyNodes[this.count-1];if(this.count===1)return e.position!==0;const n=this.stickyNodes[this.count-2];return n.position+n.height!==e.position}animationStateChanged(e){if(!Xs(this.stickyNodes,e.stickyNodes,lFt)||this.count===0)return!1;const n=this.stickyNodes[this.count-1],i=e.stickyNodes[e.count-1];return n.position!==i.position}}class bDi{constrainStickyScrollNodes(e,n,i){for(let r=0;r<e.length;r++){const o=e[r];if(o.position+o.height>i||r>=n)return e.slice(0,r)}return e}}let uct=class extends ct{constructor(e,n,i,r,o,s={}){super(),this.tree=e,this.model=n,this.view=i,this.treeDelegate=o,this.maxWidgetViewRatio=.4;const a=this.validateStickySettings(s);this.stickyScrollMaxItemCount=a.stickyScrollMaxItemCount,this.stickyScrollDelegate=s.stickyScrollDelegate??new bDi,this._widget=this._register(new vDi(i.getScrollableElement(),i,e,r,o,s.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(i.onDidScroll(()=>this.update())),this._register(i.onDidChangeContentHeight(()=>this.update())),this._register(e.onDidChangeCollapseState(()=>this.update())),this.update()}get height(){return this._widget.height}getNodeAtHeight(e){let n;if(e===0?n=this.view.firstVisibleIndex:n=this.view.indexAt(e+this.view.scrollTop),!(n<0||n>=this.view.length))return this.view.element(n)}update(){const e=this.getNodeAtHeight(0);if(!e||this.tree.scrollTop===0){this._widget.setState(void 0);return}const n=this.findStickyState(e);this._widget.setState(n)}findStickyState(e){const n=[];let i=e,r=0,o=this.getNextStickyNode(i,void 0,r);for(;o&&(n.push(o),r+=o.height,!(n.length<=this.stickyScrollMaxItemCount&&(i=this.getNextVisibleNode(o),!i)));)o=this.getNextStickyNode(i,o.node,r);const s=this.constrainStickyNodes(n);return s.length?new gDi(s):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,n,i){const r=this.getAncestorUnderPrevious(e,n);if(r&&!(r===e&&(!this.nodeIsUncollapsedParent(e)||this.nodeTopAlignsWithStickyNodesBottom(e,i))))return this.createStickyScrollNode(r,i)}nodeTopAlignsWithStickyNodesBottom(e,n){const i=this.getNodeIndex(e),r=this.view.getElementTop(i),o=n;return this.view.scrollTop===r-o}createStickyScrollNode(e,n){const i=this.treeDelegate.getHeight(e),{startIndex:r,endIndex:o}=this.getNodeRange(e),s=this.calculateStickyNodePosition(o,n,i);return{node:e,position:s,height:i,startIndex:r,endIndex:o}}getAncestorUnderPrevious(e,n=void 0){let i=e,r=this.getParentNode(i);for(;r;){if(r===n)return i;i=r,r=this.getParentNode(i)}if(n===void 0)return i}calculateStickyNodePosition(e,n,i){let r=this.view.getRelativeTop(e);if(r===null&&this.view.firstVisibleIndex===e&&e+1<this.view.length){const c=this.treeDelegate.getHeight(this.view.element(e)),u=this.view.getRelativeTop(e+1);r=u?u-c/this.view.renderHeight:null}if(r===null)return n;const o=this.view.element(e),s=this.treeDelegate.getHeight(o),l=r*this.view.renderHeight+s;return n+i>l&&n<=l?l-i:n}constrainStickyNodes(e){if(e.length===0)return[];const n=this.view.renderHeight*this.maxWidgetViewRatio,i=e[e.length-1];if(e.length<=this.stickyScrollMaxItemCount&&i.position+i.height<=n)return e;const r=this.stickyScrollDelegate.constrainStickyScrollNodes(e,this.stickyScrollMaxItemCount,n);if(!r.length)return[];const o=r[r.length-1];if(r.length>this.stickyScrollMaxItemCount||o.position+o.height>n)throw new Error("stickyScrollDelegate violates constraints");return r}getParentNode(e){const n=this.model.getNodeLocation(e),i=this.model.getParentNodeLocation(n);return i?this.model.getNode(i):void 0}nodeIsUncollapsedParent(e){const n=this.model.getNodeLocation(e);return this.model.getListRenderCount(n)>1}getNodeIndex(e){const n=this.model.getNodeLocation(e);return this.model.getListIndex(n)}getNodeRange(e){const n=this.model.getNodeLocation(e),i=this.model.getListIndex(n);if(i<0)throw new Error("Node not found in tree");const r=this.model.getListRenderCount(n),o=i+r-1;return{startIndex:i,endIndex:o}}nodePositionTopBelowWidget(e){const n=[];let i=this.getParentNode(e);for(;i;)n.push(i),i=this.getParentNode(i);let r=0;for(let o=0;o<n.length&&o<this.stickyScrollMaxItemCount;o++)r+=this.treeDelegate.getHeight(n[o]);return r}domFocus(){this._widget.domFocus()}focusedLast(){return this._widget.focusedLast()}updateOptions(e={}){if(!e.stickyScrollMaxItemCount)return;const n=this.validateStickySettings(e);this.stickyScrollMaxItemCount!==n.stickyScrollMaxItemCount&&(this.stickyScrollMaxItemCount=n.stickyScrollMaxItemCount,this.update())}validateStickySettings(e){let n=7;return typeof e.stickyScrollMaxItemCount=="number"&&(n=Math.max(e.stickyScrollMaxItemCount,1)),{stickyScrollMaxItemCount:n}}},vDi=class{constructor(e,n,i,r,o,s){this.view=n,this.tree=i,this.treeRenderers=r,this.treeDelegate=o,this.accessibilityProvider=s,this._previousElements=[],this._previousStateDisposables=new Lt,this._rootDomNode=Xt(".monaco-tree-sticky-container.empty"),e.appendChild(this._rootDomNode);const a=Xt(".monaco-tree-sticky-container-shadow");this._rootDomNode.appendChild(a),this.stickyScrollFocus=new yDi(this._rootDomNode,n),this.onDidChangeHasFocus=this.stickyScrollFocus.onDidChangeHasFocus,this.onContextMenu=this.stickyScrollFocus.onContextMenu}get height(){if(!this._previousState)return 0;const e=this._previousState.stickyNodes[this._previousState.count-1];return e.position+e.height}setState(e){const n=!!this._previousState&&this._previousState.count>0,i=!!e&&e.count>0;if(!n&&!i||n&&i&&this._previousState.equal(e))return;if(n!==i&&this.setVisible(i),!i){this._previousState=void 0,this._previousElements=[],this._previousStateDisposables.clear();return}const r=e.stickyNodes[e.count-1];if(this._previousState&&e.animationStateChanged(this._previousState))this._previousElements[this._previousState.count-1].style.top=`${r.position}px`;else{this._previousStateDisposables.clear();const o=Array(e.count);for(let s=e.count-1;s>=0;s--){const a=e.stickyNodes[s],{element:l,disposable:c}=this.createElement(a,s,e.count);o[s]=l,this._rootDomNode.appendChild(l),this._previousStateDisposables.add(c)}this.stickyScrollFocus.updateElements(o,e),this._previousElements=o}this._previousState=e,this._rootDomNode.style.height=`${r.position+r.height}px`}createElement(e,n,i){const r=e.startIndex,o=document.createElement("div");o.style.top=`${e.position}px`,this.tree.options.setRowHeight!==!1&&(o.style.height=`${e.height}px`),this.tree.options.setRowLineHeight!==!1&&(o.style.lineHeight=`${e.height}px`),o.classList.add("monaco-tree-sticky-row"),o.classList.add("monaco-list-row"),o.setAttribute("data-index",`${r}`),o.setAttribute("data-parity",r%2===0?"even":"odd"),o.setAttribute("id",this.view.getElementID(r));const s=this.setAccessibilityAttributes(o,e.node.element,n,i),a=this.treeDelegate.getTemplateId(e.node),l=this.treeRenderers.find(h=>h.templateId===a);if(!l)throw new Error(`No renderer found for template id ${a}`);let c=e.node;c===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(c=new Proxy(e.node,{}));const u=l.renderTemplate(o);l.renderElement(c,e.startIndex,u,e.height);const d=Kn(()=>{s.dispose(),l.disposeElement(c,e.startIndex,u,e.height),l.disposeTemplate(u),o.remove()});return{element:o,disposable:d}}setAccessibilityAttributes(e,n,i,r){if(!this.accessibilityProvider)return ct.None;this.accessibilityProvider.getSetSize&&e.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(n,i,r))),this.accessibilityProvider.getPosInSet&&e.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(n,i))),this.accessibilityProvider.getRole&&e.setAttribute("role",this.accessibilityProvider.getRole(n)??"treeitem");const o=this.accessibilityProvider.getAriaLabel(n),s=o&&typeof o!="string"?o:Gg(o),a=ki(c=>{const u=c.readObservable(s);u?e.setAttribute("aria-label",u):e.removeAttribute("aria-label")});typeof o=="string"||o&&e.setAttribute("aria-label",o.get());const l=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(n);return typeof l=="number"&&e.setAttribute("aria-level",`${l}`),e.setAttribute("aria-selected",String(!1)),a}setVisible(e){this._rootDomNode.classList.toggle("empty",!e),e||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}};class yDi extends ct{get domHasFocus(){return this._domHasFocus}set domHasFocus(e){e!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(e),this._domHasFocus=e)}constructor(e,n){super(),this.container=e,this.view=n,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=new st,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new st,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this._register(yt(this.container,"focus",()=>this.onFocus())),this._register(yt(this.container,"blur",()=>this.onBlur())),this._register(this.view.onDidFocus(()=>this.toggleStickyScrollFocused(!1))),this._register(this.view.onKeyDown(i=>this.onKeyDown(i))),this._register(this.view.onMouseDown(i=>this.onMouseDown(i))),this._register(this.view.onContextMenu(i=>this.handleContextMenu(i)))}handleContextMenu(e){const n=e.browserEvent.target;if(!aW(n)&&!uB(n)){this.focusedLast()&&this.view.domFocus();return}if(!U1(e.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");const s=this.state.stickyNodes.findIndex(a=>{var l;return a.node.element===((l=e.element)==null?void 0:l.element)});if(s===-1)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");this.container.focus(),this.setFocus(s);return}if(!this.state||this.focusedIndex<0)throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget");const r=this.state.stickyNodes[this.focusedIndex].node.element,o=this.elements[this.focusedIndex];this._onContextMenu.fire({element:r,anchor:o,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state){if(e.key==="ArrowUp")this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if(e.key==="ArrowDown"||e.key==="ArrowRight"){if(this.focusedIndex>=this.state.count-1){const n=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([n]),this.scrollNodeUnderWidget(n,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}}onMouseDown(e){const n=e.browserEvent.target;!aW(n)&&!uB(n)||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,n){if(n&&n.count===0)throw new Error("Sticky scroll state must be undefined when there are no sticky nodes");if(n&&n.count!==e.length)throw new Error("Sticky scroll focus received illigel state");const i=this.focusedIndex;if(this.removeFocus(),this.elements=e,this.state=n,n){const r=bh(i,0,n.count-1);this.setFocus(r)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=n?0:-1}setFocusedElement(e){const n=this.state;if(!n)throw new Error("Cannot set focus when state is undefined");if(this.setFocus(e),!(e<n.count-1)&&n.lastNodePartiallyVisible()){const i=n.stickyNodes[e];this.scrollNodeUnderWidget(i.endIndex+1,n)}}scrollNodeUnderWidget(e,n){const i=n.stickyNodes[n.count-1],r=n.count>1?n.stickyNodes[n.count-2]:void 0,o=this.view.getElementTop(e),s=r?r.position+r.height+i.height:i.height;this.view.scrollTop=o-s}domFocus(){if(!this.state)throw new Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return this.state?this.view.getHTMLElement().classList.contains("sticky-scroll-focused"):!1}removeFocus(){this.focusedIndex!==-1&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(e){if(0>e)throw new Error("addFocus() can not remove focus");if(!this.state&&e>=0)throw new Error("Cannot set focus index when state is undefined");if(this.state&&e>=this.state.count)throw new Error("Cannot set focus index to an index that does not exist");const n=this.focusedIndex;n>=0&&this.toggleElementFocus(this.elements[n],!1),e>=0&&this.toggleElementFocus(this.elements[e],!0),this.focusedIndex=e}toggleElementFocus(e,n){this.toggleElementActiveFocus(e,n&&this.domHasFocus),this.toggleElementPassiveFocus(e,n)}toggleCurrentElementActiveFocus(e){this.focusedIndex!==-1&&this.toggleElementActiveFocus(this.elements[this.focusedIndex],e)}toggleElementActiveFocus(e,n){e.classList.toggle("focused",n)}toggleElementPassiveFocus(e,n){e.classList.toggle("passive-focused",n)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||this.elements.length===0)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.toggleCurrentElementActiveFocus(!0),this.focusedIndex===-1&&this.setFocus(0)}onBlur(){this.domHasFocus=!1,this.toggleCurrentElementActiveFocus(!1)}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}}function VQ(t){let e=$T.Unknown;return Twe(t.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=$T.Twistie:Twe(t.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?e=$T.Element:Twe(t.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(e=$T.Filter),{browserEvent:t.browserEvent,element:t.element?t.element.element:null,target:e}}function _Di(t){const e=aW(t.browserEvent.target);return{element:t.element?t.element.element:null,browserEvent:t.browserEvent,anchor:t.anchor,isStickyScroll:e}}function bte(t,e){e(t),t.children.forEach(n=>bte(n,e))}class F1e{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,n){this.getFirstViewElementWithTrait=e,this.identityProvider=n,this.nodes=[],this._onDidChange=new st,this.onDidChange=this._onDidChange.event}set(e,n){!(n!=null&&n.__forceEvent)&&Xs(this.nodes,e)||this._set(e,!1,n)}_set(e,n,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!n){const r=this;this._onDidChange.fire({get elements(){return r.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:n}){if(!this.identityProvider){const l=this.createNodeSet(),c=u=>l.delete(u);n.forEach(u=>bte(u,c)),this.set([...l.values()]);return}const i=new Set,r=l=>i.add(this.identityProvider.getId(l.element).toString());n.forEach(l=>bte(l,r));const o=new Map,s=l=>o.set(this.identityProvider.getId(l.element).toString(),l);e.forEach(l=>bte(l,s));const a=[];for(const l of this.nodes){const c=this.identityProvider.getId(l.element).toString();if(!i.has(c))a.push(l);else{const d=o.get(c);d&&d.visible&&a.push(d)}}if(this.nodes.length>0&&a.length===0){const l=this.getFirstViewElementWithTrait();l&&a.push(l)}this._set(a,!0)}createNodeSet(){const e=new Set;for(const n of this.nodes)e.add(n);return e}}class xDi extends W5t{constructor(e,n,i){super(e),this.tree=n,this.stickyScrollProvider=i}onViewPointer(e){if(V5t(e.browserEvent.target)||yD(e.browserEvent.target)||n9(e.browserEvent.target)||e.browserEvent.isHandledByList)return;const n=e.element;if(!n)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,r=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,o=uB(e.browserEvent.target);let s=!1;if(o?s=!0:typeof this.tree.expandOnlyOnTwistieClick=="function"?s=this.tree.expandOnlyOnTwistieClick(n.element):s=!!this.tree.expandOnlyOnTwistieClick,o)this.handleStickyScrollMouseEvent(e,n);else{if(s&&!r&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e)}if(n.collapsible&&(!o||r)){const a=this.tree.getNodeLocation(n),l=e.browserEvent.altKey;if(this.tree.setFocus([a]),this.tree.toggleCollapsed(a,l),r){e.browserEvent.isHandledByList=!0;return}}o||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,n){if(RNi(e.browserEvent.target)||PNi(e.browserEvent.target))return;const i=this.stickyScrollProvider();if(!i)throw new Error("Sticky scroll controller not found");const r=this.list.indexOf(n),o=this.list.getElementTop(r),s=i.nodePositionTopBelowWidget(n);this.tree.scrollTop=o-s,this.list.domFocus(),this.list.setFocus([r]),this.list.setSelection([r])}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||e.browserEvent.isHandledByList||super.onDoubleClick(e)}onMouseDown(e){const n=e.browserEvent.target;if(!aW(n)&&!uB(n)){super.onMouseDown(e);return}}onContextMenu(e){const n=e.browserEvent.target;if(!aW(n)&&!uB(n)){super.onContextMenu(e);return}}}class wDi extends ng{constructor(e,n,i,r,o,s,a,l){super(e,n,i,r,l),this.focusTrait=o,this.selectionTrait=s,this.anchorTrait=a}createMouseController(e){return new xDi(this,e.tree,e.stickyScrollProvider)}splice(e,n,i=[]){if(super.splice(e,n,i),i.length===0)return;const r=[],o=[];let s;i.forEach((a,l)=>{this.focusTrait.has(a)&&r.push(e+l),this.selectionTrait.has(a)&&o.push(e+l),this.anchorTrait.has(a)&&(s=e+l)}),r.length>0&&super.setFocus(cS([...super.getFocus(),...r])),o.length>0&&super.setSelection(cS([...super.getSelection(),...o])),typeof s=="number"&&super.setAnchor(s)}setFocus(e,n,i=!1){super.setFocus(e,n),i||this.focusTrait.set(e.map(r=>this.element(r)),n)}setSelection(e,n,i=!1){super.setSelection(e,n),i||this.selectionTrait.set(e.map(r=>this.element(r)),n)}setAnchor(e,n=!1){super.setAnchor(e),n||(typeof e>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class cFt{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return rn.filter(rn.map(this.view.onMouseDblClick,VQ),e=>e.target!==$T.Filter)}get onMouseOver(){return rn.map(this.view.onMouseOver,VQ)}get onMouseOut(){return rn.map(this.view.onMouseOut,VQ)}get onContextMenu(){var e;return rn.any(rn.filter(rn.map(this.view.onContextMenu,_Di),n=>!n.isStickyScroll),((e=this.stickyScrollController)==null?void 0:e.onContextMenu)??rn.None)}get onPointer(){return rn.map(this.view.onPointer,VQ)}get onKeyDown(){return this.view.onKeyDown}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return rn.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e;return((e=this.findController)==null?void 0:e.mode)??dC.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){var e;return((e=this.findController)==null?void 0:e.matchType)??eA.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,n,i,r,o={}){this._user=e,this._options=o,this.eventBufferer=new fq,this.onDidChangeFindOpenState=rn.None,this.onDidChangeStickyScrollFocused=rn.None,this.disposables=new Lt,this._onWillRefilter=new st,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new st,this.treeDelegate=new b7e(i);const s=new Tot,a=new Tot,l=this.disposables.add(new hDi(a.event)),c=new V8e;this.renderers=r.map(m=>new $Ie(m,()=>this.model,s.event,l,c,o));for(const m of this.renderers)this.disposables.add(m);let u;o.keyboardNavigationLabelProvider&&(u=new fDi(this,o.keyboardNavigationLabelProvider,o.filter),o={...o,filter:u},this.disposables.add(u)),this.focus=new F1e(()=>this.view.getFocusedElements()[0],o.identityProvider),this.selection=new F1e(()=>this.view.getSelectedElements()[0],o.identityProvider),this.anchor=new F1e(()=>this.view.getAnchorElement(),o.identityProvider),this.view=new wDi(e,n,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...dDi(()=>this.model,o),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(e,this.view,o),s.input=this.model.onDidChangeCollapseState;const d=rn.forEach(this.model.onDidSplice,m=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(m),this.selection.onDidModelSplice(m)})},this.disposables);d(()=>null,null,this.disposables);const h=this.disposables.add(new st),f=this.disposables.add(new Lv(0));if(this.disposables.add(rn.any(d,this.focus.onDidChange,this.selection.onDidChange)(()=>{f.trigger(()=>{const m=new Set;for(const p of this.focus.getNodes())m.add(p);for(const p of this.selection.getNodes())m.add(p);h.fire([...m.values()])})})),a.input=h.event,o.keyboardSupport!==!1){const m=rn.chain(this.view.onKeyDown,p=>p.filter(g=>!yD(g.target)).map(g=>new as(g)));rn.chain(m,p=>p.filter(g=>g.keyCode===15))(this.onLeftArrow,this,this.disposables),rn.chain(m,p=>p.filter(g=>g.keyCode===17))(this.onRightArrow,this,this.disposables),rn.chain(m,p=>p.filter(g=>g.keyCode===10))(this.onSpace,this,this.disposables)}if((o.findWidgetEnabled??!0)&&o.keyboardNavigationLabelProvider&&o.contextViewProvider){const m=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new mDi(this,this.model,this.view,u,o.contextViewProvider,m),this.focusNavigationFilter=p=>this.findController.shouldAllowFocus(p),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=rn.None,this.onDidChangeFindMatchType=rn.None;o.enableStickyScroll&&(this.stickyScrollController=new uct(this,this.model,this.view,this.renderers,this.treeDelegate,o),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=Wp(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===x5.Always)}updateOptions(e={}){var n;this._options={...this._options,...e};for(const i of this.renderers)i.updateOptions(e);this.view.updateOptions(this._options),(n=this.findController)==null||n.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===x5.Always)}get options(){return this._options}updateStickyScroll(e){var n;!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new uct(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=rn.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),(n=this.stickyScrollController)==null||n.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(e){this.view.ariaLabel=e}domFocus(){var e;(e=this.stickyScrollController)!=null&&e.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}layout(e,n){var i;this.view.layout(e,n),ok(n)&&((i=this.findController)==null||i.layout(n))}style(e){const n=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${n}:hover .monaco-tl-indent > .indent-guide, .monaco-list${n}.always .monaco-tl-indent > .indent-guide  { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),i.push(`.monaco-list${n} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`));const r=e.treeStickyScrollBackground??e.listBackground;r&&(i.push(`.monaco-list${n} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${r}; }`),i.push(`.monaco-list${n} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${r}; }`)),e.treeStickyScrollBorder&&i.push(`.monaco-list${n} .monaco-scrollable-element .monaco-tree-sticky-container { border-bottom: 1px solid ${e.treeStickyScrollBorder}; }`),e.treeStickyScrollShadow&&i.push(`.monaco-list${n} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow { box-shadow: ${e.treeStickyScrollShadow} 0 6px 6px -6px inset; height: 3px; }`),e.listFocusForeground&&(i.push(`.monaco-list${n}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),i.push(`.monaco-list${n}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));const o=TC(e.listFocusAndSelectionOutline,TC(e.listSelectionOutline,e.listFocusOutline??""));o&&(i.push(`.monaco-list${n}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${o}; outline-offset: -1px;}`),i.push(`.monaco-list${n}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(i.push(`.monaco-list${n}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.monaco-list${n}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${n}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${n}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${n}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=i.join(`
`),this.view.style(e)}getParentElement(e){const n=this.model.getParentNodeLocation(e);return this.model.getNode(n).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,n=!1){return this.model.setCollapsed(e,!0,n)}expand(e,n=!1){return this.model.setCollapsed(e,!1,n)}toggleCollapsed(e,n=!1){return this.model.setCollapsed(e,void 0,n)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,n){return this.model.setCollapsible(e,n)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,n){this.eventBufferer.bufferEvents(()=>{const i=e.map(o=>this.model.getNode(o));this.selection.set(i,n);const r=e.map(o=>this.model.getListIndex(o)).filter(o=>o>-1);this.view.setSelection(r,n,!0)})}getSelection(){return this.selection.get()}setFocus(e,n){this.eventBufferer.bufferEvents(()=>{const i=e.map(o=>this.model.getNode(o));this.focus.set(i,n);const r=e.map(o=>this.model.getListIndex(o)).filter(o=>o>-1);this.view.setFocus(r,n,!0)})}focusNext(e=1,n=!1,i,r=U1(i)&&i.altKey?void 0:this.focusNavigationFilter){this.view.focusNext(e,n,i,r)}focusPrevious(e=1,n=!1,i,r=U1(i)&&i.altKey?void 0:this.focusNavigationFilter){this.view.focusPrevious(e,n,i,r)}focusNextPage(e,n=U1(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusNextPage(e,n)}focusPreviousPage(e,n=U1(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusPreviousPage(e,n,()=>{var i;return((i=this.stickyScrollController)==null?void 0:i.height)??0})}focusLast(e,n=U1(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusLast(e,n)}focusFirst(e,n=U1(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusFirst(e,n)}getFocus(){return this.focus.get()}reveal(e,n){this.model.expandTo(e);const i=this.model.getListIndex(e);if(i!==-1)if(!this.stickyScrollController)this.view.reveal(i,n);else{const r=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(i,n,r)}}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const n=this.view.getFocusedElements();if(n.length===0)return;const i=n[0],r=this.model.getNodeLocation(i);if(!this.model.setCollapsed(r,!0)){const s=this.model.getParentNodeLocation(r);if(!s)return;const a=this.model.getListIndex(s);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const n=this.view.getFocusedElements();if(n.length===0)return;const i=n[0],r=this.model.getNodeLocation(i);if(!this.model.setCollapsed(r,!1)){if(!i.children.some(l=>l.visible))return;const[s]=this.view.getFocus(),a=s+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();const n=this.view.getFocusedElements();if(n.length===0)return;const i=n[0],r=this.model.getNodeLocation(i),o=e.browserEvent.altKey;this.model.setCollapsed(r,void 0,o)}dispose(){var e;Jo(this.disposables),(e=this.stickyScrollController)==null||e.dispose(),this.view.dispose()}}class v7e{constructor(e,n,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new lDi(e,n,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare(r,o){return i.sorter.compare(r.element,o.element)}}),this.identityProvider=i.identityProvider}setChildren(e,n=Ir.empty(),i={}){const r=this.getElementLocation(e);this._setChildren(r,this.preserveCollapseState(n),i)}_setChildren(e,n=Ir.empty(),i){const r=new Set,o=new Set,s=l=>{var u;if(l.element===null)return;const c=l;if(r.add(c.element),this.nodes.set(c.element,c),this.identityProvider){const d=this.identityProvider.getId(c.element).toString();o.add(d),this.nodesByIdentity.set(d,c)}(u=i.onDidCreateNode)==null||u.call(i,c)},a=l=>{var u;if(l.element===null)return;const c=l;if(r.has(c.element)||this.nodes.delete(c.element),this.identityProvider){const d=this.identityProvider.getId(c.element).toString();o.has(d)||this.nodesByIdentity.delete(d)}(u=i.onDidDeleteNode)==null||u.call(i,c)};this.model.splice([...e,0],Number.MAX_VALUE,n,{...i,onDidCreateNode:s,onDidDeleteNode:a})}preserveCollapseState(e=Ir.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),Ir.map(e,n=>{let i=this.nodes.get(n.element);if(!i&&this.identityProvider){const s=this.identityProvider.getId(n.element).toString();i=this.nodesByIdentity.get(s)}if(!i){let s;return typeof n.collapsed>"u"?s=void 0:n.collapsed===ap.Collapsed||n.collapsed===ap.PreserveOrCollapsed?s=!0:n.collapsed===ap.Expanded||n.collapsed===ap.PreserveOrExpanded?s=!1:s=!!n.collapsed,{...n,children:this.preserveCollapseState(n.children),collapsed:s}}const r=typeof n.collapsible=="boolean"?n.collapsible:i.collapsible;let o;return typeof n.collapsed>"u"||n.collapsed===ap.PreserveOrCollapsed||n.collapsed===ap.PreserveOrExpanded?o=i.collapsed:n.collapsed===ap.Collapsed?o=!0:n.collapsed===ap.Expanded?o=!1:o=!!n.collapsed,{...n,collapsible:r,collapsed:o,children:this.preserveCollapseState(n.children)}})}rerender(e){const n=this.getElementLocation(e);this.model.rerender(n)}getFirstElementChild(e=null){const n=this.getElementLocation(e);return this.model.getFirstElementChild(n)}has(e){return this.nodes.has(e)}getListIndex(e){const n=this.getElementLocation(e);return this.model.getListIndex(n)}getListRenderCount(e){const n=this.getElementLocation(e);return this.model.getListRenderCount(n)}isCollapsible(e){const n=this.getElementLocation(e);return this.model.isCollapsible(n)}setCollapsible(e,n){const i=this.getElementLocation(e);return this.model.setCollapsible(i,n)}isCollapsed(e){const n=this.getElementLocation(e);return this.model.isCollapsed(n)}setCollapsed(e,n,i){const r=this.getElementLocation(e);return this.model.setCollapsed(r,n,i)}expandTo(e){const n=this.getElementLocation(e);this.model.expandTo(n)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);const n=this.nodes.get(e);if(!n)throw new bp(this.user,`Tree element not found: ${e}`);return n}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new bp(this.user,"Invalid getParentNodeLocation call");const n=this.nodes.get(e);if(!n)throw new bp(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(n),r=this.model.getParentNodeLocation(i);return this.model.getNode(r).element}getElementLocation(e){if(e===null)return[];const n=this.nodes.get(e);if(!n)throw new bp(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(n)}}function vte(t){const e=[t.element],n=t.incompressible||!1;return{element:{elements:e,incompressible:n},children:Ir.map(Ir.from(t.children),vte),collapsible:t.collapsible,collapsed:t.collapsed}}function yte(t){const e=[t.element],n=t.incompressible||!1;let i,r;for(;[r,i]=Ir.consume(Ir.from(t.children),2),!(r.length!==1||r[0].incompressible);)t=r[0],e.push(t.element);return{element:{elements:e,incompressible:n},children:Ir.map(Ir.concat(r,i),yte),collapsible:t.collapsible,collapsed:t.collapsed}}function VIe(t,e=0){let n;return e<t.element.elements.length-1?n=[VIe(t,e+1)]:n=Ir.map(Ir.from(t.children),i=>VIe(i,0)),e===0&&t.element.incompressible?{element:t.element.elements[e],children:n,incompressible:!0,collapsible:t.collapsible,collapsed:t.collapsed}:{element:t.element.elements[e],children:n,collapsible:t.collapsible,collapsed:t.collapsed}}function dct(t){return VIe(t,0)}function uFt(t,e,n){return t.element===e?{...t,children:n}:{...t,children:Ir.map(Ir.from(t.children),i=>uFt(i,e,n))}}const CDi=t=>({getId(e){return e.elements.map(n=>t.getId(n).toString()).join("\0")}});class SDi{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,n,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new v7e(e,n,i),this.enabled=typeof i.compressionEnabled>"u"?!0:i.compressionEnabled,this.identityProvider=i.identityProvider}setChildren(e,n=Ir.empty(),i){const r=i.diffIdentityProvider&&CDi(i.diffIdentityProvider);if(e===null){const m=Ir.map(n,this.enabled?yte:vte);this._setChildren(null,m,{diffIdentityProvider:r,diffDepth:1/0});return}const o=this.nodes.get(e);if(!o)throw new bp(this.user,"Unknown compressed tree node");const s=this.model.getNode(o),a=this.model.getParentNodeLocation(o),l=this.model.getNode(a),c=dct(s),u=uFt(c,e,n),d=(this.enabled?yte:vte)(u),h=i.diffIdentityProvider?(m,p)=>i.diffIdentityProvider.getId(m)===i.diffIdentityProvider.getId(p):void 0;if(Xs(d.element.elements,s.element.elements,h)){this._setChildren(o,d.children||Ir.empty(),{diffIdentityProvider:r,diffDepth:1});return}const f=l.children.map(m=>m===s?d:m);this._setChildren(l.element,f,{diffIdentityProvider:r,diffDepth:s.depth-l.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const i=this.model.getNode().children,r=Ir.map(i,dct),o=Ir.map(r,e?yte:vte);this._setChildren(null,o,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,n,i){const r=new Set,o=a=>{for(const l of a.element.elements)r.add(l),this.nodes.set(l,a.element)},s=a=>{for(const l of a.element.elements)r.has(l)||this.nodes.delete(l)};this.model.setChildren(e,n,{...i,onDidCreateNode:o,onDidDeleteNode:s})}has(e){return this.nodes.has(e)}getListIndex(e){const n=this.getCompressedNode(e);return this.model.getListIndex(n)}getListRenderCount(e){const n=this.getCompressedNode(e);return this.model.getListRenderCount(n)}getNode(e){if(typeof e>"u")return this.model.getNode();const n=this.getCompressedNode(e);return this.model.getNode(n)}getNodeLocation(e){const n=this.model.getNodeLocation(e);return n===null?null:n.elements[n.elements.length-1]}getParentNodeLocation(e){const n=this.getCompressedNode(e),i=this.model.getParentNodeLocation(n);return i===null?null:i.elements[i.elements.length-1]}getFirstElementChild(e){const n=this.getCompressedNode(e);return this.model.getFirstElementChild(n)}isCollapsible(e){const n=this.getCompressedNode(e);return this.model.isCollapsible(n)}setCollapsible(e,n){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,n)}isCollapsed(e){const n=this.getCompressedNode(e);return this.model.isCollapsed(n)}setCollapsed(e,n,i){const r=this.getCompressedNode(e);return this.model.setCollapsed(r,n,i)}expandTo(e){const n=this.getCompressedNode(e);this.model.expandTo(n)}rerender(e){const n=this.getCompressedNode(e);this.model.rerender(n)}refilter(){this.model.refilter()}getCompressedNode(e){if(e===null)return null;const n=this.nodes.get(e);if(!n)throw new bp(this.user,`Tree element not found: ${e}`);return n}}const NDi=t=>t[t.length-1];class y7e{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new y7e(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,n){this.unwrapper=e,this.node=n}}function EDi(t,e){return{splice(n,i,r){e.splice(n,i,r.map(o=>t.map(o)))},updateElementHeight(n,i){e.updateElementHeight(n,i)}}}function DDi(t,e){return{...e,identityProvider:e.identityProvider&&{getId(n){return e.identityProvider.getId(t(n))}},sorter:e.sorter&&{compare(n,i){return e.sorter.compare(n.elements[0],i.elements[0])}},filter:e.filter&&{filter(n,i){return e.filter.filter(t(n),i)}}}}class kDi{get onDidSplice(){return rn.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:n})=>({insertedNodes:e.map(i=>this.nodeMapper.map(i)),deletedNodes:n.map(i=>this.nodeMapper.map(i))}))}get onDidChangeCollapseState(){return rn.map(this.model.onDidChangeCollapseState,({node:e,deep:n})=>({node:this.nodeMapper.map(e),deep:n}))}get onDidChangeRenderNodeCount(){return rn.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}constructor(e,n,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||NDi;const r=o=>this.elementMapper(o.elements);this.nodeMapper=new p7e(o=>new y7e(r,o)),this.model=new SDi(e,EDi(this.nodeMapper,n),DDi(r,i))}setChildren(e,n=Ir.empty(),i={}){this.model.setChildren(e,n,i)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const n=this.model.getFirstElementChild(e);return n===null||typeof n>"u"?n:this.elementMapper(n.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,n){return this.model.setCollapsible(e,n)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,n,i){return this.model.setCollapsed(e,n,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var MDi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class _7e extends cFt{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,n,i,r,o={}){super(e,n,i,r,o),this.user=e}setChildren(e,n=Ir.empty(),i){this.model.setChildren(e,n,i)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}hasElement(e){return this.model.has(e)}createModel(e,n,i){return new v7e(e,n,i)}}class dFt{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,n,i){this._compressedTreeNodeProvider=e,this.stickyScrollDelegate=n,this.renderer=i,this.templateId=i.templateId,i.onDidChangeTwistieState&&(this.onDidChangeTwistieState=i.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,n,i,r){let o=this.stickyScrollDelegate.getCompressedNode(e);o||(o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element)),o.element.elements.length===1?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,n,i.data,r)):(i.compressedTreeNode=o,this.renderer.renderCompressedElements(o,n,i.data,r))}disposeElement(e,n,i,r){var o,s,a,l;i.compressedTreeNode?(s=(o=this.renderer).disposeCompressedElements)==null||s.call(o,i.compressedTreeNode,n,i.data,r):(l=(a=this.renderer).disposeElement)==null||l.call(a,e,n,i.data,r)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,n){return this.renderer.renderTwistie?this.renderer.renderTwistie(e,n):!1}}MDi([el],dFt.prototype,"compressedTreeNodeProvider",null);class LDi{constructor(e){this.modelProvider=e,this.compressedStickyNodes=new Map}getCompressedNode(e){return this.compressedStickyNodes.get(e)}constrainStickyScrollNodes(e,n,i){if(this.compressedStickyNodes.clear(),e.length===0)return[];for(let r=0;r<e.length;r++){const o=e[r],s=o.position+o.height;if(r+1<e.length&&s+e[r+1].height>i||r>=n-1&&n<e.length){const l=e.slice(0,r),c=e.slice(r),u=this.compressStickyNodes(c);return[...l,u]}}return e}compressStickyNodes(e){if(e.length===0)throw new Error("Can't compress empty sticky nodes");const n=this.modelProvider();if(!n.isCompressionEnabled())return e[0];const i=[];for(let c=0;c<e.length;c++){const u=e[c],d=n.getCompressedTreeNode(u.node.element);if(d.element){if(c!==0&&d.element.incompressible)break;i.push(...d.element.elements)}}if(i.length<2)return e[0];const r=e[e.length-1],o={elements:i,incompressible:!1},s={...r.node,children:[],element:o},a=new Proxy(e[0].node,{}),l={node:a,startIndex:e[0].startIndex,endIndex:r.endIndex,position:e[0].position,height:e[0].height};return this.compressedStickyNodes.set(a,s),l}}function TDi(t,e){return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(n){let i;try{i=t().getCompressedTreeNode(n)}catch{return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n)}return i.element.elements.length===1?e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n):e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.element.elements)}}}}class hFt extends _7e{constructor(e,n,i,r,o={}){const s=()=>this,a=new LDi(()=>this.model),l=r.map(c=>new dFt(s,a,c));super(e,n,i,l,{...TDi(s,o),stickyScrollDelegate:a})}setChildren(e,n=Ir.empty(),i){this.model.setChildren(e,n,i)}createModel(e,n,i){return new kDi(e,n,i)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled<"u"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}function $1e(t){return{...t,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function BIe(t,e){return e.parent?e.parent===t?!0:BIe(t,e.parent):!1}function IDi(t,e){return t===e||BIe(t,e)||BIe(e,t)}class x7e{get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new x7e(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class ADi{constructor(e,n,i){this.renderer=e,this.nodeMapper=n,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,n,i,r){this.renderer.renderElement(this.nodeMapper.map(e),n,i.templateData,r)}renderTwistie(e,n){return e.slow?(n.classList.add(...ci.asClassNameArray(qt.treeItemLoading)),!0):(n.classList.remove(...ci.asClassNameArray(qt.treeItemLoading)),!1)}disposeElement(e,n,i,r){var o,s;(s=(o=this.renderer).disposeElement)==null||s.call(o,this.nodeMapper.map(e),n,i.templateData,r)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function hct(t){return{browserEvent:t.browserEvent,elements:t.elements.map(e=>e.element)}}function fct(t){return{browserEvent:t.browserEvent,element:t.element&&t.element.element,target:t.target}}class RDi extends Rq{constructor(e){super(e.elements.map(n=>n.element)),this.data=e}}function V1e(t){return t instanceof Rq?new RDi(t):t}class PDi{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,n){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(i=>i.element),n)}onDragStart(e,n){var i,r;(r=(i=this.dnd).onDragStart)==null||r.call(i,V1e(e),n)}onDragOver(e,n,i,r,o,s=!0){return this.dnd.onDragOver(V1e(e),n&&n.element,i,r,o)}drop(e,n,i,r,o){this.dnd.drop(V1e(e),n&&n.element,i,r,o)}onDragEnd(e){var n,i;(i=(n=this.dnd).onDragEnd)==null||i.call(n,e)}dispose(){this.dnd.dispose()}}function fFt(t){return t&&{...t,collapseByDefault:!0,identityProvider:t.identityProvider&&{getId(e){return t.identityProvider.getId(e.element)}},dnd:t.dnd&&new PDi(t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return t.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element})},isSelectionRangeChangeEvent(e){return t.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})}},accessibilityProvider:t.accessibilityProvider&&{...t.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:t.accessibilityProvider.getRole?e=>t.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:t.accessibilityProvider.isChecked?e=>{var n;return!!((n=t.accessibilityProvider)!=null&&n.isChecked(e.element))}:void 0,getAriaLabel(e){return t.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return t.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:t.accessibilityProvider.getAriaLevel&&(e=>t.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(e=>t.accessibilityProvider.getActiveDescendantId(e.element))},filter:t.filter&&{filter(e,n){return t.filter.filter(e.element,n)}},keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{...t.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof t.expandOnlyOnTwistieClick>"u"?void 0:typeof t.expandOnlyOnTwistieClick!="function"?t.expandOnlyOnTwistieClick:e=>t.expandOnlyOnTwistieClick(e.element),defaultFindVisibility:e=>e.hasChildren&&e.stale?1:typeof t.defaultFindVisibility=="number"?t.defaultFindVisibility:typeof t.defaultFindVisibility>"u"?2:t.defaultFindVisibility(e.element)}}function zIe(t,e){e(t),t.children.forEach(n=>zIe(n,e))}class mFt{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return rn.map(this.tree.onDidChangeFocus,hct)}get onDidChangeSelection(){return rn.map(this.tree.onDidChangeSelection,hct)}get onMouseDblClick(){return rn.map(this.tree.onMouseDblClick,fct)}get onPointer(){return rn.map(this.tree.onPointer,fct)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(e,n,i,r,o,s={}){this.user=e,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new st,this._onDidChangeNodeSlowState=new st,this.nodeMapper=new p7e(a=>new x7e(a)),this.disposables=new Lt,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren=typeof s.autoExpandSingleChildren>"u"?!1:s.autoExpandSingleChildren,this.sorter=s.sorter,this.getDefaultCollapseState=a=>s.collapseByDefault?s.collapseByDefault(a)?ap.PreserveOrCollapsed:ap.PreserveOrExpanded:void 0,this.tree=this.createTree(e,n,i,r,s),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType,this.root=$1e({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,n,i,r,o){const s=new b7e(i),a=r.map(c=>new ADi(c,this.nodeMapper,this._onDidChangeNodeSlowState.event)),l=fFt(o)||{};return new _7e(e,n,s,a,l)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,n){this.tree.layout(e,n)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,n){this.refreshPromises.forEach(r=>r.cancel()),this.refreshPromises.clear(),this.root.element=e;const i=n&&{viewState:n,focus:[],selection:[]};await this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),n&&typeof n.scrollTop=="number"&&(this.scrollTop=n.scrollTop)}async _updateChildren(e=this.root.element,n=!0,i=!1,r,o){if(typeof this.root.element>"u")throw new bp(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await rn.toPromise(this._onDidRender.event));const s=this.getDataNode(e);if(await this.refreshAndRenderNode(s,n,r,o),i)try{this.tree.rerender(s)}catch{}}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}const n=this.getDataNode(e);this.tree.rerender(n)}getNode(e=this.root.element){const n=this.getDataNode(e),i=this.tree.getNode(n===this.root?null:n);return this.nodeMapper.map(i)}collapse(e,n=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,n)}async expand(e,n=!1){if(typeof this.root.element>"u")throw new bp(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await rn.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i)||(i.refreshPromise&&(await this.root.refreshPromise,await rn.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i)))return!1;const r=this.tree.expand(i===this.root?null:i,n);return i.refreshPromise&&(await this.root.refreshPromise,await rn.toPromise(this._onDidRender.event)),r}setSelection(e,n){const i=e.map(r=>this.getDataNode(r));this.tree.setSelection(i,n)}getSelection(){return this.tree.getSelection().map(n=>n.element)}setFocus(e,n){const i=e.map(r=>this.getDataNode(r));this.tree.setFocus(i,n)}getFocus(){return this.tree.getFocus().map(n=>n.element)}reveal(e,n){this.tree.reveal(this.getDataNode(e),n)}getParentElement(e){const n=this.tree.getParentElement(this.getDataNode(e));return n&&n.element}getFirstElementChild(e=this.root.element){const n=this.getDataNode(e),i=this.tree.getFirstElementChild(n===this.root?null:n);return i&&i.element}getDataNode(e){const n=this.nodes.get(e===this.root.element?null:e);if(!n)throw new bp(this.user,`Data tree node not found: ${e}`);return n}async refreshAndRenderNode(e,n,i,r){await this.refreshNode(e,n,i),!this.disposables.isDisposed&&this.render(e,i,r)}async refreshNode(e,n,i){let r;if(this.subTreeRefreshPromises.forEach((o,s)=>{!r&&IDi(s,e)&&(r=o.then(()=>this.refreshNode(e,n,i)))}),r)return r;if(e!==this.root&&this.tree.getNode(e).collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0,this.setChildren(e,[],n,i);return}return this.doRefreshSubTree(e,n,i)}async doRefreshSubTree(e,n,i){let r;e.refreshPromise=new Promise(o=>r=o),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{const o=await this.doRefreshNode(e,n,i);e.stale=!1,await xLe.settled(o.map(s=>this.doRefreshSubTree(s,n,i)))}finally{r()}}async doRefreshNode(e,n,i){e.hasChildren=!!this.dataSource.hasChildren(e.element);let r;if(!e.hasChildren)r=Promise.resolve(Ir.empty());else{const o=this.doGetChildren(e);if(Not(o))r=Promise.resolve(o);else{const s=uw(800);s.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},a=>null),r=o.finally(()=>s.cancel())}}try{const o=await r;return this.setChildren(e,o,n,i)}catch(o){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),yb(o))return[];throw o}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let n=this.refreshPromises.get(e);if(n)return n;const i=this.dataSource.getChildren(e.element);return Not(i)?this.processChildren(i):(n=cc(async()=>this.processChildren(await i)),this.refreshPromises.set(e,n),n.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:n}){e.element!==null&&!e.collapsed&&e.element.stale&&(n?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(ji))}setChildren(e,n,i,r){const o=[...n];if(e.children.length===0&&o.length===0)return[];const s=new Map,a=new Map;for(const u of e.children)s.set(u.element,u),this.identityProvider&&a.set(u.id,{node:u,collapsed:this.tree.hasElement(u)&&this.tree.isCollapsed(u)});const l=[],c=o.map(u=>{const d=!!this.dataSource.hasChildren(u);if(!this.identityProvider){const p=$1e({element:u,parent:e,hasChildren:d,defaultCollapseState:this.getDefaultCollapseState(u)});return d&&p.defaultCollapseState===ap.PreserveOrExpanded&&l.push(p),p}const h=this.identityProvider.getId(u).toString(),f=a.get(h);if(f){const p=f.node;return s.delete(p.element),this.nodes.delete(p.element),this.nodes.set(u,p),p.element=u,p.hasChildren=d,i?f.collapsed?(p.children.forEach(g=>zIe(g,y=>this.nodes.delete(y.element))),p.children.splice(0,p.children.length),p.stale=!0):l.push(p):d&&!f.collapsed&&l.push(p),p}const m=$1e({element:u,parent:e,id:h,hasChildren:d,defaultCollapseState:this.getDefaultCollapseState(u)});return r&&r.viewState.focus&&r.viewState.focus.indexOf(h)>-1&&r.focus.push(m),r&&r.viewState.selection&&r.viewState.selection.indexOf(h)>-1&&r.selection.push(m),(r&&r.viewState.expanded&&r.viewState.expanded.indexOf(h)>-1||d&&m.defaultCollapseState===ap.PreserveOrExpanded)&&l.push(m),m});for(const u of s.values())zIe(u,d=>this.nodes.delete(d.element));for(const u of c)this.nodes.set(u.element,u);return e.children.splice(0,e.children.length,...c),e!==this.root&&this.autoExpandSingleChildren&&c.length===1&&l.length===0&&(c[0].forceExpanded=!0,l.push(c[0])),l}render(e,n,i){const r=e.children.map(s=>this.asTreeElement(s,n)),o=i&&{...i,diffIdentityProvider:i.diffIdentityProvider&&{getId(s){return i.diffIdentityProvider.getId(s.element)}}};this.tree.setChildren(e===this.root?null:e,r,o),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,n){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return n&&n.viewState.expanded&&e.id&&n.viewState.expanded.indexOf(e.id)>-1?i=!1:e.forceExpanded?(i=!1,e.forceExpanded=!1):i=e.defaultCollapseState,{element:e,children:e.hasChildren?Ir.map(e.children,r=>this.asTreeElement(r,n)):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}}class w7e{get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new w7e(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class ODi{constructor(e,n,i,r){this.renderer=e,this.nodeMapper=n,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=r,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,n,i,r){this.renderer.renderElement(this.nodeMapper.map(e),n,i.templateData,r)}renderCompressedElements(e,n,i,r){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),n,i.templateData,r)}renderTwistie(e,n){return e.slow?(n.classList.add(...ci.asClassNameArray(qt.treeItemLoading)),!0):(n.classList.remove(...ci.asClassNameArray(qt.treeItemLoading)),!1)}disposeElement(e,n,i,r){var o,s;(s=(o=this.renderer).disposeElement)==null||s.call(o,this.nodeMapper.map(e),n,i.templateData,r)}disposeCompressedElements(e,n,i,r){var o,s;(s=(o=this.renderer).disposeCompressedElements)==null||s.call(o,this.compressibleNodeMapperProvider().map(e),n,i.templateData,r)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=Jo(this.disposables)}}function jDi(t){const e=t&&fFt(t);return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(n){return t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.map(i=>i.element))}}}}class FDi extends mFt{constructor(e,n,i,r,o,s,a={}){super(e,n,i,o,s,a),this.compressionDelegate=r,this.compressibleNodeMapper=new p7e(l=>new w7e(l)),this.filter=a.filter}createTree(e,n,i,r,o){const s=new b7e(i),a=r.map(c=>new ODi(c,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),l=jDi(o)||{};return new hFt(e,n,s,a,l)}asTreeElement(e,n){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,n)}}updateOptions(e={}){this.tree.updateOptions(e)}render(e,n,i){if(!this.identityProvider)return super.render(e,n);const r=f=>this.identityProvider.getId(f).toString(),o=f=>{const m=new Set;for(const p of f){const g=this.tree.getCompressedTreeNode(p===this.root?null:p);if(g.element)for(const y of g.element.elements)m.add(r(y.element))}return m},s=o(this.tree.getSelection()),a=o(this.tree.getFocus());super.render(e,n,i);const l=this.getSelection();let c=!1;const u=this.getFocus();let d=!1;const h=f=>{const m=f.element;if(m)for(let p=0;p<m.elements.length;p++){const g=r(m.elements[p].element),y=m.elements[m.elements.length-1].element;s.has(g)&&l.indexOf(y)===-1&&(l.push(y),c=!0),a.has(g)&&u.indexOf(y)===-1&&(u.push(y),d=!0)}f.children.forEach(h)};h(this.tree.getCompressedTreeNode(e===this.root?null:e)),c&&this.setSelection(l),d&&this.setFocus(u)}processChildren(e){return this.filter&&(e=Ir.filter(e,n=>{const i=this.filter.filter(n,1),r=$Di(i);if(r===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return r===1})),super.processChildren(e)}}function $Di(t){return typeof t=="boolean"?t?1:0:g7e(t)?cW(t.visibility):cW(t)}class VDi extends cFt{constructor(e,n,i,r,o,s={}){super(e,n,i,r,s),this.user=e,this.dataSource=o,this.identityProvider=s.identityProvider}createModel(e,n,i){return new v7e(e,n,i)}}new gn("isMac",xr,I("isMac","Whether the operating system is macOS"));new gn("isLinux",$h,I("isLinux","Whether the operating system is Linux"));const Sme=new gn("isWindows",Fu,I("isWindows","Whether the operating system is Windows")),pFt=new gn("isWeb",eM,I("isWeb","Whether the platform is a web browser"));new gn("isMacNative",xr&&!eM,I("isMacNative","Whether the operating system is macOS on a non-browser platform"));new gn("isIOS",W0,I("isIOS","Whether the operating system is iOS"));new gn("isMobile",jOt,I("isMobile","Whether the platform is a mobile web browser"));new gn("isDevelopment",!1,!0);new gn("productQualityType","",I("productQualityType","Quality type of VS Code"));const gFt="inputFocus",bFt=new gn(gFt,!1,I("inputFocus","Whether keyboard focus is inside an input box"));var qS=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Es=function(t,e){return function(n,i){e(n,i,t)}};const Cb=Sr("listService");class BDi{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new Lt,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){var n,i;e!==this._lastFocusedWidget&&((n=this._lastFocusedWidget)==null||n.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,(i=this._lastFocusedWidget)==null||i.getHTMLElement().classList.add("last-focused"))}register(e,n){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new U5t(Wp(),"").style(nR)),this.lists.some(r=>r.widget===e))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:n};return this.lists.push(i),Rfe(e.getHTMLElement())&&this.setLastFocusedList(e),yv(e.onDidFocus(()=>this.setLastFocusedList(e)),Kn(()=>this.lists.splice(this.lists.indexOf(i),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(r=>r!==i),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}}const uW=new gn("listScrollAtBoundary","none");Tt.or(uW.isEqualTo("top"),uW.isEqualTo("both"));Tt.or(uW.isEqualTo("bottom"),uW.isEqualTo("both"));const vFt=new gn("listFocus",!0),yFt=new gn("treestickyScrollFocused",!1),Nme=new gn("listSupportsMultiselect",!0),_Ft=Tt.and(vFt,Tt.not(gFt),yFt.negate()),C7e=new gn("listHasSelectionOrFocus",!1),S7e=new gn("listDoubleSelection",!1),N7e=new gn("listMultiSelection",!1),Eme=new gn("listSelectionNavigation",!1),zDi=new gn("listSupportsFind",!0),E7e=new gn("treeElementCanCollapse",!1),HDi=new gn("treeElementHasParent",!1),D7e=new gn("treeElementCanExpand",!1),WDi=new gn("treeElementHasChild",!1),UDi=new gn("treeFindOpen",!1),xFt="listTypeNavigationMode",wFt="listAutomaticKeyboardNavigation";function Dme(t,e){const n=t.createScoped(e.getHTMLElement());return vFt.bindTo(n),n}function kme(t,e){const n=uW.bindTo(t),i=()=>{const r=e.scrollTop===0,o=e.scrollHeight-e.renderHeight-e.scrollTop<1;r&&o?n.set("both"):r?n.set("top"):o?n.set("bottom"):n.set("none")};return i(),e.onDidScroll(i)}const oR="workbench.list.multiSelectModifier",_te="workbench.list.openMode",tb="workbench.list.horizontalScrolling",k7e="workbench.list.defaultFindMode",M7e="workbench.list.typeNavigationMode",ooe="workbench.list.keyboardNavigation",Z0="workbench.list.scrollByPage",L7e="workbench.list.defaultFindMatchType",dW="workbench.tree.indent",soe="workbench.tree.renderIndentGuides",Q0="workbench.list.smoothScrolling",gw="workbench.list.mouseWheelScrollSensitivity",bw="workbench.list.fastScrollSensitivity",aoe="workbench.tree.expandMode",loe="workbench.tree.enableStickyScroll",coe="workbench.tree.stickyScrollMaxItemCount";function vw(t){return t.getValue(oR)==="alt"}class KDi extends ct{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=vw(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(oR)&&(this.useAltAsMultipleSelectionModifier=vw(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:z5t(e)}isSelectionRangeChangeEvent(e){return H5t(e)}}function Mme(t,e){const n=t.get(cr),i=t.get(vo),r=new Lt;return[{...e,keyboardNavigationDelegate:{mightProducePrintableCharacter(s){return i.mightProducePrintableCharacter(s)}},smoothScrolling:!!n.getValue(Q0),mouseWheelScrollSensitivity:n.getValue(gw),fastScrollSensitivity:n.getValue(bw),multipleSelectionController:e.multipleSelectionController??r.add(new KDi(n)),keyboardNavigationEventFilter:YDi(i),scrollByPage:!!n.getValue(Z0)},r]}let mct=class extends ng{constructor(e,n,i,r,o,s,a,l,c){const u=typeof o.horizontalScrolling<"u"?o.horizontalScrolling:!!l.getValue(tb),[d,h]=c.invokeFunction(Mme,o);super(e,n,i,r,{keyboardSupport:!1,...d,horizontalScrolling:u}),this.disposables.add(h),this.contextKeyService=Dme(s,this),this.disposables.add(kme(this.contextKeyService,this)),this.listSupportsMultiSelect=Nme.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(o.multipleSelectionSupport!==!1),Eme.bindTo(this.contextKeyService).set(!!o.selectionNavigation),this.listHasSelectionOrFocus=C7e.bindTo(this.contextKeyService),this.listDoubleSelection=S7e.bindTo(this.contextKeyService),this.listMultiSelection=N7e.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=vw(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const m=this.getSelection(),p=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(m.length>0||p.length>0),this.listMultiSelection.set(m.length>1),this.listDoubleSelection.set(m.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const m=this.getSelection(),p=this.getFocus();this.listHasSelectionOrFocus.set(m.length>0||p.length>0)})),this.disposables.add(l.onDidChangeConfiguration(m=>{m.affectsConfiguration(oR)&&(this._useAltAsMultipleSelectionModifier=vw(l));let p={};if(m.affectsConfiguration(tb)&&this.horizontalScrolling===void 0){const g=!!l.getValue(tb);p={...p,horizontalScrolling:g}}if(m.affectsConfiguration(Z0)){const g=!!l.getValue(Z0);p={...p,scrollByPage:g}}if(m.affectsConfiguration(Q0)){const g=!!l.getValue(Q0);p={...p,smoothScrolling:g}}if(m.affectsConfiguration(gw)){const g=l.getValue(gw);p={...p,mouseWheelScrollSensitivity:g}}if(m.affectsConfiguration(bw)){const g=l.getValue(bw);p={...p,fastScrollSensitivity:g}}Object.keys(p).length>0&&this.updateOptions(p)})),this.navigator=new CFt(this,{configurationService:l,...o}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?iR(e):nR)}};mct=qS([Es(5,vi),Es(6,Cb),Es(7,cr),Es(8,qn)],mct);let pct=class extends ZEi{constructor(e,n,i,r,o,s,a,l,c){const u=typeof o.horizontalScrolling<"u"?o.horizontalScrolling:!!l.getValue(tb),[d,h]=c.invokeFunction(Mme,o);super(e,n,i,r,{keyboardSupport:!1,...d,horizontalScrolling:u}),this.disposables=new Lt,this.disposables.add(h),this.contextKeyService=Dme(s,this),this.disposables.add(kme(this.contextKeyService,this.widget)),this.horizontalScrolling=o.horizontalScrolling,this.listSupportsMultiSelect=Nme.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(o.multipleSelectionSupport!==!1),Eme.bindTo(this.contextKeyService).set(!!o.selectionNavigation),this._useAltAsMultipleSelectionModifier=vw(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(l.onDidChangeConfiguration(m=>{m.affectsConfiguration(oR)&&(this._useAltAsMultipleSelectionModifier=vw(l));let p={};if(m.affectsConfiguration(tb)&&this.horizontalScrolling===void 0){const g=!!l.getValue(tb);p={...p,horizontalScrolling:g}}if(m.affectsConfiguration(Z0)){const g=!!l.getValue(Z0);p={...p,scrollByPage:g}}if(m.affectsConfiguration(Q0)){const g=!!l.getValue(Q0);p={...p,smoothScrolling:g}}if(m.affectsConfiguration(gw)){const g=l.getValue(gw);p={...p,mouseWheelScrollSensitivity:g}}if(m.affectsConfiguration(bw)){const g=l.getValue(bw);p={...p,fastScrollSensitivity:g}}Object.keys(p).length>0&&this.updateOptions(p)})),this.navigator=new CFt(this,{configurationService:l,...o}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?iR(e):nR)}dispose(){this.disposables.dispose(),super.dispose()}};pct=qS([Es(5,vi),Es(6,Cb),Es(7,cr),Es(8,qn)],pct);let gct=class extends FIe{constructor(e,n,i,r,o,s,a,l,c,u){const d=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:!!c.getValue(tb),[h,f]=u.invokeFunction(Mme,s);super(e,n,i,r,o,{keyboardSupport:!1,...h,horizontalScrolling:d}),this.disposables.add(f),this.contextKeyService=Dme(a,this),this.disposables.add(kme(this.contextKeyService,this)),this.listSupportsMultiSelect=Nme.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),Eme.bindTo(this.contextKeyService).set(!!s.selectionNavigation),this.listHasSelectionOrFocus=C7e.bindTo(this.contextKeyService),this.listDoubleSelection=S7e.bindTo(this.contextKeyService),this.listMultiSelection=N7e.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=vw(c),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const p=this.getSelection(),g=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(p.length>0||g.length>0),this.listMultiSelection.set(p.length>1),this.listDoubleSelection.set(p.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const p=this.getSelection(),g=this.getFocus();this.listHasSelectionOrFocus.set(p.length>0||g.length>0)})),this.disposables.add(c.onDidChangeConfiguration(p=>{p.affectsConfiguration(oR)&&(this._useAltAsMultipleSelectionModifier=vw(c));let g={};if(p.affectsConfiguration(tb)&&this.horizontalScrolling===void 0){const y=!!c.getValue(tb);g={...g,horizontalScrolling:y}}if(p.affectsConfiguration(Z0)){const y=!!c.getValue(Z0);g={...g,scrollByPage:y}}if(p.affectsConfiguration(Q0)){const y=!!c.getValue(Q0);g={...g,smoothScrolling:y}}if(p.affectsConfiguration(gw)){const y=c.getValue(gw);g={...g,mouseWheelScrollSensitivity:y}}if(p.affectsConfiguration(bw)){const y=c.getValue(bw);g={...g,fastScrollSensitivity:y}}Object.keys(g).length>0&&this.updateOptions(g)})),this.navigator=new qDi(this,{configurationService:c,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?iR(e):nR)}dispose(){this.disposables.dispose(),super.dispose()}};gct=qS([Es(6,vi),Es(7,Cb),Es(8,cr),Es(9,qn)],gct);class T7e extends ct{constructor(e,n){super(),this.widget=e,this._onDidOpen=this._register(new st),this.onDidOpen=this._onDidOpen.event,this._register(rn.filter(this.widget.onDidChangeSelection,i=>U1(i.browserEvent))(i=>this.onSelectionFromKeyboard(i))),this._register(this.widget.onPointer(i=>this.onPointer(i.element,i.browserEvent))),this._register(this.widget.onMouseDblClick(i=>this.onMouseDblClick(i.element,i.browserEvent))),typeof(n==null?void 0:n.openOnSingleClick)!="boolean"&&(n!=null&&n.configurationService)?(this.openOnSingleClick=(n==null?void 0:n.configurationService.getValue(_te))!=="doubleClick",this._register(n==null?void 0:n.configurationService.onDidChangeConfiguration(i=>{i.affectsConfiguration(_te)&&(this.openOnSingleClick=(n==null?void 0:n.configurationService.getValue(_te))!=="doubleClick")}))):this.openOnSingleClick=(n==null?void 0:n.openOnSingleClick)??!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;const n=e.browserEvent,i=typeof n.preserveFocus=="boolean"?n.preserveFocus:!0,r=typeof n.pinned=="boolean"?n.pinned:!i;this._open(this.getSelectedElement(),i,r,!1,e.browserEvent)}onPointer(e,n){if(!this.openOnSingleClick||n.detail===2)return;const r=n.button===1,o=!0,s=r,a=n.ctrlKey||n.metaKey||n.altKey;this._open(e,o,s,a,n)}onMouseDblClick(e,n){if(!n)return;const i=n.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&n.offsetX<16)return;const o=!1,s=!0,a=n.ctrlKey||n.metaKey||n.altKey;this._open(e,o,s,a,n)}_open(e,n,i,r,o){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:n,pinned:i,revealIfVisible:!0},sideBySide:r,element:e,browserEvent:o})}}class CFt extends T7e{constructor(e,n){super(e,n),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class qDi extends T7e{constructor(e,n){super(e,n)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class GDi extends T7e{constructor(e,n){super(e,n)}getSelectedElement(){return this.widget.getSelection()[0]??void 0}}function YDi(t){let e=!1;return n=>{if(n.toKeyCodeChord().isModifierKey())return!1;if(e)return e=!1,!1;const i=t.softDispatch(n,n.target);return i.kind===1?(e=!0,!1):(e=!1,i.kind===0)}}let HIe=class extends _7e{constructor(e,n,i,r,o,s,a,l,c){const{options:u,getTypeNavigationMode:d,disposable:h}=s.invokeFunction(Vq,o);super(e,n,i,r,u),this.disposables.add(h),this.internals=new tA(this,o,d,o.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};HIe=qS([Es(5,qn),Es(6,vi),Es(7,Cb),Es(8,cr)],HIe);let bct=class extends hFt{constructor(e,n,i,r,o,s,a,l,c){const{options:u,getTypeNavigationMode:d,disposable:h}=s.invokeFunction(Vq,o);super(e,n,i,r,u),this.disposables.add(h),this.internals=new tA(this,o,d,o.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};bct=qS([Es(5,qn),Es(6,vi),Es(7,Cb),Es(8,cr)],bct);let vct=class extends VDi{constructor(e,n,i,r,o,s,a,l,c,u){const{options:d,getTypeNavigationMode:h,disposable:f}=a.invokeFunction(Vq,s);super(e,n,i,r,o,d),this.disposables.add(f),this.internals=new tA(this,s,h,s.overrideStyles,l,c,u),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles!==void 0&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};vct=qS([Es(6,qn),Es(7,vi),Es(8,Cb),Es(9,cr)],vct);let WIe=class extends mFt{get onDidOpen(){return this.internals.onDidOpen}constructor(e,n,i,r,o,s,a,l,c,u){const{options:d,getTypeNavigationMode:h,disposable:f}=a.invokeFunction(Vq,s);super(e,n,i,r,o,d),this.disposables.add(f),this.internals=new tA(this,s,h,s.overrideStyles,l,c,u),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};WIe=qS([Es(6,qn),Es(7,vi),Es(8,Cb),Es(9,cr)],WIe);let yct=class extends FDi{constructor(e,n,i,r,o,s,a,l,c,u,d){const{options:h,getTypeNavigationMode:f,disposable:m}=l.invokeFunction(Vq,a);super(e,n,i,r,o,s,h),this.disposables.add(m),this.internals=new tA(this,a,f,a.overrideStyles,c,u,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};yct=qS([Es(7,qn),Es(8,vi),Es(9,Cb),Es(10,cr)],yct);function SFt(t){const e=t.getValue(k7e);if(e==="highlight")return dC.Highlight;if(e==="filter")return dC.Filter;const n=t.getValue(ooe);if(n==="simple"||n==="highlight")return dC.Highlight;if(n==="filter")return dC.Filter}function NFt(t){const e=t.getValue(L7e);if(e==="fuzzy")return eA.Fuzzy;if(e==="contiguous")return eA.Contiguous}function Vq(t,e){const n=t.get(cr),i=t.get(US),r=t.get(vi),o=t.get(qn),s=()=>{const h=r.getContextKeyValue(xFt);if(h==="automatic")return Cx.Automatic;if(h==="trigger"||r.getContextKeyValue(wFt)===!1)return Cx.Trigger;const m=n.getValue(M7e);if(m==="automatic")return Cx.Automatic;if(m==="trigger")return Cx.Trigger},a=e.horizontalScrolling!==void 0?e.horizontalScrolling:!!n.getValue(tb),[l,c]=o.invokeFunction(Mme,e),u=e.paddingBottom,d=e.renderIndentGuides!==void 0?e.renderIndentGuides:n.getValue(soe);return{getTypeNavigationMode:s,disposable:c,options:{keyboardSupport:!1,...l,indent:typeof n.getValue(dW)=="number"?n.getValue(dW):void 0,renderIndentGuides:d,smoothScrolling:!!n.getValue(Q0),defaultFindMode:SFt(n),defaultFindMatchType:NFt(n),horizontalScrolling:a,scrollByPage:!!n.getValue(Z0),paddingBottom:u,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:e.expandOnlyOnTwistieClick??n.getValue(aoe)==="doubleClick",contextViewProvider:i,findWidgetStyles:aEi,enableStickyScroll:!!n.getValue(loe),stickyScrollMaxItemCount:Number(n.getValue(coe))}}}let tA=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,n,i,r,o,s,a){this.tree=e,this.disposables=[],this.contextKeyService=Dme(o,e),this.disposables.push(kme(this.contextKeyService,e)),this.listSupportsMultiSelect=Nme.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(n.multipleSelectionSupport!==!1),Eme.bindTo(this.contextKeyService).set(!!n.selectionNavigation),this.listSupportFindWidget=zDi.bindTo(this.contextKeyService),this.listSupportFindWidget.set(n.findWidgetEnabled??!0),this.hasSelectionOrFocus=C7e.bindTo(this.contextKeyService),this.hasDoubleSelection=S7e.bindTo(this.contextKeyService),this.hasMultiSelection=N7e.bindTo(this.contextKeyService),this.treeElementCanCollapse=E7e.bindTo(this.contextKeyService),this.treeElementHasParent=HDi.bindTo(this.contextKeyService),this.treeElementCanExpand=D7e.bindTo(this.contextKeyService),this.treeElementHasChild=WDi.bindTo(this.contextKeyService),this.treeFindOpen=UDi.bindTo(this.contextKeyService),this.treeStickyScrollFocused=yFt.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=vw(a),this.updateStyleOverrides(r);const c=()=>{const d=e.getFocus()[0];if(!d)return;const h=e.getNode(d);this.treeElementCanCollapse.set(h.collapsible&&!h.collapsed),this.treeElementHasParent.set(!!e.getParentElement(d)),this.treeElementCanExpand.set(h.collapsible&&h.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(d))},u=new Set;u.add(xFt),u.add(wFt),this.disposables.push(this.contextKeyService,s.register(e),e.onDidChangeSelection(()=>{const d=e.getSelection(),h=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(d.length>0||h.length>0),this.hasMultiSelection.set(d.length>1),this.hasDoubleSelection.set(d.length===2)})}),e.onDidChangeFocus(()=>{const d=e.getSelection(),h=e.getFocus();this.hasSelectionOrFocus.set(d.length>0||h.length>0),c()}),e.onDidChangeCollapseState(c),e.onDidChangeModel(c),e.onDidChangeFindOpenState(d=>this.treeFindOpen.set(d)),e.onDidChangeStickyScrollFocused(d=>this.treeStickyScrollFocused.set(d)),a.onDidChangeConfiguration(d=>{let h={};if(d.affectsConfiguration(oR)&&(this._useAltAsMultipleSelectionModifier=vw(a)),d.affectsConfiguration(dW)){const f=a.getValue(dW);h={...h,indent:f}}if(d.affectsConfiguration(soe)&&n.renderIndentGuides===void 0){const f=a.getValue(soe);h={...h,renderIndentGuides:f}}if(d.affectsConfiguration(Q0)){const f=!!a.getValue(Q0);h={...h,smoothScrolling:f}}if(d.affectsConfiguration(k7e)||d.affectsConfiguration(ooe)){const f=SFt(a);h={...h,defaultFindMode:f}}if(d.affectsConfiguration(M7e)||d.affectsConfiguration(ooe)){const f=i();h={...h,typeNavigationMode:f}}if(d.affectsConfiguration(L7e)){const f=NFt(a);h={...h,defaultFindMatchType:f}}if(d.affectsConfiguration(tb)&&n.horizontalScrolling===void 0){const f=!!a.getValue(tb);h={...h,horizontalScrolling:f}}if(d.affectsConfiguration(Z0)){const f=!!a.getValue(Z0);h={...h,scrollByPage:f}}if(d.affectsConfiguration(aoe)&&n.expandOnlyOnTwistieClick===void 0&&(h={...h,expandOnlyOnTwistieClick:a.getValue(aoe)==="doubleClick"}),d.affectsConfiguration(loe)){const f=a.getValue(loe);h={...h,enableStickyScroll:f}}if(d.affectsConfiguration(coe)){const f=Math.max(1,a.getValue(coe));h={...h,stickyScrollMaxItemCount:f}}if(d.affectsConfiguration(gw)){const f=a.getValue(gw);h={...h,mouseWheelScrollSensitivity:f}}if(d.affectsConfiguration(bw)){const f=a.getValue(bw);h={...h,fastScrollSensitivity:f}}Object.keys(h).length>0&&e.updateOptions(h)}),this.contextKeyService.onDidChangeContext(d=>{d.affectsSome(u)&&e.updateOptions({typeNavigationMode:i()})})),this.navigator=new GDi(e,{configurationService:a,...n}),this.disposables.push(this.navigator)}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?iR(e):nR)}dispose(){this.disposables=Jo(this.disposables)}};tA=qS([Es(4,vi),Es(5,Cb),Es(6,cr)],tA);const XDi=la.as(Yv.Configuration);XDi.registerConfiguration({id:"workbench",order:7,title:I("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[oR]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[I("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),I("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:I({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[_te]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:I({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[tb]:{type:"boolean",default:!1,description:I("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[Z0]:{type:"boolean",default:!1,description:I("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[dW]:{type:"number",default:8,minimum:4,maximum:40,description:I("tree indent setting","Controls tree indentation in pixels.")},[soe]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:I("render tree indent guides","Controls whether the tree should render indent guides.")},[Q0]:{type:"boolean",default:!1,description:I("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[gw]:{type:"number",default:1,markdownDescription:I("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[bw]:{type:"number",default:5,markdownDescription:I("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[k7e]:{type:"string",enum:["highlight","filter"],enumDescriptions:[I("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),I("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:I("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[ooe]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[I("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),I("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),I("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:I("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:I("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and	'workbench.list.typeNavigationMode' instead.")},[L7e]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[I("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),I("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:I("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[aoe]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:I("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[loe]:{type:"boolean",default:!0,description:I("sticky scroll","Controls whether sticky scrolling is enabled in trees.")},[coe]:{type:"number",minimum:1,default:7,markdownDescription:I("sticky scroll maximum items","Controls the number of sticky elements displayed in the tree when {0} is enabled.","`#workbench.tree.enableStickyScroll#`")},[M7e]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:I("typeNavigationMode2","Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}});class _D extends ct{constructor(e,n){super(),this.options=n,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=(n==null?void 0:n.supportIcons)??!1,this.domNode=jt(e,Xt("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,n=[],i="",r){e||(e=""),r&&(e=_D.escapeNewLines(e,n)),!(this.didEverRender&&this.text===e&&this.title===i&&Lp(this.highlights,n))&&(this.text=e,this.title=i,this.highlights=n,this.render())}render(){var i,r,o;const e=[];let n=0;for(const s of this.highlights){if(s.end===s.start)continue;if(n<s.start){const c=this.text.substring(n,s.start);this.supportIcons?e.push(...bD(c)):e.push(c),n=s.start}const a=this.text.substring(n,s.end),l=Xt("span.highlight",void 0,...this.supportIcons?bD(a):[a]);s.extraClasses&&l.classList.add(...s.extraClasses),e.push(l),n=s.end}if(n<this.text.length){const s=this.text.substring(n);this.supportIcons?e.push(...bD(s)):e.push(s)}if(ou(this.domNode,...e),(r=(i=this.options)==null?void 0:i.hoverDelegate)!=null&&r.showNativeHover)this.domNode.title=this.title;else if(!this.customHover&&this.title!==""){const s=((o=this.options)==null?void 0:o.hoverDelegate)??Yh("mouse");this.customHover=this._register(d_().setupManagedHover(s,this.domNode,this.title))}else this.customHover&&this.customHover.update(this.title);this.didEverRender=!0}static escapeNewLines(e,n){let i=0,r=0;return e.replace(/\r\n|\r|\n/g,(o,s)=>{r=o===`\r
`?-1:0,s+=i;for(const a of n)a.end<=s||(a.start>=s&&(a.start+=r),a.end>=s&&(a.end+=r));return i+=r,"⏎"})}}class t7{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class uoe extends ct{constructor(e,n){super(),this.customHovers=new Map,this.creationOptions=n,this.domNode=this._register(new t7(jt(e,Xt(".monaco-icon-label")))),this.labelContainer=jt(this.domNode.element,Xt(".monaco-icon-label-container")),this.nameContainer=jt(this.labelContainer,Xt("span.monaco-icon-name-container")),n!=null&&n.supportHighlights||n!=null&&n.supportIcons?this.nameNode=this._register(new JDi(this.nameContainer,!!n.supportIcons)):this.nameNode=new ZDi(this.nameContainer),this.hoverDelegate=(n==null?void 0:n.hoverDelegate)??Yh("mouse")}get element(){return this.domNode.element}setLabel(e,n,i){const r=["monaco-icon-label"],o=["monaco-icon-label-container"];let s="";i&&(i.extraClasses&&r.push(...i.extraClasses),i.italic&&r.push("italic"),i.strikethrough&&r.push("strikethrough"),i.disabledCommand&&o.push("disabled"),i.title&&(typeof i.title=="string"?s+=i.title:s+=e));const a=this.domNode.element.querySelector(".monaco-icon-label-iconpath");if(i!=null&&i.iconPath){let l;!a||!uc(a)?(l=Xt(".monaco-icon-label-iconpath"),this.domNode.element.prepend(l)):l=a,l.style.backgroundImage=fS(i==null?void 0:i.iconPath)}else a&&a.remove();if(this.domNode.className=r.join(" "),this.domNode.element.setAttribute("aria-label",s),this.labelContainer.className=o.join(" "),this.setupHover(i!=null&&i.descriptionTitle?this.labelContainer:this.element,i==null?void 0:i.title),this.nameNode.setLabel(e,i),n||this.descriptionNode){const l=this.getOrCreateDescriptionNode();l instanceof _D?(l.set(n||"",i?i.descriptionMatches:void 0,void 0,i==null?void 0:i.labelEscapeNewLines),this.setupHover(l.element,i==null?void 0:i.descriptionTitle)):(l.textContent=n&&(i!=null&&i.labelEscapeNewLines)?_D.escapeNewLines(n,[]):n||"",this.setupHover(l.element,(i==null?void 0:i.descriptionTitle)||""),l.empty=!n)}if(i!=null&&i.suffix||this.suffixNode){const l=this.getOrCreateSuffixNode();l.textContent=(i==null?void 0:i.suffix)??""}}setupHover(e,n){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),!n){e.removeAttribute("title");return}if(this.hoverDelegate.showNativeHover)(function(o,s){Cf(s)?o.title=i7e(s):s!=null&&s.markdownNotSupportedFallback?o.title=s.markdownNotSupportedFallback:o.removeAttribute("title")})(e,n);else{const r=d_().setupManagedHover(this.hoverDelegate,e,n);r&&this.customHovers.set(e,r)}}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){const e=this._register(new t7(pfi(this.nameContainer,Xt("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new t7(jt(e.element,Xt("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){var e;if(!this.descriptionNode){const n=this._register(new t7(jt(this.labelContainer,Xt("span.monaco-icon-description-container"))));(e=this.creationOptions)!=null&&e.supportDescriptionHighlights?this.descriptionNode=this._register(new _D(jt(n.element,Xt("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons})):this.descriptionNode=this._register(new t7(jt(n.element,Xt("span.label-description"))))}return this.descriptionNode}}let ZDi=class{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,n){if(!(this.label===e&&Lp(this.options,n)))if(this.label=e,this.options=n,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=jt(this.container,Xt("a.label-name",{id:n==null?void 0:n.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i<e.length;i++){const r=e[i],o=(n==null?void 0:n.domId)&&`${n==null?void 0:n.domId}_${i}`;jt(this.container,Xt("a.label-name",{id:o,"data-icon-label-count":e.length,"data-icon-label-index":i,role:"treeitem"},r)),i<e.length-1&&jt(this.container,Xt("span.label-separator",void 0,(n==null?void 0:n.separator)||"/"))}}}};function QDi(t,e,n){if(!n)return;let i=0;return t.map(r=>{const o={start:i,end:i+r.length},s=n.map(a=>ed.intersect(o,a)).filter(a=>!ed.isEmpty(a)).map(({start:a,end:l})=>({start:a-i,end:l-i}));return i=o.end+e.length,s})}class JDi extends ct{constructor(e,n){super(),this.container=e,this.supportIcons=n,this.label=void 0,this.singleLabel=void 0}setLabel(e,n){if(!(this.label===e&&Lp(this.options,n)))if(this.label=e,this.options=n,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=this._register(new _D(jt(this.container,Xt("a.label-name",{id:n==null?void 0:n.domId})),{supportIcons:this.supportIcons}))),this.singleLabel.set(e,n==null?void 0:n.matches,void 0,n==null?void 0:n.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=(n==null?void 0:n.separator)||"/",r=QDi(e,i,n==null?void 0:n.matches);for(let o=0;o<e.length;o++){const s=e[o],a=r?r[o]:void 0,l=(n==null?void 0:n.domId)&&`${n==null?void 0:n.domId}_${o}`,c=Xt("a.label-name",{id:l,"data-icon-label-count":e.length,"data-icon-label-index":o,role:"treeitem"});this._register(new _D(jt(this.container,c),{supportIcons:this.supportIcons})).set(s,a,void 0,n==null?void 0:n.labelEscapeNewLines),o<e.length-1&&jt(c,Xt("span.label-separator",void 0,i))}}}}const BQ=Xt,EFt={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0};class W6 extends ct{constructor(e,n,i){super(),this.os=n,this.keyElements=new Set,this.options=i||Object.create(null);const r=this.options.keybindingLabelForeground;this.domNode=jt(e,BQ(".monaco-keybinding")),r&&(this.domNode.style.color=r),this.hover=this._register(d_().setupManagedHover(Yh("mouse"),this.domNode,"")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,n){this.didEverRender&&this.keybinding===e&&W6.areSame(this.matches,n)||(this.keybinding=e,this.matches=n,this.render())}render(){if(this.clear(),this.keybinding){const e=this.keybinding.getChords();e[0]&&this.renderChord(this.domNode,e[0],this.matches?this.matches.firstPart:null);for(let i=1;i<e.length;i++)jt(this.domNode,BQ("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderChord(this.domNode,e[i],this.matches?this.matches.chordPart:null);const n=this.options.disableTitle??!1?void 0:this.keybinding.getAriaLabel()||void 0;this.hover.update(n),this.domNode.setAttribute("aria-label",n||"")}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.didEverRender=!0}clear(){ru(this.domNode),this.keyElements.clear()}renderChord(e,n,i){const r=a7e.modifierLabels[this.os];n.ctrlKey&&this.renderKey(e,r.ctrlKey,!!(i!=null&&i.ctrlKey),r.separator),n.shiftKey&&this.renderKey(e,r.shiftKey,!!(i!=null&&i.shiftKey),r.separator),n.altKey&&this.renderKey(e,r.altKey,!!(i!=null&&i.altKey),r.separator),n.metaKey&&this.renderKey(e,r.metaKey,!!(i!=null&&i.metaKey),r.separator);const o=n.keyLabel;o&&this.renderKey(e,o,!!(i!=null&&i.keyCode),"")}renderKey(e,n,i,r){jt(e,this.createKeyElement(n,i?".highlight":"")),r&&jt(e,BQ("span.monaco-keybinding-key-separator",void 0,r))}renderUnbound(e){jt(e,this.createKeyElement(I("unbound","Unbound")))}createKeyElement(e,n=""){const i=BQ("span.monaco-keybinding-key"+n,void 0,e);return this.keyElements.add(i),this.options.keybindingLabelBackground&&(i.style.backgroundColor=this.options.keybindingLabelBackground),this.options.keybindingLabelBorder&&(i.style.borderColor=this.options.keybindingLabelBorder),this.options.keybindingLabelBottomBorder&&(i.style.borderBottomColor=this.options.keybindingLabelBottomBorder),this.options.keybindingLabelShadow&&(i.style.boxShadow=`inset 0 -1px 0 ${this.options.keybindingLabelShadow}`),i}static areSame(e,n){return e===n||!e&&!n?!0:!!e&&!!n&&Lp(e.firstPart,n.firstPart)&&Lp(e.chordPart,n.chordPart)}}const _ct=new U0(()=>{const t=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:t,collatorIsNumeric:t.resolvedOptions().numeric}});function eki(t,e,n=!1){const i=t||"",r=e||"",o=_ct.value.collator.compare(i,r);return _ct.value.collatorIsNumeric&&o===0&&i!==r?i<r?-1:1:o}function tki(t,e,n){const i=t.toLowerCase(),r=e.toLowerCase(),o=nki(t,e,n);if(o)return o;const s=i.endsWith(n),a=r.endsWith(n);if(s!==a)return s?-1:1;const l=eki(i,r);return l!==0?l:i.localeCompare(r)}function nki(t,e,n){const i=t.toLowerCase(),r=e.toLowerCase(),o=i.startsWith(n),s=r.startsWith(n);if(o!==s)return o?-1:1;if(o&&s){if(i.length<r.length)return-1;if(i.length>r.length)return 1}return 0}var Lme=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},UIe=function(t,e){return function(n,i){e(n,i,t)}},KIe;const Ny=Xt;class DFt{constructor(e,n,i){this.index=e,this.hasCheckbox=n,this._hidden=!1,this._init=new U0(()=>{const r=i.label??"",o=e9(r).text.trim(),s=i.ariaLabel||[r,this.saneDescription,this.saneDetail].map(a=>LCi(a)).filter(a=>!!a).join(", ");return{saneLabel:r,saneSortLabel:o,saneAriaLabel:s}}),this._saneDescription=i.description,this._saneTooltip=i.tooltip}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get saneDescription(){return this._saneDescription}set saneDescription(e){this._saneDescription=e}get saneDetail(){return this._saneDetail}set saneDetail(e){this._saneDetail=e}get saneTooltip(){return this._saneTooltip}set saneTooltip(e){this._saneTooltip=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}}class Kc extends DFt{constructor(e,n,i,r,o,s){var a,l,c;super(e,n,o),this.fireButtonTriggered=i,this._onChecked=r,this.item=o,this._separator=s,this._checked=!1,this.onChecked=n?rn.map(rn.filter(this._onChecked.event,u=>u.element===this),u=>u.checked):rn.None,this._saneDetail=o.detail,this._labelHighlights=(a=o.highlights)==null?void 0:a.label,this._descriptionHighlights=(l=o.highlights)==null?void 0:l.description,this._detailHighlights=(c=o.highlights)==null?void 0:c.detail}get separator(){return this._separator}set separator(e){this._separator=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({element:this,checked:e}))}get checkboxDisabled(){return!!this.item.disabled}}var hx;(function(t){t[t.NONE=0]="NONE",t[t.MOUSE_HOVER=1]="MOUSE_HOVER",t[t.ACTIVE_ITEM=2]="ACTIVE_ITEM"})(hx||(hx={}));class jL extends DFt{constructor(e,n,i){super(e,!1,i),this.fireSeparatorButtonTriggered=n,this.separator=i,this.children=new Array,this.focusInsideSeparator=hx.NONE}}class iki{getHeight(e){return e instanceof jL?30:e.saneDetail?44:22}getTemplateId(e){return e instanceof Kc?doe.ID:hoe.ID}}class rki{getWidgetAriaLabel(){return I("quickInput","Quick Input")}getAriaLabel(e){var n;return(n=e.separator)!=null&&n.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(!(!e.hasCheckbox||!(e instanceof Kc)))return{get value(){return e.checked},onDidChange:n=>e.onChecked(()=>n())}}}class kFt{constructor(e){this.hoverDelegate=e}renderTemplate(e){const n=Object.create(null);n.toDisposeElement=new Lt,n.toDisposeTemplate=new Lt,n.entry=jt(e,Ny(".quick-input-list-entry"));const i=jt(n.entry,Ny("label.quick-input-list-label"));n.toDisposeTemplate.add(Fa(i,Yt.CLICK,c=>{n.checkbox.offsetParent||c.preventDefault()})),n.checkbox=jt(i,Ny("input.quick-input-list-checkbox")),n.checkbox.type="checkbox";const r=jt(i,Ny(".quick-input-list-rows")),o=jt(r,Ny(".quick-input-list-row")),s=jt(r,Ny(".quick-input-list-row"));n.label=new uoe(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),n.toDisposeTemplate.add(n.label),n.icon=R8e(n.label.element,Ny(".quick-input-list-icon"));const a=jt(o,Ny(".quick-input-list-entry-keybinding"));n.keybinding=new W6(a,pm),n.toDisposeTemplate.add(n.keybinding);const l=jt(s,Ny(".quick-input-list-label-meta"));return n.detail=new uoe(l,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),n.toDisposeTemplate.add(n.detail),n.separator=jt(n.entry,Ny(".quick-input-list-separator")),n.actionBar=new Ap(n.entry,this.hoverDelegate?{hoverDelegate:this.hoverDelegate}:void 0),n.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),n.toDisposeTemplate.add(n.actionBar),n}disposeTemplate(e){e.toDisposeElement.dispose(),e.toDisposeTemplate.dispose()}disposeElement(e,n,i){i.toDisposeElement.clear(),i.actionBar.clear()}}var MI;let doe=(MI=class extends kFt{constructor(e,n){super(e),this.themeService=n,this._itemsWithSeparatorsFrequency=new Map}get templateId(){return KIe.ID}renderTemplate(e){const n=super.renderTemplate(e);return n.toDisposeTemplate.add(Fa(n.checkbox,Yt.CHANGE,i=>{n.element.checked=n.checkbox.checked})),n}renderElement(e,n,i){var h;const r=e.element;i.element=r,r.element=i.entry??void 0;const o=r.item;i.checkbox.checked=r.checked,i.toDisposeElement.add(r.onChecked(f=>i.checkbox.checked=f)),i.checkbox.disabled=r.checkboxDisabled;const{labelHighlights:s,descriptionHighlights:a,detailHighlights:l}=r;if(o.iconPath){const f=d5(this.themeService.getColorTheme().type)?o.iconPath.dark:o.iconPath.light??o.iconPath.dark,m=ri.revive(f);i.icon.className="quick-input-list-icon",i.icon.style.backgroundImage=fS(m)}else i.icon.style.backgroundImage="",i.icon.className=o.iconClass?`quick-input-list-icon ${o.iconClass}`:"";let c;!r.saneTooltip&&r.saneDescription&&(c={markdown:{value:r.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:r.saneDescription});const u={matches:s||[],descriptionTitle:c,descriptionMatches:a||[],labelEscapeNewLines:!0};if(u.extraClasses=o.iconClasses,u.italic=o.italic,u.strikethrough=o.strikethrough,i.entry.classList.remove("quick-input-list-separator-as-item"),i.label.setLabel(r.saneLabel,r.saneDescription,u),i.keybinding.set(o.keybinding),r.saneDetail){let f;r.saneTooltip||(f={markdown:{value:r.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:r.saneDetail}),i.detail.element.style.display="",i.detail.setLabel(r.saneDetail,void 0,{matches:l,title:f,labelEscapeNewLines:!0})}else i.detail.element.style.display="none";(h=r.separator)!=null&&h.label?(i.separator.textContent=r.separator.label,i.separator.style.display="",this.addItemWithSeparator(r)):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!r.separator);const d=o.buttons;d&&d.length?(i.actionBar.push(d.map((f,m)=>hB(f,`id-${m}`,()=>r.fireButtonTriggered({button:f,item:r.item}))),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,n,i){this.removeItemWithSeparator(e.element),super.disposeElement(e,n,i)}isItemWithSeparatorVisible(e){return this._itemsWithSeparatorsFrequency.has(e)}addItemWithSeparator(e){this._itemsWithSeparatorsFrequency.set(e,(this._itemsWithSeparatorsFrequency.get(e)||0)+1)}removeItemWithSeparator(e){const n=this._itemsWithSeparatorsFrequency.get(e)||0;n>1?this._itemsWithSeparatorsFrequency.set(e,n-1):this._itemsWithSeparatorsFrequency.delete(e)}},KIe=MI,MI.ID="quickpickitem",MI);doe=KIe=Lme([UIe(1,Ql)],doe);const uce=class uce extends kFt{constructor(){super(...arguments),this._visibleSeparatorsFrequency=new Map}get templateId(){return uce.ID}get visibleSeparators(){return[...this._visibleSeparatorsFrequency.keys()]}isSeparatorVisible(e){return this._visibleSeparatorsFrequency.has(e)}renderElement(e,n,i){const r=e.element;i.element=r,r.element=i.entry??void 0,r.element.classList.toggle("focus-inside",!!r.focusInsideSeparator);const o=r.separator,{labelHighlights:s,descriptionHighlights:a,detailHighlights:l}=r;i.icon.style.backgroundImage="",i.icon.className="";let c;!r.saneTooltip&&r.saneDescription&&(c={markdown:{value:r.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:r.saneDescription});const u={matches:s||[],descriptionTitle:c,descriptionMatches:a||[],labelEscapeNewLines:!0};if(i.entry.classList.add("quick-input-list-separator-as-item"),i.label.setLabel(r.saneLabel,r.saneDescription,u),r.saneDetail){let h;r.saneTooltip||(h={markdown:{value:r.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:r.saneDetail}),i.detail.element.style.display="",i.detail.setLabel(r.saneDetail,void 0,{matches:l,title:h,labelEscapeNewLines:!0})}else i.detail.element.style.display="none";i.separator.style.display="none",i.entry.classList.add("quick-input-list-separator-border");const d=o.buttons;d&&d.length?(i.actionBar.push(d.map((h,f)=>hB(h,`id-${f}`,()=>r.fireSeparatorButtonTriggered({button:h,separator:r.separator}))),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions"),this.addSeparator(r)}disposeElement(e,n,i){var r;this.removeSeparator(e.element),this.isSeparatorVisible(e.element)||(r=e.element.element)==null||r.classList.remove("focus-inside"),super.disposeElement(e,n,i)}addSeparator(e){this._visibleSeparatorsFrequency.set(e,(this._visibleSeparatorsFrequency.get(e)||0)+1)}removeSeparator(e){const n=this._visibleSeparatorsFrequency.get(e)||0;n>1?this._visibleSeparatorsFrequency.set(e,n-1):this._visibleSeparatorsFrequency.delete(e)}};uce.ID="quickpickseparator";let hoe=uce,hW=class extends ct{constructor(e,n,i,r,o,s){super(),this.parent=e,this.hoverDelegate=n,this.linkOpenerDelegate=i,this.accessibilityService=s,this._onKeyDown=new st,this._onLeave=new st,this.onLeave=this._onLeave.event,this._visibleCountObservable=lr("VisibleCount",0),this.onChangedVisibleCount=rn.fromObservable(this._visibleCountObservable,this._store),this._allVisibleCheckedObservable=lr("AllVisibleChecked",!1),this.onChangedAllVisibleChecked=rn.fromObservable(this._allVisibleCheckedObservable,this._store),this._checkedCountObservable=lr("CheckedCount",0),this.onChangedCheckedCount=rn.fromObservable(this._checkedCountObservable,this._store),this._checkedElementsObservable=pIe({equalsFn:Xs},new Array),this.onChangedCheckedElements=rn.fromObservable(this._checkedElementsObservable,this._store),this._onButtonTriggered=new st,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new st,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._elementChecked=new st,this._elementCheckedEventBufferer=new fq,this._hasCheckboxes=!1,this._inputElements=new Array,this._elementTree=new Array,this._itemElements=new Array,this._elementDisposable=this._register(new Lt),this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._shouldLoop=!0,this._container=jt(this.parent,Ny(".quick-input-list")),this._separatorRenderer=new hoe(n),this._itemRenderer=o.createInstance(doe,n),this._tree=this._register(o.createInstance(HIe,"QuickInput",this._container,new iki,[this._itemRenderer,this._separatorRenderer],{accessibilityProvider:new rki,setRowLineHeight:!1,multipleSelectionSupport:!1,hideTwistiesOfChildlessElements:!0,renderIndentGuides:x5.None,findWidgetEnabled:!1,indent:0,horizontalScrolling:!1,allowNonCollapsibleParents:!0,alwaysConsumeMouseWheel:!0})),this._tree.getHTMLElement().id=r,this._registerListeners()}get onDidChangeFocus(){return rn.map(this._tree.onDidChangeFocus,e=>e.elements.filter(n=>n instanceof Kc).map(n=>n.item),this._store)}get onDidChangeSelection(){return rn.map(this._tree.onDidChangeSelection,e=>({items:e.elements.filter(n=>n instanceof Kc).map(n=>n.item),event:e.browserEvent}),this._store)}get displayed(){return this._container.style.display!=="none"}set displayed(e){this._container.style.display=e?"":"none"}get scrollTop(){return this._tree.scrollTop}set scrollTop(e){this._tree.scrollTop=e}get ariaLabel(){return this._tree.ariaLabel}set ariaLabel(e){this._tree.ariaLabel=e??""}set enabled(e){this._tree.getHTMLElement().style.pointerEvents=e?"":"none"}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e}get shouldLoop(){return this._shouldLoop}set shouldLoop(e){this._shouldLoop=e}_registerListeners(){this._registerOnKeyDown(),this._registerOnContainerClick(),this._registerOnMouseMiddleClick(),this._registerOnTreeModelChanged(),this._registerOnElementChecked(),this._registerOnContextMenu(),this._registerHoverListeners(),this._registerSelectionChangeListener(),this._registerSeparatorActionShowingListeners()}_registerOnKeyDown(){this._register(this._tree.onKeyDown(e=>{const n=new as(e);switch(n.keyCode){case 10:this.toggleCheckbox();break}this._onKeyDown.fire(n)}))}_registerOnContainerClick(){this._register(yt(this._container,Yt.CLICK,e=>{(e.x||e.y)&&this._onLeave.fire()}))}_registerOnMouseMiddleClick(){this._register(yt(this._container,Yt.AUXCLICK,e=>{e.button===1&&this._onLeave.fire()}))}_registerOnTreeModelChanged(){this._register(this._tree.onDidChangeModel(()=>{const e=this._itemElements.filter(n=>!n.hidden).length;this._visibleCountObservable.set(e,void 0),this._hasCheckboxes&&this._updateCheckedObservables()}))}_registerOnElementChecked(){this._register(this._elementCheckedEventBufferer.wrapEvent(this._elementChecked.event,(e,n)=>n)(e=>this._updateCheckedObservables()))}_registerOnContextMenu(){this._register(this._tree.onContextMenu(e=>{e.element&&(e.browserEvent.preventDefault(),this._tree.setSelection([e.element]))}))}_registerHoverListeners(){const e=this._register(new v4t(this.hoverDelegate.delay));this._register(this._tree.onMouseOver(async n=>{var i;if(Yot(n.browserEvent.target)){e.cancel();return}if(!(!Yot(n.browserEvent.relatedTarget)&&ac(n.browserEvent.relatedTarget,(i=n.element)==null?void 0:i.element)))try{await e.trigger(async()=>{n.element instanceof Kc&&this.showHover(n.element)})}catch(r){if(!yb(r))throw r}})),this._register(this._tree.onMouseOut(n=>{var i;ac(n.browserEvent.relatedTarget,(i=n.element)==null?void 0:i.element)||e.cancel()}))}_registerSeparatorActionShowingListeners(){this._register(this._tree.onDidChangeFocus(e=>{const n=e.elements[0]?this._tree.getParentElement(e.elements[0]):null;for(const i of this._separatorRenderer.visibleSeparators){const r=i===n;!!(i.focusInsideSeparator&hx.ACTIVE_ITEM)!==r&&(r?i.focusInsideSeparator|=hx.ACTIVE_ITEM:i.focusInsideSeparator&=~hx.ACTIVE_ITEM,this._tree.rerender(i))}})),this._register(this._tree.onMouseOver(e=>{const n=e.element?this._tree.getParentElement(e.element):null;for(const i of this._separatorRenderer.visibleSeparators){if(i!==n)continue;!!(i.focusInsideSeparator&hx.MOUSE_HOVER)||(i.focusInsideSeparator|=hx.MOUSE_HOVER,this._tree.rerender(i))}})),this._register(this._tree.onMouseOut(e=>{const n=e.element?this._tree.getParentElement(e.element):null;for(const i of this._separatorRenderer.visibleSeparators){if(i!==n)continue;!!(i.focusInsideSeparator&hx.MOUSE_HOVER)&&(i.focusInsideSeparator&=~hx.MOUSE_HOVER,this._tree.rerender(i))}}))}_registerSelectionChangeListener(){this._register(this._tree.onDidChangeSelection(e=>{const n=e.elements.filter(i=>i instanceof Kc);n.length!==e.elements.length&&(e.elements.length===1&&e.elements[0]instanceof jL&&(this._tree.setFocus([e.elements[0].children[0]]),this._tree.reveal(e.elements[0],0)),this._tree.setSelection(n))}))}setAllVisibleChecked(e){this._elementCheckedEventBufferer.bufferEvents(()=>{this._itemElements.forEach(n=>{!n.hidden&&!n.checkboxDisabled&&(n.checked=e)})})}setElements(e){this._elementDisposable.clear(),this._inputElements=e,this._hasCheckboxes=this.parent.classList.contains("show-checkboxes");let n;this._itemElements=new Array,this._elementTree=e.reduce((i,r,o)=>{let s;if(r.type==="separator"){if(!r.buttons)return i;n=new jL(o,a=>this._onSeparatorButtonTriggered.fire(a),r),s=n}else{const a=o>0?e[o-1]:void 0;let l;a&&a.type==="separator"&&!a.buttons&&(n=void 0,l=a);const c=new Kc(o,this._hasCheckboxes,u=>this._onButtonTriggered.fire(u),this._elementChecked,r,l);if(this._itemElements.push(c),n)return n.children.push(c),i;s=c}return i.push(s),i},new Array),this._setElementsToTree(this._elementTree),this.accessibilityService.isScreenReaderOptimized()&&setTimeout(()=>{const i=this._tree.getHTMLElement().querySelector(".monaco-list-row.focused"),r=i==null?void 0:i.parentNode;if(i&&r){const o=i.nextSibling;i.remove(),r.insertBefore(i,o)}},0)}setFocusedElements(e){const n=e.map(i=>this._itemElements.find(r=>r.item===i)).filter(i=>!!i).filter(i=>!i.hidden);if(this._tree.setFocus(n),e.length>0){const i=this._tree.getFocus()[0];i&&this._tree.reveal(i)}}getActiveDescendant(){return this._tree.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){const n=e.map(i=>this._itemElements.find(r=>r.item===i)).filter(i=>!!i);this._tree.setSelection(n)}getCheckedElements(){return this._itemElements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){this._elementCheckedEventBufferer.bufferEvents(()=>{const n=new Set;for(const i of e)n.add(i);for(const i of this._itemElements)i.checked=n.has(i.item)})}focus(e){var n;if(this._itemElements.length)switch(e===xs.Second&&this._itemElements.length<2&&(e=xs.First),e){case xs.First:this._tree.scrollTop=0,this._tree.focusFirst(void 0,i=>i.element instanceof Kc);break;case xs.Second:{this._tree.scrollTop=0;let i=!1;this._tree.focusFirst(void 0,r=>r.element instanceof Kc?i?!0:(i=!i,!1):!1);break}case xs.Last:this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,i=>i.element instanceof Kc);break;case xs.Next:{const i=this._tree.getFocus();this._tree.focusNext(void 0,this._shouldLoop,void 0,o=>o.element instanceof Kc?(this._tree.reveal(o.element),!0):!1);const r=this._tree.getFocus();i.length&&i[0]===r[0]&&i[0]===this._itemElements[this._itemElements.length-1]&&this._onLeave.fire();break}case xs.Previous:{const i=this._tree.getFocus();this._tree.focusPrevious(void 0,this._shouldLoop,void 0,o=>{if(!(o.element instanceof Kc))return!1;const s=this._tree.getParentElement(o.element);return s===null||s.children[0]!==o.element?this._tree.reveal(o.element):this._tree.reveal(s),!0});const r=this._tree.getFocus();i.length&&i[0]===r[0]&&i[0]===this._itemElements[0]&&this._onLeave.fire();break}case xs.NextPage:this._tree.focusNextPage(void 0,i=>i.element instanceof Kc?(this._tree.reveal(i.element),!0):!1);break;case xs.PreviousPage:this._tree.focusPreviousPage(void 0,i=>{if(!(i.element instanceof Kc))return!1;const r=this._tree.getParentElement(i.element);return r===null||r.children[0]!==i.element?this._tree.reveal(i.element):this._tree.reveal(r),!0});break;case xs.NextSeparator:{let i=!1;const r=this._tree.getFocus()[0];this._tree.focusNext(void 0,!0,void 0,s=>{if(i)return!0;if(s.element instanceof jL)i=!0,this._separatorRenderer.isSeparatorVisible(s.element)?this._tree.reveal(s.element.children[0]):this._tree.reveal(s.element,0);else if(s.element instanceof Kc){if(s.element.separator)return this._itemRenderer.isItemWithSeparatorVisible(s.element)?this._tree.reveal(s.element):this._tree.reveal(s.element,0),!0;if(s.element===this._elementTree[0])return this._tree.reveal(s.element,0),!0}return!1});const o=this._tree.getFocus()[0];r===o&&(this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,s=>s.element instanceof Kc));break}case xs.PreviousSeparator:{let i,r=!!((n=this._tree.getFocus()[0])!=null&&n.separator);this._tree.focusPrevious(void 0,!0,void 0,o=>{if(o.element instanceof jL)r?i||(this._separatorRenderer.isSeparatorVisible(o.element)?this._tree.reveal(o.element):this._tree.reveal(o.element,0),i=o.element.children[0]):r=!0;else if(o.element instanceof Kc&&!i){if(o.element.separator)this._itemRenderer.isItemWithSeparatorVisible(o.element)?this._tree.reveal(o.element):this._tree.reveal(o.element,0),i=o.element;else if(o.element===this._elementTree[0])return this._tree.reveal(o.element,0),!0}return!1}),i&&this._tree.setFocus([i]);break}}}clearFocus(){this._tree.setFocus([])}domFocus(){this._tree.domFocus()}layout(e){this._tree.getHTMLElement().style.maxHeight=e?`${Math.floor(e/44)*44+6}px`:"",this._tree.layout()}filter(e){if(!(this._sortByLabel||this._matchOnLabel||this._matchOnDescription||this._matchOnDetail))return this._tree.layout(),!1;const n=e;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this._itemElements.forEach(s=>{s.labelHighlights=void 0,s.descriptionHighlights=void 0,s.detailHighlights=void 0,s.hidden=!1;const a=s.index&&this._inputElements[s.index-1];s.item&&(s.separator=a&&a.type==="separator"&&!a.buttons?a:void 0)});else{let s;this._elementTree.forEach(a=>{let l;this.matchOnLabelMode==="fuzzy"?l=this.matchOnLabel?E1e(e,e9(a.saneLabel))??void 0:void 0:l=this.matchOnLabel?oki(n,e9(a.saneLabel))??void 0:void 0;const c=this.matchOnDescription?E1e(e,e9(a.saneDescription||""))??void 0:void 0,u=this.matchOnDetail?E1e(e,e9(a.saneDetail||""))??void 0:void 0;if(l||c||u?(a.labelHighlights=l,a.descriptionHighlights=c,a.detailHighlights=u,a.hidden=!1):(a.labelHighlights=void 0,a.descriptionHighlights=void 0,a.detailHighlights=void 0,a.hidden=a.item?!a.item.alwaysShow:!0),a.item?a.separator=void 0:a.separator&&(a.hidden=!0),!this.sortByLabel){const d=a.index&&this._inputElements[a.index-1];s=d&&d.type==="separator"?d:s,s&&!a.hidden&&(a.separator=s,s=void 0)}})}const i=this._elementTree.filter(s=>!s.hidden);if(this.sortByLabel&&e){const s=e.toLowerCase();i.sort((a,l)=>ski(a,l,s))}let r;const o=i.reduce((s,a,l)=>(a instanceof Kc?r?r.children.push(a):s.push(a):a instanceof jL&&(a.children=[],r=a,s.push(a)),s),new Array);return this._setElementsToTree(o),this._tree.layout(),!0}toggleCheckbox(){this._elementCheckedEventBufferer.bufferEvents(()=>{const e=this._tree.getFocus().filter(i=>i instanceof Kc),n=this._allVisibleChecked(e);for(const i of e)i.checkboxDisabled||(i.checked=!n)})}style(e){this._tree.style(e)}toggleHover(){const e=this._tree.getFocus()[0];if(!(e!=null&&e.saneTooltip)||!(e instanceof Kc))return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}this.showHover(e);const n=new Lt;n.add(this._tree.onDidChangeFocus(i=>{i.elements[0]instanceof Kc&&this.showHover(i.elements[0])})),this._lastHover&&n.add(this._lastHover),this._elementDisposable.add(n)}_setElementsToTree(e){const n=new Array;for(const i of e)i instanceof jL?n.push({element:i,collapsible:!1,collapsed:!1,children:i.children.map(r=>({element:r,collapsible:!1,collapsed:!1}))}):n.push({element:i,collapsible:!1,collapsed:!1});this._tree.setChildren(null,n)}_allVisibleChecked(e,n=!0){for(let i=0,r=e.length;i<r;i++){const o=e[i];if(!o.hidden)if(o.checked)n=!0;else return!1}return n}_updateCheckedObservables(){this._allVisibleCheckedObservable.set(this._allVisibleChecked(this._itemElements,!1),void 0);const e=this._itemElements.filter(n=>n.checked).length;this._checkedCountObservable.set(e,void 0),this._checkedElementsObservable.set(this.getCheckedElements(),void 0)}showHover(e){var n,i,r;this._lastHover&&!this._lastHover.isDisposed&&((i=(n=this.hoverDelegate).onDidHideHover)==null||i.call(n),(r=this._lastHover)==null||r.dispose()),!(!e.element||!e.saneTooltip)&&(this._lastHover=this.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:o=>{this.linkOpenerDelegate(o)},appearance:{showPointer:!0},container:this._container,position:{hoverPosition:1}},!1))}};Lme([el],hW.prototype,"onDidChangeFocus",null);Lme([el],hW.prototype,"onDidChangeSelection",null);hW=Lme([UIe(4,qn),UIe(5,Bm)],hW);function oki(t,e){const{text:n,iconOffsets:i}=e;if(!i||i.length===0)return xct(t,n);const r=mq(n," "),o=n.length-r.length,s=xct(t,r);if(s)for(const a of s){const l=i[a.start+o]+o;a.start+=l,a.end+=l}return s}function xct(t,e){const n=e.toLowerCase().indexOf(t.toLowerCase());return n!==-1?[{start:n,end:n+t.length}]:null}function ski(t,e,n){const i=t.labelHighlights||[],r=e.labelHighlights||[];return i.length&&!r.length?-1:!i.length&&r.length?1:i.length===0&&r.length===0?0:tki(t.saneSortLabel,e.saneSortLabel,n)}const MFt={weight:200,when:Tt.and(Tt.equals(J5t,"quickPick"),REi),metadata:{description:I("quickPick","Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")}};function em(t,e={}){Bh.registerCommandAndKeybindingRule({...MFt,...t,secondary:aki(t.primary,t.secondary??[],e)})}const foe=xr?256:2048;function aki(t,e,n={}){return n.withAltMod&&e.push(512+t),n.withCtrlMod&&(e.push(foe+t),n.withAltMod&&e.push(512+foe+t)),n.withCmdMod&&xr&&(e.push(2048+t),n.withCtrlMod&&e.push(2304+t),n.withAltMod&&(e.push(2560+t),n.withCtrlMod&&e.push(2816+t))),e}function lp(t,e){return n=>{const i=n.get(wb).currentQuickInput;if(i)return e&&i.quickNavigate?i.focus(e):i.focus(t)}}em({id:"quickInput.pageNext",primary:12,handler:lp(xs.NextPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});em({id:"quickInput.pagePrevious",primary:11,handler:lp(xs.PreviousPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});em({id:"quickInput.first",primary:foe+14,handler:lp(xs.First)},{withAltMod:!0,withCmdMod:!0});em({id:"quickInput.last",primary:foe+13,handler:lp(xs.Last)},{withAltMod:!0,withCmdMod:!0});em({id:"quickInput.next",primary:18,handler:lp(xs.Next)},{withCtrlMod:!0});em({id:"quickInput.previous",primary:16,handler:lp(xs.Previous)},{withCtrlMod:!0});const wct=I("quickInput.nextSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator."),Cct=I("quickInput.previousSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");xr?(em({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:2066,handler:lp(xs.NextSeparator,xs.Next),metadata:{description:wct}}),em({id:"quickInput.nextSeparator",primary:2578,secondary:[2322],handler:lp(xs.NextSeparator)},{withCtrlMod:!0}),em({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:2064,handler:lp(xs.PreviousSeparator,xs.Previous),metadata:{description:Cct}}),em({id:"quickInput.previousSeparator",primary:2576,secondary:[2320],handler:lp(xs.PreviousSeparator)},{withCtrlMod:!0})):(em({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:530,handler:lp(xs.NextSeparator,xs.Next),metadata:{description:wct}}),em({id:"quickInput.nextSeparator",primary:2578,handler:lp(xs.NextSeparator)}),em({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:528,handler:lp(xs.PreviousSeparator,xs.Previous),metadata:{description:Cct}}),em({id:"quickInput.previousSeparator",primary:2576,handler:lp(xs.PreviousSeparator)}));em({id:"quickInput.acceptInBackground",when:Tt.and(MFt.when,Tt.or(bFt.negate(),jEi)),primary:17,weight:250,handler:t=>{const e=t.get(wb).currentQuickInput;e==null||e.accept(!0)}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});var lki=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},B1e=function(t,e){return function(n,i){e(n,i,t)}},qIe;const Kf=Xt;var LI;let GIe=(LI=class extends ct{get currentQuickInput(){return this.controller??void 0}get container(){return this._container}constructor(e,n,i,r){super(),this.options=e,this.layoutService=n,this.instantiationService=i,this.contextKeyService=r,this.enabled=!0,this.onDidAcceptEmitter=this._register(new st),this.onDidCustomEmitter=this._register(new st),this.onDidTriggerButtonEmitter=this._register(new st),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new st),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new st),this.onHide=this.onHideEmitter.event,this.inQuickInputContext=AEi.bindTo(this.contextKeyService),this.quickInputTypeContext=PEi.bindTo(this.contextKeyService),this.endOfQuickInputBoxContext=OEi.bindTo(this.contextKeyService),this.idPrefix=e.idPrefix,this._container=e.container,this.styles=e.styles,this._register(rn.runAndSubscribe(Ife,({window:o,disposables:s})=>this.registerKeyModsListeners(o,s),{window:Go,disposables:this._store})),this._register(Qhi(o=>{this.ui&&ei(this.ui.container)===o&&(this.reparentUI(this.layoutService.mainContainer),this.layout(this.layoutService.mainContainerDimension,this.layoutService.mainContainerOffset.quickPickTop))}))}registerKeyModsListeners(e,n){const i=r=>{this.keyMods.ctrlCmd=r.ctrlKey||r.metaKey,this.keyMods.alt=r.altKey};for(const r of[Yt.KEY_DOWN,Yt.KEY_UP,Yt.MOUSE_DOWN])n.add(yt(e,r,i,!0))}getUI(e){if(this.ui)return e&&ei(this._container)!==ei(this.layoutService.activeContainer)&&(this.reparentUI(this.layoutService.activeContainer),this.layout(this.layoutService.activeContainerDimension,this.layoutService.activeContainerOffset.quickPickTop)),this.ui;const n=jt(this._container,Kf(".quick-input-widget.show-file-icons"));n.tabIndex=-1,n.style.display="none";const i=Wp(n),r=jt(n,Kf(".quick-input-titlebar")),o=this._register(new Ap(r,{hoverDelegate:this.options.hoverDelegate}));o.domNode.classList.add("quick-input-left-action-bar");const s=jt(r,Kf(".quick-input-title")),a=this._register(new Ap(r,{hoverDelegate:this.options.hoverDelegate}));a.domNode.classList.add("quick-input-right-action-bar");const l=jt(n,Kf(".quick-input-header")),c=jt(l,Kf("input.quick-input-check-all"));c.type="checkbox",c.setAttribute("aria-label",I("quickInput.checkAll","Toggle all checkboxes")),this._register(Fa(c,Yt.CHANGE,O=>{const V=c.checked;R.setAllVisibleChecked(V)})),this._register(yt(c,Yt.CLICK,O=>{(O.x||O.y)&&f.setFocus()}));const u=jt(l,Kf(".quick-input-description")),d=jt(l,Kf(".quick-input-and-message")),h=jt(d,Kf(".quick-input-filter")),f=this._register(new qEi(h,this.styles.inputBox,this.styles.toggle));f.setAttribute("aria-describedby",`${this.idPrefix}message`);const m=jt(h,Kf(".quick-input-visible-count"));m.setAttribute("aria-live","polite"),m.setAttribute("aria-atomic","true");const p=new OIe(m,{countFormat:I({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")},this.styles.countBadge),g=jt(h,Kf(".quick-input-count"));g.setAttribute("aria-live","polite");const y=new OIe(g,{countFormat:I({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")},this.styles.countBadge),_=this._register(new Ap(l,{hoverDelegate:this.options.hoverDelegate}));_.domNode.classList.add("quick-input-inline-action-bar");const w=jt(l,Kf(".quick-input-action")),C=this._register(new eoe(w,this.styles.button));C.label=I("ok","OK"),this._register(C.onDidClick(O=>{this.onDidAcceptEmitter.fire()}));const N=jt(l,Kf(".quick-input-action")),E=this._register(new eoe(N,{...this.styles.button,supportIcons:!0}));E.label=I("custom","Custom"),this._register(E.onDidClick(O=>{this.onDidCustomEmitter.fire()}));const D=jt(d,Kf(`#${this.idPrefix}message.quick-input-message`)),k=this._register(new jIe(n,this.styles.progressBar));k.getContainer().classList.add("quick-input-progress");const M=jt(n,Kf(".quick-input-html-widget"));M.tabIndex=-1;const T=jt(n,Kf(".quick-input-description")),A=this.idPrefix+"list",R=this._register(this.instantiationService.createInstance(hW,n,this.options.hoverDelegate,this.options.linkOpenerDelegate,A));f.setAttribute("aria-controls",A),this._register(R.onDidChangeFocus(()=>{f.setAttribute("aria-activedescendant",R.getActiveDescendant()??"")})),this._register(R.onChangedAllVisibleChecked(O=>{c.checked=O})),this._register(R.onChangedVisibleCount(O=>{p.setCount(O)})),this._register(R.onChangedCheckedCount(O=>{y.setCount(O)})),this._register(R.onLeave(()=>{setTimeout(()=>{this.controller&&(f.setFocus(),this.controller instanceof Jre&&this.controller.canSelectMany&&R.clearFocus())},0)}));const P=q0(n);return this._register(P),this._register(yt(n,Yt.FOCUS,O=>{const V=this.getUI();if(ac(O.relatedTarget,V.inputContainer)){const F=V.inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==F&&this.endOfQuickInputBoxContext.set(F)}ac(O.relatedTarget,V.container)||(this.inQuickInputContext.set(!0),this.previousFocusElement=uc(O.relatedTarget)?O.relatedTarget:void 0)},!0)),this._register(P.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(_5.Blur),this.inQuickInputContext.set(!1),this.endOfQuickInputBoxContext.set(!1),this.previousFocusElement=void 0})),this._register(f.onKeyDown(O=>{const V=this.getUI().inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==V&&this.endOfQuickInputBoxContext.set(V)})),this._register(yt(n,Yt.FOCUS,O=>{f.setFocus()})),this._register(Fa(n,Yt.KEY_DOWN,O=>{if(!ac(O.target,M))switch(O.keyCode){case 3:Mr.stop(O,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:Mr.stop(O,!0),this.hide(_5.Gesture);break;case 2:if(!O.altKey&&!O.ctrlKey&&!O.metaKey){const V=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(n.classList.contains("show-checkboxes")?V.push("input"):V.push("input[type=text]"),this.getUI().list.displayed&&V.push(".monaco-list"),this.getUI().message&&V.push(".quick-input-message a"),this.getUI().widget){if(ac(O.target,this.getUI().widget))break;V.push(".quick-input-html-widget")}const F=n.querySelectorAll(V.join(", "));O.shiftKey&&O.target===F[0]?(Mr.stop(O,!0),R.clearFocus()):!O.shiftKey&&ac(O.target,F[F.length-1])&&(Mr.stop(O,!0),F[0].focus())}break;case 10:O.ctrlKey&&(Mr.stop(O,!0),this.getUI().list.toggleHover());break}})),this.ui={container:n,styleSheet:i,leftActionBar:o,titleBar:r,title:s,description1:T,description2:u,widget:M,rightActionBar:a,inlineActionBar:_,checkAll:c,inputContainer:d,filterContainer:h,inputBox:f,visibleCountContainer:m,visibleCount:p,countContainer:g,count:y,okContainer:w,ok:C,message:D,customButtonContainer:N,customButton:E,list:R,progressBar:k,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:O=>this.show(O),hide:()=>this.hide(),setVisibilities:O=>this.setVisibilities(O),setEnabled:O=>this.setEnabled(O),setContextKey:O=>this.options.setContextKey(O),linkOpenerDelegate:O=>this.options.linkOpenerDelegate(O)},this.updateStyles(),this.ui}reparentUI(e){this.ui&&(this._container=e,jt(this._container,this.ui.container))}pick(e,n={},i=er.None){return new Promise((r,o)=>{let s=u=>{var d;s=r,(d=n.onKeyMods)==null||d.call(n,a.keyMods),r(u)};if(i.isCancellationRequested){s(void 0);return}const a=this.createQuickPick();let l;const c=[a,a.onDidAccept(()=>{if(a.canSelectMany)s(a.selectedItems.slice()),a.hide();else{const u=a.activeItems[0];u&&(s(u),a.hide())}}),a.onDidChangeActive(u=>{const d=u[0];d&&n.onDidFocus&&n.onDidFocus(d)}),a.onDidChangeSelection(u=>{if(!a.canSelectMany){const d=u[0];d&&(s(d),a.hide())}}),a.onDidTriggerItemButton(u=>n.onDidTriggerItemButton&&n.onDidTriggerItemButton({...u,removeItem:()=>{const d=a.items.indexOf(u.item);if(d!==-1){const h=a.items.slice(),f=h.splice(d,1),m=a.activeItems.filter(g=>g!==f[0]),p=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=h,m&&(a.activeItems=m),a.keepScrollPosition=p}}})),a.onDidTriggerSeparatorButton(u=>{var d;return(d=n.onDidTriggerSeparatorButton)==null?void 0:d.call(n,u)}),a.onDidChangeValue(u=>{l&&!u&&(a.activeItems.length!==1||a.activeItems[0]!==l)&&(a.activeItems=[l])}),i.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{Jo(c),s(void 0)})];a.title=n.title,a.canSelectMany=!!n.canPickMany,a.placeholder=n.placeHolder,a.ignoreFocusOut=!!n.ignoreFocusLost,a.matchOnDescription=!!n.matchOnDescription,a.matchOnDetail=!!n.matchOnDetail,a.matchOnLabel=n.matchOnLabel===void 0||n.matchOnLabel,a.quickNavigate=n.quickNavigate,a.hideInput=!!n.hideInput,a.contextKey=n.contextKey,a.busy=!0,Promise.all([e,n.activeItem]).then(([u,d])=>{l=d,a.busy=!1,a.items=u,a.canSelectMany&&(a.selectedItems=u.filter(h=>h.type!=="separator"&&h.picked)),l&&(a.activeItems=[l])}),a.show(),Promise.resolve(e).then(void 0,u=>{o(u),a.hide()})})}createQuickPick(){const e=this.getUI(!0);return new Jre(e)}createInputBox(){const e=this.getUI(!0);return new FEi(e)}show(e){const n=this.getUI(!0);this.onShowEmitter.fire();const i=this.controller;this.controller=e,i==null||i.didHide(),this.setEnabled(!0),n.leftActionBar.clear(),n.title.textContent="",n.description1.textContent="",n.description2.textContent="",ou(n.widget),n.rightActionBar.clear(),n.inlineActionBar.clear(),n.checkAll.checked=!1,n.inputBox.placeholder="",n.inputBox.password=!1,n.inputBox.showDecoration(qa.Ignore),n.visibleCount.setCount(0),n.count.setCount(0),ou(n.message),n.progressBar.stop(),n.list.setElements([]),n.list.matchOnDescription=!1,n.list.matchOnDetail=!1,n.list.matchOnLabel=!0,n.list.sortByLabel=!0,n.ignoreFocusOut=!1,n.inputBox.toggles=void 0;const r=this.options.backKeybindingLabel();RIe.tooltip=r?I("quickInput.backWithKeybinding","Back ({0})",r):I("quickInput.back","Back"),n.container.style.display="",this.updateLayout(),n.inputBox.setFocus(),this.quickInputTypeContext.set(e.type)}isVisible(){return!!this.ui&&this.ui.container.style.display!=="none"}setVisibilities(e){const n=this.getUI();n.title.style.display=e.title?"":"none",n.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",n.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",n.checkAll.style.display=e.checkAll?"":"none",n.inputContainer.style.display=e.inputBox?"":"none",n.filterContainer.style.display=e.inputBox?"":"none",n.visibleCountContainer.style.display=e.visibleCount?"":"none",n.countContainer.style.display=e.count?"":"none",n.okContainer.style.display=e.ok?"":"none",n.customButtonContainer.style.display=e.customButton?"":"none",n.message.style.display=e.message?"":"none",n.progressBar.getContainer().style.display=e.progressBar?"":"none",n.list.displayed=!!e.list,n.container.classList.toggle("show-checkboxes",!!e.checkBox),n.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const n of this.getUI().leftActionBar.viewItems)n.action.enabled=e;for(const n of this.getUI().rightActionBar.viewItems)n.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var o;const n=this.controller;if(!n)return;n.willHide(e);const i=(o=this.ui)==null?void 0:o.container,r=i&&!P4t(i);if(this.controller=null,this.onHideEmitter.fire(),i&&(i.style.display="none"),!r){let s=this.previousFocusElement;for(;s&&!s.offsetParent;)s=s.parentElement??void 0;s!=null&&s.offsetParent?(s.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}n.didHide(e)}layout(e,n){this.dimension=e,this.titleBarOffset=n,this.updateLayout()}updateLayout(){if(this.ui&&this.isVisible()){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,n=Math.min(this.dimension.width*.62,qIe.MAX_WIDTH);e.width=n+"px",e.marginLeft="-"+n/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:n,quickInputForeground:i,widgetBorder:r,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e??"",this.ui.container.style.backgroundColor=n??"",this.ui.container.style.color=i??"",this.ui.container.style.border=r?`1px solid ${r}`:"",this.ui.container.style.boxShadow=o?`0 0 8px 2px ${o}`:"",this.ui.list.style(this.styles.list);const s=[];this.styles.pickerGroup.pickerGroupBorder&&s.push(`.quick-input-list .quick-input-list-entry { border-top-color:  ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(`.quick-input-list .quick-input-list-separator { color:  ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(s.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&s.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&s.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&s.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&s.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&s.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),s.push("}"));const a=s.join(`
`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}},qIe=LI,LI.MAX_WIDTH=600,LI);GIe=qIe=lki([B1e(1,iM),B1e(2,qn),B1e(3,vi)],GIe);var cki=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},n7=function(t,e){return function(n,i){e(n,i,t)}};let YIe=class extends Syi{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get currentQuickInput(){return this.controller.currentQuickInput}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(AIe))),this._quickAccess}constructor(e,n,i,r,o){super(i),this.instantiationService=e,this.contextKeyService=n,this.layoutService=r,this.configurationService=o,this._onShow=this._register(new st),this._onHide=this._register(new st),this.contexts=new Map}createController(e=this.layoutService,n){const i={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:o=>this.setContextKey(o),linkOpenerDelegate:o=>{this.instantiationService.invokeFunction(s=>{s.get(Wm).open(o,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>e.focus(),styles:this.computeStyles(),hoverDelegate:this._register(this.instantiationService.createInstance(PIe))},r=this._register(this.instantiationService.createInstance(GIe,{...i,...n}));return r.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer(o=>{ei(e.activeContainer)===ei(r.container)&&r.layout(o,e.activeContainerOffset.quickPickTop)})),this._register(e.onDidChangeActiveContainer(()=>{r.isVisible()||r.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop)})),this._register(r.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(r.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),r}setContextKey(e){let n;e&&(n=this.contexts.get(e),n||(n=new gn(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,n))),!(n&&n.get())&&(this.resetContextKeys(),n==null||n.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,n={},i=er.None){return this.controller.pick(e,n,i)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:Cn(oat),quickInputForeground:Cn(Rvi),quickInputTitleBackground:Cn(Pvi),widgetBorder:Cn(O3t),widgetShadow:Cn(P6)},inputBox:Kre,toggle:Ure,countBadge:q5t,button:oEi,progressBar:sEi,keybindingLabel:rEi,list:iR({listBackground:oat,listFocusBackground:BH,listFocusForeground:VH,listInactiveFocusForeground:VH,listInactiveSelectionIconForeground:uVe,listInactiveFocusBackground:BH,listFocusOutline:Bs,listInactiveFocusOutline:Bs}),pickerGroup:{pickerGroupBorder:Cn(Ovi),pickerGroupForeground:Cn(K3t)}}}};YIe=cki([n7(0,qn),n7(1,vi),n7(2,Ql),n7(3,iM),n7(4,cr)],YIe);var LFt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},hT=function(t,e){return function(n,i){e(n,i,t)}};let XIe=class extends YIe{constructor(e,n,i,r,o,s){super(n,i,r,new jTe(e.getContainerDomNode(),o),s),this.host=void 0;const a=fW.get(e);if(a){const l=a.widget;this.host={_serviceBrand:void 0,get mainContainer(){return l.getDomNode()},getContainer(){return l.getDomNode()},whenContainerStylesLoaded(){},get containers(){return[l.getDomNode()]},get activeContainer(){return l.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return rn.map(e.onDidLayoutChange,c=>({container:l.getDomNode(),dimension:c}))},get onDidChangeActiveContainer(){return rn.None},get onDidAddContainer(){return rn.None},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};XIe=LFt([hT(1,qn),hT(2,vi),hT(3,Ql),hT(4,Yr),hT(5,cr)],XIe);let ZIe=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let n=this.mapEditorToService.get(e);if(!n){const i=n=this.instantiationService.createInstance(XIe,e);this.mapEditorToService.set(e,n),ak(e.onDidDispose)(()=>{i.dispose(),this.mapEditorToService.delete(e)})}return n}get currentQuickInput(){return this.activeService.currentQuickInput}get quickAccess(){return this.activeService.quickAccess}constructor(e,n){this.instantiationService=e,this.codeEditorService=n,this.mapEditorToService=new Map}pick(e,n={},i=er.None){return this.activeService.pick(e,n,i)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};ZIe=LFt([hT(0,qn),hT(1,Yr)],ZIe);const dce=class dce{static get(e){return e.getContribution(dce.ID)}constructor(e){this.editor=e,this.widget=new QIe(this.editor)}dispose(){this.widget.dispose()}};dce.ID="editor.controller.quickInput";let fW=dce;const hce=class hce{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return hce.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}};hce.ID="editor.contrib.quickInputWidget";let QIe=hce;Wr(fW.ID,fW,4);class uki{constructor(e,n,i,r,o){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=n,this.fontStyle=i,this.foreground=r,this.background=o}}function dki(t){if(!t||!Array.isArray(t))return[];const e=[];let n=0;for(let i=0,r=t.length;i<r;i++){const o=t[i];let s=-1;if(typeof o.fontStyle=="string"){s=0;const c=o.fontStyle.split(" ");for(let u=0,d=c.length;u<d;u++)switch(c[u]){case"italic":s=s|1;break;case"bold":s=s|2;break;case"underline":s=s|4;break;case"strikethrough":s=s|8;break}}let a=null;typeof o.foreground=="string"&&(a=o.foreground);let l=null;typeof o.background=="string"&&(l=o.background),e[n++]=new uki(o.token||"",i,s,a,l)}return e}function hki(t,e){t.sort((u,d)=>{const h=bki(u.token,d.token);return h!==0?h:u.index-d.index});let n=0,i="000000",r="ffffff";for(;t.length>=1&&t[0].token==="";){const u=t.shift();u.fontStyle!==-1&&(n=u.fontStyle),u.foreground!==null&&(i=u.foreground),u.background!==null&&(r=u.background)}const o=new mki;for(const u of e)o.getId(u);const s=o.getId(i),a=o.getId(r),l=new I7e(n,s,a),c=new A7e(l);for(let u=0,d=t.length;u<d;u++){const h=t[u];c.insert(h.token,h.fontStyle,o.getId(h.foreground),o.getId(h.background))}return new TFt(o,c)}const fki=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class mki{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(e===null)return 0;const n=e.match(fki);if(!n)throw new Error("Illegal value for token color: "+e);e=n[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=Rt.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class TFt{static createFromRawTokenTheme(e,n){return this.createFromParsedTokenTheme(dki(e),n)}static createFromParsedTokenTheme(e,n){return hki(e,n)}constructor(e,n){this._colorMap=e,this._root=n,this._cache=new Map}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,n){let i=this._cache.get(n);if(typeof i>"u"){const r=this._match(n),o=gki(n);i=(r.metadata|o<<8)>>>0,this._cache.set(n,i)}return(i|e<<0)>>>0}}const pki=/\b(comment|string|regex|regexp)\b/;function gki(t){const e=t.match(pki);if(!e)return 0;switch(e[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}function bki(t,e){return t<e?-1:t>e?1:0}class I7e{constructor(e,n,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=n,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new I7e(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,n,i){e!==-1&&(this._fontStyle=e),n!==0&&(this._foreground=n),i!==0&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class A7e{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;const n=e.indexOf(".");let i,r;n===-1?(i=e,r=""):(i=e.substring(0,n),r=e.substring(n+1));const o=this._children.get(i);return typeof o<"u"?o.match(r):this._mainRule}insert(e,n,i,r){if(e===""){this._mainRule.acceptOverwrite(n,i,r);return}const o=e.indexOf(".");let s,a;o===-1?(s=e,a=""):(s=e.substring(0,o),a=e.substring(o+1));let l=this._children.get(s);typeof l>"u"&&(l=new A7e(this._mainRule.clone()),this._children.set(s,l)),l.insert(a,n,i,r)}}function vki(t){const e=[];for(let n=1,i=t.length;n<i;n++){const r=t[n];e[n]=`.mtk${n} { color: ${r}; }`}return e.push(".mtki { font-style: italic; }"),e.push(".mtkb { font-weight: bold; }"),e.push(".mtku { text-decoration: underline; text-underline-position: under; }"),e.push(".mtks { text-decoration: line-through; }"),e.push(".mtks.mtku { text-decoration: underline line-through; text-underline-position: under; }"),e.join(`
`)}const yki={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[G0]:"#FFFFFE",[Rw]:"#000000",[R3t]:"#E5EBF1",[Dq]:"#D3D3D3",[kq]:"#939393",[rVe]:"#ADD6FF4D"}},_ki={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[G0]:"#1E1E1E",[Rw]:"#D4D4D4",[R3t]:"#3A3D41",[Dq]:"#404040",[kq]:"#707070",[rVe]:"#ADD6FF26"}},xki={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[G0]:"#000000",[Rw]:"#FFFFFF",[Dq]:"#FFFFFF",[kq]:"#FFFFFF"}},wki={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[G0]:"#FFFFFF",[Rw]:"#292929",[Dq]:"#292929",[kq]:"#292929"}},Cki={IconContribution:"base.contributions.icons"};var Sct;(function(t){function e(n,i){let r=n.defaults;for(;ci.isThemeIcon(r);){const o=sR.getIcon(r.id);if(!o)return;r=o.defaults}return r}t.getDefinition=e})(Sct||(Sct={}));var Nct;(function(t){function e(i){return{weight:i.weight,style:i.style,src:i.src.map(r=>({format:r.format,location:r.location.toString()}))}}t.toJSONObject=e;function n(i){const r=o=>Cf(o)?o:void 0;if(i&&Array.isArray(i.src)&&i.src.every(o=>Cf(o.format)&&Cf(o.location)))return{weight:r(i.weight),style:r(i.style),src:i.src.map(o=>({format:o.format,location:ri.parse(o.location)}))}}t.fromJSONObject=n})(Nct||(Nct={}));class Ski{constructor(){this._onDidChange=new st,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:I("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:I("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${ci.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,n,i,r){const o=this.iconsById[e];if(o){if(i&&!o.description){o.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const l=this.iconReferenceSchema.enum.indexOf(e);l!==-1&&(this.iconReferenceSchema.enumDescriptions[l]=i),this._onDidChange.fire()}return o}const s={id:e,description:i,defaults:n,deprecationMessage:r};this.iconsById[e]=s;const a={$ref:"#/definitions/icons"};return r&&(a.deprecationMessage=r),i&&(a.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=a,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(o,s)=>o.id.localeCompare(s.id),n=o=>{for(;ci.isThemeIcon(o.defaults);)o=this.iconsById[o.defaults.id];return`codicon codicon-${o?o.id:""}`},i=[];i.push("| preview     | identifier                        | default codicon ID                | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const r=Object.keys(this.iconsById).map(o=>this.iconsById[o]);for(const o of r.filter(s=>!!s.description).sort(e))i.push(`|<i class="${n(o)}"></i>|${o.id}|${ci.isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|`);i.push("| preview     | identifier                        "),i.push("| ----------- | --------------------------------- |");for(const o of r.filter(s=>!ci.isThemeIcon(s.defaults)).sort(e))i.push(`|<i class="${n(o)}"></i>|${o.id}|`);return i.join(`
`)}}const sR=new Ski;la.add(Cki.IconContribution,sR);function ks(t,e,n,i){return sR.registerIcon(t,e,n,i)}function IFt(){return sR}function Nki(){const t=i4t();for(const e in t){const n="\\"+t[e].toString(16);sR.registerIcon(e,{fontCharacter:n})}}Nki();const AFt="vscode://schemas/icons",RFt=la.as(qfe.JSONContribution);RFt.registerSchema(AFt,sR.getIconSchema());const Ect=new Wo(()=>RFt.notifySchemaChanged(AFt),200);sR.onDidChange(()=>{Ect.isScheduled()||Ect.schedule()});const PFt=ks("widget-close",qt.close,I("widgetClose","Icon for the close action in widgets."));ks("goto-previous-location",qt.arrowUp,I("previousChangeIcon","Icon for goto previous editor location."));ks("goto-next-location",qt.arrowDown,I("nextChangeIcon","Icon for goto next editor location."));ci.modify(qt.sync,"spin");ci.modify(qt.loading,"spin");function Eki(t){const e=new Lt,n=e.add(new st),i=IFt();return e.add(i.onDidChange(()=>n.fire())),t&&e.add(t.onDidProductIconThemeChange(()=>n.fire())),{dispose:()=>e.dispose(),onDidChange:n.event,getCSS(){const r=t?t.getProductIconTheme():new OFt,o={},s=[],a=[];for(const l of i.getIcons()){const c=r.getIcon(l);if(!c)continue;const u=c.font,d=`--vscode-icon-${l.id}-font-family`,h=`--vscode-icon-${l.id}-content`;u?(o[u.id]=u.definition,a.push(`${d}: ${Awe(u.id)};`,`${h}: '${c.fontCharacter}';`),s.push(`.codicon-${l.id}:before { content: '${c.fontCharacter}'; font-family: ${Awe(u.id)}; }`)):(a.push(`${h}: '${c.fontCharacter}'; ${d}: 'codicon';`),s.push(`.codicon-${l.id}:before { content: '${c.fontCharacter}'; }`))}for(const l in o){const c=o[l],u=c.weight?`font-weight: ${c.weight};`:"",d=c.style?`font-style: ${c.style};`:"",h=c.src.map(f=>`${fS(f.location)} format('${f.format}')`).join(", ");s.push(`@font-face { src: ${h}; font-family: ${Awe(l)};${u}${d} font-display: block; }`)}return s.push(`:root { ${a.join(" ")} }`),s.join(`
`)}}}class OFt{getIcon(e){const n=IFt();let i=e.defaults;for(;ci.isThemeIcon(i);){const r=n.getIcon(i.id);if(!r)return;i=r.defaults}return i}}const tC="vs",O3="vs-dark",fI="hc-black",mI="hc-light",jFt=la.as(k3t.ColorContribution),Dki=la.as(J3t.ThemingContribution);class FFt{constructor(e,n){this.semanticHighlighting=!1,this.themeData=n;const i=n.base;e.length>0?(xte(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const n in this.themeData.colors)e.set(n,Rt.fromHex(this.themeData.colors[n]));if(this.themeData.inherit){const n=JIe(this.themeData.base);for(const i in n.colors)e.has(i)||e.set(i,Rt.fromHex(n.colors[i]))}this.colors=e}return this.colors}getColor(e,n){const i=this.getColors().get(e);if(i)return i;if(n!==!1)return this.getDefault(e)}getDefault(e){let n=this.defaultColors[e];return n||(n=jFt.resolveDefaultColor(e,this),this.defaultColors[e]=n,n)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case tC:return qg.LIGHT;case fI:return qg.HIGH_CONTRAST_DARK;case mI:return qg.HIGH_CONTRAST_LIGHT;default:return qg.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],n=[];if(this.themeData.inherit){const o=JIe(this.themeData.base);e=o.rules,o.encodedTokensColors&&(n=o.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],r=this.themeData.colors["editor.background"];if(i||r){const o={token:""};i&&(o.foreground=i),r&&(o.background=r),e.push(o)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(n=this.themeData.encodedTokensColors),this._tokenTheme=TFt.createFromRawTokenTheme(e,n)}return this._tokenTheme}getTokenStyleMetadata(e,n,i){const o=this.tokenTheme._match([e].concat(n).join(".")).metadata,s=mf.getForeground(o),a=mf.getFontStyle(o);return{foreground:s,italic:!!(a&1),bold:!!(a&2),underline:!!(a&4),strikethrough:!!(a&8)}}}function xte(t){return t===tC||t===O3||t===fI||t===mI}function JIe(t){switch(t){case tC:return yki;case O3:return _ki;case fI:return xki;case mI:return wki}}function zQ(t){const e=JIe(t);return new FFt(t,e)}class kki extends ct{constructor(){super(),this._onColorThemeChange=this._register(new st),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new st),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new OFt,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(tC,zQ(tC)),this._knownThemes.set(O3,zQ(O3)),this._knownThemes.set(fI,zQ(fI)),this._knownThemes.set(mI,zQ(mI));const e=this._register(Eki(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}
${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(tC),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),p4t(Go,"(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return Uie(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Wp(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),ct.None}_registerShadowDomContainer(e){const n=Wp(e,i=>{i.className="monaco-colors",i.textContent=this._allCSS});return this._styleElements.push(n),{dispose:()=>{for(let i=0;i<this._styleElements.length;i++)if(this._styleElements[i]===n){this._styleElements.splice(i,1);return}}}}defineTheme(e,n){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!xte(n.base)&&!xte(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new FFt(e,n)),xte(e)&&this._knownThemes.forEach(i=>{i.base===e&&i.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let n;this._knownThemes.has(e)?n=this._knownThemes.get(e):n=this._knownThemes.get(tC),this._updateActualTheme(n)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=Go.matchMedia("(forced-colors: active)").matches;if(e!==S0(this._theme.type)){let n;d5(this._theme.type)?n=e?fI:O3:n=e?mI:tC,this._updateActualTheme(this._knownThemes.get(n))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],n={},i={addRule:s=>{n[s]||(e.push(s),n[s]=!0)}};Dki.getThemingParticipants().forEach(s=>s(this._theme,i,this._environment));const r=[];for(const s of jFt.getColors()){const a=this._theme.getColor(s.id,!0);a&&r.push(`${eVe(s.id)}: ${a.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${r.join(`
`)} }`);const o=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(vki(o)),this._themeCSS=e.join(`
`),this._updateCSS(),Ca.setColorMap(o),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}
${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}const ig=Sr("themeService");var Mki=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},z1e=function(t,e){return function(n,i){e(n,i,t)}};let e2e=class extends ct{constructor(e,n,i){super(),this._contextKeyService=e,this._layoutService=n,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new st,this._onDidChangeReducedMotion=new st,this._onDidChangeLinkUnderline=new st,this._accessibilityModeEnabledContext=Cq.bindTo(this._contextKeyService);const r=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(s=>{s.affectsConfiguration("editor.accessibilitySupport")&&(r(),this._onDidChangeScreenReaderOptimized.fire()),s.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),r(),this._register(this.onDidChangeScreenReaderOptimized(()=>r()));const o=Go.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=o.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._linkUnderlinesEnabled=this._configurationService.getValue("accessibility.underlineLinks"),this.initReducedMotionListeners(o),this.initLinkUnderlineListeners()}initReducedMotionListeners(e){this._register(yt(e,"change",()=>{this._systemMotionReduced=e.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const n=()=>{const i=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("reduce-motion",i),this._layoutService.mainContainer.classList.toggle("enable-motion",!i)};n(),this._register(this.onDidChangeReducedMotion(()=>n()))}initLinkUnderlineListeners(){this._register(this._configurationService.onDidChangeConfiguration(n=>{if(n.affectsConfiguration("accessibility.underlineLinks")){const i=this._configurationService.getValue("accessibility.underlineLinks");this._linkUnderlinesEnabled=i,this._onDidChangeLinkUnderline.fire()}}));const e=()=>{const n=this._linkUnderlinesEnabled;this._layoutService.mainContainer.classList.toggle("underline-links",n)};e(),this._register(this.onDidChangeLinkUnderlines(()=>e()))}onDidChangeLinkUnderlines(e){return this._onDidChangeLinkUnderline.event(e)}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return e==="on"||e==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};e2e=Mki([z1e(0,vi),z1e(1,iM),z1e(2,cr)],e2e);var Tme=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Kx=function(t,e){return function(n,i){e(n,i,t)}},RO,i9;let t2e=class{constructor(e,n,i){this._commandService=e,this._keybindingService=n,this._hiddenStates=new n2e(i)}createMenu(e,n,i){return new moe(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,n)}getMenuActions(e,n,i){const r=new moe(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,n),o=r.getActions(i);return r.dispose(),o}resetHiddenStates(e){this._hiddenStates.reset(e)}};t2e=Tme([Kx(0,gs),Kx(1,vo),Kx(2,Xv)],t2e);var TI;let n2e=(TI=class{constructor(e){this._storageService=e,this._disposables=new Lt,this._onDidChange=new st,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const n=e.get(RO._key,0,"{}");this._data=JSON.parse(n)}catch{this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,RO._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{const n=e.get(RO._key,0,"{}");this._data=JSON.parse(n)}catch(n){console.log("FAILED to read storage after UPDATE",n)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,n){return this._hiddenByDefaultCache.get(`${e.id}/${n}`)??!1}setDefaultState(e,n,i){this._hiddenByDefaultCache.set(`${e.id}/${n}`,i)}isHidden(e,n){var o;const i=this._isHiddenByDefault(e,n),r=((o=this._data[e.id])==null?void 0:o.includes(n))??!1;return i?!r:r}updateHidden(e,n,i){this._isHiddenByDefault(e,n)&&(i=!i);const o=this._data[e.id];if(i)o?o.indexOf(n)<0&&o.push(n):this._data[e.id]=[n];else if(o){const s=o.indexOf(n);s>=0&&Rci(o,s),o.length===0&&delete this._data[e.id]}this._persist()}reset(e){if(e===void 0)this._data=Object.create(null),this._persist();else{for(const{id:n}of e)this._data[n]&&delete this._data[n];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const e=JSON.stringify(this._data);this._storageService.store(RO._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}},RO=TI,TI._key="menu.hiddenCommands",TI);n2e=RO=Tme([Kx(0,Xv)],n2e);class fB{constructor(e,n){this._id=e,this._collectContextKeysForSubmenus=n,this._menuGroups=[],this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const e=this._sort(Oc.getMenuItems(this._id));let n;for(const i of e){const r=i.group||"";(!n||n[0]!==r)&&(n=[r,[]],this._menuGroups.push(n)),n[1].push(i),this._collectContextKeys(i)}}_sort(e){return e}_collectContextKeys(e){if(fB._fillInKbExprKeys(e.when,this._structureContextKeys),v3(e)){if(e.command.precondition&&fB._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){const n=e.command.toggled.condition||e.command.toggled;fB._fillInKbExprKeys(n,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&Oc.getMenuItems(e.submenu).forEach(this._collectContextKeys,this)}static _fillInKbExprKeys(e,n){if(e)for(const i of e.keys())n.add(i)}}let i2e=i9=class extends fB{constructor(e,n,i,r,o,s){super(e,i),this._hiddenStates=n,this._commandService=r,this._keybindingService=o,this._contextKeyService=s,this.refresh()}createActionGroups(e){const n=[];for(const i of this._menuGroups){const[r,o]=i;let s;for(const a of o)if(this._contextKeyService.contextMatchesRules(a.when)){const l=v3(a);l&&this._hiddenStates.setDefaultState(this._id,a.command.id,!!a.isHiddenByDefault);const c=Lki(this._id,l?a.command:a,this._hiddenStates);if(l){const u=$Ft(this._commandService,this._keybindingService,a.command.id,a.when);(s??(s=[])).push(new wm(a.command,a.alt,e,c,u,this._contextKeyService,this._commandService))}else{const u=new i9(a.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(e),d=dc.join(...u.map(h=>h[1]));d.length>0&&(s??(s=[])).push(new y3(a,c,d))}}s&&s.length>0&&n.push([r,s])}return n}_sort(e){return e.sort(i9._compareMenuItems)}static _compareMenuItems(e,n){const i=e.group,r=n.group;if(i!==r){if(i){if(!r)return-1}else return 1;if(i==="navigation")return-1;if(r==="navigation")return 1;const a=i.localeCompare(r);if(a!==0)return a}const o=e.order||0,s=n.order||0;return o<s?-1:o>s?1:i9._compareTitles(v3(e)?e.command.title:e.title,v3(n)?n.command.title:n.title)}static _compareTitles(e,n){const i=typeof e=="string"?e:e.original,r=typeof n=="string"?n:n.original;return i.localeCompare(r)}};i2e=i9=Tme([Kx(3,gs),Kx(4,vo),Kx(5,vi)],i2e);let moe=class{constructor(e,n,i,r,o,s){this._disposables=new Lt,this._menuInfo=new i2e(e,n,i.emitEventsForSubmenuChanges,r,o,s);const a=new Wo(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},i.eventDebounceDelay);this._disposables.add(a),this._disposables.add(Oc.onDidChangeMenu(d=>{d.has(e)&&a.schedule()}));const l=this._disposables.add(new Lt),c=d=>{let h=!1,f=!1,m=!1;for(const p of d)if(h=h||p.isStructuralChange,f=f||p.isEnablementChange,m=m||p.isToggleChange,h&&f&&m)break;return{menu:this,isStructuralChange:h,isEnablementChange:f,isToggleChange:m}},u=()=>{l.add(s.onDidChangeContext(d=>{const h=d.affectsSome(this._menuInfo.structureContextKeys),f=d.affectsSome(this._menuInfo.preconditionContextKeys),m=d.affectsSome(this._menuInfo.toggledContextKeys);(h||f||m)&&this._onDidChange.fire({menu:this,isStructuralChange:h,isEnablementChange:f,isToggleChange:m})})),l.add(n.onDidChange(d=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new qOt({onWillAddFirstListener:u,onDidRemoveLastListener:l.clear.bind(l),delay:i.eventDebounceDelay,merge:c}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};moe=Tme([Kx(3,gs),Kx(4,vo),Kx(5,vi)],moe);function Lki(t,e,n){const i=Yfi(e)?e.submenu.id:e.id,r=typeof e.title=="string"?e.title:e.title.value,o=aI({id:`hide/${t.id}/${i}`,label:I("hide.label","Hide '{0}'",r),run(){n.updateHidden(t,i,!0)}}),s=aI({id:`toggle/${t.id}/${i}`,label:r,get checked(){return!n.isHidden(t,i)},run(){n.updateHidden(t,i,!!this.checked)}});return{hide:o,toggle:s,get isHidden(){return!s.checked}}}function $Ft(t,e,n,i=void 0,r=!0){return aI({id:`configureKeybinding/${n}`,label:I("configure keybinding","Configure Keybinding"),enabled:r,run(){const s=!!!e.lookupKeybinding(n)&&i?i.serialize():void 0;t.executeCommand("workbench.action.openGlobalKeybindings",`@command:${n}`+(s?` +when:${s}`:""))}})}var Tki=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Dct=function(t,e){return function(n,i){e(n,i,t)}},r2e,II;let o2e=(II=class extends ct{constructor(e,n){super(),this.layoutService=e,this.logService=n,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,(dS||g4t)&&this.installWebKitWriteTextWorkaround(),this._register(rn.runAndSubscribe(Ife,({window:i,disposables:r})=>{r.add(yt(i.document,"copy",()=>this.clearResources()))},{window:Go,disposables:this._store}))}installWebKitWriteTextWorkaround(){const e=()=>{const n=new k6;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=n,tte().navigator.clipboard.write([new ClipboardItem({"text/plain":n.p})]).catch(async i=>{(!(i instanceof Error)||i.name!=="NotAllowedError"||!n.isRejected)&&this.logService.error(i)})};this._register(rn.runAndSubscribe(this.layoutService.onDidAddContainer,({container:n,disposables:i})=>{i.add(yt(n,"click",e)),i.add(yt(n,"keydown",e))},{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,n){if(this.writeResources([]),n){this.mapTextToType.set(n,e);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return await tte().navigator.clipboard.writeText(e)}catch(i){console.error(i)}this.fallbackWriteText(e)}fallbackWriteText(e){const n=M6(),i=n.activeElement,r=n.body.appendChild(Xt("textarea",{"aria-hidden":!0}));r.style.height="1px",r.style.width="1px",r.style.position="absolute",r.value=e,r.focus(),r.select(),n.execCommand("copy"),uc(i)&&i.focus(),r.remove()}async readText(e){if(e)return this.mapTextToType.get(e)||"";try{return await tte().navigator.clipboard.readText()}catch(n){console.error(n)}return""}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}async writeResources(e){e.length===0?this.clearResources():(this.resources=e,this.resourcesStateHash=await this.computeResourcesStateHash())}async readResources(){const e=await this.computeResourcesStateHash();return this.resourcesStateHash!==e&&this.clearResources(),this.resources}async computeResourcesStateHash(){if(this.resources.length===0)return;const e=await this.readText();return Lfe(e.substring(0,r2e.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearResources(){this.resources=[],this.resourcesStateHash=void 0}},r2e=II,II.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3,II);o2e=r2e=Tki([Dct(0,iM),Dct(1,Nd)],o2e);const GS=Sr("clipboardService");var Iki=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Aki=function(t,e){return function(n,i){e(n,i,t)}};const mB="data-keybinding-context";let R7e=class{constructor(e,n){this._id=e,this._parent=n,this._value=Object.create(null),this._value._contextId=e}get value(){return{...this._value}}setValue(e,n){return this._value[e]!==n?(this._value[e]=n,!0):!1}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){const n=this._value[e];return typeof n>"u"&&this._parent?this._parent.getValue(e):n}};const fce=class fce extends R7e{constructor(){super(-1,null)}setValue(e,n){return!1}removeValue(e){return!1}getValue(e){}};fce.INSTANCE=new fce;let w5=fce;const iz=class iz extends R7e{constructor(e,n,i){super(e,null),this._configurationService=n,this._values=A3.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(r=>{if(r.source===7){const o=Array.from(this._values,([s])=>s);this._values.clear(),i.fire(new Mct(o))}else{const o=[];for(const s of r.affectedKeys){const a=`config.${s}`,l=this._values.findSuperstr(a);l!==void 0&&(o.push(...Ir.map(l,([c])=>c)),this._values.deleteSuperstr(a)),this._values.has(a)&&(o.push(a),this._values.delete(a))}i.fire(new Mct(o))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(iz._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);const n=e.substr(iz._keyPrefix.length),i=this._configurationService.getValue(n);let r;switch(typeof i){case"number":case"boolean":case"string":r=i;break;default:Array.isArray(i)?r=JSON.stringify(i):r=i}return this._values.set(e,r),r}setValue(e,n){return super.setValue(e,n)}removeValue(e){return super.removeValue(e)}};iz._keyPrefix="config.";let s2e=iz,Rki=class{constructor(e,n,i){this._service=e,this._key=n,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}};class kct{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class Mct{constructor(e){this.keys=e}affectsSome(e){for(const n of this.keys)if(e.has(n))return!0;return!1}allKeysContainedIn(e){return this.keys.every(n=>e.has(n))}}class Pki{constructor(e){this.events=e}affectsSome(e){for(const n of this.events)if(n.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every(n=>n.allKeysContainedIn(e))}}function Oki(t,e){return t.allKeysContainedIn(new Set(Object.keys(e)))}class VFt extends ct{constructor(e){super(),this._onDidChangeContext=this._register(new V2({merge:n=>new Pki(n)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,n){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Rki(this,e,n)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new jki(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const n=this.getContextValuesContainer(this._myContextId);return e?e.evaluate(n):!0}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,n){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,n)&&this._onDidChangeContext.fire(new kct(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new kct(e))}getContext(e){return this._isDisposed?w5.INSTANCE:this.getContextValuesContainer(Fki(e))}dispose(){super.dispose(),this._isDisposed=!0}}let a2e=class extends VFt{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;const n=this._register(new s2e(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,n)}getContextValuesContainer(e){return this._isDisposed?w5.INSTANCE:this._contexts.get(e)||w5.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const n=++this._lastContextId;return this._contexts.set(n,new R7e(n,this.getContextValuesContainer(e))),n}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};a2e=Iki([Aki(0,cr)],a2e);class jki extends VFt{constructor(e,n){if(super(e.createChildContext()),this._parentChangeListener=this._register(new mc),this._parent=e,this._updateParentChangeListener(),this._domNode=n,this._domNode.hasAttribute(mB)){let i="";this._domNode.classList&&(i=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${i?": "+i:""}`)}this._domNode.setAttribute(mB,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(e=>{const i=this._parent.getContextValuesContainer(this._myContextId).value;Oki(e,i)||this._onDidChangeContext.fire(e)})}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(mB),super.dispose())}getContextValuesContainer(e){return this._isDisposed?w5.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}function Fki(t){for(;t;){if(t.hasAttribute(mB)){const e=t.getAttribute(mB);return e?parseInt(e,10):NaN}t=t.parentElement}return 0}function $ki(t,e,n){t.get(vi).createKey(String(e),Vki(n))}function Vki(t){return IOt(t,e=>{if(typeof e=="object"&&e.$mid===1)return ri.revive(e).toString();if(e instanceof ri)return e.toString()})}Ar.registerCommand("_setContext",$ki);Ar.registerCommand({id:"getContextKeyInfo",handler(){return[...gn.all()].sort((t,e)=>t.key.localeCompare(e.key))},metadata:{description:I("getContextKeyInfo","A command that returns information about context keys"),args:[]}});Ar.registerCommand("_generateContextKeyInfo",function(){const t=[],e=new Set;for(const n of gn.all())e.has(n.key)||(e.add(n.key),t.push(n));t.sort((n,i)=>n.key.localeCompare(i.key)),console.log(JSON.stringify(t,void 0,2))});let Bki=class{constructor(e,n){this.key=e,this.data=n,this.incoming=new Map,this.outgoing=new Map}};class Lct{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const n of this._nodes.values())n.outgoing.size===0&&e.push(n);return e}insertEdge(e,n){const i=this.lookupOrInsertNode(e),r=this.lookupOrInsertNode(n);i.outgoing.set(r.key,r),r.incoming.set(i.key,i)}removeNode(e){const n=this._hashFn(e);this._nodes.delete(n);for(const i of this._nodes.values())i.outgoing.delete(n),i.incoming.delete(n)}lookupOrInsertNode(e){const n=this._hashFn(e);let i=this._nodes.get(n);return i||(i=new Bki(n,e),this._nodes.set(n,i)),i}isEmpty(){return this._nodes.size===0}toString(){const e=[];for(const[n,i]of this._nodes)e.push(`${n}
	(-> incoming)[${[...i.incoming.keys()].join(", ")}]
	(outgoing ->)[${[...i.outgoing.keys()].join(",")}]
`);return e.join(`
`)}findCycleSlow(){for(const[e,n]of this._nodes){const i=new Set([e]),r=this._findCycle(n,i);if(r)return r}}_findCycle(e,n){for(const[i,r]of e.outgoing){if(n.has(i))return[...n,i].join(" -> ");n.add(i);const o=this._findCycle(r,n);if(o)return o;n.delete(i)}}}const zki=!1;class Tct extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.findCycleSlow()??`UNABLE to detect cycle, dumping graph: 
${e.toString()}`}}class poe{constructor(e=new Mq,n=!1,i,r=zki){this._services=e,this._strict=n,this._parent=i,this._enableTracing=r,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(qn,this),this._globalGraph=r?(i==null?void 0:i._globalGraph)??new Lct(o=>o):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,Jo(this._children),this._children.clear();for(const e of this._servicesToMaybeDispose)kfe(e)&&e.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(e,n){this._throwIfDisposed();const i=this,r=new class extends poe{dispose(){i._children.delete(r),super.dispose()}}(e,this._strict,this,this._enableTracing);return this._children.add(r),n==null||n.add(r),r}invokeFunction(e,...n){this._throwIfDisposed();const i=pB.traceInvocation(this._enableTracing,e);let r=!1;try{return e({get:s=>{if(r)throw f8e("service accessor is only valid during the invocation of its target method");const a=this._getOrCreateServiceInstance(s,i);if(!a)throw new Error(`[invokeFunction] unknown service '${s}'`);return a}},...n)}finally{r=!0,i.stop()}}createInstance(e,...n){this._throwIfDisposed();let i,r;return e instanceof gx?(i=pB.traceCreation(this._enableTracing,e.ctor),r=this._createInstance(e.ctor,e.staticArguments.concat(n),i)):(i=pB.traceCreation(this._enableTracing,e),r=this._createInstance(e,n,i)),i.stop(),r}_createInstance(e,n=[],i){const r=a0.getServiceDependencies(e).sort((a,l)=>a.index-l.index),o=[];for(const a of r){const l=this._getOrCreateServiceInstance(a.id,i);l||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`,!1),o.push(l)}const s=r.length>0?r[0].index:n.length;if(n.length!==s){console.trace(`[createInstance] First service dependency of ${e.name} at position ${s+1} conflicts with ${n.length} static arguments`);const a=s-n.length;a>0?n=n.concat(new Array(a)):n=n.slice(0,s)}return Reflect.construct(e,n.concat(o))}_setCreatedServiceInstance(e,n){if(this._services.get(e)instanceof gx)this._services.set(e,n);else if(this._parent)this._parent._setCreatedServiceInstance(e,n);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){const n=this._services.get(e);return!n&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):n}_getOrCreateServiceInstance(e,n){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const i=this._getServiceInstanceOrDescriptor(e);return i instanceof gx?this._safeCreateAndCacheServiceInstance(e,i,n.branch(e,!0)):(n.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,n,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,n,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,n,i){var l;const r=new Lct(c=>c.id.toString());let o=0;const s=[{id:e,desc:n,_trace:i}],a=new Set;for(;s.length;){const c=s.pop();if(!a.has(String(c.id))){if(a.add(String(c.id)),r.lookupOrInsertNode(c),o++>1e3)throw new Tct(r);for(const u of a0.getServiceDependencies(c.desc.ctor)){const d=this._getServiceInstanceOrDescriptor(u.id);if(d||this._throwIfStrict(`[createInstance] ${e} depends on ${u.id} which is NOT registered.`,!0),(l=this._globalGraph)==null||l.insertEdge(String(c.id),String(u.id)),d instanceof gx){const h={id:u.id,desc:d,_trace:c._trace.branch(u.id,!0)};r.insertEdge(c,h),s.push(h)}}}}for(;;){const c=r.roots();if(c.length===0){if(!r.isEmpty())throw new Tct(r);break}for(const{data:u}of c){if(this._getServiceInstanceOrDescriptor(u.id)instanceof gx){const h=this._createServiceInstanceWithOwner(u.id,u.desc.ctor,u.desc.staticArguments,u.desc.supportsDelayedInstantiation,u._trace);this._setCreatedServiceInstance(u.id,h)}r.removeNode(u)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,n,i=[],r,o){if(this._services.get(e)instanceof gx)return this._createServiceInstance(e,n,i,r,o,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,n,i,r,o);throw new Error(`illegalState - creating UNKNOWN service instance ${n.name}`)}_createServiceInstance(e,n,i=[],r,o,s){if(r){const a=new poe(void 0,this._strict,this,this._enableTracing);a._globalGraphImplicitDependency=String(e);const l=new Map,c=new xhi(()=>{const u=a._createInstance(n,i,o);for(const[d,h]of l){const f=u[d];if(typeof f=="function")for(const m of h)m.disposable=f.apply(u,m.listener)}return l.clear(),s.add(u),u});return new Proxy(Object.create(null),{get(u,d){if(!c.isInitialized&&typeof d=="string"&&(d.startsWith("onDid")||d.startsWith("onWill"))){let m=l.get(d);return m||(m=new Ch,l.set(d,m)),(g,y,_)=>{if(c.isInitialized)return c.value[d](g,y,_);{const w={listener:[g,y,_],disposable:void 0},C=m.push(w);return Kn(()=>{var E;C(),(E=w.disposable)==null||E.dispose()})}}}if(d in u)return u[d];const h=c.value;let f=h[d];return typeof f!="function"||(f=f.bind(h),u[d]=f),f},set(u,d,h){return c.value[d]=h,!0},getPrototypeOf(u){return n.prototype}})}else{const a=this._createInstance(n,i,o);return s.add(a),a}}_throwIfStrict(e,n){if(n&&console.warn(e),this._strict)throw new Error(e)}}const np=class np{static traceInvocation(e,n){return e?new np(2,n.name||new Error().stack.split(`
`).slice(3,4).join(`
`)):np._None}static traceCreation(e,n){return e?new np(1,n.name):np._None}constructor(e,n){this.type=e,this.name=n,this._start=Date.now(),this._dep=[]}branch(e,n){const i=new np(3,e.toString());return this._dep.push([e,n,i]),i}stop(){const e=Date.now()-this._start;np._totals+=e;let n=!1;function i(o,s){const a=[],l=new Array(o+1).join("	");for(const[c,u,d]of s._dep)if(u&&d){n=!0,a.push(`${l}CREATES -> ${c}`);const h=i(o+1,d);h&&a.push(h)}else a.push(`${l}uses -> ${c}`);return a.join(`
`)}const r=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${i(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${np._totals.toFixed(2)}ms)`];(e>2||n)&&np.all.add(r.join(`
`))}};np.all=new Set,np._None=new class extends np{constructor(){super(0,null)}stop(){}branch(){return this}},np._totals=0;let pB=np;const Hki=new Set([Ti.inMemory,Ti.vscodeSourceControl,Ti.walkThrough,Ti.walkThroughSnippet,Ti.vscodeChatCodeBlock,Ti.vscodeCopilotBackingChatCodeBlock]);class Wki{constructor(){this._byResource=new Xl,this._byOwner=new Map}set(e,n,i){let r=this._byResource.get(e);r||(r=new Map,this._byResource.set(e,r)),r.set(n,i);let o=this._byOwner.get(n);o||(o=new Xl,this._byOwner.set(n,o)),o.set(e,i)}get(e,n){const i=this._byResource.get(e);return i==null?void 0:i.get(n)}delete(e,n){let i=!1,r=!1;const o=this._byResource.get(e);o&&(i=o.delete(n));const s=this._byOwner.get(n);if(s&&(r=s.delete(e)),i!==r)throw new Error("illegal state");return i&&r}values(e){var n,i;return typeof e=="string"?((n=this._byOwner.get(e))==null?void 0:n.values())??Ir.empty():ri.isUri(e)?((i=this._byResource.get(e))==null?void 0:i.values())??Ir.empty():Ir.map(Ir.concat(...this._byOwner.values()),r=>r[1])}}class Uki{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new Xl,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const n of e){const i=this._data.get(n);i&&this._substract(i);const r=this._resourceStats(n);this._add(r),this._data.set(n,r)}}_resourceStats(e){const n={errors:0,warnings:0,infos:0,unknowns:0};if(Hki.has(e.scheme))return n;for(const{severity:i}of this._service.read({resource:e}))i===Da.Error?n.errors+=1:i===Da.Warning?n.warnings+=1:i===Da.Info?n.infos+=1:n.unknowns+=1;return n}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class lE{constructor(){this._onMarkerChanged=new qOt({delay:0,merge:lE._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new Wki,this._stats=new Uki(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,n){for(const i of n||[])this.changeOne(e,i,[])}changeOne(e,n,i){if(DOt(i))this._data.delete(n,e)&&this._onMarkerChanged.fire([n]);else{const r=[];for(const o of i){const s=lE._toMarker(e,n,o);s&&r.push(s)}this._data.set(n,e,r),this._onMarkerChanged.fire([n])}}static _toMarker(e,n,i){let{code:r,severity:o,message:s,source:a,startLineNumber:l,startColumn:c,endLineNumber:u,endColumn:d,relatedInformation:h,tags:f}=i;if(s)return l=l>0?l:1,c=c>0?c:1,u=u>=l?u:l,d=d>0?d:c,{resource:n,owner:e,code:r,severity:o,message:s,source:a,startLineNumber:l,startColumn:c,endLineNumber:u,endColumn:d,relatedInformation:h,tags:f}}changeAll(e,n){const i=[],r=this._data.values(e);if(r)for(const o of r){const s=Ir.first(o);s&&(i.push(s.resource),this._data.delete(s.resource,e))}if(md(n)){const o=new Xl;for(const{resource:s,marker:a}of n){const l=lE._toMarker(e,s,a);if(!l)continue;const c=o.get(s);c?c.push(l):(o.set(s,[l]),i.push(s))}for(const[s,a]of o)this._data.set(s,e,a)}i.length>0&&this._onMarkerChanged.fire(i)}read(e=Object.create(null)){let{owner:n,resource:i,severities:r,take:o}=e;if((!o||o<0)&&(o=-1),n&&i){const s=this._data.get(i,n);if(s){const a=[];for(const l of s)if(lE._accept(l,r)){const c=a.push(l);if(o>0&&c===o)break}return a}else return[]}else if(!n&&!i){const s=[];for(const a of this._data.values())for(const l of a)if(lE._accept(l,r)){const c=s.push(l);if(o>0&&c===o)return s}return s}else{const s=this._data.values(i??n),a=[];for(const l of s)for(const c of l)if(lE._accept(c,r)){const u=a.push(c);if(o>0&&u===o)return a}return a}}static _accept(e,n){return n===void 0||(n&e.severity)===e.severity}static _merge(e){const n=new Xl;for(const i of e)for(const r of i)n.set(r,!0);return Array.from(n.keys())}}class Kki extends ct{get configurationModel(){return this._configurationModel}constructor(e){super(),this.logService=e,this._configurationModel=Jc.createEmptyModel(this.logService)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=Jc.createEmptyModel(this.logService);const e=la.as(Yv.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,n){const i=this.getConfigurationDefaultOverrides();for(const r of e){const o=i[r],s=n[r];o!==void 0?this._configurationModel.setValue(r,o):s?this._configurationModel.setValue(r,s.default):this._configurationModel.removeValue(r)}}}const lM=Sr("accessibilitySignalService"),Xr=class Xr{static register(e){return new Xr(e.fileName)}constructor(e){this.fileName=e}};Xr.error=Xr.register({fileName:"error.mp3"}),Xr.warning=Xr.register({fileName:"warning.mp3"}),Xr.success=Xr.register({fileName:"success.mp3"}),Xr.foldedArea=Xr.register({fileName:"foldedAreas.mp3"}),Xr.break=Xr.register({fileName:"break.mp3"}),Xr.quickFixes=Xr.register({fileName:"quickFixes.mp3"}),Xr.taskCompleted=Xr.register({fileName:"taskCompleted.mp3"}),Xr.taskFailed=Xr.register({fileName:"taskFailed.mp3"}),Xr.terminalBell=Xr.register({fileName:"terminalBell.mp3"}),Xr.diffLineInserted=Xr.register({fileName:"diffLineInserted.mp3"}),Xr.diffLineDeleted=Xr.register({fileName:"diffLineDeleted.mp3"}),Xr.diffLineModified=Xr.register({fileName:"diffLineModified.mp3"}),Xr.chatRequestSent=Xr.register({fileName:"chatRequestSent.mp3"}),Xr.chatResponseReceived1=Xr.register({fileName:"chatResponseReceived1.mp3"}),Xr.chatResponseReceived2=Xr.register({fileName:"chatResponseReceived2.mp3"}),Xr.chatResponseReceived3=Xr.register({fileName:"chatResponseReceived3.mp3"}),Xr.chatResponseReceived4=Xr.register({fileName:"chatResponseReceived4.mp3"}),Xr.clear=Xr.register({fileName:"clear.mp3"}),Xr.save=Xr.register({fileName:"save.mp3"}),Xr.format=Xr.register({fileName:"format.mp3"}),Xr.voiceRecordingStarted=Xr.register({fileName:"voiceRecordingStarted.mp3"}),Xr.voiceRecordingStopped=Xr.register({fileName:"voiceRecordingStopped.mp3"}),Xr.progress=Xr.register({fileName:"progress.mp3"});let Ks=Xr;class qki{constructor(e){this.randomOneOf=e}}const ar=class ar{constructor(e,n,i,r,o,s){this.sound=e,this.name=n,this.legacySoundSettingsKey=i,this.settingsKey=r,this.legacyAnnouncementSettingsKey=o,this.announcementMessage=s}static register(e){const n=new qki("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),i=new ar(n,e.name,e.legacySoundSettingsKey,e.settingsKey,e.legacyAnnouncementSettingsKey,e.announcementMessage);return ar._signals.add(i),i}};ar._signals=new Set,ar.errorAtPosition=ar.register({name:I("accessibilitySignals.positionHasError.name","Error at Position"),sound:Ks.error,announcementMessage:I("accessibility.signals.positionHasError","Error"),settingsKey:"accessibility.signals.positionHasError",delaySettingsKey:"accessibility.signalOptions.delays.errorAtPosition"}),ar.warningAtPosition=ar.register({name:I("accessibilitySignals.positionHasWarning.name","Warning at Position"),sound:Ks.warning,announcementMessage:I("accessibility.signals.positionHasWarning","Warning"),settingsKey:"accessibility.signals.positionHasWarning",delaySettingsKey:"accessibility.signalOptions.delays.warningAtPosition"}),ar.errorOnLine=ar.register({name:I("accessibilitySignals.lineHasError.name","Error on Line"),sound:Ks.error,legacySoundSettingsKey:"audioCues.lineHasError",legacyAnnouncementSettingsKey:"accessibility.alert.error",announcementMessage:I("accessibility.signals.lineHasError","Error on Line"),settingsKey:"accessibility.signals.lineHasError"}),ar.warningOnLine=ar.register({name:I("accessibilitySignals.lineHasWarning.name","Warning on Line"),sound:Ks.warning,legacySoundSettingsKey:"audioCues.lineHasWarning",legacyAnnouncementSettingsKey:"accessibility.alert.warning",announcementMessage:I("accessibility.signals.lineHasWarning","Warning on Line"),settingsKey:"accessibility.signals.lineHasWarning"}),ar.foldedArea=ar.register({name:I("accessibilitySignals.lineHasFoldedArea.name","Folded Area on Line"),sound:Ks.foldedArea,legacySoundSettingsKey:"audioCues.lineHasFoldedArea",legacyAnnouncementSettingsKey:"accessibility.alert.foldedArea",announcementMessage:I("accessibility.signals.lineHasFoldedArea","Folded"),settingsKey:"accessibility.signals.lineHasFoldedArea"}),ar.break=ar.register({name:I("accessibilitySignals.lineHasBreakpoint.name","Breakpoint on Line"),sound:Ks.break,legacySoundSettingsKey:"audioCues.lineHasBreakpoint",legacyAnnouncementSettingsKey:"accessibility.alert.breakpoint",announcementMessage:I("accessibility.signals.lineHasBreakpoint","Breakpoint"),settingsKey:"accessibility.signals.lineHasBreakpoint"}),ar.inlineSuggestion=ar.register({name:I("accessibilitySignals.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:Ks.quickFixes,legacySoundSettingsKey:"audioCues.lineHasInlineSuggestion",settingsKey:"accessibility.signals.lineHasInlineSuggestion"}),ar.terminalQuickFix=ar.register({name:I("accessibilitySignals.terminalQuickFix.name","Terminal Quick Fix"),sound:Ks.quickFixes,legacySoundSettingsKey:"audioCues.terminalQuickFix",legacyAnnouncementSettingsKey:"accessibility.alert.terminalQuickFix",announcementMessage:I("accessibility.signals.terminalQuickFix","Quick Fix"),settingsKey:"accessibility.signals.terminalQuickFix"}),ar.onDebugBreak=ar.register({name:I("accessibilitySignals.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:Ks.break,legacySoundSettingsKey:"audioCues.onDebugBreak",legacyAnnouncementSettingsKey:"accessibility.alert.onDebugBreak",announcementMessage:I("accessibility.signals.onDebugBreak","Breakpoint"),settingsKey:"accessibility.signals.onDebugBreak"}),ar.noInlayHints=ar.register({name:I("accessibilitySignals.noInlayHints","No Inlay Hints on Line"),sound:Ks.error,legacySoundSettingsKey:"audioCues.noInlayHints",legacyAnnouncementSettingsKey:"accessibility.alert.noInlayHints",announcementMessage:I("accessibility.signals.noInlayHints","No Inlay Hints"),settingsKey:"accessibility.signals.noInlayHints"}),ar.taskCompleted=ar.register({name:I("accessibilitySignals.taskCompleted","Task Completed"),sound:Ks.taskCompleted,legacySoundSettingsKey:"audioCues.taskCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.taskCompleted",announcementMessage:I("accessibility.signals.taskCompleted","Task Completed"),settingsKey:"accessibility.signals.taskCompleted"}),ar.taskFailed=ar.register({name:I("accessibilitySignals.taskFailed","Task Failed"),sound:Ks.taskFailed,legacySoundSettingsKey:"audioCues.taskFailed",legacyAnnouncementSettingsKey:"accessibility.alert.taskFailed",announcementMessage:I("accessibility.signals.taskFailed","Task Failed"),settingsKey:"accessibility.signals.taskFailed"}),ar.terminalCommandFailed=ar.register({name:I("accessibilitySignals.terminalCommandFailed","Terminal Command Failed"),sound:Ks.error,legacySoundSettingsKey:"audioCues.terminalCommandFailed",legacyAnnouncementSettingsKey:"accessibility.alert.terminalCommandFailed",announcementMessage:I("accessibility.signals.terminalCommandFailed","Command Failed"),settingsKey:"accessibility.signals.terminalCommandFailed"}),ar.terminalCommandSucceeded=ar.register({name:I("accessibilitySignals.terminalCommandSucceeded","Terminal Command Succeeded"),sound:Ks.success,announcementMessage:I("accessibility.signals.terminalCommandSucceeded","Command Succeeded"),settingsKey:"accessibility.signals.terminalCommandSucceeded"}),ar.terminalBell=ar.register({name:I("accessibilitySignals.terminalBell","Terminal Bell"),sound:Ks.terminalBell,legacySoundSettingsKey:"audioCues.terminalBell",legacyAnnouncementSettingsKey:"accessibility.alert.terminalBell",announcementMessage:I("accessibility.signals.terminalBell","Terminal Bell"),settingsKey:"accessibility.signals.terminalBell"}),ar.notebookCellCompleted=ar.register({name:I("accessibilitySignals.notebookCellCompleted","Notebook Cell Completed"),sound:Ks.taskCompleted,legacySoundSettingsKey:"audioCues.notebookCellCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellCompleted",announcementMessage:I("accessibility.signals.notebookCellCompleted","Notebook Cell Completed"),settingsKey:"accessibility.signals.notebookCellCompleted"}),ar.notebookCellFailed=ar.register({name:I("accessibilitySignals.notebookCellFailed","Notebook Cell Failed"),sound:Ks.taskFailed,legacySoundSettingsKey:"audioCues.notebookCellFailed",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellFailed",announcementMessage:I("accessibility.signals.notebookCellFailed","Notebook Cell Failed"),settingsKey:"accessibility.signals.notebookCellFailed"}),ar.diffLineInserted=ar.register({name:I("accessibilitySignals.diffLineInserted","Diff Line Inserted"),sound:Ks.diffLineInserted,legacySoundSettingsKey:"audioCues.diffLineInserted",settingsKey:"accessibility.signals.diffLineInserted"}),ar.diffLineDeleted=ar.register({name:I("accessibilitySignals.diffLineDeleted","Diff Line Deleted"),sound:Ks.diffLineDeleted,legacySoundSettingsKey:"audioCues.diffLineDeleted",settingsKey:"accessibility.signals.diffLineDeleted"}),ar.diffLineModified=ar.register({name:I("accessibilitySignals.diffLineModified","Diff Line Modified"),sound:Ks.diffLineModified,legacySoundSettingsKey:"audioCues.diffLineModified",settingsKey:"accessibility.signals.diffLineModified"}),ar.chatRequestSent=ar.register({name:I("accessibilitySignals.chatRequestSent","Chat Request Sent"),sound:Ks.chatRequestSent,legacySoundSettingsKey:"audioCues.chatRequestSent",legacyAnnouncementSettingsKey:"accessibility.alert.chatRequestSent",announcementMessage:I("accessibility.signals.chatRequestSent","Chat Request Sent"),settingsKey:"accessibility.signals.chatRequestSent"}),ar.chatResponseReceived=ar.register({name:I("accessibilitySignals.chatResponseReceived","Chat Response Received"),legacySoundSettingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[Ks.chatResponseReceived1,Ks.chatResponseReceived2,Ks.chatResponseReceived3,Ks.chatResponseReceived4]},settingsKey:"accessibility.signals.chatResponseReceived"}),ar.progress=ar.register({name:I("accessibilitySignals.progress","Progress"),sound:Ks.progress,legacySoundSettingsKey:"audioCues.chatResponsePending",legacyAnnouncementSettingsKey:"accessibility.alert.progress",announcementMessage:I("accessibility.signals.progress","Progress"),settingsKey:"accessibility.signals.progress"}),ar.clear=ar.register({name:I("accessibilitySignals.clear","Clear"),sound:Ks.clear,legacySoundSettingsKey:"audioCues.clear",legacyAnnouncementSettingsKey:"accessibility.alert.clear",announcementMessage:I("accessibility.signals.clear","Clear"),settingsKey:"accessibility.signals.clear"}),ar.save=ar.register({name:I("accessibilitySignals.save","Save"),sound:Ks.save,legacySoundSettingsKey:"audioCues.save",legacyAnnouncementSettingsKey:"accessibility.alert.save",announcementMessage:I("accessibility.signals.save","Save"),settingsKey:"accessibility.signals.save"}),ar.format=ar.register({name:I("accessibilitySignals.format","Format"),sound:Ks.format,legacySoundSettingsKey:"audioCues.format",legacyAnnouncementSettingsKey:"accessibility.alert.format",announcementMessage:I("accessibility.signals.format","Format"),settingsKey:"accessibility.signals.format"}),ar.voiceRecordingStarted=ar.register({name:I("accessibilitySignals.voiceRecordingStarted","Voice Recording Started"),sound:Ks.voiceRecordingStarted,legacySoundSettingsKey:"audioCues.voiceRecordingStarted",settingsKey:"accessibility.signals.voiceRecordingStarted"}),ar.voiceRecordingStopped=ar.register({name:I("accessibilitySignals.voiceRecordingStopped","Voice Recording Stopped"),sound:Ks.voiceRecordingStopped,legacySoundSettingsKey:"audioCues.voiceRecordingStopped",settingsKey:"accessibility.signals.voiceRecordingStopped"});let fp=ar;class Gki extends ct{constructor(e,n=[]){super(),this.logger=new Zfi([e,...n]),this._register(e.onDidChangeLogLevel(i=>this.setLevel(i)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...n){this.logger.trace(e,...n)}debug(e,...n){this.logger.debug(e,...n)}info(e,...n){this.logger.info(e,...n)}warn(e,...n){this.logger.warn(e,...n)}error(e,...n){this.logger.error(e,...n)}}const BFt=[];function Bq(t){BFt.push(t)}function Yki(){return BFt.slice(0)}var YS=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Tc=function(t,e){return function(n,i){e(n,i,t)}};class Xki{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new st}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let l2e=class{constructor(e){this.modelService=e}createModelReference(e){const n=this.modelService.getModel(e);return n?Promise.resolve(new ndi(new Xki(n))):Promise.reject(new Error("Model not found"))}};l2e=YS([Tc(0,Ds)],l2e);const mce=class mce{show(){return mce.NULL_PROGRESS_RUNNER}async showWhile(e,n){await e}};mce.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};let c2e=mce;class Zki{withProgress(e,n,i){return n({report:()=>{}})}}class Qki{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}}class Jki{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,n){let i=e;return n&&(i=i+`

`+n),Go.confirm(i)}async prompt(e){var r;let n;if(this.doConfirm(e.message,e.detail)){const o=[...e.buttons??[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&o.push(e.cancelButton),n=await((r=o[0])==null?void 0:r.run({checkboxChecked:!1}))}return{result:n}}async error(e,n){await this.prompt({type:qa.Error,message:e,detail:n})}}const rz=class rz{info(e){return this.notify({severity:qa.Info,message:e})}warn(e){return this.notify({severity:qa.Warning,message:e})}error(e){return this.notify({severity:qa.Error,message:e})}notify(e){switch(e.severity){case qa.Error:console.error(e.message);break;case qa.Warning:console.warn(e.message);break;default:console.log(e.message);break}return rz.NO_OP}prompt(e,n,i,r){return rz.NO_OP}status(e,n){return ct.None}};rz.NO_OP=new d1i;let u2e=rz,d2e=class{constructor(e){this._onWillExecuteCommand=new st,this._onDidExecuteCommand=new st,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...n){const i=Ar.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:n});const r=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...n]);return this._onDidExecuteCommand.fire({commandId:e,args:n}),Promise.resolve(r)}catch(r){return Promise.reject(r)}}};d2e=YS([Tc(0,qn)],d2e);let C5=class extends MSi{constructor(e,n,i,r,o,s){super(e,n,i,r,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const a=f=>{const m=new Lt;m.add(yt(f,Yt.KEY_DOWN,p=>{const g=new as(p);this._dispatch(g,g.target)&&(g.preventDefault(),g.stopPropagation())})),m.add(yt(f,Yt.KEY_UP,p=>{const g=new as(p);this._singleModifierDispatch(g,g.target)&&g.preventDefault()})),this._domNodeListeners.push(new eMi(f,m))},l=f=>{for(let m=0;m<this._domNodeListeners.length;m++){const p=this._domNodeListeners[m];p.domNode===f&&(this._domNodeListeners.splice(m,1),p.dispose())}},c=f=>{f.getOption(61)||a(f.getContainerDomNode())},u=f=>{f.getOption(61)||l(f.getContainerDomNode())};this._register(s.onCodeEditorAdd(c)),this._register(s.onCodeEditorRemove(u)),s.listCodeEditors().forEach(c);const d=f=>{a(f.getContainerDomNode())},h=f=>{l(f.getContainerDomNode())};this._register(s.onDiffEditorAdd(d)),this._register(s.onDiffEditorRemove(h)),s.listDiffEditors().forEach(d)}addDynamicKeybinding(e,n,i,r){return yv(Ar.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:n,command:e,when:r}]))}addDynamicKeybindings(e){const n=e.map(i=>({keybinding:yLe(i.keybinding,pm),command:i.command??null,commandArgs:i.commandArgs,when:i.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(n),this.updateResolver(),Kn(()=>{for(let i=0;i<this._dynamicKeybindings.length;i++)if(this._dynamicKeybindings[i]===n[0]){this._dynamicKeybindings.splice(i,n.length),this.updateResolver();return}})}updateResolver(){this._cachedResolver=null,this._onDidUpdateKeybindings.fire()}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(Bh.getDefaultKeybindings(),!0),n=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new cB(e,n,i=>this._log(i))}return this._cachedResolver}_documentHasFocus(){return Go.document.hasFocus()}_toNormalizedKeybindingItems(e,n){const i=[];let r=0;for(const o of e){const s=o.when||void 0,a=o.keybinding;if(!a)i[r++]=new Blt(void 0,o.command,o.commandArgs,s,n,null,!1);else{const l=iW.resolveKeybinding(a,pm);for(const c of l)i[r++]=new Blt(c,o.command,o.commandArgs,s,n,null,!1)}}return i}resolveKeyboardEvent(e){const n=new hS(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new iW([n],pm)}};C5=YS([Tc(0,vi),Tc(1,gs),Tc(2,eh),Tc(3,tl),Tc(4,Nd),Tc(5,Yr)],C5);class eMi extends ct{constructor(e,n){super(),this.domNode=e,this._register(n)}}function Ict(t){return t&&typeof t=="object"&&(!t.overrideIdentifier||typeof t.overrideIdentifier=="string")&&(!t.resource||t.resource instanceof ri)}let goe=class{constructor(e){this.logService=e,this._onDidChangeConfiguration=new st,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const n=new Kki(e);this._configuration=new N5t(n.reload(),Jc.createEmptyModel(e),Jc.createEmptyModel(e),Jc.createEmptyModel(e),Jc.createEmptyModel(e),Jc.createEmptyModel(e),new Xl,Jc.createEmptyModel(e),new Xl,e),n.dispose()}getValue(e,n){const i=typeof e=="string"?e:void 0,r=Ict(e)?e:Ict(n)?n:{};return this._configuration.getValue(i,r,void 0)}updateValues(e){const n={data:this._configuration.toData()},i=[];for(const r of e){const[o,s]=r;this.getValue(o)!==s&&(this._configuration.updateValue(o,s),i.push(o))}if(i.length>0){const r=new NSi({keys:i,overrides:[]},n,this._configuration,void 0,this.logService);r.source=8,this._onDidChangeConfiguration.fire(r)}return Promise.resolve()}updateValue(e,n,i,r){return this.updateValues([[e,n]])}inspect(e,n={}){return this._configuration.inspect(e,n,void 0)}};goe=YS([Tc(0,Nd)],goe);let h2e=class{constructor(e,n,i){this.configurationService=e,this.modelService=n,this.languageService=i,this._onDidChangeConfiguration=new st,this.configurationService.onDidChangeConfiguration(r=>{this._onDidChangeConfiguration.fire({affectedKeys:r.affectedKeys,affectsConfiguration:(o,s)=>r.affectsConfiguration(s)})})}getValue(e,n,i){const r=ot.isIPosition(n)?n:null,o=r?typeof i=="string"?i:void 0:typeof n=="string"?n:void 0,s=e?this.getLanguage(e,r):void 0;return typeof o>"u"?this.configurationService.getValue({resource:e,overrideIdentifier:s}):this.configurationService.getValue(o,{resource:e,overrideIdentifier:s})}getLanguage(e,n){const i=this.modelService.getModel(e);return i?n?i.getLanguageIdAtPosition(n.lineNumber,n.column):i.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};h2e=YS([Tc(0,cr),Tc(1,Ds),Tc(2,Qs)],h2e);let f2e=class{constructor(e){this.configurationService=e}getEOL(e,n){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:n,resource:e});return i&&typeof i=="string"&&i!=="auto"?i:$h||xr?`
`:`\r
`}};f2e=YS([Tc(0,cr)],f2e);class tMi{publicLog2(){}}const oz=class oz{constructor(){const e=ri.from({scheme:oz.SCHEME,authority:"model",path:"/"});this.workspace={id:k5t,folders:[new HSi({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===oz.SCHEME?this.workspace.folders[0]:null}};oz.SCHEME="inmemory";let m2e=oz;function boe(t,e,n){if(!e||!(t instanceof goe))return;const i=[];Object.keys(e).forEach(r=>{_Si(r)&&i.push([`editor.${r}`,e[r]]),n&&xSi(r)&&i.push([`diffEditor.${r}`,e[r]])}),i.length>0&&t.updateValues(i)}let p2e=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,n){const i=Array.isArray(e)?e:s7e.convert(e),r=new Map;for(const a of i){if(!(a instanceof vD))throw new Error("bad edit - only text edits are supported");const l=this._modelService.getModel(a.resource);if(!l)throw new Error("bad edit - model not found");if(typeof a.versionId=="number"&&l.getVersionId()!==a.versionId)throw new Error("bad state - model changed in the meantime");let c=r.get(l);c||(c=[],r.set(l,c)),c.push(ia.replaceMove(ve.lift(a.textEdit.range),a.textEdit.text))}let o=0,s=0;for(const[a,l]of r)a.pushStackElement(),a.pushEditOperations([],l,()=>[]),a.pushStackElement(),s+=1,o+=l.length;return{ariaSummary:B2(lIe.bulkEditServiceSummary,o,s),isApplied:o>0}}};p2e=YS([Tc(0,Ds)],p2e);class nMi{getUriLabel(e,n){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return cb(e)}}let g2e=class extends pSi{constructor(e,n){super(e),this._codeEditorService=n}showContextView(e,n,i){if(!n){const r=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();r&&(n=r.getContainerDomNode())}return super.showContextView(e,n,i)}};g2e=YS([Tc(0,iM),Tc(1,Yr)],g2e);class iMi{constructor(){this._neverEmitter=new st,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class rMi extends uIe{constructor(){super()}}class oMi extends Gki{constructor(){super(new Xfi)}}let b2e=class extends SIe{constructor(e,n,i,r,o,s){super(e,n,i,r,o,s),this.configure({blockMouse:!1})}};b2e=YS([Tc(0,eh),Tc(1,tl),Tc(2,US),Tc(3,vo),Tc(4,Jp),Tc(5,vi)],b2e);class sMi{async playSignal(e,n){}}Rr(Nd,oMi,0);Rr(cr,goe,0);Rr(q8e,h2e,0);Rr(_3t,f2e,0);Rr(Z2,m2e,0);Rr(g5,nMi,0);Rr(eh,tMi,0);Rr(Lq,Jki,0);Rr(KVe,Qki,0);Rr(tl,u2e,0);Rr(Ow,lE,0);Rr(Qs,rMi,0);Rr(ig,kki,0);Rr(Ds,LIe,0);Rr(J8e,MIe,0);Rr(vi,a2e,0);Rr(D5t,Zki,0);Rr(oM,c2e,0);Rr(Xv,nEi,0);Rr(xb,WLe,0);Rr(Iq,p2e,0);Rr(M5t,iMi,0);Rr(Rf,l2e,0);Rr(Bm,e2e,0);Rr(Cb,BDi,0);Rr(gs,d2e,0);Rr(vo,C5,0);Rr(wb,ZIe,0);Rr(US,g2e,0);Rr(Wm,kIe,0);Rr(GS,o2e,0);Rr(Hm,b2e,0);Rr(Jp,t2e,0);Rr(lM,sMi,0);var wi;(function(t){const e=new Mq;for(const[l,c]of lst())e.set(l,c);const n=new poe(e,!0);e.set(qn,n);function i(l){r||s({});const c=e.get(l);if(!c)throw new Error("Missing service "+l);return c instanceof gx?n.invokeFunction(u=>u.get(l)):c}t.get=i;let r=!1;const o=new st;function s(l){if(r)return n;r=!0;for(const[u,d]of lst())e.get(u)||e.set(u,d);for(const u in l)if(l.hasOwnProperty(u)){const d=Sr(u);e.get(d)instanceof gx&&e.set(d,l[u])}const c=Yki();for(const u of c)try{n.createInstance(u)}catch(d){ji(d)}return o.fire(),n}t.initialize=s;function a(l){if(r)return l();const c=new Lt,u=c.add(o.event(()=>{u.dispose(),c.add(l())}));return c}t.withServices=a})(wi||(wi={}));class J0{static capture(e){if(e.getScrollTop()===0||e.hasPendingScrollAnimation())return new J0(e.getScrollTop(),e.getContentHeight(),null,0,null);let n=null,i=0;const r=e.getVisibleRanges();if(r.length>0){n=r[0].getStartPosition();const o=e.getTopForPosition(n.lineNumber,n.column);i=e.getScrollTop()-o}return new J0(e.getScrollTop(),e.getContentHeight(),n,i,e.getPosition())}constructor(e,n,i,r,o){this._initialScrollTop=e,this._initialContentHeight=n,this._visiblePosition=i,this._visiblePositionScrollDelta=r,this._cursorPosition=o}restore(e){if(!(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())&&this._visiblePosition){const n=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(n+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const n=e.getPosition();if(!this._cursorPosition||!n)return;const i=e.getTopForLineNumber(n.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i,1)}}function aMi(t,e,n,i){if(t.length===0)return e;if(e.length===0)return t;const r=[];let o=0,s=0;for(;o<t.length&&s<e.length;){const a=t[o],l=e[s],c=n(a),u=n(l);c<u?(r.push(a),o++):c>u?(r.push(l),s++):(r.push(i(a,l)),o++,s++)}for(;o<t.length;)r.push(t[o]),o++;for(;s<e.length;)r.push(e[s]),s++;return r}function voe(t,e){const n=new Lt,i=t.createDecorationsCollection();return n.add(Oq({debugName:()=>`Apply decorations from ${e.debugName}`},r=>{const o=e.read(r);i.set(o)})),n.add({dispose:()=>{i.clear()}}),n}function x4(t,e){return t.appendChild(e),Kn(()=>{e.remove()})}function lMi(t,e){return t.prepend(e),Kn(()=>{e.remove()})}class zFt extends ct{get width(){return this._width}get height(){return this._height}get automaticLayout(){return this._automaticLayout}constructor(e,n){super(),this._automaticLayout=!1,this.elementSizeObserver=this._register(new D3t(e,n)),this._width=lr(this,this.elementSizeObserver.getWidth()),this._height=lr(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(i=>ma(r=>{this._width.set(this.elementSizeObserver.getWidth(),r),this._height.set(this.elementSizeObserver.getHeight(),r)})))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){this._automaticLayout=e,e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function Act(t,e,n){let i=e.get(),r=i,o=i;const s=lr("animatedValue",i);let a=-1;const l=300;let c;n.add(jq({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(d,h)=>(d.didChange(e)&&(h.animate=h.animate||d.change),!0)},(d,h)=>{c!==void 0&&(t.cancelAnimationFrame(c),c=void 0),r=o,i=e.read(d),a=Date.now()-(h.animate?0:l),u()}));function u(){const d=Date.now()-a;o=Math.floor(cMi(d,r,i-r,l)),d<l?c=t.requestAnimationFrame(u):o=i,s.set(o,void 0)}return s}function cMi(t,e,n,i){return t===i?e+n:n*(-Math.pow(2,-10*t/i)+1)+e}class P7e extends ct{constructor(e,n,i){super(),this._register(new v2e(e,i)),this._register(gS(i,{height:n.actualHeight,top:n.actualTop}))}}class w4{get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,n){this._afterLineNumber=e,this.heightInPx=n,this.domNode=document.createElement("div"),this._actualTop=lr(this,void 0),this._actualHeight=lr(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=i=>{this._actualTop.set(i,void 0)},this.onComputedHeight=i=>{this._actualHeight.set(i,void 0)}}}const pce=class pce{constructor(e,n){this._editor=e,this._domElement=n,this._overlayWidgetId=`managedOverlayWidget-${pce._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}};pce._counter=0;let v2e=pce;function gS(t,e){return ki(n=>{for(let[i,r]of Object.entries(e))r&&typeof r=="object"&&"read"in r&&(r=r.read(n)),typeof r=="number"&&(r=`${r}px`),i=i.replace(/[A-Z]/g,o=>"-"+o.toLowerCase()),t.style[i]=r})}function yoe(t,e,n,i){const r=new Lt,o=[];return r.add(Sf((s,a)=>{const l=e.read(s),c=new Map,u=new Map;n&&n(!0),t.changeViewZones(d=>{for(const h of o)d.removeZone(h),i==null||i.delete(h);o.length=0;for(const h of l){const f=d.addZone(h);h.setZoneId&&h.setZoneId(f),o.push(f),i==null||i.add(f),c.set(h,f)}}),n&&n(!1),a.add(jq({createEmptyChangeSummary(){return{zoneIds:[]}},handleChange(d,h){const f=u.get(d.changedObservable);return f!==void 0&&h.zoneIds.push(f),!0}},(d,h)=>{for(const f of l)f.onChange&&(u.set(f.onChange,c.get(f)),f.onChange.read(d));n&&n(!0),t.changeViewZones(f=>{for(const m of h.zoneIds)f.layoutZone(m)}),n&&n(!1)}))})),r.add({dispose(){n&&n(!0),t.changeViewZones(s=>{for(const a of o)s.removeZone(a)}),i==null||i.clear(),n&&n(!1)}}),r}class uMi extends oa{dispose(){super.dispose(!0)}}function Rct(t,e){const n=MH(e,r=>r.original.startLineNumber<=t.lineNumber);if(!n)return ve.fromPositions(t);if(n.original.endLineNumberExclusive<=t.lineNumber){const r=t.lineNumber-n.original.endLineNumberExclusive+n.modified.endLineNumberExclusive;return ve.fromPositions(new ot(r,t.column))}if(!n.innerChanges)return ve.fromPositions(new ot(n.modified.startLineNumber,1));const i=MH(n.innerChanges,r=>r.originalRange.getStartPosition().isBeforeOrEqual(t));if(!i){const r=t.lineNumber-n.original.startLineNumber+n.modified.startLineNumber;return ve.fromPositions(new ot(r,t.column))}if(i.originalRange.containsPosition(t))return i.modifiedRange;{const r=dMi(i.originalRange.getEndPosition(),t);return ve.fromPositions(r.addToPosition(i.modifiedRange.getEndPosition()))}}function dMi(t,e){return t.lineNumber===e.lineNumber?new Av(0,e.column-t.column):new Av(e.lineNumber-t.lineNumber,e.column-1)}function hMi(t,e){let n;return t.filter(i=>{const r=e(i,n);return n=i,r})}class _oe{static create(e,n=void 0){return new Pct(e,e,n)}static createWithDisposable(e,n,i=void 0){const r=new Lt;return r.add(n),r.add(e),new Pct(e,r,i)}}class Pct extends _oe{constructor(e,n,i){super(),this.object=e,this._disposable=n,this._debugOwner=i,this._refCount=1,this._isDisposed=!1,this._owners=[],i&&this._addOwner(i)}_addOwner(e){e&&this._owners.push(e)}createNewRef(e){return this._refCount++,e&&this._addOwner(e),new fMi(this,e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._decreaseRefCount(this._debugOwner))}_decreaseRefCount(e){if(this._refCount--,this._refCount===0&&this._disposable.dispose(),e){const n=this._owners.indexOf(e);n!==-1&&this._owners.splice(n,1)}}}class fMi extends _oe{constructor(e,n){super(),this._base=e,this._debugOwner=n,this._isDisposed=!1}get object(){return this._base.object}createNewRef(e){return this._base.createNewRef(e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._base._decreaseRefCount(this._debugOwner))}}var O7e=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},j7e=function(t,e){return function(n,i){e(n,i,t)}};const mMi=ks("diff-review-insert",qt.add,I("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer.")),pMi=ks("diff-review-remove",qt.remove,I("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer.")),gMi=ks("diff-review-close",qt.close,I("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer."));var J3;let VT=(J3=class extends ct{constructor(e,n,i,r,o,s,a,l,c){super(),this._parentNode=e,this._visible=n,this._setVisible=i,this._canClose=r,this._width=o,this._height=s,this._diffs=a,this._models=l,this._instantiationService=c,this._state=sM(this,(u,d)=>{const h=this._visible.read(u);if(this._parentNode.style.visibility=h?"visible":"hidden",!h)return null;const f=d.add(this._instantiationService.createInstance(y2e,this._diffs,this._models,this._setVisible,this._canClose)),m=d.add(this._instantiationService.createInstance(_2e,this._parentNode,f,this._width,this._height,this._models));return{model:f,view:m}}).recomputeInitiallyAndOnChange(this._store)}next(){ma(e=>{const n=this._visible.get();this._setVisible(!0,e),n&&this._state.get().model.nextGroup(e)})}prev(){ma(e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)})}close(){ma(e=>{this._setVisible(!1,e)})}},J3._ttPolicy=WS("diffReview",{createHTML:e=>e}),J3);VT=O7e([j7e(8,qn)],VT);let y2e=class extends ct{constructor(e,n,i,r,o){super(),this._diffs=e,this._models=n,this._setVisible=i,this.canClose=r,this._accessibilitySignalService=o,this._groups=lr(this,[]),this._currentGroupIdx=lr(this,0),this._currentElementIdx=lr(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((s,a)=>this._groups.read(a)[s]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((s,a)=>{var l;return(l=this.currentGroup.read(a))==null?void 0:l.lines[s]}),this._register(ki(s=>{const a=this._diffs.read(s);if(!a){this._groups.set([],void 0);return}const l=bMi(a,this._models.getOriginalModel().getLineCount(),this._models.getModifiedModel().getLineCount());ma(c=>{const u=this._models.getModifiedPosition();if(u){const d=l.findIndex(h=>(u==null?void 0:u.lineNumber)<h.range.modified.endLineNumberExclusive);d!==-1&&this._currentGroupIdx.set(d,c)}this._groups.set(l,c)})})),this._register(ki(s=>{const a=this.currentElement.read(s);(a==null?void 0:a.type)===_h.Deleted?this._accessibilitySignalService.playSignal(fp.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):(a==null?void 0:a.type)===_h.Added&&this._accessibilitySignalService.playSignal(fp.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register(ki(s=>{const a=this.currentElement.read(s);if(a&&a.type!==_h.Header){const l=a.modifiedLineNumber??a.diff.modified.startLineNumber;this._models.modifiedSetSelection(ve.fromPositions(new ot(l,1)))}}))}_goToGroupDelta(e,n){const i=this.groups.get();!i||i.length<=1||Q2(n,r=>{this._currentGroupIdx.set(dr.ofLength(i.length).clipCyclic(this._currentGroupIdx.get()+e),r),this._currentElementIdx.set(0,r)})}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const n=this.currentGroup.get();!n||n.lines.length<=1||ma(i=>{this._currentElementIdx.set(dr.ofLength(n.lines.length).clip(this._currentElementIdx.get()+e),i)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const n=this.currentGroup.get();if(!n)return;const i=n.lines.indexOf(e);i!==-1&&ma(r=>{this._currentElementIdx.set(i,r)})}revealCurrentElementInEditor(){if(!this.canClose.get())return;this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===_h.Deleted?this._models.originalReveal(ve.fromPositions(new ot(e.originalLineNumber,1))):this._models.modifiedReveal(e.type!==_h.Header?ve.fromPositions(new ot(e.modifiedLineNumber,1)):void 0))}close(){this.canClose.get()&&(this._setVisible(!1,void 0),this._models.modifiedFocus())}};y2e=O7e([j7e(4,lM)],y2e);const i7=3;function bMi(t,e,n){const i=[];for(const r of o8e(t,(o,s)=>s.modified.startLineNumber-o.modified.endLineNumberExclusive<2*i7)){const o=[];o.push(new yMi);const s=new Ki(Math.max(1,r[0].original.startLineNumber-i7),Math.min(r[r.length-1].original.endLineNumberExclusive+i7,e+1)),a=new Ki(Math.max(1,r[0].modified.startLineNumber-i7),Math.min(r[r.length-1].modified.endLineNumberExclusive+i7,n+1));EOt(r,(u,d)=>{const h=new Ki(u?u.original.endLineNumberExclusive:s.startLineNumber,d?d.original.startLineNumber:s.endLineNumberExclusive),f=new Ki(u?u.modified.endLineNumberExclusive:a.startLineNumber,d?d.modified.startLineNumber:a.endLineNumberExclusive);h.forEach(m=>{o.push(new wMi(m,f.startLineNumber+(m-h.startLineNumber)))}),d&&(d.original.forEach(m=>{o.push(new _Mi(d,m))}),d.modified.forEach(m=>{o.push(new xMi(d,m))}))});const l=r[0].modified.join(r[r.length-1].modified),c=r[0].original.join(r[r.length-1].original);i.push(new vMi(new zd(l,c),o))}return i}var _h;(function(t){t[t.Header=0]="Header",t[t.Unchanged=1]="Unchanged",t[t.Deleted=2]="Deleted",t[t.Added=3]="Added"})(_h||(_h={}));class vMi{constructor(e,n){this.range=e,this.lines=n}}class yMi{constructor(){this.type=_h.Header}}class _Mi{constructor(e,n){this.diff=e,this.originalLineNumber=n,this.type=_h.Deleted,this.modifiedLineNumber=void 0}}class xMi{constructor(e,n){this.diff=e,this.modifiedLineNumber=n,this.type=_h.Added,this.originalLineNumber=void 0}}class wMi{constructor(e,n){this.originalLineNumber=e,this.modifiedLineNumber=n,this.type=_h.Unchanged}}let _2e=class extends ct{constructor(e,n,i,r,o,s){super(),this._element=e,this._model=n,this._width=i,this._height=r,this._models=o,this._languageService=s,this.domNode=this._element,this.domNode.className="monaco-component diff-review monaco-editor-background";const a=document.createElement("div");a.className="diff-review-actions",this._actionBar=this._register(new Ap(a)),this._register(ki(l=>{this._actionBar.clear(),this._model.canClose.read(l)&&this._actionBar.push(new xm("diffreview.close",I("label.close","Close"),"close-diff-review "+ci.asClassName(gMi),!0,async()=>n.close()),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new Eq(this._content,{})),ou(this.domNode,this._scrollbar.getDomNode(),a),this._register(ki(l=>{this._height.read(l),this._width.read(l),this._scrollbar.scanDomNode()})),this._register(Kn(()=>{ou(this.domNode)})),this._register(gS(this.domNode,{width:this._width,height:this._height})),this._register(gS(this._content,{width:this._width,height:this._height})),this._register(Sf((l,c)=>{this._model.currentGroup.read(l),this._render(c)})),this._register(Fa(this.domNode,"keydown",l=>{(l.equals(18)||l.equals(2066)||l.equals(530))&&(l.preventDefault(),this._model.goToNextLine()),(l.equals(16)||l.equals(2064)||l.equals(528))&&(l.preventDefault(),this._model.goToPreviousLine()),(l.equals(9)||l.equals(2057)||l.equals(521)||l.equals(1033))&&(l.preventDefault(),this._model.close()),(l.equals(10)||l.equals(3))&&(l.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(e){const n=this._models.getOriginalOptions(),i=this._models.getModifiedOptions(),r=document.createElement("div");r.className="diff-review-table",r.setAttribute("role","list"),r.setAttribute("aria-label",I("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate.")),su(r,i.get(50)),ou(this._content,r);const o=this._models.getOriginalModel(),s=this._models.getModifiedModel();if(!o||!s)return;const a=o.getOptions(),l=s.getOptions(),c=i.get(67),u=this._model.currentGroup.get();for(const d of(u==null?void 0:u.lines)||[]){if(!u)break;let h;if(d.type===_h.Header){const m=document.createElement("div");m.className="diff-review-row",m.setAttribute("role","listitem");const p=u.range,g=this._model.currentGroupIndex.get(),y=this._model.groups.get().length,_=E=>E===0?I("no_lines_changed","no lines changed"):E===1?I("one_line_changed","1 line changed"):I("more_lines_changed","{0} lines changed",E),w=_(p.original.length),C=_(p.modified.length);m.setAttribute("aria-label",I({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",g+1,y,p.original.startLineNumber,w,p.modified.startLineNumber,C));const N=document.createElement("div");N.className="diff-review-cell diff-review-summary",N.appendChild(document.createTextNode(`${g+1}/${y}: @@ -${p.original.startLineNumber},${p.original.length} +${p.modified.startLineNumber},${p.modified.length} @@`)),m.appendChild(N),h=m}else h=this._createRow(d,c,this._width.get(),n,o,a,i,s,l);r.appendChild(h);const f=Vn(m=>this._model.currentElement.read(m)===d);e.add(ki(m=>{const p=f.read(m);h.tabIndex=p?0:-1,p&&h.focus()})),e.add(yt(h,"focus",()=>{this._model.goToLine(d)}))}this._scrollbar.scanDomNode()}_createRow(e,n,i,r,o,s,a,l,c){const u=r.get(146),d=u.glyphMarginWidth+u.lineNumbersWidth,h=a.get(146),f=10+h.glyphMarginWidth+h.lineNumbersWidth;let m="diff-review-row",p="";const g="diff-review-spacer";let y=null;switch(e.type){case _h.Added:m="diff-review-row line-insert",p=" char-insert",y=mMi;break;case _h.Deleted:m="diff-review-row line-delete",p=" char-delete",y=pMi;break}const _=document.createElement("div");_.style.minWidth=i+"px",_.className=m,_.setAttribute("role","listitem"),_.ariaLevel="";const w=document.createElement("div");w.className="diff-review-cell",w.style.height=`${n}px`,_.appendChild(w);const C=document.createElement("span");C.style.width=d+"px",C.style.minWidth=d+"px",C.className="diff-review-line-number"+p,e.originalLineNumber!==void 0?C.appendChild(document.createTextNode(String(e.originalLineNumber))):C.innerText=" ",w.appendChild(C);const N=document.createElement("span");N.style.width=f+"px",N.style.minWidth=f+"px",N.style.paddingRight="10px",N.className="diff-review-line-number"+p,e.modifiedLineNumber!==void 0?N.appendChild(document.createTextNode(String(e.modifiedLineNumber))):N.innerText=" ",w.appendChild(N);const E=document.createElement("span");if(E.className=g,y){const M=document.createElement("span");M.className=ci.asClassName(y),M.innerText="  ",E.appendChild(M)}else E.innerText="  ";w.appendChild(E);let D;if(e.modifiedLineNumber!==void 0){let M=this._getLineHtml(l,a,c.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);VT._ttPolicy&&(M=VT._ttPolicy.createHTML(M)),w.insertAdjacentHTML("beforeend",M),D=l.getLineContent(e.modifiedLineNumber)}else{let M=this._getLineHtml(o,r,s.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);VT._ttPolicy&&(M=VT._ttPolicy.createHTML(M)),w.insertAdjacentHTML("beforeend",M),D=o.getLineContent(e.originalLineNumber)}D.length===0&&(D=I("blankLine","blank"));let k="";switch(e.type){case _h.Unchanged:e.originalLineNumber===e.modifiedLineNumber?k=I({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",D,e.originalLineNumber):k=I("equalLine","{0} original line {1} modified line {2}",D,e.originalLineNumber,e.modifiedLineNumber);break;case _h.Added:k=I("insertLine","+ {0} modified line {1}",D,e.modifiedLineNumber);break;case _h.Deleted:k=I("deleteLine","- {0} original line {1}",D,e.originalLineNumber);break}return _.setAttribute("aria-label",k),_}_getLineHtml(e,n,i,r,o){const s=e.getLineContent(r),a=n.get(50),l=$u.createEmpty(s,o),c=Up.isBasicASCII(s,e.mightContainNonBasicASCII()),u=Up.containsRTL(s,c,e.mightContainRTL());return Yfe(new nM(a.isMonospace&&!n.get(33),a.canUseHalfwidthRightwardsArrow,s,!1,c,u,0,l,[],i,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,n.get(118),n.get(100),n.get(95),n.get(51)!==sk.OFF,null)).html}};_2e=O7e([j7e(5,Qs)],_2e);class CMi{constructor(e){this.editors=e}getOriginalModel(){return this.editors.original.getModel()}getOriginalOptions(){return this.editors.original.getOptions()}originalReveal(e){this.editors.original.revealRange(e),this.editors.original.setSelection(e),this.editors.original.focus()}getModifiedModel(){return this.editors.modified.getModel()}getModifiedOptions(){return this.editors.modified.getOptions()}modifiedReveal(e){e&&(this.editors.modified.revealRange(e),this.editors.modified.setSelection(e)),this.editors.modified.focus()}modifiedSetSelection(e){this.editors.modified.setSelection(e)}modifiedFocus(){this.editors.modified.focus()}getModifiedPosition(){return this.editors.modified.getPosition()??void 0}}Fe("diffEditor.move.border","#8b8b8b9c",I("diffEditor.move.border","The border color for text that got moved in the diff editor."));Fe("diffEditor.moveActive.border","#FFA500",I("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor."));Fe("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},I("diffEditor.unchangedRegionShadow","The color of the shadow around unchanged region widgets."));const SMi=ks("diff-insert",qt.add,I("diffInsertIcon","Line decoration for inserts in the diff editor.")),HFt=ks("diff-remove",qt.remove,I("diffRemoveIcon","Line decoration for removals in the diff editor.")),xoe=Hi.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+ci.asClassName(SMi),marginClassName:"gutter-insert"}),mW=Hi.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+ci.asClassName(HFt),marginClassName:"gutter-delete"}),Oct=Hi.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),jct=Hi.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),woe=Hi.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),F7e=Hi.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),$7e=Hi.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),S5=Hi.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),V7e=Hi.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),B7e=Hi.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"});var WFt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},x2e=function(t,e){return function(n,i){e(n,i,t)}},FL;const zq=Sr("diffProviderFactoryService");let w2e=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(C2e,e)}};w2e=WFt([x2e(0,qn)],w2e);Rr(zq,w2e,1);var AI;let C2e=(AI=class{constructor(e,n,i){this.editorWorkerService=n,this.telemetryService=i,this.onDidChangeEventEmitter=new st,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){var e;(e=this.diffAlgorithmOnDidChangeSubscription)==null||e.dispose()}async computeDiff(e,n,i,r){if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(e,n,i,r);if(e.isDisposed()||n.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(e.getLineCount()===1&&e.getLineMaxColumn(1)===1)return n.getLineCount()===1&&n.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new Ip(new Ki(1,2),new Ki(1,n.getLineCount()+1),[new hp(e.getFullModelRange(),n.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const o=JSON.stringify([e.uri.toString(),n.uri.toString()]),s=JSON.stringify([e.id,n.id,e.getAlternativeVersionId(),n.getAlternativeVersionId(),JSON.stringify(i)]),a=FL.diffCache.get(o);if(a&&a.context===s)return a.result;const l=cu.create(),c=await this.editorWorkerService.computeDiff(e.uri,n.uri,i,this.diffAlgorithm),u=l.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:u,timedOut:(c==null?void 0:c.quitEarly)??!0,detectedMoves:i.computeMoves?(c==null?void 0:c.moves.length)??0:-1}),r.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!c)throw new Error("no diff result available");return FL.diffCache.size>10&&FL.diffCache.delete(FL.diffCache.keys().next().value),FL.diffCache.set(o,{result:c,context:s}),c}setOptions(e){var i;let n=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&((i=this.diffAlgorithmOnDidChangeSubscription)==null||i.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,typeof e.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),n=!0),n&&this.onDidChangeEventEmitter.fire()}},FL=AI,AI.diffCache=new Map,AI);C2e=FL=WFt([x2e(1,xb),x2e(2,eh)],C2e);function Ime(){return yMe&&!!yMe.VSCODE_DEV}function UFt(t){if(Ime()){const e=NMi();return e.add(t),{dispose(){e.delete(t)}}}else return{dispose(){}}}function NMi(){HQ||(HQ=new Set);const t=globalThis;return t.$hotReload_applyNewExports||(t.$hotReload_applyNewExports=e=>{const n={config:{mode:void 0},...e},i=[];for(const r of HQ){const o=r(n);o&&i.push(o)}if(i.length>0)return r=>{let o=!1;for(const s of i)s(r)&&(o=!0);return o}}),HQ}let HQ;Ime()&&UFt(({oldExports:t,newSrc:e,config:n})=>{if(n.mode==="patch-prototype")return i=>{var r,o;for(const s in i){const a=i[s];if(console.log(`[hot-reload] Patching prototype methods of '${s}'`,{exportedItem:a}),typeof a=="function"&&a.prototype){const l=t[s];if(l){for(const c of Object.getOwnPropertyNames(a.prototype)){const u=Object.getOwnPropertyDescriptor(a.prototype,c),d=Object.getOwnPropertyDescriptor(l.prototype,c);((r=u==null?void 0:u.value)==null?void 0:r.toString())!==((o=d==null?void 0:d.value)==null?void 0:o.toString())&&console.log(`[hot-reload] Patching prototype method '${s}.${c}'`),Object.defineProperty(l.prototype,c,u)}i[s]=l}}}return!0}});function tm(t,e){return EMi([t],e),t}function EMi(t,e){Ime()&&Nu("reload",i=>UFt(({oldExports:r})=>{if([...Object.values(r)].some(o=>t.includes(o)))return o=>(i(void 0),!0)})).read(e)}var DMi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},kMi=function(t,e){return function(n,i){e(n,i,t)}};let S2e=class extends ct{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,n,i){super(),this.model=e,this._options=n,this._diffProviderFactoryService=i,this._isDiffUpToDate=lr(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=lr(this,void 0),this.diff=this._diff,this._unchangedRegions=lr(this,void 0),this.unchangedRegions=Vn(this,a=>{var l;return this._options.hideUnchangedRegions.read(a)?((l=this._unchangedRegions.read(a))==null?void 0:l.regions)??[]:(ma(c=>{var u;for(const d of((u=this._unchangedRegions.get())==null?void 0:u.regions)||[])d.collapseAll(c)}),[])}),this.movedTextToCompare=lr(this,void 0),this._activeMovedText=lr(this,void 0),this._hoveredMovedText=lr(this,void 0),this.activeMovedText=Vn(this,a=>this.movedTextToCompare.read(a)??this._hoveredMovedText.read(a)??this._activeMovedText.read(a)),this._cancellationTokenSource=new oa,this._diffProvider=Vn(this,a=>{const l=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(a)}),c=Nu("onDidChange",l.onDidChange);return{diffProvider:l,onChangeSignal:c}}),this._register(Kn(()=>this._cancellationTokenSource.cancel()));const r=V6("contentChangedSignal"),o=this._register(new Wo(()=>r.trigger(void 0),200));this._register(ki(a=>{const l=this._unchangedRegions.read(a);if(!l||l.regions.some(m=>m.isDragged.read(a)))return;const c=l.originalDecorationIds.map(m=>e.original.getDecorationRange(m)).map(m=>m?Ki.fromRangeInclusive(m):void 0),u=l.modifiedDecorationIds.map(m=>e.modified.getDecorationRange(m)).map(m=>m?Ki.fromRangeInclusive(m):void 0),d=l.regions.map((m,p)=>!c[p]||!u[p]?void 0:new XE(c[p].startLineNumber,u[p].startLineNumber,c[p].length,m.visibleLineCountTop.read(a),m.visibleLineCountBottom.read(a))).filter(zx),h=[];let f=!1;for(const m of o8e(d,(p,g)=>p.getHiddenModifiedRange(a).endLineNumberExclusive===g.getHiddenModifiedRange(a).startLineNumber))if(m.length>1){f=!0;const p=m.reduce((y,_)=>y+_.lineCount,0),g=new XE(m[0].originalLineNumber,m[0].modifiedLineNumber,p,m[0].visibleLineCountTop.get(),m[m.length-1].visibleLineCountBottom.get());h.push(g)}else h.push(m[0]);if(f){const m=e.original.deltaDecorations(l.originalDecorationIds,h.map(g=>({range:g.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),p=e.modified.deltaDecorations(l.modifiedDecorationIds,h.map(g=>({range:g.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));ma(g=>{this._unchangedRegions.set({regions:h,originalDecorationIds:m,modifiedDecorationIds:p},g)})}}));const s=(a,l,c)=>{const u=XE.fromDiffs(a.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(c),this._options.hideUnchangedRegionsContextLineCount.read(c));let d;const h=this._unchangedRegions.get();if(h){const g=h.originalDecorationIds.map(C=>e.original.getDecorationRange(C)).map(C=>C?Ki.fromRangeInclusive(C):void 0),y=h.modifiedDecorationIds.map(C=>e.modified.getDecorationRange(C)).map(C=>C?Ki.fromRangeInclusive(C):void 0);let w=hMi(h.regions.map((C,N)=>{if(!g[N]||!y[N])return;const E=g[N].length;return new XE(g[N].startLineNumber,y[N].startLineNumber,E,Math.min(C.visibleLineCountTop.get(),E),Math.min(C.visibleLineCountBottom.get(),E-C.visibleLineCountTop.get()))}).filter(zx),(C,N)=>!N||C.modifiedLineNumber>=N.modifiedLineNumber+N.lineCount&&C.originalLineNumber>=N.originalLineNumber+N.lineCount).map(C=>new zd(C.getHiddenOriginalRange(c),C.getHiddenModifiedRange(c)));w=zd.clip(w,Ki.ofLength(1,e.original.getLineCount()),Ki.ofLength(1,e.modified.getLineCount())),d=zd.inverse(w,e.original.getLineCount(),e.modified.getLineCount())}const f=[];if(d)for(const g of u){const y=d.filter(_=>_.original.intersectsStrict(g.originalUnchangedRange)&&_.modified.intersectsStrict(g.modifiedUnchangedRange));f.push(...g.setVisibleRanges(y,l))}else f.push(...u);const m=e.original.deltaDecorations((h==null?void 0:h.originalDecorationIds)||[],f.map(g=>({range:g.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),p=e.modified.deltaDecorations((h==null?void 0:h.modifiedDecorationIds)||[],f.map(g=>({range:g.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));this._unchangedRegions.set({regions:f,originalDecorationIds:m,modifiedDecorationIds:p},l)};this._register(e.modified.onDidChangeContent(a=>{if(this._diff.get()){const c=uC.fromModelContentChanges(a.changes);this._lastDiff,e.original,e.modified}this._isDiffUpToDate.set(!1,void 0),o.schedule()})),this._register(e.original.onDidChangeContent(a=>{if(this._diff.get()){const c=uC.fromModelContentChanges(a.changes);this._lastDiff,e.original,e.modified}this._isDiffUpToDate.set(!1,void 0),o.schedule()})),this._register(Sf(async(a,l)=>{this._options.hideUnchangedRegionsMinimumLineCount.read(a),this._options.hideUnchangedRegionsContextLineCount.read(a),o.cancel(),r.read(a);const c=this._diffProvider.read(a);c.onChangeSignal.read(a),tm(b3t,a),tm(HLe,a),this._isDiffUpToDate.set(!1,void 0);let u=[];l.add(e.original.onDidChangeContent(f=>{const m=uC.fromModelContentChanges(f.changes);u=Nre(u,m)}));let d=[];l.add(e.modified.onDidChangeContent(f=>{const m=uC.fromModelContentChanges(f.changes);d=Nre(d,m)}));let h=await c.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(a),maxComputationTimeMs:this._options.maxComputationTimeMs.read(a),computeMoves:this._options.showMoves.read(a)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||e.original.isDisposed()||e.modified.isDisposed()||(h=MMi(h,e.original,e.modified),h=(e.original,e.modified,void 0)??h,h=(e.original,e.modified,void 0)??h,ma(f=>{s(h,f),this._lastDiff=h;const m=z7e.fromDiffResult(h);this._diff.set(m,f),this._isDiffUpToDate.set(!0,f);const p=this.movedTextToCompare.get();this.movedTextToCompare.set(p?this._lastDiff.moves.find(g=>g.lineRangeMapping.modified.intersect(p.lineRangeMapping.modified)):void 0,f)}))}))}ensureModifiedLineIsVisible(e,n,i){var o,s;if(((o=this.diff.get())==null?void 0:o.mappings.length)===0)return;const r=((s=this._unchangedRegions.get())==null?void 0:s.regions)||[];for(const a of r)if(a.getHiddenModifiedRange(void 0).contains(e)){a.showModifiedLine(e,n,i);return}}ensureOriginalLineIsVisible(e,n,i){var o,s;if(((o=this.diff.get())==null?void 0:o.mappings.length)===0)return;const r=((s=this._unchangedRegions.get())==null?void 0:s.regions)||[];for(const a of r)if(a.getHiddenOriginalRange(void 0).contains(e)){a.showOriginalLine(e,n,i);return}}async waitForDiff(){await $5t(this.isDiffUpToDate,e=>e)}serializeState(){const e=this._unchangedRegions.get();return{collapsedRegions:e==null?void 0:e.regions.map(n=>({range:n.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(e){var r;const n=(r=e.collapsedRegions)==null?void 0:r.map(o=>Ki.deserialize(o.range)),i=this._unchangedRegions.get();!i||!n||ma(o=>{for(const s of i.regions)for(const a of n)if(s.modifiedUnchangedRange.intersect(a)){s.setHiddenModifiedRange(a,o);break}})}};S2e=DMi([kMi(2,zq)],S2e);function MMi(t,e,n){return{changes:t.changes.map(i=>new Ip(i.original,i.modified,i.innerChanges?i.innerChanges.map(r=>LMi(r,e,n)):void 0)),moves:t.moves,identical:t.identical,quitEarly:t.quitEarly}}function LMi(t,e,n){let i=t.originalRange,r=t.modifiedRange;return i.startColumn===1&&r.startColumn===1&&(i.endColumn!==1||r.endColumn!==1)&&i.endColumn===e.getLineMaxColumn(i.endLineNumber)&&r.endColumn===n.getLineMaxColumn(r.endLineNumber)&&i.endLineNumber<e.getLineCount()&&r.endLineNumber<n.getLineCount()&&(i=i.setEndPosition(i.endLineNumber+1,1),r=r.setEndPosition(r.endLineNumber+1,1)),new hp(i,r)}class z7e{static fromDiffResult(e){return new z7e(e.changes.map(n=>new KFt(n)),e.moves||[],e.identical,e.quitEarly)}constructor(e,n,i,r){this.mappings=e,this.movedTexts=n,this.identical=i,this.quitEarly=r}}class KFt{constructor(e){this.lineRangeMapping=e}}class XE{static fromDiffs(e,n,i,r,o){const s=Ip.inverse(e,n,i),a=[];for(const l of s){let c=l.original.startLineNumber,u=l.modified.startLineNumber,d=l.original.length;const h=c===1&&u===1,f=c+d===n+1&&u+d===i+1;(h||f)&&d>=o+r?(h&&!f&&(d-=o),f&&!h&&(c+=o,u+=o,d-=o),a.push(new XE(c,u,d,0,0))):d>=o*2+r&&(c+=o,u+=o,d-=o*2,a.push(new XE(c,u,d,0,0)))}return a}get originalUnchangedRange(){return Ki.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return Ki.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,n,i,r,o){this.originalLineNumber=e,this.modifiedLineNumber=n,this.lineCount=i,this._visibleLineCountTop=lr(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=lr(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=Vn(this,l=>this.visibleLineCountTop.read(l)+this.visibleLineCountBottom.read(l)===this.lineCount&&!this.isDragged.read(l)),this.isDragged=lr(this,void 0);const s=Math.max(Math.min(r,this.lineCount),0),a=Math.max(Math.min(o,this.lineCount-r),0);est(r===s),est(o===a),this._visibleLineCountTop.set(s,void 0),this._visibleLineCountBottom.set(a,void 0)}setVisibleRanges(e,n){const i=[],r=new $g(e.map(l=>l.modified)).subtractFrom(this.modifiedUnchangedRange);let o=this.originalLineNumber,s=this.modifiedLineNumber;const a=this.modifiedLineNumber+this.lineCount;if(r.ranges.length===0)this.showAll(n),i.push(this);else{let l=0;for(const c of r.ranges){const u=l===r.ranges.length-1;l++;const d=(u?a:c.endLineNumberExclusive)-s,h=new XE(o,s,d,0,0);h.setHiddenModifiedRange(c,n),i.push(h),o=h.originalUnchangedRange.endLineNumberExclusive,s=h.modifiedUnchangedRange.endLineNumberExclusive}}return i}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return Ki.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return Ki.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,n){const i=e.startLineNumber-this.modifiedLineNumber,r=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(i,r,n)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,n){const i=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,i),n)}showMoreBelow(e=10,n){const i=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,i),n)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,n,i){const r=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),o=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;n===0&&r<o||n===1?this._visibleLineCountTop.set(this._visibleLineCountTop.get()+r,i):this._visibleLineCountBottom.set(this._visibleLineCountBottom.get()+o,i)}showOriginalLine(e,n,i){const r=e-this.originalLineNumber,o=this.originalLineNumber+this.lineCount-e;n===0&&r<o||n===1?this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+o-r,this.getMaxVisibleLineCountTop()),i):this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+r-o,this.getMaxVisibleLineCountBottom()),i)}collapseAll(e){this._visibleLineCountTop.set(0,e),this._visibleLineCountBottom.set(0,e)}setState(e,n,i){e=Math.max(Math.min(e,this.lineCount),0),n=Math.max(Math.min(n,this.lineCount-e),0),this._visibleLineCountTop.set(e,i),this._visibleLineCountBottom.set(n,i)}}class TMi extends ct{get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}constructor(e,n,i,r,o,s,a,l,c){super(),this._getViewZoneId=e,this._marginDomNode=n,this._modifiedEditor=i,this._diff=r,this._editor=o,this._viewLineCounts=s,this._originalTextModel=a,this._contextMenuService=l,this._clipboardService=c,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=ci.asClassName(qt.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";const u=this._modifiedEditor.getOption(67);this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${u}px`,this._diffActions.style.lineHeight=`${u}px`,this._marginDomNode.appendChild(this._diffActions);let d=0;const h=i.getOption(128)&&!W0,f=(m,p)=>{this._contextMenuService.showContextMenu({domForShadowRoot:h?i.getDomNode()??void 0:void 0,getAnchor:()=>({x:m,y:p}),getActions:()=>{const g=[],y=r.modified.isEmpty;return g.push(new xm("diff.clipboard.copyDeletedContent",y?r.original.length>1?I("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):I("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):r.original.length>1?I("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):I("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,async()=>{const w=this._originalTextModel.getValueInRange(r.original.toExclusiveRange());await this._clipboardService.writeText(w)})),r.original.length>1&&g.push(new xm("diff.clipboard.copyDeletedLineContent",y?I("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",r.original.startLineNumber+d):I("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",r.original.startLineNumber+d),void 0,!0,async()=>{let w=this._originalTextModel.getLineContent(r.original.startLineNumber+d);w===""&&(w=this._originalTextModel.getEndOfLineSequence()===0?`
`:`\r
`),await this._clipboardService.writeText(w)})),i.getOption(92)||g.push(new xm("diff.inline.revertChange",I("diff.inline.revertChange.label","Revert this change"),void 0,!0,async()=>{this._editor.revert(this._diff)})),g},autoSelectFirstItem:!0})};this._register(Fa(this._diffActions,"mousedown",m=>{if(!m.leftButton)return;const{top:p,height:g}=Ga(this._diffActions),y=Math.floor(u/3);m.preventDefault(),f(m.posx,p+g+y)})),this._register(i.onMouseMove(m=>{(m.target.type===8||m.target.type===5)&&m.target.detail.viewZoneId===this._getViewZoneId()?(d=this._updateLightBulbPosition(this._marginDomNode,m.event.browserEvent.y,u),this.visibility=!0):this.visibility=!1})),this._register(i.onMouseDown(m=>{m.event.leftButton&&(m.target.type===8||m.target.type===5)&&m.target.detail.viewZoneId===this._getViewZoneId()&&(m.event.preventDefault(),d=this._updateLightBulbPosition(this._marginDomNode,m.event.browserEvent.y,u),f(m.event.posx,m.event.posy+u))}))}_updateLightBulbPosition(e,n,i){const{top:r}=Ga(e),o=n-r,s=Math.floor(o/i),a=s*i;if(this._diffActions.style.top=`${a}px`,this._viewLineCounts){let l=0;for(let c=0;c<this._viewLineCounts.length;c++)if(l+=this._viewLineCounts[c],s<l)return c}return s}}const Fct=WS("diffEditorWidget",{createHTML:t=>t});function IMi(t,e,n,i){su(i,e.fontInfo);const r=n.length>0,o=new I6(1e4);let s=0,a=0;const l=[];for(let h=0;h<t.lineTokens.length;h++){const f=h+1,m=t.lineTokens[h],p=t.lineBreakData[h],g=Sh.filter(n,f,1,Number.MAX_SAFE_INTEGER);if(p){let y=0;for(const _ of p.breakOffsets){const w=m.sliceAndInflate(y,_,0);s=Math.max(s,$ct(a,w,Sh.extractWrapped(g,y,_),r,t.mightContainNonBasicASCII,t.mightContainRTL,e,o)),a++,y=_}l.push(p.breakOffsets.length)}else l.push(1),s=Math.max(s,$ct(a,m,g,r,t.mightContainNonBasicASCII,t.mightContainRTL,e,o)),a++}s+=e.scrollBeyondLastColumn;const c=o.build(),u=Fct?Fct.createHTML(c):c;i.innerHTML=u;const d=s*e.typicalHalfwidthCharacterWidth;return{heightInLines:a,minWidthInPx:d,viewLineCounts:l}}class AMi{constructor(e,n,i,r){this.lineTokens=e,this.lineBreakData=n,this.mightContainNonBasicASCII=i,this.mightContainRTL=r}}class H7e{static fromEditor(e){var o;const n=e.getOptions(),i=n.get(50),r=n.get(146);return new H7e(((o=e.getModel())==null?void 0:o.getOptions().tabSize)||0,i,n.get(33),i.typicalHalfwidthCharacterWidth,n.get(105),n.get(67),r.decorationsWidth,n.get(118),n.get(100),n.get(95),n.get(51))}constructor(e,n,i,r,o,s,a,l,c,u,d){this.tabSize=e,this.fontInfo=n,this.disableMonospaceOptimizations=i,this.typicalHalfwidthCharacterWidth=r,this.scrollBeyondLastColumn=o,this.lineHeight=s,this.lineDecorationsWidth=a,this.stopRenderingLineAfter=l,this.renderWhitespace=c,this.renderControlCharacters=u,this.fontLigatures=d}}function $ct(t,e,n,i,r,o,s,a){a.appendString('<div class="view-line'),i||a.appendString(" char-delete"),a.appendString('" style="top:'),a.appendString(String(t*s.lineHeight)),a.appendString('px;width:1000000px;">');const l=e.getLineContent(),c=Up.isBasicASCII(l,r),u=Up.containsRTL(l,c,o),d=wq(new nM(s.fontInfo.isMonospace&&!s.disableMonospaceOptimizations,s.fontInfo.canUseHalfwidthRightwardsArrow,l,!1,c,u,0,e,n,s.tabSize,0,s.fontInfo.spaceWidth,s.fontInfo.middotWidth,s.fontInfo.wsmiddotWidth,s.stopRenderingLineAfter,s.renderWhitespace,s.renderControlCharacters,s.fontLigatures!==sk.OFF,null),a);return a.appendString("</div>"),d.characterMapping.getHorizontalOffset(d.characterMapping.length)}var RMi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Vct=function(t,e){return function(n,i){e(n,i,t)}};let N2e=class extends ct{constructor(e,n,i,r,o,s,a,l,c,u){super(),this._targetWindow=e,this._editors=n,this._diffModel=i,this._options=r,this._diffEditorWidget=o,this._canIgnoreViewZoneUpdateEvent=s,this._origViewZonesToIgnore=a,this._modViewZonesToIgnore=l,this._clipboardService=c,this._contextMenuService=u,this._originalTopPadding=lr(this,0),this._originalScrollOffset=lr(this,0),this._originalScrollOffsetAnimated=Act(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=lr(this,0),this._modifiedScrollOffset=lr(this,0),this._modifiedScrollOffsetAnimated=Act(this._targetWindow,this._modifiedScrollOffset,this._store);const d=lr("invalidateAlignmentsState",0),h=this._register(new Wo(()=>{d.set(d.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(w=>{this._canIgnoreViewZoneUpdateEvent()||h.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(w=>{this._canIgnoreViewZoneUpdateEvent()||h.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(w=>{(w.hasChanged(147)||w.hasChanged(67))&&h.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(w=>{(w.hasChanged(147)||w.hasChanged(67))&&h.schedule()}));const f=this._diffModel.map(w=>w?Oo(this,w.model.original.onDidChangeTokens,()=>w.model.original.tokenization.backgroundTokenizationState===2):void 0).map((w,C)=>w==null?void 0:w.read(C)),m=Vn(w=>{const C=this._diffModel.read(w),N=C==null?void 0:C.diff.read(w);if(!C||!N)return null;d.read(w);const D=this._options.renderSideBySide.read(w);return Bct(this._editors.original,this._editors.modified,N.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,D)}),p=Vn(w=>{var E;const C=(E=this._diffModel.read(w))==null?void 0:E.movedTextToCompare.read(w);if(!C)return null;d.read(w);const N=C.changes.map(D=>new KFt(D));return Bct(this._editors.original,this._editors.modified,N,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)});function g(){const w=document.createElement("div");return w.className="diagonal-fill",w}const y=this._register(new Lt);this.viewZones=sM(this,(w,C)=>{var z,H,K,q;y.clear();const N=m.read(w)||[],E=[],D=[],k=this._modifiedTopPadding.read(w);k>0&&D.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:k,showInHiddenAreas:!0,suppressMouseDown:!0});const M=this._originalTopPadding.read(w);M>0&&E.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:M,showInHiddenAreas:!0,suppressMouseDown:!0});const T=this._options.renderSideBySide.read(w),A=T||(z=this._editors.modified._getViewModel())==null?void 0:z.createLineBreaksComputer();if(A){const U=this._editors.original.getModel();for(const Y of N)if(Y.diff)for(let J=Y.originalRange.startLineNumber;J<Y.originalRange.endLineNumberExclusive;J++){if(J>U.getLineCount())return{orig:E,mod:D};A==null||A.addRequest(U.getLineContent(J),null,null)}}const R=(A==null?void 0:A.finalize())??[];let P=0;const O=this._editors.modified.getOption(67),V=(H=this._diffModel.read(w))==null?void 0:H.movedTextToCompare.read(w),F=((K=this._editors.original.getModel())==null?void 0:K.mightContainNonBasicASCII())??!1,$=((q=this._editors.original.getModel())==null?void 0:q.mightContainRTL())??!1,B=H7e.fromEditor(this._editors.modified);for(const U of N)if(U.diff&&!T&&(!this._options.useTrueInlineDiffRendering.read(w)||!W7e(U.diff))){if(!U.originalRange.isEmpty){f.read(w);const J=document.createElement("div");J.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");const ae=this._editors.original.getModel();if(U.originalRange.endLineNumberExclusive-1>ae.getLineCount())return{orig:E,mod:D};const se=new AMi(U.originalRange.mapToLineArray(Q=>ae.tokenization.getLineTokens(Q)),U.originalRange.mapToLineArray(Q=>R[P++]),F,$),oe=[];for(const Q of U.diff.innerChanges||[])oe.push(new K9(Q.originalRange.delta(-(U.diff.original.startLineNumber-1)),S5.className,0));const fe=IMi(se,B,oe,J),de=document.createElement("div");if(de.className="inline-deleted-margin-view-zone",su(de,B.fontInfo),this._options.renderIndicators.read(w))for(let Q=0;Q<fe.heightInLines;Q++){const be=document.createElement("div");be.className=`delete-sign ${ci.asClassName(HFt)}`,be.setAttribute("style",`position:absolute;top:${Q*O}px;width:${B.lineDecorationsWidth}px;height:${O}px;right:0;`),de.appendChild(be)}let ie;y.add(new TMi(()=>VE(ie),de,this._editors.modified,U.diff,this._diffEditorWidget,fe.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let Q=0;Q<fe.viewLineCounts.length;Q++){const be=fe.viewLineCounts[Q];be>1&&E.push({afterLineNumber:U.originalRange.startLineNumber+Q,domNode:g(),heightInPx:(be-1)*O,showInHiddenAreas:!0,suppressMouseDown:!0})}D.push({afterLineNumber:U.modifiedRange.startLineNumber-1,domNode:J,heightInPx:fe.heightInLines*O,minWidthInPx:fe.minWidthInPx,marginDomNode:de,setZoneId(Q){ie=Q},showInHiddenAreas:!0,suppressMouseDown:!0})}const Y=document.createElement("div");Y.className="gutter-delete",E.push({afterLineNumber:U.originalRange.endLineNumberExclusive-1,domNode:g(),heightInPx:U.modifiedHeightInPx,marginDomNode:Y,showInHiddenAreas:!0,suppressMouseDown:!0})}else{const Y=U.modifiedHeightInPx-U.originalHeightInPx;if(Y>0){if(V!=null&&V.lineRangeMapping.original.delta(-1).deltaLength(2).contains(U.originalRange.endLineNumberExclusive-1))continue;E.push({afterLineNumber:U.originalRange.endLineNumberExclusive-1,domNode:g(),heightInPx:Y,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let J=function(){const se=document.createElement("div");return se.className="arrow-revert-change "+ci.asClassName(qt.arrowRight),C.add(yt(se,"mousedown",oe=>oe.stopPropagation())),C.add(yt(se,"click",oe=>{oe.stopPropagation(),o.revert(U.diff)})),Xt("div",{},se)};if(V!=null&&V.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(U.modifiedRange.endLineNumberExclusive-1))continue;let ae;U.diff&&U.diff.modified.isEmpty&&this._options.shouldRenderOldRevertArrows.read(w)&&(ae=J()),D.push({afterLineNumber:U.modifiedRange.endLineNumberExclusive-1,domNode:g(),heightInPx:-Y,marginDomNode:ae,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(const U of p.read(w)??[]){if(!(V!=null&&V.lineRangeMapping.original.intersect(U.originalRange))||!(V!=null&&V.lineRangeMapping.modified.intersect(U.modifiedRange)))continue;const Y=U.modifiedHeightInPx-U.originalHeightInPx;Y>0?E.push({afterLineNumber:U.originalRange.endLineNumberExclusive-1,domNode:g(),heightInPx:Y,showInHiddenAreas:!0,suppressMouseDown:!0}):D.push({afterLineNumber:U.modifiedRange.endLineNumberExclusive-1,domNode:g(),heightInPx:-Y,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:E,mod:D}});let _=!1;this._register(this._editors.original.onDidScrollChange(w=>{w.scrollLeftChanged&&!_&&(_=!0,this._editors.modified.setScrollLeft(w.scrollLeft),_=!1)})),this._register(this._editors.modified.onDidScrollChange(w=>{w.scrollLeftChanged&&!_&&(_=!0,this._editors.original.setScrollLeft(w.scrollLeft),_=!1)})),this._originalScrollTop=Oo(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Oo(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register(ki(w=>{const C=this._originalScrollTop.read(w)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(w))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(w));C!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(C,1)})),this._register(ki(w=>{const C=this._modifiedScrollTop.read(w)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(w))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(w));C!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(C,1)})),this._register(ki(w=>{var E;const C=(E=this._diffModel.read(w))==null?void 0:E.movedTextToCompare.read(w);let N=0;if(C){const D=this._editors.original.getTopForLineNumber(C.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();N=this._editors.modified.getTopForLineNumber(C.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-D}N>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(N,void 0)):N<0?(this._modifiedTopPadding.set(-N,void 0),this._originalTopPadding.set(0,void 0)):setTimeout(()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)},400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-N,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+N,void 0,!0)}))}};N2e=RMi([Vct(8,GS),Vct(9,Hm)],N2e);function Bct(t,e,n,i,r,o){const s=new uS(zct(t,i)),a=new uS(zct(e,r)),l=t.getOption(67),c=e.getOption(67),u=[];let d=0,h=0;function f(m,p){for(;;){let g=s.peek(),y=a.peek();if(g&&g.lineNumber>=m&&(g=void 0),y&&y.lineNumber>=p&&(y=void 0),!g&&!y)break;const _=g?g.lineNumber-d:Number.MAX_VALUE,w=y?y.lineNumber-h:Number.MAX_VALUE;_<w?(s.dequeue(),y={lineNumber:g.lineNumber-d+h,heightInPx:0}):_>w?(a.dequeue(),g={lineNumber:y.lineNumber-h+d,heightInPx:0}):(s.dequeue(),a.dequeue()),u.push({originalRange:Ki.ofLength(g.lineNumber,1),modifiedRange:Ki.ofLength(y.lineNumber,1),originalHeightInPx:l+g.heightInPx,modifiedHeightInPx:c+y.heightInPx,diff:void 0})}}for(const m of n){let w=function(C,N,E=!1){var A,R;if(C<_||N<y)return;if(g)g=!1;else if(!E&&(C===_||N===y))return;const D=new Ki(_,C),k=new Ki(y,N);if(D.isEmpty&&k.isEmpty)return;const M=((A=s.takeWhile(P=>P.lineNumber<C))==null?void 0:A.reduce((P,O)=>P+O.heightInPx,0))??0,T=((R=a.takeWhile(P=>P.lineNumber<N))==null?void 0:R.reduce((P,O)=>P+O.heightInPx,0))??0;u.push({originalRange:D,modifiedRange:k,originalHeightInPx:D.length*l+M,modifiedHeightInPx:k.length*c+T,diff:m.lineRangeMapping}),_=C,y=N};const p=m.lineRangeMapping;f(p.original.startLineNumber,p.modified.startLineNumber);let g=!0,y=p.modified.startLineNumber,_=p.original.startLineNumber;if(o)for(const C of p.innerChanges||[]){C.originalRange.startColumn>1&&C.modifiedRange.startColumn>1&&w(C.originalRange.startLineNumber,C.modifiedRange.startLineNumber);const N=t.getModel(),E=C.originalRange.endLineNumber<=N.getLineCount()?N.getLineMaxColumn(C.originalRange.endLineNumber):Number.MAX_SAFE_INTEGER;C.originalRange.endColumn<E&&w(C.originalRange.endLineNumber,C.modifiedRange.endLineNumber)}w(p.original.endLineNumberExclusive,p.modified.endLineNumberExclusive,!0),d=p.original.endLineNumberExclusive,h=p.modified.endLineNumberExclusive}return f(Number.MAX_VALUE,Number.MAX_VALUE),u}function zct(t,e){const n=[],i=[],r=t.getOption(147).wrappingColumn!==-1,o=t._getViewModel().coordinatesConverter,s=t.getOption(67);if(r)for(let l=1;l<=t.getModel().getLineCount();l++){const c=o.getModelLineViewLineCount(l);c>1&&i.push({lineNumber:l,heightInPx:s*(c-1)})}for(const l of t.getWhitespaces()){if(e.has(l.id))continue;const c=l.afterLineNumber===0?0:o.convertViewPositionToModelPosition(new ot(l.afterLineNumber,1)).lineNumber;n.push({lineNumber:c,heightInPx:l.height})}return aMi(n,i,l=>l.lineNumber,(l,c)=>({lineNumber:l.lineNumber,heightInPx:l.heightInPx+c.heightInPx}))}function W7e(t){return t.innerChanges?t.innerChanges.every(e=>Hct(e.modifiedRange)&&Hct(e.originalRange)):!1}function Hct(t){return t.startLineNumber===t.endLineNumber}const sz=class sz extends ct{constructor(e,n,i,r,o){super(),this._rootElement=e,this._diffModel=n,this._originalEditorLayoutInfo=i,this._modifiedEditorLayoutInfo=r,this._editors=o,this._originalScrollTop=Oo(this,this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Oo(this,this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=Nu("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=lr(this,0),this._modifiedViewZonesChangedSignal=Nu("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=Nu("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=sM(this,(u,d)=>{var D;this._element.replaceChildren();const h=this._diffModel.read(u),f=(D=h==null?void 0:h.diff.read(u))==null?void 0:D.movedTexts;if(!f||f.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(u);const m=this._originalEditorLayoutInfo.read(u),p=this._modifiedEditorLayoutInfo.read(u);if(!m||!p){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(u),this._originalViewZonesChangedSignal.read(u);const g=f.map(k=>{function M(B,z){const H=z.getTopForLineNumber(B.startLineNumber,!0),K=z.getTopForLineNumber(B.endLineNumberExclusive,!0);return(H+K)/2}const T=M(k.lineRangeMapping.original,this._editors.original),A=this._originalScrollTop.read(u),R=M(k.lineRangeMapping.modified,this._editors.modified),P=this._modifiedScrollTop.read(u),O=T-A,V=R-P,F=Math.min(T,R),$=Math.max(T,R);return{range:new dr(F,$),from:O,to:V,fromWithoutScroll:T,toWithoutScroll:R,move:k}});g.sort(Fci(Ah(k=>k.fromWithoutScroll>k.toWithoutScroll,$ci),Ah(k=>k.fromWithoutScroll>k.toWithoutScroll?k.fromWithoutScroll:-k.toWithoutScroll,vv)));const y=U7e.compute(g.map(k=>k.range)),_=10,w=m.verticalScrollbarWidth,C=(y.getTrackCount()-1)*10+_*2,N=w+C+(p.contentLeft-sz.movedCodeBlockPadding);let E=0;for(const k of g){const M=y.getTrack(E),T=w+_+M*10,A=15,R=15,P=N,O=p.glyphMarginWidth+p.lineNumbersWidth,V=18,F=document.createElementNS("http://www.w3.org/2000/svg","rect");F.classList.add("arrow-rectangle"),F.setAttribute("x",`${P-O}`),F.setAttribute("y",`${k.to-V/2}`),F.setAttribute("width",`${O}`),F.setAttribute("height",`${V}`),this._element.appendChild(F);const $=document.createElementNS("http://www.w3.org/2000/svg","g"),B=document.createElementNS("http://www.w3.org/2000/svg","path");B.setAttribute("d",`M 0 ${k.from} L ${T} ${k.from} L ${T} ${k.to} L ${P-R} ${k.to}`),B.setAttribute("fill","none"),$.appendChild(B);const z=document.createElementNS("http://www.w3.org/2000/svg","polygon");z.classList.add("arrow"),d.add(ki(H=>{B.classList.toggle("currentMove",k.move===h.activeMovedText.read(H)),z.classList.toggle("currentMove",k.move===h.activeMovedText.read(H))})),z.setAttribute("points",`${P-R},${k.to-A/2} ${P},${k.to} ${P-R},${k.to+A/2}`),$.appendChild(z),this._element.appendChild($),E++}this.width.set(C,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register(Kn(()=>this._element.remove())),this._register(ki(u=>{const d=this._originalEditorLayoutInfo.read(u),h=this._modifiedEditorLayoutInfo.read(u);!d||!h||(this._element.style.left=`${d.width-d.verticalScrollbarWidth}px`,this._element.style.height=`${d.height}px`,this._element.style.width=`${d.verticalScrollbarWidth+d.contentLeft-sz.movedCodeBlockPadding+this.width.read(u)}px`)})),this._register(B6(this._state));const s=Vn(u=>{const d=this._diffModel.read(u),h=d==null?void 0:d.diff.read(u);return h?h.movedTexts.map(f=>({move:f,original:new w4(Gg(f.lineRangeMapping.original.startLineNumber-1),18),modified:new w4(Gg(f.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register(yoe(this._editors.original,s.map(u=>u.map(d=>d.original)))),this._register(yoe(this._editors.modified,s.map(u=>u.map(d=>d.modified)))),this._register(Sf((u,d)=>{const h=s.read(u);for(const f of h)d.add(new Wct(this._editors.original,f.original,f.move,"original",this._diffModel.get())),d.add(new Wct(this._editors.modified,f.modified,f.move,"modified",this._diffModel.get()))}));const a=Nu("original.onDidFocusEditorWidget",u=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>u(void 0),0))),l=Nu("modified.onDidFocusEditorWidget",u=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>u(void 0),0)));let c="modified";this._register(jq({createEmptyChangeSummary:()=>{},handleChange:(u,d)=>(u.didChange(a)&&(c="original"),u.didChange(l)&&(c="modified"),!0)},u=>{a.read(u),l.read(u);const d=this._diffModel.read(u);if(!d)return;const h=d.diff.read(u);let f;if(h&&c==="original"){const m=this._editors.originalCursor.read(u);m&&(f=h.movedTexts.find(p=>p.lineRangeMapping.original.contains(m.lineNumber)))}if(h&&c==="modified"){const m=this._editors.modifiedCursor.read(u);m&&(f=h.movedTexts.find(p=>p.lineRangeMapping.modified.contains(m.lineNumber)))}f!==d.movedTextToCompare.get()&&d.movedTextToCompare.set(void 0,void 0),d.setActiveMovedText(f)}))}};sz.movedCodeBlockPadding=4;let j3=sz;class U7e{static compute(e){const n=[],i=[];for(const r of e){let o=n.findIndex(s=>!s.intersectsStrict(r));o===-1&&(n.length>=6?o=wpi(n,Ah(a=>a.intersectWithRangeLength(r),vv)):(o=n.length,n.push(new H8e))),n[o].addRange(r),i.push(o)}return new U7e(n.length,i)}constructor(e,n){this._trackCount=e,this.trackPerLineIdx=n}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class Wct extends P7e{constructor(e,n,i,r,o){const s=pr("div.diff-hidden-lines-widget");super(e,n,s.root),this._editor=e,this._move=i,this._kind=r,this._diffModel=o,this._nodes=pr("div.diff-moved-code-block",{style:{marginRight:"4px"}},[pr("div.text-content@textContent"),pr("div.action-bar@actionBar")]),s.root.appendChild(this._nodes.root);const a=Oo(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register(gS(this._nodes.root,{paddingRight:a.map(h=>h.verticalScrollbarWidth)}));let l;i.changes.length>0?l=this._kind==="original"?I("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):I("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):l=this._kind==="original"?I("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):I("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const c=this._register(new Ap(this._nodes.actionBar,{highlightToggledItems:!0})),u=new xm("",l,"",!1);c.push(u,{icon:!1,label:!0});const d=new xm("","Compare",ci.asClassName(qt.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===i?void 0:this._move,void 0)});this._register(ki(h=>{const f=this._diffModel.movedTextToCompare.read(h)===i;d.checked=f})),c.push(d,{icon:!1,label:!0})}}class PMi extends ct{constructor(e,n,i,r){super(),this._editors=e,this._diffModel=n,this._options=i,this._decorations=Vn(this,o=>{const s=this._diffModel.read(o),a=s==null?void 0:s.diff.read(o);if(!a)return null;const l=this._diffModel.read(o).movedTextToCompare.read(o),c=this._options.renderIndicators.read(o),u=this._options.showEmptyDecorations.read(o),d=[],h=[];if(!l)for(const m of a.mappings)if(m.lineRangeMapping.original.isEmpty||d.push({range:m.lineRangeMapping.original.toInclusiveRange(),options:c?mW:jct}),m.lineRangeMapping.modified.isEmpty||h.push({range:m.lineRangeMapping.modified.toInclusiveRange(),options:c?xoe:Oct}),m.lineRangeMapping.modified.isEmpty||m.lineRangeMapping.original.isEmpty)m.lineRangeMapping.original.isEmpty||d.push({range:m.lineRangeMapping.original.toInclusiveRange(),options:V7e}),m.lineRangeMapping.modified.isEmpty||h.push({range:m.lineRangeMapping.modified.toInclusiveRange(),options:F7e});else{const p=this._options.useTrueInlineDiffRendering.read(o)&&W7e(m.lineRangeMapping);for(const g of m.lineRangeMapping.innerChanges||[])if(m.lineRangeMapping.original.contains(g.originalRange.startLineNumber)&&d.push({range:g.originalRange,options:g.originalRange.isEmpty()&&u?B7e:S5}),m.lineRangeMapping.modified.contains(g.modifiedRange.startLineNumber)&&h.push({range:g.modifiedRange,options:g.modifiedRange.isEmpty()&&u&&!p?$7e:woe}),p){const y=s.model.original.getValueInRange(g.originalRange);h.push({range:g.modifiedRange,options:{description:"deleted-text",before:{content:y,inlineClassName:"inline-deleted-text"},zIndex:1e5,showIfCollapsed:!0}})}}if(l)for(const m of l.changes){const p=m.original.toInclusiveRange();p&&d.push({range:p,options:c?mW:jct});const g=m.modified.toInclusiveRange();g&&h.push({range:g,options:c?xoe:Oct});for(const y of m.innerChanges||[])d.push({range:y.originalRange,options:S5}),h.push({range:y.modifiedRange,options:woe})}const f=this._diffModel.read(o).activeMovedText.read(o);for(const m of a.movedTexts)d.push({range:m.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(m===f?" currentMove":""),blockPadding:[j3.movedCodeBlockPadding,0,j3.movedCodeBlockPadding,j3.movedCodeBlockPadding]}}),h.push({range:m.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(m===f?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:d,modifiedDecorations:h}}),this._register(voe(this._editors.original,this._decorations.map(o=>(o==null?void 0:o.originalDecorations)||[]))),this._register(voe(this._editors.modified,this._decorations.map(o=>(o==null?void 0:o.modifiedDecorations)||[])))}}class OMi{resetSash(){this._sashRatio.set(void 0,void 0)}constructor(e,n){this._options=e,this.dimensions=n,this.sashLeft=Pq(this,i=>{const r=this._sashRatio.read(i)??this._options.splitViewDefaultRatio.read(i);return this._computeSashLeft(r,i)},(i,r)=>{const o=this.dimensions.width.get();this._sashRatio.set(i/o,r)}),this._sashRatio=lr(this,void 0)}_computeSashLeft(e,n){const i=this.dimensions.width.read(n),r=Math.floor(this._options.splitViewDefaultRatio.read(n)*i),o=this._options.enableSplitViewResizing.read(n)?Math.floor(e*i):r,s=100;return i<=s*2?r:o<s?s:o>i-s?i-s:o}}class qFt extends ct{constructor(e,n,i,r,o,s){super(),this._domNode=e,this._dimensions=n,this._enabled=i,this._boundarySashes=r,this.sashLeft=o,this._resetSash=s,this._sash=this._register(new td(this._domNode,{getVerticalSashTop:a=>0,getVerticalSashLeft:a=>this.sashLeft.get(),getVerticalSashHeight:a=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(a=>{this.sashLeft.set(this._startSashPosition+(a.currentX-a.startX),void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._resetSash())),this._register(ki(a=>{const l=this._boundarySashes.read(a);l&&(this._sash.orthogonalEndSash=l.bottom)})),this._register(ki(a=>{const l=this._enabled.read(a);this._sash.state=l?3:0,this.sashLeft.read(a),this._dimensions.height.read(a),this._sash.layout()}))}}class jMi extends ct{constructor(e,n,i){super(),this._editor=e,this._domNode=n,this.itemProvider=i,this.scrollTop=Oo(this,this._editor.onDidScrollChange,s=>this._editor.getScrollTop()),this.isScrollTopZero=this.scrollTop.map(s=>s===0),this.modelAttached=Oo(this,this._editor.onDidChangeModel,s=>this._editor.hasModel()),this.editorOnDidChangeViewZones=Nu("onDidChangeViewZones",this._editor.onDidChangeViewZones),this.editorOnDidContentSizeChange=Nu("onDidContentSizeChange",this._editor.onDidContentSizeChange),this.domNodeSizeChanged=V6("domNodeSizeChanged"),this.views=new Map,this._domNode.className="gutter monaco-editor";const r=this._domNode.appendChild(pr("div.scroll-decoration",{role:"presentation",ariaHidden:"true",style:{width:"100%"}}).root),o=new ResizeObserver(()=>{ma(s=>{this.domNodeSizeChanged.trigger(s)})});o.observe(this._domNode),this._register(Kn(()=>o.disconnect())),this._register(ki(s=>{r.className=this.isScrollTopZero.read(s)?"":"scroll-decoration"})),this._register(ki(s=>this.render(s)))}dispose(){super.dispose(),ou(this._domNode)}render(e){if(!this.modelAttached.read(e))return;this.domNodeSizeChanged.read(e),this.editorOnDidChangeViewZones.read(e),this.editorOnDidContentSizeChange.read(e);const n=this.scrollTop.read(e),i=this._editor.getVisibleRanges(),r=new Set(this.views.keys()),o=dr.ofStartAndLength(0,this._domNode.clientHeight);if(!o.isEmpty)for(const s of i){const a=new Ki(s.startLineNumber,s.endLineNumber+1),l=this.itemProvider.getIntersectingGutterItems(a,e);ma(c=>{for(const u of l){if(!u.range.intersect(a))continue;r.delete(u.id);let d=this.views.get(u.id);if(d)d.item.set(u,c);else{const p=document.createElement("div");this._domNode.appendChild(p);const g=lr("item",u),y=this.itemProvider.createView(g,p);d=new FMi(g,y,p),this.views.set(u.id,d)}const h=u.range.startLineNumber<=this._editor.getModel().getLineCount()?this._editor.getTopForLineNumber(u.range.startLineNumber,!0)-n:this._editor.getBottomForLineNumber(u.range.startLineNumber-1,!1)-n,m=(u.range.isEmpty?h:this._editor.getBottomForLineNumber(u.range.endLineNumberExclusive-1,!0)-n)-h;d.domNode.style.top=`${h}px`,d.domNode.style.height=`${m}px`,d.gutterItemView.layout(dr.ofStartAndLength(h,m),o)}})}for(const s of r){const a=this.views.get(s);a.gutterItemView.dispose(),a.domNode.remove(),this.views.delete(s)}}}class FMi{constructor(e,n,i){this.item=e,this.gutterItemView=n,this.domNode=i}}class GFt extends U2{constructor(e){super(),this._getContext=e}runAction(e,n){const i=this._getContext();return super.runAction(e,i)}}class Uct extends m3t{constructor(e){super(),this._textModel=e}getValueOfRange(e){return this._textModel.getValueInRange(e)}get length(){const e=this._textModel.getLineCount(),n=this._textModel.getLineLength(e);return new Av(e-1,n)}}class $Mi extends ct{constructor(e,n,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new udi),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new Lt),i.hoverDelegate=i.hoverDelegate??this._register(v5()),this.options=i,this.toggleMenuAction=this._register(new pW(()=>{var r;return(r=this.toggleMenuActionViewItem)==null?void 0:r.show()},i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new Ap(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,hoverDelegate:i.hoverDelegate,actionViewItemProvider:(r,o)=>{if(r.id===pW.ID)return this.toggleMenuActionViewItem=new Wre(r,r.menuActions,n,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:ci.asClassNameArray(i.moreIcon??qt.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0,hoverDelegate:this.options.hoverDelegate}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(i.actionViewItemProvider){const s=i.actionViewItemProvider(r,o);if(s)return s}if(r instanceof i5){const s=new Wre(r,r.actions,n,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:r.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return s.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(s),this.disposables.add(this._onDidChangeDropdownVisibility.add(s.onDidChangeVisibility)),s}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,n){this.clear();const i=e?e.slice(0):[];this.hasSecondaryActions=!!(n&&n.length>0),this.hasSecondaryActions&&n&&(this.toggleMenuAction.menuActions=n.slice(0),i.push(this.toggleMenuAction)),i.forEach(r=>{this.actionBar.push(r,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(r)})})}getKeybindingLabel(e){var i,r;const n=(r=(i=this.options).getKeyBinding)==null?void 0:r.call(i,e);return(n==null?void 0:n.getLabel())??void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}const gce=class gce extends xm{constructor(e,n){n=n||I("moreActions","More Actions..."),super(gce.ID,n,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}};gce.ID="toolbar.toggle.more";let pW=gce;var YFt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},nv=function(t,e){return function(n,i){e(n,i,t)}};let gW=class extends $Mi{constructor(e,n,i,r,o,s,a,l){super(e,o,{getKeyBinding:u=>s.lookupKeybinding(u.id)??void 0,...n,allowContextMenu:!0,skipTelemetry:typeof(n==null?void 0:n.telemetrySource)=="string"}),this._options=n,this._menuService=i,this._contextKeyService=r,this._contextMenuService=o,this._keybindingService=s,this._commandService=a,this._sessionDisposables=this._store.add(new Lt);const c=n==null?void 0:n.telemetrySource;c&&this._store.add(this.actionBar.onDidRun(u=>l.publicLog2("workbenchActionExecuted",{id:u.action.id,from:c})))}setActions(e,n=[],i){var u,d,h;this._sessionDisposables.clear();const r=e.slice(),o=n.slice(),s=[];let a=0;const l=[];let c=!1;if(((u=this._options)==null?void 0:u.hiddenItemStrategy)!==-1)for(let f=0;f<r.length;f++){const m=r[f];!(m instanceof wm)&&!(m instanceof y3)||m.hideActions&&(s.push(m.hideActions.toggle),m.hideActions.toggle.checked&&a++,m.hideActions.isHidden&&(c=!0,r[f]=void 0,((d=this._options)==null?void 0:d.hiddenItemStrategy)!==0&&(l[f]=m)))}if(((h=this._options)==null?void 0:h.overflowBehavior)!==void 0){const f=gEi(new Set(this._options.overflowBehavior.exempted),Ir.map(r,g=>g==null?void 0:g.id)),m=this._options.overflowBehavior.maxItems-f.size;let p=0;for(let g=0;g<r.length;g++){const y=r[g];y&&(p++,!f.has(y.id)&&p>=m&&(r[g]=void 0,l[g]=y))}}Cot(r),Cot(l),super.setActions(r,dc.join(l,o)),(s.length>0||r.length>0)&&this._sessionDisposables.add(yt(this.getElement(),"contextmenu",f=>{var _,w,C,N,E;const m=new uv(ei(this.getElement()),f),p=this.getItemAction(m.target);if(!p)return;m.preventDefault(),m.stopPropagation();const g=[];if(p instanceof wm&&p.menuKeybinding)g.push(p.menuKeybinding);else if(!(p instanceof y3||p instanceof pW)){const D=!!this._keybindingService.lookupKeybinding(p.id);g.push($Ft(this._commandService,this._keybindingService,p.id,void 0,D))}if(s.length>0){let D=!1;if(a===1&&((_=this._options)==null?void 0:_.hiddenItemStrategy)===0){D=!0;for(let k=0;k<s.length;k++)if(s[k].checked){s[k]=aI({id:p.id,label:p.label,checked:!0,enabled:!1,run(){}});break}}if(!D&&(p instanceof wm||p instanceof y3)){if(!p.hideActions)return;g.push(p.hideActions.hide)}else g.push(aI({id:"label",label:I("hide","Hide"),enabled:!1,run(){}}))}const y=dc.join(g,s);(w=this._options)!=null&&w.resetMenu&&!i&&(i=[this._options.resetMenu]),c&&i&&(y.push(new dc),y.push(aI({id:"resetThisMenu",label:I("resetThisMenu","Reset Menu"),run:()=>this._menuService.resetHiddenStates(i)}))),y.length!==0&&this._contextMenuService.showContextMenu({getAnchor:()=>m,getActions:()=>y,menuId:(C=this._options)==null?void 0:C.contextMenu,menuActionOptions:{renderShortTitle:!0,...(N=this._options)==null?void 0:N.menuOptions},skipTelemetry:typeof((E=this._options)==null?void 0:E.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};gW=YFt([nv(2,Jp),nv(3,vi),nv(4,Hm),nv(5,vo),nv(6,gs),nv(7,eh)],gW);let Coe=class extends gW{constructor(e,n,i,r,o,s,a,l,c){super(e,{resetMenu:n,...i},r,o,s,a,l,c),this._onDidChangeMenuItems=this._store.add(new st),this.onDidChangeMenuItems=this._onDidChangeMenuItems.event;const u=this._store.add(r.createMenu(n,o,{emitEventsForSubmenuChanges:!0})),d=()=>{var m,p,g;const h=[],f=[];Cme(u,i==null?void 0:i.menuOptions,{primary:h,secondary:f},(m=i==null?void 0:i.toolbarOptions)==null?void 0:m.primaryGroup,(p=i==null?void 0:i.toolbarOptions)==null?void 0:p.shouldInlineSubmenu,(g=i==null?void 0:i.toolbarOptions)==null?void 0:g.useSeparatorsInPrimaryActions),e.classList.toggle("has-no-actions",h.length===0&&f.length===0),super.setActions(h,f)};this._store.add(u.onDidChange(()=>{d(),this._onDidChangeMenuItems.fire(this)})),d()}setActions(){throw new co("This toolbar is populated from a menu.")}};Coe=YFt([nv(3,Jp),nv(4,vi),nv(5,Hm),nv(6,vo),nv(7,gs),nv(8,eh)],Coe);var XFt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},wte=function(t,e){return function(n,i){e(n,i,t)}};const H1e=[],WQ=35;let E2e=class extends ct{constructor(e,n,i,r,o,s,a,l,c){super(),this._diffModel=n,this._editors=i,this._options=r,this._sashLayout=o,this._boundarySashes=s,this._instantiationService=a,this._contextKeyService=l,this._menuService=c,this._menu=this._register(this._menuService.createMenu(Rn.DiffEditorHunkToolbar,this._contextKeyService)),this._actions=Oo(this,this._menu.onDidChange,()=>this._menu.getActions()),this._hasActions=this._actions.map(u=>u.length>0),this._showSash=Vn(this,u=>this._options.renderSideBySide.read(u)&&this._hasActions.read(u)),this.width=Vn(this,u=>this._hasActions.read(u)?WQ:0),this.elements=pr("div.gutter@gutter",{style:{position:"absolute",height:"100%",width:WQ+"px"}},[]),this._currentDiff=Vn(this,u=>{var m;const d=this._diffModel.read(u);if(!d)return;const h=(m=d.diff.read(u))==null?void 0:m.mappings,f=this._editors.modifiedCursor.read(u);if(f)return h==null?void 0:h.find(p=>p.lineRangeMapping.modified.contains(f.lineNumber))}),this._selectedDiffs=Vn(this,u=>{const d=this._diffModel.read(u),h=d==null?void 0:d.diff.read(u);if(!h)return H1e;const f=this._editors.modifiedSelections.read(u);if(f.every(y=>y.isEmpty()))return H1e;const m=new $g(f.map(y=>Ki.fromRangeInclusive(y))),g=h.mappings.filter(y=>y.lineRangeMapping.innerChanges&&m.intersects(y.lineRangeMapping.modified)).map(y=>({mapping:y,rangeMappings:y.lineRangeMapping.innerChanges.filter(_=>f.some(w=>ve.areIntersecting(_.modifiedRange,w)))}));return g.length===0||g.every(y=>y.rangeMappings.length===0)?H1e:g}),this._register(lMi(e,this.elements.root)),this._register(yt(this.elements.root,"click",()=>{this._editors.modified.focus()})),this._register(gS(this.elements.root,{display:this._hasActions.map(u=>u?"block":"none")})),Vd(this,u=>this._showSash.read(u)?new qFt(e,this._sashLayout.dimensions,this._options.enableSplitViewResizing,this._boundarySashes,Pq(this,h=>this._sashLayout.sashLeft.read(h)-WQ,(h,f)=>this._sashLayout.sashLeft.set(h+WQ,f)),()=>this._sashLayout.resetSash()):void 0).recomputeInitiallyAndOnChange(this._store),this._register(new jMi(this._editors.modified,this.elements.root,{getIntersectingGutterItems:(u,d)=>{const h=this._diffModel.read(d);if(!h)return[];const f=h.diff.read(d);if(!f)return[];const m=this._selectedDiffs.read(d);if(m.length>0){const g=Ip.fromRangeMappings(m.flatMap(y=>y.rangeMappings));return[new Kct(g,!0,Rn.DiffEditorSelectionToolbar,void 0,h.model.original.uri,h.model.modified.uri)]}const p=this._currentDiff.read(d);return f.mappings.map(g=>new Kct(g.lineRangeMapping.withInnerChangesFromLineRanges(),g.lineRangeMapping===(p==null?void 0:p.lineRangeMapping),Rn.DiffEditorHunkToolbar,void 0,h.model.original.uri,h.model.modified.uri))},createView:(u,d)=>this._instantiationService.createInstance(D2e,u,d,this)})),this._register(yt(this.elements.gutter,Yt.MOUSE_WHEEL,u=>{this._editors.modified.getOption(104).handleMouseWheel&&this._editors.modified.delegateScrollFromMouseWheelEvent(u)},{passive:!1}))}computeStagedValue(e){const n=e.innerChanges??[],i=new Uct(this._editors.modifiedModel.get()),r=new Uct(this._editors.original.getModel());return new U8e(n.map(a=>a.toTextEdit(i))).apply(r)}layout(e){this.elements.gutter.style.left=e+"px"}};E2e=XFt([wte(6,qn),wte(7,vi),wte(8,Jp)],E2e);class Kct{constructor(e,n,i,r,o,s){this.mapping=e,this.showAlways=n,this.menuId=i,this.rangeOverride=r,this.originalUri=o,this.modifiedUri=s}get id(){return this.mapping.modified.toString()}get range(){return this.rangeOverride??this.mapping.modified}}let D2e=class extends ct{constructor(e,n,i,r){super(),this._item=e,this._elements=pr("div.gutterItem",{style:{height:"20px",width:"34px"}},[pr("div.background@background",{},[]),pr("div.buttons@buttons",{},[])]),this._showAlways=this._item.map(this,s=>s.showAlways),this._menuId=this._item.map(this,s=>s.menuId),this._isSmall=lr(this,!1),this._lastItemRange=void 0,this._lastViewRange=void 0;const o=this._register(r.createInstance(m5,"element",!0,{position:{hoverPosition:1}}));this._register(x4(n,this._elements.root)),this._register(ki(s=>{const a=this._showAlways.read(s);this._elements.root.classList.toggle("noTransition",!0),this._elements.root.classList.toggle("showAlways",a),setTimeout(()=>{this._elements.root.classList.toggle("noTransition",!1)},0)})),this._register(Sf((s,a)=>{this._elements.buttons.replaceChildren();const l=a.add(r.createInstance(Coe,this._elements.buttons,this._menuId.read(s),{orientation:1,hoverDelegate:o,toolbarOptions:{primaryGroup:c=>c.startsWith("primary")},overflowBehavior:{maxItems:this._isSmall.read(s)?1:3},hiddenItemStrategy:0,actionRunner:new GFt(()=>{const c=this._item.get(),u=c.mapping;return{mapping:u,originalWithModifiedChanges:i.computeStagedValue(u),originalUri:c.originalUri,modifiedUri:c.modifiedUri}}),menuOptions:{shouldForwardArgs:!0}}));a.add(l.onDidChangeMenuItems(()=>{this._lastItemRange&&this.layout(this._lastItemRange,this._lastViewRange)}))}))}layout(e,n){this._lastItemRange=e,this._lastViewRange=n;let i=this._elements.buttons.clientHeight;this._isSmall.set(this._item.get().mapping.original.startLineNumber===1&&e.length<30,void 0),i=this._elements.buttons.clientHeight;const r=e.length/2-i/2,o=i;let s=e.start+r;const a=dr.tryCreate(o,n.endExclusive-o-i),l=dr.tryCreate(e.start+o,e.endExclusive-i-o);l&&a&&l.start<l.endExclusive&&(s=a.clip(s),s=l.clip(s)),this._elements.buttons.style.top=`${s-e.start}px`}};D2e=XFt([wte(3,qn)],D2e);function hm(t){return k2e.get(t)}const mE=class mE extends ct{static get(e){let n=mE._map.get(e);if(!n){n=new mE(e),mE._map.set(e,n);const i=e.onDidDispose(()=>{const r=mE._map.get(e);r&&(mE._map.delete(e),r.dispose(),i.dispose())})}return n}_beginUpdate(){this._updateCounter++,this._updateCounter===1&&(this._currentTransaction=new $6(()=>{}))}_endUpdate(){if(this._updateCounter--,this._updateCounter===0){const e=this._currentTransaction;this._currentTransaction=void 0,e.finish()}}constructor(e){var n;super(),this.editor=e,this._updateCounter=0,this._currentTransaction=void 0,this._model=lr(this,this.editor.getModel()),this.model=this._model,this.isReadonly=Oo(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(92)),this._versionId=pIe({owner:this,lazy:!0},((n=this.editor.getModel())==null?void 0:n.getVersionId())??null),this.versionId=this._versionId,this._selections=pIe({owner:this,equalsFn:hIe(Bre(Pn.selectionsEqual)),lazy:!0},this.editor.getSelections()??null),this.selections=this._selections,this.isFocused=Oo(this,i=>{const r=this.editor.onDidFocusEditorWidget(i),o=this.editor.onDidBlurEditorWidget(i);return{dispose(){r.dispose(),o.dispose()}}},()=>this.editor.hasWidgetFocus()),this.value=Pq(this,i=>{var r;return this.versionId.read(i),((r=this.model.read(i))==null?void 0:r.getValue())??""},(i,r)=>{const o=this.model.get();o!==null&&i!==o.getValue()&&o.setValue(i)}),this.valueIsEmpty=Vn(this,i=>{var r;return this.versionId.read(i),((r=this.editor.getModel())==null?void 0:r.getValueLength())===0}),this.cursorSelection=gp({owner:this,equalsFn:hIe(Pn.selectionsEqual)},i=>{var r;return((r=this.selections.read(i))==null?void 0:r[0])??null}),this.onDidType=V6(this),this.scrollTop=Oo(this.editor.onDidScrollChange,()=>this.editor.getScrollTop()),this.scrollLeft=Oo(this.editor.onDidScrollChange,()=>this.editor.getScrollLeft()),this.layoutInfo=Oo(this.editor.onDidLayoutChange,()=>this.editor.getLayoutInfo()),this.layoutInfoContentLeft=this.layoutInfo.map(i=>i.contentLeft),this.layoutInfoDecorationsLeft=this.layoutInfo.map(i=>i.decorationsLeft),this.contentWidth=Oo(this.editor.onDidContentSizeChange,()=>this.editor.getContentWidth()),this._overlayWidgetCounter=0,this._register(this.editor.onBeginUpdate(()=>this._beginUpdate())),this._register(this.editor.onEndUpdate(()=>this._endUpdate())),this._register(this.editor.onDidChangeModel(()=>{this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._forceUpdate()}finally{this._endUpdate()}})),this._register(this.editor.onDidType(i=>{this._beginUpdate();try{this._forceUpdate(),this.onDidType.trigger(this._currentTransaction,i)}finally{this._endUpdate()}})),this._register(this.editor.onDidChangeModelContent(i=>{var r;this._beginUpdate();try{this._versionId.set(((r=this.editor.getModel())==null?void 0:r.getVersionId())??null,this._currentTransaction,i),this._forceUpdate()}finally{this._endUpdate()}})),this._register(this.editor.onDidChangeCursorSelection(i=>{this._beginUpdate();try{this._selections.set(this.editor.getSelections(),this._currentTransaction,i),this._forceUpdate()}finally{this._endUpdate()}}))}forceUpdate(e){this._beginUpdate();try{return this._forceUpdate(),e?e(this._currentTransaction):void 0}finally{this._endUpdate()}}_forceUpdate(){var e;this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._versionId.set(((e=this.editor.getModel())==null?void 0:e.getVersionId())??null,this._currentTransaction,void 0),this._selections.set(this.editor.getSelections(),this._currentTransaction,void 0)}finally{this._endUpdate()}}getOption(e){return Oo(this,n=>this.editor.onDidChangeConfiguration(i=>{i.hasChanged(e)&&n(void 0)}),()=>this.editor.getOption(e))}setDecorations(e){const n=new Lt,i=this.editor.createDecorationsCollection();return n.add(Oq({owner:this,debugName:()=>`Apply decorations from ${e.debugName}`},r=>{const o=e.read(r);i.set(o)})),n.add({dispose:()=>{i.clear()}}),n}createOverlayWidget(e){const n="observableOverlayWidget"+this._overlayWidgetCounter++,i={getDomNode:()=>e.domNode,getPosition:()=>e.position.get(),getId:()=>n,allowEditorOverflow:e.allowEditorOverflow,getMinContentWidthInPx:()=>e.minContentWidthInPx.get()};this.editor.addOverlayWidget(i);const r=ki(o=>{e.position.read(o),e.minContentWidthInPx.read(o),this.editor.layoutOverlayWidget(i)});return Kn(()=>{r.dispose(),this.editor.removeOverlayWidget(i)})}};mE._map=new Map;let k2e=mE;function M2e(t,e){return SNi({createEmptyChangeSummary:()=>({deltas:[],didChange:!1}),handleChange:(n,i)=>{if(n.didChange(t)){const r=n.change;r!==void 0&&i.deltas.push(r),i.didChange=!0}return!0}},(n,i)=>{const r=t.read(n);i.didChange&&e(r,i.deltas)})}function VMi(t,e){const n=new Lt,i=M2e(t,(r,o)=>{n.clear(),e(r,o,n)});return{dispose(){i.dispose(),n.dispose()}}}var BMi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},zMi=function(t,e){return function(n,i){e(n,i,t)}},Cte,RI;let Soe=(RI=class extends ct{static setBreadcrumbsSourceFactory(e){this._breadcrumbsSourceFactory.set(e,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,n,i,r){super(),this._editors=e,this._diffModel=n,this._options=i,this._instantiationService=r,this._modifiedOutlineSource=Vd(this,l=>{const c=this._editors.modifiedModel.read(l),u=Cte._breadcrumbsSourceFactory.read(l);return!c||!u?void 0:u(c,this._instantiationService)}),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition(l=>{if(l.reason===1)return;const c=this._diffModel.get();ma(u=>{for(const d of this._editors.original.getSelections()||[])c==null||c.ensureOriginalLineIsVisible(d.getStartPosition().lineNumber,0,u),c==null||c.ensureOriginalLineIsVisible(d.getEndPosition().lineNumber,0,u)})})),this._register(this._editors.modified.onDidChangeCursorPosition(l=>{if(l.reason===1)return;const c=this._diffModel.get();ma(u=>{for(const d of this._editors.modified.getSelections()||[])c==null||c.ensureModifiedLineIsVisible(d.getStartPosition().lineNumber,0,u),c==null||c.ensureModifiedLineIsVisible(d.getEndPosition().lineNumber,0,u)})}));const o=this._diffModel.map((l,c)=>{var d;const u=(l==null?void 0:l.unchangedRegions.read(c))??[];return u.length===1&&u[0].modifiedLineNumber===1&&u[0].lineCount===((d=this._editors.modifiedModel.read(c))==null?void 0:d.getLineCount())?[]:u});this.viewZones=sM(this,(l,c)=>{const u=this._modifiedOutlineSource.read(l);if(!u)return{origViewZones:[],modViewZones:[]};const d=[],h=[],f=this._options.renderSideBySide.read(l),m=this._options.compactMode.read(l),p=o.read(l);for(let g=0;g<p.length;g++){const y=p[g];if(!y.shouldHideControls(l)&&!(m&&(g===0||g===p.length-1)))if(m){{const _=Vn(this,C=>y.getHiddenOriginalRange(C).startLineNumber-1),w=new w4(_,12);d.push(w),c.add(new qct(this._editors.original,w,y,!f))}{const _=Vn(this,C=>y.getHiddenModifiedRange(C).startLineNumber-1),w=new w4(_,12);h.push(w),c.add(new qct(this._editors.modified,w,y))}}else{{const _=Vn(this,C=>y.getHiddenOriginalRange(C).startLineNumber-1),w=new w4(_,24);d.push(w),c.add(new Gct(this._editors.original,w,y,y.originalUnchangedRange,!f,u,C=>this._diffModel.get().ensureModifiedLineIsVisible(C,2,void 0),this._options))}{const _=Vn(this,C=>y.getHiddenModifiedRange(C).startLineNumber-1),w=new w4(_,24);h.push(w),c.add(new Gct(this._editors.modified,w,y,y.modifiedUnchangedRange,!1,u,C=>this._diffModel.get().ensureModifiedLineIsVisible(C,2,void 0),this._options))}}}return{origViewZones:d,modViewZones:h}});const s={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},a={description:"Fold Unchanged",glyphMarginHoverMessage:new rd(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(I("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+ci.asClassName(qt.fold),zIndex:10001};this._register(voe(this._editors.original,Vn(this,l=>{const c=o.read(l),u=c.map(d=>({range:d.originalUnchangedRange.toInclusiveRange(),options:s}));for(const d of c)d.shouldHideControls(l)&&u.push({range:ve.fromPositions(new ot(d.originalLineNumber,1)),options:a});return u}))),this._register(voe(this._editors.modified,Vn(this,l=>{const c=o.read(l),u=c.map(d=>({range:d.modifiedUnchangedRange.toInclusiveRange(),options:s}));for(const d of c)d.shouldHideControls(l)&&u.push({range:Ki.ofLength(d.modifiedLineNumber,1).toInclusiveRange(),options:a});return u}))),this._register(ki(l=>{const c=o.read(l);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(c.map(u=>u.getHiddenOriginalRange(l).toInclusiveRange()).filter(zx)),this._editors.modified.setHiddenAreas(c.map(u=>u.getHiddenModifiedRange(l).toInclusiveRange()).filter(zx))}finally{this._isUpdatingHiddenAreas=!1}})),this._register(this._editors.modified.onMouseUp(l=>{var c;if(!l.event.rightButton&&l.target.position&&((c=l.target.element)!=null&&c.className.includes("fold-unchanged"))){const u=l.target.position.lineNumber,d=this._diffModel.get();if(!d)return;const h=d.unchangedRegions.get().find(f=>f.modifiedUnchangedRange.includes(u));if(!h)return;h.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(l=>{var c;if(!l.event.rightButton&&l.target.position&&((c=l.target.element)!=null&&c.className.includes("fold-unchanged"))){const u=l.target.position.lineNumber,d=this._diffModel.get();if(!d)return;const h=d.unchangedRegions.get().find(f=>f.originalUnchangedRange.includes(u));if(!h)return;h.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}}))}},Cte=RI,RI._breadcrumbsSourceFactory=lr(Cte,()=>({dispose(){},getBreadcrumbItems(e,n){return[]}})),RI);Soe=Cte=BMi([zMi(3,qn)],Soe);class qct extends P7e{constructor(e,n,i,r=!1){const o=pr("div.diff-hidden-lines-widget");super(e,n,o.root),this._unchangedRegion=i,this._hide=r,this._nodes=pr("div.diff-hidden-lines-compact",[pr("div.line-left",[]),pr("div.text@text",[]),pr("div.line-right",[])]),o.root.appendChild(this._nodes.root),this._hide&&this._nodes.root.replaceChildren(),this._register(ki(s=>{if(!this._hide){const a=this._unchangedRegion.getHiddenModifiedRange(s).length,l=I("hiddenLines","{0} hidden lines",a);this._nodes.text.innerText=l}}))}}class Gct extends P7e{constructor(e,n,i,r,o,s,a,l){const c=pr("div.diff-hidden-lines-widget");super(e,n,c.root),this._editor=e,this._unchangedRegion=i,this._unchangedRegionRange=r,this._hide=o,this._modifiedOutlineSource=s,this._revealModifiedHiddenLine=a,this._options=l,this._nodes=pr("div.diff-hidden-lines",[pr("div.top@top",{title:I("diff.hiddenLines.top","Click or drag to show more above")}),pr("div.center@content",{style:{display:"flex"}},[pr("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[Xt("a",{title:I("showUnchangedRegion","Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...bD("$(unfold)"))]),pr("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),pr("div.bottom@bottom",{title:I("diff.bottom","Click or drag to show more below"),role:"button"})]),c.root.appendChild(this._nodes.root),this._hide?ou(this._nodes.first):this._register(gS(this._nodes.first,{width:hm(this._editor).layoutInfoContentLeft})),this._register(ki(d=>{const h=this._unchangedRegion.visibleLineCountTop.read(d)+this._unchangedRegion.visibleLineCountBottom.read(d)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!h),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(d)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(d)>0),this._nodes.top.classList.toggle("canMoveBottom",!h);const f=this._unchangedRegion.isDragged.read(d),m=this._editor.getDomNode();m&&(m.classList.toggle("draggingUnchangedRegion",!!f),f==="top"?(m.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(d)>0),m.classList.toggle("canMoveBottom",!h)):f==="bottom"?(m.classList.toggle("canMoveTop",!h),m.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(d)>0)):(m.classList.toggle("canMoveTop",!1),m.classList.toggle("canMoveBottom",!1)))}));const u=this._editor;this._register(yt(this._nodes.top,"mousedown",d=>{if(d.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),d.preventDefault();const h=d.clientY;let f=!1;const m=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);const p=ei(this._nodes.top),g=yt(p,"mousemove",_=>{const C=_.clientY-h;f=f||Math.abs(C)>2;const N=Math.round(C/u.getOption(67)),E=Math.max(0,Math.min(m+N,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(E,void 0)}),y=yt(p,"mouseup",_=>{f||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),g.dispose(),y.dispose()})})),this._register(yt(this._nodes.bottom,"mousedown",d=>{if(d.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),d.preventDefault();const h=d.clientY;let f=!1;const m=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);const p=ei(this._nodes.bottom),g=yt(p,"mousemove",_=>{const C=_.clientY-h;f=f||Math.abs(C)>2;const N=Math.round(C/u.getOption(67)),E=Math.max(0,Math.min(m-N,this._unchangedRegion.getMaxVisibleLineCountBottom())),D=this._unchangedRegionRange.endLineNumberExclusive>u.getModel().getLineCount()?u.getContentHeight():u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(E,void 0);const k=this._unchangedRegionRange.endLineNumberExclusive>u.getModel().getLineCount()?u.getContentHeight():u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);u.setScrollTop(u.getScrollTop()+(k-D))}),y=yt(p,"mouseup",_=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!f){const w=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const C=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);u.setScrollTop(u.getScrollTop()+(C-w))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),g.dispose(),y.dispose()})})),this._register(ki(d=>{const h=[];if(!this._hide){const f=i.getHiddenModifiedRange(d).length,m=I("hiddenLines","{0} hidden lines",f),p=Xt("span",{title:I("diff.hiddenLines.expandAll","Double click to unfold")},m);p.addEventListener("dblclick",_=>{_.button===0&&(_.preventDefault(),this._unchangedRegion.showAll(void 0))}),h.push(p);const g=this._unchangedRegion.getHiddenModifiedRange(d),y=this._modifiedOutlineSource.getBreadcrumbItems(g,d);if(y.length>0){h.push(Xt("span",void 0,"  |  "));for(let _=0;_<y.length;_++){const w=y[_],C=Oie.toIcon(w.kind),N=pr("div.breadcrumb-item",{style:{display:"flex",alignItems:"center"}},[Y2(C)," ",w.name,..._===y.length-1?[]:[Y2(qt.chevronRight)]]).root;h.push(N),N.onclick=()=>{this._revealModifiedHiddenLine(w.startLineNumber)}}}}ou(this._nodes.others,...h)}))}}var HMi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},WMi=function(t,e){return function(n,i){e(n,i,t)}},Ey,_C;let bW=(_C=class extends ct{constructor(e,n,i,r,o,s,a){super(),this._editors=e,this._rootElement=n,this._diffModel=i,this._rootWidth=r,this._rootHeight=o,this._modifiedEditorLayoutInfo=s,this._themeService=a,this.width=Ey.ENTIRE_DIFF_OVERVIEW_WIDTH;const l=Oo(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),c=Vn(h=>{const f=l.read(h),m=f.getColor(_bi)||(f.getColor(vbi)||ZLe).transparent(2),p=f.getColor(xbi)||(f.getColor(ybi)||QLe).transparent(2);return{insertColor:m,removeColor:p}}),u=wo(document.createElement("div"));u.setClassName("diffViewport"),u.setPosition("absolute");const d=pr("div.diffOverview",{style:{position:"absolute",top:"0px",width:Ey.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register(x4(d,u.domNode)),this._register(Fa(d,Yt.POINTER_DOWN,h=>{this._editors.modified.delegateVerticalScrollbarPointerDown(h)})),this._register(yt(d,Yt.MOUSE_WHEEL,h=>{this._editors.modified.delegateScrollFromMouseWheelEvent(h)},{passive:!1})),this._register(x4(this._rootElement,d)),this._register(Sf((h,f)=>{const m=this._diffModel.read(h),p=this._editors.original.createOverviewRuler("original diffOverviewRuler");p&&(f.add(p),f.add(x4(d,p.getDomNode())));const g=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(g&&(f.add(g),f.add(x4(d,g.getDomNode()))),!p||!g)return;const y=Nu("viewZoneChanged",this._editors.original.onDidChangeViewZones),_=Nu("viewZoneChanged",this._editors.modified.onDidChangeViewZones),w=Nu("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),C=Nu("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);f.add(ki(N=>{var A;y.read(N),_.read(N),w.read(N),C.read(N);const E=c.read(N),D=(A=m==null?void 0:m.diff.read(N))==null?void 0:A.mappings;function k(R,P,O){const V=O._getViewModel();return V?R.filter(F=>F.length>0).map(F=>{const $=V.coordinatesConverter.convertModelPositionToViewPosition(new ot(F.startLineNumber,1)),B=V.coordinatesConverter.convertModelPositionToViewPosition(new ot(F.endLineNumberExclusive,1)),z=B.lineNumber-$.lineNumber;return new Sjt($.lineNumber,B.lineNumber,z,P.toString())}):[]}const M=k((D||[]).map(R=>R.lineRangeMapping.original),E.removeColor,this._editors.original),T=k((D||[]).map(R=>R.lineRangeMapping.modified),E.insertColor,this._editors.modified);p==null||p.setZones(M),g==null||g.setZones(T)})),f.add(ki(N=>{const E=this._rootHeight.read(N),D=this._rootWidth.read(N),k=this._modifiedEditorLayoutInfo.read(N);if(k){const M=Ey.ENTIRE_DIFF_OVERVIEW_WIDTH-2*Ey.ONE_OVERVIEW_WIDTH;p.setLayout({top:0,height:E,right:M+Ey.ONE_OVERVIEW_WIDTH,width:Ey.ONE_OVERVIEW_WIDTH}),g.setLayout({top:0,height:E,right:0,width:Ey.ONE_OVERVIEW_WIDTH});const T=this._editors.modifiedScrollTop.read(N),A=this._editors.modifiedScrollHeight.read(N),R=this._editors.modified.getOption(104),P=new f5(R.verticalHasArrows?R.arrowSize:0,R.verticalScrollbarSize,0,k.height,A,T);u.setTop(P.getSliderPosition()),u.setHeight(P.getSliderSize())}else u.setTop(0),u.setHeight(0);d.style.height=E+"px",d.style.left=D-Ey.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",u.setWidth(Ey.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}},Ey=_C,_C.ONE_OVERVIEW_WIDTH=15,_C.ENTIRE_DIFF_OVERVIEW_WIDTH=_C.ONE_OVERVIEW_WIDTH*2,_C);bW=Ey=HMi([WMi(6,Ql)],bW);const W1e=[];class UMi extends ct{constructor(e,n,i,r){super(),this._editors=e,this._diffModel=n,this._options=i,this._widget=r,this._selectedDiffs=Vn(this,o=>{const s=this._diffModel.read(o),a=s==null?void 0:s.diff.read(o);if(!a)return W1e;const l=this._editors.modifiedSelections.read(o);if(l.every(h=>h.isEmpty()))return W1e;const c=new $g(l.map(h=>Ki.fromRangeInclusive(h))),d=a.mappings.filter(h=>h.lineRangeMapping.innerChanges&&c.intersects(h.lineRangeMapping.modified)).map(h=>({mapping:h,rangeMappings:h.lineRangeMapping.innerChanges.filter(f=>l.some(m=>ve.areIntersecting(f.modifiedRange,m)))}));return d.length===0||d.every(h=>h.rangeMappings.length===0)?W1e:d}),this._register(Sf((o,s)=>{if(!this._options.shouldRenderOldRevertArrows.read(o))return;const a=this._diffModel.read(o),l=a==null?void 0:a.diff.read(o);if(!a||!l||a.movedTextToCompare.read(o))return;const c=[],u=this._selectedDiffs.read(o),d=new Set(u.map(h=>h.mapping));if(u.length>0){const h=this._editors.modifiedSelections.read(o),f=s.add(new Noe(h[h.length-1].positionLineNumber,this._widget,u.flatMap(m=>m.rangeMappings),!0));this._editors.modified.addGlyphMarginWidget(f),c.push(f)}for(const h of l.mappings)if(!d.has(h)&&!h.lineRangeMapping.modified.isEmpty&&h.lineRangeMapping.innerChanges){const f=s.add(new Noe(h.lineRangeMapping.modified.startLineNumber,this._widget,h.lineRangeMapping,!1));this._editors.modified.addGlyphMarginWidget(f),c.push(f)}s.add(Kn(()=>{for(const h of c)this._editors.modified.removeGlyphMarginWidget(h)}))}))}}const bce=class bce extends ct{getId(){return this._id}constructor(e,n,i,r){super(),this._lineNumber=e,this._widget=n,this._diffs=i,this._revertSelection=r,this._id=`revertButton${bce.counter++}`,this._domNode=pr("div.revertButton",{title:this._revertSelection?I("revertSelectedChanges","Revert Selected Changes"):I("revertChange","Revert Change")},[Y2(qt.arrowRight)]).root,this._register(yt(this._domNode,Yt.MOUSE_DOWN,o=>{o.button!==2&&(o.stopPropagation(),o.preventDefault())})),this._register(yt(this._domNode,Yt.MOUSE_UP,o=>{o.stopPropagation(),o.preventDefault()})),this._register(yt(this._domNode,Yt.CLICK,o=>{this._diffs instanceof zd?this._widget.revert(this._diffs):this._widget.revertRangeMappings(this._diffs),o.stopPropagation(),o.preventDefault()}))}getDomNode(){return this._domNode}getPosition(){return{lane:Iv.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}};bce.counter=0;let Noe=bce;function KMi(t,e,n){return ENi({debugName:()=>`Configuration Key "${t}"`},i=>n.onDidChangeConfiguration(r=>{r.affectsConfiguration(t)&&i(r)}),()=>n.getValue(t)??e)}function My(t,e,n){const i=t.bindTo(e);return Oq({debugName:()=>`Set Context Key "${t.key}"`},r=>{i.set(n(r))})}var qMi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Yct=function(t,e){return function(n,i){e(n,i,t)}};let L2e=class extends ct{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,n,i,r,o,s,a){super(),this.originalEditorElement=e,this.modifiedEditorElement=n,this._options=i,this._argCodeEditorWidgetOptions=r,this._createInnerEditor=o,this._instantiationService=s,this._keybindingService=a,this.original=this._register(this._createLeftHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.modifiedEditor||{})),this._onDidContentSizeChange=this._register(new st),this.modifiedScrollTop=Oo(this,this.modified.onDidScrollChange,()=>this.modified.getScrollTop()),this.modifiedScrollHeight=Oo(this,this.modified.onDidScrollChange,()=>this.modified.getScrollHeight()),this.modifiedObs=hm(this.modified),this.originalObs=hm(this.original),this.modifiedModel=this.modifiedObs.model,this.modifiedSelections=Oo(this,this.modified.onDidChangeCursorSelection,()=>this.modified.getSelections()??[]),this.modifiedCursor=gp({owner:this,equalsFn:ot.equals},l=>{var c;return((c=this.modifiedSelections.read(l)[0])==null?void 0:c.getPosition())??new ot(1,1)}),this.originalCursor=Oo(this,this.original.onDidChangeCursorPosition,()=>this.original.getPosition()??new ot(1,1)),this._argCodeEditorWidgetOptions=null,this._register(jq({createEmptyChangeSummary:()=>({}),handleChange:(l,c)=>(l.didChange(i.editorOptions)&&Object.assign(c,l.change.changedOptions),!0)},(l,c)=>{i.editorOptions.read(l),this._options.renderSideBySide.read(l),this.modified.updateOptions(this._adjustOptionsForRightHandSide(l,c)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(l,c))}))}_createLeftHandSideEditor(e,n){const i=this._adjustOptionsForLeftHandSide(void 0,e),r=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,i,n);return r.setContextValue("isInDiffLeftEditor",!0),r}_createRightHandSideEditor(e,n){const i=this._adjustOptionsForRightHandSide(void 0,e),r=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,i,n);return r.setContextValue("isInDiffRightEditor",!0),r}_constructInnerEditor(e,n,i,r){const o=this._createInnerEditor(e,n,i,r);return this._register(o.onDidContentSizeChange(s=>{const a=this.original.getContentWidth()+this.modified.getContentWidth()+bW.ENTIRE_DIFF_OVERVIEW_WIDTH,l=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:l,contentWidth:a,contentHeightChanged:s.contentHeightChanged,contentWidthChanged:s.contentWidthChanged})})),o}_adjustOptionsForLeftHandSide(e,n){const i=this._adjustOptionsForSubEditor(n);return this._options.renderSideBySide.get()?(i.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},i.wordWrapOverride1=this._options.diffWordWrap.get()):(i.wordWrapOverride1="off",i.wordWrapOverride2="off",i.stickyScroll={enabled:!1},i.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),i.glyphMargin=this._options.renderSideBySide.get(),n.originalAriaLabel&&(i.ariaLabel=n.originalAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.readOnly=!this._options.originalEditable.get(),i.dropIntoEditor={enabled:!i.readOnly},i.extraEditorClassName="original-in-monaco-diff-editor",i}_adjustOptionsForRightHandSide(e,n){const i=this._adjustOptionsForSubEditor(n);return n.modifiedAriaLabel&&(i.ariaLabel=n.modifiedAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.wordWrapOverride1=this._options.diffWordWrap.get(),i.revealHorizontalRightPadding=l_.revealHorizontalRightPadding.defaultValue+bW.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",i}_adjustOptionsForSubEditor(e){const n={...e,dimension:{height:0,width:0}};return n.inDiffEditor=!0,n.automaticLayout=!1,n.scrollbar={...n.scrollbar||{}},n.folding=!1,n.codeLens=this._options.diffCodeLens.get(),n.fixedOverflowWidgets=!0,n.minimap={...n.minimap||{}},n.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?n.stickyScroll={enabled:!1}:n.stickyScroll=this._options.editorOptions.get().stickyScroll,n}_updateAriaLabel(e){var i;e||(e="");const n=I("diff-aria-navigation-tip"," use {0} to open the accessibility help.",(i=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))==null?void 0:i.getAriaLabel());return this._options.accessibilityVerbose.get()?e+n:e?e.replaceAll(n,""):""}};L2e=qMi([Yct(5,qn),Yct(6,vo)],L2e);const vce=class vce extends ct{constructor(){super(...arguments),this._id=++vce.idCounter,this._onDidDispose=this._register(new st),this.onDidDispose=this._onDidDispose.event}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,n="api"){this._targetEditor.setPosition(e,n)}revealLine(e,n=0){this._targetEditor.revealLine(e,n)}revealLineInCenter(e,n=0){this._targetEditor.revealLineInCenter(e,n)}revealLineInCenterIfOutsideViewport(e,n=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,n)}revealLineNearTop(e,n=0){this._targetEditor.revealLineNearTop(e,n)}revealPosition(e,n=0){this._targetEditor.revealPosition(e,n)}revealPositionInCenter(e,n=0){this._targetEditor.revealPositionInCenter(e,n)}revealPositionInCenterIfOutsideViewport(e,n=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,n)}revealPositionNearTop(e,n=0){this._targetEditor.revealPositionNearTop(e,n)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,n="api"){this._targetEditor.setSelection(e,n)}setSelections(e,n="api"){this._targetEditor.setSelections(e,n)}revealLines(e,n,i=0){this._targetEditor.revealLines(e,n,i)}revealLinesInCenter(e,n,i=0){this._targetEditor.revealLinesInCenter(e,n,i)}revealLinesInCenterIfOutsideViewport(e,n,i=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,n,i)}revealLinesNearTop(e,n,i=0){this._targetEditor.revealLinesNearTop(e,n,i)}revealRange(e,n=0,i=!1,r=!0){this._targetEditor.revealRange(e,n,i,r)}revealRangeInCenter(e,n=0){this._targetEditor.revealRangeInCenter(e,n)}revealRangeInCenterIfOutsideViewport(e,n=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,n)}revealRangeNearTop(e,n=0){this._targetEditor.revealRangeNearTop(e,n)}revealRangeNearTopIfOutsideViewport(e,n=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,n)}revealRangeAtTop(e,n=0){this._targetEditor.revealRangeAtTop(e,n)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,n,i){this._targetEditor.trigger(e,n,i)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}};vce.idCounter=0;let T2e=vce;var GMi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},YMi=function(t,e){return function(n,i){e(n,i,t)}};let I2e=class{get editorOptions(){return this._options}constructor(e,n){this._accessibilityService=n,this._diffEditorWidth=lr(this,0),this._screenReaderMode=Oo(this,this._accessibilityService.onDidChangeScreenReaderOptimized,()=>this._accessibilityService.isScreenReaderOptimized()),this.couldShowInlineViewBecauseOfSize=Vn(this,r=>this._options.read(r).renderSideBySide&&this._diffEditorWidth.read(r)<=this._options.read(r).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=Vn(this,r=>this._options.read(r).renderOverviewRuler),this.renderSideBySide=Vn(this,r=>this.compactMode.read(r)&&this.shouldRenderInlineViewInSmartMode.read(r)?!1:this._options.read(r).renderSideBySide&&!(this._options.read(r).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(r)&&!this._screenReaderMode.read(r))),this.readOnly=Vn(this,r=>this._options.read(r).readOnly),this.shouldRenderOldRevertArrows=Vn(this,r=>!(!this._options.read(r).renderMarginRevertIcon||!this.renderSideBySide.read(r)||this.readOnly.read(r)||this.shouldRenderGutterMenu.read(r))),this.shouldRenderGutterMenu=Vn(this,r=>this._options.read(r).renderGutterMenu),this.renderIndicators=Vn(this,r=>this._options.read(r).renderIndicators),this.enableSplitViewResizing=Vn(this,r=>this._options.read(r).enableSplitViewResizing),this.splitViewDefaultRatio=Vn(this,r=>this._options.read(r).splitViewDefaultRatio),this.ignoreTrimWhitespace=Vn(this,r=>this._options.read(r).ignoreTrimWhitespace),this.maxComputationTimeMs=Vn(this,r=>this._options.read(r).maxComputationTime),this.showMoves=Vn(this,r=>this._options.read(r).experimental.showMoves&&this.renderSideBySide.read(r)),this.isInEmbeddedEditor=Vn(this,r=>this._options.read(r).isInEmbeddedEditor),this.diffWordWrap=Vn(this,r=>this._options.read(r).diffWordWrap),this.originalEditable=Vn(this,r=>this._options.read(r).originalEditable),this.diffCodeLens=Vn(this,r=>this._options.read(r).diffCodeLens),this.accessibilityVerbose=Vn(this,r=>this._options.read(r).accessibilityVerbose),this.diffAlgorithm=Vn(this,r=>this._options.read(r).diffAlgorithm),this.showEmptyDecorations=Vn(this,r=>this._options.read(r).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=Vn(this,r=>this._options.read(r).onlyShowAccessibleDiffViewer),this.compactMode=Vn(this,r=>this._options.read(r).compactMode),this.trueInlineDiffRenderingEnabled=Vn(this,r=>this._options.read(r).experimental.useTrueInlineView),this.useTrueInlineDiffRendering=Vn(this,r=>!this.renderSideBySide.read(r)&&this.trueInlineDiffRenderingEnabled.read(r)),this.hideUnchangedRegions=Vn(this,r=>this._options.read(r).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=Vn(this,r=>this._options.read(r).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=Vn(this,r=>this._options.read(r).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=Vn(this,r=>this._options.read(r).hideUnchangedRegions.minimumLineCount),this._model=lr(this,void 0),this.shouldRenderInlineViewInSmartMode=this._model.map(this,r=>LNi(this,o=>{const s=r==null?void 0:r.diff.read(o);return s?XMi(s,this.trueInlineDiffRenderingEnabled.read(o)):void 0})).flatten().map(this,r=>!!r),this.inlineViewHideOriginalLineNumbers=this.compactMode;const i={...e,...Xct(e,mu)};this._options=lr(this,i)}updateOptions(e){const n=Xct(e,this._options.get()),i={...this._options.get(),...e,...n};this._options.set(i,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}setModel(e){this._model.set(e,void 0)}};I2e=GMi([YMi(1,Bm)],I2e);function XMi(t,e){return t.mappings.every(n=>ZMi(n.lineRangeMapping)||QMi(n.lineRangeMapping)||e&&W7e(n.lineRangeMapping))}function ZMi(t){return t.original.length===0}function QMi(t){return t.modified.length===0}function Xct(t,e){var n,i,r,o,s,a,l,c;return{enableSplitViewResizing:Wn(t.enableSplitViewResizing,e.enableSplitViewResizing),splitViewDefaultRatio:aui(t.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:Wn(t.renderSideBySide,e.renderSideBySide),renderMarginRevertIcon:Wn(t.renderMarginRevertIcon,e.renderMarginRevertIcon),maxComputationTime:TL(t.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:TL(t.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:Wn(t.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:Wn(t.renderIndicators,e.renderIndicators),originalEditable:Wn(t.originalEditable,e.originalEditable),diffCodeLens:Wn(t.diffCodeLens,e.diffCodeLens),renderOverviewRuler:Wn(t.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:wa(t.diffWordWrap,e.diffWordWrap,["off","on","inherit"]),diffAlgorithm:wa(t.diffAlgorithm,e.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:Wn(t.accessibilityVerbose,e.accessibilityVerbose),experimental:{showMoves:Wn((n=t.experimental)==null?void 0:n.showMoves,e.experimental.showMoves),showEmptyDecorations:Wn((i=t.experimental)==null?void 0:i.showEmptyDecorations,e.experimental.showEmptyDecorations),useTrueInlineView:Wn((r=t.experimental)==null?void 0:r.useTrueInlineView,e.experimental.useTrueInlineView)},hideUnchangedRegions:{enabled:Wn(((o=t.hideUnchangedRegions)==null?void 0:o.enabled)??((s=t.experimental)==null?void 0:s.collapseUnchangedRegions),e.hideUnchangedRegions.enabled),contextLineCount:TL((a=t.hideUnchangedRegions)==null?void 0:a.contextLineCount,e.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:TL((l=t.hideUnchangedRegions)==null?void 0:l.minimumLineCount,e.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:TL((c=t.hideUnchangedRegions)==null?void 0:c.revealLineCount,e.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:Wn(t.isInEmbeddedEditor,e.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:Wn(t.onlyShowAccessibleDiffViewer,e.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:TL(t.renderSideBySideInlineBreakpoint,e.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:Wn(t.useInlineViewWhenSpaceIsLimited,e.useInlineViewWhenSpaceIsLimited),renderGutterMenu:Wn(t.renderGutterMenu,e.renderGutterMenu),compactMode:Wn(t.compactMode,e.compactMode)}}var JMi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},r7=function(t,e){return function(n,i){e(n,i,t)}};let bS=class extends T2e{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,n,i,r,o,s,a,l){super(),this._domElement=e,this._parentContextKeyService=r,this._parentInstantiationService=o,this._accessibilitySignalService=a,this._editorProgressService=l,this.elements=pr("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[pr("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),pr("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),pr("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModelSrc=this._register(sW(this,void 0)),this._diffModel=Vn(this,C=>{var N;return(N=this._diffModelSrc.read(C))==null?void 0:N.object}),this.onDidChangeModel=rn.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new Mq([vi,this._contextKeyService]))),this._boundarySashes=lr(this,void 0),this._accessibleDiffViewerShouldBeVisible=lr(this,!1),this._accessibleDiffViewerVisible=Vn(this,C=>this._options.onlyShowAccessibleDiffViewer.read(C)?!0:this._accessibleDiffViewerShouldBeVisible.read(C)),this._movedBlocksLinesPart=lr(this,void 0),this._layoutInfo=Vn(this,C=>{var $,B;const N=this._rootSizeObserver.width.read(C),E=this._rootSizeObserver.height.read(C);this._rootSizeObserver.automaticLayout?this.elements.root.style.height="100%":this.elements.root.style.height=E+"px";const D=this._sash.read(C),k=this._gutter.read(C),M=(k==null?void 0:k.width.read(C))??0,T=(($=this._overviewRulerPart.read(C))==null?void 0:$.width)??0;let A,R,P,O,V;if(!!D){const z=D.sashLeft.read(C),H=((B=this._movedBlocksLinesPart.read(C))==null?void 0:B.width.read(C))??0;A=0,R=z-M-H,V=z-M,P=z,O=N-P-T}else{V=0;const z=this._options.inlineViewHideOriginalLineNumbers.read(C);A=M,z?R=0:R=Math.max(5,this._editors.originalObs.layoutInfoDecorationsLeft.read(C)),P=M+R,O=N-P-T}return this.elements.original.style.left=A+"px",this.elements.original.style.width=R+"px",this._editors.original.layout({width:R,height:E},!0),k==null||k.layout(V),this.elements.modified.style.left=P+"px",this.elements.modified.style.width=O+"px",this._editors.modified.layout({width:O,height:E},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((C,N)=>C==null?void 0:C.diff.read(N)),this.onDidUpdateDiff=rn.fromObservableLight(this._diffValue),s.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(Kn(()=>this.elements.root.remove())),this._rootSizeObserver=this._register(new zFt(this.elements.root,n.dimension)),this._rootSizeObserver.setAutomaticLayout(n.automaticLayout??!1),this._options=this._instantiationService.createInstance(I2e,n),this._register(ki(C=>{this._options.setWidth(this._rootSizeObserver.width.read(C))})),this._contextKeyService.createKey(Re.isEmbeddedDiffEditor.key,!1),this._register(My(Re.isEmbeddedDiffEditor,this._contextKeyService,C=>this._options.isInEmbeddedEditor.read(C))),this._register(My(Re.comparingMovedCode,this._contextKeyService,C=>{var N;return!!((N=this._diffModel.read(C))!=null&&N.movedTextToCompare.read(C))})),this._register(My(Re.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,C=>this._options.couldShowInlineViewBecauseOfSize.read(C))),this._register(My(Re.diffEditorInlineMode,this._contextKeyService,C=>!this._options.renderSideBySide.read(C))),this._register(My(Re.hasChanges,this._contextKeyService,C=>{var N,E;return(((E=(N=this._diffModel.read(C))==null?void 0:N.diff.read(C))==null?void 0:E.mappings.length)??0)>0})),this._editors=this._register(this._instantiationService.createInstance(L2e,this.elements.original,this.elements.modified,this._options,i,(C,N,E,D)=>this._createInnerEditor(C,N,E,D))),this._register(My(Re.diffEditorOriginalWritable,this._contextKeyService,C=>this._options.originalEditable.read(C))),this._register(My(Re.diffEditorModifiedWritable,this._contextKeyService,C=>!this._options.readOnly.read(C))),this._register(My(Re.diffEditorOriginalUri,this._contextKeyService,C=>{var N;return((N=this._diffModel.read(C))==null?void 0:N.model.original.uri.toString())??""})),this._register(My(Re.diffEditorModifiedUri,this._contextKeyService,C=>{var N;return((N=this._diffModel.read(C))==null?void 0:N.model.modified.uri.toString())??""})),this._overviewRulerPart=Vd(this,C=>this._options.renderOverviewRuler.read(C)?this._instantiationService.createInstance(tm(bW,C),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(N=>N.modifiedEditor)):void 0).recomputeInitiallyAndOnChange(this._store);const c={height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((C,N)=>{var E;return C-(((E=this._overviewRulerPart.read(N))==null?void 0:E.width)??0)})};this._sashLayout=new OMi(this._options,c),this._sash=Vd(this,C=>{const N=this._options.renderSideBySide.read(C);return this.elements.root.classList.toggle("side-by-side",N),N?new qFt(this.elements.root,c,this._options.enableSplitViewResizing,this._boundarySashes,this._sashLayout.sashLeft,()=>this._sashLayout.resetSash()):void 0}).recomputeInitiallyAndOnChange(this._store);const u=Vd(this,C=>this._instantiationService.createInstance(tm(Soe,C),this._editors,this._diffModel,this._options)).recomputeInitiallyAndOnChange(this._store);Vd(this,C=>this._instantiationService.createInstance(tm(PMi,C),this._editors,this._diffModel,this._options,this)).recomputeInitiallyAndOnChange(this._store);const d=new Set,h=new Set;let f=!1;const m=Vd(this,C=>this._instantiationService.createInstance(tm(N2e,C),ei(this._domElement),this._editors,this._diffModel,this._options,this,()=>f||u.get().isUpdatingHiddenAreas,d,h)).recomputeInitiallyAndOnChange(this._store),p=Vn(this,C=>{const N=m.read(C).viewZones.read(C).orig,E=u.read(C).viewZones.read(C).origViewZones;return N.concat(E)}),g=Vn(this,C=>{const N=m.read(C).viewZones.read(C).mod,E=u.read(C).viewZones.read(C).modViewZones;return N.concat(E)});this._register(yoe(this._editors.original,p,C=>{f=C},d));let y;this._register(yoe(this._editors.modified,g,C=>{f=C,f?y=J0.capture(this._editors.modified):(y==null||y.restore(this._editors.modified),y=void 0)},h)),this._accessibleDiffViewer=Vd(this,C=>this._instantiationService.createInstance(tm(VT,C),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(N,E)=>this._accessibleDiffViewerShouldBeVisible.set(N,E),this._options.onlyShowAccessibleDiffViewer.map(N=>!N),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((N,E)=>{var D;return(D=N==null?void 0:N.diff.read(E))==null?void 0:D.mappings.map(k=>k.lineRangeMapping)}),new CMi(this._editors))).recomputeInitiallyAndOnChange(this._store);const _=this._accessibleDiffViewerVisible.map(C=>C?"hidden":"visible");this._register(gS(this.elements.modified,{visibility:_})),this._register(gS(this.elements.original,{visibility:_})),this._createDiffEditorContributions(),s.addDiffEditor(this),this._gutter=Vd(this,C=>this._options.shouldRenderGutterMenu.read(C)?this._instantiationService.createInstance(tm(E2e,C),this.elements.root,this._diffModel,this._editors,this._options,this._sashLayout,this._boundarySashes):void 0),this._register(B6(this._layoutInfo)),Vd(this,C=>new(tm(j3,C))(this.elements.root,this._diffModel,this._layoutInfo.map(N=>N.originalEditor),this._layoutInfo.map(N=>N.modifiedEditor),this._editors)).recomputeInitiallyAndOnChange(this._store,C=>{this._movedBlocksLinesPart.set(C,void 0)}),this._register(rn.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,C=>this._handleCursorPositionChange(C,!0))),this._register(rn.runAndSubscribe(this._editors.original.onDidChangeCursorPosition,C=>this._handleCursorPositionChange(C,!1)));const w=this._diffModel.map(this,(C,N)=>{if(C)return C.diff.read(N)===void 0&&!C.isDiffUpToDate.read(N)});this._register(Sf((C,N)=>{if(w.read(C)===!0){const E=this._editorProgressService.show(!0,1e3);N.add(Kn(()=>E.done()))}})),this._register(Sf((C,N)=>{N.add(new(tm(UMi,C))(this._editors,this._diffModel,this._options,this))})),this._register(Sf((C,N)=>{const E=this._diffModel.read(C);if(E)for(const D of[E.model.original,E.model.modified])N.add(D.onWillDispose(k=>{ji(new co("TextModel got disposed before DiffEditorWidget model got reset")),this.setModel(null)}))})),this._register(ki(C=>{this._options.setModel(this._diffModel.read(C))}))}_createInnerEditor(e,n,i,r){return e.createInstance(JH,n,i,r)}_createDiffEditorContributions(){const e=lI.getDiffEditorContributions();for(const n of e)try{this._register(this._instantiationService.createInstance(n.ctor,this))}catch(i){ji(i)}}get _targetEditor(){return this._editors.modified}getEditorType(){return xq.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var i;const e=this._editors.original.saveViewState(),n=this._editors.modified.saveViewState();return{original:e,modified:n,modelState:(i=this._diffModel.get())==null?void 0:i.serializeState()}}restoreViewState(e){var n;if(e&&e.original&&e.modified){const i=e;this._editors.original.restoreViewState(i.original),this._editors.modified.restoreViewState(i.modified),i.modelState&&((n=this._diffModel.get())==null||n.restoreSerializedState(i.modelState))}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(S2e,e,this._options)}getModel(){var e;return((e=this._diffModel.get())==null?void 0:e.model)??null}setModel(e){const n=e?"model"in e?_oe.create(e).createNewRef(this):_oe.create(this.createViewModel(e),this):null;this.setDiffModel(n)}setDiffModel(e,n){const i=this._diffModel.get();!e&&i&&this._accessibleDiffViewer.get().close(),this._diffModel.get()!==(e==null?void 0:e.object)&&Q2(n,r=>{var a;const o=e==null?void 0:e.object;Oo.batchEventsGlobally(r,()=>{this._editors.original.setModel(o?o.model.original:null),this._editors.modified.setModel(o?o.model.modified:null)});const s=(a=this._diffModelSrc.get())==null?void 0:a.createNewRef(this);this._diffModelSrc.set(e==null?void 0:e.createNewRef(this),r),setTimeout(()=>{s==null||s.dispose()},0)})}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var n;const e=(n=this._diffModel.get())==null?void 0:n.diff.get();return e?eLi(e):null}revert(e){const n=this._diffModel.get();!n||!n.isDiffUpToDate.get()||this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:n.model.original.getValueInRange(e.original.toExclusiveRange())}])}revertRangeMappings(e){const n=this._diffModel.get();if(!n||!n.isDiffUpToDate.get())return;const i=e.map(r=>({range:r.modifiedRange,text:n.model.original.getValueInRange(r.originalRange)}));this._editors.modified.executeEdits("diffEditor",i)}_goTo(e){this._editors.modified.setPosition(new ot(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){var o,s;const n=(s=(o=this._diffModel.get())==null?void 0:o.diff.get())==null?void 0:s.mappings;if(!n||n.length===0)return;const i=this._editors.modified.getPosition().lineNumber;let r;e==="next"?r=n.find(a=>a.lineRangeMapping.modified.startLineNumber>i)??n[0]:r=MH(n,a=>a.lineRangeMapping.modified.startLineNumber<i)??n[n.length-1],this._goTo(r),r.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(fp.diffLineDeleted,{source:"diffEditor.goToDiff"}):r.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(fp.diffLineInserted,{source:"diffEditor.goToDiff"}):r&&this._accessibilitySignalService.playSignal(fp.diffLineModified,{source:"diffEditor.goToDiff"})}revealFirstDiff(){const e=this._diffModel.get();e&&this.waitForDiff().then(()=>{var i;const n=(i=e.diff.get())==null?void 0:i.mappings;!n||n.length===0||this._goTo(n[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){const e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){var s,a;const e=this._editors.modified.hasWidgetFocus(),n=e?this._editors.modified:this._editors.original,i=e?this._editors.original:this._editors.modified;let r;const o=n.getSelection();if(o){const l=(a=(s=this._diffModel.get())==null?void 0:s.diff.get())==null?void 0:a.mappings.map(c=>e?c.lineRangeMapping.flip():c.lineRangeMapping);if(l){const c=Rct(o.getStartPosition(),l),u=Rct(o.getEndPosition(),l);r=ve.plusRange(c,u)}}return{destination:i,destinationSelection:r}}switchSide(){const{destination:e,destinationSelection:n}=this.mapToOtherSide();e.focus(),n&&e.setSelection(n)}exitCompareMove(){const e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){var n;const e=(n=this._diffModel.get())==null?void 0:n.unchangedRegions.get();e&&ma(i=>{for(const r of e)r.collapseAll(i)})}showAllUnchangedRegions(){var n;const e=(n=this._diffModel.get())==null?void 0:n.unchangedRegions.get();e&&ma(i=>{for(const r of e)r.showAll(i)})}_handleCursorPositionChange(e,n){var i,r;if((e==null?void 0:e.reason)===3){const o=(r=(i=this._diffModel.get())==null?void 0:i.diff.get())==null?void 0:r.mappings.find(s=>n?s.lineRangeMapping.modified.contains(e.position.lineNumber):s.lineRangeMapping.original.contains(e.position.lineNumber));o!=null&&o.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(fp.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):o!=null&&o.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(fp.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):o&&this._accessibilitySignalService.playSignal(fp.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}};bS=JMi([r7(3,vi),r7(4,qn),r7(5,Yr),r7(6,lM),r7(7,oM)],bS);function eLi(t){return t.mappings.map(e=>{const n=e.lineRangeMapping;let i,r,o,s,a=n.innerChanges;return n.original.isEmpty?(i=n.original.startLineNumber-1,r=0,a=void 0):(i=n.original.startLineNumber,r=n.original.endLineNumberExclusive-1),n.modified.isEmpty?(o=n.modified.startLineNumber-1,s=0,a=void 0):(o=n.modified.startLineNumber,s=n.modified.endLineNumberExclusive-1),{originalStartLineNumber:i,originalEndLineNumber:r,modifiedStartLineNumber:o,modifiedEndLineNumber:s,charChanges:a==null?void 0:a.map(l=>({originalStartLineNumber:l.originalRange.startLineNumber,originalStartColumn:l.originalRange.startColumn,originalEndLineNumber:l.originalRange.endLineNumber,originalEndColumn:l.originalRange.endColumn,modifiedStartLineNumber:l.modifiedRange.startLineNumber,modifiedStartColumn:l.modifiedRange.startColumn,modifiedEndLineNumber:l.modifiedRange.endLineNumber,modifiedEndColumn:l.modifiedRange.endColumn}))}})}var K7e=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},_s=function(t,e){return function(n,i){e(n,i,t)}};let tLi=0,Zct=!1;function nLi(t){if(!t){if(Zct)return;Zct=!0}Fgi(t||Go.document.body)}let Eoe=class extends JH{constructor(e,n,i,r,o,s,a,l,c,u,d,h,f){const m={...n};m.ariaLabel=m.ariaLabel||Vre.editorViewAccessibleLabel,m.ariaLabel=m.ariaLabel+";"+Vre.accessibilityHelpMessage,super(e,m,{},i,r,o,s,c,u,d,h,f),l instanceof C5?this._standaloneKeybindingService=l:this._standaloneKeybindingService=null,nLi(m.ariaContainerElement),tNi((p,g)=>i.createInstance(m5,p,g,{})),nNi(a)}addCommand(e,n,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const r="DYNAMIC_"+ ++tLi,o=Tt.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(r,e,n,o),r}createContextKey(e,n){return this._contextKeyService.createKey(e,n)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),ct.None;const n=e.id,i=e.label,r=Tt.and(Tt.equals("editorId",this.getId()),Tt.deserialize(e.precondition)),o=e.keybindings,s=Tt.and(r,Tt.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=(f,...m)=>Promise.resolve(e.run(this,...m)),u=new Lt,d=this.getId()+":"+n;if(u.add(Ar.registerCommand(d,c)),a){const f={command:{id:d,title:i},when:r,group:a,order:l};u.add(Oc.appendMenuItem(Rn.EditorContext,f))}if(Array.isArray(o))for(const f of o)u.add(this._standaloneKeybindingService.addDynamicKeybinding(d,f,c,s));const h=new Ejt(d,i,i,void 0,r,(...f)=>Promise.resolve(e.run(this,...f)),this._contextKeyService);return this._actions.set(n,h),u.add(Kn(()=>{this._actions.delete(n)})),u}_triggerCommand(e,n){if(this._codeEditorService instanceof Lre)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,n)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,n)}};Eoe=K7e([_s(2,qn),_s(3,Yr),_s(4,gs),_s(5,vi),_s(6,Pw),_s(7,vo),_s(8,Ql),_s(9,tl),_s(10,Bm),_s(11,bs),_s(12,Ln)],Eoe);let A2e=class extends Eoe{constructor(e,n,i,r,o,s,a,l,c,u,d,h,f,m,p,g){const y={...n};boe(d,y,!1);const _=c.registerEditorContainer(e);typeof y.theme=="string"&&c.setTheme(y.theme),typeof y.autoDetectHighContrast<"u"&&c.setAutoDetectHighContrast(!!y.autoDetectHighContrast);const w=y.model;delete y.model,super(e,y,i,r,o,s,a,l,c,u,h,p,g),this._configurationService=d,this._standaloneThemeService=c,this._register(_);let C;if(typeof w>"u"){const N=m.getLanguageIdByMimeType(y.language)||y.language||Ph;C=ZFt(f,m,y.value||"",N,void 0),this._ownsModel=!0}else C=w,this._ownsModel=!1;if(this._attachModel(C),C){const N={oldModelUrl:null,newModelUrl:C.uri};this._onDidChangeModel.fire(N)}}dispose(){super.dispose()}updateOptions(e){boe(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};A2e=K7e([_s(2,qn),_s(3,Yr),_s(4,gs),_s(5,vi),_s(6,Pw),_s(7,vo),_s(8,ig),_s(9,tl),_s(10,cr),_s(11,Bm),_s(12,Ds),_s(13,Qs),_s(14,bs),_s(15,Ln)],A2e);let R2e=class extends bS{constructor(e,n,i,r,o,s,a,l,c,u,d,h){const f={...n};boe(l,f,!0);const m=s.registerEditorContainer(e);typeof f.theme=="string"&&s.setTheme(f.theme),typeof f.autoDetectHighContrast<"u"&&s.setAutoDetectHighContrast(!!f.autoDetectHighContrast),super(e,f,{},r,i,o,h,u),this._configurationService=l,this._standaloneThemeService=s,this._register(m)}dispose(){super.dispose()}updateOptions(e){boe(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,n,i){return e.createInstance(Eoe,n,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,n,i){return this.getModifiedEditor().addCommand(e,n,i)}createContextKey(e,n){return this.getModifiedEditor().createContextKey(e,n)}addAction(e){return this.getModifiedEditor().addAction(e)}};R2e=K7e([_s(2,qn),_s(3,vi),_s(4,Yr),_s(5,ig),_s(6,tl),_s(7,cr),_s(8,Hm),_s(9,oM),_s(10,GS),_s(11,lM)],R2e);function ZFt(t,e,n,i,r){if(n=n||"",!i){const o=n.indexOf(`
`);let s=n;return o!==-1&&(s=n.substring(0,o)),Qct(t,n,e.createByFilepathOrFirstLine(r||null,s),r)}return Qct(t,n,e.createById(i),r)}function Qct(t,e,n,i){return t.createModel(e,n,i)}var iLi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},rLi=function(t,e){return function(n,i){e(n,i,t)}};class oLi{constructor(e,n){this.viewModel=e,this.deltaScrollVertical=n}getId(){return this.viewModel}}let Doe=class extends ct{constructor(e,n,i,r){super(),this._container=e,this._overflowWidgetsDomNode=n,this._workbenchUIElementFactory=i,this._instantiationService=r,this._viewModel=lr(this,void 0),this._collapsed=Vn(this,s=>{var a;return(a=this._viewModel.read(s))==null?void 0:a.collapsed.read(s)}),this._editorContentHeight=lr(this,500),this.contentHeight=Vn(this,s=>(this._collapsed.read(s)?0:this._editorContentHeight.read(s))+this._outerEditorHeight),this._modifiedContentWidth=lr(this,0),this._modifiedWidth=lr(this,0),this._originalContentWidth=lr(this,0),this._originalWidth=lr(this,0),this.maxScroll=Vn(this,s=>{const a=this._modifiedContentWidth.read(s)-this._modifiedWidth.read(s),l=this._originalContentWidth.read(s)-this._originalWidth.read(s);return a>l?{maxScroll:a,width:this._modifiedWidth.read(s)}:{maxScroll:l,width:this._originalWidth.read(s)}}),this._elements=pr("div.multiDiffEntry",[pr("div.header@header",[pr("div.header-content",[pr("div.collapse-button@collapseButton"),pr("div.file-path",[pr("div.title.modified.show-file-icons@primaryPath",[]),pr("div.status.deleted@status",["R"]),pr("div.title.original.show-file-icons@secondaryPath",[])]),pr("div.actions@actions")])]),pr("div.editorParent",[pr("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(bS,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=hm(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=hm(this.editor.getOriginalEditor()).isFocused,this.isFocused=Vn(this,s=>this.isModifedFocused.read(s)||this.isOriginalFocused.read(s)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=new Lt,this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const o=new eoe(this._elements.collapseButton,{});this._register(ki(s=>{o.element.className="",o.icon=this._collapsed.read(s)?qt.chevronRight:qt.chevronDown})),this._register(o.onDidClick(()=>{var s;(s=this._viewModel.get())==null||s.collapsed.set(!this._collapsed.get(),void 0)})),this._register(ki(s=>{this._elements.editor.style.display=this._collapsed.read(s)?"none":"block"})),this._register(this.editor.getModifiedEditor().onDidLayoutChange(s=>{const a=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(a,void 0)})),this._register(this.editor.getOriginalEditor().onDidLayoutChange(s=>{const a=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(a,void 0)})),this._register(this.editor.onDidContentSizeChange(s=>{t9(a=>{this._editorContentHeight.set(s.contentHeight,a),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),a),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),a)})})),this._register(this.editor.getOriginalEditor().onDidScrollChange(s=>{if(this._isSettingScrollTop||!s.scrollTopChanged||!this._data)return;const a=s.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(a)})),this._register(ki(s=>{var l;const a=(l=this._viewModel.read(s))==null?void 0:l.isActive.read(s);this._elements.root.classList.toggle("active",a)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._register(this._instantiationService.createInstance(Coe,this._elements.actions,Rn.MultiDiffEditorFileToolbar,{actionRunner:this._register(new GFt(()=>{var s;return(s=this._viewModel.get())==null?void 0:s.modifiedUri})),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:s=>s.startsWith("navigation")},actionViewItemProvider:(s,a)=>Y5t(r,s,a)}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){this._data=e;function n(r){return{...r,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}if(!e){t9(r=>{this._viewModel.set(void 0,r),this.editor.setDiffModel(null,r),this._dataStore.clear()});return}const i=e.viewModel.documentDiffItem;t9(r=>{var c,u;(c=this._resourceLabel)==null||c.setUri(e.viewModel.modifiedUri??e.viewModel.originalUri,{strikethrough:e.viewModel.modifiedUri===void 0});let o=!1,s=!1,a=!1,l="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(l="R",o=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(l="A",a=!0):(l="D",s=!0),this._elements.status.classList.toggle("renamed",o),this._elements.status.classList.toggle("deleted",s),this._elements.status.classList.toggle("added",a),this._elements.status.innerText=l,(u=this._resourceLabel2)==null||u.setUri(o?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,r),this.editor.setDiffModel(e.viewModel.diffEditorViewModelRef,r),this.editor.updateOptions(n(i.options??{}))}),i.onOptionsDidChange&&this._dataStore.add(i.onOptionsDidChange(()=>{this.editor.updateOptions(n(i.options??{}))})),e.viewModel.isAlive.recomputeInitiallyAndOnChange(this._dataStore,r=>{r||this.setData(void 0)})}render(e,n,i,r){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${n}px`,this._elements.root.style.position="absolute";const o=e.length-this._headerHeight,s=Math.max(0,Math.min(r.start-e.start,o));this._elements.header.style.transform=`translateY(${s}px)`,t9(a=>{this.editor.layout({width:n-2*8-2*1,height:e.length-this._outerEditorHeight})});try{this._isSettingScrollTop=!0,this._lastScrollTop=i,this.editor.getOriginalEditor().setScrollTop(i)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",s>0||i>0),this._elements.header.classList.toggle("collapsed",s===o)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};Doe=iLi([rLi(3,qn)],Doe);class sLi{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){let n;if(this._unused.size===0)n=this._create(e),this._itemData.set(n,e);else{const i=[...this._unused.values()];n=i.find(r=>this._itemData.get(r).getId()===e.getId())??i[0],this._unused.delete(n),this._itemData.set(n,e),n.setData(e)}return this._used.add(n),{object:n,dispose:()=>{this._used.delete(n),this._unused.size>5?n.dispose():this._unused.add(n)}}}dispose(){for(const e of this._used)e.dispose();for(const e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}var aLi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Jct=function(t,e){return function(n,i){e(n,i,t)}};let P2e=class extends ct{constructor(e,n,i,r,o,s){super(),this._element=e,this._dimension=n,this._viewModel=i,this._workbenchUIElementFactory=r,this._parentContextKeyService=o,this._parentInstantiationService=s,this._scrollableElements=pr("div.scrollContent",[pr("div@content",{style:{overflow:"hidden"}}),pr("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new O6({forceIntegerValues:!1,scheduleAtNextAnimationFrame:l=>Im(ei(this._element),l),smoothScrollDuration:100})),this._scrollableElement=this._register(new rme(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=pr("div.monaco-component.multiDiffEditor",{},[pr("div",{},[this._scrollableElement.getDomNode()]),pr("div.placeholder@placeholder",{},[pr("div",[I("noChangedFiles","No Changed Files")])])]),this._sizeObserver=this._register(new zFt(this._element,void 0)),this._objectPool=this._register(new sLi(l=>{const c=this._instantiationService.createInstance(Doe,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return c.setData(l),c})),this.scrollTop=Oo(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=Oo(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItemsInfo=sM(this,(l,c)=>{const u=this._viewModel.read(l);if(!u)return{items:[],getItem:m=>{throw new co}};const d=u.items.read(l),h=new Map;return{items:d.map(m=>{var y;const p=c.add(new lLi(m,this._objectPool,this.scrollLeft,_=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+_})})),g=(y=this._lastDocStates)==null?void 0:y[p.getKey()];return g&&ma(_=>{p.setViewState(g,_)}),h.set(m,p),p}),getItem:m=>h.get(m)}}),this._viewItems=this._viewItemsInfo.map(this,l=>l.items),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,(l,c)=>l.reduce((u,d)=>u+d.contentHeight.read(c)+this._spaceBetweenPx,0)),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new Mq([vi,this._contextKeyService]))),this._lastDocStates={},this._contextKeyService.createKey(Re.inMultiDiffEditor.key,!0),this._register(Sf((l,c)=>{const u=this._viewModel.read(l);if(u&&u.contextKeys)for(const[d,h]of Object.entries(u.contextKeys)){const f=this._contextKeyService.createKey(d,void 0);f.set(h),c.add(Kn(()=>f.reset()))}}));const a=this._parentContextKeyService.createKey(Re.multiDiffEditorAllCollapsed.key,!1);this._register(ki(l=>{const c=this._viewModel.read(l);if(c){const u=c.items.read(l).every(d=>d.collapsed.read(l));a.set(u)}})),this._register(ki(l=>{const c=this._dimension.read(l);this._sizeObserver.observe(c)})),this._register(ki(l=>{const c=this._viewItems.read(l);this._elements.placeholder.classList.toggle("visible",c.length===0)})),this._scrollableElements.content.style.position="relative",this._register(ki(l=>{const c=this._sizeObserver.height.read(l);this._scrollableElements.root.style.height=`${c}px`;const u=this._totalHeight.read(l);this._scrollableElements.content.style.height=`${u}px`;const d=this._sizeObserver.width.read(l);let h=d;const f=this._viewItems.read(l),m=W8e(f,Ah(p=>p.maxScroll.read(l).maxScroll,vv));if(m){const p=m.maxScroll.read(l);h=d+p.maxScroll}this._scrollableElement.setScrollDimensions({width:d,height:c,scrollHeight:u,scrollWidth:h})})),e.replaceChildren(this._elements.root),this._register(Kn(()=>{e.replaceChildren()})),this._register(this._register(ki(l=>{t9(c=>{this.render(l)})})))}render(e){const n=this.scrollTop.read(e);let i=0,r=0,o=0;const s=this._sizeObserver.height.read(e),a=dr.ofStartAndLength(n,s),l=this._sizeObserver.width.read(e);for(const c of this._viewItems.read(e)){const u=c.contentHeight.read(e),d=Math.min(u,s),h=dr.ofStartAndLength(r,d),f=dr.ofStartAndLength(o,u);if(f.isBefore(a))i-=u-d,c.hide();else if(f.isAfter(a))c.hide();else{const m=Math.max(0,Math.min(a.start-f.start,u-d));i-=m;const p=dr.ofStartAndLength(n+i,s);c.render(h,m,l,p)}r+=d+this._spaceBetweenPx,o+=u+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(n+i)}px)`}};P2e=aLi([Jct(4,vi),Jct(5,qn)],P2e);class lLi extends ct{constructor(e,n,i,r){super(),this.viewModel=e,this._objectPool=n,this._scrollLeft=i,this._deltaScrollVertical=r,this._templateRef=this._register(sW(this,void 0)),this.contentHeight=Vn(this,o=>{var s,a;return((a=(s=this._templateRef.read(o))==null?void 0:s.object.contentHeight)==null?void 0:a.read(o))??this.viewModel.lastTemplateData.read(o).contentHeight}),this.maxScroll=Vn(this,o=>{var s;return((s=this._templateRef.read(o))==null?void 0:s.object.maxScroll.read(o))??{maxScroll:0,scrollWidth:0}}),this.template=Vn(this,o=>{var s;return(s=this._templateRef.read(o))==null?void 0:s.object}),this._isHidden=lr(this,!1),this._isFocused=Vn(this,o=>{var s;return((s=this.template.read(o))==null?void 0:s.isFocused.read(o))??!1}),this.viewModel.setIsFocused(this._isFocused,void 0),this._register(ki(o=>{var a;const s=this._scrollLeft.read(o);(a=this._templateRef.read(o))==null||a.object.setScrollLeft(s)})),this._register(ki(o=>{const s=this._templateRef.read(o);!s||!this._isHidden.read(o)||s.object.isFocused.read(o)||this._clear()}))}dispose(){this._clear(),super.dispose()}toString(){var e;return`VirtualViewItem(${(e=this.viewModel.documentDiffItem.modified)==null?void 0:e.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,n){var s;this.viewModel.collapsed.set(e.collapsed,n),this._updateTemplateData(n);const i=this.viewModel.lastTemplateData.get(),r=(s=e.selections)==null?void 0:s.map(Pn.liftSelection);this.viewModel.lastTemplateData.set({...i,selections:r},n);const o=this._templateRef.get();o&&r&&o.object.editor.setSelections(r)}_updateTemplateData(e){const n=this._templateRef.get();n&&this.viewModel.lastTemplateData.set({contentHeight:n.object.contentHeight.get(),selections:n.object.editor.getSelections()??void 0},e)}_clear(){const e=this._templateRef.get();e&&ma(n=>{this._updateTemplateData(n),e.object.hide(),this._templateRef.set(void 0,n)})}hide(){this._isHidden.set(!0,void 0)}render(e,n,i,r){this._isHidden.set(!1,void 0);let o=this._templateRef.get();if(!o){o=this._objectPool.getUnusedObj(new oLi(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(o,void 0);const s=this.viewModel.lastTemplateData.get().selections;s&&o.object.editor.setSelections(s)}o.object.render(e,i,n,r)}}Fe("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},I("multiDiffEditor.headerBackground","The background color of the diff editor's header"));Fe("multiDiffEditor.background","editorBackground",I("multiDiffEditor.background","The background color of the multi file diff editor"));Fe("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},I("multiDiffEditor.border","The border color of the multi file diff editor"));var cLi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},uLi=function(t,e){return function(n,i){e(n,i,t)}};let O2e=class extends ct{constructor(e,n,i){super(),this._element=e,this._workbenchUIElementFactory=n,this._instantiationService=i,this._dimension=lr(this,void 0),this._viewModel=lr(this,void 0),this._widgetImpl=sM(this,(r,o)=>(tm(Doe,r),o.add(this._instantiationService.createInstance(tm(P2e,r),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory)))),this._register(B6(this._widgetImpl))}};O2e=cLi([uLi(2,qn)],O2e);function dLi(t,e,n){return wi.initialize(n||{}).createInstance(A2e,t,e)}function hLi(t){return wi.get(Yr).onCodeEditorAdd(n=>{t(n)})}function fLi(t){return wi.get(Yr).onDiffEditorAdd(n=>{t(n)})}function mLi(){return wi.get(Yr).listCodeEditors()}function pLi(){return wi.get(Yr).listDiffEditors()}function gLi(t,e,n){return wi.initialize(n||{}).createInstance(R2e,t,e)}function bLi(t,e){const n=wi.initialize(e||{});return new O2e(t,{},n)}function vLi(t){if(typeof t.id!="string"||typeof t.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return Ar.registerCommand(t.id,t.run)}function yLi(t){if(typeof t.id!="string"||typeof t.label!="string"||typeof t.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const e=Tt.deserialize(t.precondition),n=(r,...o)=>Zl.runEditorCommand(r,o,e,(s,a,l)=>Promise.resolve(t.run(a,...l))),i=new Lt;if(i.add(Ar.registerCommand(t.id,n)),t.contextMenuGroupId){const r={command:{id:t.id,title:t.label},when:e,group:t.contextMenuGroupId,order:t.contextMenuOrder||0};i.add(Oc.appendMenuItem(Rn.EditorContext,r))}if(Array.isArray(t.keybindings)){const r=wi.get(vo);if(!(r instanceof C5))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const o=Tt.and(e,Tt.deserialize(t.keybindingContext));i.add(r.addDynamicKeybindings(t.keybindings.map(s=>({keybinding:s,command:t.id,when:o}))))}}return i}function _Li(t){return QFt([t])}function QFt(t){const e=wi.get(vo);return e instanceof C5?e.addDynamicKeybindings(t.map(n=>({keybinding:n.keybinding,command:n.command,commandArgs:n.commandArgs,when:Tt.deserialize(n.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),ct.None)}function xLi(t,e,n){const i=wi.get(Qs),r=i.getLanguageIdByMimeType(e)||e;return ZFt(wi.get(Ds),i,t,r,n)}function wLi(t,e){const n=wi.get(Qs),i=n.getLanguageIdByMimeType(e)||e||Ph;t.setLanguage(n.createById(i))}function CLi(t,e,n){t&&wi.get(Ow).changeOne(e,t.uri,n)}function SLi(t){wi.get(Ow).changeAll(t,[])}function NLi(t){return wi.get(Ow).read(t)}function ELi(t){return wi.get(Ow).onMarkerChanged(t)}function DLi(t){return wi.get(Ds).getModel(t)}function kLi(){return wi.get(Ds).getModels()}function MLi(t){return wi.get(Ds).onModelAdded(t)}function LLi(t){return wi.get(Ds).onModelRemoved(t)}function TLi(t){return wi.get(Ds).onModelLanguageChanged(n=>{t({model:n.model,oldLanguage:n.oldLanguageId})})}function ILi(t){return cgi(wi.get(Ds),wi.get(bs),t)}function ALi(t,e){const n=wi.get(Qs),i=wi.get(ig);return Q8e.colorizeElement(i,n,t,e).then(()=>{i.registerEditorContainer(t)})}function RLi(t,e,n){const i=wi.get(Qs);return wi.get(ig).registerEditorContainer(Go.document.body),Q8e.colorize(i,t,e,n)}function PLi(t,e,n=4){return wi.get(ig).registerEditorContainer(Go.document.body),Q8e.colorizeModelLine(t,e,n)}function OLi(t){const e=Ca.get(t);return e||{getInitialState:()=>s5,tokenize:(n,i,r)=>Y8e(t,r)}}function jLi(t,e){Ca.getOrCreate(e);const n=OLi(e),i=Tw(t),r=[];let o=n.getInitialState();for(let s=0,a=i.length;s<a;s++){const l=i[s],c=n.tokenize(l,!0,o);r[s]=c.tokens,o=c.endState}return r}function FLi(t,e){wi.get(ig).defineTheme(t,e)}function $Li(t){wi.get(ig).setTheme(t)}function VLi(){MLe.clearAllFontInfos()}function BLi(t,e){return Ar.registerCommand({id:t,handler:e})}function zLi(t){return wi.get(Wm).registerOpener({async open(n){return typeof n=="string"&&(n=ri.parse(n)),t.open(n)}})}function HLi(t){return wi.get(Yr).registerCodeEditorOpenHandler(async(n,i,r)=>{var a;if(!i)return null;const o=(a=n.options)==null?void 0:a.selection;let s;return o&&typeof o.endLineNumber=="number"&&typeof o.endColumn=="number"?s=o:o&&(s={lineNumber:o.startLineNumber,column:o.startColumn}),await t.openCodeEditor(i,n.resource,s)?i:null})}function WLi(){return{create:dLi,getEditors:mLi,getDiffEditors:pLi,onDidCreateEditor:hLi,onDidCreateDiffEditor:fLi,createDiffEditor:gLi,addCommand:vLi,addEditorAction:yLi,addKeybindingRule:_Li,addKeybindingRules:QFt,createModel:xLi,setModelLanguage:wLi,setModelMarkers:CLi,getModelMarkers:NLi,removeAllMarkers:SLi,onDidChangeMarkers:ELi,getModels:kLi,getModel:DLi,onDidCreateModel:MLi,onWillDisposeModel:LLi,onDidChangeModelLanguage:TLi,createWebWorker:ILi,colorizeElement:ALi,colorize:RLi,colorizeModelLine:PLi,tokenize:jLi,defineTheme:FLi,setTheme:$Li,remeasureFonts:VLi,registerCommand:BLi,registerLinkOpener:zLi,registerEditorOpener:HLi,AccessibilitySupport:NMe,ContentWidgetPositionPreference:TMe,CursorChangeReason:IMe,DefaultEndOfLine:AMe,EditorAutoIndentStrategy:PMe,EditorOption:OMe,EndOfLinePreference:jMe,EndOfLineSequence:FMe,MinimapPosition:YMe,MinimapSectionHeaderStyle:XMe,MouseTargetType:ZMe,OverlayWidgetPositionPreference:eLe,OverviewRulerLane:tLe,GlyphMarginLane:$Me,RenderLineNumbersType:rLe,RenderMinimap:oLe,ScrollbarVisibility:aLe,ScrollType:sLe,TextEditorCursorBlinkingStyle:fLe,TextEditorCursorStyle:mLe,TrackedRangeStickiness:pLe,WrappingIndent:gLe,InjectedTextCursorStops:zMe,PositionAffinity:iLe,ShowLightbulbIconMode:cLe,ConfigurationChangedEvent:HOt,BareFontInfo:sI,FontInfo:kLe,TextModelResolvedOptions:rte,FindMatch:kH,ApplyUpdateResult:B9,EditorZoom:jg,createMultiFileDiffEditor:bLi,EditorType:xq,EditorOptions:l_}}function ULi(t,e){if(!e||!Array.isArray(e))return!1;for(const n of e)if(!t(n))return!1;return!0}function UQ(t,e){return typeof t=="boolean"?t:e}function eut(t,e){return typeof t=="string"?t:e}function KLi(t){const e={};for(const n of t)e[n]=!0;return e}function tut(t,e=!1){e&&(t=t.map(function(i){return i.toLowerCase()}));const n=KLi(t);return e?function(i){return n[i.toLowerCase()]!==void 0&&n.hasOwnProperty(i.toLowerCase())}:function(i){return n[i]!==void 0&&n.hasOwnProperty(i)}}function j2e(t,e,n){e=e.replace(/@@/g,"");let i=0,r;do r=!1,e=e.replace(/@(\w+)/g,function(s,a){r=!0;let l="";if(typeof t[a]=="string")l=t[a];else if(t[a]&&t[a]instanceof RegExp)l=t[a].source;else throw t[a]===void 0?Rs(t,"language definition does not contain attribute '"+a+"', used at: "+e):Rs(t,"attribute reference '"+a+"' must be a string, used at: "+e);return oT(l)?"":"(?:"+l+")"}),i++;while(r&&i<5);e=e.replace(/\x01/g,"@");const o=(t.ignoreCase?"i":"")+(t.unicode?"u":"");if(n&&e.match(/\$[sS](\d\d?)/g)){let a=null,l=null;return c=>(l&&a===c||(a=c,l=new RegExp(Lgi(t,e,c),o)),l)}return new RegExp(e,o)}function qLi(t,e,n,i){if(i<0)return t;if(i<e.length)return e[i];if(i>=100){i=i-100;const r=n.split(".");if(r.unshift(n),i<r.length)return r[i]}return null}function GLi(t,e,n,i){let r=-1,o=n,s=n.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);s&&(s[3]&&(r=parseInt(s[3]),s[2]&&(r=r+100)),o=s[4]);let a="~",l=o;!o||o.length===0?(a="!=",l=""):/^\w*$/.test(l)?a="==":(s=o.match(/^(@|!@|~|!~|==|!=)(.*)$/),s&&(a=s[1],l=s[2]));let c;if((a==="~"||a==="!~")&&/^(\w|\|)*$/.test(l)){const u=tut(l.split("|"),t.ignoreCase);c=function(d){return a==="~"?u(d):!u(d)}}else if(a==="@"||a==="!@"){const u=t[l];if(!u)throw Rs(t,"the @ match target '"+l+"' is not defined, in rule: "+e);if(!ULi(function(h){return typeof h=="string"},u))throw Rs(t,"the @ match target '"+l+"' must be an array of strings, in rule: "+e);const d=tut(u,t.ignoreCase);c=function(h){return a==="@"?d(h):!d(h)}}else if(a==="~"||a==="!~")if(l.indexOf("$")<0){const u=j2e(t,"^"+l+"$",!1);c=function(d){return a==="~"?u.test(d):!u.test(d)}}else c=function(u,d,h,f){return j2e(t,"^"+wE(t,l,d,h,f)+"$",!1).test(u)};else if(l.indexOf("$")<0){const u=AC(t,l);c=function(d){return a==="=="?d===u:d!==u}}else{const u=AC(t,l);c=function(d,h,f,m,p){const g=wE(t,u,h,f,m);return a==="=="?d===g:d!==g}}return r===-1?{name:n,value:i,test:function(u,d,h,f){return c(u,u,d,h,f)}}:{name:n,value:i,test:function(u,d,h,f){const m=qLi(u,d,h,r);return c(m||"",u,d,h,f)}}}function F2e(t,e,n){if(n){if(typeof n=="string")return n;if(n.token||n.token===""){if(typeof n.token!="string")throw Rs(t,"a 'token' attribute must be of type string, in rule: "+e);{const i={token:n.token};if(n.token.indexOf("$")>=0&&(i.tokenSubst=!0),typeof n.bracket=="string")if(n.bracket==="@open")i.bracket=1;else if(n.bracket==="@close")i.bracket=-1;else throw Rs(t,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(n.next){if(typeof n.next!="string")throw Rs(t,"the next state must be a string value in rule: "+e);{let r=n.next;if(!/^(@pop|@push|@popall)$/.test(r)&&(r[0]==="@"&&(r=r.substr(1)),r.indexOf("$")<0&&!Tgi(t,wE(t,r,"",[],""))))throw Rs(t,"the next state '"+n.next+"' is not defined in rule: "+e);i.next=r}}return typeof n.goBack=="number"&&(i.goBack=n.goBack),typeof n.switchTo=="string"&&(i.switchTo=n.switchTo),typeof n.log=="string"&&(i.log=n.log),typeof n.nextEmbedded=="string"&&(i.nextEmbedded=n.nextEmbedded,t.usesEmbedded=!0),i}}else if(Array.isArray(n)){const i=[];for(let r=0,o=n.length;r<o;r++)i[r]=F2e(t,e,n[r]);return{group:i}}else if(n.cases){const i=[];for(const o in n.cases)if(n.cases.hasOwnProperty(o)){const s=F2e(t,e,n.cases[o]);o==="@default"||o==="@"||o===""?i.push({test:void 0,value:s,name:o}):o==="@eos"?i.push({test:function(a,l,c,u){return u},value:s,name:o}):i.push(GLi(t,e,o,s))}const r=t.defaultToken;return{test:function(o,s,a,l){for(const c of i)if(!c.test||c.test(o,s,a,l))return c.value;return r}}}else throw Rs(t,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+e)}else return{token:""}}class YLi{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,n){let i;if(typeof n=="string")i=n;else if(n instanceof RegExp)i=n.source;else throw Rs(e,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=i.length>0&&i[0]==="^",this.name=this.name+": "+i,this.regex=j2e(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")",!0)}setAction(e,n){this.action=F2e(e,this.name,n)}resolveRegex(e){return this.regex instanceof RegExp?this.regex:this.regex(e)}}function JFt(t,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");const n={languageId:t,includeLF:UQ(e.includeLF,!1),noThrow:!1,maxStack:100,start:typeof e.start=="string"?e.start:null,ignoreCase:UQ(e.ignoreCase,!1),unicode:UQ(e.unicode,!1),tokenPostfix:eut(e.tokenPostfix,"."+t),defaultToken:eut(e.defaultToken,"source"),usesEmbedded:!1,stateNames:{},tokenizer:{},brackets:[]},i=e;i.languageId=t,i.includeLF=n.includeLF,i.ignoreCase=n.ignoreCase,i.unicode=n.unicode,i.noThrow=n.noThrow,i.usesEmbedded=n.usesEmbedded,i.stateNames=e.tokenizer,i.defaultToken=n.defaultToken;function r(s,a,l){for(const c of l){let u=c.include;if(u){if(typeof u!="string")throw Rs(n,"an 'include' attribute must be a string at: "+s);if(u[0]==="@"&&(u=u.substr(1)),!e.tokenizer[u])throw Rs(n,"include target '"+u+"' is not defined at: "+s);r(s+"."+u,a,e.tokenizer[u])}else{const d=new YLi(s);if(Array.isArray(c)&&c.length>=1&&c.length<=3)if(d.setRegex(i,c[0]),c.length>=3)if(typeof c[1]=="string")d.setAction(i,{token:c[1],next:c[2]});else if(typeof c[1]=="object"){const h=c[1];h.next=c[2],d.setAction(i,h)}else throw Rs(n,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+s);else d.setAction(i,c[1]);else{if(!c.regex)throw Rs(n,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+s);c.name&&typeof c.name=="string"&&(d.name=c.name),c.matchOnlyAtStart&&(d.matchOnlyAtLineStart=UQ(c.matchOnlyAtLineStart,!1)),d.setRegex(i,c.regex),d.setAction(i,c.action)}a.push(d)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw Rs(n,"a language definition must define the 'tokenizer' attribute as an object");n.tokenizer=[];for(const s in e.tokenizer)if(e.tokenizer.hasOwnProperty(s)){n.start||(n.start=s);const a=e.tokenizer[s];n.tokenizer[s]=new Array,r("tokenizer."+s,n.tokenizer[s],a)}if(n.usesEmbedded=i.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw Rs(n,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const o=[];for(const s of e.brackets){let a=s;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw Rs(n,"open and close brackets in a 'brackets' attribute must be different: "+a.open+`
 hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")o.push({token:a.token+n.tokenPostfix,open:AC(n,a.open),close:AC(n,a.close)});else throw Rs(n,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return n.brackets=o,n.noThrow=!0,n}function XLi(t){r5.registerLanguage(t)}function ZLi(){let t=[];return t=t.concat(r5.getLanguages()),t}function QLi(t){return wi.get(Qs).languageIdCodec.encodeLanguageId(t)}function JLi(t,e){return wi.withServices(()=>{const i=wi.get(Qs).onDidRequestRichLanguageFeatures(r=>{r===t&&(i.dispose(),e())});return i})}function eTi(t,e){return wi.withServices(()=>{const i=wi.get(Qs).onDidRequestBasicLanguageFeatures(r=>{r===t&&(i.dispose(),e())});return i})}function tTi(t,e){if(!wi.get(Qs).isRegisteredLanguageId(t))throw new Error(`Cannot set configuration for unknown language ${t}`);return wi.get(bs).register(t,e,100)}class nTi{constructor(e,n){this._languageId=e,this._actual=n}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,n,i){if(typeof this._actual.tokenize=="function")return vW.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,n,i){const r=this._actual.tokenizeEncoded(e,i);return new Mfe(r.tokens,r.endState)}}class vW{constructor(e,n,i,r){this._languageId=e,this._actual=n,this._languageService=i,this._standaloneThemeService=r}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,n){const i=[];let r=0;for(let o=0,s=e.length;o<s;o++){const a=e[o];let l=a.startIndex;o===0?l=0:l<r&&(l=r),i[o]=new vH(l,a.scopes,n),r=l}return i}static adaptTokenize(e,n,i,r){const o=n.tokenize(i,r),s=vW._toClassicTokens(o.tokens,e);let a;return o.endState.equals(r)?a=r:a=o.endState,new v8e(s,a)}tokenize(e,n,i){return vW.adaptTokenize(this._languageId,this._actual,e,i)}_toBinaryTokens(e,n){const i=e.encodeLanguageId(this._languageId),r=this._standaloneThemeService.getColorTheme().tokenTheme,o=[];let s=0,a=0;for(let c=0,u=n.length;c<u;c++){const d=n[c],h=r.match(i,d.scopes)|1024;if(s>0&&o[s-1]===h)continue;let f=d.startIndex;c===0?f=0:f<a&&(f=a),o[s++]=f,o[s++]=h,a=f}const l=new Uint32Array(s);for(let c=0;c<s;c++)l[c]=o[c];return l}tokenizeEncoded(e,n,i){const r=this._actual.tokenize(e,i),o=this._toBinaryTokens(this._languageService.languageIdCodec,r.tokens);let s;return r.endState.equals(i)?s=i:s=r.endState,new Mfe(o,s)}}function iTi(t){return typeof t.getInitialState=="function"}function rTi(t){return"tokenizeEncoded"in t}function e6t(t){return t&&typeof t.then=="function"}function oTi(t){const e=wi.get(ig);if(t){const n=[null];for(let i=1,r=t.length;i<r;i++)n[i]=Rt.fromHex(t[i]);e.setColorMapOverride(n)}else e.setColorMapOverride(null)}function t6t(t,e){return rTi(e)?new nTi(t,e):new vW(t,e,wi.get(Qs),wi.get(ig))}function q7e(t,e){const n=new Vdi(async()=>{const i=await Promise.resolve(e.create());return i?iTi(i)?t6t(t,i):new PH(wi.get(Qs),wi.get(ig),t,JFt(t,i),wi.get(cr)):null});return Ca.registerFactory(t,n)}function sTi(t,e){if(!wi.get(Qs).isRegisteredLanguageId(t))throw new Error(`Cannot set tokens provider for unknown language ${t}`);return e6t(e)?q7e(t,{create:()=>e}):Ca.register(t,t6t(t,e))}function aTi(t,e){const n=i=>new PH(wi.get(Qs),wi.get(ig),t,JFt(t,i),wi.get(cr));return e6t(e)?q7e(t,{create:()=>e}):Ca.register(t,n(e))}function lTi(t,e){return wi.get(Ln).referenceProvider.register(t,e)}function cTi(t,e){return wi.get(Ln).renameProvider.register(t,e)}function uTi(t,e){return wi.get(Ln).newSymbolNamesProvider.register(t,e)}function dTi(t,e){return wi.get(Ln).signatureHelpProvider.register(t,e)}function hTi(t,e){return wi.get(Ln).hoverProvider.register(t,{provideHover:async(i,r,o,s)=>{const a=i.getWordAtPosition(r);return Promise.resolve(e.provideHover(i,r,o,s)).then(l=>{if(l)return!l.range&&a&&(l.range=new ve(r.lineNumber,a.startColumn,r.lineNumber,a.endColumn)),l.range||(l.range=new ve(r.lineNumber,r.column,r.lineNumber,r.column)),l})}})}function fTi(t,e){return wi.get(Ln).documentSymbolProvider.register(t,e)}function mTi(t,e){return wi.get(Ln).documentHighlightProvider.register(t,e)}function pTi(t,e){return wi.get(Ln).linkedEditingRangeProvider.register(t,e)}function gTi(t,e){return wi.get(Ln).definitionProvider.register(t,e)}function bTi(t,e){return wi.get(Ln).implementationProvider.register(t,e)}function vTi(t,e){return wi.get(Ln).typeDefinitionProvider.register(t,e)}function yTi(t,e){return wi.get(Ln).codeLensProvider.register(t,e)}function _Ti(t,e,n){return wi.get(Ln).codeActionProvider.register(t,{providedCodeActionKinds:n==null?void 0:n.providedCodeActionKinds,documentation:n==null?void 0:n.documentation,provideCodeActions:(r,o,s,a)=>{const c=wi.get(Ow).read({resource:r.uri}).filter(u=>ve.areIntersectingOrTouching(u,o));return e.provideCodeActions(r,o,{markers:c,only:s.only,trigger:s.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function xTi(t,e){return wi.get(Ln).documentFormattingEditProvider.register(t,e)}function wTi(t,e){return wi.get(Ln).documentRangeFormattingEditProvider.register(t,e)}function CTi(t,e){return wi.get(Ln).onTypeFormattingEditProvider.register(t,e)}function STi(t,e){return wi.get(Ln).linkProvider.register(t,e)}function NTi(t,e){return wi.get(Ln).completionProvider.register(t,e)}function ETi(t,e){return wi.get(Ln).colorProvider.register(t,e)}function DTi(t,e){return wi.get(Ln).foldingRangeProvider.register(t,e)}function kTi(t,e){return wi.get(Ln).declarationProvider.register(t,e)}function MTi(t,e){return wi.get(Ln).selectionRangeProvider.register(t,e)}function LTi(t,e){return wi.get(Ln).documentSemanticTokensProvider.register(t,e)}function TTi(t,e){return wi.get(Ln).documentRangeSemanticTokensProvider.register(t,e)}function ITi(t,e){return wi.get(Ln).inlineCompletionsProvider.register(t,e)}function ATi(t,e){return wi.get(Ln).inlineEditProvider.register(t,e)}function RTi(t,e){return wi.get(Ln).inlayHintsProvider.register(t,e)}function PTi(){return{register:XLi,getLanguages:ZLi,onLanguage:JLi,onLanguageEncountered:eTi,getEncodedLanguageId:QLi,setLanguageConfiguration:tTi,setColorMap:oTi,registerTokensProviderFactory:q7e,setTokensProvider:sTi,setMonarchTokensProvider:aTi,registerReferenceProvider:lTi,registerRenameProvider:cTi,registerNewSymbolNameProvider:uTi,registerCompletionItemProvider:NTi,registerSignatureHelpProvider:dTi,registerHoverProvider:hTi,registerDocumentSymbolProvider:fTi,registerDocumentHighlightProvider:mTi,registerLinkedEditingRangeProvider:pTi,registerDefinitionProvider:gTi,registerImplementationProvider:bTi,registerTypeDefinitionProvider:vTi,registerCodeLensProvider:yTi,registerCodeActionProvider:_Ti,registerDocumentFormattingEditProvider:xTi,registerDocumentRangeFormattingEditProvider:wTi,registerOnTypeFormattingEditProvider:CTi,registerLinkProvider:STi,registerColorProvider:ETi,registerFoldingRangeProvider:DTi,registerDeclarationProvider:kTi,registerSelectionRangeProvider:MTi,registerDocumentSemanticTokensProvider:LTi,registerDocumentRangeSemanticTokensProvider:TTi,registerInlineCompletionsProvider:ITi,registerInlineEditProvider:ATi,registerInlayHintsProvider:RTi,DocumentHighlightKind:RMe,CompletionItemKind:kMe,CompletionItemTag:MMe,CompletionItemInsertTextRule:DMe,SymbolKind:dLe,SymbolTag:hLe,IndentAction:BMe,CompletionTriggerKind:LMe,SignatureHelpTriggerKind:uLe,InlayHintKind:HMe,InlineCompletionTriggerKind:WMe,InlineEditTriggerKind:UMe,CodeActionTriggerType:EMe,NewSymbolNameTag:QMe,NewSymbolNameTriggerKind:JMe,PartialAcceptTriggerKind:nLe,HoverVerbosityAction:VMe,FoldingRangeKind:lk,SelectedSuggestionInfo:r4t}}const G7e=Sr("IEditorCancelService"),n6t=new gn("cancellableOperation",!1,I("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));Rr(G7e,class{constructor(){this._tokens=new WeakMap}add(t,e){let n=this._tokens.get(t);n||(n=t.invokeWithinContext(r=>{const o=n6t.bindTo(r.get(vi)),s=new Ch;return{key:o,tokens:s}}),this._tokens.set(t,n));let i;return n.key.set(!0),i=n.tokens.push(e),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(t){const e=this._tokens.get(t);if(!e)return;const n=e.tokens.pop();n&&(n.cancel(),e.key.set(!e.tokens.isEmpty()))}},1);class OTi extends oa{constructor(e,n){super(n),this.editor=e,this._unregister=e.invokeWithinContext(i=>i.get(G7e).add(e,this))}dispose(){this._unregister(),super.dispose()}}fn(new class extends Zl{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:n6t})}runEditorCommand(t,e){t.get(G7e).cancel(e)}});let i6t=class $2e{constructor(e,n){if(this.flags=n,this.flags&1){const i=e.getModel();this.modelVersionId=i?B2("{0}#{1}",i.uri.toString(),i.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=e.getPosition():this.position=null,this.flags&2?this.selection=e.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof $2e))return!1;const n=e;return!(this.modelVersionId!==n.modelVersionId||this.scrollLeft!==n.scrollLeft||this.scrollTop!==n.scrollTop||!this.position&&n.position||this.position&&!n.position||this.position&&n.position&&!this.position.equals(n.position)||!this.selection&&n.selection||this.selection&&!n.selection||this.selection&&n.selection&&!this.selection.equalsRange(n.selection))}validate(e){return this._equals(new $2e(e,this.flags))}};class xk extends OTi{constructor(e,n,i,r){super(e,r),this._listener=new Lt,n&4&&this._listener.add(e.onDidChangeCursorPosition(o=>{(!i||!ve.containsPosition(i,o.position))&&this.cancel()})),n&2&&this._listener.add(e.onDidChangeCursorSelection(o=>{(!i||!ve.containsRange(i,o.selection))&&this.cancel()})),n&8&&this._listener.add(e.onDidScrollChange(o=>this.cancel())),n&1&&(this._listener.add(e.onDidChangeModel(o=>this.cancel())),this._listener.add(e.onDidChangeModelContent(o=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class Y7e extends oa{constructor(e,n){super(n),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}function yw(t){return t&&typeof t.getEditorType=="function"?t.getEditorType()===xq.ICodeEditor:!1}function X7e(t){return t&&typeof t.getEditorType=="function"?t.getEditorType()===xq.IDiffEditor:!1}function jTi(t){return!!t&&typeof t=="object"&&typeof t.onDidChangeActiveEditor=="function"}function r6t(t){return yw(t)?t:X7e(t)?t.getModifiedEditor():jTi(t)&&yw(t.activeCodeEditor)?t.activeCodeEditor:null}class N5{static _handleEolEdits(e,n){let i;const r=[];for(const o of n)typeof o.eol=="number"&&(i=o.eol),o.range&&typeof o.text=="string"&&r.push(o);return typeof i=="number"&&e.hasModel()&&e.getModel().pushEOL(i),r}static _isFullModelReplaceEdit(e,n){if(!e.hasModel())return!1;const i=e.getModel(),r=i.validateRange(n.range);return i.getFullModelRange().equalsRange(r)}static execute(e,n,i){i&&e.pushUndoStop();const r=J0.capture(e),o=N5._handleEolEdits(e,n);o.length===1&&N5._isFullModelReplaceEdit(e,o[0])?e.executeEdits("formatEditsCommand",o.map(s=>ia.replace(ve.lift(s.range),s.text))):e.executeEdits("formatEditsCommand",o.map(s=>ia.replaceMove(ve.lift(s.range),s.text))),i&&e.pushUndoStop(),r.restoreRelativeVerticalPositionOfCursor(e)}}class nut{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}class FTi{constructor(e){if(this._set=new Set,e)for(const n of e)this.add(n)}add(e){this._set.add(nut.toKey(e))}has(e){return this._set.has(nut.toKey(e))}}function o6t(t,e,n){const i=[],r=new FTi,o=t.ordered(n);for(const a of o)i.push(a),a.extensionId&&r.add(a.extensionId);const s=e.ordered(n);for(const a of s){if(a.extensionId){if(r.has(a.extensionId))continue;r.add(a.extensionId)}i.push({displayName:a.displayName,extensionId:a.extensionId,provideDocumentFormattingEdits(l,c,u){return a.provideDocumentRangeFormattingEdits(l,l.getFullModelRange(),c,u)}})}return i}const az=class az{static setFormatterSelector(e){return{dispose:az._selectors.unshift(e)}}static async select(e,n,i,r){if(e.length===0)return;const o=Ir.first(az._selectors);if(o)return await o(e,n,i,r)}};az._selectors=new Ch;let yW=az;async function s6t(t,e,n,i,r,o,s){const a=t.get(qn),{documentRangeFormattingEditProvider:l}=t.get(Ln),c=yw(e)?e.getModel():e,u=l.ordered(c),d=await yW.select(u,c,i,2);d&&(r.report(d),await a.invokeFunction($Ti,d,e,n,o,s))}async function $Ti(t,e,n,i,r,o){var y,_;const s=t.get(xb),a=t.get(Nd),l=t.get(lM);let c,u;yw(n)?(c=n.getModel(),u=new xk(n,5,void 0,r)):(c=n,u=new Y7e(n,r));const d=[];let h=0;for(const w of a8e(i).sort(ve.compareRangesUsingStarts))h>0&&ve.areIntersectingOrTouching(d[h-1],w)?d[h-1]=ve.fromPositions(d[h-1].getStartPosition(),w.getEndPosition()):h=d.push(w);const f=async w=>{var N,E;a.trace("[format][provideDocumentRangeFormattingEdits] (request)",(N=e.extensionId)==null?void 0:N.value,w);const C=await e.provideDocumentRangeFormattingEdits(c,w,c.getFormattingOptions(),u.token)||[];return a.trace("[format][provideDocumentRangeFormattingEdits] (response)",(E=e.extensionId)==null?void 0:E.value,C),C},m=(w,C)=>{if(!w.length||!C.length)return!1;const N=w.reduce((E,D)=>ve.plusRange(E,D.range),w[0].range);if(!C.some(E=>ve.intersectRanges(N,E.range)))return!1;for(const E of w)for(const D of C)if(ve.intersectRanges(E.range,D.range))return!0;return!1},p=[],g=[];try{if(typeof e.provideDocumentRangesFormattingEdits=="function"){a.trace("[format][provideDocumentRangeFormattingEdits] (request)",(y=e.extensionId)==null?void 0:y.value,d);const w=await e.provideDocumentRangesFormattingEdits(c,d,c.getFormattingOptions(),u.token)||[];a.trace("[format][provideDocumentRangeFormattingEdits] (response)",(_=e.extensionId)==null?void 0:_.value,w),g.push(w)}else{for(const w of d){if(u.token.isCancellationRequested)return!0;g.push(await f(w))}for(let w=0;w<d.length;++w)for(let C=w+1;C<d.length;++C){if(u.token.isCancellationRequested)return!0;if(m(g[w],g[C])){const N=ve.plusRange(d[w],d[C]),E=await f(N);d.splice(C,1),d.splice(w,1),d.push(N),g.splice(C,1),g.splice(w,1),g.push(E),w=0,C=0}}}for(const w of g){if(u.token.isCancellationRequested)return!0;const C=await s.computeMoreMinimalEdits(c.uri,w);C&&p.push(...C)}}finally{u.dispose()}if(p.length===0)return!1;if(yw(n))N5.execute(n,p,!0),n.revealPositionInCenterIfOutsideViewport(n.getPosition(),1);else{const[{range:w}]=p,C=new Pn(w.startLineNumber,w.startColumn,w.endLineNumber,w.endColumn);c.pushEditOperations([C],p.map(N=>({text:N.text,range:ve.lift(N.range),forceMoveMarkers:!0})),N=>{for(const{range:E}of N)if(ve.areIntersectingOrTouching(E,C))return[new Pn(E.startLineNumber,E.startColumn,E.endLineNumber,E.endColumn)];return null})}return l.playSignal(fp.format,{userGesture:o}),!0}async function VTi(t,e,n,i,r,o){const s=t.get(qn),a=t.get(Ln),l=yw(e)?e.getModel():e,c=o6t(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,l),u=await yW.select(c,l,n,1);u&&(i.report(u),await s.invokeFunction(BTi,u,e,n,r,o))}async function BTi(t,e,n,i,r,o){const s=t.get(xb),a=t.get(lM);let l,c;yw(n)?(l=n.getModel(),c=new xk(n,5,void 0,r)):(l=n,c=new Y7e(n,r));let u;try{const d=await e.provideDocumentFormattingEdits(l,l.getFormattingOptions(),c.token);if(u=await s.computeMoreMinimalEdits(l.uri,d),c.token.isCancellationRequested)return!0}finally{c.dispose()}if(!u||u.length===0)return!1;if(yw(n))N5.execute(n,u,i!==2),i!==2&&n.revealPositionInCenterIfOutsideViewport(n.getPosition(),1);else{const[{range:d}]=u,h=new Pn(d.startLineNumber,d.startColumn,d.endLineNumber,d.endColumn);l.pushEditOperations([h],u.map(f=>({text:f.text,range:ve.lift(f.range),forceMoveMarkers:!0})),f=>{for(const{range:m}of f)if(ve.areIntersectingOrTouching(m,h))return[new Pn(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn)];return null})}return a.playSignal(fp.format,{userGesture:o}),!0}async function zTi(t,e,n,i,r,o){const s=e.documentRangeFormattingEditProvider.ordered(n);for(const a of s){const l=await Promise.resolve(a.provideDocumentRangeFormattingEdits(n,i,r,o)).catch($a);if(md(l))return await t.computeMoreMinimalEdits(n.uri,l)}}async function HTi(t,e,n,i,r){const o=o6t(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,n);for(const s of o){const a=await Promise.resolve(s.provideDocumentFormattingEdits(n,i,r)).catch($a);if(md(a))return await t.computeMoreMinimalEdits(n.uri,a)}}function a6t(t,e,n,i,r,o,s){const a=e.onTypeFormattingEditProvider.ordered(n);return a.length===0||a[0].autoFormatTriggerCharacters.indexOf(r)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(n,i,r,o,s)).catch($a).then(l=>t.computeMoreMinimalEdits(n.uri,l))}Ar.registerCommand("_executeFormatRangeProvider",async function(t,...e){const[n,i,r]=e;Gr(ri.isUri(n)),Gr(ve.isIRange(i));const o=t.get(Rf),s=t.get(xb),a=t.get(Ln),l=await o.createModelReference(n);try{return zTi(s,a,l.object.textEditorModel,ve.lift(i),r,er.None)}finally{l.dispose()}});Ar.registerCommand("_executeFormatDocumentProvider",async function(t,...e){const[n,i]=e;Gr(ri.isUri(n));const r=t.get(Rf),o=t.get(xb),s=t.get(Ln),a=await r.createModelReference(n);try{return HTi(o,s,a.object.textEditorModel,i,er.None)}finally{a.dispose()}});Ar.registerCommand("_executeFormatOnTypeProvider",async function(t,...e){const[n,i,r,o]=e;Gr(ri.isUri(n)),Gr(ot.isIPosition(i)),Gr(typeof r=="string");const s=t.get(Rf),a=t.get(xb),l=t.get(Ln),c=await s.createModelReference(n);try{return a6t(a,l,c.object.textEditorModel,ot.lift(i),r,o,er.None)}finally{c.dispose()}});l_.wrappingIndent.defaultValue=0;l_.glyphMargin.defaultValue=!1;l_.autoIndent.defaultValue=3;l_.overviewRulerLanes.defaultValue=2;yW.setFormatterSelector((t,e,n)=>Promise.resolve(t[0]));const Xh=o4t();Xh.editor=WLi();Xh.languages=PTi();const WTi=Xh.CancellationTokenSource,UTi=Xh.Emitter,KTi=Xh.KeyCode,qTi=Xh.KeyMod,GTi=Xh.Position,YTi=Xh.Range,XTi=Xh.Selection,ZTi=Xh.SelectionDirection,QTi=Xh.MarkerSeverity,JTi=Xh.MarkerTag,l6t=Xh.Uri,eIi=Xh.Token,V2e=Xh.editor,gB=Xh.languages,U1e=globalThis.MonacoEnvironment;(U1e!=null&&U1e.globalAPI||typeof define=="function"&&define.amd)&&(globalThis.monaco=Xh);typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});const Hq=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:WTi,Emitter:UTi,KeyCode:KTi,KeyMod:qTi,MarkerSeverity:QTi,MarkerTag:JTi,Position:GTi,Range:YTi,Selection:XTi,SelectionDirection:ZTi,Token:eIi,Uri:l6t,editor:V2e,languages:gB},Symbol.toStringTag,{value:"Module"})),tIi=!0,nIi={"activityBar.background":"#1e293b","activityBar.foreground":"#d7dae0","activityBarBadge.background":"#4d78cc","activityBarBadge.foreground":"#f8fafd","badge.background":"#1e293b","button.background":"#404754","button.secondaryBackground":"#30333d","button.secondaryForeground":"#c0bdbd","checkbox.border":"#404754","debugToolBar.background":"#1e2227",descriptionForeground:"#abb2bf","diffEditor.insertedTextBackground":"#00809b33","dropdown.background":"#1e2227","dropdown.border":"#1e2227","editor.background":"#1e293b","editor.findMatchBackground":"#d19a6644","editor.findMatchBorder":"#ffffff5a","editor.findMatchHighlightBackground":"#ffffff22","editor.foreground":"#abb2bf","editorBracketHighlight.foreground1":"#d19a66","editorBracketHighlight.foreground2":"#BD87C9","editorBracketHighlight.foreground3":"#56b6c2","editorHoverWidget.highlightForeground":"#61afef","editorInlayHint.foreground":"#abb2bf","editorInlayHint.background":"#2c313c","editor.lineHighlightBackground":"#2c313c","editorLineNumber.activeForeground":"#abb2bf","editorGutter.addedBackground":"#109868","editorGutter.deletedBackground":"#9A353D","editorGutter.modifiedBackground":"#948B60","editorOverviewRuler.addedBackground":"#109868","editorOverviewRuler.deletedBackground":"#9A353D","editorOverviewRuler.modifiedBackground":"#948B60","editor.selectionBackground":"#67769660","editor.selectionHighlightBackground":"#ffffff10","editor.selectionHighlightBorder":"#dddddd","editor.wordHighlightBackground":"#d2e0ff2f","editor.wordHighlightBorder":"#7f848e","editor.wordHighlightStrongBackground":"#abb2bf26","editor.wordHighlightStrongBorder":"#7f848e","editorBracketMatch.background":"#515a6b","editorBracketMatch.border":"#515a6b","editorCursor.background":"#ffffffc9","editorCursor.foreground":"#528bff","editorError.foreground":"#c24038","editorGroup.background":"#181a1f","editorGroup.border":"#181a1f","editorGroupHeader.tabsBackground":"#1e2227","editorHoverWidget.background":"#1e2227","editorHoverWidget.border":"#181a1f","editorIndentGuide.activeBackground":"#c8c8c859","editorIndentGuide.background":"#3b4048","editorLineNumber.foreground":"#495162","editorMarkerNavigation.background":"#1e2227","editorRuler.foreground":"#abb2bf26","editorSuggestWidget.background":"#1e2227","editorSuggestWidget.border":"#181a1f","editorSuggestWidget.selectedBackground":"#2c313a","editorWarning.foreground":"#d19a66","editorWhitespace.foreground":"#ffffff1d","editorWidget.background":"#1e2227",focusBorder:"#3e4452","gitDecoration.ignoredResourceForeground":"#636b78","input.background":"#1d1f23","input.foreground":"#abb2bf","list.activeSelectionBackground":"#2c313a","list.activeSelectionForeground":"#d7dae0","list.focusBackground":"#323842","list.focusForeground":"#f0f0f0","list.highlightForeground":"#ecebeb","list.hoverBackground":"#2c313a","list.hoverForeground":"#abb2bf","list.inactiveSelectionBackground":"#323842","list.inactiveSelectionForeground":"#d7dae0","list.warningForeground":"#d19a66","menu.foreground":"#abb2bf","menu.separatorBackground":"#343a45","minimapGutter.addedBackground":"#109868","minimapGutter.deletedBackground":"#9A353D","minimapGutter.modifiedBackground":"#948B60","panel.border":"#3e4452","panelSectionHeader.background":"#1e2227","peekViewEditor.background":"#1b1d23","peekViewEditor.matchHighlightBackground":"#29244b","peekViewResult.background":"#22262b","scrollbar.shadow":"#23252c","scrollbarSlider.activeBackground":"#747d9180","scrollbarSlider.background":"#4e566660","scrollbarSlider.hoverBackground":"#5a637580","settings.focusedRowBackground":"#1e293b","settings.headerForeground":"#fff","sideBar.background":"#1e2227","sideBar.foreground":"#abb2bf","sideBarSectionHeader.background":"#1e293b","sideBarSectionHeader.foreground":"#abb2bf","statusBar.background":"#1e2227","statusBar.debuggingBackground":"#cc6633","statusBar.debuggingBorder":"#ff000000","statusBar.debuggingForeground":"#ffffff","statusBar.foreground":"#9da5b4","statusBar.noFolderBackground":"#1e2227","statusBarItem.remoteBackground":"#4d78cc","statusBarItem.remoteForeground":"#f8fafd","tab.activeBackground":"#1e293b","tab.activeBorder":"#b4b4b4","tab.activeForeground":"#dcdcdc","tab.border":"#181a1f","tab.hoverBackground":"#323842","tab.inactiveBackground":"#1e2227","tab.unfocusedHoverBackground":"#323842","terminal.ansiBlack":"#3f4451","terminal.ansiBlue":"#4aa5f0","terminal.ansiBrightBlack":"#4f5666","terminal.ansiBrightBlue":"#4dc4ff","terminal.ansiBrightCyan":"#4cd1e0","terminal.ansiBrightGreen":"#a5e075","terminal.ansiBrightMagenta":"#de73ff","terminal.ansiBrightRed":"#ff616e","terminal.ansiBrightWhite":"#e6e6e6","terminal.ansiBrightYellow":"#f0a45d","terminal.ansiCyan":"#42b3c2","terminal.ansiGreen":"#8cc265","terminal.ansiMagenta":"#c162de","terminal.ansiRed":"#e05561","terminal.ansiWhite":"#d7dae0","terminal.ansiYellow":"#d18f52","terminal.background":"#1e293b","terminal.border":"#3e4452","terminal.foreground":"#abb2bf","terminal.selectionBackground":"#abb2bf30","textBlockQuote.background":"#2e3440","textBlockQuote.border":"#4b5362","textLink.foreground":"#61afef","textPreformat.foreground":"#d19a66","titleBar.activeBackground":"#1e293b","titleBar.activeForeground":"#9da5b4","titleBar.inactiveBackground":"#1e293b","titleBar.inactiveForeground":"#6b717d","tree.indentGuidesStroke":"#ffffff1d","walkThrough.embeddedEditorBackground":"#2e3440","welcomePage.buttonHoverBackground":"#404754"},iIi=[{foreground:"#abb2bf",token:"meta.embedded"},{foreground:"#e06c75",token:"punctuation.definition.delayed.unison"},{foreground:"#e06c75",token:"punctuation.definition.list.begin.unison"},{foreground:"#e06c75",token:"punctuation.definition.list.end.unison"},{foreground:"#e06c75",token:"punctuation.definition.ability.begin.unison"},{foreground:"#e06c75",token:"punctuation.definition.ability.end.unison"},{foreground:"#e06c75",token:"punctuation.operator.assignment.as.unison"},{foreground:"#e06c75",token:"punctuation.separator.pipe.unison"},{foreground:"#e06c75",token:"punctuation.separator.delimiter.unison"},{foreground:"#e06c75",token:"punctuation.definition.hash.unison"},{foreground:"#BD87C9",token:"variable.other.generic-type.haskell"},{foreground:"#d19a66",token:"storage.type.haskell"},{foreground:"#e06c75",token:"support.variable.magic.python"},{foreground:"#abb2bf",token:"punctuation.separator.period.python"},{foreground:"#abb2bf",token:"punctuation.separator.element.python"},{foreground:"#abb2bf",token:"punctuation.parenthesis.begin.python"},{foreground:"#abb2bf",token:"punctuation.parenthesis.end.python"},{foreground:"#e5c07b",token:"variable.parameter.function.language.special.self.python"},{foreground:"#e5c07b",token:"variable.parameter.function.language.special.cls.python"},{foreground:"#abb2bf",token:"storage.modifier.lifetime.rust"},{foreground:"#61afef",token:"support.function.std.rust"},{foreground:"#e5c07b",token:"entity.name.lifetime.rust"},{foreground:"#e06c75",token:"variable.language.rust"},{foreground:"#BD87C9",token:"support.constant.edge"},{foreground:"#e06c75",token:"constant.other.character-class.regexp"},{foreground:"#BD87C9",token:"keyword.operator.word"},{foreground:"#d19a66",token:"keyword.operator.quantifier.regexp"},{foreground:"#abb2bf",token:"variable.parameter.function"},{foreground:"#5c6370",token:"comment markup.link"},{foreground:"#e5c07b",token:"markup.changed.diff"},{foreground:"#61afef",token:"meta.diff.header.from-file"},{foreground:"#61afef",token:"meta.diff.header.to-file"},{foreground:"#61afef",token:"punctuation.definition.from-file.diff"},{foreground:"#61afef",token:"punctuation.definition.to-file.diff"},{foreground:"#98c379",token:"markup.inserted.diff"},{foreground:"#e06c75",token:"markup.deleted.diff"},{foreground:"#e06c75",token:"meta.function.c"},{foreground:"#e06c75",token:"meta.function.cpp"},{foreground:"#abb2bf",token:"punctuation.section.block.begin.bracket.curly.cpp"},{foreground:"#abb2bf",token:"punctuation.section.block.end.bracket.curly.cpp"},{foreground:"#abb2bf",token:"punctuation.terminator.statement.c"},{foreground:"#abb2bf",token:"punctuation.section.block.begin.bracket.curly.c"},{foreground:"#abb2bf",token:"punctuation.section.block.end.bracket.curly.c"},{foreground:"#abb2bf",token:"punctuation.section.parens.begin.bracket.round.c"},{foreground:"#abb2bf",token:"punctuation.section.parens.end.bracket.round.c"},{foreground:"#abb2bf",token:"punctuation.section.parameters.begin.bracket.round.c"},{foreground:"#abb2bf",token:"punctuation.section.parameters.end.bracket.round.c"},{foreground:"#abb2bf",token:"punctuation.separator.key-value"},{foreground:"#61afef",token:"keyword.operator.expression.import"},{foreground:"#e5c07b",token:"support.constant.math"},{foreground:"#d19a66",token:"support.constant.property.math"},{foreground:"#e5c07b",token:"variable.other.constant"},{foreground:"#e5c07b",token:"storage.type.annotation.java"},{foreground:"#e5c07b",token:"storage.type.object.array.java"},{foreground:"#e06c75",token:"source.java"},{foreground:"#abb2bf",token:"punctuation.section.block.begin.java"},{foreground:"#abb2bf",token:"punctuation.section.block.end.java"},{foreground:"#abb2bf",token:"punctuation.definition.method-parameters.begin.java"},{foreground:"#abb2bf",token:"punctuation.definition.method-parameters.end.java"},{foreground:"#abb2bf",token:"meta.method.identifier.java"},{foreground:"#abb2bf",token:"punctuation.section.method.begin.java"},{foreground:"#abb2bf",token:"punctuation.section.method.end.java"},{foreground:"#abb2bf",token:"punctuation.terminator.java"},{foreground:"#abb2bf",token:"punctuation.section.class.begin.java"},{foreground:"#abb2bf",token:"punctuation.section.class.end.java"},{foreground:"#abb2bf",token:"punctuation.section.inner-class.begin.java"},{foreground:"#abb2bf",token:"punctuation.section.inner-class.end.java"},{foreground:"#abb2bf",token:"meta.method-call.java"},{foreground:"#abb2bf",token:"punctuation.section.class.begin.bracket.curly.java"},{foreground:"#abb2bf",token:"punctuation.section.class.end.bracket.curly.java"},{foreground:"#abb2bf",token:"punctuation.section.method.begin.bracket.curly.java"},{foreground:"#abb2bf",token:"punctuation.section.method.end.bracket.curly.java"},{foreground:"#abb2bf",token:"punctuation.separator.period.java"},{foreground:"#abb2bf",token:"punctuation.bracket.angle.java"},{foreground:"#abb2bf",token:"punctuation.definition.annotation.java"},{foreground:"#abb2bf",token:"meta.method.body.java"},{foreground:"#61afef",token:"meta.method.java"},{foreground:"#e5c07b",token:"storage.modifier.import.java"},{foreground:"#e5c07b",token:"storage.type.java"},{foreground:"#e5c07b",token:"storage.type.generic.java"},{foreground:"#BD87C9",token:"keyword.operator.instanceof.java"},{foreground:"#e06c75",token:"meta.definition.variable.name.java"},{foreground:"#56b6c2",token:"keyword.operator.logical"},{foreground:"#56b6c2",token:"keyword.operator.bitwise"},{foreground:"#56b6c2",token:"keyword.operator.channel"},{foreground:"#d19a66",token:"support.constant.property-value.scss"},{foreground:"#d19a66",token:"support.constant.property-value.css"},{foreground:"#56b6c2",token:"keyword.operator.css"},{foreground:"#56b6c2",token:"keyword.operator.scss"},{foreground:"#56b6c2",token:"keyword.operator.less"},{foreground:"#d19a66",token:"support.constant.color.w3c-standard-color-name.css"},{foreground:"#d19a66",token:"support.constant.color.w3c-standard-color-name.scss"},{foreground:"#abb2bf",token:"punctuation.separator.list.comma.css"},{foreground:"#d19a66",token:"support.constant.color.w3c-standard-color-name.css"},{foreground:"#56b6c2",token:"support.type.vendored.property-name.css"},{foreground:"#e5c07b",token:"support.module.node"},{foreground:"#e5c07b",token:"support.type.object.module"},{foreground:"#e5c07b",token:"support.module.node"},{foreground:"#e5c07b",token:"entity.name.type.module"},{foreground:"#e06c75",token:"variable.other.readwrite"},{foreground:"#e06c75",token:"meta.object-literal.key"},{foreground:"#e06c75",token:"support.variable.property"},{foreground:"#e06c75",token:"support.variable.object.process"},{foreground:"#e06c75",token:"support.variable.object.node"},{foreground:"#d19a66",token:"support.constant.json"},{foreground:"#BD87C9",token:"keyword.operator.expression.instanceof"},{foreground:"#BD87C9",token:"keyword.operator.new"},{foreground:"#BD87C9",token:"keyword.operator.ternary"},{foreground:"#BD87C9",token:"keyword.operator.optional"},{foreground:"#BD87C9",token:"keyword.operator.expression.keyof"},{foreground:"#e06c75",token:"support.type.object.console"},{foreground:"#d19a66",token:"support.variable.property.process"},{foreground:"#61afef",token:"entity.name.function"},{foreground:"#61afef",token:"support.function.console"},{foreground:"#abb2bf",token:"keyword.operator.misc.rust"},{foreground:"#BD87C9",token:"keyword.operator.sigil.rust"},{foreground:"#BD87C9",token:"keyword.operator.delete"},{foreground:"#56b6c2",token:"support.type.object.dom"},{foreground:"#e06c75",token:"support.variable.dom"},{foreground:"#e06c75",token:"support.variable.property.dom"},{foreground:"#56b6c2",token:"keyword.operator.arithmetic"},{foreground:"#56b6c2",token:"keyword.operator.comparison"},{foreground:"#56b6c2",token:"keyword.operator.decrement"},{foreground:"#56b6c2",token:"keyword.operator.increment"},{foreground:"#56b6c2",token:"keyword.operator.relational"},{foreground:"#BD87C9",token:"keyword.operator.assignment.c"},{foreground:"#BD87C9",token:"keyword.operator.comparison.c"},{foreground:"#BD87C9",token:"keyword.operator.c"},{foreground:"#BD87C9",token:"keyword.operator.increment.c"},{foreground:"#BD87C9",token:"keyword.operator.decrement.c"},{foreground:"#BD87C9",token:"keyword.operator.bitwise.shift.c"},{foreground:"#BD87C9",token:"keyword.operator.assignment.cpp"},{foreground:"#BD87C9",token:"keyword.operator.comparison.cpp"},{foreground:"#BD87C9",token:"keyword.operator.cpp"},{foreground:"#BD87C9",token:"keyword.operator.increment.cpp"},{foreground:"#BD87C9",token:"keyword.operator.decrement.cpp"},{foreground:"#BD87C9",token:"keyword.operator.bitwise.shift.cpp"},{foreground:"#abb2bf",token:"punctuation.separator.delimiter"},{foreground:"#BD87C9",token:"punctuation.separator.c"},{foreground:"#BD87C9",token:"punctuation.separator.cpp"},{foreground:"#56b6c2",token:"support.type.posix-reserved.c"},{foreground:"#56b6c2",token:"support.type.posix-reserved.cpp"},{foreground:"#BD87C9",token:"keyword.operator.sizeof.c"},{foreground:"#BD87C9",token:"keyword.operator.sizeof.cpp"},{foreground:"#d19a66",token:"variable.parameter.function.language.python"},{foreground:"#56b6c2",token:"support.type.python"},{foreground:"#BD87C9",token:"keyword.operator.logical.python"},{foreground:"#d19a66",token:"variable.parameter.function.python"},{foreground:"#abb2bf",token:"punctuation.definition.arguments.begin.python"},{foreground:"#abb2bf",token:"punctuation.definition.arguments.end.python"},{foreground:"#abb2bf",token:"punctuation.separator.arguments.python"},{foreground:"#abb2bf",token:"punctuation.definition.list.begin.python"},{foreground:"#abb2bf",token:"punctuation.definition.list.end.python"},{foreground:"#61afef",token:"meta.function-call.generic.python"},{foreground:"#d19a66",token:"constant.character.format.placeholder.other.python"},{foreground:"#abb2bf",token:"keyword.operator"},{foreground:"#BD87C9",token:"keyword.operator.assignment.compound"},{foreground:"#56b6c2",token:"keyword.operator.assignment.compound.js"},{foreground:"#56b6c2",token:"keyword.operator.assignment.compound.ts"},{foreground:"#BD87C9",token:"keyword"},{foreground:"#e5c07b",token:"entity.name.namespace"},{foreground:"#e06c75",token:"variable"},{foreground:"#abb2bf",token:"variable.c"},{foreground:"#e5c07b",token:"variable.language"},{foreground:"#abb2bf",token:"token.variable.parameter.java"},{foreground:"#e5c07b",token:"import.storage.java"},{foreground:"#BD87C9",token:"token.package.keyword"},{foreground:"#abb2bf",token:"token.package"},{foreground:"#61afef",token:"entity.name.function"},{foreground:"#61afef",token:"meta.require"},{foreground:"#61afef",token:"support.function.any-method"},{foreground:"#61afef",token:"variable.function"},{foreground:"#e5c07b",token:"entity.name.type.namespace"},{foreground:"#e5c07b",token:"support.class"},{foreground:"#e5c07b",token:" entity.name.type.class"},{foreground:"#e5c07b",token:"entity.name.class.identifier.namespace.type"},{foreground:"#e5c07b",token:"entity.name.class"},{foreground:"#e5c07b",token:"variable.other.class.js"},{foreground:"#e5c07b",token:"variable.other.class.ts"},{foreground:"#e06c75",token:"variable.other.class.php"},{foreground:"#e5c07b",token:"entity.name.type"},{foreground:"#BD87C9",token:"keyword.control"},{foreground:"#d19a66",token:"control.elements"},{foreground:"#d19a66",token:" keyword.operator.less"},{foreground:"#61afef",token:"keyword.other.special-method"},{foreground:"#BD87C9",token:"storage"},{foreground:"#BD87C9",token:"token.storage"},{foreground:"#BD87C9",token:"keyword.operator.expression.delete"},{foreground:"#BD87C9",token:"keyword.operator.expression.in"},{foreground:"#BD87C9",token:"keyword.operator.expression.of"},{foreground:"#BD87C9",token:"keyword.operator.expression.instanceof"},{foreground:"#BD87C9",token:"keyword.operator.new"},{foreground:"#BD87C9",token:"keyword.operator.expression.typeof"},{foreground:"#BD87C9",token:"keyword.operator.expression.void"},{foreground:"#e5c07b",token:"token.storage.type.java"},{foreground:"#56b6c2",token:"support.function"},{foreground:"#abb2bf",token:"support.type.property-name"},{foreground:"#e06c75",token:"support.type.property-name.toml"},{foreground:"#e06c75",token:" support.type.property-name.table.toml"},{foreground:"#e06c75",token:" support.type.property-name.array.toml"},{foreground:"#abb2bf",token:"support.constant.property-value"},{foreground:"#d19a66",token:"support.constant.font-name"},{foreground:"#abb2bf",token:"meta.tag"},{foreground:"#98c379",token:"string"},{foreground:"#56b6c2",token:"constant.other.symbol"},{foreground:"#d19a66",token:"constant.numeric"},{foreground:"#d19a66",token:"constant"},{foreground:"#d19a66",token:"punctuation.definition.constant"},{foreground:"#e06c75",token:"entity.name.tag"},{foreground:"#d19a66",token:"entity.other.attribute-name"},{foreground:"#61afef",token:"entity.other.attribute-name.id"},{foreground:"#d19a66",token:"entity.other.attribute-name.class.css"},{foreground:"#BD87C9",token:"meta.selector"},{foreground:"#e06c75",token:"markup.heading"},{foreground:"#61afef",token:"markup.heading punctuation.definition.heading"},{foreground:"#61afef",token:" entity.name.section"},{foreground:"#e06c75",token:"keyword.other.unit"},{foreground:"#d19a66",token:"markup.bold"},{foreground:"#d19a66",token:"todo.bold"},{foreground:"#e5c07b",token:"punctuation.definition.bold"},{foreground:"#BD87C9",token:"markup.italic"},{foreground:"#BD87C9",token:" punctuation.definition.italic"},{foreground:"#BD87C9",token:"todo.emphasis"},{foreground:"#BD87C9",token:"emphasis md"},{foreground:"#e06c75",token:"entity.name.section.markdown"},{foreground:"#e06c75",token:"punctuation.definition.heading.markdown"},{foreground:"#e5c07b",token:"punctuation.definition.list.begin.markdown"},{foreground:"#abb2bf",token:"markup.heading.setext"},{foreground:"#d19a66",token:"punctuation.definition.bold.markdown"},{foreground:"#98c379",token:"markup.inline.raw.markdown"},{foreground:"#98c379",token:"markup.inline.raw.string.markdown"},{foreground:"#e5c07b",token:"punctuation.definition.raw.markdown"},{foreground:"#e5c07b",token:"punctuation.definition.list.markdown"},{foreground:"#e06c75",token:"punctuation.definition.string.begin.markdown"},{foreground:"#e06c75",token:"punctuation.definition.string.end.markdown"},{foreground:"#e06c75",token:"punctuation.definition.metadata.markdown"},{foreground:"#e06c75",token:"beginning.punctuation.definition.list.markdown"},{foreground:"#e06c75",token:"punctuation.definition.metadata.markdown"},{foreground:"#BD87C9",token:"markup.underline.link.markdown"},{foreground:"#BD87C9",token:"markup.underline.link.image.markdown"},{foreground:"#61afef",token:"string.other.link.title.markdown"},{foreground:"#61afef",token:"string.other.link.description.markdown"},{foreground:"#98c379",token:"markup.raw.monospace.asciidoc"},{foreground:"#e5c07b",token:"punctuation.definition.asciidoc"},{foreground:"#e5c07b",token:"markup.list.asciidoc"},{foreground:"#BD87C9",token:"markup.link.asciidoc"},{foreground:"#BD87C9",token:"markup.other.url.asciidoc"},{foreground:"#61afef",token:"string.unquoted.asciidoc"},{foreground:"#61afef",token:"markup.other.url.asciidoc"},{foreground:"#56b6c2",token:"string.regexp"},{foreground:"#e06c75",token:"punctuation.section.embedded"},{foreground:"#e06c75",token:" variable.interpolation"},{foreground:"#BD87C9",token:"punctuation.section.embedded.begin"},{foreground:"#BD87C9",token:"punctuation.section.embedded.end"},{foreground:"#ffffff",token:"invalid.illegal"},{foreground:"#abb2bf",token:"invalid.illegal.bad-ampersand.html"},{foreground:"#e06c75",token:"invalid.illegal.unrecognized-tag.html"},{foreground:"#ffffff",token:"invalid.broken"},{foreground:"#ffffff",token:"invalid.deprecated"},{foreground:"#d19a66",token:"invalid.deprecated.entity.other.attribute-name.html"},{foreground:"#ffffff",token:"invalid.unimplemented"},{foreground:"#e06c75",token:"source.json meta.structure.dictionary.json > string.quoted.json"},{foreground:"#e06c75",token:"source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string"},{foreground:"#98c379",token:"source.json meta.structure.dictionary.json > value.json > string.quoted.json"},{foreground:"#98c379",token:"source.json meta.structure.array.json > value.json > string.quoted.json"},{foreground:"#98c379",token:"source.json meta.structure.dictionary.json > value.json > string.quoted.json > punctuation"},{foreground:"#98c379",token:"source.json meta.structure.array.json > value.json > string.quoted.json > punctuation"},{foreground:"#56b6c2",token:"source.json meta.structure.dictionary.json > constant.language.json"},{foreground:"#56b6c2",token:"source.json meta.structure.array.json > constant.language.json"},{foreground:"#e06c75",token:"support.type.property-name.json"},{foreground:"#e06c75",token:"support.type.property-name.json punctuation"},{foreground:"#BD87C9",token:"text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade"},{foreground:"#BD87C9",token:"text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade"},{foreground:"#e5c07b",token:"support.other.namespace.use.php"},{foreground:"#e5c07b",token:"support.other.namespace.use-as.php"},{foreground:"#e5c07b",token:"entity.other.alias.php"},{foreground:"#e5c07b",token:"meta.interface.php"},{foreground:"#BD87C9",token:"keyword.operator.error-control.php"},{foreground:"#BD87C9",token:"keyword.operator.type.php"},{foreground:"#abb2bf",token:"punctuation.section.array.begin.php"},{foreground:"#abb2bf",token:"punctuation.section.array.end.php"},{foreground:"#f44747",token:"invalid.illegal.non-null-typehinted.php"},{foreground:"#e5c07b",token:"storage.type.php"},{foreground:"#e5c07b",token:"meta.other.type.phpdoc.php"},{foreground:"#e5c07b",token:"keyword.other.type.php"},{foreground:"#e5c07b",token:"keyword.other.array.phpdoc.php"},{foreground:"#61afef",token:"meta.function-call.php"},{foreground:"#61afef",token:"meta.function-call.object.php"},{foreground:"#61afef",token:"meta.function-call.static.php"},{foreground:"#abb2bf",token:"punctuation.definition.parameters.begin.bracket.round.php"},{foreground:"#abb2bf",token:"punctuation.definition.parameters.end.bracket.round.php"},{foreground:"#abb2bf",token:"punctuation.separator.delimiter.php"},{foreground:"#abb2bf",token:"punctuation.section.scope.begin.php"},{foreground:"#abb2bf",token:"punctuation.section.scope.end.php"},{foreground:"#abb2bf",token:"punctuation.terminator.expression.php"},{foreground:"#abb2bf",token:"punctuation.definition.arguments.begin.bracket.round.php"},{foreground:"#abb2bf",token:"punctuation.definition.arguments.end.bracket.round.php"},{foreground:"#abb2bf",token:"punctuation.definition.storage-type.begin.bracket.round.php"},{foreground:"#abb2bf",token:"punctuation.definition.storage-type.end.bracket.round.php"},{foreground:"#abb2bf",token:"punctuation.definition.array.begin.bracket.round.php"},{foreground:"#abb2bf",token:"punctuation.definition.array.end.bracket.round.php"},{foreground:"#abb2bf",token:"punctuation.definition.begin.bracket.round.php"},{foreground:"#abb2bf",token:"punctuation.definition.end.bracket.round.php"},{foreground:"#abb2bf",token:"punctuation.definition.begin.bracket.curly.php"},{foreground:"#abb2bf",token:"punctuation.definition.end.bracket.curly.php"},{foreground:"#abb2bf",token:"punctuation.definition.section.switch-block.end.bracket.curly.php"},{foreground:"#abb2bf",token:"punctuation.definition.section.switch-block.start.bracket.curly.php"},{foreground:"#abb2bf",token:"punctuation.definition.section.switch-block.begin.bracket.curly.php"},{foreground:"#abb2bf",token:"punctuation.definition.section.switch-block.end.bracket.curly.php"},{foreground:"#d19a66",token:"support.constant.core.rust"},{foreground:"#d19a66",token:"support.constant.ext.php"},{foreground:"#d19a66",token:"support.constant.std.php"},{foreground:"#d19a66",token:"support.constant.core.php"},{foreground:"#d19a66",token:"support.constant.parser-token.php"},{foreground:"#61afef",token:"entity.name.goto-label.php"},{foreground:"#61afef",token:"support.other.php"},{foreground:"#56b6c2",token:"keyword.operator.logical.php"},{foreground:"#56b6c2",token:"keyword.operator.bitwise.php"},{foreground:"#56b6c2",token:"keyword.operator.arithmetic.php"},{foreground:"#BD87C9",token:"keyword.operator.regexp.php"},{foreground:"#56b6c2",token:"keyword.operator.comparison.php"},{foreground:"#BD87C9",token:"keyword.operator.heredoc.php"},{foreground:"#BD87C9",token:"keyword.operator.nowdoc.php"},{foreground:"#61afef",token:"meta.function.decorator.python"},{foreground:"#56b6c2",token:"support.token.decorator.python"},{foreground:"#56b6c2",token:"meta.function.decorator.identifier.python"},{foreground:"#abb2bf",token:"function.parameter"},{foreground:"#abb2bf",token:"function.brace"},{foreground:"#abb2bf",token:"function.parameter.ruby"},{foreground:"#abb2bf",token:" function.parameter.cs"},{foreground:"#56b6c2",token:"constant.language.symbol.ruby"},{foreground:"#56b6c2",token:"constant.language.symbol.hashkey.ruby"},{foreground:"#56b6c2",token:"rgb-value"},{foreground:"#d19a66",token:"inline-color-decoration rgb-value"},{foreground:"#d19a66",token:"less rgb-value"},{foreground:"#e06c75",token:"selector.sass"},{foreground:"#e5c07b",token:"support.type.primitive.ts"},{foreground:"#e5c07b",token:"support.type.builtin.ts"},{foreground:"#e5c07b",token:"support.type.primitive.tsx"},{foreground:"#e5c07b",token:"support.type.builtin.tsx"},{foreground:"#abb2bf",token:"block.scope.end"},{foreground:"#abb2bf",token:"block.scope.begin"},{foreground:"#e5c07b",token:"storage.type.cs"},{foreground:"#e06c75",token:"entity.name.variable.local.cs"},{foreground:"#61afef",token:"token.info-token"},{foreground:"#d19a66",token:"token.warn-token"},{foreground:"#f44747",token:"token.error-token"},{foreground:"#BD87C9",token:"token.debug-token"},{foreground:"#BD87C9",token:"punctuation.definition.template-expression.begin"},{foreground:"#BD87C9",token:"punctuation.definition.template-expression.end"},{foreground:"#BD87C9",token:"punctuation.section.embedded"},{foreground:"#abb2bf",token:"meta.template.expression"},{foreground:"#BD87C9",token:"keyword.operator.module"},{foreground:"#61afef",token:"support.type.type.flowtype"},{foreground:"#e5c07b",token:"support.type.primitive"},{foreground:"#e06c75",token:"meta.property.object"},{foreground:"#e06c75",token:"variable.parameter.function.js"},{foreground:"#98c379",token:"keyword.other.template.begin"},{foreground:"#98c379",token:"keyword.other.template.end"},{foreground:"#98c379",token:"keyword.other.substitution.begin"},{foreground:"#98c379",token:"keyword.other.substitution.end"},{foreground:"#56b6c2",token:"keyword.operator.assignment"},{foreground:"#e5c07b",token:"keyword.operator.assignment.go"},{foreground:"#BD87C9",token:"keyword.operator.arithmetic.go"},{foreground:"#BD87C9",token:"keyword.operator.address.go"},{foreground:"#e5c07b",token:"entity.name.package.go"},{foreground:"#56b6c2",token:"support.type.prelude.elm"},{foreground:"#d19a66",token:"support.constant.elm"},{foreground:"#BD87C9",token:"punctuation.quasi.element"},{foreground:"#e06c75",token:"constant.character.entity"},{foreground:"#56b6c2",token:"entity.other.attribute-name.pseudo-element"},{foreground:"#56b6c2",token:"entity.other.attribute-name.pseudo-class"},{foreground:"#e5c07b",token:"entity.global.clojure"},{foreground:"#e06c75",token:"meta.symbol.clojure"},{foreground:"#56b6c2",token:"constant.keyword.clojure"},{foreground:"#e06c75",token:"meta.arguments.coffee"},{foreground:"#e06c75",token:"variable.parameter.function.coffee"},{foreground:"#98c379",token:"source.ini"},{foreground:"#e06c75",token:"meta.scope.prerequisites.makefile"},{foreground:"#e5c07b",token:"source.makefile"},{foreground:"#e5c07b",token:"storage.modifier.import.groovy"},{foreground:"#61afef",token:"meta.method.groovy"},{foreground:"#e06c75",token:"meta.definition.variable.name.groovy"},{foreground:"#98c379",token:"meta.definition.class.inherited.classes.groovy"},{foreground:"#e5c07b",token:"support.variable.semantic.hlsl"},{foreground:"#BD87C9",token:"support.type.texture.hlsl"},{foreground:"#BD87C9",token:"support.type.sampler.hlsl"},{foreground:"#BD87C9",token:"support.type.object.hlsl"},{foreground:"#BD87C9",token:"support.type.object.rw.hlsl"},{foreground:"#BD87C9",token:"support.type.fx.hlsl"},{foreground:"#BD87C9",token:"support.type.object.hlsl"},{foreground:"#e06c75",token:"text.variable"},{foreground:"#e06c75",token:"text.bracketed"},{foreground:"#e5c07b",token:"support.type.swift"},{foreground:"#e5c07b",token:"support.type.vb.asp"},{foreground:"#e5c07b",token:"entity.name.function.xi"},{foreground:"#56b6c2",token:"entity.name.class.xi"},{foreground:"#e06c75",token:"constant.character.character-class.regexp.xi"},{foreground:"#BD87C9",token:"constant.regexp.xi"},{foreground:"#56b6c2",token:"keyword.control.xi"},{foreground:"#abb2bf",token:"invalid.xi"},{foreground:"#98c379",token:"beginning.punctuation.definition.quote.markdown.xi"},{foreground:"#7f848e",token:"beginning.punctuation.definition.list.markdown.xi"},{foreground:"#61afef",token:"constant.character.xi"},{foreground:"#61afef",token:"accent.xi"},{foreground:"#d19a66",token:"wikiword.xi"},{foreground:"#ffffff",token:"constant.other.color.rgb-value.xi"},{foreground:"#5c6370",token:"punctuation.definition.tag.xi"},{foreground:"#e5c07b",token:"entity.name.label.cs"},{foreground:"#e5c07b",token:"entity.name.scope-resolution.function.call"},{foreground:"#e5c07b",token:"entity.name.scope-resolution.function.definition"},{foreground:"#e06c75",token:"entity.name.label.cs"},{foreground:"#e06c75",token:"markup.heading.setext.1.markdown"},{foreground:"#e06c75",token:"markup.heading.setext.2.markdown"},{foreground:"#abb2bf",token:" meta.brace.square"},{foreground:"#7f848e",token:"comment"},{foreground:"#7f848e",token:" punctuation.definition.comment"},{foreground:"#5c6370",token:"markup.quote.markdown"},{foreground:"#abb2bf",token:"punctuation.definition.block.sequence.item.yaml"},{foreground:"#56b6c2",token:"constant.language.symbol.elixir"},{foreground:"#56b6c2",token:"constant.language.symbol.double-quoted.elixir"},{foreground:"#e5c07b",token:"entity.name.variable.parameter.cs"},{foreground:"#e06c75",token:"entity.name.variable.field.cs"},{foreground:"#e06c75",token:"markup.deleted"},{foreground:"#98c379",token:"markup.inserted"},{fontStyle:"underline",token:"markup.underline"},{foreground:"#BE5046",token:"punctuation.section.embedded.begin.php"},{foreground:"#BE5046",token:"punctuation.section.embedded.end.php"},{foreground:"#abb2bf",token:"support.other.namespace.php"},{foreground:"#e06c75",token:"variable.parameter.function.latex"},{foreground:"#e5c07b",token:"variable.other.object"},{foreground:"#e06c75",token:"variable.other.constant.property"},{foreground:"#e5c07b",token:"entity.other.inherited-class"},{foreground:"#e06c75",token:"variable.other.readwrite.c"},{foreground:"#abb2bf",token:"entity.name.variable.parameter.php"},{foreground:"#abb2bf",token:"punctuation.separator.colon.php"},{foreground:"#abb2bf",token:"constant.other.php"},{foreground:"#BD87C9",token:"constant.numeric.decimal.asm.x86_64"},{foreground:"#d19a66",token:"support.other.parenthesis.regexp"},{foreground:"#56b6c2",token:"constant.character.escape"},{foreground:"#e06c75",token:"string.regexp"},{foreground:"#98c379",token:"log.info"},{foreground:"#e5c07b",token:"log.warning"},{foreground:"#e06c75",token:"log.error"},{foreground:"#BD87C9",token:"keyword.operator.expression.is"},{foreground:"#e06c75",token:"entity.name.label"}],rIi=[],oIi={inherit:tIi,colors:nIi,rules:iIi,encodedTokensColors:rIi},Z7e=b.forwardRef(({value:t,schema:e,readOnly:n,ariaLabel:i,className:r,onChange:o,suggestions:s=[],theme:a="dark",language:l="json"},c)=>{const[u,d]=b.useState(null),h=b.useRef(null);return b.useEffect(()=>(h&&d(f=>{if(f)return f;e&&gB.json.jsonDefaults.setDiagnosticsOptions({validate:!0,allowComments:!1,schemas:[e]}),s.length&&gB.registerCompletionItemProvider(l,{provideCompletionItems:function(p,g){return p.getValueInRange({startLineNumber:g.lineNumber,startColumn:1,endLineNumber:g.lineNumber,endColumn:g.column}).trim().endsWith(".")?{suggestions:s.map(w=>({label:w,kind:gB.CompletionItemKind.Keyword,insertText:w,range:{startLineNumber:g.lineNumber,endLineNumber:g.lineNumber,startColumn:g.column,endColumn:g.column}}))}:{suggestions:[]}}}),a==="dark"&&V2e.defineTheme("OneDarkPro",{base:"vs-dark",...oIi});const m=V2e.create(h.current,{readOnly:n,language:l,ariaLabel:i,tabSize:4,fontSize:16,value:t,folding:!0,lineNumbers:"on",automaticLayout:!0,fontFamily:"Open Sans",minimap:{enabled:!1},theme:a==="dark"?"OneDarkPro":"OneLight"},l6t.parse("config.json"));return m.onDidChangeModelContent(()=>o&&o(m.getValue())),m}),()=>u==null?void 0:u.dispose()),[h.current]),b.useEffect(()=>{u&&u.updateOptions({readOnly:n})},[n,u]),b.useEffect(()=>{u&&t!==u.getValue()&&u.setValue(t||"")},[t,u]),b.useImperativeHandle(c,()=>({openSearch(){var f;u&&((f=u.getAction("actions.find"))==null||f.run())},fold(){var f;u&&((f=u.getAction("editor.foldAll"))==null||f.run())},unfold(){var f;u&&((f=u.getAction("editor.unfoldAll"))==null||f.run())}})),v.jsxDEV("div",{className:`h-full w-full ${r}`,ref:h},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MonacoEditor/index.tsx",lineNumber:169,columnNumber:10},void 0)});function sIi(t){var e,n;return!(!((e=t.startUrls)!=null&&e.length)&&!((n=t.sitemaps)!=null&&n.length))}function aIi({crawler:t}){const e=Mt(),n=Je.useUtils(),[i,r]=Pc(),[o,s]=Pc(),[a,l]=Pc(),c=Je.crawler.startCrawler.useMutation(),u=async()=>{try{await c.mutateAsync({id:t._id}),n.crawler.getById.invalidate(),In.show({color:"primary",title:e.formatMessage({id:"crawler_detail.header.start_crawler.succeeded.title",defaultMessage:"Starting your crawler"}),message:e.formatMessage({id:"crawler_detail.header.start_crawler.succeeded.description",defaultMessage:"We're getting your crawler up and running. This might take a few seconds."}),autoClose:1e4})}catch(h){const f=h;let m=e.formatMessage({id:"crawler_detail.header.start_crawler.failed.default_message",defaultMessage:"We cannot start your crawler at this time. Please try again or contact our support team."});f.message==="MISSING_START_POINT"&&(m=e.formatMessage({id:"crawler_detail.header.start_crawler.failed.missing_start_point",defaultMessage:"Crawler is missing a start url or sitemap."})),In.show({color:"red",title:e.formatMessage({id:"crawler_detail.header.start_crawler.failed.title",defaultMessage:"Crawler cannot be started"}),message:m,autoClose:1e4})}},d=sIi(t.config);return v.jsxDEV(un,{gap:"xs",wrap:"nowrap",children:[t.status==="created"&&v.jsxDEV(ir,{label:e.formatMessage({id:"crawler_detail.header.actions.start.tooltip",defaultMessage:"Crawler is missing a start url or sitemap."}),disabled:d,children:v.jsxDEV(Nn,{disabled:!d,onClick:u,loading:c.isLoading,leftSection:v.jsxDEV(YPt,{size:14},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:89,columnNumber:20},this),children:v.jsxDEV(ee,{id:"crawler_detail.header.actions.start",defaultMessage:"Start crawler"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:91,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:85,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:78,columnNumber:5},this),(t.status==="inProgress"||t.status==="initialize")&&v.jsxDEV(Nn,{variant:"light",leftSection:v.jsxDEV(GPt,{size:14},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:96,columnNumber:42},this),onClick:l.open,children:v.jsxDEV(ee,{id:"crawler_detail.header.actions.stop",defaultMessage:"Stop crawler"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:97,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:96,columnNumber:5},this),!["created","initialize","inProgress"].includes(t.status)&&v.jsxDEV(ir,{label:e.formatMessage({id:"crawler_detail.header.actions.start.tooltip",defaultMessage:"Crawler is missing a start url or sitemap."}),disabled:d,children:v.jsxDEV(Nn,{variant:"light",disabled:!d,onClick:u,loading:c.isLoading,leftSection:v.jsxDEV(XPt,{size:14},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:113,columnNumber:20},this),children:v.jsxDEV(ee,{id:"crawler_detail.header.actions.re-run",defaultMessage:"Re-run crawler"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:115,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:108,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:101,columnNumber:5},this),v.jsxDEV(Cu,{shadow:"md",children:[v.jsxDEV(Cu.Target,{children:v.jsxDEV(Fr,{variant:"subtle",size:"lg",children:v.jsxDEV(WPt,{size:14},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:122,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:121,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:120,columnNumber:5},this),v.jsxDEV(Cu.Dropdown,{children:[v.jsxDEV(Cu.Item,{leftSection:v.jsxDEV(HPt,{size:14},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:127,columnNumber:30},this),onClick:s.open,children:v.jsxDEV(ee,{id:"crawler_detail.header.actions.duplicate",defaultMessage:"Duplicate crawler"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:128,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:127,columnNumber:6},this),v.jsxDEV(Cu.Divider,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:133,columnNumber:6},this),v.jsxDEV(ir,{label:e.formatMessage({id:"crawler_detail.header.actions.delete.tooltip",defaultMessage:"Cannot delete when crawling"}),disabled:t.status!=="inProgress",children:v.jsxDEV(Cu.Item,{color:"red",disabled:t.status==="inProgress",leftSection:v.jsxDEV(Lw,{size:14},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:144,columnNumber:21},this),onClick:r.open,children:v.jsxDEV(ee,{id:"crawler_detail.header.actions.delete",defaultMessage:"Delete crawler"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:147,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:141,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:134,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:126,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:119,columnNumber:4},this),v.jsxDEV(yOt,{crawler:t,isOpen:o,onClose:s.close},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:155,columnNumber:4},this),v.jsxDEV(vOt,{crawler:t,isOpen:i,onClose:r.close},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:156,columnNumber:4},this),v.jsxDEV(_Ot,{crawler:t,isOpen:a,onClose:l.close},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:157,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/HeaderActions.tsx",lineNumber:76,columnNumber:3},this)}function PC({crawler:t,hideActions:e,className:n}){const i=Oi(ps);return v.jsxDEV(or,{className:`w-full ${n||""}`,children:v.jsxDEV(un,{justify:"space-between",className:"my-auto",wrap:"nowrap",children:[v.jsxDEV(Qe,{fw:600,size:"lg",truncate:"end",className:"w-full",children:t==null?void 0:t.name},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/index.tsx",lineNumber:19,columnNumber:5},this),t&&!e&&i&&v.jsxDEV(aIi,{crawler:t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/index.tsx",lineNumber:22,columnNumber:44},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/index.tsx",lineNumber:18,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerHeader/index.tsx",lineNumber:17,columnNumber:3},this)}const lIi=Ja.getAllCodes(),cIi={uri:"http://chathive.app/scheme/advanced-crawler",fileMatch:"config.json",schema:{type:"object",required:["schedule","concurrency","maxRetries","timeout","deleteRule"],properties:{schedule:{enum:["once","daily","workDays","weekly","monthly"]},executeAt:{type:"string"},startUrls:{type:"array",items:{type:"string"}},sitemaps:{type:"array",items:{type:"string"}},ignoreQueryParams:{type:"array",items:{type:"string"}},ignoreAllQueryParams:{type:"boolean"},extractUrls:{type:"boolean"},concurrency:{type:"number"},ignoreNoFollow:{type:"boolean"},maxDepth:{type:"number"},maxRetries:{type:"number"},maxUrls:{type:"number"},characterLimit:{type:"number"},delay:{type:["number","object"],properties:{min:{type:"number"},max:{type:"number"}}},timeout:{type:"number"},renderJavaScript:{type:"boolean"},pathsToMatch:{type:"string"},pathsToExclude:{type:"string"},headers:{type:"object"},credentials:{type:"object",required:["password","username"],properties:{password:{type:"string"},username:{type:"string"}}},proxy:{type:"string"},userAgent:{type:"string"},languages:{type:"object",required:["languages"],properties:{languages:{type:"array",items:{enum:lIi}},strict:{type:"boolean"}}},restoreDeletedPages:{type:"boolean"},disableNotifications:{type:"boolean"},ignoreRobots:{type:"boolean"},deleteRule:{enum:["delete","mark_as_deleted"]},htmlParser:{enum:["plain","smart"]},acceptCookieConsent:{type:"object",required:["selector"],properties:{selector:{type:"string"}}},localStorage:{type:"object"},sessionStorage:{type:"object"},cookies:{type:"array",items:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"},domain:{type:"string"}}}},advancedLogs:{type:"boolean"},labels:{type:["array","string"],items:{type:"string"}},projects:{type:["array","string"],items:{type:"string"}},Indices:{type:"string"},debug:{type:"boolean"},dryRun:{type:"boolean"}}}},uIi=Ja.getAllCodes(),gi={isRequired:{id:"crawler_detail.editor.default_errors.is_required",defaultMessage:"{field} is required"},expectedArray:{id:"crawler_detail.editor.default_errors.expected_array",defaultMessage:"{field} must be a array"},expectedBoolean:{id:"crawler_detail.editor.default_errors.expected_boolean",defaultMessage:"{field} must be either true or false"},expectedNumber:{id:"crawler_detail.editor.default_errors.expected_number",defaultMessage:"{field} must be a number"},expectedObject:{id:"crawler_detail.editor.default_errors.expected_object",defaultMessage:"{field} must be a object"},expectedString:{id:"crawler_detail.editor.default_errors.expected_string",defaultMessage:"{field} must be a string"},expectedStringArray:{id:"crawler_detail.editor.default_errors.expected_string_array",defaultMessage:"{field} must be a array of strings"},expectedAtLeast:{id:"crawler_detail.editor.default_errors.expected_at_least",defaultMessage:"{field} must be at least {min}"},expectedRange:{id:"crawler_detail.editor.default_errors.expected_range",defaultMessage:"{field} must be between {min} and {max}"},expectedUrl:{id:"crawler_detail.editor.default_errors.expected_url",defaultMessage:"{field} must contain one or more valid urls ex: https://chathive.co, http://chathive.co"},unknownEnumValue:{id:"crawler_detail.editor.default_errors.unknown_enum_value",defaultMessage:"{field} only supports one of the following values: {list}"}};function dIi(){const t=Mt(),e=Qr(),n=Je.useUtils(),i=Oi(ps),[r,o]=b.useState([]),[s,a]=b.useState([]),{crawlerId:l}=If(),{data:c}=Je.getOrganization.useQuery(void 0,{staleTime:36e5}),{data:u}=Je.crawler.getById.useQuery({id:l},{staleTime:1/0,enabled:!!l,refetchOnWindowFocus:!1}),d=Je.crawler.updateConfig.useMutation(),h=ls({validateInputOnBlur:!0,initialValues:{config:'{"$schema": "http://chathive.app/scheme/advanced-crawler" }'},validate:aa(gt.object({config:gt.string()}))}),f=gt.object({schedule:gt.enum(gwe,{required_error:t.formatMessage(gi.isRequired,{field:"Schedule"}),message:t.formatMessage(gi.unknownEnumValue,{field:"Schedule",list:t.formatList(gwe)})}),executeAt:gt.string({message:t.formatMessage(gi.expectedString,{field:"ExecuteAt"})}).regex(/^(0[1-9]|1[0-9]|2[0-3]|[1-9]):(0[1-9]|[1-5][0-9])$/,{message:t.formatMessage({id:"crawler_detail.editor.executeAt.error.invalid_formatted",defaultMessage:"ExecuteAt must be a time between 00:00 and 23:59 formatted as either H:m or HH:mm"})}).optional(),startUrls:gt.array(gt.string({message:t.formatMessage(gi.expectedStringArray,{field:"StartUrls"})}).url({message:t.formatMessage(gi.expectedUrl,{field:"StartUrls"})}),{message:t.formatMessage(gi.expectedStringArray,{field:"StartUrls"})}).optional(),sitemaps:gt.array(gt.string({message:t.formatMessage(gi.expectedStringArray,{field:"SiteMaps"})}).url({message:t.formatMessage(gi.expectedUrl,{field:"SiteMaps"})}),{message:t.formatMessage(gi.expectedStringArray,{field:"SiteMaps"})}).optional(),ignoreQueryParams:gt.array(gt.string({message:t.formatMessage(gi.expectedStringArray,{field:"IgnoreQueryParams"})}),{message:t.formatMessage(gi.expectedStringArray,{field:"IgnoreQueryParams"})}).optional(),ignoreAllQueryParams:gt.boolean({message:t.formatMessage(gi.expectedBoolean,{field:"IgnoreAllQueryParams"})}).optional(),extractUrls:gt.boolean({message:t.formatMessage(gi.expectedBoolean,{field:"ExtractUrls"})}).optional(),concurrency:gt.number({message:t.formatMessage(gi.expectedNumber,{field:"Concurrency"}),required_error:t.formatMessage(gi.isRequired,{field:"Concurrency"})}).min(1,{message:t.formatMessage(gi.expectedRange,{field:"Concurrency",min:0,max:5})}).max(5,{message:t.formatMessage(gi.expectedRange,{field:"Concurrency",min:0,max:5})}),ignoreNoFollow:gt.boolean({message:t.formatMessage(gi.expectedBoolean,{field:"IgnoreNoFollow"})}).optional(),maxDepth:gt.number({message:t.formatMessage(gi.expectedNumber,{field:"MaxDepth"})}).min(1,{message:t.formatMessage(gi.expectedAtLeast,{field:"MaxDepth",min:1})}).optional(),maxRetries:gt.number({message:t.formatMessage(gi.expectedNumber,{field:"MaxRetries"}),required_error:t.formatMessage(gi.isRequired,{field:"MaxRetries"})}).min(1,{message:t.formatMessage(gi.expectedRange,{field:"MaxDepth",min:1,max:8})}).max(8,{message:t.formatMessage(gi.expectedRange,{field:"MaxDepth",min:1,max:8})}),maxUrls:gt.number({message:t.formatMessage(gi.expectedNumber,{field:"MaxUrls"})}).min(1,{message:t.formatMessage(gi.expectedAtLeast,{field:"MaxUrls",min:1})}).optional(),characterLimit:gt.number({message:t.formatMessage(gi.expectedNumber,{field:"CharacterLimit"})}).min(500,{message:t.formatMessage(gi.expectedAtLeast,{field:"CharacterLimit",min:500})}).optional(),delay:gt.union([gt.number({message:t.formatMessage(gi.expectedNumber,{field:"Delay"})}),gt.object({min:gt.number({message:t.formatMessage(gi.expectedNumber,{field:"Delay min"})}),max:gt.number({message:t.formatMessage(gi.expectedNumber,{field:"Delay max"})})},{message:t.formatMessage(gi.expectedObject,{field:"Delay"})})],{message:t.formatMessage({id:"crawler_detail.editor.delay.error.union",defaultMessage:"Delay must be a number or object"})}),timeout:gt.number({message:t.formatMessage(gi.expectedNumber,{field:"Timeout"}),required_error:t.formatMessage(gi.isRequired,{field:"Timeout"})}).min(0,{message:t.formatMessage(gi.expectedRange,{field:"Timeout",min:0,max:"30 000"})}).max(3e4,{message:t.formatMessage(gi.expectedRange,{field:"Timeout",min:0,max:"30 000"})}),renderJavaScript:gt.boolean({message:t.formatMessage(gi.expectedBoolean,{field:"RenderJavaScript"})}).optional(),pathsToMatch:gt.string({message:t.formatMessage(gi.expectedString,{field:"PathsToMatch"})}).optional(),pathsToExclude:gt.string({message:t.formatMessage(gi.expectedString,{field:"PathsToExclude"})}).optional(),headers:gt.record(gt.string({message:t.formatMessage(gi.expectedString,{field:"Headers key"})}),gt.any(),{message:t.formatMessage(gi.expectedObject,{field:"Headers"})}).optional(),credentials:gt.object({username:gt.string({required_error:t.formatMessage(gi.isRequired,{field:"Username"}),message:t.formatMessage(gi.expectedString,{field:"Username"})}),password:gt.string({required_error:t.formatMessage(gi.isRequired,{field:"Password"}),message:t.formatMessage(gi.expectedString,{field:"Password"})})},{message:t.formatMessage(gi.expectedObject,{field:"Credentials"})}).optional(),proxy:gt.string({message:t.formatMessage(gi.expectedString,{field:"Proxy"})}).optional(),userAgent:gt.string({message:t.formatMessage(gi.expectedString,{field:"UserAgent"})}).optional(),languages:gt.object({languages:gt.array(gt.enum(uIi,{required_error:t.formatMessage(gi.isRequired,{field:"Languages"}),message:t.formatMessage({id:"crawler_detail.editor.languages.error.required",defaultMessage:"Languages must be a valid ISO 639-1 language code"})})),strict:gt.boolean({message:t.formatMessage(gi.expectedBoolean,{field:"Strict"})}).default(!1)},{message:t.formatMessage(gi.expectedObject,{field:"Languages"})}).optional(),restoreDeletedPages:gt.boolean({message:t.formatMessage(gi.expectedBoolean,{field:"RestoreDeletedPages"})}).optional(),disableNotifications:gt.boolean({message:t.formatMessage(gi.expectedBoolean,{field:"DisableNotifications"})}).optional(),ignoreRobots:gt.boolean({message:t.formatMessage(gi.expectedBoolean,{field:"IgnoreRobots"})}).optional(),htmlParser:gt.enum(yot,{required_error:t.formatMessage(gi.isRequired,{field:"HtmlParser"}),message:t.formatMessage(gi.unknownEnumValue,{field:"HtmlParser",list:t.formatList(yot)})}),deleteRule:gt.enum(_ot,{required_error:t.formatMessage(gi.isRequired,{field:"DeleteRule"}),message:t.formatMessage(gi.unknownEnumValue,{field:"DeleteRule",list:t.formatList(_ot)})}),acceptCookieConsent:gt.object({selector:gt.string({required_error:t.formatMessage(gi.isRequired,{field:"Selector"}),message:t.formatMessage(gi.expectedString,{field:"Selector"})})},{message:t.formatMessage(gi.expectedObject,{field:"AcceptCookieConsent"})}).optional(),localStorage:gt.record(gt.string({message:t.formatMessage(gi.expectedString,{field:"LocalStorage key"})}),gt.any(),{message:t.formatMessage(gi.expectedObject,{field:"LocalStorage"})}).optional(),sessionStorage:gt.record(gt.string({message:t.formatMessage(gi.expectedString,{field:"SessionStorage"})}),gt.any(),{message:t.formatMessage(gi.expectedObject,{field:"SessionStorage"})}).optional(),cookies:gt.array(gt.object({name:gt.string({required_error:t.formatMessage(gi.isRequired,{field:"Cookie.name"}),message:t.formatMessage(gi.expectedString,{field:"Cookie.name"})}),value:gt.string({required_error:t.formatMessage(gi.isRequired,{field:"Cookie.value"}),message:t.formatMessage(gi.expectedString,{field:"Cookie.value"})}),domain:gt.string({required_error:t.formatMessage(gi.isRequired,{field:"Cookie.domain"}),message:t.formatMessage(gi.expectedString,{field:"Cookie.domain"})})},{message:t.formatMessage(gi.expectedObject,{field:"Cookie"})})).optional(),advancedLogs:gt.boolean({message:t.formatMessage(gi.expectedBoolean,{field:"AdvancedLogs"})}).optional(),labels:gt.union([gt.string({message:t.formatMessage(gi.expectedString,{field:"Labels"})}),gt.array(gt.string({message:t.formatMessage(gi.expectedStringArray,{field:"Labels"})}),{message:t.formatMessage(gi.expectedStringArray,{field:"Labels"})})],{message:t.formatMessage({id:"crawler_detail.editor.labels.error.union",defaultMessage:"Labels must be a string or array of strings"})}).optional(),projects:gt.union([gt.string({message:t.formatMessage(gi.expectedString,{field:"Projects"})}),gt.array(gt.string({message:t.formatMessage(gi.expectedStringArray,{field:"Projects"})}),{message:t.formatMessage(gi.expectedStringArray,{field:"Projects"})})],{message:t.formatMessage({id:"crawler_detail.editor.projects.error.union",defaultMessage:"Projects must be a string or array of strings"})}).optional(),indices:gt.string({message:t.formatMessage(gi.expectedString,{field:"Indices"})}).optional(),debug:gt.boolean({message:t.formatMessage(gi.expectedBoolean,{field:"Debug"})}).optional(),dryRun:gt.boolean({message:t.formatMessage(gi.expectedBoolean,{field:"DryRun"})}).optional()}).refine(y=>{var _,w;return((_=y.startUrls)==null?void 0:_.length)||((w=y.sitemaps)==null?void 0:w.length)},{message:t.formatMessage({id:"crawler_detail.editor.missing_urls.error",defaultMessage:"StartUrls or sitemaps is required"})});ga(t.formatMessage({id:"crawler_detail.editor.title",defaultMessage:"Crawler editor - Chathive"})),b.useEffect(()=>{if(!u)return;const y={...u.config,$schema:"http://chathive.app/scheme/advanced-crawler"},_=JSON.stringify(y,null,2);h.setValues({config:_}),h.setInitialValues({config:_})},[u]),b.useEffect(()=>{var y;if(c)try{const _=JSON.parse(h.values.config);let w=[];if(gwe.includes(_.schedule)&&!((y=c.permissions.reCrawlIntervals)!=null&&y.includes(_.schedule))&&w.push(`schedule: ${_.schedule}`),w===s)return;a(w)}catch{}},[h.values]);const m=async()=>{try{const y=JSON.parse(h.values.config);delete y.$schema;const _=f.safeParse(y);if(!_.success){o(_.error.errors.map(w=>w.message));return}o([]),await d.mutateAsync({id:l,config:y}),h.setInitialValues(h.values),h.reset(),n.crawler.getById.invalidate(),In.show({color:"green",message:t.formatMessage({id:"crawler_detail.editor.update.notification.succeeded",defaultMessage:"Crawler config has been updated"}),autoClose:5e3})}catch(y){const _=y;if(console.error("Failed to update crawler config",_),_.message==="IN_PROGRESS"){In.show({color:"red",title:t.formatMessage({id:"crawler_detail.editor.update.notification.failed.in_progress.title",defaultMessage:"Crawler is in progress"}),message:t.formatMessage({id:"crawler_detail.editor.update.notification.failed.in_progress.message",defaultMessage:"Crawler cannot be update when it is in progress"}),autoClose:1e4});return}if(_.message==="DELETED"){In.show({color:"red",title:t.formatMessage({id:"crawler_detail.editor.update.notification.failed.deleted.title",defaultMessage:"Crawler has been deleted"}),message:t.formatMessage({id:"crawler_detail.editor.update.notification.failed.deleted.message",defaultMessage:"Crawler has been deleted and cannot be updated anymore"}),autoClose:1e4});return}In.show({color:"red",title:t.formatMessage({id:"crawler_detail.editor.update.notification.failed.title",defaultMessage:"Crawler config could not be updated"}),message:t.formatMessage({id:"crawler_detail.editor.update.notification.failed.message",defaultMessage:"We cannot update your crawlers config at this time. Check if you didn't make a configuration mistake and try again."}),autoClose:1e4})}},p=(u==null?void 0:u.status)==="initialize"||(u==null?void 0:u.status)==="inProgress",g=!h.isDirty()||!h.isValid()||p||!!s.length;return v.jsxDEV("main",{className:"w-full h-full max-w-4xl sm:p-4",children:v.jsxDEV(Gt,{gap:"sm",className:"h-full",children:[v.jsxDEV(PC,{crawler:u,className:"min-h-[72px]"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:562,columnNumber:5},this),v.jsxDEV("form",{className:"h-full",onSubmit:h.onSubmit(m),children:v.jsxDEV(or,{className:"h-full",children:[v.jsxDEV(Gt,{gap:"sm",children:[v.jsxDEV(un,{justify:"space-between",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"crawler_detail.editor.header.breadcrumb.editor",defaultMessage:"Crawler config"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:568,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:567,columnNumber:9},this),v.jsxDEV(un,{gap:"sm",children:v.jsxDEV(Nn,{size:"xs",component:"a",variant:"light",target:"_blank",href:lq.crawler,children:v.jsxDEV(ee,{id:"crawler_detail.editor.header.Documentation",defaultMessage:"Documentation"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:581,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:574,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:573,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:566,columnNumber:8},this),v.jsxDEV(Qe,{size:"sm",className:"max-w-prose",children:v.jsxDEV(ee,{id:"crawler_detail.editor.header.description",defaultMessage:"Edit your crawler configuration, such as, which URLs to crawl, how to interact with them and what to do and not to do.",values:{date:u?v.jsxDEV(z0,{value:u.updatedAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:592,columnNumber:36},this):""}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:589,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:588,columnNumber:8},this),s.length>0&&v.jsxDEV(Yo,{variant:"light",color:"blue",children:v.jsxDEV("div",{className:"w-full flex flex-col gap-2 justify-between md:flex-row md:items-center",children:[v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"crawler_detail.editor.banner.upgrade.description",defaultMessage:"{lockedConfig} {totalLocked, plural, =1 {is} other {are}} only available in a higher tier.",values:{lockedConfig:t.formatList(s),totalLocked:s.length}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:599,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:598,columnNumber:11},this),v.jsxDEV(Nn,{size:"xs",className:"min-w-fit",onClick:()=>e("/billing"),children:v.jsxDEV(ee,{id:"crawler_detail.editor.banner.upgrade.button",defaultMessage:"Upgrade my plan"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:609,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:608,columnNumber:11},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:597,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:596,columnNumber:9},this),r.length>0&&v.jsxDEV(Yo,{variant:"light",color:"red",className:"min-h-fit",icon:v.jsxDEV(ud,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:618,columnNumber:72},this),children:v.jsxDEV(mm,{className:r.length>1?"list-disc":"",children:r.map(y=>v.jsxDEV(mm.Item,{children:y},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:621,columnNumber:12},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:619,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:618,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:565,columnNumber:7},this),v.jsxDEV(or.Section,{className:"h-full mt-2",children:v.jsxDEV(Gt,{gap:0,className:"h-full",children:[p&&v.jsxDEV(Yo,{p:8,variant:"filled",icon:v.jsxDEV($p,{color:"white",size:"xs"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:633,columnNumber:17},this),className:"!absolute top-2 left-1/2 -translate-x-1/2 w-fit mx-auto z-50 [&>.mantine-Alert-wrapper>.mantine-Alert-icon]:!me-2",children:v.jsxDEV(ee,{id:"crawler_detail.editor.banner.in_progress",defaultMessage:"Crawler is in progress, configuration cannot be changed"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:636,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:630,columnNumber:10},this),v.jsxDEV(Z7e,{...h.getInputProps("config"),schema:cIi,readOnly:p||!i,className:"rounded-md h-full overflow-hidden",ariaLabel:t.formatMessage({id:"crawler_detail.editor.aria_label",defaultMessage:"Crawler config editor"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:642,columnNumber:9},this),v.jsxDEV("footer",{className:Vt("w-full flex flex-col p-2 gap-2","sm:flex-row justify-between sm:p-4"),children:[v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV(zPt,{stroke:1,size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:659,columnNumber:11},this),v.jsxDEV(Qe,{size:"sm",c:"gray",children:v.jsxDEV(ee,{id:"crawler_detail.editor.header.last_updated",defaultMessage:"Last updated {date}",values:{date:u?v.jsxDEV(z0,{value:u.updatedAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:664,columnNumber:39},this):""}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:661,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:660,columnNumber:11},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:658,columnNumber:10},this),i&&v.jsxDEV(un,{justify:"flex-end",gap:"xs",children:[v.jsxDEV(Nn,{disabled:!h.isDirty(),variant:"outline",size:"xs",onClick:h.reset,children:v.jsxDEV(ee,{id:"crawler_detail.editor.discard",defaultMessage:"Discard changes"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:676,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:670,columnNumber:12},this),v.jsxDEV(Nn,{size:"xs",type:"submit",loading:d.isLoading,disabled:g,children:v.jsxDEV(ee,{id:"crawler_detail.editor.submit",defaultMessage:"Update crawler"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:687,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:681,columnNumber:12},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:669,columnNumber:11},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:652,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:628,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:627,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:564,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:563,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:561,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerEditor/index.tsx",lineNumber:560,columnNumber:3},this)}function c6t(){const t=Mt(),e=Qr();return v.jsxDEV(or,{className:"w-full",p:48,children:v.jsxDEV(Zd,{title:t.formatMessage({id:"crawler_detail.empty.title",defaultMessage:"The crawler is still snoozing"}),description:t.formatMessage({id:"crawler_detail.empty.description",defaultMessage:"Head over to the editor, tweak those configurations, and give it a nudge to get started. Let's wake it up and get crawling! 🚀"}),src:"/img/svg/start_crawler.svg",children:v.jsxDEV(Nn,{size:"sm",variant:"light",onClick:()=>e("../editor"),children:v.jsxDEV(ee,{id:"crawler_detail.empty.button",defaultMessage:"Fine-tune configuration"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/components/EmptyCrawler.tsx",lineNumber:26,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/components/EmptyCrawler.tsx",lineNumber:25,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/components/EmptyCrawler.tsx",lineNumber:13,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/components/EmptyCrawler.tsx",lineNumber:12,columnNumber:3},this)}function hIi({averageStats:t,total:e,totalStats:n,className:i}){return v.jsxDEV(or,{className:Vt("w-full h-full",i),children:v.jsxDEV(IK,{cols:{xs:2,sm:2,md:2,lg:4},className:"my-auto",children:[v.jsxDEV(Gt,{gap:1,children:[v.jsxDEV(Qe,{c:"dimmed",size:"sm",children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.stats.duration.label",defaultMessage:"Average duration"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:20,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:19,columnNumber:6},this),v.jsxDEV(Qe,{children:CPt(t.duration)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:25,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:18,columnNumber:5},this),v.jsxDEV(Gt,{gap:1,children:[v.jsxDEV(Qe,{c:"dimmed",size:"sm",children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.stats.total.label",defaultMessage:"Total executions"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:29,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:28,columnNumber:6},this),v.jsxDEV(Qe,{children:v.jsxDEV(Qb,{value:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:35,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:34,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:27,columnNumber:5},this),v.jsxDEV(Gt,{gap:1,children:[v.jsxDEV(Qe,{c:"dimmed",size:"sm",children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.stats.total_crawled_tokens.label",defaultMessage:"Average crawled tokens"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:40,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:39,columnNumber:6},this),v.jsxDEV(Qe,{children:v.jsxDEV(Qb,{value:t.totalCrawled},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:46,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:45,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:38,columnNumber:5},this),v.jsxDEV(Gt,{gap:1,children:[v.jsxDEV(Qe,{c:"dimmed",size:"sm",children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.stats.errors.label",defaultMessage:"Total errors"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:51,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:50,columnNumber:6},this),v.jsxDEV(Qe,{children:v.jsxDEV(Qb,{value:n.totalFailed},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:57,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:56,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:49,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:17,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/AverageStats.tsx",lineNumber:16,columnNumber:3},this)}function fIi({crawler:t,className:e}){var i,r,o,s,a;const n=(i=t==null?void 0:t.user)!=null&&i.firstName||(r=t==null?void 0:t.user)!=null&&r.lastName?[(o=t==null?void 0:t.user)==null?void 0:o.firstName,(s=t==null?void 0:t.user)==null?void 0:s.lastName].join(" ").trim():(a=t==null?void 0:t.user)==null?void 0:a.email;return v.jsxDEV(or,{className:Vt("w-full h-full",e),children:v.jsxDEV(Gt,{children:[v.jsxDEV(un,{gap:"sm",children:[v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.info.status.label",defaultMessage:"Status:"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:23,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:22,columnNumber:6},this),v.jsxDEV(jc,{color:xOt[t.status],variant:"light",children:v.jsxDEV(ee,{...cMe[t.status]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:26,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:25,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:21,columnNumber:5},this),v.jsxDEV(un,{gap:"sm",children:[v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.info.created_at.label",defaultMessage:"Created at:"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:31,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:30,columnNumber:6},this),v.jsxDEV(Qe,{children:v.jsxDEV(tu,{value:t.createdAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:37,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:36,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:29,columnNumber:5},this),v.jsxDEV(un,{gap:"sm",children:[v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.info.created_by.label",defaultMessage:"Created by:"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:42,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:41,columnNumber:6},this),v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV(IS,{name:n,size:"sm",color:"primary"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:48,columnNumber:7},this),v.jsxDEV(Qe,{children:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:49,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:47,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:40,columnNumber:5},this),v.jsxDEV(IK,{cols:{base:1,sm:2,md:1,lg:2},children:[t.stoppedAt&&v.jsxDEV(un,{gap:"sm",children:[v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.info.stopped_at.label",defaultMessage:"Stopped at:"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:56,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:55,columnNumber:8},this),v.jsxDEV(Qe,{children:v.jsxDEV(tu,{value:t.stoppedAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:62,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:61,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:54,columnNumber:7},this),t.deletedAt&&v.jsxDEV(un,{gap:"sm",children:[v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.info.deleted_at.label",defaultMessage:"Deleted at:"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:69,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:68,columnNumber:8},this),v.jsxDEV(Qe,{children:v.jsxDEV(tu,{value:t.deletedAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:75,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:74,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:67,columnNumber:7},this),t.finishedAt&&v.jsxDEV(un,{gap:"sm",children:[v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.info.finished_at.label",defaultMessage:"Finished at:"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:82,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:81,columnNumber:8},this),v.jsxDEV(Qe,{children:v.jsxDEV(tu,{value:t.finishedAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:88,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:87,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:80,columnNumber:7},this),t.nextExecution&&!t.deletedAt&&!t.stoppedAt&&v.jsxDEV(un,{gap:"sm",children:[v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.info.next_execution.label",defaultMessage:"Next execution:"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:95,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:94,columnNumber:8},this),v.jsxDEV(Qe,{children:v.jsxDEV(tu,{value:t.nextExecution},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:101,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:100,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:93,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:52,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:20,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/CrawlerDetail.tsx",lineNumber:19,columnNumber:3},this)}function mIi({LastLog:t,className:e}){var n,i,r,o,s,a,l;if(t)return v.jsxDEV(or,{className:Vt("w-full h-full",e),children:v.jsxDEV(Gt,{gap:"sm",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.last_log_stats.title",defaultMessage:"Last crawl"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:18,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:17,columnNumber:5},this),v.jsxDEV(IK,{cols:{xs:2,sm:2,md:4,lg:7},children:[v.jsxDEV(Gt,{gap:1,children:[v.jsxDEV(Qe,{c:"dimmed",size:"sm",children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.last_log_stats.total.label",defaultMessage:"Total documents crawled"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:23,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:22,columnNumber:7},this),v.jsxDEV(Qe,{children:v.jsxDEV(Qb,{value:((n=t==null?void 0:t.stats)==null?void 0:n.totalCrawled)||0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:29,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:28,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:21,columnNumber:6},this),v.jsxDEV(Gt,{gap:1,children:[v.jsxDEV(Qe,{c:"dimmed",size:"sm",children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.last_log_stats.new.label",defaultMessage:"New documents"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:34,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:33,columnNumber:7},this),v.jsxDEV(Qe,{children:v.jsxDEV(Qb,{value:((i=t==null?void 0:t.stats)==null?void 0:i.totalNew)||0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:40,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:39,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:32,columnNumber:6},this),v.jsxDEV(Gt,{gap:1,children:[v.jsxDEV(Qe,{c:"dimmed",size:"sm",children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.last_log_stats.updated.label",defaultMessage:"Updated documents"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:45,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:44,columnNumber:7},this),v.jsxDEV(Qe,{children:v.jsxDEV(Qb,{value:((r=t==null?void 0:t.stats)==null?void 0:r.totalUpdated)||0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:51,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:50,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:43,columnNumber:6},this),v.jsxDEV(Gt,{gap:1,children:[v.jsxDEV(Qe,{c:"dimmed",size:"sm",children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.last_log_stats.deleted.label",defaultMessage:"Deleted documents"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:56,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:55,columnNumber:7},this),v.jsxDEV(Qe,{children:v.jsxDEV(Qb,{value:((o=t==null?void 0:t.stats)==null?void 0:o.totalDeleted)||0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:62,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:61,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:54,columnNumber:6},this),v.jsxDEV(Gt,{gap:1,children:[v.jsxDEV(Qe,{c:"dimmed",size:"sm",children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.last_log_stats.unchanged.label",defaultMessage:"Unchanged documents"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:67,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:66,columnNumber:7},this),v.jsxDEV(Qe,{children:v.jsxDEV(Qb,{value:((s=t==null?void 0:t.stats)==null?void 0:s.totalUnchanged)||0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:73,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:72,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:65,columnNumber:6},this),v.jsxDEV(Gt,{gap:1,children:[v.jsxDEV(Qe,{c:"dimmed",size:"sm",children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.last_log_stats.ignored.label",defaultMessage:"Ignored documents"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:78,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:77,columnNumber:7},this),v.jsxDEV(Qe,{children:v.jsxDEV(Qb,{value:((a=t==null?void 0:t.stats)==null?void 0:a.totalIgnored)||0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:84,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:83,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:76,columnNumber:6},this),v.jsxDEV(Gt,{gap:1,children:[v.jsxDEV(Qe,{c:"dimmed",size:"sm",children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.last_log_stats.failed.label",defaultMessage:"Failed documents"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:89,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:88,columnNumber:7},this),v.jsxDEV(Qe,{children:v.jsxDEV(Qb,{value:((l=t==null?void 0:t.stats)==null?void 0:l.totalFailed)||0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:95,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:94,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:87,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:20,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:16,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LastLogStats.tsx",lineNumber:15,columnNumber:3},this)}function u6t(t){return t?t.reduce((e,n)=>{const i=n.name.search(/\./);if(i>=0){const r=n.name.substring(i+1);return e[r]=n.label,e}return e[n.name]=n.label,e},{}):{}}var pIi={tooltip:"m_e4d36c9b",tooltipLabel:"m_7f4bcb19",tooltipBody:"m_3de554dd",tooltipItem:"m_3de8964e",tooltipItemColor:"m_b30369b5",tooltipItemBody:"m_50186d10",tooltipItemName:"m_501dadf9",tooltipItemData:"m_50192318"};function gIi(t){return t.map(e=>{if(!e.payload||e.payload[e.name])return e;const n=e.name.search(/\./);if(n>=0){const i=e.name.substring(0,n),r={...e.payload[i]},o=Object.entries(e.payload).reduce((s,a)=>{const[l,c]=a;return l===i?s:{...s,[l]:c}},{});return{...e,name:e.name.substring(n+1),payload:{...o,...r}}}return e})}function bIi(t,e){const n=gIi(t.filter(i=>i.fill!=="none"||!i.color));return e?n.filter(i=>i.name===e):n}function iut(t,e){return e==="radial"||e==="scatter"?Array.isArray(t.value)?t.value[1]-t.value[0]:t.value:Array.isArray(t.payload[t.dataKey])?t.payload[t.dataKey][1]-t.payload[t.dataKey][0]:t.payload[t.name]}const vIi={type:"area",showColor:!0},d6t=Dn((t,e)=>{var T,A;const n=Kt("ChartTooltip",vIi,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,payload:c,label:u,unit:d,type:h,segmentId:f,mod:m,series:p,valueFormatter:g,showColor:y,..._}=n,w=zc(),C=hi({name:"ChartTooltip",classes:pIi,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a});if(!c)return null;const N=bIi(c,f),E=h==="scatter"?(A=(T=c[0])==null?void 0:T.payload)==null?void 0:A.name:null,D=u6t(p),k=u||E,M=N.map(R=>ne.jsxs("div",{"data-type":h,...C("tooltipItem"),children:[ne.jsxs("div",{...C("tooltipItemBody"),children:[y&&ne.jsx(RA,{color:Xa(R.color,w),size:12,...C("tooltipItemColor"),withShadow:!1}),ne.jsx("div",{...C("tooltipItemName"),children:D[R.name]||R.name})]}),ne.jsxs("div",{...C("tooltipItemData"),children:[typeof g=="function"?g(iut(R,h)):iut(R,h),d||R.unit]})]},(R==null?void 0:R.key)??R.name));return ne.jsxs(mn,{...C("tooltip"),mod:[{type:h},m],ref:e,..._,children:[k&&ne.jsx("div",{...C("tooltipLabel"),children:k}),ne.jsx("div",{...C("tooltipBody"),children:M})]})});d6t.displayName="@mantine/charts/ChartTooltip";var yIi={legend:"m_847eaf",legendItem:"m_17da7e62",legendItemColor:"m_6e236e21",legendItemName:"m_8ff56c0d"};function _Ii(t){return t.map(e=>{const n=e.dataKey.split(".").pop();return{...e,dataKey:n,payload:{...e.payload,name:n,dataKey:n}}})}function xIi(t){return _Ii(t.filter(e=>e.color!=="none"))}const wIi={},h6t=Dn((t,e)=>{const n=Kt("ChartLegend",wIi,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,payload:c,onHighlight:u,legendPosition:d,mod:h,series:f,showColor:m,centered:p,...g}=n,y=hi({name:"ChartLegend",classes:yIi,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a});if(!c)return null;const _=xIi(c),w=u6t(f),C=_.map((N,E)=>ne.jsxs("div",{...y("legendItem"),onMouseEnter:()=>u(N.dataKey),onMouseLeave:()=>u(null),"data-without-color":m===!1||void 0,children:[ne.jsx(RA,{color:N.color,size:12,...y("legendItemColor"),withShadow:!1}),ne.jsx("p",{...y("legendItemName"),children:w[N.dataKey]||N.dataKey})]},E));return ne.jsx(mn,{ref:e,mod:[{position:d,centered:p},h],...y("legend"),...g,children:C})});h6t.displayName="@mantine/charts/ChartLegend";var CIi=Array.isArray,rg=CIi,SIi=typeof Bl=="object"&&Bl&&Bl.Object===Object&&Bl,f6t=SIi,NIi=f6t,EIi=typeof self=="object"&&self&&self.Object===Object&&self,DIi=NIi||EIi||Function("return this")(),jw=DIi,kIi=jw,MIi=kIi.Symbol,Wq=MIi,rut=Wq,m6t=Object.prototype,LIi=m6t.hasOwnProperty,TIi=m6t.toString,o7=rut?rut.toStringTag:void 0;function IIi(t){var e=LIi.call(t,o7),n=t[o7];try{t[o7]=void 0;var i=!0}catch{}var r=TIi.call(t);return i&&(e?t[o7]=n:delete t[o7]),r}var AIi=IIi,RIi=Object.prototype,PIi=RIi.toString;function OIi(t){return PIi.call(t)}var jIi=OIi,out=Wq,FIi=AIi,$Ii=jIi,VIi="[object Null]",BIi="[object Undefined]",sut=out?out.toStringTag:void 0;function zIi(t){return t==null?t===void 0?BIi:VIi:sut&&sut in Object(t)?FIi(t):$Ii(t)}var XS=zIi;function HIi(t){return t!=null&&typeof t=="object"}var ZS=HIi,WIi=XS,UIi=ZS,KIi="[object Symbol]";function qIi(t){return typeof t=="symbol"||UIi(t)&&WIi(t)==KIi}var U6=qIi,GIi=rg,YIi=U6,XIi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ZIi=/^\w*$/;function QIi(t,e){if(GIi(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||YIi(t)?!0:ZIi.test(t)||!XIi.test(t)||e!=null&&t in Object(e)}var Q7e=QIi;function JIi(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var cM=JIi;const K6=ao(cM);var e2i=XS,t2i=cM,n2i="[object AsyncFunction]",i2i="[object Function]",r2i="[object GeneratorFunction]",o2i="[object Proxy]";function s2i(t){if(!t2i(t))return!1;var e=e2i(t);return e==i2i||e==r2i||e==n2i||e==o2i}var J7e=s2i;const $o=ao(J7e);var a2i=jw,l2i=a2i["__core-js_shared__"],c2i=l2i,K1e=c2i,aut=function(){var t=/[^.]+$/.exec(K1e&&K1e.keys&&K1e.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function u2i(t){return!!aut&&aut in t}var d2i=u2i,h2i=Function.prototype,f2i=h2i.toString;function m2i(t){if(t!=null){try{return f2i.call(t)}catch{}try{return t+""}catch{}}return""}var p6t=m2i,p2i=J7e,g2i=d2i,b2i=cM,v2i=p6t,y2i=/[\\^$.*+?()[\]{}|]/g,_2i=/^\[object .+?Constructor\]$/,x2i=Function.prototype,w2i=Object.prototype,C2i=x2i.toString,S2i=w2i.hasOwnProperty,N2i=RegExp("^"+C2i.call(S2i).replace(y2i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function E2i(t){if(!b2i(t)||g2i(t))return!1;var e=p2i(t)?N2i:_2i;return e.test(v2i(t))}var D2i=E2i;function k2i(t,e){return t==null?void 0:t[e]}var M2i=k2i,L2i=D2i,T2i=M2i;function I2i(t,e){var n=T2i(t,e);return L2i(n)?n:void 0}var aR=I2i,A2i=aR,R2i=A2i(Object,"create"),Ame=R2i,lut=Ame;function P2i(){this.__data__=lut?lut(null):{},this.size=0}var O2i=P2i;function j2i(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var F2i=j2i,$2i=Ame,V2i="__lodash_hash_undefined__",B2i=Object.prototype,z2i=B2i.hasOwnProperty;function H2i(t){var e=this.__data__;if($2i){var n=e[t];return n===V2i?void 0:n}return z2i.call(e,t)?e[t]:void 0}var W2i=H2i,U2i=Ame,K2i=Object.prototype,q2i=K2i.hasOwnProperty;function G2i(t){var e=this.__data__;return U2i?e[t]!==void 0:q2i.call(e,t)}var Y2i=G2i,X2i=Ame,Z2i="__lodash_hash_undefined__";function Q2i(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=X2i&&e===void 0?Z2i:e,this}var J2i=Q2i,eAi=O2i,tAi=F2i,nAi=W2i,iAi=Y2i,rAi=J2i;function q6(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}q6.prototype.clear=eAi;q6.prototype.delete=tAi;q6.prototype.get=nAi;q6.prototype.has=iAi;q6.prototype.set=rAi;var oAi=q6;function sAi(){this.__data__=[],this.size=0}var aAi=sAi;function lAi(t,e){return t===e||t!==t&&e!==e}var e9e=lAi,cAi=e9e;function uAi(t,e){for(var n=t.length;n--;)if(cAi(t[n][0],e))return n;return-1}var Rme=uAi,dAi=Rme,hAi=Array.prototype,fAi=hAi.splice;function mAi(t){var e=this.__data__,n=dAi(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():fAi.call(e,n,1),--this.size,!0}var pAi=mAi,gAi=Rme;function bAi(t){var e=this.__data__,n=gAi(e,t);return n<0?void 0:e[n][1]}var vAi=bAi,yAi=Rme;function _Ai(t){return yAi(this.__data__,t)>-1}var xAi=_Ai,wAi=Rme;function CAi(t,e){var n=this.__data__,i=wAi(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}var SAi=CAi,NAi=aAi,EAi=pAi,DAi=vAi,kAi=xAi,MAi=SAi;function G6(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}G6.prototype.clear=NAi;G6.prototype.delete=EAi;G6.prototype.get=DAi;G6.prototype.has=kAi;G6.prototype.set=MAi;var Pme=G6,LAi=aR,TAi=jw,IAi=LAi(TAi,"Map"),t9e=IAi,cut=oAi,AAi=Pme,RAi=t9e;function PAi(){this.size=0,this.__data__={hash:new cut,map:new(RAi||AAi),string:new cut}}var OAi=PAi;function jAi(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var FAi=jAi,$Ai=FAi;function VAi(t,e){var n=t.__data__;return $Ai(e)?n[typeof e=="string"?"string":"hash"]:n.map}var Ome=VAi,BAi=Ome;function zAi(t){var e=BAi(this,t).delete(t);return this.size-=e?1:0,e}var HAi=zAi,WAi=Ome;function UAi(t){return WAi(this,t).get(t)}var KAi=UAi,qAi=Ome;function GAi(t){return qAi(this,t).has(t)}var YAi=GAi,XAi=Ome;function ZAi(t,e){var n=XAi(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}var QAi=ZAi,JAi=OAi,eRi=HAi,tRi=KAi,nRi=YAi,iRi=QAi;function Y6(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}Y6.prototype.clear=JAi;Y6.prototype.delete=eRi;Y6.prototype.get=tRi;Y6.prototype.has=nRi;Y6.prototype.set=iRi;var n9e=Y6,g6t=n9e,rRi="Expected a function";function i9e(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(rRi);var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=t.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(i9e.Cache||g6t),n}i9e.Cache=g6t;var b6t=i9e;const oRi=ao(b6t);var sRi=b6t,aRi=500;function lRi(t){var e=sRi(t,function(i){return n.size===aRi&&n.clear(),i}),n=e.cache;return e}var cRi=lRi,uRi=cRi,dRi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hRi=/\\(\\)?/g,fRi=uRi(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(dRi,function(n,i,r,o){e.push(r?o.replace(hRi,"$1"):i||n)}),e}),mRi=fRi;function pRi(t,e){for(var n=-1,i=t==null?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r}var r9e=pRi,uut=Wq,gRi=r9e,bRi=rg,vRi=U6,yRi=1/0,dut=uut?uut.prototype:void 0,hut=dut?dut.toString:void 0;function v6t(t){if(typeof t=="string")return t;if(bRi(t))return gRi(t,v6t)+"";if(vRi(t))return hut?hut.call(t):"";var e=t+"";return e=="0"&&1/t==-yRi?"-0":e}var _Ri=v6t,xRi=_Ri;function wRi(t){return t==null?"":xRi(t)}var y6t=wRi,CRi=rg,SRi=Q7e,NRi=mRi,ERi=y6t;function DRi(t,e){return CRi(t)?t:SRi(t,e)?[t]:NRi(ERi(t))}var _6t=DRi,kRi=U6,MRi=1/0;function LRi(t){if(typeof t=="string"||kRi(t))return t;var e=t+"";return e=="0"&&1/t==-MRi?"-0":e}var jme=LRi,TRi=_6t,IRi=jme;function ARi(t,e){e=TRi(e,t);for(var n=0,i=e.length;t!=null&&n<i;)t=t[IRi(e[n++])];return n&&n==i?t:void 0}var o9e=ARi,RRi=o9e;function PRi(t,e,n){var i=t==null?void 0:RRi(t,e);return i===void 0?n:i}var x6t=PRi;const _v=ao(x6t);function ORi(t){return t==null}var jRi=ORi;const So=ao(jRi);var FRi=XS,$Ri=rg,VRi=ZS,BRi="[object String]";function zRi(t){return typeof t=="string"||!$Ri(t)&&VRi(t)&&FRi(t)==BRi}var HRi=zRi;const Uq=ao(HRi);var WRi=XS,URi=ZS,KRi="[object Number]";function qRi(t){return typeof t=="number"||URi(t)&&WRi(t)==KRi}var w6t=qRi;const GRi=ao(w6t);var YRi=w6t;function XRi(t){return YRi(t)&&t!=+t}var ZRi=XRi;const X6=ao(ZRi);var c0=function(e){return e===0?0:e>0?1:-1},BT=function(e){return Uq(e)&&e.indexOf("%")===e.length-1},ui=function(e){return GRi(e)&&!X6(e)},dd=function(e){return ui(e)||Uq(e)},QRi=0,lR=function(e){var n=++QRi;return"".concat(e||"").concat(n)},nA=function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ui(e)&&!Uq(e))return i;var o;if(BT(e)){var s=e.indexOf("%");o=n*parseFloat(e.slice(0,s))/100}else o=+e;return X6(o)&&(o=i),r&&o>n&&(o=n),o},kE=function(e){if(!e)return null;var n=Object.keys(e);return n&&n.length?e[n[0]]:null},JRi=function(e){if(!Array.isArray(e))return!1;for(var n=e.length,i={},r=0;r<n;r++)if(!i[e[r]])i[e[r]]=!0;else return!0;return!1},eu=function(e,n){return ui(e)&&ui(n)?function(i){return e+i*(n-e)}:function(){return n}};function koe(t,e,n){return!t||!t.length?null:t.find(function(i){return i&&(typeof e=="function"?e(i):_v(i,e))===n})}var ePi=function(e){if(!e||!e.length)return null;for(var n=e.length,i=0,r=0,o=0,s=0,a=1/0,l=-1/0,c=0,u=0,d=0;d<n;d++)c=e[d].cx||0,u=e[d].cy||0,i+=c,r+=u,o+=c*u,s+=c*c,a=Math.min(a,c),l=Math.max(l,c);var h=n*s!==i*i?(n*o-i*r)/(n*s-i*i):0;return{xmin:a,xmax:l,a:h,b:(r-h*i)/n}};function F3(t,e){for(var n in t)if({}.hasOwnProperty.call(t,n)&&(!{}.hasOwnProperty.call(e,n)||t[n]!==e[n]))return!1;for(var i in e)if({}.hasOwnProperty.call(e,i)&&!{}.hasOwnProperty.call(t,i))return!1;return!0}function B2e(t){"@babel/helpers - typeof";return B2e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B2e(t)}var tPi=["viewBox","children"],nPi=["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"],fut=["points","pathLength"],q1e={svg:tPi,polygon:fut,polyline:fut},s9e=["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"],Moe=function(e,n){if(!e||typeof e=="function"||typeof e=="boolean")return null;var i=e;if(b.isValidElement(e)&&(i=e.props),!K6(i))return null;var r={};return Object.keys(i).forEach(function(o){s9e.includes(o)&&(r[o]=n||function(s){return i[o](i,s)})}),r},iPi=function(e,n,i){return function(r){return e(n,i,r),null}},_W=function(e,n,i){if(!K6(e)||B2e(e)!=="object")return null;var r=null;return Object.keys(e).forEach(function(o){var s=e[o];s9e.includes(o)&&typeof s=="function"&&(r||(r={}),r[o]=iPi(s,n,i))}),r},rPi=["children"],oPi=["children"];function mut(t,e){if(t==null)return{};var n=sPi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function sPi(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function z2e(t){"@babel/helpers - typeof";return z2e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z2e(t)}var put={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},OC=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},gut=null,G1e=null,a9e=function t(e){if(e===gut&&Array.isArray(G1e))return G1e;var n=[];return b.Children.forEach(e,function(i){So(i)||(DC.isFragment(i)?n=n.concat(t(i.props.children)):n.push(i))}),G1e=n,gut=e,n};function Rp(t,e){var n=[],i=[];return Array.isArray(e)?i=e.map(function(r){return OC(r)}):i=[OC(e)],a9e(t).forEach(function(r){var o=_v(r,"type.displayName")||_v(r,"type.name");i.indexOf(o)!==-1&&n.push(r)}),n}function Mg(t,e){var n=Rp(t,e);return n&&n[0]}var but=function(e){if(!e||!e.props)return!1;var n=e.props,i=n.width,r=n.height;return!(!ui(i)||i<=0||!ui(r)||r<=0)},aPi=["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"],lPi=function(e){return e&&e.type&&Uq(e.type)&&aPi.indexOf(e.type)>=0},C6t=function(e){return e&&z2e(e)==="object"&&"clipDot"in e},cPi=function(e,n,i,r){var o,s=(o=q1e==null?void 0:q1e[r])!==null&&o!==void 0?o:[];return!$o(e)&&(r&&s.includes(n)||nPi.includes(n))||i&&s9e.includes(n)},Co=function(e,n,i){if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(b.isValidElement(e)&&(r=e.props),!K6(r))return null;var o={};return Object.keys(r).forEach(function(s){var a;cPi((a=r)===null||a===void 0?void 0:a[s],s,n,i)&&(o[s]=r[s])}),o},H2e=function t(e,n){if(e===n)return!0;var i=b.Children.count(e);if(i!==b.Children.count(n))return!1;if(i===0)return!0;if(i===1)return vut(Array.isArray(e)?e[0]:e,Array.isArray(n)?n[0]:n);for(var r=0;r<i;r++){var o=e[r],s=n[r];if(Array.isArray(o)||Array.isArray(s)){if(!t(o,s))return!1}else if(!vut(o,s))return!1}return!0},vut=function(e,n){if(So(e)&&So(n))return!0;if(!So(e)&&!So(n)){var i=e.props||{},r=i.children,o=mut(i,rPi),s=n.props||{},a=s.children,l=mut(s,oPi);return r&&a?F3(o,l)&&H2e(r,a):!r&&!a?F3(o,l):!1}return!1},yut=function(e,n){var i=[],r={};return a9e(e).forEach(function(o,s){if(lPi(o))i.push(o);else if(o){var a=OC(o.type),l=n[a]||{},c=l.handler,u=l.once;if(c&&(!u||!r[a])){var d=c(o,a,s);i.push(d),r[a]=!0}}}),i},uPi=function(e){var n=e&&e.type;return n&&put[n]?put[n]:null},dPi=function(e,n){return a9e(n).indexOf(e)},hPi=["children","width","height","viewBox","className","style","title","desc"];function W2e(){return W2e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},W2e.apply(this,arguments)}function fPi(t,e){if(t==null)return{};var n=mPi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function mPi(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function U2e(t){var e=t.children,n=t.width,i=t.height,r=t.viewBox,o=t.className,s=t.style,a=t.title,l=t.desc,c=fPi(t,hPi),u=r||{width:n,height:i,x:0,y:0},d=Vt("recharts-surface",o);return Z.createElement("svg",W2e({},Co(c,!0,"svg"),{className:d,width:n,height:i,style:s,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),Z.createElement("title",null,a),Z.createElement("desc",null,l),e)}var pPi=["children","className"];function K2e(){return K2e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},K2e.apply(this,arguments)}function gPi(t,e){if(t==null)return{};var n=bPi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function bPi(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}var fa=Z.forwardRef(function(t,e){var n=t.children,i=t.className,r=gPi(t,pPi),o=Vt("recharts-layer",i);return Z.createElement("g",K2e({className:o},Co(r,!0),{ref:e}),n)}),jC=function(e,n){for(var i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!e))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;console.warn(n.replace(/%s/g,function(){return r[s++]}))}};function vPi(t,e,n){var i=-1,r=t.length;e<0&&(e=-e>r?0:r+e),n=n>r?r:n,n<0&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(r);++i<r;)o[i]=t[i+e];return o}var yPi=vPi,_Pi=yPi;function xPi(t,e,n){var i=t.length;return n=n===void 0?i:n,!e&&n>=i?t:_Pi(t,e,n)}var wPi=xPi,CPi="\\ud800-\\udfff",SPi="\\u0300-\\u036f",NPi="\\ufe20-\\ufe2f",EPi="\\u20d0-\\u20ff",DPi=SPi+NPi+EPi,kPi="\\ufe0e\\ufe0f",MPi="\\u200d",LPi=RegExp("["+MPi+CPi+DPi+kPi+"]");function TPi(t){return LPi.test(t)}var S6t=TPi;function IPi(t){return t.split("")}var APi=IPi,N6t="\\ud800-\\udfff",RPi="\\u0300-\\u036f",PPi="\\ufe20-\\ufe2f",OPi="\\u20d0-\\u20ff",jPi=RPi+PPi+OPi,FPi="\\ufe0e\\ufe0f",$Pi="["+N6t+"]",q2e="["+jPi+"]",G2e="\\ud83c[\\udffb-\\udfff]",VPi="(?:"+q2e+"|"+G2e+")",E6t="[^"+N6t+"]",D6t="(?:\\ud83c[\\udde6-\\uddff]){2}",k6t="[\\ud800-\\udbff][\\udc00-\\udfff]",BPi="\\u200d",M6t=VPi+"?",L6t="["+FPi+"]?",zPi="(?:"+BPi+"(?:"+[E6t,D6t,k6t].join("|")+")"+L6t+M6t+")*",HPi=L6t+M6t+zPi,WPi="(?:"+[E6t+q2e+"?",q2e,D6t,k6t,$Pi].join("|")+")",UPi=RegExp(G2e+"(?="+G2e+")|"+WPi+HPi,"g");function KPi(t){return t.match(UPi)||[]}var qPi=KPi,GPi=APi,YPi=S6t,XPi=qPi;function ZPi(t){return YPi(t)?XPi(t):GPi(t)}var QPi=ZPi,JPi=wPi,eOi=S6t,tOi=QPi,nOi=y6t;function iOi(t){return function(e){e=nOi(e);var n=eOi(e)?tOi(e):void 0,i=n?n[0]:e.charAt(0),r=n?JPi(n,1).join(""):e.slice(1);return i[t]()+r}}var rOi=iOi,oOi=rOi,sOi=oOi("toUpperCase"),aOi=sOi;const Fme=ao(aOi);function Sl(t){return function(){return t}}const T6t=Math.cos,Loe=Math.sin,h_=Math.sqrt,Toe=Math.PI,$me=2*Toe,Y2e=Math.PI,X2e=2*Y2e,$L=1e-6,lOi=X2e-$L;function I6t(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function cOi(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return I6t;const n=10**e;return function(i){this._+=i[0];for(let r=1,o=i.length;r<o;++r)this._+=Math.round(arguments[r]*n)/n+i[r]}}class uOi{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?I6t:cOi(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,i,r){this._append`Q${+e},${+n},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(e,n,i,r,o,s){this._append`C${+e},${+n},${+i},${+r},${this._x1=+o},${this._y1=+s}`}arcTo(e,n,i,r,o){if(e=+e,n=+n,i=+i,r=+r,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,l=i-e,c=r-n,u=s-e,d=a-n,h=u*u+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>$L)if(!(Math.abs(d*l-c*u)>$L)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let f=i-s,m=r-a,p=l*l+c*c,g=f*f+m*m,y=Math.sqrt(p),_=Math.sqrt(h),w=o*Math.tan((Y2e-Math.acos((p+h-g)/(2*y*_)))/2),C=w/_,N=w/y;Math.abs(C-1)>$L&&this._append`L${e+C*u},${n+C*d}`,this._append`A${o},${o},0,0,${+(d*f>u*m)},${this._x1=e+N*l},${this._y1=n+N*c}`}}arc(e,n,i,r,o,s){if(e=+e,n=+n,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(r),l=i*Math.sin(r),c=e+a,u=n+l,d=1^s,h=s?r-o:o-r;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>$L||Math.abs(this._y1-u)>$L)&&this._append`L${c},${u}`,i&&(h<0&&(h=h%X2e+X2e),h>lOi?this._append`A${i},${i},0,1,${d},${e-a},${n-l}A${i},${i},0,1,${d},${this._x1=c},${this._y1=u}`:h>$L&&this._append`A${i},${i},0,${+(h>=Y2e)},${d},${this._x1=e+i*Math.cos(o)},${this._y1=n+i*Math.sin(o)}`)}rect(e,n,i,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function l9e(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);e=i}return t},()=>new uOi(e)}function c9e(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function A6t(t){this._context=t}A6t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Vme(t){return new A6t(t)}function R6t(t){return t[0]}function P6t(t){return t[1]}function O6t(t,e){var n=Sl(!0),i=null,r=Vme,o=null,s=l9e(a);t=typeof t=="function"?t:t===void 0?R6t:Sl(t),e=typeof e=="function"?e:e===void 0?P6t:Sl(e);function a(l){var c,u=(l=c9e(l)).length,d,h=!1,f;for(i==null&&(o=r(f=s())),c=0;c<=u;++c)!(c<u&&n(d=l[c],c,l))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(d,c,l),+e(d,c,l));if(f)return o=null,f+""||null}return a.x=function(l){return arguments.length?(t=typeof l=="function"?l:Sl(+l),a):t},a.y=function(l){return arguments.length?(e=typeof l=="function"?l:Sl(+l),a):e},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:Sl(!!l),a):n},a.curve=function(l){return arguments.length?(r=l,i!=null&&(o=r(i)),a):r},a.context=function(l){return arguments.length?(l==null?i=o=null:o=r(i=l),a):i},a}function KQ(t,e,n){var i=null,r=Sl(!0),o=null,s=Vme,a=null,l=l9e(c);t=typeof t=="function"?t:t===void 0?R6t:Sl(+t),e=typeof e=="function"?e:Sl(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?P6t:Sl(+n);function c(d){var h,f,m,p=(d=c9e(d)).length,g,y=!1,_,w=new Array(p),C=new Array(p);for(o==null&&(a=s(_=l())),h=0;h<=p;++h){if(!(h<p&&r(g=d[h],h,d))===y)if(y=!y)f=h,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),m=h-1;m>=f;--m)a.point(w[m],C[m]);a.lineEnd(),a.areaEnd()}y&&(w[h]=+t(g,h,d),C[h]=+e(g,h,d),a.point(i?+i(g,h,d):w[h],n?+n(g,h,d):C[h]))}if(_)return a=null,_+""||null}function u(){return O6t().defined(r).curve(s).context(o)}return c.x=function(d){return arguments.length?(t=typeof d=="function"?d:Sl(+d),i=null,c):t},c.x0=function(d){return arguments.length?(t=typeof d=="function"?d:Sl(+d),c):t},c.x1=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:Sl(+d),c):i},c.y=function(d){return arguments.length?(e=typeof d=="function"?d:Sl(+d),n=null,c):e},c.y0=function(d){return arguments.length?(e=typeof d=="function"?d:Sl(+d),c):e},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Sl(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(t).y(e)},c.lineY1=function(){return u().x(t).y(n)},c.lineX1=function(){return u().x(i).y(e)},c.defined=function(d){return arguments.length?(r=typeof d=="function"?d:Sl(!!d),c):r},c.curve=function(d){return arguments.length?(s=d,o!=null&&(a=s(o)),c):s},c.context=function(d){return arguments.length?(d==null?o=a=null:a=s(o=d),c):o},c}class j6t{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}function dOi(t){return new j6t(t,!0)}function hOi(t){return new j6t(t,!1)}const u9e={draw(t,e){const n=h_(e/Toe);t.moveTo(n,0),t.arc(0,0,n,0,$me)}},fOi={draw(t,e){const n=h_(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},F6t=h_(1/3),mOi=F6t*2,pOi={draw(t,e){const n=h_(e/mOi),i=n*F6t;t.moveTo(0,-n),t.lineTo(i,0),t.lineTo(0,n),t.lineTo(-i,0),t.closePath()}},gOi={draw(t,e){const n=h_(e),i=-n/2;t.rect(i,i,n,n)}},bOi=.8908130915292852,$6t=Loe(Toe/10)/Loe(7*Toe/10),vOi=Loe($me/10)*$6t,yOi=-T6t($me/10)*$6t,_Oi={draw(t,e){const n=h_(e*bOi),i=vOi*n,r=yOi*n;t.moveTo(0,-n),t.lineTo(i,r);for(let o=1;o<5;++o){const s=$me*o/5,a=T6t(s),l=Loe(s);t.lineTo(l*n,-a*n),t.lineTo(a*i-l*r,l*i+a*r)}t.closePath()}},Y1e=h_(3),xOi={draw(t,e){const n=-h_(e/(Y1e*3));t.moveTo(0,n*2),t.lineTo(-Y1e*n,-n),t.lineTo(Y1e*n,-n),t.closePath()}},Ob=-.5,jb=h_(3)/2,Z2e=1/h_(12),wOi=(Z2e/2+1)*3,COi={draw(t,e){const n=h_(e/wOi),i=n/2,r=n*Z2e,o=i,s=n*Z2e+n,a=-o,l=s;t.moveTo(i,r),t.lineTo(o,s),t.lineTo(a,l),t.lineTo(Ob*i-jb*r,jb*i+Ob*r),t.lineTo(Ob*o-jb*s,jb*o+Ob*s),t.lineTo(Ob*a-jb*l,jb*a+Ob*l),t.lineTo(Ob*i+jb*r,Ob*r-jb*i),t.lineTo(Ob*o+jb*s,Ob*s-jb*o),t.lineTo(Ob*a+jb*l,Ob*l-jb*a),t.closePath()}};function SOi(t,e){let n=null,i=l9e(r);t=typeof t=="function"?t:Sl(t||u9e),e=typeof e=="function"?e:Sl(e===void 0?64:+e);function r(){let o;if(n||(n=o=i()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return r.type=function(o){return arguments.length?(t=typeof o=="function"?o:Sl(o),r):t},r.size=function(o){return arguments.length?(e=typeof o=="function"?o:Sl(+o),r):e},r.context=function(o){return arguments.length?(n=o??null,r):n},r}function Ioe(){}function Aoe(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function V6t(t){this._context=t}V6t.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:Aoe(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:Aoe(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function NOi(t){return new V6t(t)}function B6t(t){this._context=t}B6t.prototype={areaStart:Ioe,areaEnd:Ioe,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);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Aoe(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function EOi(t){return new B6t(t)}function z6t(t){this._context=t}z6t.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,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+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:Aoe(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function DOi(t){return new z6t(t)}function H6t(t){this._context=t}H6t.prototype={areaStart:Ioe,areaEnd:Ioe,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function kOi(t){return new H6t(t)}function _ut(t){return t<0?-1:1}function xut(t,e,n){var i=t._x1-t._x0,r=e-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),s=(n-t._y1)/(r||i<0&&-0),a=(o*r+s*i)/(i+r);return(_ut(o)+_ut(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function wut(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function X1e(t,e,n){var i=t._x0,r=t._y0,o=t._x1,s=t._y1,a=(o-i)/3;t._context.bezierCurveTo(i+a,r+a*e,o-a,s-a*n,o,s)}function Roe(t){this._context=t}Roe.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:X1e(this,this._t0,wut(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,X1e(this,wut(this,n=xut(this,t,e)),n);break;default:X1e(this,this._t0,n=xut(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function W6t(t){this._context=new U6t(t)}(W6t.prototype=Object.create(Roe.prototype)).point=function(t,e){Roe.prototype.point.call(this,e,t)};function U6t(t){this._context=t}U6t.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,o){this._context.bezierCurveTo(e,t,i,n,o,r)}};function MOi(t){return new Roe(t)}function LOi(t){return new W6t(t)}function K6t(t){this._context=t}K6t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var i=Cut(t),r=Cut(e),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(i[0][o],r[0][o],i[1][o],r[1][o],t[s],e[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Cut(t){var e,n=t.length-1,i,r=new Array(n),o=new Array(n),s=new Array(n);for(r[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e<n-1;++e)r[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];for(r[n-1]=2,o[n-1]=7,s[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)i=r[e]/o[e-1],o[e]-=i,s[e]-=i*s[e-1];for(r[n-1]=s[n-1]/o[n-1],e=n-2;e>=0;--e)r[e]=(s[e]-r[e+1])/o[e];for(o[n-1]=(t[n]+r[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-r[e+1];return[r,o]}function TOi(t){return new K6t(t)}function Bme(t,e){this._context=t,this._t=e}Bme.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&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function IOi(t){return new Bme(t,.5)}function AOi(t){return new Bme(t,0)}function ROi(t){return new Bme(t,1)}function E5(t,e){if((s=t.length)>1)for(var n=1,i,r,o=t[e[0]],s,a=o.length;n<s;++n)for(r=o,o=t[e[n]],i=0;i<a;++i)o[i][1]+=o[i][0]=isNaN(r[i][1])?r[i][0]:r[i][1]}function Q2e(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function POi(t,e){return t[e]}function OOi(t){const e=[];return e.key=t,e}function jOi(){var t=Sl([]),e=Q2e,n=E5,i=POi;function r(o){var s=Array.from(t.apply(this,arguments),OOi),a,l=s.length,c=-1,u;for(const d of o)for(a=0,++c;a<l;++a)(s[a][c]=[0,+i(d,s[a].key,c,o)]).data=d;for(a=0,u=c9e(e(s));a<l;++a)s[u[a]].index=a;return n(s,u),s}return r.keys=function(o){return arguments.length?(t=typeof o=="function"?o:Sl(Array.from(o)),r):t},r.value=function(o){return arguments.length?(i=typeof o=="function"?o:Sl(+o),r):i},r.order=function(o){return arguments.length?(e=o==null?Q2e:typeof o=="function"?o:Sl(Array.from(o)),r):e},r.offset=function(o){return arguments.length?(n=o??E5,r):n},r}function FOi(t,e){if((i=t.length)>0){for(var n,i,r=0,o=t[0].length,s;r<o;++r){for(s=n=0;n<i;++n)s+=t[n][r][1]||0;if(s)for(n=0;n<i;++n)t[n][r][1]/=s}E5(t,e)}}function $Oi(t,e){if((r=t.length)>0){for(var n=0,i=t[e[0]],r,o=i.length;n<o;++n){for(var s=0,a=0;s<r;++s)a+=t[s][n][1]||0;i[n][1]+=i[n][0]=-a/2}E5(t,e)}}function VOi(t,e){if(!(!((s=t.length)>0)||!((o=(r=t[e[0]]).length)>0))){for(var n=0,i=1,r,o,s;i<o;++i){for(var a=0,l=0,c=0;a<s;++a){for(var u=t[e[a]],d=u[i][1]||0,h=u[i-1][1]||0,f=(d-h)/2,m=0;m<a;++m){var p=t[e[m]],g=p[i][1]||0,y=p[i-1][1]||0;f+=g-y}l+=d,c+=f*d}r[i-1][1]+=r[i-1][0]=n,l&&(n-=c/l)}r[i-1][1]+=r[i-1][0]=n,E5(t,e)}}function xW(t){"@babel/helpers - typeof";return xW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xW(t)}var BOi=["type","size","sizeType"];function J2e(){return J2e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},J2e.apply(this,arguments)}function Sut(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Nut(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Sut(Object(n),!0).forEach(function(i){zOi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Sut(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function zOi(t,e,n){return e=HOi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function HOi(t){var e=WOi(t,"string");return xW(e)=="symbol"?e:e+""}function WOi(t,e){if(xW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(xW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function UOi(t,e){if(t==null)return{};var n=KOi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function KOi(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}var q6t={symbolCircle:u9e,symbolCross:fOi,symbolDiamond:pOi,symbolSquare:gOi,symbolStar:_Oi,symbolTriangle:xOi,symbolWye:COi},qOi=Math.PI/180,GOi=function(e){var n="symbol".concat(Fme(e));return q6t[n]||u9e},YOi=function(e,n,i){if(n==="area")return e;switch(i){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*qOi;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*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}},XOi=function(e,n){q6t["symbol".concat(Fme(e))]=n},zme=function(e){var n=e.type,i=n===void 0?"circle":n,r=e.size,o=r===void 0?64:r,s=e.sizeType,a=s===void 0?"area":s,l=UOi(e,BOi),c=Nut(Nut({},l),{},{type:i,size:o,sizeType:a}),u=function(){var g=GOi(i),y=SOi().type(g).size(YOi(o,a,i));return y()},d=c.className,h=c.cx,f=c.cy,m=Co(c,!0);return h===+h&&f===+f&&o===+o?Z.createElement("path",J2e({},m,{className:Vt("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(f,")"),d:u()})):null};zme.registerSymbol=XOi;function D5(t){"@babel/helpers - typeof";return D5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D5(t)}function eAe(){return eAe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},eAe.apply(this,arguments)}function Eut(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function ZOi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Eut(Object(n),!0).forEach(function(i){wW(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Eut(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function QOi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function JOi(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Y6t(i.key),i)}}function e4i(t,e,n){return e&&JOi(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function t4i(t,e,n){return e=Poe(e),n4i(t,G6t()?Reflect.construct(e,n||[],Poe(t).constructor):e.apply(t,n))}function n4i(t,e){if(e&&(D5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return i4i(t)}function i4i(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function G6t(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(G6t=function(){return!!t})()}function Poe(t){return Poe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Poe(t)}function r4i(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tAe(t,e)}function tAe(t,e){return tAe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},tAe(t,e)}function wW(t,e,n){return e=Y6t(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Y6t(t){var e=o4i(t,"string");return D5(e)=="symbol"?e:e+""}function o4i(t,e){if(D5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(D5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Fb=32,d9e=function(t){function e(){return QOi(this,e),t4i(this,e,arguments)}return r4i(e,t),e4i(e,[{key:"renderIcon",value:function(i){var r=this.props.inactiveColor,o=Fb/2,s=Fb/6,a=Fb/3,l=i.inactive?r:i.color;if(i.type==="plainline")return Z.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:i.payload.strokeDasharray,x1:0,y1:o,x2:Fb,y2:o,className:"recharts-legend-icon"});if(i.type==="line")return Z.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(o,"h").concat(a,`
            A`).concat(s,",").concat(s,",0,1,1,").concat(2*a,",").concat(o,`
            H`).concat(Fb,"M").concat(2*a,",").concat(o,`
            A`).concat(s,",").concat(s,",0,1,1,").concat(a,",").concat(o),className:"recharts-legend-icon"});if(i.type==="rect")return Z.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Fb/8,"h").concat(Fb,"v").concat(Fb*3/4,"h").concat(-Fb,"z"),className:"recharts-legend-icon"});if(Z.isValidElement(i.legendIcon)){var c=ZOi({},i);return delete c.legendIcon,Z.cloneElement(i.legendIcon,c)}return Z.createElement(zme,{fill:l,cx:o,cy:o,size:Fb,sizeType:"diameter",type:i.type})}},{key:"renderItems",value:function(){var i=this,r=this.props,o=r.payload,s=r.iconSize,a=r.layout,l=r.formatter,c=r.inactiveColor,u={x:0,y:0,width:Fb,height:Fb},d={display:a==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(f,m){var p=f.formatter||l,g=Vt(wW(wW({"recharts-legend-item":!0},"legend-item-".concat(m),!0),"inactive",f.inactive));if(f.type==="none")return null;var y=$o(f.value)?null:f.value;jC(!$o(f.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 _=f.inactive?c:f.color;return Z.createElement("li",eAe({className:g,style:d,key:"legend-item-".concat(m)},_W(i.props,f,m)),Z.createElement(U2e,{width:s,height:s,viewBox:u,style:h},i.renderIcon(f)),Z.createElement("span",{className:"recharts-legend-item-text",style:{color:_}},p?p(y,f,m):y))})}},{key:"render",value:function(){var i=this.props,r=i.payload,o=i.layout,s=i.align;if(!r||!r.length)return null;var a={padding:0,margin:0,textAlign:o==="horizontal"?s:"left"};return Z.createElement("ul",{className:"recharts-default-legend",style:a},this.renderItems())}}])}(b.PureComponent);wW(d9e,"displayName","Legend");wW(d9e,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var s4i=Pme;function a4i(){this.__data__=new s4i,this.size=0}var l4i=a4i;function c4i(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var u4i=c4i;function d4i(t){return this.__data__.get(t)}var h4i=d4i;function f4i(t){return this.__data__.has(t)}var m4i=f4i,p4i=Pme,g4i=t9e,b4i=n9e,v4i=200;function y4i(t,e){var n=this.__data__;if(n instanceof p4i){var i=n.__data__;if(!g4i||i.length<v4i-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new b4i(i)}return n.set(t,e),this.size=n.size,this}var _4i=y4i,x4i=Pme,w4i=l4i,C4i=u4i,S4i=h4i,N4i=m4i,E4i=_4i;function Z6(t){var e=this.__data__=new x4i(t);this.size=e.size}Z6.prototype.clear=w4i;Z6.prototype.delete=C4i;Z6.prototype.get=S4i;Z6.prototype.has=N4i;Z6.prototype.set=E4i;var X6t=Z6,D4i="__lodash_hash_undefined__";function k4i(t){return this.__data__.set(t,D4i),this}var M4i=k4i;function L4i(t){return this.__data__.has(t)}var T4i=L4i,I4i=n9e,A4i=M4i,R4i=T4i;function Ooe(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new I4i;++e<n;)this.add(t[e])}Ooe.prototype.add=Ooe.prototype.push=A4i;Ooe.prototype.has=R4i;var Z6t=Ooe;function P4i(t,e){for(var n=-1,i=t==null?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}var Q6t=P4i;function O4i(t,e){return t.has(e)}var J6t=O4i,j4i=Z6t,F4i=Q6t,$4i=J6t,V4i=1,B4i=2;function z4i(t,e,n,i,r,o){var s=n&V4i,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(t),u=o.get(e);if(c&&u)return c==e&&u==t;var d=-1,h=!0,f=n&B4i?new j4i:void 0;for(o.set(t,e),o.set(e,t);++d<a;){var m=t[d],p=e[d];if(i)var g=s?i(p,m,d,e,t,o):i(m,p,d,t,e,o);if(g!==void 0){if(g)continue;h=!1;break}if(f){if(!F4i(e,function(y,_){if(!$4i(f,_)&&(m===y||r(m,y,n,i,o)))return f.push(_)})){h=!1;break}}else if(!(m===p||r(m,p,n,i,o))){h=!1;break}}return o.delete(t),o.delete(e),h}var e$t=z4i,H4i=jw,W4i=H4i.Uint8Array,U4i=W4i;function K4i(t){var e=-1,n=Array(t.size);return t.forEach(function(i,r){n[++e]=[r,i]}),n}var q4i=K4i;function G4i(t){var e=-1,n=Array(t.size);return t.forEach(function(i){n[++e]=i}),n}var h9e=G4i,Dut=Wq,kut=U4i,Y4i=e9e,X4i=e$t,Z4i=q4i,Q4i=h9e,J4i=1,e3i=2,t3i="[object Boolean]",n3i="[object Date]",i3i="[object Error]",r3i="[object Map]",o3i="[object Number]",s3i="[object RegExp]",a3i="[object Set]",l3i="[object String]",c3i="[object Symbol]",u3i="[object ArrayBuffer]",d3i="[object DataView]",Mut=Dut?Dut.prototype:void 0,Z1e=Mut?Mut.valueOf:void 0;function h3i(t,e,n,i,r,o,s){switch(n){case d3i:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case u3i:return!(t.byteLength!=e.byteLength||!o(new kut(t),new kut(e)));case t3i:case n3i:case o3i:return Y4i(+t,+e);case i3i:return t.name==e.name&&t.message==e.message;case s3i:case l3i:return t==e+"";case r3i:var a=Z4i;case a3i:var l=i&J4i;if(a||(a=Q4i),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;i|=e3i,s.set(t,e);var u=X4i(a(t),a(e),i,r,o,s);return s.delete(t),u;case c3i:if(Z1e)return Z1e.call(t)==Z1e.call(e)}return!1}var f3i=h3i;function m3i(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}var t$t=m3i,p3i=t$t,g3i=rg;function b3i(t,e,n){var i=e(t);return g3i(t)?i:p3i(i,n(t))}var v3i=b3i;function y3i(t,e){for(var n=-1,i=t==null?0:t.length,r=0,o=[];++n<i;){var s=t[n];e(s,n,t)&&(o[r++]=s)}return o}var _3i=y3i;function x3i(){return[]}var w3i=x3i,C3i=_3i,S3i=w3i,N3i=Object.prototype,E3i=N3i.propertyIsEnumerable,Lut=Object.getOwnPropertySymbols,D3i=Lut?function(t){return t==null?[]:(t=Object(t),C3i(Lut(t),function(e){return E3i.call(t,e)}))}:S3i,k3i=D3i;function M3i(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}var L3i=M3i,T3i=XS,I3i=ZS,A3i="[object Arguments]";function R3i(t){return I3i(t)&&T3i(t)==A3i}var P3i=R3i,Tut=P3i,O3i=ZS,n$t=Object.prototype,j3i=n$t.hasOwnProperty,F3i=n$t.propertyIsEnumerable,$3i=Tut(function(){return arguments}())?Tut:function(t){return O3i(t)&&j3i.call(t,"callee")&&!F3i.call(t,"callee")},f9e=$3i,joe={exports:{}};function V3i(){return!1}var B3i=V3i;joe.exports;(function(t,e){var n=jw,i=B3i,r=e&&!e.nodeType&&e,o=r&&!0&&t&&!t.nodeType&&t,s=o&&o.exports===r,a=s?n.Buffer:void 0,l=a?a.isBuffer:void 0,c=l||i;t.exports=c})(joe,joe.exports);var i$t=joe.exports,z3i=9007199254740991,H3i=/^(?:0|[1-9]\d*)$/;function W3i(t,e){var n=typeof t;return e=e??z3i,!!e&&(n=="number"||n!="symbol"&&H3i.test(t))&&t>-1&&t%1==0&&t<e}var m9e=W3i,U3i=9007199254740991;function K3i(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=U3i}var p9e=K3i,q3i=XS,G3i=p9e,Y3i=ZS,X3i="[object Arguments]",Z3i="[object Array]",Q3i="[object Boolean]",J3i="[object Date]",eji="[object Error]",tji="[object Function]",nji="[object Map]",iji="[object Number]",rji="[object Object]",oji="[object RegExp]",sji="[object Set]",aji="[object String]",lji="[object WeakMap]",cji="[object ArrayBuffer]",uji="[object DataView]",dji="[object Float32Array]",hji="[object Float64Array]",fji="[object Int8Array]",mji="[object Int16Array]",pji="[object Int32Array]",gji="[object Uint8Array]",bji="[object Uint8ClampedArray]",vji="[object Uint16Array]",yji="[object Uint32Array]",jl={};jl[dji]=jl[hji]=jl[fji]=jl[mji]=jl[pji]=jl[gji]=jl[bji]=jl[vji]=jl[yji]=!0;jl[X3i]=jl[Z3i]=jl[cji]=jl[Q3i]=jl[uji]=jl[J3i]=jl[eji]=jl[tji]=jl[nji]=jl[iji]=jl[rji]=jl[oji]=jl[sji]=jl[aji]=jl[lji]=!1;function _ji(t){return Y3i(t)&&G3i(t.length)&&!!jl[q3i(t)]}var xji=_ji;function wji(t){return function(e){return t(e)}}var r$t=wji,Foe={exports:{}};Foe.exports;(function(t,e){var n=f6t,i=e&&!e.nodeType&&e,r=i&&!0&&t&&!t.nodeType&&t,o=r&&r.exports===i,s=o&&n.process,a=function(){try{var l=r&&r.require&&r.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();t.exports=a})(Foe,Foe.exports);var Cji=Foe.exports,Sji=xji,Nji=r$t,Iut=Cji,Aut=Iut&&Iut.isTypedArray,Eji=Aut?Nji(Aut):Sji,o$t=Eji,Dji=L3i,kji=f9e,Mji=rg,Lji=i$t,Tji=m9e,Iji=o$t,Aji=Object.prototype,Rji=Aji.hasOwnProperty;function Pji(t,e){var n=Mji(t),i=!n&&kji(t),r=!n&&!i&&Lji(t),o=!n&&!i&&!r&&Iji(t),s=n||i||r||o,a=s?Dji(t.length,String):[],l=a.length;for(var c in t)(e||Rji.call(t,c))&&!(s&&(c=="length"||r&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Tji(c,l)))&&a.push(c);return a}var Oji=Pji,jji=Object.prototype;function Fji(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||jji;return t===n}var $ji=Fji;function Vji(t,e){return function(n){return t(e(n))}}var s$t=Vji,Bji=s$t,zji=Bji(Object.keys,Object),Hji=zji,Wji=$ji,Uji=Hji,Kji=Object.prototype,qji=Kji.hasOwnProperty;function Gji(t){if(!Wji(t))return Uji(t);var e=[];for(var n in Object(t))qji.call(t,n)&&n!="constructor"&&e.push(n);return e}var Yji=Gji,Xji=J7e,Zji=p9e;function Qji(t){return t!=null&&Zji(t.length)&&!Xji(t)}var Kq=Qji,Jji=Oji,e5i=Yji,t5i=Kq;function n5i(t){return t5i(t)?Jji(t):e5i(t)}var Hme=n5i,i5i=v3i,r5i=k3i,o5i=Hme;function s5i(t){return i5i(t,o5i,r5i)}var a5i=s5i,Rut=a5i,l5i=1,c5i=Object.prototype,u5i=c5i.hasOwnProperty;function d5i(t,e,n,i,r,o){var s=n&l5i,a=Rut(t),l=a.length,c=Rut(e),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=a[d];if(!(s?h in e:u5i.call(e,h)))return!1}var f=o.get(t),m=o.get(e);if(f&&m)return f==e&&m==t;var p=!0;o.set(t,e),o.set(e,t);for(var g=s;++d<l;){h=a[d];var y=t[h],_=e[h];if(i)var w=s?i(_,y,h,e,t,o):i(y,_,h,t,e,o);if(!(w===void 0?y===_||r(y,_,n,i,o):w)){p=!1;break}g||(g=h=="constructor")}if(p&&!g){var C=t.constructor,N=e.constructor;C!=N&&"constructor"in t&&"constructor"in e&&!(typeof C=="function"&&C instanceof C&&typeof N=="function"&&N instanceof N)&&(p=!1)}return o.delete(t),o.delete(e),p}var h5i=d5i,f5i=aR,m5i=jw,p5i=f5i(m5i,"DataView"),g5i=p5i,b5i=aR,v5i=jw,y5i=b5i(v5i,"Promise"),_5i=y5i,x5i=aR,w5i=jw,C5i=x5i(w5i,"Set"),a$t=C5i,S5i=aR,N5i=jw,E5i=S5i(N5i,"WeakMap"),D5i=E5i,nAe=g5i,iAe=t9e,rAe=_5i,oAe=a$t,sAe=D5i,l$t=XS,Q6=p6t,Put="[object Map]",k5i="[object Object]",Out="[object Promise]",jut="[object Set]",Fut="[object WeakMap]",$ut="[object DataView]",M5i=Q6(nAe),L5i=Q6(iAe),T5i=Q6(rAe),I5i=Q6(oAe),A5i=Q6(sAe),VL=l$t;(nAe&&VL(new nAe(new ArrayBuffer(1)))!=$ut||iAe&&VL(new iAe)!=Put||rAe&&VL(rAe.resolve())!=Out||oAe&&VL(new oAe)!=jut||sAe&&VL(new sAe)!=Fut)&&(VL=function(t){var e=l$t(t),n=e==k5i?t.constructor:void 0,i=n?Q6(n):"";if(i)switch(i){case M5i:return $ut;case L5i:return Put;case T5i:return Out;case I5i:return jut;case A5i:return Fut}return e});var R5i=VL,Q1e=X6t,P5i=e$t,O5i=f3i,j5i=h5i,Vut=R5i,But=rg,zut=i$t,F5i=o$t,$5i=1,Hut="[object Arguments]",Wut="[object Array]",qQ="[object Object]",V5i=Object.prototype,Uut=V5i.hasOwnProperty;function B5i(t,e,n,i,r,o){var s=But(t),a=But(e),l=s?Wut:Vut(t),c=a?Wut:Vut(e);l=l==Hut?qQ:l,c=c==Hut?qQ:c;var u=l==qQ,d=c==qQ,h=l==c;if(h&&zut(t)){if(!zut(e))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new Q1e),s||F5i(t)?P5i(t,e,n,i,r,o):O5i(t,e,l,n,i,r,o);if(!(n&$5i)){var f=u&&Uut.call(t,"__wrapped__"),m=d&&Uut.call(e,"__wrapped__");if(f||m){var p=f?t.value():t,g=m?e.value():e;return o||(o=new Q1e),r(p,g,n,i,o)}}return h?(o||(o=new Q1e),j5i(t,e,n,i,r,o)):!1}var z5i=B5i,H5i=z5i,Kut=ZS;function c$t(t,e,n,i,r){return t===e?!0:t==null||e==null||!Kut(t)&&!Kut(e)?t!==t&&e!==e:H5i(t,e,n,i,c$t,r)}var g9e=c$t,W5i=X6t,U5i=g9e,K5i=1,q5i=2;function G5i(t,e,n,i){var r=n.length,o=r,s=!i;if(t==null)return!o;for(t=Object(t);r--;){var a=n[r];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++r<o;){a=n[r];var l=a[0],c=t[l],u=a[1];if(s&&a[2]){if(c===void 0&&!(l in t))return!1}else{var d=new W5i;if(i)var h=i(c,u,l,t,e,d);if(!(h===void 0?U5i(u,c,K5i|q5i,i,d):h))return!1}}return!0}var Y5i=G5i,X5i=cM;function Z5i(t){return t===t&&!X5i(t)}var u$t=Z5i,Q5i=u$t,J5i=Hme;function eFi(t){for(var e=J5i(t),n=e.length;n--;){var i=e[n],r=t[i];e[n]=[i,r,Q5i(r)]}return e}var tFi=eFi;function nFi(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var d$t=nFi,iFi=Y5i,rFi=tFi,oFi=d$t;function sFi(t){var e=rFi(t);return e.length==1&&e[0][2]?oFi(e[0][0],e[0][1]):function(n){return n===t||iFi(n,t,e)}}var aFi=sFi;function lFi(t,e){return t!=null&&e in Object(t)}var cFi=lFi,uFi=_6t,dFi=f9e,hFi=rg,fFi=m9e,mFi=p9e,pFi=jme;function gFi(t,e,n){e=uFi(e,t);for(var i=-1,r=e.length,o=!1;++i<r;){var s=pFi(e[i]);if(!(o=t!=null&&n(t,s)))break;t=t[s]}return o||++i!=r?o:(r=t==null?0:t.length,!!r&&mFi(r)&&fFi(s,r)&&(hFi(t)||dFi(t)))}var bFi=gFi,vFi=cFi,yFi=bFi;function _Fi(t,e){return t!=null&&yFi(t,e,vFi)}var xFi=_Fi,wFi=g9e,CFi=x6t,SFi=xFi,NFi=Q7e,EFi=u$t,DFi=d$t,kFi=jme,MFi=1,LFi=2;function TFi(t,e){return NFi(t)&&EFi(e)?DFi(kFi(t),e):function(n){var i=CFi(n,t);return i===void 0&&i===e?SFi(n,t):wFi(e,i,MFi|LFi)}}var IFi=TFi;function AFi(t){return t}var J6=AFi;function RFi(t){return function(e){return e==null?void 0:e[t]}}var PFi=RFi,OFi=o9e;function jFi(t){return function(e){return OFi(e,t)}}var FFi=jFi,$Fi=PFi,VFi=FFi,BFi=Q7e,zFi=jme;function HFi(t){return BFi(t)?$Fi(zFi(t)):VFi(t)}var WFi=HFi,UFi=aFi,KFi=IFi,qFi=J6,GFi=rg,YFi=WFi;function XFi(t){return typeof t=="function"?t:t==null?qFi:typeof t=="object"?GFi(t)?KFi(t[0],t[1]):UFi(t):YFi(t)}var uM=XFi;function ZFi(t,e,n,i){for(var r=t.length,o=n+(i?1:-1);i?o--:++o<r;)if(e(t[o],o,t))return o;return-1}var h$t=ZFi;function QFi(t){return t!==t}var JFi=QFi;function e6i(t,e,n){for(var i=n-1,r=t.length;++i<r;)if(t[i]===e)return i;return-1}var t6i=e6i,n6i=h$t,i6i=JFi,r6i=t6i;function o6i(t,e,n){return e===e?r6i(t,e,n):n6i(t,i6i,n)}var s6i=o6i,a6i=s6i;function l6i(t,e){var n=t==null?0:t.length;return!!n&&a6i(t,e,0)>-1}var c6i=l6i;function u6i(t,e,n){for(var i=-1,r=t==null?0:t.length;++i<r;)if(n(e,t[i]))return!0;return!1}var d6i=u6i;function h6i(){}var f6i=h6i,J1e=a$t,m6i=f6i,p6i=h9e,g6i=1/0,b6i=J1e&&1/p6i(new J1e([,-0]))[1]==g6i?function(t){return new J1e(t)}:m6i,v6i=b6i,y6i=Z6t,_6i=c6i,x6i=d6i,w6i=J6t,C6i=v6i,S6i=h9e,N6i=200;function E6i(t,e,n){var i=-1,r=_6i,o=t.length,s=!0,a=[],l=a;if(n)s=!1,r=x6i;else if(o>=N6i){var c=e?null:C6i(t);if(c)return S6i(c);s=!1,r=w6i,l=new y6i}else l=e?[]:a;e:for(;++i<o;){var u=t[i],d=e?e(u):u;if(u=n||u!==0?u:0,s&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;e&&l.push(d),a.push(u)}else r(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}var D6i=E6i,k6i=uM,M6i=D6i;function L6i(t,e){return t&&t.length?M6i(t,k6i(e)):[]}var T6i=L6i;const qut=ao(T6i);function f$t(t,e,n){return e===!0?qut(t,n):$o(e)?qut(t,e):t}function k5(t){"@babel/helpers - typeof";return k5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k5(t)}var I6i=["ref"];function Gut(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function y1(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gut(Object(n),!0).forEach(function(i){Wme(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gut(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function A6i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yut(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,p$t(i.key),i)}}function R6i(t,e,n){return e&&Yut(t.prototype,e),n&&Yut(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function P6i(t,e,n){return e=$oe(e),O6i(t,m$t()?Reflect.construct(e,n||[],$oe(t).constructor):e.apply(t,n))}function O6i(t,e){if(e&&(k5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j6i(t)}function j6i(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m$t(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(m$t=function(){return!!t})()}function $oe(t){return $oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$oe(t)}function F6i(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&aAe(t,e)}function aAe(t,e){return aAe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},aAe(t,e)}function Wme(t,e,n){return e=p$t(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p$t(t){var e=$6i(t,"string");return k5(e)=="symbol"?e:e+""}function $6i(t,e){if(k5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(k5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function V6i(t,e){if(t==null)return{};var n=B6i(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function B6i(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function z6i(t){return t.value}function H6i(t,e){if(Z.isValidElement(t))return Z.cloneElement(t,e);if(typeof t=="function")return Z.createElement(t,e);e.ref;var n=V6i(e,I6i);return Z.createElement(d9e,n)}var Xut=1,FC=function(t){function e(){var n;A6i(this,e);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return n=P6i(this,e,[].concat(r)),Wme(n,"lastBoundingBox",{width:-1,height:-1}),n}return F6i(e,t),R6i(e,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var i=this.wrapperNode.getBoundingClientRect();return i.height=this.wrapperNode.offsetHeight,i.width=this.wrapperNode.offsetWidth,i}return null}},{key:"updateBBox",value:function(){var i=this.props.onBBoxUpdate,r=this.getBBox();r?(Math.abs(r.width-this.lastBoundingBox.width)>Xut||Math.abs(r.height-this.lastBoundingBox.height)>Xut)&&(this.lastBoundingBox.width=r.width,this.lastBoundingBox.height=r.height,i&&i(r)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,i&&i(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?y1({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(i){var r=this.props,o=r.layout,s=r.align,a=r.verticalAlign,l=r.margin,c=r.chartWidth,u=r.chartHeight,d,h;if(!i||(i.left===void 0||i.left===null)&&(i.right===void 0||i.right===null))if(s==="center"&&o==="vertical"){var f=this.getBBoxSnapshot();d={left:((c||0)-f.width)/2}}else d=s==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!i||(i.top===void 0||i.top===null)&&(i.bottom===void 0||i.bottom===null))if(a==="middle"){var m=this.getBBoxSnapshot();h={top:((u||0)-m.height)/2}}else h=a==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return y1(y1({},d),h)}},{key:"render",value:function(){var i=this,r=this.props,o=r.content,s=r.width,a=r.height,l=r.wrapperStyle,c=r.payloadUniqBy,u=r.payload,d=y1(y1({position:"absolute",width:s||"auto",height:a||"auto"},this.getDefaultPosition(l)),l);return Z.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(f){i.wrapperNode=f}},H6i(o,y1(y1({},this.props),{},{payload:f$t(u,c,z6i)})))}}],[{key:"getWithHeight",value:function(i,r){var o=y1(y1({},this.defaultProps),i.props),s=o.layout;return s==="vertical"&&ui(i.props.height)?{height:i.props.height}:s==="horizontal"?{width:i.props.width||r}:null}}])}(b.PureComponent);Wme(FC,"displayName","Legend");Wme(FC,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Zut=Wq,W6i=f9e,U6i=rg,Qut=Zut?Zut.isConcatSpreadable:void 0;function K6i(t){return U6i(t)||W6i(t)||!!(Qut&&t&&t[Qut])}var q6i=K6i,G6i=t$t,Y6i=q6i;function g$t(t,e,n,i,r){var o=-1,s=t.length;for(n||(n=Y6i),r||(r=[]);++o<s;){var a=t[o];e>0&&n(a)?e>1?g$t(a,e-1,n,i,r):G6i(r,a):i||(r[r.length]=a)}return r}var b$t=g$t;function X6i(t){return function(e,n,i){for(var r=-1,o=Object(e),s=i(e),a=s.length;a--;){var l=s[t?a:++r];if(n(o[l],l,o)===!1)break}return e}}var Z6i=X6i,Q6i=Z6i,J6i=Q6i(),e$i=J6i,t$i=e$i,n$i=Hme;function i$i(t,e){return t&&t$i(t,e,n$i)}var v$t=i$i,r$i=Kq;function o$i(t,e){return function(n,i){if(n==null)return n;if(!r$i(n))return t(n,i);for(var r=n.length,o=e?r:-1,s=Object(n);(e?o--:++o<r)&&i(s[o],o,s)!==!1;);return n}}var s$i=o$i,a$i=v$t,l$i=s$i,c$i=l$i(a$i),b9e=c$i,u$i=b9e,d$i=Kq;function h$i(t,e){var n=-1,i=d$i(t)?Array(t.length):[];return u$i(t,function(r,o,s){i[++n]=e(r,o,s)}),i}var y$t=h$i;function f$i(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}var m$i=f$i,Jut=U6;function p$i(t,e){if(t!==e){var n=t!==void 0,i=t===null,r=t===t,o=Jut(t),s=e!==void 0,a=e===null,l=e===e,c=Jut(e);if(!a&&!c&&!o&&t>e||o&&s&&l&&!a&&!c||i&&s&&l||!n&&l||!r)return 1;if(!i&&!o&&!c&&t<e||c&&n&&r&&!i&&!o||a&&n&&r||!s&&r||!l)return-1}return 0}var g$i=p$i,b$i=g$i;function v$i(t,e,n){for(var i=-1,r=t.criteria,o=e.criteria,s=r.length,a=n.length;++i<s;){var l=b$i(r[i],o[i]);if(l){if(i>=a)return l;var c=n[i];return l*(c=="desc"?-1:1)}}return t.index-e.index}var y$i=v$i,eCe=r9e,_$i=o9e,x$i=uM,w$i=y$t,C$i=m$i,S$i=r$t,N$i=y$i,E$i=J6,D$i=rg;function k$i(t,e,n){e.length?e=eCe(e,function(o){return D$i(o)?function(s){return _$i(s,o.length===1?o[0]:o)}:o}):e=[E$i];var i=-1;e=eCe(e,S$i(x$i));var r=w$i(t,function(o,s,a){var l=eCe(e,function(c){return c(o)});return{criteria:l,index:++i,value:o}});return C$i(r,function(o,s){return N$i(o,s,n)})}var M$i=k$i;function L$i(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var T$i=L$i,I$i=T$i,edt=Math.max;function A$i(t,e,n){return e=edt(e===void 0?t.length-1:e,0),function(){for(var i=arguments,r=-1,o=edt(i.length-e,0),s=Array(o);++r<o;)s[r]=i[e+r];r=-1;for(var a=Array(e+1);++r<e;)a[r]=i[r];return a[e]=n(s),I$i(t,this,a)}}var R$i=A$i;function P$i(t){return function(){return t}}var O$i=P$i,j$i=aR,F$i=function(){try{var t=j$i(Object,"defineProperty");return t({},"",{}),t}catch{}}(),_$t=F$i,$$i=O$i,tdt=_$t,V$i=J6,B$i=tdt?function(t,e){return tdt(t,"toString",{configurable:!0,enumerable:!1,value:$$i(e),writable:!0})}:V$i,z$i=B$i,H$i=800,W$i=16,U$i=Date.now;function K$i(t){var e=0,n=0;return function(){var i=U$i(),r=W$i-(i-n);if(n=i,r>0){if(++e>=H$i)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var q$i=K$i,G$i=z$i,Y$i=q$i,X$i=Y$i(G$i),Z$i=X$i,Q$i=J6,J$i=R$i,e8i=Z$i;function t8i(t,e){return e8i(J$i(t,e,Q$i),t+"")}var n8i=t8i,i8i=e9e,r8i=Kq,o8i=m9e,s8i=cM;function a8i(t,e,n){if(!s8i(n))return!1;var i=typeof e;return(i=="number"?r8i(n)&&o8i(e,n.length):i=="string"&&e in n)?i8i(n[e],t):!1}var Ume=a8i,l8i=b$t,c8i=M$i,u8i=n8i,ndt=Ume,d8i=u8i(function(t,e){if(t==null)return[];var n=e.length;return n>1&&ndt(t,e[0],e[1])?e=[]:n>2&&ndt(e[0],e[1],e[2])&&(e=[e[0]]),c8i(t,l8i(e,1),[])}),h8i=d8i;const v9e=ao(h8i);function CW(t){"@babel/helpers - typeof";return CW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},CW(t)}function lAe(){return lAe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},lAe.apply(this,arguments)}function f8i(t,e){return b8i(t)||g8i(t,e)||p8i(t,e)||m8i()}function m8i(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p8i(t,e){if(t){if(typeof t=="string")return idt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return idt(t,e)}}function idt(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function g8i(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(u){c=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}function b8i(t){if(Array.isArray(t))return t}function rdt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function tCe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rdt(Object(n),!0).forEach(function(i){v8i(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rdt(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function v8i(t,e,n){return e=y8i(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function y8i(t){var e=_8i(t,"string");return CW(e)=="symbol"?e:e+""}function _8i(t,e){if(CW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(CW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function x8i(t){return Array.isArray(t)&&dd(t[0])&&dd(t[1])?t.join(" ~ "):t}var w8i=function(e){var n=e.separator,i=n===void 0?" : ":n,r=e.contentStyle,o=r===void 0?{}:r,s=e.itemStyle,a=s===void 0?{}:s,l=e.labelStyle,c=l===void 0?{}:l,u=e.payload,d=e.formatter,h=e.itemSorter,f=e.wrapperClassName,m=e.labelClassName,p=e.label,g=e.labelFormatter,y=e.accessibilityLayer,_=y===void 0?!1:y,w=function(){if(u&&u.length){var R={padding:0,margin:0},P=(h?v9e(u,h):u).map(function(O,V){if(O.type==="none")return null;var F=tCe({display:"block",paddingTop:4,paddingBottom:4,color:O.color||"#000"},a),$=O.formatter||d||x8i,B=O.value,z=O.name,H=B,K=z;if($&&H!=null&&K!=null){var q=$(B,z,O,V,u);if(Array.isArray(q)){var U=f8i(q,2);H=U[0],K=U[1]}else H=q}return Z.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(V),style:F},dd(K)?Z.createElement("span",{className:"recharts-tooltip-item-name"},K):null,dd(K)?Z.createElement("span",{className:"recharts-tooltip-item-separator"},i):null,Z.createElement("span",{className:"recharts-tooltip-item-value"},H),Z.createElement("span",{className:"recharts-tooltip-item-unit"},O.unit||""))});return Z.createElement("ul",{className:"recharts-tooltip-item-list",style:R},P)}return null},C=tCe({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),N=tCe({margin:0},c),E=!So(p),D=E?p:"",k=Vt("recharts-default-tooltip",f),M=Vt("recharts-tooltip-label",m);E&&g&&u!==void 0&&u!==null&&(D=g(p,u));var T=_?{role:"status","aria-live":"assertive"}:{};return Z.createElement("div",lAe({className:k,style:C},T),Z.createElement("p",{className:M,style:N},Z.isValidElement(D)?D:"".concat(D)),w())};function SW(t){"@babel/helpers - typeof";return SW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},SW(t)}function GQ(t,e,n){return e=C8i(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C8i(t){var e=S8i(t,"string");return SW(e)=="symbol"?e:e+""}function S8i(t,e){if(SW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(SW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var s7="recharts-tooltip-wrapper",N8i={visibility:"hidden"};function E8i(t){var e=t.coordinate,n=t.translateX,i=t.translateY;return Vt(s7,GQ(GQ(GQ(GQ({},"".concat(s7,"-right"),ui(n)&&e&&ui(e.x)&&n>=e.x),"".concat(s7,"-left"),ui(n)&&e&&ui(e.x)&&n<e.x),"".concat(s7,"-bottom"),ui(i)&&e&&ui(e.y)&&i>=e.y),"".concat(s7,"-top"),ui(i)&&e&&ui(e.y)&&i<e.y))}function odt(t){var e=t.allowEscapeViewBox,n=t.coordinate,i=t.key,r=t.offsetTopLeft,o=t.position,s=t.reverseDirection,a=t.tooltipDimension,l=t.viewBox,c=t.viewBoxDimension;if(o&&ui(o[i]))return o[i];var u=n[i]-a-r,d=n[i]+r;if(e[i])return s[i]?u:d;if(s[i]){var h=u,f=l[i];return h<f?Math.max(d,l[i]):Math.max(u,l[i])}var m=d+a,p=l[i]+c;return m>p?Math.max(u,l[i]):Math.max(d,l[i])}function D8i(t){var e=t.translateX,n=t.translateY,i=t.useTranslate3d;return{transform:i?"translate3d(".concat(e,"px, ").concat(n,"px, 0)"):"translate(".concat(e,"px, ").concat(n,"px)")}}function k8i(t){var e=t.allowEscapeViewBox,n=t.coordinate,i=t.offsetTopLeft,r=t.position,o=t.reverseDirection,s=t.tooltipBox,a=t.useTranslate3d,l=t.viewBox,c,u,d;return s.height>0&&s.width>0&&n?(u=odt({allowEscapeViewBox:e,coordinate:n,key:"x",offsetTopLeft:i,position:r,reverseDirection:o,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),d=odt({allowEscapeViewBox:e,coordinate:n,key:"y",offsetTopLeft:i,position:r,reverseDirection:o,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),c=D8i({translateX:u,translateY:d,useTranslate3d:a})):c=N8i,{cssProperties:c,cssClasses:E8i({translateX:u,translateY:d,coordinate:n})}}function M5(t){"@babel/helpers - typeof";return M5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M5(t)}function sdt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function adt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sdt(Object(n),!0).forEach(function(i){uAe(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sdt(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function M8i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function L8i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,w$t(i.key),i)}}function T8i(t,e,n){return e&&L8i(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function I8i(t,e,n){return e=Voe(e),A8i(t,x$t()?Reflect.construct(e,n||[],Voe(t).constructor):e.apply(t,n))}function A8i(t,e){if(e&&(M5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R8i(t)}function R8i(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function x$t(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(x$t=function(){return!!t})()}function Voe(t){return Voe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Voe(t)}function P8i(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cAe(t,e)}function cAe(t,e){return cAe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},cAe(t,e)}function uAe(t,e,n){return e=w$t(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w$t(t){var e=O8i(t,"string");return M5(e)=="symbol"?e:e+""}function O8i(t,e){if(M5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(M5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ldt=1,j8i=function(t){function e(){var n;M8i(this,e);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return n=I8i(this,e,[].concat(r)),uAe(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),uAe(n,"handleKeyDown",function(s){if(s.key==="Escape"){var a,l,c,u;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(a=(l=n.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&a!==void 0?a:0,y:(c=(u=n.props.coordinate)===null||u===void 0?void 0:u.y)!==null&&c!==void 0?c:0}})}}),n}return P8i(e,t),T8i(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var i=this.wrapperNode.getBoundingClientRect();(Math.abs(i.width-this.state.lastBoundingBox.width)>ldt||Math.abs(i.height-this.state.lastBoundingBox.height)>ldt)&&this.setState({lastBoundingBox:{width:i.width,height:i.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&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 i,r;this.props.active&&this.updateBBox(),this.state.dismissed&&(((i=this.props.coordinate)===null||i===void 0?void 0:i.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var i=this,r=this.props,o=r.active,s=r.allowEscapeViewBox,a=r.animationDuration,l=r.animationEasing,c=r.children,u=r.coordinate,d=r.hasPayload,h=r.isAnimationActive,f=r.offset,m=r.position,p=r.reverseDirection,g=r.useTranslate3d,y=r.viewBox,_=r.wrapperStyle,w=k8i({allowEscapeViewBox:s,coordinate:u,offsetTopLeft:f,position:m,reverseDirection:p,tooltipBox:this.state.lastBoundingBox,useTranslate3d:g,viewBox:y}),C=w.cssClasses,N=w.cssProperties,E=adt(adt({transition:h&&o?"transform ".concat(a,"ms ").concat(l):void 0},N),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&d?"visible":"hidden",position:"absolute",top:0,left:0},_);return Z.createElement("div",{tabIndex:-1,className:C,style:E,ref:function(k){i.wrapperNode=k}},c)}}])}(b.PureComponent),F8i=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},D0={isSsr:F8i(),get:function(e){return D0[e]},set:function(e,n){if(typeof e=="string")D0[e]=n;else{var i=Object.keys(e);i&&i.length&&i.forEach(function(r){D0[r]=e[r]})}}};function L5(t){"@babel/helpers - typeof";return L5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L5(t)}function cdt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function udt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?cdt(Object(n),!0).forEach(function(i){y9e(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cdt(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function $8i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function V8i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,S$t(i.key),i)}}function B8i(t,e,n){return e&&V8i(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function z8i(t,e,n){return e=Boe(e),H8i(t,C$t()?Reflect.construct(e,n||[],Boe(t).constructor):e.apply(t,n))}function H8i(t,e){if(e&&(L5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return W8i(t)}function W8i(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function C$t(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(C$t=function(){return!!t})()}function Boe(t){return Boe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Boe(t)}function U8i(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dAe(t,e)}function dAe(t,e){return dAe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},dAe(t,e)}function y9e(t,e,n){return e=S$t(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function S$t(t){var e=K8i(t,"string");return L5(e)=="symbol"?e:e+""}function K8i(t,e){if(L5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(L5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function q8i(t){return t.dataKey}function G8i(t,e){return Z.isValidElement(t)?Z.cloneElement(t,e):typeof t=="function"?Z.createElement(t,e):Z.createElement(w8i,e)}var up=function(t){function e(){return $8i(this,e),z8i(this,e,arguments)}return U8i(e,t),B8i(e,[{key:"render",value:function(){var i=this,r=this.props,o=r.active,s=r.allowEscapeViewBox,a=r.animationDuration,l=r.animationEasing,c=r.content,u=r.coordinate,d=r.filterNull,h=r.isAnimationActive,f=r.offset,m=r.payload,p=r.payloadUniqBy,g=r.position,y=r.reverseDirection,_=r.useTranslate3d,w=r.viewBox,C=r.wrapperStyle,N=m??[];d&&N.length&&(N=f$t(m.filter(function(D){return D.value!=null&&(D.hide!==!0||i.props.includeHidden)}),p,q8i));var E=N.length>0;return Z.createElement(j8i,{allowEscapeViewBox:s,animationDuration:a,animationEasing:l,isAnimationActive:h,active:o,coordinate:u,hasPayload:E,offset:f,position:g,reverseDirection:y,useTranslate3d:_,viewBox:w,wrapperStyle:C},G8i(c,udt(udt({},this.props),{},{payload:N})))}}])}(b.PureComponent);y9e(up,"displayName","Tooltip");y9e(up,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!D0.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 Y8i=jw,X8i=function(){return Y8i.Date.now()},Z8i=X8i,Q8i=/\s/;function J8i(t){for(var e=t.length;e--&&Q8i.test(t.charAt(e)););return e}var eVi=J8i,tVi=eVi,nVi=/^\s+/;function iVi(t){return t&&t.slice(0,tVi(t)+1).replace(nVi,"")}var rVi=iVi,oVi=rVi,ddt=cM,sVi=U6,hdt=NaN,aVi=/^[-+]0x[0-9a-f]+$/i,lVi=/^0b[01]+$/i,cVi=/^0o[0-7]+$/i,uVi=parseInt;function dVi(t){if(typeof t=="number")return t;if(sVi(t))return hdt;if(ddt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=ddt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=oVi(t);var n=lVi.test(t);return n||cVi.test(t)?uVi(t.slice(2),n?2:8):aVi.test(t)?hdt:+t}var N$t=dVi,hVi=cM,nCe=Z8i,fdt=N$t,fVi="Expected a function",mVi=Math.max,pVi=Math.min;function gVi(t,e,n){var i,r,o,s,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(fVi);e=fdt(e)||0,hVi(n)&&(u=!!n.leading,d="maxWait"in n,o=d?mVi(fdt(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(E){var D=i,k=r;return i=r=void 0,c=E,s=t.apply(k,D),s}function m(E){return c=E,a=setTimeout(y,e),u?f(E):s}function p(E){var D=E-l,k=E-c,M=e-D;return d?pVi(M,o-k):M}function g(E){var D=E-l,k=E-c;return l===void 0||D>=e||D<0||d&&k>=o}function y(){var E=nCe();if(g(E))return _(E);a=setTimeout(y,p(E))}function _(E){return a=void 0,h&&i?f(E):(i=r=void 0,s)}function w(){a!==void 0&&clearTimeout(a),c=0,i=l=r=a=void 0}function C(){return a===void 0?s:_(nCe())}function N(){var E=nCe(),D=g(E);if(i=arguments,r=this,l=E,D){if(a===void 0)return m(l);if(d)return clearTimeout(a),a=setTimeout(y,e),f(l)}return a===void 0&&(a=setTimeout(y,e)),s}return N.cancel=w,N.flush=C,N}var bVi=gVi,vVi=bVi,yVi=cM,_Vi="Expected a function";function xVi(t,e,n){var i=!0,r=!0;if(typeof t!="function")throw new TypeError(_Vi);return yVi(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),vVi(t,e,{leading:i,maxWait:e,trailing:r})}var wVi=xVi;const E$t=ao(wVi);function NW(t){"@babel/helpers - typeof";return NW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},NW(t)}function mdt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function YQ(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?mdt(Object(n),!0).forEach(function(i){CVi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mdt(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function CVi(t,e,n){return e=SVi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function SVi(t){var e=NVi(t,"string");return NW(e)=="symbol"?e:e+""}function NVi(t,e){if(NW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(NW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function EVi(t,e){return LVi(t)||MVi(t,e)||kVi(t,e)||DVi()}function DVi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kVi(t,e){if(t){if(typeof t=="string")return pdt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pdt(t,e)}}function pdt(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function MVi(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(u){c=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}function LVi(t){if(Array.isArray(t))return t}var qq=b.forwardRef(function(t,e){var n=t.aspect,i=t.initialDimension,r=i===void 0?{width:-1,height:-1}:i,o=t.width,s=o===void 0?"100%":o,a=t.height,l=a===void 0?"100%":a,c=t.minWidth,u=c===void 0?0:c,d=t.minHeight,h=t.maxHeight,f=t.children,m=t.debounce,p=m===void 0?0:m,g=t.id,y=t.className,_=t.onResize,w=t.style,C=w===void 0?{}:w,N=b.useRef(null),E=b.useRef();E.current=_,b.useImperativeHandle(e,function(){return Object.defineProperty(N.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),N.current},configurable:!0})});var D=b.useState({containerWidth:r.width,containerHeight:r.height}),k=EVi(D,2),M=k[0],T=k[1],A=b.useCallback(function(P,O){T(function(V){var F=Math.round(P),$=Math.round(O);return V.containerWidth===F&&V.containerHeight===$?V:{containerWidth:F,containerHeight:$}})},[]);b.useEffect(function(){var P=function(z){var H,K=z[0].contentRect,q=K.width,U=K.height;A(q,U),(H=E.current)===null||H===void 0||H.call(E,q,U)};p>0&&(P=E$t(P,p,{trailing:!0,leading:!1}));var O=new ResizeObserver(P),V=N.current.getBoundingClientRect(),F=V.width,$=V.height;return A(F,$),O.observe(N.current),function(){O.disconnect()}},[A,p]);var R=b.useMemo(function(){var P=M.containerWidth,O=M.containerHeight;if(P<0||O<0)return null;jC(BT(s)||BT(l),`The width(%s) and height(%s) are both fixed numbers,
       maybe you don't need to use a ResponsiveContainer.`,s,l),jC(!n||n>0,"The aspect(%s) must be greater than zero.",n);var V=BT(s)?P:s,F=BT(l)?O:l;n&&n>0&&(V?F=V/n:F&&(V=F*n),h&&F>h&&(F=h)),jC(V>0||F>0,`The width(%s) and height(%s) of chart should be greater than 0,
       please check the style of container, or the props width(%s) and height(%s),
       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
       height and width.`,V,F,s,l,u,d,n);var $=!Array.isArray(f)&&OC(f.type).endsWith("Chart");return Z.Children.map(f,function(B){return DC.isElement(B)?b.cloneElement(B,YQ({width:V,height:F},$?{style:YQ({height:"100%",width:"100%",maxHeight:F,maxWidth:V},B.props.style)}:{})):B})},[n,f,l,h,d,u,M,s]);return Z.createElement("div",{id:g?"".concat(g):void 0,className:Vt("recharts-responsive-container",y),style:YQ(YQ({},C),{},{width:s,height:l,minWidth:u,minHeight:d,maxHeight:h}),ref:N},R)}),_9e=function(e){return null};_9e.displayName="Cell";function EW(t){"@babel/helpers - typeof";return EW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},EW(t)}function gdt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function hAe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gdt(Object(n),!0).forEach(function(i){TVi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gdt(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function TVi(t,e,n){return e=IVi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function IVi(t){var e=AVi(t,"string");return EW(e)=="symbol"?e:e+""}function AVi(t,e){if(EW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(EW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var iO={widthCache:{},cacheCount:0},RVi=2e3,PVi={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},bdt="recharts_measurement_span";function OVi(t){var e=hAe({},t);return Object.keys(e).forEach(function(n){e[n]||delete e[n]}),e}var bB=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||D0.isSsr)return{width:0,height:0};var i=OVi(n),r=JSON.stringify({text:e,copyStyle:i});if(iO.widthCache[r])return iO.widthCache[r];try{var o=document.getElementById(bdt);o||(o=document.createElement("span"),o.setAttribute("id",bdt),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var s=hAe(hAe({},PVi),i);Object.assign(o.style,s),o.textContent="".concat(e);var a=o.getBoundingClientRect(),l={width:a.width,height:a.height};return iO.widthCache[r]=l,++iO.cacheCount>RVi&&(iO.cacheCount=0,iO.widthCache={}),l}catch{return{width:0,height:0}}},jVi=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function DW(t){"@babel/helpers - typeof";return DW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},DW(t)}function zoe(t,e){return BVi(t)||VVi(t,e)||$Vi(t,e)||FVi()}function FVi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $Vi(t,e){if(t){if(typeof t=="string")return vdt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vdt(t,e)}}function vdt(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function VVi(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(u){c=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}function BVi(t){if(Array.isArray(t))return t}function zVi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ydt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,WVi(i.key),i)}}function HVi(t,e,n){return e&&ydt(t.prototype,e),n&&ydt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function WVi(t){var e=UVi(t,"string");return DW(e)=="symbol"?e:e+""}function UVi(t,e){if(DW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(DW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var _dt=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,xdt=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,KVi=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,qVi=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,D$t={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},GVi=Object.keys(D$t),C4="NaN";function YVi(t,e){return t*D$t[e]}var XQ=function(){function t(e,n){zVi(this,t),this.num=e,this.unit=n,this.num=e,this.unit=n,Number.isNaN(e)&&(this.unit=""),n!==""&&!KVi.test(n)&&(this.num=NaN,this.unit=""),GVi.includes(n)&&(this.num=YVi(e,n),this.unit="px")}return HVi(t,[{key:"add",value:function(n){return this.unit!==n.unit?new t(NaN,""):new t(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new t(NaN,""):new t(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new t(NaN,""):new t(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new t(NaN,""):new t(this.num/n.num,this.unit||n.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(n){var i,r=(i=qVi.exec(n))!==null&&i!==void 0?i:[],o=zoe(r,3),s=o[1],a=o[2];return new t(parseFloat(s),a??"")}}])}();function k$t(t){if(t.includes(C4))return C4;for(var e=t;e.includes("*")||e.includes("/");){var n,i=(n=_dt.exec(e))!==null&&n!==void 0?n:[],r=zoe(i,4),o=r[1],s=r[2],a=r[3],l=XQ.parse(o??""),c=XQ.parse(a??""),u=s==="*"?l.multiply(c):l.divide(c);if(u.isNaN())return C4;e=e.replace(_dt,u.toString())}for(;e.includes("+")||/.-\d+(?:\.\d+)?/.test(e);){var d,h=(d=xdt.exec(e))!==null&&d!==void 0?d:[],f=zoe(h,4),m=f[1],p=f[2],g=f[3],y=XQ.parse(m??""),_=XQ.parse(g??""),w=p==="+"?y.add(_):y.subtract(_);if(w.isNaN())return C4;e=e.replace(xdt,w.toString())}return e}var wdt=/\(([^()]*)\)/;function XVi(t){for(var e=t;e.includes("(");){var n=wdt.exec(e),i=zoe(n,2),r=i[1];e=e.replace(wdt,k$t(r))}return e}function ZVi(t){var e=t.replace(/\s+/g,"");return e=XVi(e),e=k$t(e),e}function QVi(t){try{return ZVi(t)}catch{return C4}}function iCe(t){var e=QVi(t.slice(5,-1));return e===C4?"":e}var JVi=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],e7i=["dx","dy","angle","className","breakAll"];function fAe(){return fAe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},fAe.apply(this,arguments)}function Cdt(t,e){if(t==null)return{};var n=t7i(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function t7i(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function Sdt(t,e){return o7i(t)||r7i(t,e)||i7i(t,e)||n7i()}function n7i(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i7i(t,e){if(t){if(typeof t=="string")return Ndt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ndt(t,e)}}function Ndt(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function r7i(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(u){c=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}function o7i(t){if(Array.isArray(t))return t}var M$t=/[ \f\n\r\t\v\u2028\u2029]+/,L$t=function(e){var n=e.children,i=e.breakAll,r=e.style;try{var o=[];So(n)||(i?o=n.toString().split(""):o=n.toString().split(M$t));var s=o.map(function(l){return{word:l,width:bB(l,r).width}}),a=i?0:bB(" ",r).width;return{wordsWithComputedWidth:s,spaceWidth:a}}catch{return null}},s7i=function(e,n,i,r,o){var s=e.maxLines,a=e.children,l=e.style,c=e.breakAll,u=ui(s),d=a,h=function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return V.reduce(function(F,$){var B=$.word,z=$.width,H=F[F.length-1];if(H&&(r==null||o||H.width+z+i<Number(r)))H.words.push(B),H.width+=z+i;else{var K={words:[B],width:z};F.push(K)}return F},[])},f=h(n),m=function(V){return V.reduce(function(F,$){return F.width>$.width?F:$})};if(!u)return f;for(var p="…",g=function(V){var F=d.slice(0,V),$=L$t({breakAll:c,style:l,children:F+p}).wordsWithComputedWidth,B=h($),z=B.length>s||m(B).width>Number(r);return[z,B]},y=0,_=d.length-1,w=0,C;y<=_&&w<=d.length-1;){var N=Math.floor((y+_)/2),E=N-1,D=g(E),k=Sdt(D,2),M=k[0],T=k[1],A=g(N),R=Sdt(A,1),P=R[0];if(!M&&!P&&(y=N+1),M&&P&&(_=N-1),!M&&P){C=T;break}w++}return C||f},Edt=function(e){var n=So(e)?[]:e.toString().split(M$t);return[{words:n}]},a7i=function(e){var n=e.width,i=e.scaleToFit,r=e.children,o=e.style,s=e.breakAll,a=e.maxLines;if((n||i)&&!D0.isSsr){var l,c,u=L$t({breakAll:s,children:r,style:o});if(u){var d=u.wordsWithComputedWidth,h=u.spaceWidth;l=d,c=h}else return Edt(r);return s7i({breakAll:s,children:r,maxLines:a,style:o},l,c,n,i)}return Edt(r)},Ddt="#808080",Hoe=function(e){var n=e.x,i=n===void 0?0:n,r=e.y,o=r===void 0?0:r,s=e.lineHeight,a=s===void 0?"1em":s,l=e.capHeight,c=l===void 0?"0.71em":l,u=e.scaleToFit,d=u===void 0?!1:u,h=e.textAnchor,f=h===void 0?"start":h,m=e.verticalAnchor,p=m===void 0?"end":m,g=e.fill,y=g===void 0?Ddt:g,_=Cdt(e,JVi),w=b.useMemo(function(){return a7i({breakAll:_.breakAll,children:_.children,maxLines:_.maxLines,scaleToFit:d,style:_.style,width:_.width})},[_.breakAll,_.children,_.maxLines,d,_.style,_.width]),C=_.dx,N=_.dy,E=_.angle,D=_.className,k=_.breakAll,M=Cdt(_,e7i);if(!dd(i)||!dd(o))return null;var T=i+(ui(C)?C:0),A=o+(ui(N)?N:0),R;switch(p){case"start":R=iCe("calc(".concat(c,")"));break;case"middle":R=iCe("calc(".concat((w.length-1)/2," * -").concat(a," + (").concat(c," / 2))"));break;default:R=iCe("calc(".concat(w.length-1," * -").concat(a,")"));break}var P=[];if(d){var O=w[0].width,V=_.width;P.push("scale(".concat((ui(V)?V/O:1)/O,")"))}return E&&P.push("rotate(".concat(E,", ").concat(T,", ").concat(A,")")),P.length&&(M.transform=P.join(" ")),Z.createElement("text",fAe({},Co(M,!0),{x:T,y:A,className:Vt("recharts-text",D),textAnchor:f,fill:y.includes("url")?Ddt:y}),w.map(function(F,$){var B=F.words.join(k?"":" ");return Z.createElement("tspan",{x:T,dy:$===0?R:a,key:"".concat(B,"-").concat($)},B)}))};function xD(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function l7i(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function x9e(t){let e,n,i;t.length!==2?(e=xD,n=(a,l)=>xD(t(a),l),i=(a,l)=>t(a)-l):(e=t===xD||t===l7i?t:c7i,n=t,i=t);function r(a,l,c=0,u=a.length){if(c<u){if(e(l,l)!==0)return u;do{const d=c+u>>>1;n(a[d],l)<0?c=d+1:u=d}while(c<u)}return c}function o(a,l,c=0,u=a.length){if(c<u){if(e(l,l)!==0)return u;do{const d=c+u>>>1;n(a[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function s(a,l,c=0,u=a.length){const d=r(a,l,c,u-1);return d>c&&i(a[d-1],l)>-i(a[d],l)?d-1:d}return{left:r,center:s,right:o}}function c7i(){return 0}function T$t(t){return t===null?NaN:+t}function*u7i(t,e){for(let n of t)n!=null&&(n=+n)>=n&&(yield n)}const d7i=x9e(xD),Gq=d7i.right;x9e(T$t).center;class kdt extends Map{constructor(e,n=m7i){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[i,r]of e)this.set(i,r)}get(e){return super.get(Mdt(this,e))}has(e){return super.has(Mdt(this,e))}set(e,n){return super.set(h7i(this,e),n)}delete(e){return super.delete(f7i(this,e))}}function Mdt({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function h7i({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function f7i({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function m7i(t){return t!==null&&typeof t=="object"?t.valueOf():t}function p7i(t=xD){if(t===xD)return I$t;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const i=t(e,n);return i||i===0?i:(t(n,n)===0)-(t(e,e)===0)}}function I$t(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const g7i=Math.sqrt(50),b7i=Math.sqrt(10),v7i=Math.sqrt(2);function Woe(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r),s=o>=g7i?10:o>=b7i?5:o>=v7i?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?Woe(t,e,n*2):[a,l,c]}function mAe(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const i=e<t,[r,o,s]=i?Woe(e,t,n):Woe(t,e,n);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(i)if(s<0)for(let c=0;c<a;++c)l[c]=(o-c)/-s;else for(let c=0;c<a;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(r+c)/-s;else for(let c=0;c<a;++c)l[c]=(r+c)*s;return l}function pAe(t,e,n){return e=+e,t=+t,n=+n,Woe(t,e,n)[2]}function gAe(t,e,n){e=+e,t=+t,n=+n;const i=e<t,r=i?pAe(e,t,n):pAe(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}function Ldt(t,e){let n;for(const i of t)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);return n}function Tdt(t,e){let n;for(const i of t)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);return n}function A$t(t,e,n=0,i=1/0,r){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),i=Math.floor(Math.min(t.length-1,i)),!(n<=e&&e<=i))return t;for(r=r===void 0?I$t:p7i(r);i>n;){if(i-n>600){const l=i-n+1,c=e-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),f=Math.max(n,Math.floor(e-c*d/l+h)),m=Math.min(i,Math.floor(e+(l-c)*d/l+h));A$t(t,e,f,m,r)}const o=t[e];let s=n,a=i;for(a7(t,n,e),r(t[i],o)>0&&a7(t,n,i);s<a;){for(a7(t,s,a),++s,--a;r(t[s],o)<0;)++s;for(;r(t[a],o)>0;)--a}r(t[n],o)===0?a7(t,n,a):(++a,a7(t,a,i)),a<=e&&(n=a+1),e<=a&&(i=a-1)}return t}function a7(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function y7i(t,e,n){if(t=Float64Array.from(u7i(t)),!(!(i=t.length)||isNaN(e=+e))){if(e<=0||i<2)return Tdt(t);if(e>=1)return Ldt(t);var i,r=(i-1)*e,o=Math.floor(r),s=Ldt(A$t(t,o).subarray(0,o+1)),a=Tdt(t.subarray(o+1));return s+(a-s)*(r-o)}}function _7i(t,e,n=T$t){if(!(!(i=t.length)||isNaN(e=+e))){if(e<=0||i<2)return+n(t[0],0,t);if(e>=1)return+n(t[i-1],i-1,t);var i,r=(i-1)*e,o=Math.floor(r),s=+n(t[o],o,t),a=+n(t[o+1],o+1,t);return s+(a-s)*(r-o)}}function x7i(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(r);++i<r;)o[i]=t+i*n;return o}function Zv(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function QS(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const bAe=Symbol("implicit");function w9e(){var t=new kdt,e=[],n=[],i=bAe;function r(o){let s=t.get(o);if(s===void 0){if(i!==bAe)return i;t.set(o,s=e.push(o)-1)}return n[s%n.length]}return r.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new kdt;for(const s of o)t.has(s)||t.set(s,e.push(s)-1);return r},r.range=function(o){return arguments.length?(n=Array.from(o),r):n.slice()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return w9e(e,n).unknown(i)},Zv.apply(r,arguments),r}function kW(){var t=w9e().unknown(void 0),e=t.domain,n=t.range,i=0,r=1,o,s,a=!1,l=0,c=0,u=.5;delete t.unknown;function d(){var h=e().length,f=r<i,m=f?r:i,p=f?i:r;o=(p-m)/Math.max(1,h-l+c*2),a&&(o=Math.floor(o)),m+=(p-m-o*(h-l))*u,s=o*(1-l),a&&(m=Math.round(m),s=Math.round(s));var g=x7i(h).map(function(y){return m+o*y});return n(f?g.reverse():g)}return t.domain=function(h){return arguments.length?(e(h),d()):e()},t.range=function(h){return arguments.length?([i,r]=h,i=+i,r=+r,d()):[i,r]},t.rangeRound=function(h){return[i,r]=h,i=+i,r=+r,a=!0,d()},t.bandwidth=function(){return s},t.step=function(){return o},t.round=function(h){return arguments.length?(a=!!h,d()):a},t.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),d()):l},t.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},t.paddingOuter=function(h){return arguments.length?(c=+h,d()):c},t.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},t.copy=function(){return kW(e(),[i,r]).round(a).paddingInner(l).paddingOuter(c).align(u)},Zv.apply(d(),arguments)}function R$t(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return R$t(e())},t}function vB(){return R$t(kW.apply(null,arguments).paddingInner(1))}function C9e(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function P$t(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Yq(){}var MW=.7,Uoe=1/MW,$3="\\s*([+-]?\\d+)\\s*",LW="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qx="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",w7i=/^#([0-9a-f]{3,8})$/,C7i=new RegExp(`^rgb\\(${$3},${$3},${$3}\\)$`),S7i=new RegExp(`^rgb\\(${qx},${qx},${qx}\\)$`),N7i=new RegExp(`^rgba\\(${$3},${$3},${$3},${LW}\\)$`),E7i=new RegExp(`^rgba\\(${qx},${qx},${qx},${LW}\\)$`),D7i=new RegExp(`^hsl\\(${LW},${qx},${qx}\\)$`),k7i=new RegExp(`^hsla\\(${LW},${qx},${qx},${LW}\\)$`),Idt={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};C9e(Yq,TW,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Adt,formatHex:Adt,formatHex8:M7i,formatHsl:L7i,formatRgb:Rdt,toString:Rdt});function Adt(){return this.rgb().formatHex()}function M7i(){return this.rgb().formatHex8()}function L7i(){return O$t(this).formatHsl()}function Rdt(){return this.rgb().formatRgb()}function TW(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=w7i.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Pdt(e):n===3?new Cp(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ZQ(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ZQ(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=C7i.exec(t))?new Cp(e[1],e[2],e[3],1):(e=S7i.exec(t))?new Cp(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=N7i.exec(t))?ZQ(e[1],e[2],e[3],e[4]):(e=E7i.exec(t))?ZQ(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=D7i.exec(t))?Fdt(e[1],e[2]/100,e[3]/100,1):(e=k7i.exec(t))?Fdt(e[1],e[2]/100,e[3]/100,e[4]):Idt.hasOwnProperty(t)?Pdt(Idt[t]):t==="transparent"?new Cp(NaN,NaN,NaN,0):null}function Pdt(t){return new Cp(t>>16&255,t>>8&255,t&255,1)}function ZQ(t,e,n,i){return i<=0&&(t=e=n=NaN),new Cp(t,e,n,i)}function T7i(t){return t instanceof Yq||(t=TW(t)),t?(t=t.rgb(),new Cp(t.r,t.g,t.b,t.opacity)):new Cp}function vAe(t,e,n,i){return arguments.length===1?T7i(t):new Cp(t,e,n,i??1)}function Cp(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}C9e(Cp,vAe,P$t(Yq,{brighter(t){return t=t==null?Uoe:Math.pow(Uoe,t),new Cp(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?MW:Math.pow(MW,t),new Cp(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Cp(pI(this.r),pI(this.g),pI(this.b),Koe(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:Odt,formatHex:Odt,formatHex8:I7i,formatRgb:jdt,toString:jdt}));function Odt(){return`#${zT(this.r)}${zT(this.g)}${zT(this.b)}`}function I7i(){return`#${zT(this.r)}${zT(this.g)}${zT(this.b)}${zT((isNaN(this.opacity)?1:this.opacity)*255)}`}function jdt(){const t=Koe(this.opacity);return`${t===1?"rgb(":"rgba("}${pI(this.r)}, ${pI(this.g)}, ${pI(this.b)}${t===1?")":`, ${t})`}`}function Koe(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function pI(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function zT(t){return t=pI(t),(t<16?"0":"")+t.toString(16)}function Fdt(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new n0(t,e,n,i)}function O$t(t){if(t instanceof n0)return new n0(t.h,t.s,t.l,t.opacity);if(t instanceof Yq||(t=TW(t)),!t)return new n0;if(t instanceof n0)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(e===o?s=(n-i)/a+(n<i)*6:n===o?s=(i-e)/a+2:s=(e-n)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new n0(s,a,l,t.opacity)}function A7i(t,e,n,i){return arguments.length===1?O$t(t):new n0(t,e,n,i??1)}function n0(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}C9e(n0,A7i,P$t(Yq,{brighter(t){return t=t==null?Uoe:Math.pow(Uoe,t),new n0(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?MW:Math.pow(MW,t),new n0(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Cp(rCe(t>=240?t-240:t+120,r,i),rCe(t,r,i),rCe(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new n0($dt(this.h),QQ(this.s),QQ(this.l),Koe(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 t=Koe(this.opacity);return`${t===1?"hsl(":"hsla("}${$dt(this.h)}, ${QQ(this.s)*100}%, ${QQ(this.l)*100}%${t===1?")":`, ${t})`}`}}));function $dt(t){return t=(t||0)%360,t<0?t+360:t}function QQ(t){return Math.max(0,Math.min(1,t||0))}function rCe(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const S9e=t=>()=>t;function R7i(t,e){return function(n){return t+n*e}}function P7i(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function O7i(t){return(t=+t)==1?j$t:function(e,n){return n-e?P7i(e,n,t):S9e(isNaN(e)?n:e)}}function j$t(t,e){var n=e-t;return n?R7i(t,n):S9e(isNaN(t)?e:t)}const Vdt=function t(e){var n=O7i(e);function i(r,o){var s=n((r=vAe(r)).r,(o=vAe(o)).r),a=n(r.g,o.g),l=n(r.b,o.b),c=j$t(r.opacity,o.opacity);return function(u){return r.r=s(u),r.g=a(u),r.b=l(u),r.opacity=c(u),r+""}}return i.gamma=t,i}(1);function j7i(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,i=e.slice(),r;return function(o){for(r=0;r<n;++r)i[r]=t[r]*(1-o)+e[r]*o;return i}}function F7i(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function $7i(t,e){var n=e?e.length:0,i=t?Math.min(n,t.length):0,r=new Array(i),o=new Array(n),s;for(s=0;s<i;++s)r[s]=e$(t[s],e[s]);for(;s<n;++s)o[s]=e[s];return function(a){for(s=0;s<i;++s)o[s]=r[s](a);return o}}function V7i(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function qoe(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function B7i(t,e){var n={},i={},r;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(r in e)r in t?n[r]=e$(t[r],e[r]):i[r]=e[r];return function(o){for(r in n)i[r]=n[r](o);return i}}var yAe=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,oCe=new RegExp(yAe.source,"g");function z7i(t){return function(){return t}}function H7i(t){return function(e){return t(e)+""}}function W7i(t,e){var n=yAe.lastIndex=oCe.lastIndex=0,i,r,o,s=-1,a=[],l=[];for(t=t+"",e=e+"";(i=yAe.exec(t))&&(r=oCe.exec(e));)(o=r.index)>n&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:qoe(i,r)})),n=oCe.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?H7i(l[0].x):z7i(e):(e=l.length,function(c){for(var u=0,d;u<e;++u)a[(d=l[u]).i]=d.x(c);return a.join("")})}function e$(t,e){var n=typeof e,i;return e==null||n==="boolean"?S9e(e):(n==="number"?qoe:n==="string"?(i=TW(e))?(e=i,Vdt):W7i:e instanceof TW?Vdt:e instanceof Date?V7i:F7i(e)?j7i:Array.isArray(e)?$7i:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?B7i:qoe)(t,e)}function N9e(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function U7i(t,e){e===void 0&&(e=t,t=e$);for(var n=0,i=e.length-1,r=e[0],o=new Array(i<0?0:i);n<i;)o[n]=t(r,r=e[++n]);return function(s){var a=Math.max(0,Math.min(i-1,Math.floor(s*=i)));return o[a](s-a)}}function K7i(t){return function(){return t}}function Goe(t){return+t}var Bdt=[0,1];function bm(t){return t}function _Ae(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:K7i(isNaN(e)?NaN:.5)}function q7i(t,e){var n;return t>e&&(n=t,t=e,e=n),function(i){return Math.max(t,Math.min(e,i))}}function G7i(t,e,n){var i=t[0],r=t[1],o=e[0],s=e[1];return r<i?(i=_Ae(r,i),o=n(s,o)):(i=_Ae(i,r),o=n(o,s)),function(a){return o(i(a))}}function Y7i(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),o=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)r[s]=_Ae(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(a){var l=Gq(t,a,1,i)-1;return o[l](r[l](a))}}function Xq(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Kme(){var t=Bdt,e=Bdt,n=e$,i,r,o,s=bm,a,l,c;function u(){var h=Math.min(t.length,e.length);return s!==bm&&(s=q7i(t[0],t[h-1])),a=h>2?Y7i:G7i,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?o:(l||(l=a(t.map(i),e,n)))(i(s(h)))}return d.invert=function(h){return s(r((c||(c=a(e,t.map(i),qoe)))(h)))},d.domain=function(h){return arguments.length?(t=Array.from(h,Goe),u()):t.slice()},d.range=function(h){return arguments.length?(e=Array.from(h),u()):e.slice()},d.rangeRound=function(h){return e=Array.from(h),n=N9e,u()},d.clamp=function(h){return arguments.length?(s=h?!0:bm,u()):s!==bm},d.interpolate=function(h){return arguments.length?(n=h,u()):n},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,f){return i=h,r=f,u()}}function E9e(){return Kme()(bm,bm)}function X7i(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Yoe(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function T5(t){return t=Yoe(Math.abs(t)),t?t[1]:NaN}function Z7i(t,e){return function(n,i){for(var r=n.length,o=[],s=0,a=t[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(n.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}function Q7i(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var J7i=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function IW(t){if(!(e=J7i.exec(t)))throw new Error("invalid format: "+t);var e;return new D9e({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}IW.prototype=D9e.prototype;function D9e(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}D9e.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function e9i(t){e:for(var e=t.length,n=1,i=-1,r;n<e;++n)switch(t[n]){case".":i=r=n;break;case"0":i===0&&(i=n),r=n;break;default:if(!+t[n])break e;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(r+1):t}var F$t;function t9i(t,e){var n=Yoe(t,e);if(!n)return t+"";var i=n[0],r=n[1],o=r-(F$t=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Yoe(t,Math.max(0,e+o-1))[0]}function zdt(t,e){var n=Yoe(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const Hdt={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:X7i,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>zdt(t*100,e),r:zdt,s:t9i,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Wdt(t){return t}var Udt=Array.prototype.map,Kdt=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function n9i(t){var e=t.grouping===void 0||t.thousands===void 0?Wdt:Z7i(Udt.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",r=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?Wdt:Q7i(Udt.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(d){d=IW(d);var h=d.fill,f=d.align,m=d.sign,p=d.symbol,g=d.zero,y=d.width,_=d.comma,w=d.precision,C=d.trim,N=d.type;N==="n"?(_=!0,N="g"):Hdt[N]||(w===void 0&&(w=12),C=!0,N="g"),(g||h==="0"&&f==="=")&&(g=!0,h="0",f="=");var E=p==="$"?n:p==="#"&&/[boxX]/.test(N)?"0"+N.toLowerCase():"",D=p==="$"?i:/[%p]/.test(N)?s:"",k=Hdt[N],M=/[defgprs%]/.test(N);w=w===void 0?6:/[gprs]/.test(N)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function T(A){var R=E,P=D,O,V,F;if(N==="c")P=k(A)+P,A="";else{A=+A;var $=A<0||1/A<0;if(A=isNaN(A)?l:k(Math.abs(A),w),C&&(A=e9i(A)),$&&+A==0&&m!=="+"&&($=!1),R=($?m==="("?m:a:m==="-"||m==="("?"":m)+R,P=(N==="s"?Kdt[8+F$t/3]:"")+P+($&&m==="("?")":""),M){for(O=-1,V=A.length;++O<V;)if(F=A.charCodeAt(O),48>F||F>57){P=(F===46?r+A.slice(O+1):A.slice(O))+P,A=A.slice(0,O);break}}}_&&!g&&(A=e(A,1/0));var B=R.length+A.length+P.length,z=B<y?new Array(y-B+1).join(h):"";switch(_&&g&&(A=e(z+A,z.length?y-P.length:1/0),z=""),f){case"<":A=R+A+P+z;break;case"=":A=R+z+A+P;break;case"^":A=z.slice(0,B=z.length>>1)+R+A+P+z.slice(B);break;default:A=z+R+A+P;break}return o(A)}return T.toString=function(){return d+""},T}function u(d,h){var f=c((d=IW(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(T5(h)/3)))*3,p=Math.pow(10,-m),g=Kdt[8+m/3];return function(y){return f(p*y)+g}}return{format:c,formatPrefix:u}}var JQ,k9e,$$t;i9i({thousands:",",grouping:[3],currency:["$",""]});function i9i(t){return JQ=n9i(t),k9e=JQ.format,$$t=JQ.formatPrefix,JQ}function r9i(t){return Math.max(0,-T5(Math.abs(t)))}function o9i(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(T5(e)/3)))*3-T5(Math.abs(t)))}function s9i(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,T5(e)-T5(t))+1}function V$t(t,e,n,i){var r=gAe(t,e,n),o;switch(i=IW(i??",f"),i.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(o=o9i(r,s))&&(i.precision=o),$$t(i,s)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(o=s9i(r,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=o-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(o=r9i(r))&&(i.precision=o-(i.type==="%")*2);break}}return k9e(i)}function dM(t){var e=t.domain;return t.ticks=function(n){var i=e();return mAe(i[0],i[i.length-1],n??10)},t.tickFormat=function(n,i){var r=e();return V$t(r[0],r[r.length-1],n??10,i)},t.nice=function(n){n==null&&(n=10);var i=e(),r=0,o=i.length-1,s=i[r],a=i[o],l,c,u=10;for(a<s&&(c=s,s=a,a=c,c=r,r=o,o=c);u-- >0;){if(c=pAe(s,a,n),c===l)return i[r]=s,i[o]=a,e(i);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function Xoe(){var t=E9e();return t.copy=function(){return Xq(t,Xoe())},Zv.apply(t,arguments),dM(t)}function B$t(t){var e;function n(i){return i==null||isNaN(i=+i)?e:i}return n.invert=n,n.domain=n.range=function(i){return arguments.length?(t=Array.from(i,Goe),n):t.slice()},n.unknown=function(i){return arguments.length?(e=i,n):e},n.copy=function(){return B$t(t).unknown(e)},t=arguments.length?Array.from(t,Goe):[0,1],dM(n)}function z$t(t,e){t=t.slice();var n=0,i=t.length-1,r=t[n],o=t[i],s;return o<r&&(s=n,n=i,i=s,s=r,r=o,o=s),t[n]=e.floor(r),t[i]=e.ceil(o),t}function qdt(t){return Math.log(t)}function Gdt(t){return Math.exp(t)}function a9i(t){return-Math.log(-t)}function l9i(t){return-Math.exp(-t)}function c9i(t){return isFinite(t)?+("1e"+t):t<0?0:t}function u9i(t){return t===10?c9i:t===Math.E?Math.exp:e=>Math.pow(t,e)}function d9i(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Ydt(t){return(e,n)=>-t(-e,n)}function M9e(t){const e=t(qdt,Gdt),n=e.domain;let i=10,r,o;function s(){return r=d9i(i),o=u9i(i),n()[0]<0?(r=Ydt(r),o=Ydt(o),t(a9i,l9i)):t(qdt,Gdt),e}return e.base=function(a){return arguments.length?(i=+a,s()):i},e.domain=function(a){return arguments.length?(n(a),s()):n()},e.ticks=a=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let h=r(c),f=r(u),m,p;const g=a==null?10:+a;let y=[];if(!(i%1)&&f-h<g){if(h=Math.floor(h),f=Math.ceil(f),c>0){for(;h<=f;++h)for(m=1;m<i;++m)if(p=h<0?m/o(-h):m*o(h),!(p<c)){if(p>u)break;y.push(p)}}else for(;h<=f;++h)for(m=i-1;m>=1;--m)if(p=h>0?m/o(-h):m*o(h),!(p<c)){if(p>u)break;y.push(p)}y.length*2<g&&(y=mAe(c,u,g))}else y=mAe(h,f,Math.min(f-h,g)).map(o);return d?y.reverse():y},e.tickFormat=(a,l)=>{if(a==null&&(a=10),l==null&&(l=i===10?"s":","),typeof l!="function"&&(!(i%1)&&(l=IW(l)).precision==null&&(l.trim=!0),l=k9e(l)),a===1/0)return l;const c=Math.max(1,i*a/e.ticks().length);return u=>{let d=u/o(Math.round(r(u)));return d*i<i-.5&&(d*=i),d<=c?l(u):""}},e.nice=()=>n(z$t(n(),{floor:a=>o(Math.floor(r(a))),ceil:a=>o(Math.ceil(r(a)))})),e}function H$t(){const t=M9e(Kme()).domain([1,10]);return t.copy=()=>Xq(t,H$t()).base(t.base()),Zv.apply(t,arguments),t}function Xdt(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Zdt(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function L9e(t){var e=1,n=t(Xdt(e),Zdt(e));return n.constant=function(i){return arguments.length?t(Xdt(e=+i),Zdt(e)):e},dM(n)}function W$t(){var t=L9e(Kme());return t.copy=function(){return Xq(t,W$t()).constant(t.constant())},Zv.apply(t,arguments)}function Qdt(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function h9i(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function f9i(t){return t<0?-t*t:t*t}function T9e(t){var e=t(bm,bm),n=1;function i(){return n===1?t(bm,bm):n===.5?t(h9i,f9i):t(Qdt(n),Qdt(1/n))}return e.exponent=function(r){return arguments.length?(n=+r,i()):n},dM(e)}function I9e(){var t=T9e(Kme());return t.copy=function(){return Xq(t,I9e()).exponent(t.exponent())},Zv.apply(t,arguments),t}function m9i(){return I9e.apply(null,arguments).exponent(.5)}function Jdt(t){return Math.sign(t)*t*t}function p9i(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function U$t(){var t=E9e(),e=[0,1],n=!1,i;function r(o){var s=p9i(t(o));return isNaN(s)?i:n?Math.round(s):s}return r.invert=function(o){return t.invert(Jdt(o))},r.domain=function(o){return arguments.length?(t.domain(o),r):t.domain()},r.range=function(o){return arguments.length?(t.range((e=Array.from(o,Goe)).map(Jdt)),r):e.slice()},r.rangeRound=function(o){return r.range(o).round(!0)},r.round=function(o){return arguments.length?(n=!!o,r):n},r.clamp=function(o){return arguments.length?(t.clamp(o),r):t.clamp()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return U$t(t.domain(),e).round(n).clamp(t.clamp()).unknown(i)},Zv.apply(r,arguments),dM(r)}function K$t(){var t=[],e=[],n=[],i;function r(){var s=0,a=Math.max(1,e.length);for(n=new Array(a-1);++s<a;)n[s-1]=_7i(t,s/a);return o}function o(s){return s==null||isNaN(s=+s)?i:e[Gq(n,s)]}return o.invertExtent=function(s){var a=e.indexOf(s);return a<0?[NaN,NaN]:[a>0?n[a-1]:t[0],a<n.length?n[a]:t[t.length-1]]},o.domain=function(s){if(!arguments.length)return t.slice();t=[];for(let a of s)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(xD),r()},o.range=function(s){return arguments.length?(e=Array.from(s),r()):e.slice()},o.unknown=function(s){return arguments.length?(i=s,o):i},o.quantiles=function(){return n.slice()},o.copy=function(){return K$t().domain(t).range(e).unknown(i)},Zv.apply(o,arguments)}function q$t(){var t=0,e=1,n=1,i=[.5],r=[0,1],o;function s(l){return l!=null&&l<=l?r[Gq(i,l,0,n)]:o}function a(){var l=-1;for(i=new Array(n);++l<n;)i[l]=((l+1)*e-(l-n)*t)/(n+1);return s}return s.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,a()):[t,e]},s.range=function(l){return arguments.length?(n=(r=Array.from(l)).length-1,a()):r.slice()},s.invertExtent=function(l){var c=r.indexOf(l);return c<0?[NaN,NaN]:c<1?[t,i[0]]:c>=n?[i[n-1],e]:[i[c-1],i[c]]},s.unknown=function(l){return arguments.length&&(o=l),s},s.thresholds=function(){return i.slice()},s.copy=function(){return q$t().domain([t,e]).range(r).unknown(o)},Zv.apply(dM(s),arguments)}function G$t(){var t=[.5],e=[0,1],n,i=1;function r(o){return o!=null&&o<=o?e[Gq(t,o,0,i)]:n}return r.domain=function(o){return arguments.length?(t=Array.from(o),i=Math.min(t.length,e.length-1),r):t.slice()},r.range=function(o){return arguments.length?(e=Array.from(o),i=Math.min(t.length,e.length-1),r):e.slice()},r.invertExtent=function(o){var s=e.indexOf(o);return[t[s-1],t[s]]},r.unknown=function(o){return arguments.length?(n=o,r):n},r.copy=function(){return G$t().domain(t).range(e).unknown(n)},Zv.apply(r,arguments)}const sCe=new Date,aCe=new Date;function Ed(t,e,n,i){function r(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return r.floor=o=>(t(o=new Date(+o)),o),r.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),r.round=o=>{const s=r(o),a=r.ceil(o);return o-s<a-o?s:a},r.offset=(o,s)=>(e(o=new Date(+o),s==null?1:Math.floor(s)),o),r.range=(o,s,a)=>{const l=[];if(o=r.ceil(o),a=a==null?1:Math.floor(a),!(o<s)||!(a>0))return l;let c;do l.push(c=new Date(+o)),e(o,a),t(o);while(c<o&&o<s);return l},r.filter=o=>Ed(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!o(s););else for(;--a>=0;)for(;e(s,1),!o(s););}),n&&(r.count=(o,s)=>(sCe.setTime(+o),aCe.setTime(+s),t(sCe),t(aCe),Math.floor(n(sCe,aCe))),r.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?r.filter(i?s=>i(s)%o===0:s=>r.count(0,s)%o===0):r)),r}const Zoe=Ed(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Zoe.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Ed(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Zoe);Zoe.range;const hC=1e3,hv=hC*60,fC=hv*60,vS=fC*24,A9e=vS*7,eht=vS*30,lCe=vS*365,HT=Ed(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*hC)},(t,e)=>(e-t)/hC,t=>t.getUTCSeconds());HT.range;const R9e=Ed(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*hC)},(t,e)=>{t.setTime(+t+e*hv)},(t,e)=>(e-t)/hv,t=>t.getMinutes());R9e.range;const P9e=Ed(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*hv)},(t,e)=>(e-t)/hv,t=>t.getUTCMinutes());P9e.range;const O9e=Ed(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*hC-t.getMinutes()*hv)},(t,e)=>{t.setTime(+t+e*fC)},(t,e)=>(e-t)/fC,t=>t.getHours());O9e.range;const j9e=Ed(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*fC)},(t,e)=>(e-t)/fC,t=>t.getUTCHours());j9e.range;const Zq=Ed(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*hv)/vS,t=>t.getDate()-1);Zq.range;const qme=Ed(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/vS,t=>t.getUTCDate()-1);qme.range;const Y$t=Ed(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/vS,t=>Math.floor(t/vS));Y$t.range;function cR(t){return Ed(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*hv)/A9e)}const Gme=cR(0),Qoe=cR(1),g9i=cR(2),b9i=cR(3),I5=cR(4),v9i=cR(5),y9i=cR(6);Gme.range;Qoe.range;g9i.range;b9i.range;I5.range;v9i.range;y9i.range;function uR(t){return Ed(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/A9e)}const Yme=uR(0),Joe=uR(1),_9i=uR(2),x9i=uR(3),A5=uR(4),w9i=uR(5),C9i=uR(6);Yme.range;Joe.range;_9i.range;x9i.range;A5.range;w9i.range;C9i.range;const F9e=Ed(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());F9e.range;const $9e=Ed(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());$9e.range;const yS=Ed(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());yS.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ed(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});yS.range;const _S=Ed(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());_S.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ed(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});_S.range;function X$t(t,e,n,i,r,o){const s=[[HT,1,hC],[HT,5,5*hC],[HT,15,15*hC],[HT,30,30*hC],[o,1,hv],[o,5,5*hv],[o,15,15*hv],[o,30,30*hv],[r,1,fC],[r,3,3*fC],[r,6,6*fC],[r,12,12*fC],[i,1,vS],[i,2,2*vS],[n,1,A9e],[e,1,eht],[e,3,3*eht],[t,1,lCe]];function a(c,u,d){const h=u<c;h&&([c,u]=[u,c]);const f=d&&typeof d.range=="function"?d:l(c,u,d),m=f?f.range(c,+u+1):[];return h?m.reverse():m}function l(c,u,d){const h=Math.abs(u-c)/d,f=x9e(([,,g])=>g).right(s,h);if(f===s.length)return t.every(gAe(c/lCe,u/lCe,d));if(f===0)return Zoe.every(Math.max(gAe(c,u,d),1));const[m,p]=s[h/s[f-1][2]<s[f][2]/h?f-1:f];return m.every(p)}return[a,l]}const[S9i,N9i]=X$t(_S,$9e,Yme,Y$t,j9e,P9e),[E9i,D9i]=X$t(yS,F9e,Gme,Zq,O9e,R9e);function cCe(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function uCe(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function l7(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function k9i(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=c7(r),u=u7(r),d=c7(o),h=u7(o),f=c7(s),m=u7(s),p=c7(a),g=u7(a),y=c7(l),_=u7(l),w={a:$,A:B,b:z,B:H,c:null,d:sht,e:sht,f:Z9i,g:aBi,G:cBi,H:G9i,I:Y9i,j:X9i,L:Z$t,m:Q9i,M:J9i,p:K,q,Q:cht,s:uht,S:eBi,u:tBi,U:nBi,V:iBi,w:rBi,W:oBi,x:null,X:null,y:sBi,Y:lBi,Z:uBi,"%":lht},C={a:U,A:Y,b:J,B:ae,c:null,d:aht,e:aht,f:mBi,g:SBi,G:EBi,H:dBi,I:hBi,j:fBi,L:J$t,m:pBi,M:gBi,p:se,q:oe,Q:cht,s:uht,S:bBi,u:vBi,U:yBi,V:_Bi,w:xBi,W:wBi,x:null,X:null,y:CBi,Y:NBi,Z:DBi,"%":lht},N={a:T,A,b:R,B:P,c:O,d:rht,e:rht,f:W9i,g:iht,G:nht,H:oht,I:oht,j:V9i,L:H9i,m:$9i,M:B9i,p:M,q:F9i,Q:K9i,s:q9i,S:z9i,u:A9i,U:R9i,V:P9i,w:I9i,W:O9i,x:V,X:F,y:iht,Y:nht,Z:j9i,"%":U9i};w.x=E(n,w),w.X=E(i,w),w.c=E(e,w),C.x=E(n,C),C.X=E(i,C),C.c=E(e,C);function E(fe,de){return function(ie){var Q=[],be=-1,le=0,Ne=fe.length,Le,Te,De;for(ie instanceof Date||(ie=new Date(+ie));++be<Ne;)fe.charCodeAt(be)===37&&(Q.push(fe.slice(le,be)),(Te=tht[Le=fe.charAt(++be)])!=null?Le=fe.charAt(++be):Te=Le==="e"?" ":"0",(De=de[Le])&&(Le=De(ie,Te)),Q.push(Le),le=be+1);return Q.push(fe.slice(le,be)),Q.join("")}}function D(fe,de){return function(ie){var Q=l7(1900,void 0,1),be=k(Q,fe,ie+="",0),le,Ne;if(be!=ie.length)return null;if("Q"in Q)return new Date(Q.Q);if("s"in Q)return new Date(Q.s*1e3+("L"in Q?Q.L:0));if(de&&!("Z"in Q)&&(Q.Z=0),"p"in Q&&(Q.H=Q.H%12+Q.p*12),Q.m===void 0&&(Q.m="q"in Q?Q.q:0),"V"in Q){if(Q.V<1||Q.V>53)return null;"w"in Q||(Q.w=1),"Z"in Q?(le=uCe(l7(Q.y,0,1)),Ne=le.getUTCDay(),le=Ne>4||Ne===0?Joe.ceil(le):Joe(le),le=qme.offset(le,(Q.V-1)*7),Q.y=le.getUTCFullYear(),Q.m=le.getUTCMonth(),Q.d=le.getUTCDate()+(Q.w+6)%7):(le=cCe(l7(Q.y,0,1)),Ne=le.getDay(),le=Ne>4||Ne===0?Qoe.ceil(le):Qoe(le),le=Zq.offset(le,(Q.V-1)*7),Q.y=le.getFullYear(),Q.m=le.getMonth(),Q.d=le.getDate()+(Q.w+6)%7)}else("W"in Q||"U"in Q)&&("w"in Q||(Q.w="u"in Q?Q.u%7:"W"in Q?1:0),Ne="Z"in Q?uCe(l7(Q.y,0,1)).getUTCDay():cCe(l7(Q.y,0,1)).getDay(),Q.m=0,Q.d="W"in Q?(Q.w+6)%7+Q.W*7-(Ne+5)%7:Q.w+Q.U*7-(Ne+6)%7);return"Z"in Q?(Q.H+=Q.Z/100|0,Q.M+=Q.Z%100,uCe(Q)):cCe(Q)}}function k(fe,de,ie,Q){for(var be=0,le=de.length,Ne=ie.length,Le,Te;be<le;){if(Q>=Ne)return-1;if(Le=de.charCodeAt(be++),Le===37){if(Le=de.charAt(be++),Te=N[Le in tht?de.charAt(be++):Le],!Te||(Q=Te(fe,ie,Q))<0)return-1}else if(Le!=ie.charCodeAt(Q++))return-1}return Q}function M(fe,de,ie){var Q=c.exec(de.slice(ie));return Q?(fe.p=u.get(Q[0].toLowerCase()),ie+Q[0].length):-1}function T(fe,de,ie){var Q=f.exec(de.slice(ie));return Q?(fe.w=m.get(Q[0].toLowerCase()),ie+Q[0].length):-1}function A(fe,de,ie){var Q=d.exec(de.slice(ie));return Q?(fe.w=h.get(Q[0].toLowerCase()),ie+Q[0].length):-1}function R(fe,de,ie){var Q=y.exec(de.slice(ie));return Q?(fe.m=_.get(Q[0].toLowerCase()),ie+Q[0].length):-1}function P(fe,de,ie){var Q=p.exec(de.slice(ie));return Q?(fe.m=g.get(Q[0].toLowerCase()),ie+Q[0].length):-1}function O(fe,de,ie){return k(fe,e,de,ie)}function V(fe,de,ie){return k(fe,n,de,ie)}function F(fe,de,ie){return k(fe,i,de,ie)}function $(fe){return s[fe.getDay()]}function B(fe){return o[fe.getDay()]}function z(fe){return l[fe.getMonth()]}function H(fe){return a[fe.getMonth()]}function K(fe){return r[+(fe.getHours()>=12)]}function q(fe){return 1+~~(fe.getMonth()/3)}function U(fe){return s[fe.getUTCDay()]}function Y(fe){return o[fe.getUTCDay()]}function J(fe){return l[fe.getUTCMonth()]}function ae(fe){return a[fe.getUTCMonth()]}function se(fe){return r[+(fe.getUTCHours()>=12)]}function oe(fe){return 1+~~(fe.getUTCMonth()/3)}return{format:function(fe){var de=E(fe+="",w);return de.toString=function(){return fe},de},parse:function(fe){var de=D(fe+="",!1);return de.toString=function(){return fe},de},utcFormat:function(fe){var de=E(fe+="",C);return de.toString=function(){return fe},de},utcParse:function(fe){var de=D(fe+="",!0);return de.toString=function(){return fe},de}}}var tht={"-":"",_:" ",0:"0"},th=/^\s*\d+/,M9i=/^%/,L9i=/[\\^$*+?|[\]().{}]/g;function sa(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o<n?new Array(n-o+1).join(e)+r:r)}function T9i(t){return t.replace(L9i,"\\$&")}function c7(t){return new RegExp("^(?:"+t.map(T9i).join("|")+")","i")}function u7(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function I9i(t,e,n){var i=th.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function A9i(t,e,n){var i=th.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function R9i(t,e,n){var i=th.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function P9i(t,e,n){var i=th.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function O9i(t,e,n){var i=th.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function nht(t,e,n){var i=th.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function iht(t,e,n){var i=th.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function j9i(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function F9i(t,e,n){var i=th.exec(e.slice(n,n+1));return i?(t.q=i[0]*3-3,n+i[0].length):-1}function $9i(t,e,n){var i=th.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function rht(t,e,n){var i=th.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function V9i(t,e,n){var i=th.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function oht(t,e,n){var i=th.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function B9i(t,e,n){var i=th.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function z9i(t,e,n){var i=th.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function H9i(t,e,n){var i=th.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function W9i(t,e,n){var i=th.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function U9i(t,e,n){var i=M9i.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function K9i(t,e,n){var i=th.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function q9i(t,e,n){var i=th.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function sht(t,e){return sa(t.getDate(),e,2)}function G9i(t,e){return sa(t.getHours(),e,2)}function Y9i(t,e){return sa(t.getHours()%12||12,e,2)}function X9i(t,e){return sa(1+Zq.count(yS(t),t),e,3)}function Z$t(t,e){return sa(t.getMilliseconds(),e,3)}function Z9i(t,e){return Z$t(t,e)+"000"}function Q9i(t,e){return sa(t.getMonth()+1,e,2)}function J9i(t,e){return sa(t.getMinutes(),e,2)}function eBi(t,e){return sa(t.getSeconds(),e,2)}function tBi(t){var e=t.getDay();return e===0?7:e}function nBi(t,e){return sa(Gme.count(yS(t)-1,t),e,2)}function Q$t(t){var e=t.getDay();return e>=4||e===0?I5(t):I5.ceil(t)}function iBi(t,e){return t=Q$t(t),sa(I5.count(yS(t),t)+(yS(t).getDay()===4),e,2)}function rBi(t){return t.getDay()}function oBi(t,e){return sa(Qoe.count(yS(t)-1,t),e,2)}function sBi(t,e){return sa(t.getFullYear()%100,e,2)}function aBi(t,e){return t=Q$t(t),sa(t.getFullYear()%100,e,2)}function lBi(t,e){return sa(t.getFullYear()%1e4,e,4)}function cBi(t,e){var n=t.getDay();return t=n>=4||n===0?I5(t):I5.ceil(t),sa(t.getFullYear()%1e4,e,4)}function uBi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+sa(e/60|0,"0",2)+sa(e%60,"0",2)}function aht(t,e){return sa(t.getUTCDate(),e,2)}function dBi(t,e){return sa(t.getUTCHours(),e,2)}function hBi(t,e){return sa(t.getUTCHours()%12||12,e,2)}function fBi(t,e){return sa(1+qme.count(_S(t),t),e,3)}function J$t(t,e){return sa(t.getUTCMilliseconds(),e,3)}function mBi(t,e){return J$t(t,e)+"000"}function pBi(t,e){return sa(t.getUTCMonth()+1,e,2)}function gBi(t,e){return sa(t.getUTCMinutes(),e,2)}function bBi(t,e){return sa(t.getUTCSeconds(),e,2)}function vBi(t){var e=t.getUTCDay();return e===0?7:e}function yBi(t,e){return sa(Yme.count(_S(t)-1,t),e,2)}function e8t(t){var e=t.getUTCDay();return e>=4||e===0?A5(t):A5.ceil(t)}function _Bi(t,e){return t=e8t(t),sa(A5.count(_S(t),t)+(_S(t).getUTCDay()===4),e,2)}function xBi(t){return t.getUTCDay()}function wBi(t,e){return sa(Joe.count(_S(t)-1,t),e,2)}function CBi(t,e){return sa(t.getUTCFullYear()%100,e,2)}function SBi(t,e){return t=e8t(t),sa(t.getUTCFullYear()%100,e,2)}function NBi(t,e){return sa(t.getUTCFullYear()%1e4,e,4)}function EBi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?A5(t):A5.ceil(t),sa(t.getUTCFullYear()%1e4,e,4)}function DBi(){return"+0000"}function lht(){return"%"}function cht(t){return+t}function uht(t){return Math.floor(+t/1e3)}var rO,t8t,n8t;kBi({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"]});function kBi(t){return rO=k9i(t),t8t=rO.format,rO.parse,n8t=rO.utcFormat,rO.utcParse,rO}function MBi(t){return new Date(t)}function LBi(t){return t instanceof Date?+t:+new Date(+t)}function V9e(t,e,n,i,r,o,s,a,l,c){var u=E9e(),d=u.invert,h=u.domain,f=c(".%L"),m=c(":%S"),p=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),_=c("%b %d"),w=c("%B"),C=c("%Y");function N(E){return(l(E)<E?f:a(E)<E?m:s(E)<E?p:o(E)<E?g:i(E)<E?r(E)<E?y:_:n(E)<E?w:C)(E)}return u.invert=function(E){return new Date(d(E))},u.domain=function(E){return arguments.length?h(Array.from(E,LBi)):h().map(MBi)},u.ticks=function(E){var D=h();return t(D[0],D[D.length-1],E??10)},u.tickFormat=function(E,D){return D==null?N:c(D)},u.nice=function(E){var D=h();return(!E||typeof E.range!="function")&&(E=e(D[0],D[D.length-1],E??10)),E?h(z$t(D,E)):u},u.copy=function(){return Xq(u,V9e(t,e,n,i,r,o,s,a,l,c))},u}function TBi(){return Zv.apply(V9e(E9i,D9i,yS,F9e,Gme,Zq,O9e,R9e,HT,t8t).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function IBi(){return Zv.apply(V9e(S9i,N9i,_S,$9e,Yme,qme,j9e,P9e,HT,n8t).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Xme(){var t=0,e=1,n,i,r,o,s=bm,a=!1,l;function c(d){return d==null||isNaN(d=+d)?l:s(r===0?.5:(d=(o(d)-n)*r,a?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([t,e]=d,n=o(t=+t),i=o(e=+e),r=n===i?0:1/(i-n),c):[t,e]},c.clamp=function(d){return arguments.length?(a=!!d,c):a},c.interpolator=function(d){return arguments.length?(s=d,c):s};function u(d){return function(h){var f,m;return arguments.length?([f,m]=h,s=d(f,m),c):[s(0),s(1)]}}return c.range=u(e$),c.rangeRound=u(N9e),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return o=d,n=d(t),i=d(e),r=n===i?0:1/(i-n),c}}function hM(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function i8t(){var t=dM(Xme()(bm));return t.copy=function(){return hM(t,i8t())},QS.apply(t,arguments)}function r8t(){var t=M9e(Xme()).domain([1,10]);return t.copy=function(){return hM(t,r8t()).base(t.base())},QS.apply(t,arguments)}function o8t(){var t=L9e(Xme());return t.copy=function(){return hM(t,o8t()).constant(t.constant())},QS.apply(t,arguments)}function B9e(){var t=T9e(Xme());return t.copy=function(){return hM(t,B9e()).exponent(t.exponent())},QS.apply(t,arguments)}function ABi(){return B9e.apply(null,arguments).exponent(.5)}function s8t(){var t=[],e=bm;function n(i){if(i!=null&&!isNaN(i=+i))return e((Gq(t,i,1)-1)/(t.length-1))}return n.domain=function(i){if(!arguments.length)return t.slice();t=[];for(let r of i)r!=null&&!isNaN(r=+r)&&t.push(r);return t.sort(xD),n},n.interpolator=function(i){return arguments.length?(e=i,n):e},n.range=function(){return t.map((i,r)=>e(r/(t.length-1)))},n.quantiles=function(i){return Array.from({length:i+1},(r,o)=>y7i(t,o/i))},n.copy=function(){return s8t(e).domain(t)},QS.apply(n,arguments)}function Zme(){var t=0,e=.5,n=1,i=1,r,o,s,a,l,c=bm,u,d=!1,h;function f(p){return isNaN(p=+p)?h:(p=.5+((p=+u(p))-o)*(i*p<i*o?a:l),c(d?Math.max(0,Math.min(1,p)):p))}f.domain=function(p){return arguments.length?([t,e,n]=p,r=u(t=+t),o=u(e=+e),s=u(n=+n),a=r===o?0:.5/(o-r),l=o===s?0:.5/(s-o),i=o<r?-1:1,f):[t,e,n]},f.clamp=function(p){return arguments.length?(d=!!p,f):d},f.interpolator=function(p){return arguments.length?(c=p,f):c};function m(p){return function(g){var y,_,w;return arguments.length?([y,_,w]=g,c=U7i(p,[y,_,w]),f):[c(0),c(.5),c(1)]}}return f.range=m(e$),f.rangeRound=m(N9e),f.unknown=function(p){return arguments.length?(h=p,f):h},function(p){return u=p,r=p(t),o=p(e),s=p(n),a=r===o?0:.5/(o-r),l=o===s?0:.5/(s-o),i=o<r?-1:1,f}}function a8t(){var t=dM(Zme()(bm));return t.copy=function(){return hM(t,a8t())},QS.apply(t,arguments)}function l8t(){var t=M9e(Zme()).domain([.1,1,10]);return t.copy=function(){return hM(t,l8t()).base(t.base())},QS.apply(t,arguments)}function c8t(){var t=L9e(Zme());return t.copy=function(){return hM(t,c8t()).constant(t.constant())},QS.apply(t,arguments)}function z9e(){var t=T9e(Zme());return t.copy=function(){return hM(t,z9e()).exponent(t.exponent())},QS.apply(t,arguments)}function RBi(){return z9e.apply(null,arguments).exponent(.5)}const dht=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:kW,scaleDiverging:a8t,scaleDivergingLog:l8t,scaleDivergingPow:z9e,scaleDivergingSqrt:RBi,scaleDivergingSymlog:c8t,scaleIdentity:B$t,scaleImplicit:bAe,scaleLinear:Xoe,scaleLog:H$t,scaleOrdinal:w9e,scalePoint:vB,scalePow:I9e,scaleQuantile:K$t,scaleQuantize:q$t,scaleRadial:U$t,scaleSequential:i8t,scaleSequentialLog:r8t,scaleSequentialPow:B9e,scaleSequentialQuantile:s8t,scaleSequentialSqrt:ABi,scaleSequentialSymlog:o8t,scaleSqrt:m9i,scaleSymlog:W$t,scaleThreshold:G$t,scaleTime:TBi,scaleUtc:IBi,tickFormat:V$t},Symbol.toStringTag,{value:"Module"}));var PBi=U6;function OBi(t,e,n){for(var i=-1,r=t.length;++i<r;){var o=t[i],s=e(o);if(s!=null&&(a===void 0?s===s&&!PBi(s):n(s,a)))var a=s,l=o}return l}var u8t=OBi;function jBi(t,e){return t>e}var FBi=jBi,$Bi=u8t,VBi=FBi,BBi=J6;function zBi(t){return t&&t.length?$Bi(t,BBi,VBi):void 0}var HBi=zBi;const ZE=ao(HBi);function WBi(t,e){return t<e}var UBi=WBi,KBi=u8t,qBi=UBi,GBi=J6;function YBi(t){return t&&t.length?KBi(t,GBi,qBi):void 0}var XBi=YBi;const Qme=ao(XBi);var ZBi=r9e,QBi=uM,JBi=y$t,ezi=rg;function tzi(t,e){var n=ezi(t)?ZBi:JBi;return n(t,QBi(e))}var nzi=tzi,izi=b$t,rzi=nzi;function ozi(t,e){return izi(rzi(t,e),1)}var szi=ozi;const azi=ao(szi);var lzi=g9e;function czi(t,e){return lzi(t,e)}var uzi=czi;const iA=ao(uzi);var t$=1e9,dzi={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},W9e,Yl=!0,Pv="[DecimalError] ",gI=Pv+"Invalid argument: ",H9e=Pv+"Exponent out of range: ",n$=Math.floor,BL=Math.pow,hzi=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Vg,$d=1e7,$l=7,d8t=9007199254740991,ese=n$(d8t/$l),Zi={};Zi.absoluteValue=Zi.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};Zi.comparedTo=Zi.cmp=function(t){var e,n,i,r,o=this;if(t=new o.constructor(t),o.s!==t.s)return o.s||-t.s;if(o.e!==t.e)return o.e>t.e^o.s<0?1:-1;for(i=o.d.length,r=t.d.length,e=0,n=i<r?i:r;e<n;++e)if(o.d[e]!==t.d[e])return o.d[e]>t.d[e]^o.s<0?1:-1;return i===r?0:i>r^o.s<0?1:-1};Zi.decimalPlaces=Zi.dp=function(){var t=this,e=t.d.length-1,n=(e-t.e)*$l;if(e=t.d[e],e)for(;e%10==0;e/=10)n--;return n<0?0:n};Zi.dividedBy=Zi.div=function(t){return $C(this,new this.constructor(t))};Zi.dividedToIntegerBy=Zi.idiv=function(t){var e=this,n=e.constructor;return fl($C(e,new n(t),0,1),n.precision)};Zi.equals=Zi.eq=function(t){return!this.cmp(t)};Zi.exponent=function(){return Pu(this)};Zi.greaterThan=Zi.gt=function(t){return this.cmp(t)>0};Zi.greaterThanOrEqualTo=Zi.gte=function(t){return this.cmp(t)>=0};Zi.isInteger=Zi.isint=function(){return this.e>this.d.length-2};Zi.isNegative=Zi.isneg=function(){return this.s<0};Zi.isPositive=Zi.ispos=function(){return this.s>0};Zi.isZero=function(){return this.s===0};Zi.lessThan=Zi.lt=function(t){return this.cmp(t)<0};Zi.lessThanOrEqualTo=Zi.lte=function(t){return this.cmp(t)<1};Zi.logarithm=Zi.log=function(t){var e,n=this,i=n.constructor,r=i.precision,o=r+5;if(t===void 0)t=new i(10);else if(t=new i(t),t.s<1||t.eq(Vg))throw Error(Pv+"NaN");if(n.s<1)throw Error(Pv+(n.s?"NaN":"-Infinity"));return n.eq(Vg)?new i(0):(Yl=!1,e=$C(AW(n,o),AW(t,o),o),Yl=!0,fl(e,r))};Zi.minus=Zi.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?m8t(e,t):h8t(e,(t.s=-t.s,t))};Zi.modulo=Zi.mod=function(t){var e,n=this,i=n.constructor,r=i.precision;if(t=new i(t),!t.s)throw Error(Pv+"NaN");return n.s?(Yl=!1,e=$C(n,t,0,1).times(t),Yl=!0,n.minus(e)):fl(new i(n),r)};Zi.naturalExponential=Zi.exp=function(){return f8t(this)};Zi.naturalLogarithm=Zi.ln=function(){return AW(this)};Zi.negated=Zi.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};Zi.plus=Zi.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?h8t(e,t):m8t(e,(t.s=-t.s,t))};Zi.precision=Zi.sd=function(t){var e,n,i,r=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(gI+t);if(e=Pu(r)+1,i=r.d.length-1,n=i*$l+1,i=r.d[i],i){for(;i%10==0;i/=10)n--;for(i=r.d[0];i>=10;i/=10)n++}return t&&e>n?e:n};Zi.squareRoot=Zi.sqrt=function(){var t,e,n,i,r,o,s,a=this,l=a.constructor;if(a.s<1){if(!a.s)return new l(0);throw Error(Pv+"NaN")}for(t=Pu(a),Yl=!1,r=Math.sqrt(+a),r==0||r==1/0?(e=Px(a.d),(e.length+t)%2==0&&(e+="0"),r=Math.sqrt(e),t=n$((t+1)/2)-(t<0||t%2),r==1/0?e="5e"+t:(e=r.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),i=new l(e)):i=new l(r.toString()),n=l.precision,r=s=n+3;;)if(o=i,i=o.plus($C(a,o,s+2)).times(.5),Px(o.d).slice(0,s)===(e=Px(i.d)).slice(0,s)){if(e=e.slice(s-3,s+1),r==s&&e=="4999"){if(fl(o,n+1,0),o.times(o).eq(a)){i=o;break}}else if(e!="9999")break;s+=4}return Yl=!0,fl(i,n)};Zi.times=Zi.mul=function(t){var e,n,i,r,o,s,a,l,c,u=this,d=u.constructor,h=u.d,f=(t=new d(t)).d;if(!u.s||!t.s)return new d(0);for(t.s*=u.s,n=u.e+t.e,l=h.length,c=f.length,l<c&&(o=h,h=f,f=o,s=l,l=c,c=s),o=[],s=l+c,i=s;i--;)o.push(0);for(i=c;--i>=0;){for(e=0,r=l+i;r>i;)a=o[r]+f[i]*h[r-i-1]+e,o[r--]=a%$d|0,e=a/$d|0;o[r]=(o[r]+e)%$d|0}for(;!o[--s];)o.pop();return e?++n:o.shift(),t.d=o,t.e=n,Yl?fl(t,d.precision):t};Zi.toDecimalPlaces=Zi.todp=function(t,e){var n=this,i=n.constructor;return n=new i(n),t===void 0?n:(_w(t,0,t$),e===void 0?e=i.rounding:_w(e,0,8),fl(n,t+Pu(n)+1,e))};Zi.toExponential=function(t,e){var n,i=this,r=i.constructor;return t===void 0?n=rA(i,!0):(_w(t,0,t$),e===void 0?e=r.rounding:_w(e,0,8),i=fl(new r(i),t+1,e),n=rA(i,!0,t+1)),n};Zi.toFixed=function(t,e){var n,i,r=this,o=r.constructor;return t===void 0?rA(r):(_w(t,0,t$),e===void 0?e=o.rounding:_w(e,0,8),i=fl(new o(r),t+Pu(r)+1,e),n=rA(i.abs(),!1,t+Pu(i)+1),r.isneg()&&!r.isZero()?"-"+n:n)};Zi.toInteger=Zi.toint=function(){var t=this,e=t.constructor;return fl(new e(t),Pu(t)+1,e.rounding)};Zi.toNumber=function(){return+this};Zi.toPower=Zi.pow=function(t){var e,n,i,r,o,s,a=this,l=a.constructor,c=12,u=+(t=new l(t));if(!t.s)return new l(Vg);if(a=new l(a),!a.s){if(t.s<1)throw Error(Pv+"Infinity");return a}if(a.eq(Vg))return a;if(i=l.precision,t.eq(Vg))return fl(a,i);if(e=t.e,n=t.d.length-1,s=e>=n,o=a.s,s){if((n=u<0?-u:u)<=d8t){for(r=new l(Vg),e=Math.ceil(i/$l+4),Yl=!1;n%2&&(r=r.times(a),fht(r.d,e)),n=n$(n/2),n!==0;)a=a.times(a),fht(a.d,e);return Yl=!0,t.s<0?new l(Vg).div(r):fl(r,i)}}else if(o<0)throw Error(Pv+"NaN");return o=o<0&&t.d[Math.max(e,n)]&1?-1:1,a.s=1,Yl=!1,r=t.times(AW(a,i+c)),Yl=!0,r=f8t(r),r.s=o,r};Zi.toPrecision=function(t,e){var n,i,r=this,o=r.constructor;return t===void 0?(n=Pu(r),i=rA(r,n<=o.toExpNeg||n>=o.toExpPos)):(_w(t,1,t$),e===void 0?e=o.rounding:_w(e,0,8),r=fl(new o(r),t,e),n=Pu(r),i=rA(r,t<=n||n<=o.toExpNeg,t)),i};Zi.toSignificantDigits=Zi.tosd=function(t,e){var n=this,i=n.constructor;return t===void 0?(t=i.precision,e=i.rounding):(_w(t,1,t$),e===void 0?e=i.rounding:_w(e,0,8)),fl(new i(n),t,e)};Zi.toString=Zi.valueOf=Zi.val=Zi.toJSON=Zi[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=Pu(t),n=t.constructor;return rA(t,e<=n.toExpNeg||e>=n.toExpPos)};function h8t(t,e){var n,i,r,o,s,a,l,c,u=t.constructor,d=u.precision;if(!t.s||!e.s)return e.s||(e=new u(t)),Yl?fl(e,d):e;if(l=t.d,c=e.d,s=t.e,r=e.e,l=l.slice(),o=s-r,o){for(o<0?(i=l,o=-o,a=c.length):(i=c,r=s,a=l.length),s=Math.ceil(d/$l),a=s>a?s+1:a+1,o>a&&(o=a,i.length=1),i.reverse();o--;)i.push(0);i.reverse()}for(a=l.length,o=c.length,a-o<0&&(o=a,i=c,c=l,l=i),n=0;o;)n=(l[--o]=l[o]+c[o]+n)/$d|0,l[o]%=$d;for(n&&(l.unshift(n),++r),a=l.length;l[--a]==0;)l.pop();return e.d=l,e.e=r,Yl?fl(e,d):e}function _w(t,e,n){if(t!==~~t||t<e||t>n)throw Error(gI+t)}function Px(t){var e,n,i,r=t.length-1,o="",s=t[0];if(r>0){for(o+=s,e=1;e<r;e++)i=t[e]+"",n=$l-i.length,n&&(o+=cE(n)),o+=i;s=t[e],i=s+"",n=$l-i.length,n&&(o+=cE(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}var $C=function(){function t(i,r){var o,s=0,a=i.length;for(i=i.slice();a--;)o=i[a]*r+s,i[a]=o%$d|0,s=o/$d|0;return s&&i.unshift(s),i}function e(i,r,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;a<o;a++)if(i[a]!=r[a]){l=i[a]>r[a]?1:-1;break}return l}function n(i,r,o){for(var s=0;o--;)i[o]-=s,s=i[o]<r[o]?1:0,i[o]=s*$d+i[o]-r[o];for(;!i[0]&&i.length>1;)i.shift()}return function(i,r,o,s){var a,l,c,u,d,h,f,m,p,g,y,_,w,C,N,E,D,k,M=i.constructor,T=i.s==r.s?1:-1,A=i.d,R=r.d;if(!i.s)return new M(i);if(!r.s)throw Error(Pv+"Division by zero");for(l=i.e-r.e,D=R.length,N=A.length,f=new M(T),m=f.d=[],c=0;R[c]==(A[c]||0);)++c;if(R[c]>(A[c]||0)&&--l,o==null?_=o=M.precision:s?_=o+(Pu(i)-Pu(r))+1:_=o,_<0)return new M(0);if(_=_/$l+2|0,c=0,D==1)for(u=0,R=R[0],_++;(c<N||u)&&_--;c++)w=u*$d+(A[c]||0),m[c]=w/R|0,u=w%R|0;else{for(u=$d/(R[0]+1)|0,u>1&&(R=t(R,u),A=t(A,u),D=R.length,N=A.length),C=D,p=A.slice(0,D),g=p.length;g<D;)p[g++]=0;k=R.slice(),k.unshift(0),E=R[0],R[1]>=$d/2&&++E;do u=0,a=e(R,p,D,g),a<0?(y=p[0],D!=g&&(y=y*$d+(p[1]||0)),u=y/E|0,u>1?(u>=$d&&(u=$d-1),d=t(R,u),h=d.length,g=p.length,a=e(d,p,h,g),a==1&&(u--,n(d,D<h?k:R,h))):(u==0&&(a=u=1),d=R.slice()),h=d.length,h<g&&d.unshift(0),n(p,d,g),a==-1&&(g=p.length,a=e(R,p,D,g),a<1&&(u++,n(p,D<g?k:R,g))),g=p.length):a===0&&(u++,p=[0]),m[c++]=u,a&&p[0]?p[g++]=A[C]||0:(p=[A[C]],g=1);while((C++<N||p[0]!==void 0)&&_--)}return m[0]||m.shift(),f.e=l,fl(f,s?o+Pu(f)+1:o)}}();function f8t(t,e){var n,i,r,o,s,a,l=0,c=0,u=t.constructor,d=u.precision;if(Pu(t)>16)throw Error(H9e+Pu(t));if(!t.s)return new u(Vg);for(e==null?(Yl=!1,a=d):a=e,s=new u(.03125);t.abs().gte(.1);)t=t.times(s),c+=5;for(i=Math.log(BL(2,c))/Math.LN10*2+5|0,a+=i,n=r=o=new u(Vg),u.precision=a;;){if(r=fl(r.times(t),a),n=n.times(++l),s=o.plus($C(r,n,a)),Px(s.d).slice(0,a)===Px(o.d).slice(0,a)){for(;c--;)o=fl(o.times(o),a);return u.precision=d,e==null?(Yl=!0,fl(o,d)):o}o=s}}function Pu(t){for(var e=t.e*$l,n=t.d[0];n>=10;n/=10)e++;return e}function dCe(t,e,n){if(e>t.LN10.sd())throw Yl=!0,n&&(t.precision=n),Error(Pv+"LN10 precision limit exceeded");return fl(new t(t.LN10),e)}function cE(t){for(var e="";t--;)e+="0";return e}function AW(t,e){var n,i,r,o,s,a,l,c,u,d=1,h=10,f=t,m=f.d,p=f.constructor,g=p.precision;if(f.s<1)throw Error(Pv+(f.s?"NaN":"-Infinity"));if(f.eq(Vg))return new p(0);if(e==null?(Yl=!1,c=g):c=e,f.eq(10))return e==null&&(Yl=!0),dCe(p,c);if(c+=h,p.precision=c,n=Px(m),i=n.charAt(0),o=Pu(f),Math.abs(o)<15e14){for(;i<7&&i!=1||i==1&&n.charAt(1)>3;)f=f.times(t),n=Px(f.d),i=n.charAt(0),d++;o=Pu(f),i>1?(f=new p("0."+n),o++):f=new p(i+"."+n.slice(1))}else return l=dCe(p,c+2,g).times(o+""),f=AW(new p(i+"."+n.slice(1)),c-h).plus(l),p.precision=g,e==null?(Yl=!0,fl(f,g)):f;for(a=s=f=$C(f.minus(Vg),f.plus(Vg),c),u=fl(f.times(f),c),r=3;;){if(s=fl(s.times(u),c),l=a.plus($C(s,new p(r),c)),Px(l.d).slice(0,c)===Px(a.d).slice(0,c))return a=a.times(2),o!==0&&(a=a.plus(dCe(p,c+2,g).times(o+""))),a=$C(a,new p(d),c),p.precision=g,e==null?(Yl=!0,fl(a,g)):a;a=l,r+=2}}function hht(t,e){var n,i,r;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(i=e.search(/e/i))>0?(n<0&&(n=i),n+=+e.slice(i+1),e=e.substring(0,i)):n<0&&(n=e.length),i=0;e.charCodeAt(i)===48;)++i;for(r=e.length;e.charCodeAt(r-1)===48;)--r;if(e=e.slice(i,r),e){if(r-=i,n=n-i-1,t.e=n$(n/$l),t.d=[],i=(n+1)%$l,n<0&&(i+=$l),i<r){for(i&&t.d.push(+e.slice(0,i)),r-=$l;i<r;)t.d.push(+e.slice(i,i+=$l));e=e.slice(i),i=$l-e.length}else i-=r;for(;i--;)e+="0";if(t.d.push(+e),Yl&&(t.e>ese||t.e<-ese))throw Error(H9e+n)}else t.s=0,t.e=0,t.d=[0];return t}function fl(t,e,n){var i,r,o,s,a,l,c,u,d=t.d;for(s=1,o=d[0];o>=10;o/=10)s++;if(i=e-s,i<0)i+=$l,r=e,c=d[u=0];else{if(u=Math.ceil((i+1)/$l),o=d.length,u>=o)return t;for(c=o=d[u],s=1;o>=10;o/=10)s++;i%=$l,r=i-$l+s}if(n!==void 0&&(o=BL(10,s-r-1),a=c/o%10|0,l=e<0||d[u+1]!==void 0||c%o,l=n<4?(a||l)&&(n==0||n==(t.s<0?3:2)):a>5||a==5&&(n==4||l||n==6&&(i>0?r>0?c/BL(10,s-r):0:d[u-1])%10&1||n==(t.s<0?8:7))),e<1||!d[0])return l?(o=Pu(t),d.length=1,e=e-o-1,d[0]=BL(10,($l-e%$l)%$l),t.e=n$(-e/$l)||0):(d.length=1,d[0]=t.e=t.s=0),t;if(i==0?(d.length=u,o=1,u--):(d.length=u+1,o=BL(10,$l-i),d[u]=r>0?(c/BL(10,s-r)%BL(10,r)|0)*o:0),l)for(;;)if(u==0){(d[0]+=o)==$d&&(d[0]=1,++t.e);break}else{if(d[u]+=o,d[u]!=$d)break;d[u--]=0,o=1}for(i=d.length;d[--i]===0;)d.pop();if(Yl&&(t.e>ese||t.e<-ese))throw Error(H9e+Pu(t));return t}function m8t(t,e){var n,i,r,o,s,a,l,c,u,d,h=t.constructor,f=h.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new h(t),Yl?fl(e,f):e;if(l=t.d,d=e.d,i=e.e,c=t.e,l=l.slice(),s=c-i,s){for(u=s<0,u?(n=l,s=-s,a=d.length):(n=d,i=c,a=l.length),r=Math.max(Math.ceil(f/$l),a)+2,s>r&&(s=r,n.length=1),n.reverse(),r=s;r--;)n.push(0);n.reverse()}else{for(r=l.length,a=d.length,u=r<a,u&&(a=r),r=0;r<a;r++)if(l[r]!=d[r]){u=l[r]<d[r];break}s=0}for(u&&(n=l,l=d,d=n,e.s=-e.s),a=l.length,r=d.length-a;r>0;--r)l[a++]=0;for(r=d.length;r>s;){if(l[--r]<d[r]){for(o=r;o&&l[--o]===0;)l[o]=$d-1;--l[o],l[r]+=$d}l[r]-=d[r]}for(;l[--a]===0;)l.pop();for(;l[0]===0;l.shift())--i;return l[0]?(e.d=l,e.e=i,Yl?fl(e,f):e):new h(0)}function rA(t,e,n){var i,r=Pu(t),o=Px(t.d),s=o.length;return e?(n&&(i=n-s)>0?o=o.charAt(0)+"."+o.slice(1)+cE(i):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(r<0?"e":"e+")+r):r<0?(o="0."+cE(-r-1)+o,n&&(i=n-s)>0&&(o+=cE(i))):r>=s?(o+=cE(r+1-s),n&&(i=n-r-1)>0&&(o=o+"."+cE(i))):((i=r+1)<s&&(o=o.slice(0,i)+"."+o.slice(i)),n&&(i=n-s)>0&&(r+1===s&&(o+="."),o+=cE(i))),t.s<0?"-"+o:o}function fht(t,e){if(t.length>e)return t.length=e,!0}function p8t(t){var e,n,i;function r(o){var s=this;if(!(s instanceof r))return new r(o);if(s.constructor=r,o instanceof r){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(gI+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return hht(s,o.toString())}else if(typeof o!="string")throw Error(gI+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,hzi.test(o))hht(s,o);else throw Error(gI+o)}if(r.prototype=Zi,r.ROUND_UP=0,r.ROUND_DOWN=1,r.ROUND_CEIL=2,r.ROUND_FLOOR=3,r.ROUND_HALF_UP=4,r.ROUND_HALF_DOWN=5,r.ROUND_HALF_EVEN=6,r.ROUND_HALF_CEIL=7,r.ROUND_HALF_FLOOR=8,r.clone=p8t,r.config=r.set=fzi,t===void 0&&(t={}),t)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e<i.length;)t.hasOwnProperty(n=i[e++])||(t[n]=this[n]);return r.config(t),r}function fzi(t){if(!t||typeof t!="object")throw Error(Pv+"Object expected");var e,n,i,r=["precision",1,t$,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<r.length;e+=3)if((i=t[n=r[e]])!==void 0)if(n$(i)===i&&i>=r[e+1]&&i<=r[e+2])this[n]=i;else throw Error(gI+n+": "+i);if((i=t[n="LN10"])!==void 0)if(i==Math.LN10)this[n]=new this(i);else throw Error(gI+n+": "+i);return this}var W9e=p8t(dzi);Vg=new W9e(1);const Ua=W9e;function mzi(t){return vzi(t)||bzi(t)||gzi(t)||pzi()}function pzi(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gzi(t,e){if(t){if(typeof t=="string")return xAe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xAe(t,e)}}function bzi(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function vzi(t){if(Array.isArray(t))return xAe(t)}function xAe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var yzi=function(e){return e},g8t={"@@functional/placeholder":!0},b8t=function(e){return e===g8t},mht=function(e){return function n(){return arguments.length===0||arguments.length===1&&b8t(arguments.length<=0?void 0:arguments[0])?n:e.apply(void 0,arguments)}},_zi=function t(e,n){return e===1?n:mht(function(){for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];var s=r.filter(function(a){return a!==g8t}).length;return s>=e?n.apply(void 0,r):t(e-s,mht(function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];var u=r.map(function(d){return b8t(d)?l.shift():d});return n.apply(void 0,mzi(u).concat(l))}))})},Jme=function(e){return _zi(e.length,e)},wAe=function(e,n){for(var i=[],r=e;r<n;++r)i[r-e]=r;return i},xzi=Jme(function(t,e){return Array.isArray(e)?e.map(t):Object.keys(e).map(function(n){return e[n]}).map(t)}),wzi=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];if(!n.length)return yzi;var r=n.reverse(),o=r[0],s=r.slice(1);return function(){return s.reduce(function(a,l){return l(a)},o.apply(void 0,arguments))}},CAe=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},v8t=function(e){var n=null,i=null;return function(){for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return n&&o.every(function(a,l){return a===n[l]})||(n=o,i=e.apply(void 0,o)),i}};function Czi(t){var e;return t===0?e=1:e=Math.floor(new Ua(t).abs().log(10).toNumber())+1,e}function Szi(t,e,n){for(var i=new Ua(t),r=0,o=[];i.lt(e)&&r<1e5;)o.push(i.toNumber()),i=i.add(n),r++;return o}var Nzi=Jme(function(t,e,n){var i=+t,r=+e;return i+n*(r-i)}),Ezi=Jme(function(t,e,n){var i=e-+t;return i=i||1/0,(n-t)/i}),Dzi=Jme(function(t,e,n){var i=e-+t;return i=i||1/0,Math.max(0,Math.min(1,(n-t)/i))});const epe={rangeStep:Szi,getDigitCount:Czi,interpolateNumber:Nzi,uninterpolateNumber:Ezi,uninterpolateTruncation:Dzi};function SAe(t){return Lzi(t)||Mzi(t)||y8t(t)||kzi()}function kzi(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mzi(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function Lzi(t){if(Array.isArray(t))return NAe(t)}function RW(t,e){return Azi(t)||Izi(t,e)||y8t(t,e)||Tzi()}function Tzi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y8t(t,e){if(t){if(typeof t=="string")return NAe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return NAe(t,e)}}function NAe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Izi(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var n=[],i=!0,r=!1,o=void 0;try{for(var s=t[Symbol.iterator](),a;!(i=(a=s.next()).done)&&(n.push(a.value),!(e&&n.length===e));i=!0);}catch(l){r=!0,o=l}finally{try{!i&&s.return!=null&&s.return()}finally{if(r)throw o}}return n}}function Azi(t){if(Array.isArray(t))return t}function _8t(t){var e=RW(t,2),n=e[0],i=e[1],r=n,o=i;return n>i&&(r=i,o=n),[r,o]}function x8t(t,e,n){if(t.lte(0))return new Ua(0);var i=epe.getDigitCount(t.toNumber()),r=new Ua(10).pow(i),o=t.div(r),s=i!==1?.05:.1,a=new Ua(Math.ceil(o.div(s).toNumber())).add(n).mul(s),l=a.mul(r);return e?l:new Ua(Math.ceil(l))}function Rzi(t,e,n){var i=1,r=new Ua(t);if(!r.isint()&&n){var o=Math.abs(t);o<1?(i=new Ua(10).pow(epe.getDigitCount(t)-1),r=new Ua(Math.floor(r.div(i).toNumber())).mul(i)):o>1&&(r=new Ua(Math.floor(t)))}else t===0?r=new Ua(Math.floor((e-1)/2)):n||(r=new Ua(Math.floor(t)));var s=Math.floor((e-1)/2),a=wzi(xzi(function(l){return r.add(new Ua(l-s).mul(i)).toNumber()}),wAe);return a(0,e)}function w8t(t,e,n,i){var r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((e-t)/(n-1)))return{step:new Ua(0),tickMin:new Ua(0),tickMax:new Ua(0)};var o=x8t(new Ua(e).sub(t).div(n-1),i,r),s;t<=0&&e>=0?s=new Ua(0):(s=new Ua(t).add(e).div(2),s=s.sub(new Ua(s).mod(o)));var a=Math.ceil(s.sub(t).div(o).toNumber()),l=Math.ceil(new Ua(e).sub(s).div(o).toNumber()),c=a+l+1;return c>n?w8t(t,e,n,i,r+1):(c<n&&(l=e>0?l+(n-c):l,a=e>0?a:a+(n-c)),{step:o,tickMin:s.sub(new Ua(a).mul(o)),tickMax:s.add(new Ua(l).mul(o))})}function Pzi(t){var e=RW(t,2),n=e[0],i=e[1],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(r,2),a=_8t([n,i]),l=RW(a,2),c=l[0],u=l[1];if(c===-1/0||u===1/0){var d=u===1/0?[c].concat(SAe(wAe(0,r-1).map(function(){return 1/0}))):[].concat(SAe(wAe(0,r-1).map(function(){return-1/0})),[u]);return n>i?CAe(d):d}if(c===u)return Rzi(c,r,o);var h=w8t(c,u,s,o),f=h.step,m=h.tickMin,p=h.tickMax,g=epe.rangeStep(m,p.add(new Ua(.1).mul(f)),f);return n>i?CAe(g):g}function Ozi(t,e){var n=RW(t,2),i=n[0],r=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=_8t([i,r]),a=RW(s,2),l=a[0],c=a[1];if(l===-1/0||c===1/0)return[i,r];if(l===c)return[l];var u=Math.max(e,2),d=x8t(new Ua(c).sub(l).div(u-1),o,0),h=[].concat(SAe(epe.rangeStep(new Ua(l),new Ua(c).sub(new Ua(.99).mul(d)),d)),[c]);return i>r?CAe(h):h}var jzi=v8t(Pzi),Fzi=v8t(Ozi),pht="Invariant failed";function wk(t,e){var n=typeof e=="function"?e():e,i=n?"".concat(pht,": ").concat(n):pht;throw new Error(i)}var $zi=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function R5(t){"@babel/helpers - typeof";return R5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R5(t)}function tse(){return tse=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},tse.apply(this,arguments)}function Vzi(t,e){return Wzi(t)||Hzi(t,e)||zzi(t,e)||Bzi()}function Bzi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zzi(t,e){if(t){if(typeof t=="string")return ght(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ght(t,e)}}function ght(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Hzi(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(u){c=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}function Wzi(t){if(Array.isArray(t))return t}function Uzi(t,e){if(t==null)return{};var n=Kzi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function Kzi(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function qzi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gzi(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,N8t(i.key),i)}}function Yzi(t,e,n){return e&&Gzi(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Xzi(t,e,n){return e=nse(e),Zzi(t,C8t()?Reflect.construct(e,n||[],nse(t).constructor):e.apply(t,n))}function Zzi(t,e){if(e&&(R5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qzi(t)}function Qzi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function C8t(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(C8t=function(){return!!t})()}function nse(t){return nse=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nse(t)}function Jzi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&EAe(t,e)}function EAe(t,e){return EAe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},EAe(t,e)}function S8t(t,e,n){return e=N8t(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function N8t(t){var e=eHi(t,"string");return R5(e)=="symbol"?e:e+""}function eHi(t,e){if(R5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(R5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var i$=function(t){function e(){return qzi(this,e),Xzi(this,e,arguments)}return Jzi(e,t),Yzi(e,[{key:"render",value:function(){var i=this.props,r=i.offset,o=i.layout,s=i.width,a=i.dataKey,l=i.data,c=i.dataPointFormatter,u=i.xAxis,d=i.yAxis,h=Uzi(i,$zi),f=Co(h,!1);this.props.direction==="x"&&u.type!=="number"&&wk(!1,'ErrorBar requires Axis type property to be "number".');var m=l.map(function(p){var g=c(p,a),y=g.x,_=g.y,w=g.value,C=g.errorVal;if(!C)return null;var N=[],E,D;if(Array.isArray(C)){var k=Vzi(C,2);E=k[0],D=k[1]}else E=D=C;if(o==="vertical"){var M=u.scale,T=_+r,A=T+s,R=T-s,P=M(w-E),O=M(w+D);N.push({x1:O,y1:A,x2:O,y2:R}),N.push({x1:P,y1:T,x2:O,y2:T}),N.push({x1:P,y1:A,x2:P,y2:R})}else if(o==="horizontal"){var V=d.scale,F=y+r,$=F-s,B=F+s,z=V(w-E),H=V(w+D);N.push({x1:$,y1:H,x2:B,y2:H}),N.push({x1:F,y1:z,x2:F,y2:H}),N.push({x1:$,y1:z,x2:B,y2:z})}return Z.createElement(fa,tse({className:"recharts-errorBar",key:"bar-".concat(N.map(function(K){return"".concat(K.x1,"-").concat(K.x2,"-").concat(K.y1,"-").concat(K.y2)}))},f),N.map(function(K){return Z.createElement("line",tse({},K,{key:"line-".concat(K.x1,"-").concat(K.x2,"-").concat(K.y1,"-").concat(K.y2)}))}))});return Z.createElement(fa,{className:"recharts-errorBars"},m)}}])}(Z.Component);S8t(i$,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});S8t(i$,"displayName","ErrorBar");function PW(t){"@babel/helpers - typeof";return PW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},PW(t)}function bht(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function yL(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?bht(Object(n),!0).forEach(function(i){tHi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):bht(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function tHi(t,e,n){return e=nHi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nHi(t){var e=iHi(t,"string");return PW(e)=="symbol"?e:e+""}function iHi(t,e){if(PW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(PW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var E8t=function(e){var n=e.children,i=e.formattedGraphicalItems,r=e.legendWidth,o=e.legendContent,s=Mg(n,FC);if(!s)return null;var a=FC.defaultProps,l=a!==void 0?yL(yL({},a),s.props):{},c;return s.props&&s.props.payload?c=s.props&&s.props.payload:o==="children"?c=(i||[]).reduce(function(u,d){var h=d.item,f=d.props,m=f.sectors||f.data||[];return u.concat(m.map(function(p){return{type:s.props.iconType||h.props.legendType,value:p.name,color:p.fill,payload:p}}))},[]):c=(i||[]).map(function(u){var d=u.item,h=d.type.defaultProps,f=h!==void 0?yL(yL({},h),d.props):{},m=f.dataKey,p=f.name,g=f.legendType,y=f.hide;return{inactive:y,dataKey:m,type:l.iconType||g||"square",color:U9e(d),value:p||m,payload:f}}),yL(yL(yL({},l),FC.getWithHeight(s,r)),{},{payload:c,item:s})};function OW(t){"@babel/helpers - typeof";return OW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},OW(t)}function vht(t){return aHi(t)||sHi(t)||oHi(t)||rHi()}function rHi(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oHi(t,e){if(t){if(typeof t=="string")return DAe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DAe(t,e)}}function sHi(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function aHi(t){if(Array.isArray(t))return DAe(t)}function DAe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function yht(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function kc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?yht(Object(n),!0).forEach(function(i){V3(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yht(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function V3(t,e,n){return e=lHi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lHi(t){var e=cHi(t,"string");return OW(e)=="symbol"?e:e+""}function cHi(t,e){if(OW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(OW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function pd(t,e,n){return So(t)||So(e)?n:dd(e)?_v(t,e,n):$o(e)?e(t):n}function yB(t,e,n,i){var r=azi(t,function(a){return pd(a,e)});if(n==="number"){var o=r.filter(function(a){return ui(a)||parseFloat(a)});return o.length?[Qme(o),ZE(o)]:[1/0,-1/0]}var s=i?r.filter(function(a){return!So(a)}):r;return s.map(function(a){return dd(a)||a instanceof Date?a:""})}var uHi=function(e){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,s=-1,a=(n=i==null?void 0:i.length)!==null&&n!==void 0?n:0;if(a<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var l=o.range,c=0;c<a;c++){var u=c>0?r[c-1].coordinate:r[a-1].coordinate,d=r[c].coordinate,h=c>=a-1?r[0].coordinate:r[c+1].coordinate,f=void 0;if(c0(d-u)!==c0(h-d)){var m=[];if(c0(h-d)===c0(l[1]-l[0])){f=h;var p=d+l[1]-l[0];m[0]=Math.min(p,(p+u)/2),m[1]=Math.max(p,(p+u)/2)}else{f=u;var g=h+l[1]-l[0];m[0]=Math.min(d,(g+d)/2),m[1]=Math.max(d,(g+d)/2)}var y=[Math.min(d,(f+d)/2),Math.max(d,(f+d)/2)];if(e>y[0]&&e<=y[1]||e>=m[0]&&e<=m[1]){s=r[c].index;break}}else{var _=Math.min(u,h),w=Math.max(u,h);if(e>(_+d)/2&&e<=(w+d)/2){s=r[c].index;break}}}else for(var C=0;C<a;C++)if(C===0&&e<=(i[C].coordinate+i[C+1].coordinate)/2||C>0&&C<a-1&&e>(i[C].coordinate+i[C-1].coordinate)/2&&e<=(i[C].coordinate+i[C+1].coordinate)/2||C===a-1&&e>(i[C].coordinate+i[C-1].coordinate)/2){s=i[C].index;break}return s},U9e=function(e){var n,i=e,r=i.type.displayName,o=(n=e.type)!==null&&n!==void 0&&n.defaultProps?kc(kc({},e.type.defaultProps),e.props):e.props,s=o.stroke,a=o.fill,l;switch(r){case"Line":l=s;break;case"Area":case"Radar":l=s&&s!=="none"?s:a;break;default:l=a;break}return l},dHi=function(e){var n=e.barSize,i=e.totalSize,r=e.stackGroups,o=r===void 0?{}:r;if(!o)return{};for(var s={},a=Object.keys(o),l=0,c=a.length;l<c;l++)for(var u=o[a[l]].stackGroups,d=Object.keys(u),h=0,f=d.length;h<f;h++){var m=u[d[h]],p=m.items,g=m.cateAxisId,y=p.filter(function(D){return OC(D.type).indexOf("Bar")>=0});if(y&&y.length){var _=y[0].type.defaultProps,w=_!==void 0?kc(kc({},_),y[0].props):y[0].props,C=w.barSize,N=w[g];s[N]||(s[N]=[]);var E=So(C)?n:C;s[N].push({item:y[0],stackList:y.slice(1),barSize:So(E)?void 0:nA(E,i,0)})}}return s},hHi=function(e){var n=e.barGap,i=e.barCategoryGap,r=e.bandSize,o=e.sizeList,s=o===void 0?[]:o,a=e.maxBarSize,l=s.length;if(l<1)return null;var c=nA(n,r,0,!0),u,d=[];if(s[0].barSize===+s[0].barSize){var h=!1,f=r/l,m=s.reduce(function(C,N){return C+N.barSize||0},0);m+=(l-1)*c,m>=r&&(m-=(l-1)*c,c=0),m>=r&&f>0&&(h=!0,f*=.9,m=l*f);var p=(r-m)/2>>0,g={offset:p-c,size:0};u=s.reduce(function(C,N){var E={item:N.item,position:{offset:g.offset+g.size+c,size:h?f:N.barSize}},D=[].concat(vht(C),[E]);return g=D[D.length-1].position,N.stackList&&N.stackList.length&&N.stackList.forEach(function(k){D.push({item:k,position:g})}),D},d)}else{var y=nA(i,r,0,!0);r-2*y-(l-1)*c<=0&&(c=0);var _=(r-2*y-(l-1)*c)/l;_>1&&(_>>=0);var w=a===+a?Math.min(_,a):_;u=s.reduce(function(C,N,E){var D=[].concat(vht(C),[{item:N.item,position:{offset:y+(_+c)*E+(_-w)/2,size:w}}]);return N.stackList&&N.stackList.length&&N.stackList.forEach(function(k){D.push({item:k,position:D[D.length-1].position})}),D},d)}return u},fHi=function(e,n,i,r){var o=i.children,s=i.width,a=i.margin,l=s-(a.left||0)-(a.right||0),c=E8t({children:o,legendWidth:l});if(c){var u=r||{},d=u.width,h=u.height,f=c.align,m=c.verticalAlign,p=c.layout;if((p==="vertical"||p==="horizontal"&&m==="middle")&&f!=="center"&&ui(e[f]))return kc(kc({},e),{},V3({},f,e[f]+(d||0)));if((p==="horizontal"||p==="vertical"&&f==="center")&&m!=="middle"&&ui(e[m]))return kc(kc({},e),{},V3({},m,e[m]+(h||0)))}return e},mHi=function(e,n,i){return So(n)?!0:e==="horizontal"?n==="yAxis":e==="vertical"||i==="x"?n==="xAxis":i==="y"?n==="yAxis":!0},D8t=function(e,n,i,r,o){var s=n.props.children,a=Rp(s,i$).filter(function(c){return mHi(r,o,c.props.direction)});if(a&&a.length){var l=a.map(function(c){return c.props.dataKey});return e.reduce(function(c,u){var d=pd(u,i);if(So(d))return c;var h=Array.isArray(d)?[Qme(d),ZE(d)]:[d,d],f=l.reduce(function(m,p){var g=pd(u,p,0),y=h[0]-Math.abs(Array.isArray(g)?g[0]:g),_=h[1]+Math.abs(Array.isArray(g)?g[1]:g);return[Math.min(y,m[0]),Math.max(_,m[1])]},[1/0,-1/0]);return[Math.min(f[0],c[0]),Math.max(f[1],c[1])]},[1/0,-1/0])}return null},pHi=function(e,n,i,r,o){var s=n.map(function(a){return D8t(e,a,i,o,r)}).filter(function(a){return!So(a)});return s&&s.length?s.reduce(function(a,l){return[Math.min(a[0],l[0]),Math.max(a[1],l[1])]},[1/0,-1/0]):null},k8t=function(e,n,i,r,o){var s=n.map(function(l){var c=l.props.dataKey;return i==="number"&&c&&D8t(e,l,c,r)||yB(e,c,i,o)});if(i==="number")return s.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var a={};return s.reduce(function(l,c){for(var u=0,d=c.length;u<d;u++)a[c[u]]||(a[c[u]]=!0,l.push(c[u]));return l},[])},M8t=function(e,n){return e==="horizontal"&&n==="xAxis"||e==="vertical"&&n==="yAxis"||e==="centric"&&n==="angleAxis"||e==="radial"&&n==="radiusAxis"},L8t=function(e,n,i,r){if(r)return e.map(function(l){return l.coordinate});var o,s,a=e.map(function(l){return l.coordinate===n&&(o=!0),l.coordinate===i&&(s=!0),l.coordinate});return o||a.push(n),s||a.push(i),a},mC=function(e,n,i){if(!e)return null;var r=e.scale,o=e.duplicateDomain,s=e.type,a=e.range,l=e.realScaleType==="scaleBand"?r.bandwidth()/2:2,c=(n||i)&&s==="category"&&r.bandwidth?r.bandwidth()/l:0;if(c=e.axisType==="angleAxis"&&(a==null?void 0:a.length)>=2?c0(a[0]-a[1])*2*c:c,n&&(e.ticks||e.niceTicks)){var u=(e.ticks||e.niceTicks).map(function(d){var h=o?o.indexOf(d):d;return{coordinate:r(h)+c,value:d,offset:c}});return u.filter(function(d){return!X6(d.coordinate)})}return e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(d,h){return{coordinate:r(d)+c,value:d,index:h,offset:c}}):r.ticks&&!i?r.ticks(e.tickCount).map(function(d){return{coordinate:r(d)+c,value:d,offset:c}}):r.domain().map(function(d,h){return{coordinate:r(d)+c,value:o?o[d]:d,index:h,offset:c}})},hCe=new WeakMap,eJ=function(e,n){if(typeof n!="function")return e;hCe.has(e)||hCe.set(e,new WeakMap);var i=hCe.get(e);if(i.has(n))return i.get(n);var r=function(){e.apply(void 0,arguments),n.apply(void 0,arguments)};return i.set(n,r),r},gHi=function(e,n,i){var r=e.scale,o=e.type,s=e.layout,a=e.axisType;if(r==="auto")return s==="radial"&&a==="radiusAxis"?{scale:kW(),realScaleType:"band"}:s==="radial"&&a==="angleAxis"?{scale:Xoe(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!i)?{scale:vB(),realScaleType:"point"}:o==="category"?{scale:kW(),realScaleType:"band"}:{scale:Xoe(),realScaleType:"linear"};if(Uq(r)){var l="scale".concat(Fme(r));return{scale:(dht[l]||vB)(),realScaleType:dht[l]?l:"point"}}return $o(r)?{scale:r}:{scale:vB(),realScaleType:"point"}},_ht=1e-4,bHi=function(e){var n=e.domain();if(!(!n||n.length<=2)){var i=n.length,r=e.range(),o=Math.min(r[0],r[1])-_ht,s=Math.max(r[0],r[1])+_ht,a=e(n[0]),l=e(n[i-1]);(a<o||a>s||l<o||l>s)&&e.domain([n[0],n[i-1]])}},vHi=function(e,n){if(!e)return null;for(var i=0,r=e.length;i<r;i++)if(e[i].item===n)return e[i].position;return null},yHi=function(e,n){if(!n||n.length!==2||!ui(n[0])||!ui(n[1]))return e;var i=Math.min(n[0],n[1]),r=Math.max(n[0],n[1]),o=[e[0],e[1]];return(!ui(e[0])||e[0]<i)&&(o[0]=i),(!ui(e[1])||e[1]>r)&&(o[1]=r),o[0]>r&&(o[0]=r),o[1]<i&&(o[1]=i),o},_Hi=function(e){var n=e.length;if(!(n<=0))for(var i=0,r=e[0].length;i<r;++i)for(var o=0,s=0,a=0;a<n;++a){var l=X6(e[a][i][1])?e[a][i][0]:e[a][i][1];l>=0?(e[a][i][0]=o,e[a][i][1]=o+l,o=e[a][i][1]):(e[a][i][0]=s,e[a][i][1]=s+l,s=e[a][i][1])}},xHi=function(e){var n=e.length;if(!(n<=0))for(var i=0,r=e[0].length;i<r;++i)for(var o=0,s=0;s<n;++s){var a=X6(e[s][i][1])?e[s][i][0]:e[s][i][1];a>=0?(e[s][i][0]=o,e[s][i][1]=o+a,o=e[s][i][1]):(e[s][i][0]=0,e[s][i][1]=0)}},wHi={sign:_Hi,expand:FOi,none:E5,silhouette:$Oi,wiggle:VOi,positive:xHi},CHi=function(e,n,i){var r=n.map(function(a){return a.props.dataKey}),o=wHi[i],s=jOi().keys(r).value(function(a,l){return+pd(a,l,0)}).order(Q2e).offset(o);return s(e)},SHi=function(e,n,i,r,o,s){if(!e)return null;var a=s?n.reverse():n,l={},c=a.reduce(function(d,h){var f,m=(f=h.type)!==null&&f!==void 0&&f.defaultProps?kc(kc({},h.type.defaultProps),h.props):h.props,p=m.stackId,g=m.hide;if(g)return d;var y=m[i],_=d[y]||{hasStack:!1,stackGroups:{}};if(dd(p)){var w=_.stackGroups[p]||{numericAxisId:i,cateAxisId:r,items:[]};w.items.push(h),_.hasStack=!0,_.stackGroups[p]=w}else _.stackGroups[lR("_stackId_")]={numericAxisId:i,cateAxisId:r,items:[h]};return kc(kc({},d),{},V3({},y,_))},l),u={};return Object.keys(c).reduce(function(d,h){var f=c[h];if(f.hasStack){var m={};f.stackGroups=Object.keys(f.stackGroups).reduce(function(p,g){var y=f.stackGroups[g];return kc(kc({},p),{},V3({},g,{numericAxisId:i,cateAxisId:r,items:y.items,stackedData:CHi(e,y.items,o)}))},m)}return kc(kc({},d),{},V3({},h,f))},u)},NHi=function(e,n){var i=n.realScaleType,r=n.type,o=n.tickCount,s=n.originalDomain,a=n.allowDecimals,l=i||n.scale;if(l!=="auto"&&l!=="linear")return null;if(o&&r==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var c=e.domain();if(!c.length)return null;var u=jzi(c,o,a);return e.domain([Qme(u),ZE(u)]),{niceTicks:u}}if(o&&r==="number"){var d=e.domain(),h=Fzi(d,o,a);return{niceTicks:h}}return null};function P5(t){var e=t.axis,n=t.ticks,i=t.bandSize,r=t.entry,o=t.index,s=t.dataKey;if(e.type==="category"){if(!e.allowDuplicatedCategory&&e.dataKey&&!So(r[e.dataKey])){var a=koe(n,"value",r[e.dataKey]);if(a)return a.coordinate+i/2}return n[o]?n[o].coordinate+i/2:null}var l=pd(r,So(s)?e.dataKey:s);return So(l)?null:e.scale(l)}var xht=function(e){var n=e.axis,i=e.ticks,r=e.offset,o=e.bandSize,s=e.entry,a=e.index;if(n.type==="category")return i[a]?i[a].coordinate+r:null;var l=pd(s,n.dataKey,n.domain[a]);return So(l)?null:n.scale(l)-o/2+r},EHi=function(e){var n=e.numericAxis,i=n.scale.domain();if(n.type==="number"){var r=Math.min(i[0],i[1]),o=Math.max(i[0],i[1]);return r<=0&&o>=0?0:o<0?o:r}return i[0]},DHi=function(e,n){var i,r=(i=e.type)!==null&&i!==void 0&&i.defaultProps?kc(kc({},e.type.defaultProps),e.props):e.props,o=r.stackId;if(dd(o)){var s=n[o];if(s){var a=s.items.indexOf(e);return a>=0?s.stackedData[a]:null}}return null},kHi=function(e){return e.reduce(function(n,i){return[Qme(i.concat([n[0]]).filter(ui)),ZE(i.concat([n[1]]).filter(ui))]},[1/0,-1/0])},T8t=function(e,n,i){return Object.keys(e).reduce(function(r,o){var s=e[o],a=s.stackedData,l=a.reduce(function(c,u){var d=kHi(u.slice(n,i+1));return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],r[0]),Math.max(l[1],r[1])]},[1/0,-1/0]).map(function(r){return r===1/0||r===-1/0?0:r})},wht=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Cht=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,kAe=function(e,n,i){if($o(e))return e(n,i);if(!Array.isArray(e))return n;var r=[];if(ui(e[0]))r[0]=i?e[0]:Math.min(e[0],n[0]);else if(wht.test(e[0])){var o=+wht.exec(e[0])[1];r[0]=n[0]-o}else $o(e[0])?r[0]=e[0](n[0]):r[0]=n[0];if(ui(e[1]))r[1]=i?e[1]:Math.max(e[1],n[1]);else if(Cht.test(e[1])){var s=+Cht.exec(e[1])[1];r[1]=n[1]+s}else $o(e[1])?r[1]=e[1](n[1]):r[1]=n[1];return r},ise=function(e,n,i){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!i||r>0)return r}if(e&&n&&n.length>=2){for(var o=v9e(n,function(d){return d.coordinate}),s=1/0,a=1,l=o.length;a<l;a++){var c=o[a],u=o[a-1];s=Math.min((c.coordinate||0)-(u.coordinate||0),s)}return s===1/0?0:s}return i?void 0:0},Sht=function(e,n,i){return!e||!e.length||iA(e,_v(i,"type.defaultProps.domain"))?n:e},I8t=function(e,n){var i=e.type.defaultProps?kc(kc({},e.type.defaultProps),e.props):e.props,r=i.dataKey,o=i.name,s=i.unit,a=i.formatter,l=i.tooltipType,c=i.chartType,u=i.hide;return kc(kc({},Co(e,!1)),{},{dataKey:r,unit:s,formatter:a,name:o||r,color:U9e(e),value:pd(n,r),type:l,payload:n,chartType:c,hide:u})};function jW(t){"@babel/helpers - typeof";return jW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jW(t)}function Nht(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Eht(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Nht(Object(n),!0).forEach(function(i){MHi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nht(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function MHi(t,e,n){return e=LHi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function LHi(t){var e=THi(t,"string");return jW(e)=="symbol"?e:e+""}function THi(t,e){if(jW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(jW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var rse=Math.PI/180,IHi=function(e){return e*180/Math.PI},Eh=function(e,n,i,r){return{x:e+Math.cos(-rse*r)*i,y:n+Math.sin(-rse*r)*i}},AHi=function(e,n){var i=e.x,r=e.y,o=n.x,s=n.y;return Math.sqrt(Math.pow(i-o,2)+Math.pow(r-s,2))},RHi=function(e,n){var i=e.x,r=e.y,o=n.cx,s=n.cy,a=AHi({x:i,y:r},{x:o,y:s});if(a<=0)return{radius:a};var l=(i-o)/a,c=Math.acos(l);return r>s&&(c=2*Math.PI-c),{radius:a,angle:IHi(c),angleInRadian:c}},PHi=function(e){var n=e.startAngle,i=e.endAngle,r=Math.floor(n/360),o=Math.floor(i/360),s=Math.min(r,o);return{startAngle:n-s*360,endAngle:i-s*360}},OHi=function(e,n){var i=n.startAngle,r=n.endAngle,o=Math.floor(i/360),s=Math.floor(r/360),a=Math.min(o,s);return e+a*360},Dht=function(e,n){var i=e.x,r=e.y,o=RHi({x:i,y:r},n),s=o.radius,a=o.angle,l=n.innerRadius,c=n.outerRadius;if(s<l||s>c)return!1;if(s===0)return!0;var u=PHi(n),d=u.startAngle,h=u.endAngle,f=a,m;if(d<=h){for(;f>h;)f-=360;for(;f<d;)f+=360;m=f>=d&&f<=h}else{for(;f>d;)f-=360;for(;f<h;)f+=360;m=f>=h&&f<=d}return m?Eht(Eht({},n),{},{radius:s,angle:OHi(f,n)}):null};function FW(t){"@babel/helpers - typeof";return FW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},FW(t)}var jHi=["offset"];function FHi(t){return zHi(t)||BHi(t)||VHi(t)||$Hi()}function $Hi(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VHi(t,e){if(t){if(typeof t=="string")return MAe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return MAe(t,e)}}function BHi(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function zHi(t){if(Array.isArray(t))return MAe(t)}function MAe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function HHi(t,e){if(t==null)return{};var n=WHi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function WHi(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function kht(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Qu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?kht(Object(n),!0).forEach(function(i){UHi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):kht(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function UHi(t,e,n){return e=KHi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function KHi(t){var e=qHi(t,"string");return FW(e)=="symbol"?e:e+""}function qHi(t,e){if(FW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(FW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $W(){return $W=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},$W.apply(this,arguments)}var GHi=function(e){var n=e.value,i=e.formatter,r=So(e.children)?n:e.children;return $o(i)?i(r):r},YHi=function(e,n){var i=c0(n-e),r=Math.min(Math.abs(n-e),360);return i*r},XHi=function(e,n,i){var r=e.position,o=e.viewBox,s=e.offset,a=e.className,l=o,c=l.cx,u=l.cy,d=l.innerRadius,h=l.outerRadius,f=l.startAngle,m=l.endAngle,p=l.clockWise,g=(d+h)/2,y=YHi(f,m),_=y>=0?1:-1,w,C;r==="insideStart"?(w=f+_*s,C=p):r==="insideEnd"?(w=m-_*s,C=!p):r==="end"&&(w=m+_*s,C=p),C=y<=0?C:!C;var N=Eh(c,u,g,w),E=Eh(c,u,g,w+(C?1:-1)*359),D="M".concat(N.x,",").concat(N.y,`
    A`).concat(g,",").concat(g,",0,1,").concat(C?0:1,`,
    `).concat(E.x,",").concat(E.y),k=So(e.id)?lR("recharts-radial-line-"):e.id;return Z.createElement("text",$W({},i,{dominantBaseline:"central",className:Vt("recharts-radial-bar-label",a)}),Z.createElement("defs",null,Z.createElement("path",{id:k,d:D})),Z.createElement("textPath",{xlinkHref:"#".concat(k)},n))},ZHi=function(e){var n=e.viewBox,i=e.offset,r=e.position,o=n,s=o.cx,a=o.cy,l=o.innerRadius,c=o.outerRadius,u=o.startAngle,d=o.endAngle,h=(u+d)/2;if(r==="outside"){var f=Eh(s,a,c+i,h),m=f.x,p=f.y;return{x:m,y:p,textAnchor:m>=s?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:s,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:s,y:a,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:s,y:a,textAnchor:"middle",verticalAnchor:"end"};var g=(l+c)/2,y=Eh(s,a,g,h),_=y.x,w=y.y;return{x:_,y:w,textAnchor:"middle",verticalAnchor:"middle"}},QHi=function(e){var n=e.viewBox,i=e.parentViewBox,r=e.offset,o=e.position,s=n,a=s.x,l=s.y,c=s.width,u=s.height,d=u>=0?1:-1,h=d*r,f=d>0?"end":"start",m=d>0?"start":"end",p=c>=0?1:-1,g=p*r,y=p>0?"end":"start",_=p>0?"start":"end";if(o==="top"){var w={x:a+c/2,y:l-d*r,textAnchor:"middle",verticalAnchor:f};return Qu(Qu({},w),i?{height:Math.max(l-i.y,0),width:c}:{})}if(o==="bottom"){var C={x:a+c/2,y:l+u+h,textAnchor:"middle",verticalAnchor:m};return Qu(Qu({},C),i?{height:Math.max(i.y+i.height-(l+u),0),width:c}:{})}if(o==="left"){var N={x:a-g,y:l+u/2,textAnchor:y,verticalAnchor:"middle"};return Qu(Qu({},N),i?{width:Math.max(N.x-i.x,0),height:u}:{})}if(o==="right"){var E={x:a+c+g,y:l+u/2,textAnchor:_,verticalAnchor:"middle"};return Qu(Qu({},E),i?{width:Math.max(i.x+i.width-E.x,0),height:u}:{})}var D=i?{width:c,height:u}:{};return o==="insideLeft"?Qu({x:a+g,y:l+u/2,textAnchor:_,verticalAnchor:"middle"},D):o==="insideRight"?Qu({x:a+c-g,y:l+u/2,textAnchor:y,verticalAnchor:"middle"},D):o==="insideTop"?Qu({x:a+c/2,y:l+h,textAnchor:"middle",verticalAnchor:m},D):o==="insideBottom"?Qu({x:a+c/2,y:l+u-h,textAnchor:"middle",verticalAnchor:f},D):o==="insideTopLeft"?Qu({x:a+g,y:l+h,textAnchor:_,verticalAnchor:m},D):o==="insideTopRight"?Qu({x:a+c-g,y:l+h,textAnchor:y,verticalAnchor:m},D):o==="insideBottomLeft"?Qu({x:a+g,y:l+u-h,textAnchor:_,verticalAnchor:f},D):o==="insideBottomRight"?Qu({x:a+c-g,y:l+u-h,textAnchor:y,verticalAnchor:f},D):K6(o)&&(ui(o.x)||BT(o.x))&&(ui(o.y)||BT(o.y))?Qu({x:a+nA(o.x,c),y:l+nA(o.y,u),textAnchor:"end",verticalAnchor:"end"},D):Qu({x:a+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},D)},JHi=function(e){return"cx"in e&&ui(e.cx)};function od(t){var e=t.offset,n=e===void 0?5:e,i=HHi(t,jHi),r=Qu({offset:n},i),o=r.viewBox,s=r.position,a=r.value,l=r.children,c=r.content,u=r.className,d=u===void 0?"":u,h=r.textBreakAll;if(!o||So(a)&&So(l)&&!b.isValidElement(c)&&!$o(c))return null;if(b.isValidElement(c))return b.cloneElement(c,r);var f;if($o(c)){if(f=b.createElement(c,r),b.isValidElement(f))return f}else f=GHi(r);var m=JHi(o),p=Co(r,!0);if(m&&(s==="insideStart"||s==="insideEnd"||s==="end"))return XHi(r,f,p);var g=m?ZHi(r):QHi(r);return Z.createElement(Hoe,$W({className:Vt("recharts-label",d)},p,g,{breakAll:h}),f)}od.displayName="Label";var A8t=function(e){var n=e.cx,i=e.cy,r=e.angle,o=e.startAngle,s=e.endAngle,a=e.r,l=e.radius,c=e.innerRadius,u=e.outerRadius,d=e.x,h=e.y,f=e.top,m=e.left,p=e.width,g=e.height,y=e.clockWise,_=e.labelViewBox;if(_)return _;if(ui(p)&&ui(g)){if(ui(d)&&ui(h))return{x:d,y:h,width:p,height:g};if(ui(f)&&ui(m))return{x:f,y:m,width:p,height:g}}return ui(d)&&ui(h)?{x:d,y:h,width:0,height:0}:ui(n)&&ui(i)?{cx:n,cy:i,startAngle:o||r||0,endAngle:s||r||0,innerRadius:c||0,outerRadius:u||l||a||0,clockWise:y}:e.viewBox?e.viewBox:{}},eWi=function(e,n){return e?e===!0?Z.createElement(od,{key:"label-implicit",viewBox:n}):dd(e)?Z.createElement(od,{key:"label-implicit",viewBox:n,value:e}):b.isValidElement(e)?e.type===od?b.cloneElement(e,{key:"label-implicit",viewBox:n}):Z.createElement(od,{key:"label-implicit",content:e,viewBox:n}):$o(e)?Z.createElement(od,{key:"label-implicit",content:e,viewBox:n}):K6(e)?Z.createElement(od,$W({viewBox:n},e,{key:"label-implicit"})):null:null},tWi=function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&i&&!e.label)return null;var r=e.children,o=A8t(e),s=Rp(r,od).map(function(l,c){return b.cloneElement(l,{viewBox:n||o,key:"label-".concat(c)})});if(!i)return s;var a=eWi(e.label,n||o);return[a].concat(FHi(s))};od.parseViewBox=A8t;od.renderCallByParent=tWi;function nWi(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var iWi=nWi;const rWi=ao(iWi);function VW(t){"@babel/helpers - typeof";return VW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},VW(t)}var oWi=["valueAccessor"],sWi=["data","dataKey","clockWise","id","textBreakAll"];function aWi(t){return dWi(t)||uWi(t)||cWi(t)||lWi()}function lWi(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cWi(t,e){if(t){if(typeof t=="string")return LAe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return LAe(t,e)}}function uWi(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function dWi(t){if(Array.isArray(t))return LAe(t)}function LAe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function ose(){return ose=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ose.apply(this,arguments)}function Mht(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Lht(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Mht(Object(n),!0).forEach(function(i){hWi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mht(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function hWi(t,e,n){return e=fWi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function fWi(t){var e=mWi(t,"string");return VW(e)=="symbol"?e:e+""}function mWi(t,e){if(VW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(VW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Tht(t,e){if(t==null)return{};var n=pWi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function pWi(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}var gWi=function(e){return Array.isArray(e.value)?rWi(e.value):e.value};function Gx(t){var e=t.valueAccessor,n=e===void 0?gWi:e,i=Tht(t,oWi),r=i.data,o=i.dataKey,s=i.clockWise,a=i.id,l=i.textBreakAll,c=Tht(i,sWi);return!r||!r.length?null:Z.createElement(fa,{className:"recharts-label-list"},r.map(function(u,d){var h=So(o)?n(u,d):pd(u&&u.payload,o),f=So(a)?{}:{id:"".concat(a,"-").concat(d)};return Z.createElement(od,ose({},Co(u,!0),c,f,{parentViewBox:u.parentViewBox,value:h,textBreakAll:l,viewBox:od.parseViewBox(So(s)?u:Lht(Lht({},u),{},{clockWise:s})),key:"label-".concat(d),index:d}))}))}Gx.displayName="LabelList";function bWi(t,e){return t?t===!0?Z.createElement(Gx,{key:"labelList-implicit",data:e}):Z.isValidElement(t)||$o(t)?Z.createElement(Gx,{key:"labelList-implicit",data:e,content:t}):K6(t)?Z.createElement(Gx,ose({data:e},t,{key:"labelList-implicit"})):null:null}function vWi(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,r=Rp(i,Gx).map(function(s,a){return b.cloneElement(s,{data:e,key:"labelList-".concat(a)})});if(!n)return r;var o=bWi(t.label,e);return[o].concat(aWi(r))}Gx.renderCallByParent=vWi;function BW(t){"@babel/helpers - typeof";return BW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},BW(t)}function TAe(){return TAe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},TAe.apply(this,arguments)}function Iht(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Aht(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Iht(Object(n),!0).forEach(function(i){yWi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Iht(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function yWi(t,e,n){return e=_Wi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _Wi(t){var e=xWi(t,"string");return BW(e)=="symbol"?e:e+""}function xWi(t,e){if(BW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(BW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var wWi=function(e,n){var i=c0(n-e),r=Math.min(Math.abs(n-e),359.999);return i*r},tJ=function(e){var n=e.cx,i=e.cy,r=e.radius,o=e.angle,s=e.sign,a=e.isExternal,l=e.cornerRadius,c=e.cornerIsExternal,u=l*(a?1:-1)+r,d=Math.asin(l/u)/rse,h=c?o:o+s*d,f=Eh(n,i,u,h),m=Eh(n,i,r,h),p=c?o-s*d:o,g=Eh(n,i,u*Math.cos(d*rse),p);return{center:f,circleTangency:m,lineTangency:g,theta:d}},R8t=function(e){var n=e.cx,i=e.cy,r=e.innerRadius,o=e.outerRadius,s=e.startAngle,a=e.endAngle,l=wWi(s,a),c=s+l,u=Eh(n,i,o,s),d=Eh(n,i,o,c),h="M ".concat(u.x,",").concat(u.y,`
    A `).concat(o,",").concat(o,`,0,
    `).concat(+(Math.abs(l)>180),",").concat(+(s>c),`,
    `).concat(d.x,",").concat(d.y,`
  `);if(r>0){var f=Eh(n,i,r,s),m=Eh(n,i,r,c);h+="L ".concat(m.x,",").concat(m.y,`
            A `).concat(r,",").concat(r,`,0,
            `).concat(+(Math.abs(l)>180),",").concat(+(s<=c),`,
            `).concat(f.x,",").concat(f.y," Z")}else h+="L ".concat(n,",").concat(i," Z");return h},CWi=function(e){var n=e.cx,i=e.cy,r=e.innerRadius,o=e.outerRadius,s=e.cornerRadius,a=e.forceCornerRadius,l=e.cornerIsExternal,c=e.startAngle,u=e.endAngle,d=c0(u-c),h=tJ({cx:n,cy:i,radius:o,angle:c,sign:d,cornerRadius:s,cornerIsExternal:l}),f=h.circleTangency,m=h.lineTangency,p=h.theta,g=tJ({cx:n,cy:i,radius:o,angle:u,sign:-d,cornerRadius:s,cornerIsExternal:l}),y=g.circleTangency,_=g.lineTangency,w=g.theta,C=l?Math.abs(c-u):Math.abs(c-u)-p-w;if(C<0)return a?"M ".concat(m.x,",").concat(m.y,`
        a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0
        a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0
      `):R8t({cx:n,cy:i,innerRadius:r,outerRadius:o,startAngle:c,endAngle:u});var N="M ".concat(m.x,",").concat(m.y,`
    A`).concat(s,",").concat(s,",0,0,").concat(+(d<0),",").concat(f.x,",").concat(f.y,`
    A`).concat(o,",").concat(o,",0,").concat(+(C>180),",").concat(+(d<0),",").concat(y.x,",").concat(y.y,`
    A`).concat(s,",").concat(s,",0,0,").concat(+(d<0),",").concat(_.x,",").concat(_.y,`
  `);if(r>0){var E=tJ({cx:n,cy:i,radius:r,angle:c,sign:d,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),D=E.circleTangency,k=E.lineTangency,M=E.theta,T=tJ({cx:n,cy:i,radius:r,angle:u,sign:-d,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),A=T.circleTangency,R=T.lineTangency,P=T.theta,O=l?Math.abs(c-u):Math.abs(c-u)-M-P;if(O<0&&s===0)return"".concat(N,"L").concat(n,",").concat(i,"Z");N+="L".concat(R.x,",").concat(R.y,`
      A`).concat(s,",").concat(s,",0,0,").concat(+(d<0),",").concat(A.x,",").concat(A.y,`
      A`).concat(r,",").concat(r,",0,").concat(+(O>180),",").concat(+(d>0),",").concat(D.x,",").concat(D.y,`
      A`).concat(s,",").concat(s,",0,0,").concat(+(d<0),",").concat(k.x,",").concat(k.y,"Z")}else N+="L".concat(n,",").concat(i,"Z");return N},SWi={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},P8t=function(e){var n=Aht(Aht({},SWi),e),i=n.cx,r=n.cy,o=n.innerRadius,s=n.outerRadius,a=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,u=n.startAngle,d=n.endAngle,h=n.className;if(s<o||u===d)return null;var f=Vt("recharts-sector",h),m=s-o,p=nA(a,m,0,!0),g;return p>0&&Math.abs(u-d)<360?g=CWi({cx:i,cy:r,innerRadius:o,outerRadius:s,cornerRadius:Math.min(p,m/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):g=R8t({cx:i,cy:r,innerRadius:o,outerRadius:s,startAngle:u,endAngle:d}),Z.createElement("path",TAe({},Co(n,!0),{className:f,d:g,role:"img"}))};function zW(t){"@babel/helpers - typeof";return zW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zW(t)}function IAe(){return IAe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},IAe.apply(this,arguments)}function Rht(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Pht(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Rht(Object(n),!0).forEach(function(i){NWi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rht(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function NWi(t,e,n){return e=EWi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function EWi(t){var e=DWi(t,"string");return zW(e)=="symbol"?e:e+""}function DWi(t,e){if(zW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(zW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Oht={curveBasisClosed:EOi,curveBasisOpen:DOi,curveBasis:NOi,curveBumpX:dOi,curveBumpY:hOi,curveLinearClosed:kOi,curveLinear:Vme,curveMonotoneX:MOi,curveMonotoneY:LOi,curveNatural:TOi,curveStep:IOi,curveStepAfter:ROi,curveStepBefore:AOi},nJ=function(e){return e.x===+e.x&&e.y===+e.y},d7=function(e){return e.x},h7=function(e){return e.y},kWi=function(e,n){if($o(e))return e;var i="curve".concat(Fme(e));return(i==="curveMonotone"||i==="curveBump")&&n?Oht["".concat(i).concat(n==="vertical"?"Y":"X")]:Oht[i]||Vme},MWi=function(e){var n=e.type,i=n===void 0?"linear":n,r=e.points,o=r===void 0?[]:r,s=e.baseLine,a=e.layout,l=e.connectNulls,c=l===void 0?!1:l,u=kWi(i,a),d=c?o.filter(function(p){return nJ(p)}):o,h;if(Array.isArray(s)){var f=c?s.filter(function(p){return nJ(p)}):s,m=d.map(function(p,g){return Pht(Pht({},p),{},{base:f[g]})});return a==="vertical"?h=KQ().y(h7).x1(d7).x0(function(p){return p.base.x}):h=KQ().x(d7).y1(h7).y0(function(p){return p.base.y}),h.defined(nJ).curve(u),h(m)}return a==="vertical"&&ui(s)?h=KQ().y(h7).x1(d7).x0(s):ui(s)?h=KQ().x(d7).y1(h7).y0(s):h=O6t().x(d7).y(h7),h.defined(nJ).curve(u),h(d)},bI=function(e){var n=e.className,i=e.points,r=e.path,o=e.pathRef;if((!i||!i.length)&&!r)return null;var s=i&&i.length?MWi(e):r;return Z.createElement("path",IAe({},Co(e,!1),Moe(e),{className:Vt("recharts-curve",n),d:s,ref:o}))},LWi=Object.getOwnPropertyNames,TWi=Object.getOwnPropertySymbols,IWi=Object.prototype.hasOwnProperty;function jht(t,e){return function(i,r,o){return t(i,r,o)&&e(i,r,o)}}function iJ(t){return function(n,i,r){if(!n||!i||typeof n!="object"||typeof i!="object")return t(n,i,r);var o=r.cache,s=o.get(n),a=o.get(i);if(s&&a)return s===i&&a===n;o.set(n,i),o.set(i,n);var l=t(n,i,r);return o.delete(n),o.delete(i),l}}function Fht(t){return LWi(t).concat(TWi(t))}var O8t=Object.hasOwn||function(t,e){return IWi.call(t,e)};function r$(t,e){return t||e?t===e:t===e||t!==t&&e!==e}var j8t="_owner",$ht=Object.getOwnPropertyDescriptor,Vht=Object.keys;function AWi(t,e,n){var i=t.length;if(e.length!==i)return!1;for(;i-- >0;)if(!n.equals(t[i],e[i],i,i,t,e,n))return!1;return!0}function RWi(t,e){return r$(t.getTime(),e.getTime())}function Bht(t,e,n){if(t.size!==e.size)return!1;for(var i={},r=t.entries(),o=0,s,a;(s=r.next())&&!s.done;){for(var l=e.entries(),c=!1,u=0;(a=l.next())&&!a.done;){var d=s.value,h=d[0],f=d[1],m=a.value,p=m[0],g=m[1];!c&&!i[u]&&(c=n.equals(h,p,o,u,t,e,n)&&n.equals(f,g,h,p,t,e,n))&&(i[u]=!0),u++}if(!c)return!1;o++}return!0}function PWi(t,e,n){var i=Vht(t),r=i.length;if(Vht(e).length!==r)return!1;for(var o;r-- >0;)if(o=i[r],o===j8t&&(t.$$typeof||e.$$typeof)&&t.$$typeof!==e.$$typeof||!O8t(e,o)||!n.equals(t[o],e[o],o,o,t,e,n))return!1;return!0}function f7(t,e,n){var i=Fht(t),r=i.length;if(Fht(e).length!==r)return!1;for(var o,s,a;r-- >0;)if(o=i[r],o===j8t&&(t.$$typeof||e.$$typeof)&&t.$$typeof!==e.$$typeof||!O8t(e,o)||!n.equals(t[o],e[o],o,o,t,e,n)||(s=$ht(t,o),a=$ht(e,o),(s||a)&&(!s||!a||s.configurable!==a.configurable||s.enumerable!==a.enumerable||s.writable!==a.writable)))return!1;return!0}function OWi(t,e){return r$(t.valueOf(),e.valueOf())}function jWi(t,e){return t.source===e.source&&t.flags===e.flags}function zht(t,e,n){if(t.size!==e.size)return!1;for(var i={},r=t.values(),o,s;(o=r.next())&&!o.done;){for(var a=e.values(),l=!1,c=0;(s=a.next())&&!s.done;)!l&&!i[c]&&(l=n.equals(o.value,s.value,o.value,s.value,t,e,n))&&(i[c]=!0),c++;if(!l)return!1}return!0}function FWi(t,e){var n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}var $Wi="[object Arguments]",VWi="[object Boolean]",BWi="[object Date]",zWi="[object Map]",HWi="[object Number]",WWi="[object Object]",UWi="[object RegExp]",KWi="[object Set]",qWi="[object String]",GWi=Array.isArray,Hht=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Wht=Object.assign,YWi=Object.prototype.toString.call.bind(Object.prototype.toString);function XWi(t){var e=t.areArraysEqual,n=t.areDatesEqual,i=t.areMapsEqual,r=t.areObjectsEqual,o=t.arePrimitiveWrappersEqual,s=t.areRegExpsEqual,a=t.areSetsEqual,l=t.areTypedArraysEqual;return function(u,d,h){if(u===d)return!0;if(u==null||d==null||typeof u!="object"||typeof d!="object")return u!==u&&d!==d;var f=u.constructor;if(f!==d.constructor)return!1;if(f===Object)return r(u,d,h);if(GWi(u))return e(u,d,h);if(Hht!=null&&Hht(u))return l(u,d,h);if(f===Date)return n(u,d,h);if(f===RegExp)return s(u,d,h);if(f===Map)return i(u,d,h);if(f===Set)return a(u,d,h);var m=YWi(u);return m===BWi?n(u,d,h):m===UWi?s(u,d,h):m===zWi?i(u,d,h):m===KWi?a(u,d,h):m===WWi?typeof u.then!="function"&&typeof d.then!="function"&&r(u,d,h):m===$Wi?r(u,d,h):m===VWi||m===HWi||m===qWi?o(u,d,h):!1}}function ZWi(t){var e=t.circular,n=t.createCustomConfig,i=t.strict,r={areArraysEqual:i?f7:AWi,areDatesEqual:RWi,areMapsEqual:i?jht(Bht,f7):Bht,areObjectsEqual:i?f7:PWi,arePrimitiveWrappersEqual:OWi,areRegExpsEqual:jWi,areSetsEqual:i?jht(zht,f7):zht,areTypedArraysEqual:i?f7:FWi};if(n&&(r=Wht({},r,n(r))),e){var o=iJ(r.areArraysEqual),s=iJ(r.areMapsEqual),a=iJ(r.areObjectsEqual),l=iJ(r.areSetsEqual);r=Wht({},r,{areArraysEqual:o,areMapsEqual:s,areObjectsEqual:a,areSetsEqual:l})}return r}function QWi(t){return function(e,n,i,r,o,s,a){return t(e,n,a)}}function JWi(t){var e=t.circular,n=t.comparator,i=t.createState,r=t.equals,o=t.strict;if(i)return function(l,c){var u=i(),d=u.cache,h=d===void 0?e?new WeakMap:void 0:d,f=u.meta;return n(l,c,{cache:h,equals:r,meta:f,strict:o})};if(e)return function(l,c){return n(l,c,{cache:new WeakMap,equals:r,meta:void 0,strict:o})};var s={cache:void 0,equals:r,meta:void 0,strict:o};return function(l,c){return n(l,c,s)}}var eUi=fM();fM({strict:!0});fM({circular:!0});fM({circular:!0,strict:!0});fM({createInternalComparator:function(){return r$}});fM({strict:!0,createInternalComparator:function(){return r$}});fM({circular:!0,createInternalComparator:function(){return r$}});fM({circular:!0,createInternalComparator:function(){return r$},strict:!0});function fM(t){t===void 0&&(t={});var e=t.circular,n=e===void 0?!1:e,i=t.createInternalComparator,r=t.createState,o=t.strict,s=o===void 0?!1:o,a=ZWi(t),l=XWi(a),c=i?i(l):QWi(l);return JWi({circular:n,comparator:l,createState:r,equals:c,strict:s})}function tUi(t){typeof requestAnimationFrame<"u"&&requestAnimationFrame(t)}function Uht(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,i=function r(o){n<0&&(n=o),o-n>e?(t(o),n=-1):tUi(r)};requestAnimationFrame(i)}function AAe(t){"@babel/helpers - typeof";return AAe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},AAe(t)}function nUi(t){return sUi(t)||oUi(t)||rUi(t)||iUi()}function iUi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rUi(t,e){if(t){if(typeof t=="string")return Kht(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kht(t,e)}}function Kht(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function oUi(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function sUi(t){if(Array.isArray(t))return t}function aUi(){var t={},e=function(){return null},n=!1,i=function r(o){if(!n){if(Array.isArray(o)){if(!o.length)return;var s=o,a=nUi(s),l=a[0],c=a.slice(1);if(typeof l=="number"){Uht(r.bind(null,c),l);return}r(l),Uht(r.bind(null,c));return}AAe(o)==="object"&&(t=o,e(t)),typeof o=="function"&&o()}};return{stop:function(){n=!0},start:function(o){n=!1,i(o)},subscribe:function(o){return e=o,function(){e=function(){return null}}}}}function HW(t){"@babel/helpers - typeof";return HW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},HW(t)}function qht(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Ght(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qht(Object(n),!0).forEach(function(i){F8t(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qht(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function F8t(t,e,n){return e=lUi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lUi(t){var e=cUi(t,"string");return HW(e)==="symbol"?e:String(e)}function cUi(t,e){if(HW(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(HW(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var uUi=function(e,n){return[Object.keys(e),Object.keys(n)].reduce(function(i,r){return i.filter(function(o){return r.includes(o)})})},dUi=function(e){return e},hUi=function(e){return e.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},_B=function(e,n){return Object.keys(n).reduce(function(i,r){return Ght(Ght({},i),{},F8t({},r,e(r,n[r])))},{})},Yht=function(e,n,i){return e.map(function(r){return"".concat(hUi(r)," ").concat(n,"ms ").concat(i)}).join(",")},sse=function(e,n,i,r,o,s,a,l){if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!e))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[i,r,o,s,a,l],u=0;console.warn(n.replace(/%s/g,function(){return c[u++]}))}};function fUi(t,e){return gUi(t)||pUi(t,e)||$8t(t,e)||mUi()}function mUi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pUi(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(u){c=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}function gUi(t){if(Array.isArray(t))return t}function bUi(t){return _Ui(t)||yUi(t)||$8t(t)||vUi()}function vUi(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $8t(t,e){if(t){if(typeof t=="string")return RAe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return RAe(t,e)}}function yUi(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function _Ui(t){if(Array.isArray(t))return RAe(t)}function RAe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var ase=1e-4,V8t=function(e,n){return[0,3*e,3*n-6*e,3*e-3*n+1]},B8t=function(e,n){return e.map(function(i,r){return i*Math.pow(n,r)}).reduce(function(i,r){return i+r})},Xht=function(e,n){return function(i){var r=V8t(e,n);return B8t(r,i)}},xUi=function(e,n){return function(i){var r=V8t(e,n),o=[].concat(bUi(r.map(function(s,a){return s*a}).slice(1)),[0]);return B8t(o,i)}},Zht=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];var r=n[0],o=n[1],s=n[2],a=n[3];if(n.length===1)switch(n[0]){case"linear":r=0,o=0,s=1,a=1;break;case"ease":r=.25,o=.1,s=.25,a=1;break;case"ease-in":r=.42,o=0,s=1,a=1;break;case"ease-out":r=.42,o=0,s=.58,a=1;break;case"ease-in-out":r=0,o=0,s=.58,a=1;break;default:{var l=n[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var c=l[1].split(")")[0].split(",").map(function(g){return parseFloat(g)}),u=fUi(c,4);r=u[0],o=u[1],s=u[2],a=u[3]}else sse(!1,"[configBezier]: arguments should be one of oneOf 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', instead received %s",n)}}sse([r,s,o,a].every(function(g){return typeof g=="number"&&g>=0&&g<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",n);var d=Xht(r,s),h=Xht(o,a),f=xUi(r,s),m=function(y){return y>1?1:y<0?0:y},p=function(y){for(var _=y>1?1:y,w=_,C=0;C<8;++C){var N=d(w)-_,E=f(w);if(Math.abs(N-_)<ase||E<ase)return h(w);w=m(w-N/E)}return h(w)};return p.isStepper=!1,p},wUi=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.stiff,i=n===void 0?100:n,r=e.damping,o=r===void 0?8:r,s=e.dt,a=s===void 0?17:s,l=function(u,d,h){var f=-(u-d)*i,m=h*o,p=h+(f-m)*a/1e3,g=h*a/1e3+u;return Math.abs(g-d)<ase&&Math.abs(p)<ase?[d,0]:[g,p]};return l.isStepper=!0,l.dt=a,l},CUi=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];var r=n[0];if(typeof r=="string")switch(r){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Zht(r);case"spring":return wUi();default:if(r.split("(")[0]==="cubic-bezier")return Zht(r);sse(!1,"[configEasing]: first argument should be one of 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', 'linear' and 'spring', instead  received %s",n)}return typeof r=="function"?r:(sse(!1,"[configEasing]: first argument type should be function or string, instead received %s",n),null)};function WW(t){"@babel/helpers - typeof";return WW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},WW(t)}function Qht(t){return EUi(t)||NUi(t)||z8t(t)||SUi()}function SUi(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NUi(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function EUi(t){if(Array.isArray(t))return OAe(t)}function Jht(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function fh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Jht(Object(n),!0).forEach(function(i){PAe(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Jht(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function PAe(t,e,n){return e=DUi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function DUi(t){var e=kUi(t,"string");return WW(e)==="symbol"?e:String(e)}function kUi(t,e){if(WW(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(WW(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function MUi(t,e){return IUi(t)||TUi(t,e)||z8t(t,e)||LUi()}function LUi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z8t(t,e){if(t){if(typeof t=="string")return OAe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OAe(t,e)}}function OAe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function TUi(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(u){c=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}function IUi(t){if(Array.isArray(t))return t}var lse=function(e,n,i){return e+(n-e)*i},jAe=function(e){var n=e.from,i=e.to;return n!==i},AUi=function t(e,n,i){var r=_B(function(o,s){if(jAe(s)){var a=e(s.from,s.to,s.velocity),l=MUi(a,2),c=l[0],u=l[1];return fh(fh({},s),{},{from:c,velocity:u})}return s},n);return i<1?_B(function(o,s){return jAe(s)?fh(fh({},s),{},{velocity:lse(s.velocity,r[o].velocity,i),from:lse(s.from,r[o].from,i)}):s},n):t(e,r,i-1)};const RUi=function(t,e,n,i,r){var o=uUi(t,e),s=o.reduce(function(g,y){return fh(fh({},g),{},PAe({},y,[t[y],e[y]]))},{}),a=o.reduce(function(g,y){return fh(fh({},g),{},PAe({},y,{from:t[y],velocity:0,to:e[y]}))},{}),l=-1,c,u,d=function(){return null},h=function(){return _B(function(y,_){return _.from},a)},f=function(){return!Object.values(a).filter(jAe).length},m=function(y){c||(c=y);var _=y-c,w=_/n.dt;a=AUi(n,a,w),r(fh(fh(fh({},t),e),h())),c=y,f()||(l=requestAnimationFrame(d))},p=function(y){u||(u=y);var _=(y-u)/i,w=_B(function(N,E){return lse.apply(void 0,Qht(E).concat([n(_)]))},s);if(r(fh(fh(fh({},t),e),w)),_<1)l=requestAnimationFrame(d);else{var C=_B(function(N,E){return lse.apply(void 0,Qht(E).concat([n(1)]))},s);r(fh(fh(fh({},t),e),C))}};return d=n.isStepper?m:p,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(l)}}};function O5(t){"@babel/helpers - typeof";return O5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O5(t)}var PUi=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function OUi(t,e){if(t==null)return{};var n=jUi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function jUi(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}function fCe(t){return BUi(t)||VUi(t)||$Ui(t)||FUi()}function FUi(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $Ui(t,e){if(t){if(typeof t=="string")return FAe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FAe(t,e)}}function VUi(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function BUi(t){if(Array.isArray(t))return FAe(t)}function FAe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function eft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function _y(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?eft(Object(n),!0).forEach(function(i){r9(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):eft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function r9(t,e,n){return e=H8t(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zUi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function HUi(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,H8t(i.key),i)}}function WUi(t,e,n){return e&&HUi(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function H8t(t){var e=UUi(t,"string");return O5(e)==="symbol"?e:String(e)}function UUi(t,e){if(O5(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(O5(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function KUi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$Ae(t,e)}function $Ae(t,e){return $Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},$Ae(t,e)}function qUi(t){var e=GUi();return function(){var i=cse(t),r;if(e){var o=cse(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return VAe(this,r)}}function VAe(t,e){if(e&&(O5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BAe(t)}function BAe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function GUi(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cse(t){return cse=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cse(t)}var e_=function(t){KUi(n,t);var e=qUi(n);function n(i,r){var o;zUi(this,n),o=e.call(this,i,r);var s=o.props,a=s.isActive,l=s.attributeName,c=s.from,u=s.to,d=s.steps,h=s.children,f=s.duration;if(o.handleStyleChange=o.handleStyleChange.bind(BAe(o)),o.changeStyle=o.changeStyle.bind(BAe(o)),!a||f<=0)return o.state={style:{}},typeof h=="function"&&(o.state={style:u}),VAe(o);if(d&&d.length)o.state={style:d[0].style};else if(c){if(typeof h=="function")return o.state={style:c},VAe(o);o.state={style:l?r9({},l,c):c}}else o.state={style:{}};return o}return WUi(n,[{key:"componentDidMount",value:function(){var r=this.props,o=r.isActive,s=r.canBegin;this.mounted=!0,!(!o||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(r){var o=this.props,s=o.isActive,a=o.canBegin,l=o.attributeName,c=o.shouldReAnimate,u=o.to,d=o.from,h=this.state.style;if(a){if(!s){var f={style:l?r9({},l,u):u};this.state&&h&&(l&&h[l]!==u||!l&&h!==u)&&this.setState(f);return}if(!(eUi(r.to,u)&&r.canBegin&&r.isActive)){var m=!r.canBegin||!r.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var p=m||c?d:r.to;if(this.state&&h){var g={style:l?r9({},l,p):p};(l&&h[l]!==p||!l&&h!==p)&&this.setState(g)}this.runAnimation(_y(_y({},this.props),{},{from:p,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var r=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),r&&r()}},{key:"handleStyleChange",value:function(r){this.changeStyle(r)}},{key:"changeStyle",value:function(r){this.mounted&&this.setState({style:r})}},{key:"runJSAnimation",value:function(r){var o=this,s=r.from,a=r.to,l=r.duration,c=r.easing,u=r.begin,d=r.onAnimationEnd,h=r.onAnimationStart,f=RUi(s,a,CUi(c),l,this.changeStyle),m=function(){o.stopJSAnimation=f()};this.manager.start([h,u,m,l,d])}},{key:"runStepAnimation",value:function(r){var o=this,s=r.steps,a=r.begin,l=r.onAnimationStart,c=s[0],u=c.style,d=c.duration,h=d===void 0?0:d,f=function(p,g,y){if(y===0)return p;var _=g.duration,w=g.easing,C=w===void 0?"ease":w,N=g.style,E=g.properties,D=g.onAnimationEnd,k=y>0?s[y-1]:g,M=E||Object.keys(N);if(typeof C=="function"||C==="spring")return[].concat(fCe(p),[o.runJSAnimation.bind(o,{from:k.style,to:N,duration:_,easing:C}),_]);var T=Yht(M,_,C),A=_y(_y(_y({},k.style),N),{},{transition:T});return[].concat(fCe(p),[A,_,D]).filter(dUi)};return this.manager.start([l].concat(fCe(s.reduce(f,[u,Math.max(h,a)])),[r.onAnimationEnd]))}},{key:"runAnimation",value:function(r){this.manager||(this.manager=aUi());var o=r.begin,s=r.duration,a=r.attributeName,l=r.to,c=r.easing,u=r.onAnimationStart,d=r.onAnimationEnd,h=r.steps,f=r.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof c=="function"||typeof f=="function"||c==="spring"){this.runJSAnimation(r);return}if(h.length>1){this.runStepAnimation(r);return}var p=a?r9({},a,l):l,g=Yht(Object.keys(p),s,c);m.start([u,o,_y(_y({},p),{},{transition:g}),s,d])}},{key:"render",value:function(){var r=this.props,o=r.children;r.begin;var s=r.duration;r.attributeName,r.easing;var a=r.isActive;r.steps,r.from,r.to,r.canBegin,r.onAnimationEnd,r.shouldReAnimate,r.onAnimationReStart;var l=OUi(r,PUi),c=b.Children.count(o),u=this.state.style;if(typeof o=="function")return o(u);if(!a||c===0||s<=0)return o;var d=function(f){var m=f.props,p=m.style,g=p===void 0?{}:p,y=m.className,_=b.cloneElement(f,_y(_y({},l),{},{style:_y(_y({},g),u),className:y}));return _};return c===1?d(b.Children.only(o)):Z.createElement("div",null,b.Children.map(o,function(h){return d(h)}))}}]),n}(b.PureComponent);e_.displayName="Animate";e_.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};e_.propTypes={from:Tn.oneOfType([Tn.object,Tn.string]),to:Tn.oneOfType([Tn.object,Tn.string]),attributeName:Tn.string,duration:Tn.number,begin:Tn.number,easing:Tn.oneOfType([Tn.string,Tn.func]),steps:Tn.arrayOf(Tn.shape({duration:Tn.number.isRequired,style:Tn.object.isRequired,easing:Tn.oneOfType([Tn.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Tn.func]),properties:Tn.arrayOf("string"),onAnimationEnd:Tn.func})),children:Tn.oneOfType([Tn.node,Tn.func]),isActive:Tn.bool,canBegin:Tn.bool,onAnimationEnd:Tn.func,shouldReAnimate:Tn.bool,onAnimationStart:Tn.func,onAnimationReStart:Tn.func};Tn.object,Tn.object,Tn.object,Tn.element;Tn.object,Tn.object,Tn.object,Tn.oneOfType([Tn.array,Tn.element]),Tn.any;function UW(t){"@babel/helpers - typeof";return UW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},UW(t)}function use(){return use=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},use.apply(this,arguments)}function YUi(t,e){return JUi(t)||QUi(t,e)||ZUi(t,e)||XUi()}function XUi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZUi(t,e){if(t){if(typeof t=="string")return tft(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tft(t,e)}}function tft(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function QUi(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(u){c=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}function JUi(t){if(Array.isArray(t))return t}function nft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function ift(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nft(Object(n),!0).forEach(function(i){eKi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function eKi(t,e,n){return e=tKi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tKi(t){var e=nKi(t,"string");return UW(e)=="symbol"?e:e+""}function nKi(t,e){if(UW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(UW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var rft=function(e,n,i,r,o){var s=Math.min(Math.abs(i)/2,Math.abs(r)/2),a=r>=0?1:-1,l=i>=0?1:-1,c=r>=0&&i>=0||r<0&&i<0?1:0,u;if(s>0&&o instanceof Array){for(var d=[0,0,0,0],h=0,f=4;h<f;h++)d[h]=o[h]>s?s:o[h];u="M".concat(e,",").concat(n+a*d[0]),d[0]>0&&(u+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(e+l*d[0],",").concat(n)),u+="L ".concat(e+i-l*d[1],",").concat(n),d[1]>0&&(u+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`,
        `).concat(e+i,",").concat(n+a*d[1])),u+="L ".concat(e+i,",").concat(n+r-a*d[2]),d[2]>0&&(u+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(c,`,
        `).concat(e+i-l*d[2],",").concat(n+r)),u+="L ".concat(e+l*d[3],",").concat(n+r),d[3]>0&&(u+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(c,`,
        `).concat(e,",").concat(n+r-a*d[3])),u+="Z"}else if(s>0&&o===+o&&o>0){var m=Math.min(s,o);u="M ".concat(e,",").concat(n+a*m,`
            A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(e+l*m,",").concat(n,`
            L `).concat(e+i-l*m,",").concat(n,`
            A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(e+i,",").concat(n+a*m,`
            L `).concat(e+i,",").concat(n+r-a*m,`
            A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(e+i-l*m,",").concat(n+r,`
            L `).concat(e+l*m,",").concat(n+r,`
            A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(e,",").concat(n+r-a*m," Z")}else u="M ".concat(e,",").concat(n," h ").concat(i," v ").concat(r," h ").concat(-i," Z");return u},iKi=function(e,n){if(!e||!n)return!1;var i=e.x,r=e.y,o=n.x,s=n.y,a=n.width,l=n.height;if(Math.abs(a)>0&&Math.abs(l)>0){var c=Math.min(o,o+a),u=Math.max(o,o+a),d=Math.min(s,s+l),h=Math.max(s,s+l);return i>=c&&i<=u&&r>=d&&r<=h}return!1},rKi={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},K9e=function(e){var n=ift(ift({},rKi),e),i=b.useRef(),r=b.useState(-1),o=YUi(r,2),s=o[0],a=o[1];b.useEffect(function(){if(i.current&&i.current.getTotalLength)try{var C=i.current.getTotalLength();C&&a(C)}catch{}},[]);var l=n.x,c=n.y,u=n.width,d=n.height,h=n.radius,f=n.className,m=n.animationEasing,p=n.animationDuration,g=n.animationBegin,y=n.isAnimationActive,_=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||d!==+d||u===0||d===0)return null;var w=Vt("recharts-rectangle",f);return _?Z.createElement(e_,{canBegin:s>0,from:{width:u,height:d,x:l,y:c},to:{width:u,height:d,x:l,y:c},duration:p,animationEasing:m,isActive:_},function(C){var N=C.width,E=C.height,D=C.x,k=C.y;return Z.createElement(e_,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:p,isActive:y,easing:m},Z.createElement("path",use({},Co(n,!0),{className:w,d:rft(D,k,N,E,h),ref:i})))}):Z.createElement("path",use({},Co(n,!0),{className:w,d:rft(l,c,u,d,h)}))};function zAe(){return zAe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},zAe.apply(this,arguments)}var tpe=function(e){var n=e.cx,i=e.cy,r=e.r,o=e.className,s=Vt("recharts-dot",o);return n===+n&&i===+i&&r===+r?Z.createElement("circle",zAe({},Co(e,!1),Moe(e),{className:s,cx:n,cy:i,r})):null};function KW(t){"@babel/helpers - typeof";return KW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},KW(t)}var oKi=["x","y","top","left","width","height","className"];function HAe(){return HAe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},HAe.apply(this,arguments)}function oft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function sKi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?oft(Object(n),!0).forEach(function(i){aKi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function aKi(t,e,n){return e=lKi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lKi(t){var e=cKi(t,"string");return KW(e)=="symbol"?e:e+""}function cKi(t,e){if(KW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(KW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function uKi(t,e){if(t==null)return{};var n=dKi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function dKi(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}var hKi=function(e,n,i,r,o,s){return"M".concat(e,",").concat(o,"v").concat(r,"M").concat(s,",").concat(n,"h").concat(i)},fKi=function(e){var n=e.x,i=n===void 0?0:n,r=e.y,o=r===void 0?0:r,s=e.top,a=s===void 0?0:s,l=e.left,c=l===void 0?0:l,u=e.width,d=u===void 0?0:u,h=e.height,f=h===void 0?0:h,m=e.className,p=uKi(e,oKi),g=sKi({x:i,y:o,top:a,left:c,width:d,height:f},p);return!ui(i)||!ui(o)||!ui(d)||!ui(f)||!ui(a)||!ui(c)?null:Z.createElement("path",HAe({},Co(g,!0),{className:Vt("recharts-cross",m),d:hKi(i,o,d,f,a,c)}))},mKi=s$t,pKi=mKi(Object.getPrototypeOf,Object),gKi=pKi,bKi=XS,vKi=gKi,yKi=ZS,_Ki="[object Object]",xKi=Function.prototype,wKi=Object.prototype,W8t=xKi.toString,CKi=wKi.hasOwnProperty,SKi=W8t.call(Object);function NKi(t){if(!yKi(t)||bKi(t)!=_Ki)return!1;var e=vKi(t);if(e===null)return!0;var n=CKi.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&W8t.call(n)==SKi}var EKi=NKi;const DKi=ao(EKi);var kKi=XS,MKi=ZS,LKi="[object Boolean]";function TKi(t){return t===!0||t===!1||MKi(t)&&kKi(t)==LKi}var IKi=TKi;const AKi=ao(IKi);function qW(t){"@babel/helpers - typeof";return qW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qW(t)}function dse(){return dse=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},dse.apply(this,arguments)}function RKi(t,e){return FKi(t)||jKi(t,e)||OKi(t,e)||PKi()}function PKi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OKi(t,e){if(t){if(typeof t=="string")return sft(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sft(t,e)}}function sft(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function jKi(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(u){c=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}function FKi(t){if(Array.isArray(t))return t}function aft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function lft(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?aft(Object(n),!0).forEach(function(i){$Ki(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):aft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function $Ki(t,e,n){return e=VKi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function VKi(t){var e=BKi(t,"string");return qW(e)=="symbol"?e:e+""}function BKi(t,e){if(qW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(qW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var cft=function(e,n,i,r,o){var s=i-r,a;return a="M ".concat(e,",").concat(n),a+="L ".concat(e+i,",").concat(n),a+="L ".concat(e+i-s/2,",").concat(n+o),a+="L ".concat(e+i-s/2-r,",").concat(n+o),a+="L ".concat(e,",").concat(n," Z"),a},zKi={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},HKi=function(e){var n=lft(lft({},zKi),e),i=b.useRef(),r=b.useState(-1),o=RKi(r,2),s=o[0],a=o[1];b.useEffect(function(){if(i.current&&i.current.getTotalLength)try{var w=i.current.getTotalLength();w&&a(w)}catch{}},[]);var l=n.x,c=n.y,u=n.upperWidth,d=n.lowerWidth,h=n.height,f=n.className,m=n.animationEasing,p=n.animationDuration,g=n.animationBegin,y=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||d!==+d||h!==+h||u===0&&d===0||h===0)return null;var _=Vt("recharts-trapezoid",f);return y?Z.createElement(e_,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:c},to:{upperWidth:u,lowerWidth:d,height:h,x:l,y:c},duration:p,animationEasing:m,isActive:y},function(w){var C=w.upperWidth,N=w.lowerWidth,E=w.height,D=w.x,k=w.y;return Z.createElement(e_,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:p,easing:m},Z.createElement("path",dse({},Co(n,!0),{className:_,d:cft(D,k,C,N,E),ref:i})))}):Z.createElement("g",null,Z.createElement("path",dse({},Co(n,!0),{className:_,d:cft(l,c,u,d,h)})))},WKi=["option","shapeType","propTransformer","activeClassName","isActive"];function GW(t){"@babel/helpers - typeof";return GW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},GW(t)}function UKi(t,e){if(t==null)return{};var n=KKi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function KKi(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function uft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function hse(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?uft(Object(n),!0).forEach(function(i){qKi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):uft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function qKi(t,e,n){return e=GKi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function GKi(t){var e=YKi(t,"string");return GW(e)=="symbol"?e:e+""}function YKi(t,e){if(GW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(GW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function XKi(t,e){return hse(hse({},e),t)}function ZKi(t,e){return t==="symbols"}function dft(t){var e=t.shapeType,n=t.elementProps;switch(e){case"rectangle":return Z.createElement(K9e,n);case"trapezoid":return Z.createElement(HKi,n);case"sector":return Z.createElement(P8t,n);case"symbols":if(ZKi(e))return Z.createElement(zme,n);break;default:return null}}function QKi(t){return b.isValidElement(t)?t.props:t}function WAe(t){var e=t.option,n=t.shapeType,i=t.propTransformer,r=i===void 0?XKi:i,o=t.activeClassName,s=o===void 0?"recharts-active-shape":o,a=t.isActive,l=UKi(t,WKi),c;if(b.isValidElement(e))c=b.cloneElement(e,hse(hse({},l),QKi(e)));else if($o(e))c=e(l);else if(DKi(e)&&!AKi(e)){var u=r(e,l);c=Z.createElement(dft,{shapeType:n,elementProps:u})}else{var d=l;c=Z.createElement(dft,{shapeType:n,elementProps:d})}return a?Z.createElement(fa,{className:s},c):c}function npe(t,e){return e!=null&&"trapezoids"in t.props}function ipe(t,e){return e!=null&&"sectors"in t.props}function YW(t,e){return e!=null&&"points"in t.props}function JKi(t,e){var n,i,r=t.x===(e==null||(n=e.labelViewBox)===null||n===void 0?void 0:n.x)||t.x===e.x,o=t.y===(e==null||(i=e.labelViewBox)===null||i===void 0?void 0:i.y)||t.y===e.y;return r&&o}function eqi(t,e){var n=t.endAngle===e.endAngle,i=t.startAngle===e.startAngle;return n&&i}function tqi(t,e){var n=t.x===e.x,i=t.y===e.y,r=t.z===e.z;return n&&i&&r}function nqi(t,e){var n;return npe(t,e)?n=JKi:ipe(t,e)?n=eqi:YW(t,e)&&(n=tqi),n}function iqi(t,e){var n;return npe(t,e)?n="trapezoids":ipe(t,e)?n="sectors":YW(t,e)&&(n="points"),n}function rqi(t,e){if(npe(t,e)){var n;return(n=e.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(ipe(t,e)){var i;return(i=e.tooltipPayload)===null||i===void 0||(i=i[0])===null||i===void 0||(i=i.payload)===null||i===void 0?void 0:i.payload}return YW(t,e)?e.payload:{}}function oqi(t){var e=t.activeTooltipItem,n=t.graphicalItem,i=t.itemData,r=iqi(n,e),o=rqi(n,e),s=i.filter(function(l,c){var u=iA(o,l),d=n.props[r].filter(function(m){var p=nqi(n,e);return p(m,e)}),h=n.props[r].indexOf(d[d.length-1]),f=c===h;return u&&f}),a=i.indexOf(s[s.length-1]);return a}var sqi=Math.ceil,aqi=Math.max;function lqi(t,e,n,i){for(var r=-1,o=aqi(sqi((e-t)/(n||1)),0),s=Array(o);o--;)s[i?o:++r]=t,t+=n;return s}var cqi=lqi,uqi=N$t,hft=1/0,dqi=17976931348623157e292;function hqi(t){if(!t)return t===0?t:0;if(t=uqi(t),t===hft||t===-hft){var e=t<0?-1:1;return e*dqi}return t===t?t:0}var U8t=hqi,fqi=cqi,mqi=Ume,mCe=U8t;function pqi(t){return function(e,n,i){return i&&typeof i!="number"&&mqi(e,n,i)&&(n=i=void 0),e=mCe(e),n===void 0?(n=e,e=0):n=mCe(n),i=i===void 0?e<n?1:-1:mCe(i),fqi(e,n,i,t)}}var gqi=pqi,bqi=gqi,vqi=bqi(),yqi=vqi;const fse=ao(yqi);function XW(t){"@babel/helpers - typeof";return XW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},XW(t)}function fft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function mft(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fft(Object(n),!0).forEach(function(i){K8t(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function K8t(t,e,n){return e=_qi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _qi(t){var e=xqi(t,"string");return XW(e)=="symbol"?e:e+""}function xqi(t,e){if(XW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(XW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var wqi=["Webkit","Moz","O","ms"],Cqi=function(e,n){var i=e.replace(/(\w)/,function(o){return o.toUpperCase()}),r=wqi.reduce(function(o,s){return mft(mft({},o),{},K8t({},s+i,n))},{});return r[e]=n,r};function j5(t){"@babel/helpers - typeof";return j5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j5(t)}function mse(){return mse=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},mse.apply(this,arguments)}function pft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function pCe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?pft(Object(n),!0).forEach(function(i){kg(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Sqi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gft(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,G8t(i.key),i)}}function Nqi(t,e,n){return e&&gft(t.prototype,e),n&&gft(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Eqi(t,e,n){return e=pse(e),Dqi(t,q8t()?Reflect.construct(e,n||[],pse(t).constructor):e.apply(t,n))}function Dqi(t,e){if(e&&(j5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kqi(t)}function kqi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function q8t(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(q8t=function(){return!!t})()}function pse(t){return pse=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pse(t)}function Mqi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&UAe(t,e)}function UAe(t,e){return UAe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},UAe(t,e)}function kg(t,e,n){return e=G8t(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function G8t(t){var e=Lqi(t,"string");return j5(e)=="symbol"?e:e+""}function Lqi(t,e){if(j5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(j5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Tqi=function(e){var n=e.data,i=e.startIndex,r=e.endIndex,o=e.x,s=e.width,a=e.travellerWidth;if(!n||!n.length)return{};var l=n.length,c=vB().domain(fse(0,l)).range([o,o+s-a]),u=c.domain().map(function(d){return c(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(i),endX:c(r),scale:c,scaleValues:u}},bft=function(e){return e.changedTouches&&!!e.changedTouches.length},F5=function(t){function e(n){var i;return Sqi(this,e),i=Eqi(this,e,[n]),kg(i,"handleDrag",function(r){i.leaveTimer&&(clearTimeout(i.leaveTimer),i.leaveTimer=null),i.state.isTravellerMoving?i.handleTravellerMove(r):i.state.isSlideMoving&&i.handleSlideDrag(r)}),kg(i,"handleTouchMove",function(r){r.changedTouches!=null&&r.changedTouches.length>0&&i.handleDrag(r.changedTouches[0])}),kg(i,"handleDragEnd",function(){i.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var r=i.props,o=r.endIndex,s=r.onDragEnd,a=r.startIndex;s==null||s({endIndex:o,startIndex:a})}),i.detachDragEndListener()}),kg(i,"handleLeaveWrapper",function(){(i.state.isTravellerMoving||i.state.isSlideMoving)&&(i.leaveTimer=window.setTimeout(i.handleDragEnd,i.props.leaveTimeOut))}),kg(i,"handleEnterSlideOrTraveller",function(){i.setState({isTextActive:!0})}),kg(i,"handleLeaveSlideOrTraveller",function(){i.setState({isTextActive:!1})}),kg(i,"handleSlideDragStart",function(r){var o=bft(r)?r.changedTouches[0]:r;i.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),i.attachDragEndListener()}),i.travellerDragStartHandlers={startX:i.handleTravellerDragStart.bind(i,"startX"),endX:i.handleTravellerDragStart.bind(i,"endX")},i.state={},i}return Mqi(e,t),Nqi(e,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(i){var r=i.startX,o=i.endX,s=this.state.scaleValues,a=this.props,l=a.gap,c=a.data,u=c.length-1,d=Math.min(r,o),h=Math.max(r,o),f=e.getIndexInRange(s,d),m=e.getIndexInRange(s,h);return{startIndex:f-f%l,endIndex:m===u?u:m-m%l}}},{key:"getTextOfTick",value:function(i){var r=this.props,o=r.data,s=r.tickFormatter,a=r.dataKey,l=pd(o[i],a,i);return $o(s)?s(l,i):l}},{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(i){var r=this.state,o=r.slideMoveStartX,s=r.startX,a=r.endX,l=this.props,c=l.x,u=l.width,d=l.travellerWidth,h=l.startIndex,f=l.endIndex,m=l.onChange,p=i.pageX-o;p>0?p=Math.min(p,c+u-d-a,c+u-d-s):p<0&&(p=Math.max(p,c-s,c-a));var g=this.getIndex({startX:s+p,endX:a+p});(g.startIndex!==h||g.endIndex!==f)&&m&&m(g),this.setState({startX:s+p,endX:a+p,slideMoveStartX:i.pageX})}},{key:"handleTravellerDragStart",value:function(i,r){var o=bft(r)?r.changedTouches[0]:r;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:i,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(i){var r=this.state,o=r.brushMoveStartX,s=r.movingTravellerId,a=r.endX,l=r.startX,c=this.state[s],u=this.props,d=u.x,h=u.width,f=u.travellerWidth,m=u.onChange,p=u.gap,g=u.data,y={startX:this.state.startX,endX:this.state.endX},_=i.pageX-o;_>0?_=Math.min(_,d+h-f-c):_<0&&(_=Math.max(_,d-c)),y[s]=c+_;var w=this.getIndex(y),C=w.startIndex,N=w.endIndex,E=function(){var k=g.length-1;return s==="startX"&&(a>l?C%p===0:N%p===0)||a<l&&N===k||s==="endX"&&(a>l?N%p===0:C%p===0)||a>l&&N===k};this.setState(kg(kg({},s,c+_),"brushMoveStartX",i.pageX),function(){m&&E()&&m(w)})}},{key:"handleTravellerMoveKeyboard",value:function(i,r){var o=this,s=this.state,a=s.scaleValues,l=s.startX,c=s.endX,u=this.state[r],d=a.indexOf(u);if(d!==-1){var h=d+i;if(!(h===-1||h>=a.length)){var f=a[h];r==="startX"&&f>=c||r==="endX"&&f<=l||this.setState(kg({},r,f),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var i=this.props,r=i.x,o=i.y,s=i.width,a=i.height,l=i.fill,c=i.stroke;return Z.createElement("rect",{stroke:c,fill:l,x:r,y:o,width:s,height:a})}},{key:"renderPanorama",value:function(){var i=this.props,r=i.x,o=i.y,s=i.width,a=i.height,l=i.data,c=i.children,u=i.padding,d=b.Children.only(c);return d?Z.cloneElement(d,{x:r,y:o,width:s,height:a,margin:u,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(i,r){var o,s,a=this,l=this.props,c=l.y,u=l.travellerWidth,d=l.height,h=l.traveller,f=l.ariaLabel,m=l.data,p=l.startIndex,g=l.endIndex,y=Math.max(i,this.props.x),_=pCe(pCe({},Co(this.props,!1)),{},{x:y,y:c,width:u,height:d}),w=f||"Min value: ".concat((o=m[p])===null||o===void 0?void 0:o.name,", Max value: ").concat((s=m[g])===null||s===void 0?void 0:s.name);return Z.createElement(fa,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":i,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(N){["ArrowLeft","ArrowRight"].includes(N.key)&&(N.preventDefault(),N.stopPropagation(),a.handleTravellerMoveKeyboard(N.key==="ArrowRight"?1:-1,r))},onFocus:function(){a.setState({isTravellerFocused:!0})},onBlur:function(){a.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},e.renderTraveller(h,_))}},{key:"renderSlide",value:function(i,r){var o=this.props,s=o.y,a=o.height,l=o.stroke,c=o.travellerWidth,u=Math.min(i,r)+c,d=Math.max(Math.abs(r-i)-c,0);return Z.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:u,y:s,width:d,height:a})}},{key:"renderText",value:function(){var i=this.props,r=i.startIndex,o=i.endIndex,s=i.y,a=i.height,l=i.travellerWidth,c=i.stroke,u=this.state,d=u.startX,h=u.endX,f=5,m={pointerEvents:"none",fill:c};return Z.createElement(fa,{className:"recharts-brush-texts"},Z.createElement(Hoe,mse({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,h)-f,y:s+a/2},m),this.getTextOfTick(r)),Z.createElement(Hoe,mse({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,h)+l+f,y:s+a/2},m),this.getTextOfTick(o)))}},{key:"render",value:function(){var i=this.props,r=i.data,o=i.className,s=i.children,a=i.x,l=i.y,c=i.width,u=i.height,d=i.alwaysShowText,h=this.state,f=h.startX,m=h.endX,p=h.isTextActive,g=h.isSlideMoving,y=h.isTravellerMoving,_=h.isTravellerFocused;if(!r||!r.length||!ui(a)||!ui(l)||!ui(c)||!ui(u)||c<=0||u<=0)return null;var w=Vt("recharts-brush",o),C=Z.Children.count(s)===1,N=Cqi("userSelect","none");return Z.createElement(fa,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:N},this.renderBackground(),C&&this.renderPanorama(),this.renderSlide(f,m),this.renderTravellerLayer(f,"startX"),this.renderTravellerLayer(m,"endX"),(p||g||y||_||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(i){var r=i.x,o=i.y,s=i.width,a=i.height,l=i.stroke,c=Math.floor(o+a/2)-1;return Z.createElement(Z.Fragment,null,Z.createElement("rect",{x:r,y:o,width:s,height:a,fill:l,stroke:"none"}),Z.createElement("line",{x1:r+1,y1:c,x2:r+s-1,y2:c,fill:"none",stroke:"#fff"}),Z.createElement("line",{x1:r+1,y1:c+2,x2:r+s-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(i,r){var o;return Z.isValidElement(i)?o=Z.cloneElement(i,r):$o(i)?o=i(r):o=e.renderDefaultTraveller(r),o}},{key:"getDerivedStateFromProps",value:function(i,r){var o=i.data,s=i.width,a=i.x,l=i.travellerWidth,c=i.updateId,u=i.startIndex,d=i.endIndex;if(o!==r.prevData||c!==r.prevUpdateId)return pCe({prevData:o,prevTravellerWidth:l,prevUpdateId:c,prevX:a,prevWidth:s},o&&o.length?Tqi({data:o,width:s,x:a,travellerWidth:l,startIndex:u,endIndex:d}):{scale:null,scaleValues:null});if(r.scale&&(s!==r.prevWidth||a!==r.prevX||l!==r.prevTravellerWidth)){r.scale.range([a,a+s-l]);var h=r.scale.domain().map(function(f){return r.scale(f)});return{prevData:o,prevTravellerWidth:l,prevUpdateId:c,prevX:a,prevWidth:s,startX:r.scale(i.startIndex),endX:r.scale(i.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(i,r){for(var o=i.length,s=0,a=o-1;a-s>1;){var l=Math.floor((s+a)/2);i[l]>r?a=l:s=l}return r>=i[a]?a:s}}])}(b.PureComponent);kg(F5,"displayName","Brush");kg(F5,"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 Iqi=b9e;function Aqi(t,e){var n;return Iqi(t,function(i,r,o){return n=e(i,r,o),!n}),!!n}var Rqi=Aqi,Pqi=Q6t,Oqi=uM,jqi=Rqi,Fqi=rg,$qi=Ume;function Vqi(t,e,n){var i=Fqi(t)?Pqi:jqi;return n&&$qi(t,e,n)&&(e=void 0),i(t,Oqi(e))}var Bqi=Vqi;const zqi=ao(Bqi);var Yx=function(e,n){var i=e.alwaysShow,r=e.ifOverflow;return i&&(r="extendDomain"),r===n},vft=_$t;function Hqi(t,e,n){e=="__proto__"&&vft?vft(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var Wqi=Hqi,Uqi=Wqi,Kqi=v$t,qqi=uM;function Gqi(t,e){var n={};return e=qqi(e),Kqi(t,function(i,r,o){Uqi(n,r,e(i,r,o))}),n}var Yqi=Gqi;const Xqi=ao(Yqi);function Zqi(t,e){for(var n=-1,i=t==null?0:t.length;++n<i;)if(!e(t[n],n,t))return!1;return!0}var Qqi=Zqi,Jqi=b9e;function eGi(t,e){var n=!0;return Jqi(t,function(i,r,o){return n=!!e(i,r,o),n}),n}var tGi=eGi,nGi=Qqi,iGi=tGi,rGi=uM,oGi=rg,sGi=Ume;function aGi(t,e,n){var i=oGi(t)?nGi:iGi;return n&&sGi(t,e,n)&&(e=void 0),i(t,rGi(e))}var lGi=aGi;const Y8t=ao(lGi);var cGi=["x","y"];function $5(t){"@babel/helpers - typeof";return $5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$5(t)}function KAe(){return KAe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},KAe.apply(this,arguments)}function yft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function m7(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?yft(Object(n),!0).forEach(function(i){uGi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function uGi(t,e,n){return e=dGi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function dGi(t){var e=hGi(t,"string");return $5(e)=="symbol"?e:e+""}function hGi(t,e){if($5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if($5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function fGi(t,e){if(t==null)return{};var n=mGi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function mGi(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function pGi(t,e){var n=t.x,i=t.y,r=fGi(t,cGi),o="".concat(n),s=parseInt(o,10),a="".concat(i),l=parseInt(a,10),c="".concat(e.height||r.height),u=parseInt(c,10),d="".concat(e.width||r.width),h=parseInt(d,10);return m7(m7(m7(m7(m7({},e),r),s?{x:s}:{}),l?{y:l}:{}),{},{height:u,width:h,name:e.name,radius:e.radius})}function _ft(t){return Z.createElement(WAe,KAe({shapeType:"rectangle",propTransformer:pGi,activeClassName:"recharts-active-bar"},t))}var gGi=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(i,r){if(typeof e=="number")return e;var o=typeof i=="number";return o?e(i,r):(o||wk(!1,"minPointSize callback function received a value with type of ".concat($5(i),". Currently only numbers are supported.")),n)}},bGi=["value","background"],X8t;function V5(t){"@babel/helpers - typeof";return V5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V5(t)}function vGi(t,e){if(t==null)return{};var n=yGi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function yGi(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function gse(){return gse=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},gse.apply(this,arguments)}function xft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function bu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xft(Object(n),!0).forEach(function(i){QE(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function _Gi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wft(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Q8t(i.key),i)}}function xGi(t,e,n){return e&&wft(t.prototype,e),n&&wft(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function wGi(t,e,n){return e=bse(e),CGi(t,Z8t()?Reflect.construct(e,n||[],bse(t).constructor):e.apply(t,n))}function CGi(t,e){if(e&&(V5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return SGi(t)}function SGi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Z8t(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Z8t=function(){return!!t})()}function bse(t){return bse=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bse(t)}function NGi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qAe(t,e)}function qAe(t,e){return qAe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},qAe(t,e)}function QE(t,e,n){return e=Q8t(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Q8t(t){var e=EGi(t,"string");return V5(e)=="symbol"?e:e+""}function EGi(t,e){if(V5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(V5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Xx=function(t){function e(){var n;_Gi(this,e);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return n=wGi(this,e,[].concat(r)),QE(n,"state",{isAnimationFinished:!1}),QE(n,"id",lR("recharts-bar-")),QE(n,"handleAnimationEnd",function(){var s=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),s&&s()}),QE(n,"handleAnimationStart",function(){var s=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),s&&s()}),n}return NGi(e,t),xGi(e,[{key:"renderRectanglesStatically",value:function(i){var r=this,o=this.props,s=o.shape,a=o.dataKey,l=o.activeIndex,c=o.activeBar,u=Co(this.props,!1);return i&&i.map(function(d,h){var f=h===l,m=f?c:s,p=bu(bu(bu({},u),d),{},{isActive:f,option:m,index:h,dataKey:a,onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd});return Z.createElement(fa,gse({className:"recharts-bar-rectangle"},_W(r.props,d,h),{key:"rectangle-".concat(d==null?void 0:d.x,"-").concat(d==null?void 0:d.y,"-").concat(d==null?void 0:d.value)}),Z.createElement(_ft,p))})}},{key:"renderRectanglesWithAnimation",value:function(){var i=this,r=this.props,o=r.data,s=r.layout,a=r.isAnimationActive,l=r.animationBegin,c=r.animationDuration,u=r.animationEasing,d=r.animationId,h=this.state.prevData;return Z.createElement(e_,{begin:l,duration:c,isActive:a,easing:u,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(f){var m=f.t,p=o.map(function(g,y){var _=h&&h[y];if(_){var w=eu(_.x,g.x),C=eu(_.y,g.y),N=eu(_.width,g.width),E=eu(_.height,g.height);return bu(bu({},g),{},{x:w(m),y:C(m),width:N(m),height:E(m)})}if(s==="horizontal"){var D=eu(0,g.height),k=D(m);return bu(bu({},g),{},{y:g.y+g.height-k,height:k})}var M=eu(0,g.width),T=M(m);return bu(bu({},g),{},{width:T})});return Z.createElement(fa,null,i.renderRectanglesStatically(p))})}},{key:"renderRectangles",value:function(){var i=this.props,r=i.data,o=i.isAnimationActive,s=this.state.prevData;return o&&r&&r.length&&(!s||!iA(s,r))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(r)}},{key:"renderBackground",value:function(){var i=this,r=this.props,o=r.data,s=r.dataKey,a=r.activeIndex,l=Co(this.props.background,!1);return o.map(function(c,u){c.value;var d=c.background,h=vGi(c,bGi);if(!d)return null;var f=bu(bu(bu(bu(bu({},h),{},{fill:"#eee"},d),l),_W(i.props,c,u)),{},{onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd,dataKey:s,index:u,className:"recharts-bar-background-rectangle"});return Z.createElement(_ft,gse({key:"background-bar-".concat(u),option:i.props.background,isActive:u===a},f))})}},{key:"renderErrorBar",value:function(i,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,s=o.data,a=o.xAxis,l=o.yAxis,c=o.layout,u=o.children,d=Rp(u,i$);if(!d)return null;var h=c==="vertical"?s[0].height/2:s[0].width/2,f=function(g,y){var _=Array.isArray(g.value)?g.value[1]:g.value;return{x:g.x,y:g.y,value:_,errorVal:pd(g,y)}},m={clipPath:i?"url(#clipPath-".concat(r,")"):null};return Z.createElement(fa,m,d.map(function(p){return Z.cloneElement(p,{key:"error-bar-".concat(r,"-").concat(p.props.dataKey),data:s,xAxis:a,yAxis:l,layout:c,offset:h,dataPointFormatter:f})}))}},{key:"render",value:function(){var i=this.props,r=i.hide,o=i.data,s=i.className,a=i.xAxis,l=i.yAxis,c=i.left,u=i.top,d=i.width,h=i.height,f=i.isAnimationActive,m=i.background,p=i.id;if(r||!o||!o.length)return null;var g=this.state.isAnimationFinished,y=Vt("recharts-bar",s),_=a&&a.allowDataOverflow,w=l&&l.allowDataOverflow,C=_||w,N=So(p)?this.id:p;return Z.createElement(fa,{className:y},_||w?Z.createElement("defs",null,Z.createElement("clipPath",{id:"clipPath-".concat(N)},Z.createElement("rect",{x:_?c:c-d/2,y:w?u:u-h/2,width:_?d:d*2,height:w?h:h*2}))):null,Z.createElement(fa,{className:"recharts-bar-rectangles",clipPath:C?"url(#clipPath-".concat(N,")"):null},m?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(C,N),(!f||g)&&Gx.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curData:i.data,prevData:r.curData}:i.data!==r.curData?{curData:i.data}:null}}])}(b.PureComponent);X8t=Xx;QE(Xx,"displayName","Bar");QE(Xx,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!D0.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});QE(Xx,"getComposedData",function(t){var e=t.props,n=t.item,i=t.barPosition,r=t.bandSize,o=t.xAxis,s=t.yAxis,a=t.xAxisTicks,l=t.yAxisTicks,c=t.stackedData,u=t.dataStartIndex,d=t.displayedData,h=t.offset,f=vHi(i,n);if(!f)return null;var m=e.layout,p=n.type.defaultProps,g=p!==void 0?bu(bu({},p),n.props):n.props,y=g.dataKey,_=g.children,w=g.minPointSize,C=m==="horizontal"?s:o,N=c?C.scale.domain():null,E=EHi({numericAxis:C}),D=Rp(_,_9e),k=d.map(function(M,T){var A,R,P,O,V,F;c?A=yHi(c[u+T],N):(A=pd(M,y),Array.isArray(A)||(A=[E,A]));var $=gGi(w,X8t.defaultProps.minPointSize)(A[1],T);if(m==="horizontal"){var B,z=[s.scale(A[0]),s.scale(A[1])],H=z[0],K=z[1];R=xht({axis:o,ticks:a,bandSize:r,offset:f.offset,entry:M,index:T}),P=(B=K??H)!==null&&B!==void 0?B:void 0,O=f.size;var q=H-K;if(V=Number.isNaN(q)?0:q,F={x:R,y:s.y,width:O,height:s.height},Math.abs($)>0&&Math.abs(V)<Math.abs($)){var U=c0(V||$)*(Math.abs($)-Math.abs(V));P-=U,V+=U}}else{var Y=[o.scale(A[0]),o.scale(A[1])],J=Y[0],ae=Y[1];if(R=J,P=xht({axis:s,ticks:l,bandSize:r,offset:f.offset,entry:M,index:T}),O=ae-J,V=f.size,F={x:o.x,y:P,width:o.width,height:V},Math.abs($)>0&&Math.abs(O)<Math.abs($)){var se=c0(O||$)*(Math.abs($)-Math.abs(O));O+=se}}return bu(bu(bu({},M),{},{x:R,y:P,width:O,height:V,value:c?A:A[1],payload:M,background:F},D&&D[T]&&D[T].props),{},{tooltipPayload:[I8t(n,M)],tooltipPosition:{x:R+O/2,y:P+V/2}})});return bu({data:k,layout:m},h)});function ZW(t){"@babel/helpers - typeof";return ZW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ZW(t)}function DGi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cft(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,J8t(i.key),i)}}function kGi(t,e,n){return e&&Cft(t.prototype,e),n&&Cft(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Sft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function By(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Sft(Object(n),!0).forEach(function(i){rpe(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Sft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function rpe(t,e,n){return e=J8t(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function J8t(t){var e=MGi(t,"string");return ZW(e)=="symbol"?e:e+""}function MGi(t,e){if(ZW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(ZW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ope=function(e,n,i,r,o){var s=e.width,a=e.height,l=e.layout,c=e.children,u=Object.keys(n),d={left:i.left,leftMirror:i.left,right:s-i.right,rightMirror:s-i.right,top:i.top,topMirror:i.top,bottom:a-i.bottom,bottomMirror:a-i.bottom},h=!!Mg(c,Xx);return u.reduce(function(f,m){var p=n[m],g=p.orientation,y=p.domain,_=p.padding,w=_===void 0?{}:_,C=p.mirror,N=p.reversed,E="".concat(g).concat(C?"Mirror":""),D,k,M,T,A;if(p.type==="number"&&(p.padding==="gap"||p.padding==="no-gap")){var R=y[1]-y[0],P=1/0,O=p.categoricalDomain.sort();if(O.forEach(function(Y,J){J>0&&(P=Math.min((Y||0)-(O[J-1]||0),P))}),Number.isFinite(P)){var V=P/R,F=p.layout==="vertical"?i.height:i.width;if(p.padding==="gap"&&(D=V*F/2),p.padding==="no-gap"){var $=nA(e.barCategoryGap,V*F),B=V*F/2;D=B-$-(B-$)/F*$}}}r==="xAxis"?k=[i.left+(w.left||0)+(D||0),i.left+i.width-(w.right||0)-(D||0)]:r==="yAxis"?k=l==="horizontal"?[i.top+i.height-(w.bottom||0),i.top+(w.top||0)]:[i.top+(w.top||0)+(D||0),i.top+i.height-(w.bottom||0)-(D||0)]:k=p.range,N&&(k=[k[1],k[0]]);var z=gHi(p,o,h),H=z.scale,K=z.realScaleType;H.domain(y).range(k),bHi(H);var q=NHi(H,By(By({},p),{},{realScaleType:K}));r==="xAxis"?(A=g==="top"&&!C||g==="bottom"&&C,M=i.left,T=d[E]-A*p.height):r==="yAxis"&&(A=g==="left"&&!C||g==="right"&&C,M=d[E]-A*p.width,T=i.top);var U=By(By(By({},p),q),{},{realScaleType:K,x:M,y:T,scale:H,width:r==="xAxis"?i.width:p.width,height:r==="yAxis"?i.height:p.height});return U.bandSize=ise(U,q),!p.hide&&r==="xAxis"?d[E]+=(A?-1:1)*U.height:p.hide||(d[E]+=(A?-1:1)*U.width),By(By({},f),{},rpe({},m,U))},{})},eVt=function(e,n){var i=e.x,r=e.y,o=n.x,s=n.y;return{x:Math.min(i,o),y:Math.min(r,s),width:Math.abs(o-i),height:Math.abs(s-r)}},LGi=function(e){var n=e.x1,i=e.y1,r=e.x2,o=e.y2;return eVt({x:n,y:i},{x:r,y:o})},tVt=function(){function t(e){DGi(this,t),this.scale=e}return kGi(t,[{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(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=i.bandAware,o=i.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+s}case"end":{var a=this.bandwidth?this.bandwidth():0;return this.scale(n)+a}default:return this.scale(n)}if(r){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var i=this.range(),r=i[0],o=i[i.length-1];return r<=o?n>=r&&n<=o:n>=o&&n<=r}}],[{key:"create",value:function(n){return new t(n)}}])}();rpe(tVt,"EPS",1e-4);var q9e=function(e){var n=Object.keys(e).reduce(function(i,r){return By(By({},i),{},rpe({},r,tVt.create(e[r])))},{});return By(By({},n),{},{apply:function(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=o.bandAware,a=o.position;return Xqi(r,function(l,c){return n[c].apply(l,{bandAware:s,position:a})})},isInRange:function(r){return Y8t(r,function(o,s){return n[s].isInRange(o)})}})};function TGi(t){return(t%180+180)%180}var IGi=function(e){var n=e.width,i=e.height,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=TGi(r),s=o*Math.PI/180,a=Math.atan(i/n),l=s>a&&s<Math.PI-a?i/Math.sin(s):n/Math.cos(s);return Math.abs(l)},AGi=uM,RGi=Kq,PGi=Hme;function OGi(t){return function(e,n,i){var r=Object(e);if(!RGi(e)){var o=AGi(n);e=PGi(e),n=function(a){return o(r[a],a,r)}}var s=t(e,n,i);return s>-1?r[o?e[s]:s]:void 0}}var jGi=OGi,FGi=U8t;function $Gi(t){var e=FGi(t),n=e%1;return e===e?n?e-n:e:0}var VGi=$Gi,BGi=h$t,zGi=uM,HGi=VGi,WGi=Math.max;function UGi(t,e,n){var i=t==null?0:t.length;if(!i)return-1;var r=n==null?0:HGi(n);return r<0&&(r=WGi(i+r,0)),BGi(t,zGi(e),r)}var KGi=UGi,qGi=jGi,GGi=KGi,YGi=qGi(GGi),XGi=YGi;const ZGi=ao(XGi);var QGi=oRi(function(t){return{x:t.left,y:t.top,width:t.width,height:t.height}},function(t){return["l",t.left,"t",t.top,"w",t.width,"h",t.height].join("")});function vse(t){"@babel/helpers - typeof";return vse=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vse(t)}var G9e=b.createContext(void 0),Y9e=b.createContext(void 0),nVt=b.createContext(void 0),iVt=b.createContext({}),rVt=b.createContext(void 0),oVt=b.createContext(0),sVt=b.createContext(0),Nft=function(e){var n=e.state,i=n.xAxisMap,r=n.yAxisMap,o=n.offset,s=e.clipPathId,a=e.children,l=e.width,c=e.height,u=QGi(o);return Z.createElement(G9e.Provider,{value:i},Z.createElement(Y9e.Provider,{value:r},Z.createElement(iVt.Provider,{value:o},Z.createElement(nVt.Provider,{value:u},Z.createElement(rVt.Provider,{value:s},Z.createElement(oVt.Provider,{value:c},Z.createElement(sVt.Provider,{value:l},a)))))))},JGi=function(){return b.useContext(rVt)};function aVt(t){var e=Object.keys(t);return e.length===0?"There are no available ids.":"Available ids are: ".concat(e,".")}var lVt=function(e){var n=b.useContext(G9e);n==null&&wk(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?");var i=n[e];return i==null&&wk(!1,'Could not find xAxis by id "'.concat(e,'" [').concat(vse(e),"]. ").concat(aVt(n))),i},eYi=function(){var e=b.useContext(G9e);return kE(e)},tYi=function(){var e=b.useContext(Y9e),n=ZGi(e,function(i){return Y8t(i.domain,Number.isFinite)});return n||kE(e)},cVt=function(e){var n=b.useContext(Y9e);n==null&&wk(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?");var i=n[e];return i==null&&wk(!1,'Could not find yAxis by id "'.concat(e,'" [').concat(vse(e),"]. ").concat(aVt(n))),i},nYi=function(){var e=b.useContext(nVt);return e},iYi=function(){return b.useContext(iVt)},X9e=function(){return b.useContext(sVt)},Z9e=function(){return b.useContext(oVt)};function B5(t){"@babel/helpers - typeof";return B5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B5(t)}function rYi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function oYi(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,dVt(i.key),i)}}function sYi(t,e,n){return e&&oYi(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function aYi(t,e,n){return e=yse(e),lYi(t,uVt()?Reflect.construct(e,n||[],yse(t).constructor):e.apply(t,n))}function lYi(t,e){if(e&&(B5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cYi(t)}function cYi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function uVt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uVt=function(){return!!t})()}function yse(t){return yse=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yse(t)}function uYi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&GAe(t,e)}function GAe(t,e){return GAe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},GAe(t,e)}function Eft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Dft(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Eft(Object(n),!0).forEach(function(i){Q9e(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Eft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Q9e(t,e,n){return e=dVt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function dVt(t){var e=dYi(t,"string");return B5(e)=="symbol"?e:e+""}function dYi(t,e){if(B5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(B5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function hYi(t,e){return gYi(t)||pYi(t,e)||mYi(t,e)||fYi()}function fYi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mYi(t,e){if(t){if(typeof t=="string")return kft(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kft(t,e)}}function kft(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function pYi(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(u){c=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}function gYi(t){if(Array.isArray(t))return t}function YAe(){return YAe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},YAe.apply(this,arguments)}var bYi=function(e,n){var i;return Z.isValidElement(e)?i=Z.cloneElement(e,n):$o(e)?i=e(n):i=Z.createElement("line",YAe({},n,{className:"recharts-reference-line-line"})),i},vYi=function(e,n,i,r,o,s,a,l,c){var u=o.x,d=o.y,h=o.width,f=o.height;if(i){var m=c.y,p=e.y.apply(m,{position:s});if(Yx(c,"discard")&&!e.y.isInRange(p))return null;var g=[{x:u+h,y:p},{x:u,y:p}];return l==="left"?g.reverse():g}if(n){var y=c.x,_=e.x.apply(y,{position:s});if(Yx(c,"discard")&&!e.x.isInRange(_))return null;var w=[{x:_,y:d+f},{x:_,y:d}];return a==="top"?w.reverse():w}if(r){var C=c.segment,N=C.map(function(E){return e.apply(E,{position:s})});return Yx(c,"discard")&&zqi(N,function(E){return!e.isInRange(E)})?null:N}return null};function yYi(t){var e=t.x,n=t.y,i=t.segment,r=t.xAxisId,o=t.yAxisId,s=t.shape,a=t.className,l=t.alwaysShow,c=JGi(),u=lVt(r),d=cVt(o),h=nYi();if(!c||!h)return null;jC(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=q9e({x:u.scale,y:d.scale}),m=dd(e),p=dd(n),g=i&&i.length===2,y=vYi(f,m,p,g,h,t.position,u.orientation,d.orientation,t);if(!y)return null;var _=hYi(y,2),w=_[0],C=w.x,N=w.y,E=_[1],D=E.x,k=E.y,M=Yx(t,"hidden")?"url(#".concat(c,")"):void 0,T=Dft(Dft({clipPath:M},Co(t,!0)),{},{x1:C,y1:N,x2:D,y2:k});return Z.createElement(fa,{className:Vt("recharts-reference-line",a)},bYi(s,T),od.renderCallByParent(t,LGi({x1:C,y1:N,x2:D,y2:k})))}var o$=function(t){function e(){return rYi(this,e),aYi(this,e,arguments)}return uYi(e,t),sYi(e,[{key:"render",value:function(){return Z.createElement(yYi,this.props)}}])}(Z.Component);Q9e(o$,"displayName","ReferenceLine");Q9e(o$,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function XAe(){return XAe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},XAe.apply(this,arguments)}function z5(t){"@babel/helpers - typeof";return z5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z5(t)}function Mft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Lft(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Mft(Object(n),!0).forEach(function(i){spe(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function _Yi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xYi(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,fVt(i.key),i)}}function wYi(t,e,n){return e&&xYi(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function CYi(t,e,n){return e=_se(e),SYi(t,hVt()?Reflect.construct(e,n||[],_se(t).constructor):e.apply(t,n))}function SYi(t,e){if(e&&(z5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NYi(t)}function NYi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hVt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hVt=function(){return!!t})()}function _se(t){return _se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_se(t)}function EYi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ZAe(t,e)}function ZAe(t,e){return ZAe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},ZAe(t,e)}function spe(t,e,n){return e=fVt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function fVt(t){var e=DYi(t,"string");return z5(e)=="symbol"?e:e+""}function DYi(t,e){if(z5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(z5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var kYi=function(e){var n=e.x,i=e.y,r=e.xAxis,o=e.yAxis,s=q9e({x:r.scale,y:o.scale}),a=s.apply({x:n,y:i},{bandAware:!0});return Yx(e,"discard")&&!s.isInRange(a)?null:a},ape=function(t){function e(){return _Yi(this,e),CYi(this,e,arguments)}return EYi(e,t),wYi(e,[{key:"render",value:function(){var i=this.props,r=i.x,o=i.y,s=i.r,a=i.alwaysShow,l=i.clipPathId,c=dd(r),u=dd(o);if(jC(a===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!u)return null;var d=kYi(this.props);if(!d)return null;var h=d.x,f=d.y,m=this.props,p=m.shape,g=m.className,y=Yx(this.props,"hidden")?"url(#".concat(l,")"):void 0,_=Lft(Lft({clipPath:y},Co(this.props,!0)),{},{cx:h,cy:f});return Z.createElement(fa,{className:Vt("recharts-reference-dot",g)},e.renderDot(p,_),od.renderCallByParent(this.props,{x:h-s,y:f-s,width:2*s,height:2*s}))}}])}(Z.Component);spe(ape,"displayName","ReferenceDot");spe(ape,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});spe(ape,"renderDot",function(t,e){var n;return Z.isValidElement(t)?n=Z.cloneElement(t,e):$o(t)?n=t(e):n=Z.createElement(tpe,XAe({},e,{cx:e.cx,cy:e.cy,className:"recharts-reference-dot-dot"})),n});function QAe(){return QAe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},QAe.apply(this,arguments)}function H5(t){"@babel/helpers - typeof";return H5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H5(t)}function Tft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Ift(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Tft(Object(n),!0).forEach(function(i){lpe(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function MYi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function LYi(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,pVt(i.key),i)}}function TYi(t,e,n){return e&&LYi(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function IYi(t,e,n){return e=xse(e),AYi(t,mVt()?Reflect.construct(e,n||[],xse(t).constructor):e.apply(t,n))}function AYi(t,e){if(e&&(H5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return RYi(t)}function RYi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mVt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mVt=function(){return!!t})()}function xse(t){return xse=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xse(t)}function PYi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&JAe(t,e)}function JAe(t,e){return JAe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},JAe(t,e)}function lpe(t,e,n){return e=pVt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pVt(t){var e=OYi(t,"string");return H5(e)=="symbol"?e:e+""}function OYi(t,e){if(H5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(H5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var jYi=function(e,n,i,r,o){var s=o.x1,a=o.x2,l=o.y1,c=o.y2,u=o.xAxis,d=o.yAxis;if(!u||!d)return null;var h=q9e({x:u.scale,y:d.scale}),f={x:e?h.x.apply(s,{position:"start"}):h.x.rangeMin,y:i?h.y.apply(l,{position:"start"}):h.y.rangeMin},m={x:n?h.x.apply(a,{position:"end"}):h.x.rangeMax,y:r?h.y.apply(c,{position:"end"}):h.y.rangeMax};return Yx(o,"discard")&&(!h.isInRange(f)||!h.isInRange(m))?null:eVt(f,m)},cpe=function(t){function e(){return MYi(this,e),IYi(this,e,arguments)}return PYi(e,t),TYi(e,[{key:"render",value:function(){var i=this.props,r=i.x1,o=i.x2,s=i.y1,a=i.y2,l=i.className,c=i.alwaysShow,u=i.clipPathId;jC(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=dd(r),h=dd(o),f=dd(s),m=dd(a),p=this.props.shape;if(!d&&!h&&!f&&!m&&!p)return null;var g=jYi(d,h,f,m,this.props);if(!g&&!p)return null;var y=Yx(this.props,"hidden")?"url(#".concat(u,")"):void 0;return Z.createElement(fa,{className:Vt("recharts-reference-area",l)},e.renderRect(p,Ift(Ift({clipPath:y},Co(this.props,!0)),g)),od.renderCallByParent(this.props,g))}}])}(Z.Component);lpe(cpe,"displayName","ReferenceArea");lpe(cpe,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});lpe(cpe,"renderRect",function(t,e){var n;return Z.isValidElement(t)?n=Z.cloneElement(t,e):$o(t)?n=t(e):n=Z.createElement(K9e,QAe({},e,{className:"recharts-reference-area-rect"})),n});function gVt(t,e,n){if(e<1)return[];if(e===1&&n===void 0)return t;for(var i=[],r=0;r<t.length;r+=e)i.push(t[r]);return i}function FYi(t,e,n){var i={width:t.width+e.width,height:t.height+e.height};return IGi(i,n)}function $Yi(t,e,n){var i=n==="width",r=t.x,o=t.y,s=t.width,a=t.height;return e===1?{start:i?r:o,end:i?r+s:o+a}:{start:i?r+s:o+a,end:i?r:o}}function wse(t,e,n,i,r){if(t*e<t*i||t*e>t*r)return!1;var o=n();return t*(e-t*o/2-i)>=0&&t*(e+t*o/2-r)<=0}function VYi(t,e){return gVt(t,e+1)}function BYi(t,e,n,i,r){for(var o=(i||[]).slice(),s=e.start,a=e.end,l=0,c=1,u=s,d=function(){var m=i==null?void 0:i[l];if(m===void 0)return{v:gVt(i,c)};var p=l,g,y=function(){return g===void 0&&(g=n(m,p)),g},_=m.coordinate,w=l===0||wse(t,_,y,u,a);w||(l=0,u=s,c+=1),w&&(u=_+t*(y()/2+r),l+=c)},h;c<=o.length;)if(h=d(),h)return h.v;return[]}function QW(t){"@babel/helpers - typeof";return QW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},QW(t)}function Aft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function af(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Aft(Object(n),!0).forEach(function(i){zYi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Aft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function zYi(t,e,n){return e=HYi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function HYi(t){var e=WYi(t,"string");return QW(e)=="symbol"?e:e+""}function WYi(t,e){if(QW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(QW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function UYi(t,e,n,i,r){for(var o=(i||[]).slice(),s=o.length,a=e.start,l=e.end,c=function(h){var f=o[h],m,p=function(){return m===void 0&&(m=n(f,h)),m};if(h===s-1){var g=t*(f.coordinate+t*p()/2-l);o[h]=f=af(af({},f),{},{tickCoord:g>0?f.coordinate-g*t:f.coordinate})}else o[h]=f=af(af({},f),{},{tickCoord:f.coordinate});var y=wse(t,f.tickCoord,p,a,l);y&&(l=f.tickCoord-t*(p()/2+r),o[h]=af(af({},f),{},{isShow:!0}))},u=s-1;u>=0;u--)c(u);return o}function KYi(t,e,n,i,r,o){var s=(i||[]).slice(),a=s.length,l=e.start,c=e.end;if(o){var u=i[a-1],d=n(u,a-1),h=t*(u.coordinate+t*d/2-c);s[a-1]=u=af(af({},u),{},{tickCoord:h>0?u.coordinate-h*t:u.coordinate});var f=wse(t,u.tickCoord,function(){return d},l,c);f&&(c=u.tickCoord-t*(d/2+r),s[a-1]=af(af({},u),{},{isShow:!0}))}for(var m=o?a-1:a,p=function(_){var w=s[_],C,N=function(){return C===void 0&&(C=n(w,_)),C};if(_===0){var E=t*(w.coordinate-t*N()/2-l);s[_]=w=af(af({},w),{},{tickCoord:E<0?w.coordinate-E*t:w.coordinate})}else s[_]=w=af(af({},w),{},{tickCoord:w.coordinate});var D=wse(t,w.tickCoord,N,l,c);D&&(l=w.tickCoord+t*(N()/2+r),s[_]=af(af({},w),{},{isShow:!0}))},g=0;g<m;g++)p(g);return s}function J9e(t,e,n){var i=t.tick,r=t.ticks,o=t.viewBox,s=t.minTickGap,a=t.orientation,l=t.interval,c=t.tickFormatter,u=t.unit,d=t.angle;if(!r||!r.length||!i)return[];if(ui(l)||D0.isSsr)return VYi(r,typeof l=="number"&&ui(l)?l:0);var h=[],f=a==="top"||a==="bottom"?"width":"height",m=u&&f==="width"?bB(u,{fontSize:e,letterSpacing:n}):{width:0,height:0},p=function(w,C){var N=$o(c)?c(w.value,C):w.value;return f==="width"?FYi(bB(N,{fontSize:e,letterSpacing:n}),m,d):bB(N,{fontSize:e,letterSpacing:n})[f]},g=r.length>=2?c0(r[1].coordinate-r[0].coordinate):1,y=$Yi(o,g,f);return l==="equidistantPreserveStart"?BYi(g,y,p,r,s):(l==="preserveStart"||l==="preserveStartEnd"?h=KYi(g,y,p,r,s,l==="preserveStartEnd"):h=UYi(g,y,p,r,s),h.filter(function(_){return _.isShow}))}var qYi=["viewBox"],GYi=["viewBox"],YYi=["ticks"];function W5(t){"@babel/helpers - typeof";return W5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W5(t)}function S4(){return S4=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},S4.apply(this,arguments)}function Rft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function qf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Rft(Object(n),!0).forEach(function(i){eBe(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function gCe(t,e){if(t==null)return{};var n=XYi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function XYi(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function ZYi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pft(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,vVt(i.key),i)}}function QYi(t,e,n){return e&&Pft(t.prototype,e),n&&Pft(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function JYi(t,e,n){return e=Cse(e),eXi(t,bVt()?Reflect.construct(e,n||[],Cse(t).constructor):e.apply(t,n))}function eXi(t,e){if(e&&(W5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tXi(t)}function tXi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bVt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bVt=function(){return!!t})()}function Cse(t){return Cse=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cse(t)}function nXi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&eRe(t,e)}function eRe(t,e){return eRe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},eRe(t,e)}function eBe(t,e,n){return e=vVt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vVt(t){var e=iXi(t,"string");return W5(e)=="symbol"?e:e+""}function iXi(t,e){if(W5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(W5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var s$=function(t){function e(n){var i;return ZYi(this,e),i=JYi(this,e,[n]),i.state={fontSize:"",letterSpacing:""},i}return nXi(e,t),QYi(e,[{key:"shouldComponentUpdate",value:function(i,r){var o=i.viewBox,s=gCe(i,qYi),a=this.props,l=a.viewBox,c=gCe(a,GYi);return!F3(o,l)||!F3(s,c)||!F3(r,this.state)}},{key:"componentDidMount",value:function(){var i=this.layerReference;if(i){var r=i.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];r&&this.setState({fontSize:window.getComputedStyle(r).fontSize,letterSpacing:window.getComputedStyle(r).letterSpacing})}}},{key:"getTickLineCoord",value:function(i){var r=this.props,o=r.x,s=r.y,a=r.width,l=r.height,c=r.orientation,u=r.tickSize,d=r.mirror,h=r.tickMargin,f,m,p,g,y,_,w=d?-1:1,C=i.tickSize||u,N=ui(i.tickCoord)?i.tickCoord:i.coordinate;switch(c){case"top":f=m=i.coordinate,g=s+ +!d*l,p=g-w*C,_=p-w*h,y=N;break;case"left":p=g=i.coordinate,m=o+ +!d*a,f=m-w*C,y=f-w*h,_=N;break;case"right":p=g=i.coordinate,m=o+ +d*a,f=m+w*C,y=f+w*h,_=N;break;default:f=m=i.coordinate,g=s+ +d*l,p=g+w*C,_=p+w*h,y=N;break}return{line:{x1:f,y1:p,x2:m,y2:g},tick:{x:y,y:_}}}},{key:"getTickTextAnchor",value:function(){var i=this.props,r=i.orientation,o=i.mirror,s;switch(r){case"left":s=o?"start":"end";break;case"right":s=o?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var i=this.props,r=i.orientation,o=i.mirror,s="end";switch(r){case"left":case"right":s="middle";break;case"top":s=o?"start":"end";break;default:s=o?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var i=this.props,r=i.x,o=i.y,s=i.width,a=i.height,l=i.orientation,c=i.mirror,u=i.axisLine,d=qf(qf(qf({},Co(this.props,!1)),Co(u,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var h=+(l==="top"&&!c||l==="bottom"&&c);d=qf(qf({},d),{},{x1:r,y1:o+h*a,x2:r+s,y2:o+h*a})}else{var f=+(l==="left"&&!c||l==="right"&&c);d=qf(qf({},d),{},{x1:r+f*s,y1:o,x2:r+f*s,y2:o+a})}return Z.createElement("line",S4({},d,{className:Vt("recharts-cartesian-axis-line",_v(u,"className"))}))}},{key:"renderTicks",value:function(i,r,o){var s=this,a=this.props,l=a.tickLine,c=a.stroke,u=a.tick,d=a.tickFormatter,h=a.unit,f=J9e(qf(qf({},this.props),{},{ticks:i}),r,o),m=this.getTickTextAnchor(),p=this.getTickVerticalAnchor(),g=Co(this.props,!1),y=Co(u,!1),_=qf(qf({},g),{},{fill:"none"},Co(l,!1)),w=f.map(function(C,N){var E=s.getTickLineCoord(C),D=E.line,k=E.tick,M=qf(qf(qf(qf({textAnchor:m,verticalAnchor:p},g),{},{stroke:"none",fill:c},y),k),{},{index:N,payload:C,visibleTicksCount:f.length,tickFormatter:d});return Z.createElement(fa,S4({className:"recharts-cartesian-axis-tick",key:"tick-".concat(C.value,"-").concat(C.coordinate,"-").concat(C.tickCoord)},_W(s.props,C,N)),l&&Z.createElement("line",S4({},_,D,{className:Vt("recharts-cartesian-axis-tick-line",_v(l,"className"))})),u&&e.renderTickItem(u,M,"".concat($o(d)?d(C.value,N):C.value).concat(h||"")))});return Z.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var i=this,r=this.props,o=r.axisLine,s=r.width,a=r.height,l=r.ticksGenerator,c=r.className,u=r.hide;if(u)return null;var d=this.props,h=d.ticks,f=gCe(d,YYi),m=h;return $o(l)&&(m=h&&h.length>0?l(this.props):l(f)),s<=0||a<=0||!m||!m.length?null:Z.createElement(fa,{className:Vt("recharts-cartesian-axis",c),ref:function(g){i.layerReference=g}},o&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),od.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(i,r,o){var s;return Z.isValidElement(i)?s=Z.cloneElement(i,r):$o(i)?s=i(r):s=Z.createElement(Hoe,S4({},r,{className:"recharts-cartesian-axis-tick-value"}),o),s}}])}(b.Component);eBe(s$,"displayName","CartesianAxis");eBe(s$,"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 rXi=["x1","y1","x2","y2","key"],oXi=["offset"];function oA(t){"@babel/helpers - typeof";return oA=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oA(t)}function Oft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function gf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Oft(Object(n),!0).forEach(function(i){sXi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Oft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function sXi(t,e,n){return e=aXi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function aXi(t){var e=lXi(t,"string");return oA(e)=="symbol"?e:e+""}function lXi(t,e){if(oA(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(oA(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function WT(){return WT=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},WT.apply(this,arguments)}function jft(t,e){if(t==null)return{};var n=cXi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function cXi(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}var uXi=function(e){var n=e.fill;if(!n||n==="none")return null;var i=e.fillOpacity,r=e.x,o=e.y,s=e.width,a=e.height,l=e.ry;return Z.createElement("rect",{x:r,y:o,ry:l,width:s,height:a,stroke:"none",fill:n,fillOpacity:i,className:"recharts-cartesian-grid-bg"})};function yVt(t,e){var n;if(Z.isValidElement(t))n=Z.cloneElement(t,e);else if($o(t))n=t(e);else{var i=e.x1,r=e.y1,o=e.x2,s=e.y2,a=e.key,l=jft(e,rXi),c=Co(l,!1);c.offset;var u=jft(c,oXi);n=Z.createElement("line",WT({},u,{x1:i,y1:r,x2:o,y2:s,fill:"none",key:a}))}return n}function dXi(t){var e=t.x,n=t.width,i=t.horizontal,r=i===void 0?!0:i,o=t.horizontalPoints;if(!r||!o||!o.length)return null;var s=o.map(function(a,l){var c=gf(gf({},t),{},{x1:e,y1:a,x2:e+n,y2:a,key:"line-".concat(l),index:l});return yVt(r,c)});return Z.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function hXi(t){var e=t.y,n=t.height,i=t.vertical,r=i===void 0?!0:i,o=t.verticalPoints;if(!r||!o||!o.length)return null;var s=o.map(function(a,l){var c=gf(gf({},t),{},{x1:a,y1:e,x2:a,y2:e+n,key:"line-".concat(l),index:l});return yVt(r,c)});return Z.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function fXi(t){var e=t.horizontalFill,n=t.fillOpacity,i=t.x,r=t.y,o=t.width,s=t.height,a=t.horizontalPoints,l=t.horizontal,c=l===void 0?!0:l;if(!c||!e||!e.length)return null;var u=a.map(function(h){return Math.round(h+r-r)}).sort(function(h,f){return h-f});r!==u[0]&&u.unshift(0);var d=u.map(function(h,f){var m=!u[f+1],p=m?r+s-h:u[f+1]-h;if(p<=0)return null;var g=f%e.length;return Z.createElement("rect",{key:"react-".concat(f),y:h,x:i,height:p,width:o,stroke:"none",fill:e[g],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return Z.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function mXi(t){var e=t.vertical,n=e===void 0?!0:e,i=t.verticalFill,r=t.fillOpacity,o=t.x,s=t.y,a=t.width,l=t.height,c=t.verticalPoints;if(!n||!i||!i.length)return null;var u=c.map(function(h){return Math.round(h+o-o)}).sort(function(h,f){return h-f});o!==u[0]&&u.unshift(0);var d=u.map(function(h,f){var m=!u[f+1],p=m?o+a-h:u[f+1]-h;if(p<=0)return null;var g=f%i.length;return Z.createElement("rect",{key:"react-".concat(f),x:h,y:s,width:p,height:l,stroke:"none",fill:i[g],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return Z.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var pXi=function(e,n){var i=e.xAxis,r=e.width,o=e.height,s=e.offset;return L8t(J9e(gf(gf(gf({},s$.defaultProps),i),{},{ticks:mC(i,!0),viewBox:{x:0,y:0,width:r,height:o}})),s.left,s.left+s.width,n)},gXi=function(e,n){var i=e.yAxis,r=e.width,o=e.height,s=e.offset;return L8t(J9e(gf(gf(gf({},s$.defaultProps),i),{},{ticks:mC(i,!0),viewBox:{x:0,y:0,width:r,height:o}})),s.top,s.top+s.height,n)},oO={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function a$(t){var e,n,i,r,o,s,a=X9e(),l=Z9e(),c=iYi(),u=gf(gf({},t),{},{stroke:(e=t.stroke)!==null&&e!==void 0?e:oO.stroke,fill:(n=t.fill)!==null&&n!==void 0?n:oO.fill,horizontal:(i=t.horizontal)!==null&&i!==void 0?i:oO.horizontal,horizontalFill:(r=t.horizontalFill)!==null&&r!==void 0?r:oO.horizontalFill,vertical:(o=t.vertical)!==null&&o!==void 0?o:oO.vertical,verticalFill:(s=t.verticalFill)!==null&&s!==void 0?s:oO.verticalFill,x:ui(t.x)?t.x:c.left,y:ui(t.y)?t.y:c.top,width:ui(t.width)?t.width:c.width,height:ui(t.height)?t.height:c.height}),d=u.x,h=u.y,f=u.width,m=u.height,p=u.syncWithTicks,g=u.horizontalValues,y=u.verticalValues,_=eYi(),w=tYi();if(!ui(f)||f<=0||!ui(m)||m<=0||!ui(d)||d!==+d||!ui(h)||h!==+h)return null;var C=u.verticalCoordinatesGenerator||pXi,N=u.horizontalCoordinatesGenerator||gXi,E=u.horizontalPoints,D=u.verticalPoints;if((!E||!E.length)&&$o(N)){var k=g&&g.length,M=N({yAxis:w?gf(gf({},w),{},{ticks:k?g:w.ticks}):void 0,width:a,height:l,offset:c},k?!0:p);jC(Array.isArray(M),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(oA(M),"]")),Array.isArray(M)&&(E=M)}if((!D||!D.length)&&$o(C)){var T=y&&y.length,A=C({xAxis:_?gf(gf({},_),{},{ticks:T?y:_.ticks}):void 0,width:a,height:l,offset:c},T?!0:p);jC(Array.isArray(A),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(oA(A),"]")),Array.isArray(A)&&(D=A)}return Z.createElement("g",{className:"recharts-cartesian-grid"},Z.createElement(uXi,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),Z.createElement(dXi,WT({},u,{offset:c,horizontalPoints:E,xAxis:_,yAxis:w})),Z.createElement(hXi,WT({},u,{offset:c,verticalPoints:D,xAxis:_,yAxis:w})),Z.createElement(fXi,WT({},u,{horizontalPoints:E})),Z.createElement(mXi,WT({},u,{verticalPoints:D})))}a$.displayName="CartesianGrid";var bXi=["type","layout","connectNulls","ref"],vXi=["key"];function U5(t){"@babel/helpers - typeof";return U5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U5(t)}function Fft(t,e){if(t==null)return{};var n=yXi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function yXi(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function xB(){return xB=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},xB.apply(this,arguments)}function $ft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Sg(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$ft(Object(n),!0).forEach(function(i){zy(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$ft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function sO(t){return CXi(t)||wXi(t)||xXi(t)||_Xi()}function _Xi(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xXi(t,e){if(t){if(typeof t=="string")return tRe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tRe(t,e)}}function wXi(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function CXi(t){if(Array.isArray(t))return tRe(t)}function tRe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function SXi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vft(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,xVt(i.key),i)}}function NXi(t,e,n){return e&&Vft(t.prototype,e),n&&Vft(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function EXi(t,e,n){return e=Sse(e),DXi(t,_Vt()?Reflect.construct(e,n||[],Sse(t).constructor):e.apply(t,n))}function DXi(t,e){if(e&&(U5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kXi(t)}function kXi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _Vt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_Vt=function(){return!!t})()}function Sse(t){return Sse=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sse(t)}function MXi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&nRe(t,e)}function nRe(t,e){return nRe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},nRe(t,e)}function zy(t,e,n){return e=xVt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xVt(t){var e=LXi(t,"string");return U5(e)=="symbol"?e:e+""}function LXi(t,e){if(U5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(U5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var mM=function(t){function e(){var n;SXi(this,e);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return n=EXi(this,e,[].concat(r)),zy(n,"state",{isAnimationFinished:!0,totalLength:0}),zy(n,"generateSimpleStrokeDasharray",function(s,a){return"".concat(a,"px ").concat(s-a,"px")}),zy(n,"getStrokeDasharray",function(s,a,l){var c=l.reduce(function(y,_){return y+_});if(!c)return n.generateSimpleStrokeDasharray(a,s);for(var u=Math.floor(s/c),d=s%c,h=a-s,f=[],m=0,p=0;m<l.length;p+=l[m],++m)if(p+l[m]>d){f=[].concat(sO(l.slice(0,m)),[d-p]);break}var g=f.length%2===0?[0,h]:[h];return[].concat(sO(e.repeat(l,u)),sO(f),g).map(function(y){return"".concat(y,"px")}).join(", ")}),zy(n,"id",lR("recharts-line-")),zy(n,"pathRef",function(s){n.mainCurve=s}),zy(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),zy(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return MXi(e,t),NXi(e,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();this.setState({totalLength:i})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();i!==this.state.totalLength&&this.setState({totalLength:i})}}},{key:"getTotalLength",value:function(){var i=this.mainCurve;try{return i&&i.getTotalLength&&i.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(i,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,s=o.points,a=o.xAxis,l=o.yAxis,c=o.layout,u=o.children,d=Rp(u,i$);if(!d)return null;var h=function(p,g){return{x:p.x,y:p.y,value:p.value,errorVal:pd(p.payload,g)}},f={clipPath:i?"url(#clipPath-".concat(r,")"):null};return Z.createElement(fa,f,d.map(function(m){return Z.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:s,xAxis:a,yAxis:l,layout:c,dataPointFormatter:h})}))}},{key:"renderDots",value:function(i,r,o){var s=this.props.isAnimationActive;if(s&&!this.state.isAnimationFinished)return null;var a=this.props,l=a.dot,c=a.points,u=a.dataKey,d=Co(this.props,!1),h=Co(l,!0),f=c.map(function(p,g){var y=Sg(Sg(Sg({key:"dot-".concat(g),r:3},d),h),{},{value:p.value,dataKey:u,cx:p.x,cy:p.y,index:g,payload:p.payload});return e.renderDotItem(l,y)}),m={clipPath:i?"url(#clipPath-".concat(r?"":"dots-").concat(o,")"):null};return Z.createElement(fa,xB({className:"recharts-line-dots",key:"dots"},m),f)}},{key:"renderCurveStatically",value:function(i,r,o,s){var a=this.props,l=a.type,c=a.layout,u=a.connectNulls;a.ref;var d=Fft(a,bXi),h=Sg(Sg(Sg({},Co(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:r?"url(#clipPath-".concat(o,")"):null,points:i},s),{},{type:l,layout:c,connectNulls:u});return Z.createElement(bI,xB({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(i,r){var o=this,s=this.props,a=s.points,l=s.strokeDasharray,c=s.isAnimationActive,u=s.animationBegin,d=s.animationDuration,h=s.animationEasing,f=s.animationId,m=s.animateNewValues,p=s.width,g=s.height,y=this.state,_=y.prevPoints,w=y.totalLength;return Z.createElement(e_,{begin:u,duration:d,isActive:c,easing:h,from:{t:0},to:{t:1},key:"line-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(C){var N=C.t;if(_){var E=_.length/a.length,D=a.map(function(R,P){var O=Math.floor(P*E);if(_[O]){var V=_[O],F=eu(V.x,R.x),$=eu(V.y,R.y);return Sg(Sg({},R),{},{x:F(N),y:$(N)})}if(m){var B=eu(p*2,R.x),z=eu(g/2,R.y);return Sg(Sg({},R),{},{x:B(N),y:z(N)})}return Sg(Sg({},R),{},{x:R.x,y:R.y})});return o.renderCurveStatically(D,i,r)}var k=eu(0,w),M=k(N),T;if(l){var A="".concat(l).split(/[,\s]+/gim).map(function(R){return parseFloat(R)});T=o.getStrokeDasharray(M,w,A)}else T=o.generateSimpleStrokeDasharray(w,M);return o.renderCurveStatically(a,i,r,{strokeDasharray:T})})}},{key:"renderCurve",value:function(i,r){var o=this.props,s=o.points,a=o.isAnimationActive,l=this.state,c=l.prevPoints,u=l.totalLength;return a&&s&&s.length&&(!c&&u>0||!iA(c,s))?this.renderCurveWithAnimation(i,r):this.renderCurveStatically(s,i,r)}},{key:"render",value:function(){var i,r=this.props,o=r.hide,s=r.dot,a=r.points,l=r.className,c=r.xAxis,u=r.yAxis,d=r.top,h=r.left,f=r.width,m=r.height,p=r.isAnimationActive,g=r.id;if(o||!a||!a.length)return null;var y=this.state.isAnimationFinished,_=a.length===1,w=Vt("recharts-line",l),C=c&&c.allowDataOverflow,N=u&&u.allowDataOverflow,E=C||N,D=So(g)?this.id:g,k=(i=Co(s,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},M=k.r,T=M===void 0?3:M,A=k.strokeWidth,R=A===void 0?2:A,P=C6t(s)?s:{},O=P.clipDot,V=O===void 0?!0:O,F=T*2+R;return Z.createElement(fa,{className:w},C||N?Z.createElement("defs",null,Z.createElement("clipPath",{id:"clipPath-".concat(D)},Z.createElement("rect",{x:C?h:h-f/2,y:N?d:d-m/2,width:C?f:f*2,height:N?m:m*2})),!V&&Z.createElement("clipPath",{id:"clipPath-dots-".concat(D)},Z.createElement("rect",{x:h-F/2,y:d-F/2,width:f+F,height:m+F}))):null,!_&&this.renderCurve(E,D),this.renderErrorBar(E,D),(_||s)&&this.renderDots(E,V,D),(!p||y)&&Gx.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,prevPoints:r.curPoints}:i.points!==r.curPoints?{curPoints:i.points}:null}},{key:"repeat",value:function(i,r){for(var o=i.length%2!==0?[].concat(sO(i),[0]):i,s=[],a=0;a<r;++a)s=[].concat(sO(s),sO(o));return s}},{key:"renderDotItem",value:function(i,r){var o;if(Z.isValidElement(i))o=Z.cloneElement(i,r);else if($o(i))o=i(r);else{var s=r.key,a=Fft(r,vXi),l=Vt("recharts-line-dot",typeof i!="boolean"?i.className:"");o=Z.createElement(tpe,xB({key:s},a,{className:l}))}return o}}])}(b.PureComponent);zy(mM,"displayName","Line");zy(mM,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!D0.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});zy(mM,"getComposedData",function(t){var e=t.props,n=t.xAxis,i=t.yAxis,r=t.xAxisTicks,o=t.yAxisTicks,s=t.dataKey,a=t.bandSize,l=t.displayedData,c=t.offset,u=e.layout,d=l.map(function(h,f){var m=pd(h,s);return u==="horizontal"?{x:P5({axis:n,ticks:r,bandSize:a,entry:h,index:f}),y:So(m)?null:i.scale(m),value:m,payload:h}:{x:So(m)?null:n.scale(m),y:P5({axis:i,ticks:o,bandSize:a,entry:h,index:f}),value:m,payload:h}});return Sg({points:d,layout:u},c)});var TXi=["layout","type","stroke","connectNulls","isRange","ref"],IXi=["key"],wVt;function K5(t){"@babel/helpers - typeof";return K5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},K5(t)}function CVt(t,e){if(t==null)return{};var n=AXi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function AXi(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function UT(){return UT=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},UT.apply(this,arguments)}function Bft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function XN(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Bft(Object(n),!0).forEach(function(i){Ox(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function RXi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zft(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,NVt(i.key),i)}}function PXi(t,e,n){return e&&zft(t.prototype,e),n&&zft(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function OXi(t,e,n){return e=Nse(e),jXi(t,SVt()?Reflect.construct(e,n||[],Nse(t).constructor):e.apply(t,n))}function jXi(t,e){if(e&&(K5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FXi(t)}function FXi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function SVt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SVt=function(){return!!t})()}function Nse(t){return Nse=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Nse(t)}function $Xi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&iRe(t,e)}function iRe(t,e){return iRe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},iRe(t,e)}function Ox(t,e,n){return e=NVt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function NVt(t){var e=VXi(t,"string");return K5(e)=="symbol"?e:e+""}function VXi(t,e){if(K5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(K5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var f_=function(t){function e(){var n;RXi(this,e);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return n=OXi(this,e,[].concat(r)),Ox(n,"state",{isAnimationFinished:!0}),Ox(n,"id",lR("recharts-area-")),Ox(n,"handleAnimationEnd",function(){var s=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),$o(s)&&s()}),Ox(n,"handleAnimationStart",function(){var s=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),$o(s)&&s()}),n}return $Xi(e,t),PXi(e,[{key:"renderDots",value:function(i,r,o){var s=this.props.isAnimationActive,a=this.state.isAnimationFinished;if(s&&!a)return null;var l=this.props,c=l.dot,u=l.points,d=l.dataKey,h=Co(this.props,!1),f=Co(c,!0),m=u.map(function(g,y){var _=XN(XN(XN({key:"dot-".concat(y),r:3},h),f),{},{index:y,cx:g.x,cy:g.y,dataKey:d,value:g.value,payload:g.payload,points:u});return e.renderDotItem(c,_)}),p={clipPath:i?"url(#clipPath-".concat(r?"":"dots-").concat(o,")"):null};return Z.createElement(fa,UT({className:"recharts-area-dots"},p),m)}},{key:"renderHorizontalRect",value:function(i){var r=this.props,o=r.baseLine,s=r.points,a=r.strokeWidth,l=s[0].x,c=s[s.length-1].x,u=i*Math.abs(l-c),d=ZE(s.map(function(h){return h.y||0}));return ui(o)&&typeof o=="number"?d=Math.max(o,d):o&&Array.isArray(o)&&o.length&&(d=Math.max(ZE(o.map(function(h){return h.y||0})),d)),ui(d)?Z.createElement("rect",{x:l<c?l:l-u,y:0,width:u,height:Math.floor(d+(a?parseInt("".concat(a),10):1))}):null}},{key:"renderVerticalRect",value:function(i){var r=this.props,o=r.baseLine,s=r.points,a=r.strokeWidth,l=s[0].y,c=s[s.length-1].y,u=i*Math.abs(l-c),d=ZE(s.map(function(h){return h.x||0}));return ui(o)&&typeof o=="number"?d=Math.max(o,d):o&&Array.isArray(o)&&o.length&&(d=Math.max(ZE(o.map(function(h){return h.x||0})),d)),ui(d)?Z.createElement("rect",{x:0,y:l<c?l:l-u,width:d+(a?parseInt("".concat(a),10):1),height:Math.floor(u)}):null}},{key:"renderClipRect",value:function(i){var r=this.props.layout;return r==="vertical"?this.renderVerticalRect(i):this.renderHorizontalRect(i)}},{key:"renderAreaStatically",value:function(i,r,o,s){var a=this.props,l=a.layout,c=a.type,u=a.stroke,d=a.connectNulls,h=a.isRange;a.ref;var f=CVt(a,TXi);return Z.createElement(fa,{clipPath:o?"url(#clipPath-".concat(s,")"):null},Z.createElement(bI,UT({},Co(f,!0),{points:i,connectNulls:d,type:c,baseLine:r,layout:l,stroke:"none",className:"recharts-area-area"})),u!=="none"&&Z.createElement(bI,UT({},Co(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:d,fill:"none",points:i})),u!=="none"&&h&&Z.createElement(bI,UT({},Co(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:d,fill:"none",points:r})))}},{key:"renderAreaWithAnimation",value:function(i,r){var o=this,s=this.props,a=s.points,l=s.baseLine,c=s.isAnimationActive,u=s.animationBegin,d=s.animationDuration,h=s.animationEasing,f=s.animationId,m=this.state,p=m.prevPoints,g=m.prevBaseLine;return Z.createElement(e_,{begin:u,duration:d,isActive:c,easing:h,from:{t:0},to:{t:1},key:"area-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(y){var _=y.t;if(p){var w=p.length/a.length,C=a.map(function(k,M){var T=Math.floor(M*w);if(p[T]){var A=p[T],R=eu(A.x,k.x),P=eu(A.y,k.y);return XN(XN({},k),{},{x:R(_),y:P(_)})}return k}),N;if(ui(l)&&typeof l=="number"){var E=eu(g,l);N=E(_)}else if(So(l)||X6(l)){var D=eu(g,0);N=D(_)}else N=l.map(function(k,M){var T=Math.floor(M*w);if(g[T]){var A=g[T],R=eu(A.x,k.x),P=eu(A.y,k.y);return XN(XN({},k),{},{x:R(_),y:P(_)})}return k});return o.renderAreaStatically(C,N,i,r)}return Z.createElement(fa,null,Z.createElement("defs",null,Z.createElement("clipPath",{id:"animationClipPath-".concat(r)},o.renderClipRect(_))),Z.createElement(fa,{clipPath:"url(#animationClipPath-".concat(r,")")},o.renderAreaStatically(a,l,i,r)))})}},{key:"renderArea",value:function(i,r){var o=this.props,s=o.points,a=o.baseLine,l=o.isAnimationActive,c=this.state,u=c.prevPoints,d=c.prevBaseLine,h=c.totalLength;return l&&s&&s.length&&(!u&&h>0||!iA(u,s)||!iA(d,a))?this.renderAreaWithAnimation(i,r):this.renderAreaStatically(s,a,i,r)}},{key:"render",value:function(){var i,r=this.props,o=r.hide,s=r.dot,a=r.points,l=r.className,c=r.top,u=r.left,d=r.xAxis,h=r.yAxis,f=r.width,m=r.height,p=r.isAnimationActive,g=r.id;if(o||!a||!a.length)return null;var y=this.state.isAnimationFinished,_=a.length===1,w=Vt("recharts-area",l),C=d&&d.allowDataOverflow,N=h&&h.allowDataOverflow,E=C||N,D=So(g)?this.id:g,k=(i=Co(s,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},M=k.r,T=M===void 0?3:M,A=k.strokeWidth,R=A===void 0?2:A,P=C6t(s)?s:{},O=P.clipDot,V=O===void 0?!0:O,F=T*2+R;return Z.createElement(fa,{className:w},C||N?Z.createElement("defs",null,Z.createElement("clipPath",{id:"clipPath-".concat(D)},Z.createElement("rect",{x:C?u:u-f/2,y:N?c:c-m/2,width:C?f:f*2,height:N?m:m*2})),!V&&Z.createElement("clipPath",{id:"clipPath-dots-".concat(D)},Z.createElement("rect",{x:u-F/2,y:c-F/2,width:f+F,height:m+F}))):null,_?null:this.renderArea(E,D),(s||_)&&this.renderDots(E,V,D),(!p||y)&&Gx.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,curBaseLine:i.baseLine,prevPoints:r.curPoints,prevBaseLine:r.curBaseLine}:i.points!==r.curPoints||i.baseLine!==r.curBaseLine?{curPoints:i.points,curBaseLine:i.baseLine}:null}}])}(b.PureComponent);wVt=f_;Ox(f_,"displayName","Area");Ox(f_,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!D0.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Ox(f_,"getBaseValue",function(t,e,n,i){var r=t.layout,o=t.baseValue,s=e.props.baseValue,a=s??o;if(ui(a)&&typeof a=="number")return a;var l=r==="horizontal"?i:n,c=l.scale.domain();if(l.type==="number"){var u=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return a==="dataMin"?d:a==="dataMax"||u<0?u:Math.max(Math.min(c[0],c[1]),0)}return a==="dataMin"?c[0]:a==="dataMax"?c[1]:c[0]});Ox(f_,"getComposedData",function(t){var e=t.props,n=t.item,i=t.xAxis,r=t.yAxis,o=t.xAxisTicks,s=t.yAxisTicks,a=t.bandSize,l=t.dataKey,c=t.stackedData,u=t.dataStartIndex,d=t.displayedData,h=t.offset,f=e.layout,m=c&&c.length,p=wVt.getBaseValue(e,n,i,r),g=f==="horizontal",y=!1,_=d.map(function(C,N){var E;m?E=c[u+N]:(E=pd(C,l),Array.isArray(E)?y=!0:E=[p,E]);var D=E[1]==null||m&&pd(C,l)==null;return g?{x:P5({axis:i,ticks:o,bandSize:a,entry:C,index:N}),y:D?null:r.scale(E[1]),value:E,payload:C}:{x:D?null:i.scale(E[1]),y:P5({axis:r,ticks:s,bandSize:a,entry:C,index:N}),value:E,payload:C}}),w;return m||y?w=_.map(function(C){var N=Array.isArray(C.value)?C.value[0]:null;return g?{x:C.x,y:N!=null&&C.y!=null?r.scale(N):null}:{x:N!=null?i.scale(N):null,y:C.y}}):w=g?r.scale(p):i.scale(p),XN({points:_,baseLine:w,layout:f,isRange:y},h)});Ox(f_,"renderDotItem",function(t,e){var n;if(Z.isValidElement(t))n=Z.cloneElement(t,e);else if($o(t))n=t(e);else{var i=Vt("recharts-area-dot",typeof t!="boolean"?t.className:""),r=e.key,o=CVt(e,IXi);n=Z.createElement(tpe,UT({},o,{key:r,className:i}))}return n});function q5(t){"@babel/helpers - typeof";return q5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q5(t)}function BXi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zXi(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,kVt(i.key),i)}}function HXi(t,e,n){return e&&zXi(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function WXi(t,e,n){return e=Ese(e),UXi(t,EVt()?Reflect.construct(e,n||[],Ese(t).constructor):e.apply(t,n))}function UXi(t,e){if(e&&(q5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return KXi(t)}function KXi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function EVt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EVt=function(){return!!t})()}function Ese(t){return Ese=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ese(t)}function qXi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rRe(t,e)}function rRe(t,e){return rRe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},rRe(t,e)}function DVt(t,e,n){return e=kVt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kVt(t){var e=GXi(t,"string");return q5(e)=="symbol"?e:e+""}function GXi(t,e){if(q5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(q5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var upe=function(t){function e(){return BXi(this,e),WXi(this,e,arguments)}return qXi(e,t),HXi(e,[{key:"render",value:function(){return null}}])}(Z.Component);DVt(upe,"displayName","ZAxis");DVt(upe,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var YXi=["option","isActive"];function wB(){return wB=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},wB.apply(this,arguments)}function XXi(t,e){if(t==null)return{};var n=ZXi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function ZXi(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function QXi(t){var e=t.option,n=t.isActive,i=XXi(t,YXi);return typeof e=="string"?Z.createElement(WAe,wB({option:Z.createElement(zme,wB({type:e},i)),isActive:n,shapeType:"symbols"},i)):Z.createElement(WAe,wB({option:e,isActive:n,shapeType:"symbols"},i))}function G5(t){"@babel/helpers - typeof";return G5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G5(t)}function CB(){return CB=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},CB.apply(this,arguments)}function Hft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Xb(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hft(Object(n),!0).forEach(function(i){JE(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function JXi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wft(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,LVt(i.key),i)}}function eZi(t,e,n){return e&&Wft(t.prototype,e),n&&Wft(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function tZi(t,e,n){return e=Dse(e),nZi(t,MVt()?Reflect.construct(e,n||[],Dse(t).constructor):e.apply(t,n))}function nZi(t,e){if(e&&(G5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iZi(t)}function iZi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function MVt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(MVt=function(){return!!t})()}function Dse(t){return Dse=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Dse(t)}function rZi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oRe(t,e)}function oRe(t,e){return oRe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},oRe(t,e)}function JE(t,e,n){return e=LVt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function LVt(t){var e=oZi(t,"string");return G5(e)=="symbol"?e:e+""}function oZi(t,e){if(G5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(G5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var dpe=function(t){function e(){var n;JXi(this,e);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return n=tZi(this,e,[].concat(r)),JE(n,"state",{isAnimationFinished:!1}),JE(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0})}),JE(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1})}),JE(n,"id",lR("recharts-scatter-")),n}return rZi(e,t),eZi(e,[{key:"renderSymbolsStatically",value:function(i){var r=this,o=this.props,s=o.shape,a=o.activeShape,l=o.activeIndex,c=Co(this.props,!1);return i.map(function(u,d){var h=l===d,f=h?a:s,m=Xb(Xb({},c),u);return Z.createElement(fa,CB({className:"recharts-scatter-symbol",key:"symbol-".concat(u==null?void 0:u.cx,"-").concat(u==null?void 0:u.cy,"-").concat(u==null?void 0:u.size,"-").concat(d)},_W(r.props,u,d),{role:"img"}),Z.createElement(QXi,CB({option:f,isActive:h,key:"symbol-".concat(d)},m)))})}},{key:"renderSymbolsWithAnimation",value:function(){var i=this,r=this.props,o=r.points,s=r.isAnimationActive,a=r.animationBegin,l=r.animationDuration,c=r.animationEasing,u=r.animationId,d=this.state.prevPoints;return Z.createElement(e_,{begin:a,duration:l,isActive:s,easing:c,from:{t:0},to:{t:1},key:"pie-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var f=h.t,m=o.map(function(p,g){var y=d&&d[g];if(y){var _=eu(y.cx,p.cx),w=eu(y.cy,p.cy),C=eu(y.size,p.size);return Xb(Xb({},p),{},{cx:_(f),cy:w(f),size:C(f)})}var N=eu(0,p.size);return Xb(Xb({},p),{},{size:N(f)})});return Z.createElement(fa,null,i.renderSymbolsStatically(m))})}},{key:"renderSymbols",value:function(){var i=this.props,r=i.points,o=i.isAnimationActive,s=this.state.prevPoints;return o&&r&&r.length&&(!s||!iA(s,r))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(r)}},{key:"renderErrorBar",value:function(){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var r=this.props,o=r.points,s=r.xAxis,a=r.yAxis,l=r.children,c=Rp(l,i$);return c?c.map(function(u,d){var h=u.props,f=h.direction,m=h.dataKey;return Z.cloneElement(u,{key:"".concat(f,"-").concat(m,"-").concat(o[d]),data:o,xAxis:s,yAxis:a,layout:f==="x"?"vertical":"horizontal",dataPointFormatter:function(g,y){return{x:g.cx,y:g.cy,value:f==="x"?+g.node.x:+g.node.y,errorVal:pd(g,y)}}})}):null}},{key:"renderLine",value:function(){var i=this.props,r=i.points,o=i.line,s=i.lineType,a=i.lineJointType,l=Co(this.props,!1),c=Co(o,!1),u,d;if(s==="joint")u=r.map(function(w){return{x:w.cx,y:w.cy}});else if(s==="fitting"){var h=ePi(r),f=h.xmin,m=h.xmax,p=h.a,g=h.b,y=function(C){return p*C+g};u=[{x:f,y:y(f)},{x:m,y:y(m)}]}var _=Xb(Xb(Xb({},l),{},{fill:"none",stroke:l&&l.fill},c),{},{points:u});return Z.isValidElement(o)?d=Z.cloneElement(o,_):$o(o)?d=o(_):d=Z.createElement(bI,CB({},_,{type:a})),Z.createElement(fa,{className:"recharts-scatter-line",key:"recharts-scatter-line"},d)}},{key:"render",value:function(){var i=this.props,r=i.hide,o=i.points,s=i.line,a=i.className,l=i.xAxis,c=i.yAxis,u=i.left,d=i.top,h=i.width,f=i.height,m=i.id,p=i.isAnimationActive;if(r||!o||!o.length)return null;var g=this.state.isAnimationFinished,y=Vt("recharts-scatter",a),_=l&&l.allowDataOverflow,w=c&&c.allowDataOverflow,C=_||w,N=So(m)?this.id:m;return Z.createElement(fa,{className:y,clipPath:C?"url(#clipPath-".concat(N,")"):null},_||w?Z.createElement("defs",null,Z.createElement("clipPath",{id:"clipPath-".concat(N)},Z.createElement("rect",{x:_?u:u-h/2,y:w?d:d-f/2,width:_?h:h*2,height:w?f:f*2}))):null,s&&this.renderLine(),this.renderErrorBar(),Z.createElement(fa,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!p||g)&&Gx.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,prevPoints:r.curPoints}:i.points!==r.curPoints?{curPoints:i.points}:null}}])}(b.PureComponent);JE(dpe,"displayName","Scatter");JE(dpe,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!D0.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"});JE(dpe,"getComposedData",function(t){var e=t.xAxis,n=t.yAxis,i=t.zAxis,r=t.item,o=t.displayedData,s=t.xAxisTicks,a=t.yAxisTicks,l=t.offset,c=r.props.tooltipType,u=Rp(r.props.children,_9e),d=So(e.dataKey)?r.props.dataKey:e.dataKey,h=So(n.dataKey)?r.props.dataKey:n.dataKey,f=i&&i.dataKey,m=i?i.range:upe.defaultProps.range,p=m&&m[0],g=e.scale.bandwidth?e.scale.bandwidth():0,y=n.scale.bandwidth?n.scale.bandwidth():0,_=o.map(function(w,C){var N=pd(w,d),E=pd(w,h),D=!So(f)&&pd(w,f)||"-",k=[{name:So(e.dataKey)?r.props.name:e.name||e.dataKey,unit:e.unit||"",value:N,payload:w,dataKey:d,type:c},{name:So(n.dataKey)?r.props.name:n.name||n.dataKey,unit:n.unit||"",value:E,payload:w,dataKey:h,type:c}];D!=="-"&&k.push({name:i.name||i.dataKey,unit:i.unit||"",value:D,payload:w,dataKey:f,type:c});var M=P5({axis:e,ticks:s,bandSize:g,entry:w,index:C,dataKey:d}),T=P5({axis:n,ticks:a,bandSize:y,entry:w,index:C,dataKey:h}),A=D!=="-"?i.scale(D):p,R=Math.sqrt(Math.max(A,0)/Math.PI);return Xb(Xb({},w),{},{cx:M,cy:T,x:M-R,y:T-R,xAxis:e,yAxis:n,zAxis:i,width:2*R,height:2*R,size:A,node:{x:N,y:E,z:D},tooltipPayload:k,tooltipPosition:{x:M,y:T},payload:w},u&&u[C]&&u[C].props)});return Xb({points:_},l)});function Y5(t){"@babel/helpers - typeof";return Y5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y5(t)}function sZi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function aZi(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,AVt(i.key),i)}}function lZi(t,e,n){return e&&aZi(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function cZi(t,e,n){return e=kse(e),uZi(t,TVt()?Reflect.construct(e,n||[],kse(t).constructor):e.apply(t,n))}function uZi(t,e){if(e&&(Y5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dZi(t)}function dZi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function TVt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(TVt=function(){return!!t})()}function kse(t){return kse=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kse(t)}function hZi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sRe(t,e)}function sRe(t,e){return sRe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},sRe(t,e)}function IVt(t,e,n){return e=AVt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function AVt(t){var e=fZi(t,"string");return Y5(e)=="symbol"?e:e+""}function fZi(t,e){if(Y5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(Y5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function aRe(){return aRe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},aRe.apply(this,arguments)}function mZi(t){var e=t.xAxisId,n=X9e(),i=Z9e(),r=lVt(e);return r==null?null:Z.createElement(s$,aRe({},r,{className:Vt("recharts-".concat(r.axisType," ").concat(r.axisType),r.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(s){return mC(s,!0)}}))}var m_=function(t){function e(){return sZi(this,e),cZi(this,e,arguments)}return hZi(e,t),lZi(e,[{key:"render",value:function(){return Z.createElement(mZi,this.props)}}])}(Z.Component);IVt(m_,"displayName","XAxis");IVt(m_,"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});function X5(t){"@babel/helpers - typeof";return X5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X5(t)}function pZi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gZi(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,OVt(i.key),i)}}function bZi(t,e,n){return e&&gZi(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function vZi(t,e,n){return e=Mse(e),yZi(t,RVt()?Reflect.construct(e,n||[],Mse(t).constructor):e.apply(t,n))}function yZi(t,e){if(e&&(X5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _Zi(t)}function _Zi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function RVt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(RVt=function(){return!!t})()}function Mse(t){return Mse=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mse(t)}function xZi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lRe(t,e)}function lRe(t,e){return lRe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},lRe(t,e)}function PVt(t,e,n){return e=OVt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function OVt(t){var e=wZi(t,"string");return X5(e)=="symbol"?e:e+""}function wZi(t,e){if(X5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(X5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function cRe(){return cRe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},cRe.apply(this,arguments)}var CZi=function(e){var n=e.yAxisId,i=X9e(),r=Z9e(),o=cVt(n);return o==null?null:Z.createElement(s$,cRe({},o,{className:Vt("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:i,height:r},ticksGenerator:function(a){return mC(a,!0)}}))},Ov=function(t){function e(){return pZi(this,e),vZi(this,e,arguments)}return xZi(e,t),bZi(e,[{key:"render",value:function(){return Z.createElement(CZi,this.props)}}])}(Z.Component);PVt(Ov,"displayName","YAxis");PVt(Ov,"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});function Uft(t){return DZi(t)||EZi(t)||NZi(t)||SZi()}function SZi(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NZi(t,e){if(t){if(typeof t=="string")return uRe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uRe(t,e)}}function EZi(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function DZi(t){if(Array.isArray(t))return uRe(t)}function uRe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var dRe=function(e,n,i,r,o){var s=Rp(e,o$),a=Rp(e,ape),l=[].concat(Uft(s),Uft(a)),c=Rp(e,cpe),u="".concat(r,"Id"),d=r[0],h=n;if(l.length&&(h=l.reduce(function(p,g){if(g.props[u]===i&&Yx(g.props,"extendDomain")&&ui(g.props[d])){var y=g.props[d];return[Math.min(p[0],y),Math.max(p[1],y)]}return p},h)),c.length){var f="".concat(d,"1"),m="".concat(d,"2");h=c.reduce(function(p,g){if(g.props[u]===i&&Yx(g.props,"extendDomain")&&ui(g.props[f])&&ui(g.props[m])){var y=g.props[f],_=g.props[m];return[Math.min(p[0],y,_),Math.max(p[1],y,_)]}return p},h)}return o&&o.length&&(h=o.reduce(function(p,g){return ui(g)?[Math.min(p[0],g),Math.max(p[1],g)]:p},h)),h},jVt={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,n="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(n=!1));function r(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function o(l,c,u,d,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var f=new r(u,d||l,h),m=n?n+c:c;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],f]:l._events[m].push(f):(l._events[m]=f,l._eventsCount++),l}function s(l,c){--l._eventsCount===0?l._events=new i:delete l._events[c]}function a(){this._events=new i,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)e.call(u,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},a.prototype.listeners=function(c){var u=n?n+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,f=d.length,m=new Array(f);h<f;h++)m[h]=d[h].fn;return m},a.prototype.listenerCount=function(c){var u=n?n+c:c,d=this._events[u];return d?d.fn?1:d.length:0},a.prototype.emit=function(c,u,d,h,f,m){var p=n?n+c:c;if(!this._events[p])return!1;var g=this._events[p],y=arguments.length,_,w;if(g.fn){switch(g.once&&this.removeListener(c,g.fn,void 0,!0),y){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,u),!0;case 3:return g.fn.call(g.context,u,d),!0;case 4:return g.fn.call(g.context,u,d,h),!0;case 5:return g.fn.call(g.context,u,d,h,f),!0;case 6:return g.fn.call(g.context,u,d,h,f,m),!0}for(w=1,_=new Array(y-1);w<y;w++)_[w-1]=arguments[w];g.fn.apply(g.context,_)}else{var C=g.length,N;for(w=0;w<C;w++)switch(g[w].once&&this.removeListener(c,g[w].fn,void 0,!0),y){case 1:g[w].fn.call(g[w].context);break;case 2:g[w].fn.call(g[w].context,u);break;case 3:g[w].fn.call(g[w].context,u,d);break;case 4:g[w].fn.call(g[w].context,u,d,h);break;default:if(!_)for(N=1,_=new Array(y-1);N<y;N++)_[N-1]=arguments[N];g[w].fn.apply(g[w].context,_)}}return!0},a.prototype.on=function(c,u,d){return o(this,c,u,d,!1)},a.prototype.once=function(c,u,d){return o(this,c,u,d,!0)},a.prototype.removeListener=function(c,u,d,h){var f=n?n+c:c;if(!this._events[f])return this;if(!u)return s(this,f),this;var m=this._events[f];if(m.fn)m.fn===u&&(!h||m.once)&&(!d||m.context===d)&&s(this,f);else{for(var p=0,g=[],y=m.length;p<y;p++)(m[p].fn!==u||h&&!m[p].once||d&&m[p].context!==d)&&g.push(m[p]);g.length?this._events[f]=g.length===1?g[0]:g:s(this,f)}return this},a.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&s(this,u)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})(jVt);var kZi=jVt.exports;const MZi=ao(kZi);var bCe=new MZi,vCe="recharts.syncMouseEvents";function JW(t){"@babel/helpers - typeof";return JW=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},JW(t)}function LZi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function TZi(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,FVt(i.key),i)}}function IZi(t,e,n){return e&&TZi(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function yCe(t,e,n){return e=FVt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function FVt(t){var e=AZi(t,"string");return JW(e)=="symbol"?e:e+""}function AZi(t,e){if(JW(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(JW(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var RZi=function(){function t(){LZi(this,t),yCe(this,"activeIndex",0),yCe(this,"coordinateList",[]),yCe(this,"layout","horizontal")}return IZi(t,[{key:"setDetails",value:function(n){var i,r=n.coordinateList,o=r===void 0?null:r,s=n.container,a=s===void 0?null:s,l=n.layout,c=l===void 0?null:l,u=n.offset,d=u===void 0?null:u,h=n.mouseHandlerCallback,f=h===void 0?null:h;this.coordinateList=(i=o??this.coordinateList)!==null&&i!==void 0?i:[],this.container=a??this.container,this.layout=c??this.layout,this.offset=d??this.offset,this.mouseHandlerCallback=f??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(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,i;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var r=this.container.getBoundingClientRect(),o=r.x,s=r.y,a=r.height,l=this.coordinateList[this.activeIndex].coordinate,c=((n=window)===null||n===void 0?void 0:n.scrollX)||0,u=((i=window)===null||i===void 0?void 0:i.scrollY)||0,d=o+l+c,h=s+this.offset.top+a/2+u;this.mouseHandlerCallback({pageX:d,pageY:h})}}}])}();function PZi(t,e,n){if(n==="number"&&e===!0&&Array.isArray(t)){var i=t==null?void 0:t[0],r=t==null?void 0:t[1];if(i&&r&&ui(i)&&ui(r))return!0}return!1}function OZi(t,e,n,i){var r=i/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-r:n.left+.5,y:t==="horizontal"?n.top+.5:e.y-r,width:t==="horizontal"?i:n.width-1,height:t==="horizontal"?n.height-1:i}}function $Vt(t){var e=t.cx,n=t.cy,i=t.radius,r=t.startAngle,o=t.endAngle,s=Eh(e,n,i,r),a=Eh(e,n,i,o);return{points:[s,a],cx:e,cy:n,radius:i,startAngle:r,endAngle:o}}function jZi(t,e,n){var i,r,o,s;if(t==="horizontal")i=e.x,o=i,r=n.top,s=n.top+n.height;else if(t==="vertical")r=e.y,s=r,i=n.left,o=n.left+n.width;else if(e.cx!=null&&e.cy!=null)if(t==="centric"){var a=e.cx,l=e.cy,c=e.innerRadius,u=e.outerRadius,d=e.angle,h=Eh(a,l,c,d),f=Eh(a,l,u,d);i=h.x,r=h.y,o=f.x,s=f.y}else return $Vt(e);return[{x:i,y:r},{x:o,y:s}]}function eU(t){"@babel/helpers - typeof";return eU=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eU(t)}function Kft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function rJ(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Kft(Object(n),!0).forEach(function(i){FZi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function FZi(t,e,n){return e=$Zi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $Zi(t){var e=VZi(t,"string");return eU(e)=="symbol"?e:e+""}function VZi(t,e){if(eU(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(eU(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function BZi(t){var e,n,i=t.element,r=t.tooltipEventType,o=t.isActive,s=t.activeCoordinate,a=t.activePayload,l=t.offset,c=t.activeTooltipIndex,u=t.tooltipAxisBandSize,d=t.layout,h=t.chartName,f=(e=i.props.cursor)!==null&&e!==void 0?e:(n=i.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!i||!f||!o||!s||h!=="ScatterChart"&&r!=="axis")return null;var m,p=bI;if(h==="ScatterChart")m=s,p=fKi;else if(h==="BarChart")m=OZi(d,s,l,u),p=K9e;else if(d==="radial"){var g=$Vt(s),y=g.cx,_=g.cy,w=g.radius,C=g.startAngle,N=g.endAngle;m={cx:y,cy:_,startAngle:C,endAngle:N,innerRadius:w,outerRadius:w},p=P8t}else m={points:jZi(d,s,l)},p=bI;var E=rJ(rJ(rJ(rJ({stroke:"#ccc",pointerEvents:"none"},l),m),Co(f,!1)),{},{payload:a,payloadIndex:c,className:Vt("recharts-tooltip-cursor",f.className)});return b.isValidElement(f)?b.cloneElement(f,E):b.createElement(p,E)}var zZi=["item"],HZi=["children","className","width","height","style","compact","title","desc"];function Z5(t){"@babel/helpers - typeof";return Z5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z5(t)}function SB(){return SB=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},SB.apply(this,arguments)}function qft(t,e){return KZi(t)||UZi(t,e)||BVt(t,e)||WZi()}function WZi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UZi(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(u){c=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}function KZi(t){if(Array.isArray(t))return t}function Gft(t,e){if(t==null)return{};var n=qZi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function qZi(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function GZi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function YZi(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,zVt(i.key),i)}}function XZi(t,e,n){return e&&YZi(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function ZZi(t,e,n){return e=Lse(e),QZi(t,VVt()?Reflect.construct(e,n||[],Lse(t).constructor):e.apply(t,n))}function QZi(t,e){if(e&&(Z5(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JZi(t)}function JZi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function VVt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(VVt=function(){return!!t})()}function Lse(t){return Lse=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Lse(t)}function eQi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hRe(t,e)}function hRe(t,e){return hRe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},hRe(t,e)}function Q5(t){return iQi(t)||nQi(t)||BVt(t)||tQi()}function tQi(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BVt(t,e){if(t){if(typeof t=="string")return fRe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fRe(t,e)}}function nQi(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function iQi(t){if(Array.isArray(t))return fRe(t)}function fRe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Yft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Sn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yft(Object(n),!0).forEach(function(i){io(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yft(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function io(t,e,n){return e=zVt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zVt(t){var e=rQi(t,"string");return Z5(e)=="symbol"?e:e+""}function rQi(t,e){if(Z5(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(Z5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var oQi={xAxis:["bottom","top"],yAxis:["left","right"]},sQi={width:"100%",height:"100%"},HVt={x:0,y:0};function oJ(t){return t}var aQi=function(e,n){return n==="horizontal"?e.x:n==="vertical"?e.y:n==="centric"?e.angle:e.radius},lQi=function(e,n,i,r){var o=n.find(function(u){return u&&u.index===i});if(o){if(e==="horizontal")return{x:o.coordinate,y:r.y};if(e==="vertical")return{x:r.x,y:o.coordinate};if(e==="centric"){var s=o.coordinate,a=r.radius;return Sn(Sn(Sn({},r),Eh(r.cx,r.cy,a,s)),{},{angle:s,radius:a})}var l=o.coordinate,c=r.angle;return Sn(Sn(Sn({},r),Eh(r.cx,r.cy,l,c)),{},{angle:c,radius:l})}return HVt},hpe=function(e,n){var i=n.graphicalItems,r=n.dataStartIndex,o=n.dataEndIndex,s=(i??[]).reduce(function(a,l){var c=l.props.data;return c&&c.length?[].concat(Q5(a),Q5(c)):a},[]);return s.length>0?s:e&&e.length&&ui(r)&&ui(o)?e.slice(r,o+1):[]};function WVt(t){return t==="number"?[0,"auto"]:void 0}var mRe=function(e,n,i,r){var o=e.graphicalItems,s=e.tooltipAxis,a=hpe(n,e);return i<0||!o||!o.length||i>=a.length?null:o.reduce(function(l,c){var u,d=(u=c.props.data)!==null&&u!==void 0?u:n;d&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=i&&(d=d.slice(e.dataStartIndex,e.dataEndIndex+1));var h;if(s.dataKey&&!s.allowDuplicatedCategory){var f=d===void 0?a:d;h=koe(f,s.dataKey,r)}else h=d&&d[i]||a[i];return h?[].concat(Q5(l),[I8t(c,h)]):l},[])},Xft=function(e,n,i,r){var o=r||{x:e.chartX,y:e.chartY},s=aQi(o,i),a=e.orderedTooltipTicks,l=e.tooltipAxis,c=e.tooltipTicks,u=uHi(s,a,c,l);if(u>=0&&c){var d=c[u]&&c[u].value,h=mRe(e,n,u,d),f=lQi(i,a,u,o);return{activeTooltipIndex:u,activeLabel:d,activePayload:h,activeCoordinate:f}}return null},cQi=function(e,n){var i=n.axes,r=n.graphicalItems,o=n.axisType,s=n.axisIdKey,a=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=e.layout,d=e.children,h=e.stackOffset,f=M8t(u,o);return i.reduce(function(m,p){var g,y=p.type.defaultProps!==void 0?Sn(Sn({},p.type.defaultProps),p.props):p.props,_=y.type,w=y.dataKey,C=y.allowDataOverflow,N=y.allowDuplicatedCategory,E=y.scale,D=y.ticks,k=y.includeHidden,M=y[s];if(m[M])return m;var T=hpe(e.data,{graphicalItems:r.filter(function(q){var U,Y=s in q.props?q.props[s]:(U=q.type.defaultProps)===null||U===void 0?void 0:U[s];return Y===M}),dataStartIndex:l,dataEndIndex:c}),A=T.length,R,P,O;PZi(y.domain,C,_)&&(R=kAe(y.domain,null,C),f&&(_==="number"||E!=="auto")&&(O=yB(T,w,"category")));var V=WVt(_);if(!R||R.length===0){var F,$=(F=y.domain)!==null&&F!==void 0?F:V;if(w){if(R=yB(T,w,_),_==="category"&&f){var B=JRi(R);N&&B?(P=R,R=fse(0,A)):N||(R=Sht($,R,p).reduce(function(q,U){return q.indexOf(U)>=0?q:[].concat(Q5(q),[U])},[]))}else if(_==="category")N?R=R.filter(function(q){return q!==""&&!So(q)}):R=Sht($,R,p).reduce(function(q,U){return q.indexOf(U)>=0||U===""||So(U)?q:[].concat(Q5(q),[U])},[]);else if(_==="number"){var z=pHi(T,r.filter(function(q){var U,Y,J=s in q.props?q.props[s]:(U=q.type.defaultProps)===null||U===void 0?void 0:U[s],ae="hide"in q.props?q.props.hide:(Y=q.type.defaultProps)===null||Y===void 0?void 0:Y.hide;return J===M&&(k||!ae)}),w,o,u);z&&(R=z)}f&&(_==="number"||E!=="auto")&&(O=yB(T,w,"category"))}else f?R=fse(0,A):a&&a[M]&&a[M].hasStack&&_==="number"?R=h==="expand"?[0,1]:T8t(a[M].stackGroups,l,c):R=k8t(T,r.filter(function(q){var U=s in q.props?q.props[s]:q.type.defaultProps[s],Y="hide"in q.props?q.props.hide:q.type.defaultProps.hide;return U===M&&(k||!Y)}),_,u,!0);if(_==="number")R=dRe(d,R,M,o,D),$&&(R=kAe($,R,C));else if(_==="category"&&$){var H=$,K=R.every(function(q){return H.indexOf(q)>=0});K&&(R=H)}}return Sn(Sn({},m),{},io({},M,Sn(Sn({},y),{},{axisType:o,domain:R,categoricalDomain:O,duplicateDomain:P,originalDomain:(g=y.domain)!==null&&g!==void 0?g:V,isCategorical:f,layout:u})))},{})},uQi=function(e,n){var i=n.graphicalItems,r=n.Axis,o=n.axisType,s=n.axisIdKey,a=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=e.layout,d=e.children,h=hpe(e.data,{graphicalItems:i,dataStartIndex:l,dataEndIndex:c}),f=h.length,m=M8t(u,o),p=-1;return i.reduce(function(g,y){var _=y.type.defaultProps!==void 0?Sn(Sn({},y.type.defaultProps),y.props):y.props,w=_[s],C=WVt("number");if(!g[w]){p++;var N;return m?N=fse(0,f):a&&a[w]&&a[w].hasStack?(N=T8t(a[w].stackGroups,l,c),N=dRe(d,N,w,o)):(N=kAe(C,k8t(h,i.filter(function(E){var D,k,M=s in E.props?E.props[s]:(D=E.type.defaultProps)===null||D===void 0?void 0:D[s],T="hide"in E.props?E.props.hide:(k=E.type.defaultProps)===null||k===void 0?void 0:k.hide;return M===w&&!T}),"number",u),r.defaultProps.allowDataOverflow),N=dRe(d,N,w,o)),Sn(Sn({},g),{},io({},w,Sn(Sn({axisType:o},r.defaultProps),{},{hide:!0,orientation:_v(oQi,"".concat(o,".").concat(p%2),null),domain:N,originalDomain:C,isCategorical:m,layout:u})))}return g},{})},dQi=function(e,n){var i=n.axisType,r=i===void 0?"xAxis":i,o=n.AxisComp,s=n.graphicalItems,a=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=e.children,d="".concat(r,"Id"),h=Rp(u,o),f={};return h&&h.length?f=cQi(e,{axes:h,graphicalItems:s,axisType:r,axisIdKey:d,stackGroups:a,dataStartIndex:l,dataEndIndex:c}):s&&s.length&&(f=uQi(e,{Axis:o,graphicalItems:s,axisType:r,axisIdKey:d,stackGroups:a,dataStartIndex:l,dataEndIndex:c})),f},hQi=function(e){var n=kE(e),i=mC(n,!1,!0);return{tooltipTicks:i,orderedTooltipTicks:v9e(i,function(r){return r.coordinate}),tooltipAxis:n,tooltipAxisBandSize:ise(n,i)}},Zft=function(e){var n=e.children,i=e.defaultShowTooltip,r=Mg(n,F5),o=0,s=0;return e.data&&e.data.length!==0&&(s=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(o=r.props.startIndex),r.props.endIndex>=0&&(s=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!i}},fQi=function(e){return!e||!e.length?!1:e.some(function(n){var i=OC(n&&n.type);return i&&i.indexOf("Bar")>=0})},Qft=function(e){return e==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:e==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:e==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},mQi=function(e,n){var i=e.props,r=e.graphicalItems,o=e.xAxisMap,s=o===void 0?{}:o,a=e.yAxisMap,l=a===void 0?{}:a,c=i.width,u=i.height,d=i.children,h=i.margin||{},f=Mg(d,F5),m=Mg(d,FC),p=Object.keys(l).reduce(function(N,E){var D=l[E],k=D.orientation;return!D.mirror&&!D.hide?Sn(Sn({},N),{},io({},k,N[k]+D.width)):N},{left:h.left||0,right:h.right||0}),g=Object.keys(s).reduce(function(N,E){var D=s[E],k=D.orientation;return!D.mirror&&!D.hide?Sn(Sn({},N),{},io({},k,_v(N,"".concat(k))+D.height)):N},{top:h.top||0,bottom:h.bottom||0}),y=Sn(Sn({},g),p),_=y.bottom;f&&(y.bottom+=f.props.height||F5.defaultProps.height),m&&n&&(y=fHi(y,r,i,n));var w=c-y.left-y.right,C=u-y.top-y.bottom;return Sn(Sn({brushBottom:_},y),{},{width:Math.max(w,0),height:Math.max(C,0)})},pQi=function(e,n){if(n==="xAxis")return e[n].width;if(n==="yAxis")return e[n].height},fpe=function(e){var n=e.chartName,i=e.GraphicalChild,r=e.defaultTooltipEventType,o=r===void 0?"axis":r,s=e.validateTooltipEventTypes,a=s===void 0?["axis"]:s,l=e.axisComponents,c=e.legendContent,u=e.formatAxisMap,d=e.defaultProps,h=function(g,y){var _=y.graphicalItems,w=y.stackGroups,C=y.offset,N=y.updateId,E=y.dataStartIndex,D=y.dataEndIndex,k=g.barSize,M=g.layout,T=g.barGap,A=g.barCategoryGap,R=g.maxBarSize,P=Qft(M),O=P.numericAxisName,V=P.cateAxisName,F=fQi(_),$=[];return _.forEach(function(B,z){var H=hpe(g.data,{graphicalItems:[B],dataStartIndex:E,dataEndIndex:D}),K=B.type.defaultProps!==void 0?Sn(Sn({},B.type.defaultProps),B.props):B.props,q=K.dataKey,U=K.maxBarSize,Y=K["".concat(O,"Id")],J=K["".concat(V,"Id")],ae={},se=l.reduce(function(ge,he){var me,X,re=y["".concat(he.axisType,"Map")],we=K["".concat(he.axisType,"Id")];re&&re[we]||he.axisType==="zAxis"||wk(!1,"Specifying a(n) ".concat(he.axisType,"Id requires a corresponding ").concat(he.axisType,"Id on the targeted graphical component ").concat((me=B==null||(X=B.type)===null||X===void 0?void 0:X.displayName)!==null&&me!==void 0?me:""));var ue=re[we];return Sn(Sn({},ge),{},io(io({},he.axisType,ue),"".concat(he.axisType,"Ticks"),mC(ue)))},ae),oe=se[V],fe=se["".concat(V,"Ticks")],de=w&&w[Y]&&w[Y].hasStack&&DHi(B,w[Y].stackGroups),ie=OC(B.type).indexOf("Bar")>=0,Q=ise(oe,fe),be=[],le=F&&dHi({barSize:k,stackGroups:w,totalSize:pQi(se,V)});if(ie){var Ne,Le,Te=So(U)?R:U,De=(Ne=(Le=ise(oe,fe,!0))!==null&&Le!==void 0?Le:Te)!==null&&Ne!==void 0?Ne:0;be=hHi({barGap:T,barCategoryGap:A,bandSize:De!==Q?De:Q,sizeList:le[J],maxBarSize:Te}),De!==Q&&(be=be.map(function(ge){return Sn(Sn({},ge),{},{position:Sn(Sn({},ge.position),{},{offset:ge.position.offset-De/2})})}))}var Pe=B&&B.type&&B.type.getComposedData;Pe&&$.push({props:Sn(Sn({},Pe(Sn(Sn({},se),{},{displayedData:H,props:g,dataKey:q,item:B,bandSize:Q,barPosition:be,offset:C,stackedData:de,layout:M,dataStartIndex:E,dataEndIndex:D}))),{},io(io(io({key:B.key||"item-".concat(z)},O,se[O]),V,se[V]),"animationId",N)),childIndex:dPi(B,g.children),item:B})}),$},f=function(g,y){var _=g.props,w=g.dataStartIndex,C=g.dataEndIndex,N=g.updateId;if(!but({props:_}))return null;var E=_.children,D=_.layout,k=_.stackOffset,M=_.data,T=_.reverseStackOrder,A=Qft(D),R=A.numericAxisName,P=A.cateAxisName,O=Rp(E,i),V=SHi(M,O,"".concat(R,"Id"),"".concat(P,"Id"),k,T),F=l.reduce(function(K,q){var U="".concat(q.axisType,"Map");return Sn(Sn({},K),{},io({},U,dQi(_,Sn(Sn({},q),{},{graphicalItems:O,stackGroups:q.axisType===R&&V,dataStartIndex:w,dataEndIndex:C}))))},{}),$=mQi(Sn(Sn({},F),{},{props:_,graphicalItems:O}),y==null?void 0:y.legendBBox);Object.keys(F).forEach(function(K){F[K]=u(_,F[K],$,K.replace("Map",""),n)});var B=F["".concat(P,"Map")],z=hQi(B),H=h(_,Sn(Sn({},F),{},{dataStartIndex:w,dataEndIndex:C,updateId:N,graphicalItems:O,stackGroups:V,offset:$}));return Sn(Sn({formattedGraphicalItems:H,graphicalItems:O,offset:$,stackGroups:V},z),F)},m=function(p){function g(y){var _,w,C;return GZi(this,g),C=ZZi(this,g,[y]),io(C,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),io(C,"accessibilityManager",new RZi),io(C,"handleLegendBBoxUpdate",function(N){if(N){var E=C.state,D=E.dataStartIndex,k=E.dataEndIndex,M=E.updateId;C.setState(Sn({legendBBox:N},f({props:C.props,dataStartIndex:D,dataEndIndex:k,updateId:M},Sn(Sn({},C.state),{},{legendBBox:N}))))}}),io(C,"handleReceiveSyncEvent",function(N,E,D){if(C.props.syncId===N){if(D===C.eventEmitterSymbol&&typeof C.props.syncMethod!="function")return;C.applySyncEvent(E)}}),io(C,"handleBrushChange",function(N){var E=N.startIndex,D=N.endIndex;if(E!==C.state.dataStartIndex||D!==C.state.dataEndIndex){var k=C.state.updateId;C.setState(function(){return Sn({dataStartIndex:E,dataEndIndex:D},f({props:C.props,dataStartIndex:E,dataEndIndex:D,updateId:k},C.state))}),C.triggerSyncEvent({dataStartIndex:E,dataEndIndex:D})}}),io(C,"handleMouseEnter",function(N){var E=C.getMouseInfo(N);if(E){var D=Sn(Sn({},E),{},{isTooltipActive:!0});C.setState(D),C.triggerSyncEvent(D);var k=C.props.onMouseEnter;$o(k)&&k(D,N)}}),io(C,"triggeredAfterMouseMove",function(N){var E=C.getMouseInfo(N),D=E?Sn(Sn({},E),{},{isTooltipActive:!0}):{isTooltipActive:!1};C.setState(D),C.triggerSyncEvent(D);var k=C.props.onMouseMove;$o(k)&&k(D,N)}),io(C,"handleItemMouseEnter",function(N){C.setState(function(){return{isTooltipActive:!0,activeItem:N,activePayload:N.tooltipPayload,activeCoordinate:N.tooltipPosition||{x:N.cx,y:N.cy}}})}),io(C,"handleItemMouseLeave",function(){C.setState(function(){return{isTooltipActive:!1}})}),io(C,"handleMouseMove",function(N){N.persist(),C.throttleTriggeredAfterMouseMove(N)}),io(C,"handleMouseLeave",function(N){C.throttleTriggeredAfterMouseMove.cancel();var E={isTooltipActive:!1};C.setState(E),C.triggerSyncEvent(E);var D=C.props.onMouseLeave;$o(D)&&D(E,N)}),io(C,"handleOuterEvent",function(N){var E=uPi(N),D=_v(C.props,"".concat(E));if(E&&$o(D)){var k,M;/.*touch.*/i.test(E)?M=C.getMouseInfo(N.changedTouches[0]):M=C.getMouseInfo(N),D((k=M)!==null&&k!==void 0?k:{},N)}}),io(C,"handleClick",function(N){var E=C.getMouseInfo(N);if(E){var D=Sn(Sn({},E),{},{isTooltipActive:!0});C.setState(D),C.triggerSyncEvent(D);var k=C.props.onClick;$o(k)&&k(D,N)}}),io(C,"handleMouseDown",function(N){var E=C.props.onMouseDown;if($o(E)){var D=C.getMouseInfo(N);E(D,N)}}),io(C,"handleMouseUp",function(N){var E=C.props.onMouseUp;if($o(E)){var D=C.getMouseInfo(N);E(D,N)}}),io(C,"handleTouchMove",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&C.throttleTriggeredAfterMouseMove(N.changedTouches[0])}),io(C,"handleTouchStart",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&C.handleMouseDown(N.changedTouches[0])}),io(C,"handleTouchEnd",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&C.handleMouseUp(N.changedTouches[0])}),io(C,"triggerSyncEvent",function(N){C.props.syncId!==void 0&&bCe.emit(vCe,C.props.syncId,N,C.eventEmitterSymbol)}),io(C,"applySyncEvent",function(N){var E=C.props,D=E.layout,k=E.syncMethod,M=C.state.updateId,T=N.dataStartIndex,A=N.dataEndIndex;if(N.dataStartIndex!==void 0||N.dataEndIndex!==void 0)C.setState(Sn({dataStartIndex:T,dataEndIndex:A},f({props:C.props,dataStartIndex:T,dataEndIndex:A,updateId:M},C.state)));else if(N.activeTooltipIndex!==void 0){var R=N.chartX,P=N.chartY,O=N.activeTooltipIndex,V=C.state,F=V.offset,$=V.tooltipTicks;if(!F)return;if(typeof k=="function")O=k($,N);else if(k==="value"){O=-1;for(var B=0;B<$.length;B++)if($[B].value===N.activeLabel){O=B;break}}var z=Sn(Sn({},F),{},{x:F.left,y:F.top}),H=Math.min(R,z.x+z.width),K=Math.min(P,z.y+z.height),q=$[O]&&$[O].value,U=mRe(C.state,C.props.data,O),Y=$[O]?{x:D==="horizontal"?$[O].coordinate:H,y:D==="horizontal"?K:$[O].coordinate}:HVt;C.setState(Sn(Sn({},N),{},{activeLabel:q,activeCoordinate:Y,activePayload:U,activeTooltipIndex:O}))}else C.setState(N)}),io(C,"renderCursor",function(N){var E,D=C.state,k=D.isTooltipActive,M=D.activeCoordinate,T=D.activePayload,A=D.offset,R=D.activeTooltipIndex,P=D.tooltipAxisBandSize,O=C.getTooltipEventType(),V=(E=N.props.active)!==null&&E!==void 0?E:k,F=C.props.layout,$=N.key||"_recharts-cursor";return Z.createElement(BZi,{key:$,activeCoordinate:M,activePayload:T,activeTooltipIndex:R,chartName:n,element:N,isActive:V,layout:F,offset:A,tooltipAxisBandSize:P,tooltipEventType:O})}),io(C,"renderPolarAxis",function(N,E,D){var k=_v(N,"type.axisType"),M=_v(C.state,"".concat(k,"Map")),T=N.type.defaultProps,A=T!==void 0?Sn(Sn({},T),N.props):N.props,R=M&&M[A["".concat(k,"Id")]];return b.cloneElement(N,Sn(Sn({},R),{},{className:Vt(k,R.className),key:N.key||"".concat(E,"-").concat(D),ticks:mC(R,!0)}))}),io(C,"renderPolarGrid",function(N){var E=N.props,D=E.radialLines,k=E.polarAngles,M=E.polarRadius,T=C.state,A=T.radiusAxisMap,R=T.angleAxisMap,P=kE(A),O=kE(R),V=O.cx,F=O.cy,$=O.innerRadius,B=O.outerRadius;return b.cloneElement(N,{polarAngles:Array.isArray(k)?k:mC(O,!0).map(function(z){return z.coordinate}),polarRadius:Array.isArray(M)?M:mC(P,!0).map(function(z){return z.coordinate}),cx:V,cy:F,innerRadius:$,outerRadius:B,key:N.key||"polar-grid",radialLines:D})}),io(C,"renderLegend",function(){var N=C.state.formattedGraphicalItems,E=C.props,D=E.children,k=E.width,M=E.height,T=C.props.margin||{},A=k-(T.left||0)-(T.right||0),R=E8t({children:D,formattedGraphicalItems:N,legendWidth:A,legendContent:c});if(!R)return null;var P=R.item,O=Gft(R,zZi);return b.cloneElement(P,Sn(Sn({},O),{},{chartWidth:k,chartHeight:M,margin:T,onBBoxUpdate:C.handleLegendBBoxUpdate}))}),io(C,"renderTooltip",function(){var N,E=C.props,D=E.children,k=E.accessibilityLayer,M=Mg(D,up);if(!M)return null;var T=C.state,A=T.isTooltipActive,R=T.activeCoordinate,P=T.activePayload,O=T.activeLabel,V=T.offset,F=(N=M.props.active)!==null&&N!==void 0?N:A;return b.cloneElement(M,{viewBox:Sn(Sn({},V),{},{x:V.left,y:V.top}),active:F,label:O,payload:F?P:[],coordinate:R,accessibilityLayer:k})}),io(C,"renderBrush",function(N){var E=C.props,D=E.margin,k=E.data,M=C.state,T=M.offset,A=M.dataStartIndex,R=M.dataEndIndex,P=M.updateId;return b.cloneElement(N,{key:N.key||"_recharts-brush",onChange:eJ(C.handleBrushChange,N.props.onChange),data:k,x:ui(N.props.x)?N.props.x:T.left,y:ui(N.props.y)?N.props.y:T.top+T.height+T.brushBottom-(D.bottom||0),width:ui(N.props.width)?N.props.width:T.width,startIndex:A,endIndex:R,updateId:"brush-".concat(P)})}),io(C,"renderReferenceElement",function(N,E,D){if(!N)return null;var k=C,M=k.clipPathId,T=C.state,A=T.xAxisMap,R=T.yAxisMap,P=T.offset,O=N.type.defaultProps||{},V=N.props,F=V.xAxisId,$=F===void 0?O.xAxisId:F,B=V.yAxisId,z=B===void 0?O.yAxisId:B;return b.cloneElement(N,{key:N.key||"".concat(E,"-").concat(D),xAxis:A[$],yAxis:R[z],viewBox:{x:P.left,y:P.top,width:P.width,height:P.height},clipPathId:M})}),io(C,"renderActivePoints",function(N){var E=N.item,D=N.activePoint,k=N.basePoint,M=N.childIndex,T=N.isRange,A=[],R=E.props.key,P=E.item.type.defaultProps!==void 0?Sn(Sn({},E.item.type.defaultProps),E.item.props):E.item.props,O=P.activeDot,V=P.dataKey,F=Sn(Sn({index:M,dataKey:V,cx:D.x,cy:D.y,r:4,fill:U9e(E.item),strokeWidth:2,stroke:"#fff",payload:D.payload,value:D.value},Co(O,!1)),Moe(O));return A.push(g.renderActiveDot(O,F,"".concat(R,"-activePoint-").concat(M))),k?A.push(g.renderActiveDot(O,Sn(Sn({},F),{},{cx:k.x,cy:k.y}),"".concat(R,"-basePoint-").concat(M))):T&&A.push(null),A}),io(C,"renderGraphicChild",function(N,E,D){var k=C.filterFormatItem(N,E,D);if(!k)return null;var M=C.getTooltipEventType(),T=C.state,A=T.isTooltipActive,R=T.tooltipAxis,P=T.activeTooltipIndex,O=T.activeLabel,V=C.props.children,F=Mg(V,up),$=k.props,B=$.points,z=$.isRange,H=$.baseLine,K=k.item.type.defaultProps!==void 0?Sn(Sn({},k.item.type.defaultProps),k.item.props):k.item.props,q=K.activeDot,U=K.hide,Y=K.activeBar,J=K.activeShape,ae=!!(!U&&A&&F&&(q||Y||J)),se={};M!=="axis"&&F&&F.props.trigger==="click"?se={onClick:eJ(C.handleItemMouseEnter,N.props.onClick)}:M!=="axis"&&(se={onMouseLeave:eJ(C.handleItemMouseLeave,N.props.onMouseLeave),onMouseEnter:eJ(C.handleItemMouseEnter,N.props.onMouseEnter)});var oe=b.cloneElement(N,Sn(Sn({},k.props),se));function fe(he){return typeof R.dataKey=="function"?R.dataKey(he.payload):null}if(ae)if(P>=0){var de,ie;if(R.dataKey&&!R.allowDuplicatedCategory){var Q=typeof R.dataKey=="function"?fe:"payload.".concat(R.dataKey.toString());de=koe(B,Q,O),ie=z&&H&&koe(H,Q,O)}else de=B==null?void 0:B[P],ie=z&&H&&H[P];if(J||Y){var be=N.props.activeIndex!==void 0?N.props.activeIndex:P;return[b.cloneElement(N,Sn(Sn(Sn({},k.props),se),{},{activeIndex:be})),null,null]}if(!So(de))return[oe].concat(Q5(C.renderActivePoints({item:k,activePoint:de,basePoint:ie,childIndex:P,isRange:z})))}else{var le,Ne=(le=C.getItemByXY(C.state.activeCoordinate))!==null&&le!==void 0?le:{graphicalItem:oe},Le=Ne.graphicalItem,Te=Le.item,De=Te===void 0?N:Te,Pe=Le.childIndex,ge=Sn(Sn(Sn({},k.props),se),{},{activeIndex:Pe});return[b.cloneElement(De,ge),null,null]}return z?[oe,null,null]:[oe,null]}),io(C,"renderCustomized",function(N,E,D){return b.cloneElement(N,Sn(Sn({key:"recharts-customized-".concat(D)},C.props),C.state))}),io(C,"renderMap",{CartesianGrid:{handler:oJ,once:!0},ReferenceArea:{handler:C.renderReferenceElement},ReferenceLine:{handler:oJ},ReferenceDot:{handler:C.renderReferenceElement},XAxis:{handler:oJ},YAxis:{handler:oJ},Brush:{handler:C.renderBrush,once:!0},Bar:{handler:C.renderGraphicChild},Line:{handler:C.renderGraphicChild},Area:{handler:C.renderGraphicChild},Radar:{handler:C.renderGraphicChild},RadialBar:{handler:C.renderGraphicChild},Scatter:{handler:C.renderGraphicChild},Pie:{handler:C.renderGraphicChild},Funnel:{handler:C.renderGraphicChild},Tooltip:{handler:C.renderCursor,once:!0},PolarGrid:{handler:C.renderPolarGrid,once:!0},PolarAngleAxis:{handler:C.renderPolarAxis},PolarRadiusAxis:{handler:C.renderPolarAxis},Customized:{handler:C.renderCustomized}}),C.clipPathId="".concat((_=y.id)!==null&&_!==void 0?_:lR("recharts"),"-clip"),C.throttleTriggeredAfterMouseMove=E$t(C.triggeredAfterMouseMove,(w=y.throttleDelay)!==null&&w!==void 0?w:1e3/60),C.state={},C}return eQi(g,p),XZi(g,[{key:"componentDidMount",value:function(){var _,w;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var _=this.props,w=_.children,C=_.data,N=_.height,E=_.layout,D=Mg(w,up);if(D){var k=D.props.defaultIndex;if(!(typeof k!="number"||k<0||k>this.state.tooltipTicks.length-1)){var M=this.state.tooltipTicks[k]&&this.state.tooltipTicks[k].value,T=mRe(this.state,C,k,M),A=this.state.tooltipTicks[k].coordinate,R=(this.state.offset.top+N)/2,P=E==="horizontal",O=P?{x:A,y:R}:{y:A,x:R},V=this.state.formattedGraphicalItems.find(function($){var B=$.item;return B.type.name==="Scatter"});V&&(O=Sn(Sn({},O),V.props.points[k].tooltipPosition),T=V.props.points[k].tooltipPayload);var F={activeTooltipIndex:k,isTooltipActive:!0,activeLabel:M,activePayload:T,activeCoordinate:O};this.setState(F),this.renderCursor(D),this.accessibilityManager.setIndex(k)}}}},{key:"getSnapshotBeforeUpdate",value:function(_,w){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==w.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==_.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==_.margin){var C,N;this.accessibilityManager.setDetails({offset:{left:(C=this.props.margin.left)!==null&&C!==void 0?C:0,top:(N=this.props.margin.top)!==null&&N!==void 0?N:0}})}return null}},{key:"componentDidUpdate",value:function(_){H2e([Mg(_.children,up)],[Mg(this.props.children,up)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var _=Mg(this.props.children,up);if(_&&typeof _.props.shared=="boolean"){var w=_.props.shared?"axis":"item";return a.indexOf(w)>=0?w:o}return o}},{key:"getMouseInfo",value:function(_){if(!this.container)return null;var w=this.container,C=w.getBoundingClientRect(),N=jVi(C),E={chartX:Math.round(_.pageX-N.left),chartY:Math.round(_.pageY-N.top)},D=C.width/w.offsetWidth||1,k=this.inRange(E.chartX,E.chartY,D);if(!k)return null;var M=this.state,T=M.xAxisMap,A=M.yAxisMap,R=this.getTooltipEventType();if(R!=="axis"&&T&&A){var P=kE(T).scale,O=kE(A).scale,V=P&&P.invert?P.invert(E.chartX):null,F=O&&O.invert?O.invert(E.chartY):null;return Sn(Sn({},E),{},{xValue:V,yValue:F})}var $=Xft(this.state,this.props.data,this.props.layout,k);return $?Sn(Sn({},E),$):null}},{key:"inRange",value:function(_,w){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,N=this.props.layout,E=_/C,D=w/C;if(N==="horizontal"||N==="vertical"){var k=this.state.offset,M=E>=k.left&&E<=k.left+k.width&&D>=k.top&&D<=k.top+k.height;return M?{x:E,y:D}:null}var T=this.state,A=T.angleAxisMap,R=T.radiusAxisMap;if(A&&R){var P=kE(A);return Dht({x:E,y:D},P)}return null}},{key:"parseEventsOfWrapper",value:function(){var _=this.props.children,w=this.getTooltipEventType(),C=Mg(_,up),N={};C&&w==="axis"&&(C.props.trigger==="click"?N={onClick:this.handleClick}:N={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var E=Moe(this.props,this.handleOuterEvent);return Sn(Sn({},E),N)}},{key:"addListener",value:function(){bCe.on(vCe,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){bCe.removeListener(vCe,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(_,w,C){for(var N=this.state.formattedGraphicalItems,E=0,D=N.length;E<D;E++){var k=N[E];if(k.item===_||k.props.key===_.key||w===OC(k.item.type)&&C===k.childIndex)return k}return null}},{key:"renderClipPath",value:function(){var _=this.clipPathId,w=this.state.offset,C=w.left,N=w.top,E=w.height,D=w.width;return Z.createElement("defs",null,Z.createElement("clipPath",{id:_},Z.createElement("rect",{x:C,y:N,height:E,width:D})))}},{key:"getXScales",value:function(){var _=this.state.xAxisMap;return _?Object.entries(_).reduce(function(w,C){var N=qft(C,2),E=N[0],D=N[1];return Sn(Sn({},w),{},io({},E,D.scale))},{}):null}},{key:"getYScales",value:function(){var _=this.state.yAxisMap;return _?Object.entries(_).reduce(function(w,C){var N=qft(C,2),E=N[0],D=N[1];return Sn(Sn({},w),{},io({},E,D.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(_){var w;return(w=this.state.xAxisMap)===null||w===void 0||(w=w[_])===null||w===void 0?void 0:w.scale}},{key:"getYScaleByAxisId",value:function(_){var w;return(w=this.state.yAxisMap)===null||w===void 0||(w=w[_])===null||w===void 0?void 0:w.scale}},{key:"getItemByXY",value:function(_){var w=this.state,C=w.formattedGraphicalItems,N=w.activeItem;if(C&&C.length)for(var E=0,D=C.length;E<D;E++){var k=C[E],M=k.props,T=k.item,A=T.type.defaultProps!==void 0?Sn(Sn({},T.type.defaultProps),T.props):T.props,R=OC(T.type);if(R==="Bar"){var P=(M.data||[]).find(function($){return iKi(_,$)});if(P)return{graphicalItem:k,payload:P}}else if(R==="RadialBar"){var O=(M.data||[]).find(function($){return Dht(_,$)});if(O)return{graphicalItem:k,payload:O}}else if(npe(k,N)||ipe(k,N)||YW(k,N)){var V=oqi({graphicalItem:k,activeTooltipItem:N,itemData:A.data}),F=A.activeIndex===void 0?V:A.activeIndex;return{graphicalItem:Sn(Sn({},k),{},{childIndex:F}),payload:YW(k,N)?A.data[V]:k.props.data[V]}}}return null}},{key:"render",value:function(){var _=this;if(!but(this))return null;var w=this.props,C=w.children,N=w.className,E=w.width,D=w.height,k=w.style,M=w.compact,T=w.title,A=w.desc,R=Gft(w,HZi),P=Co(R,!1);if(M)return Z.createElement(Nft,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},Z.createElement(U2e,SB({},P,{width:E,height:D,title:T,desc:A}),this.renderClipPath(),yut(C,this.renderMap)));if(this.props.accessibilityLayer){var O,V;P.tabIndex=(O=this.props.tabIndex)!==null&&O!==void 0?O:0,P.role=(V=this.props.role)!==null&&V!==void 0?V:"application",P.onKeyDown=function($){_.accessibilityManager.keyboardEvent($)},P.onFocus=function(){_.accessibilityManager.focus()}}var F=this.parseEventsOfWrapper();return Z.createElement(Nft,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},Z.createElement("div",SB({className:Vt("recharts-wrapper",N),style:Sn({position:"relative",cursor:"default",width:E,height:D},k)},F,{ref:function(B){_.container=B}}),Z.createElement(U2e,SB({},P,{width:E,height:D,title:T,desc:A,style:sQi}),this.renderClipPath(),yut(C,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(b.Component);return io(m,"displayName",n),io(m,"defaultProps",Sn({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),io(m,"getDerivedStateFromProps",function(p,g){var y=p.dataKey,_=p.data,w=p.children,C=p.width,N=p.height,E=p.layout,D=p.stackOffset,k=p.margin,M=g.dataStartIndex,T=g.dataEndIndex;if(g.updateId===void 0){var A=Zft(p);return Sn(Sn(Sn({},A),{},{updateId:0},f(Sn(Sn({props:p},A),{},{updateId:0}),g)),{},{prevDataKey:y,prevData:_,prevWidth:C,prevHeight:N,prevLayout:E,prevStackOffset:D,prevMargin:k,prevChildren:w})}if(y!==g.prevDataKey||_!==g.prevData||C!==g.prevWidth||N!==g.prevHeight||E!==g.prevLayout||D!==g.prevStackOffset||!F3(k,g.prevMargin)){var R=Zft(p),P={chartX:g.chartX,chartY:g.chartY,isTooltipActive:g.isTooltipActive},O=Sn(Sn({},Xft(g,_,E)),{},{updateId:g.updateId+1}),V=Sn(Sn(Sn({},R),P),O);return Sn(Sn(Sn({},V),f(Sn({props:p},V),g)),{},{prevDataKey:y,prevData:_,prevWidth:C,prevHeight:N,prevLayout:E,prevStackOffset:D,prevMargin:k,prevChildren:w})}if(!H2e(w,g.prevChildren)){var F,$,B,z,H=Mg(w,F5),K=H&&(F=($=H.props)===null||$===void 0?void 0:$.startIndex)!==null&&F!==void 0?F:M,q=H&&(B=(z=H.props)===null||z===void 0?void 0:z.endIndex)!==null&&B!==void 0?B:T,U=K!==M||q!==T,Y=!So(_),J=Y&&!U?g.updateId:g.updateId+1;return Sn(Sn({updateId:J},f(Sn(Sn({props:p},g),{},{updateId:J,dataStartIndex:K,dataEndIndex:q}),g)),{},{prevChildren:w,dataStartIndex:K,dataEndIndex:q})}return null}),io(m,"renderActiveDot",function(p,g,y){var _;return b.isValidElement(p)?_=b.cloneElement(p,g):$o(p)?_=p(g):_=Z.createElement(tpe,g),Z.createElement(fa,{className:"recharts-active-dot",key:y},_)}),function(g){return Z.createElement(m,g)}},gQi=fpe({chartName:"LineChart",GraphicalChild:mM,axisComponents:[{axisType:"xAxis",AxisComp:m_},{axisType:"yAxis",AxisComp:Ov}],formatAxisMap:ope}),bQi=fpe({chartName:"BarChart",GraphicalChild:Xx,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:m_},{axisType:"yAxis",AxisComp:Ov}],formatAxisMap:ope}),vQi=fpe({chartName:"AreaChart",GraphicalChild:f_,axisComponents:[{axisType:"xAxis",AxisComp:m_},{axisType:"yAxis",AxisComp:Ov}],formatAxisMap:ope}),UVt=fpe({chartName:"ComposedChart",GraphicalChild:[mM,f_,Xx,dpe],axisComponents:[{axisType:"xAxis",AxisComp:m_},{axisType:"yAxis",AxisComp:Ov},{axisType:"zAxis",AxisComp:upe}],formatAxisMap:ope});function yQi({x:t,y:e,value:n}){return ne.jsx("g",{transform:`translate(${t},${e})`,children:ne.jsx("text",{x:0,y:0,dy:-8,dx:-10,textAnchor:"top",fill:"var(--chart-text-color, var(--mantine-color-dimmed))",fontSize:8,children:n})})}var KVt={root:"m_a50f3e58",container:"m_af9188cb",grid:"m_a50a48bc",axis:"m_a507a517",axisLabel:"m_2293801d",tooltip:"m_92b296cd"};const _Qi={withXAxis:!0,withYAxis:!0,withTooltip:!0,tooltipAnimationDuration:0,fillOpacity:1,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",withDots:!0,connectNulls:!0,strokeWidth:2,curveType:"monotone",gradientStops:[{offset:0,color:"red"},{offset:100,color:"blue"}]},xQi=(t,{textColor:e,gridColor:n})=>({root:{"--chart-text-color":e?Xa(e,t):void 0,"--chart-grid-color":n?Xa(n,t):void 0}}),tBe=Dn((t,e)=>{const n=Kt("LineChart",_Qi,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,data:c,withLegend:u,legendProps:d,series:h,onMouseLeave:f,dataKey:m,withTooltip:p,withXAxis:g,withYAxis:y,gridAxis:_,tickLine:w,xAxisProps:C,yAxisProps:N,unit:E,tooltipAnimationDuration:D,strokeDasharray:k,gridProps:M,tooltipProps:T,referenceLines:A,withDots:R,dotProps:P,activeDotProps:O,strokeWidth:V,lineChartProps:F,connectNulls:$,fillOpacity:B,curveType:z,orientation:H,dir:K,valueFormatter:q,children:U,lineProps:Y,xAxisLabel:J,yAxisLabel:ae,type:se,gradientStops:oe,withRightYAxis:fe,rightYAxisLabel:de,rightYAxisProps:ie,withPointLabels:Q,...be}=n,le=zc(),Ne=_!=="none"&&(w==="x"||w==="xy"),Le=_!=="none"&&(w==="y"||w==="xy"),[Te,De]=b.useState(null),Pe=Te!==null,ge=Ke=>{De(null),f==null||f(Ke)},{resolvedClassNames:he,resolvedStyles:me}=zv({classNames:i,styles:s,props:n}),X=hi({name:"LineChart",classes:KVt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:xQi}),we=`line-chart-gradient-${jm()}`,ue=oe==null?void 0:oe.map(Ke=>ne.jsx("stop",{offset:`${Ke.offset}%`,stopColor:Xa(Ke.color,le)},Ke.color)),Ce=h.map(Ke=>{const Xe=Xa(Ke.color,le),it=Pe&&Te!==Ke.name;return b.createElement(mM,{...X("line"),key:Ke.name,name:Ke.name,dataKey:Ke.name,dot:R?{fillOpacity:it?0:1,strokeOpacity:it?0:1,strokeWidth:1,fill:se==="gradient"?"var(--mantine-color-gray-7)":Xe,stroke:se==="gradient"?"white":Xe,...P}:!1,activeDot:R?{fill:se==="gradient"?"var(--mantine-color-gray-7)":Xe,stroke:se==="gradient"?"white":Xe,...O}:!1,fill:Xe,stroke:se==="gradient"?`url(#${we})`:Xe,strokeWidth:V,isAnimationActive:!1,fillOpacity:it?0:B,strokeOpacity:it?.5:B,connectNulls:$,type:z,strokeDasharray:Ke.strokeDasharray,yAxisId:Ke.yAxisId||"left",label:Q?ne.jsx(yQi,{}):void 0,...typeof Y=="function"?Y(Ke):Y})}),ze=A==null?void 0:A.map((Ke,Xe)=>{const it=Xa(Ke.color,le);return ne.jsx(o$,{stroke:Ke.color?it:"var(--chart-grid-color)",strokeWidth:1,yAxisId:Ke.yAxisId||"left",...Ke,label:{value:Ke.label,fill:Ke.color?it:"currentColor",fontSize:12,position:Ke.labelPosition??"insideBottomLeft"},...X("referenceLine")},Xe)}),Ye={axisLine:!1,...H==="vertical"?{dataKey:m,type:"category"}:{type:"number"},tickLine:Le?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:E,tickFormatter:H==="vertical"?void 0:q,...X("axis")};return ne.jsx(mn,{ref:e,...X("root"),onMouseLeave:ge,dir:K||"ltr",...be,children:ne.jsx(qq,{...X("container"),children:ne.jsxs(gQi,{data:c,layout:H,margin:{bottom:J?30:void 0,left:ae?10:void 0,right:ae?5:void 0},...F,children:[se==="gradient"&&ne.jsx("defs",{children:ne.jsx("linearGradient",{id:we,x1:"0",y1:"0",x2:"0",y2:"1",children:ue})}),u&&ne.jsx(FC,{verticalAlign:"top",content:Ke=>ne.jsx(h6t,{payload:Ke.payload,onHighlight:De,legendPosition:(d==null?void 0:d.verticalAlign)||"top",classNames:he,styles:me,series:h,showColor:se!=="gradient"}),...d}),ne.jsxs(m_,{hide:!g,...H==="vertical"?{type:"number"}:{dataKey:m},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:Ne?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:H==="vertical"?q:void 0,...X("axis"),...C,children:[J&&ne.jsx(od,{position:"insideBottom",offset:-20,fontSize:12,...X("axisLabel"),children:J}),C==null?void 0:C.children]}),ne.jsxs(Ov,{yAxisId:"left",orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!y,...Ye,...N,children:[ae&&ne.jsx(od,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...X("axisLabel"),children:ae}),N==null?void 0:N.children]}),ne.jsxs(Ov,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!fe,...Ye,...ie,children:[de&&ne.jsx(od,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...X("axisLabel"),children:de}),N==null?void 0:N.children]}),ne.jsx(a$,{strokeDasharray:k,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...X("grid"),...M}),p&&ne.jsx(up,{animationDuration:D,isAnimationActive:D!==0,position:H==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:k},content:({label:Ke,payload:Xe})=>ne.jsx(d6t,{label:Ke,payload:Xe,unit:E,classNames:he,styles:me,series:h,valueFormatter:q,showColor:se!=="gradient"}),...T}),Ce,ze,U]})})})});tBe.displayName="@mantine/charts/LineChart";tBe.classes=KVt;function wQi({logs:t,className:e}){const n=Mt(),i=b.useMemo(()=>{var o;const r=t.map(s=>({...s.stats,createdAt:`${n.formatDate(s.createdAt)} ${n.formatTime(s.createdAt)}`})).reverse();if(r.length<10&&((o=t[0])!=null&&o.stats))do{const s=Object.keys(t[0].stats).reduce((a,l)=>({...a,[l]:0}),{});r.push({createdAt:" ",...s})}while(r.length<10);return r},[t]);return v.jsxDEV(or,{className:Vt("w-full h-full",e),children:v.jsxDEV(Gt,{gap:"sm",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"crawler_detail.dashboard.logs_graph.title",defaultMessage:"Statistics per crawl"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LogsGraph.tsx",lineNumber:42,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LogsGraph.tsx",lineNumber:41,columnNumber:5},this),!i.length&&v.jsxDEV(iw,{className:"h-full",children:v.jsxDEV(Zd,{src:"/img/svg/setup_analytics.svg",description:n.formatMessage({id:"crawler_detail.dashboard.logs_graph.not_enough_data",defaultMessage:"Looks like we don't have enough data yet... Hang tight, we're on the lookout for more!",description:"Fallback message when we don't have enough data yet to generate a graph"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LogsGraph.tsx",lineNumber:48,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LogsGraph.tsx",lineNumber:47,columnNumber:31},this),i.length>0&&v.jsxDEV(tBe,{h:"256px",withLegend:!0,dotProps:{r:1},dataKey:"createdAt",curveType:"monotone",data:i,xAxisProps:{hide:!0},tooltipAnimationDuration:200,activeDotProps:{r:2,strokeWidth:1},legendProps:{verticalAlign:"bottom"},valueFormatter:r=>n.formatNumber(r),yAxisProps:{padding:{top:16},allowDecimals:!1},series:[{name:"totalNew",label:n.formatMessage({id:"crawler_detail.dashboard.logs_graph.new.label",defaultMessage:"New"}),color:"green"},{name:"totalUpdated",label:n.formatMessage({id:"crawler_detail.dashboard.logs_graph.updated.label",defaultMessage:"Updated"}),color:"orange"},{name:"totalDeleted",label:n.formatMessage({id:"crawler_detail.dashboard.logs_graph.deleted.label",defaultMessage:"Deleted"}),color:"red.6"},{name:"totalCrawled",label:n.formatMessage({id:"crawler_detail.dashboard.logs_graph.crawled.label",defaultMessage:"crawled"}),color:"primary"},{name:"totalUnchanged",label:n.formatMessage({id:"crawler_detail.dashboard.logs_graph.unchanged.label",defaultMessage:"Unchanged documents"}),color:"cyan"},{name:"totalIgnored",label:n.formatMessage({id:"crawler_detail.dashboard.logs_graph.ignored.label",defaultMessage:"Ignored"}),color:"grey"},{name:"totalFailed",label:n.formatMessage({id:"crawler_detail.dashboard.logs_graph.failed.label",defaultMessage:"Failed"}),color:"red"}]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LogsGraph.tsx",lineNumber:58,columnNumber:34},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LogsGraph.tsx",lineNumber:40,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/LogsGraph.tsx",lineNumber:39,columnNumber:3},this)}function CQi(){const t=Mt(),{crawlerId:e}=If(),{data:n,isInitialLoading:i}=Je.crawler.getById.useQuery({id:e},{enabled:!!e}),{data:r,isInitialLoading:o}=Je.crawler.getStats.useQuery({id:e},{enabled:!!e});return ga(t.formatMessage({id:"crawler_detail.dashboard.title",defaultMessage:"Crawler dashboard - Chathive"})),!n&&(i||o)?v.jsxDEV("main",{className:"w-full grid grid-cols-3 gap-4 sm:p-4",children:[v.jsxDEV(li,{height:128,className:"col-span-3 lg:col-span-2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:38,columnNumber:5},this),v.jsxDEV(li,{height:128,className:"col-span-3 lg:col-span-1"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:39,columnNumber:5},this),v.jsxDEV(li,{height:254,className:"col-span-3 lg:col-span-2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:40,columnNumber:5},this),v.jsxDEV(li,{height:254,className:"col-span-3 lg:col-span-1"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:41,columnNumber:5},this),v.jsxDEV(li,{height:128,className:"col-span-3"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:42,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:37,columnNumber:4},this):n&&!(r!=null&&r.total)&&["inProgress","initialize"].includes(n.status)?v.jsxDEV("main",{className:"w-full h-full max-w-4xl flex flex-col gap-4 sm:p-4",children:[v.jsxDEV(PC,{crawler:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:50,columnNumber:5},this),v.jsxDEV(or,{className:"w-full",p:48,children:v.jsxDEV(Zd,{title:t.formatMessage({id:"crawler_detail.dashboard.first_time_in_progress.title",defaultMessage:"Your crawler is running"}),description:t.formatMessage({id:"crawler_detail.dashboard.first_time_in_progress.description",defaultMessage:"Your crawler has taken off and is currently crawling your links. When it's done crawling you'll find some statistics here."}),src:"/img/svg/start_crawler.svg"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:52,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:51,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:49,columnNumber:4},this):(n==null?void 0:n.status)==="created"||!(r!=null&&r.total)?v.jsxDEV("main",{className:"w-full h-full max-w-4xl flex flex-col gap-4 sm:p-4",children:[v.jsxDEV(PC,{crawler:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:72,columnNumber:5},this),v.jsxDEV(c6t,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:73,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:71,columnNumber:4},this):n?v.jsxDEV("main",{className:"w-full grid grid-cols-3 sm:gap-4 sm:p-4",children:[v.jsxDEV(PC,{crawler:n,className:"col-span-3 lg:col-span-2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:82,columnNumber:4},this),v.jsxDEV(fIi,{crawler:n,className:"col-span-3 lg:col-span-1 lg:row-span-2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:83,columnNumber:4},this),r&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(hIi,{total:r.total,averageStats:r.averages,totalStats:r.statsSum,className:"col-span-3 lg:col-span-2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:86,columnNumber:6},this),v.jsxDEV(wQi,{logs:r.logs,className:"col-span-3 lg:col-span-3"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:92,columnNumber:6},this),v.jsxDEV(mIi,{LastLog:r.logs[0],className:"col-span-3"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:93,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:85,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:81,columnNumber:3},this):v.jsxDEV(Op,{to:"/crawler"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerDashboard/index.tsx",lineNumber:78,columnNumber:23},this)}const Jft=new Set;function nBe(t,e,n){t||Jft.has(e)||(console.warn(e),Jft.add(e))}function SQi(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...i)=>(nBe(!1,"motion() is deprecated. Use motion.create() instead."),t(...i));return new Proxy(n,{get:(i,r)=>r==="create"?t:(e.has(r)||e.set(r,t(r)),e.get(r))})}function tU(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const pRe=t=>Array.isArray(t);function qVt(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function nU(t){return typeof t=="string"||Array.isArray(t)}function emt(t){const e=[{},{}];return t==null||t.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function iBe(t,e,n,i){if(typeof e=="function"){const[r,o]=emt(i);e=e(n!==void 0?n:t.custom,r,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[r,o]=emt(i);e=e(n!==void 0?n:t.custom,r,o)}return e}function mpe(t,e,n){const i=t.getProps();return iBe(i,e,n!==void 0?n:i.custom,t)}const rBe=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],oBe=["initial",...rBe],Qq=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pM=new Set(Qq),Zx=t=>t*1e3,VC=t=>t/1e3,NQi={type:"spring",stiffness:500,damping:25,restSpeed:10},EQi=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),DQi={type:"keyframes",duration:.8},kQi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},MQi=(t,{keyframes:e})=>e.length>2?DQi:pM.has(t)?t.startsWith("scale")?EQi(e[1]):NQi:kQi;function sBe(t,e){return t?t[e]||t.default||t:void 0}const LQi={skipAnimations:!1,useManualTiming:!1},TQi=t=>t!==null;function ppe(t,{repeat:e,repeatType:n="loop"},i){const r=t.filter(TQi),o=e&&n!=="loop"&&e%2===1?0:r.length-1;return!o||i===void 0?r[o]:i}const Oh=t=>t;function IQi(t){let e=new Set,n=new Set,i=!1,r=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(c){o.has(c)&&(l.schedule(c),t()),c(s)}const l={schedule:(c,u=!1,d=!1)=>{const f=d&&i?e:n;return u&&o.add(c),f.has(c)||f.add(c),c},cancel:c=>{n.delete(c),o.delete(c)},process:c=>{if(s=c,i){r=!0;return}i=!0,[e,n]=[n,e],n.clear(),e.forEach(a),i=!1,r&&(r=!1,l.process(c))}};return l}const sJ=["read","resolveKeyframes","update","preRender","render","postRender"],AQi=40;function GVt(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=sJ.reduce((y,_)=>(y[_]=IQi(o),y),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:h}=s,f=()=>{const y=performance.now();n=!1,r.delta=i?1e3/60:Math.max(Math.min(y-r.timestamp,AQi),1),r.timestamp=y,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),u.process(r),d.process(r),h.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(f))},m=()=>{n=!0,i=!0,r.isProcessing||t(f)};return{schedule:sJ.reduce((y,_)=>{const w=s[_];return y[_]=(C,N=!1,E=!1)=>(n||m(),w.schedule(C,N,E)),y},{}),cancel:y=>{for(let _=0;_<sJ.length;_++)s[sJ[_]].cancel(y)},state:r,steps:s}}const{schedule:Ya,cancel:Ck,state:ph,steps:_Ce}=GVt(typeof requestAnimationFrame<"u"?requestAnimationFrame:Oh,!0),YVt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,RQi=1e-7,PQi=12;function OQi(t,e,n,i,r){let o,s,a=0;do s=e+(n-e)/2,o=YVt(s,i,r)-t,o>0?n=s:e=s;while(Math.abs(o)>RQi&&++a<PQi);return s}function Jq(t,e,n,i){if(t===e&&n===i)return Oh;const r=o=>OQi(o,0,1,t,n);return o=>o===0||o===1?o:YVt(r(o),e,i)}const XVt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ZVt=t=>e=>1-t(1-e),QVt=Jq(.33,1.53,.69,.99),aBe=ZVt(QVt),JVt=XVt(aBe),e7t=t=>(t*=2)<1?.5*aBe(t):.5*(2-Math.pow(2,-10*(t-1))),lBe=t=>1-Math.sin(Math.acos(t)),t7t=ZVt(lBe),n7t=XVt(lBe),i7t=t=>/^0[^.\s]+$/u.test(t);function jQi(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||i7t(t):!0}let l$=Oh,xS=Oh;l$=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},xS=(t,e)=>{if(!t)throw new Error(e)};const r7t=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),o7t=t=>e=>typeof e=="string"&&e.startsWith(t),s7t=o7t("--"),FQi=o7t("var(--"),cBe=t=>FQi(t)?$Qi.test(t.split("/*")[0].trim()):!1,$Qi=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,VQi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function BQi(t){const e=VQi.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${n??i}`,r]}const zQi=4;function a7t(t,e,n=1){xS(n<=zQi,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[i,r]=BQi(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const s=o.trim();return r7t(s)?parseFloat(s):s}return cBe(r)?a7t(r,e,n+1):r}const Sk=(t,e,n)=>n>e?e:n<t?t:n,c$={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},iU={...c$,transform:t=>Sk(0,1,t)},aJ={...c$,default:1},eG=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),ZN=eG("deg"),Qx=eG("%"),qr=eG("px"),HQi=eG("vh"),WQi=eG("vw"),tmt={...Qx,parse:t=>Qx.parse(t)/100,transform:t=>Qx.transform(t*100)},UQi=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),nmt=t=>t===c$||t===qr,imt=(t,e)=>parseFloat(t.split(", ")[e]),rmt=(t,e)=>(n,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/u);if(r)return imt(r[1],e);{const o=i.match(/^matrix\((.+)\)$/u);return o?imt(o[1],t):0}},KQi=new Set(["x","y","z"]),qQi=Qq.filter(t=>!KQi.has(t));function GQi(t){const e=[];return qQi.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const J5={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:rmt(4,13),y:rmt(5,14)};J5.translateX=J5.x;J5.translateY=J5.y;const l7t=t=>e=>e.test(t),YQi={test:t=>t==="auto",parse:t=>t},c7t=[c$,qr,Qx,ZN,WQi,HQi,YQi],omt=t=>c7t.find(l7t(t)),vI=new Set;let gRe=!1,bRe=!1;function u7t(){if(bRe){const t=Array.from(vI).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),n=new Map;e.forEach(i=>{const r=GQi(i);r.length&&(n.set(i,r),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const r=n.get(i);r&&r.forEach(([o,s])=>{var a;(a=i.getValue(o))===null||a===void 0||a.set(s)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}bRe=!1,gRe=!1,vI.forEach(t=>t.complete()),vI.clear()}function d7t(){vI.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(bRe=!0)})}function XQi(){d7t(),u7t()}class uBe{constructor(e,n,i,r,o,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=i,this.motionValue=r,this.element=o,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(vI.add(this),gRe||(gRe=!0,Ya.read(d7t),Ya.resolveKeyframes(u7t))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:i,motionValue:r}=this;for(let o=0;o<e.length;o++)if(e[o]===null)if(o===0){const s=r==null?void 0:r.get(),a=e[e.length-1];if(s!==void 0)e[0]=s;else if(i&&n){const l=i.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),r&&s===void 0&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),vI.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,vI.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const NB=t=>Math.round(t*1e5)/1e5,dBe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ZQi(t){return t==null}const QQi=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,hBe=(t,e)=>n=>!!(typeof n=="string"&&QQi.test(n)&&n.startsWith(t)||e&&!ZQi(n)&&Object.prototype.hasOwnProperty.call(n,e)),h7t=(t,e,n)=>i=>{if(typeof i!="string")return i;const[r,o,s,a]=i.match(dBe);return{[t]:parseFloat(r),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},JQi=t=>Sk(0,255,t),xCe={...c$,transform:t=>Math.round(JQi(t))},KT={test:hBe("rgb","red"),parse:h7t("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+xCe.transform(t)+", "+xCe.transform(e)+", "+xCe.transform(n)+", "+NB(iU.transform(i))+")"};function eJi(t){let e="",n="",i="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const vRe={test:hBe("#"),parse:eJi,transform:KT.transform},N4={test:hBe("hsl","hue"),parse:h7t("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Qx.transform(NB(e))+", "+Qx.transform(NB(n))+", "+NB(iU.transform(i))+")"},lf={test:t=>KT.test(t)||vRe.test(t)||N4.test(t),parse:t=>KT.test(t)?KT.parse(t):N4.test(t)?N4.parse(t):vRe.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?KT.transform(t):N4.transform(t)},tJi=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function nJi(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(dBe))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(tJi))===null||n===void 0?void 0:n.length)||0)>0}const f7t="number",m7t="color",iJi="var",rJi="var(",smt="${}",oJi=/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 rU(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const a=e.replace(oJi,l=>(lf.test(l)?(i.color.push(o),r.push(m7t),n.push(lf.parse(l))):l.startsWith(rJi)?(i.var.push(o),r.push(iJi),n.push(l)):(i.number.push(o),r.push(f7t),n.push(parseFloat(l))),++o,smt)).split(smt);return{values:n,split:a,indexes:i,types:r}}function p7t(t){return rU(t).values}function g7t(t){const{split:e,types:n}=rU(t),i=e.length;return r=>{let o="";for(let s=0;s<i;s++)if(o+=e[s],r[s]!==void 0){const a=n[s];a===f7t?o+=NB(r[s]):a===m7t?o+=lf.transform(r[s]):o+=r[s]}return o}}const sJi=t=>typeof t=="number"?0:t;function aJi(t){const e=p7t(t);return g7t(t)(e.map(sJi))}const Nk={test:nJi,parse:p7t,createTransformer:g7t,getAnimatableNone:aJi},lJi=new Set(["brightness","contrast","saturate","opacity"]);function cJi(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(dBe)||[];if(!i)return t;const r=n.replace(i,"");let o=lJi.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+r+")"}const uJi=/\b([a-z-]*)\(.*?\)/gu,yRe={...Nk,getAnimatableNone:t=>{const e=t.match(uJi);return e?e.map(cJi).join(" "):t}},dJi={borderWidth:qr,borderTopWidth:qr,borderRightWidth:qr,borderBottomWidth:qr,borderLeftWidth:qr,borderRadius:qr,radius:qr,borderTopLeftRadius:qr,borderTopRightRadius:qr,borderBottomRightRadius:qr,borderBottomLeftRadius:qr,width:qr,maxWidth:qr,height:qr,maxHeight:qr,top:qr,right:qr,bottom:qr,left:qr,padding:qr,paddingTop:qr,paddingRight:qr,paddingBottom:qr,paddingLeft:qr,margin:qr,marginTop:qr,marginRight:qr,marginBottom:qr,marginLeft:qr,backgroundPositionX:qr,backgroundPositionY:qr},hJi={rotate:ZN,rotateX:ZN,rotateY:ZN,rotateZ:ZN,scale:aJ,scaleX:aJ,scaleY:aJ,scaleZ:aJ,skew:ZN,skewX:ZN,skewY:ZN,distance:qr,translateX:qr,translateY:qr,translateZ:qr,x:qr,y:qr,z:qr,perspective:qr,transformPerspective:qr,opacity:iU,originX:tmt,originY:tmt,originZ:qr},amt={...c$,transform:Math.round},fBe={...dJi,...hJi,zIndex:amt,size:qr,fillOpacity:iU,strokeOpacity:iU,numOctaves:amt},fJi={...fBe,color:lf,backgroundColor:lf,outlineColor:lf,fill:lf,stroke:lf,borderColor:lf,borderTopColor:lf,borderRightColor:lf,borderBottomColor:lf,borderLeftColor:lf,filter:yRe,WebkitFilter:yRe},mBe=t=>fJi[t];function b7t(t,e){let n=mBe(t);return n!==yRe&&(n=Nk),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const mJi=new Set(["auto","none","0"]);function pJi(t,e,n){let i=0,r;for(;i<t.length&&!r;){const o=t[i];typeof o=="string"&&!mJi.has(o)&&rU(o).values.length&&(r=t[i]),i++}if(r&&n)for(const o of e)t[o]=b7t(n,r)}class v7t extends uBe{constructor(e,n,i,r,o){super(e,n,i,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),cBe(c))){const u=a7t(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!UQi.has(i)||e.length!==2)return;const[r,o]=e,s=omt(r),a=omt(o);if(s!==a)if(nmt(s)&&nmt(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,i=[];for(let r=0;r<e.length;r++)jQi(e[r])&&i.push(r);i.length&&pJi(e,i,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=J5[i](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&e.getValue(i,r).jump(r,!1)}measureEndState(){var e;const{element:n,name:i,unresolvedKeyframes:r}=this;if(!n||!n.current)return;const o=n.getValue(i);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,a=r[s];r[s]=J5[i](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function pBe(t){return typeof t=="function"}let Ste;function gJi(){Ste=void 0}const Jx={now:()=>(Ste===void 0&&Jx.set(ph.isProcessing||LQi.useManualTiming?ph.timestamp:performance.now()),Ste),set:t=>{Ste=t,queueMicrotask(gJi)}},lmt=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Nk.test(t)||t==="0")&&!t.startsWith("url("));function bJi(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function vJi(t,e,n,i){const r=t[0];if(r===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],s=lmt(r,e),a=lmt(o,e);return l$(s===a,`You are trying to animate ${e} from "${r}" to "${o}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${o} via the \`style\` property.`),!s||!a?!1:bJi(t)||(n==="spring"||pBe(n))&&i}const yJi=40;class y7t{constructor({autoplay:e=!0,delay:n=0,type:i="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Jx.now(),this.options={autoplay:e,delay:n,type:i,repeat:r,repeatDelay:o,repeatType:s,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>yJi?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&XQi(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=Jx.now(),this.hasAttemptedResolve=!0;const{name:i,type:r,velocity:o,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!vJi(e,i,r,o))if(s)this.options.duration=0;else{l==null||l(ppe(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function _7t(t,e){return e?t*(1e3/e):0}const _Ji=5;function x7t(t,e,n){const i=Math.max(e-_Ji,0);return _7t(n-t(i),e-i)}const wCe=.001,xJi=.01,cmt=10,wJi=.05,CJi=1;function SJi({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let r,o;l$(t<=Zx(cmt),"Spring duration must be 10 seconds or less");let s=1-e;s=Sk(wJi,CJi,s),t=Sk(xJi,cmt,VC(t)),s<1?(r=c=>{const u=c*s,d=u*t,h=u-n,f=_Re(c,s),m=Math.exp(-d);return wCe-h/f*m},o=c=>{const d=c*s*t,h=d*n+n,f=Math.pow(s,2)*Math.pow(c,2)*t,m=Math.exp(-d),p=_Re(Math.pow(c,2),s);return(-r(c)+wCe>0?-1:1)*((h-f)*m)/p}):(r=c=>{const u=Math.exp(-c*t),d=(c-n)*t+1;return-wCe+u*d},o=c=>{const u=Math.exp(-c*t),d=(n-c)*(t*t);return u*d});const a=5/t,l=EJi(r,o,a);if(t=Zx(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:s*2*Math.sqrt(i*c),duration:t}}}const NJi=12;function EJi(t,e,n){let i=n;for(let r=1;r<NJi;r++)i=i-t(i)/e(i);return i}function _Re(t,e){return t*Math.sqrt(1-e*e)}const DJi=["duration","bounce"],kJi=["stiffness","damping","mass"];function umt(t,e){return e.some(n=>t[n]!==void 0)}function MJi(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!umt(t,kJi)&&umt(t,DJi)){const n=SJi(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function w7t({keyframes:t,restDelta:e,restSpeed:n,...i}){const r=t[0],o=t[t.length-1],s={done:!1,value:r},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:h}=MJi({...i,velocity:-VC(i.velocity||0)}),f=d||0,m=l/(2*Math.sqrt(a*c)),p=o-r,g=VC(Math.sqrt(a/c)),y=Math.abs(p)<5;n||(n=y?.01:2),e||(e=y?.005:.5);let _;if(m<1){const w=_Re(g,m);_=C=>{const N=Math.exp(-m*g*C);return o-N*((f+m*g*p)/w*Math.sin(w*C)+p*Math.cos(w*C))}}else if(m===1)_=w=>o-Math.exp(-g*w)*(p+(f+g*p)*w);else{const w=g*Math.sqrt(m*m-1);_=C=>{const N=Math.exp(-m*g*C),E=Math.min(w*C,300);return o-N*((f+m*g*p)*Math.sinh(E)+w*p*Math.cosh(E))/w}}return{calculatedDuration:h&&u||null,next:w=>{const C=_(w);if(h)s.done=w>=u;else{let N=0;m<1&&(N=w===0?Zx(f):x7t(_,w,C));const E=Math.abs(N)<=n,D=Math.abs(o-C)<=e;s.done=E&&D}return s.value=s.done?o:C,s}}}function dmt({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=t[0],h={done:!1,value:d},f=k=>a!==void 0&&k<a||l!==void 0&&k>l,m=k=>a===void 0?l:l===void 0||Math.abs(a-k)<Math.abs(l-k)?a:l;let p=n*e;const g=d+p,y=s===void 0?g:s(g);y!==g&&(p=y-d);const _=k=>-p*Math.exp(-k/i),w=k=>y+_(k),C=k=>{const M=_(k),T=w(k);h.done=Math.abs(M)<=c,h.value=h.done?y:T};let N,E;const D=k=>{f(h.value)&&(N=k,E=w7t({keyframes:[h.value,m(h.value)],velocity:x7t(w,k,h.value),damping:r,stiffness:o,restDelta:c,restSpeed:u}))};return D(0),{calculatedDuration:null,next:k=>{let M=!1;return!E&&N===void 0&&(M=!0,C(k),D(k)),N!==void 0&&k>=N?E.next(k-N):(!M&&C(k),h)}}}const LJi=Jq(.42,0,1,1),TJi=Jq(0,0,.58,1),C7t=Jq(.42,0,.58,1),IJi=t=>Array.isArray(t)&&typeof t[0]!="number",gBe=t=>Array.isArray(t)&&typeof t[0]=="number",hmt={linear:Oh,easeIn:LJi,easeInOut:C7t,easeOut:TJi,circIn:lBe,circInOut:n7t,circOut:t7t,backIn:aBe,backInOut:JVt,backOut:QVt,anticipate:e7t},fmt=t=>{if(gBe(t)){xS(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,i,r]=t;return Jq(e,n,i,r)}else if(typeof t=="string")return xS(hmt[t]!==void 0,`Invalid easing type '${t}'`),hmt[t];return t},AJi=(t,e)=>n=>e(t(n)),BC=(...t)=>t.reduce(AJi),eF=(t,e,n)=>{const i=e-t;return i===0?1:(n-t)/i},lc=(t,e,n)=>t+(e-t)*n;function CCe(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function RJi({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let r=0,o=0,s=0;if(!e)r=o=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=CCe(l,a,t+1/3),o=CCe(l,a,t),s=CCe(l,a,t-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:i}}function Tse(t,e){return n=>n>0?e:t}const SCe=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},PJi=[vRe,KT,N4],OJi=t=>PJi.find(e=>e.test(t));function mmt(t){const e=OJi(t);if(l$(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let n=e.parse(t);return e===N4&&(n=RJi(n)),n}const pmt=(t,e)=>{const n=mmt(t),i=mmt(e);if(!n||!i)return Tse(t,e);const r={...n};return o=>(r.red=SCe(n.red,i.red,o),r.green=SCe(n.green,i.green,o),r.blue=SCe(n.blue,i.blue,o),r.alpha=lc(n.alpha,i.alpha,o),KT.transform(r))},xRe=new Set(["none","hidden"]);function jJi(t,e){return xRe.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function FJi(t,e){return n=>lc(t,e,n)}function bBe(t){return typeof t=="number"?FJi:typeof t=="string"?cBe(t)?Tse:lf.test(t)?pmt:BJi:Array.isArray(t)?S7t:typeof t=="object"?lf.test(t)?pmt:$Ji:Tse}function S7t(t,e){const n=[...t],i=n.length,r=t.map((o,s)=>bBe(o)(o,e[s]));return o=>{for(let s=0;s<i;s++)n[s]=r[s](o);return n}}function $Ji(t,e){const n={...t,...e},i={};for(const r in n)t[r]!==void 0&&e[r]!==void 0&&(i[r]=bBe(t[r])(t[r],e[r]));return r=>{for(const o in i)n[o]=i[o](r);return n}}function VJi(t,e){var n;const i=[],r={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const s=e.types[o],a=t.indexes[s][r[s]],l=(n=t.values[a])!==null&&n!==void 0?n:0;i[o]=l,r[s]++}return i}const BJi=(t,e)=>{const n=Nk.createTransformer(e),i=rU(t),r=rU(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?xRe.has(t)&&!r.values.length||xRe.has(e)&&!i.values.length?jJi(t,e):BC(S7t(VJi(i,r),r.values),n):(l$(!0,`Complex values '${t}' and '${e}' 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.`),Tse(t,e))};function N7t(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?lc(t,e,n):bBe(t)(t,e)}function zJi(t,e,n){const i=[],r=n||N7t,o=t.length-1;for(let s=0;s<o;s++){let a=r(t[s],t[s+1]);if(e){const l=Array.isArray(e)?e[s]||Oh:e;a=BC(l,a)}i.push(a)}return i}function HJi(t,e,{clamp:n=!0,ease:i,mixer:r}={}){const o=t.length;if(xS(o===e.length,"Both input and output ranges must be the same length"),o===1)return()=>e[0];if(o===2&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=zJi(e,i,r),a=s.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const d=eF(t[u],t[u+1],c);return s[u](d)};return n?c=>l(Sk(t[0],t[o-1],c)):l}function WJi(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=eF(0,e,i);t.push(lc(n,1,r))}}function UJi(t){const e=[0];return WJi(e,t.length-1),e}function KJi(t,e){return t.map(n=>n*e)}function qJi(t,e){return t.map(()=>e||C7t).splice(0,t.length-1)}function Ise({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=IJi(i)?i.map(fmt):fmt(i),o={done:!1,value:e[0]},s=KJi(n&&n.length===e.length?n:UJi(e),t),a=HJi(s,e,{ease:Array.isArray(r)?r:qJi(e,r)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const gmt=2e4;function GJi(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<gmt;)e+=n,i=t.next(e);return e>=gmt?1/0:e}const YJi=t=>{const e=({timestamp:n})=>t(n);return{start:()=>Ya.update(e,!0),stop:()=>Ck(e),now:()=>ph.isProcessing?ph.timestamp:Jx.now()}},XJi={decay:dmt,inertia:dmt,tween:Ise,keyframes:Ise,spring:w7t},ZJi=t=>t/100;class vBe extends y7t{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,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:i,element:r,keyframes:o}=this.options,s=(r==null?void 0:r.KeyframeResolver)||uBe,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new s(o,a,n,i,r),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o,velocity:s=0}=this.options,a=pBe(n)?n:XJi[n]||Ise;let l,c;a!==Ise&&typeof e[0]!="number"&&(xS(e.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),l=BC(ZJi,N7t(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});o==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=GJi(u));const{calculatedDuration:d}=u,h=d+r,f=h*(i+1)-r;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:h,totalDuration:f}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:i}=this;if(!i){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=i;if(this.startTime===null)return o.next(0);const{delay:h,repeat:f,repeatType:m,repeatDelay:p,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const y=this.currentTime-h*(this.speed>=0?1:-1),_=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let w=this.currentTime,C=o;if(f){const k=Math.min(this.currentTime,u)/d;let M=Math.floor(k),T=k%1;!T&&k>=1&&(T=1),T===1&&M--,M=Math.min(M,f+1),!!(M%2)&&(m==="reverse"?(T=1-T,p&&(T-=p/d)):m==="mirror"&&(C=s)),w=Sk(0,1,T)*d}const N=_?{done:!1,value:l[0]}:C.next(w);a&&(N.value=a(N.value));let{done:E}=N;!_&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return D&&r!==void 0&&(N.value=ppe(l,this.options,r)),g&&g(N.value),D&&this.finish(),N}get duration(){const{resolved:e}=this;return e?VC(e.calculatedDuration):0}get time(){return VC(this.currentTime)}set time(e){e=Zx(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=VC(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=YJi,onPlay:n,startTime:i}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=i??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&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 E7t=new Set(["opacity","clipPath","filter","transform"]),QJi=10,JJi=(t,e)=>{let n="";const i=Math.max(Math.round(e/QJi),2);for(let r=0;r<i;r++)n+=t(eF(0,i-1,r))+", ";return`linear(${n.substring(0,n.length-2)})`};function yBe(t){let e;return()=>(e===void 0&&(e=t()),e)}const eer={linearEasing:void 0};function ter(t,e){const n=yBe(t);return()=>{var i;return(i=eer[e])!==null&&i!==void 0?i:n()}}const Ase=ter(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function D7t(t){return!!(typeof t=="function"&&Ase()||!t||typeof t=="string"&&(t in wRe||Ase())||gBe(t)||Array.isArray(t)&&t.every(D7t))}const o9=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,wRe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:o9([0,.65,.55,1]),circOut:o9([.55,0,1,.45]),backIn:o9([.31,.01,.66,-.59]),backOut:o9([.33,1.53,.69,.99])};function k7t(t,e){if(t)return typeof t=="function"&&Ase()?JJi(t,e):gBe(t)?o9(t):Array.isArray(t)?t.map(n=>k7t(n,e)||wRe.easeOut):wRe[t]}function ner(t,e,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=k7t(a,r);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:i,duration:r,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function bmt(t,e){t.timeline=e,t.onfinish=null}const ier=yBe(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Rse=10,rer=2e4;function oer(t){return pBe(t.type)||t.type==="spring"||!D7t(t.ease)}function ser(t,e){const n=new vBe({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const r=[];let o=0;for(;!i.done&&o<rer;)i=n.sample(o),r.push(i.value),o+=Rse;return{times:void 0,keyframes:r,duration:o-Rse,ease:"linear"}}const M7t={anticipate:e7t,backInOut:JVt,circInOut:n7t};function aer(t){return t in M7t}class vmt extends y7t{constructor(e){super(e);const{name:n,motionValue:i,element:r,keyframes:o}=this.options;this.resolver=new v7t(o,(s,a)=>this.onKeyframesResolved(s,a),n,i,r),this.resolver.scheduleResolve()}initPlayback(e,n){var i;let{duration:r=300,times:o,ease:s,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!(!((i=l.owner)===null||i===void 0)&&i.current))return!1;if(typeof s=="string"&&Ase()&&aer(s)&&(s=M7t[s]),oer(this.options)){const{onComplete:h,onUpdate:f,motionValue:m,element:p,...g}=this.options,y=ser(e,g);e=y.keyframes,e.length===1&&(e[1]=e[0]),r=y.duration,o=y.times,s=y.ease,a="keyframes"}const d=ner(l.owner.current,c,e,{...this.options,duration:r,times:o,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(bmt(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:h}=this.options;l.set(ppe(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:o,type:a,ease:s,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return VC(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return VC(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:i}=n;i.currentTime=Zx(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:i}=n;i.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return Oh;const{animation:i}=n;bmt(i,e)}return Oh}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:i,duration:r,type:o,ease:s,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:h,...f}=this.options,m=new vBe({...f,keyframes:i,duration:r,type:o,ease:s,times:a,isGenerator:!0}),p=Zx(this.time);c.setWithVelocity(m.sample(p-Rse).value,m.sample(p).value,Rse)}const{onStop:l}=this.options;l&&l(),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:n,name:i,repeatDelay:r,repeatType:o,damping:s,type:a}=e;return ier()&&i&&E7t.has(i)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!r&&o!=="mirror"&&s!==0&&a!=="inertia"}}const ler=yBe(()=>window.ScrollTimeline!==void 0);class cer{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let i=0;i<this.animations.length;i++)this.animations[i][e]=n}attachTimeline(e,n){const i=this.animations.map(r=>ler()&&r.attachTimeline?r.attachTimeline(e):n(r));return()=>{i.forEach((r,o)=>{r&&r(),this.animations[o].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 n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function uer({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const _Be=(t,e,n,i={},r,o)=>s=>{const a=sBe(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c=c-Zx(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:r};uer(a)||(u={...u,...MQi(t,u)}),u.duration&&(u.duration=Zx(u.duration)),u.repeatDelay&&(u.repeatDelay=Zx(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),d&&!o&&e.get()!==void 0){const h=ppe(u.keyframes,a);if(h!==void 0)return Ya.update(()=>{u.onUpdate(h),u.onComplete()}),new cer([])}return!o&&vmt.supports(u)?new vmt(u):new vBe(u)},der=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),her=t=>pRe(t)?t[t.length-1]||0:t;function xBe(t,e){t.indexOf(e)===-1&&t.push(e)}function wBe(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class CBe{constructor(){this.subscriptions=[]}add(e){return xBe(this.subscriptions,e),()=>wBe(this.subscriptions,e)}notify(e,n,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,n,i);else for(let o=0;o<r;o++){const s=this.subscriptions[o];s&&s(e,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ymt=30,fer=t=>!isNaN(parseFloat(t));class mer{constructor(e,n={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(i,r=!0)=>{const o=Jx.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Jx.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=fer(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return nBe(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new CBe);const i=this.events[e].add(n);return e==="change"?()=>{i(),Ya.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Jx.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ymt)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ymt);return _7t(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),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 oU(t,e){return new mer(t,e)}function per(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,oU(n))}function ger(t,e){const n=mpe(t,e);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const s in o){const a=her(o[s]);per(t,s,a)}}const gpe=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ber="framerAppearId",L7t="data-"+gpe(ber);function T7t(t){return t.props[L7t]}const xf=t=>!!(t&&t.getVelocity);function ver(t){return!!(xf(t)&&t.add)}function CRe(t,e){if(!t.applyWillChange)return;const n=t.getValue("willChange");if(ver(n))return n.add(e)}function yer({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function I7t(t,e,{delay:n=0,transitionOverride:i,type:r}={}){var o;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=e;i&&(s=i);const c=[],u=r&&t.animationState&&t.animationState.getState()[r];for(const d in l){const h=t.getValue(d,(o=t.latestValues[d])!==null&&o!==void 0?o:null),f=l[d];if(f===void 0||u&&yer(u,d))continue;const m={delay:n,...sBe(s||{},d)};let p=!1;if(window.MotionHandoffAnimation){const y=T7t(t);if(y){const _=window.MotionHandoffAnimation(y,d,Ya);_!==null&&(m.startTime=_,p=!0)}}CRe(t,d),h.start(_Be(d,h,f,t.shouldReduceMotion&&pM.has(d)?{type:!1}:m,t,p));const g=h.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{Ya.update(()=>{a&&ger(t,a)})}),c}function SRe(t,e,n={}){var i;const r=mpe(t,e,n.type==="exit"?(i=t.presenceContext)===null||i===void 0?void 0:i.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(I7t(t,r,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=o;return _er(t,e,u+c,d,h,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function _er(t,e,n=0,i=0,r=1,o){const s=[],a=(t.variantChildren.size-1)*i,l=r===1?(c=0)=>c*i:(c=0)=>a-c*i;return Array.from(t.variantChildren).sort(xer).forEach((c,u)=>{c.notify("AnimationStart",e),s.push(SRe(c,e,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(s)}function xer(t,e){return t.sortNodePosition(e)}function wer(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(o=>SRe(t,o,n));i=Promise.all(r)}else if(typeof e=="string")i=SRe(t,e,n);else{const r=typeof e=="function"?mpe(t,e,n.custom):e;i=Promise.all(I7t(t,r,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const Cer=oBe.length;function A7t(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?A7t(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Cer;n++){const i=oBe[n],r=t.props[i];(nU(r)||r===!1)&&(e[i]=r)}return e}const Ser=[...rBe].reverse(),Ner=rBe.length;function Eer(t){return e=>Promise.all(e.map(({animation:n,options:i})=>wer(t,n,i)))}function Der(t){let e=Eer(t),n=_mt(),i=!0;const r=l=>(c,u)=>{var d;const h=mpe(t,u,l==="exit"?(d=t.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(h){const{transition:f,transitionEnd:m,...p}=h;c={...c,...p,...m}}return c};function o(l){e=l(t)}function s(l){const{props:c}=t,u=A7t(t.parent)||{},d=[],h=new Set;let f={},m=1/0;for(let g=0;g<Ner;g++){const y=Ser[g],_=n[y],w=c[y]!==void 0?c[y]:u[y],C=nU(w),N=y===l?_.isActive:null;N===!1&&(m=g);let E=w===u[y]&&w!==c[y]&&C;if(E&&i&&t.manuallyAnimateOnMount&&(E=!1),_.protectedKeys={...f},!_.isActive&&N===null||!w&&!_.prevProp||tU(w)||typeof w=="boolean")continue;const D=ker(_.prevProp,w);let k=D||y===l&&_.isActive&&!E&&C||g>m&&C,M=!1;const T=Array.isArray(w)?w:[w];let A=T.reduce(r(y),{});N===!1&&(A={});const{prevResolvedValues:R={}}=_,P={...R,...A},O=$=>{k=!0,h.has($)&&(M=!0,h.delete($)),_.needsAnimating[$]=!0;const B=t.getValue($);B&&(B.liveStyle=!1)};for(const $ in P){const B=A[$],z=R[$];if(f.hasOwnProperty($))continue;let H=!1;pRe(B)&&pRe(z)?H=!qVt(B,z):H=B!==z,H?B!=null?O($):h.add($):B!==void 0&&h.has($)?O($):_.protectedKeys[$]=!0}_.prevProp=w,_.prevResolvedValues=A,_.isActive&&(f={...f,...A}),i&&t.blockInitialAnimation&&(k=!1),k&&(!(E&&D)||M)&&d.push(...T.map($=>({animation:$,options:{type:y}})))}if(h.size){const g={};h.forEach(y=>{const _=t.getBaseTarget(y),w=t.getValue(y);w&&(w.liveStyle=!0),g[y]=_??null}),d.push({animation:g})}let p=!!d.length;return i&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(p=!1),i=!1,p?e(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(h=>{var f;return(f=h.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=s(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=_mt(),i=!0}}}function ker(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!qVt(e,t):!1}function _L(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _mt(){return{animate:_L(!0),whileInView:_L(),whileHover:_L(),whileTap:_L(),whileDrag:_L(),whileFocus:_L(),exit:_L()}}class gM{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Mer extends gM{constructor(e){super(e),e.animationState||(e.animationState=Der(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();tU(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let Ler=0;class Ter extends gM{constructor(){super(...arguments),this.id=Ler++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const r=this.node.animationState.setActive("exit",!e);n&&!e&&r.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Ier={animation:{Feature:Mer},exit:{Feature:Ter}},R7t=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function bpe(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const Aer=t=>e=>R7t(e)&&t(e,bpe(e));function pC(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function zC(t,e,n,i){return pC(t,e,Aer(n),i)}const xmt=(t,e)=>Math.abs(t-e);function Rer(t,e){const n=xmt(t.x,e.x),i=xmt(t.y,e.y);return Math.sqrt(n**2+i**2)}class P7t{constructor(e,n,{transformPagePoint:i,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 d=ECe(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,f=Rer(d.offset,{x:0,y:0})>=3;if(!h&&!f)return;const{point:m}=d,{timestamp:p}=ph;this.history.push({...m,timestamp:p});const{onStart:g,onMove:y}=this.handlers;h||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=NCe(h,this.transformPagePoint),Ya.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:f,onSessionEnd:m,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=ECe(d.type==="pointercancel"?this.lastMoveEventInfo:NCe(h,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,g),m&&m(d,g)},!R7t(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=i,this.contextWindow=r||window;const s=bpe(e),a=NCe(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=ph;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,ECe(a,this.history)),this.removeListeners=BC(zC(this.contextWindow,"pointermove",this.handlePointerMove),zC(this.contextWindow,"pointerup",this.handlePointerUp),zC(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ck(this.updatePoint)}}function NCe(t,e){return e?{point:e(t.point)}:t}function wmt(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ECe({point:t},e){return{point:t,delta:wmt(t,O7t(e)),offset:wmt(t,Per(e)),velocity:Oer(e,.1)}}function Per(t){return t[0]}function O7t(t){return t[t.length-1]}function Oer(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=O7t(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>Zx(e)));)n--;if(!i)return{x:0,y:0};const o=VC(r.timestamp-i.timestamp);if(o===0)return{x:0,y:0};const s={x:(r.x-i.x)/o,y:(r.y-i.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function j7t(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Cmt=j7t("dragHorizontal"),Smt=j7t("dragVertical");function F7t(t){let e=!1;if(t==="y")e=Smt();else if(t==="x")e=Cmt();else{const n=Cmt(),i=Smt();n&&i?e=()=>{n(),i()}:(n&&n(),i&&i())}return e}function $7t(){const t=F7t(!0);return t?(t(),!1):!0}function E4(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const V7t=1e-4,jer=1-V7t,Fer=1+V7t,B7t=.01,$er=0-B7t,Ver=0+B7t;function ub(t){return t.max-t.min}function Ber(t,e,n){return Math.abs(t-e)<=n}function Nmt(t,e,n,i=.5){t.origin=i,t.originPoint=lc(e.min,e.max,t.origin),t.scale=ub(n)/ub(e),t.translate=lc(n.min,n.max,t.origin)-t.originPoint,(t.scale>=jer&&t.scale<=Fer||isNaN(t.scale))&&(t.scale=1),(t.translate>=$er&&t.translate<=Ver||isNaN(t.translate))&&(t.translate=0)}function EB(t,e,n,i){Nmt(t.x,e.x,n.x,i?i.originX:void 0),Nmt(t.y,e.y,n.y,i?i.originY:void 0)}function Emt(t,e,n){t.min=n.min+e.min,t.max=t.min+ub(e)}function zer(t,e,n){Emt(t.x,e.x,n.x),Emt(t.y,e.y,n.y)}function Dmt(t,e,n){t.min=e.min-n.min,t.max=t.min+ub(e)}function DB(t,e,n){Dmt(t.x,e.x,n.x),Dmt(t.y,e.y,n.y)}function Her(t,{min:e,max:n},i){return e!==void 0&&t<e?t=i?lc(e,t,i.min):Math.max(t,e):n!==void 0&&t>n&&(t=i?lc(n,t,i.max):Math.min(t,n)),t}function kmt(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Wer(t,{top:e,left:n,bottom:i,right:r}){return{x:kmt(t.x,n,r),y:kmt(t.y,e,i)}}function Mmt(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}function Uer(t,e){return{x:Mmt(t.x,e.x),y:Mmt(t.y,e.y)}}function Ker(t,e){let n=.5;const i=ub(t),r=ub(e);return r>i?n=eF(e.min,e.max-i,t.min):i>r&&(n=eF(t.min,t.max-r,e.min)),Sk(0,1,n)}function qer(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const NRe=.35;function Ger(t=NRe){return t===!1?t=0:t===!0&&(t=NRe),{x:Lmt(t,"left","right"),y:Lmt(t,"top","bottom")}}function Lmt(t,e,n){return{min:Tmt(t,e),max:Tmt(t,n)}}function Tmt(t,e){return typeof t=="number"?t:t[e]||0}const Imt=()=>({translate:0,scale:1,origin:0,originPoint:0}),D4=()=>({x:Imt(),y:Imt()}),Amt=()=>({min:0,max:0}),Gc=()=>({x:Amt(),y:Amt()});function Ub(t){return[t("x"),t("y")]}function z7t({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Yer({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Xer(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function DCe(t){return t===void 0||t===1}function ERe({scale:t,scaleX:e,scaleY:n}){return!DCe(t)||!DCe(e)||!DCe(n)}function zL(t){return ERe(t)||H7t(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function H7t(t){return Rmt(t.x)||Rmt(t.y)}function Rmt(t){return t&&t!=="0%"}function Pse(t,e,n){const i=t-n,r=e*i;return n+r}function Pmt(t,e,n,i,r){return r!==void 0&&(t=Pse(t,r,i)),Pse(t,n,i)+e}function DRe(t,e=0,n=1,i,r){t.min=Pmt(t.min,e,n,i,r),t.max=Pmt(t.max,e,n,i,r)}function W7t(t,{x:e,y:n}){DRe(t.x,e.translate,e.scale,e.originPoint),DRe(t.y,n.translate,n.scale,n.originPoint)}const Omt=.999999999999,jmt=1.0000000000001;function Zer(t,e,n,i=!1){const r=n.length;if(!r)return;e.x=e.y=1;let o,s;for(let a=0;a<r;a++){o=n[a],s=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&M4(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,W7t(t,s)),i&&zL(o.latestValues)&&M4(t,o.latestValues))}e.x<jmt&&e.x>Omt&&(e.x=1),e.y<jmt&&e.y>Omt&&(e.y=1)}function k4(t,e){t.min=t.min+e,t.max=t.max+e}function Fmt(t,e,n,i,r=.5){const o=lc(t.min,t.max,r);DRe(t,e,n,o,i)}function M4(t,e){Fmt(t.x,e.x,e.scaleX,e.scale,e.originX),Fmt(t.y,e.y,e.scaleY,e.scale,e.originY)}function U7t(t,e){return z7t(Xer(t.getBoundingClientRect(),e))}function Qer(t,e,n){const i=U7t(t,n),{scroll:r}=e;return r&&(k4(i.x,r.offset.x),k4(i.y,r.offset.y)),i}const K7t=({current:t})=>t?t.ownerDocument.defaultView:null,Jer=new WeakMap;class etr{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=Gc(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(bpe(u,"page").point)},o=(u,d)=>{const{drag:h,dragPropagation:f,onDragStart:m}=this.getProps();if(h&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=F7t(h),!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),Ub(g=>{let y=this.getAxisMotionValue(g).get()||0;if(Qx.test(y)){const{projection:_}=this.visualElement;if(_&&_.layout){const w=_.layout.layoutBox[g];w&&(y=ub(w)*(parseFloat(y)/100))}}this.originPoint[g]=y}),m&&Ya.postRender(()=>m(u,d)),CRe(this.visualElement,"transform");const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},s=(u,d)=>{const{dragPropagation:h,dragDirectionLock:f,onDirectionLock:m,onDrag:p}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:g}=d;if(f&&this.currentDirection===null){this.currentDirection=ttr(g),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),p&&p(u,d)},a=(u,d)=>this.stop(u,d),l=()=>Ub(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new P7t(e,{onSessionStart:r,onStart:o,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:K7t(this.visualElement)})}stop(e,n){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&Ya.postRender(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,i){const{drag:r}=this.getProps();if(!i||!lJ(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(s=Her(s,this.constraints[e],this.elastic[e])),o.set(s)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:i}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&&E4(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=Wer(r.layoutBox,n):this.constraints=!1,this.elastic=Ger(i),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ub(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=qer(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!E4(e))return!1;const i=e.current;xS(i!==null,"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=Qer(i,r.root,this.visualElement.getTransformPagePoint());let s=Uer(r.layout.layoutBox,o);if(n){const a=n(Yer(s));this.hasMutatedConstraints=!!a,a&&(s=z7t(a))}return s}startAnimation(e){const{drag:n,dragMomentum:i,dragElastic:r,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Ub(u=>{if(!lJ(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});const h=r?200:1e6,f=r?40:1e7,m={type:"inertia",velocity:i?e[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const i=this.getAxisMotionValue(e);return CRe(this.visualElement,e),i.start(_Be(e,i,0,n,this.visualElement,!1))}stopAnimation(){Ub(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Ub(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps(),r=i[n];return r||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){Ub(n=>{const{drag:i}=this.getProps();if(!lJ(n,i,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(n);if(r&&r.layout){const{min:s,max:a}=r.layout.layoutBox[n];o.set(e[n]-lc(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!E4(n)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Ub(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();r[s]=Ker({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Ub(s=>{if(!lJ(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(lc(l,c,r[s]))})}addListeners(){if(!this.visualElement.current)return;Jer.set(this.visualElement,this);const e=this.visualElement.current,n=zC(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();E4(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Ya.read(i);const s=pC(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ub(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:s=NRe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:i,dragPropagation:r,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function lJ(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ttr(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class ntr extends gM{constructor(e){super(e),this.removeGroupControls=Oh,this.removeListeners=Oh,this.controls=new etr(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Oh}unmount(){this.removeGroupControls(),this.removeListeners()}}const $mt=t=>(e,n)=>{t&&Ya.postRender(()=>t(e,n))};class itr extends gM{constructor(){super(...arguments),this.removePointerDownListener=Oh}onPointerDown(e){this.session=new P7t(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:K7t(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:$mt(e),onStart:$mt(n),onMove:i,onEnd:(o,s)=>{delete this.session,r&&Ya.postRender(()=>r(o,s))}}}mount(){this.removePointerDownListener=zC(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const vpe=b.createContext(null);function rtr(){const t=b.useContext(vpe);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:i}=t,r=b.useId();b.useEffect(()=>i(r),[]);const o=b.useCallback(()=>n&&n(r),[r,n]);return!e&&n?[!1,o]:[!0]}const SBe=b.createContext({}),q7t=b.createContext({}),Nte={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Vmt(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const p7={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(qr.test(t))t=parseFloat(t);else return t;const n=Vmt(t,e.target.x),i=Vmt(t,e.target.y);return`${n}% ${i}%`}},otr={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=Nk.parse(t);if(r.length>5)return i;const o=Nk.createTransformer(t),s=typeof r[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;r[0+s]/=a,r[1+s]/=l;const c=lc(a,l,.5);return typeof r[2+s]=="number"&&(r[2+s]/=c),typeof r[3+s]=="number"&&(r[3+s]/=c),o(r)}},Ose={};function str(t){Object.assign(Ose,t)}const{schedule:NBe,cancel:A5r}=GVt(queueMicrotask,!1);class atr extends b.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i,layoutId:r}=this.props,{projection:o}=e;str(ltr),o&&(n.group&&n.group.add(o),i&&i.register&&r&&i.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Nte.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:i,drag:r,isPresent:o}=this.props,s=i.projection;return s&&(s.isPresent=o,r||e.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||Ya.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),NBe.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function G7t(t){const[e,n]=rtr(),i=b.useContext(SBe);return ne.jsx(atr,{...t,layoutGroup:i,switchLayoutGroup:b.useContext(q7t),isPresent:e,safeToRemove:n})}const ltr={borderRadius:{...p7,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:p7,borderTopRightRadius:p7,borderBottomLeftRadius:p7,borderBottomRightRadius:p7,boxShadow:otr},Y7t=["TopLeft","TopRight","BottomLeft","BottomRight"],ctr=Y7t.length,Bmt=t=>typeof t=="string"?parseFloat(t):t,zmt=t=>typeof t=="number"||qr.test(t);function utr(t,e,n,i,r,o){r?(t.opacity=lc(0,n.opacity!==void 0?n.opacity:1,dtr(i)),t.opacityExit=lc(e.opacity!==void 0?e.opacity:1,0,htr(i))):o&&(t.opacity=lc(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,i));for(let s=0;s<ctr;s++){const a=`border${Y7t[s]}Radius`;let l=Hmt(e,a),c=Hmt(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||zmt(l)===zmt(c)?(t[a]=Math.max(lc(Bmt(l),Bmt(c),i),0),(Qx.test(c)||Qx.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=lc(e.rotate||0,n.rotate||0,i))}function Hmt(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const dtr=X7t(0,.5,t7t),htr=X7t(.5,.95,Oh);function X7t(t,e,n){return i=>i<t?0:i>e?1:n(eF(t,e,i))}function Wmt(t,e){t.min=e.min,t.max=e.max}function $b(t,e){Wmt(t.x,e.x),Wmt(t.y,e.y)}function Umt(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Kmt(t,e,n,i,r){return t-=e,t=Pse(t,1/n,i),r!==void 0&&(t=Pse(t,1/r,i)),t}function ftr(t,e=0,n=1,i=.5,r,o=t,s=t){if(Qx.test(e)&&(e=parseFloat(e),e=lc(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=lc(o.min,o.max,i);t===o&&(a-=e),t.min=Kmt(t.min,e,n,a,r),t.max=Kmt(t.max,e,n,a,r)}function qmt(t,e,[n,i,r],o,s){ftr(t,e[n],e[i],e[r],e.scale,o,s)}const mtr=["x","scaleX","originX"],ptr=["y","scaleY","originY"];function Gmt(t,e,n,i){qmt(t.x,e,mtr,n?n.x:void 0,i?i.x:void 0),qmt(t.y,e,ptr,n?n.y:void 0,i?i.y:void 0)}function Ymt(t){return t.translate===0&&t.scale===1}function Z7t(t){return Ymt(t.x)&&Ymt(t.y)}function Xmt(t,e){return t.min===e.min&&t.max===e.max}function gtr(t,e){return Xmt(t.x,e.x)&&Xmt(t.y,e.y)}function Zmt(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Q7t(t,e){return Zmt(t.x,e.x)&&Zmt(t.y,e.y)}function Qmt(t){return ub(t.x)/ub(t.y)}function Jmt(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class btr{constructor(){this.members=[]}add(e){xBe(this.members,e),e.scheduleRender()}remove(e){if(wBe(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(r=>e===r);if(n===0)return!1;let i;for(let r=n;r>=0;r--){const o=this.members[r];if(o.isPresent!==!1){i=o;break}}return i?(this.promote(i),!0):!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,n&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:i}=e;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function vtr(t,e,n){let i="";const r=t.x.translate/e.x,o=t.y.translate/e.y,s=(n==null?void 0:n.z)||0;if((r||o||s)&&(i=`translate3d(${r}px, ${o}px, ${s}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:h,skewX:f,skewY:m}=n;c&&(i=`perspective(${c}px) ${i}`),u&&(i+=`rotate(${u}deg) `),d&&(i+=`rotateX(${d}deg) `),h&&(i+=`rotateY(${h}deg) `),f&&(i+=`skewX(${f}deg) `),m&&(i+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const ytr=(t,e)=>t.depth-e.depth;class _tr{constructor(){this.children=[],this.isDirty=!1}add(e){xBe(this.children,e),this.isDirty=!0}remove(e){wBe(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ytr),this.isDirty=!1,this.children.forEach(e)}}function Ete(t){const e=xf(t)?t.get():t;return der(e)?e.toValue():e}function xtr(t,e){const n=Jx.now(),i=({timestamp:r})=>{const o=r-n;o>=e&&(Ck(i),t(o-e))};return Ya.read(i,!0),()=>Ck(i)}function wtr(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Ctr(t,e,n){const i=xf(t)?t:oU(t);return i.start(_Be("",i,e,n)),i.animation}const HL={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},s9=typeof window<"u"&&window.MotionDebug!==void 0,kCe=["","X","Y","Z"],Str={visibility:"hidden"},ept=1e3;let Ntr=0;function MCe(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function J7t(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=T7t(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Ya,!(r||o))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&J7t(i)}function e9t({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(s={},a=e==null?void 0:e()){this.id=Ntr++,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,s9&&(HL.totalNodes=HL.resolvedTargetDeltas=HL.recalculatedProjection=0),this.nodes.forEach(ktr),this.nodes.forEach(Atr),this.nodes.forEach(Rtr),this.nodes.forEach(Mtr),s9&&window.MotionDebug.record(HL)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new _tr)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new CBe),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=wtr(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let d;const h=()=>this.root.updateBlockedByResize=!1;t(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=xtr(h,250),Nte.hasAnimatedSinceResize&&(Nte.hasAnimatedSinceResize=!1,this.nodes.forEach(npt))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||$tr,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=u.getProps(),_=!this.targetLayout||!Q7t(this.targetLayout,m)||f,w=!h&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||h&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const C={...sBe(p,"layout"),onPlay:g,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C)}else h||npt(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ck(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(Ptr),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&J7t(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(tpt);return}this.isUpdating||this.nodes.forEach(Ttr),this.isUpdating=!1,this.nodes.forEach(Itr),this.nodes.forEach(Etr),this.nodes.forEach(Dtr),this.clearAllSnapshots();const a=Jx.now();ph.delta=Sk(0,1e3/60,a-ph.timestamp),ph.timestamp=a,ph.isProcessing=!0,_Ce.update.process(ph),_Ce.preRender.process(ph),_Ce.render.process(ph),ph.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,NBe.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ltr),this.sharedNodes.forEach(Otr)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ya.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ya.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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Gc(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Z7t(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||zL(this.latestValues)||u)&&(r(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),Vtr(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var s;const{visualElement:a}=this.options;if(!a)return Gc();const l=a.measureViewportBox();if(!(((s=this.scroll)===null||s===void 0?void 0:s.wasRoot)||this.path.some(Btr))){const{scroll:u}=this.root;u&&(k4(l.x,u.offset.x),k4(l.y,u.offset.y))}return l}removeElementScroll(s){var a;const l=Gc();if($b(l,s),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:h}=u;u!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&$b(l,s),k4(l.x,d.offset.x),k4(l.y,d.offset.y))}return l}applyTransform(s,a=!1){const l=Gc();$b(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&M4(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),zL(u.latestValues)&&M4(l,u.latestValues)}return zL(this.latestValues)&&M4(l,this.latestValues),l}removeTransform(s){const a=Gc();$b(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!zL(c.latestValues))continue;ERe(c.latestValues)&&c.updateSnapshot();const u=Gc(),d=c.measurePageBox();$b(u,d),Gmt(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return zL(this.latestValues)&&Gmt(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}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!==ph.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!(!this.layout||!(d||h))){if(this.resolvedRelativeTargetAt=ph.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gc(),this.relativeTargetOrigin=Gc(),DB(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),$b(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Gc(),this.targetWithTransforms=Gc()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),zer(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$b(this.target,this.layout.layoutBox),W7t(this.target,this.targetDelta)):$b(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gc(),this.relativeTargetOrigin=Gc(),DB(this.relativeTargetOrigin,this.target,f.target),$b(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}s9&&HL.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||ERe(this.parent.latestValues)||H7t(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 s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ph.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;$b(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Zer(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Gc());const{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Umt(this.prevProjectionDelta.x,this.projectionDelta.x),Umt(this.prevProjectionDelta.y,this.projectionDelta.y)),EB(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Jmt(this.projectionDelta.x,this.prevProjectionDelta.x)||!Jmt(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),s9&&HL.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),s){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=D4(),this.projectionDelta=D4(),this.projectionDeltaWithTransform=D4()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=D4();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Gc(),f=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=f!==m,g=this.getStack(),y=!g||g.members.length<=1,_=!!(p&&!y&&this.options.crossfade===!0&&!this.path.some(Ftr));this.animationProgress=0;let w;this.mixTargetDelta=C=>{const N=C/1e3;ipt(d.x,s.x,N),ipt(d.y,s.y,N),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(DB(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),jtr(this.relativeTarget,this.relativeTargetOrigin,h,N),w&&gtr(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Gc()),$b(w,this.relativeTarget)),p&&(this.animationValues=u,utr(u,c,this.latestValues,N,_,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ck(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ya.update(()=>{Nte.hasAnimatedSinceResize=!0,this.currentAnimation=Ctr(0,ept,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ept),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&t9t(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Gc();const d=ub(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const h=ub(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+h}$b(a,l),M4(a,u),EB(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new btr),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&MCe("z",s,c,this.animationValues);for(let u=0;u<kCe.length;u++)MCe(`rotate${kCe[u]}`,s,c,this.animationValues),MCe(`skew${kCe[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Str;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Ete(s==null?void 0:s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=Ete(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!zL(this.latestValues)&&(p.transform=u?u({},""):"none",this.hasProjected=!1),p}const h=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=vtr(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:f,y:m}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=d===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const p in Ose){if(h[p]===void 0)continue;const{correct:g,applyTo:y}=Ose[p],_=c.transform==="none"?h[p]:g(h[p],d);if(y){const w=y.length;for(let C=0;C<w;C++)c[y[C]]=_}else c[p]=_}return this.options.layoutId&&(c.pointerEvents=d===this?Ete(s==null?void 0:s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(tpt),this.root.sharedNodes.clear()}}}function Etr(t){t.updateLayout()}function Dtr(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:r}=t.layout,{animationType:o}=t.options,s=n.source!==t.layout.source;o==="size"?Ub(d=>{const h=s?n.measuredBox[d]:n.layoutBox[d],f=ub(h);h.min=i[d].min,h.max=h.min+f}):t9t(o,n.layoutBox,i)&&Ub(d=>{const h=s?n.measuredBox[d]:n.layoutBox[d],f=ub(i[d]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+f)});const a=D4();EB(a,i,n.layoutBox);const l=D4();s?EB(l,t.applyTransform(r,!0),n.measuredBox):EB(l,i,n.layoutBox);const c=!Z7t(a);let u=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const m=Gc();DB(m,n.layoutBox,h.layoutBox);const p=Gc();DB(p,i,f.layoutBox),Q7t(m,p)||(u=!0),d.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:i}=t.options;i&&i()}t.options.transition=void 0}function ktr(t){s9&&HL.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Mtr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ltr(t){t.clearSnapshot()}function tpt(t){t.clearMeasurements()}function Ttr(t){t.isLayoutDirty=!1}function Itr(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function npt(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Atr(t){t.resolveTargetDelta()}function Rtr(t){t.calcProjection()}function Ptr(t){t.resetSkewAndRotation()}function Otr(t){t.removeLeadSnapshot()}function ipt(t,e,n){t.translate=lc(e.translate,0,n),t.scale=lc(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function rpt(t,e,n,i){t.min=lc(e.min,n.min,i),t.max=lc(e.max,n.max,i)}function jtr(t,e,n,i){rpt(t.x,e.x,n.x,i),rpt(t.y,e.y,n.y,i)}function Ftr(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const $tr={duration:.45,ease:[.4,0,.1,1]},opt=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),spt=opt("applewebkit/")&&!opt("chrome/")?Math.round:Oh;function apt(t){t.min=spt(t.min),t.max=spt(t.max)}function Vtr(t){apt(t.x),apt(t.y)}function t9t(t,e,n){return t==="position"||t==="preserve-aspect"&&!Ber(Qmt(e),Qmt(n),.2)}function Btr(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const ztr=e9t({attachResizeListener:(t,e)=>pC(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),LCe={current:void 0},n9t=e9t({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!LCe.current){const t=new ztr({});t.mount(window),t.setOptions({layoutScroll:!0}),LCe.current=t}return LCe.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Htr={pan:{Feature:itr},drag:{Feature:ntr,ProjectionNode:n9t,MeasureLayout:G7t}};function lpt(t,e){const n=e?"pointerenter":"pointerleave",i=e?"onHoverStart":"onHoverEnd",r=(o,s)=>{if(o.pointerType==="touch"||$7t())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[i];l&&Ya.postRender(()=>l(o,s))};return zC(t.current,n,r,{passive:!t.getProps()[i]})}class Wtr extends gM{mount(){this.unmount=BC(lpt(this.node,!0),lpt(this.node,!1))}unmount(){}}class Utr extends gM{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=BC(pC(this.node.current,"focus",()=>this.onFocus()),pC(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const i9t=(t,e)=>e?t===e?!0:i9t(t,e.parentElement):!1;function TCe(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,bpe(n))}class Ktr extends gM{constructor(){super(...arguments),this.removeStartListeners=Oh,this.removeEndListeners=Oh,this.removeAccessibleListeners=Oh,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const i=this.node.getProps(),o=zC(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:d}=this.node.getProps(),h=!d&&!i9t(this.node.current,a.target)?u:c;h&&Ya.update(()=>h(a,l))},{passive:!(i.onTap||i.onPointerUp)}),s=zC(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=BC(o,s),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||TCe("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Ya.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=pC(this.node.current,"keyup",s),TCe("down",(a,l)=>{this.startPress(a,l)})},n=pC(this.node.current,"keydown",e),i=()=>{this.isPressing&&TCe("cancel",(o,s)=>this.cancelPress(o,s))},r=pC(this.node.current,"blur",i);this.removeAccessibleListeners=BC(n,r)}}startPress(e,n){this.isPressing=!0;const{onTapStart:i,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&Ya.postRender(()=>i(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!$7t()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:i}=this.node.getProps();i&&Ya.postRender(()=>i(e,n))}mount(){const e=this.node.getProps(),n=zC(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),i=pC(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=BC(n,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const kRe=new WeakMap,ICe=new WeakMap,qtr=t=>{const e=kRe.get(t.target);e&&e(t)},Gtr=t=>{t.forEach(qtr)};function Ytr({root:t,...e}){const n=t||document;ICe.has(n)||ICe.set(n,{});const i=ICe.get(n),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(Gtr,{root:t,...e})),i[r]}function Xtr(t,e,n){const i=Ytr(e);return kRe.set(t,n),i.observe(t),()=>{kRe.delete(t),i.unobserve(t)}}const Ztr={some:0,all:1};class Qtr extends gM{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:i,amount:r="some",once:o}=e,s={root:n?n.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:Ztr[r]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=c?u:d;h&&h(l)};return Xtr(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Jtr(e,n))&&this.startObserver()}unmount(){}}function Jtr({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const enr={inView:{Feature:Qtr},tap:{Feature:Ktr},focus:{Feature:Utr},hover:{Feature:Wtr}},tnr={layout:{ProjectionNode:n9t,MeasureLayout:G7t}},EBe=b.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),ype=b.createContext({}),DBe=typeof window<"u",r9t=DBe?b.useLayoutEffect:b.useEffect,o9t=b.createContext({strict:!1});function nnr(t,e,n,i,r){var o,s;const{visualElement:a}=b.useContext(ype),l=b.useContext(o9t),c=b.useContext(vpe),u=b.useContext(EBe).reducedMotion,d=b.useRef();i=i||l.renderer,!d.current&&i&&(d.current=i(t,{visualState:e,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const h=d.current,f=b.useContext(q7t);h&&!h.projection&&r&&(h.type==="html"||h.type==="svg")&&inr(d.current,n,r,f),b.useInsertionEffect(()=>{h&&h.update(n,c)});const m=n[L7t],p=b.useRef(!!m&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,m))&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,m)));return r9t(()=>{h&&(window.MotionIsMounted=!0,h.updateFeatures(),NBe.render(h.render),p.current&&h.animationState&&h.animationState.animateChanges())}),b.useEffect(()=>{h&&(!p.current&&h.animationState&&h.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)===null||g===void 0||g.call(window,m)}),p.current=!1))}),h}function inr(t,e,n,i){const{layoutId:r,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:s9t(t.parent)),t.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!s||a&&E4(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:c})}function s9t(t){if(t)return t.options.allowProjection!==!1?t.projection:s9t(t.parent)}function rnr(t,e,n){return b.useCallback(i=>{i&&t.mount&&t.mount(i),e&&(i?e.mount(i):e.unmount()),n&&(typeof n=="function"?n(i):E4(n)&&(n.current=i))},[e])}function _pe(t){return tU(t.animate)||oBe.some(e=>nU(t[e]))}function a9t(t){return!!(_pe(t)||t.variants)}function onr(t,e){if(_pe(t)){const{initial:n,animate:i}=t;return{initial:n===!1||nU(n)?n:void 0,animate:nU(i)?i:void 0}}return t.inherit!==!1?e:{}}function snr(t){const{initial:e,animate:n}=onr(t,b.useContext(ype));return b.useMemo(()=>({initial:e,animate:n}),[cpt(e),cpt(n)])}function cpt(t){return Array.isArray(t)?t.join(" "):t}const upt={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"]},tF={};for(const t in upt)tF[t]={isEnabled:e=>upt[t].some(n=>!!e[n])};function anr(t){for(const e in t)tF[e]={...tF[e],...t[e]}}const lnr=Symbol.for("motionComponentSymbol");function cnr({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:i,Component:r}){t&&anr(t);function o(a,l){let c;const u={...b.useContext(EBe),...a,layoutId:unr(a)},{isStatic:d}=u,h=snr(a),f=i(a,d);if(!d&&DBe){dnr(u,t);const m=hnr(u);c=m.MeasureLayout,h.visualElement=nnr(r,f,u,e,m.ProjectionNode)}return ne.jsxs(ype.Provider,{value:h,children:[c&&h.visualElement?ne.jsx(c,{visualElement:h.visualElement,...u}):null,n(r,a,rnr(f,h.visualElement,l),f,d,h.visualElement)]})}const s=b.forwardRef(o);return s[lnr]=r,s}function unr({layoutId:t}){const e=b.useContext(SBe).id;return e&&t!==void 0?e+"-"+t:t}function dnr(t,e){const n=b.useContext(o9t).strict;if(e&&n){const i="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?l$(!1,i):xS(!1,i)}}function hnr(t){const{drag:e,layout:n}=tF;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}const fnr=["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 kBe(t){return typeof t!="string"||t.includes("-")?!1:!!(fnr.indexOf(t)>-1||/[A-Z]/u.test(t))}function l9t(t,{style:e,vars:n},i,r){Object.assign(t.style,e,r&&r.getProjectionStyles(i));for(const o in n)t.style.setProperty(o,n[o])}const c9t=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 u9t(t,e,n,i){l9t(t,e,void 0,i);for(const r in e.attrs)t.setAttribute(c9t.has(r)?r:gpe(r),e.attrs[r])}function d9t(t,{layout:e,layoutId:n}){return pM.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ose[t]||t==="opacity")}function MBe(t,e,n){var i;const{style:r}=t,o={};for(const s in r)(xf(r[s])||e.style&&xf(e.style[s])||d9t(s,t)||((i=n==null?void 0:n.getValue(s))===null||i===void 0?void 0:i.liveStyle)!==void 0)&&(o[s]=r[s]);return n&&r&&typeof r.willChange=="string"&&(n.applyWillChange=!1),o}function h9t(t,e,n){const i=MBe(t,e,n);for(const r in t)if(xf(t[r])||xf(e[r])){const o=Qq.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[o]=t[r]}return i}function LBe(t){const e=b.useRef(null);return e.current===null&&(e.current=t()),e.current}function mnr(t){if(pM.has(t))return"transform";if(E7t.has(t))return gpe(t)}function pnr({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:n,onMount:i},r,o,s,a){const l={latestValues:gnr(r,o,s,a?!1:t,e),renderState:n()};return i&&(l.mount=c=>i(r,c,l)),l}const f9t=t=>(e,n)=>{const i=b.useContext(ype),r=b.useContext(vpe),o=()=>pnr(t,e,i,r,n);return n?o():LBe(o)};function dpt(t,e,n){const i=Array.isArray(e)?e:[e];for(let r=0;r<i.length;r++){const o=iBe(t,i[r]);if(o){const{transitionEnd:s,transition:a,...l}=o;n(l,s)}}}function gnr(t,e,n,i,r){var o;const s={},a=new Set,l=i&&((o=t.style)===null||o===void 0?void 0:o.willChange)===void 0,c=r(t,{});for(const g in c)s[g]=Ete(c[g]);let{initial:u,animate:d}=t;const h=_pe(t),f=a9t(t);e&&f&&!h&&t.inherit!==!1&&(u===void 0&&(u=e.initial),d===void 0&&(d=e.animate));let m=n?n.initial===!1:!1;m=m||u===!1;const p=m?d:u;return p&&typeof p!="boolean"&&!tU(p)&&dpt(t,p,(g,y)=>{for(const _ in g){let w=g[_];if(Array.isArray(w)){const C=m?w.length-1:0;w=w[C]}w!==null&&(s[_]=w)}for(const _ in y)s[_]=y[_]}),l&&(d&&u!==!1&&!tU(d)&&dpt(t,d,g=>{for(const y in g){const _=mnr(y);_&&a.add(_)}}),a.size&&(s.willChange=Array.from(a).join(","))),s}const TBe=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),m9t=()=>({...TBe(),attrs:{}}),p9t=(t,e)=>e&&typeof t=="number"?e.transform(t):t,bnr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},vnr=Qq.length;function ynr(t,e,n){let i="",r=!0;for(let o=0;o<vnr;o++){const s=Qq[o],a=t[s];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(s.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=p9t(a,fBe[s]);if(!l){r=!1;const u=bnr[s]||s;i+=`${u}(${c}) `}n&&(e[s]=c)}}return i=i.trim(),n?i=n(e,r?"":i):r&&(i="none"),i}function IBe(t,e,n){const{style:i,vars:r,transformOrigin:o}=t;let s=!1,a=!1;for(const l in e){const c=e[l];if(pM.has(l)){s=!0;continue}else if(s7t(l)){r[l]=c;continue}else{const u=p9t(c,fBe[l]);l.startsWith("origin")?(a=!0,o[l]=u):i[l]=u}}if(e.transform||(s||n?i.transform=ynr(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;i.transformOrigin=`${l} ${c} ${u}`}}function hpt(t,e,n){return typeof t=="string"?t:qr.transform(e+n*t)}function _nr(t,e,n){const i=hpt(e,t.x,t.width),r=hpt(n,t.y,t.height);return`${i} ${r}`}const xnr={offset:"stroke-dashoffset",array:"stroke-dasharray"},wnr={offset:"strokeDashoffset",array:"strokeDasharray"};function Cnr(t,e,n=1,i=0,r=!0){t.pathLength=1;const o=r?xnr:wnr;t[o.offset]=qr.transform(-i);const s=qr.transform(e),a=qr.transform(n);t[o.array]=`${s} ${a}`}function ABe(t,{attrX:e,attrY:n,attrScale:i,originX:r,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(IBe(t,c,d),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f,dimensions:m}=t;h.transform&&(m&&(f.transform=h.transform),delete h.transform),m&&(r!==void 0||o!==void 0||f.transform)&&(f.transformOrigin=_nr(m,r!==void 0?r:.5,o!==void 0?o:.5)),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),i!==void 0&&(h.scale=i),s!==void 0&&Cnr(h,s,a,l,!1)}const RBe=t=>typeof t=="string"&&t.toLowerCase()==="svg",Snr={useVisualState:f9t({scrapeMotionValuesFromProps:h9t,createRenderState:m9t,onMount:(t,e,{renderState:n,latestValues:i})=>{Ya.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Ya.render(()=>{ABe(n,i,RBe(e.tagName),t.transformTemplate),u9t(e,n)})}})},Nnr={useVisualState:f9t({applyWillChange:!0,scrapeMotionValuesFromProps:MBe,createRenderState:TBe})};function g9t(t,e,n){for(const i in e)!xf(e[i])&&!d9t(i,n)&&(t[i]=e[i])}function Enr({transformTemplate:t},e){return b.useMemo(()=>{const n=TBe();return IBe(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Dnr(t,e){const n=t.style||{},i={};return g9t(i,n,t),Object.assign(i,Enr(t,e)),i}function knr(t,e){const n={},i=Dnr(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Mnr=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 jse(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Mnr.has(t)}let b9t=t=>!jse(t);function Lnr(t){t&&(b9t=e=>e.startsWith("on")?!jse(e):t(e))}try{Lnr(require("@emotion/is-prop-valid").default)}catch{}function Tnr(t,e,n){const i={};for(const r in t)r==="values"&&typeof t.values=="object"||(b9t(r)||n===!0&&jse(r)||!e&&!jse(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}function Inr(t,e,n,i){const r=b.useMemo(()=>{const o=m9t();return ABe(o,e,RBe(i),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};g9t(o,t.style,t),r.style={...o,...r.style}}return r}function Anr(t=!1){return(n,i,r,{latestValues:o},s)=>{const l=(kBe(n)?Inr:knr)(i,o,s,n),c=Tnr(i,typeof n=="string",t),u=n!==b.Fragment?{...c,...l,ref:r}:{},{children:d}=i,h=b.useMemo(()=>xf(d)?d.get():d,[d]);return b.createElement(n,{...u,children:h})}}function Rnr(t,e){return function(i,{forwardMotionProps:r}={forwardMotionProps:!1}){const s={...kBe(i)?Snr:Nnr,preloadedFeatures:t,useRender:Anr(r),createVisualElement:e,Component:i};return cnr(s)}}const MRe={current:null},v9t={current:!1};function Pnr(){if(v9t.current=!0,!!DBe)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>MRe.current=t.matches;t.addListener(e),e()}else MRe.current=!1}function Onr(t,e,n){for(const i in e){const r=e[i],o=n[i];if(xf(r))t.addValue(i,r);else if(xf(o))t.addValue(i,oU(r,{owner:t}));else if(o!==r)if(t.hasValue(i)){const s=t.getValue(i);s.liveStyle===!0?s.jump(r):s.hasAnimated||s.set(r)}else{const s=t.getStaticValue(i);t.addValue(i,oU(s!==void 0?s:r,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const fpt=new WeakMap,jnr=[...c7t,lf,Nk],Fnr=t=>jnr.find(l7t(t)),mpt=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class $nr{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:r,blockInitialAnimation:o,visualState:s},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=uBe,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 h=Jx.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,Ya.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=_pe(n),this.isVariantNode=a9t(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const f=d[h];l[h]!==void 0&&xf(f)&&f.set(l[h],!1)}}mount(e){this.current=e,fpt.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((n,i)=>this.bindToMotionValue(i,n)),v9t.current||Pnr(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:MRe.current,nBe(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){fpt.delete(this.current),this.projection&&this.projection.unmount(),Ck(this.notifyUpdate),Ck(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 n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const i=pM.has(e),r=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&Ya.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{r(),o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in tF){const n=tF[e];if(!n)continue;const{isEnabled:i,Feature:r}=n;if(!this.features[e]&&r&&i(this.props)&&(this.features[e]=new r(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Gc()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<mpt.length;i++){const r=mpt[i];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,s=e[o];s&&(this.propEventSubscriptions[r]=this.on(r,s))}this.prevMotionValues=Onr(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 n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=oU(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){var i;let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(i=this.getBaseTargetFromProps(this.props,e))!==null&&i!==void 0?i:this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(r7t(r)||i7t(r))?r=parseFloat(r):!Fnr(r)&&Nk.test(n)&&(r=b7t(e,n)),this.setBaseTarget(e,xf(r)?r.get():r)),xf(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:i}=this.props;let r;if(typeof i=="string"||typeof i=="object"){const s=iBe(this.props,i,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(r=s[e])}if(i&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!xf(o)?o:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new CBe),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class y9t extends $nr{constructor(){super(...arguments),this.KeyframeResolver=v7t}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}}function Vnr(t){return window.getComputedStyle(t)}class Bnr extends y9t{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=l9t}readValueFromInstance(e,n){if(pM.has(n)){const i=mBe(n);return i&&i.default||0}else{const i=Vnr(e),r=(s7t(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return U7t(e,n)}build(e,n,i){IBe(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return MBe(e,n,i)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;xf(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class znr extends y9t{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Gc}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(pM.has(n)){const i=mBe(n);return i&&i.default||0}return n=c9t.has(n)?n:gpe(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return h9t(e,n,i)}build(e,n,i){ABe(e,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,i,r){u9t(e,n,i,r)}mount(e){this.isSVGTag=RBe(e.tagName),super.mount(e)}}const Hnr=(t,e)=>kBe(t)?new znr(e):new Bnr(e,{allowProjection:t!==b.Fragment}),Wnr=Rnr({...Ier,...enr,...Htr,...tnr},Hnr),PBe=SQi(Wnr);class Unr extends b.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Knr({children:t,isPresent:e}){const n=b.useId(),i=b.useRef(null),r=b.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=b.useContext(EBe);return b.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:c}=r.current;if(e||!i.current||!s||!a)return;i.current.dataset.motionPopId=n;const u=document.createElement("style");return o&&(u.nonce=o),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
          [data-motion-pop-id="${n}"] {
            position: absolute !important;
            width: ${s}px !important;
            height: ${a}px !important;
            top: ${l}px !important;
            left: ${c}px !important;
          }
        `),()=>{document.head.removeChild(u)}},[e]),ne.jsx(Unr,{isPresent:e,childRef:i,sizeRef:r,children:b.cloneElement(t,{ref:i})})}const qnr=({children:t,initial:e,isPresent:n,onExitComplete:i,custom:r,presenceAffectsLayout:o,mode:s})=>{const a=LBe(Gnr),l=b.useId(),c=b.useCallback(d=>{a.set(d,!0);for(const h of a.values())if(!h)return;i&&i()},[a,i]),u=b.useMemo(()=>({id:l,initial:e,isPresent:n,custom:r,onExitComplete:c,register:d=>(a.set(d,!1),()=>a.delete(d))}),o?[Math.random(),c]:[n,c]);return b.useMemo(()=>{a.forEach((d,h)=>a.set(h,!1))},[n]),b.useEffect(()=>{!n&&!a.size&&i&&i()},[n]),s==="popLayout"&&(t=ne.jsx(Knr,{isPresent:n,children:t})),ne.jsx(vpe.Provider,{value:u,children:t})};function Gnr(){return new Map}const cJ=t=>t.key||"";function ppt(t){const e=[];return b.Children.forEach(t,n=>{b.isValidElement(n)&&e.push(n)}),e}const OBe=({children:t,exitBeforeEnter:e,custom:n,initial:i=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync"})=>{xS(!e,"Replace exitBeforeEnter with mode='wait'");const a=b.useMemo(()=>ppt(t),[t]),l=a.map(cJ),c=b.useRef(!0),u=b.useRef(a),d=LBe(()=>new Map),[h,f]=b.useState(a),[m,p]=b.useState(a);r9t(()=>{c.current=!1,u.current=a;for(let _=0;_<m.length;_++){const w=cJ(m[_]);l.includes(w)?d.delete(w):d.get(w)!==!0&&d.set(w,!1)}},[m,l.length,l.join("-")]);const g=[];if(a!==h){let _=[...a];for(let w=0;w<m.length;w++){const C=m[w],N=cJ(C);l.includes(N)||(_.splice(w,0,C),g.push(C))}s==="wait"&&g.length&&(_=g),p(ppt(_)),f(a);return}s==="wait"&&m.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:y}=b.useContext(SBe);return ne.jsx(ne.Fragment,{children:m.map(_=>{const w=cJ(_),C=a===m||l.includes(w),N=()=>{if(d.has(w))d.set(w,!0);else return;let E=!0;d.forEach(D=>{D||(E=!1)}),E&&(y==null||y(),p(u.current),r&&r())};return ne.jsx(qnr,{isPresent:C,initial:!c.current||i?void 0:!1,custom:C?void 0:n,presenceAffectsLayout:o,mode:s,onExitComplete:C?void 0:N,children:_},w)})})};/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var LRe=function(t,e){return LRe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])},LRe(t,e)};function Ynr(t,e){LRe(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var kB=function(){return kB=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},kB.apply(this,arguments)};function Xnr(t,e,n,i){var r,o=!1,s=0;function a(){r&&clearTimeout(r)}function l(){a(),o=!0}typeof e!="boolean"&&(i=n,n=e,e=void 0);function c(){var u=this,d=Date.now()-s,h=arguments;if(o)return;function f(){s=Date.now(),n.apply(u,h)}function m(){r=void 0}i&&!r&&f(),a(),i===void 0&&d>t?f():e!==!0&&(r=setTimeout(i?m:f,i===void 0?t-d:t))}return c.cancel=l,c}var B3={Pixel:"Pixel",Percent:"Percent"},gpt={unit:B3.Percent,value:.8};function bpt(t){return typeof t=="number"?{unit:B3.Percent,value:t*100}:typeof t=="string"?t.match(/^(\d*(\.\d+)?)px$/)?{unit:B3.Pixel,value:parseFloat(t)}:t.match(/^(\d*(\.\d+)?)%$/)?{unit:B3.Percent,value:parseFloat(t)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),gpt):(console.warn("scrollThreshold should be string or number"),gpt)}var jBe=function(t){Ynr(e,t);function e(n){var i=t.call(this,n)||this;return i.lastScrollTop=0,i.actionTriggered=!1,i.startY=0,i.currentY=0,i.dragging=!1,i.maxPullDownDistance=0,i.getScrollableTarget=function(){return i.props.scrollableTarget instanceof HTMLElement?i.props.scrollableTarget:typeof i.props.scrollableTarget=="string"?document.getElementById(i.props.scrollableTarget):(i.props.scrollableTarget===null&&console.warn(`You are trying to pass scrollableTarget but it is null. This might
        happen because the element may not have been added to DOM yet.
        See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.
      `),null)},i.onStart=function(r){i.lastScrollTop||(i.dragging=!0,r instanceof MouseEvent?i.startY=r.pageY:r instanceof TouchEvent&&(i.startY=r.touches[0].pageY),i.currentY=i.startY,i._infScroll&&(i._infScroll.style.willChange="transform",i._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},i.onMove=function(r){i.dragging&&(r instanceof MouseEvent?i.currentY=r.pageY:r instanceof TouchEvent&&(i.currentY=r.touches[0].pageY),!(i.currentY<i.startY)&&(i.currentY-i.startY>=Number(i.props.pullDownToRefreshThreshold)&&i.setState({pullToRefreshThresholdBreached:!0}),!(i.currentY-i.startY>i.maxPullDownDistance*1.5)&&i._infScroll&&(i._infScroll.style.overflow="visible",i._infScroll.style.transform="translate3d(0px, "+(i.currentY-i.startY)+"px, 0px)")))},i.onEnd=function(){i.startY=0,i.currentY=0,i.dragging=!1,i.state.pullToRefreshThresholdBreached&&(i.props.refreshFunction&&i.props.refreshFunction(),i.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){i._infScroll&&(i._infScroll.style.overflow="auto",i._infScroll.style.transform="none",i._infScroll.style.willChange="unset")})},i.onScrollListener=function(r){typeof i.props.onScroll=="function"&&setTimeout(function(){return i.props.onScroll&&i.props.onScroll(r)},0);var o=i.props.height||i._scrollableNode?r.target:document.documentElement.scrollTop?document.documentElement:document.body;if(!i.actionTriggered){var s=i.props.inverse?i.isElementAtTop(o,i.props.scrollThreshold):i.isElementAtBottom(o,i.props.scrollThreshold);s&&i.props.hasMore&&(i.actionTriggered=!0,i.setState({showLoader:!0}),i.props.next&&i.props.next()),i.lastScrollTop=o.scrollTop}},i.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:n.dataLength},i.throttledOnScrollListener=Xnr(150,i.onScrollListener).bind(i),i.onStart=i.onStart.bind(i),i.onMove=i.onMove.bind(i),i.onEnd=i.onEnd.bind(i),i}return e.prototype.componentDidMount=function(){if(typeof this.props.dataLength>"u")throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),typeof this.props.initialScrollY=="number"&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),typeof this.props.refreshFunction!="function"))throw new Error(`Mandatory prop "refreshFunction" missing.
          Pull Down To Refresh functionality will not work
          as expected. Check README.md for usage'`)},e.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},e.prototype.componentDidUpdate=function(n){this.props.dataLength!==n.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},e.getDerivedStateFromProps=function(n,i){var r=n.dataLength!==i.prevDataLength;return r?kB(kB({},i),{prevDataLength:n.dataLength}):null},e.prototype.isElementAtTop=function(n,i){i===void 0&&(i=.8);var r=n===document.body||n===document.documentElement?window.screen.availHeight:n.clientHeight,o=bpt(i);return o.unit===B3.Pixel?n.scrollTop<=o.value+r-n.scrollHeight+1:n.scrollTop<=o.value/100+r-n.scrollHeight+1},e.prototype.isElementAtBottom=function(n,i){i===void 0&&(i=.8);var r=n===document.body||n===document.documentElement?window.screen.availHeight:n.clientHeight,o=bpt(i);return o.unit===B3.Pixel?n.scrollTop+r>=n.scrollHeight-o.value:n.scrollTop+r>=o.value/100*n.scrollHeight},e.prototype.render=function(){var n=this,i=kB({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),r=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),o=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return Z.createElement("div",{style:o,className:"infinite-scroll-component__outerdiv"},Z.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(s){return n._infScroll=s},style:i},this.props.pullDownToRefresh&&Z.createElement("div",{style:{position:"relative"},ref:function(s){return n._pullDown=s}},Z.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!r&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},e}(b.Component);const uJ={foldTooltip:{id:"crawler_detail.logs.header.fold.tooltip",defaultMessage:"Fold all lines"},foldAriaLabel:{id:"crawler_detail.logs.header.fold.aria_label",defaultMessage:"Fold all lines"},unfoldTooltip:{id:"crawler_detail.logs.header.unfold.tooltip",defaultMessage:"Un fold lines"},unfoldAriaLabel:{id:"crawler_detail.logs.header.unfold.aria_label",defaultMessage:"Un fold lines"}};function Znr({log:t,onClose:e,className:n}){const i=Mt(),[r,o]=b.useState(!1),[s,a]=b.useState(void 0),l=Je.crawler.getLogFile.useQuery({logId:t==null?void 0:t._id,crawlerId:`${t==null?void 0:t.crawlerId}`},{enabled:!!t}),c=b.useRef();b.useEffect(()=>{s&&a(void 0)},[t]),b.useEffect(()=>{t&&u()},[l]);const u=()=>{!t||!l.data||fetch(l.data).then(h=>h.text()).then(h=>a(h))},d=()=>{o(h=>{var f,m;return h||(f=c.current)==null||f.fold(),h&&((m=c.current)==null||m.unfold()),!h})};return t?t.status==="inProgress"?v.jsxDEV("section",{className:Vt("w-full h-full bg-slate-800",n),children:v.jsxDEV(iw,{className:"h-full",children:!l.isInitialLoading&&v.jsxDEV(Gt,{align:"center",gap:2,children:[v.jsxDEV($p,{color:"white",mb:4},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:117,columnNumber:8},this),v.jsxDEV(Qe,{ta:"center",c:"dimmed",className:"max-w-prose",children:v.jsxDEV(ee,{id:"crawler_detail.logs.viewer.in_progress.title",defaultMessage:"Crawler is active"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:119,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:118,columnNumber:8},this),v.jsxDEV(Qe,{ta:"center",c:"dimmed",size:"sm",className:"max-w-96",children:v.jsxDEV(ee,{id:"crawler_detail.logs.viewer.in_progress.description",defaultMessage:"The logs will be available when your crawler has finished"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:125,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:124,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:116,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:114,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:113,columnNumber:4},this):v.jsxDEV("section",{"aria-live":"polite",className:Vt("w-full h-full bg-slate-800 flex flex-col overflow-hidden",n),children:[v.jsxDEV("header",{className:"w-full flex flex-col py-2 px-4",children:[v.jsxDEV(un,{className:"w-full mb-2",justify:"space-between",align:"center",children:[v.jsxDEV(un,{justify:"flex-start",gap:"xs",children:[v.jsxDEV(zPt,{size:16,stroke:1.5,className:"!text-slate-300"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:142,columnNumber:7},this),v.jsxDEV(Qe,{className:"!text-slate-300",children:[v.jsxDEV(ee,{id:"crawler_detail.logs.header.started_at",defaultMessage:"Started at: "},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:144,columnNumber:8},this),v.jsxDEV("time",{children:v.jsxDEV(z0,{value:t.createdAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:149,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:148,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:143,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:141,columnNumber:6},this),v.jsxDEV(un,{gap:0,children:[v.jsxDEV(ir,{openDelay:400,label:i.formatMessage(r?uJ.unfoldTooltip:uJ.foldTooltip),children:v.jsxDEV(Fr,{color:"white",variant:"subtle",onClick:d,"aria-label":i.formatMessage(r?uJ.unfoldAriaLabel:uJ.foldAriaLabel),children:[r&&v.jsxDEV($si,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:166,columnNumber:22},this),!r&&v.jsxDEV(iai,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:167,columnNumber:23},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:158,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:154,columnNumber:7},this),v.jsxDEV(ir,{openDelay:400,label:i.formatMessage({id:"crawler_detail.logs.header.search.tooltip",defaultMessage:"Search"}),children:v.jsxDEV(Fr,{color:"white",variant:"subtle","aria-label":i.formatMessage({id:"crawler_detail.logs.header.search.aria-label",defaultMessage:"Search in log file"}),onClick:()=>{var h;return(h=c.current)==null?void 0:h.openSearch()},children:v.jsxDEV(ZPt,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:186,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:177,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:170,columnNumber:7},this),v.jsxDEV(ir,{openDelay:400,label:i.formatMessage({id:"crawler_detail.logs.header.reload.tooltip",defaultMessage:"Reload"}),children:v.jsxDEV(Fr,{color:"white",variant:"subtle","aria-label":i.formatMessage({id:"crawler_detail.logs.header.reload.aria-label",defaultMessage:"Reload log"}),onClick:u,children:v.jsxDEV(XPt,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:205,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:196,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:189,columnNumber:7},this),v.jsxDEV(ir,{openDelay:400,label:i.formatMessage({id:"crawler_detail.logs.header.close.tooltip",defaultMessage:"Close"}),children:v.jsxDEV(Fr,{color:"white",variant:"subtle",className:"lg:!hidden","aria-label":i.formatMessage({id:"crawler_detail.logs.header.close.aria-label",defaultMessage:"Close"}),onClick:e,children:v.jsxDEV(n8e,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:225,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:215,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:208,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:153,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:140,columnNumber:5},this),v.jsxDEV(zl,{my:0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:230,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:139,columnNumber:4},this),v.jsxDEV(Z7e,{value:s,language:"markdown",ref:c,readOnly:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:232,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:138,columnNumber:3},this):v.jsxDEV("section",{className:"w-full h-full bg-slate-800 hidden lg:block",children:v.jsxDEV(iw,{className:"h-full",children:[l.isInitialLoading&&v.jsxDEV($p,{color:"white"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:86,columnNumber:38},this),!l.isInitialLoading&&v.jsxDEV(Gt,{align:"center",gap:2,children:[v.jsxDEV(Qe,{ta:"center",c:"dimmed",className:"max-w-prose",children:v.jsxDEV(tai,{size:48,stroke:1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:90,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:89,columnNumber:8},this),v.jsxDEV(Qe,{ta:"center",c:"dimmed",className:"max-w-prose",children:v.jsxDEV(ee,{id:"crawler_detail.logs.viewer.empty.title",defaultMessage:"Select a log session"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:93,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:92,columnNumber:8},this),v.jsxDEV(Qe,{ta:"center",c:"dimmed",size:"sm",className:"max-w-96",children:v.jsxDEV(ee,{id:"crawler_detail.logs.viewer.empty.description",defaultMessage:"Understand what your crawler did, debug your configurations and improve your crawler."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:99,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:98,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:88,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:85,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/LogViewer.tsx",lineNumber:84,columnNumber:4},this)}function aO(){return v.jsxDEV(Gt,{gap:"xs",align:"flex-start",className:"p-4",children:[v.jsxDEV(li,{height:16,radius:"lg",width:"64%",className:"rounded"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/LogSkeleton.tsx",lineNumber:6,columnNumber:4},this),v.jsxDEV(li,{height:8,radius:"lg",width:"32%",className:"rounded"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/LogSkeleton.tsx",lineNumber:7,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/LogSkeleton.tsx",lineNumber:5,columnNumber:3},this)}function Qnr({log:t,isSelected:e,onClick:n}){var r;const i=Mt();return v.jsxDEV(Lh,{p:8,onClick:()=>n(t),"aria-label":i.formatMessage({id:"crawler_detail.logs.list_item.aria_label",defaultMessage:"Log session {dateTime}"},{dateTime:`${i.formatDate(t.createdAt)} - ${i.formatTime(t.createdAt)}`}),className:Vt("w-full rounded p-4 hover:!bg-theme-primary/10",e&&"!bg-theme-primary/20"),children:v.jsxDEV(uu,{justify:"flex-start",align:"center",gap:"sm",children:[v.jsxDEV("div",{className:"w-6 h-6",children:[t.status==="finished"&&v.jsxDEV(ir,{label:i.formatMessage({id:"crawler_detail.logs.list_item.finished.tooltip",defaultMessage:"Finished"}),children:v.jsxDEV(VPt,{color:"green"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:44,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:38,columnNumber:7},this),t.status==="inProgress"&&v.jsxDEV(ir,{label:i.formatMessage({id:"crawler_detail.logs.list_item.in_progress.tooltip",defaultMessage:"In progress"}),children:v.jsxDEV($p,{size:"xs"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:54,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:48,columnNumber:7},this),t.status==="failed"&&v.jsxDEV(ir,{label:i.formatMessage({id:"crawler_detail.logs.list_item.failed.tooltip",defaultMessage:"Failed"}),children:v.jsxDEV(Zsi,{color:"red"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:64,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:58,columnNumber:7},this),t.status==="stopped"&&v.jsxDEV(ir,{label:i.formatMessage({id:"crawler_detail.logs.list_item.stopped.tooltip",defaultMessage:"Stopped"}),children:v.jsxDEV(Usi,{color:"orange"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:74,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:68,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:36,columnNumber:5},this),v.jsxDEV(un,{justify:"space-between",className:"w-full",children:[v.jsxDEV(Gt,{gap:0,children:[v.jsxDEV(Qe,{fw:"bold",children:v.jsxDEV(z0,{value:t.createdAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:81,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:80,columnNumber:7},this),v.jsxDEV(Qe,{size:"xs",c:"gray",children:[((r=t.stats)==null?void 0:r.duration)&&t.status==="finished"&&v.jsxDEV(ee,{id:"crawler_detail.logs.list_item.duration",defaultMessage:"Duration: {duration}",values:{duration:CPt(t.stats.duration)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:85,columnNumber:9},this),t.status==="stopped"&&v.jsxDEV(ee,{id:"crawler_detail.logs.list_item.stopped",defaultMessage:"Stopped"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:92,columnNumber:9},this),t.status==="failed"&&v.jsxDEV(ee,{id:"crawler_detail.logs.list_item.failed",defaultMessage:"Failed"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:98,columnNumber:9},this),t.status==="inProgress"&&v.jsxDEV(ee,{id:"crawler_detail.logs.list_item.in_progress",defaultMessage:"In progress"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:104,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:83,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:79,columnNumber:6},this),v.jsxDEV(Fsi,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:111,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:78,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:35,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/components/ListItem.tsx",lineNumber:24,columnNumber:3},this)}function Jnr(){var c,u;const t=Mt(),[e,n]=b.useState(),{crawlerId:i}=If(),{data:r}=Je.crawler.getById.useQuery({id:i},{enabled:!!i}),{data:o,isInitialLoading:s,fetchNextPage:a}=Je.crawler.getLogs.useInfiniteQuery({crawlerId:i},{getNextPageParam:d=>{var f,m,p;if(!d||!((f=d==null?void 0:d.data)!=null&&f.length))return;const h=(p=d==null?void 0:d.data)==null?void 0:p[((m=d==null?void 0:d.data)==null?void 0:m.length)-1];return{_id:h._id,createdAt:h.createdAt}},keepPreviousData:!0});ga(t.formatMessage({id:"crawler_detail.logs.title",defaultMessage:"Crawler logs - Chathive"}));const l=b.useMemo(()=>(o==null?void 0:o.pages.flatMap(d=>d.data))||[],[o==null?void 0:o.pages]);return(r==null?void 0:r.status)==="created"?v.jsxDEV("main",{className:"w-full h-full max-w-4xl flex flex-col gap-4 sm:p-4",children:[v.jsxDEV(PC,{crawler:r,hideActions:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:49,columnNumber:5},this),v.jsxDEV(c6t,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:50,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:48,columnNumber:4},this):v.jsxDEV("main",{className:"w-full h-full flex flex-row",children:[v.jsxDEV("div",{className:Vt("w-full min-w-96 lg:max-w-96 h-full flex flex-col sm:gap-4 sm:p-4",e?"hidden lg:flex":""),children:[v.jsxDEV(PC,{crawler:r,hideActions:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:63,columnNumber:5},this),v.jsxDEV(or,{className:"h-full overflow-auto",p:0,children:v.jsxDEV("div",{id:"logsInfiniteScroll",className:"h-full overflow-y-auto overflow-x-hidden",children:[s&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(aO,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:68,columnNumber:9},this),v.jsxDEV(aO,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:69,columnNumber:9},this),v.jsxDEV(aO,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:70,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:67,columnNumber:8},this),!s&&v.jsxDEV(jBe,{next:a,scrollThreshold:.6,dataLength:l.length||0,hasMore:(l.length||0)<(((c=o==null?void 0:o.pages[0])==null?void 0:c.total)||0),loader:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(aO,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:81,columnNumber:11},this),v.jsxDEV(aO,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:82,columnNumber:11},this),v.jsxDEV(aO,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:83,columnNumber:11},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:80,columnNumber:10},this),endMessage:l.length>=(((u=o==null?void 0:o.pages[0])==null?void 0:u.total)||0)&&l.length!==0&&v.jsxDEV(zl,{my:"xs",labelPosition:"center",label:t.formatMessage({id:"crawler_detail.logs.list.end_of_list",defaultMessage:"All logs are fetched"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:89,columnNumber:11},this),scrollableTarget:"logsInfiniteScroll",className:"flex flex-col gap-2 p-2 h-full overflow-auto",children:v.jsxDEV(OBe,{children:l.map((d,h)=>v.jsxDEV(PBe.li,{exit:{opacity:0},initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.15,delay:h*.0125},className:"list-none",children:v.jsxDEV(Qnr,{log:d,isSelected:(e==null?void 0:e._id)===d._id,onClick:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:112,columnNumber:12},this)},d._id,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:104,columnNumber:11},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:102,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:74,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:65,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:64,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:57,columnNumber:4},this),v.jsxDEV(Znr,{log:e,onClose:()=>n(void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:125,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerLogs/index.tsx",lineNumber:56,columnNumber:3},this)}function eir({auditLog:t}){var l,c,u;const e=Mt(),[n,i]=Pc(),r=!["crawler.started"].includes(t.type),o=((l=t.meta)==null?void 0:l.reason)==="COMPLETE"?"green":"red",s=tir(t),a={...t.payload||{},...t.meta||{}};return v.jsxDEV(Ew,{children:v.jsxDEV(Gt,{gap:4,className:"",children:[v.jsxDEV(uu,{gap:4,"aria-expanded":`${n}`,children:[v.jsxDEV(ad,{className:"w-full",children:[v.jsxDEV(ad.Col,{span:4,children:s&&v.jsxDEV(Qe,{children:s},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:24,columnNumber:42},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:24,columnNumber:7},this),v.jsxDEV(ad.Col,{span:2,children:((c=t.meta)==null?void 0:c.reason)&&t.type!=="crawler.stopped"&&v.jsxDEV(Qe,{c:o,truncate:"end",children:(u=t.meta)==null?void 0:u.reason},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:27,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:25,columnNumber:7},this),v.jsxDEV(ad.Col,{span:3,children:v.jsxDEV(Qe,{children:t.type},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:33,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:32,columnNumber:7},this),v.jsxDEV(ad.Col,{span:3,children:v.jsxDEV(Qe,{children:v.jsxDEV(z0,{value:t.createdAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:37,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:36,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:35,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:23,columnNumber:6},this),r?v.jsxDEV(Fr,{color:"gray",variant:"subtle",id:"accordionButton","aria-controls":"accordionPanel",onClick:i.toggle,"aria-label":n?e.formatMessage({id:"crawler_detail.audit_logs.collapse.aria_label",defaultMessage:"Hide details"}):e.formatMessage({id:"crawler_detail.audit_logs.extend.aria_label",defaultMessage:"Show details"}),children:[!n&&v.jsxDEV(Z$e,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:60,columnNumber:22},this),n&&v.jsxDEV(J$e,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:61,columnNumber:21},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:42,columnNumber:7},this):v.jsxDEV("div",{className:"w-8"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:64,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:22,columnNumber:5},this),n&&v.jsxDEV("section",{role:"region",id:"accordionPanel","aria-labelledby":"accordionButton",className:"p-2 bg-gray-100 rounded",children:a&&v.jsxDEV(rw,{block:!0,children:JSON.stringify(a,null,2)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:74,columnNumber:23},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:68,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:21,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:20,columnNumber:3},this)}function tir(t){var e;if(t.type==="crawler.started"&&((e=t.meta)==null?void 0:e.executedBy)!=="USER")return v.jsxDEV(ee,{id:"crawler_detail.audit_logs.row.executed_by.job",defaultMessage:"Scheduled"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:85,columnNumber:11},this);if(t.type==="crawler.finished")return v.jsxDEV(ee,{id:"crawler_detail.audit_logs.row.executed_by.self",defaultMessage:"Crawler"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/components/AuditLogItem.tsx",lineNumber:90,columnNumber:10},this);if(t!=null&&t.user)return B$e(t.user)}function nir(){var s;const t=Mt(),e=Qr(),{crawlerId:n}=If(),{data:i,isLoading:r}=Je.getOrganization.useQuery(void 0,{staleTime:1/0}),{data:o}=Je.crawler.getById.useQuery({id:n},{enabled:!!n});return ga(t.formatMessage({id:"crawler_detail.audit_logs.title",defaultMessage:"Crawler audit logs - Chathive"})),r?v.jsxDEV("div",{className:"w-full h-full max-w-4xl flex flex-col gap-4 sm:p-4",children:[v.jsxDEV(li,{height:72,className:"col-span-3 lg:col-span-2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/index.tsx",lineNumber:29,columnNumber:5},this),v.jsxDEV(li,{height:512,className:"col-span-3 lg:col-span-1"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/index.tsx",lineNumber:30,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/index.tsx",lineNumber:28,columnNumber:4},this):(s=i==null?void 0:i.permissions)!=null&&s.auditLogHistory?v.jsxDEV("div",{className:"w-full h-full max-w-4xl flex flex-col gap-4 sm:p-4",children:[v.jsxDEV(PC,{crawler:o,hideActions:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/index.tsx",lineNumber:61,columnNumber:4},this),v.jsxDEV(r8e,{filter:{crawlerId:n},actions:["crawler.created","crawler.started","crawler.updated","crawler.stopped","crawler.finished","crawler.deleted"],columns:[{span:4,label:t.formatMessage({id:"crawler_detail.audit_logs.list.header.triggered_by",defaultMessage:"Triggered by"})},{span:2,label:t.formatMessage({id:"crawler_detail.audit_logs.list.header.status",defaultMessage:"Status"})},{span:3,label:t.formatMessage({id:"crawler_detail.audit_logs.list.header.action",defaultMessage:"Action"})},{span:3,label:t.formatMessage({id:"crawler_detail.audit_logs.list.header.time",defaultMessage:"Time"})}],renderRows:({auditLog:a})=>v.jsxDEV(eir,{auditLog:a},a._id,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/index.tsx",lineNumber:103,columnNumber:35},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/index.tsx",lineNumber:62,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/index.tsx",lineNumber:60,columnNumber:3},this):v.jsxDEV("main",{className:"w-full h-full max-w-4xl flex flex-col gap-4 sm:p-4",children:[v.jsxDEV(PC,{crawler:o,hideActions:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/index.tsx",lineNumber:38,columnNumber:5},this),v.jsxDEV(or,{children:v.jsxDEV(Gt,{align:"flex-start",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"crawler_detail.audit_logs.title",defaultMessage:"Audit logs"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/index.tsx",lineNumber:42,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/index.tsx",lineNumber:41,columnNumber:7},this),v.jsxDEV(Qe,{className:"max-w-prose",children:v.jsxDEV(ee,{id:"crawler_detail.audit_logs.description",defaultMessage:"Audit logs offer advanced features for greater transparency in your crawlers usage. Boost your security and compliance by upgrading today!"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/index.tsx",lineNumber:45,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/index.tsx",lineNumber:44,columnNumber:7},this),v.jsxDEV(Nn,{onClick:()=>e("/billing"),children:v.jsxDEV(ee,{id:"general.upgrade.submit",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/index.tsx",lineNumber:51,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/index.tsx",lineNumber:50,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/index.tsx",lineNumber:40,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/index.tsx",lineNumber:39,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerAuditLogs/index.tsx",lineNumber:37,columnNumber:4},this)}function Vo({id:t,label:e,help:n,vertical:i,hideDivider:r,warning:o,children:s,...a}){return v.jsxDEV(Gt,{...a,children:[v.jsxDEV("div",{className:Vt("grid gap-4 items-center",i?"":"sm:grid-cols-2"),children:[v.jsxDEV("label",{htmlFor:t,className:"max-w-prose",children:[v.jsxDEV("p",{children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/HorizontalFormItem.tsx",lineNumber:29,columnNumber:6},this),n&&v.jsxDEV("span",{className:"text-xs text-neutral-700",children:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/HorizontalFormItem.tsx",lineNumber:30,columnNumber:15},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/HorizontalFormItem.tsx",lineNumber:28,columnNumber:5},this),v.jsxDEV("div",{children:s},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/HorizontalFormItem.tsx",lineNumber:32,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/HorizontalFormItem.tsx",lineNumber:27,columnNumber:4},this),o&&v.jsxDEV(Yo,{color:"orange",icon:v.jsxDEV(ud,{color:"orange",size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/HorizontalFormItem.tsx",lineNumber:35,columnNumber:33},this),children:o},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/HorizontalFormItem.tsx",lineNumber:35,columnNumber:5},this),!r&&v.jsxDEV(zl,{mb:"md",className:"col-span-2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/HorizontalFormItem.tsx",lineNumber:39,columnNumber:21},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/HorizontalFormItem.tsx",lineNumber:26,columnNumber:3},this)}function iir(){const t=Mt(),e=Je.useUtils(),n=Oi(ps),{crawlerId:i}=If(),{data:r}=Je.crawler.getById.useQuery({id:i},{staleTime:1/0,enabled:!!i,refetchOnWindowFocus:!1}),o=Je.crawler.updateCrawler.useMutation(),s=gt.object({name:gt.string({required_error:t.formatMessage({id:"crawler_detail.settings.form.name.error.required",defaultMessage:"Name is required"})}).max(254,{message:t.formatMessage({id:"crawler_detail.settings.form.name.error.max_length",defaultMessage:"Name cannot be longer then 254 characters"})})}),a=ls({validateInputOnBlur:!0,validate:aa(s)});b.useEffect(()=>{if(!r)return;const c={name:(r==null?void 0:r.name)||""};a.setValues(c),a.setInitialValues(c),a.reset()},[r]),ga(t.formatMessage({id:"crawler_detail.settings.title",defaultMessage:"Crawler settings - Chathive"}));const l=async c=>{try{await o.mutateAsync({id:i,...c}),e.crawler.getById.invalidate(),In.show({color:"green",message:t.formatMessage({id:"crawler_detail.settings.update.notification.succeeded",defaultMessage:"Crawler has been updated"}),autoClose:5e3})}catch(u){console.error("Failed to update crawler",u),In.show({color:"red",title:t.formatMessage({id:"crawler_detail.settings.update.notification.failed.title",defaultMessage:"Crawler could not be updated"}),message:t.formatMessage({id:"crawler_detail.settings.update.notification.failed.message",defaultMessage:"We cannot update your crawler at this time. Check if you didn't make a configuration mistake and try again."}),autoClose:1e4})}};return v.jsxDEV("main",{className:"w-full h-full max-w-4xl flex flex-col gap-4 sm:p-4",children:[v.jsxDEV(PC,{crawler:r},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerSettings/index.tsx",lineNumber:109,columnNumber:4},this),v.jsxDEV(or,{children:[v.jsxDEV(Gt,{justify:"space-between",gap:2,children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"crawler_detail.settings.header.title",defaultMessage:"Crawler settings"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerSettings/index.tsx",lineNumber:113,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerSettings/index.tsx",lineNumber:112,columnNumber:6},this),v.jsxDEV(zl,{my:"md"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerSettings/index.tsx",lineNumber:115,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerSettings/index.tsx",lineNumber:111,columnNumber:5},this),v.jsxDEV("form",{onSubmit:a.onSubmit(l),children:[v.jsxDEV(Vo,{id:"name",label:t.formatMessage({id:"crawler_detail.settings.form.name.label",defaultMessage:"Crawler name"}),children:v.jsxDEV(pa,{...a.getInputProps("name"),readOnly:!n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerSettings/index.tsx",lineNumber:126,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerSettings/index.tsx",lineNumber:119,columnNumber:6},this),n&&v.jsxDEV(Nn,{size:"sm",type:"submit",loading:o.isLoading,disabled:!a.isValid()||!a.isDirty(),children:v.jsxDEV(ee,{id:"crawler_detail.settings.form.submit",defaultMessage:"Update crawler"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerSettings/index.tsx",lineNumber:135,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerSettings/index.tsx",lineNumber:129,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerSettings/index.tsx",lineNumber:118,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerSettings/index.tsx",lineNumber:110,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerSettings/index.tsx",lineNumber:108,columnNumber:3},this)}function rir({className:t,children:e}){const n=Mt(),i=Qr(),r=Wd(N6),{data:o}=Je.getAuthUser.useQuery(),{crawlerId:s}=If(),{data:a,isInitialLoading:l}=Je.crawler.getById.useQuery({id:s},{enabled:!!s,refetchOnWindowFocus:!1}),{data:c,isInitialLoading:u}=Je.getOrganization.useQuery(void 0,{staleTime:1/0});return b.useEffect(()=>{if(!o||!c)return;let d=c.members.find(h=>h.userId===(o==null?void 0:o._id));(o.type==="reseller"||o.type==="chathiveAdmin")&&(d={_id:o._id,role:"admin",userId:o._id,createdAt:o.createdAt}),d&&r(d)},[c,o]),u||l?v.jsxDEV(Ps,{className:"h-screen",children:[v.jsxDEV(iC,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:61,columnNumber:5},this),v.jsxDEV(Ps.Content,{className:"flex flex-col justify-center items-center gap-4",children:v.jsxDEV($p,{size:"xl"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:63,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:62,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:60,columnNumber:4},this):v.jsxDEV(Ps,{className:"bg-white",style:{minHeight:"100svh",height:"100svh",overflow:"hidden"},children:[v.jsxDEV(iC,{showOrganization:!0,organization:c,onOrganizationChange:()=>i("/projects"),children:v.jsxDEV(vn,{type:"primary",onClick:()=>i("/billing"),children:v.jsxDEV(ee,{id:"general.upgrade.submit",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:73,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:72,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:71,columnNumber:4},this),v.jsxDEV(Ps,{children:[v.jsxDEV(pfe,{organization:c,onMenuClick:d=>i(`/crawler/${s}/${d}`),menu:[{key:"dashboard",icon:v.jsxDEV(Khe,{className:"app_shell-icon-green p-2 rounded","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:83,columnNumber:14},this),label:n.formatMessage({id:"crawler_detail.shell.menu.dashboard.label",defaultMessage:"Dashboard"})},{key:"editor",icon:v.jsxDEV(lie,{className:"app_shell-icon-blue_green p-2 rounded","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:91,columnNumber:14},this),label:n.formatMessage({id:"crawler_detail.shell.menu.editor.label",defaultMessage:"Editor"})},{type:"divider",className:"!my-4"},{key:"logs",icon:v.jsxDEV(a$e,{className:"app_shell-icon-blue p-2 rounded","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:100,columnNumber:14},this),label:n.formatMessage({id:"crawler_detail.shell.menu.logs.label",defaultMessage:"Logs"})},{key:"audit-logs",icon:v.jsxDEV(e2t,{className:"app_shell-icon-purple p-2 rounded","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:108,columnNumber:14},this),label:n.formatMessage({id:"crawler_detail.shell.menu.audit_logs.label",defaultMessage:"Audit logs"})},{type:"divider",className:"!my-4"},{key:"settings",icon:v.jsxDEV(Xhe,{className:"app_shell-icon-red p-2 rounded","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:117,columnNumber:14},this),label:n.formatMessage({id:"crawler_detail.shell.menu.settings.label",defaultMessage:"Settings"})}],selectionMenu:v.jsxDEV("div",{className:"w-full p-2 pt-0",children:v.jsxDEV(vn,{className:"w-full",icon:v.jsxDEV(s$e,{className:"mr-2","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:128,columnNumber:15},this),onClick:()=>i("/crawler"),children:v.jsxDEV(ee,{id:"crawler_detail.shell.back",defaultMessage:"Back to crawlers"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:131,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:126,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:125,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:77,columnNumber:5},this),v.jsxDEV(Ps.Content,{className:Vt("flex flex-col justify-start items-center gap-4 relative overflow-auto min-h-[calc(100svh-64px)]",t),children:[(a==null?void 0:a.status)==="inProgress"&&v.jsxDEV(Yo,{p:8,variant:"filled",icon:v.jsxDEV($p,{color:"white",size:"xs"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:146,columnNumber:14},this),className:Vt("!absolute top-0 left-1/2 -translate-x-1/2 w-fit mx-auto z-50 !rounded-t-none","[&>.mantine-Alert-wrapper>.mantine-Alert-icon]:!me-2"),children:v.jsxDEV(ee,{id:"crawler_detail.shell.banner.in_progress",defaultMessage:"Crawler is in progress"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:152,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:143,columnNumber:7},this),v.jsxDEV(hfe,{children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:158,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:136,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:76,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/CrawlerShell.tsx",lineNumber:70,columnNumber:3},this)}const oir=[{path:"dashboard",element:v.jsxDEV(CQi,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/index.tsx",lineNumber:13,columnNumber:12},void 0)},{path:"editor",element:v.jsxDEV(dIi,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/index.tsx",lineNumber:17,columnNumber:12},void 0)},{path:"logs",element:v.jsxDEV(Jnr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/index.tsx",lineNumber:21,columnNumber:12},void 0)},{path:"audit-logs",element:v.jsxDEV(nir,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/index.tsx",lineNumber:25,columnNumber:12},void 0)},{path:"settings",element:v.jsxDEV(iir,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/index.tsx",lineNumber:29,columnNumber:12},void 0)},{path:"",element:v.jsxDEV(Nie,{to:"/dashboard"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/crawler/CrawlerDetail/index.tsx",lineNumber:33,columnNumber:12},void 0)}];function sir({isOpen:t,onClose:e}){const n=Mt(),[i]=Ut.useForm(),r=Je.useContext(),o=Je.addMembers.useMutation({onSuccess:()=>{Ei.success({placement:"bottomRight",message:n.formatMessage({id:"add_member.create.succeeded",defaultMessage:"Members have been invited.",description:"Success notification when members have been invited"})}),r.getMembers.invalidate(),e()},onError:l=>{var u;let c=n.formatMessage({id:"add_member.create.failed.generic",defaultMessage:"Something went wrong while trying to invite members. Please try again later.",description:"Members could not be invited, because our server crashed or could not connect to server"});((u=l.data)==null?void 0:u.httpStatus)===401&&(c=n.formatMessage({id:"add_member.create.failed.limited_reached",defaultMessage:"You have reached your maximum amount of members. Upgrade to a higher plan to add more projects.",description:"Show error user has reached their billing limit of total members they can have"})),Ei.error({placement:"bottomRight",message:c})}}),s=async()=>{const l=i.getFieldsValue();o.mutate(l)},a=()=>{i.resetFields(),e()};return v.jsxDEV(Ma,{title:n.formatMessage({id:"add_member.title",defaultMessage:"Invite members"}),open:t,onCancel:a,footer:v.jsxDEV("footer",{className:"flex justify-between items-center w-full !mt-8",children:[v.jsxDEV(vn,{type:"text",onClick:a,children:v.jsxDEV(ee,{id:"add_member.footer.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/AddMembers.tsx",lineNumber:69,columnNumber:7},this)},"back",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/AddMembers.tsx",lineNumber:68,columnNumber:6},this),v.jsxDEV(vn,{type:"primary",htmlType:"submit",form:"inviteMembersForm",loading:o.isLoading,children:v.jsxDEV(ee,{id:"add_member.footer.submit",defaultMessage:"Add members",description:"Button to add members"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/AddMembers.tsx",lineNumber:78,columnNumber:7},this)},"submit",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/AddMembers.tsx",lineNumber:71,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/AddMembers.tsx",lineNumber:67,columnNumber:5},this),children:v.jsxDEV(Ut,{form:i,layout:"vertical",initialValues:{role:"default"},name:"inviteMembersForm",id:"inviteMembersForm",requiredMark:!1,onFinish:s,children:[v.jsxDEV(Ut.Item,{name:"email",rules:[{validator:async(l,c)=>{if(!(c!=null&&c.length))throw new Error(n.formatMessage({id:"add_member.form.email.required",defaultMessage:"Email address is required."}));const u=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/,d=c.find(h=>!h.match(u));if(d)throw new Error(n.formatMessage({id:"add_member.form.email.invalid_email",defaultMessage:"{email} is an invalid email address."},{email:d}))}}],label:n.formatMessage({id:"add_member.form.email.label",defaultMessage:"Email address"}),extra:n.formatMessage({id:"add_member.form.email.help",defaultMessage:"Press 'ENTER' to add an email address.",description:"Enter must be pressed after each email address"}),children:v.jsxDEV(Lo,{mode:"tags",size:"large",options:[],showSearch:!1,notFoundContent:null,tokenSeparators:[","," "],dropdownStyle:{display:"none"}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/AddMembers.tsx",lineNumber:140,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/AddMembers.tsx",lineNumber:96,columnNumber:5},this),v.jsxDEV(Ut.Item,{name:"role",rules:[{required:!0,message:n.formatMessage({id:"add_member.form.role.required",defaultMessage:"Member role is required."})}],label:n.formatMessage({id:"add_member.form.role.label",defaultMessage:"Member role"}),help:n.formatMessage({id:"add_member.form.role.help",defaultMessage:"Member roles allow you to control the access this member has."}),children:v.jsxDEV(Lo,{size:"large",children:Object.keys(Yj).map(l=>v.jsxDEV(Lo.Option,{value:l,children:v.jsxDEV(ee,{...Yj[l]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/AddMembers.tsx",lineNumber:173,columnNumber:9},this)},l,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/AddMembers.tsx",lineNumber:172,columnNumber:8},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/AddMembers.tsx",lineNumber:170,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/AddMembers.tsx",lineNumber:150,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/AddMembers.tsx",lineNumber:87,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/AddMembers.tsx",lineNumber:62,columnNumber:3},this)}const xpe=({title:t,description:e,deleteText:n,isOpen:i,isDeleting:r,onClose:o,onDelete:s})=>v.jsxDEV(Ma,{title:t,open:i,onOk:s,onCancel:o,footer:v.jsxDEV("div",{className:"flex justify-between items-center w-full",children:[v.jsxDEV(vn,{type:"text",onClick:o,children:v.jsxDEV(ee,{id:"component.delete_modal.footer.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/DeleteModal/index.tsx",lineNumber:30,columnNumber:7},void 0)},"back",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/DeleteModal/index.tsx",lineNumber:29,columnNumber:6},void 0),v.jsxDEV(vn,{type:"primary",danger:!0,onClick:s,loading:r,children:n},"submit",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/DeleteModal/index.tsx",lineNumber:32,columnNumber:6},void 0)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/DeleteModal/index.tsx",lineNumber:28,columnNumber:5},void 0),children:v.jsxDEV("p",{children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/DeleteModal/index.tsx",lineNumber:38,columnNumber:4},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/DeleteModal/index.tsx",lineNumber:22,columnNumber:3},void 0);function air({member:t,isOpen:e,onClose:n}){var _,w;const i=Mt(),[r]=Ut.useForm(),o=Je.useUtils(),[s,a]=b.useState(!1),l=Oi(N6),c=[(_=t==null?void 0:t.user)==null?void 0:_.firstName,(w=t==null?void 0:t.user)==null?void 0:w.lastName].join(" ").trim(),{data:u}=Je.getOrganization.useQuery(void 0,{staleTime:36e5}),d=Je.updateMember.useMutation({onSuccess:()=>{Ei.success({placement:"bottomRight",message:i.formatMessage({id:"member_detail.updated.succeeded",defaultMessage:"{name} has been updated successfully.",description:"Success notification when member has been updated"},{name:Mp(c)})}),o.getMembers.invalidate(),n()},onError:C=>{var E,D,k,M,T,A,R;let N=i.formatMessage({id:"member_detail.updated.failed.generic",defaultMessage:"Something went wrong while updating this member.",description:"Member could not be updated, because our server crashed or could not connect to server"});((E=C.data)==null?void 0:E.httpStatus)===401&&(N=i.formatMessage({id:"add_member.update.failed.un_authorized",defaultMessage:"You need admin permission to update a member."})),((D=C.data)==null?void 0:D.httpStatus)===400&&((M=(k=C.data)==null?void 0:k.stack)!=null&&M.includes("UPDATE_OWNER"))&&(N=i.formatMessage({id:"add_member.update.failed.change_owner",defaultMessage:"Owner cannot be changed.",description:"Show error they cannot delete a owner without our help"})),((T=C.data)==null?void 0:T.httpStatus)===400&&((R=(A=C.data)==null?void 0:A.stack)!=null&&R.includes("LAST_ADMIN"))&&(N=i.formatMessage({id:"add_member.update.failed.last_admin",defaultMessage:"Update failed because the organization needs at least one admin.",description:"Show error update failed because last admin cannot be downgraded"})),Ei.error({placement:"bottomRight",message:N})}}),h=Je.deleteMember.useMutation({onSuccess:()=>{Ei.success({placement:"bottomRight",message:i.formatMessage({id:"member_detail.delete.succeeded",defaultMessage:"{name} has been created successfully.",description:"Success notification when member has been deleted"},{name:Mp(c)})}),o.getMembers.invalidate(),n()},onError:C=>{var E,D,k,M,T,A,R;let N=i.formatMessage({id:"member_detail.delete.failed.generic",defaultMessage:"Something went wrong while trying to delete this member. Try again later.",description:"Member could not be deleted, because our server crashed or could not connect to server"});((E=C.data)==null?void 0:E.httpStatus)===401&&(N=i.formatMessage({id:"add_member.delete.failed.un_authorized",defaultMessage:"You need admin permission to update a member."})),((D=C.data)==null?void 0:D.httpStatus)===400&&((M=(k=C.data)==null?void 0:k.stack)!=null&&M.includes("DELETE_ADMIN"))&&(N=i.formatMessage({id:"add_member.delete.failed.delete_admin",defaultMessage:"Admin members cannot be deleted. Change the member first to default.",description:"Show error user has reached their billing limit of total members they can have"})),((T=C.data)==null?void 0:T.httpStatus)===400&&((R=(A=C.data)==null?void 0:A.stack)!=null&&R.includes("DELETE_OWNER"))&&(N=i.formatMessage({id:"add_member.delete.failed.delete_owner",defaultMessage:"Owner cannot be deleted. Contact our support for more information.",description:"Show error they cannot delete a owner without our help"})),Ei.error({placement:"bottomRight",message:N})}}),f=async()=>{if(!t)return;const C=r.getFieldsValue();d.mutate({memberId:`${t._id}`,...C})},m=async()=>{t&&h.mutate({memberId:`${t._id}`})},p=()=>{r.resetFields(),n()};if(!t)return null;const g=(u==null?void 0:u.createdBy)===t.userId,y=g||(l==null?void 0:l.role)!=="admin"&&t._id!==(l==null?void 0:l._id);return v.jsxDEV(Ma,{title:i.formatMessage({id:"member_detail.title",defaultMessage:"Update {username}"},{username:c}),open:e,onCancel:p,footer:v.jsxDEV("footer",{className:"flex justify-between items-center w-full !mt-8",children:[v.jsxDEV(vn,{type:"text",onClick:p,children:v.jsxDEV(ee,{id:"member_detail.footer.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/MemberDetail.tsx",lineNumber:162,columnNumber:7},this)},"back",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/MemberDetail.tsx",lineNumber:161,columnNumber:6},this),v.jsxDEV("div",{className:"flex flex-row gap-2",children:[v.jsxDEV(Vs,{title:i.formatMessage({id:"member_detail.footer.delete.tooltip",defaultMessage:"Admin member cannot be deleted."}),trigger:t.role==="admin"&&!y?["hover"]:[],color:"red",children:v.jsxDEV(vn,{danger:!0,type:"text",disabled:y,onClick:()=>a(!0),loading:h.isLoading,children:v.jsxDEV(ee,{id:"member_detail.footer.delete",defaultMessage:"Delete",description:"Button to delete member"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/MemberDetail.tsx",lineNumber:180,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/MemberDetail.tsx",lineNumber:173,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/MemberDetail.tsx",lineNumber:165,columnNumber:7},this),v.jsxDEV(vn,{type:"primary",onClick:f,loading:d.isLoading,disabled:g||(l==null?void 0:l.role)==="default",children:v.jsxDEV(ee,{id:"member_detail.footer.update.submit",defaultMessage:"Update",description:"Button to update member"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/MemberDetail.tsx",lineNumber:194,columnNumber:8},this)},"submit",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/MemberDetail.tsx",lineNumber:187,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/MemberDetail.tsx",lineNumber:164,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/MemberDetail.tsx",lineNumber:160,columnNumber:5},this),children:[g&&v.jsxDEV(pl,{type:"info",className:"!mb-4",message:i.formatMessage({id:"member_detail.info_banner.owner.message",defaultMessage:"{username} is the owner of the organization and cannot be downgraded to another role or be deleted."},{username:Mp(c)})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/MemberDetail.tsx",lineNumber:205,columnNumber:5},this),v.jsxDEV(Ut,{form:r,layout:"vertical",initialValues:t,requiredMark:!1,disabled:g||(l==null?void 0:l.role)==="default",children:v.jsxDEV(Ut.Item,{name:"role",rules:[{required:!0,message:i.formatMessage({id:"member_detail.form.role.required",defaultMessage:"Member role is required."})}],label:i.formatMessage({id:"member_detail.form.type.label",defaultMessage:"Member role"}),help:i.formatMessage({id:"member_detail.form.role.help",defaultMessage:"Member roles allow you to control the access this member has."}),children:v.jsxDEV(Lo,{size:"large",children:Object.keys(Yj).map(C=>v.jsxDEV(Lo.Option,{value:C,children:v.jsxDEV(ee,{...Yj[C]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/MemberDetail.tsx",lineNumber:248,columnNumber:9},this)},C,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/MemberDetail.tsx",lineNumber:247,columnNumber:8},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/MemberDetail.tsx",lineNumber:245,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/MemberDetail.tsx",lineNumber:225,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/MemberDetail.tsx",lineNumber:218,columnNumber:4},this),v.jsxDEV(xpe,{title:i.formatMessage({id:"member_detail.confirm_delete_modal.title",defaultMessage:"Delete member"}),description:i.formatMessage({id:"member_detail.confirm_delete_modal.description",defaultMessage:"You are about to delete {username} from your organization. They will no longer access to your organization."},{username:c}),isDeleting:h.isLoading,deleteText:i.formatMessage({id:"member_detail.confirm_delete_modal.button",defaultMessage:"Delete member"}),isOpen:s,onClose:()=>a(!1),onDelete:m},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/MemberDetail.tsx",lineNumber:254,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/components/MemberDetail.tsx",lineNumber:149,columnNumber:3},this)}function lir(){const t=Mt(),e=Qr(),n=Oi(ps),[i,r]=b.useState(20),[o,s]=b.useState(1),[a,l]=b.useState(!1),[c,u]=b.useState(),{data:d}=Je.getAuthUser.useQuery(),{data:h}=Je.getOrganization.useQuery(void 0,{staleTime:36e5}),{data:f,isLoading:m}=Je.getMembers.useQuery({offset:(o-1)*i,limit:i}),p=b.useMemo(()=>{var _;if(!h)return!0;const y=((_=h==null?void 0:h.permissions)==null?void 0:_.users)||0;return((f==null?void 0:f.total)||0)>=y},[h]),g=()=>{if(p)return e("/billing");l(!0)};return ga(t.formatMessage({id:"members_overview.page.title",defaultMessage:"Members - Chathive",description:"Browser tab title for members overview page"})),v.jsxDEV("section",{className:"grid gap-4 w-full max-w-4xl",children:[v.jsxDEV(uo,{title:t.formatMessage({id:"members_overview.table.title",defaultMessage:"Members"}),extra:n?v.jsxDEV(vn,{onClick:g,type:"primary",children:[!p&&v.jsxDEV(ee,{id:"members_overview.table.button.add_members",defaultMessage:"Add members"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:67,columnNumber:9},this),p&&v.jsxDEV(ee,{id:"members_overview.table.button.upgrade",defaultMessage:"Upgrade to add more members"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:73,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:65,columnNumber:7},this):null,bordered:!1,className:"members_overview overflow-auto [&>.ant-card-body]:!p-0 [&>.ant-card-body]:sm:!p-6",children:v.jsxDEV("div",{className:"flex flex-col space-y-6",children:[m&&v.jsxDEV(ja,{active:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:85,columnNumber:20},this),!m&&v.jsxDEV(qs,{rowKey:"_id",dataSource:f==null?void 0:f.data,pagination:!!(f!=null&&f.total)&&(f==null?void 0:f.total)>20&&{current:o,pageSize:i,onChange:(y,_)=>{s(y),_&&r(_)},showSizeChanger:!0,pageSizeOptions:["20","30","50","100"],total:f==null?void 0:f.total},onRow:y=>({onClick:()=>u(y)}),style:{overflowX:"auto"},rowClassName:"cursor-pointer",locale:{emptyText:v.jsxDEV("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[v.jsxDEV("img",{src:"/img/svg/no_results.svg",alt:"No projects found",className:"max-h-52 p-8"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:110,columnNumber:11},this),v.jsxDEV("p",{children:v.jsxDEV(ee,{id:"members_overview.table.no_results",defaultMessage:"No members found"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:116,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:115,columnNumber:11},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:109,columnNumber:10},this)},children:[v.jsxDEV(qs.Column,{title:t.formatMessage({id:"members_overview.table.column.name",defaultMessage:"Member name"}),dataIndex:"user",className:"min-w-[192px]",render:y=>!(y!=null&&y.firstName)&&!(y!=null&&y.lastName)?v.jsxDEV("p",{className:"text-sm italic text-slate-500",children:v.jsxDEV(ee,{id:"members_overview.table.column.name.fallback",defaultMessage:"Name not set",description:"Show fallback in table when user hasn't set their name, mostly because user hasn't verified them self yet."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:137,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:136,columnNumber:12},this):v.jsxDEV(Fn.Text,{children:[y==null?void 0:y.firstName," ",y==null?void 0:y.lastName," ",(d==null?void 0:d._id)===(y==null?void 0:y.userId)&&v.jsxDEV(kv,{color:"purple",children:v.jsxDEV(ee,{id:"members_overview.table.column.name.myself",defaultMessage:"Myself"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:151,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:150,columnNumber:13},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:147,columnNumber:11},this)},"memberName",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:125,columnNumber:8},this),v.jsxDEV(qs.Column,{className:"min-w-[160px]",dataIndex:["user","email"],title:t.formatMessage({id:"members_overview.table.column.email",defaultMessage:"Email"}),render:y=>v.jsxDEV(Fn.Text,{children:y},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:169,columnNumber:28},this)},"email",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:161,columnNumber:8},this),v.jsxDEV(qs.Column,{className:"min-w-[64px]",dataIndex:"role",title:t.formatMessage({id:"members_overview.table.column.role",defaultMessage:"Role"}),render:y=>v.jsxDEV(Fn.Text,{children:Yj[y]&&v.jsxDEV(ee,{...Yj[y]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:181,columnNumber:34},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:180,columnNumber:10},this)},"role",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:171,columnNumber:8},this),v.jsxDEV(qs.Column,{width:"32px",render:()=>v.jsxDEV(u$e,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:185,columnNumber:60},this)},"icon",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:185,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:87,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:84,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:58,columnNumber:4},this),v.jsxDEV(sir,{isOpen:a,onClose:()=>l(!1)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:190,columnNumber:4},this),v.jsxDEV(air,{member:c,isOpen:!!c,onClose:()=>u(void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:191,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/MembersOverview/index.tsx",lineNumber:57,columnNumber:3},this)}function cir(t){var i;const e=Mt();if(!((i=t.payload)!=null&&i.length))return null;const n=t.payload[0].payload;return v.jsxDEV(uo,{className:"month_graph-tooltip",children:[v.jsxDEV(Fn.Text,{type:"secondary",children:v.jsxDEV(tu,{value:n.date},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:34,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:33,columnNumber:4},this),v.jsxDEV("p",{children:v.jsxDEV(ee,{id:"organization_dashboard.month_graph.tooltip",defaultMessage:"Message credits: {total} / {limit} ",values:{total:e.formatNumber(n.total)||0,limit:e.formatNumber(n.limit)||0}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:37,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:36,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:32,columnNumber:3},this)}function uir({organization:t}){const e=Mt(),{data:n,isLoading:i,isError:r}=Je.getOrganizationMessageCreditsPerDay.useQuery(void 0,{staleTime:3e5}),o=b.useMemo(()=>{var u,d,h;if(!n||!((u=t==null?void 0:t.billing)!=null&&u.startDate))return[];const a=cq((d=t==null?void 0:t.billing)==null?void 0:d.startDate),l=w6((h=t==null?void 0:t.billing)==null?void 0:h.startDate),c=bfe(l.toDateString(),a.toDateString());return[...Array(c).keys()].reduce((f,m,p)=>{var w,C;const g=gfe({to:l.toDateString(),days:p}),y=n[g.toDateString()]||0,_=((w=f[p-1])==null?void 0:w.total)||0;return[...f,{date:g,value:y,day:e.formatDate(g,{day:"2-digit",month:"2-digit"}),total:_+y,limit:(C=t==null?void 0:t.permissions)==null?void 0:C.totalMessages}]},[])},[n,t]);function s(){var a;return r?v.jsxDEV(pl,{message:e.formatMessage({id:"organization_dashboard.month_graph.error",defaultMessage:"Something went wrong while loading data."}),type:"error"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:102,columnNumber:5},this):i?v.jsxDEV(ja,{active:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:112,columnNumber:31},this):o!=null&&o.length?v.jsxDEV(qq,{width:"100%",height:254,children:v.jsxDEV(UVt,{data:o,margin:{top:0,right:0,left:0,bottom:0},stackOffset:"expand",children:[v.jsxDEV(a$,{strokeDasharray:"3 3"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:134,columnNumber:6},this),v.jsxDEV(m_,{dataKey:"day"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:135,columnNumber:6},this),v.jsxDEV(Ov,{allowDecimals:!1,padding:{top:10}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:136,columnNumber:6},this),v.jsxDEV(up,{content:cir},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:137,columnNumber:6},this),v.jsxDEV(o$,{label:{fontSize:10,fill:Wee,position:"insideTopRight",value:e.formatMessage({id:"organization_dashboard.month_graph.limit_line.label",defaultMessage:"Message credit limit"})},stroke:Wee,strokeDasharray:"5 5",y:((a=t==null?void 0:t.permissions)==null?void 0:a.totalMessages)||0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:138,columnNumber:6},this),v.jsxDEV(mM,{dataKey:"limit",dot:!1,strokeDasharray:"5 5",stroke:Wee},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:152,columnNumber:6},this),v.jsxDEV(f_,{dataKey:"total",type:"monotone",fill:yd,stroke:yd},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:153,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:129,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:128,columnNumber:4},this):v.jsxDEV(wh,{image:v.jsxDEV("img",{src:"/img/svg/setup_analytics.svg",className:"h-48 mx-auto"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:117,columnNumber:13},this),description:e.formatMessage({id:"organization_dashboard.month_graph.not_enough_data",defaultMessage:"Looks like we don't have enough data yet... Hang tight, we're on the lookout for more!",description:"Fallback message when we don't have enough data yet to generate a graph"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:116,columnNumber:5},this)}return v.jsxDEV(uo,{title:e.formatMessage({id:"organization_dashboard.month_graph.title",defaultMessage:"Cumulative message credits Over Time",description:"Title section where we show the cumulation of message credits over time in the current billing month"}),bordered:!1,children:v.jsxDEV("section",{className:"flex flex-col space-y-2",children:s()},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:169,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/components/monthGraph.tsx",lineNumber:160,columnNumber:3},this)}const FBe=({placement:t,message:e})=>{const n=Mt();return v.jsxDEV(Vs,{overlayStyle:{maxWidth:"320px"},placement:t,title:n.formatMessage(e),children:v.jsxDEV(hAt,{className:"text-theme-primary/80 hover:text-theme-primary"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/InfoTooltip.tsx",lineNumber:15,columnNumber:4},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/InfoTooltip.tsx",lineNumber:14,columnNumber:3},void 0)};function TRe(t){return t*4}function _9t(t){return new Blob([t]).size}function dir({organization:t}){var c,u,d,h;const e=Mt(),n=Qr(),{data:i,isInitialLoading:r}=Je.getTotalOrganizationMessageCredits.useQuery(void 0,{staleTime:36e5}),{data:o,isInitialLoading:s}=Je.getTotalTokensUsed.useQuery(void 0);function a(f,m){if(m===0){if(f===0)return 0;throw new Error("Invalid inputs. maxAllowed cannot be zero if used is non-zero.")}return f/m*100}const l=s&&r;return v.jsxDEV(uo,{bordered:!1,title:e.formatMessage({id:"organization_dashboard.usage_analytics.title",defaultMessage:"Credits used"}),children:[l&&v.jsxDEV(Gt,{children:[v.jsxDEV(li,{height:64},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:43,columnNumber:6},this),v.jsxDEV(li,{height:64},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:44,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:42,columnNumber:5},this),!l&&v.jsxDEV(Gt,{children:[v.jsxDEV("div",{children:[v.jsxDEV("div",{className:"flex flex-row justify-between w-full",children:[v.jsxDEV(aS,{style:{width:"100%"},size:"small",children:v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"organization_dashboard.usage_analytics.per_project.title",defaultMessage:"Total message credits",description:"Title above graph where user can see the total send message send this month in this project"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:54,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:53,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:52,columnNumber:8},this),t.billing.startDate&&v.jsxDEV(Fn.Text,{className:"!text-xs !text-gray-600 min-w-fit",children:v.jsxDEV(ee,{id:"organization_dashboard.usage_analytics.per_project.reset_date",defaultMessage:"Will reset on {date}",description:"Show date credits will reset",values:{date:t.billing.startDate&&e.formatDate(ffe(t.billing.startDate))}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:63,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:62,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:51,columnNumber:7},this),!r&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Uj,{percent:a(i||0,(c=t==null?void 0:t.permissions)==null?void 0:c.totalMessages),showInfo:!1,strokeColor:yd,size:["100%",32]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:80,columnNumber:9},this),v.jsxDEV(Fn.Text,{className:"!text-xs",type:"secondary",children:v.jsxDEV(ee,{id:"organization_dashboard.usage_analytics.per_project.value",defaultMessage:"{value, number} out of {total, number} message credits",values:{value:i||0,total:(u=t==null?void 0:t.permissions)==null?void 0:u.totalMessages}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:90,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:89,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:79,columnNumber:8},this),r&&v.jsxDEV(li,{height:64},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:101,columnNumber:35},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:50,columnNumber:6},this),v.jsxDEV("div",{children:[v.jsxDEV("div",{className:"flex flex-row justify-between w-full",children:v.jsxDEV(aS,{style:{width:"100%"},size:"small",children:[v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"total_training_tokens.analytics.tokens.title",defaultMessage:"Total characters used",description:"Title for the total tokens used in the training analytics card"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:107,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:106,columnNumber:9},this),v.jsxDEV(FBe,{placement:"bottom",message:{id:"total_training_tokens.analytics.tokens.tooltip",defaultMessage:"Character limits are determined by the length of information in the training source."}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:113,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:105,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:104,columnNumber:7},this),!s&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Uj,{percent:a(o,(d=t==null?void 0:t.permissions)==null?void 0:d.trainingTokens),showInfo:!1,strokeColor:yd,size:["100%",32]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:125,columnNumber:9},this),v.jsxDEV(Fn.Text,{className:"!text-xs",type:"secondary",children:v.jsxDEV(ee,{id:"total_training_tokens.analytics.tokens.value",defaultMessage:"{value, number} out of {total, number} characters",values:{value:TRe(o||0),total:TRe(((h=t==null?void 0:t.permissions)==null?void 0:h.trainingTokens)||0)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:135,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:134,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:124,columnNumber:8},this),s&&v.jsxDEV(li,{height:64},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:148,columnNumber:35},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:103,columnNumber:6},this),v.jsxDEV(vn,{className:"inline-flex self-end",type:"primary",onClick:()=>n("/billing"),children:v.jsxDEV(ee,{id:"organization_dashboard.usage_analytics.upgrade",defaultMessage:"Upgrade for more credits"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:151,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:150,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:49,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/UsageAnalytics.tsx",lineNumber:34,columnNumber:3},this)}function hir(){const t=Mt(),{data:e,isLoading:n}=Je.getTotalMessageCreditsBreakdown.useQuery(void 0,{staleTime:3e5});function i(){return n?v.jsxDEV(ja,{active:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/messagesPerProject.tsx",lineNumber:15,columnNumber:34},this):e!=null&&e.length?v.jsxDEV(qs,{rowKey:"_id",dataSource:e,pagination:e.length>20&&{defaultPageSize:20},columns:[{key:"name",dataIndex:"name",title:t.formatMessage({id:"organization_dashboard.messages_per_project.table.project_name",defaultMessage:"Project name"})},{key:"totalMessages",dataIndex:"totalMessages",title:t.formatMessage({id:"organization_dashboard.messages_per_project.table.total_messages",defaultMessage:"Total message credits"}),align:"right"}]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/messagesPerProject.tsx",lineNumber:32,columnNumber:4},this):v.jsxDEV(wh,{image:v.jsxDEV("img",{src:"/img/svg/setup_analytics.svg",className:"h-48 mx-auto"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/messagesPerProject.tsx",lineNumber:20,columnNumber:13},this),description:t.formatMessage({id:"organization_dashboard.messages_per_project.not_enough_data",defaultMessage:"Looks like we don't have enough data yet... Hang tight, we're on the lookout for more!",description:"Fallback message when we don't have enough data yet to generate a graph"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/messagesPerProject.tsx",lineNumber:19,columnNumber:5},this)}return v.jsxDEV(uo,{title:t.formatMessage({id:"organization_dashboard.messages_per_project.title",defaultMessage:"Send messages per project",description:"See breakdown send messages per project"}),bordered:!1,children:v.jsxDEV("section",{className:"flex flex-col space-y-2",children:i()},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/messagesPerProject.tsx",lineNumber:68,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/messagesPerProject.tsx",lineNumber:60,columnNumber:3},this)}function fir(){const t=Mt(),{data:e,isLoading:n}=Je.getOrganization.useQuery(void 0,{staleTime:36e5});return ga(t.formatMessage({id:"organization_dashboard.page.title",defaultMessage:"Organization dashboard - Chathive"})),!e||n?v.jsxDEV("section",{className:"bg-white pt-6 sm:bg-transparent sm:pt-0 sm:grid sm:gap-4 w-full max-w-4xl",children:[v.jsxDEV(li,{height:128},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/index.tsx",lineNumber:25,columnNumber:5},this),v.jsxDEV(li,{height:254},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/index.tsx",lineNumber:26,columnNumber:5},this),v.jsxDEV(li,{height:512},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/index.tsx",lineNumber:27,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/index.tsx",lineNumber:24,columnNumber:4},this):v.jsxDEV("section",{className:"bg-white pt-6 sm:bg-transparent sm:pt-0 sm:grid sm:gap-4 w-full max-w-4xl",children:[v.jsxDEV(dir,{organization:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/index.tsx",lineNumber:34,columnNumber:4},this),v.jsxDEV(uir,{organization:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/index.tsx",lineNumber:35,columnNumber:4},this),v.jsxDEV(hir,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/index.tsx",lineNumber:36,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationDashboard/index.tsx",lineNumber:33,columnNumber:3},this)}function mir({organization:t}){var c,u;const e=Mt(),n=Je.useUtils(),i=Oi(ps),r=Je.updateOrganizationAiService.useMutation(),o=gt.object({aiService:gt.enum(mfe(lri),{required_error:e.formatMessage({id:"organization_settings.ai_settings.form.ai_service.error.required",defaultMessage:"AI service is required"})}),allowOtherAiServicePerProject:gt.boolean()}),s=ls({validateInputOnBlur:!0,initialValues:{aiService:(c=t.config)==null?void 0:c.aiService,allowOtherAiServicePerProject:(u=t.config)==null?void 0:u.allowOtherAiServicePerProject},validate:aa(o)}),a=async d=>{if(d.allowOtherAiServicePerProject){l(d);return}Ev.openConfirmModal({title:e.formatMessage({id:"organization_settings.ai_service.confirm_modal.title",defaultMessage:"This action will update your existing projects"}),children:v.jsxDEV(Gt,{children:[v.jsxDEV(Yo,{color:"orange",variant:"light",icon:v.jsxDEV(ud,{size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:59,columnNumber:50},this),children:v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"organization_settings.ai_service.confirm_modal.description.warning",defaultMessage:"All projects that use another AI service then {aiService} will be changed to {aiService}.",values:{aiService:aE[d.aiService]}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:61,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:60,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:59,columnNumber:6},this),v.jsxDEV(Qe,{c:"dimmed",size:"sm",children:v.jsxDEV(ee,{id:"organization_settings.ai_service.confirm_modal.description.info",defaultMessage:"AI models that are not supported by {aiService} will also be changed to the default models for that project. This might impact it's performance and prompts.",values:{aiService:aE[d.aiService]}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:69,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:68,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:58,columnNumber:5},this),labels:{confirm:e.formatMessage({id:"organization_settings.ai_service.confirm_modal.button.confirm",defaultMessage:"Confirm"}),cancel:e.formatMessage({id:"shared.button.cancel",defaultMessage:"Cancel"})},confirmProps:{loading:r.isLoading},onConfirm:()=>l(d)})},l=async d=>{try{await r.mutateAsync(d),s.setInitialValues(d),s.reset(),n.getOrganization.invalidate(),In.show({color:"green",message:e.formatMessage({id:"organization_settings.ai_service.update.notification.succeeded",defaultMessage:"AI services have been updated"}),autoClose:5e3})}catch(h){console.error("Failed to update organization ai service settings",h),In.show({color:"red",title:e.formatMessage({id:"organization_settings.ai_service.update.notification.failed.title",defaultMessage:"settings could not be updated"}),message:e.formatMessage({id:"organization_settings.ai_service.update.notification.failed.message",defaultMessage:"We cannot update your settings at this time. Check if you didn't make a configuration mistake and try again."}),autoClose:1e4})}};return v.jsxDEV(or,{children:[v.jsxDEV(Gt,{justify:"space-between",gap:2,children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"organization_settings.ai_service.header.title",defaultMessage:"AI settings"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:130,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:129,columnNumber:5},this),v.jsxDEV(zl,{my:"md"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:132,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:128,columnNumber:4},this),v.jsxDEV("form",{onSubmit:s.onSubmit(a),children:[v.jsxDEV(Vo,{id:"aiService",label:e.formatMessage({id:"organization_settings.ai_service.service.label",defaultMessage:"AI service"}),help:e.formatMessage({id:"organization_settings.ai_service.service.help",defaultMessage:"{selectedService} will be used for every AI action in your organization."},{selectedService:Mp(aE[s.values.aiService]||"")}),warning:s.values.aiService==="azureOpenAi"?e.formatMessage({id:"organization_settings.ai_service.service.warning.azure_open_ai",defaultMessage:"Azure OpenAI uses older model versions and might not always perform like expected."}):void 0,children:v.jsxDEV(Fm,{...s.getInputProps("aiService"),readOnly:!i,data:[{value:"azureOpenAi",label:aE.azureOpenAi},{value:"openAi",label:aE.openAi}]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:162,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:135,columnNumber:5},this),v.jsxDEV(Vo,{id:"allowOtherAiServicePerProject",label:e.formatMessage({id:"organization_settings.ai_service.allow_other_ai_service_per_project.label",defaultMessage:"Allow other AI services per project"}),help:e.formatMessage({id:"organization_settings.ai_service.allow_other_ai_service_per_project.help",defaultMessage:"If enabled all projects must use {selectedService} as AI service."},{selectedService:Mp(aE[s.values.aiService]||"")}),children:v.jsxDEV(Du,{readOnly:!i,id:"allowOtherAiServicePerProject",...s.getInputProps("allowOtherAiServicePerProject",{type:"checkbox"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:195,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:177,columnNumber:5},this),i&&v.jsxDEV(Nn,{size:"sm",type:"submit",disabled:!s.isValid()||!s.isDirty(),loading:r.isLoading,children:v.jsxDEV(ee,{id:"shared.submit",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:208,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:202,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:134,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/AISettings.tsx",lineNumber:127,columnNumber:3},this)}function pir(){const t=Mt(),e=Je.useUtils(),n=Oi(ps),{data:i}=Je.getOrganization.useQuery(),r=Je.updateOrganization.useMutation(),o=ls({validateInputOnBlur:!0,validate:aa(gt.object({name:gt.string({required_error:t.formatMessage({id:"organization_settings.form.name.error.required",defaultMessage:"Name is required"})}).max(254,{message:t.formatMessage({id:"organization_settings.form.name.error.max_length",defaultMessage:"Name cannot be longer then 254 characters"})})}))});ga(t.formatMessage({id:"organization_settings.page.title",defaultMessage:"Organization settings - Chathive"})),b.useEffect(()=>{i&&(o.setValues({name:i.name}),o.setInitialValues({name:i.name||""}),o.reset())},[i]);const s=async()=>{try{await r.mutateAsync(o.values),e.getOrganization.invalidate(),e.getOrganizations.invalidate(),In.show({color:"green",message:t.formatMessage({id:"organization_settings.update.notification.succeeded",defaultMessage:"organization has been updated"}),autoClose:5e3})}catch(a){console.error("Failed to update organization",a),In.show({color:"red",title:t.formatMessage({id:"organization_settings.update.notification.failed.title",defaultMessage:"organization could not be updated"}),message:t.formatMessage({id:"organization_settings.update.notification.failed.message",defaultMessage:"We cannot update your organization at this time. Check if you didn't make a configuration mistake and try again."}),autoClose:1e4})}};return i?v.jsxDEV("div",{className:"w-full max-w-screen-xl bg-white pt-6 sm:bg-transparent sm:pt-0 sm:gap-4 flex flex-col",children:[v.jsxDEV(or,{children:[v.jsxDEV(Gt,{justify:"space-between",gap:2,children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"organization_settings.header.title",defaultMessage:"organization settings"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/index.tsx",lineNumber:108,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/index.tsx",lineNumber:107,columnNumber:6},this),v.jsxDEV(zl,{my:"md"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/index.tsx",lineNumber:113,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/index.tsx",lineNumber:106,columnNumber:5},this),v.jsxDEV("form",{onSubmit:o.onSubmit(s),children:[v.jsxDEV(Vo,{id:"isEnabled",label:t.formatMessage({id:"organization_settings.form.name.label",defaultMessage:"Organization name"}),children:v.jsxDEV(pa,{...o.getInputProps("name"),readOnly:!n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/index.tsx",lineNumber:123,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/index.tsx",lineNumber:116,columnNumber:6},this),n&&v.jsxDEV(Nn,{size:"sm",type:"submit",loading:r.isLoading,disabled:!o.isValid()||!o.isDirty(),children:v.jsxDEV(ee,{id:"shared.submit",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/index.tsx",lineNumber:132,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/index.tsx",lineNumber:126,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/index.tsx",lineNumber:115,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/index.tsx",lineNumber:105,columnNumber:4},this),v.jsxDEV(mir,{organization:i},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/index.tsx",lineNumber:137,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/index.tsx",lineNumber:104,columnNumber:3},this):v.jsxDEV("div",{className:"w-full max-w-screen-xl bg-white pt-6 sm:bg-transparent sm:pt-0 sm:gap-4 flex flex-col",children:[v.jsxDEV(li,{width:"100%",height:254},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/index.tsx",lineNumber:97,columnNumber:5},this),v.jsxDEV(li,{width:"100%",height:254},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/index.tsx",lineNumber:98,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/OrganizationSettings/index.tsx",lineNumber:96,columnNumber:4},this)}const gir=Ja.getAllCodes();function wS({mode:t,locales:e,exclude:n,isLoading:i,strict:r=!0,...o}){const s=Mt(),a=b.useMemo(()=>{let u=gir,d=[];return e&&(d=[...e].filter(h=>!(n!=null&&n.has(h)))),!r&&e&&d.length?[...l(d),{group:s.formatMessage({id:"shared.component.language_select.other_languages",defaultMessage:"Other languages"}),items:l(u.filter(h=>!(n!=null&&n.has(h))&&!e.has(h)))}]:r&&e?l(d):(n!=null&&n.size&&(u=u.filter(h=>!(n!=null&&n.has(h)))),l(u))},[e,n]);function l(u){return u.map(d=>({value:d,label:Ja.getName(d)})).sort((d,h)=>d.label.localeCompare(h.label))}const c=({search:u,options:d})=>d.reduce((h,f)=>{var m;if("group"in f){const p=c({search:u,options:f.items});return p.length?[...h,{...f,items:p}]:h}return(m=f.label)!=null&&m.toLowerCase().includes(u.toLowerCase())?[...h,f]:h},[]);return t==="multiple"?v.jsxDEV(PA,{searchable:!0,data:a,disabled:i,filter:c,...o,rightSection:i&&v.jsxDEV(pie,{className:"animate-spin text-theme-primary"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/LanguageSelect.tsx",lineNumber:88,columnNumber:32},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/LanguageSelect.tsx",lineNumber:82,columnNumber:4},this):v.jsxDEV(Fm,{searchable:!0,data:a,disabled:i,filter:c,...o,rightSection:i&&v.jsxDEV(pie,{className:"animate-spin text-theme-primary"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/LanguageSelect.tsx",lineNumber:100,columnNumber:31},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/LanguageSelect.tsx",lineNumber:94,columnNumber:3},this)}const bir=({isOpen:t,onClose:e})=>{const n=Mt(),{data:i}=Je.getAllowedProjectTypesForNewProject.useQuery(),r=gt.object({name:gt.string().min(1,{message:n.formatMessage({id:"projects_overview.add_project.form.name.error.min_length",defaultMessage:"Name must have at least one character"})}).max(48,{message:n.formatMessage({id:"projects_overview.add_project.form.name.error.max_length",defaultMessage:"Name cannot be longer then 48 characters"})}),projectType:gt.enum(uri),defaultLanguage:gt.string({message:n.formatMessage({id:"projects_overview.add_project.form.default_language.error.min_length",defaultMessage:"Default language is a required field"})})}),[o,s]=b.useState(!1),a=ls({mode:"uncontrolled",validateInputOnBlur:!0,initialValues:{name:"",projectType:void 0,defaultLanguage:"en"},validate:iOt(r),onValuesChange:()=>{s(a.isValid())}});b.useEffect(()=>{i&&a.setFieldValue("projectType",i[0])},[i]);const l=Qr(),c=Je.project.create.useMutation(),u=async f=>{var m,p;try{const g=await c.mutateAsync({...f,defaultLanguage:f.defaultLanguage});switch(In.show({color:"green",placement:"bottomRight",message:n.formatMessage({id:"projects_overview.add_project_modal.success",defaultMessage:"{name} has been created successfully.",description:"Success notifications when project has been created"},{name:Mp(g.name)})}),g.projectType){case"chatbot":l(`/${g._id}/agent`);break;case"aiForm":l(`/${g._id}/form-config`);break}e()}catch(g){const y=g;let _=n.formatMessage({id:"projects_overview.add_project_modal.error.generic",defaultMessage:"Something went wrong while trying to create your {projectType} project. Try again later.",description:"Project could not be created, because our server crashed or could not connect to server"},{projectType:f.projectType});((m=y==null?void 0:y.data)==null?void 0:m.httpStatus)===401&&(_=n.formatMessage({id:"projects_overview.add_project_modal.error.limited_reached",defaultMessage:"You have reached your {projectType} project limit. Upgrade to a higher tier to add more projects.",description:"Show error user has reached their billing limit of total projects they can have"},{projectType:f.projectType})),((p=y==null?void 0:y.data)==null?void 0:p.httpStatus)===409&&(_=n.formatMessage({id:"projects_overview.add_project_modal.error.duplicate",defaultMessage:"You already have a project named `{projectName}`.",description:"Show error to user they already have a project with this name"},{projectName:f.name})),In.show({color:"red",placement:"bottomRight",message:_})}},d=()=>l("/billing"),h=()=>{a.reset(),e()};return v.jsxDEV(bl,{opened:t,onClose:h,title:n.formatMessage({id:"projects_overview.add_project_modal.title",defaultMessage:"Create Project"}),closeButtonProps:{"aria-label":n.formatMessage({id:"shared.modal.close",defaultMessage:"Close modal"})},children:v.jsxDEV("form",{onSubmit:a.onSubmit(u),children:[v.jsxDEV(Gt,{gap:"xs",children:[v.jsxDEV(pa,{size:"xs",...a.getInputProps("name"),label:n.formatMessage({id:"projects_overview.add_project_modal.form.name.label",defaultMessage:"Project name"}),placeholder:n.formatMessage({id:"projects_overview.add_project_modal.form.name.placeholder",defaultMessage:"E.g. My cool AI chatbot"})},a.key("name"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:165,columnNumber:6},void 0),v.jsxDEV(wS,{size:"xs",allowDeselect:!1,...a.getInputProps("defaultLanguage"),label:n.formatMessage({id:"projects_overview.add_project_modal.default_language.label",defaultMessage:"Default language"}),placeholder:n.formatMessage({id:"projects_overview.add_project_modal.default_language.placeholder",defaultMessage:"Choose the default language."})},a.key("defaultLanguage"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:178,columnNumber:6},void 0),v.jsxDEV(vir,{size:"xs",...a.getInputProps("projectType"),label:n.formatMessage({id:"projects_overview.add_project_modal.project_type.label",defaultMessage:"Project type"}),onUpgradeClick:d,allowedProjectTypes:i||[]},a.key("projectType"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:192,columnNumber:6},void 0)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:164,columnNumber:5},void 0),v.jsxDEV(un,{justify:"end",mt:"sm",children:[v.jsxDEV(Nn,{size:"xs",variant:"outline",onClick:h,children:v.jsxDEV(ee,{id:"shared.modal.footer.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:206,columnNumber:7},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:205,columnNumber:6},void 0),v.jsxDEV(Nn,{size:"xs",disabled:!o,type:"submit",loading:c.isLoading,children:v.jsxDEV(ee,{id:"projects_overview.add_project_modal.submit",defaultMessage:"Create project"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:209,columnNumber:7},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:208,columnNumber:6},void 0)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:204,columnNumber:5},void 0)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:163,columnNumber:4},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:152,columnNumber:3},void 0)};function vir({allowedProjectTypes:t,onUpgradeClick:e,...n}){const i=Mt();return v.jsxDEV(g0.Group,{...n,children:v.jsxDEV(un,{gap:"xs",children:Object.entries(Uee).map(([r,o])=>{const s=!(t!=null&&t.includes(r)),a=r==="aiForm";return s?v.jsxDEV(or,{withBorder:!0,p:"sm",children:v.jsxDEV(Gt,{gap:"xs",children:[v.jsxDEV(vpt,{disabled:s,name:i.formatMessage(o),description:i.formatMessage(F9[r]),comingSoon:s&&a},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:239,columnNumber:10},this),s&&!a&&v.jsxDEV(Nn,{size:"xs",variant:"light",onClick:e,className:"!cursor-pointer",children:v.jsxDEV(ee,{id:"projects_overview.add_project_modal.project_type.upgrade_button.label",defaultMessage:"Upgrade to unlock more {type} projects",values:{type:i.formatMessage(o)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:252,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:246,columnNumber:11},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:238,columnNumber:9},this)},r,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:237,columnNumber:8},this):v.jsxDEV(g0.Card,{p:"sm",value:r,"aria-label":i.formatMessage({id:"projects_overview.add_project_modal.project_type.aria_label",defaultMessage:"{label} project type"},{label:i.formatMessage(o)}),className:"hover:shadow-md data-[checked='true']:border-theme-primary",children:v.jsxDEV(un,{wrap:"nowrap",gap:"xs",align:"flex-start",children:[v.jsxDEV(g0.Indicator,{size:"xs"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:278,columnNumber:9},this),v.jsxDEV(Gt,{gap:"xs",children:v.jsxDEV(vpt,{name:i.formatMessage(o),description:i.formatMessage(F9[r]),comingSoon:a},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:280,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:279,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:277,columnNumber:8},this)},r,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:264,columnNumber:7},this)})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:230,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:229,columnNumber:3},this)}function vpt({name:t,description:e,disabled:n,comingSoon:i}){return v.jsxDEV("div",{children:[v.jsxDEV(un,{gap:4,children:[v.jsxDEV(Qe,{size:"xs",fw:"bold",c:n||i?"dimmed":"",children:t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:306,columnNumber:5},this),i&&v.jsxDEV(jc,{size:"xs",color:"violet",radius:"md",variant:"light",children:v.jsxDEV(ee,{id:"shared.early_access",defaultMessage:"Early access"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:311,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:310,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:305,columnNumber:4},this),v.jsxDEV(Qe,{c:"dimmed",size:"xs",children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:315,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/components/AddProject.tsx",lineNumber:304,columnNumber:3},this)}function yir(){const t=Mt(),e=Qr(),n=Oi(ps),[i,r]=b.useState(1),[o,s]=b.useState(!1),[a,l]=Bv(),c={projectType:a.get("projectType")||void 0,q:a.get("q")??"",disabledOnly:!!a.get("disabledOnly")},[u]=jSn(c.q,200),d=ls({mode:"uncontrolled",initialValues:c,onValuesChange:_=>{const w=Object.entries(_).reduce((C,[N,E])=>(!E||zp(E)||(C[N]=E),C),{});l(w)}}),h=20,{data:f,isLoading:m}=Je.project.getAll.useQuery({projectType:c.projectType,disabledOnly:c.disabledOnly,q:u,offset:(i-1)*h,limit:h}),p=((f==null?void 0:f.total)||0)/h,g=()=>{s(!0)},y=_=>{if(_.projectType==="aiForm"){e(`/${_._id}/sessions`);return}e(`/${_._id}`)};return ga(t.formatMessage({id:"projects_overview.page.title",defaultMessage:"Projects - Chathive",description:"Browser tab title for project overview page"})),v.jsxDEV("section",{className:"grid gap-4 w-full max-w-4xl",children:[v.jsxDEV(or,{children:v.jsxDEV(Gt,{children:[v.jsxDEV("div",{children:[v.jsxDEV(_ir,{children:n&&v.jsxDEV(Nn,{variant:"filled",size:"xs",onClick:g,children:v.jsxDEV(ee,{id:"projects_overview.table.button.add_project",defaultMessage:"Add Project"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:116,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:115,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:113,columnNumber:7},this),v.jsxDEV("form",{children:v.jsxDEV("div",{className:"grid grid-flow-col gap-4 items-end",children:[v.jsxDEV(pa,{size:"xs",...d.getInputProps("q"),label:t.formatMessage({id:"project_overview.filter.q.label",defaultMessage:"Search"}),placeholder:t.formatMessage({id:"project_overview.filter.q.placeholder",defaultMessage:"Search by project name"})},d.key("q"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:125,columnNumber:9},this),v.jsxDEV(Fm,{size:"xs",clearable:!0,clearButtonProps:{"aria-label":t.formatMessage({id:"project_overview.filter.projectType.clear",defaultMessage:"Clear project type"})},...d.getInputProps("projectType"),label:t.formatMessage({id:"project_overview.filter.project_type.label",defaultMessage:"Project type"}),placeholder:t.formatMessage({id:"project_overview.filter.project_type.placeholder",defaultMessage:"All project types"}),data:Object.entries(Uee).map(([_,w])=>({value:_,label:t.formatMessage(w)}))},d.key("projectType"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:138,columnNumber:9},this),v.jsxDEV(Du,{size:"xs",className:"mb-2",...d.getInputProps("disabledOnly",{type:"checkbox"}),label:t.formatMessage({id:"project_overview.filter.disabled_only.label",defaultMessage:"Show disabled only"})},d.key("disabledOnly"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:162,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:124,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:123,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:112,columnNumber:6},this),!m&&!!(f!=null&&f.total)&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(hn.ScrollContainer,{minWidth:600,type:"native",className:"rounded-md",children:v.jsxDEV(hn,{highlightOnHover:!0,className:"rounded-md overflow-hidden",children:[v.jsxDEV(hn.Thead,{className:"bg-[var(--mantine-color-gray-1)]",children:v.jsxDEV(hn.Tr,{children:[v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"projects_overview.table.column.name",defaultMessage:"Project name"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:182,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:181,columnNumber:12},this),v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"projects_overview.table.column.project_type",defaultMessage:"Project type"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:188,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:187,columnNumber:12},this),v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"projects_overview.table.column.disabled_at",defaultMessage:"Disabled at"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:194,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:193,columnNumber:12},this),v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"projects_overview.table.column.created_at",defaultMessage:"Created at"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:200,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:199,columnNumber:12},this),v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"projects_overview.table.column.updated_at",defaultMessage:"Updated at"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:206,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:205,columnNumber:12},this),v.jsxDEV(hn.Th,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:211,columnNumber:12},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:180,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:179,columnNumber:10},this),v.jsxDEV(hn.Tbody,{children:f==null?void 0:f.result.map(_=>v.jsxDEV(hn.Tr,{className:"cursor-pointer",onClick:()=>y(_),children:[v.jsxDEV(hn.Td,{className:"align-middle",children:v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV(IS,{size:"sm",radius:"md",src:_.avatar},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:224,columnNumber:16},this),v.jsxDEV(Qe,{size:"sm",truncate:"end",children:_.name},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:225,columnNumber:16},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:223,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:222,columnNumber:14},this),v.jsxDEV(hn.Td,{className:"align-middle",children:v.jsxDEV(jc,{color:dri[_.projectType],variant:"light",children:Uee[_.projectType]&&v.jsxDEV(ee,{...Uee[_.projectType]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:236,columnNumber:17},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:231,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:230,columnNumber:14},this),v.jsxDEV(hn.Td,{className:"align-middle",children:_.disabledAt&&v.jsxDEV(Qe,{size:"sm",truncate:"end",children:v.jsxDEV(tu,{value:_.disabledAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:245,columnNumber:18},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:244,columnNumber:16},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:242,columnNumber:14},this),v.jsxDEV(hn.Td,{className:"align-middle",children:v.jsxDEV(Qe,{size:"sm",truncate:"end",children:v.jsxDEV(tu,{value:_.createdAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:251,columnNumber:17},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:250,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:249,columnNumber:14},this),v.jsxDEV(hn.Td,{className:"align-middle",children:v.jsxDEV(Qe,{size:"sm",truncate:"end",children:v.jsxDEV(tu,{value:_.updatedAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:256,columnNumber:17},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:255,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:254,columnNumber:14},this),v.jsxDEV(hn.Td,{className:"align-middle",children:v.jsxDEV(Fr,{onClick:()=>y(_),"aria-label":t.formatMessage({id:"projects_overview.table.column.go_detail.label",defaultMessage:`Go to project detail of ${_.name}`}),variant:"subtle",children:v.jsxDEV(Q$e,{size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:268,columnNumber:16},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:260,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:259,columnNumber:14},this)]},_._id,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:217,columnNumber:13},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:214,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:178,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:177,columnNumber:8},this),p>1&&v.jsxDEV(uu,{justify:"flex-end",children:v.jsxDEV(Kh,{size:"sm",hideWithOnePage:!0,total:p,value:i,onChange:r},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:279,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:278,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:176,columnNumber:7},this),!m&&!(f!=null&&f.total)&&v.jsxDEV(iw,{className:"p-8",children:v.jsxDEV(Zd,{title:t.formatMessage({id:"project_overview.table.no_results",defaultMessage:"No projects found matching your filters."}),src:"/img/svg/no_results.svg",children:c.disabledOnly&&v.jsxDEV(Yo,{icon:v.jsxDEV(uq,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:301,columnNumber:17},this),variant:"light",color:"blue",title:t.formatMessage({id:"project_overview.table.no_results_disabled",defaultMessage:"Disabled projects can no longer be modified or utilized."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:300,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:292,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:291,columnNumber:7},this),m&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:315,columnNumber:8},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:316,columnNumber:8},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:317,columnNumber:8},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:318,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:314,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:111,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:110,columnNumber:4},this),v.jsxDEV(bir,{isOpen:o,onClose:()=>s(!1)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:323,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:109,columnNumber:3},this)}function _ir({children:t}){return v.jsxDEV(un,{justify:"space-between",className:"mb-4",children:[v.jsxDEV(un,{gap:"sm",children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"projects_overview.table.title",defaultMessage:"Projects overview"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:333,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:332,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:331,columnNumber:4},this),v.jsxDEV(un,{gap:"sm",children:t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:336,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/ProjectsOverview/index.tsx",lineNumber:330,columnNumber:3},this)}const xir=[{path:"dashboard",element:v.jsxDEV(PN,{children:v.jsxDEV(fir,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:19,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:18,columnNumber:4},void 0)},{path:"crawler/:crawlerId",element:v.jsxDEV(rir,{children:v.jsxDEV(Cj,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:27,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:26,columnNumber:4},void 0),children:oir},{path:"crawler",element:v.jsxDEV(PN,{children:v.jsxDEV(Eci,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:36,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:35,columnNumber:4},void 0)},{path:"api_key/:keyId",element:v.jsxDEV(PN,{children:v.jsxDEV(Zli,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:44,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:43,columnNumber:4},void 0)},{path:"api_key",element:v.jsxDEV(PN,{children:v.jsxDEV(Jli,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:52,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:51,columnNumber:4},void 0)},{path:"projects",element:v.jsxDEV(PN,{children:v.jsxDEV(yir,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:60,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:59,columnNumber:4},void 0)},{path:"members",element:v.jsxDEV(PN,{children:v.jsxDEV(lir,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:68,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:67,columnNumber:4},void 0)},{path:"billing",element:v.jsxDEV(PN,{children:v.jsxDEV(Sci,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:76,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:75,columnNumber:4},void 0)},{path:"settings",element:v.jsxDEV(PN,{className:"!justify-start",children:v.jsxDEV(pir,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:84,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/index.tsx",lineNumber:83,columnNumber:4},void 0)}],ACe=5;function wir({}){const t=Mt(),[e]=Bv(),n=e.get("status");async function i(){let r=structuredClone(ACe);do await SPt(1e3),r=r-1;while(r>0);window.opener&&window.opener.focus(),window.close()}return b.useEffect(()=>{i()},[]),n==="cancelled"?v.jsxDEV("section",{className:"h-screen pt-48",children:v.jsxDEV(fd,{status:"error",title:t.formatMessage({id:"billing_completed.failed.title",defaultMessage:"Payment could not be processed",description:"Title of splits screen that will be shown when payment failed"}),subTitle:t.formatMessage({id:"billing_completed.failed.description",defaultMessage:"Something went wrong while processing your payment. You will be redirected back in {seconds, plural, =1 {# second} other {# seconds}}.",description:"Description that will be shown after payment before user will be redirected back to the dashboard"},{seconds:ACe})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/completed.tsx",lineNumber:36,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/completed.tsx",lineNumber:35,columnNumber:4},this):v.jsxDEV("section",{className:"h-screen pt-48",children:v.jsxDEV(fd,{status:"success",title:t.formatMessage({id:"billing_completed.success.title",defaultMessage:"Payment successful",description:"Title of splits screen that will be shown after payment before user will be redirected back to the dashboard"}),subTitle:t.formatMessage({id:"billing_completed.success.description",defaultMessage:"Your payment has been accepted, you will be redirected back in {seconds, plural, =1 {# second} other {# seconds}}.",description:"Description that will be shown after payment before user will be redirected back to the dashboard"},{seconds:ACe})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/completed.tsx",lineNumber:61,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/completed.tsx",lineNumber:60,columnNumber:3},this)}const x9t=[{id:"agriculture",label:{id:"sign_up.company_info.activities.options.agriculture",defaultMessage:"Agriculture"}},{id:"arts",label:{id:"sign_up.company_info.activities.options.arts",defaultMessage:"Arts"}},{id:"charity",label:{id:"sign_up.company_info.activities.options.charity",defaultMessage:"Charity"}},{id:"construction",label:{id:"sign_up.company_info.activities.options.construction",defaultMessage:"Construction"}},{id:"consulting",label:{id:"sign_up.company_info.activities.options.consulting",defaultMessage:"Consulting"}},{id:"consumerGoods",label:{id:"sign_up.company_info.activities.options.consumer_goods",defaultMessage:"Consumer Goods"}},{id:"corporateServices",label:{id:"sign_up.company_info.activities.options.corporate_services",defaultMessage:"Corporate Services"}},{id:"design",label:{id:"sign_up.company_info.activities.options.design",defaultMessage:"Design"}},{id:"e-commerce",label:{id:"sign_up.company_info.activities.options.e_commerce",defaultMessage:"E-commerce"}},{id:"education",label:{id:"sign_up.company_info.activities.options.education",defaultMessage:"Education"}},{id:"energy",label:{id:"sign_up.company_info.activities.options.energy",defaultMessage:"Energy & Mining"}},{id:"entertainment",label:{id:"sign_up.company_info.activities.options.entertainment",defaultMessage:"Entertainment"}},{id:"events",label:{id:"sign_up.company_info.activities.options.events",defaultMessage:"Events"}},{id:"finance",label:{id:"sign_up.company_info.activities.options.finance",defaultMessage:"Finance"}},{id:"government",label:{id:"sign_up.company_info.activities.options.government",defaultMessage:"Government"}},{id:"hardware",label:{id:"sign_up.company_info.activities.options.hardware",defaultMessage:"Hardware & Networking"}},{id:"healthCare",label:{id:"sign_up.company_info.activities.options.health_care",defaultMessage:"Health Care"}},{id:"hr",label:{id:"sign_up.company_info.activities.options.hr",defaultMessage:"HR"}},{id:"legal",label:{id:"sign_up.company_info.activities.options.legal",defaultMessage:"Legal"}},{id:"manufacturing",label:{id:"sign_up.company_info.activities.options.manufacturing",defaultMessage:"Manufacturing"}},{id:"MarketingAgency",label:{id:"sign_up.company_info.activities.options.Marketing_agency",defaultMessage:"Marketing agency"}},{id:"mediaAndCommunications",label:{id:"sign_up.company_info.activities.options.media",defaultMessage:"Media & Communications"}},{id:"nonprofit",label:{id:"sign_up.company_info.activities.options.nonprofit",defaultMessage:"Nonprofit"}},{id:"publicAdministration",label:{id:"sign_up.company_info.activities.options.public_administration",defaultMessage:"Public Administration"}},{id:"publicSafety",label:{id:"sign_up.company_info.activities.options.public_safety",defaultMessage:"Public Safety"}},{id:"realEstate",label:{id:"sign_up.company_info.activities.options.real_estate",defaultMessage:"Real Estate"}},{id:"recreationAndTravel",label:{id:"sign_up.company_info.activities.options.recreation_and_travel",defaultMessage:"Recreation & Travel"}},{id:"retail",label:{id:"sign_up.company_info.activities.options.retail",defaultMessage:"Retail"}},{id:"saas",label:{id:"sign_up.company_info.activities.options.saas",defaultMessage:"SaaS"}},{id:"softwareAndIT",label:{id:"sign_up.company_info.activities.options.software_and_it",defaultMessage:"Software & IT Services"}},{id:"tourism",label:{id:"sign_up.company_info.activities.options.tourism",defaultMessage:"Tourism"}},{id:"tradeUnion",label:{id:"sign_up.company_info.activities.options.trade_union",defaultMessage:"Trade union"}},{id:"transportationAndLogistics",label:{id:"sign_up.company_info.activities.options.transportation_and_logistics",defaultMessage:"Transportation & Logistics"}},{id:"wellnessAndFitness",label:{id:"sign_up.company_info.activities.options.wellness_and_fitness",defaultMessage:"Wellness & Fitness"}},{id:"other",label:{id:"sign_up.company_info.activities.options.other",defaultMessage:"Other"}}],Cir=[{id:"0_9",label:{id:"sign_up.company_info.size.options.0_9",defaultMessage:"0 - 9"}},{id:"10_24",label:{id:"sign_up.company_info.size.options.10_24",defaultMessage:"10 - 24"}},{id:"25_49",label:{id:"sign_up.company_info.size.options.25_49",defaultMessage:"25 - 49"}},{id:"50_99",label:{id:"sign_up.company_info.size.options.50_99",defaultMessage:"50 - 99"}},{id:"100_249",label:{id:"sign_up.company_info.size.options.100_249",defaultMessage:"100 - 249"}},{id:"250_499",label:{id:"sign_up.company_info.size.options.250_499",defaultMessage:"250 - 499"}},{id:"500_more",label:{id:"sign_up.company_info.size.options.500_more",defaultMessage:"500 or more"}}],Sir=Ja.getAllCodes();function u$({ref:t,size:e,mode:n,value:i,locales:r,exclude:o,variant:s,className:a,popupClassName:l,placeholder:c,allowClear:u,disabled:d,onChange:h}){const f=b.useMemo(()=>{let m=Sir;return r&&(m=[...r]),o!=null&&o.size&&(m=m.filter(p=>!(o!=null&&o.has(p)))),m.map(p=>({value:p,label:Ja.getName(p)})).sort((p,g)=>p.label.localeCompare(g.label))},[r,o]);return v.jsxDEV(Lo,{ref:t,showSearch:!0,size:e,mode:n,value:i,variant:s,options:f,disabled:d,onChange:h,className:a,notFoundContent:null,allowClear:u,placeholder:c,popupMatchSelectWidth:!1,popupClassName:l,filterOption:(m,p)=>`${(p==null?void 0:p.label)||""} ${(p==null?void 0:p.value)||""}`.toLowerCase().includes(m.toLowerCase())},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/LanguageSelector.tsx",lineNumber:57,columnNumber:3},this)}function Nir({isOpen:t,onClose:e}){const n=Mt(),i=Qr(),[r]=Ut.useForm(),[o,s]=b.useState(),a=Ut.useWatch("planId",r),l=Je.reseller.createOrganization.useMutation(),c=async()=>{var g,y;const{language:f,userEmail:m,...p}=r.getFieldsValue();try{const _=await l.mutateAsync({language:f,user:{email:m},organization:p});Ei.success({placement:"bottomRight",message:n.formatMessage({id:"organization_overview.add_organization_modal.success",defaultMessage:"{name} has been created successfully.",description:"Success notification when organization has been created"},{name:Mp(p.name)})}),localStorage.setItem("organizationId",_._id),i("/projects"),e()}catch(_){const w=_;(g=w.message)!=null&&g.includes("RFC 5322")&&s(n.formatMessage({id:"organization_overview.add_organization_modal.email.invalid",defaultMessage:"It seems your email format doesn't meet the RFC 5322 standard",description:"Error partner email is not correctly formatted according RFC 5322 standard"})),(y=w.message)!=null&&y.includes("IS_OWNER")&&s(n.formatMessage({id:"organization_overview.add_organization_modal.email.is_owner",defaultMessage:"A user with this email already owns an organization",description:"Error message, user with this email is already the owner of a organization"}));let C=n.formatMessage({id:"organization_overview.add_organization_modal.error.generic",defaultMessage:"Something went wrong while creating the new organization. Try again later or contact our support.",description:"Organization could not be created, because our server crashed or could not connect to the server"});Ei.error({placement:"bottomRight",message:C})}},u=()=>{r.resetFields(),e()},d=b.useMemo(()=>{const f=e5.map(p=>{const g=n.formatMessage(p.name);if(p.isCustom){const w=n.formatMessage({id:"organization_overview.add_organization_modal.form.planId.option.custom.monthly",defaultMessage:"Monthly - (Custom price)"}),C=n.formatMessage({id:"organization_overview.add_organization_modal.form.planId.option.custom.annually",defaultMessage:"Annually - (Custom price)"});return{label:g,options:[{data:`${g} ${w.toLowerCase()}`,value:p.planId.monthly,label:w},{data:`${g} ${C.toLowerCase()}`,value:p.planId.annually,label:C}]}}const y=n.formatMessage({id:"organization_overview.add_organization_modal.form.planId.option.monthly",defaultMessage:"Monthly - ({price, plural, =0 {Free} other {€ {formattedPrice}}})"},{price:p.price.monthly,formattedPrice:n.formatNumber(Sie(p.price.monthly),{minimumFractionDigits:0,maximumFractionDigits:2})}),_=n.formatMessage({id:"organization_overview.add_organization_modal.form.planId.option.annually",defaultMessage:"Annually - ({price, plural, =0 {Free} other {€ {formattedPrice}}})"},{price:p.price.annually,formattedPrice:n.formatNumber(Sie(p.price.annually),{minimumFractionDigits:0,maximumFractionDigits:2})});return{label:g,options:[{data:`${g} ${y.toLowerCase()}`,value:p.planId.monthly,label:y},{data:`${g} ${_.toLowerCase()}`,value:p.planId.annually,label:_}]}}),m=n.formatMessage({id:"organization_overview.add_organization_modal.form.trial_plan.description",defaultMessage:"30 day free trial"});return[{label:n.formatMessage({id:"organization_overview.add_organization_modal.form.trial_plan.label",defaultMessage:"Trial"}),options:[{value:"trial",data:m,label:m}]},...f]},[]),h=b.useMemo(()=>e5.find(f=>f.planId.monthly===a||f.planId.annually===a),[a]);return v.jsxDEV(Ma,{title:n.formatMessage({id:"organization_overview.add_organization_modal.title",defaultMessage:"Create organization"}),open:t,onCancel:u,footer:[v.jsxDEV("div",{className:"flex justify-between items-center w-full",children:[v.jsxDEV(vn,{type:"text",onClick:u,children:v.jsxDEV(ee,{id:"organization_overview.add_organization_modal.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:208,columnNumber:7},this)},"back",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:207,columnNumber:6},this),v.jsxDEV(vn,{type:"primary",htmlType:"submit",form:"createResellerOrganization",loading:l.isLoading,children:v.jsxDEV(ee,{id:"organization_overview.add_organization_modal.submit",defaultMessage:"Create organization"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:220,columnNumber:7},this)},"submit",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:213,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:206,columnNumber:5},this)],children:v.jsxDEV(Ut,{form:r,layout:"vertical",className:"!mt-4",requiredMark:!1,id:"createResellerOrganization",onFinish:c,initialValues:{language:"en",planId:"trial"},children:[v.jsxDEV(Ut.Item,{name:"name",className:"!mb-2",rules:[{required:!0,message:n.formatMessage({id:"organization_overview.add_organization_modal.form.name.required",defaultMessage:"Give the organization a name."})}],label:n.formatMessage({id:"organization_overview.add_organization_modal.form.name.label",defaultMessage:"Organization name"}),children:v.jsxDEV(es,{size:"large",maxLength:64,showCount:!1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:254,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:237,columnNumber:5},this),v.jsxDEV(Ut.Item,{name:"language",className:"!mb-2 w-full max-w-lg",rules:[{required:!0,message:n.formatMessage({id:"organization_overview.add_organization_modal.form.language.validation",defaultMessage:"Please select a language."})}],label:n.formatMessage({id:"organization_overview.add_organization_modal.form.language.label",defaultMessage:"Default language"}),children:v.jsxDEV(u$,{size:"large",placeholder:n.formatMessage({id:"organization_overview.add_organization_modal.form.language.placeholder",defaultMessage:"Choose the default language."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:273,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:256,columnNumber:5},this),v.jsxDEV(Ut.Item,{name:"activity",className:"!mb-0",rules:[{required:!0,message:n.formatMessage({id:"organization_overview.add_organization_modal.form.activity.validation",defaultMessage:"Please select the organization's main activity."})}],label:n.formatMessage({id:"organization_overview.add_organization_modal.form.activity.label",defaultMessage:"Activity"}),extra:n.formatMessage({id:"organization_overview.add_organization_modal.form.activity.help",defaultMessage:"Activity is used to help train the agent.",description:"Explain we use the activity to setup the first project"}),children:v.jsxDEV(Lo,{showSearch:!0,size:"large",filterOption:(f,m)=>{const p=`${(m==null?void 0:m.label)||""} ${(m==null?void 0:m.value)||""}`.toLowerCase();return p.includes(f.toLowerCase())||p.includes("other")},options:x9t.map(f=>({value:f.id,label:n.formatMessage(f.label)}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:303,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:281,columnNumber:5},this),v.jsxDEV(ZD,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:317,columnNumber:5},this),v.jsxDEV(Ut.Item,{name:"planId",rules:[{required:!0,message:n.formatMessage({id:"organization_overview.add_organization_modal.form.planId.validation",defaultMessage:"Please select a plan for the organization."})}],label:n.formatMessage({id:"organization_overview.add_organization_modal.form.planId.label",defaultMessage:"Plan"}),children:v.jsxDEV(Lo,{showSearch:!0,size:"large",options:d,allowClear:!1,optionLabelProp:"data",filterOption:(f,m)=>{var p,g;return((g=(p=m==null?void 0:m.label)==null?void 0:p.toLowerCase())==null?void 0:g.includes(f.toLowerCase()))||!0}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:334,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:318,columnNumber:5},this),(h==null?void 0:h.isCustom)&&v.jsxDEV(pl,{message:n.formatMessage({id:"organization_overview.add_organization_modal.form.planId.alert.description",defaultMessage:"You will be contacted by us to further configure this plan."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:346,columnNumber:6},this),v.jsxDEV(ZD,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:353,columnNumber:5},this),v.jsxDEV(Ut.Item,{name:"userEmail",className:"w-full",label:n.formatMessage({id:"organization_overview.add_organization_modal.form.email.label",defaultMessage:"Partner email",description:"Email address of the user for whom the reseller creates the organization, is optional"}),rules:[{pattern:new RegExp(/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/),message:n.formatMessage({id:"organization_overview.add_organization_modal.form.email.validation.invalid_email",defaultMessage:"Please enter a valid email address."})}],children:v.jsxDEV(es,{type:"email",size:"large",status:o?"error":void 0,prefix:o?v.jsxDEV(wAt,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:379,columnNumber:35},this):void 0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:375,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:354,columnNumber:5},this),o&&v.jsxDEV(pl,{type:"error",message:o},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:382,columnNumber:27},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:228,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/components/AddOrganization.tsx",lineNumber:198,columnNumber:3},this)}function Eir(){var _;const t=Mt(),e=Qr(),[n,i]=b.useState(""),[r,o]=b.useState(20),[s,a]=b.useState(1),[l,c]=b.useState(!1),{data:u}=Je.getAuthUser.useQuery(),{data:d,isLoading:h,isError:f}=Je.getOrganizations.useQuery({offset:(s-1)*r,limit:r,q:n}),m=w=>{i(w),a(1)},p=w=>{localStorage.setItem("organizationId",w),e("/projects")},g=w=>{a(1),o(Number(w))};ga(t.formatMessage({id:"organizations_overview.page.title",defaultMessage:"Organizations - Chathive",description:"Browser tab title for organizations overview page"}));const y=((d==null?void 0:d.total)||0)/r;return v.jsxDEV("section",{className:"w-full max-w-4xl h-full bg-white pt-6 sm:bg-transparent flex flex-col sm:pt-0 sm:gap-4",children:[(u==null?void 0:u.type)==="reseller"&&v.jsxDEV(or,{children:[v.jsxDEV(un,{justify:"space-between",className:"mb-4",children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"organizations_overview.reseller.add_organization.title",defaultMessage:"Add a new organization",description:"Title of section where resellers can add new organizations"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:76,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:75,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:74,columnNumber:6},this),v.jsxDEV(un,{justify:"space-between",children:[v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"organizations_overview.reseller.add_organization.description",defaultMessage:"Use this space to add new organizations and set up everything for your new clients.",description:"Small explainer for resellers, they can add her a new organization for one of their clients."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:85,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:84,columnNumber:7},this),v.jsxDEV(Nn,{variant:"filled",onClick:()=>c(!0),children:v.jsxDEV(ee,{id:"organizations_overview.reseller.add_organization.create_organization",defaultMessage:"Create organization"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:92,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:91,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:83,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:73,columnNumber:5},this),v.jsxDEV(or,{p:0,className:"h-fit flex flex-col",children:[v.jsxDEV(un,{p:"md",justify:"space-between",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"organizations_overview.table.title",defaultMessage:"Organizations overview"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:103,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:102,columnNumber:6},this),v.jsxDEV(ra,{size:"xs",value:n,rightSectionPointerEvents:"all",onChange:w=>m(w.target.value),placeholder:t.formatMessage({id:"organizations_overview.search.placeholder",defaultMessage:"Search by name"}),rightSection:h?v.jsxDEV(pie,{className:"animate-spin",size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:118,columnNumber:20},this):v.jsxDEV(ZPt,{size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:118,columnNumber:73},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:108,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:101,columnNumber:5},this),!f&&!h&&!d.total&&v.jsxDEV(Zd,{className:"py-8",src:"/img/svg/no_results.svg",title:t.formatMessage({id:"organizations_overview.table.no_results.title",defaultMessage:"No organizations found."}),description:t.formatMessage({id:"organizations_overview.table.no_results.description",defaultMessage:"Ask the admin of your organization to invite you."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:123,columnNumber:6},this),!f&&h&&v.jsxDEV(Gt,{px:"md",gap:"sm",children:[v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:138,columnNumber:7},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:139,columnNumber:7},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:140,columnNumber:7},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:141,columnNumber:7},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:142,columnNumber:7},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:143,columnNumber:7},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:144,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:137,columnNumber:6},this),!f&&!h&&!!d.total&&v.jsxDEV("section",{className:"w-full h-full flex flex-col overflow-auto",children:[v.jsxDEV(mn,{className:"w-full h-full overflow-auto",px:"md",children:v.jsxDEV(hn,{highlightOnHover:!0,className:"h-full overflow-hidden rounded-md",children:[v.jsxDEV(hn.Thead,{className:"bg-[var(--mantine-color-gray-1)]",children:v.jsxDEV(hn.Tr,{children:[v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"organizations_overview.table.column.name",defaultMessage:"Organization name"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:154,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:153,columnNumber:11},this),v.jsxDEV(hn.Th,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:159,columnNumber:11},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:152,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:151,columnNumber:9},this),v.jsxDEV(hn.Tbody,{className:"h-full overflow-auto",children:(_=d==null?void 0:d.data)==null?void 0:_.map(w=>v.jsxDEV(hn.Tr,{className:"cursor-pointer",onClick:()=>p(w._id),children:[v.jsxDEV(hn.Td,{className:"align-middle",children:v.jsxDEV(Qe,{size:"sm",children:w.name||v.jsxDEV("span",{className:"italic",children:v.jsxDEV(ee,{id:"organizations_overview.table.column.name.placeholder",defaultMessage:"No name set"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:174,columnNumber:16},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:173,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:171,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:170,columnNumber:12},this),v.jsxDEV(hn.Td,{className:"align-middle w-8",children:v.jsxDEV(Fr,{"aria-label":t.formatMessage({id:"organizations_overview.table.column.go_detail.label",defaultMessage:"Go to organization"}),variant:"subtle",children:v.jsxDEV(Q$e,{size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:190,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:183,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:182,columnNumber:12},this)]},w._id,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:165,columnNumber:11},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:163,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:150,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:149,columnNumber:7},this),v.jsxDEV(uu,{p:"md",justify:"flex-end",gap:"sm",align:"center",children:[y>1&&v.jsxDEV(Kh,{size:"sm",hideWithOnePage:!0,total:y,value:s,onChange:a},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:200,columnNumber:9},this),v.jsxDEV(Fm,{size:"xs",className:"w-20",value:`${r}`,checkIconPosition:"right",onChange:g,data:["10","20","50","100","200"],"aria-label":t.formatMessage({id:"organizations_overview.table.page_size",defaultMessage:"Page size"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:208,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:198,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:148,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:100,columnNumber:4},this),v.jsxDEV(Nir,{isOpen:l,onClose:()=>c(!1)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:224,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/OrganizationsOverview/index.tsx",lineNumber:71,columnNumber:3},this)}function Dir(){const[t]=Bv(),e=$9.filter(n=>n.id!=="basic");return v.jsxDEV("div",{className:"w-screen h-screen overflow-auto",children:v.jsxDEV(qee,{selectedTierId:t.get("selectedTierId")||void 0,tiers:[...e,...o4]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/PublicPricingTable.tsx",lineNumber:16,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/organization/Billing/PublicPricingTable.tsx",lineNumber:15,columnNumber:3},this)}var ypt=!1,fT,IRe,ARe,Dte,kte,w9t,Mte,RRe,PRe,ORe,C9t,jRe,FRe,S9t,N9t;function Qm(){if(!ypt){ypt=!0;var t=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(t),n=/(Mac OS X)|(Windows)|(Linux)/.exec(t);if(jRe=/\b(iPhone|iP[ao]d)/.exec(t),FRe=/\b(iP[ao]d)/.exec(t),ORe=/Android/i.exec(t),S9t=/FBAN\/\w+;/i.exec(t),N9t=/Mobile/i.exec(t),C9t=!!/Win64/.exec(t),e){fT=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,fT&&document&&document.documentMode&&(fT=document.documentMode);var i=/(?:Trident\/(\d+.\d+))/.exec(t);w9t=i?parseFloat(i[1])+4:fT,IRe=e[2]?parseFloat(e[2]):NaN,ARe=e[3]?parseFloat(e[3]):NaN,Dte=e[4]?parseFloat(e[4]):NaN,Dte?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),kte=e&&e[1]?parseFloat(e[1]):NaN):kte=NaN}else fT=IRe=ARe=kte=Dte=NaN;if(n){if(n[1]){var r=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);Mte=r?parseFloat(r[1].replace("_",".")):!0}else Mte=!1;RRe=!!n[2],PRe=!!n[3]}else Mte=RRe=PRe=!1}}var $Re={ie:function(){return Qm()||fT},ieCompatibilityMode:function(){return Qm()||w9t>fT},ie64:function(){return $Re.ie()&&C9t},firefox:function(){return Qm()||IRe},opera:function(){return Qm()||ARe},webkit:function(){return Qm()||Dte},safari:function(){return $Re.webkit()},chrome:function(){return Qm()||kte},windows:function(){return Qm()||RRe},osx:function(){return Qm()||Mte},linux:function(){return Qm()||PRe},iphone:function(){return Qm()||jRe},mobile:function(){return Qm()||jRe||FRe||ORe||N9t},nativeApp:function(){return Qm()||S9t},android:function(){return Qm()||ORe},ipad:function(){return Qm()||FRe}},kir=$Re,dJ=!!(typeof window<"u"&&window.document&&window.document.createElement),Mir={canUseDOM:dJ,canUseWorkers:typeof Worker<"u",canUseEventListeners:dJ&&!!(window.addEventListener||window.attachEvent),canUseViewport:dJ&&!!window.screen,isInWorker:!dJ},Lir=Mir,E9t=Lir,D9t;E9t.canUseDOM&&(D9t=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);/**
 * Checks if an event is supported in the current execution environment.
 *
 * NOTE: This will not work correctly for non-generic events such as `change`,
 * `reset`, `load`, `error`, and `select`.
 *
 * Borrows from Modernizr.
 *
 * @param {string} eventNameSuffix Event name, e.g. "click".
 * @param {?boolean} capture Check if the capture phase is supported.
 * @return {boolean} True if the event is supported.
 * @internal
 * @license Modernizr 3.0.0pre (Custom Build) | MIT
 */function Tir(t,e){if(!E9t.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,i=n in document;if(!i){var r=document.createElement("div");r.setAttribute(n,"return;"),i=typeof r[n]=="function"}return!i&&D9t&&t==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var Iir=Tir,Air=kir,Rir=Iir,_pt=10,xpt=40,wpt=800;function k9t(t){var e=0,n=0,i=0,r=0;return"detail"in t&&(n=t.detail),"wheelDelta"in t&&(n=-t.wheelDelta/120),"wheelDeltaY"in t&&(n=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=n,n=0),i=e*_pt,r=n*_pt,"deltaY"in t&&(r=t.deltaY),"deltaX"in t&&(i=t.deltaX),(i||r)&&t.deltaMode&&(t.deltaMode==1?(i*=xpt,r*=xpt):(i*=wpt,r*=wpt)),i&&!e&&(e=i<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:e,spinY:n,pixelX:i,pixelY:r}}k9t.getEventType=function(){return Air.firefox()?"DOMMouseScroll":Rir("wheel")?"wheel":"mousewheel"};var Pir=k9t,Oir=Pir;const jir=ao(Oir);function Fir(t,e,n,i,r,o){o===void 0&&(o=0);var s=nF(t,e,o),a=s.width,l=s.height,c=Math.min(a,n),u=Math.min(l,i);return c>u*r?{width:u*r,height:u}:{width:c,height:c/r}}function $ir(t){return t.width>t.height?t.width/t.naturalWidth:t.height/t.naturalHeight}function g7(t,e,n,i,r){r===void 0&&(r=0);var o=nF(e.width,e.height,r),s=o.width,a=o.height;return{x:Cpt(t.x,s,n.width,i),y:Cpt(t.y,a,n.height,i)}}function Cpt(t,e,n,i){var r=e*i/2-n/2;return wpe(t,-r,r)}function Spt(t,e){return Math.sqrt(Math.pow(t.y-e.y,2)+Math.pow(t.x-e.x,2))}function Npt(t,e){return Math.atan2(e.y-t.y,e.x-t.x)*180/Math.PI}function Vir(t,e,n,i,r,o,s){o===void 0&&(o=0),s===void 0&&(s=!0);var a=s?Bir:zir,l=nF(e.width,e.height,o),c=nF(e.naturalWidth,e.naturalHeight,o),u={x:a(100,((l.width-n.width/r)/2-t.x/r)/l.width*100),y:a(100,((l.height-n.height/r)/2-t.y/r)/l.height*100),width:a(100,n.width/l.width*100/r),height:a(100,n.height/l.height*100/r)},d=Math.round(a(c.width,u.width*c.width/100)),h=Math.round(a(c.height,u.height*c.height/100)),f=c.width>=c.height*i,m=f?{width:Math.round(h*i),height:h}:{width:d,height:Math.round(d/i)},p=Et(Et({},m),{x:Math.round(a(c.width-m.width,u.x*c.width/100)),y:Math.round(a(c.height-m.height,u.y*c.height/100))});return{croppedAreaPercentages:u,croppedAreaPixels:p}}function Bir(t,e){return Math.min(t,Math.max(0,e))}function zir(t,e){return e}function Hir(t,e,n,i,r,o){var s=nF(e.width,e.height,n),a=wpe(i.width/s.width*(100/t.width),r,o),l={x:a*s.width/2-i.width/2-s.width*a*(t.x/100),y:a*s.height/2-i.height/2-s.height*a*(t.y/100)};return{crop:l,zoom:a}}function Wir(t,e,n){var i=$ir(e);return n.height>n.width?n.height/(t.height*i):n.width/(t.width*i)}function Uir(t,e,n,i,r,o){n===void 0&&(n=0);var s=nF(e.naturalWidth,e.naturalHeight,n),a=wpe(Wir(t,e,i),r,o),l=i.height>i.width?i.height/t.height:i.width/t.width,c={x:((s.width-t.width)/2-t.x)*l,y:((s.height-t.height)/2-t.y)*l};return{crop:c,zoom:a}}function Ept(t,e){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}function Kir(t){return t*Math.PI/180}function nF(t,e,n){var i=Kir(n);return{width:Math.abs(Math.cos(i)*t)+Math.abs(Math.sin(i)*e),height:Math.abs(Math.sin(i)*t)+Math.abs(Math.cos(i)*e)}}function wpe(t,e,n){return Math.min(Math.max(t,e),n)}function hJ(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.filter(function(n){return typeof n=="string"&&n.length>0}).join(" ").trim()}var qir=`.reactEasyCrop_Container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  cursor: move;
  display: flex;
  justify-content: center;
  align-items: center;
}

.reactEasyCrop_Image,
.reactEasyCrop_Video {
  will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */
}

.reactEasyCrop_Contain {
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}
.reactEasyCrop_Cover_Horizontal {
  width: 100%;
  height: auto;
}
.reactEasyCrop_Cover_Vertical {
  width: auto;
  height: 100%;
}

.reactEasyCrop_CropArea {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-sizing: border-box;
  box-shadow: 0 0 0 9999em;
  color: rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.reactEasyCrop_CropAreaRound {
  border-radius: 50%;
}

.reactEasyCrop_CropAreaGrid::before {
  content: ' ';
  box-sizing: border-box;
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.5);
  top: 0;
  bottom: 0;
  left: 33.33%;
  right: 33.33%;
  border-top: 0;
  border-bottom: 0;
}

.reactEasyCrop_CropAreaGrid::after {
  content: ' ';
  box-sizing: border-box;
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.5);
  top: 33.33%;
  bottom: 33.33%;
  left: 0;
  right: 0;
  border-left: 0;
  border-right: 0;
}
`,Gir=1,Yir=3,Xir=1,Zir=function(t){Af(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.imageRef=b.createRef(),n.videoRef=b.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document<"u"?document:null,n.currentWindow=typeof window<"u"?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if(!(typeof window.ResizeObserver>"u"||!n.containerRef)){var i=!0;n.resizeObserver=new window.ResizeObserver(function(r){if(i){i=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(i){return i.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var i=n.computeSizes();i&&(n.emitCropData(),n.setInitialCrop(i)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(i){if(n.props.initialCroppedAreaPercentages){var r=Hir(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,i,n.props.minZoom,n.props.maxZoom),o=r.crop,s=r.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(s)}else if(n.props.initialCroppedAreaPixels){var a=Uir(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,i,n.props.minZoom,n.props.maxZoom),o=a.crop,s=a.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(s)}},n.computeSizes=function(){var i,r,o,s,a,l,c=n.imageRef.current||n.videoRef.current;if(c&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var u=n.containerRect.width/n.containerRect.height,d=((i=n.imageRef.current)===null||i===void 0?void 0:i.naturalWidth)||((r=n.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,h=((o=n.imageRef.current)===null||o===void 0?void 0:o.naturalHeight)||((s=n.videoRef.current)===null||s===void 0?void 0:s.videoHeight)||0,f=c.offsetWidth<d||c.offsetHeight<h,m=d/h,p=void 0;if(f)switch(n.state.mediaObjectFit){default:case"contain":p=u>m?{width:n.containerRect.height*m,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/m};break;case"horizontal-cover":p={width:n.containerRect.width,height:n.containerRect.width/m};break;case"vertical-cover":p={width:n.containerRect.height*m,height:n.containerRect.height};break}else p={width:c.offsetWidth,height:c.offsetHeight};n.mediaSize=Et(Et({},p),{naturalWidth:d,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var g=n.props.cropSize?n.props.cropSize:Fir(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((a=n.state.cropSize)===null||a===void 0?void 0:a.height)!==g.height||((l=n.state.cropSize)===null||l===void 0?void 0:l.width)!==g.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(g),n.setState({cropSize:g},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(g),g}},n.saveContainerPosition=function(){if(n.containerRef){var i=n.containerRef.getBoundingClientRect();n.containerPosition={x:i.left,y:i.top}}},n.onMouseDown=function(i){n.currentDoc&&(i.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(e.getMousePoint(i)))},n.onMouseMove=function(i){return n.onDrag(e.getMousePoint(i))},n.onScroll=function(i){n.currentDoc&&(i.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(i){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(i))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),i.touches.length===2?n.onPinchStart(i):i.touches.length===1&&n.onDragStart(e.getTouchPoint(i.touches[0]))))},n.onTouchMove=function(i){i.preventDefault(),i.touches.length===2?n.onPinchMove(i):i.touches.length===1&&n.onDrag(e.getTouchPoint(i.touches[0]))},n.onGestureStart=function(i){n.currentDoc&&(i.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(i){if(i.preventDefault(),!n.isTouching){var r=e.getMousePoint(i),o=n.gestureZoomStart-1+i.scale;if(n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var s=n.gestureRotationStart+i.rotation;n.props.onRotationChange(s)}}},n.onGestureEnd=function(i){n.cleanEvents()},n.onDragStart=function(i){var r,o,s=i.x,a=i.y;n.dragStartPosition={x:s,y:a},n.dragStartCrop=Et({},n.props.crop),(o=(r=n.props).onInteractionStart)===null||o===void 0||o.call(r)},n.onDrag=function(i){var r=i.x,o=i.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&!(r===void 0||o===void 0)){var s=r-n.dragStartPosition.x,a=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+s,y:n.dragStartCrop.y+a},c=n.props.restrictPosition?g7(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(c)}}))},n.onDragStopped=function(){var i,r;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(r=(i=n.props).onInteractionEnd)===null||r===void 0||r.call(i)},n.onWheel=function(i){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(i))){i.preventDefault();var r=e.getMousePoint(i),o=jir(i).pixelY,s=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(s,r,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var a,l;return(l=(a=n.props).onInteractionStart)===null||l===void 0?void 0:l.call(a)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var a,l;return(l=(a=n.props).onInteractionEnd)===null||l===void 0?void 0:l.call(a)})},250)}},n.getPointOnContainer=function(i,r){var o=i.x,s=i.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(o-r.x),y:n.containerRect.height/2-(s-r.y)}},n.getPointOnMedia=function(i){var r=i.x,o=i.y,s=n.props,a=s.crop,l=s.zoom;return{x:(r+a.x)/l,y:(o+a.y)/l}},n.setNewZoom=function(i,r,o){var s=o===void 0?{}:o,a=s.shouldUpdatePosition,l=a===void 0?!0:a;if(!(!n.state.cropSize||!n.props.onZoomChange)){var c=wpe(i,n.props.minZoom,n.props.maxZoom);if(l){var u=n.getPointOnContainer(r,n.containerPosition),d=n.getPointOnMedia(u),h={x:d.x*c-u.x,y:d.y*c-u.y},f=n.props.restrictPosition?g7(h,n.mediaSize,n.state.cropSize,c,n.props.rotation):h;n.props.onCropChange(f)}n.props.onZoomChange(c)}},n.getCropData=function(){if(!n.state.cropSize)return null;var i=n.props.restrictPosition?g7(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return Vir(i,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition)},n.emitCropData=function(){var i=n.getCropData();if(i){var r=i.croppedAreaPercentages,o=i.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(r,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(r,o)}},n.emitCropAreaChange=function(){var i=n.getCropData();if(i){var r=i.croppedAreaPercentages,o=i.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(r,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var i=n.props.restrictPosition?g7(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(i),n.emitCropData()}},n.onKeyDown=function(i){var r=n.props,o=r.crop,s=r.onCropChange,a=r.keyboardStep,l=r.zoom,c=r.rotation,u=a;if(n.state.cropSize){var d=Et({},o);switch(i.key){case"ArrowUp":d.y-=u;break;case"ArrowDown":d.y+=u;break;case"ArrowLeft":d.x-=u;break;case"ArrowRight":d.x+=u;break;default:return}n.props.restrictPosition&&(d=g7(d,n.mediaSize,n.state.cropSize,l,c)),s(d)}},n}return e.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=qir,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},e.prototype.componentWillUnmount=function(){var n,i;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(n=this.resizeObserver)===null||n===void 0||n.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((i=this.styleRef.parentNode)===null||i===void 0||i.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},e.prototype.componentDidUpdate=function(n){var i,r,o,s,a,l,c,u,d;n.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):n.aspect!==this.props.aspect?this.computeSizes():n.objectFit!==this.props.objectFit?this.computeSizes():n.zoom!==this.props.zoom?this.recomputeCropPosition():((i=n.cropSize)===null||i===void 0?void 0:i.height)!==((r=this.props.cropSize)===null||r===void 0?void 0:r.height)||((o=n.cropSize)===null||o===void 0?void 0:o.width)!==((s=this.props.cropSize)===null||s===void 0?void 0:s.width)?this.computeSizes():(((a=n.crop)===null||a===void 0?void 0:a.x)!==((l=this.props.crop)===null||l===void 0?void 0:l.x)||((c=n.crop)===null||c===void 0?void 0:c.y)!==((u=this.props.crop)===null||u===void 0?void 0:u.y))&&this.emitCropAreaChange(),n.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),n.video!==this.props.video&&((d=this.videoRef.current)===null||d===void 0||d.load());var h=this.getObjectFit();h!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:h},this.computeSizes)},e.prototype.getAspect=function(){var n=this.props,i=n.cropSize,r=n.aspect;return i?i.width/i.height:r},e.prototype.getObjectFit=function(){var n,i,r,o;if(this.props.objectFit==="cover"){var s=this.imageRef.current||this.videoRef.current;if(s&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var a=this.containerRect.width/this.containerRect.height,l=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalWidth)||((i=this.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,c=((r=this.imageRef.current)===null||r===void 0?void 0:r.naturalHeight)||((o=this.videoRef.current)===null||o===void 0?void 0:o.videoHeight)||0,u=l/c;return u<a?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},e.prototype.onPinchStart=function(n){var i=e.getTouchPoint(n.touches[0]),r=e.getTouchPoint(n.touches[1]);this.lastPinchDistance=Spt(i,r),this.lastPinchRotation=Npt(i,r),this.onDragStart(Ept(i,r))},e.prototype.onPinchMove=function(n){var i=this;if(!(!this.currentDoc||!this.currentWindow)){var r=e.getTouchPoint(n.touches[0]),o=e.getTouchPoint(n.touches[1]),s=Ept(r,o);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var a=Spt(r,o),l=i.props.zoom*(a/i.lastPinchDistance);i.setNewZoom(l,s,{shouldUpdatePosition:!1}),i.lastPinchDistance=a;var c=Npt(r,o),u=i.props.rotation+(c-i.lastPinchRotation);i.props.onRotationChange&&i.props.onRotationChange(u),i.lastPinchRotation=c})}},e.prototype.render=function(){var n=this,i,r=this.props,o=r.image,s=r.video,a=r.mediaProps,l=r.transform,c=r.crop,u=c.x,d=c.y,h=r.rotation,f=r.zoom,m=r.cropShape,p=r.showGrid,g=r.style,y=g.containerStyle,_=g.cropAreaStyle,w=g.mediaStyle,C=r.classes,N=C.containerClassName,E=C.cropAreaClassName,D=C.mediaClassName,k=(i=this.state.mediaObjectFit)!==null&&i!==void 0?i:this.getObjectFit();return b.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(T){return n.containerRef=T},"data-testid":"container",style:y,className:hJ("reactEasyCrop_Container",N)},o?b.createElement("img",Et({alt:"",className:hJ("reactEasyCrop_Image",k==="contain"&&"reactEasyCrop_Contain",k==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",k==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",D)},a,{src:o,ref:this.imageRef,style:Et(Et({},w),{transform:l||"translate(".concat(u,"px, ").concat(d,"px) rotate(").concat(h,"deg) scale(").concat(f,")")}),onLoad:this.onMediaLoad})):s&&b.createElement("video",Et({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:hJ("reactEasyCrop_Video",k==="contain"&&"reactEasyCrop_Contain",k==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",k==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",D)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Et(Et({},w),{transform:l||"translate(".concat(u,"px, ").concat(d,"px) rotate(").concat(h,"deg) scale(").concat(f,")")}),controls:!1}),(Array.isArray(s)?s:[{src:s}]).map(function(M){return b.createElement("source",Et({key:M.src},M))})),this.state.cropSize&&b.createElement("div",{style:Et(Et({},_),{width:this.state.cropSize.width,height:this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,"data-testid":"cropper",className:hJ("reactEasyCrop_CropArea",m==="round"&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",E)}))},e.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:Yir,minZoom:Gir,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:Xir},e.getMousePoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},e.getTouchPoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},e}(b.Component);const tx="img-crop",RCe=1,b7=.1,Lte=0,Dpt=-180,kpt=180,PCe=1,Mpt=.5,Lpt=2,v7=.01,Qir=b.forwardRef((t,e)=>{const{cropperRef:n,zoomSlider:i,rotationSlider:r,aspectSlider:o,showReset:s,resetBtnText:a,modalImage:l,aspect:c,minZoom:u,maxZoom:d,cropShape:h,showGrid:f,cropperProps:m}=t,[p,g]=b.useState(RCe),[y,_]=b.useState(Lte),[w,C]=b.useState(c),N=p!==RCe||y!==Lte||w!==c,E=()=>{g(RCe),_(Lte),C(c)},[D,k]=b.useState({x:0,y:0}),M=b.useRef({width:0,height:0,x:0,y:0}),T=b.useCallback((O,V)=>{M.current=V},[]);b.useImperativeHandle(e,()=>({rotation:y,cropPixelsRef:M,onReset:E}));const A="[display:flex] [align-items:center] [width:60%] [margin-inline:auto]",R="[display:flex] [align-items:center] [justify-content:center] [height:32px] [width:32px] [background:transparent] [border:0] [font-family:inherit] [font-size:18px] [cursor:pointer] disabled:[opacity:20%] disabled:[cursor:default]",P="[flex:1]";return ne.jsxs(ne.Fragment,{children:[ne.jsx(Zir,Object.assign({},m,{ref:n,image:l,crop:D,zoom:p,rotation:y,aspect:w,minZoom:u,maxZoom:d,zoomWithScroll:i,cropShape:h,showGrid:f,onCropChange:k,onZoomChange:g,onRotationChange:_,onCropComplete:T,classes:{containerClassName:`${tx}-container ![position:relative] [width:100%] [height:40vh] [&~section:first-of-type]:[margin-top:16px] [&~section:last-of-type]:[margin-bottom:16px]`,mediaClassName:`${tx}-media`}})),i&&ne.jsxs("section",{className:`${tx}-control ${tx}-control-zoom ${A}`,children:[ne.jsx("button",{className:R,onClick:()=>g(+(p-b7).toFixed(1)),disabled:p-b7<u,children:"－"}),ne.jsx(MC,{className:P,min:u,max:d,step:b7,value:p,onChange:g}),ne.jsx("button",{className:R,onClick:()=>g(+(p+b7).toFixed(1)),disabled:p+b7>d,children:"＋"})]}),r&&ne.jsxs("section",{className:`${tx}-control ${tx}-control-rotation ${A}`,children:[ne.jsx("button",{className:`${R} [font-size:16px]`,onClick:()=>_(y-PCe),disabled:y===Dpt,children:"↺"}),ne.jsx(MC,{className:P,min:Dpt,max:kpt,step:PCe,value:y,onChange:_}),ne.jsx("button",{className:`${R} [font-size:16px]`,onClick:()=>_(y+PCe),disabled:y===kpt,children:"↻"})]}),o&&ne.jsxs("section",{className:`${tx}-control ${tx}-control-aspect ${A}`,children:[ne.jsx("button",{className:R,onClick:()=>C(+(w-v7).toFixed(2)),disabled:w-v7<Mpt,children:"↕️"}),ne.jsx(MC,{className:P,min:Mpt,max:Lpt,step:v7,value:w,onChange:C}),ne.jsx("button",{className:R,onClick:()=>C(+(w+v7).toFixed(2)),disabled:w+v7>Lpt,children:"↔️"})]}),s&&(i||r||o)&&ne.jsx(vn,{className:"[bottom:20px] [position:absolute]",style:N?{}:{opacity:.3,pointerEvents:"none"},onClick:E,children:a})]})});var Jir=b.memo(Qir);function err(t,e){e===void 0&&(e={});var n=e.insertAt;if(!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n==="top"&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}var trr=".\\[align-items\\:center\\]{align-items:center}.\\[background\\:transparent\\]{background:transparent}.\\[border\\:0\\]{border:0}.\\[bottom\\:20px\\]{bottom:20px}.\\[cursor\\:pointer\\]{cursor:pointer}.\\[display\\:flex\\]{display:flex}.\\[flex\\:1\\]{flex:1}.\\[font-family\\:inherit\\]{font-family:inherit}.\\[font-size\\:16px\\]{font-size:16px}.\\[font-size\\:18px\\]{font-size:18px}.\\[height\\:32px\\]{height:32px}.\\[height\\:40vh\\]{height:40vh}.\\[justify-content\\:center\\]{justify-content:center}.\\[margin-inline\\:auto\\]{margin-inline:auto}.\\[position\\:absolute\\]{position:absolute}.\\!\\[position\\:relative\\]{position:relative!important}.\\[width\\:100\\%\\]{width:100%}.\\[width\\:32px\\]{width:32px}.\\[width\\:60\\%\\]{width:60%}.disabled\\:\\[cursor\\:default\\]:disabled{cursor:default}.disabled\\:\\[opacity\\:20\\%\\]:disabled{opacity:20%}.\\[\\&\\~section\\:first-of-type\\]\\:\\[margin-top\\:16px\\]~section:first-of-type{margin-top:16px}.\\[\\&\\~section\\:last-of-type\\]\\:\\[margin-bottom\\:16px\\]~section:last-of-type{margin-bottom:16px}";err(trr,{insertAt:"top"});const nrr=b.forwardRef((t,e)=>{const{quality:n=.4,fillColor:i="white",zoomSlider:r=!0,rotationSlider:o=!1,aspectSlider:s=!1,showReset:a=!1,resetText:l,aspect:c=1,minZoom:u=1,maxZoom:d=3,cropShape:h="rect",showGrid:f=!1,cropperProps:m,modalClassName:p,modalTitle:g,modalWidth:y,modalOk:_,modalCancel:w,onModalOk:C,onModalCancel:N,modalProps:E,beforeCrop:D,children:k}=t,M=b.useRef({});M.current.onModalOk=C,M.current.onModalCancel=N,M.current.beforeCrop=D;const T=b.useRef(null),A=b.useCallback(J=>{var ae;const se=document.createElement("canvas"),oe=se.getContext("2d"),de=(((ae=J==null?void 0:J.getRootNode)===null||ae===void 0?void 0:ae.call(J))||document).querySelector(`.${tx}-media`),{width:ie,height:Q,x:be,y:le}=T.current.cropPixelsRef.current;if(o&&T.current.rotation!==Lte){const{naturalWidth:Ne,naturalHeight:Le}=de,Te=T.current.rotation*(Math.PI/180),De=Math.abs(Math.sin(Te)),Pe=Math.abs(Math.cos(Te)),ge=Ne*Pe+Le*De,he=Le*Pe+Ne*De;se.width=ge,se.height=he,oe.fillStyle=i,oe.fillRect(0,0,ge,he);const me=ge/2,X=he/2;oe.translate(me,X),oe.rotate(Te),oe.translate(-me,-X);const re=(ge-Ne)/2,we=(he-Le)/2;oe.drawImage(de,0,0,Ne,Le,re,we,Ne,Le);const ue=oe.getImageData(0,0,ge,he);se.width=ie,se.height=Q,oe.putImageData(ue,-be,-le)}else se.width=ie,se.height=Q,oe.fillStyle=i,oe.fillRect(0,0,ie,Q),oe.drawImage(de,be,le,ie,Q,0,0,ie,Q);return se},[i,o]),[R,P]=b.useState(""),O=b.useRef(),V=b.useRef(),F=b.useCallback(J=>GO(void 0,[J],void 0,function*({beforeUpload:ae,file:se,resolve:oe,reject:fe}){const de=se;if(typeof ae!="function"){oe(de);return}try{const ie=yield ae(se,[se]);oe(ie===!1?!1:ie!==!0&&ie||de)}catch(ie){fe(ie)}}),[]),$=b.useCallback(J=>(ae,se)=>new Promise((oe,fe)=>GO(void 0,void 0,void 0,function*(){let de=ae;if(typeof M.current.beforeCrop=="function")try{const Q=yield M.current.beforeCrop(ae,se);if(Q===!1)return F({beforeUpload:J,file:ae,resolve:oe,reject:fe});Q!==!0&&(de=Q||ae)}catch{return F({beforeUpload:J,file:ae,resolve:oe,reject:fe})}const ie=new FileReader;ie.addEventListener("load",()=>{typeof ie.result=="string"&&P(ie.result)}),ie.readAsDataURL(de),O.current=()=>{var Q,be;P(""),T.current.onReset();let le=!1;(be=(Q=M.current).onModalCancel)===null||be===void 0||be.call(Q,Ne=>{oe(Ne),le=!0}),le||oe(tfe.LIST_IGNORE)},V.current=Q=>GO(void 0,void 0,void 0,function*(){P(""),T.current.onReset();const be=A(Q.target),{type:le,name:Ne,uid:Le}=de;be.toBlob(Te=>GO(void 0,void 0,void 0,function*(){const De=new File([Te],Ne,{type:le});Object.assign(De,{uid:Le}),F({beforeUpload:J,file:De,resolve:Pe=>{var ge,he;oe(Pe),(he=(ge=M.current).onModalOk)===null||he===void 0||he.call(ge,Pe)},reject:Pe=>{var ge,he;fe(Pe),(he=(ge=M.current).onModalOk)===null||he===void 0||he.call(ge,Pe)}})}),le,n)})})),[A,n,F]),B=b.useCallback(J=>{const ae=Array.isArray(J)?J[0]:J,se=ae.props,{beforeUpload:oe,accept:fe}=se,de=km(se,["beforeUpload","accept"]);return Object.assign(Object.assign({},ae),{props:Object.assign(Object.assign({},de),{accept:fe||"image/*",beforeUpload:$(oe)})})},[$]),z=b.useMemo(()=>{const J={};return y!==void 0&&(J.width=y),_!==void 0&&(J.okText=_),w!==void 0&&(J.cancelText=w),J},[w,_,y]),H=`${tx}-modal${p?` ${p}`:""}`,q=(typeof window>"u"?"":window.navigator.language)==="zh-CN",U=g||(q?"编辑图片":"Edit image"),Y=l||(q?"重置":"Reset");return ne.jsxs(ne.Fragment,{children:[B(k),R&&ne.jsx(Ma,Object.assign({},E,z,{open:!0,title:U,onCancel:O.current,onOk:V.current,wrapClassName:H,maskClosable:!1,destroyOnClose:!0,children:ne.jsx(Jir,{ref:T,cropperRef:e,zoomSlider:r,rotationSlider:o,aspectSlider:s,showReset:a,resetBtnText:Y,modalImage:R,aspect:c,minZoom:u,maxZoom:d,cropShape:h,showGrid:f,cropperProps:m})}))]})});function Tpt(t){var i;const e=typeof t.value=="string"?t.value:(i=t.value)==null?void 0:i.toHexString(),n=t.disableAlpha?e==null?void 0:e.slice(0,7):e;return v.jsxDEV(Fhe,{...t,defaultValue:n,children:v.jsxDEV(vn,{id:t.formId,className:"!py-1 !px-1 !h-auto",children:v.jsxDEV("div",{className:"flex items-center gap-2",children:[v.jsxDEV("div",{className:"w-6 h-6 border border-solid border-[#d9d9d9] rounded-md",style:{background:n}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomColorPicker.tsx",lineNumber:12,columnNumber:6},this),v.jsxDEV("p",{className:"uppercase w-[9ch] text-left",children:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomColorPicker.tsx",lineNumber:16,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomColorPicker.tsx",lineNumber:11,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomColorPicker.tsx",lineNumber:10,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomColorPicker.tsx",lineNumber:9,columnNumber:3},this)}function Ipt(t){var n;if(!t)return;const e=(n=t.match(/\d+/g))==null?void 0:n.slice(0,3);return(e==null?void 0:e.join(", "))||void 0}function irr(){const t=Mt(),[e,n]=b.useState(!1),{data:i,isLoading:r}=Je.reseller.getCurrent.useQuery(void 0,{staleTime:36e5,refetchOnWindowFocus:!1}),o=Je.getSignedResellerUrl.useMutation(),s=Je.generateResellerAssetLink.useMutation(),a=Je.reseller.update.useMutation(),l=Je.useContext();if(r)return v.jsxDEV(uo,{bordered:!1,children:v.jsxDEV(ja,{active:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:39,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:38,columnNumber:4},this);if(!i)return null;const c=`${i.name}_logo`,u=async({fontColor:f,backgroundColor:m})=>{try{await a.mutateAsync({styling:{fontColor:typeof f=="string"?f:f.toHexString().slice(0,7),backgroundColor:typeof m=="string"?m:m.toHexString().slice(0,7)}}),l.reseller.getCurrent.invalidate(),Ei.success({placement:"bottomRight",message:t.formatMessage({id:"reseller.branding.updated.succeeded.message",defaultMessage:"Your info has been updated."})})}catch{Ei.error({placement:"bottomRight",message:t.formatMessage({id:"reseller.branding.updated.failed.message",defaultMessage:"Something went wrong while updating your info. Try again later."})})}},d=f=>{try{return Rri(f)}catch(m){const p=m;let g=t.formatMessage({id:"reseller.branding.file_type_error",defaultMessage:"Unsupported file type. Please choose an image."});p.code==="FILE_SIZE"&&(g=t.formatMessage({id:"reseller.branding.file_size_error",defaultMessage:"File size is too large. Please choose an image smaller than 5 MB."})),Ei.error({placement:"bottomRight",message:g})}return!1},h=f=>{if(f.file.status==="uploading"){n(!0);return}f.file.status==="done"&&xPt(f.file.originFileObj,async()=>{let m=await s.mutateAsync({fileName:c,type:"directLink"});m=`${m}?v=${hie({max:69420,min:1})}`,await a.mutateAsync({logo:m}),l.reseller.getCurrent.invalidate(),n(!1)})};return v.jsxDEV(uo,{bordered:!1,title:t.formatMessage({id:"reseller.branding.title",defaultMessage:"Branding"}),children:v.jsxDEV(Ut,{layout:"vertical",requiredMark:!1,initialValues:{...(i==null?void 0:i.styling)||{}},onFinish:u,children:[v.jsxDEV(Ut.Item,{name:"logo",className:"row-span-2",label:t.formatMessage({id:"reseller.branding.form.logo.label",defaultMessage:"Logo"}),children:v.jsxDEV(nrr,{aspect:16/9,beforeCrop:async f=>{if(f.type!=="image/svg+xml")return!0;const m=await o.mutateAsync({contentType:f.type,fileName:c});return die({file:f,action:m,onSuccess:async()=>{let y=await s.mutateAsync({fileName:c,type:"directLink"});y=`${y}?v=${hie({max:69420,min:1})}`,a.mutate({logo:y})},onError:()=>{Ei.error({placement:"bottomRight",message:t.formatMessage({id:"reseller.branding.logo.executed.error.message",defaultMessage:"Something went wrong while uploading your logo. Try again later."})})}}),!1},rotationSlider:!1,children:v.jsxDEV(tfe,{className:Vt("!-mr-2 rounded-lg [&>.ant-upload]:overflow-hidden","reseller_branding-upload"),action:async f=>await o.mutateAsync({contentType:f.type,fileName:c}),customRequest:die,maxCount:1,listType:"picture-card",showUploadList:!1,beforeUpload:d,onChange:h,children:i.logo?v.jsxDEV("div",{className:"relative w-full",children:[e&&v.jsxDEV("div",{className:Vt("absolute flex flex-col justify-center items-center","w-full h-full bg-slate-100 bg-opacity-50","color-theme-primary"),children:v.jsxDEV(Xd,{className:"absolute"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:214,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:207,columnNumber:11},this),v.jsxDEV("img",{alt:"avatar",src:i.logo,className:"rounded-lg w-full"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:217,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:205,columnNumber:9},this):v.jsxDEV("div",{children:[e?v.jsxDEV(Xd,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:221,columnNumber:29},this):v.jsxDEV(B6e,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:221,columnNumber:51},this),v.jsxDEV("div",{style:{marginTop:8},children:v.jsxDEV(ee,{id:"form.upload",defaultMessage:"Upload"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:223,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:222,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:220,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:185,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:144,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:136,columnNumber:5},this),v.jsxDEV(Ut.Item,{name:"fontColor",label:t.formatMessage({id:"reseller.branding.form.font_color.label",defaultMessage:"Font color"}),children:v.jsxDEV(Tpt,{formId:"fontColor",disableAlpha:!0,onChange:f=>{document.documentElement.style.setProperty("--widget-preview-font-rgb-values",Ipt(f.toRgbString())||"")},format:"hex"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:237,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:230,columnNumber:5},this),v.jsxDEV(Ut.Item,{name:"backgroundColor",label:t.formatMessage({id:"reseller.branding.form.background_color.label",defaultMessage:"Background color"}),children:v.jsxDEV(Tpt,{formId:"backgroundColor",disableAlpha:!0,onChange:f=>{document.documentElement.style.setProperty("--widget-preview-bg-rgb-values",Ipt(f.toRgbString())||"")},format:"hex"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:256,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:249,columnNumber:5},this),v.jsxDEV(Ut.Item,{shouldUpdate:!0,noStyle:!0,children:f=>{const m=!f.isFieldsTouched()||f.getFieldsError().some(({errors:p})=>p.length);return v.jsxDEV(vn,{type:"primary",htmlType:"submit",disabled:m,loading:f.isFieldsTouched()&&a.isLoading,children:v.jsxDEV(ee,{id:"reseller.branding.form.form.submit",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:280,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:274,columnNumber:8},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:268,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:130,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerBranding.tsx",lineNumber:126,columnNumber:3},this)}function rrr(){const t=Mt(),{data:e,isLoading:n}=Je.reseller.getCurrent.useQuery(void 0,{staleTime:36e5,refetchOnWindowFocus:!1}),i=Je.reseller.update.useMutation(),r=Je.useContext();if(n)return v.jsxDEV(uo,{bordered:!1,children:v.jsxDEV(ja,{active:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerInfo.tsx",lineNumber:17,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerInfo.tsx",lineNumber:16,columnNumber:4},this);const o=async s=>{try{await i.mutateAsync(s),r.reseller.getCurrent.invalidate(),Ei.success({placement:"bottomRight",message:t.formatMessage({id:"reseller.info_card.updated.succeeded.message",defaultMessage:"Your info has been updated."})})}catch{Ei.error({placement:"bottomRight",message:t.formatMessage({id:"reseller.info_card.updated.failed.message",defaultMessage:"Something went wrong while updating your info. Try again later."})})}};return v.jsxDEV(uo,{bordered:!1,title:t.formatMessage({id:"reseller.info_card.title",defaultMessage:"Reseller info"}),children:v.jsxDEV(Ut,{layout:"vertical",requiredMark:!1,initialValues:e,onFinish:o,children:[v.jsxDEV(Ut.Item,{name:"name",className:"!mb-2",rules:[{required:!0,message:t.formatMessage({id:"reseller.info_card.form.name.required",defaultMessage:"Please enter a name."})}],label:t.formatMessage({id:"reseller.info_card.form.form.name.label",defaultMessage:"Name"}),extra:t.formatMessage({id:"reseller.info_card.form.form.name.help",defaultMessage:"Give a name that is recognizable for your customers.",description:"Explain that this name will be visible to their customers"}),children:v.jsxDEV(es,{size:"large",maxLength:64,showCount:!1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerInfo.tsx",lineNumber:81,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerInfo.tsx",lineNumber:59,columnNumber:5},this),v.jsxDEV(Ut.Item,{name:"email",className:"w-full",label:t.formatMessage({id:"reseller.info_card.form.form.email.label",defaultMessage:"Email",description:"Email address that will given to user to contact the reseller"}),extra:t.formatMessage({id:"reseller.info_card.form.form.email.help",defaultMessage:"Email will be visible to your customers to contact you for help.",description:"Email address that will given to user to contact the reseller"}),rules:[{pattern:new RegExp(/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/),message:t.formatMessage({id:"reseller.info_card.form.form.email.validation.invalid_email",defaultMessage:"Please enter a valid email address."})}],children:v.jsxDEV(es,{type:"email",size:"large"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerInfo.tsx",lineNumber:108,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerInfo.tsx",lineNumber:83,columnNumber:5},this),v.jsxDEV(Ut.Item,{shouldUpdate:!0,noStyle:!0,children:s=>{const a=!s.isFieldsTouched()||s.getFieldsError().some(({errors:l})=>l.length);return v.jsxDEV(vn,{type:"primary",htmlType:"submit",disabled:a,loading:s.isFieldsTouched()&&i.isLoading,children:v.jsxDEV(ee,{id:"reseller.info_card.form.form.submit",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerInfo.tsx",lineNumber:122,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerInfo.tsx",lineNumber:116,columnNumber:8},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerInfo.tsx",lineNumber:110,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerInfo.tsx",lineNumber:53,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/ResellerInfo.tsx",lineNumber:46,columnNumber:3},this)}function orr({isOpen:t,onClose:e}){const n=Mt(),[i]=Ut.useForm(),r=Je.useContext(),o=Je.reseller.addMembers.useMutation({onSuccess:()=>{Ei.success({placement:"bottomRight",message:n.formatMessage({id:"reseller.add_member.create.succeeded",defaultMessage:"Members have been invited.",description:"Success notification when members have been invited"})}),r.reseller.getMembers.invalidate(),e()},onError:()=>{let l=n.formatMessage({id:"reseller.add_member.create.failed.generic",defaultMessage:"Something went wrong while inviting the members. Try again later our contact our support.",description:"Members could not be invited, because our server crashed or could not connect to server"});Ei.error({placement:"bottomRight",message:l})}}),s=async()=>{const l=i.getFieldsValue();o.mutate(l),r.reseller.getMembers.invalidate()},a=()=>{i.resetFields(),e()};return v.jsxDEV(Ma,{title:n.formatMessage({id:"reseller.add_member.title",defaultMessage:"Invite members"}),open:t,onCancel:a,footer:v.jsxDEV("footer",{className:"flex justify-between items-center w-full !mt-8",children:[v.jsxDEV(vn,{type:"text",onClick:a,children:v.jsxDEV(ee,{id:"reseller.add_member.footer.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/AddMembers.tsx",lineNumber:60,columnNumber:7},this)},"back",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/AddMembers.tsx",lineNumber:59,columnNumber:6},this),v.jsxDEV(vn,{type:"primary",htmlType:"submit",form:"addMembersForm",loading:o.isLoading,children:v.jsxDEV(ee,{id:"reseller.add_member.footer.submit",defaultMessage:"Add members",description:"Button to add members"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/AddMembers.tsx",lineNumber:69,columnNumber:7},this)},"submit",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/AddMembers.tsx",lineNumber:62,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/AddMembers.tsx",lineNumber:58,columnNumber:5},this),children:v.jsxDEV(Ut,{name:"addMembersForm",id:"addMembersForm",form:i,layout:"vertical",initialValues:{role:"default"},requiredMark:!1,onFinish:s,children:v.jsxDEV(Ut.Item,{name:"email",rules:[{validator:async(l,c)=>{if(!c.length)throw new Error(n.formatMessage({id:"reseller.add_member.form.email.required",defaultMessage:"Email address is required."}));const u=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/,d=c.find(h=>!h.match(u));if(d)throw new Error(n.formatMessage({id:"reseller.add_member.form.email.invalid_email",defaultMessage:"{email} is an invalid email address."},{email:d}))}}],label:n.formatMessage({id:"reseller.add_member.form.email.label",defaultMessage:"Email address"}),extra:n.formatMessage({id:"reseller.add_member.form.email.help",defaultMessage:"Press 'ENTER' to add an email address.",description:"Enter must be pressed after each email address"}),children:v.jsxDEV(Lo,{mode:"tags",size:"large",options:[],showSearch:!1,notFoundContent:null,tokenSeparators:[","," "],dropdownStyle:{display:"none"}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/AddMembers.tsx",lineNumber:131,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/AddMembers.tsx",lineNumber:87,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/AddMembers.tsx",lineNumber:78,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/AddMembers.tsx",lineNumber:53,columnNumber:3},this)}function srr(){const t=Mt(),e=Qr(),n=Je.useContext(),[i,r]=b.useState(5),[o,s]=b.useState(1),[a,l]=b.useState(!1),[c,u]=b.useState(!1),[d,h]=b.useState(),f=b.useMemo(()=>d?[d==null?void 0:d.firstName,d==null?void 0:d.lastName].join(" ").trim():"",[d]),{data:m}=Je.getAuthUser.useQuery(),{data:p,isLoading:g}=Je.reseller.getMembers.useQuery({offset:(o-1)*i,limit:i}),y=Je.reseller.deleteMember.useMutation(),_=async()=>{if(d)try{await y.mutateAsync({userId:`${d._id}`}),Ei.success({placement:"bottomRight",message:t.formatMessage({id:"reseller.members_overview.delete.succeeded",defaultMessage:"{name} has been deleted.",description:"Success notification when member has been deleted"},{name:Mp(f)})}),d._id===(m==null?void 0:m._id)&&(e("/account"),n.reseller.getMembers.invalidate(),n.getAuthUser.invalidate()),n.reseller.getMembers.invalidate(),C()}catch{Ei.error({placement:"bottomRight",message:t.formatMessage({id:"reseller.members_overview.delete.failed.generic",defaultMessage:"Something went wrong while trying to delete this member. Try again later.",description:"Member could not be deleted, because our server crashed or could not connect to server"},{name:Mp(f)})})}},w=N=>{var D;const E=(D=p==null?void 0:p.data)==null?void 0:D.find(k=>k._id===N);!N||(p==null?void 0:p.total)===1||(h(E),u(!0))},C=()=>{h(void 0),u(!1)};return v.jsxDEV(v.Fragment,{children:[v.jsxDEV(uo,{title:t.formatMessage({id:"reseller.members_overview.table.title",defaultMessage:"Members"}),extra:v.jsxDEV(vn,{onClick:()=>l(!0),type:"primary",children:v.jsxDEV(ee,{id:"reseller.members_overview.table.button.add_members",defaultMessage:"Add members"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:98,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:97,columnNumber:6},this),bordered:!1,children:v.jsxDEV("div",{className:"flex flex-col space-y-6",children:[g&&v.jsxDEV(ja,{active:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:107,columnNumber:20},this),!g&&v.jsxDEV(qs,{rowKey:"_id",dataSource:p==null?void 0:p.data,pagination:!!(p!=null&&p.total)&&(p==null?void 0:p.total)>5&&{current:o,pageSize:i,onChange:(N,E)=>{s(N),E&&r(E)},showSizeChanger:!0,pageSizeOptions:["5","10","20","50"],total:p==null?void 0:p.total},style:{overflowX:"auto"},locale:{emptyText:v.jsxDEV("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[v.jsxDEV("img",{src:"/img/svg/no_results.svg",alt:"No projects found",className:"max-h-52 p-8"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:130,columnNumber:11},this),v.jsxDEV("p",{children:v.jsxDEV(ee,{id:"reseller.members_overview.table.no_results",defaultMessage:"No members found"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:136,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:135,columnNumber:11},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:129,columnNumber:10},this)},children:[v.jsxDEV(qs.Column,{title:t.formatMessage({id:"reseller.members_overview.table.column.name",defaultMessage:"Member name"}),dataIndex:[],className:"min-w-[192px]",render:N=>!N.firstName&&!N.lastName?v.jsxDEV("p",{className:"text-sm italic text-slate-500",children:v.jsxDEV(ee,{id:"reseller.members_overview.table.column.name.fallback",defaultMessage:"Name not set",description:"Show fallback in table when user hasn't set their name, mostly because user hasn't verified them self yet."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:157,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:156,columnNumber:12},this):v.jsxDEV(Fn.Text,{children:[N.firstName," ",N.lastName," ",N._id===(m==null?void 0:m._id)&&v.jsxDEV(kv,{color:"purple",children:v.jsxDEV(ee,{id:"reseller.members_overview.table.column.name.me",defaultMessage:"Myself",description:"Show user is himself"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:171,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:170,columnNumber:13},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:167,columnNumber:11},this)},"memberName",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:145,columnNumber:8},this),v.jsxDEV(qs.Column,{className:"min-w-[160px]",dataIndex:"email",title:t.formatMessage({id:"reseller.members_overview.table.column.email",defaultMessage:"Email"}),render:N=>v.jsxDEV(Fn.Text,{children:N},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:190,columnNumber:28},this)},"email",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:182,columnNumber:8},this),v.jsxDEV(qs.Column,{dataIndex:"_id",width:"32px",render:N=>v.jsxDEV(Vs,{color:"red",trigger:(p==null?void 0:p.total)===1?["hover"]:[],title:t.formatMessage({id:"reseller.members_overview.table.column.delete.tooltip",defaultMessage:"This member cannot be deleted because a reseller account needs at least 1 member.",description:"Show tooltip reseller member cannot be deleted because a reseller always needs 1 member"}),children:v.jsxDEV(vn,{danger:!0,icon:v.jsxDEV(l$e,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:210,columnNumber:18},this),disabled:(p==null?void 0:p.total)===1,onClick:()=>w(N)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:208,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:197,columnNumber:10},this)},"icon",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:192,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:109,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:106,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:91,columnNumber:4},this),v.jsxDEV(orr,{isOpen:a,onClose:()=>l(!1)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:221,columnNumber:4},this),v.jsxDEV(xpe,{title:t.formatMessage({id:"reseller.delete_member.title",defaultMessage:"Delete member"}),description:t.formatMessage({id:"reseller.delete_member.description",defaultMessage:"You are about to delete {username} from your organization. They will no longer have access to your organization."},{username:f}),isDeleting:y.isLoading,deleteText:t.formatMessage({id:"reseller.delete_member.button",defaultMessage:"Delete member"}),onDelete:_,isOpen:c,onClose:C},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:222,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/members/index.tsx",lineNumber:90,columnNumber:3},this)}function arr(){const t=Mt(),[e,n]=b.useState(20),[i,r]=b.useState(1),{data:o,isLoading:s}=Je.reseller.getOrganizations.useQuery({offset:(i-1)*e,limit:e});return s?v.jsxDEV(ja,{active:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/OrganizationsBillingOverview.tsx",lineNumber:18,columnNumber:24},this):o!=null&&o.total?v.jsxDEV(uo,{title:t.formatMessage({id:"reseller.organizations_overview.title",defaultMessage:"Organizations billing info"}),bordered:!1,children:v.jsxDEV(qs,{rowKey:"_id",dataSource:o==null?void 0:o.data,pagination:(o==null?void 0:o.total)>20&&{current:i,pageSize:e,onChange:(a,l)=>{r(a),l&&n(l)},showSizeChanger:!0,pageSizeOptions:["20","30","50","100"],total:o==null?void 0:o.total},locale:{emptyText:v.jsxDEV("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[v.jsxDEV("img",{src:"/img/svg/no_results.svg",alt:"No projects found",className:"max-h-52 p-8"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/OrganizationsBillingOverview.tsx",lineNumber:48,columnNumber:8},this),v.jsxDEV("p",{className:"text-sm text-slate-500",children:v.jsxDEV(ee,{id:"reseller.organizations_overview.table.no_results",defaultMessage:"No organizations found. Ask the admin of your organization to invite you."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/OrganizationsBillingOverview.tsx",lineNumber:50,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/OrganizationsBillingOverview.tsx",lineNumber:49,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/OrganizationsBillingOverview.tsx",lineNumber:47,columnNumber:7},this)},style:{overflowX:"auto"},children:[v.jsxDEV(qs.Column,{title:t.formatMessage({id:"reseller.organizations_overview.table.column.name",defaultMessage:"Organization name"}),dataIndex:"name"},"name",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/OrganizationsBillingOverview.tsx",lineNumber:60,columnNumber:5},this),v.jsxDEV(qs.Column,{width:"20%",dataIndex:["billing","planId"],title:t.formatMessage({id:"reseller.organizations_overview.table.column.plan",defaultMessage:"Plan"}),render:a=>{const l=e5.find(c=>c.planId.annually===a||c.planId.monthly===a);return l?v.jsxDEV(ee,{...l==null?void 0:l.name},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/OrganizationsBillingOverview.tsx",lineNumber:82,columnNumber:14},this):null}},"planId",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/OrganizationsBillingOverview.tsx",lineNumber:68,columnNumber:5},this),v.jsxDEV(qs.Column,{width:"128px",dataIndex:["billing","type"],title:t.formatMessage({id:"reseller.organizations_overview.table.column.type",defaultMessage:"Plan type"}),render:a=>Vrt[a]?v.jsxDEV(ee,{...Vrt[a]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/OrganizationsBillingOverview.tsx",lineNumber:95,columnNumber:14},this):null},"planType",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/OrganizationsBillingOverview.tsx",lineNumber:85,columnNumber:5},this),v.jsxDEV(qs.Column,{width:"96px",align:"right",dataIndex:["billing","price"],title:t.formatMessage({id:"reseller.organizations_overview.table.column.price",defaultMessage:"Price"}),render:a=>v.jsxDEV(Qb,{value:a,style:"currency",currency:"EUR",currencyDisplay:"symbol",minimumFractionDigits:0,maximumFractionDigits:2},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/OrganizationsBillingOverview.tsx",lineNumber:108,columnNumber:7},this)},"price",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/OrganizationsBillingOverview.tsx",lineNumber:98,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/OrganizationsBillingOverview.tsx",lineNumber:29,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/components/OrganizationsBillingOverview.tsx",lineNumber:22,columnNumber:3},this):null}function lrr(){const t=Mt(),{data:e,isLoading:n}=Je.getAuthUser.useQuery();return ga(t.formatMessage({id:"reseller_dashboard.page.title",defaultMessage:"Reseller dashboard - Chathive",description:"Browser tab title for reseller dashboard page"})),n?v.jsxDEV("section",{className:"flex flex-col justify-center items-center gap-4",children:[v.jsxDEV(zS,{size:"large"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/index.tsx",lineNumber:30,columnNumber:5},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"reseller_dashboard.loader.title",defaultMessage:"We are setting up your project...",description:"Message show'n when reseller dashboard is loaded in and user is verified"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/index.tsx",lineNumber:32,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/index.tsx",lineNumber:31,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/index.tsx",lineNumber:29,columnNumber:4},this):(e==null?void 0:e.type)!=="reseller"?v.jsxDEV(Op,{to:"/account",replace:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/index.tsx",lineNumber:42,columnNumber:40},this):v.jsxDEV("section",{className:"grid gap-4 w-full max-w-4xl",children:[v.jsxDEV(rrr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/index.tsx",lineNumber:46,columnNumber:4},this),v.jsxDEV(irr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/index.tsx",lineNumber:47,columnNumber:4},this),v.jsxDEV(srr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/index.tsx",lineNumber:48,columnNumber:4},this),v.jsxDEV(arr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/index.tsx",lineNumber:49,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/ResellerDashboard/index.tsx",lineNumber:45,columnNumber:3},this)}function crr(){const t=Qr(),e=Je.getAuthUser.useQuery(void 0,{enabled:!!localStorage.getItem("TOKEN"),staleTime:1/0});return b.useEffect(()=>{var n;if(e.isError){console.error("Could not fetch authenticated user",e.error),localStorage.removeItem("TOKEN"),t("/login",{replace:!0});return}(n=e.data)!=null&&n._id&&(window._cio.identify({id:e.data.email,last_login:new Date}),Gsn({id:e.data._id,email:e.data.email,fullName:[e.data.firstName,e.data.lastName].join(" ").trim()}))},[e]),localStorage.getItem("TOKEN")?e.data?v.jsxDEV(Cj,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/RouterGuards/LoggedIn.tsx",lineNumber:37,columnNumber:33},this):v.jsxDEV("div",{className:"bg-gradient-to-br from-theme-primary to-theme-secondary w-full h-screen grid place-items-center text-white font-semibold text-lg md:text-2xl p-8",children:v.jsxDEV("article",{className:"grid place-items-center gap-6",children:[v.jsxDEV(_At,{style:{fontSize:64}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/RouterGuards/LoggedIn.tsx",lineNumber:42,columnNumber:5},this),v.jsxDEV("h1",{className:"text-center",children:v.jsxDEV(ee,{id:"login.authenticating",defaultMessage:"Verifying your user, please wait..."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/RouterGuards/LoggedIn.tsx",lineNumber:44,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/RouterGuards/LoggedIn.tsx",lineNumber:43,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/RouterGuards/LoggedIn.tsx",lineNumber:41,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/RouterGuards/LoggedIn.tsx",lineNumber:40,columnNumber:3},this):v.jsxDEV(Op,{to:"/login",replace:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/RouterGuards/LoggedIn.tsx",lineNumber:36,columnNumber:45},this)}function M9t(){return v.jsxDEV(Ps,{className:"h-screen",children:[v.jsxDEV(Ps.Header,{className:"!bg-white !px-4 sm:!pr-6 sm:!px-5 flex justify-between gap-4 sm:gap-8 md:gap-16 items-center z-20",children:v.jsxDEV(T0,{className:"w-36 sm:w-40",to:"/",children:v.jsxDEV(BS,{src:"/img/svg/logo.svg",preview:!1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ProjectSetupInProgress.tsx",lineNumber:10,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ProjectSetupInProgress.tsx",lineNumber:9,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ProjectSetupInProgress.tsx",lineNumber:8,columnNumber:4},this),v.jsxDEV(Ps.Content,{className:"flex flex-col justify-center items-center gap-4",children:[v.jsxDEV(zS,{size:"large"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ProjectSetupInProgress.tsx",lineNumber:14,columnNumber:5},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"project.loader.title",defaultMessage:"We are setting up your project...",description:"Message show'n when project is loaded in and loader is show'n"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ProjectSetupInProgress.tsx",lineNumber:16,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ProjectSetupInProgress.tsx",lineNumber:15,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ProjectSetupInProgress.tsx",lineNumber:13,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ProjectSetupInProgress.tsx",lineNumber:7,columnNumber:3},this)}function urr(){const{projectId:t}=If(),e=Je.project.getById.useQuery({projectId:t},{enabled:!!t,staleTime:1/0});return localStorage.getItem("organizationId")?!e.data&&!e.isFetching?v.jsxDEV(Op,{to:"/",replace:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/RouterGuards/ProjectGuard.tsx",lineNumber:15,columnNumber:51},this):!e.data&&e.isFetching?v.jsxDEV(M9t,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/RouterGuards/ProjectGuard.tsx",lineNumber:16,columnNumber:50},this):v.jsxDEV(Cj,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/RouterGuards/ProjectGuard.tsx",lineNumber:18,columnNumber:9},this):v.jsxDEV(Op,{to:"/account/organizations",replace:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/RouterGuards/ProjectGuard.tsx",lineNumber:14,columnNumber:54},this)}function fJ(t){var e;return(e=t==null?void 0:t.trim())==null?void 0:e.replace(/^http[s]?:\/\/|\/$/g,"")}function L9t({value:t,placeholder:e,onChange:n}){let i=fJ(t||""),r="https://";if(t)try{const l=new URL(t);i=fJ(t),r=`${l.protocol}//`}catch{}const o=l=>{try{const c=l.clipboardData.getData("text"),u=fJ(c);l.preventDefault(),n&&n(`${r}${u}`)}catch{}},s=l=>{if(!n)return;const c=fJ(l.target.value);n(`${r}${c}`)},a=l=>{n&&n(`${l}${i}`)};return v.jsxDEV(es,{size:"large",addonBefore:v.jsxDEV(Lo,{size:"large",value:r,onChange:a,children:[v.jsxDEV(Lo.Option,{value:"https://",children:"https://"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/UrlInput.tsx",lineNumber:56,columnNumber:6},this),v.jsxDEV(Lo.Option,{value:"http://",children:"http://"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/UrlInput.tsx",lineNumber:57,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/UrlInput.tsx",lineNumber:55,columnNumber:5},this),value:i,placeholder:e,onChange:s,onPaste:o},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/UrlInput.tsx",lineNumber:52,columnNumber:3},this)}function d$({children:t,currentStep:e=0,showSteps:n=!0}){const i=Qr(),r=Gp(),o=Oi(YA),s=["/sign_up/","/sign_up/purpose_setup","/sign_up/account_setup"];return b.useEffect(()=>{var c,u;const l=["/sign_up","/sign_up/website","/sign_up/purpose_setup","/sign_up/account_setup"].indexOf(r.pathname);if(!o.projectType&&l>0)return i("/sign_up");if(!((c=o.organization.name)!=null&&c.length)&&l>2)return i("/sign_up/purpose_setup");if(!((u=o.user.email)!=null&&u.length)&&l>3)return i("/sign_up/account_setup")},[r.pathname]),localStorage.getItem("TOKEN")?v.jsxDEV(Op,{to:"/sign_up/completed",replace:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpShell.tsx",lineNumber:32,columnNumber:44},this):v.jsxDEV("div",{className:Vt("w-screen h-screen","flex !flex-row gap-16 p-2 sm:p-4 md:p-8 relative !min-h-screen"),children:[v.jsxDEV("img",{src:"/img/svg/sign_up_wave.svg",className:"w-full fixed bottom-0 left-0"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpShell.tsx",lineNumber:36,columnNumber:4},this),v.jsxDEV("main",{className:"rounded-lg shadow bg-white flex flex-col justify-between items-center gap-4 w-full z-[0]",children:[v.jsxDEV("header",{className:"w-full flex flex-row justify-start p-8 pb-2 xl:px-16",children:v.jsxDEV(T0,{to:"/login",children:v.jsxDEV("img",{src:"/img/svg/logo.svg",className:"h-8"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpShell.tsx",lineNumber:40,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpShell.tsx",lineNumber:39,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpShell.tsx",lineNumber:38,columnNumber:5},this),v.jsxDEV("div",{className:"h-full px-8 signUpXl:px-16 overflow-auto flex flex-col justify-center",children:t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpShell.tsx",lineNumber:43,columnNumber:5},this),v.jsxDEV("footer",{className:"w-full p-8 pt-0 xl:px-16",children:n&&v.jsxDEV(un,{gap:"md",wrap:"nowrap",children:s.map((a,l)=>v.jsxDEV(T0,{to:a,className:Vt("w-full",e<l&&"pointer-events-none"),children:v.jsxDEV("div",{className:Vt("w-full h-5	rounded-xl",e<l&&"pointer-events-none bg-slate-300",l===e&&"bg-gradient-to-br from-theme-primary from-20% to-theme-secondary",l<e&&"bg-theme-primary")},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpShell.tsx",lineNumber:53,columnNumber:10},this)},a,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpShell.tsx",lineNumber:48,columnNumber:9},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpShell.tsx",lineNumber:46,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpShell.tsx",lineNumber:44,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpShell.tsx",lineNumber:37,columnNumber:4},this),v.jsxDEV(tOt,{className:"w-[512px] !hidden lg:!flex"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpShell.tsx",lineNumber:68,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpShell.tsx",lineNumber:35,columnNumber:3},this)}function drr(){const t=Mt(),[e]=Ut.useForm(),n=Qr(),[i,r]=f0(YA);ga(t.formatMessage({id:"sign_up.add_website.document_title",defaultMessage:"Sign up - Chathive"}));const o=()=>{n("/sign_up/purpose_setup")},s=({website:a})=>{try{n("/sign_up/purpose_setup"),r({...i,website:a})}catch{}};return v.jsxDEV(d$,{currentStep:0,children:v.jsxDEV("article",{className:"w-full h-full max-w-lg flex flex-col pt-12 sm:pt-0 sm:justify-center",children:[v.jsxDEV(Fn.Title,{children:v.jsxDEV(ee,{id:"sign_up.add_website.content.title",defaultMessage:"Your website"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AddWebsite/index.tsx",lineNumber:40,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AddWebsite/index.tsx",lineNumber:39,columnNumber:5},this),v.jsxDEV(Fn.Text,{className:"mb-4",children:v.jsxDEV(ee,{id:"sign_up.add_website.content.description",defaultMessage:"Elevate your chatbot's smarts by entering your website URL. From there on, the bot embarks on a thrilling journey, soaking up all there is to know about your website."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AddWebsite/index.tsx",lineNumber:43,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AddWebsite/index.tsx",lineNumber:42,columnNumber:5},this),v.jsxDEV(Ut,{form:e,requiredMark:!1,initialValues:i,layout:"vertical",onFinish:s,children:[v.jsxDEV(Ut.Item,{name:"website",rules:[{validator:async(a,l)=>{if(zp(l))throw new Error(t.formatMessage({id:"sign_up.add_website.form.website.is_required",defaultMessage:"Web address is required."}));const c=l.replace(/^https:\/\/|^http:\/\/|www\./g,"").split(".")[0];if(fPt.includes(c))throw new Error(t.formatMessage({id:"sign_up.add_website.form.website.domain_not_allowed",defaultMessage:"The provided web address is invalid. Please refer to the list of excluded domains for reference.",description:"Show error website like facebook or instagram is added, these are excluded website domains"}));try{new URL(l)}catch{throw new Error(t.formatMessage({id:"sign_up.add_website.form.website.invalid",defaultMessage:"Please enter a valid web address.",description:"Show error when website isn't a valid url"}))}}}],children:v.jsxDEV(L9t,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AddWebsite/index.tsx",lineNumber:92,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AddWebsite/index.tsx",lineNumber:49,columnNumber:6},this),v.jsxDEV(Ut.Item,{shouldUpdate:!0,noStyle:!0,children:a=>{var c;const l=!a.isFieldsTouched()&&!((c=i.website)!=null&&c.length)||a.getFieldsError().some(({errors:u})=>u.length);return v.jsxDEV(vn,{size:"large",type:"primary",disabled:l,htmlType:"submit",className:"w-full",children:v.jsxDEV(ee,{id:"sign_up.add_website.submit",defaultMessage:"Next step"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AddWebsite/index.tsx",lineNumber:108,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AddWebsite/index.tsx",lineNumber:101,columnNumber:9},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AddWebsite/index.tsx",lineNumber:94,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AddWebsite/index.tsx",lineNumber:48,columnNumber:5},this),v.jsxDEV(vn,{size:"large",type:"text",htmlType:"submit",onClick:o,className:"w-full mt-4",children:v.jsxDEV(ee,{id:"sign_up.add_website.skip_step",defaultMessage:"Or upload documents at a later time"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AddWebsite/index.tsx",lineNumber:115,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AddWebsite/index.tsx",lineNumber:114,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AddWebsite/index.tsx",lineNumber:38,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AddWebsite/index.tsx",lineNumber:37,columnNumber:3},this)}function hrr(){const t=Mt(),e=Qr(),[n,i]=f0(YA),[r]=Bv();ga(t.formatMessage({id:"sign_up.select_project_type.document_title",defaultMessage:"Sign up - Chathive"})),b.useEffect(()=>{const l=r.get("project_type");!l||!F9[l]||(s(l),i({...n,projectType:l}))},[r]);const o=l=>{s(l),i({...n,projectType:l})},s=l=>{switch(l){case"aiForm":e("/sign_up/purpose_setup");break;case"chatbot":e("/sign_up/website");break}},a=[{id:"chatbot",img:"/img/svg/sign_up_web_assistant.svg",title:t.formatMessage({id:"sign_up.select_project_type.website_assistant.title",defaultMessage:"AI chatbot"}),description:t.formatMessage(F9.chatbot),buttonLabel:t.formatMessage({id:"sign_up.select_project_type.website_assistant.button_label",defaultMessage:"Choose option"})},{id:"aiForm",img:"/img/svg/sign_up_custom_support.svg",title:t.formatMessage({id:"sign_up.select_project_type.customer_support.title",defaultMessage:"AI form"}),description:t.formatMessage(F9.aiForm),buttonLabel:t.formatMessage({id:"sign_up.select_project_type.sign_up_custom_support.button_label",defaultMessage:"Choose option"}),comingSoon:!0}];return v.jsxDEV(d$,{showSteps:!1,children:v.jsxDEV(Gt,{className:"w-full",children:[v.jsxDEV(QF,{children:v.jsxDEV(ee,{id:"sign_up.select_project_type.content.title",defaultMessage:"What’s your goal?"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SelectProjectType/index.tsx",lineNumber:96,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SelectProjectType/index.tsx",lineNumber:95,columnNumber:5},this),v.jsxDEV(Qe,{size:"sm",c:"dimmed",className:"max-w-prose",children:v.jsxDEV(ee,{id:"sign_up.select_project_type.content.description",defaultMessage:"What's your main objective in utilizing a GPT chat assistant? Regardless of your selection, you can always create another project type later."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SelectProjectType/index.tsx",lineNumber:102,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SelectProjectType/index.tsx",lineNumber:101,columnNumber:5},this),v.jsxDEV("div",{className:Vt("w-full h-full grid gap-4 pb-4","grid-cols-1 md:grid-cols-2 signUp:grid-cols-1 signUpXl:grid-cols-2"),children:a.map(l=>v.jsxDEV(or,{"aria-disabled":l.comingSoon,shadow:"sm",radius:"md",padding:"lg",withBorder:!0,className:Vt("w-full",!l.comingSoon&&"cursor-pointer active:shadow hover:shadow-lg",l.comingSoon&&"!cursor-not-allowed"),onClick:()=>!l.comingSoon&&o(l.id),children:[v.jsxDEV("div",{className:"max-w-full max-h-36 lg:max-h-28 signUpXl:max-h-36 mb-6 aspect-video flex flex-row justify-center",children:v.jsxDEV("img",{src:l.img,className:"aspect-video"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SelectProjectType/index.tsx",lineNumber:128,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SelectProjectType/index.tsx",lineNumber:127,columnNumber:8},this),v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV(Qe,{fw:"bold",size:"lg",children:l.title},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SelectProjectType/index.tsx",lineNumber:131,columnNumber:9},this),l.comingSoon&&v.jsxDEV(jc,{size:"xs",color:"violet",radius:"md",variant:"light",children:v.jsxDEV(ee,{id:"shared.early_access",defaultMessage:"Early access"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SelectProjectType/index.tsx",lineNumber:136,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SelectProjectType/index.tsx",lineNumber:135,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SelectProjectType/index.tsx",lineNumber:130,columnNumber:8},this),v.jsxDEV("div",{className:"grow",children:v.jsxDEV(Qe,{size:"sm",c:"dimmed",children:l.description},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SelectProjectType/index.tsx",lineNumber:141,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SelectProjectType/index.tsx",lineNumber:140,columnNumber:8},this),v.jsxDEV(Nn,{disabled:l.comingSoon,className:"justify-self-end items-end mt-6",onClick:()=>!l.comingSoon&&o(l.id),children:l.buttonLabel},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SelectProjectType/index.tsx",lineNumber:145,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SelectProjectType/index.tsx",lineNumber:114,columnNumber:7},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SelectProjectType/index.tsx",lineNumber:107,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SelectProjectType/index.tsx",lineNumber:94,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SelectProjectType/index.tsx",lineNumber:93,columnNumber:3},this)}function frr(){const t=Mt(),e=Qr(),[n,i]=f0(YA);ga(t.formatMessage({id:"sign_up.purpose_setup.document_title",defaultMessage:"Sign up - purpose setup - Chathive"}));const r=s=>{KA(()=>{const{language:a,...l}=s,c=a||n.language;i({...n,language:c,organization:{...n.organization,...l}})})},o=({language:s,...a})=>{e("/sign_up/account_setup"),i({...n,language:s,organization:a})};return v.jsxDEV(d$,{currentStep:1,children:[v.jsxDEV(Fn.Title,{children:v.jsxDEV(ee,{id:"sign_up.purpose_setup.content.title",defaultMessage:"Company info"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/PurposeSetup/index.tsx",lineNumber:42,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/PurposeSetup/index.tsx",lineNumber:41,columnNumber:4},this),v.jsxDEV(Fn.Text,{className:"mb-4",children:v.jsxDEV(ee,{id:"sign_up.purpose_setup.content.description",defaultMessage:"Provide more company details, so your chatbot becomes an expert in its conversations."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/PurposeSetup/index.tsx",lineNumber:45,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/PurposeSetup/index.tsx",lineNumber:44,columnNumber:4},this),v.jsxDEV(Ut,{layout:"vertical",requiredMark:!1,onFinish:o,onValuesChange:r,className:"flex flex-col gap-4",initialValues:{...n.organization,language:n.language},children:[v.jsxDEV(Ut.Item,{name:"name",className:"!mb-0 w-full",label:t.formatMessage({id:"sign_up.purpose_setup.form.name.label",defaultMessage:"Company name"}),rules:[{required:!0,message:t.formatMessage({id:"sign_up.purpose_setup.form.name.validation.required_error",defaultMessage:"Please enter your company's name."})}],children:v.jsxDEV(es,{size:"large",maxLength:128},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/PurposeSetup/index.tsx",lineNumber:75,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/PurposeSetup/index.tsx",lineNumber:58,columnNumber:5},this),v.jsxDEV(Ut.Item,{name:"activity",className:"!mb-0",rules:[{required:!0,message:t.formatMessage({id:"sign_up.purpose_setup.form.activity.validation",defaultMessage:"Please select your company's main activity."})}],label:t.formatMessage({id:"sign_up.purpose_setup.form.activity.label",defaultMessage:"Activity"}),children:v.jsxDEV(Lo,{showSearch:!0,size:"large",filterOption:(s,a)=>{const l=`${(a==null?void 0:a.label)||""} ${(a==null?void 0:a.value)||""}`.toLowerCase();return l.includes(s.toLowerCase())||l.includes("other")},options:x9t.map(s=>({value:s.id,label:t.formatMessage(s.label)}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/PurposeSetup/index.tsx",lineNumber:94,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/PurposeSetup/index.tsx",lineNumber:77,columnNumber:5},this),v.jsxDEV(Ut.Item,{name:"size",className:"!mb-0",rules:[{required:!0,message:t.formatMessage({id:"sign_up.purpose_setup.form.size.validation",defaultMessage:"Please select your company's size."})}],label:t.formatMessage({id:"sign_up.purpose_setup.form.size.label",defaultMessage:"Company size"}),children:v.jsxDEV(Lo,{size:"large",options:Cir.map(({id:s,label:a})=>({value:s,label:t.formatMessage(a)}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/PurposeSetup/index.tsx",lineNumber:125,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/PurposeSetup/index.tsx",lineNumber:108,columnNumber:5},this),v.jsxDEV(Ut.Item,{name:"language",className:"!mb-2 w-full",rules:[{required:!0,message:t.formatMessage({id:"sign_up.purpose_setup.form.language.validation",defaultMessage:"Please select a language."})}],label:t.formatMessage({id:"sign_up.purpose_setup.form.language.label",defaultMessage:"Language"}),children:v.jsxDEV(u$,{size:"large",placeholder:t.formatMessage({id:"sign_up.purpose_setup.form.language.placeholder",defaultMessage:"Choose your default language."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/PurposeSetup/index.tsx",lineNumber:150,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/PurposeSetup/index.tsx",lineNumber:133,columnNumber:5},this),v.jsxDEV(Ut.Item,{shouldUpdate:!0,noStyle:!0,children:s=>{const a=s.getFieldsError().some(({errors:l})=>l.length);return v.jsxDEV(vn,{size:"large",type:"primary",disabled:a,htmlType:"submit",className:"w-full",children:v.jsxDEV(ee,{id:"sign_up.purpose_setup.submit",defaultMessage:"Next step"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/PurposeSetup/index.tsx",lineNumber:171,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/PurposeSetup/index.tsx",lineNumber:164,columnNumber:8},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/PurposeSetup/index.tsx",lineNumber:159,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/PurposeSetup/index.tsx",lineNumber:50,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/PurposeSetup/index.tsx",lineNumber:40,columnNumber:3},this)}const mrr=[{label:{id:"sign_up.account_info.job_title.group.company_leaders",defaultMessage:"Company leaders (excecutives & owners)",description:"Title of grouped options"},options:[{id:"Business owner",label:{id:"sign_up.account_info.job_title.options.business_owner",defaultMessage:"Business owner"}},{id:"Startup founder",label:{id:"sign_up.account_info.job_title.options.startup_founder",defaultMessage:"Startup founder"}},{id:"C-level (CEO, COO, CMO, CFO,…)",label:{id:"sign_up.account_info.job_title.options.c_level",defaultMessage:"C-level (CEO, COO, CMO, CFO,…)"}}]},{label:{id:"sign_up.account_info.job_title.group.middle_management",defaultMessage:"Middle management",description:"Title of grouped options"},options:[{id:"Marketing manager",label:{id:"sign_up.account_info.job_title.options.marketing_manager",defaultMessage:"Marketing manager"}},{id:"Sales manager",label:{id:"sign_up.account_info.job_title.options.sales_manager",defaultMessage:"Sales manager"}},{id:"Customer support manager",label:{id:"sign_up.account_info.job_title.options.customer_support_manager",defaultMessage:"Customer support manager"}},{id:"HR-manager",label:{id:"sign_up.account_info.job_title.options.hr_manager",defaultMessage:"HR-manager"}},{id:"IT manager",label:{id:"sign_up.account_info.job_title.options.it_manager",defaultMessage:"IT manager"}},{id:"Operations manager",label:{id:"sign_up.account_info.job_title.options.operations_manager",defaultMessage:"Operations manager"}}]},{label:{id:"sign_up.account_info.job_title.group.functional_management",defaultMessage:"Functional management",description:"Title of grouped options"},options:[{id:"E-commerce manager",label:{id:"sign_up.account_info.job_title.options.e_commerce_manager",defaultMessage:"E-commerce manager"}},{id:"Customer experience manager",label:{id:"sign_up.account_info.job_title.options.customer_Experience_manager",defaultMessage:"Customer experience manager"}},{id:"Product manager",label:{id:"sign_up.account_info.job_title.options.product_manager",defaultMessage:"Product manager"}},{id:"Project manager",label:{id:"sign_up.account_info.job_title.options.project_manager",defaultMessage:"Project manager"}},{id:"Data manager",label:{id:"sign_up.account_info.job_title.options.data_manager",defaultMessage:"Data manager"}}]},{label:{id:"sign_up.account_info.job_title.group.team_leadership",defaultMessage:"Team leadership",description:"Title of grouped options"},options:[{id:"Customer support team lead",label:{id:"sign_up.account_info.job_title.options.customer_support_team_lead",defaultMessage:"Customer support team lead"}},{id:"IT team lead",label:{id:"sign_up.account_info.job_title.options.it_team_lead",defaultMessage:"IT Team Lead"}},{id:"Marketing team lead",label:{id:"sign_up.account_info.job_title.options.marketing_team_lead",defaultMessage:"Marketing Team Lead"}},{id:"Sales team lead",label:{id:"sign_up.account_info.job_title.options.sales_team_lead",defaultMessage:"Sales Team Lead"}}]},{label:{id:"sign_up.account_info.job_title.group.specialised_roles",defaultMessage:"Specialised roles",description:"Title of grouped options"},options:[{id:"Customer support representative",label:{id:"sign_up.account_info.job_title.options.customer_support_representative",defaultMessage:"Customer support representative"}},{id:"Sales representative",label:{id:"sign_up.account_info.job_title.options.sales_representative",defaultMessage:"Sales representative"}},{id:"Chatbot developer",label:{id:"sign_up.account_info.job_title.options.chatbot_developer",defaultMessage:"Chatbot developer"}},{id:"Data analyst",label:{id:"sign_up.account_info.job_title.options.data_analyst",defaultMessage:"Data analyst"}},{id:"UX/UI designer",label:{id:"sign_up.account_info.job_title.options.ux_UI_designer",defaultMessage:"UX/UI designer"}},{id:"Content strategist",label:{id:"sign_up.account_info.job_title.options.content_strategist",defaultMessage:"Content strategist"}},{id:"Marketing specialist",label:{id:"sign_up.account_info.job_title.options.marketing_specialist",defaultMessage:"Marketing specialist"}},{id:"Web developer",label:{id:"sign_up.account_info.job_title.options.web_developer",defaultMessage:"Web developer"}},{id:"developer",label:{id:"sign_up.account_info.job_title.options.developer",defaultMessage:"Developer"}}]},{label:{id:"sign_up.account_info.job_title.group.education",defaultMessage:"Education",description:"Title of grouped options"},options:[{id:"Teacher",label:{id:"sign_up.account_info.job_title.options.teacher",defaultMessage:"Teacher"}},{id:"Online course instructor",label:{id:"sign_up.account_info.job_title.options.online_course_instructor",defaultMessage:"Online course instructor"}},{id:"Student counselor",label:{id:"sign_up.account_info.job_title.options.student_counselor",defaultMessage:"Student counselor"}},{id:"Enrollment specialist",label:{id:"sign_up.account_info.job_title.options.enrollment_specialist",defaultMessage:"Enrollment specialist"}},{id:"eLearning coordinator",label:{id:"sign_up.account_info.job_title.options.e_learning_coordinator",defaultMessage:"E-learning coordinator"}},{id:"Curriculum developer",label:{id:"sign_up.account_info.job_title.options.curriculum_developer",defaultMessage:"Curriculum developer"}},{id:"Academic advisor",label:{id:"sign_up.account_info.job_title.options.academic_advisor",defaultMessage:"Academic advisor"}},{id:"School principal",label:{id:"sign_up.account_info.job_title.options.school_principal",defaultMessage:"School principal"}},{id:"University or college dean",label:{id:"sign_up.account_info.job_title.options.university_or_college_dean",defaultMessage:"University or college Dean"}},{id:"Study program coordinator",label:{id:"sign_up.account_info.job_title.options.study_program_coordinator",defaultMessage:"Study program coordinator"}}]}];function prr(){var u;const t=Mt(),[e]=Ut.useForm(),n=Qr(),[i,r]=f0(YA),o=Ut.useWatch("email",e),s=Je.signUpNewAccount.useMutation(),{data:a}=Je.doesEmailExist.useQuery({email:o},{enabled:!!(o!=null&&o.length&&!((u=e.getFieldError("email"))!=null&&u.length))});ga(t.formatMessage({id:"sign_up.account_info.document_title",defaultMessage:"Sign up - Account info - Chathive"}));const l=d=>{KA(()=>r({...i,user:{...i.user,...d}}))},c=async d=>{try{await s.mutateAsync({...i,user:d}),n("/sign_up/verify")}catch(h){rK(h),console.error("Failed to sign up user",h),Ei.error({placement:"bottomRight",message:t.formatMessage({id:"sign_up.create.failed",defaultMessage:"Something went wrong with your sign-up. Please try again later or contact our support team for assistance.",description:"Failed to sign up and/or send out verification email to user"})})}};return v.jsxDEV(d$,{currentStep:2,children:[v.jsxDEV(Fn.Title,{children:v.jsxDEV(ee,{id:"sign_up.account_info.content.title",defaultMessage:"About you"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:68,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:67,columnNumber:4},this),v.jsxDEV(Fn.Text,{className:"mb-4",children:v.jsxDEV(ee,{id:"sign_up.account_info.content.description",defaultMessage:"We'd like to get to know you, so we can personalise our communication."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:71,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:70,columnNumber:4},this),v.jsxDEV(Ut,{form:e,layout:"vertical",requiredMark:!1,onFinish:c,onValuesChange:l,className:"flex flex-col gap-4",initialValues:i.user,children:[v.jsxDEV("div",{className:"flex flex-col sm:flex-row justify-between gap-4",children:[v.jsxDEV(Ut.Item,{name:"firstName",className:"!mb-0 w-full",label:t.formatMessage({id:"sign_up.account_info.form.first_name.label",defaultMessage:"First name"}),rules:[{required:!0,message:t.formatMessage({id:"sign_up.account_info.form.first_name.validation.required_error",defaultMessage:"Please enter your first name."})}],children:v.jsxDEV(es,{size:"large",maxLength:48},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:103,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:86,columnNumber:6},this),v.jsxDEV(Ut.Item,{name:"lastName",className:"!mb-0 w-full",label:t.formatMessage({id:"sign_up.account_info.form.last_name.label",defaultMessage:"Last name"}),rules:[{required:!0,message:t.formatMessage({id:"sign_up.account_info.form.last_name.validation.required_error",defaultMessage:"Please enter your last name."})}],children:v.jsxDEV(es,{size:"large",maxLength:48},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:122,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:105,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:85,columnNumber:5},this),v.jsxDEV(Ut.Item,{name:"email",className:"!mb-0 w-full",label:t.formatMessage({id:"sign_up.account_info.form.email.label",defaultMessage:"Work email"}),rules:[{required:!0,message:t.formatMessage({id:"sign_up.account_info.form.email.validation.required_error",defaultMessage:"Please enter your email address."})},{pattern:new RegExp(/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/),message:t.formatMessage({id:"sign_up.account_info.form.email.validation.invalid_email",defaultMessage:"Please enter a valid email address."})}],children:v.jsxDEV(es,{type:"email",size:"large"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:151,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:125,columnNumber:5},this),a&&v.jsxDEV(pl,{type:"error",message:t.formatMessage({id:"sign_up.account_info.form.email.error.exist",defaultMessage:"A user with the email address <bold>{email}</bold> already exists. If this is not you, please get in touch with our <link>customer support</link>.",description:"Error banner above form show a user with this email already exists"},{email:o,bold:d=>v.jsxDEV(Fn.Text,{strong:!0,children:d},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:165,columnNumber:33},this),link:d=>v.jsxDEV("a",{href:"mailto:support@chathive.co",children:d},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:167,columnNumber:10},this)})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:154,columnNumber:6},this),v.jsxDEV(Ut.Item,{name:"phone",className:"!mb-0 w-full",label:t.formatMessage({id:"sign_up.account_info.form.phone.label",defaultMessage:"Phone number"}),help:t.formatMessage({id:"sign_up.account_info.form.phone.help",defaultMessage:"Your phone number ensures added support and security in case of (email-related) issues."}),rules:[{required:!0,message:t.formatMessage({id:"sign_up.account_info.form.phone.validation.required_error",defaultMessage:"Please enter your phone number."})}],children:v.jsxDEV(es,{type:"phone",size:"large"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:195,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:173,columnNumber:5},this),v.jsxDEV(Ut.Item,{name:"jobTitle",className:"!mb-0",rules:[{required:!0,message:t.formatMessage({id:"sign_up.account_info.form.job_title.validation",defaultMessage:"Please select your current job title."})}],label:t.formatMessage({id:"sign_up.account_info.form.job_title.label",defaultMessage:"Job title"}),children:v.jsxDEV(Lo,{showSearch:!0,size:"large",notFoundContent:null,filterOption:(d,h)=>`${(h==null?void 0:h.label)||""} ${(h==null?void 0:h.value)||""}`.toLowerCase().includes(d.toLowerCase()),options:mrr.map(d=>{var h;return{value:d.id,label:t.formatMessage(d.label),options:(h=d.options)==null?void 0:h.map(f=>({value:f.id,label:t.formatMessage(f.label)}))}})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:214,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:197,columnNumber:5},this),v.jsxDEV(Ut.Item,{name:"tos",rules:[{validator:async(d,h)=>{if(!h)throw new Error(t.formatMessage({id:"sign_up.account_info.form.tos.validation.required_error",defaultMessage:"Please accept the terms of services to continue."}))}}],valuePropName:"checked",children:v.jsxDEV("div",{className:"w-full flex flex-row justify-start items-center mt-4",children:[v.jsxDEV(Ut.Item,{noStyle:!0,valuePropName:"checked",children:v.jsxDEV("input",{id:"tosField",name:"tosField",type:"checkbox",className:"min-h-[1.5rem] min-w-[1.5rem] cursor-pointer rounded-full mr-2 accent-theme-primary"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:250,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:249,columnNumber:7},this),v.jsxDEV("label",{htmlFor:"tosField",className:"cursor-pointer",children:v.jsxDEV(ee,{id:"sign_up.account_info.form.tos.label",defaultMessage:"I agree with the <link> terms of services</link>",values:{link:d=>v.jsxDEV("a",{href:"https://chathive.co/legal/end_user_terms",target:"_blank",rel:"noopener noreferrer",children:d},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:263,columnNumber:11},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:258,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:257,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:248,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:231,columnNumber:5},this),v.jsxDEV(Ut.Item,{shouldUpdate:!0,children:d=>{const h=d.getFieldsError().some(({errors:f})=>f.length)||a;return v.jsxDEV(vn,{size:"large",type:"primary",disabled:h,htmlType:"submit",className:"w-full sm:mt-8",loading:s.isLoading,children:v.jsxDEV(ee,{id:"sign_up.account_info.submit",defaultMessage:"Verify and create chatbot"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:290,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:282,columnNumber:8},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:277,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:76,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/AccountInfo/index.tsx",lineNumber:66,columnNumber:3},this)}function grr(){const t=Mt(),e=Qr(),n=Oi(YA),[i,r]=b.useState([]),o=Je.verifyAuthToken.useMutation(),s=Je.verifyUser.useMutation();ga(t.formatMessage({id:"sign_up.verify_account.document_title",defaultMessage:"Sign up - Verify account - Chathive"}));const a=async c=>{try{const u=await o.mutateAsync({email:n.user.email,authToken:c});localStorage.setItem("TOKEN",u.jwtToken),e("/sign_up/completed")}catch{In.show({color:"red",message:t.formatMessage({id:"sign_up.verify_account.verify_token.failed",defaultMessage:"Something went wrong while trying to verify your code. Please try again later."},{email:n.user.email}),autoClose:1e4})}},l=async()=>{var c;try{await s.mutateAsync({email:n.user.email}),r(i.map(()=>"")),In.show({color:"green",message:t.formatMessage({id:"sign_up.verify_account.request_new_code.succeeded",defaultMessage:"We have sent a verification code to {email}. Please double-check your spam folder if you haven't received an email."},{email:n.user.email})})}catch(u){if(((c=u.data)==null?void 0:c.code)==="NOT_FOUND"){e("/sign_up");return}In.show({color:"red",message:t.formatMessage({id:"sign_up.verify_account.request_new_code.failed",defaultMessage:"Something went wrong while generating a new verification code. Please try again."},{email:n.user.email}),autoClose:1e4})}};return v.jsxDEV(d$,{showSteps:!1,children:v.jsxDEV(Gt,{className:"w-full h-full max-w-lg",justify:"center",children:[v.jsxDEV("header",{className:"flex flex-col justify-center",children:v.jsxDEV(Gt,{justify:"flex-start",children:[v.jsxDEV(QF,{children:v.jsxDEV(ee,{id:"sign_up.verify_account.content.title",defaultMessage:"Verify yourself"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:101,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:100,columnNumber:7},this),v.jsxDEV(Qe,{size:"sm",className:"mb-4",children:v.jsxDEV(ee,{id:"sign_up.verify_account.content.description",defaultMessage:"You have received a 6-digit verification code at <bold>{email}</bold>. Please enter the code below to verify your identity and log in to Chathive.",values:{email:n==null?void 0:n.user.email,bold:c=>v.jsxDEV("span",{className:"font-bold",children:c},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:112,columnNumber:29},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:107,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:106,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:99,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:98,columnNumber:5},this),!o.isLoading&&v.jsxDEV(v.Fragment,{children:[o.error&&v.jsxDEV(Yo,{color:"red",children:v.jsxDEV(ee,{id:"sign_up.verify_account.error.invalid_code",defaultMessage:"This code is not valid. Please double-check the code or click 'Request new code' to request a new one."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:122,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:121,columnNumber:8},this),v.jsxDEV(Hde,{oneTimeCode:!0,size:"xl",length:6,type:"number",onComplete:a},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:128,columnNumber:7},this),v.jsxDEV("div",{className:"flex flex-col items-center space-y-5 lg:flex-row lg:justify-between lg:space-y-0 overflow-hidden",children:v.jsxDEV(Nn,{color:"gray",variant:"subtle",onClick:l,loading:s.isLoading,children:v.jsxDEV(ee,{id:"sign_up.verify_account.request_new_code",defaultMessage:"Request new code"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:137,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:131,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:130,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:119,columnNumber:6},this),o.isLoading&&v.jsxDEV(fd,{icon:v.jsxDEV(Xd,{className:"!text-theme-primary"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:147,columnNumber:13},this),subTitle:t.formatMessage({id:"sign_up.verify_account.setup_modal.title",defaultMessage:"Just a minute while we set up...",description:"Show modal when user needs to wait a few seconds before we verified them"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:146,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:97,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/VerifyAccount/index.tsx",lineNumber:96,columnNumber:3},this)}function brr(){const{data:t,isLoading:e}=Je.project.getWelcomeProject.useQuery();if(t){localStorage.setItem("organizationId",`${t.organizationId}`);const n=t.projectType==="aiForm"?"form-config":"agent";return v.jsxDEV(Op,{to:`/${t._id}/${n}`,replace:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpCompleted/index.tsx",lineNumber:15,columnNumber:10},this)}return!e&&!t?v.jsxDEV(Op,{to:"/account",replace:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpCompleted/index.tsx",lineNumber:17,columnNumber:37},this):v.jsxDEV(Ps,{className:"h-screen",children:v.jsxDEV(Ps.Content,{className:"flex flex-col justify-center items-center gap-4",children:[v.jsxDEV(zS,{size:"large"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpCompleted/index.tsx",lineNumber:22,columnNumber:5},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"sign_up_completed.welcome_redirect.loader.title",defaultMessage:"We're setting up your project...",description:"Message show'n when project is loaded in and loader is show'n"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpCompleted/index.tsx",lineNumber:24,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpCompleted/index.tsx",lineNumber:23,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpCompleted/index.tsx",lineNumber:21,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/SignUpCompleted/index.tsx",lineNumber:20,columnNumber:3},this)}function vrr(){var d;const t=Mt(),[e]=Ut.useForm(),n=Qr(),{search:i}=Gp(),o=new URLSearchParams(i).get("invite_token"),{data:s,isLoading:a,isInitialLoading:l}=Je.getInvitedUser.useQuery({token:o},{enabled:!!o}),c=Je.completeInvitedUser.useMutation();ga(t.formatMessage({id:"sign_up.invite.document_title",defaultMessage:"Invited to Chathive"}));const u=async h=>{var f;try{const m=await c.mutateAsync({...h,token:o});localStorage.setItem("TOKEN",m.jwtToken),localStorage.setItem("organizationId",(f=s==null?void 0:s.organization)==null?void 0:f._id),n("/sign_up/completed")}catch(m){console.error("Failed to complete invite user",m),rK(m),Ei.error({placement:"bottomRight",message:t.formatMessage({id:"sign_up.invite.failed",defaultMessage:"Something went wrong with completing your invite. Please try again later or contact our support team for assistance.",description:"Failed to complete invite"})})}};return!o||!l&&!s?(n("/login"),null):v.jsxDEV(d$,{showSteps:!1,children:v.jsxDEV("article",{className:"w-full h-full max-w-lg flex flex-col justify-center",children:[v.jsxDEV(Fn.Title,{children:v.jsxDEV(ee,{id:"sign_up.invite.content.title",defaultMessage:"Welcome to Chathive!"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:71,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:70,columnNumber:5},this),v.jsxDEV(Fn.Text,{className:"mb-4",children:v.jsxDEV(ee,{id:"sign_up.invite.content.description",defaultMessage:"You have been invited to join <bold>{organizationName}</bold>.",values:{organizationName:(d=s==null?void 0:s.organization)==null?void 0:d.name,bold:h=>v.jsxDEV(Fn.Text,{strong:!0,children:h},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:79,columnNumber:27},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:74,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:73,columnNumber:5},this),a&&v.jsxDEV(fd,{icon:v.jsxDEV(Xd,{className:"!text-theme-primary"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:85,columnNumber:13},this),subTitle:t.formatMessage({id:"sign_up.verify_account.setup_modal.title",defaultMessage:"Just a minute while we set up...",description:"Show modal when user needs to wait a few seconds before we verified them"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:84,columnNumber:6},this),!a&&v.jsxDEV(Ut,{form:e,layout:"vertical",requiredMark:!1,onFinish:u,className:"flex flex-col gap-4",initialValues:(s==null?void 0:s.user)||{},children:[v.jsxDEV("div",{className:"flex flex-col sm:flex-row justify-between gap-4",children:[v.jsxDEV(Ut.Item,{name:"firstName",className:"!mb-0 w-full",label:t.formatMessage({id:"sign_up.invite.form.first_name.label",defaultMessage:"First name"}),rules:[{required:!0,message:t.formatMessage({id:"sign_up.invite.form.first_name.validation.required_error",defaultMessage:"Please enter your first name."})}],children:v.jsxDEV(es,{size:"large",maxLength:48},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:120,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:103,columnNumber:8},this),v.jsxDEV(Ut.Item,{name:"lastName",className:"!mb-0 w-full",label:t.formatMessage({id:"sign_up.invite.form.last_name.label",defaultMessage:"Last name"}),rules:[{required:!0,message:t.formatMessage({id:"sign_up.invite.form.last_name.validation.required_error",defaultMessage:"Please enter your last name."})}],children:v.jsxDEV(es,{size:"large",maxLength:48},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:139,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:122,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:102,columnNumber:7},this),v.jsxDEV(Ut.Item,{name:"email",className:"!mb-0 w-full",label:t.formatMessage({id:"sign_up.invite.form.email.label",defaultMessage:"Work email"}),children:v.jsxDEV(es,{type:"email",size:"large",disabled:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:150,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:142,columnNumber:7},this),v.jsxDEV(Ut.Item,{shouldUpdate:!0,children:h=>{const f=h.getFieldsError().some(({errors:m})=>m.length);return v.jsxDEV(vn,{size:"large",type:"primary",disabled:f,htmlType:"submit",className:"w-full sm:mt-8",loading:c.isLoading,children:v.jsxDEV(ee,{id:"sign_up.invite.submit",defaultMessage:"Finalize invite"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:166,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:158,columnNumber:10},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:153,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:94,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:69,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/Invite/index.tsx",lineNumber:68,columnNumber:3},this)}const yrr=[{path:"",element:v.jsxDEV(hrr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/index.tsx",lineNumber:15,columnNumber:12},void 0)},{path:"website",element:v.jsxDEV(drr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/index.tsx",lineNumber:19,columnNumber:12},void 0)},{path:"purpose_setup",element:v.jsxDEV(frr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/index.tsx",lineNumber:23,columnNumber:12},void 0)},{path:"account_setup",element:v.jsxDEV(prr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/index.tsx",lineNumber:27,columnNumber:12},void 0)},{path:"verify",element:v.jsxDEV(grr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/index.tsx",lineNumber:31,columnNumber:12},void 0)},{path:"completed",element:v.jsxDEV(brr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/signUp/index.tsx",lineNumber:35,columnNumber:12},void 0)}];function _rr(){var m;const t=Mt(),e=b.useRef(!1),[n]=Bv(),[i,r]=b.useState(!1),[o,s]=b.useState("en"),[a,l]=b.useState([]),c=n.get("api_key"),u=n.get("website"),d=((m=window.opener)==null?void 0:m.name)==="chathive_parent";if(ga(t.formatMessage({id:"widget_preview.document_title",defaultMessage:"Widget preview - Chathive"})),b.useEffect(()=>{if(!u||!c||e.current)return;r(!0);const p=document.createElement("script");p.src="https://sdk.chathive.app",p.onload=()=>{window.Chathive.widget.init({apiKey:c}),window.Chathive.widget.on("widget.init",()=>{const g=window.Chathive.widget.config;r(!1),l(g.languages),s(g.defaultLanguage)}),n.get("open")==="true"&&setTimeout(()=>window.Chathive.widget.open(),1200)},e.current=!0,document.body.appendChild(p)},[u,c]),!u||!c)return v.jsxDEV("main",{className:"w-screen h-screen p-24",children:v.jsxDEV(Zd,{className:"py-8",src:"/img/svg/crash_icon.svg",title:t.formatMessage({id:"widget_preview.error.title",defaultMessage:"Invalid preview URL",description:"Show error when user wants to preview the widget with incomplete data"}),description:t.formatMessage({id:"widget_preview.error.description",defaultMessage:"The preview URL is incorrect. Please regenerate a new preview URL in your dashboard.",description:"Show error when user wants to preview the widget with incomplete data"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:69,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:68,columnNumber:4},this);const h=p=>{var g;window.opener&&(window.opener.postMessage({action:p}),(g=window.open("","chathive_parent"))==null||g.focus())},f=p=>{var g,y;s(p),(y=(g=window.Chathive)==null?void 0:g.widget)==null||y.setLanguage(p)};return v.jsxDEV("main",{className:"w-screen h-screen relative overflow-hidden",children:[v.jsxDEV("section",{className:Vt("fixed top-4 bg-white left-2/4 -translate-x-1/2 p-2 rounded-lg shadow-lg","border border-theme-primary border-solid","flex flex-col gap-1","max-w-full min-w-72"),style:{transform:"translateX(-50%)"},children:[v.jsxDEV("header",{className:"flex flex-col justify-center gap-1 p-1 text-sm",children:v.jsxDEV("div",{className:"flex flex-row justify-center items-center gap-1",children:[v.jsxDEV("img",{src:"/img/svg/icon.svg",className:"h-4 w-4"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:114,columnNumber:7},this),v.jsxDEV("p",{className:"!text-sm text-center text-theme-text",children:v.jsxDEV(ee,{id:"widget_preview.menu.title",defaultMessage:"Chathive preview"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:116,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:115,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:113,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:112,columnNumber:5},this),v.jsxDEV(zl,{className:"!m-0"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:120,columnNumber:5},this),v.jsxDEV(un,{gap:"xs",children:[d&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Nn,{color:"black",className:"!font-normal",variant:"subtle",onClick:()=>h("training"),children:v.jsxDEV(ee,{id:"widget_preview.menu.improve_training",defaultMessage:"Improve training",description:"Menu button on preview page to redirect user to training page in dashboard"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:130,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:124,columnNumber:8},this),v.jsxDEV(zl,{orientation:"vertical",className:"hidden sm:block"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:136,columnNumber:8},this),v.jsxDEV(Nn,{color:"black",className:"!font-normal",variant:"subtle",onClick:()=>h("installWidget"),children:v.jsxDEV(ee,{id:"widget_preview.menu.install_widget",defaultMessage:"How to install the widget",description:"Menu button on preview page to redirect user to guide on how install widget on their site"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:143,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:137,columnNumber:8},this),v.jsxDEV(zl,{orientation:"vertical",className:"hidden sm:block"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:149,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:123,columnNumber:7},this),v.jsxDEV(wS,{className:"grow",variant:"borderless",isLoading:i,value:o,locales:new Set(a||[]),onChange:p=>f(p),placeholder:t.formatMessage({id:"widget_preview.menu.change_language.placeholder",defaultMessage:"Change language",description:"Menu button on preview page to change widget language"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:152,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:121,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:103,columnNumber:4},this),v.jsxDEV("iframe",{className:"w-screen h-screen",src:u},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:167,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/WidgetPreview/index.tsx",lineNumber:102,columnNumber:3},this)}function xrr({value:t,onChange:e,className:n=""}){const i=Mt(),r=[{key:"precise",title:i.formatMessage({id:"agent.conversation_style.option.precise.title",defaultMessage:"Precise"}),content:i.formatMessage({id:"agent.conversation_style.option.precise.description",defaultMessage:"The agent will strive to provide answers that are as closely aligned as possible with the information on your website."})},{key:"balanced",title:i.formatMessage({id:"agent.conversation_style.option.balanced.title",defaultMessage:"Balanced"}),content:i.formatMessage({id:"agent.conversation_style.option.balanced.description",defaultMessage:"The agent will seek a balance between accuracy and creativity.",description:"This is the description of the balanced conversation style option."})},{key:"creative",title:i.formatMessage({id:"agent.conversation_style.option.creative.title",defaultMessage:"Creative"}),content:i.formatMessage({id:"agent.conversation_style.option.creative.description",defaultMessage:"The agent will express itself in a creative manner but may provide answers that are not necessarily accurate.",description:"This is the description of the creative conversation style option."})}],o=({event:s,value:a})=>{!(s.key==="Enter"||s.code==="Space")||!e||(s.preventDefault(),s.stopPropagation(),e(a))};return v.jsxDEV("div",{className:`grid gap-4 ${n}`,children:r.map(s=>{const a=cp[s.key]===t;return v.jsxDEV(uo,{tabIndex:0,onKeyDown:l=>o({event:l,value:cp[s.key]}),onClick:()=>e&&e(cp[s.key]),className:Vt(a&&"!border-theme-primary"),hoverable:!0,title:v.jsxDEV("div",{className:"flex justify-between items-center flex-wrap",children:[s.title,a&&v.jsxDEV(kv,{color:yd,children:v.jsxDEV(ee,{id:"tag.selected",defaultMessage:"SELECTED"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/conversationStyle.tsx",lineNumber:83,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/conversationStyle.tsx",lineNumber:82,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/conversationStyle.tsx",lineNumber:79,columnNumber:8},this),children:s.content},s.key,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/conversationStyle.tsx",lineNumber:69,columnNumber:6},this)})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/conversationStyle.tsx",lineNumber:64,columnNumber:3},this)}function wrr(t){var h,f,m;const e=Mt(),n=Je.useContext(),[i,r]=b.useState(!1),{data:o,isLoading:s,isInitialLoading:a}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0}),l=Je.patchAssistantConfig.useMutation({onError:()=>{Ei.error({placement:"bottomRight",message:e.formatMessage({id:"agent.conversation_style.update.executed.error.message",defaultMessage:"Something went wrong while updating conversation style."})}),n.project.getCurrent.invalidate()},onSuccess:()=>{Ei.success({placement:"bottomRight",message:e.formatMessage({id:"agent.conversation_style.update.executed.success.message",defaultMessage:"Successfully saved conversation style."})}),n.project.getCurrent.invalidate()}}),c=p=>{o!=null&&o.disabledAt||(l.mutate({temperature:p}),n.project.getCurrent.setData(void 0,g=>{if(!g)return g;const y=structuredClone(g);return y.config.temperature=p,y}))},u=p=>{KA(()=>c(p))},d=[{value:.1,label:e.formatMessage({id:"conversation_style.advanced.mark.strict",defaultMessage:"Strict"})},{value:cp.precise,label:e.formatMessage({id:"conversation_style.advanced.mark.precise",defaultMessage:"Precise"})},{value:cp.balanced,label:e.formatMessage({id:"conversation_style.advanced.mark.balanced",defaultMessage:"Balanced"})},{value:cp.creative,label:e.formatMessage({id:"conversation_style.advanced.mark.creative",defaultMessage:"Creative"})},{value:2,label:e.formatMessage({id:"conversation_style.advanced.mark.transcending",defaultMessage:"Transcending"})}];return b.useEffect(()=>{var g,y;a||!((g=o==null?void 0:o.config)!=null&&g.temperature)||Object.values(cp).includes((y=o==null?void 0:o.config)==null?void 0:y.temperature)||r(!0)},[a]),v.jsxDEV(uo,{...t,id:"agentConversationStyle",loading:s,title:e.formatMessage({id:"agent.conversation_style.title",defaultMessage:"Conversation style"}),className:"w-full",extra:v.jsxDEV(vn,{size:"small",onClick:()=>r(p=>!p),children:[!i&&v.jsxDEV(ee,{id:"agent.conversation_style.show.advanced",defaultMessage:"Advanced mode",description:"Button to toggle advanced conversation style picked"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/ConversationStyle.tsx",lineNumber:130,columnNumber:7},this),i&&v.jsxDEV(ee,{id:"agent.conversation_style.show.simple_mode",defaultMessage:"Simple selector",description:"Button to toggle default conversation style picked"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/ConversationStyle.tsx",lineNumber:137,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/ConversationStyle.tsx",lineNumber:128,columnNumber:5},this),children:[!i&&v.jsxDEV(xrr,{value:(h=o==null?void 0:o.config)==null?void 0:h.temperature,onChange:c,className:"sm:gap-6 sm:grid-cols-3"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/ConversationStyle.tsx",lineNumber:147,columnNumber:5},this),i&&v.jsxDEV("div",{className:"w-full flex flex-col gap-2",children:[(((f=o==null?void 0:o.config)==null?void 0:f.temperature)||0)>1&&v.jsxDEV(pl,{showIcon:!0,type:"warning",message:e.formatMessage({id:"agent.conversation_style.advanced.creativity_warning.message",defaultMessage:"This conversation style might lead to more creative or less accurate responses."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/ConversationStyle.tsx",lineNumber:156,columnNumber:7},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"agent.conversation_style.advanced.description",defaultMessage:"The advanced Conversation Style Selector gives you greater control over your agent's responses, allowing you to tailor the degree of freedom in their answers to your questions.",values:{bold:p=>v.jsxDEV(Fn.Text,{strong:!0,className:"text-theme-primary",children:p},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/ConversationStyle.tsx",lineNumber:172,columnNumber:10},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/ConversationStyle.tsx",lineNumber:167,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/ConversationStyle.tsx",lineNumber:166,columnNumber:6},this),v.jsxDEV(Kde,{max:2,min:.1,step:.01,radius:"xl",marks:d,onChange:u,value:(m=o==null?void 0:o.config)==null?void 0:m.temperature,className:"w-full mb-4 rounded agent-conversation_style-slider"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/ConversationStyle.tsx",lineNumber:179,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/ConversationStyle.tsx",lineNumber:154,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/ConversationStyle.tsx",lineNumber:121,columnNumber:3},this)}function Crr(t){var d;const e=Mt(),[n]=n$e(),i=Je.useContext(),[r,o]=b.useState(!1),{data:s,isLoading:a}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0}),l=Je.patchAssistantConfig.useMutation();async function c(h){try{await l.mutateAsync({prompt:h.prompt,stayInScope:h.stayInScope}),Ei.success({placement:"bottomRight",message:e.formatMessage({id:"agent.prompt_engineering.update.executed.success.message",defaultMessage:"Successfully saved the prompt."})}),i.project.getCurrent.invalidate()}catch{Ei.error({placement:"bottomRight",message:e.formatMessage({id:"agent.prompt_engineering.update.executed.error.message",defaultMessage:"Something went wrong while updating the prompt."})}),i.project.getCurrent.invalidate()}}const u=Ut.useWatch("prompt",n);return v.jsxDEV(uo,{...t,bordered:!1,loading:a,title:e.formatMessage({id:"agent.prompt_engineering.title",defaultMessage:"Prompt engineering"}),className:Vt(r&&"[&>.ant-card-body]:hidden"),extra:v.jsxDEV(vn,{onClick:()=>o(h=>!h),type:"text",icon:r?v.jsxDEV(h6,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:69,columnNumber:26},this):v.jsxDEV(Phe,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:69,columnNumber:45},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:66,columnNumber:5},this),children:s&&v.jsxDEV(Ut,{form:n,layout:"vertical",requiredMark:!1,onFinish:c,disabled:!!s.disabledAt,className:"flex flex-col gap-4",initialValues:{prompt:(d=s.config.prompt)==null?void 0:d[s.defaultLanguage],stayInScope:s.config.stayInScope},children:[v.jsxDEV(Ut.Item,{className:"!m-0",label:v.jsxDEV(aS,{size:"small",children:[v.jsxDEV(ee,{id:"agent.prompt_engineering.input.prompt.label",defaultMessage:"Prompt in default language ({language})",values:{language:Ja.getName(s.defaultLanguage)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:90,columnNumber:9},this),v.jsxDEV(FBe,{message:{id:"agent.prompt_engineering.input.prompt.tooltip",defaultMessage:"In this prompt, you can include instructions on the desired tone of voice for the chatbot, its behavior in certain situations, the appropriate responses to specific questions, when it should refer users to the contact information of someone from your company, …"}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:97,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:89,columnNumber:8},this),children:[(u==null?void 0:u.length)>1028&&v.jsxDEV(pl,{type:"warning",className:"!mb-2",message:e.formatMessage({id:"agent.prompt_engineering.input.prompt.validation.warning.size",defaultMessage:"Caution: If your prompt is too long, your agent may not remember as much of the conversation."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:108,columnNumber:8},this),v.jsxDEV(Ut.Item,{name:"prompt",className:"!m-0",rules:[{required:!0,message:e.formatMessage({id:"agent.prompt_engineering.input.prompt.validation.error.message",defaultMessage:"Please enter a prompt for your chatbot."})}],children:v.jsxDEV(es.TextArea,{rows:10,showCount:!0,placeholder:e.formatMessage({id:"agent.prompt_engineering.input.prompt.placeholder",defaultMessage:"E.g. I'm a chatbot for Chathive! 💬"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:131,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:118,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:86,columnNumber:6},this),v.jsxDEV("div",{children:[v.jsxDEV(Ut.Item,{name:"stayInScope",valuePropName:"checked",htmlFor:"stayInScope",label:e.formatMessage({id:"agent.prompt_engineering.stay_in_scope.label",defaultMessage:"Stay in scope"}),rootClassName:"horizontal-switch !mb-0",children:v.jsxDEV(nq,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:152,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:142,columnNumber:7},this),v.jsxDEV("p",{className:"text-zinc-500",children:v.jsxDEV(ee,{id:"agent.prompt_engineering.stay_in_scope.help",defaultMessage:"Agent will only answer question that can be found in your trainings data"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:155,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:154,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:141,columnNumber:6},this),v.jsxDEV(Ut.Item,{shouldUpdate:!0,noStyle:!0,children:h=>{const f=!h.isFieldsTouched()||h.getFieldsError().some(({errors:m})=>m.length);return v.jsxDEV(vn,{type:"primary",htmlType:"submit",className:"w-fit",disabled:f||!!(s!=null&&s.disabledAt),loading:l.isLoading,children:v.jsxDEV(ee,{id:"agent.prompt_engineering.save_button",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:174,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:167,columnNumber:9},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:161,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:74,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/PromptEngineering.tsx",lineNumber:56,columnNumber:3},this)}function Srr(t){const e=Mt(),n=Je.useUtils(),{data:i,isLoading:r}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0}),o=Je.updatePurposeConfig.useMutation({onError:()=>{Ei.error({placement:"bottomRight",message:e.formatMessage({id:"agent.web_assistant_config.update.executed.error.message",defaultMessage:"Something went wrong while updating chatbot settings."})}),n.project.getCurrent.invalidate()},onSuccess:()=>{Ei.success({placement:"bottomRight",message:e.formatMessage({id:"agent.web_assistant_config.update.executed.success.message",defaultMessage:"Successfully saved chatbot settings."})}),n.project.getCurrent.invalidate()}});function s(a){o.mutate({activities:a.activities,companyName:a.companyName})}return v.jsxDEV(uo,{...t,bordered:!1,className:"w-full",loading:r,title:e.formatMessage({id:"agent.config.title",defaultMessage:"Company information"}),children:!r&&v.jsxDEV(Ut,{initialValues:{...(i==null?void 0:i.purposeConfig)&&i.purposeConfig},requiredMark:!1,layout:"vertical",onFinish:s,disabled:!!(i!=null&&i.disabledAt),children:[v.jsxDEV("div",{className:"grid gap-2 w-full",children:[v.jsxDEV(Ut.Item,{rules:[{required:!0,message:e.formatMessage({id:"agent.web_assistant_config.input.company_name.validation.error.message",defaultMessage:"Please enter a company name"})}],className:"!m-0 max-w-sm",name:"companyName",label:e.formatMessage({id:"agent.web_assistant_config.input.company_name.label",defaultMessage:"Company name"}),children:v.jsxDEV(es,{maxLength:64,showCount:!0,placeholder:e.formatMessage({id:"agent.web_assistant_config.input.companyName.placeholder",defaultMessage:"Enter the name of your company",description:"Placeholder for the company name input field"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/WebAssistantConfig.tsx",lineNumber:86,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/WebAssistantConfig.tsx",lineNumber:69,columnNumber:7},this),v.jsxDEV(Ut.Item,{rules:[{required:!0,message:e.formatMessage({id:"agent.web_assistant_config.input.name.validation.error.message",defaultMessage:"Please enter activities for your chatbot"})}],className:"!m-0",name:"activities",label:e.formatMessage({id:"agent.web_assistant_config.input.activities.label",defaultMessage:"Activities"}),children:v.jsxDEV(es.TextArea,{maxLength:512,rows:6,showCount:!0,placeholder:e.formatMessage({id:"agent.web_assistant_config.input.activities.placeholder",defaultMessage:"Enter the main activities of your company"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/WebAssistantConfig.tsx",lineNumber:113,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/WebAssistantConfig.tsx",lineNumber:96,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/WebAssistantConfig.tsx",lineNumber:68,columnNumber:6},this),v.jsxDEV(Ut.Item,{shouldUpdate:!0,noStyle:!0,children:a=>{const l=!a.isFieldsTouched()||a.getFieldsError().some(({errors:c})=>c.length);return v.jsxDEV(vn,{disabled:l||!!(i!=null&&i.disabledAt),htmlType:"submit",loading:o.isLoading,className:"mt-6",type:"primary",children:v.jsxDEV(ee,{id:"agent.web_assistant_config.save_button",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/WebAssistantConfig.tsx",lineNumber:137,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/WebAssistantConfig.tsx",lineNumber:130,columnNumber:9},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/WebAssistantConfig.tsx",lineNumber:124,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/WebAssistantConfig.tsx",lineNumber:61,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/components/WebAssistantConfig.tsx",lineNumber:53,columnNumber:3},this)}function Nrr(){const t=Mt();ga(t.formatMessage({id:"agent.page.title",defaultMessage:"Agent - Chathive"}));const{isError:e,refetch:n}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0}),{isError:i}=Je.getOrganization.useQuery(void 0,{staleTime:1/0});if(e||i)return v.jsxDEV(fd,{status:"500",title:"500",subTitle:t.formatMessage({id:"agent.page.failed.error.message",defaultMessage:"Something went wrong while fetching data. Try again.",description:"Banner user gets to see when we something went wrong while fetching agent data on the backend."}),extra:v.jsxDEV(vn,{onClick:()=>n(),type:"primary",children:v.jsxDEV(ee,{id:"error.retry",defaultMessage:"Try again"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/index.tsx",lineNumber:32,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/index.tsx",lineNumber:31,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/index.tsx",lineNumber:21,columnNumber:4},this);const r=[{key:"setup.conversationStyle",selector:"#agentConversationStyle",content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Fn.Text,{strong:!0,className:"mb-2",children:v.jsxDEV(ee,{id:"project.walkthrough.conversation_style.title",defaultMessage:"Assistant's conversation style"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/index.tsx",lineNumber:46,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/index.tsx",lineNumber:45,columnNumber:6},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"project.walkthrough.conversation_style.description",defaultMessage:"How freely can the assistant generate answers? Is it allowed to be truly creative, or does it need to adhere closely to what's defined in the training documents?"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/index.tsx",lineNumber:52,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/index.tsx",lineNumber:51,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/index.tsx",lineNumber:44,columnNumber:5},this)}];return v.jsxDEV(S6,{steps:r,walkthroughType:"agentIntroduction",children:v.jsxDEV("section",{className:"w-full pt-6 bg-white sm:pt-0 sm:bg-transparent sm:grid sm:gap-4 max-w-4xl",children:[v.jsxDEV(Srr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/index.tsx",lineNumber:65,columnNumber:5},this),v.jsxDEV(wrr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/index.tsx",lineNumber:66,columnNumber:5},this),v.jsxDEV(Crr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/index.tsx",lineNumber:67,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/index.tsx",lineNumber:64,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Agent/index.tsx",lineNumber:63,columnNumber:3},this)}function V_({className:t="sm:p-4",children:e}){const n=Mt(),i=Qr(),r=Je.useContext(),o=Wd(N6),[s,a]=b.useState(""),{projectId:l}=If(),{data:c}=Je.getAuthUser.useQuery(),{data:u,isLoading:d}=Je.project.getAll.useQuery({q:s}),{refetch:h,isFetching:f,isError:m,data:p}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0}),{isError:g,data:y}=Je.getOrganization.useQuery(void 0,{staleTime:1/0}),_=b.useMemo(()=>{let D=(u==null?void 0:u.result)||[];return p&&!D.find(({_id:k})=>k===l)&&(D=[p,...D]),D},[u==null?void 0:u.result,p,l]),w=[{label:n.formatMessage({id:"app_shell.menu.projects_overview.label",defaultMessage:"Projects overview"}),key:"projectsOverview"}],C=D=>{switch(D){case"projectsOverview":i("/projects");break}},N=()=>{i("/projects")};function E(D){const k=_.find(M=>M._id===D);if((k==null?void 0:k.projectType)==="aiForm"){i(`/${D}/sessions`);return}i(`/${D}`)}return b.useEffect(()=>(localStorage.setItem("projectId",l),r.invalidate(),r.project.getCurrent.refetch(),r.getWidget.refetch(),()=>localStorage.removeItem("projectId")),[l]),b.useEffect(()=>{if(!c||!y)return;let D=y.members.find(k=>k.userId===(c==null?void 0:c._id));(c.type==="reseller"||c.type==="chathiveAdmin")&&(D={_id:c._id,role:"admin",userId:c._id,createdAt:c.createdAt}),D&&o(D)},[y,c]),(!p||p._id!==l)&&f?v.jsxDEV(Ps,{className:"h-screen",children:[v.jsxDEV(iC,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:113,columnNumber:5},this),v.jsxDEV(Ps.Content,{className:"flex flex-col justify-center items-center gap-4",children:[v.jsxDEV(zS,{size:"large"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:115,columnNumber:6},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"app_shell.project.loader.title",defaultMessage:"We are setting up your project...",description:"Message show'n when project is loaded in and loader is show'n"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:117,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:116,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:114,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:112,columnNumber:4},this):m||g?v.jsxDEV(Ps,{className:"bg-white relative",style:{minHeight:"100svh",height:"100svh",overflow:"hidden"},children:[v.jsxDEV(iC,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:131,columnNumber:5},this),v.jsxDEV(Ps,{children:v.jsxDEV(fd,{status:"500",title:"500",subTitle:n.formatMessage({id:"app_shell.project.failed.error.message",defaultMessage:"Something went wrong while fetching data. Please try again.",description:"Error page the user see's when something went wrong while fetching project data from the backend."}),extra:v.jsxDEV(vn,{onClick:()=>h(),type:"primary",children:v.jsxDEV(ee,{id:"app_shell.project.failed.error.button.retry",defaultMessage:"Try again"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:144,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:143,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:133,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:132,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:130,columnNumber:4},this):p!=null&&p.deletedAt?v.jsxDEV(Ps,{className:"bg-white",style:{minHeight:"100svh",height:"100svh",overflow:"hidden"},children:[v.jsxDEV(iC,{menu:w,onMenuClick:C,onOrganizationChange:N,children:v.jsxDEV(vn,{type:"primary",onClick:()=>i("/billing"),children:v.jsxDEV(ee,{id:"general.upgrade.submit",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:161,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:160,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:159,columnNumber:5},this),v.jsxDEV(Ps,{children:v.jsxDEV(fd,{icon:v.jsxDEV(BS,{src:"/img/svg/deleted_project.svg",preview:!1,className:"mb-4",style:{height:"25vh"}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:167,columnNumber:8},this),title:n.formatMessage({id:"app_shell.project.failed.project_deleted.title",defaultMessage:"Project has been deleted",description:"Error title the user see's when the project the user wants to access has been deleted"}),subTitle:n.formatMessage({id:"app_shell.project.failed.project_deleted.message",defaultMessage:"The project <bold>{name}</bold> you are trying to access has been deleted.",description:"Error message the user see's when the project the user wants to access has been deleted"},{name:p==null?void 0:p.name,bold:D=>v.jsxDEV(Fn.Text,{strong:!0,children:D},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:191,columnNumber:28},this)}),extra:v.jsxDEV(vn,{onClick:()=>i("/projects"),type:"primary",children:v.jsxDEV(ee,{id:"app_shell.project.failed.project_deleted.button.go_back",defaultMessage:"My project overview"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:196,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:195,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:165,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:164,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:158,columnNumber:4},this):v.jsxDEV(Ps,{className:"bg-white",style:{minHeight:"100svh",height:"100svh",overflow:"hidden"},children:[v.jsxDEV(eOt,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:210,columnNumber:4},this),v.jsxDEV(iC,{menu:w,showOrganization:!0,organization:y,onMenuClick:C,onOrganizationChange:N,children:v.jsxDEV(vn,{type:"primary",onClick:()=>i("/billing"),children:v.jsxDEV(ee,{id:"general.upgrade.submit",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:219,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:218,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:211,columnNumber:4},this),v.jsxDEV(Ps,{children:[v.jsxDEV(pfe,{organization:y,onMenuClick:D=>i(`/${l}/${D}`),menu:SKt({type:p==null?void 0:p.projectType,intl:n}),selectionMenu:v.jsxDEV(un,{className:"mb-2 px-2 w-full",gap:2,wrap:"nowrap",children:[v.jsxDEV(Vs,{placement:"topLeft",title:n.formatMessage({id:"app_shell.project.select.go_to_overview",defaultMessage:"Organization dashboard"}),children:v.jsxDEV(vn,{icon:v.jsxDEV(s$e,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:237,columnNumber:16},this),className:"min-w-8 h-8 aspect-square",onClick:()=>i("/dashboard")},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:236,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:229,columnNumber:8},this),v.jsxDEV(Lo,{showSearch:!0,value:l,loading:d,searchValue:s,onSelect:E,onSearch:D=>a(D),options:_.map(D=>({value:D._id,label:D.name})),filterOption:(D,k)=>!!(k!=null&&k.label)&&k.label.toLowerCase().includes(D.toLowerCase()),className:"w-[calc(100%_-_34px)]",dropdownRender:D=>v.jsxDEV(v.Fragment,{children:[D,v.jsxDEV(ZD,{style:{margin:"8px 0"}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:257,columnNumber:11},this),v.jsxDEV(vn,{type:"text",className:"w-full",style:{textAlign:"left",paddingLeft:"12px"},onClick:()=>i("/projects"),children:v.jsxDEV(ee,{id:"app_shell.project.select.option.go_to_overview",defaultMessage:"Project overview"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:264,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:258,columnNumber:11},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:255,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:242,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:228,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:223,columnNumber:5},this),v.jsxDEV(Ps.Content,{className:Vt("flex flex-col justify-start items-center gap-4 relative overflow-auto scroll-smooth min-h-[calc(100svh-64px)]",t),children:[!!(p!=null&&p.disabledAt)&&v.jsxDEV(pl,{message:n.formatMessage({id:"app_shell.project.banner.project_disabled",defaultMessage:"Project has been disabled because you have reached the maximum allowed projects in your current billing plan. Upgrade to re-enable this plan.",description:"Show banner in disabled project to explain to users why this project has been disabled"}),type:"warning",className:"max-w-4xl"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:282,columnNumber:7},this),v.jsxDEV(hfe,{children:v.jsxDEV(Psi,{project:p,children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:296,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:295,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:275,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:222,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Shell.tsx",lineNumber:209,columnNumber:3},this)}var Err=Ie(Ie({},zDt),{},{locale:"en_GB",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"Select time",dateSelect:"Select date",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"D/M/YYYY",dateTimeFormat:"D/M/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const Drr={placeholder:"Select time"},$Be={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},Err),timePickerLocale:Object.assign({},Drr)},krr={faq:{id:"training.search.faq.placeholder",defaultMessage:"Search on question or answer content"},document:{id:"training.search.document.placeholder",defaultMessage:"Search on document title"},website:{id:"training.search.url.placeholder",defaultMessage:"Search on url or title"},text:{id:"training.search.text.placeholder",defaultMessage:"Search on title or text content"}},VBe={faq:{id:"training.data.delete_faq.title",defaultMessage:"Delete FAQ"},website:{id:"training.data.delete_url.title",defaultMessage:"Delete URL"},text:{id:"training.data.delete_text.title",defaultMessage:"Delete text"}},BBe={faq:{id:"training.data.delete_faq.description",defaultMessage:"If you delete this FAQ, the data on which your chatbot is trained will be lost. However, your bot may still attempt to answer this question in its own manner."},website:{id:"training.data.delete_url.description",defaultMessage:"If you delete {url}, the data on which your chatbot is trained will be lost. This means that if you want to add the URL again later, you will need to use new training characters to train the chatbot."},text:{id:"training.data.delete_text.description",defaultMessage:"If you delete {title}, the data on which your chatbot is trained will be lost. This means that you will need to re-add the text yourself and use new training characters to train the chatbot."}},Fse={faq:{id:"training.data.delete_faq.submit_button",defaultMessage:"Delete FAQ"},website:{id:"training.data.delete_url.submit_button",defaultMessage:"Delete URL"},text:{id:"training.data.delete_text.submit_button",defaultMessage:"Delete text"}},Apt={faq:{id:"document_type.faq.title",defaultMessage:"FAQ"},document:{id:"document_type.document.title",defaultMessage:"Document"},website:{id:"document_type.website.title",defaultMessage:"Website"},text:{id:"document_type.text.title",defaultMessage:"Text"}},zBe=[{id:"website",image:"/img/svg/add_website.svg",description:{id:"document_type.card.website.title",defaultMessage:"Website"}},{id:"faq",image:"/img/svg/faq.svg",description:{id:"document_type.card.faq.title",defaultMessage:"FAQ"}},{id:"document",image:"/img/svg/add_document.svg",description:{id:"document_type.card.document.title",defaultMessage:"Document"}},{id:"text",image:"/img/svg/add_text.svg",description:{id:"document_type.card.text.title",defaultMessage:"Text"}}];function T9t({id:t,image:e,description:n,onClick:i}){return v.jsxDEV(uo,{className:"w-full sm:max-w-48 cursor-pointer",hoverable:!0,onClick:()=>i(t),children:v.jsxDEV("div",{className:"w-full flex justify-start items-center sm:flex-col gap-4 h-full",children:[v.jsxDEV("div",{className:"sm:w-full",children:v.jsxDEV(BS,{src:e,className:"aspect-video !h-16 sm:!h-32",preview:!1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/DocumentCard.tsx",lineNumber:14,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/DocumentCard.tsx",lineNumber:13,columnNumber:5},this),v.jsxDEV("p",{className:"w-full sm:text-center text-lg text-bold",children:v.jsxDEV(ee,{...n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/DocumentCard.tsx",lineNumber:16,columnNumber:60},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/DocumentCard.tsx",lineNumber:16,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/DocumentCard.tsx",lineNumber:12,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/DocumentCard.tsx",lineNumber:11,columnNumber:3},this)}const Mrr={VALID:{id:"training.data.add_url.url_state.valid",defaultMessage:"Url can be crawled"},INVALID:{id:"training.data.add_url.url_state.invalid",defaultMessage:"Url cannot be reached"},VALIDATING:{id:"training.data.add_url.url_state.validating",defaultMessage:"Validating url"}};function Lrr({children:t,onClose:e}){const n=Mt(),[i]=Ut.useForm(),[r,o]=b.useState(void 0),s=Je.addTrainingUrl.useMutation(),a=Ut.useWatch("protocol",i),l=u=>{const d=u.url.replace(/\/+$/,"");s.mutate({url:d},{onSuccess:()=>{e(),Ei.success({placement:"bottomRight",message:n.formatMessage({id:"training.data.add_url.success",defaultMessage:"Training started. This can take up to 5 minutes before the first results are visible. Please refresh the page if you can’t see any results after 5 minutes.",description:"Show notification training has started and explain first results can take 5min but training can take up to hours if there is a lot of data"})})},onError:h=>{var m;const f=h;if(console.error("Failed to add training url",h),((m=h==null?void 0:h.data)==null?void 0:m.code)==="CONFLICT")return Ei.error({placement:"bottomRight",message:n.formatMessage({id:"training.data.add_url.failed_conflict",defaultMessage:"Link is already crawled."})});if(h.message==="INVALID_URL")return Ei.error({placement:"bottomRight",message:n.formatMessage({id:"training.data.add_url.failed.invalid.title",defaultMessage:"Link cannot be crawled."}),description:n.formatMessage({id:"training.data.add_url.failed.invalid.description",defaultMessage:"Link cannot be reached, check if your website is up and the link is correct."})});O2({intl:n,error:f})}})},c=Ut.useWatch("url",i);return b.useEffect(()=>{!c||c.length<3||(r!=="VALIDATING"&&o("VALIDATING"),KA(()=>{fetch(c,{method:"get",mode:"no-cors"}).then(()=>o("VALID")).catch(u=>{var d;return o(((d=u.response)==null?void 0:d.status)===200?"VALID":"INVALID")})}))},[c]),v.jsxDEV(Ut,{form:i,layout:"vertical",requiredMark:"optional",id:"addWebsiteUrlForm",onFinish:l,children:[v.jsxDEV(Ut.Item,{name:"url",rules:[{validator:async(u,d)=>{if(zp(d))throw new Error(n.formatMessage({id:"training.data.add_url.required",defaultMessage:"Please enter a URL"}));const h=d.replace(/^https:\/\/|^http:\/\/|www\./g,"").split(".")[0];if(fPt.includes(h))throw new Error(n.formatMessage({id:"training.data.add_url.domain_not_allowed",defaultMessage:"Invalid web address provided see list with excluded domains",description:"Show error website like facebook or instagram is added, these are excluded website domains"}));try{new URL(`${a}${d}`)}catch{throw new Error(n.formatMessage({id:"training.data.add_url.invalid",defaultMessage:"Doesn't seem to be a valid url",description:"Show error when website isn't a valid url"}))}}}],label:n.formatMessage({id:"training.data.add_url.url",defaultMessage:"URL"}),extra:n.formatMessage({id:"training.data.add_url.help",defaultMessage:"We will use this URL as the starting point to crawl your website.",description:"Help text underneath url field where user can add new url to train their website"}),children:v.jsxDEV(L9t,{placeholder:n.formatMessage({id:"training.data.add_url.placeholder",defaultMessage:"https://www.chathive.co",description:"Placeholder for URL input"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/AddUrl.tsx",lineNumber:172,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/AddUrl.tsx",lineNumber:121,columnNumber:4},this),r&&v.jsxDEV(un,{gap:"xs",children:[r==="INVALID"&&v.jsxDEV(Eai,{color:"red"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/AddUrl.tsx",lineNumber:182,columnNumber:33},this),r==="VALID"&&v.jsxDEV(Nai,{color:"green"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/AddUrl.tsx",lineNumber:183,columnNumber:31},this),v.jsxDEV(Qe,{children:v.jsxDEV(ee,{...Mrr[r]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/AddUrl.tsx",lineNumber:185,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/AddUrl.tsx",lineNumber:184,columnNumber:6},this),r==="VALIDATING"&&v.jsxDEV($p,{size:"xs"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/AddUrl.tsx",lineNumber:187,columnNumber:36},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/AddUrl.tsx",lineNumber:181,columnNumber:5},this),t&&t({isLoading:s.isLoading,isInvalid:r!=="VALID"})]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/AddUrl.tsx",lineNumber:114,columnNumber:3},this)}function I9t({document:t,children:e,onSubmit:n}){var r;const i=Mt();return v.jsxDEV(Ut,{preserve:!1,layout:"vertical",onFinish:n,requiredMark:"optional",className:"pb-4 flex flex-col gap-2",initialValues:{language:t==null?void 0:t.language,question:(t==null?void 0:t.title)||"",answer:((r=t==null?void 0:t.content)==null?void 0:r.original)||"",priority:(t==null?void 0:t.priority)||"default",documentDate:(t==null?void 0:t.documentDate)&&An(t==null?void 0:t.documentDate)},children:[v.jsxDEV(Ut.Item,{name:"question",className:"!mb-0",label:i.formatMessage({id:"faq_data.form.question.label",defaultMessage:"Question"}),rules:[{required:!0,message:i.formatMessage({id:"faq_data.form.question.required",defaultMessage:"Please fill in a question to match a specific answer."})}],children:v.jsxDEV(es.TextArea,{autoSize:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/FaqForm.tsx",lineNumber:54,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/FaqForm.tsx",lineNumber:37,columnNumber:4},this),v.jsxDEV(Ut.Item,{name:"answer",className:"!mb-0",label:i.formatMessage({id:"faq_data.form.answer.label",defaultMessage:"Answer"}),rules:[{required:!0,message:i.formatMessage({id:"faq_data.form.answer.required",defaultMessage:"Please fill in a new answer."})},{validator:async(o,s)=>{if(_9t(s)>F$e.maxTextSize)throw new Error(i.formatMessage({id:"faq_data.form.answer.to_large",defaultMessage:"answer cannot be larger then 10MB"}))}}],children:v.jsxDEV(es.TextArea,{className:"!min-h-[96px]",autoSize:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/FaqForm.tsx",lineNumber:87,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/FaqForm.tsx",lineNumber:56,columnNumber:4},this),e&&e({})]},t==null?void 0:t._id,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/FaqForm.tsx",lineNumber:22,columnNumber:3},this)}function A9t({document:t,children:e,onSubmit:n}){var o;const i=Mt(),[r]=Ut.useForm();return v.jsxDEV(Ut,{form:r,preserve:!1,layout:"vertical",onFinish:n,requiredMark:"optional",className:"pb-4 flex flex-col gap-2",initialValues:{title:t==null?void 0:t.title,language:t==null?void 0:t.language,text:(o=t==null?void 0:t.content)==null?void 0:o.original,priority:(t==null?void 0:t.priority)||"default",documentDate:(t==null?void 0:t.documentDate)&&An(t==null?void 0:t.documentDate)},children:[v.jsxDEV(Ut.Item,{name:"title",className:"!mb-0",rules:[{required:!0,message:i.formatMessage({id:"training.data.add_text.title.required",defaultMessage:"Please enter a title."})}],label:i.formatMessage({id:"training.data.add_text.title.label",defaultMessage:"Title"}),children:v.jsxDEV(es,{maxLength:128,showCount:!0,placeholder:i.formatMessage({id:"training.data.add_text.title.placeholder",defaultMessage:"E.g. Open vacancies"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/TextForm.tsx",lineNumber:55,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/TextForm.tsx",lineNumber:38,columnNumber:4},this),v.jsxDEV(Ut.Item,{name:"text",className:"!mb-0",rules:[{required:!0,message:i.formatMessage({id:"training.data.add_text.text.required",defaultMessage:"Please enter a text."})},{validator:async(s,a)=>{if(_9t(a)>F$e.maxTextSize)throw new Error(i.formatMessage({id:"training.data.add_text.text.to_large",defaultMessage:"Text cannot be larger then 10MB"}))}}],label:i.formatMessage({id:"training.data.add_text.text.label",defaultMessage:"Text"}),children:v.jsxDEV(es.TextArea,{placeholder:i.formatMessage({id:"training.data.add_text.text.placeholder",defaultMessage:"E.g. We temporarily have open vacancies for junior developers."}),autoSize:!0,style:{minHeight:"12rem"},className:"max-h-[50vh] !min-h-[96px]"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/TextForm.tsx",lineNumber:92,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/TextForm.tsx",lineNumber:64,columnNumber:4},this),e&&e({})]},t==null?void 0:t._id,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/TextForm.tsx",lineNumber:22,columnNumber:3},this)}function R9t({isOpen:t,isDisabled:e,type:n,onClose:i}){const r=Mt(),o=Je.useUtils(),[s,a]=b.useState(n),l=Je.trainFaq.useMutation(),c=Je.addTrainingText.useMutation();b.useEffect(()=>(n!=="document"&&a(n),()=>a(void 0)),[n]);const u=async d=>{try{let h=Object.entries(d).reduce((f,[m,p])=>({...f,[m]:p??void 0}),{});switch("documentDate"in h&&h.documentDate&&(h.documentDate=h.documentDate.format("YYYY-MM-DD")),s){case"faq":await l.mutateAsync(h);break;case"text":await c.mutateAsync(h);break}Ei.success({placement:"bottomRight",message:r.formatMessage({id:"add_training_documents.notification.success",defaultMessage:"Agent has successfully been trained on this document."})}),o.getTrainingDataByType.invalidate(),i()}catch(h){O2({intl:r,error:h})}};return v.jsxDEV(Ma,{centered:!0,width:800,open:t,footer:null,destroyOnClose:!0,onCancel:i,title:r.formatMessage({id:"add_training_documents.title",defaultMessage:"Add training documents"}),className:"max-h-[90vh]",children:[s&&v.jsxDEV(Lo,{className:"w-full !h-12 !mb-4",value:s,onChange:a,options:zBe.reduce((d,h)=>h.id==="document"?d:[...d,{value:h.id,label:v.jsxDEV("div",{className:"w-full flex flex-row justify-start ",children:[v.jsxDEV("img",{src:h.image,className:"min-h-6 w-6 h-6 aspect-auto mr-2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:110,columnNumber:11},this),v.jsxDEV(ee,{...h.description},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:111,columnNumber:11},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:109,columnNumber:10},this)}],[])},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:97,columnNumber:5},this),v.jsxDEV(Trr,{type:s,onSetType:a,onSubmit:u,onClose:i,children:({isLoading:d,isInvalid:h})=>v.jsxDEV("footer",{className:"flex justify-between items-center w-full !pt-4",children:[v.jsxDEV(vn,{type:"text",onClick:i,children:v.jsxDEV(ee,{id:"add_training_documents.footer.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:124,columnNumber:8},this)},"back",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:123,columnNumber:7},this),v.jsxDEV(Ut.Item,{shouldUpdate:!0,noStyle:!0,children:f=>{const m=!f.isFieldsTouched()||f.getFieldsError().some(({errors:p})=>p.length);return v.jsxDEV(vn,{type:"primary",htmlType:"submit",disabled:m||!!e||h,loading:d||l.isLoading||c.isLoading,children:v.jsxDEV(ee,{id:"add_training_documents.footer.submit",defaultMessage:"Add"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:139,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:133,columnNumber:10},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:126,columnNumber:7},this)]},"modalFooter",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:122,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:120,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:83,columnNumber:3},this)}function Trr({type:t,onSetType:e,onSubmit:n,onClose:i,children:r}){const o=Mt(),s=v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Ut.Item,{name:"priority",rules:[{required:!0,message:o.formatMessage({id:"add_training_documents.form.priority.required",defaultMessage:"Select a priority"})}],label:o.formatMessage({id:"add_training_documents.form.priority.label",defaultMessage:"Priority"}),help:o.formatMessage({id:"add_training_documents.form.priority.help",defaultMessage:"Training documents with a higher priority will be considered more relevant"}),children:v.jsxDEV(Lo,{defaultValue:"default",options:Object.keys(bv).map(a=>({value:a,label:o.formatMessage(bv[a])}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:185,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:165,columnNumber:4},this),v.jsxDEV(Ut.Item,{required:!1,name:"documentDate",label:o.formatMessage({id:"add_training_documents.form.document_date.label",defaultMessage:"Document date"}),help:o.formatMessage({id:"add_training_documents.form.document_date.help",defaultMessage:"Date of the document content, this date can be used by the model"}),children:v.jsxDEV(Qk,{locale:$Be,showTime:!1,format:"DD/MM/YYYY",className:"w-full"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:205,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:193,columnNumber:4},this),v.jsxDEV(Ut.Item,{required:!1,name:"language",className:"!mb-0",label:o.formatMessage({id:"add_training_documents.form.language.label",defaultMessage:"Language"}),children:v.jsxDEV(u$,{allowClear:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:216,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:207,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:164,columnNumber:3},this);switch(t){case"document":return;case"faq":return v.jsxDEV(I9t,{onSubmit:n,onClose:i,children:a=>v.jsxDEV(v.Fragment,{children:[s,r==null?void 0:r(a)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:228,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:226,columnNumber:5},this);case"text":return v.jsxDEV(A9t,{onSubmit:n,onClose:i,children:a=>v.jsxDEV(v.Fragment,{children:[s,r==null?void 0:r(a)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:239,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:237,columnNumber:5},this);case"website":return v.jsxDEV(Lrr,{onClose:i,children:r},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:247,columnNumber:11},this);default:return v.jsxDEV("div",{className:"w-full flex flex-row gap-4 flex-wrap justify-center py-4",children:zBe.map(a=>a.id==="document"?null:v.jsxDEV(T9t,{...a,onClick:e},a.id,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:254,columnNumber:14},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AddTrainingDocument.tsx",lineNumber:250,columnNumber:5},this)}}const Cpe=Xp({key:"conversationActionState",default:void 0});function Irr({message:t,sourceId:e,onClose:n}){const i=Mt(),[r]=Ut.useForm(),[o,s]=b.useState(0),[a,l]=b.useState(!1),c=Je.deleteTrainingDocumentById.useMutation(),u=Je.updateTrainingText.useMutation(),d=Je.reCrawlUrl.useMutation(),h=Je.updateFaq.useMutation(),f=Je.updateTrainingUrl.useMutation(),m=Je.useContext(),p=b.useMemo(()=>{var D;return(D=t==null?void 0:t.source)==null?void 0:D.sort((k,M)=>k.score>M.score?-1:1)},[t==null?void 0:t.source]),g=p==null?void 0:p[o];b.useEffect(()=>{var D,k;if((g==null?void 0:g.type)==="faq"){r.setFieldsValue({question:g==null?void 0:g.title,answer:(D=g==null?void 0:g.content)==null?void 0:D.original,priority:(g==null?void 0:g.priority)||"default"});return}r.setFieldsValue({title:g==null?void 0:g.title,text:(k=g==null?void 0:g.content)==null?void 0:k.original,priority:(g==null?void 0:g.priority)||"default"})},[g]),b.useEffect(()=>{const D=p==null?void 0:p.findIndex(k=>k._id===e);D===void 0||D===-1||s(D)},[e]);const y=async()=>{try{if(!(p!=null&&p[o]))return;if(await c.mutateAsync({id:p[o]._id}),Ei.success({placement:"bottomRight",message:i.formatMessage({id:"conversations.action.change_training_documents.delete_notification.succeeded",defaultMessage:"Training document has been deleted successfully.",description:"Show notification training document has been removed"})}),m.getConversation.invalidate(),(p==null?void 0:p.length)===1&&n)return n();o>=(p==null?void 0:p.length)-1?C():N()}catch{Ei.error({placement:"bottomRight",message:i.formatMessage({id:"conversations.action.change_training_documents.delete_notification.deleted",defaultMessage:"Something went wrong while deleting this training document. Please try again later.",description:"Show notification training document could not be deleted for some unknown reason"})})}},_=async()=>{try{if(!(p!=null&&p[o]))return;await d.mutateAsync({id:p[o]._id}),Ei.success({placement:"bottomRight",message:i.formatMessage({id:"conversations.action.change_training_documents.re_crawl.notification.succeeded",defaultMessage:"URL re-crawl has started.",description:"Show notification url has started to re crawl this can take up to 5min to complete"})}),m.project.getCurrent.invalidate(),r.resetFields()}catch(D){O2({error:D,intl:i})}},w=async()=>{try{const D=r.getFieldsValue();if(!(g!=null&&g._id))return;const k={...D,documentId:g._id};g.type==="text"&&await u.mutateAsync(k),g.type==="faq"&&await h.mutateAsync(k),g.type==="website"&&await f.mutateAsync({id:g._id,...D,title:g.title,language:g.language||void 0,documentDate:g.documentDate||void 0}),Ei.success({placement:"bottomRight",message:i.formatMessage({id:"conversations.action.change_training_documents.update_text_resource.notification.succeeded",defaultMessage:"Text document has been updated successfully."})}),m.project.getCurrent.invalidate(),m.getConversation.invalidate()}catch(D){O2({error:D,intl:i})}},C=()=>s(o-1),N=()=>s(o+1),E=[{span:3,key:"score",label:i.formatMessage({id:"conversations.action.change_training_documents.detail.score",defaultMessage:"Score"}),children:g==null?void 0:g.score.toFixed(2)},{span:3,key:"dateCreated",label:i.formatMessage({id:"conversations.action.change_training_documents.detail.date_created",defaultMessage:"Date created"}),children:v.jsxDEV(tu,{value:g==null?void 0:g.createdAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:172,columnNumber:14},this)}];return g!=null&&g.newVersionId&&E.push({span:3,key:"isUpdated",label:i.formatMessage({id:"conversations.action.change_training_documents.detail.new_version",defaultMessage:"Updated at",description:"Show when training document has been updated"}),children:v.jsxDEV(Fn.Text,{children:v.jsxDEV(tu,{value:g==null?void 0:g.deletedAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:187,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:186,columnNumber:5},this)}),g!=null&&g.deletedAt&&!(g!=null&&g.newVersionId)&&(E.unshift({span:3,key:"title",label:i.formatMessage({id:"conversations.action.change_training_documents.detail.title",defaultMessage:"Title"}),children:v.jsxDEV(Fn.Text,{children:g==null?void 0:g.title},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:200,columnNumber:14},this)}),E.push({span:3,key:"isDeleted",label:v.jsxDEV(Fn.Text,{type:"danger",children:v.jsxDEV(ee,{id:"conversations.action.change_training_documents.detail.is_deleted",defaultMessage:"Deleted at",description:"Show when training document has been deleted"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:207,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:206,columnNumber:5},this),children:v.jsxDEV(Fn.Text,{type:"danger",children:v.jsxDEV(tu,{value:g==null?void 0:g.deletedAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:216,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:215,columnNumber:5},this)})),(g==null?void 0:g.type)==="website"&&E.push({span:3,key:"url",label:i.formatMessage({id:"conversations.action.change_training_documents.detail.url",defaultMessage:"URL"}),children:v.jsxDEV("a",{href:g==null?void 0:g.url,rel:"noopener noreferrer",target:"_blank",children:g==null?void 0:g.url},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:231,columnNumber:5},this)}),v.jsxDEV("div",{className:"w-full h-full overflow-y-auto",children:[v.jsxDEV($he,{items:E},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:240,columnNumber:4},this),v.jsxDEV(Ut,{form:r,layout:"vertical",requiredMark:!1,disabled:!!(g!=null&&g.deletedAt),children:[(g==null?void 0:g.type)==="text"&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Ut.Item,{name:"title",rules:[{required:!0,message:i.formatMessage({id:"conversations.action.change_training_documents.form.title.required",defaultMessage:"Please enter a title."})}],label:i.formatMessage({id:"conversations.action.change_training_documents.form.title.label",defaultMessage:"Title"}),children:v.jsxDEV(es.TextArea,{autoSize:!0,maxLength:128,showCount:!1,placeholder:i.formatMessage({id:"conversations.action.change_training_documents.form.title.placeholder",defaultMessage:"E.g. Open vacancies"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:260,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:244,columnNumber:7},this),v.jsxDEV(Ut.Item,{name:"text",rules:[{required:!0,message:i.formatMessage({id:"conversations.action.change_training_documents.form.text.required",defaultMessage:"Please enter a text."})}],label:i.formatMessage({id:"conversations.action.change_training_documents.form.text.label",defaultMessage:"Text"}),children:v.jsxDEV(es.TextArea,{autoSize:!0,placeholder:i.formatMessage({id:"conversations.action.change_training_documents.form.text.placeholder",defaultMessage:"E.g. We temporarily have open vacancies for junior developers."}),className:"max-h-[50vh]"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:286,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:270,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:243,columnNumber:6},this),(g==null?void 0:g.type)==="faq"&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Ut.Item,{name:"question",rules:[{required:!0,message:i.formatMessage({id:"conversations.action.change_training_documents.form.question.required",defaultMessage:"Please enter the question."})}],label:i.formatMessage({id:"conversations.action.change_training_documents.form.question.label",defaultMessage:"Question"}),children:v.jsxDEV(es.TextArea,{autoSize:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:315,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:299,columnNumber:7},this),v.jsxDEV(Ut.Item,{name:"answer",rules:[{required:!0,message:i.formatMessage({id:"conversations.action.change_training_documents.form.answer.required",defaultMessage:"Please set the answer"})}],label:i.formatMessage({id:"conversations.action.change_training_documents.form.answer.label",defaultMessage:"Answer"}),children:v.jsxDEV(es.TextArea,{autoSize:!0,className:"max-h-[50vh]"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:333,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:317,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:298,columnNumber:6},this),v.jsxDEV(Ut.Item,{name:"priority",rules:[{required:!0,message:i.formatMessage({id:"conversations.action.change_training_documents.form.priority.required",defaultMessage:"Select a priority"})}],label:i.formatMessage({id:"conversations.action.change_training_documents.form.priority.label",defaultMessage:"Priority"}),help:i.formatMessage({id:"conversations.action.change_training_documents.form.priority.help",defaultMessage:"Training documents with a higher priority will be considered more relevant"}),children:v.jsxDEV(Lo,{defaultValue:"default",options:Object.keys(bv).map(D=>({value:D,label:i.formatMessage(bv[D])}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:358,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:338,columnNumber:5},this),!(g!=null&&g.deletedAt)&&v.jsxDEV("div",{className:"flex justify-between items-center w-full gap-2 pt-4",children:[v.jsxDEV(vn,{danger:!0,block:!0,onClick:()=>l(!0),children:v.jsxDEV(ee,{id:"conversations.action.change_training_documents.actions.delete_resource",defaultMessage:"Delete"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:369,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:368,columnNumber:7},this),(g==null?void 0:g.type)==="website"&&v.jsxDEV(vn,{onClick:_,loading:d.isLoading,children:v.jsxDEV(ee,{id:"conversations.action.change_training_documents.actions.re_crawl_resource",defaultMessage:"Re-crawl URL",description:"Small button text to trigger url re-crawl"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:376,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:375,columnNumber:8},this),v.jsxDEV(Ut.Item,{shouldUpdate:!0,noStyle:!0,children:D=>{const k=!D.isFieldsTouched()||D.getFieldsError().some(({errors:M})=>M.length);return v.jsxDEV(vn,{type:"primary",htmlType:"submit",disabled:k,onClick:w,loading:u.isLoading||h.isLoading||f.isLoading,children:v.jsxDEV(ee,{id:"conversations.action.change_training_documents.actions.update_resource",defaultMessage:"Update"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:401,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:390,columnNumber:10},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:383,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:367,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:241,columnNumber:4},this),v.jsxDEV("footer",{className:"flex justify-between items-center w-full mt-8",children:[v.jsxDEV(vn,{type:"text",onClick:C,disabled:!o,children:v.jsxDEV(ee,{id:"conversations.action.change_training_documents.footer.previous_resource",defaultMessage:"Previous"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:414,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:413,columnNumber:5},this),v.jsxDEV(vn,{type:"text",onClick:N,disabled:o>=((p==null?void 0:p.length)||0)-1,children:v.jsxDEV(ee,{id:"conversations.action.change_training_documents.footer.next_resource",defaultMessage:"Next"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:424,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:419,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:412,columnNumber:4},this),v.jsxDEV(xpe,{title:i.formatMessage(VBe[g==null?void 0:g.type]),description:i.formatMessage(BBe[g==null?void 0:g.type],{title:(g==null?void 0:g.title)||"",url:(g==null?void 0:g.url)||""}),isDeleting:c.isLoading,deleteText:i.formatMessage(Fse[g==null?void 0:g.type]),isOpen:a,onClose:()=>l(!1),onDelete:y},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:430,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ChangeTrainingDocuments.tsx",lineNumber:239,columnNumber:3},this)}function Arr({isOpen:t,onClose:e}){var u,d,h;const n=Mt(),[i]=Ut.useForm(),r=Je.useContext(),o=Ut.useWatch("prompt",i),s=Je.patchAssistantConfig.useMutation(),{data:a}=Je.getOrganization.useQuery(void 0,{staleTime:1/0}),{data:l}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0}),c=async()=>{const{prompt:f}=i.getFieldsValue();try{await s.mutateAsync({prompt:f}),Ei.success({placement:"bottomRight",message:n.formatMessage({id:"conversations.action.edit_prompt.notification.succeeded",defaultMessage:"Prompt has been updated successfully."})}),r.project.getCurrent.invalidate(),i.resetFields(),e()}catch{Ei.error({placement:"bottomRight",message:n.formatMessage({id:"conversations.action.edit_prompt.notification.failed",defaultMessage:"Something went wrong while updating your prompt. Please try again later."})})}};return v.jsxDEV(Ma,{width:776,open:t,onCancel:e,title:n.formatMessage({id:"conversations.action.edit_prompt.title",defaultMessage:"Edit prompt"}),footer:(u=a==null?void 0:a.permissions)!=null&&u.advanced?v.jsxDEV("div",{className:"flex justify-between items-center w-full",children:[v.jsxDEV(vn,{type:"text",onClick:e,children:v.jsxDEV(ee,{id:"conversations.action.edit_prompt.footer.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/EditPrompt.tsx",lineNumber:62,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/EditPrompt.tsx",lineNumber:61,columnNumber:7},this),v.jsxDEV(vn,{type:"primary",form:"EditPrompt",htmlType:"submit",disabled:!!(l!=null&&l.disabledAt),loading:s.isLoading,children:v.jsxDEV(ee,{id:"conversations.action.edit_prompt.footer.submit",defaultMessage:"Update prompt"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/EditPrompt.tsx",lineNumber:74,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/EditPrompt.tsx",lineNumber:67,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/EditPrompt.tsx",lineNumber:60,columnNumber:6},this):null,children:[((d=a==null?void 0:a.permissions)==null?void 0:d.advanced)&&l&&v.jsxDEV(Ut,{form:i,onFinish:c,id:"EditPrompt",layout:"vertical",requiredMark:!1,disabled:!!(l!=null&&l.disabledAt),initialValues:{prompt:l.config.prompt[l.defaultLanguage||"en"]},className:"!mb-8",children:[(o==null?void 0:o.length)>1028&&v.jsxDEV(pl,{type:"warning",className:"!mb-2",message:n.formatMessage({id:"conversations.action.edit_prompt.validation.warning.size",defaultMessage:"Caution: If your prompt is too long, your agent may not remember as much of the conversation."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/EditPrompt.tsx",lineNumber:95,columnNumber:7},this),v.jsxDEV(Ut.Item,{rules:[{required:!0,message:n.formatMessage({id:"conversations.action.edit_prompt.form.prompt.validation.error.message",defaultMessage:"Please enter a prompt for your chatbot."})}],className:"!m-0",name:"prompt",label:v.jsxDEV(aS,{size:"small",children:[v.jsxDEV(ee,{id:"conversations.action.edit_prompt.form.prompt.label",defaultMessage:"Prompt in default language: ({language})",values:{language:Ja.getName(l.defaultLanguage)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/EditPrompt.tsx",lineNumber:119,columnNumber:9},this),v.jsxDEV(FBe,{message:{id:"conversations.action.edit_prompt.form.prompt.tooltip",defaultMessage:"In this prompt, you can include instructions on the desired tone of voice for the chatbot, its behavior in certain situations, the appropriate responses to specific questions, when it should refer users to the contact information of someone from your company, …"}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/EditPrompt.tsx",lineNumber:124,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/EditPrompt.tsx",lineNumber:118,columnNumber:8},this),children:v.jsxDEV(es.TextArea,{rows:10,showCount:!0,placeholder:n.formatMessage({id:"conversations.action.edit_prompt.form.prompt.placeholder",defaultMessage:"E.g. I'm a chatbot for Chathive! 💬"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/EditPrompt.tsx",lineNumber:134,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/EditPrompt.tsx",lineNumber:105,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/EditPrompt.tsx",lineNumber:84,columnNumber:5},this),!((h=a==null?void 0:a.permissions)!=null&&h.advanced)&&v.jsxDEV(pl,{type:"info",message:n.formatMessage({id:"conversations.action.edit_prompt.lock.title",defaultMessage:"Upgrade your plan"}),description:n.formatMessage({id:"conversations.action.edit_prompt.lock.description",defaultMessage:"Include instructions on the desired tone of voice for the chatbot, its behavior in certain situations, the appropriate responses to specific questions, when it should refer users to the contact information of someone from your company, …",description:"Show explanation to user they cannot access the edit prompt features because they don't have it included in their billing plan"}),className:"flex flex-col gap-2 sm:flex-row",action:v.jsxDEV(vn,{type:"primary",href:"/billing",children:v.jsxDEV(ee,{id:"conversations.action.edit_prompt.lock.button",defaultMessage:"Upgrade plan"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/EditPrompt.tsx",lineNumber:162,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/EditPrompt.tsx",lineNumber:161,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/EditPrompt.tsx",lineNumber:146,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/EditPrompt.tsx",lineNumber:50,columnNumber:3},this)}function Rrr({conversationId:t,questionMessage:e,message:n,onClose:i}){const r=Mt(),[o]=Ut.useForm(),s=Je.useContext(),a=Je.trainFaq.useMutation({onSuccess:()=>{Ei.success({placement:"bottomRight",message:r.formatMessage({id:"conversations.action.improve_answer.notification.succeeded",defaultMessage:"Answer has been updated successfully.",description:"Show notification answer has been improved"})}),s.project.getCurrent.invalidate(),s.getConversation.invalidate({conversationId:t}),o.resetFields(),i&&i()},onError:u=>{O2({error:u,intl:r})}}),l=Je.getTrainingDocument.useQuery({id:`${n==null?void 0:n.documentId}`},{enabled:!!(n!=null&&n.documentId)}),c=async()=>{if(!n)return;const u=o.getFieldsValue();a.mutate({...u,conversationId:t,messageId:`${n._id}`})};return b.useEffect(()=>{!e||!n||o.setFieldsValue({question:e==null?void 0:e.content,answer:n==null?void 0:n.content,priority:"default"})},[]),b.useEffect(()=>{var u,d;(d=(u=l.data)==null?void 0:u.content)!=null&&d.original&&o.setFieldsValue({question:l.data.title,answer:l.data.content.original,priority:"default"})},[l]),v.jsxDEV(Ut,{form:o,id:"improveAnswer",onFinish:c,layout:"vertical",requiredMark:!1,children:[v.jsxDEV(Ut.Item,{name:"question",label:r.formatMessage({id:"conversations.action.improve_answer.form.question.label",defaultMessage:"Question"}),rules:[{required:!0,message:r.formatMessage({id:"conversations.action.improve_answer.form.question.required",defaultMessage:"Please fill in a question to match a specific answer."})}],children:v.jsxDEV(es.TextArea,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ImproveAnswer.tsx",lineNumber:95,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ImproveAnswer.tsx",lineNumber:79,columnNumber:4},this),v.jsxDEV(Ut.Item,{name:"answer",label:r.formatMessage({id:"conversations.action.improve_answer.form.answer.label",defaultMessage:"Answer"}),rules:[{required:!0,message:r.formatMessage({id:"conversations.action.improve_answer.form.answer.required",defaultMessage:"Please fill in a new answer."})}],children:v.jsxDEV(es.TextArea,{className:"!min-h-[96px]"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ImproveAnswer.tsx",lineNumber:113,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ImproveAnswer.tsx",lineNumber:97,columnNumber:4},this),v.jsxDEV(Ut.Item,{name:"priority",className:"min-h-fit",rules:[{required:!0,message:r.formatMessage({id:"conversations.action.improve_answer.form.priority.required",defaultMessage:"Select a priority"})}],label:r.formatMessage({id:"conversations.action.improve_answer.form.priority.label",defaultMessage:"Priority"}),help:r.formatMessage({id:"conversations.action.improve_answer.form.priority.help",defaultMessage:"Training documents with a higher priority will be considered more relevant"}),children:v.jsxDEV(Lo,{defaultValue:"default",options:Object.keys(bv).map(u=>({value:u,label:r.formatMessage(bv[u])}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ImproveAnswer.tsx",lineNumber:136,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ImproveAnswer.tsx",lineNumber:115,columnNumber:4},this),v.jsxDEV("footer",{className:"flex justify-between items-center w-full pt-4",children:[v.jsxDEV(vn,{type:"text",onClick:i,disabled:a.isLoading,children:v.jsxDEV(ee,{id:"conversations.action.improve_answer.footer.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ImproveAnswer.tsx",lineNumber:146,columnNumber:6},this)},"back",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ImproveAnswer.tsx",lineNumber:145,columnNumber:5},this),v.jsxDEV(Ut.Item,{shouldUpdate:!0,noStyle:!0,children:u=>{const d=!u.isFieldsTouched()||u.getFieldsError().some(({errors:h})=>h.length);return v.jsxDEV(vn,{type:"primary",htmlType:"submit",form:"improveAnswer",disabled:d,loading:a.isLoading,children:v.jsxDEV(ee,{id:"conversations.action.improve_answer.footer.submit",defaultMessage:"Save new answer"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ImproveAnswer.tsx",lineNumber:161,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ImproveAnswer.tsx",lineNumber:154,columnNumber:8},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ImproveAnswer.tsx",lineNumber:148,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ImproveAnswer.tsx",lineNumber:144,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ImproveAnswer.tsx",lineNumber:78,columnNumber:3},this)}function sU({value:t,size:e="md",timeout:n=5e3,variant:i="subtle",onClick:r,...o}){const s=Mt();return v.jsxDEV(Y5e,{value:t,timeout:n,children:({copied:a,copy:l})=>v.jsxDEV(un,{gap:"xs",children:v.jsxDEV(ir,{label:s.formatMessage(a?mJ.copied:mJ.copy),children:v.jsxDEV(Fr,{...o,size:e,disabled:a,variant:i,"aria-label":s.formatMessage(a?mJ.copiedAriaLabel:mJ.copyAriaLabel,{value:t}),onClick:()=>{l(),r&&r()},children:a?v.jsxDEV(X$e,{color:"green",size:Rpt[e]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CopyActionIcon.tsx",lineNumber:41,columnNumber:9},this):v.jsxDEV(BPt,{size:Rpt[e]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CopyActionIcon.tsx",lineNumber:43,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CopyActionIcon.tsx",lineNumber:26,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CopyActionIcon.tsx",lineNumber:25,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CopyActionIcon.tsx",lineNumber:24,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CopyActionIcon.tsx",lineNumber:22,columnNumber:3},this)}const mJ={copied:{id:"common.copy_to_clipboard.copied",defaultMessage:"Copied"},copy:{id:"common.copy_to_clipboard.copy",defaultMessage:"Copy"},copiedAriaLabel:{id:"common.copy_to_clipboard.copied_aria_label",defaultMessage:"Copied {value} to clipboard"},copyAriaLabel:{id:"common.copy_to_clipboard.copy_aria_label",defaultMessage:"Copy {value} to clipboard"}},Rpt={xs:12,sm:14,md:16,lg:20,xl:24};function P9t(t){const e=Mt(),n=t.anonymous?e.formatMessage({id:"customer_card.customer.anonymous",defaultMessage:"Anonymous"}):[t.firstName,t.lastName].filter(Boolean).join(" ");return v.jsxDEV(or,{withBorder:t.withBorder,p:t.size,className:Vt("w-full",t.className),children:[v.jsxDEV(or.Section,{className:Vt("bg-gradient-to-tr from-theme-primary/60 via-theme-primary to-theme-primary",(!t.size||t.size==="md")&&"p-12",t.size==="sm"&&"p-7")},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:33,columnNumber:4},this),v.jsxDEV(IS,{size:"lg",radius:"md",variant:"filled",color:"lightgrey",src:!t.anonymous&&t.avatar||null,className:"-mt-10","aria-label":e.formatMessage({id:"customer_card.customer.anonymous",defaultMessage:"Image of the customer or a fallback image"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:40,columnNumber:4},this),t.loading?v.jsxDEV(Prr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:53,columnNumber:5},this):v.jsxDEV(v.Fragment,{children:[v.jsxDEV(un,{gap:"xs",align:"center",className:"mt-2",wrap:"nowrap",children:[v.jsxDEV(Qe,{size:"sm",fw:"600",truncate:"end",title:n,children:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:57,columnNumber:7},this),!t.anonymous&&t.id&&v.jsxDEV("div",{className:"grid grid-flow-col items-center gap-2 max-w-[24ch]",children:[v.jsxDEV(jc,{title:t.id,size:"xs",children:t.id},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:62,columnNumber:9},this),v.jsxDEV(sU,{size:"xs",value:t.id},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:65,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:61,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:56,columnNumber:6},this),!t.anonymous&&t.email&&v.jsxDEV(Qe,{c:"dimmed",size:"xs",truncate:"end",title:t.email,children:t.email},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:70,columnNumber:7},this),t.anonymous&&v.jsxDEV(Yo,{className:"mt-2",variant:"light",color:"gray",p:"xs",title:e.formatMessage({id:"conversations.customer.missing.title",defaultMessage:"Customer data"}),children:v.jsxDEV(Gt,{align:"flex-start",gap:"xs",children:[v.jsxDEV(Qe,{size:"xs",children:v.jsxDEV(ee,{id:"customer_card.customer.missing.description",defaultMessage:"Enrich the conversation by setting customer info to identify your customer and provide more meaning to the conversation."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:87,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:86,columnNumber:9},this),v.jsxDEV(Nn,{size:"xs",variant:"light",component:"a",href:`${lq.sdk}/attributes#customer-data`,target:"_blank",children:v.jsxDEV(ee,{id:"customer_card.customer.missing.cta",defaultMessage:"Learn how"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:99,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:92,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:85,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:75,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:55,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:32,columnNumber:3},this)}function Prr(){return v.jsxDEV(Gt,{mt:"xs",children:[v.jsxDEV(li,{height:28,width:150},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:116,columnNumber:4},this),v.jsxDEV(li,{height:16,width:100},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:117,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/CustomerCard.tsx",lineNumber:115,columnNumber:3},this)}function op({value:t,label:e,icon:n,truncate:i}){return v.jsxDEV("div",{className:Vt("grid gap-2 items-center",n?"grid-cols-[auto_1fr]":"grid-cols-1"),children:[n&&v.jsxDEV(kp,{size:"lg",variant:"light",children:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/DataField.tsx",lineNumber:19,columnNumber:5},this),v.jsxDEV(Gt,{gap:2,children:[v.jsxDEV(Qe,{fw:"600",c:"dimmed",size:"xs",truncate:"end",children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/DataField.tsx",lineNumber:24,columnNumber:5},this),v.jsxDEV(Qe,{size:"xs",truncate:i,children:Orr(t)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/DataField.tsx",lineNumber:27,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/DataField.tsx",lineNumber:23,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/DataField.tsx",lineNumber:17,columnNumber:3},this)}function Orr(t){return t===null?v.jsxDEV("span",{className:"italic",children:"NULL"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/DataField.tsx",lineNumber:36,columnNumber:29},this):t===void 0?v.jsxDEV("span",{className:"italic",children:"undefined"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/DataField.tsx",lineNumber:37,columnNumber:34},this):t===""?v.jsxDEV("span",{className:"italic",children:v.jsxDEV(ee,{id:"shared.data_field.empty",defaultMessage:"Empty"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/DataField.tsx",lineNumber:41,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/DataField.tsx",lineNumber:40,columnNumber:4},this):t}function jrr({conversation:t}){var c,u,d;const e=Qr(),n=10,[i,r]=b.useState([]),{data:o}=Je.leadGeneration.getByConversation.useQuery({conversationId:`${t==null?void 0:t._id}`},{enabled:!!(t!=null&&t._id)});if(b.useEffect(()=>{var f,m;if(!t)return;let h=[];o&&((f=Object.entries(o.fields))!=null&&f.length)&&h.push("leadGeneration"),t.context&&Object.keys(t.context||{}).length<=10&&h.push("context"),Object.keys(((m=t.session)==null?void 0:m.data)||{}).length&&h.push("sessionData"),r(h)},[t]),!t)return null;const s=!!Object.keys(t.customer||{}).length,a=Object.keys(((c=t.session)==null?void 0:c.data)||{}).length||0;function l({projectId:h,sessionId:f}){e(`/${h}/sessions/${f}`)}return v.jsxDEV(Gt,{children:[v.jsxDEV(P9t,{withBorder:!0,size:"sm",anonymous:!s,...(t==null?void 0:t.customer)||{}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:43,columnNumber:4},this),v.jsxDEV(Wi,{value:i,onChange:r,multiple:!0,children:[o&&v.jsxDEV(Wi.Item,{value:"leadGeneration",children:[v.jsxDEV(Wi.Control,{className:"!ps-0 !pr-0 rounded",children:v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV(Qe,{size:"sm",fw:"bold",children:v.jsxDEV(ee,{id:"conversations.details.lead_generation.title",defaultMessage:"Lead generation fields"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:50,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:49,columnNumber:9},this),v.jsxDEV(jc,{variant:"light",size:"xs",color:"gray",children:(u=Object.entries(o.fields))==null?void 0:u.length},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:55,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:48,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:47,columnNumber:7},this),v.jsxDEV(Wi.Panel,{className:"!ps-0",children:v.jsxDEV(Gt,{gap:"xs",children:Object.entries(o.fields).map(([h,f])=>v.jsxDEV(op,{value:f,label:h,truncate:"end"},h,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:63,columnNumber:10},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:61,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:60,columnNumber:7},this)]},"leadGeneration",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:46,columnNumber:6},this),!!Object.keys(t.context||{}).length&&v.jsxDEV(Wi.Item,{value:"context",children:[v.jsxDEV(Wi.Control,{className:"!ps-0 !pr-0 rounded",children:v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV(Qe,{size:"sm",fw:"bold",children:v.jsxDEV(ee,{id:"conversations.details.context.title",defaultMessage:"Conversation context"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:74,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:73,columnNumber:9},this),v.jsxDEV(jc,{variant:"light",size:"xs",color:"gray",children:Object.keys(t.context||{}).length},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:79,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:72,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:71,columnNumber:7},this),v.jsxDEV(Wi.Panel,{className:"[&>.mantine-Accordion-content]:px-0",children:v.jsxDEV(Gt,{gap:"xs",children:Object.entries(t.context||{}).map(([h,f])=>v.jsxDEV(op,{value:f,label:h,truncate:"end"},h,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:87,columnNumber:10},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:85,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:84,columnNumber:7},this)]},"context",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:70,columnNumber:6},this),((d=t.session)==null?void 0:d.data)&&!!Object.keys(t.session.data||{}).length&&v.jsxDEV(Wi.Item,{value:"sessionData",children:[v.jsxDEV(Wi.Control,{className:"!ps-0 !pr-0 rounded",children:v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV(Qe,{size:"sm",fw:"bold",children:v.jsxDEV(ee,{id:"conversations.details.session.title",defaultMessage:"Detected AI Form fields"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:98,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:97,columnNumber:9},this),v.jsxDEV(jc,{variant:"light",size:"xs",color:"gray",children:a<=n?a:`${n}/${a}`},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:103,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:96,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:95,columnNumber:7},this),v.jsxDEV(Wi.Panel,{className:"[&>.mantine-Accordion-content]:px-0",children:v.jsxDEV(Gt,{gap:"xs",children:[v.jsxDEV(Gt,{gap:"xs",children:Object.entries(t.session.data).slice(0,n).map(([h,f])=>v.jsxDEV(op,{value:f,label:h,truncate:"end"},h,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:116,columnNumber:12},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:112,columnNumber:9},this),v.jsxDEV(Nn,{onClick:()=>l({projectId:t.projectId,sessionId:t.session._id}),variant:"subtle",size:"xs",leftSection:v.jsxDEV(oai,{size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:128,columnNumber:23},this),children:v.jsxDEV(ee,{id:"conversations.details.ai_form_fields.go_to_session.button",defaultMessage:"View session details"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:130,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:119,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:111,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:110,columnNumber:7},this)]},"sessionData",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:94,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:44,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/ConversationDetails.tsx",lineNumber:42,columnNumber:3},this)}const Frr={add_training_documents:{id:"conversations.actions.add_training_documents.title",defaultMessage:"Add training document"},change_prompt:{id:"conversations.action.edit_prompt.title",defaultMessage:"Edit prompt"},change_training_documents:{id:"conversations.actions.change_training_document.title",defaultMessage:"Change training document"},improve_answer:{id:"conversations.actions.improve_answer.title",defaultMessage:"Update answer"},conversation_detail:{id:"conversations.actions.conversation_details.title",defaultMessage:"Conversation details"}};function $rr({conversationId:t}){const{data:e}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0}),{data:n}=Je.getConversation.useQuery({conversationId:t},{enabled:!!t}),[i,r]=f0(Cpe),o=b.useMemo(()=>{var l;return(l=n==null?void 0:n.messages)==null?void 0:l.findIndex(c=>c._id===(i==null?void 0:i.messageId))},[n,i==null?void 0:i.messageId]);if(!i||!t)return null;const s=o&&o!==-1?n==null?void 0:n.messages[o]:void 0,a=()=>r(void 0);return i.type==="add_training_documents"?v.jsxDEV(R9t,{isOpen:!0,isDisabled:!!(e!=null&&e.disabledAt),onClose:a},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/index.tsx",lineNumber:62,columnNumber:10},this):i.type==="change_prompt"?v.jsxDEV(Arr,{isOpen:!0,onClose:a},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/index.tsx",lineNumber:64,columnNumber:58},this):v.jsxDEV(e$e,{title:v.jsxDEV(ee,{...Frr[i.type]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/index.tsx",lineNumber:68,columnNumber:11},this),open:!0,mask:!1,destroyOnClose:!0,getContainer:!1,onClose:a,className:"w-[320px] min-w-[320px] [&>.ant-card-head]:px-2 [&>.ant-card-body]:p-2",children:[i.type==="change_training_documents"&&v.jsxDEV(Irr,{message:s,sourceId:i.sourceId},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/index.tsx",lineNumber:77,columnNumber:5},this),i.type==="conversation_detail"&&v.jsxDEV(jrr,{conversation:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/index.tsx",lineNumber:79,columnNumber:58},this),i.type==="improve_answer"&&o&&o>0&&v.jsxDEV(Rrr,{message:s,conversationId:t,questionMessage:n==null?void 0:n.messages[o-1],onClose:a},o,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/index.tsx",lineNumber:81,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationActions/index.tsx",lineNumber:67,columnNumber:3},this)}function Vrr({selectedId:t,conversation:e,onClick:n}){var a;const i=Mt(),r=!!((a=e.reviewedBy)!=null&&a.length),o=b.useMemo(()=>yPt({date:e.createdAt}),[e.createdAt]);function s(l){return l===void 0?"gray":l<50?"red":l>=50?"green":"gray"}return v.jsxDEV(uo,{className:Vt("w-full relative overflow-hidden",t===e._id&&"!bg-theme-primary/5"),onClick:()=>n(e._id),hoverable:!0,children:[v.jsxDEV("div",{className:"w-full flex flex-row justify-between items-start p-2",children:[v.jsxDEV(Fn.Paragraph,{className:"!mb-0",ellipsis:{rows:3},strong:r,children:e.firstMessage.content},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ConversationListItem.tsx",lineNumber:43,columnNumber:5},this),v.jsxDEV("div",{className:"flex flex-row items-center gap-1",children:v.jsxDEV("time",{className:"text-xs text-slate-500 whitespace-nowrap",children:o.replace(", "," - ")},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ConversationListItem.tsx",lineNumber:47,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ConversationListItem.tsx",lineNumber:46,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ConversationListItem.tsx",lineNumber:42,columnNumber:4},this),v.jsxDEV("footer",{className:"p-2",children:v.jsxDEV(un,{gap:"xs",align:"flex-start",children:[v.jsxDEV(jc,{color:s(e.successRate),size:"xs",radius:"md",variant:"outline",children:[e.successRate===void 0&&v.jsxDEV(ee,{id:"conversation_list.item.no_votes",defaultMessage:"Conversation has no votes"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ConversationListItem.tsx",lineNumber:54,columnNumber:8},this),e.successRate!==void 0&&v.jsxDEV(ee,{id:"conversation_list.item.success_rate",defaultMessage:"Success rate {percentage}%",values:{percentage:e.successRate}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ConversationListItem.tsx",lineNumber:60,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ConversationListItem.tsx",lineNumber:52,columnNumber:6},this),e.hasLeadGeneration&&v.jsxDEV(ir,{label:i.formatMessage({id:"conversation_list.item.has_lead_generation",defaultMessage:"Lead generation filled in"}),children:v.jsxDEV(Sai,{size:16,stroke:1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ConversationListItem.tsx",lineNumber:73,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ConversationListItem.tsx",lineNumber:67,columnNumber:41},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ConversationListItem.tsx",lineNumber:51,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ConversationListItem.tsx",lineNumber:50,columnNumber:4},this),r&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV("span",{className:"w-14 h-14 rounded-full bg-theme-primary absolute -right-7 -bottom-7"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ConversationListItem.tsx",lineNumber:79,columnNumber:6},this),v.jsxDEV(ir,{label:i.formatMessage({id:"conversation_list.item.is_reviewed",defaultMessage:"Conversation is reviewed"}),children:v.jsxDEV(Xk,{className:"absolute right-1 bottom-1 text-white"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ConversationListItem.tsx",lineNumber:86,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ConversationListItem.tsx",lineNumber:80,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ConversationListItem.tsx",lineNumber:78,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ConversationListItem.tsx",lineNumber:34,columnNumber:3},this)}function Spe({value:t,size:e,organization:n,disabledDate:i,allowClear:r,className:o,onChange:s}){const a=Mt(),l=b.useMemo(()=>{let c=[];return!(n!=null&&n.permissions.conversationHistory)||n.permissions.conversationHistory<=5||(c=[{label:a.formatMessage({id:"shared.data_range_picker.last_7_days",defaultMessage:"Last 7 days"}),value:[An().subtract(7,"d").startOf("day"),An().endOf("day")]},{label:a.formatMessage({id:"shared.data_range_picker.previous_week",defaultMessage:"Previous week"}),value:[An().weekday(-7).startOf("day"),An().weekday(-7).endOf("week")]},{label:a.formatMessage({id:"shared.data_range_picker.last_30_days",defaultMessage:"Last 30 days"}),value:[An().subtract(30,"d").startOf("day"),An().endOf("day")]},{label:a.formatMessage({id:"shared.data_range_picker.last_month",defaultMessage:"Last month"}),value:[An().startOf("month"),An().endOf("month")]}],n.permissions.conversationHistory<=30)||(c=[...c,{label:a.formatMessage({id:"shared.data_range_picker.previous_month",defaultMessage:"Previous month"}),value:[An().subtract(1,"M").startOf("month"),An().subtract(1,"M").endOf("month")]},{label:a.formatMessage({id:"shared.data_range_picker.last_3_months",defaultMessage:"Last 3 months"}),value:[An().subtract(3,"M").startOf("day"),An().endOf("day")]},{label:a.formatMessage({id:"shared.data_range_picker.last_half_year",defaultMessage:"Last 6 months"}),value:[An().subtract(6,"M").startOf("month"),An().endOf("day")]}],(n==null?void 0:n.permissions.conversationHistory)<=182)||(c=[...c,{label:a.formatMessage({id:"shared.data_range_picker.current_year",defaultMessage:"Current year"}),value:[An().startOf("year"),An().endOf("year")]},{label:a.formatMessage({id:"shared.data_range_picker.last_year",defaultMessage:"Last 365 days"}),value:[An().subtract(1,"y").startOf("day"),An().endOf("day")]}],(n==null?void 0:n.permissions.conversationHistory)<=365)?c:[...c,{label:a.formatMessage({id:"shared.data_range_picker.previous_year",defaultMessage:"Previous year"}),value:[An().subtract(1,"y").startOf("year"),An().subtract(1,"y").endOf("year")]}]},[n]);return v.jsxDEV(Qk.RangePicker,{size:e,locale:$Be,showTime:!1,format:"DD/MM/YYYY",className:o,allowClear:r,disabledDate:i,allowEmpty:[!1,!1],presets:l,onChange:(c,u)=>{if(!s)return;if(!u[0].length&&!u[1].length)return s(void 0);const d=u.map(h=>{const f=h.split("/");return`${f[1]}/${f[0]}/${f[2]}`});s(d)},value:t!=null&&t.length?[An(t[0]),An(t[1])]:void 0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/DateRangePicker.tsx",lineNumber:128,columnNumber:3},this)}const O9t=[{value:"has_negative_vote",label:{id:"conversations.list.filter.votes.option.has_negative_vote",defaultMessage:"Voted negative",description:"Option will show conversations that have at least 1 negative vote"}},{value:"has_positive_vote",label:{id:"conversations.list.filter.votes.option.has_positive_vote",defaultMessage:"Has positive vote",description:"Option will show conversations that have at least 1 positive vote"}},{value:"has_votes",label:{id:"conversations.list.filter.votes.option.has_votes",defaultMessage:"Voted",description:"Option will show conversations that have at least 1 vote positive or negative"}},{value:"has_no_votes",label:{id:"conversations.list.filter.votes.option.has_no_votes",defaultMessage:"Not voted",description:"Option will show conversations that has no votes"}},{value:"all",label:{id:"conversations.list.filter.votes.option.all",defaultMessage:"Show all conversations",description:"Option will show all conversations with or without votes"}}];function Brr({value:t,onChange:e}){var a;const n=Mt(),[i]=Ut.useForm(),{data:r}=Je.getOrganization.useQuery(void 0,{staleTime:1/0}),o=wPt({from:new Date,by:((a=r==null?void 0:r.permissions)==null?void 0:a.conversationHistory)||30}),s=(l,c)=>{var u;e({...c,dateRange:(u=c.dateRange)!=null&&u.length?c.dateRange:void 0})};return v.jsxDEV(uo,{className:"conversation_list-filter shadow-lg",children:v.jsxDEV(Ut,{form:i,layout:"vertical",initialValues:t,onValuesChange:s,children:[v.jsxDEV(Ut.Item,{name:"vote",label:n.formatMessage({id:"conversations.list.filter.votes.label",defaultMessage:"Votes"}),children:v.jsxDEV(Lo,{options:O9t.map(l=>({...l,label:n.formatMessage(l.label)}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListFilter/index.tsx",lineNumber:47,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListFilter/index.tsx",lineNumber:40,columnNumber:5},this),v.jsxDEV(Ut.Item,{name:"dateRange",label:n.formatMessage({id:"conversations.list.filter.date_range.label",defaultMessage:"Date range"}),children:v.jsxDEV(Spe,{allowClear:!0,className:"w-full",organization:r,disabledDate:l=>l&&l<An(o).endOf("day")},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListFilter/index.tsx",lineNumber:61,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListFilter/index.tsx",lineNumber:54,columnNumber:5},this),v.jsxDEV(Ut.Item,{name:"isReviewed",label:n.formatMessage({id:"conversations.list.filter.un_reviewed.label",defaultMessage:"Review status"}),children:v.jsxDEV(Mc.Group,{className:"w-full",buttonStyle:"solid",children:[v.jsxDEV(Mc.Button,{value:!1,className:"text-center",children:v.jsxDEV(ee,{id:"conversations.list.filter.un_reviewed.un_reviewed_only",defaultMessage:"Unreviewed"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListFilter/index.tsx",lineNumber:77,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListFilter/index.tsx",lineNumber:76,columnNumber:7},this),v.jsxDEV(Mc.Button,{value:!0,className:"text-center",children:v.jsxDEV(ee,{id:"conversations.list.filter.un_reviewed.reviewed_only",defaultMessage:"Reviewed"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListFilter/index.tsx",lineNumber:83,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListFilter/index.tsx",lineNumber:82,columnNumber:7},this),v.jsxDEV(Mc.Button,{value:void 0,className:"text-center",children:v.jsxDEV(ee,{id:"conversations.list.filter.un_reviewed.all",defaultMessage:"All"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListFilter/index.tsx",lineNumber:89,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListFilter/index.tsx",lineNumber:88,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListFilter/index.tsx",lineNumber:75,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListFilter/index.tsx",lineNumber:68,columnNumber:5},this),v.jsxDEV(Ut.Item,{name:"languages",label:n.formatMessage({id:"conversations.list.filter.languages.label",defaultMessage:"Languages"}),children:v.jsxDEV(u$,{mode:"multiple",placeholder:n.formatMessage({id:"conversations.list.filter.languages.placeholder",defaultMessage:"Show all languages"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListFilter/index.tsx",lineNumber:100,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListFilter/index.tsx",lineNumber:93,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListFilter/index.tsx",lineNumber:39,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListFilter/index.tsx",lineNumber:38,columnNumber:3},this)}function Ppt(){return v.jsxDEV(uo,{className:"w-full conversation_list-card",children:v.jsxDEV("div",{className:"w-full p-4 flex flex-col items-start justify-between",children:v.jsxDEV(ja,{active:!0,paragraph:{rows:2},title:!1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListItemSkeleton.tsx",lineNumber:7,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListItemSkeleton.tsx",lineNumber:6,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/ListItemSkeleton.tsx",lineNumber:5,columnNumber:3},this)}function zrr({sort:t,filter:e,total:n,selectedId:i,isSmallScreen:r,conversations:o,isInitialLoading:s,fetchNextPage:a,onSortChange:l,onFilterChange:c,onExportOpen:u,onClick:d}){const h=Mt(),{data:f}=Je.getTotalUnseenConversations.useQuery(),m=b.useMemo(()=>Object.keys(e).reduce((_,w)=>{var C;return w==="vote"&&e.vote==="all"||w==="languages"&&!((C=e[w])!=null&&C.length)?_:w==="isReviewed"?e.isReviewed===void 0?_:_+1:e[w]?_+1:_},0),[e]),p=[{value:-1,label:h.formatMessage({id:"conversations.list.sort.option.new_to_old",defaultMessage:"New to old"})},{value:1,label:h.formatMessage({id:"conversations.list.sort.option.old_to_new",defaultMessage:"Old to new"})}],g=(f==null?void 0:f.total)||n,y=f&&(f==null?void 0:f.total)<(f==null?void 0:f.totalUnlocked)?f.totalUnlocked-f.total:0;return v.jsxDEV(uo,{title:v.jsxDEV("header",{className:"w-full flex flex-row justify-between p-2 pt-8 sm:pt-2",children:[v.jsxDEV(Lo,{value:t,onChange:l,options:p,variant:"borderless"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:89,columnNumber:6},this),v.jsxDEV("div",{className:"flex flex-row gap-2",children:[v.jsxDEV(Vs,{title:h.formatMessage({id:"conversation_list.export_button.tooltip",defaultMessage:"Export conversations"}),children:v.jsxDEV(vn,{icon:v.jsxDEV(c$e,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:97,columnNumber:22},this),onClick:u},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:97,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:91,columnNumber:7},this),v.jsxDEV(Vs,{title:h.formatMessage({id:"conversation_list.filter_button.tooltip",defaultMessage:"Filter conversations"}),children:v.jsxDEV(_6e,{count:m,size:"small",style:{backgroundColor:"var(--color-primary)"},children:v.jsxDEV(b6,{destroyPopupOnHide:!0,trigger:["click"],placement:"bottomRight",dropdownRender:()=>v.jsxDEV(Brr,{value:e,onChange:c},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:114,columnNumber:32},this),children:v.jsxDEV(vn,{icon:v.jsxDEV(J2t,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:116,columnNumber:24},this),id:"conversationListFilter"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:116,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:110,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:105,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:99,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:90,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:88,columnNumber:5},this),bordered:!1,id:"conversationList",className:Vt("conversation_list flex !flex-col justify-start !relative shadow-xl",r?"w-full h-full":"w-[320px] min-w-[320px]"),children:v.jsxDEV("div",{id:"conversationInfiniteScroll",className:"h-full overflow-y-auto overflow-x-hidden border-b-1 border-solid border-slate-100",children:[!s&&!!n&&v.jsxDEV(jBe,{next:a,scrollThreshold:.6,dataLength:(o==null?void 0:o.length)||0,hasMore:((o==null?void 0:o.length)||0)<n,loader:v.jsxDEV(Ppt,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:140,columnNumber:15},this),endMessage:o&&o.length>=n&&o.length!==0&&v.jsxDEV(ZD,{plain:!0,children:v.jsxDEV(ee,{id:"conversations.list.end_of_list",defaultMessage:"All conversations are fetched 📭",description:"Message user has reached the end off the conversations list"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:146,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:145,columnNumber:9},this),scrollableTarget:"conversationInfiniteScroll",className:"flex flex-col gap-2 p-2 h-full overflow-auto",children:v.jsxDEV(OBe,{children:o.map((_,w)=>v.jsxDEV(PBe.li,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0},transition:{duration:.15,delay:w*.0125},children:v.jsxDEV(Vrr,{selectedId:i,conversation:_,onClick:d},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:166,columnNumber:10},this)},_._id,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:159,columnNumber:9},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:157,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:135,columnNumber:6},this),!n&&y>0&&v.jsxDEV("div",{className:"p-2 !absolute w-full bottom-0",children:v.jsxDEV(pl,{type:"info",className:Vt("flex flex-col text-start !items-start gap-2"),message:h.formatMessage({id:"conversations.list.empty.upgrade_banner.description",defaultMessage:"You've got {total, plural, =1 {# conversation} other {# conversations}} beyond your billing scope. Upgrade to unlock all conversations.",description:"Fallback text when no conversations are found"},{total:y}),action:v.jsxDEV(vn,{type:"primary",size:"small",href:"/billing",children:v.jsxDEV(ee,{id:"conversations.list.empty.upgrade_banner.upgrade",defaultMessage:"Upgrade my plan"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:192,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:191,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:178,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:177,columnNumber:6},this),!s&&!n&&v.jsxDEV(wh,{image:"/img/svg/adventure.svg",description:h.formatMessage({id:"conversations.list.empty.description",defaultMessage:"Your chatbot hasn't had any conversations yet. Must be practicing the art of silence, bot-meditation at its finest!",description:"Fallback text when no conversations are found"}),className:"conversation_list-empty w-full h-full max-w-2xl flex flex-col justify-center p-4 !pr-8 !pb-16 mx-auto",children:v.jsxDEV("div",{className:"flex flex-col gap-8",children:n!==g&&v.jsxDEV(vn,{type:"text",onClick:()=>c({vote:"all",isReviewed:!1}),children:v.jsxDEV(ee,{id:"conversations.list.empty.button.reset_filter",defaultMessage:"Reset filters",description:"Show button to reset filters if user has hidden unseen conversations."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:215,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:214,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:212,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:202,columnNumber:6},this),s&&v.jsxDEV("div",{className:"flex flex-col gap-2 p-2",children:Array.from(Array(4).keys()).map((_,w)=>v.jsxDEV(Ppt,{},w,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:228,columnNumber:8},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:226,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:130,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ConversationList/index.tsx",lineNumber:86,columnNumber:3},this)}class Hrr extends Error{constructor(n,i,r,o,s){super(n);HX(this,"name","Assertion");HX(this,"code","ERR_ASSERTION");Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.actual=i,this.expected=r,this.generated=s,this.operator=o}}function xt(t,e){j9t(!!t,!1,!0,"ok","Expected value to be truthy",e)}function OCe(t){j9t(!1,!1,!0,"ok","Unreachable",t)}function j9t(t,e,n,i,r,o){if(!t)throw o instanceof Error?o:new Hrr(o||r,e,n,i,!o)}function Wrr(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Urr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Krr=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qrr={};function Opt(t,e){return(qrr.jsx?Krr:Urr).test(t)}const Grr=/[ \t\n\f\r]/g;function Yrr(t){return typeof t=="object"?t.type==="text"?jpt(t.value):!1:jpt(t)}function jpt(t){return t.replace(Grr,"")===""}class tG{constructor(e,n,i){this.property=e,this.normal=n,i&&(this.space=i)}}tG.prototype.property={};tG.prototype.normal={};tG.prototype.space=null;function F9t(t,e){const n={},i={};let r=-1;for(;++r<t.length;)Object.assign(n,t[r].property),Object.assign(i,t[r].normal);return new tG(n,i,e)}function VRe(t){return t.toLowerCase()}class Qv{constructor(e,n){this.property=e,this.attribute=n}}Qv.prototype.space=null;Qv.prototype.boolean=!1;Qv.prototype.booleanish=!1;Qv.prototype.overloadedBoolean=!1;Qv.prototype.number=!1;Qv.prototype.commaSeparated=!1;Qv.prototype.spaceSeparated=!1;Qv.prototype.commaOrSpaceSeparated=!1;Qv.prototype.mustUseProperty=!1;Qv.prototype.defined=!1;let Xrr=0;const Ao=dR(),vu=dR(),$9t=dR(),Xn=dR(),wl=dR(),z3=dR(),Ng=dR();function dR(){return 2**++Xrr}const BRe=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ao,booleanish:vu,commaOrSpaceSeparated:Ng,commaSeparated:z3,number:Xn,overloadedBoolean:$9t,spaceSeparated:wl},Symbol.toStringTag,{value:"Module"})),jCe=Object.keys(BRe);class HBe extends Qv{constructor(e,n,i,r){let o=-1;if(super(e,n),Fpt(this,"space",r),typeof i=="number")for(;++o<jCe.length;){const s=jCe[o];Fpt(this,jCe[o],(i&BRe[s])===BRe[s])}}}HBe.prototype.defined=!0;function Fpt(t,e,n){n&&(t[e]=n)}const Zrr={}.hasOwnProperty;function h$(t){const e={},n={};let i;for(i in t.properties)if(Zrr.call(t.properties,i)){const r=t.properties[i],o=new HBe(i,t.transform(t.attributes||{},i),r,t.space);t.mustUseProperty&&t.mustUseProperty.includes(i)&&(o.mustUseProperty=!0),e[i]=o,n[VRe(i)]=i,n[VRe(o.attribute)]=i}return new tG(e,n,t.space)}const V9t=h$({space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),B9t=h$({space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function z9t(t,e){return e in t?t[e]:e}function H9t(t,e){return z9t(t,e.toLowerCase())}const W9t=h$({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:H9t,properties:{xmlns:null,xmlnsXLink:null}}),U9t=h$({transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:vu,ariaAutoComplete:null,ariaBusy:vu,ariaChecked:vu,ariaColCount:Xn,ariaColIndex:Xn,ariaColSpan:Xn,ariaControls:wl,ariaCurrent:null,ariaDescribedBy:wl,ariaDetails:null,ariaDisabled:vu,ariaDropEffect:wl,ariaErrorMessage:null,ariaExpanded:vu,ariaFlowTo:wl,ariaGrabbed:vu,ariaHasPopup:null,ariaHidden:vu,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:wl,ariaLevel:Xn,ariaLive:null,ariaModal:vu,ariaMultiLine:vu,ariaMultiSelectable:vu,ariaOrientation:null,ariaOwns:wl,ariaPlaceholder:null,ariaPosInSet:Xn,ariaPressed:vu,ariaReadOnly:vu,ariaRelevant:null,ariaRequired:vu,ariaRoleDescription:wl,ariaRowCount:Xn,ariaRowIndex:Xn,ariaRowSpan:Xn,ariaSelected:vu,ariaSetSize:Xn,ariaSort:null,ariaValueMax:Xn,ariaValueMin:Xn,ariaValueNow:Xn,ariaValueText:null,role:null}}),Qrr=h$({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:H9t,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:z3,acceptCharset:wl,accessKey:wl,action:null,allow:null,allowFullScreen:Ao,allowPaymentRequest:Ao,allowUserMedia:Ao,alt:null,as:null,async:Ao,autoCapitalize:null,autoComplete:wl,autoFocus:Ao,autoPlay:Ao,blocking:wl,capture:null,charSet:null,checked:Ao,cite:null,className:wl,cols:Xn,colSpan:null,content:null,contentEditable:vu,controls:Ao,controlsList:wl,coords:Xn|z3,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ao,defer:Ao,dir:null,dirName:null,disabled:Ao,download:$9t,draggable:vu,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ao,formTarget:null,headers:wl,height:Xn,hidden:Ao,high:Xn,href:null,hrefLang:null,htmlFor:wl,httpEquiv:wl,id:null,imageSizes:null,imageSrcSet:null,inert:Ao,inputMode:null,integrity:null,is:null,isMap:Ao,itemId:null,itemProp:wl,itemRef:wl,itemScope:Ao,itemType:wl,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ao,low:Xn,manifest:null,max:null,maxLength:Xn,media:null,method:null,min:null,minLength:Xn,multiple:Ao,muted:Ao,name:null,nonce:null,noModule:Ao,noValidate:Ao,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ao,optimum:Xn,pattern:null,ping:wl,placeholder:null,playsInline:Ao,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ao,referrerPolicy:null,rel:wl,required:Ao,reversed:Ao,rows:Xn,rowSpan:Xn,sandbox:wl,scope:null,scoped:Ao,seamless:Ao,selected:Ao,shadowRootClonable:Ao,shadowRootDelegatesFocus:Ao,shadowRootMode:null,shape:null,size:Xn,sizes:null,slot:null,span:Xn,spellCheck:vu,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Xn,step:null,style:null,tabIndex:Xn,target:null,title:null,translate:null,type:null,typeMustMatch:Ao,useMap:null,value:vu,width:Xn,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:wl,axis:null,background:null,bgColor:null,border:Xn,borderColor:null,bottomMargin:Xn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ao,declare:Ao,event:null,face:null,frame:null,frameBorder:null,hSpace:Xn,leftMargin:Xn,link:null,longDesc:null,lowSrc:null,marginHeight:Xn,marginWidth:Xn,noResize:Ao,noHref:Ao,noShade:Ao,noWrap:Ao,object:null,profile:null,prompt:null,rev:null,rightMargin:Xn,rules:null,scheme:null,scrolling:vu,standby:null,summary:null,text:null,topMargin:Xn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Xn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ao,disableRemotePlayback:Ao,prefix:null,property:null,results:Xn,security:null,unselectable:null}}),Jrr=h$({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:z9t,properties:{about:Ng,accentHeight:Xn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Xn,amplitude:Xn,arabicForm:null,ascent:Xn,attributeName:null,attributeType:null,azimuth:Xn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Xn,by:null,calcMode:null,capHeight:Xn,className:wl,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Xn,diffuseConstant:Xn,direction:null,display:null,dur:null,divisor:Xn,dominantBaseline:null,download:Ao,dx:null,dy:null,edgeMode:null,editable:null,elevation:Xn,enableBackground:null,end:null,event:null,exponent:Xn,externalResourcesRequired:null,fill:null,fillOpacity:Xn,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:z3,g2:z3,glyphName:z3,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Xn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Xn,horizOriginX:Xn,horizOriginY:Xn,id:null,ideographic:Xn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Xn,k:Xn,k1:Xn,k2:Xn,k3:Xn,k4:Xn,kernelMatrix:Ng,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Xn,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Xn,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Xn,overlineThickness:Xn,paintOrder:null,panose1:null,path:null,pathLength:Xn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:wl,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Xn,pointsAtY:Xn,pointsAtZ:Xn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ng,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ng,rev:Ng,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ng,requiredFeatures:Ng,requiredFonts:Ng,requiredFormats:Ng,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Xn,specularExponent:Xn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Xn,strikethroughThickness:Xn,string:null,stroke:null,strokeDashArray:Ng,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Xn,strokeOpacity:Xn,strokeWidth:null,style:null,surfaceScale:Xn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ng,tabIndex:Xn,tableValues:null,target:null,targetX:Xn,targetY:Xn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ng,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Xn,underlineThickness:Xn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Xn,values:null,vAlphabetic:Xn,vMathematical:Xn,vectorEffect:null,vHanging:Xn,vIdeographic:Xn,version:null,vertAdvY:Xn,vertOriginX:Xn,vertOriginY:Xn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Xn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),eor=/^data[-\w.:]+$/i,$pt=/-[a-z]/g,tor=/[A-Z]/g;function nor(t,e){const n=VRe(e);let i=e,r=Qv;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&eor.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace($pt,ror);i="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!$pt.test(o)){let s=o.replace(tor,ior);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}r=HBe}return new r(i,e)}function ior(t){return"-"+t.toLowerCase()}function ror(t){return t.charAt(1).toUpperCase()}const oor={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},sor=F9t([B9t,V9t,W9t,U9t,Qrr],"html"),WBe=F9t([B9t,V9t,W9t,U9t,Jrr],"svg");function aor(t){const e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function lor(t){return t.join(" ").trim()}var K9t={},Vpt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,cor=/\n/g,uor=/^\s*/,dor=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,hor=/^:\s*/,mor=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,por=/^[;\s]*/,gor=/^\s+|\s+$/g,bor=`
`,Bpt="/",zpt="*",mT="",vor="comment",yor="declaration",_or=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,i=1;function r(m){var p=m.match(cor);p&&(n+=p.length);var g=m.lastIndexOf(bor);i=~g?m.length-g:i+m.length}function o(){var m={line:n,column:i};return function(p){return p.position=new s(m),c(),p}}function s(m){this.start=m,this.end={line:n,column:i},this.source=e.source}s.prototype.content=t;function a(m){var p=new Error(e.source+":"+n+":"+i+": "+m);if(p.reason=m,p.filename=e.source,p.line=n,p.column=i,p.source=t,!e.silent)throw p}function l(m){var p=m.exec(t);if(p){var g=p[0];return r(g),t=t.slice(g.length),p}}function c(){l(uor)}function u(m){var p;for(m=m||[];p=d();)p!==!1&&m.push(p);return m}function d(){var m=o();if(!(Bpt!=t.charAt(0)||zpt!=t.charAt(1))){for(var p=2;mT!=t.charAt(p)&&(zpt!=t.charAt(p)||Bpt!=t.charAt(p+1));)++p;if(p+=2,mT===t.charAt(p-1))return a("End of comment missing");var g=t.slice(2,p-2);return i+=2,r(g),t=t.slice(p),i+=2,m({type:vor,comment:g})}}function h(){var m=o(),p=l(dor);if(p){if(d(),!l(hor))return a("property missing ':'");var g=l(mor),y=m({type:yor,property:Hpt(p[0].replace(Vpt,mT)),value:g?Hpt(g[0].replace(Vpt,mT)):mT});return l(por),y}}function f(){var m=[];u(m);for(var p;p=h();)p!==!1&&(m.push(p),u(m));return m}return c(),f()};function Hpt(t){return t?t.replace(gor,mT):mT}var xor=Bl&&Bl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(K9t,"__esModule",{value:!0});var Wpt=K9t.default=Cor,wor=xor(_or);function Cor(t,e){var n=null;if(!t||typeof t!="string")return n;var i=(0,wor.default)(t),r=typeof e=="function";return i.forEach(function(o){if(o.type==="declaration"){var s=o.property,a=o.value;r?e(s,a,o):a&&(n=n||{},n[s]=a)}}),n}const Sor=Wpt.default||Wpt,q9t=G9t("end"),UBe=G9t("start");function G9t(t){return e;function e(n){const i=n&&n.position&&n.position[t]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function Nor(t){const e=UBe(t),n=q9t(t);if(e&&n)return{start:e,end:n}}function MB(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Upt(t.position):"start"in t||"end"in t?Upt(t):"line"in t||"column"in t?zRe(t):""}function zRe(t){return Kpt(t&&t.line)+":"+Kpt(t&&t.column)}function Upt(t){return zRe(t&&t.start)+"-"+zRe(t&&t.end)}function Kpt(t){return t&&typeof t=="number"?t:1}class Of extends Error{constructor(e,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let r="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof e=="string"?r=e:!o.cause&&e&&(s=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof i=="string"){const l=i.indexOf(":");l===-1?o.ruleId=i:(o.source=i.slice(0,l),o.ruleId=i.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=a?a.line:void 0,this.name=MB(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Of.prototype.file="";Of.prototype.name="";Of.prototype.reason="";Of.prototype.message="";Of.prototype.stack="";Of.prototype.column=void 0;Of.prototype.line=void 0;Of.prototype.ancestors=void 0;Of.prototype.cause=void 0;Of.prototype.fatal=void 0;Of.prototype.place=void 0;Of.prototype.ruleId=void 0;Of.prototype.source=void 0;const KBe={}.hasOwnProperty,Eor=new Map,Dor=/[A-Z]/g,kor=/-([a-z])/g,Mor=new Set(["table","tbody","thead","tfoot","tr"]),Lor=new Set(["td","th"]),Y9t="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Tor(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let i;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=$or(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=For(n,e.jsx,e.jsxs)}const r={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:i,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?WBe:sor,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},o=X9t(r,t,void 0);return o&&typeof o!="string"?o:r.create(t,r.Fragment,{children:o||void 0},void 0)}function X9t(t,e,n){if(e.type==="element")return Ior(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return Aor(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return Por(t,e,n);if(e.type==="mdxjsEsm")return Ror(t,e);if(e.type==="root")return Oor(t,e,n);if(e.type==="text")return jor(t,e)}function Ior(t,e,n){const i=t.schema;let r=i;e.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=WBe,t.schema=r),t.ancestors.push(e);const o=Q9t(t,e.tagName,!1),s=Vor(t,e);let a=GBe(t,e);return Mor.has(e.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!Yrr(l):!0})),Z9t(t,s,o,e),qBe(s,a),t.ancestors.pop(),t.schema=i,t.create(e,o,s,n)}function Aor(t,e){if(e.data&&e.data.estree&&t.evaluater){const i=e.data.estree.body[0];return xt(i.type==="ExpressionStatement"),t.evaluater.evaluateExpression(i.expression)}aU(t,e.position)}function Ror(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);aU(t,e.position)}function Por(t,e,n){const i=t.schema;let r=i;e.name==="svg"&&i.space==="html"&&(r=WBe,t.schema=r),t.ancestors.push(e);const o=e.name===null?t.Fragment:Q9t(t,e.name,!0),s=Bor(t,e),a=GBe(t,e);return Z9t(t,s,o,e),qBe(s,a),t.ancestors.pop(),t.schema=i,t.create(e,o,s,n)}function Oor(t,e,n){const i={};return qBe(i,GBe(t,e)),t.create(e,t.Fragment,i,n)}function jor(t,e){return e.value}function Z9t(t,e,n,i){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=i)}function qBe(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function For(t,e,n){return i;function i(r,o,s,a){const c=Array.isArray(s.children)?n:e;return a?c(o,s,a):c(o,s)}}function $or(t,e){return n;function n(i,r,o,s){const a=Array.isArray(o.children),l=UBe(i);return e(r,o,s,a,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function Vor(t,e){const n={};let i,r;for(r in e.properties)if(r!=="children"&&KBe.call(e.properties,r)){const o=zor(t,r,e.properties[r]);if(o){const[s,a]=o;t.tableCellAlignToStyle&&s==="align"&&typeof a=="string"&&Lor.has(e.tagName)?i=a:n[s]=a}}if(i){const o=n.style||(n.style={});o[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function Bor(t,e){const n={};for(const i of e.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&t.evaluater){const o=i.data.estree.body[0];xt(o.type==="ExpressionStatement");const s=o.expression;xt(s.type==="ObjectExpression");const a=s.properties[0];xt(a.type==="SpreadElement"),Object.assign(n,t.evaluater.evaluateExpression(a.argument))}else aU(t,e.position);else{const r=i.name;let o;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&t.evaluater){const a=i.value.data.estree.body[0];xt(a.type==="ExpressionStatement"),o=t.evaluater.evaluateExpression(a.expression)}else aU(t,e.position);else o=i.value===null?!0:i.value;n[r]=o}return n}function GBe(t,e){const n=[];let i=-1;const r=t.passKeys?new Map:Eor;for(;++i<e.children.length;){const o=e.children[i];let s;if(t.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const c=r.get(l)||0;s=l+"-"+c,r.set(l,c+1)}}const a=X9t(t,o,s);a!==void 0&&n.push(a)}return n}function zor(t,e,n){const i=nor(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?Wrr(n):lor(n)),i.property==="style"){let r=typeof n=="object"?n:Hor(t,String(n));return t.stylePropertyNameCase==="css"&&(r=Wor(r)),["style",r]}return[t.elementAttributeNameCase==="react"&&i.space?oor[i.property]||i.property:i.attribute,n]}}function Hor(t,e){const n={};try{Sor(e,i)}catch(r){if(!t.ignoreInvalidStyle){const o=r,s=new Of("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=t.filePath||void 0,s.url=Y9t+"#cannot-parse-style-attribute",s}}return n;function i(r,o){let s=r;s.slice(0,2)!=="--"&&(s.slice(0,4)==="-ms-"&&(s="ms-"+s.slice(4)),s=s.replace(kor,Kor)),n[s]=o}}function Q9t(t,e,n){let i;if(!n)i={type:"Literal",value:e};else if(e.includes(".")){const r=e.split(".");let o=-1,s;for(;++o<r.length;){const a=Opt(r[o])?{type:"Identifier",name:r[o]}:{type:"Literal",value:r[o]};s=s?{type:"MemberExpression",object:s,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}xt(s,"always a result"),i=s}else i=Opt(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(i.type==="Literal"){const r=i.value;return KBe.call(t.components,r)?t.components[r]:r}if(t.evaluater)return t.evaluater.evaluateExpression(i);aU(t)}function aU(t,e){const n=new Of("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=Y9t+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Wor(t){const e={};let n;for(n in t)KBe.call(t,n)&&(e[Uor(n)]=t[n]);return e}function Uor(t){let e=t.replace(Dor,qor);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function Kor(t,e){return e.toUpperCase()}function qor(t){return"-"+t.toLowerCase()}const FCe={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Gor={};function YBe(t,e){const n=Gor,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,r=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return J9t(t,i,r)}function J9t(t,e,n){if(Yor(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return qpt(t.children,e,n)}return Array.isArray(t)?qpt(t,e,n):""}function qpt(t,e,n){const i=[];let r=-1;for(;++r<t.length;)i[r]=J9t(t[r],e,n);return i.join("")}function Yor(t){return!!(t&&typeof t=="object")}const Gpt=document.createElement("i");function XBe(t){const e="&"+t+";";Gpt.innerHTML=e;const n=Gpt.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}const _e={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533},xi={attentionSideBefore:1,attentionSideAfter:2,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupWhitespace:1,characterGroupPunctuation:2,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeDocument:"document",contentTypeFlow:"flow",contentTypeContent:"content",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlRaw:1,htmlComment:2,htmlInstruction:3,htmlDeclaration:4,htmlCdata:5,htmlBasic:6,htmlComplete:7,htmlRawSizeMax:8,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4},Oe={data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkDocument:"chunkDocument",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"},fx={ht:"	",lf:`
`,cr:"\r",space:" ",exclamationMark:"!",quotationMark:'"',numberSign:"#",dollarSign:"$",percentSign:"%",ampersand:"&",apostrophe:"'",leftParenthesis:"(",rightParenthesis:")",asterisk:"*",plusSign:"+",comma:",",dash:"-",dot:".",slash:"/",digit0:"0",digit1:"1",digit2:"2",digit3:"3",digit4:"4",digit5:"5",digit6:"6",digit7:"7",digit8:"8",digit9:"9",colon:":",semicolon:";",lessThan:"<",equalsTo:"=",greaterThan:">",questionMark:"?",atSign:"@",uppercaseA:"A",uppercaseB:"B",uppercaseC:"C",uppercaseD:"D",uppercaseE:"E",uppercaseF:"F",uppercaseG:"G",uppercaseH:"H",uppercaseI:"I",uppercaseJ:"J",uppercaseK:"K",uppercaseL:"L",uppercaseM:"M",uppercaseN:"N",uppercaseO:"O",uppercaseP:"P",uppercaseQ:"Q",uppercaseR:"R",uppercaseS:"S",uppercaseT:"T",uppercaseU:"U",uppercaseV:"V",uppercaseW:"W",uppercaseX:"X",uppercaseY:"Y",uppercaseZ:"Z",leftSquareBracket:"[",backslash:"\\",rightSquareBracket:"]",caret:"^",underscore:"_",graveAccent:"`",lowercaseA:"a",lowercaseB:"b",lowercaseC:"c",lowercaseD:"d",lowercaseE:"e",lowercaseF:"f",lowercaseG:"g",lowercaseH:"h",lowercaseI:"i",lowercaseJ:"j",lowercaseK:"k",lowercaseL:"l",lowercaseM:"m",lowercaseN:"n",lowercaseO:"o",lowercaseP:"p",lowercaseQ:"q",lowercaseR:"r",lowercaseS:"s",lowercaseT:"t",lowercaseU:"u",lowercaseV:"v",lowercaseW:"w",lowercaseX:"x",lowercaseY:"y",lowercaseZ:"z",leftCurlyBrace:"{",verticalBar:"|",rightCurlyBrace:"}",tilde:"~",replacementCharacter:"�"};function xv(t,e,n,i){const r=t.length;let o=0,s;if(e<0?e=-e>r?0:r+e:e=e>r?r:e,n=n>0?n:0,i.length<xi.v8MaxSafeChunkSize)s=Array.from(i),s.unshift(e,n),t.splice(...s);else for(n&&t.splice(e,n);o<i.length;)s=i.slice(o,o+xi.v8MaxSafeChunkSize),s.unshift(e,0),t.splice(...s),o+=xi.v8MaxSafeChunkSize,e+=xi.v8MaxSafeChunkSize}function iv(t,e){return t.length>0?(xv(t,t.length,0,e),t):e}const Ypt={}.hasOwnProperty;function eBt(t){const e={};let n=-1;for(;++n<t.length;)Xor(e,t[n]);return e}function Xor(t,e){let n;for(n in e){const r=(Ypt.call(t,n)?t[n]:void 0)||(t[n]={}),o=e[n];let s;if(o)for(s in o){Ypt.call(r,s)||(r[s]=[]);const a=o[s];Zor(r[s],Array.isArray(a)?a:a?[a]:[])}}}function Zor(t,e){let n=-1;const i=[];for(;++n<e.length;)(e[n].add==="after"?t:i).push(e[n]);xv(t,0,0,i)}function tBt(t,e){const n=Number.parseInt(t,e);return n<_e.ht||n===_e.vt||n>_e.cr&&n<_e.space||n>_e.tilde&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?fx.replacementCharacter:String.fromCodePoint(n)}function k0(t){return t.replace(/[\t\n\r ]+/g,fx.space).replace(/^ | $/g,"").toLowerCase().toUpperCase()}const fm=bM(/[A-Za-z]/),wf=bM(/[\dA-Za-z]/),Qor=bM(/[#-'*+\--9=?A-Z^-~]/);function $se(t){return t!==null&&(t<_e.space||t===_e.del)}const HRe=bM(/\d/),Jor=bM(/[\dA-Fa-f]/),esr=bM(/[!-/:-@[-`{-~]/);function qi(t){return t!==null&&t<_e.horizontalTab}function gl(t){return t!==null&&(t<_e.nul||t===_e.space)}function Qo(t){return t===_e.horizontalTab||t===_e.virtualSpace||t===_e.space}const Npe=bM(new RegExp("\\p{P}|\\p{S}","u")),sA=bM(/\s/);function bM(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function f$(t){const e=[];let n=-1,i=0,r=0;for(;++n<t.length;){const o=t.charCodeAt(n);let s="";if(o===_e.percentSign&&wf(t.charCodeAt(n+1))&&wf(t.charCodeAt(n+2)))r=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const a=t.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),r=1):s=fx.replacementCharacter}else s=String.fromCharCode(o);s&&(e.push(t.slice(i,n),encodeURIComponent(s)),i=n+r+1,s=""),r&&(n+=r,r=0)}return e.join("")+t.slice(i)}function $s(t,e,n,i){const r=i?i-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(l){return Qo(l)?(t.enter(n),a(l)):e(l)}function a(l){return Qo(l)&&o++<r?(t.consume(l),a):(t.exit(n),e(l))}}const tsr={tokenize:nsr};function nsr(t){const e=t.attempt(this.parser.constructs.contentInitial,i,r);let n;return e;function i(a){if(xt(a===_e.eof||qi(a),"expected eol or eof"),a===_e.eof){t.consume(a);return}return t.enter(Oe.lineEnding),t.consume(a),t.exit(Oe.lineEnding),$s(t,e,Oe.linePrefix)}function r(a){return xt(a!==_e.eof&&!qi(a),"expected anything other than a line ending or EOF"),t.enter(Oe.paragraph),o(a)}function o(a){const l=t.enter(Oe.chunkText,{contentType:xi.contentTypeText,previous:n});return n&&(n.next=l),n=l,s(a)}function s(a){if(a===_e.eof){t.exit(Oe.chunkText),t.exit(Oe.paragraph),t.consume(a);return}return qi(a)?(t.consume(a),t.exit(Oe.chunkText),o):(t.consume(a),s)}}const isr={tokenize:rsr},Xpt={tokenize:osr};function rsr(t){const e=this,n=[];let i=0,r,o,s;return a;function a(w){if(i<n.length){const C=n[i];return e.containerState=C[1],xt(C[0].continuation,"expected `continuation` to be defined on container construct"),t.attempt(C[0].continuation,l,c)(w)}return c(w)}function l(w){if(xt(e.containerState,"expected `containerState` to be defined after continuation"),i++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,r&&_();const C=e.events.length;let N=C,E;for(;N--;)if(e.events[N][0]==="exit"&&e.events[N][1].type===Oe.chunkFlow){E=e.events[N][1].end;break}xt(E,"could not find previous flow chunk"),y(i);let D=C;for(;D<e.events.length;)e.events[D][1].end=Object.assign({},E),D++;return xv(e.events,N+1,0,e.events.slice(C)),e.events.length=D,c(w)}return a(w)}function c(w){if(i===n.length){if(!r)return h(w);if(r.currentConstruct&&r.currentConstruct.concrete)return m(w);e.interrupt=!!(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(Xpt,u,d)(w)}function u(w){return r&&_(),y(i),h(w)}function d(w){return e.parser.lazy[e.now().line]=i!==n.length,s=e.now().offset,m(w)}function h(w){return e.containerState={},t.attempt(Xpt,f,m)(w)}function f(w){return xt(e.currentConstruct,"expected `currentConstruct` to be defined on tokenizer"),xt(e.containerState,"expected `containerState` to be defined on tokenizer"),i++,n.push([e.currentConstruct,e.containerState]),h(w)}function m(w){if(w===_e.eof){r&&_(),y(0),t.consume(w);return}return r=r||e.parser.flow(e.now()),t.enter(Oe.chunkFlow,{contentType:xi.contentTypeFlow,previous:o,_tokenizer:r}),p(w)}function p(w){if(w===_e.eof){g(t.exit(Oe.chunkFlow),!0),y(0),t.consume(w);return}return qi(w)?(t.consume(w),g(t.exit(Oe.chunkFlow)),i=0,e.interrupt=void 0,a):(t.consume(w),p)}function g(w,C){xt(r,"expected `childFlow` to be defined when continuing");const N=e.sliceStream(w);if(C&&N.push(null),w.previous=o,o&&(o.next=w),o=w,r.defineSkip(w.start),r.write(N),e.parser.lazy[w.start.line]){let E=r.events.length;for(;E--;)if(r.events[E][1].start.offset<s&&(!r.events[E][1].end||r.events[E][1].end.offset>s))return;const D=e.events.length;let k=D,M,T;for(;k--;)if(e.events[k][0]==="exit"&&e.events[k][1].type===Oe.chunkFlow){if(M){T=e.events[k][1].end;break}M=!0}for(xt(T,"could not find previous flow chunk"),y(i),E=D;E<e.events.length;)e.events[E][1].end=Object.assign({},T),E++;xv(e.events,k+1,0,e.events.slice(D)),e.events.length=E}}function y(w){let C=n.length;for(;C-- >w;){const N=n[C];e.containerState=N[1],xt(N[0].exit,"expected `exit` to be defined on container construct"),N[0].exit.call(e,t)}n.length=w}function _(){xt(e.containerState,"expected `containerState` to be defined when closing flow"),xt(r,"expected `childFlow` to be defined when closing it"),r.write([_e.eof]),o=void 0,r=void 0,e.containerState._closeFlow=void 0}}function osr(t,e,n){return xt(this.parser.constructs.disable.null,"expected `disable.null` to be populated"),$s(t,t.attempt(this.parser.constructs.document,e,n),Oe.linePrefix,this.parser.constructs.disable.null.includes("codeIndented")?void 0:xi.tabSize)}function Vse(t){if(t===_e.eof||gl(t)||sA(t))return xi.characterGroupWhitespace;if(Npe(t))return xi.characterGroupPunctuation}function Epe(t,e,n){const i=[];let r=-1;for(;++r<t.length;){const o=t[r].resolveAll;o&&!i.includes(o)&&(e=o(e,n),i.push(o))}return e}const WRe={name:"attention",tokenize:asr,resolveAll:ssr};function ssr(t,e){let n=-1,i,r,o,s,a,l,c,u;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(i=n;i--;)if(t[i][0]==="exit"&&t[i][1].type==="attentionSequence"&&t[i][1]._open&&e.sliceSerialize(t[i][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[i][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[i][1].end.offset-t[i][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;l=t[i][1].end.offset-t[i][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const d=Object.assign({},t[i][1].end),h=Object.assign({},t[n][1].start);Zpt(d,-l),Zpt(h,l),s={type:l>1?Oe.strongSequence:Oe.emphasisSequence,start:d,end:Object.assign({},t[i][1].end)},a={type:l>1?Oe.strongSequence:Oe.emphasisSequence,start:Object.assign({},t[n][1].start),end:h},o={type:l>1?Oe.strongText:Oe.emphasisText,start:Object.assign({},t[i][1].end),end:Object.assign({},t[n][1].start)},r={type:l>1?Oe.strong:Oe.emphasis,start:Object.assign({},s.start),end:Object.assign({},a.end)},t[i][1].end=Object.assign({},s.start),t[n][1].start=Object.assign({},a.end),c=[],t[i][1].end.offset-t[i][1].start.offset&&(c=iv(c,[["enter",t[i][1],e],["exit",t[i][1],e]])),c=iv(c,[["enter",r,e],["enter",s,e],["exit",s,e],["enter",o,e]]),xt(e.parser.constructs.insideSpan.null,"expected `insideSpan` to be populated"),c=iv(c,Epe(e.parser.constructs.insideSpan.null,t.slice(i+1,n),e)),c=iv(c,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",r,e]]),t[n][1].end.offset-t[n][1].start.offset?(u=2,c=iv(c,[["enter",t[n][1],e],["exit",t[n][1],e]])):u=0,xv(t,i-1,n-i+3,c),n=i+c.length-u-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function asr(t,e){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,r=Vse(i);let o;return s;function s(l){return xt(l===_e.asterisk||l===_e.underscore,"expected asterisk or underscore"),o=l,t.enter("attentionSequence"),a(l)}function a(l){if(l===o)return t.consume(l),a;const c=t.exit("attentionSequence"),u=Vse(l);xt(n,"expected `attentionMarkers` to be populated");const d=!u||u===xi.characterGroupPunctuation&&r||n.includes(l),h=!r||r===xi.characterGroupPunctuation&&u||n.includes(i);return c._open=!!(o===_e.asterisk?d:d&&(r||!h)),c._close=!!(o===_e.asterisk?h:h&&(u||!d)),e(l)}}function Zpt(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const lsr={name:"autolink",tokenize:csr};function csr(t,e,n){let i=0;return r;function r(f){return xt(f===_e.lessThan,"expected `<`"),t.enter(Oe.autolink),t.enter(Oe.autolinkMarker),t.consume(f),t.exit(Oe.autolinkMarker),t.enter(Oe.autolinkProtocol),o}function o(f){return fm(f)?(t.consume(f),s):f===_e.atSign?n(f):c(f)}function s(f){return f===_e.plusSign||f===_e.dash||f===_e.dot||wf(f)?(i=1,a(f)):c(f)}function a(f){return f===_e.colon?(t.consume(f),i=0,l):(f===_e.plusSign||f===_e.dash||f===_e.dot||wf(f))&&i++<xi.autolinkSchemeSizeMax?(t.consume(f),a):(i=0,c(f))}function l(f){return f===_e.greaterThan?(t.exit(Oe.autolinkProtocol),t.enter(Oe.autolinkMarker),t.consume(f),t.exit(Oe.autolinkMarker),t.exit(Oe.autolink),e):f===_e.eof||f===_e.space||f===_e.lessThan||$se(f)?n(f):(t.consume(f),l)}function c(f){return f===_e.atSign?(t.consume(f),u):Qor(f)?(t.consume(f),c):n(f)}function u(f){return wf(f)?d(f):n(f)}function d(f){return f===_e.dot?(t.consume(f),i=0,u):f===_e.greaterThan?(t.exit(Oe.autolinkProtocol).type=Oe.autolinkEmail,t.enter(Oe.autolinkMarker),t.consume(f),t.exit(Oe.autolinkMarker),t.exit(Oe.autolink),e):h(f)}function h(f){if((f===_e.dash||wf(f))&&i++<xi.autolinkDomainSizeMax){const m=f===_e.dash?h:d;return t.consume(f),m}return n(f)}}const nG={tokenize:usr,partial:!0};function usr(t,e,n){return i;function i(o){return Qo(o)?$s(t,r,Oe.linePrefix)(o):r(o)}function r(o){return o===_e.eof||qi(o)?e(o):n(o)}}const nBt={name:"blockQuote",tokenize:dsr,continuation:{tokenize:hsr},exit:fsr};function dsr(t,e,n){const i=this;return r;function r(s){if(s===_e.greaterThan){const a=i.containerState;return xt(a,"expected `containerState` to be defined in container"),a.open||(t.enter(Oe.blockQuote,{_container:!0}),a.open=!0),t.enter(Oe.blockQuotePrefix),t.enter(Oe.blockQuoteMarker),t.consume(s),t.exit(Oe.blockQuoteMarker),o}return n(s)}function o(s){return Qo(s)?(t.enter(Oe.blockQuotePrefixWhitespace),t.consume(s),t.exit(Oe.blockQuotePrefixWhitespace),t.exit(Oe.blockQuotePrefix),e):(t.exit(Oe.blockQuotePrefix),e(s))}}function hsr(t,e,n){const i=this;return r;function r(s){return Qo(s)?(xt(i.parser.constructs.disable.null,"expected `disable.null` to be populated"),$s(t,o,Oe.linePrefix,i.parser.constructs.disable.null.includes("codeIndented")?void 0:xi.tabSize)(s)):o(s)}function o(s){return t.attempt(nBt,e,n)(s)}}function fsr(t){t.exit(Oe.blockQuote)}const iBt={name:"characterEscape",tokenize:msr};function msr(t,e,n){return i;function i(o){return xt(o===_e.backslash,"expected `\\`"),t.enter(Oe.characterEscape),t.enter(Oe.escapeMarker),t.consume(o),t.exit(Oe.escapeMarker),r}function r(o){return esr(o)?(t.enter(Oe.characterEscapeValue),t.consume(o),t.exit(Oe.characterEscapeValue),t.exit(Oe.characterEscape),e):n(o)}}const rBt={name:"characterReference",tokenize:psr};function psr(t,e,n){const i=this;let r=0,o,s;return a;function a(d){return xt(d===_e.ampersand,"expected `&`"),t.enter(Oe.characterReference),t.enter(Oe.characterReferenceMarker),t.consume(d),t.exit(Oe.characterReferenceMarker),l}function l(d){return d===_e.numberSign?(t.enter(Oe.characterReferenceMarkerNumeric),t.consume(d),t.exit(Oe.characterReferenceMarkerNumeric),c):(t.enter(Oe.characterReferenceValue),o=xi.characterReferenceNamedSizeMax,s=wf,u(d))}function c(d){return d===_e.uppercaseX||d===_e.lowercaseX?(t.enter(Oe.characterReferenceMarkerHexadecimal),t.consume(d),t.exit(Oe.characterReferenceMarkerHexadecimal),t.enter(Oe.characterReferenceValue),o=xi.characterReferenceHexadecimalSizeMax,s=Jor,u):(t.enter(Oe.characterReferenceValue),o=xi.characterReferenceDecimalSizeMax,s=HRe,u(d))}function u(d){if(d===_e.semicolon&&r){const h=t.exit(Oe.characterReferenceValue);return s===wf&&!XBe(i.sliceSerialize(h))?n(d):(t.enter(Oe.characterReferenceMarker),t.consume(d),t.exit(Oe.characterReferenceMarker),t.exit(Oe.characterReference),e)}return s(d)&&r++<o?(t.consume(d),u):n(d)}}const Qpt={tokenize:bsr,partial:!0},Jpt={name:"codeFenced",tokenize:gsr,concrete:!0};function gsr(t,e,n){const i=this,r={tokenize:N,partial:!0};let o=0,s=0,a;return l;function l(E){return c(E)}function c(E){xt(E===_e.graveAccent||E===_e.tilde,"expected `` ` `` or `~`");const D=i.events[i.events.length-1];return o=D&&D[1].type===Oe.linePrefix?D[2].sliceSerialize(D[1],!0).length:0,a=E,t.enter(Oe.codeFenced),t.enter(Oe.codeFencedFence),t.enter(Oe.codeFencedFenceSequence),u(E)}function u(E){return E===a?(s++,t.consume(E),u):s<xi.codeFencedSequenceSizeMin?n(E):(t.exit(Oe.codeFencedFenceSequence),Qo(E)?$s(t,d,Oe.whitespace)(E):d(E))}function d(E){return E===_e.eof||qi(E)?(t.exit(Oe.codeFencedFence),i.interrupt?e(E):t.check(Qpt,p,C)(E)):(t.enter(Oe.codeFencedFenceInfo),t.enter(Oe.chunkString,{contentType:xi.contentTypeString}),h(E))}function h(E){return E===_e.eof||qi(E)?(t.exit(Oe.chunkString),t.exit(Oe.codeFencedFenceInfo),d(E)):Qo(E)?(t.exit(Oe.chunkString),t.exit(Oe.codeFencedFenceInfo),$s(t,f,Oe.whitespace)(E)):E===_e.graveAccent&&E===a?n(E):(t.consume(E),h)}function f(E){return E===_e.eof||qi(E)?d(E):(t.enter(Oe.codeFencedFenceMeta),t.enter(Oe.chunkString,{contentType:xi.contentTypeString}),m(E))}function m(E){return E===_e.eof||qi(E)?(t.exit(Oe.chunkString),t.exit(Oe.codeFencedFenceMeta),d(E)):E===_e.graveAccent&&E===a?n(E):(t.consume(E),m)}function p(E){return xt(qi(E),"expected eol"),t.attempt(r,C,g)(E)}function g(E){return xt(qi(E),"expected eol"),t.enter(Oe.lineEnding),t.consume(E),t.exit(Oe.lineEnding),y}function y(E){return o>0&&Qo(E)?$s(t,_,Oe.linePrefix,o+1)(E):_(E)}function _(E){return E===_e.eof||qi(E)?t.check(Qpt,p,C)(E):(t.enter(Oe.codeFlowValue),w(E))}function w(E){return E===_e.eof||qi(E)?(t.exit(Oe.codeFlowValue),_(E)):(t.consume(E),w)}function C(E){return t.exit(Oe.codeFenced),e(E)}function N(E,D,k){let M=0;return T;function T(V){return xt(qi(V),"expected eol"),E.enter(Oe.lineEnding),E.consume(V),E.exit(Oe.lineEnding),A}function A(V){return xt(i.parser.constructs.disable.null,"expected `disable.null` to be populated"),E.enter(Oe.codeFencedFence),Qo(V)?$s(E,R,Oe.linePrefix,i.parser.constructs.disable.null.includes("codeIndented")?void 0:xi.tabSize)(V):R(V)}function R(V){return V===a?(E.enter(Oe.codeFencedFenceSequence),P(V)):k(V)}function P(V){return V===a?(M++,E.consume(V),P):M>=s?(E.exit(Oe.codeFencedFenceSequence),Qo(V)?$s(E,O,Oe.whitespace)(V):O(V)):k(V)}function O(V){return V===_e.eof||qi(V)?(E.exit(Oe.codeFencedFence),D(V)):k(V)}}}function bsr(t,e,n){const i=this;return r;function r(s){return s===_e.eof?n(s):(xt(qi(s),"expected eol"),t.enter(Oe.lineEnding),t.consume(s),t.exit(Oe.lineEnding),o)}function o(s){return i.parser.lazy[i.now().line]?n(s):e(s)}}const $Ce={name:"codeIndented",tokenize:ysr},vsr={tokenize:_sr,partial:!0};function ysr(t,e,n){const i=this;return r;function r(c){return xt(Qo(c)),t.enter(Oe.codeIndented),$s(t,o,Oe.linePrefix,xi.tabSize+1)(c)}function o(c){const u=i.events[i.events.length-1];return u&&u[1].type===Oe.linePrefix&&u[2].sliceSerialize(u[1],!0).length>=xi.tabSize?s(c):n(c)}function s(c){return c===_e.eof?l(c):qi(c)?t.attempt(vsr,s,l)(c):(t.enter(Oe.codeFlowValue),a(c))}function a(c){return c===_e.eof||qi(c)?(t.exit(Oe.codeFlowValue),s(c)):(t.consume(c),a)}function l(c){return t.exit(Oe.codeIndented),e(c)}}function _sr(t,e,n){const i=this;return r;function r(s){return i.parser.lazy[i.now().line]?n(s):qi(s)?(t.enter(Oe.lineEnding),t.consume(s),t.exit(Oe.lineEnding),r):$s(t,o,Oe.linePrefix,xi.tabSize+1)(s)}function o(s){const a=i.events[i.events.length-1];return a&&a[1].type===Oe.linePrefix&&a[2].sliceSerialize(a[1],!0).length>=xi.tabSize?e(s):qi(s)?r(s):n(s)}}const xsr={name:"codeText",tokenize:Csr,resolve:wsr,previous:oBt};function wsr(t){let e=t.length-4,n=3,i,r;if((t[n][1].type===Oe.lineEnding||t[n][1].type==="space")&&(t[e][1].type===Oe.lineEnding||t[e][1].type==="space")){for(i=n;++i<e;)if(t[i][1].type===Oe.codeTextData){t[n][1].type=Oe.codeTextPadding,t[e][1].type=Oe.codeTextPadding,n+=2,e-=2;break}}for(i=n-1,e++;++i<=e;)r===void 0?i!==e&&t[i][1].type!==Oe.lineEnding&&(r=i):(i===e||t[i][1].type===Oe.lineEnding)&&(t[r][1].type=Oe.codeTextData,i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),e-=i-r-2,i=r+2),r=void 0);return t}function oBt(t){return t!==_e.graveAccent||this.events[this.events.length-1][1].type===Oe.characterEscape}function Csr(t,e,n){const i=this;let r=0,o,s;return a;function a(h){return xt(h===_e.graveAccent,"expected `` ` ``"),xt(oBt.call(i,i.previous),"expected correct previous"),t.enter(Oe.codeText),t.enter(Oe.codeTextSequence),l(h)}function l(h){return h===_e.graveAccent?(t.consume(h),r++,l):(t.exit(Oe.codeTextSequence),c(h))}function c(h){return h===_e.eof?n(h):h===_e.space?(t.enter("space"),t.consume(h),t.exit("space"),c):h===_e.graveAccent?(s=t.enter(Oe.codeTextSequence),o=0,d(h)):qi(h)?(t.enter(Oe.lineEnding),t.consume(h),t.exit(Oe.lineEnding),c):(t.enter(Oe.codeTextData),u(h))}function u(h){return h===_e.eof||h===_e.space||h===_e.graveAccent||qi(h)?(t.exit(Oe.codeTextData),c(h)):(t.consume(h),u)}function d(h){return h===_e.graveAccent?(t.consume(h),o++,d):o===r?(t.exit(Oe.codeTextSequence),t.exit(Oe.codeText),e(h)):(s.type=Oe.codeTextData,u(h))}}class Ssr{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(e,i):e>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(e,n,i){const r=n||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return i&&y7(this.left,i),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),y7(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),y7(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);y7(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);y7(this.left,n.reverse())}}}function y7(t,e){let n=0;if(e.length<xi.v8MaxSafeChunkSize)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+xi.v8MaxSafeChunkSize)),n+=xi.v8MaxSafeChunkSize}function sBt(t){const e={};let n=-1,i,r,o,s,a,l,c;const u=new Ssr(t);for(;++n<u.length;){for(;n in e;)n=e[n];if(i=u.get(n),n&&i[1].type===Oe.chunkFlow&&u.get(n-1)[1].type===Oe.listItemPrefix&&(xt(i[1]._tokenizer,"expected `_tokenizer` on subtokens"),l=i[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type===Oe.lineEndingBlank&&(o+=2),o<l.length&&l[o][1].type===Oe.content))for(;++o<l.length&&l[o][1].type!==Oe.content;)l[o][1].type===Oe.chunkText&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(i[0]==="enter")i[1].contentType&&(Object.assign(e,Nsr(u,n)),n=e[n],c=!0);else if(i[1]._container){for(o=n,r=void 0;o--&&(s=u.get(o),s[1].type===Oe.lineEnding||s[1].type===Oe.lineEndingBlank);)s[0]==="enter"&&(r&&(u.get(r)[1].type=Oe.lineEndingBlank),s[1].type=Oe.lineEnding,r=o);r&&(i[1].end=Object.assign({},u.get(r)[1].start),a=u.slice(r,n),a.unshift(i),u.splice(r,n-r+1,a))}}return xv(t,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function Nsr(t,e){const n=t.get(e)[1],i=t.get(e)[2];let r=e-1;const o=[];xt(n.contentType,"expected `contentType` on subtokens");const s=n._tokenizer||i.parser[n.contentType](n.start),a=s.events,l=[],c={};let u,d,h=-1,f=n,m=0,p=0;const g=[p];for(;f;){for(;t.get(++r)[1]!==f;);xt(!d||f.previous===d,"expected previous to match"),xt(!d||d.next===f,"expected next to match"),o.push(r),f._tokenizer||(u=i.sliceStream(f),f.next||u.push(_e.eof),d&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(xt(f,"expected a current token"),p=h+1,g.push(p),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0,xt(!f.next,"expected no next token")):g.pop(),h=g.length;h--;){const y=a.slice(g[h],g[h+1]),_=o.pop();xt(_!==void 0,"expected a start position when splicing"),l.push([_,_+y.length-1]),t.splice(_,2,y)}for(l.reverse(),h=-1;++h<l.length;)c[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return c}const Esr={tokenize:Msr,resolve:ksr},Dsr={tokenize:Lsr,partial:!0};function ksr(t){return sBt(t),t}function Msr(t,e){let n;return i;function i(a){return xt(a!==_e.eof&&!qi(a),"expected no eof or eol"),t.enter(Oe.content),n=t.enter(Oe.chunkContent,{contentType:xi.contentTypeContent}),r(a)}function r(a){return a===_e.eof?o(a):qi(a)?t.check(Dsr,s,o)(a):(t.consume(a),r)}function o(a){return t.exit(Oe.chunkContent),t.exit(Oe.content),e(a)}function s(a){return xt(qi(a),"expected eol"),t.consume(a),t.exit(Oe.chunkContent),xt(n,"expected previous token"),n.next=t.enter(Oe.chunkContent,{contentType:xi.contentTypeContent,previous:n}),n=n.next,r}}function Lsr(t,e,n){const i=this;return r;function r(s){return xt(qi(s),"expected a line ending"),t.exit(Oe.chunkContent),t.enter(Oe.lineEnding),t.consume(s),t.exit(Oe.lineEnding),$s(t,o,Oe.linePrefix)}function o(s){if(s===_e.eof||qi(s))return n(s);xt(i.parser.constructs.disable.null,"expected `disable.null` to be populated");const a=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type===Oe.linePrefix&&a[2].sliceSerialize(a[1],!0).length>=xi.tabSize?e(s):t.interrupt(i.parser.constructs.flow,n,e)(s)}}function aBt(t,e,n,i,r,o,s,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(y){return y===_e.lessThan?(t.enter(i),t.enter(r),t.enter(o),t.consume(y),t.exit(o),h):y===_e.eof||y===_e.space||y===_e.rightParenthesis||$se(y)?n(y):(t.enter(i),t.enter(s),t.enter(a),t.enter(Oe.chunkString,{contentType:xi.contentTypeString}),p(y))}function h(y){return y===_e.greaterThan?(t.enter(o),t.consume(y),t.exit(o),t.exit(r),t.exit(i),e):(t.enter(a),t.enter(Oe.chunkString,{contentType:xi.contentTypeString}),f(y))}function f(y){return y===_e.greaterThan?(t.exit(Oe.chunkString),t.exit(a),h(y)):y===_e.eof||y===_e.lessThan||qi(y)?n(y):(t.consume(y),y===_e.backslash?m:f)}function m(y){return y===_e.lessThan||y===_e.greaterThan||y===_e.backslash?(t.consume(y),f):f(y)}function p(y){return!u&&(y===_e.eof||y===_e.rightParenthesis||gl(y))?(t.exit(Oe.chunkString),t.exit(a),t.exit(s),t.exit(i),e(y)):u<c&&y===_e.leftParenthesis?(t.consume(y),u++,p):y===_e.rightParenthesis?(t.consume(y),u--,p):y===_e.eof||y===_e.space||y===_e.leftParenthesis||$se(y)?n(y):(t.consume(y),y===_e.backslash?g:p)}function g(y){return y===_e.leftParenthesis||y===_e.rightParenthesis||y===_e.backslash?(t.consume(y),p):p(y)}}function lBt(t,e,n,i,r,o){const s=this;let a=0,l;return c;function c(f){return xt(f===_e.leftSquareBracket,"expected `[`"),t.enter(i),t.enter(r),t.consume(f),t.exit(r),t.enter(o),u}function u(f){return a>xi.linkReferenceSizeMax||f===_e.eof||f===_e.leftSquareBracket||f===_e.rightSquareBracket&&!l||f===_e.caret&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(f):f===_e.rightSquareBracket?(t.exit(o),t.enter(r),t.consume(f),t.exit(r),t.exit(i),e):qi(f)?(t.enter(Oe.lineEnding),t.consume(f),t.exit(Oe.lineEnding),u):(t.enter(Oe.chunkString,{contentType:xi.contentTypeString}),d(f))}function d(f){return f===_e.eof||f===_e.leftSquareBracket||f===_e.rightSquareBracket||qi(f)||a++>xi.linkReferenceSizeMax?(t.exit(Oe.chunkString),u(f)):(t.consume(f),l||(l=!Qo(f)),f===_e.backslash?h:d)}function h(f){return f===_e.leftSquareBracket||f===_e.backslash||f===_e.rightSquareBracket?(t.consume(f),a++,d):d(f)}}function cBt(t,e,n,i,r,o){let s;return a;function a(h){return h===_e.quotationMark||h===_e.apostrophe||h===_e.leftParenthesis?(t.enter(i),t.enter(r),t.consume(h),t.exit(r),s=h===_e.leftParenthesis?_e.rightParenthesis:h,l):n(h)}function l(h){return h===s?(t.enter(r),t.consume(h),t.exit(r),t.exit(i),e):(t.enter(o),c(h))}function c(h){return h===s?(t.exit(o),l(s)):h===_e.eof?n(h):qi(h)?(t.enter(Oe.lineEnding),t.consume(h),t.exit(Oe.lineEnding),$s(t,c,Oe.linePrefix)):(t.enter(Oe.chunkString,{contentType:xi.contentTypeString}),u(h))}function u(h){return h===s||h===_e.eof||qi(h)?(t.exit(Oe.chunkString),c(h)):(t.consume(h),h===_e.backslash?d:u)}function d(h){return h===s||h===_e.backslash?(t.consume(h),u):u(h)}}function LB(t,e){let n;return i;function i(r){return qi(r)?(t.enter(Oe.lineEnding),t.consume(r),t.exit(Oe.lineEnding),n=!0,i):Qo(r)?$s(t,i,n?Oe.linePrefix:Oe.lineSuffix)(r):e(r)}}const Tsr={name:"definition",tokenize:Asr},Isr={tokenize:Rsr,partial:!0};function Asr(t,e,n){const i=this;let r;return o;function o(f){return t.enter(Oe.definition),s(f)}function s(f){return xt(f===_e.leftSquareBracket,"expected `[`"),lBt.call(i,t,a,n,Oe.definitionLabel,Oe.definitionLabelMarker,Oe.definitionLabelString)(f)}function a(f){return r=k0(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),f===_e.colon?(t.enter(Oe.definitionMarker),t.consume(f),t.exit(Oe.definitionMarker),l):n(f)}function l(f){return gl(f)?LB(t,c)(f):c(f)}function c(f){return aBt(t,u,n,Oe.definitionDestination,Oe.definitionDestinationLiteral,Oe.definitionDestinationLiteralMarker,Oe.definitionDestinationRaw,Oe.definitionDestinationString)(f)}function u(f){return t.attempt(Isr,d,d)(f)}function d(f){return Qo(f)?$s(t,h,Oe.whitespace)(f):h(f)}function h(f){return f===_e.eof||qi(f)?(t.exit(Oe.definition),i.parser.defined.push(r),e(f)):n(f)}}function Rsr(t,e,n){return i;function i(a){return gl(a)?LB(t,r)(a):n(a)}function r(a){return cBt(t,o,n,Oe.definitionTitle,Oe.definitionTitleMarker,Oe.definitionTitleString)(a)}function o(a){return Qo(a)?$s(t,s,Oe.whitespace)(a):s(a)}function s(a){return a===_e.eof||qi(a)?e(a):n(a)}}const Psr={name:"hardBreakEscape",tokenize:Osr};function Osr(t,e,n){return i;function i(o){return xt(o===_e.backslash,"expected `\\`"),t.enter(Oe.hardBreakEscape),t.consume(o),r}function r(o){return qi(o)?(t.exit(Oe.hardBreakEscape),e(o)):n(o)}}const jsr={name:"headingAtx",tokenize:$sr,resolve:Fsr};function Fsr(t,e){let n=t.length-2,i=3,r,o;return t[i][1].type===Oe.whitespace&&(i+=2),n-2>i&&t[n][1].type===Oe.whitespace&&(n-=2),t[n][1].type===Oe.atxHeadingSequence&&(i===n-1||n-4>i&&t[n-2][1].type===Oe.whitespace)&&(n-=i+1===n?2:4),n>i&&(r={type:Oe.atxHeadingText,start:t[i][1].start,end:t[n][1].end},o={type:Oe.chunkText,start:t[i][1].start,end:t[n][1].end,contentType:xi.contentTypeText},xv(t,i,n-i+1,[["enter",r,e],["enter",o,e],["exit",o,e],["exit",r,e]])),t}function $sr(t,e,n){let i=0;return r;function r(u){return t.enter(Oe.atxHeading),o(u)}function o(u){return xt(u===_e.numberSign,"expected `#`"),t.enter(Oe.atxHeadingSequence),s(u)}function s(u){return u===_e.numberSign&&i++<xi.atxHeadingOpeningFenceSizeMax?(t.consume(u),s):u===_e.eof||gl(u)?(t.exit(Oe.atxHeadingSequence),a(u)):n(u)}function a(u){return u===_e.numberSign?(t.enter(Oe.atxHeadingSequence),l(u)):u===_e.eof||qi(u)?(t.exit(Oe.atxHeading),e(u)):Qo(u)?$s(t,a,Oe.whitespace)(u):(t.enter(Oe.atxHeadingText),c(u))}function l(u){return u===_e.numberSign?(t.consume(u),l):(t.exit(Oe.atxHeadingSequence),a(u))}function c(u){return u===_e.eof||u===_e.numberSign||gl(u)?(t.exit(Oe.atxHeadingText),a(u)):(t.consume(u),c)}}const Vsr=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],egt=["pre","script","style","textarea"],Bsr={name:"htmlFlow",tokenize:Usr,resolveTo:Wsr,concrete:!0},zsr={tokenize:qsr,partial:!0},Hsr={tokenize:Ksr,partial:!0};function Wsr(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type===Oe.htmlFlow););return e>1&&t[e-2][1].type===Oe.linePrefix&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function Usr(t,e,n){const i=this;let r,o,s,a,l;return c;function c(U){return u(U)}function u(U){return xt(U===_e.lessThan,"expected `<`"),t.enter(Oe.htmlFlow),t.enter(Oe.htmlFlowData),t.consume(U),d}function d(U){return U===_e.exclamationMark?(t.consume(U),h):U===_e.slash?(t.consume(U),o=!0,p):U===_e.questionMark?(t.consume(U),r=xi.htmlInstruction,i.interrupt?e:H):fm(U)?(t.consume(U),s=String.fromCharCode(U),g):n(U)}function h(U){return U===_e.dash?(t.consume(U),r=xi.htmlComment,f):U===_e.leftSquareBracket?(t.consume(U),r=xi.htmlCdata,a=0,m):fm(U)?(t.consume(U),r=xi.htmlDeclaration,i.interrupt?e:H):n(U)}function f(U){return U===_e.dash?(t.consume(U),i.interrupt?e:H):n(U)}function m(U){const Y=xi.cdataOpeningString;return U===Y.charCodeAt(a++)?(t.consume(U),a===Y.length?i.interrupt?e:R:m):n(U)}function p(U){return fm(U)?(t.consume(U),s=String.fromCharCode(U),g):n(U)}function g(U){if(U===_e.eof||U===_e.slash||U===_e.greaterThan||gl(U)){const Y=U===_e.slash,J=s.toLowerCase();return!Y&&!o&&egt.includes(J)?(r=xi.htmlRaw,i.interrupt?e(U):R(U)):Vsr.includes(s.toLowerCase())?(r=xi.htmlBasic,Y?(t.consume(U),y):i.interrupt?e(U):R(U)):(r=xi.htmlComplete,i.interrupt&&!i.parser.lazy[i.now().line]?n(U):o?_(U):w(U))}return U===_e.dash||wf(U)?(t.consume(U),s+=String.fromCharCode(U),g):n(U)}function y(U){return U===_e.greaterThan?(t.consume(U),i.interrupt?e:R):n(U)}function _(U){return Qo(U)?(t.consume(U),_):T(U)}function w(U){return U===_e.slash?(t.consume(U),T):U===_e.colon||U===_e.underscore||fm(U)?(t.consume(U),C):Qo(U)?(t.consume(U),w):T(U)}function C(U){return U===_e.dash||U===_e.dot||U===_e.colon||U===_e.underscore||wf(U)?(t.consume(U),C):N(U)}function N(U){return U===_e.equalsTo?(t.consume(U),E):Qo(U)?(t.consume(U),N):w(U)}function E(U){return U===_e.eof||U===_e.lessThan||U===_e.equalsTo||U===_e.greaterThan||U===_e.graveAccent?n(U):U===_e.quotationMark||U===_e.apostrophe?(t.consume(U),l=U,D):Qo(U)?(t.consume(U),E):k(U)}function D(U){return U===l?(t.consume(U),l=null,M):U===_e.eof||qi(U)?n(U):(t.consume(U),D)}function k(U){return U===_e.eof||U===_e.quotationMark||U===_e.apostrophe||U===_e.slash||U===_e.lessThan||U===_e.equalsTo||U===_e.greaterThan||U===_e.graveAccent||gl(U)?N(U):(t.consume(U),k)}function M(U){return U===_e.slash||U===_e.greaterThan||Qo(U)?w(U):n(U)}function T(U){return U===_e.greaterThan?(t.consume(U),A):n(U)}function A(U){return U===_e.eof||qi(U)?R(U):Qo(U)?(t.consume(U),A):n(U)}function R(U){return U===_e.dash&&r===xi.htmlComment?(t.consume(U),F):U===_e.lessThan&&r===xi.htmlRaw?(t.consume(U),$):U===_e.greaterThan&&r===xi.htmlDeclaration?(t.consume(U),K):U===_e.questionMark&&r===xi.htmlInstruction?(t.consume(U),H):U===_e.rightSquareBracket&&r===xi.htmlCdata?(t.consume(U),z):qi(U)&&(r===xi.htmlBasic||r===xi.htmlComplete)?(t.exit(Oe.htmlFlowData),t.check(zsr,q,P)(U)):U===_e.eof||qi(U)?(t.exit(Oe.htmlFlowData),P(U)):(t.consume(U),R)}function P(U){return t.check(Hsr,O,q)(U)}function O(U){return xt(qi(U)),t.enter(Oe.lineEnding),t.consume(U),t.exit(Oe.lineEnding),V}function V(U){return U===_e.eof||qi(U)?P(U):(t.enter(Oe.htmlFlowData),R(U))}function F(U){return U===_e.dash?(t.consume(U),H):R(U)}function $(U){return U===_e.slash?(t.consume(U),s="",B):R(U)}function B(U){if(U===_e.greaterThan){const Y=s.toLowerCase();return egt.includes(Y)?(t.consume(U),K):R(U)}return fm(U)&&s.length<xi.htmlRawSizeMax?(t.consume(U),s+=String.fromCharCode(U),B):R(U)}function z(U){return U===_e.rightSquareBracket?(t.consume(U),H):R(U)}function H(U){return U===_e.greaterThan?(t.consume(U),K):U===_e.dash&&r===xi.htmlComment?(t.consume(U),H):R(U)}function K(U){return U===_e.eof||qi(U)?(t.exit(Oe.htmlFlowData),q(U)):(t.consume(U),K)}function q(U){return t.exit(Oe.htmlFlow),e(U)}}function Ksr(t,e,n){const i=this;return r;function r(s){return qi(s)?(t.enter(Oe.lineEnding),t.consume(s),t.exit(Oe.lineEnding),o):n(s)}function o(s){return i.parser.lazy[i.now().line]?n(s):e(s)}}function qsr(t,e,n){return i;function i(r){return xt(qi(r),"expected a line ending"),t.enter(Oe.lineEnding),t.consume(r),t.exit(Oe.lineEnding),t.attempt(nG,e,n)}}const Gsr={name:"htmlText",tokenize:Ysr};function Ysr(t,e,n){const i=this;let r,o,s;return a;function a(H){return xt(H===_e.lessThan,"expected `<`"),t.enter(Oe.htmlText),t.enter(Oe.htmlTextData),t.consume(H),l}function l(H){return H===_e.exclamationMark?(t.consume(H),c):H===_e.slash?(t.consume(H),N):H===_e.questionMark?(t.consume(H),w):fm(H)?(t.consume(H),k):n(H)}function c(H){return H===_e.dash?(t.consume(H),u):H===_e.leftSquareBracket?(t.consume(H),o=0,m):fm(H)?(t.consume(H),_):n(H)}function u(H){return H===_e.dash?(t.consume(H),f):n(H)}function d(H){return H===_e.eof?n(H):H===_e.dash?(t.consume(H),h):qi(H)?(s=d,$(H)):(t.consume(H),d)}function h(H){return H===_e.dash?(t.consume(H),f):d(H)}function f(H){return H===_e.greaterThan?F(H):H===_e.dash?h(H):d(H)}function m(H){const K=xi.cdataOpeningString;return H===K.charCodeAt(o++)?(t.consume(H),o===K.length?p:m):n(H)}function p(H){return H===_e.eof?n(H):H===_e.rightSquareBracket?(t.consume(H),g):qi(H)?(s=p,$(H)):(t.consume(H),p)}function g(H){return H===_e.rightSquareBracket?(t.consume(H),y):p(H)}function y(H){return H===_e.greaterThan?F(H):H===_e.rightSquareBracket?(t.consume(H),y):p(H)}function _(H){return H===_e.eof||H===_e.greaterThan?F(H):qi(H)?(s=_,$(H)):(t.consume(H),_)}function w(H){return H===_e.eof?n(H):H===_e.questionMark?(t.consume(H),C):qi(H)?(s=w,$(H)):(t.consume(H),w)}function C(H){return H===_e.greaterThan?F(H):w(H)}function N(H){return fm(H)?(t.consume(H),E):n(H)}function E(H){return H===_e.dash||wf(H)?(t.consume(H),E):D(H)}function D(H){return qi(H)?(s=D,$(H)):Qo(H)?(t.consume(H),D):F(H)}function k(H){return H===_e.dash||wf(H)?(t.consume(H),k):H===_e.slash||H===_e.greaterThan||gl(H)?M(H):n(H)}function M(H){return H===_e.slash?(t.consume(H),F):H===_e.colon||H===_e.underscore||fm(H)?(t.consume(H),T):qi(H)?(s=M,$(H)):Qo(H)?(t.consume(H),M):F(H)}function T(H){return H===_e.dash||H===_e.dot||H===_e.colon||H===_e.underscore||wf(H)?(t.consume(H),T):A(H)}function A(H){return H===_e.equalsTo?(t.consume(H),R):qi(H)?(s=A,$(H)):Qo(H)?(t.consume(H),A):M(H)}function R(H){return H===_e.eof||H===_e.lessThan||H===_e.equalsTo||H===_e.greaterThan||H===_e.graveAccent?n(H):H===_e.quotationMark||H===_e.apostrophe?(t.consume(H),r=H,P):qi(H)?(s=R,$(H)):Qo(H)?(t.consume(H),R):(t.consume(H),O)}function P(H){return H===r?(t.consume(H),r=void 0,V):H===_e.eof?n(H):qi(H)?(s=P,$(H)):(t.consume(H),P)}function O(H){return H===_e.eof||H===_e.quotationMark||H===_e.apostrophe||H===_e.lessThan||H===_e.equalsTo||H===_e.graveAccent?n(H):H===_e.slash||H===_e.greaterThan||gl(H)?M(H):(t.consume(H),O)}function V(H){return H===_e.slash||H===_e.greaterThan||gl(H)?M(H):n(H)}function F(H){return H===_e.greaterThan?(t.consume(H),t.exit(Oe.htmlTextData),t.exit(Oe.htmlText),e):n(H)}function $(H){return xt(s,"expected return state"),xt(qi(H),"expected eol"),t.exit(Oe.htmlTextData),t.enter(Oe.lineEnding),t.consume(H),t.exit(Oe.lineEnding),B}function B(H){return xt(i.parser.constructs.disable.null,"expected `disable.null` to be populated"),Qo(H)?$s(t,z,Oe.linePrefix,i.parser.constructs.disable.null.includes("codeIndented")?void 0:xi.tabSize)(H):z(H)}function z(H){return t.enter(Oe.htmlTextData),s(H)}}const ZBe={name:"labelEnd",tokenize:tar,resolveTo:ear,resolveAll:Jsr},Xsr={tokenize:nar},Zsr={tokenize:iar},Qsr={tokenize:rar};function Jsr(t){let e=-1;for(;++e<t.length;){const n=t[e][1];(n.type===Oe.labelImage||n.type===Oe.labelLink||n.type===Oe.labelEnd)&&(t.splice(e+1,n.type===Oe.labelImage?4:2),n.type=Oe.data,e++)}return t}function ear(t,e){let n=t.length,i=0,r,o,s,a;for(;n--;)if(r=t[n][1],o){if(r.type===Oe.link||r.type===Oe.labelLink&&r._inactive)break;t[n][0]==="enter"&&r.type===Oe.labelLink&&(r._inactive=!0)}else if(s){if(t[n][0]==="enter"&&(r.type===Oe.labelImage||r.type===Oe.labelLink)&&!r._balanced&&(o=n,r.type!==Oe.labelLink)){i=2;break}}else r.type===Oe.labelEnd&&(s=n);xt(o!==void 0,"`open` is supposed to be found"),xt(s!==void 0,"`close` is supposed to be found");const l={type:t[o][1].type===Oe.labelLink?Oe.link:Oe.image,start:Object.assign({},t[o][1].start),end:Object.assign({},t[t.length-1][1].end)},c={type:Oe.label,start:Object.assign({},t[o][1].start),end:Object.assign({},t[s][1].end)},u={type:Oe.labelText,start:Object.assign({},t[o+i+2][1].end),end:Object.assign({},t[s-2][1].start)};return a=[["enter",l,e],["enter",c,e]],a=iv(a,t.slice(o+1,o+i+3)),a=iv(a,[["enter",u,e]]),xt(e.parser.constructs.insideSpan.null,"expected `insideSpan.null` to be populated"),a=iv(a,Epe(e.parser.constructs.insideSpan.null,t.slice(o+i+4,s-3),e)),a=iv(a,[["exit",u,e],t[s-2],t[s-1],["exit",c,e]]),a=iv(a,t.slice(s+1)),a=iv(a,[["exit",l,e]]),xv(t,o,t.length,a),t}function tar(t,e,n){const i=this;let r=i.events.length,o,s;for(;r--;)if((i.events[r][1].type===Oe.labelImage||i.events[r][1].type===Oe.labelLink)&&!i.events[r][1]._balanced){o=i.events[r][1];break}return a;function a(h){return xt(h===_e.rightSquareBracket,"expected `]`"),o?o._inactive?d(h):(s=i.parser.defined.includes(k0(i.sliceSerialize({start:o.end,end:i.now()}))),t.enter(Oe.labelEnd),t.enter(Oe.labelMarker),t.consume(h),t.exit(Oe.labelMarker),t.exit(Oe.labelEnd),l):n(h)}function l(h){return h===_e.leftParenthesis?t.attempt(Xsr,u,s?u:d)(h):h===_e.leftSquareBracket?t.attempt(Zsr,u,s?c:d)(h):s?u(h):d(h)}function c(h){return t.attempt(Qsr,u,d)(h)}function u(h){return e(h)}function d(h){return o._balanced=!0,n(h)}}function nar(t,e,n){return i;function i(d){return xt(d===_e.leftParenthesis,"expected left paren"),t.enter(Oe.resource),t.enter(Oe.resourceMarker),t.consume(d),t.exit(Oe.resourceMarker),r}function r(d){return gl(d)?LB(t,o)(d):o(d)}function o(d){return d===_e.rightParenthesis?u(d):aBt(t,s,a,Oe.resourceDestination,Oe.resourceDestinationLiteral,Oe.resourceDestinationLiteralMarker,Oe.resourceDestinationRaw,Oe.resourceDestinationString,xi.linkResourceDestinationBalanceMax)(d)}function s(d){return gl(d)?LB(t,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===_e.quotationMark||d===_e.apostrophe||d===_e.leftParenthesis?cBt(t,c,n,Oe.resourceTitle,Oe.resourceTitleMarker,Oe.resourceTitleString)(d):u(d)}function c(d){return gl(d)?LB(t,u)(d):u(d)}function u(d){return d===_e.rightParenthesis?(t.enter(Oe.resourceMarker),t.consume(d),t.exit(Oe.resourceMarker),t.exit(Oe.resource),e):n(d)}}function iar(t,e,n){const i=this;return r;function r(a){return xt(a===_e.leftSquareBracket,"expected left bracket"),lBt.call(i,t,o,s,Oe.reference,Oe.referenceMarker,Oe.referenceString)(a)}function o(a){return i.parser.defined.includes(k0(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function s(a){return n(a)}}function rar(t,e,n){return i;function i(o){return xt(o===_e.leftSquareBracket,"expected left bracket"),t.enter(Oe.reference),t.enter(Oe.referenceMarker),t.consume(o),t.exit(Oe.referenceMarker),r}function r(o){return o===_e.rightSquareBracket?(t.enter(Oe.referenceMarker),t.consume(o),t.exit(Oe.referenceMarker),t.exit(Oe.reference),e):n(o)}}const oar={name:"labelStartImage",tokenize:sar,resolveAll:ZBe.resolveAll};function sar(t,e,n){const i=this;return r;function r(a){return xt(a===_e.exclamationMark,"expected `!`"),t.enter(Oe.labelImage),t.enter(Oe.labelImageMarker),t.consume(a),t.exit(Oe.labelImageMarker),o}function o(a){return a===_e.leftSquareBracket?(t.enter(Oe.labelMarker),t.consume(a),t.exit(Oe.labelMarker),t.exit(Oe.labelImage),s):n(a)}function s(a){return a===_e.caret&&"_hiddenFootnoteSupport"in i.parser.constructs?n(a):e(a)}}const aar={name:"labelStartLink",tokenize:lar,resolveAll:ZBe.resolveAll};function lar(t,e,n){const i=this;return r;function r(s){return xt(s===_e.leftSquareBracket,"expected `[`"),t.enter(Oe.labelLink),t.enter(Oe.labelMarker),t.consume(s),t.exit(Oe.labelMarker),t.exit(Oe.labelLink),o}function o(s){return s===_e.caret&&"_hiddenFootnoteSupport"in i.parser.constructs?n(s):e(s)}}const VCe={name:"lineEnding",tokenize:car};function car(t,e){return n;function n(i){return xt(qi(i),"expected eol"),t.enter(Oe.lineEnding),t.consume(i),t.exit(Oe.lineEnding),$s(t,e,Oe.linePrefix)}}const Tte={name:"thematicBreak",tokenize:uar};function uar(t,e,n){let i=0,r;return o;function o(c){return t.enter(Oe.thematicBreak),s(c)}function s(c){return xt(c===_e.asterisk||c===_e.dash||c===_e.underscore,"expected `*`, `-`, or `_`"),r=c,a(c)}function a(c){return c===r?(t.enter(Oe.thematicBreakSequence),l(c)):i>=xi.thematicBreakMarkerCountMin&&(c===_e.eof||qi(c))?(t.exit(Oe.thematicBreak),e(c)):n(c)}function l(c){return c===r?(t.consume(c),i++,l):(t.exit(Oe.thematicBreakSequence),Qo(c)?$s(t,a,Oe.whitespace)(c):a(c))}}const tp={name:"list",tokenize:far,continuation:{tokenize:mar},exit:gar},dar={tokenize:bar,partial:!0},har={tokenize:par,partial:!0};function far(t,e,n){const i=this,r=i.events[i.events.length-1];let o=r&&r[1].type===Oe.linePrefix?r[2].sliceSerialize(r[1],!0).length:0,s=0;return a;function a(f){xt(i.containerState,"expected state");const m=i.containerState.type||(f===_e.asterisk||f===_e.plusSign||f===_e.dash?Oe.listUnordered:Oe.listOrdered);if(m===Oe.listUnordered?!i.containerState.marker||f===i.containerState.marker:HRe(f)){if(i.containerState.type||(i.containerState.type=m,t.enter(m,{_container:!0})),m===Oe.listUnordered)return t.enter(Oe.listItemPrefix),f===_e.asterisk||f===_e.dash?t.check(Tte,n,c)(f):c(f);if(!i.interrupt||f===_e.digit1)return t.enter(Oe.listItemPrefix),t.enter(Oe.listItemValue),l(f)}return n(f)}function l(f){return xt(i.containerState,"expected state"),HRe(f)&&++s<xi.listItemValueSizeMax?(t.consume(f),l):(!i.interrupt||s<2)&&(i.containerState.marker?f===i.containerState.marker:f===_e.rightParenthesis||f===_e.dot)?(t.exit(Oe.listItemValue),c(f)):n(f)}function c(f){return xt(i.containerState,"expected state"),xt(f!==_e.eof,"eof (`null`) is not a marker"),t.enter(Oe.listItemMarker),t.consume(f),t.exit(Oe.listItemMarker),i.containerState.marker=i.containerState.marker||f,t.check(nG,i.interrupt?n:u,t.attempt(dar,h,d))}function u(f){return xt(i.containerState,"expected state"),i.containerState.initialBlankLine=!0,o++,h(f)}function d(f){return Qo(f)?(t.enter(Oe.listItemPrefixWhitespace),t.consume(f),t.exit(Oe.listItemPrefixWhitespace),h):n(f)}function h(f){return xt(i.containerState,"expected state"),i.containerState.size=o+i.sliceSerialize(t.exit(Oe.listItemPrefix),!0).length,e(f)}}function mar(t,e,n){const i=this;return xt(i.containerState,"expected state"),i.containerState._closeFlow=void 0,t.check(nG,r,o);function r(a){return xt(i.containerState,"expected state"),xt(typeof i.containerState.size=="number","expected size"),i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,$s(t,e,Oe.listItemIndent,i.containerState.size+1)(a)}function o(a){return xt(i.containerState,"expected state"),i.containerState.furtherBlankLines||!Qo(a)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,s(a)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(har,e,s)(a))}function s(a){return xt(i.containerState,"expected state"),i.containerState._closeFlow=!0,i.interrupt=void 0,xt(i.parser.constructs.disable.null,"expected `disable.null` to be populated"),$s(t,t.attempt(tp,e,n),Oe.linePrefix,i.parser.constructs.disable.null.includes("codeIndented")?void 0:xi.tabSize)(a)}}function par(t,e,n){const i=this;return xt(i.containerState,"expected state"),xt(typeof i.containerState.size=="number","expected size"),$s(t,r,Oe.listItemIndent,i.containerState.size+1);function r(o){xt(i.containerState,"expected state");const s=i.events[i.events.length-1];return s&&s[1].type===Oe.listItemIndent&&s[2].sliceSerialize(s[1],!0).length===i.containerState.size?e(o):n(o)}}function gar(t){xt(this.containerState,"expected state"),xt(typeof this.containerState.type=="string","expected type"),t.exit(this.containerState.type)}function bar(t,e,n){const i=this;return xt(i.parser.constructs.disable.null,"expected `disable.null` to be populated"),$s(t,r,Oe.listItemPrefixWhitespace,i.parser.constructs.disable.null.includes("codeIndented")?void 0:xi.tabSize+1);function r(o){const s=i.events[i.events.length-1];return!Qo(o)&&s&&s[1].type===Oe.listItemPrefixWhitespace?e(o):n(o)}}const tgt={name:"setextUnderline",tokenize:_ar,resolveTo:yar};function yar(t,e){let n=t.length,i,r,o;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type===Oe.content){i=n;break}t[n][1].type===Oe.paragraph&&(r=n)}else t[n][1].type===Oe.content&&t.splice(n,1),!o&&t[n][1].type===Oe.definition&&(o=n);xt(r!==void 0,"expected a `text` index to be found"),xt(i!==void 0,"expected a `text` index to be found");const s={type:Oe.setextHeading,start:Object.assign({},t[r][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[r][1].type=Oe.setextHeadingText,o?(t.splice(r,0,["enter",s,e]),t.splice(o+1,0,["exit",t[i][1],e]),t[i][1].end=Object.assign({},t[o][1].end)):t[i][1]=s,t.push(["exit",s,e]),t}function _ar(t,e,n){const i=this;let r;return o;function o(c){let u=i.events.length,d;for(xt(c===_e.dash||c===_e.equalsTo,"expected `=` or `-`");u--;)if(i.events[u][1].type!==Oe.lineEnding&&i.events[u][1].type!==Oe.linePrefix&&i.events[u][1].type!==Oe.content){d=i.events[u][1].type===Oe.paragraph;break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(t.enter(Oe.setextHeadingLine),r=c,s(c)):n(c)}function s(c){return t.enter(Oe.setextHeadingLineSequence),a(c)}function a(c){return c===r?(t.consume(c),a):(t.exit(Oe.setextHeadingLineSequence),Qo(c)?$s(t,l,Oe.lineSuffix)(c):l(c))}function l(c){return c===_e.eof||qi(c)?(t.exit(Oe.setextHeadingLine),e(c)):n(c)}}const xar={tokenize:war};function war(t){const e=this,n=t.attempt(nG,i,t.attempt(this.parser.constructs.flowInitial,r,$s(t,t.attempt(this.parser.constructs.flow,r,t.attempt(Esr,r)),Oe.linePrefix)));return n;function i(o){if(xt(o===_e.eof||qi(o),"expected eol or eof"),o===_e.eof){t.consume(o);return}return t.enter(Oe.lineEndingBlank),t.consume(o),t.exit(Oe.lineEndingBlank),e.currentConstruct=void 0,n}function r(o){if(xt(o===_e.eof||qi(o),"expected eol or eof"),o===_e.eof){t.consume(o);return}return t.enter(Oe.lineEnding),t.consume(o),t.exit(Oe.lineEnding),e.currentConstruct=void 0,n}}const Car={resolveAll:dBt()},Sar=uBt("string"),Nar=uBt("text");function uBt(t){return{tokenize:e,resolveAll:dBt(t==="text"?Ear:void 0)};function e(n){const i=this,r=this.parser.constructs[t],o=n.attempt(r,s,a);return s;function s(u){return c(u)?o(u):a(u)}function a(u){if(u===_e.eof){n.consume(u);return}return n.enter(Oe.data),n.consume(u),l}function l(u){return c(u)?(n.exit(Oe.data),o(u)):(n.consume(u),l)}function c(u){if(u===_e.eof)return!0;const d=r[u];let h=-1;if(d)for(xt(Array.isArray(d),"expected `disable.null` to be populated");++h<d.length;){const f=d[h];if(!f.previous||f.previous.call(i,i.previous))return!0}return!1}}}function dBt(t){return e;function e(n,i){let r=-1,o;for(;++r<=n.length;)o===void 0?n[r]&&n[r][1].type===Oe.data&&(o=r,r++):(!n[r]||n[r][1].type!==Oe.data)&&(r!==o+2&&(n[o][1].end=n[r-1][1].end,n.splice(o+2,r-o-2),r=o+2),o=void 0);return t?t(n,i):n}}function Ear(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type===Oe.lineEnding)&&t[n-1][1].type===Oe.data){const i=t[n-1][1],r=e.sliceStream(i);let o=r.length,s=-1,a=0,l;for(;o--;){const c=r[o];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===_e.space;)a++,s--;if(s)break;s=-1}else if(c===_e.horizontalTab)l=!0,a++;else if(c!==_e.virtualSpace){o++;break}}if(a){const c={type:n===t.length||l||a<xi.hardBreakPrefixSizeMin?Oe.lineSuffix:Oe.hardBreakTrailing,start:{line:i.end.line,column:i.end.column-a,offset:i.end.offset-a,_index:i.start._index+o,_bufferIndex:o?s:i.start._bufferIndex+s},end:Object.assign({},i.end)};i.end=Object.assign({},c.start),i.start.offset===i.end.offset?Object.assign(i,c):(t.splice(n,0,["enter",c,e],["exit",c,e]),n+=2)}n++}return t}var URe={exports:{}},BCe,ngt;function Dar(){if(ngt)return BCe;ngt=1;var t=1e3,e=t*60,n=e*60,i=n*24,r=i*7,o=i*365.25;BCe=function(u,d){d=d||{};var h=typeof u;if(h==="string"&&u.length>0)return s(u);if(h==="number"&&isFinite(u))return d.long?l(u):a(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function s(u){if(u=String(u),!(u.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(d){var h=parseFloat(d[1]),f=(d[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return h*o;case"weeks":case"week":case"w":return h*r;case"days":case"day":case"d":return h*i;case"hours":case"hour":case"hrs":case"hr":case"h":return h*n;case"minutes":case"minute":case"mins":case"min":case"m":return h*e;case"seconds":case"second":case"secs":case"sec":case"s":return h*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}}}function a(u){var d=Math.abs(u);return d>=i?Math.round(u/i)+"d":d>=n?Math.round(u/n)+"h":d>=e?Math.round(u/e)+"m":d>=t?Math.round(u/t)+"s":u+"ms"}function l(u){var d=Math.abs(u);return d>=i?c(u,d,i,"day"):d>=n?c(u,d,n,"hour"):d>=e?c(u,d,e,"minute"):d>=t?c(u,d,t,"second"):u+" ms"}function c(u,d,h,f){var m=d>=h*1.5;return Math.round(u/h)+" "+f+(m?"s":"")}return BCe}function kar(t){n.debug=n,n.default=n,n.coerce=l,n.disable=o,n.enable=r,n.enabled=s,n.humanize=Dar(),n.destroy=c,Object.keys(t).forEach(u=>{n[u]=t[u]}),n.names=[],n.skips=[],n.formatters={};function e(u){let d=0;for(let h=0;h<u.length;h++)d=(d<<5)-d+u.charCodeAt(h),d|=0;return n.colors[Math.abs(d)%n.colors.length]}n.selectColor=e;function n(u){let d,h=null,f,m;function p(...g){if(!p.enabled)return;const y=p,_=Number(new Date),w=_-(d||_);y.diff=w,y.prev=d,y.curr=_,d=_,g[0]=n.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let C=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(E,D)=>{if(E==="%%")return"%";C++;const k=n.formatters[D];if(typeof k=="function"){const M=g[C];E=k.call(y,M),g.splice(C,1),C--}return E}),n.formatArgs.call(y,g),(y.log||n.log).apply(y,g)}return p.namespace=u,p.useColors=n.useColors(),p.color=n.selectColor(u),p.extend=i,p.destroy=n.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(f!==n.namespaces&&(f=n.namespaces,m=n.enabled(u)),m),set:g=>{h=g}}),typeof n.init=="function"&&n.init(p),p}function i(u,d){const h=n(this.namespace+(typeof d>"u"?":":d)+u);return h.log=this.log,h}function r(u){n.save(u),n.namespaces=u,n.names=[],n.skips=[];let d;const h=(typeof u=="string"?u:"").split(/[\s,]+/),f=h.length;for(d=0;d<f;d++)h[d]&&(u=h[d].replace(/\*/g,".*?"),u[0]==="-"?n.skips.push(new RegExp("^"+u.slice(1)+"$")):n.names.push(new RegExp("^"+u+"$")))}function o(){const u=[...n.names.map(a),...n.skips.map(a).map(d=>"-"+d)].join(",");return n.enable(""),u}function s(u){if(u[u.length-1]==="*")return!0;let d,h;for(d=0,h=n.skips.length;d<h;d++)if(n.skips[d].test(u))return!1;for(d=0,h=n.names.length;d<h;d++)if(n.names[d].test(u))return!0;return!1}function a(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function l(u){return u instanceof Error?u.stack||u.message:u}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}var Mar=kar;(function(t,e){var n={};e.formatArgs=r,e.save=o,e.load=s,e.useColors=i,e.storage=a(),e.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function i(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let c;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const u="color: "+this.color;c.splice(1,0,u,"color: inherit");let d=0,h=0;c[0].replace(/%[a-zA-Z%]/g,f=>{f!=="%%"&&(d++,f==="%c"&&(h=d))}),c.splice(h,0,u)}e.log=console.debug||console.log||(()=>{});function o(c){try{c?e.storage.setItem("debug",c):e.storage.removeItem("debug")}catch{}}function s(){let c;try{c=e.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=n.DEBUG),c}function a(){try{return localStorage}catch{}}t.exports=Mar(e);const{formatters:l}=t.exports;l.j=function(c){try{return JSON.stringify(c)}catch(u){return"[UnexpectedJSONParseError]: "+u.message}}})(URe,URe.exports);var Lar=URe.exports;const Tar=ao(Lar),xL=Tar("micromark");function Iar(t,e,n){let i=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const r={},o=[];let s=[],a=[],l=!0;const c={consume:C,enter:N,exit:E,attempt:M(D),check:M(k),interrupt:M(k,{interrupt:!0})},u={previous:_e.eof,code:_e.eof,containerState:{},events:[],parser:t,sliceStream:p,sliceSerialize:m,now:g,defineSkip:y,write:f};let d=e.tokenize.call(u,c),h;return e.resolveAll&&o.push(e),u;function f(P){return s=iv(s,P),_(),s[s.length-1]!==_e.eof?[]:(T(e,0),u.events=Epe(o,u.events,u),u.events)}function m(P,O){return Rar(p(P),O)}function p(P){return Aar(s,P)}function g(){const{line:P,column:O,offset:V,_index:F,_bufferIndex:$}=i;return{line:P,column:O,offset:V,_index:F,_bufferIndex:$}}function y(P){r[P.line]=P.column,R(),xL("position: define skip: `%j`",i)}function _(){let P;for(;i._index<s.length;){const O=s[i._index];if(typeof O=="string")for(P=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===P&&i._bufferIndex<O.length;)w(O.charCodeAt(i._bufferIndex));else w(O)}}function w(P){xt(l===!0,"expected character to be consumed"),l=void 0,xL("main: passing `%s` to %s",P,d&&d.name),h=P,xt(typeof d=="function","expected state"),d=d(P)}function C(P){xt(P===h,"expected given code to equal expected code"),xL("consume: `%s`",P),xt(l===void 0,"expected code to not have been consumed: this might be because `return x(code)` instead of `return x` was used"),xt(P===null?u.events.length===0||u.events[u.events.length-1][0]==="exit":u.events[u.events.length-1][0]==="enter","expected last token to be open"),qi(P)?(i.line++,i.column=1,i.offset+=P===_e.carriageReturnLineFeed?2:1,R(),xL("position: after eol: `%j`",i)):P!==_e.virtualSpace&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===s[i._index].length&&(i._bufferIndex=-1,i._index++)),u.previous=P,l=!0}function N(P,O){const V=O||{};return V.type=P,V.start=g(),xt(typeof P=="string","expected string type"),xt(P.length>0,"expected non-empty string"),xL("enter: `%s`",P),u.events.push(["enter",V,u]),a.push(V),V}function E(P){xt(typeof P=="string","expected string type"),xt(P.length>0,"expected non-empty string");const O=a.pop();return xt(O,"cannot close w/o open tokens"),O.end=g(),xt(P===O.type,"expected exit token to match current token"),xt(!(O.start._index===O.end._index&&O.start._bufferIndex===O.end._bufferIndex),"expected non-empty token (`"+P+"`)"),xL("exit: `%s`",O.type),u.events.push(["exit",O,u]),O}function D(P,O){T(P,O.from)}function k(P,O){O.restore()}function M(P,O){return V;function V(F,$,B){let z,H,K,q;return Array.isArray(F)?Y(F):"tokenize"in F?Y([F]):U(F);function U(oe){return fe;function fe(de){const ie=de!==null&&oe[de],Q=de!==null&&oe.null,be=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(Q)?Q:Q?[Q]:[]];return Y(be)(de)}}function Y(oe){return z=oe,H=0,oe.length===0?(xt(B,"expected `bogusState` to be given"),B):J(oe[H])}function J(oe){return fe;function fe(de){return q=A(),K=oe,oe.partial||(u.currentConstruct=oe),xt(u.parser.constructs.disable.null,"expected `disable.null` to be populated"),oe.name&&u.parser.constructs.disable.null.includes(oe.name)?se(de):oe.tokenize.call(O?Object.assign(Object.create(u),O):u,c,ae,se)(de)}}function ae(oe){return xt(oe===h,"expected code"),l=!0,P(K,q),$}function se(oe){return xt(oe===h,"expected code"),l=!0,q.restore(),++H<z.length?J(z[H]):B}}}function T(P,O){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&xv(u.events,O,u.events.length-O,P.resolve(u.events.slice(O),u)),P.resolveTo&&(u.events=P.resolveTo(u.events,u)),xt(P.partial||u.events.length===0||u.events[u.events.length-1][0]==="exit","expected last token to end")}function A(){const P=g(),O=u.previous,V=u.currentConstruct,F=u.events.length,$=Array.from(a);return{restore:B,from:F};function B(){i=P,u.previous=O,u.currentConstruct=V,u.events.length=F,a=$,R(),xL("position: restore: `%j`",i)}}function R(){i.line in r&&i.column<2&&(i.column=r[i.line],i.offset+=r[i.line]-1)}}function Aar(t,e){const n=e.start._index,i=e.start._bufferIndex,r=e.end._index,o=e.end._bufferIndex;let s;if(n===r)xt(o>-1,"expected non-negative end buffer index"),xt(i>-1,"expected non-negative start buffer index"),s=[t[n].slice(i,o)];else{if(s=t.slice(n,r),i>-1){const a=s[0];typeof a=="string"?s[0]=a.slice(i):(xt(i===0,"expected `startBufferIndex` to be `0`"),s.shift())}o>0&&s.push(t[r].slice(0,o))}return s}function Rar(t,e){let n=-1;const i=[];let r;for(;++n<t.length;){const o=t[n];let s;if(typeof o=="string")s=o;else switch(o){case _e.carriageReturn:{s=fx.cr;break}case _e.lineFeed:{s=fx.lf;break}case _e.carriageReturnLineFeed:{s=fx.cr+fx.lf;break}case _e.horizontalTab:{s=e?fx.space:fx.ht;break}case _e.virtualSpace:{if(!e&&r)continue;s=fx.space;break}default:xt(typeof o=="number","expected number"),s=String.fromCharCode(o)}r=o===_e.horizontalTab,i.push(s)}return i.join("")}const Par={[_e.asterisk]:tp,[_e.plusSign]:tp,[_e.dash]:tp,[_e.digit0]:tp,[_e.digit1]:tp,[_e.digit2]:tp,[_e.digit3]:tp,[_e.digit4]:tp,[_e.digit5]:tp,[_e.digit6]:tp,[_e.digit7]:tp,[_e.digit8]:tp,[_e.digit9]:tp,[_e.greaterThan]:nBt},Oar={[_e.leftSquareBracket]:Tsr},jar={[_e.horizontalTab]:$Ce,[_e.virtualSpace]:$Ce,[_e.space]:$Ce},Far={[_e.numberSign]:jsr,[_e.asterisk]:Tte,[_e.dash]:[tgt,Tte],[_e.lessThan]:Bsr,[_e.equalsTo]:tgt,[_e.underscore]:Tte,[_e.graveAccent]:Jpt,[_e.tilde]:Jpt},$ar={[_e.ampersand]:rBt,[_e.backslash]:iBt},Var={[_e.carriageReturn]:VCe,[_e.lineFeed]:VCe,[_e.carriageReturnLineFeed]:VCe,[_e.exclamationMark]:oar,[_e.ampersand]:rBt,[_e.asterisk]:WRe,[_e.lessThan]:[lsr,Gsr],[_e.leftSquareBracket]:aar,[_e.backslash]:[Psr,iBt],[_e.rightSquareBracket]:ZBe,[_e.underscore]:WRe,[_e.graveAccent]:xsr},Bar={null:[WRe,Car]},zar={null:[_e.asterisk,_e.underscore]},Har={null:[]},War=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:zar,contentInitial:Oar,disable:Har,document:Par,flow:Far,flowInitial:jar,insideSpan:Bar,string:$ar,text:Var},Symbol.toStringTag,{value:"Module"}));function Uar(t){const n=eBt([War,...(t||{}).extensions||[]]),i={defined:[],lazy:{},constructs:n,content:r(tsr),document:r(isr),flow:r(xar),string:r(Sar),text:r(Nar)};return i;function r(o){return s;function s(a){return Iar(i,o,a)}}}function Kar(t){for(;!sBt(t););return t}const igt=/[\0\t\n\r]/g;function qar(){let t=1,e="",n=!0,i;return r;function r(o,s,a){const l=[];let c,u,d,h,f;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),d=0,e="",n&&(o.charCodeAt(0)===_e.byteOrderMarker&&d++,n=void 0);d<o.length;){if(igt.lastIndex=d,c=igt.exec(o),h=c&&c.index!==void 0?c.index:o.length,f=o.charCodeAt(h),!c){e=o.slice(d);break}if(f===_e.lf&&d===h&&i)l.push(_e.carriageReturnLineFeed),i=void 0;else switch(i&&(l.push(_e.carriageReturn),i=void 0),d<h&&(l.push(o.slice(d,h)),t+=h-d),f){case _e.nul:{l.push(_e.replacementCharacter),t++;break}case _e.ht:{for(u=Math.ceil(t/xi.tabSize)*xi.tabSize,l.push(_e.horizontalTab);t++<u;)l.push(_e.virtualSpace);break}case _e.lf:{l.push(_e.lineFeed),t=1;break}default:i=!0,t=1}d=h+1}return a&&(i&&l.push(_e.carriageReturn),e&&l.push(e),l.push(_e.eof)),l}}const Gar=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Yar(t){return t.replace(Gar,Xar)}function Xar(t,e,n){if(e)return e;if(n.charCodeAt(0)===_e.numberSign){const r=n.charCodeAt(1),o=r===_e.lowercaseX||r===_e.uppercaseX;return tBt(n.slice(o?2:1),o?xi.numericBaseHexadecimal:xi.numericBaseDecimal)}return XBe(n)||t}const hBt={}.hasOwnProperty;function Zar(t,e,n){return typeof e!="string"&&(n=e,e=void 0),Qar(n)(Kar(Uar(n).document().write(qar()(t,e,!0))))}function Qar(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Pe),autolinkProtocol:M,autolinkEmail:M,atxHeading:o(Ne),blockQuote:o(de),characterEscape:M,characterReference:M,codeFenced:o(ie),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(ie,s),codeText:o(Q,s),codeTextData:M,data:M,codeFlowValue:M,definition:o(be),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(le),hardBreakEscape:o(Le),hardBreakTrailing:o(Le),htmlFlow:o(Te,s),htmlFlowData:M,htmlText:o(Te,s),htmlTextData:M,image:o(De),label:s,link:o(Pe),listItem:o(he),listItemValue:h,listOrdered:o(ge,d),listUnordered:o(ge),paragraph:o(me),reference:U,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Ne),strong:o(X),thematicBreak:o(we)},exit:{atxHeading:l(),atxHeadingSequence:N,autolink:l(),autolinkEmail:fe,autolinkProtocol:oe,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:ae,characterReference:se,codeFenced:l(g),codeFencedFence:p,codeFencedFenceInfo:f,codeFencedFenceMeta:m,codeFlowValue:T,codeIndented:l(y),codeText:l(V),codeTextData:T,data:T,definition:l(),definitionDestinationString:C,definitionLabelString:_,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(R),hardBreakTrailing:l(R),htmlFlow:l(P),htmlFlowData:T,htmlText:l(O),htmlTextData:T,image:l($),label:z,labelText:B,lineEnding:A,link:l(F),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Y,resourceDestinationString:H,resourceTitleString:K,resource:q,setextHeading:l(k),setextHeadingLineSequence:D,setextHeadingText:E,strong:l(),thematicBreak:l()}};fBt(e,(t||{}).mdastExtensions||[]);const n={};return i;function i(ue){let Ce={type:"root",children:[]};const ze={stack:[Ce],tokenStack:[],config:e,enter:a,exit:c,buffer:s,resume:u,data:n},Ye=[];let Ke=-1;for(;++Ke<ue.length;)if(ue[Ke][1].type===Oe.listOrdered||ue[Ke][1].type===Oe.listUnordered)if(ue[Ke][0]==="enter")Ye.push(Ke);else{const Xe=Ye.pop();xt(typeof Xe=="number","expected list ot be open"),Ke=r(ue,Xe,Ke)}for(Ke=-1;++Ke<ue.length;){const Xe=e[ue[Ke][0]];hBt.call(Xe,ue[Ke][1].type)&&Xe[ue[Ke][1].type].call(Object.assign({sliceSerialize:ue[Ke][2].sliceSerialize},ze),ue[Ke][1])}if(ze.tokenStack.length>0){const Xe=ze.tokenStack[ze.tokenStack.length-1];(Xe[1]||rgt).call(ze,void 0,Xe[0])}for(Ce.position={start:$N(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:$N(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},Ke=-1;++Ke<e.transforms.length;)Ce=e.transforms[Ke](Ce)||Ce;return Ce}function r(ue,Ce,ze){let Ye=Ce-1,Ke=-1,Xe=!1,it,ut,Ge,Ee;for(;++Ye<=ze;){const Se=ue[Ye];switch(Se[1].type){case Oe.listUnordered:case Oe.listOrdered:case Oe.blockQuote:{Se[0]==="enter"?Ke++:Ke--,Ee=void 0;break}case Oe.lineEndingBlank:{Se[0]==="enter"&&(it&&!Ee&&!Ke&&!Ge&&(Ge=Ye),Ee=void 0);break}case Oe.linePrefix:case Oe.listItemValue:case Oe.listItemMarker:case Oe.listItemPrefix:case Oe.listItemPrefixWhitespace:break;default:Ee=void 0}if(!Ke&&Se[0]==="enter"&&Se[1].type===Oe.listItemPrefix||Ke===-1&&Se[0]==="exit"&&(Se[1].type===Oe.listUnordered||Se[1].type===Oe.listOrdered)){if(it){let je=Ye;for(ut=void 0;je--;){const nt=ue[je];if(nt[1].type===Oe.lineEnding||nt[1].type===Oe.lineEndingBlank){if(nt[0]==="exit")continue;ut&&(ue[ut][1].type=Oe.lineEndingBlank,Xe=!0),nt[1].type=Oe.lineEnding,ut=je}else if(!(nt[1].type===Oe.linePrefix||nt[1].type===Oe.blockQuotePrefix||nt[1].type===Oe.blockQuotePrefixWhitespace||nt[1].type===Oe.blockQuoteMarker||nt[1].type===Oe.listItemIndent))break}Ge&&(!ut||Ge<ut)&&(it._spread=!0),it.end=Object.assign({},ut?ue[ut][1].start:Se[1].end),ue.splice(ut||Ye,0,["exit",it,Se[2]]),Ye++,ze++}if(Se[1].type===Oe.listItemPrefix){const je={type:"listItem",_spread:!1,start:Object.assign({},Se[1].start),end:void 0};it=je,ue.splice(Ye,0,["enter",je,Se[2]]),Ye++,ze++,Ge=void 0,Ee=!0}}}return ue[Ce][1]._spread=Xe,ze}function o(ue,Ce){return ze;function ze(Ye){a.call(this,ue(Ye),Ye),Ce&&Ce.call(this,Ye)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(ue,Ce,ze){const Ye=this.stack[this.stack.length-1];xt(Ye,"expected `parent`"),xt("children"in Ye,"expected `parent`"),Ye.children.push(ue),this.stack.push(ue),this.tokenStack.push([Ce,ze]),ue.position={start:$N(Ce.start),end:void 0}}function l(ue){return Ce;function Ce(ze){ue&&ue.call(this,ze),c.call(this,ze)}}function c(ue,Ce){const ze=this.stack.pop();xt(ze,"expected `node`");const Ye=this.tokenStack.pop();if(Ye)Ye[0].type!==ue.type&&(Ce?Ce.call(this,ue,Ye[0]):(Ye[1]||rgt).call(this,ue,Ye[0]));else throw new Error("Cannot close `"+ue.type+"` ("+MB({start:ue.start,end:ue.end})+"): it’s not open");xt(ze.type!=="fragment","unexpected fragment `exit`ed"),xt(ze.position,"expected `position` to be defined"),ze.position.end=$N(ue.end)}function u(){return YBe(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(ue){if(this.data.expectingFirstListItemValue){const Ce=this.stack[this.stack.length-2];xt(Ce,"expected nodes on stack"),xt(Ce.type==="list","expected list on stack"),Ce.start=Number.parseInt(this.sliceSerialize(ue),xi.numericBaseDecimal),this.data.expectingFirstListItemValue=void 0}}function f(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];xt(Ce,"expected node on stack"),xt(Ce.type==="code","expected code on stack"),Ce.lang=ue}function m(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];xt(Ce,"expected node on stack"),xt(Ce.type==="code","expected code on stack"),Ce.meta=ue}function p(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];xt(Ce,"expected node on stack"),xt(Ce.type==="code","expected code on stack"),Ce.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];xt(Ce,"expected node on stack"),xt(Ce.type==="code","expected code on stack"),Ce.value=ue.replace(/(\r?\n|\r)$/g,"")}function _(ue){const Ce=this.resume(),ze=this.stack[this.stack.length-1];xt(ze,"expected node on stack"),xt(ze.type==="definition","expected definition on stack"),ze.label=Ce,ze.identifier=k0(this.sliceSerialize(ue)).toLowerCase()}function w(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];xt(Ce,"expected node on stack"),xt(Ce.type==="definition","expected definition on stack"),Ce.title=ue}function C(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];xt(Ce,"expected node on stack"),xt(Ce.type==="definition","expected definition on stack"),Ce.url=ue}function N(ue){const Ce=this.stack[this.stack.length-1];if(xt(Ce,"expected node on stack"),xt(Ce.type==="heading","expected heading on stack"),!Ce.depth){const ze=this.sliceSerialize(ue).length;xt(ze===1||ze===2||ze===3||ze===4||ze===5||ze===6,"expected `depth` between `1` and `6`"),Ce.depth=ze}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function D(ue){const Ce=this.stack[this.stack.length-1];xt(Ce,"expected node on stack"),xt(Ce.type==="heading","expected heading on stack"),Ce.depth=this.sliceSerialize(ue).codePointAt(0)===_e.equalsTo?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function M(ue){const Ce=this.stack[this.stack.length-1];xt(Ce,"expected node on stack"),xt("children"in Ce,"expected parent on stack");const ze=Ce.children;let Ye=ze[ze.length-1];(!Ye||Ye.type!=="text")&&(Ye=re(),Ye.position={start:$N(ue.start),end:void 0},ze.push(Ye)),this.stack.push(Ye)}function T(ue){const Ce=this.stack.pop();xt(Ce,"expected a `node` to be on the stack"),xt("value"in Ce,"expected a `literal` to be on the stack"),xt(Ce.position,"expected `node` to have an open position"),Ce.value+=this.sliceSerialize(ue),Ce.position.end=$N(ue.end)}function A(ue){const Ce=this.stack[this.stack.length-1];if(xt(Ce,"expected `node`"),this.data.atHardBreak){xt("children"in Ce,"expected `parent`");const ze=Ce.children[Ce.children.length-1];xt(ze.position,"expected tail to have a starting position"),ze.position.end=$N(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(Ce.type)&&(M.call(this,ue),T.call(this,ue))}function R(){this.data.atHardBreak=!0}function P(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];xt(Ce,"expected node on stack"),xt(Ce.type==="html","expected html on stack"),Ce.value=ue}function O(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];xt(Ce,"expected node on stack"),xt(Ce.type==="html","expected html on stack"),Ce.value=ue}function V(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];xt(Ce,"expected node on stack"),xt(Ce.type==="inlineCode","expected inline code on stack"),Ce.value=ue}function F(){const ue=this.stack[this.stack.length-1];if(xt(ue,"expected node on stack"),xt(ue.type==="link","expected link on stack"),this.data.inReference){const Ce=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=Ce,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function $(){const ue=this.stack[this.stack.length-1];if(xt(ue,"expected node on stack"),xt(ue.type==="image","expected image on stack"),this.data.inReference){const Ce=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=Ce,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function B(ue){const Ce=this.sliceSerialize(ue),ze=this.stack[this.stack.length-2];xt(ze,"expected ancestor on stack"),xt(ze.type==="image"||ze.type==="link","expected image or link on stack"),ze.label=Yar(Ce),ze.identifier=k0(Ce).toLowerCase()}function z(){const ue=this.stack[this.stack.length-1];xt(ue,"expected node on stack"),xt(ue.type==="fragment","expected fragment on stack");const Ce=this.resume(),ze=this.stack[this.stack.length-1];if(xt(ze,"expected node on stack"),xt(ze.type==="image"||ze.type==="link","expected image or link on stack"),this.data.inReference=!0,ze.type==="link"){const Ye=ue.children;ze.children=Ye}else ze.alt=Ce}function H(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];xt(Ce,"expected node on stack"),xt(Ce.type==="image"||Ce.type==="link","expected image or link on stack"),Ce.url=ue}function K(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];xt(Ce,"expected node on stack"),xt(Ce.type==="image"||Ce.type==="link","expected image or link on stack"),Ce.title=ue}function q(){this.data.inReference=void 0}function U(){this.data.referenceType="collapsed"}function Y(ue){const Ce=this.resume(),ze=this.stack[this.stack.length-1];xt(ze,"expected node on stack"),xt(ze.type==="image"||ze.type==="link","expected image reference or link reference on stack"),ze.label=Ce,ze.identifier=k0(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function J(ue){xt(ue.type==="characterReferenceMarkerNumeric"||ue.type==="characterReferenceMarkerHexadecimal"),this.data.characterReferenceType=ue.type}function ae(ue){const Ce=this.sliceSerialize(ue),ze=this.data.characterReferenceType;let Ye;if(ze)Ye=tBt(Ce,ze===Oe.characterReferenceMarkerNumeric?xi.numericBaseDecimal:xi.numericBaseHexadecimal),this.data.characterReferenceType=void 0;else{const Xe=XBe(Ce);xt(Xe!==!1,"expected reference to decode"),Ye=Xe}const Ke=this.stack[this.stack.length-1];xt(Ke,"expected `node`"),xt("value"in Ke,"expected `node.value`"),Ke.value+=Ye}function se(ue){const Ce=this.stack.pop();xt(Ce,"expected `node`"),xt(Ce.position,"expected `node.position`"),Ce.position.end=$N(ue.end)}function oe(ue){T.call(this,ue);const Ce=this.stack[this.stack.length-1];xt(Ce,"expected node on stack"),xt(Ce.type==="link","expected link on stack"),Ce.url=this.sliceSerialize(ue)}function fe(ue){T.call(this,ue);const Ce=this.stack[this.stack.length-1];xt(Ce,"expected node on stack"),xt(Ce.type==="link","expected link on stack"),Ce.url="mailto:"+this.sliceSerialize(ue)}function de(){return{type:"blockquote",children:[]}}function ie(){return{type:"code",lang:null,meta:null,value:""}}function Q(){return{type:"inlineCode",value:""}}function be(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function le(){return{type:"emphasis",children:[]}}function Ne(){return{type:"heading",depth:0,children:[]}}function Le(){return{type:"break"}}function Te(){return{type:"html",value:""}}function De(){return{type:"image",title:null,url:"",alt:null}}function Pe(){return{type:"link",title:null,url:"",children:[]}}function ge(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function he(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function me(){return{type:"paragraph",children:[]}}function X(){return{type:"strong",children:[]}}function re(){return{type:"text",value:""}}function we(){return{type:"thematicBreak"}}}function $N(t){return{line:t.line,column:t.column,offset:t.offset}}function fBt(t,e){let n=-1;for(;++n<e.length;){const i=e[n];Array.isArray(i)?fBt(t,i):Jar(t,i)}}function Jar(t,e){let n;for(n in e)if(hBt.call(e,n))switch(n){case"canContainEols":{const i=e[n];i&&t[n].push(...i);break}case"transforms":{const i=e[n];i&&t[n].push(...i);break}case"enter":case"exit":{const i=e[n];i&&Object.assign(t[n],i);break}}}function rgt(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+MB({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+MB({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+MB({start:e.start,end:e.end})+") is still open")}function elr(t){const e=this;e.parser=n;function n(i){return Zar(i,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function tlr(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function nlr(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
`}]}function ilr(t,e){const n=e.value?e.value+`
`:"",i={};e.lang&&(i.className=["language-"+e.lang]);let r={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return e.meta&&(r.data={meta:e.meta}),t.patch(e,r),r=t.applyData(e,r),r={type:"element",tagName:"pre",properties:{},children:[r]},t.patch(e,r),r}function rlr(t,e){const n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function olr(t,e){const n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function slr(t,e){const n=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=String(e.identifier).toUpperCase(),r=f$(i.toLowerCase()),o=t.footnoteOrder.indexOf(i);let s,a=t.footnoteCounts.get(i);a===void 0?(a=0,t.footnoteOrder.push(i),s=t.footnoteOrder.length):s=o+1,a+=1,t.footnoteCounts.set(i,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+r,id:n+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};t.patch(e,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,c),t.applyData(e,c)}function alr(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function llr(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function mBt(t,e){const n=e.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+i}];const r=t.all(e),o=r[0];o&&o.type==="text"?o.value="["+o.value:r.unshift({type:"text",value:"["});const s=r[r.length-1];return s&&s.type==="text"?s.value+=i:r.push({type:"text",value:i}),r}function clr(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return mBt(t,e);const r={src:f$(i.url||""),alt:e.alt};i.title!==null&&i.title!==void 0&&(r.title=i.title);const o={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,o),t.applyData(e,o)}function ulr(t,e){const n={src:f$(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,i),t.applyData(e,i)}function dlr(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,i),t.applyData(e,i)}function hlr(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return mBt(t,e);const r={href:f$(i.url||"")};i.title!==null&&i.title!==void 0&&(r.title=i.title);const o={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,o),t.applyData(e,o)}function flr(t,e){const n={href:f$(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function mlr(t,e,n){const i=t.all(e),r=n?plr(n):pBt(e),o={},s=[];if(typeof e.checked=="boolean"){const u=i[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},i.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<i.length;){const u=i[a];(r||a!==0||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
`}),u.type==="element"&&u.tagName==="p"&&!r?s.push(...u.children):s.push(u)}const l=i[i.length-1];l&&(r||l.type!=="element"||l.tagName!=="p")&&s.push({type:"text",value:`
`});const c={type:"element",tagName:"li",properties:o,children:s};return t.patch(e,c),t.applyData(e,c)}function plr(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const n=t.children;let i=-1;for(;!e&&++i<n.length;)e=pBt(n[i])}return e}function pBt(t){const e=t.spread;return e??t.children.length>1}function glr(t,e){const n={},i=t.all(e);let r=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++r<i.length;){const s=i[r];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:e.ordered?"ol":"ul",properties:n,children:t.wrap(i,!0)};return t.patch(e,o),t.applyData(e,o)}function blr(t,e){const n={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function vlr(t,e){const n={type:"root",children:t.wrap(t.all(e))};return t.patch(e,n),t.applyData(e,n)}function ylr(t,e){const n={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function _lr(t,e){const n=t.all(e),i=n.shift(),r=[];if(i){const s={type:"element",tagName:"thead",properties:{},children:t.wrap([i],!0)};t.patch(e.children[0],s),r.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},a=UBe(e.children[1]),l=q9t(e.children[e.children.length-1]);a&&l&&(s.position={start:a,end:l}),r.push(s)}const o={type:"element",tagName:"table",properties:{},children:t.wrap(r,!0)};return t.patch(e,o),t.applyData(e,o)}function xlr(t,e,n){const i=n?n.children:void 0,o=(i?i.indexOf(e):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:e.children.length;let l=-1;const c=[];for(;++l<a;){const d=e.children[l],h={},f=s?s[l]:void 0;f&&(h.align=f);let m={type:"element",tagName:o,properties:h,children:[]};d&&(m.children=t.all(d),t.patch(d,m),m=t.applyData(d,m)),c.push(m)}const u={type:"element",tagName:"tr",properties:{},children:t.wrap(c,!0)};return t.patch(e,u),t.applyData(e,u)}function wlr(t,e){const n={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const ogt=9,sgt=32;function Clr(t){const e=String(t),n=/\r?\n|\r/g;let i=n.exec(e),r=0;const o=[];for(;i;)o.push(agt(e.slice(r,i.index),r>0,!0),i[0]),r=i.index+i[0].length,i=n.exec(e);return o.push(agt(e.slice(r),r>0,!1)),o.join("")}function agt(t,e,n){let i=0,r=t.length;if(e){let o=t.codePointAt(i);for(;o===ogt||o===sgt;)i++,o=t.codePointAt(i)}if(n){let o=t.codePointAt(r-1);for(;o===ogt||o===sgt;)r--,o=t.codePointAt(r-1)}return r>i?t.slice(i,r):""}function Slr(t,e){const n={type:"text",value:Clr(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function Nlr(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const Elr={blockquote:tlr,break:nlr,code:ilr,delete:rlr,emphasis:olr,footnoteReference:slr,heading:alr,html:llr,imageReference:clr,image:ulr,inlineCode:dlr,linkReference:hlr,link:flr,listItem:mlr,list:glr,paragraph:blr,root:vlr,strong:ylr,table:_lr,tableCell:wlr,tableRow:xlr,text:Slr,thematicBreak:Nlr,toml:pJ,yaml:pJ,definition:pJ,footnoteDefinition:pJ};function pJ(){}const gBt=-1,Dpe=0,Bse=1,zse=2,QBe=3,JBe=4,eze=5,tze=6,bBt=7,vBt=8,lgt=typeof self=="object"?self:globalThis,Dlr=(t,e)=>{const n=(r,o)=>(t.set(o,r),r),i=r=>{if(t.has(r))return t.get(r);const[o,s]=e[r];switch(o){case Dpe:case gBt:return n(s,r);case Bse:{const a=n([],r);for(const l of s)a.push(i(l));return a}case zse:{const a=n({},r);for(const[l,c]of s)a[i(l)]=i(c);return a}case QBe:return n(new Date(s),r);case JBe:{const{source:a,flags:l}=s;return n(new RegExp(a,l),r)}case eze:{const a=n(new Map,r);for(const[l,c]of s)a.set(i(l),i(c));return a}case tze:{const a=n(new Set,r);for(const l of s)a.add(i(l));return a}case bBt:{const{name:a,message:l}=s;return n(new lgt[a](l),r)}case vBt:return n(BigInt(s),r);case"BigInt":return n(Object(BigInt(s)),r)}return n(new lgt[o](s),r)};return i},cgt=t=>Dlr(new Map,t)(0),lO="",{toString:klr}={},{keys:Mlr}=Object,_7=t=>{const e=typeof t;if(e!=="object"||!t)return[Dpe,e];const n=klr.call(t).slice(8,-1);switch(n){case"Array":return[Bse,lO];case"Object":return[zse,lO];case"Date":return[QBe,lO];case"RegExp":return[JBe,lO];case"Map":return[eze,lO];case"Set":return[tze,lO]}return n.includes("Array")?[Bse,n]:n.includes("Error")?[bBt,n]:[zse,n]},gJ=([t,e])=>t===Dpe&&(e==="function"||e==="symbol"),Llr=(t,e,n,i)=>{const r=(s,a)=>{const l=i.push(s)-1;return n.set(a,l),l},o=s=>{if(n.has(s))return n.get(s);let[a,l]=_7(s);switch(a){case Dpe:{let u=s;switch(l){case"bigint":a=vBt,u=s.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return r([gBt],s)}return r([a,u],s)}case Bse:{if(l)return r([l,[...s]],s);const u=[],d=r([a,u],s);for(const h of s)u.push(o(h));return d}case zse:{if(l)switch(l){case"BigInt":return r([l,s.toString()],s);case"Boolean":case"Number":case"String":return r([l,s.valueOf()],s)}if(e&&"toJSON"in s)return o(s.toJSON());const u=[],d=r([a,u],s);for(const h of Mlr(s))(t||!gJ(_7(s[h])))&&u.push([o(h),o(s[h])]);return d}case QBe:return r([a,s.toISOString()],s);case JBe:{const{source:u,flags:d}=s;return r([a,{source:u,flags:d}],s)}case eze:{const u=[],d=r([a,u],s);for(const[h,f]of s)(t||!(gJ(_7(h))||gJ(_7(f))))&&u.push([o(h),o(f)]);return d}case tze:{const u=[],d=r([a,u],s);for(const h of s)(t||!gJ(_7(h)))&&u.push(o(h));return d}}const{message:c}=s;return r([a,{name:l,message:c}],s)};return o},ugt=(t,{json:e,lossy:n}={})=>{const i=[];return Llr(!(e||n),!!e,new Map,i)(t),i},yI=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?cgt(ugt(t,e)):structuredClone(t):(t,e)=>cgt(ugt(t,e));function Tlr(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function Ilr(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function Alr(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||Tlr,i=t.options.footnoteBackLabel||Ilr,r=t.options.footnoteLabel||"Footnotes",o=t.options.footnoteLabelTagName||"h2",s=t.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<t.footnoteOrder.length;){const c=t.footnoteById.get(t.footnoteOrder[l]);if(!c)continue;const u=t.all(c),d=String(c.identifier).toUpperCase(),h=f$(d.toLowerCase());let f=0;const m=[],p=t.footnoteCounts.get(d);for(;p!==void 0&&++f<=p;){m.length>0&&m.push({type:"text",value:" "});let _=typeof n=="string"?n:n(l,f);typeof _=="string"&&(_={type:"text",value:_}),m.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+h+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(l,f),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const g=u[u.length-1];if(g&&g.type==="element"&&g.tagName==="p"){const _=g.children[g.children.length-1];_&&_.type==="text"?_.value+=" ":g.children.push({type:"text",value:" "}),g.children.push(...m)}else u.push(...m);const y={type:"element",tagName:"li",properties:{id:e+"fn-"+h},children:t.wrap(u,!0)};t.patch(c,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...yI(s),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(a,!0)},{type:"text",value:`
`}]}}const kpe=function(t){if(t==null)return jlr;if(typeof t=="function")return Mpe(t);if(typeof t=="object")return Array.isArray(t)?Rlr(t):Plr(t);if(typeof t=="string")return Olr(t);throw new Error("Expected function, string, or object as test")};function Rlr(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=kpe(t[n]);return Mpe(i);function i(...r){let o=-1;for(;++o<e.length;)if(e[o].apply(this,r))return!0;return!1}}function Plr(t){const e=t;return Mpe(n);function n(i){const r=i;let o;for(o in t)if(r[o]!==e[o])return!1;return!0}}function Olr(t){return Mpe(e);function e(n){return n&&n.type===t}}function Mpe(t){return e;function e(n,i,r){return!!(Flr(n)&&t.call(this,n,typeof i=="number"?i:void 0,r||void 0))}}function jlr(){return!0}function Flr(t){return t!==null&&typeof t=="object"&&"type"in t}const yBt=[],$lr=!0,KRe=!1,Vlr="skip";function _Bt(t,e,n,i){let r;typeof e=="function"&&typeof n!="function"?(i=n,n=e):r=e;const o=kpe(r),s=i?-1:1;a(t,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=yBt,m,p,g;if((!e||o(l,c,u[u.length-1]||void 0))&&(f=Blr(n(l,u)),f[0]===KRe))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==Vlr)for(p=(i?y.children.length:-1)+s,g=u.concat(y);p>-1&&p<y.children.length;){const _=y.children[p];if(m=a(_,p,g)(),m[0]===KRe)return m;p=typeof m[1]=="number"?m[1]:p+s}}return f}}}function Blr(t){return Array.isArray(t)?t:typeof t=="number"?[$lr,t]:t==null?yBt:[t]}function Lpe(t,e,n,i){let r,o,s;typeof e=="function"&&typeof n!="function"?(o=void 0,s=e,r=n):(o=e,s=n,r=i),_Bt(t,o,a,r);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return s(l,d,u)}}const qRe={}.hasOwnProperty,zlr={};function Hlr(t,e){const n=e||zlr,i=new Map,r=new Map,o=new Map,s={...Elr,...n.handlers},a={all:c,applyData:Ulr,definitionById:i,footnoteById:r,footnoteCounts:o,footnoteOrder:[],handlers:s,one:l,options:n,patch:Wlr,wrap:qlr};return Lpe(t,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const d=u.type==="definition"?i:r,h=String(u.identifier).toUpperCase();d.has(h)||d.set(h,u)}}),a;function l(u,d){const h=u.type,f=a.handlers[h];if(qRe.call(a.handlers,h)&&f)return f(a,u,d);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in u){const{children:p,...g}=u,y=yI(g);return y.children=a.all(u),y}return yI(u)}return(a.options.unknownHandler||Klr)(a,u,d)}function c(u){const d=[];if("children"in u){const h=u.children;let f=-1;for(;++f<h.length;){const m=a.one(h[f],u);if(m){if(f&&h[f-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=dgt(m.value)),!Array.isArray(m)&&m.type==="element")){const p=m.children[0];p&&p.type==="text"&&(p.value=dgt(p.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function Wlr(t,e){t.position&&(e.position=Nor(t))}function Ulr(t,e){let n=e;if(t&&t.data){const i=t.data.hName,r=t.data.hChildren,o=t.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const s="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,yI(o)),"children"in n&&n.children&&r!==null&&r!==void 0&&(n.children=r)}return n}function Klr(t,e){const n=e.data||{},i="value"in e&&!(qRe.call(n,"hProperties")||qRe.call(n,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function qlr(t,e){const n=[];let i=-1;for(e&&n.push({type:"text",value:`
`});++i<t.length;)i&&n.push({type:"text",value:`
`}),n.push(t[i]);return e&&t.length>0&&n.push({type:"text",value:`
`}),n}function dgt(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function hgt(t,e){const n=Hlr(t,e),i=n.one(t,void 0),r=Alr(n),o=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&(xt("children"in o),o.children.push({type:"text",value:`
`},r)),o}function Glr(t,e){return t&&"run"in t?async function(n,i){const r=hgt(n,{file:i,...e});await t.run(r,i)}:function(n,i){return hgt(n,{file:i,...t||e})}}function fgt(t){if(t)throw t}var Ite=Object.prototype.hasOwnProperty,xBt=Object.prototype.toString,mgt=Object.defineProperty,pgt=Object.getOwnPropertyDescriptor,ggt=function(e){return typeof Array.isArray=="function"?Array.isArray(e):xBt.call(e)==="[object Array]"},bgt=function(e){if(!e||xBt.call(e)!=="[object Object]")return!1;var n=Ite.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&Ite.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;var r;for(r in e);return typeof r>"u"||Ite.call(e,r)},vgt=function(e,n){mgt&&n.name==="__proto__"?mgt(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},ygt=function(e,n){if(n==="__proto__")if(Ite.call(e,n)){if(pgt)return pgt(e,n).value}else return;return e[n]},Ylr=function t(){var e,n,i,r,o,s,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(e=arguments[l],e!=null)for(n in e)i=ygt(a,n),r=ygt(e,n),a!==r&&(u&&r&&(bgt(r)||(o=ggt(r)))?(o?(o=!1,s=i&&ggt(i)?i:[]):s=i&&bgt(i)?i:{},vgt(a,{name:n,newValue:t(u,s,r)})):typeof r<"u"&&vgt(a,{name:n,newValue:r}));return a};const zCe=ao(Ylr);function GRe(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Xlr(){const t=[],e={run:n,use:i};return e;function n(...r){let o=-1;const s=r.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...r);function a(l,...c){const u=t[++o];let d=-1;if(l){s(l);return}for(;++d<r.length;)(c[d]===null||c[d]===void 0)&&(c[d]=r[d]);r=c,u?Zlr(u,a)(...c):s(null,...c)}}function i(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return t.push(r),e}}function Zlr(t,e){let n;return i;function i(...s){const a=t.length>s.length;let l;a&&s.push(r);try{l=t.apply(this,s)}catch(c){const u=c;if(a&&n)throw u;return r(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(o,r):l instanceof Error?r(l):o(l))}function r(s,...a){n||(n=!0,e(s,...a))}function o(s){r(null,s)}}const nx={basename:Qlr,dirname:Jlr,extname:ecr,join:tcr,sep:"/"};function Qlr(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');iG(t);let n=0,i=-1,r=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;r--;)if(t.codePointAt(r)===47){if(o){n=r+1;break}}else i<0&&(o=!0,i=r+1);return i<0?"":t.slice(n,i)}if(e===t)return"";let s=-1,a=e.length-1;for(;r--;)if(t.codePointAt(r)===47){if(o){n=r+1;break}}else s<0&&(o=!0,s=r+1),a>-1&&(t.codePointAt(r)===e.codePointAt(a--)?a<0&&(i=r):(a=-1,i=s));return n===i?i=s:i<0&&(i=t.length),t.slice(n,i)}function Jlr(t){if(iG(t),t.length===0)return".";let e=-1,n=t.length,i;for(;--n;)if(t.codePointAt(n)===47){if(i){e=n;break}}else i||(i=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function ecr(t){iG(t);let e=t.length,n=-1,i=0,r=-1,o=0,s;for(;e--;){const a=t.codePointAt(e);if(a===47){if(s){i=e+1;break}continue}n<0&&(s=!0,n=e+1),a===46?r<0?r=e:o!==1&&(o=1):r>-1&&(o=-1)}return r<0||n<0||o===0||o===1&&r===n-1&&r===i+1?"":t.slice(r,n)}function tcr(...t){let e=-1,n;for(;++e<t.length;)iG(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":ncr(n)}function ncr(t){iG(t);const e=t.codePointAt(0)===47;let n=icr(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function icr(t,e){let n="",i=0,r=-1,o=0,s=-1,a,l;for(;++s<=t.length;){if(s<t.length)a=t.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(r===s-1||o===1))if(r!==s-1&&o===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",i=0):(n=n.slice(0,l),i=n.length-1-n.lastIndexOf("/")),r=s,o=0;continue}}else if(n.length>0){n="",i=0,r=s,o=0;continue}}e&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+t.slice(r+1,s):n=t.slice(r+1,s),i=s-r-1;r=s,o=0}else a===46&&o>-1?o++:o=-1}return n}function iG(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const rcr={cwd:ocr};function ocr(){return"/"}function YRe(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function scr(t){if(typeof t=="string")t=new URL(t);else if(!YRe(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return acr(t)}function acr(t){if(t.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const i=e.codePointAt(n+2);if(i===70||i===102){const r=new TypeError("File URL path must not include encoded / characters");throw r.code="ERR_INVALID_FILE_URL_PATH",r}}return decodeURIComponent(e)}const HCe=["history","path","basename","stem","extname","dirname"];class wBt{constructor(e){let n;e?YRe(e)?n={path:e}:typeof e=="string"||lcr(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":rcr.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<HCe.length;){const o=HCe[i];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let r;for(r in n)HCe.includes(r)||(this[r]=n[r])}get basename(){return typeof this.path=="string"?nx.basename(this.path):void 0}set basename(e){UCe(e,"basename"),WCe(e,"basename"),this.path=nx.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?nx.dirname(this.path):void 0}set dirname(e){_gt(this.basename,"dirname"),this.path=nx.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?nx.extname(this.path):void 0}set extname(e){if(WCe(e,"extname"),_gt(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=nx.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){YRe(e)&&(e=scr(e)),UCe(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?nx.basename(this.path,this.extname):void 0}set stem(e){UCe(e,"stem"),WCe(e,"stem"),this.path=nx.join(this.dirname||"",e+(this.extname||""))}fail(e,n,i){const r=this.message(e,n,i);throw r.fatal=!0,r}info(e,n,i){const r=this.message(e,n,i);return r.fatal=void 0,r}message(e,n,i){const r=new Of(e,n,i);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function WCe(t,e){if(t&&t.includes(nx.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+nx.sep+"`")}function UCe(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function _gt(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function lcr(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const ccr=function(t){const i=this.constructor.prototype,r=i[t],o=function(){return r.apply(o,arguments)};return Object.setPrototypeOf(o,i),o},ucr={}.hasOwnProperty;class nze extends ccr{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Xlr()}copy(){const e=new nze;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];e.use(...i)}return e.data(zCe(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(GCe("data",this.frozen),this.namespace[e]=n,this):ucr.call(this.namespace,e)&&this.namespace[e]||void 0:e?(GCe("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const r=n.call(e,...i);typeof r=="function"&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=bJ(e),i=this.parser||this.Parser;return KCe("parse",i),i(String(n),n)}process(e,n){const i=this;return this.freeze(),KCe("process",this.parser||this.Parser),qCe("process",this.compiler||this.Compiler),n?r(void 0,n):new Promise(r);function r(o,s){const a=bJ(e),l=i.parse(a);i.run(l,a,function(u,d,h){if(u||!d||!h)return c(u);const f=d,m=i.stringify(f,h);fcr(m)?h.value=m:h.result=m,c(u,h)});function c(u,d){u||!d?s(u):o?o(d):(xt(n,"`done` is defined if `resolve` is not"),n(void 0,d))}}}processSync(e){let n=!1,i;return this.freeze(),KCe("processSync",this.parser||this.Parser),qCe("processSync",this.compiler||this.Compiler),this.process(e,r),wgt("processSync","process",n),xt(i,"we either bailed on an error or have a tree"),i;function r(o,s){n=!0,fgt(o),i=s}}run(e,n,i){xgt(e),this.freeze();const r=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?o(void 0,i):new Promise(o);function o(s,a){xt(typeof n!="function","`file` can’t be a `done` anymore, we checked");const l=bJ(n);r.run(e,l,c);function c(u,d,h){const f=d||e;u?a(u):s?s(f):(xt(i,"`done` is defined if `resolve` is not"),i(void 0,f,h))}}}runSync(e,n){let i=!1,r;return this.run(e,n,o),wgt("runSync","run",i),xt(r,"we either bailed on an error or have a tree"),r;function o(s,a){fgt(s),r=a,i=!0}}stringify(e,n){this.freeze();const i=bJ(n),r=this.compiler||this.Compiler;return qCe("stringify",r),xgt(e),r(e,i)}use(e,...n){const i=this.attachers,r=this.namespace;if(GCe("use",this.frozen),e!=null)if(typeof e=="function")l(e,n);else if(typeof e=="object")Array.isArray(e)?a(e):s(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function o(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(r.settings=zCe(!0,r.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];o(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,h=-1;for(;++d<i.length;)if(i[d][0]===c){h=d;break}if(h===-1)i.push([c,...u]);else if(u.length>0){let[f,...m]=u;const p=i[h][1];GRe(p)&&GRe(f)&&(f=zCe(!0,p,f)),i[h]=[c,f,...m]}}}}const dcr=new nze().freeze();function KCe(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function qCe(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function GCe(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xgt(t){if(!GRe(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function wgt(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function bJ(t){return hcr(t)?t:new wBt(t)}function hcr(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function fcr(t){return typeof t=="string"||mcr(t)}function mcr(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const pcr="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Cgt=[],Sgt={allowDangerousHtml:!0},gcr=/^(https?|ircs?|mailto|xmpp)$/i,bcr=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function CBt(t){const e=t.allowedElements,n=t.allowElement,i=t.children||"",r=t.className,o=t.components,s=t.disallowedElements,a=t.rehypePlugins||Cgt,l=t.remarkPlugins||Cgt,c=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Sgt}:Sgt,u=t.skipHtml,d=t.unwrapDisallowed,h=t.urlTransform||vcr,f=dcr().use(elr).use(l).use(Glr,c).use(a),m=new wBt;typeof i=="string"?m.value=i:OCe("Unexpected value `"+i+"` for `children` prop, expected `string`"),e&&s&&OCe("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other");for(const _ of bcr)Object.hasOwn(t,_.from)&&OCe("Unexpected `"+_.from+"` prop, "+(_.to?"use `"+_.to+"` instead":"remove it")+" (see <"+pcr+"#"+_.id+"> for more info)");const p=f.parse(m);let g=f.runSync(p,m);return r&&(g={type:"element",tagName:"div",properties:{className:r},children:g.type==="root"?g.children:[g]}),Lpe(g,y),Tor(g,{Fragment:ne.Fragment,components:o,ignoreInvalidStyle:!0,jsx:ne.jsx,jsxs:ne.jsxs,passKeys:!0,passNode:!0});function y(_,w,C){if(_.type==="raw"&&C&&typeof w=="number")return u?C.children.splice(w,1):C.children[w]={type:"text",value:_.value},w;if(_.type==="element"){let N;for(N in FCe)if(Object.hasOwn(FCe,N)&&Object.hasOwn(_.properties,N)){const E=_.properties[N],D=FCe[N];(D===null||D.includes(_.tagName))&&(_.properties[N]=h(String(E||""),N,_))}}if(_.type==="element"){let N=e?!e.includes(_.tagName):s?s.includes(_.tagName):!1;if(!N&&n&&typeof w=="number"&&(N=!n(_,w,C)),N&&C&&typeof w=="number")return d&&_.children?C.children.splice(w,1,..._.children):C.children.splice(w,1),w}}}function vcr(t){const e=t.indexOf(":"),n=t.indexOf("?"),i=t.indexOf("#"),r=t.indexOf("/");return e<0||r>-1&&e>r||n>-1&&e>n||i>-1&&e>i||gcr.test(t.slice(0,e))?t:""}const SBt=function(t){if(t==null)return xcr;if(typeof t=="string")return _cr(t);if(typeof t=="object")return ycr(t);if(typeof t=="function")return ize(t);throw new Error("Expected function, string, or array as `test`")};function ycr(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=SBt(t[n]);return ize(i);function i(...r){let o=-1;for(;++o<e.length;)if(e[o].apply(this,r))return!0;return!1}}function _cr(t){return ize(e);function e(n){return n.tagName===t}}function ize(t){return e;function e(n,i,r){return!!(wcr(n)&&t.call(this,n,typeof i=="number"?i:void 0,r||void 0))}}function xcr(t){return!!(t&&typeof t=="object"&&"type"in t&&t.type==="element"&&"tagName"in t&&typeof t.tagName=="string")}function wcr(t){return t!==null&&typeof t=="object"&&"type"in t&&"tagName"in t}const Ccr=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,Scr=/^[a-zA-Z]:\\/;function Ncr(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return Scr.test(t)?!1:Ccr.test(t)}const Ecr=["http","https"],Dcr=["nofollow"],kcr={};function NBt(t){const e=t||kcr,n=e.protocols||Ecr,i=SBt(e.test);return function(r){Lpe(r,"element",function(o,s,a){if(o.tagName==="a"&&typeof o.properties.href=="string"&&i(o,s,a)){const l=o.properties.href;if(Ncr(l)?n.includes(l.slice(0,l.indexOf(":"))):l.startsWith("//")){const c=x7(e.content,o),u=c&&!Array.isArray(c)?[c]:c,d=x7(e.rel,o)||Dcr,h=typeof d=="string"?aor(d):d,f=x7(e.target,o),m=x7(e.properties,o);if(m&&Object.assign(o.properties,yI(m)),h.length>0&&(o.properties.rel=[...h]),f&&(o.properties.target=f),u){const p=x7(e.contentProperties,o)||{};o.children.push({type:"element",tagName:"span",properties:yI(p),children:yI(u)})}}}})}}function x7(t,e){return typeof t=="function"?t(e):t}function Ngt(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let i=0,r=n.indexOf(e);for(;r!==-1;)i++,r=n.indexOf(e,r+e.length);return i}function Mcr(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Lcr(t,e,n){const r=kpe((n||{}).ignore||[]),o=Tcr(e);let s=-1;for(;++s<o.length;)_Bt(t,"text",a);function a(c,u){let d=-1,h;for(;++d<u.length;){const f=u[d],m=h?h.children:void 0;if(r(f,m?m.indexOf(f):void 0,h))return;h=f}if(h)return l(c,u)}function l(c,u){const d=u[u.length-1],h=o[s][0],f=o[s][1];let m=0;const g=d.children.indexOf(c);let y=!1,_=[];h.lastIndex=0;let w=h.exec(c.value);for(;w;){const C=w.index,N={index:w.index,input:w.input,stack:[...u,c]};let E=f(...w,N);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?h.lastIndex=C+1:(m!==C&&_.push({type:"text",value:c.value.slice(m,C)}),Array.isArray(E)?_.push(...E):E&&_.push(E),m=C+w[0].length,y=!0),!h.global)break;w=h.exec(c.value)}return y?(m<c.value.length&&_.push({type:"text",value:c.value.slice(m)}),d.children.splice(g,1,..._)):_=[c],g+_.length}}function Tcr(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!t[0]||Array.isArray(t[0])?t:[t];let i=-1;for(;++i<n.length;){const r=n[i];e.push([Icr(r[0]),Acr(r[1])])}return e}function Icr(t){return typeof t=="string"?new RegExp(Mcr(t),"g"):t}function Acr(t){return typeof t=="function"?t:function(){return t}}const YCe="phrasing",XCe=["autolink","link","image","label"];function Rcr(){return{transforms:[Bcr],enter:{literalAutolink:Ocr,literalAutolinkEmail:ZCe,literalAutolinkHttp:ZCe,literalAutolinkWww:ZCe},exit:{literalAutolink:Vcr,literalAutolinkEmail:$cr,literalAutolinkHttp:jcr,literalAutolinkWww:Fcr}}}function Pcr(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:YCe,notInConstruct:XCe},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:YCe,notInConstruct:XCe},{character:":",before:"[ps]",after:"\\/",inConstruct:YCe,notInConstruct:XCe}]}}function Ocr(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function ZCe(t){this.config.enter.autolinkProtocol.call(this,t)}function jcr(t){this.config.exit.autolinkProtocol.call(this,t)}function Fcr(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];xt(e.type==="link"),e.url="http://"+this.sliceSerialize(t)}function $cr(t){this.config.exit.autolinkEmail.call(this,t)}function Vcr(t){this.exit(t)}function Bcr(t){Lcr(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,zcr],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Hcr]],{ignore:["link","linkReference"]})}function zcr(t,e,n,i,r){let o="";if(!EBt(r)||(/^w/i.test(e)&&(n=e+n,e="",o="http://"),!Wcr(n)))return!1;const s=Ucr(n+i);if(!s[0])return!1;const a={type:"link",title:null,url:o+e+s[0],children:[{type:"text",value:e+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function Hcr(t,e,n,i){return!EBt(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function Wcr(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function Ucr(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],i=n.indexOf(")");const r=Ngt(t,"(");let o=Ngt(t,")");for(;i!==-1&&r>o;)t+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),o++;return[t,n]}function EBt(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||sA(n)||Npe(n))&&(!e||n!==47)}DBt.peek=nur;function Kcr(){return{enter:{gfmFootnoteDefinition:Gcr,gfmFootnoteDefinitionLabelString:Ycr,gfmFootnoteCall:Qcr,gfmFootnoteCallString:Jcr},exit:{gfmFootnoteDefinition:Zcr,gfmFootnoteDefinitionLabelString:Xcr,gfmFootnoteCall:tur,gfmFootnoteCallString:eur}}}function qcr(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:iur,footnoteReference:DBt}}}function Gcr(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Ycr(){this.buffer()}function Xcr(t){const e=this.resume(),n=this.stack[this.stack.length-1];xt(n.type==="footnoteDefinition"),n.label=e,n.identifier=k0(this.sliceSerialize(t)).toLowerCase()}function Zcr(t){this.exit(t)}function Qcr(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Jcr(){this.buffer()}function eur(t){const e=this.resume(),n=this.stack[this.stack.length-1];xt(n.type==="footnoteReference"),n.label=e,n.identifier=k0(this.sliceSerialize(t)).toLowerCase()}function tur(t){this.exit(t)}function DBt(t,e,n,i){const r=n.createTracker(i);let o=r.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return o+=r.move(n.safe(n.associationId(t),{...r.current(),before:o,after:"]"})),a(),s(),o+=r.move("]"),o}function nur(){return"["}function iur(t,e,n,i){const r=n.createTracker(i);let o=r.move("[^");const s=n.enter("footnoteDefinition"),a=n.enter("label");return o+=r.move(n.safe(n.associationId(t),{...r.current(),before:o,after:"]"})),a(),o+=r.move("]:"+(t.children&&t.children.length>0?" ":"")),r.shift(4),o+=r.move(n.indentLines(n.containerFlow(t,r.current()),rur)),s(),o}function rur(t,e,n){return e===0?t:(n?"":"    ")+t}const our=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];kBt.peek=uur;function sur(){return{canContainEols:["delete"],enter:{strikethrough:lur},exit:{strikethrough:cur}}}function aur(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:our}],handlers:{delete:kBt}}}function lur(t){this.enter({type:"delete",children:[]},t)}function cur(t){this.exit(t)}function kBt(t,e,n,i){const r=n.createTracker(i),o=n.enter("strikethrough");let s=r.move("~~");return s+=n.containerPhrasing(t,{...r.current(),before:s,after:"~"}),s+=r.move("~~"),o(),s}function uur(){return"~"}function dur(t,e={}){const n=(e.align||[]).concat(),i=e.stringLength||fur,r=[],o=[],s=[],a=[];let l=0,c=-1;for(;++c<t.length;){const m=[],p=[];let g=-1;for(t[c].length>l&&(l=t[c].length);++g<t[c].length;){const y=hur(t[c][g]);if(e.alignDelimiters!==!1){const _=i(y);p[g]=_,(a[g]===void 0||_>a[g])&&(a[g]=_)}m.push(y)}o[c]=m,s[c]=p}let u=-1;if(typeof n=="object"&&"length"in n)for(;++u<l;)r[u]=Egt(n[u]);else{const m=Egt(n);for(;++u<l;)r[u]=m}u=-1;const d=[],h=[];for(;++u<l;){const m=r[u];let p="",g="";m===99?(p=":",g=":"):m===108?p=":":m===114&&(g=":");let y=e.alignDelimiters===!1?1:Math.max(1,a[u]-p.length-g.length);const _=p+"-".repeat(y)+g;e.alignDelimiters!==!1&&(y=p.length+y+g.length,y>a[u]&&(a[u]=y),h[u]=y),d[u]=_}o.splice(1,0,d),s.splice(1,0,h),c=-1;const f=[];for(;++c<o.length;){const m=o[c],p=s[c];u=-1;const g=[];for(;++u<l;){const y=m[u]||"";let _="",w="";if(e.alignDelimiters!==!1){const C=a[u]-(p[u]||0),N=r[u];N===114?_=" ".repeat(C):N===99?C%2?(_=" ".repeat(C/2+.5),w=" ".repeat(C/2-.5)):(_=" ".repeat(C/2),w=_):w=" ".repeat(C)}e.delimiterStart!==!1&&!u&&g.push("|"),e.padding!==!1&&!(e.alignDelimiters===!1&&y==="")&&(e.delimiterStart!==!1||u)&&g.push(" "),e.alignDelimiters!==!1&&g.push(_),g.push(y),e.alignDelimiters!==!1&&g.push(w),e.padding!==!1&&g.push(" "),(e.delimiterEnd!==!1||u!==l-1)&&g.push("|")}f.push(e.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return f.join(`
`)}function hur(t){return t==null?"":String(t)}function fur(t){return t.length}function Egt(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function mur(t,e,n,i){const r=n.enter("blockquote"),o=n.createTracker(i);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(t,o.current()),pur);return r(),s}function pur(t,e,n){return">"+(n?"":" ")+t}function gur(t,e){return Dgt(t,e.inConstruct,!0)&&!Dgt(t,e.notInConstruct,!1)}function Dgt(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let i=-1;for(;++i<e.length;)if(t.includes(e[i]))return!0;return!1}function kgt(t,e,n,i){let r=-1;for(;++r<n.unsafe.length;)if(n.unsafe[r].character===`
`&&gur(n.stack,n.unsafe[r]))return/[ \t]/.test(i.before)?"":" ";return`\\
`}function bur(t,e){const n=String(t);let i=n.indexOf(e),r=i,o=0,s=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===r?++o>s&&(s=o):o=1,r=i+e.length,i=n.indexOf(e,r);return s}function vur(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function yur(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function _ur(t,e,n,i){const r=yur(n),o=t.value||"",s=r==="`"?"GraveAccent":"Tilde";if(vur(t,n)){const d=n.enter("codeIndented"),h=n.indentLines(o,xur);return d(),h}const a=n.createTracker(i),l=r.repeat(Math.max(bur(o,r)+1,3)),c=n.enter("codeFenced");let u=a.move(l);if(t.lang){const d=n.enter(`codeFencedLang${s}`);u+=a.move(n.safe(t.lang,{before:u,after:" ",encode:["`"],...a.current()})),d()}if(t.lang&&t.meta){const d=n.enter(`codeFencedMeta${s}`);u+=a.move(" "),u+=a.move(n.safe(t.meta,{before:u,after:`
`,encode:["`"],...a.current()})),d()}return u+=a.move(`
`),o&&(u+=a.move(o+`
`)),u+=a.move(l),c(),u}function xur(t,e,n){return(n?"":"    ")+t}function rze(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function wur(t,e,n,i){const r=rze(n),o=r==='"'?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const l=n.createTracker(i);let c=l.move("[");return c+=l.move(n.safe(n.associationId(t),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(t.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(t.url,{before:c,after:t.title?" ":`
`,...l.current()}))),a(),t.title&&(a=n.enter(`title${o}`),c+=l.move(" "+r),c+=l.move(n.safe(t.title,{before:c,after:r,...l.current()})),c+=l.move(r),a()),s(),c}function Cur(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}MBt.peek=Sur;function MBt(t,e,n,i){const r=Cur(n),o=n.enter("emphasis"),s=n.createTracker(i);let a=s.move(r);return a+=s.move(n.containerPhrasing(t,{before:a,after:r,...s.current()})),a+=s.move(r),o(),a}function Sur(t,e,n){return n.options.emphasis||"*"}function Nur(t,e){let n=!1;return Lpe(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,KRe}),!!((!t.depth||t.depth<3)&&YBe(t)&&(e.options.setext||n))}function Eur(t,e,n,i){const r=Math.max(Math.min(6,t.depth||1),1),o=n.createTracker(i);if(Nur(t,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(t,{...o.current(),before:`
`,after:`
`});return d(),u(),h+`
`+(r===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
`))+1))}const s="#".repeat(r),a=n.enter("headingAtx"),l=n.enter("phrasing");o.move(s+" ");let c=n.containerPhrasing(t,{before:"# ",after:`
`,...o.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),l(),a(),c}LBt.peek=Dur;function LBt(t){return t.value||""}function Dur(){return"<"}TBt.peek=kur;function TBt(t,e,n,i){const r=rze(n),o=r==='"'?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const l=n.createTracker(i);let c=l.move("![");return c+=l.move(n.safe(t.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(t.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(t.url,{before:c,after:t.title?" ":")",...l.current()}))),a(),t.title&&(a=n.enter(`title${o}`),c+=l.move(" "+r),c+=l.move(n.safe(t.title,{before:c,after:r,...l.current()})),c+=l.move(r),a()),c+=l.move(")"),s(),c}function kur(){return"!"}IBt.peek=Mur;function IBt(t,e,n,i){const r=t.referenceType,o=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(i);let l=a.move("![");const c=n.safe(t.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return s(),n.stack=u,o(),r==="full"||!c||c!==d?l+=a.move(d+"]"):r==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function Mur(){return"!"}ABt.peek=Lur;function ABt(t,e,n){let i=t.value||"",r="`",o=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++o<n.unsafe.length;){const s=n.unsafe[o],a=n.compilePattern(s);let l;if(s.atBreak)for(;l=a.exec(i);){let c=l.index;i.charCodeAt(c)===10&&i.charCodeAt(c-1)===13&&c--,i=i.slice(0,c)+" "+i.slice(l.index+1)}}return r+i+r}function Lur(){return"`"}function RBt(t,e){const n=YBe(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}PBt.peek=Tur;function PBt(t,e,n,i){const r=rze(n),o=r==='"'?"Quote":"Apostrophe",s=n.createTracker(i);let a,l;if(RBt(t,n)){const u=n.stack;n.stack=[],a=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(t,{before:d,after:">",...s.current()})),d+=s.move(">"),a(),n.stack=u,d}a=n.enter("link"),l=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(t,{before:c,after:"](",...s.current()})),c+=s.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(t.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(t.url,{before:c,after:t.title?" ":")",...s.current()}))),l(),t.title&&(l=n.enter(`title${o}`),c+=s.move(" "+r),c+=s.move(n.safe(t.title,{before:c,after:r,...s.current()})),c+=s.move(r),l()),c+=s.move(")"),a(),c}function Tur(t,e,n){return RBt(t,n)?"<":"["}OBt.peek=Iur;function OBt(t,e,n,i){const r=t.referenceType,o=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(i);let l=a.move("[");const c=n.containerPhrasing(t,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return s(),n.stack=u,o(),r==="full"||!c||c!==d?l+=a.move(d+"]"):r==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function Iur(){return"["}function oze(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function Aur(t){const e=oze(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Rur(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function jBt(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function Pur(t,e,n,i){const r=n.enter("list"),o=n.bulletCurrent;let s=t.ordered?Rur(n):oze(n);const a=t.ordered?s==="."?")":".":Aur(n);let l=e&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!t.ordered){const u=t.children?t.children[0]:void 0;if((s==="*"||s==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),jBt(n)===s&&u){let d=-1;for(;++d<t.children.length;){const h=t.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=a),n.bulletCurrent=s;const c=n.containerFlow(t,i);return n.bulletLastUsed=s,n.bulletCurrent=o,r(),c}function Our(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function jur(t,e,n,i){const r=Our(n);let o=n.bulletCurrent||oze(n);e&&e.type==="list"&&e.ordered&&(o=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+o);let s=o.length+1;(r==="tab"||r==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(s=Math.ceil(s/4)*4);const a=n.createTracker(i);a.move(o+" ".repeat(s-o.length)),a.shift(s);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(t,a.current()),u);return l(),c;function u(d,h,f){return h?(f?"":" ".repeat(s))+d:(f?o:o+" ".repeat(s-o.length))+d}}function Fur(t,e,n,i){const r=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(t,i);return o(),r(),s}const $ur=kpe(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Vur(t,e,n,i){return(t.children.some(function(s){return $ur(s)})?n.containerPhrasing:n.containerFlow).call(n,t,i)}function Bur(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}FBt.peek=zur;function FBt(t,e,n,i){const r=Bur(n),o=n.enter("strong"),s=n.createTracker(i);let a=s.move(r+r);return a+=s.move(n.containerPhrasing(t,{before:a,after:r,...s.current()})),a+=s.move(r+r),o(),a}function zur(t,e,n){return n.options.strong||"*"}function Hur(t,e,n,i){return n.safe(t.value,i)}function Wur(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function Uur(t,e,n){const i=(jBt(n)+(n.options.ruleSpaces?" ":"")).repeat(Wur(n));return n.options.ruleSpaces?i.slice(0,-1):i}const $Bt={blockquote:mur,break:kgt,code:_ur,definition:wur,emphasis:MBt,hardBreak:kgt,heading:Eur,html:LBt,image:TBt,imageReference:IBt,inlineCode:ABt,link:PBt,linkReference:OBt,list:Pur,listItem:jur,paragraph:Fur,root:Vur,strong:FBt,text:Hur,thematicBreak:Uur};function Kur(){return{enter:{table:qur,tableData:Mgt,tableHeader:Mgt,tableRow:Yur},exit:{codeText:Xur,table:Gur,tableData:QCe,tableHeader:QCe,tableRow:QCe}}}function qur(t){const e=t._align;xt(e,"expected `_align` on table"),this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function Gur(t){this.exit(t),this.data.inTable=void 0}function Yur(t){this.enter({type:"tableRow",children:[]},t)}function QCe(t){this.exit(t)}function Mgt(t){this.enter({type:"tableCell",children:[]},t)}function Xur(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,Zur));const n=this.stack[this.stack.length-1];xt(n.type==="inlineCode"),n.value=e,this.exit(t)}function Zur(t,e){return e==="|"?e:t}function Qur(t){const e=t||{},n=e.tableCellPadding,i=e.tablePipeAlign,r=e.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:s,tableCell:l,tableRow:a}};function s(f,m,p,g){return c(u(f,p,g),f.align)}function a(f,m,p,g){const y=d(f,p,g),_=c([y]);return _.slice(0,_.indexOf(`
`))}function l(f,m,p,g){const y=p.enter("tableCell"),_=p.enter("phrasing"),w=p.containerPhrasing(f,{...g,before:o,after:o});return _(),y(),w}function c(f,m){return dur(f,{align:m,alignDelimiters:i,padding:n,stringLength:r})}function u(f,m,p){const g=f.children;let y=-1;const _=[],w=m.enter("table");for(;++y<g.length;)_[y]=d(g[y],m,p);return w(),_}function d(f,m,p){const g=f.children;let y=-1;const _=[],w=m.enter("tableRow");for(;++y<g.length;)_[y]=l(g[y],f,m,p);return w(),_}function h(f,m,p){let g=$Bt.inlineCode(f,m,p);return p.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function Jur(){return{exit:{taskListCheckValueChecked:Lgt,taskListCheckValueUnchecked:Lgt,paragraph:tdr}}}function edr(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ndr}}}function Lgt(t){const e=this.stack[this.stack.length-2];xt(e.type==="listItem"),e.checked=t.type==="taskListCheckValueChecked"}function tdr(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];xt(n.type==="paragraph");const i=n.children[0];if(i&&i.type==="text"){const r=e.children;let o=-1,s;for(;++o<r.length;){const a=r[o];if(a.type==="paragraph"){s=a;break}}s===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(t)}function ndr(t,e,n,i){const r=t.children[0],o=typeof t.checked=="boolean"&&r&&r.type==="paragraph",s="["+(t.checked?"x":" ")+"] ",a=n.createTracker(i);o&&a.move(s);let l=$Bt.listItem(t,e,n,{...i,...a.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+s}}function idr(){return[Rcr(),Kcr(),sur(),Kur(),Jur()]}function rdr(t){return{extensions:[Pcr(),qcr(),aur(),Qur(t),edr()]}}const odr={tokenize:ddr,partial:!0},VBt={tokenize:hdr,partial:!0},BBt={tokenize:fdr,partial:!0},zBt={tokenize:mdr,partial:!0},sdr={tokenize:pdr,partial:!0},HBt={name:"wwwAutolink",tokenize:cdr,previous:UBt},WBt={name:"protocolAutolink",tokenize:udr,previous:KBt},JS={name:"emailAutolink",tokenize:ldr,previous:qBt},Fw={};function adr(){return{text:Fw}}let wL=_e.digit0;for(;wL<_e.leftCurlyBrace;)Fw[wL]=JS,wL++,wL===_e.colon?wL=_e.uppercaseA:wL===_e.leftSquareBracket&&(wL=_e.lowercaseA);Fw[_e.plusSign]=JS;Fw[_e.dash]=JS;Fw[_e.dot]=JS;Fw[_e.underscore]=JS;Fw[_e.uppercaseH]=[JS,WBt];Fw[_e.lowercaseH]=[JS,WBt];Fw[_e.uppercaseW]=[JS,HBt];Fw[_e.lowercaseW]=[JS,HBt];function ldr(t,e,n){const i=this;let r,o;return s;function s(d){return!XRe(d)||!qBt.call(i,i.previous)||sze(i.events)?n(d):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(d))}function a(d){return XRe(d)?(t.consume(d),a):d===_e.atSign?(t.consume(d),l):n(d)}function l(d){return d===_e.dot?t.check(sdr,u,c)(d):d===_e.dash||d===_e.underscore||wf(d)?(o=!0,t.consume(d),l):u(d)}function c(d){return t.consume(d),r=!0,l}function u(d){return o&&r&&fm(i.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(d)):n(d)}}function cdr(t,e,n){const i=this;return r;function r(s){return s!==_e.uppercaseW&&s!==_e.lowercaseW||!UBt.call(i,i.previous)||sze(i.events)?n(s):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(odr,t.attempt(VBt,t.attempt(BBt,o),n),n)(s))}function o(s){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(s)}}function udr(t,e,n){const i=this;let r="",o=!1;return s;function s(d){return(d===_e.uppercaseH||d===_e.lowercaseH)&&KBt.call(i,i.previous)&&!sze(i.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),r+=String.fromCodePoint(d),t.consume(d),a):n(d)}function a(d){if(fm(d)&&r.length<5)return r+=String.fromCodePoint(d),t.consume(d),a;if(d===_e.colon){const h=r.toLowerCase();if(h==="http"||h==="https")return t.consume(d),l}return n(d)}function l(d){return d===_e.slash?(t.consume(d),o?c:(o=!0,l)):n(d)}function c(d){return d===_e.eof||$se(d)||gl(d)||sA(d)||Npe(d)?n(d):t.attempt(VBt,t.attempt(BBt,u),n)(d)}function u(d){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(d)}}function ddr(t,e,n){let i=0;return r;function r(s){return(s===_e.uppercaseW||s===_e.lowercaseW)&&i<3?(i++,t.consume(s),r):s===_e.dot&&i===3?(t.consume(s),o):n(s)}function o(s){return s===_e.eof?n(s):e(s)}}function hdr(t,e,n){let i,r,o;return s;function s(c){return c===_e.dot||c===_e.underscore?t.check(zBt,l,a)(c):c===_e.eof||gl(c)||sA(c)||c!==_e.dash&&Npe(c)?l(c):(o=!0,t.consume(c),s)}function a(c){return c===_e.underscore?i=!0:(r=i,i=void 0),t.consume(c),s}function l(c){return r||i||!o?n(c):e(c)}}function fdr(t,e){let n=0,i=0;return r;function r(s){return s===_e.leftParenthesis?(n++,t.consume(s),r):s===_e.rightParenthesis&&i<n?o(s):s===_e.exclamationMark||s===_e.quotationMark||s===_e.ampersand||s===_e.apostrophe||s===_e.rightParenthesis||s===_e.asterisk||s===_e.comma||s===_e.dot||s===_e.colon||s===_e.semicolon||s===_e.lessThan||s===_e.questionMark||s===_e.rightSquareBracket||s===_e.underscore||s===_e.tilde?t.check(zBt,e,o)(s):s===_e.eof||gl(s)||sA(s)?e(s):(t.consume(s),r)}function o(s){return s===_e.rightParenthesis&&i++,t.consume(s),r}}function mdr(t,e,n){return i;function i(a){return a===_e.exclamationMark||a===_e.quotationMark||a===_e.apostrophe||a===_e.rightParenthesis||a===_e.asterisk||a===_e.comma||a===_e.dot||a===_e.colon||a===_e.semicolon||a===_e.questionMark||a===_e.underscore||a===_e.tilde?(t.consume(a),i):a===_e.ampersand?(t.consume(a),o):a===_e.rightSquareBracket?(t.consume(a),r):a===_e.lessThan||a===_e.eof||gl(a)||sA(a)?e(a):n(a)}function r(a){return a===_e.eof||a===_e.leftParenthesis||a===_e.leftSquareBracket||gl(a)||sA(a)?e(a):i(a)}function o(a){return fm(a)?s(a):n(a)}function s(a){return a===_e.semicolon?(t.consume(a),i):fm(a)?(t.consume(a),s):n(a)}}function pdr(t,e,n){return i;function i(o){return t.consume(o),r}function r(o){return wf(o)?n(o):e(o)}}function UBt(t){return t===_e.eof||t===_e.leftParenthesis||t===_e.asterisk||t===_e.underscore||t===_e.leftSquareBracket||t===_e.rightSquareBracket||t===_e.tilde||gl(t)}function KBt(t){return!fm(t)}function qBt(t){return!(t===_e.slash||XRe(t))}function XRe(t){return t===_e.plusSign||t===_e.dash||t===_e.dot||t===_e.underscore||wf(t)}function sze(t){let e=t.length,n=!1;for(;e--;){const i=t[e][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const gdr={tokenize:Sdr,partial:!0};function bdr(){return{document:{[_e.leftSquareBracket]:{name:"gfmFootnoteDefinition",tokenize:xdr,continuation:{tokenize:wdr},exit:Cdr}},text:{[_e.leftSquareBracket]:{name:"gfmFootnoteCall",tokenize:_dr},[_e.rightSquareBracket]:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vdr,resolveTo:ydr}}}}function vdr(t,e,n){const i=this;let r=i.events.length;const o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s;for(;r--;){const l=i.events[r][1];if(l.type===Oe.labelImage){s=l;break}if(l.type==="gfmFootnoteCall"||l.type===Oe.labelLink||l.type===Oe.label||l.type===Oe.image||l.type===Oe.link)break}return a;function a(l){if(xt(l===_e.rightSquareBracket,"expected `]`"),!s||!s._balanced)return n(l);const c=k0(i.sliceSerialize({start:s.end,end:i.now()}));return c.codePointAt(0)!==_e.caret||!o.includes(c.slice(1))?n(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),e(l))}}function ydr(t,e){let n=t.length,i;for(;n--;)if(t[n][1].type===Oe.labelImage&&t[n][0]==="enter"){i=t[n][1];break}xt(i,"expected `labelStart` to resolve"),t[n+1][1].type=Oe.data,t[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},a={type:Oe.chunkString,contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[t[n+1],t[n+2],["enter",r,e],t[n+3],t[n+4],["enter",o,e],["exit",o,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",r,e]];return t.splice(n,t.length-n+1,...l),t}function _dr(t,e,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o=0,s;return a;function a(d){return xt(d===_e.leftSquareBracket,"expected `[`"),t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==_e.caret?n(d):(t.enter("gfmFootnoteCallMarker"),t.consume(d),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",c)}function c(d){if(o>xi.linkReferenceSizeMax||d===_e.rightSquareBracket&&!s||d===_e.eof||d===_e.leftSquareBracket||gl(d))return n(d);if(d===_e.rightSquareBracket){t.exit("chunkString");const h=t.exit("gfmFootnoteCallString");return r.includes(k0(i.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(d)}return gl(d)||(s=!0),o++,t.consume(d),d===_e.backslash?u:c}function u(d){return d===_e.leftSquareBracket||d===_e.backslash||d===_e.rightSquareBracket?(t.consume(d),o++,c):c(d)}}function xdr(t,e,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,s=0,a;return l;function l(m){return xt(m===_e.leftSquareBracket,"expected `[`"),t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===_e.caret?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",u):n(m)}function u(m){if(s>xi.linkReferenceSizeMax||m===_e.rightSquareBracket&&!a||m===_e.eof||m===_e.leftSquareBracket||gl(m))return n(m);if(m===_e.rightSquareBracket){t.exit("chunkString");const p=t.exit("gfmFootnoteDefinitionLabelString");return o=k0(i.sliceSerialize(p)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return gl(m)||(a=!0),s++,t.consume(m),m===_e.backslash?d:u}function d(m){return m===_e.leftSquareBracket||m===_e.backslash||m===_e.rightSquareBracket?(t.consume(m),s++,u):u(m)}function h(m){return m===_e.colon?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),r.includes(o)||r.push(o),$s(t,f,"gfmFootnoteDefinitionWhitespace")):n(m)}function f(m){return e(m)}}function wdr(t,e,n){return t.check(nG,e,t.attempt(gdr,e,n))}function Cdr(t){t.exit("gfmFootnoteDefinition")}function Sdr(t,e,n){const i=this;return $s(t,r,"gfmFootnoteDefinitionIndent",xi.tabSize+1);function r(o){const s=i.events[i.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===xi.tabSize?e(o):n(o)}}function Ndr(t){let n=(t||{}).singleTilde;const i={name:"strikethrough",tokenize:o,resolveAll:r};return n==null&&(n=!0),{text:{[_e.tilde]:i},insideSpan:{null:[i]},attentionMarkers:{null:[_e.tilde]}};function r(s,a){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let c=l;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[l][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[l][1].end)},d={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[l][1].start)},h=[["enter",u,a],["enter",s[c][1],a],["exit",s[c][1],a],["enter",d,a]],f=a.parser.constructs.insideSpan.null;f&&xv(h,h.length,0,Epe(f,s.slice(c+1,l),a)),xv(h,h.length,0,[["exit",d,a],["enter",s[l][1],a],["exit",s[l][1],a],["exit",u,a]]),xv(s,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type=Oe.data);return s}function o(s,a,l){const c=this.previous,u=this.events;let d=0;return h;function h(m){return xt(m===_e.tilde,"expected `~`"),c===_e.tilde&&u[u.length-1][1].type!==Oe.characterEscape?l(m):(s.enter("strikethroughSequenceTemporary"),f(m))}function f(m){const p=Vse(c);if(m===_e.tilde)return d>1?l(m):(s.consume(m),d++,f);if(d<2&&!n)return l(m);const g=s.exit("strikethroughSequenceTemporary"),y=Vse(m);return g._open=!y||y===xi.attentionSideAfter&&!!p,g._close=!p||p===xi.attentionSideAfter&&!!y,a(m)}}}class Edr{constructor(){this.map=[]}add(e,n,i){Ddr(this,e,n,i)}consume(e){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];i.push([...e]),e.length=0;let r=i.pop();for(;r;)e.push(...r),r=i.pop();this.map.length=0}}function Ddr(t,e,n,i){let r=0;if(!(n===0&&i.length===0)){for(;r<t.map.length;){if(t.map[r][0]===e){t.map[r][1]+=n,t.map[r][2].push(...i);return}r+=1}t.map.push([e,n,i])}}function kdr(t,e){xt(t[e][1].type==="table","expected table");let n=!1;const i=[];for(;e<t.length;){const r=t[e];if(n){if(r[0]==="enter")r[1].type==="tableContent"&&i.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(r[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const o=i.length-1;i[o]=i[o]==="left"?"center":"right"}}else if(r[1].type==="tableDelimiterRow")break}else r[0]==="enter"&&r[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return i}function Mdr(){return{flow:{null:{name:"table",tokenize:Ldr,resolveAll:Tdr}}}}function Ldr(t,e,n){const i=this;let r=0,o=0,s;return a;function a(T){let A=i.events.length-1;for(;A>-1;){const O=i.events[A][1].type;if(O===Oe.lineEnding||O===Oe.linePrefix)A--;else break}const R=A>-1?i.events[A][1].type:null,P=R==="tableHead"||R==="tableRow"?E:l;return P===E&&i.parser.lazy[i.now().line]?n(T):P(T)}function l(T){return t.enter("tableHead"),t.enter("tableRow"),c(T)}function c(T){return T===_e.verticalBar||(s=!0,o+=1),u(T)}function u(T){return T===_e.eof?n(T):qi(T)?o>1?(o=0,i.interrupt=!0,t.exit("tableRow"),t.enter(Oe.lineEnding),t.consume(T),t.exit(Oe.lineEnding),f):n(T):Qo(T)?$s(t,u,Oe.whitespace)(T):(o+=1,s&&(s=!1,r+=1),T===_e.verticalBar?(t.enter("tableCellDivider"),t.consume(T),t.exit("tableCellDivider"),s=!0,u):(t.enter(Oe.data),d(T)))}function d(T){return T===_e.eof||T===_e.verticalBar||gl(T)?(t.exit(Oe.data),u(T)):(t.consume(T),T===_e.backslash?h:d)}function h(T){return T===_e.backslash||T===_e.verticalBar?(t.consume(T),d):d(T)}function f(T){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(T):(t.enter("tableDelimiterRow"),s=!1,Qo(T)?(xt(i.parser.constructs.disable.null,"expected `disabled.null`"),$s(t,m,Oe.linePrefix,i.parser.constructs.disable.null.includes("codeIndented")?void 0:xi.tabSize)(T)):m(T))}function m(T){return T===_e.dash||T===_e.colon?g(T):T===_e.verticalBar?(s=!0,t.enter("tableCellDivider"),t.consume(T),t.exit("tableCellDivider"),p):N(T)}function p(T){return Qo(T)?$s(t,g,Oe.whitespace)(T):g(T)}function g(T){return T===_e.colon?(o+=1,s=!0,t.enter("tableDelimiterMarker"),t.consume(T),t.exit("tableDelimiterMarker"),y):T===_e.dash?(o+=1,y(T)):T===_e.eof||qi(T)?C(T):N(T)}function y(T){return T===_e.dash?(t.enter("tableDelimiterFiller"),_(T)):N(T)}function _(T){return T===_e.dash?(t.consume(T),_):T===_e.colon?(s=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(T),t.exit("tableDelimiterMarker"),w):(t.exit("tableDelimiterFiller"),w(T))}function w(T){return Qo(T)?$s(t,C,Oe.whitespace)(T):C(T)}function C(T){return T===_e.verticalBar?m(T):T===_e.eof||qi(T)?!s||r!==o?N(T):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(T)):N(T)}function N(T){return n(T)}function E(T){return t.enter("tableRow"),D(T)}function D(T){return T===_e.verticalBar?(t.enter("tableCellDivider"),t.consume(T),t.exit("tableCellDivider"),D):T===_e.eof||qi(T)?(t.exit("tableRow"),e(T)):Qo(T)?$s(t,D,Oe.whitespace)(T):(t.enter(Oe.data),k(T))}function k(T){return T===_e.eof||T===_e.verticalBar||gl(T)?(t.exit(Oe.data),D(T)):(t.consume(T),T===_e.backslash?M:k)}function M(T){return T===_e.backslash||T===_e.verticalBar?(t.consume(T),k):k(T)}}function Tdr(t,e){let n=-1,i=!0,r=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,l=0,c,u,d;const h=new Edr;for(;++n<t.length;){const f=t[n],m=f[1];f[0]==="enter"?m.type==="tableHead"?(a=!1,l!==0&&(xt(c,"there should be a table opening"),Tgt(h,e,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",c,e]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(i=!0,d=void 0,o=[0,0,0,0],s=[0,n+1,0,0],a&&(a=!1,u={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",u,e]])),r=m.type==="tableDelimiterRow"?2:u?3:1):r&&(m.type===Oe.data||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(i=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],d=vJ(h,e,o,r,void 0,d),o=[0,0,0,0]),s[2]=n)):m.type==="tableCellDivider"&&(i?i=!1:(o[1]!==0&&(s[0]=s[1],d=vJ(h,e,o,r,void 0,d)),o=s,s=[o[1],n,0,0])):m.type==="tableHead"?(a=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,o[1]!==0?(s[0]=s[1],d=vJ(h,e,o,r,n,d)):s[1]!==0&&(d=vJ(h,e,s,r,n,d)),r=0):r&&(m.type===Oe.data||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=n)}for(l!==0&&(xt(c,"expected table opening"),Tgt(h,e,l,c,u)),h.consume(e.events),n=-1;++n<e.events.length;){const f=e.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=kdr(e.events,n))}return t}function vJ(t,e,n,i,r,o){const s=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(xt(o,"expected previous cell enter"),o.end=Object.assign({},PO(e.events,n[0])),t.add(n[0],0,[["exit",o,e]]));const l=PO(e.events,n[1]);if(o={type:s,start:Object.assign({},l),end:Object.assign({},l)},t.add(n[1],0,[["enter",o,e]]),n[2]!==0){const c=PO(e.events,n[2]),u=PO(e.events,n[3]),d={type:a,start:Object.assign({},c),end:Object.assign({},u)};if(t.add(n[2],0,[["enter",d,e]]),xt(n[3]!==0),i!==2){const h=e.events[n[2]],f=e.events[n[3]];if(h[1].end=Object.assign({},f[1].end),h[1].type=Oe.chunkText,h[1].contentType=xi.contentTypeText,n[3]>n[2]+1){const m=n[2]+1,p=n[3]-n[2]-1;t.add(m,p,[])}}t.add(n[3]+1,0,[["exit",d,e]])}return r!==void 0&&(o.end=Object.assign({},PO(e.events,r)),t.add(r,0,[["exit",o,e]]),o=void 0),o}function Tgt(t,e,n,i,r){const o=[],s=PO(e.events,n);r&&(r.end=Object.assign({},s),o.push(["exit",r,e])),i.end=Object.assign({},s),o.push(["exit",i,e]),t.add(n+1,0,o)}function PO(t,e){const n=t[e],i=n[0]==="enter"?"start":"end";return n[1][i]}const Idr={name:"tasklistCheck",tokenize:Rdr};function Adr(){return{text:{[_e.leftSquareBracket]:Idr}}}function Rdr(t,e,n){const i=this;return r;function r(l){return xt(l===_e.leftSquareBracket,"expected `[`"),i.previous!==_e.eof||!i._gfmTasklistFirstContentOfListItem?n(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),o)}function o(l){return gl(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),s):l===_e.uppercaseX||l===_e.lowercaseX?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),s):n(l)}function s(l){return l===_e.rightSquareBracket?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):n(l)}function a(l){return qi(l)?e(l):Qo(l)?t.check({tokenize:Pdr},e,n)(l):n(l)}}function Pdr(t,e,n){return $s(t,i,Oe.whitespace);function i(r){return r===_e.eof?n(r):e(r)}}function Odr(t){return eBt([adr(),bdr(),Ndr(t),Mdr(),Adr()])}const jdr={};function Fdr(t){const e=this,n=t||jdr,i=e.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),o=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),s=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(Odr(n)),o.push(idr()),s.push(rdr(n))}function Yg({inverse:t,children:e,className:n=""}){return v.jsxDEV(CBt,{remarkPlugins:[Fdr],rehypePlugins:[[NBt,{rel:["nofollow"],target:"_blank"}]],className:Vt("react-markdown",t&&"inverse",n),children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/markdownText/index.tsx",lineNumber:14,columnNumber:3},this)}const $dr=28,Vdr=20,Bdr=6;function m$({children:t,className:e}){const n=b.Children.toArray(t).filter(Boolean),[i,r]=b.useState(!1),o=b.useRef(null),s=n.length,[a,l]=b.useState(s);let c=b.useRef();const u=[];let d=0;b.useEffect(()=>{var f,m;if(!(!((f=o.current)!=null&&f.offsetWidth)||s<=1)){d=0;for(let p=0;p<s;p++){const g=(m=o.current)==null?void 0:m.children.item(p),y=o.current.offsetWidth-(Vdr+$dr+Bdr*p);if(!(g!=null&&g.clientWidth)||(u[p]=g.clientWidth,c.current))break;d=d+u[p],y<d&&(c.current=p)}l(c.current||s)}},[o.current]);const h=f=>{f.stopPropagation(),r(!0)};return s?v.jsxDEV("div",{ref:o,className:Vt("w-full flex flex-row justify-start items-center flex-wrap gap-1",e),children:[i?t:n.slice(0,a),!i&&a<s&&v.jsxDEV(Nn,{size:"xs",variant:"light",className:"!h-6 !px-2",onClick:h,children:["+",s-a]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/overflow/overflowGroup.tsx",lineNumber:58,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/overflow/overflowGroup.tsx",lineNumber:53,columnNumber:3},this):null}const zdr=28,Hdr=20,Wdr=6;function Udr({children:t,className:e="justify-start"}){const n=b.useRef(null),i=b.Children.count(t),[r,o]=b.useState(i);let s=b.useRef();const[a,l]=b.useState(!1),c=[];let u=0;return b.useEffect(()=>{var d,h;if(!(!((d=n.current)!=null&&d.offsetWidth)||i<=1)){u=0;for(let f=0;f<i;f++){const m=(h=n.current)==null?void 0:h.children.item(f),p=n.current.offsetWidth-(Hdr+zdr+Wdr*f);if(!(m!=null&&m.clientWidth)||(c[f]=m.clientWidth,s.current))break;u=u+c[f],p<u&&(s.current=f)}o(s.current||i)}},[n.current]),i?v.jsxDEV("div",{ref:n,className:Vt("w-full flex flex-row flex-wrap gap-1",e),children:[b.Children.toArray(t).slice(0,r),r<i&&v.jsxDEV(b6,{open:a,trigger:["click"],placement:"bottomRight",onOpenChange:d=>l(d),dropdownRender:()=>v.jsxDEV(uo,{className:"overflow_menu-dropdown",onClick:()=>l(!1),children:v.jsxDEV("div",{className:"flex flex-col justify-start gap-1",children:b.Children.toArray(t).slice(r)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/overflow/overflowMenu.tsx",lineNumber:61,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/overflow/overflowMenu.tsx",lineNumber:60,columnNumber:7},this),children:v.jsxDEV(vn,{icon:v.jsxDEV(aAt,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/overflow/overflowMenu.tsx",lineNumber:67,columnNumber:20},this),size:"small"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/overflow/overflowMenu.tsx",lineNumber:67,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/overflow/overflowMenu.tsx",lineNumber:54,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/overflow/overflowMenu.tsx",lineNumber:51,columnNumber:3},this):null}function Igt({avatar:t,username:e,children:n}){return v.jsxDEV("section",{className:"w-full flex flex-row items-start gap-2 p-4 even:bg-stone-100",children:[v.jsxDEV("div",{className:"bg-neutral-200 min-w-[32px] min-h-[32px] w-8 h-8 flex flex-col justify-center items-center rounded",children:t||e?v.jsxDEV("div",{className:"min-w-[32px] min-h-[32px] w-8 h-8 flex flex-col justify-center items-center rounded overflow-hidden",children:v.jsxDEV(BS,{src:t||`https://ui-avatars.com/api/?name=${e}&background=868E961A&color=868E96&size=224`,preview:!1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/MessageWrapper.tsx",lineNumber:16,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/MessageWrapper.tsx",lineNumber:15,columnNumber:6},this):v.jsxDEV(f$e,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/MessageWrapper.tsx",lineNumber:25,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/MessageWrapper.tsx",lineNumber:13,columnNumber:4},this),v.jsxDEV("article",{className:"w-full flex flex-col justify-start items-start gap-1",children:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/MessageWrapper.tsx",lineNumber:28,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/MessageWrapper.tsx",lineNumber:12,columnNumber:3},this)}function Kdr({project:t,conversationId:e,customer:n,message:i}){var h;const r=Mt(),o=Je.useContext(),s=b.useRef(),a=Je.voteInternal.useMutation(),l=Wd(Cpe),c=b.useMemo(()=>i.source.sort((f,m)=>f.score>m.score?-1:1),[i.source]);if(i.role==="system")return null;if(i.role==="user"||!t){const f=n&&[n==null?void 0:n.firstName,n==null?void 0:n.lastName].join(" ").trim();return v.jsxDEV(Igt,{avatar:n==null?void 0:n.avatar,username:f,children:[v.jsxDEV("div",{className:"flex flex-row gap-1",children:[!!(f!=null&&f.length)&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Fn.Text,{className:"!text-xs !text-slate-500 whitespace-nowrap",children:f},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:49,columnNumber:8},this),v.jsxDEV(Fn.Text,{className:"!text-xs !text-slate-500",children:"-"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:52,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:48,columnNumber:7},this),v.jsxDEV("time",{className:"text-xs text-slate-500",children:v.jsxDEV(Prt,{value:i.createdAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:56,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:55,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:46,columnNumber:5},this),v.jsxDEV(Fn.Text,{children:i.content},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:59,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:45,columnNumber:4},this)}const u=async f=>{try{if(a.isLoading)return;s.current=f,await a.mutateAsync({conversationId:e,messageId:`${i._id}`,vote:f}),o.getConversation.invalidate({conversationId:e}),o.getConversations.invalidate()}catch{Ei.error({placement:"bottomRight",message:r.formatMessage({id:"conversations.overview.internal_vote.notification.failed",defaultMessage:"We cannot register your vote right now. Please try again later or contact our support."})})}},d=!!t.disabledAt;return v.jsxDEV(Igt,{avatar:(h=t.agent)==null?void 0:h.avatar,children:[v.jsxDEV("header",{className:"w-full flex flex-row justify-between items-center mb-1",children:[v.jsxDEV("div",{className:"h-full flex flex-row justify-start items-center gap-2",children:[v.jsxDEV("div",{className:"flex flex-row gap-1",children:[v.jsxDEV(Fn.Text,{className:"!text-xs !text-slate-500 whitespace-nowrap",children:t.agent.name},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:92,columnNumber:7},this),v.jsxDEV(Fn.Text,{className:"!text-xs !text-slate-500",children:"-"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:95,columnNumber:7},this),v.jsxDEV("time",{className:"text-xs text-slate-500",children:v.jsxDEV(Prt,{value:i.createdAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:97,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:96,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:91,columnNumber:6},this),i.vote&&v.jsxDEV(kv,{color:i.vote==="positive"?"green":"red",children:[i.vote==="positive"&&v.jsxDEV(ee,{id:"conversation.message.user_vote.positive",defaultMessage:"Positive user review"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:103,columnNumber:9},this),i.vote==="negative"&&v.jsxDEV(ee,{id:"conversation.message.user_vote.negative",defaultMessage:"Negative user review"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:109,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:101,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:90,columnNumber:5},this),v.jsxDEV(Udr,{className:"flex flex-row justify-end gap-2",children:[v.jsxDEV(Mc.Group,{size:"small",value:i.internalVote,onChange:f=>u(f.target.value),id:"internalVoteGroup",children:[v.jsxDEV(Vs,{title:r.formatMessage({id:"conversations.overview.message.actions.vote.positive.tooltip",defaultMessage:"Vote response as good"}),children:v.jsxDEV(Mc.Button,{value:"positive","aria-label":r.formatMessage({id:"conversations.overview.message.actions.vote.positive.aria_label",defaultMessage:"Vote response as good"}),className:Vt("[&.ant-radio-button-wrapper-checked]:!border-green-500","[&.ant-radio-button-wrapper-checked]:!bg-green-100 [&.ant-radio-button-wrapper-checked]:!text-green-500"),children:s.current==="positive"&&a.isLoading?v.jsxDEV(Xd,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:142,columnNumber:10},this):v.jsxDEV(Yhe,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:144,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:130,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:124,columnNumber:7},this),v.jsxDEV(Vs,{title:r.formatMessage({id:"conversations.overview.message.actions.vote.negative.tooltip",defaultMessage:"Vote response as bad"}),children:v.jsxDEV(Mc.Button,{value:"negative","aria-label":r.formatMessage({id:"conversations.overview.message.actions.vote.negative.aria_label",defaultMessage:"Vote response as bad"}),className:Vt("[&.ant-radio-button-wrapper-checked]:!border-red-500 [&.ant-radio-button-wrapper-checked]:before:!bg-red-500","[&.ant-radio-button-wrapper-checked]:!bg-red-100 [&.ant-radio-button-wrapper-checked]:!text-red-500"),children:s.current==="negative"&&a.isLoading?v.jsxDEV(Xd,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:166,columnNumber:10},this):v.jsxDEV(Ghe,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:168,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:154,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:148,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:118,columnNumber:6},this),v.jsxDEV(vn,{size:"small",icon:v.jsxDEV(oAt,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:177,columnNumber:13},this),id:"improveAnswerButton",type:i.documentId?"primary":"default",onClick:()=>l({type:"improve_answer",messageId:`${i._id}`}),disabled:d||t.projectType==="aiForm"&&!(c!=null&&c.length),children:[" ",i.documentId&&v.jsxDEV(ee,{id:"conversations.overview.message.actions.improve_answer.has_been_improved",defaultMessage:"Show improvement",description:"Show button to open modal where use can see and edit improved answer"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:187,columnNumber:8},this),!i.documentId&&v.jsxDEV(ee,{id:"conversations.overview.message.actions.improve_answer.not_improved",defaultMessage:"Improve answer",description:"Show button to open modal where use can improve answer"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:194,columnNumber:8},this)]},"improveAnswerButton",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:174,columnNumber:6},this),v.jsxDEV(vn,{size:"small",icon:v.jsxDEV(qhe,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:204,columnNumber:13},this),id:"changeTrainingDocumentsButton",onClick:()=>l({type:"change_training_documents",messageId:`${i._id}`}),disabled:d||!(c!=null&&c.length),children:[" ",v.jsxDEV(ee,{id:"conversations.overview.message.actions.change_training_documents",defaultMessage:"Training documents"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:212,columnNumber:7},this)]},"changeTrainingDocumentsButton",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:201,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:117,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:89,columnNumber:4},this),v.jsxDEV(Yg,{children:i.content},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:219,columnNumber:4},this),v.jsxDEV("footer",{className:"w-full overflow-x-hidden mt-2",children:v.jsxDEV(m$,{children:c.map(f=>{let m=f.title||f.url||"";if(m=`${m.slice(0,48)}${m.length>48?"...":""}`,f.type==="website")return v.jsxDEV(Vs,{color:"red",trigger:f.deletedAt?["hover"]:[],title:r.formatMessage({id:"conversations.overview.message.tags.tooltip.deleted",defaultMessage:"Resource has been deleted.",description:"Explain to user why tag is red and has icon"}),children:v.jsxDEV(vn,{size:"small",target:"_blank",href:f.url,className:"!truncate",rel:"noopener noreferrer",danger:!!f.deletedAt,icon:!!f.deletedAt&&v.jsxDEV(xke,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:247,columnNumber:39},this),children:[" ",m]},f._id,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:239,columnNumber:10},this)},f._id,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:229,columnNumber:9},this);const p=!(f!=null&&f.newVersionId)&&!!f.deletedAt;return v.jsxDEV(Vs,{color:p?"red":"default",title:p?r.formatMessage({id:"conversations.overview.message.tags.tooltip.deleted",defaultMessage:"Resource has been deleted.",description:"Explain to user why tag is red and has icon"}):r.formatMessage({id:"conversations.overview.message.tags.tooltip.hidden",defaultMessage:"This resource is not visible in the widget",description:"Explain to user this source won't be visible to the users"}),children:v.jsxDEV(vn,{size:"small",danger:p,className:"!truncate",icon:p?v.jsxDEV(xke,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:282,columnNumber:28},this):v.jsxDEV(jhe,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:282,columnNumber:60},this),onClick:()=>l({type:"change_training_documents",messageId:`${i._id}`,sourceId:`${f._id}`}),children:m},f._id,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:277,columnNumber:9},this)},f._id,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:259,columnNumber:8},this)})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:221,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:220,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/message/index.tsx",lineNumber:88,columnNumber:3},this)}function qdr({conversationId:t,goToNextConversation:e}){var p;const n=Mt(),i=Je.useUtils(),[r,o]=f0(Cpe),{data:s,isLoading:a}=Je.getConversation.useQuery({conversationId:t},{enabled:!!t}),{data:l}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0}),c=Je.toggleReviewState.useMutation(),u=!!(s!=null&&s.deleted),d=!!((p=s==null?void 0:s.reviewedBy)!=null&&p.length),h=async()=>{try{if(!t)return;await c.mutateAsync({conversationId:t}),d||e(),i.getConversation.invalidate(),i.getConversations.invalidate(),Ei.success({placement:"bottomRight",message:n.formatMessage({id:"conversations.overview.mark_as_reviewed.succeeded",defaultMessage:"Conversation marked as reviewed."})})}catch{Ei.error({placement:"bottomRight",message:n.formatMessage({id:"conversations.overview.mark_as_reviewed.failed",defaultMessage:"Something went wrong while marking the conversation as reviewed. Please try again later."})})}};if(a&&t)return v.jsxDEV(uo,{title:v.jsxDEV("header",{className:"w-full flex flex-row justify-between p-4",children:v.jsxDEV("div",{className:"w-3/12",children:v.jsxDEV(ja,{paragraph:!1,active:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:75,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:74,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:73,columnNumber:6},this),bordered:!1,className:Vt("conversation_overview w-full flex flex-col justify-start",r&&"is_grouped"),children:v.jsxDEV("div",{className:"w-full flex flex-col justify-start gap-4",children:[v.jsxDEV(ja,{paragraph:{rows:2},className:"p-4",active:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:86,columnNumber:6},this),v.jsxDEV(ja,{paragraph:{rows:2},className:"p-4 bg-gray-50",active:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:87,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:85,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:71,columnNumber:4},this);const f=!!(l!=null&&l.disabledAt)||u;if(!s)return v.jsxDEV(wh,{image:"/img/svg/empty_inbox.svg",className:"conversation_overview-empty w-full h-full flex flex-col justify-center pb-8 p-4",description:n.formatMessage({id:"conversations.overview.fallback",defaultMessage:"Select a conversation to get started",description:"Fallback message when user hasn't selected a conversation"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:97,columnNumber:4},this);const m=n.formatDate(s==null?void 0:s.createdAt,{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1});return v.jsxDEV(uo,{title:v.jsxDEV("header",{className:"w-full flex flex-col xs:flex-row gap-2 justify-between items-center p-4",children:[v.jsxDEV("div",{className:"flex flex-col justify-between items-center xs:items-start",children:[v.jsxDEV("h1",{className:"strong w-max whitespace-nowrap",children:m.replace(", "," - ")},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:123,columnNumber:7},this),v.jsxDEV(Fn.Text,{type:"secondary",className:"!text-xs",children:v.jsxDEV(ee,{id:"conversations.overview.header.session_id",defaultMessage:"Session id: {sessionId}",values:{sessionId:s==null?void 0:s.sessionId}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:125,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:124,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:122,columnNumber:6},this),v.jsxDEV(aS,{children:[v.jsxDEV(Vs,{trigger:f?[]:["hover"],title:n.formatMessage({id:"conversations.overview.message.actions.add_training_documents",defaultMessage:"Add training document"}),children:v.jsxDEV(vn,{icon:v.jsxDEV(X2t,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:141,columnNumber:15},this),id:"addResourceButton",onClick:()=>o({type:"add_training_documents"}),disabled:f},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:140,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:133,columnNumber:7},this),v.jsxDEV(Vs,{trigger:f?[]:["hover"],title:n.formatMessage({id:"conversations.overview.message.actions.change_prompt.tooltip",defaultMessage:"Change prompt"}),children:v.jsxDEV(vn,{icon:v.jsxDEV(nAt,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:155,columnNumber:15},this),id:"changePromptButton",disabled:f,onClick:()=>o({type:"change_prompt"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:154,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:147,columnNumber:7},this),v.jsxDEV(Vs,{title:n.formatMessage({id:"conversations.overview.message.actions.details.tooltip",defaultMessage:"Conversation details"}),children:v.jsxDEV(vn,{icon:v.jsxDEV(rAt,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:168,columnNumber:15},this),id:"conversationDetailsButton",disabled:f,onClick:()=>o({type:"conversation_detail"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:167,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:161,columnNumber:7},this),v.jsxDEV(vn,{disabled:u,id:"markAsReviewedButton",className:"w-fit self-end",onClick:h,type:d?"default":"primary",icon:d?v.jsxDEV(jhe,{className:"mr-2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:182,columnNumber:10},this):v.jsxDEV(JK,{className:"mr-2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:184,columnNumber:10},this),children:[!d&&v.jsxDEV(ee,{id:"conversations.overview.header.button.mark_as_reviewed",defaultMessage:"Mark as reviewed"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:189,columnNumber:9},this),d&&v.jsxDEV(ee,{id:"conversations.overview.header.button.mark_as_unreviewed",defaultMessage:"Mark as unreviewed"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:195,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:174,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:132,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:121,columnNumber:5},this),bordered:!1,className:Vt("conversation_overview w-full flex flex-col justify-start !shadow-xl",r&&"is_grouped"),children:[s.deleted&&v.jsxDEV(Zd,{className:"mt-24 mx-auto",src:"/img/svg/deleted_project.svg",title:n.formatMessage({id:"conversations.overview.is_deleted",defaultMessage:"Conversation has been deleted"}),description:s.deleted.deletedReason==="GDPR_RETENTION"?n.formatMessage({id:"conversations.overview.deleted",defaultMessage:"The conversation was deleted due to your project's data retention settings."}):void 0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:210,columnNumber:29},this),!u&&(s==null?void 0:s.messages.map(g=>v.jsxDEV(Kdr,{conversationId:s._id,customer:s.customer,message:g,project:l},`${g._id}`,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:227,columnNumber:5},this)))]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/Overview/index.tsx",lineNumber:119,columnNumber:3},this)}const Gdr=1200;function Ydr({organization:t,isHidden:e,onCancel:n,onNext:i}){var s;const r=Mt(),o=wPt({from:new Date,by:((s=t==null?void 0:t.permissions)==null?void 0:s.conversationHistory)||30});return v.jsxDEV("section",{className:e?"hidden":"",children:[v.jsxDEV(Ut.Item,{name:"dateRange",label:r.formatMessage({id:"conversations.export.filters.date_range.label",defaultMessage:"Date range"}),children:v.jsxDEV(Spe,{organization:t,className:"w-full",size:"large",allowClear:!0,disabledDate:a=>a&&a<An(o).endOf("day")},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:35,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:28,columnNumber:4},this),v.jsxDEV(Ut.Item,{name:"isReviewed",label:r.formatMessage({id:"conversations.export.filters.un_reviewed.label",defaultMessage:"Review status"}),children:v.jsxDEV(Mc.Group,{className:"w-full",size:"large",buttonStyle:"solid",children:[v.jsxDEV(Mc.Button,{value:!1,className:"w-1/3 text-center",children:v.jsxDEV(ee,{id:"conversations.export.filters.un_reviewed.un_reviewed_only",defaultMessage:"Unreviewed"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:53,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:52,columnNumber:6},this),v.jsxDEV(Mc.Button,{value:!0,className:"w-1/3 text-center",children:v.jsxDEV(ee,{id:"conversations.export.filters.un_reviewed.reviewed_only",defaultMessage:"Reviewed"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:59,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:58,columnNumber:6},this),v.jsxDEV(Mc.Button,{value:void 0,className:"w-1/3 text-center",children:v.jsxDEV(ee,{id:"conversations.export.filters.un_reviewed.all",defaultMessage:"All"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:65,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:64,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:51,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:44,columnNumber:4},this),v.jsxDEV(Ut.Item,{name:"vote",label:r.formatMessage({id:"conversations.export.filters.votes.label",defaultMessage:"Votes"}),children:v.jsxDEV(Lo,{size:"large",options:O9t.map(a=>({...a,label:r.formatMessage(a.label)}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:77,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:70,columnNumber:4},this),v.jsxDEV(Ut.Item,{name:"languages",label:r.formatMessage({id:"conversations.export.filters.languages.label",defaultMessage:"Languages"}),children:v.jsxDEV(u$,{size:"large",mode:"multiple",placeholder:r.formatMessage({id:"conversations.export.filters.languages.placeholder",defaultMessage:"Show all languages"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:92,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:85,columnNumber:4},this),v.jsxDEV("footer",{className:"flex flex-row justify-end gap-2",children:[v.jsxDEV(vn,{onClick:n,children:v.jsxDEV(ee,{id:"conversations.export.filters.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:103,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:102,columnNumber:5},this),v.jsxDEV(vn,{type:"primary",onClick:i,children:v.jsxDEV(ee,{id:"conversations.export.filters.next",defaultMessage:"Next"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:106,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:105,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:101,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ConversationFilters.tsx",lineNumber:27,columnNumber:3},this)}function Xdr({filters:t,isHidden:e,onCancel:n}){const i=Mt(),r=1e4,o=Je.totalExportedConversations.useQuery(t);return v.jsxDEV("section",{className:e?"hidden":"",children:[v.jsxDEV("div",{className:"flex flex-col mb-4",children:[!o.isLoading&&!!o.data&&v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"conversations.export.settings.description",defaultMessage:"You've chosen {total, plural, =1 {# conversation} other {# conversations}} that will be exported.",values:{total:Math.min(o.data||0,r)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:26,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:25,columnNumber:6},this),!o.isLoading&&!o.data&&v.jsxDEV(pl,{message:i.formatMessage({id:"conversations.export.settings.alert_no_imports",defaultMessage:"Your current filters won't export any conversations. Adjust your filters to export any conversations."}),type:"error"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:34,columnNumber:6},this),(o.data||0)>r&&v.jsxDEV(Fn.Text,{type:"danger",children:v.jsxDEV(ee,{id:"conversations.export.settings.limited_export",defaultMessage:"You have {total, plural, =1 {# conversation} other {# conversations}} that won't be included in the export since you can only export {maxExport} conversations at once.",values:{total:(o.data||0)-r,maxExport:i.formatNumber(r)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:45,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:44,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:23,columnNumber:4},this),v.jsxDEV(Ut.Item,{name:"format",label:i.formatMessage({id:"conversations.export.settings.format.label",defaultMessage:"Export format"}),children:v.jsxDEV(Mc.Group,{className:"w-full",size:"large",buttonStyle:"solid",children:[v.jsxDEV(Mc.Button,{value:"csv",className:"w-1/2 text-center",children:v.jsxDEV(ee,{id:"conversations.export.settings.format.csv",defaultMessage:"CSV"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:65,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:64,columnNumber:6},this),v.jsxDEV(Mc.Button,{value:"json",className:"w-1/2 text-center",children:v.jsxDEV(ee,{id:"conversations.export.settings.format.json",defaultMessage:"JSON"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:68,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:67,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:63,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:56,columnNumber:4},this),v.jsxDEV(Ut.Item,{name:"exportStyle",label:i.formatMessage({id:"conversations.export.settings.export_style.label",defaultMessage:"Export style"}),children:v.jsxDEV(Mc.Group,{className:"w-full",size:"large",buttonStyle:"solid",children:[v.jsxDEV(Mc.Button,{value:"raw",className:"w-1/2 text-center",children:v.jsxDEV(ee,{id:"conversations.export.settings.export_style",defaultMessage:"Raw"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:82,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:81,columnNumber:6},this),v.jsxDEV(Mc.Button,{value:"questionAndAnswer",className:"w-1/2 text-center",children:v.jsxDEV(ee,{id:"conversations.export.settings.export_style",defaultMessage:"Question and answer"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:85,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:84,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:80,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:73,columnNumber:4},this),v.jsxDEV(Ut.Item,{name:"includeSources",valuePropName:"checked",label:i.formatMessage({id:"conversations.export.settings.include_sources.label",defaultMessage:"Include used training documents"}),rootClassName:"conversation_export-horizontal-switch",children:v.jsxDEV(nq,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:101,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:92,columnNumber:4},this),v.jsxDEV("footer",{className:"flex flex-row justify-end gap-2",children:[v.jsxDEV(vn,{onClick:n,children:v.jsxDEV(ee,{id:"conversations.export.settings.back",defaultMessage:"Back"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:105,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:104,columnNumber:5},this),v.jsxDEV(vn,{type:"primary",htmlType:"submit",disabled:!o.data,children:v.jsxDEV(ee,{id:"conversations.export.settings.next",defaultMessage:"Next"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:108,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:107,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:103,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ExportSettings.tsx",lineNumber:22,columnNumber:3},this)}function Zdr({isLoading:t,isError:e,onClose:n}){const i=Mt();return e?v.jsxDEV(fd,{status:"error",title:i.formatMessage({id:"conversations.export.processing_screen.error.title",defaultMessage:"The export encountered an issue"}),subTitle:i.formatMessage({id:"conversations.export.processing_screen.error.description",defaultMessage:"Sorry, we couldn't create your export this time around. Feel free to give it another shot later or reach out to us for assistance."}),extra:v.jsxDEV(vn,{type:"primary",onClick:n,children:v.jsxDEV(ee,{id:"conversations.export.processing_screen.error.close",defaultMessage:"close"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ProcessingScreen.tsx",lineNumber:29,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ProcessingScreen.tsx",lineNumber:28,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ProcessingScreen.tsx",lineNumber:16,columnNumber:4},this):t?v.jsxDEV(fd,{status:"success",title:i.formatMessage({id:"conversations.export.processing_screen.loading",defaultMessage:"We are preparing your download..."}),subTitle:i.formatMessage({id:"conversations.export.processing_screen.loading.second",defaultMessage:"It will be ready in a few seconds"}),icon:v.jsxDEV("div",{className:"!h-48 conversation_export-download_animation",children:v.jsxDEV("img",{src:"/img/svg/downloading.svg",className:"h-full"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ProcessingScreen.tsx",lineNumber:76,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ProcessingScreen.tsx",lineNumber:75,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ProcessingScreen.tsx",lineNumber:64,columnNumber:3},this):v.jsxDEV(fd,{status:"success",title:i.formatMessage({id:"conversations.export.processing_screen.success.title",defaultMessage:"Download is ready"}),subTitle:i.formatMessage({id:"conversations.export.processing_screen.success.description",defaultMessage:"Your export has been successfully downloaded."}),extra:v.jsxDEV(vn,{type:"primary",onClick:n,children:v.jsxDEV(ee,{id:"conversations.export.processing_screen.success.close",defaultMessage:"close"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ProcessingScreen.tsx",lineNumber:53,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ProcessingScreen.tsx",lineNumber:52,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/ProcessingScreen.tsx",lineNumber:41,columnNumber:4},this)}function Qdr({isOpen:t,filters:e,onClose:n}){const i=Mt(),[r]=Ut.useForm(),[o,s]=b.useState(0),{data:a}=Je.getOrganization.useQuery(void 0,{staleTime:1/0}),l=Je.exportConversations.useMutation(),c={format:"csv",exportStyle:"raw"},u=async()=>{s(o+1);try{const h=r.getFieldsValue(),f=await l.mutateAsync(h),m=i.formatMessage({id:"conversations.export.file_name",defaultMessage:"conversations_export"});V$e({file:f,fileName:m,format:h.format})}catch{}},d=()=>{o===2&&l.isLoading||n()};if(b.useEffect(()=>{s(0),r.setFieldsValue({...e,...c})},[t]),!!a)return a.permissions.conversationExport?v.jsxDEV(Ma,{open:t,footer:null,destroyOnClose:!0,closeIcon:null,onCancel:d,title:o!==2&&i.formatMessage({id:"conversations.export.header.title",defaultMessage:"Export conversations"}),children:[o!==2&&v.jsxDEV("header",{className:"my-4",children:v.jsxDEV(p$e,{size:"small",current:o,onChange:s,items:[{title:i.formatMessage({id:"conversations.export.steps.filters",defaultMessage:"Filter conversations"})},{title:i.formatMessage({id:"conversations.export.steps.filters",defaultMessage:"Export conversations"})}]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/index.tsx",lineNumber:98,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/index.tsx",lineNumber:97,columnNumber:5},this),v.jsxDEV(Ut,{form:r,requiredMark:!1,initialValues:{...e,...c},layout:"vertical",onFinish:u,children:[v.jsxDEV(Ydr,{onCancel:n,organization:a,isHidden:o!==0,onNext:()=>s(o+1)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/index.tsx",lineNumber:127,columnNumber:5},this),v.jsxDEV(Xdr,{isHidden:o!==1,filters:r.getFieldsValue(),onCancel:()=>s(o-1)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/index.tsx",lineNumber:133,columnNumber:5},this),o===2&&v.jsxDEV(Zdr,{isLoading:l.isLoading,isError:l.isError,onClose:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/index.tsx",lineNumber:139,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/index.tsx",lineNumber:120,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/index.tsx",lineNumber:85,columnNumber:3},this):v.jsxDEV(Ma,{open:t,onCancel:d,closeIcon:null,destroyOnClose:!0,footer:null,children:v.jsxDEV(fd,{icon:v.jsxDEV("img",{src:"/img/svg/upgrade_step_up.svg",className:"h-32"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/index.tsx",lineNumber:64,columnNumber:12},this),title:i.formatMessage({id:"conversations.export.lock.title",defaultMessage:"Upgrade your plan"}),subTitle:i.formatMessage({id:"conversations.export.lock.description",defaultMessage:"Upgrade your plan to export conversations in multiple formats, See your agents interactions and providing increased flexibility and possibilities for data analysis."}),extra:v.jsxDEV(vn,{type:"primary",href:"/billing",children:v.jsxDEV(ee,{id:"conversations.export.lock.button",defaultMessage:"Upgrade plan"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/index.tsx",lineNumber:76,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/index.tsx",lineNumber:75,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/index.tsx",lineNumber:63,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/ExportConversations/index.tsx",lineNumber:62,columnNumber:4},this)}function Jdr(){var A,R;const t=Mt(),e=Gp(),n=Qr(),i=mPt(),[r]=Bv(),[o,s]=b.useState(!1),[a,l]=b.useState(-1),[c,u]=b.useState(!1),d=If(),h=Wd(Cpe),[f,m]=b.useState({vote:"all",isReviewed:!1}),[p,g]=b.useState(d.conversationId),{data:y,isInitialLoading:_,isLoading:w,fetchNextPage:C}=Je.getConversations.useInfiniteQuery({...f,sort:a,populate:!0},{getNextPageParam:P=>{var V,F,$;if(!P||!((V=P==null?void 0:P.data)!=null&&V.length))return;const O=($=P==null?void 0:P.data)==null?void 0:$[((F=P==null?void 0:P.data)==null?void 0:F.length)-1];return{_id:O._id,createdAt:O.createdAt}},keepPreviousData:!0}),N=b.useMemo(()=>(y==null?void 0:y.pages.flatMap(P=>P.data))||[],[y==null?void 0:y.pages]),E=i.width<Gdr;ga(t.formatMessage({id:"conversations.page.title",defaultMessage:"Conversation history - Chathive"})),b.useEffect(()=>{var P;if(!(d.conversationId||p||!((P=y==null?void 0:y.pages[0])!=null&&P.total))){if(E)return u(!0);D(y==null?void 0:y.pages[0].data[0]._id)}},[d,y]),b.useEffect(()=>{u(r.get("listOpen")==="true")},[r]);const D=P=>{const O=e.pathname.split("/conversations")[0];h(void 0),g(P),n(`${O}/conversations/${P}`)},k=P=>{u(!1),D(P)},M=()=>{const P=N.findIndex(V=>V._id===p),O=P===-1?0:P+1;N[O]&&g(N[O]._id)},T=[{key:"conversation_intro.list",selector:"#conversationList",url:`/${d.projectId}/conversations/${d.conversationId}?listOpen=true`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Fn.Text,{strong:!0,className:"mb-2",children:v.jsxDEV(ee,{id:"conversation.walkthrough.list.title",defaultMessage:"View conversation history"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:101,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:100,columnNumber:6},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"conversation.walkthrough.list.description",defaultMessage:"Explore the complete history of user interactions with your chatbot."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:107,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:106,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:99,columnNumber:5},this)},{key:"conversation_intro.filter",selector:"#conversationListFilter",url:`/${d.projectId}/conversations/${d.conversationId}?listOpen=true`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Fn.Text,{strong:!0,className:"mb-2",children:v.jsxDEV(ee,{id:"conversation.walkthrough.list_filter.title",defaultMessage:"Filters"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:122,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:121,columnNumber:6},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"conversation.walkthrough.list_filter.description",defaultMessage:"By default, we only display your unreviewed conversations."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:125,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:124,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:120,columnNumber:5},this)},{key:"conversation_intro.personal_feedback",selector:"#internalVoteGroup",url:`/${d.projectId}/conversations/${d.conversationId}?listOpen=false`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Fn.Text,{strong:!0,className:"mb-2",children:v.jsxDEV(ee,{id:"conversation.walkthrough.personal_feedback.title",defaultMessage:"Give the answer a thumbs up or down"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:140,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:139,columnNumber:6},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"conversation.walkthrough.personal_feedback.description",defaultMessage:"Rate the performance of your chatbot to receive better insights of your bot's performance."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:146,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:145,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:138,columnNumber:5},this)},{key:"conversation_intro.improve_answer",selector:"#improveAnswerButton",content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Fn.Text,{strong:!0,className:"mb-2",children:v.jsxDEV(ee,{id:"conversation.walkthrough.improve_answer.title",defaultMessage:"Refine the chatbot's answers"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:160,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:159,columnNumber:6},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"conversation.walkthrough.improve_answer.description",defaultMessage:"Refine your chatbot's answers in real-time as the conversation unfolds."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:166,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:165,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:158,columnNumber:5},this)},{key:"conversation_intro.change_resources",selector:"#changeTrainingDocumentsButton",content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Fn.Text,{strong:!0,className:"mb-2",children:v.jsxDEV(ee,{id:"conversation.walkthrough.change_training_documents.title",defaultMessage:"Change training documents"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:180,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:179,columnNumber:6},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"conversation.walkthrough.change_training_documents.description",defaultMessage:"If the resources added to the chatbot's answers are incorrect, make immediate changes and optimizations your training documents from here."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:186,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:185,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:178,columnNumber:5},this)},{key:"conversation_intro.add_training_documents",selector:"#addResourceButton",content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Fn.Text,{strong:!0,className:"mb-2",children:v.jsxDEV(ee,{id:"conversation.walkthrough.add_training_documents.title",defaultMessage:"Add training documents"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:200,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:199,columnNumber:6},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"conversation.walkthrough.add_training_documents.description",defaultMessage:"Or you can add new relevant training documents that will immediately be added to your dataset."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:206,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:205,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:198,columnNumber:5},this)},{key:"conversation_intro.change_prompt",selector:"#changePromptButton",content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Fn.Text,{strong:!0,className:"mb-2",children:v.jsxDEV(ee,{id:"conversation.walkthrough.change_prompt.title",defaultMessage:"Modify prompt message"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:220,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:219,columnNumber:6},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"conversation.walkthrough.change_prompt.description",defaultMessage:"If the agent didn’t behave like you expected, you can modify the behavior by writing specific instructions in the prompt message."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:226,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:225,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:218,columnNumber:5},this)},{key:"conversation_intro.conversation_details",selector:"#conversationDetailsButton",content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Fn.Text,{strong:!0,className:"mb-2",children:v.jsxDEV(ee,{id:"conversation.walkthrough.conversationDetails.title",defaultMessage:"See the details about your conversation"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:240,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:239,columnNumber:6},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"conversation.walkthrough.conversationDetails.description",defaultMessage:"When provided, the conversation details will display customer information and lead generation fields within the conversation detail drawer."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:246,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:245,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:238,columnNumber:5},this)},{key:"conversation_intro.mark_as_reviewed",selector:"#markAsReviewedButton",content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Fn.Text,{strong:!0,className:"mb-2",children:v.jsxDEV(ee,{id:"conversation.walkthrough.mark_as_reviewed.title",defaultMessage:"Mark the conversation as reviewed"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:260,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:259,columnNumber:6},this),v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"conversation.walkthrough.mark_as_reviewed.description",defaultMessage:"When you're done reviewing the conversation, mark it as reviewed to remove it from the list."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:266,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:265,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:258,columnNumber:5},this)}];return v.jsxDEV(S6,{steps:T,isDisabled:!((A=y==null?void 0:y.pages[0])!=null&&A.total),walkthroughType:"conversationIntroduction",children:v.jsxDEV("section",{className:Vt("w-full h-full max-h-full max-w-full flex-row gap-2 sm:gap-4 static",!E&&"flex"),children:[E&&!c&&v.jsxDEV(vn,{icon:v.jsxDEV(pAt,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:286,columnNumber:13},this),onClick:()=>u(!0),className:"!absolute !h-16 top-10 md:top-8 -left-0 !rounded-r-lg !rounded-l-none z-10"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:285,columnNumber:6},this),(!E||c)&&v.jsxDEV(zrr,{sort:a,filter:f,isLoading:w,conversations:N,total:((R=y==null?void 0:y.pages[0])==null?void 0:R.total)||0,onSortChange:l,fetchNextPage:C,isSmallScreen:E,onFilterChange:m,onClick:k,selectedId:p,isInitialLoading:_,onExportOpen:()=>s(!0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:292,columnNumber:6},this),(!E||!c)&&v.jsxDEV("div",{className:"w-full h-full max-h-full max-w-full flex flex-row !static",children:[v.jsxDEV(qdr,{conversationId:p,goToNextConversation:M},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:310,columnNumber:7},this),v.jsxDEV($rr,{conversationId:p,isSmallScreen:E},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:314,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:309,columnNumber:6},this),v.jsxDEV(Qdr,{isOpen:o,filters:f,onClose:()=>s(!1)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:317,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:278,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/Conversations/index.tsx",lineNumber:277,columnNumber:3},this)}function ehr({dateRange:t}){const e=Mt(),{projectId:n}=If(),{data:i,isLoading:r,isError:o}=Je.getProjectConversationStats.useQuery({dateRange:t},{staleTime:3e5});function s(){return o?v.jsxDEV(pl,{message:e.formatMessage({id:"project_dashboard.analytics_summary.error",defaultMessage:"Something went wrong while loading data."}),type:"error"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/AnalyticsSummary.tsx",lineNumber:26,columnNumber:5},this):r?v.jsxDEV(ja,{active:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/AnalyticsSummary.tsx",lineNumber:36,columnNumber:34},this):v.jsxDEV("div",{className:"flex flex-row justify-between sm:justify-around gap-8 flex-wrap",children:[v.jsxDEV(gv,{title:e.formatMessage({id:"project_dashboard.analytics_summary.total_conversations.title",defaultMessage:"Conversations"}),value:i.totalConversations,precision:0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/AnalyticsSummary.tsx",lineNumber:40,columnNumber:5},this),v.jsxDEV(gv,{title:e.formatMessage({id:"project_dashboard.analytics_summary.total_messages.title",defaultMessage:"Messages sent"}),value:i.totalMessages,precision:0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/AnalyticsSummary.tsx",lineNumber:48,columnNumber:5},this),v.jsxDEV(gv,{title:e.formatMessage({id:"project_dashboard.analytics_summary.avg_messages.title",defaultMessage:"Average messages per conversation"}),value:e.formatNumber(i.avgMessages),precision:2},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/AnalyticsSummary.tsx",lineNumber:56,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/AnalyticsSummary.tsx",lineNumber:39,columnNumber:4},this)}return v.jsxDEV(uo,{title:e.formatMessage({id:"project_dashboard.analytics_summary.title",defaultMessage:"Summary",description:"Title section where we show stats about the conversations"}),bordered:!1,extra:v.jsxDEV(vn,{href:`/${n}/conversations`,children:v.jsxDEV(ee,{id:"project_dashboard.analytics_summary.go_to_conversation",defaultMessage:"Review conversations",description:"Button text to redirect user to page where they can review the conversations"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/AnalyticsSummary.tsx",lineNumber:78,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/AnalyticsSummary.tsx",lineNumber:77,columnNumber:5},this),children:v.jsxDEV("section",{className:"w-full flex flex-col space-y-2",children:s()},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/AnalyticsSummary.tsx",lineNumber:86,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/AnalyticsSummary.tsx",lineNumber:69,columnNumber:3},this)}function thr({dateRange:t,isLoading:e}){const n=Mt(),{projectId:i}=If(),{data:r,isLoading:o,isError:s}=Je.getProjectMessageHealth.useQuery({dateRange:t},{staleTime:3e5});function a(){return s?v.jsxDEV(pl,{message:n.formatMessage({id:"project_dashboard.internal_votes.error",defaultMessage:"Something went wrong while loading the data."}),type:"error"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/InternalVotes.tsx",lineNumber:24,columnNumber:5},this):o||e?v.jsxDEV(ja,{active:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/InternalVotes.tsx",lineNumber:34,columnNumber:52},this):v.jsxDEV("div",{className:"flex flex-row justify-between sm:justify-around gap-8 flex-wrap",children:[v.jsxDEV(gv,{title:n.formatMessage({id:"project_dashboard.internal_votes.positive_feedback.title",defaultMessage:"Positive feedback"}),value:r.internal.positive/r.internal.total*100||0,precision:2,suffix:"%",prefix:v.jsxDEV(Yhe,{className:"analytics-icon-green"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/InternalVotes.tsx",lineNumber:46,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/InternalVotes.tsx",lineNumber:38,columnNumber:5},this),v.jsxDEV(gv,{title:n.formatMessage({id:"project_dashboard.internal_votes.negative_feedback.title",defaultMessage:"Negative feedback"}),value:r.internal.negative/r.internal.total*100||0,precision:2,suffix:"%",prefix:v.jsxDEV(Ghe,{className:"analytics-icon-red"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/InternalVotes.tsx",lineNumber:56,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/InternalVotes.tsx",lineNumber:48,columnNumber:5},this),v.jsxDEV(gv,{title:n.formatMessage({id:"project_dashboard.internal_votes.total_votes.title",defaultMessage:"Total votes"}),value:n.formatNumber(r.internal.total)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/InternalVotes.tsx",lineNumber:58,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/InternalVotes.tsx",lineNumber:37,columnNumber:4},this)}return v.jsxDEV(uo,{title:n.formatMessage({id:"project_dashboard.internal_votes.title",defaultMessage:"Internal votes summary"}),bordered:!1,extra:v.jsxDEV(vn,{href:`/${i}/conversations`,children:v.jsxDEV(ee,{id:"project_dashboard.internal_votes.go_to_conversation",defaultMessage:"Review Messages",description:"Button text to redirect user to page where they can review the messages"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/InternalVotes.tsx",lineNumber:78,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/InternalVotes.tsx",lineNumber:77,columnNumber:5},this),children:v.jsxDEV("section",{className:"w-full flex flex-col space-y-2",children:a()},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/InternalVotes.tsx",lineNumber:86,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/InternalVotes.tsx",lineNumber:70,columnNumber:3},this)}function nhr(t){var i;const e=Mt();if(!((i=t.payload)!=null&&i.length))return null;const n=t.payload[0].payload;return v.jsxDEV(uo,{className:"month_graph-tooltip",children:[v.jsxDEV(Fn.Text,{type:"secondary",children:v.jsxDEV(tu,{value:n.date},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:42,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:41,columnNumber:4},this),v.jsxDEV("p",{children:v.jsxDEV(ee,{id:"project_dashboard.message_vote_trend.tooltip.internal_votes",defaultMessage:"Internal trend: {value, plural, =0 {-} =1 {# point} other {# points}}",values:{value:e.formatNumber(n.internal||0)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:45,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:44,columnNumber:4},this),v.jsxDEV("p",{children:v.jsxDEV(ee,{id:"project_dashboard.message_vote_trend.tooltip.avg_messages",defaultMessage:"User trend: {value, plural, =0 {-} =1 {# point} other {# points}}",values:{value:e.formatNumber(n.external||0)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:52,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:51,columnNumber:4},this),v.jsxDEV("p",{children:v.jsxDEV(ee,{id:"project_dashboard.message_vote_trend.tooltip.combined",defaultMessage:"Combined: {value, plural, =0 {-} =1 {# point} other {# points}}",values:{value:e.formatNumber(n.combined||0)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:59,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:58,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:40,columnNumber:3},this)}function ihr({trend:t}){if(t)return t==="NEGATIVE"?v.jsxDEV(kv,{color:"red",icon:v.jsxDEV(Y2t,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:76,columnNumber:27},this),children:v.jsxDEV(ee,{id:"project_dashboard.message_vote_trend.period_trend.negative",defaultMessage:"Trending down"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:77,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:76,columnNumber:4},this):v.jsxDEV(kv,{color:"green",icon:v.jsxDEV(mAt,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:86,columnNumber:28},this),children:v.jsxDEV(ee,{id:"project_dashboard.message_vote_trend.period_trend.positive",defaultMessage:"Trending up"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:87,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:86,columnNumber:3},this)}function rhr({organization:t,dateRange:e}){const n=Mt(),{data:i,isLoading:r,isError:o}=Je.getProjectMessageHealthPerDay.useQuery({dateRange:e},{staleTime:3e5}),s=b.useMemo(()=>{var h;if(!i||!((h=t==null?void 0:t.billing)!=null&&h.startDate))return[];const c=e?new Date(e[1]):cq(t.billing.startDate),u=e?new Date(e[0]):w6(t.billing.startDate),d=bfe(u.toDateString(),c.toDateString());return[...Array(d).keys()].map((f,m)=>{var y,_;const p=gfe({to:u.toDateString(),days:m}),g=i[p.toDateString()]||0;return{date:p,combined:g.trend,internal:(y=g.internal)==null?void 0:y.trend,external:(_=g.external)==null?void 0:_.trend,day:n.formatDate(p,{day:"2-digit",month:"2-digit"})}})},[i]),a=b.useMemo(()=>{var d;if(!i||!((d=Object.keys(i))!=null&&d.length))return;const{positive:c,negative:u}=Object.values(i).reduce((h,f)=>f.trend?f.trend<0?{...h,negative:h.negative+1}:{...h,positive:h.positive+1}:h,{positive:0,negative:0});if(c!==u)return c>u?"POSITIVE":"NEGATIVE"},[i]);function l(){var u;if(o)return v.jsxDEV(pl,{message:n.formatMessage({id:"project_dashboard.message_vote_trend.error",defaultMessage:"Something went wrong while loading the data."}),type:"error"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:153,columnNumber:5},this);if(r)return v.jsxDEV(ja,{active:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:163,columnNumber:34},this);if(!(s!=null&&s.length))return v.jsxDEV(wh,{image:v.jsxDEV("img",{src:"/img/svg/setup_analytics.svg",className:"h-48 mx-auto"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:168,columnNumber:13},this),description:n.formatMessage({id:"project_dashboard.message_vote_trend.not_enough_data",defaultMessage:"Looks like we don't have enough data yet... Hang tight, we're on the lookout for more!",description:"Fallback message when we don't have enough data yet to generate a graph"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:167,columnNumber:5},this);const c={combined:{id:"project_dashboard.message_vote_trend.legend.combined",defaultMessage:"Combined"},internal:{id:"project_dashboard.message_vote_trend.legend.internal_trend",defaultMessage:"Internal trend"},external:{id:"project_dashboard.message_vote_trend.legend.external_trend",defaultMessage:"User trend"}};return v.jsxDEV(qq,{width:"100%",height:254,children:v.jsxDEV(bQi,{data:s,margin:{top:0,right:0,left:0,bottom:0},children:[v.jsxDEV(a$,{strokeDasharray:"3 3"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:197,columnNumber:6},this),v.jsxDEV(m_,{dataKey:"day"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:198,columnNumber:6},this),v.jsxDEV(Ov,{allowDecimals:!1,padding:{top:8}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:199,columnNumber:6},this),v.jsxDEV(o$,{y:0,stroke:"#000"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:200,columnNumber:6},this),v.jsxDEV(up,{content:nhr},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:201,columnNumber:6},this),v.jsxDEV(Xx,{dataKey:"internal",type:"colorSecondaryBarGraph",fill:nri,stroke:j$e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:202,columnNumber:6},this),((u=t==null?void 0:t.permissions)==null?void 0:u.feedbackModule)&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Xx,{dataKey:"combined",type:"monotone",fill:tri,stroke:yd},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:210,columnNumber:8},this),v.jsxDEV(Xx,{dataKey:"external",type:"monotone",fill:rri,stroke:iri},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:211,columnNumber:8},this),v.jsxDEV(FC,{height:32,verticalAlign:"bottom",formatter:d=>n.formatMessage(c[d])},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:217,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:209,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:196,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:195,columnNumber:4},this)}return v.jsxDEV(uo,{title:v.jsxDEV("span",{children:[v.jsxDEV(ee,{id:"project_dashboard.message_vote_trend.title",defaultMessage:"Vote trend per day"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:235,columnNumber:6},this),v.jsxDEV(Vs,{title:n.formatMessage({id:"project_dashboard.message_vote_trend.legend.explanation",defaultMessage:"In this graph you can see the trend of your votes. You can see if the votes where trending more positive or negative that day"}),children:v.jsxDEV(Bhe,{className:"ml-2 !h-2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:246,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:239,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:234,columnNumber:5},this),bordered:!1,extra:a&&v.jsxDEV(ihr,{trend:a},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:251,columnNumber:26},this),children:v.jsxDEV("section",{className:"flex flex-col space-y-2",children:l()},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:253,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/MessageVoteTrend.tsx",lineNumber:232,columnNumber:3},this)}function ohr({dateRange:t,organization:e,isLoading:n}){const i=Mt(),r=Je.useUtils(),{data:o,isLoading:s}=Je.getWidget.useQuery(void 0),{data:a,isLoading:l,isError:c}=Je.getProjectMessageHealth.useQuery({dateRange:t},{staleTime:3e5}),u=Je.layout.updateFeatures.useMutation();async function d(){try{await u.mutateAsync({isFeedbackEnabled:!0}),r.getWidget.invalidate(),Ei.success({placement:"bottomRight",message:i.formatMessage({id:"project_dashboard.user_satisfaction.enable_feedback_module.notification.success",defaultMessage:"The feedback module has been successfully enabled. ",description:"Show notification user has successfully enabled the feedback module"})})}catch{Ei.error({placement:"bottomRight",message:i.formatMessage({id:"project_dashboard.user_satisfaction.enable_feedback_module.notification.failed",defaultMessage:"Something went wrong while updating your feedback module. Please try again later.",description:"The feedback module couldn't be enabled at the moment. Please try again later."})})}}function h(){var f,m;return c?v.jsxDEV(pl,{message:i.formatMessage({id:"project_dashboard.user_satisfaction.error",defaultMessage:"Something went wrong while loading data."}),type:"error"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/UserSatisfaction.tsx",lineNumber:54,columnNumber:5},this):l||n||s?v.jsxDEV(ja,{active:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/UserSatisfaction.tsx",lineNumber:64,columnNumber:71},this):(f=e==null?void 0:e.permissions)!=null&&f.feedbackModule?(m=o==null?void 0:o.features)!=null&&m.isFeedbackEnabled?v.jsxDEV("div",{className:"flex flex-row justify-between sm:justify-around gap-8 flex-wrap",children:[v.jsxDEV(gv,{title:i.formatMessage({id:"project_dashboard.user_satisfaction.positive_feedback.title",defaultMessage:"Positive feedback"}),value:a.external.positive/a.external.total*100||0,precision:2,suffix:"%",prefix:v.jsxDEV(Yhe,{className:"analytics-icon-green"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/UserSatisfaction.tsx",lineNumber:136,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/UserSatisfaction.tsx",lineNumber:128,columnNumber:5},this),v.jsxDEV(gv,{title:i.formatMessage({id:"project_dashboard.user_satisfaction.negative_feedback.title",defaultMessage:"Negative feedback"}),value:a.external.negative/a.external.total*100||0,precision:2,suffix:"%",prefix:v.jsxDEV(Ghe,{className:"analytics-icon-red"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/UserSatisfaction.tsx",lineNumber:146,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/UserSatisfaction.tsx",lineNumber:138,columnNumber:5},this),v.jsxDEV(gv,{title:i.formatMessage({id:"project_dashboard.user_satisfaction.total_votes.title",defaultMessage:"Total votes"}),value:i.formatNumber(a.external.total)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/UserSatisfaction.tsx",lineNumber:148,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/UserSatisfaction.tsx",lineNumber:127,columnNumber:4},this):v.jsxDEV(pl,{type:"warning",message:i.formatMessage({id:"project_dashboard.user_satisfaction.enable_feedback_module.title",defaultMessage:"Enable the feedback module.",description:"Title of the section where we explain to the user they need to enable the feedback module to see these analytics"}),description:i.formatMessage({id:"project_dashboard.user_satisfaction.enable_feedback_module.description",defaultMessage:"The feedback module allows users to rate the chatbot’s responses, providing valuable insights for improving the bot.",description:"Show explanation to user they can't see the feedback analytics because they don't have it enabled"}),className:"flex flex-col gap-2 sm:flex-row",action:v.jsxDEV(vn,{type:"primary",onClick:d,loading:u.isLoading,children:v.jsxDEV(ee,{id:"project_dashboard.user_satisfaction.enable_feedback_module.button",defaultMessage:"Enable feedback module"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/UserSatisfaction.tsx",lineNumber:116,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/UserSatisfaction.tsx",lineNumber:115,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/UserSatisfaction.tsx",lineNumber:98,columnNumber:5},this):v.jsxDEV(pl,{type:"info",message:i.formatMessage({id:"project_dashboard.user_satisfaction.upgrade.title",defaultMessage:"Upgrade your plan to enable the feedback module.",description:"Title of the explanation section where we explain to the user they can't see the feedback analytics because they don't have it included in their billing plan"}),description:i.formatMessage({id:"project_dashboard.user_satisfaction.upgrade.description",defaultMessage:"The feedback module allows users to rate the chatbot’s responses, providing valuable insights for improving the bot.",description:"Show explanation to user they can't see the feedback analytics because they don't have it included in their billing plan"}),className:"flex flex-col gap-2 sm:flex-row",action:v.jsxDEV(vn,{type:"primary",href:"/billing",children:v.jsxDEV(ee,{id:"project_dashboard.user_satisfaction.upgrade.button",defaultMessage:"Upgrade plan"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/UserSatisfaction.tsx",lineNumber:86,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/UserSatisfaction.tsx",lineNumber:85,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/UserSatisfaction.tsx",lineNumber:68,columnNumber:5},this)}return v.jsxDEV(uo,{title:i.formatMessage({id:"project_dashboard.user_satisfaction.title",defaultMessage:"User satisfaction"}),bordered:!1,children:v.jsxDEV("section",{className:"w-full flex flex-col space-y-2",children:h()},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/UserSatisfaction.tsx",lineNumber:167,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/UserSatisfaction.tsx",lineNumber:160,columnNumber:3},this)}function shr(t){var i;const e=Mt();if(!((i=t.payload)!=null&&i.length))return null;const n=t.payload[0].payload;return v.jsxDEV(uo,{className:"month_graph-tooltip",children:[v.jsxDEV(Fn.Text,{type:"secondary",children:v.jsxDEV(tu,{value:n.date},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:24,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:23,columnNumber:4},this),v.jsxDEV("p",{children:v.jsxDEV(ee,{id:"project_dashboard.conversation_month_graph.tooltip.total_conversations",defaultMessage:"Conversations: {value}",values:{value:e.formatNumber(n.totalConversations||0)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:27,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:26,columnNumber:4},this),v.jsxDEV("p",{children:v.jsxDEV(ee,{id:"project_dashboard.conversation_month_graph.tooltip.avg_messages",defaultMessage:"Avg messages: {value}",values:{value:e.formatNumber(n.avgMessages||0)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:34,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:33,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:22,columnNumber:3},this)}function ahr({organization:t,dateRange:e}){const n=Mt(),{data:i,isLoading:r,isError:o}=Je.getProjectConversationsPerDay.useQuery({dateRange:e},{staleTime:3e5}),{data:s}=Je.getProjectMessagesPerDay.useQuery({dateRange:e},{staleTime:3e5}),a={totalConversations:{id:"project_dashboard.conversation_month_graph.legend.total_conversations",defaultMessage:"Total Conversations"},avgMessages:{id:"project_dashboard.conversation_month_graph.legend.avg_messages",defaultMessage:"Average messages per dag"}},l=b.useMemo(()=>{var f;if(!i||!((f=t==null?void 0:t.billing)!=null&&f.startDate))return[];const u=e?new Date(e[1]):cq(t.billing.startDate),d=e?new Date(e[0]):w6(t.billing.startDate),h=bfe(d.toDateString(),u.toDateString());return[...Array(h).keys()].map((m,p)=>{const g=gfe({to:d.toDateString(),days:p}),y=i[g.toDateString()]||0,_=(s==null?void 0:s[g.toDateString()])||0;return{date:g,totalConversations:y,avgMessages:y?(_/y).toFixed(2):void 0,day:n.formatDate(g,{day:"2-digit",month:"2-digit"})}})},[i,s]);function c(){return o?v.jsxDEV(pl,{message:n.formatMessage({id:"project_dashboard.conversation_month_graph.error",defaultMessage:"Something went wrong while loading the data."}),type:"error"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:103,columnNumber:5},this):r?v.jsxDEV(ja,{active:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:113,columnNumber:34},this):l!=null&&l.length?v.jsxDEV(qq,{width:"100%",height:254,children:v.jsxDEV(UVt,{data:l,margin:{top:0,right:0,left:0,bottom:0},children:[v.jsxDEV(a$,{strokeDasharray:"3 3"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:131,columnNumber:6},this),v.jsxDEV(m_,{dataKey:"day"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:132,columnNumber:6},this),v.jsxDEV(Ov,{allowDecimals:!1,padding:{top:8}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:133,columnNumber:6},this),v.jsxDEV(up,{content:shr},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:134,columnNumber:6},this),v.jsxDEV(f_,{dataKey:"totalConversations",type:"monotone",fill:yd,stroke:yd},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:135,columnNumber:6},this),v.jsxDEV(mM,{dataKey:"avgMessages",type:"monotone",stroke:Wee},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:136,columnNumber:6},this),v.jsxDEV(FC,{height:32,verticalAlign:"bottom",formatter:u=>n.formatMessage(a[u])},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:137,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:130,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:129,columnNumber:4},this):v.jsxDEV(wh,{image:v.jsxDEV("img",{src:"/img/svg/setup_analytics.svg",className:"h-48 mx-auto"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:118,columnNumber:13},this),description:n.formatMessage({id:"project_dashboard.conversation_month_graph.not_enough_data",defaultMessage:"Looks like we don't have enough data yet... Hang tight, we're on the lookout for more!",description:"Fallback message when we don't have enough data yet to generate a graph"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:117,columnNumber:5},this)}return v.jsxDEV(uo,{title:n.formatMessage({id:"project_dashboard.conversation_month_graph.title",defaultMessage:"Conversations per day",description:"Title section where we show the total conversations per day in the current billing month"}),bordered:!1,children:v.jsxDEV("section",{className:"flex flex-col space-y-2",children:c()},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:156,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/conversationsMonthGraph.tsx",lineNumber:148,columnNumber:3},this)}function lhr(t){var i;const e=Mt();if(!((i=t.payload)!=null&&i.length))return null;const n=t.payload[0].payload;return v.jsxDEV(uo,{className:"month_graph-tooltip",children:[v.jsxDEV(Fn.Text,{type:"secondary",children:v.jsxDEV(tu,{value:n.date},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:24,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:23,columnNumber:4},this),v.jsxDEV("p",{children:v.jsxDEV(ee,{id:"project_dashboard.messages_month_graph.tooltip",defaultMessage:"Messages: {value}",values:{value:e.formatNumber(n.projectData)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:27,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:26,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:22,columnNumber:3},this)}function chr({organization:t,dateRange:e}){const n=Mt(),{data:i,isLoading:r,isError:o}=Je.getProjectMessagesPerDay.useQuery({dateRange:e},{staleTime:3e5}),s=b.useMemo(()=>{var d;if(!i||!((d=t==null?void 0:t.billing)!=null&&d.startDate))return[];const l=e?new Date(e[1]):cq(t.billing.startDate),c=e?new Date(e[0]):w6(t.billing.startDate),u=bfe(c.toDateString(),l.toDateString());return[...Array(u).keys()].map((h,f)=>{const m=gfe({to:c.toDateString(),days:f});return{date:m,day:n.formatDate(m,{day:"2-digit",month:"2-digit"}),projectData:i[m.toDateString()]||0}})},[i]);function a(){return o?v.jsxDEV(pl,{message:n.formatMessage({id:"project_dashboard.messages_month_graph.error",defaultMessage:"Something went wrong while loading data."}),type:"error"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:77,columnNumber:5},this):r?v.jsxDEV(ja,{active:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:87,columnNumber:34},this):s!=null&&s.length?v.jsxDEV(qq,{width:"100%",height:254,children:v.jsxDEV(vQi,{data:s,margin:{top:0,right:0,left:0,bottom:0},children:[v.jsxDEV(a$,{strokeDasharray:"3 3"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:105,columnNumber:6},this),v.jsxDEV(m_,{dataKey:"day"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:106,columnNumber:6},this),v.jsxDEV(Ov,{allowDecimals:!1,padding:{top:8}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:107,columnNumber:6},this),v.jsxDEV(up,{content:lhr},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:108,columnNumber:6},this),v.jsxDEV(f_,{dataKey:"projectData",type:"monotone",fill:yd,stroke:yd},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:109,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:104,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:103,columnNumber:4},this):v.jsxDEV(wh,{image:v.jsxDEV("img",{src:"/img/svg/setup_analytics.svg",className:"h-48 mx-auto"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:92,columnNumber:13},this),description:n.formatMessage({id:"project_dashboard.messages_month_graph.not_enough_data",defaultMessage:"Looks like we don't have enough data yet... Hang tight, we're on the lookout for more!",description:"Fallback message when we don't have enough data yet to generate a graph"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:91,columnNumber:5},this)}return v.jsxDEV(uo,{title:n.formatMessage({id:"project_dashboard.messages_month_graph.title",defaultMessage:"Messages send per day",description:"Title section where we show the total send message per day in the current billing month"}),bordered:!1,children:v.jsxDEV("section",{className:"flex flex-col space-y-2",children:a()},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:124,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/components/messagesMonthGraph.tsx",lineNumber:116,columnNumber:3},this)}An.extend(ZLt);function uhr(){const t=Mt(),[e,n]=b.useState(),{data:i,isLoading:r}=Je.getOrganization.useQuery(void 0,{staleTime:36e5});return ga(t.formatMessage({id:"project_dashboard.page.title",defaultMessage:"Project dashboard - Chathive"})),b.useEffect(()=>{var a;if(!((a=i==null?void 0:i.billing)!=null&&a.startDate))return;const o=cq(i.billing.startDate),s=w6(i.billing.startDate);n([s.toString(),o.toString()])},[i]),v.jsxDEV("section",{className:"pt-6 bg-white sm:pt-0 sm:bg-transparent sm:grid sm:gap-4 w-full max-w-4xl",children:[v.jsxDEV(Vhe,{justify:"flex-end",className:"mx-4 mb-4 sm:mx-0 sm:mb-0",children:v.jsxDEV(Spe,{organization:i,className:"w-full sm:w-fit",onChange:n,allowClear:!1,value:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/index.tsx",lineNumber:46,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/index.tsx",lineNumber:45,columnNumber:4},this),v.jsxDEV(ehr,{organization:i,isLoading:r,dateRange:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/index.tsx",lineNumber:54,columnNumber:4},this),v.jsxDEV(chr,{organization:i,isLoading:r,dateRange:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/index.tsx",lineNumber:55,columnNumber:4},this),v.jsxDEV(ahr,{dateRange:e,isLoading:r,organization:i},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/index.tsx",lineNumber:56,columnNumber:4},this),v.jsxDEV(thr,{organization:i,isLoading:r,dateRange:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/index.tsx",lineNumber:57,columnNumber:4},this),v.jsxDEV(rhr,{organization:i,isLoading:r,dateRange:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/index.tsx",lineNumber:58,columnNumber:4},this),v.jsxDEV(ohr,{organization:i,isLoading:r,dateRange:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/index.tsx",lineNumber:59,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Dashboard/index.tsx",lineNumber:44,columnNumber:3},this)}function dhr({isDirty:t}){const e=Mt(),n=b.useCallback(()=>t?!window.confirm(e.formatMessage({id:"shared.confirm_page_leave.message",defaultMessage:"You have unsaved changes, are you sure you want to leave?"})):!1,[t]);return hhr(n,t),wbn(b.useCallback(i=>{t&&i.preventDefault()},[t]),{capture:!0}),null}function hhr(t,e){const n=Fgn(e?t:!1),i=b.useRef(n.state);b.useEffect(()=>{n.state==="blocked"&&n.reset(),i.current=n.state},[n])}const fhr=6e4,eD=48,mhr={primary:{id:"button.button_types.primary",defaultMessage:"Primary"},secondary:{id:"button.button_types.secondary",defaultMessage:"Secondary"}},phr={vertical:{id:"alignment.alignment_types.vertical",defaultMessage:"Vertical"},horizontal:{id:"alignment.alignment_types.horizontal",defaultMessage:"Horizontal"}},Tpe=Xp({key:"aifConfigurationFormState",default:void 0}),lU=Xp({key:"aifIntroMessageState",default:void 0}),ew=Xp({key:"aifMessages",default:[],effects:[]});let JCe;const rG=Xp({key:"aifIsTyping",default:!1,effects:[({setSelf:t,onSet:e})=>{e(n=>{if(clearTimeout(JCe),n){JCe=setTimeout(()=>{t(!1),clearTimeout(JCe)},fhr);return}})}]}),GBt=Xp({key:"chErrorMessageState",default:void 0}),ghr=FF({key:"chIsReceivingMessageState",get:({get:t})=>{const e=t(rG),n=t(aze),i=t(ew),r=structuredClone(i).pop();return n&&!e&&(r==null?void 0:r.role)==="assistant"&&!r.done}}),YBt=FF({key:"chShowContinueButton",get:({get:t})=>{const e=t(ew),n=t(GBt),i=t(rG),r=structuredClone(e).pop();return e!=null&&e.length||i||(r==null?void 0:r.role)==="user"||r!=null&&r.done?!1:!!(n==="tokenLimitReached"||r!=null&&r.incomplete&&!(r!=null&&r.done))}}),bhr=FF({key:"aifAddIncomingMessage",get:({get:t})=>{const e=t(ew);return e.pop()||e[0]},set:({get:t,set:e},n)=>{const i=n,r=[...t(ew)],o=r.pop();(o==null?void 0:o._id)!==i._id&&o&&r.push(o),e(ew,[...r,i])}}),vhr=FF({key:"aifAddMessage",get:()=>"",set:({get:t,set:e},n)=>{const i=[...t(ew)],r={_id:z$e(),role:"user",content:`${n}`,createdAt:new Date,done:!0};e(ew,[...i,r])}}),yhr=Xp({key:"aifSessionIdState",default:z$e()}),aze=FF({key:"aifIsStarted",get:({get:t})=>t(ew).length>0}),XBt=Xp({key:"aifIsCompletedState",default:!1});var Agt=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),eSe=function(){return Math.random().toString(36).substring(7).split("").join(".")},Rgt={INIT:"@@redux/INIT"+eSe(),REPLACE:"@@redux/REPLACE"+eSe(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+eSe()}};function _hr(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function xhr(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(Shr(t))return"date";if(Chr(t))return"error";var n=whr(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function whr(t){return typeof t.constructor=="function"?t.constructor.name:null}function Chr(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function Shr(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function WL(t){var e=typeof t;return e=xhr(t),e}function ZBt(t,e,n){var i;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error("Expected the enhancer to be a function. Instead, received: '"+WL(n)+"'");return n(ZBt)(t,e)}if(typeof t!="function")throw new Error("Expected the root reducer to be a function. Instead, received: '"+WL(t)+"'");var r=t,o=e,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function d(p){if(typeof p!="function")throw new Error("Expected the listener to be a function. Instead, received: '"+WL(p)+"'");if(l)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var g=!0;return c(),a.push(p),function(){if(g){if(l)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");g=!1,c();var _=a.indexOf(p);a.splice(_,1),s=null}}}function h(p){if(!_hr(p))throw new Error("Actions must be plain objects. Instead, the actual type was: '"+WL(p)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof p.type>"u")throw new Error('Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(l)throw new Error("Reducers may not dispatch actions.");try{l=!0,o=r(o,p)}finally{l=!1}for(var g=s=a,y=0;y<g.length;y++){var _=g[y];_()}return p}function f(p){if(typeof p!="function")throw new Error("Expected the nextReducer to be a function. Instead, received: '"+WL(p));r=p,h({type:Rgt.REPLACE})}function m(){var p,g=d;return p={subscribe:function(_){if(typeof _!="object"||_===null)throw new Error("Expected the observer to be an object. Instead, received: '"+WL(_)+"'");function w(){_.next&&_.next(u())}w();var C=g(w);return{unsubscribe:C}}},p[Agt]=function(){return this},p}return h({type:Rgt.INIT}),i={dispatch:h,subscribe:d,getState:u,replaceReducer:f},i[Agt]=m,i}function Pgt(t,e){return function(){return e(t.apply(this,arguments))}}function Ogt(t,e){if(typeof t=="function")return Pgt(t,e);if(typeof t!="object"||t===null)throw new Error("bindActionCreators expected an object or a function, but instead received: '"+WL(t)+`'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?`);var n={};for(var i in t){var r=t[i];typeof r=="function"&&(n[i]=Pgt(r,e))}return n}function QBt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?function(i){return i}:e.length===1?e[0]:e.reduce(function(i,r){return function(){return i(r.apply(void 0,arguments))}})}function Nhr(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(i){return function(){var r=i.apply(void 0,arguments),o=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},s={getState:r.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=e.map(function(l){return l(s)});return o=QBt.apply(void 0,a)(r.dispatch),Ie(Ie({},r),{},{dispatch:o})}}}var Ehr={};/**
 * @license React
 * use-sync-external-store-shim/with-selector.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=b,e=EFe;function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var i=typeof Object.is=="function"?Object.is:n,r=e.useSyncExternalStore,o=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;function c(u,d,h,f,m){var p=o(null),g;p.current===null?(g={hasValue:!1,value:null},p.current=g):g=p.current;var y=a(function(){var N=!1,E,D,k=function(R){if(!N){N=!0,E=R;var P=f(R);if(m!==void 0&&g.hasValue){var O=g.value;if(m(O,P))return D=O,O}return D=P,P}var V=E,F=D;if(i(V,R))return F;var $=f(R);return m!==void 0&&m(F,$)?F:(E=R,D=$,$)},M=h===void 0?null:h,T=function(){return k(d())},A=M===null?void 0:function(){return k(M())};return[T,A]},[d,h,f,m]),_=y[0],w=y[1],C=r(u,_,w);return s(function(){g.hasValue=!0,g.value=C},[C]),l(C),C}Ehr.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})();function Dhr(t){t()}let JBt=Dhr;const khr=t=>JBt=t,Mhr=()=>JBt,jgt=Symbol.for("react-redux-context"),Fgt=typeof globalThis<"u"?globalThis:{};function Lhr(){var t;if(!b.createContext)return{};const e=(t=Fgt[jgt])!=null?t:Fgt[jgt]=new Map;let n=e.get(b.createContext);return n||(n=b.createContext(null),n.displayName="ReactRedux",e.set(b.createContext,n)),n}const ezt=Lhr(),Thr=()=>{throw new Error("uSES not initialized!")};function lze(t){typeof console<"u"&&typeof console.error=="function"&&console.error(t);try{throw new Error(t)}catch{}}function tSe(t,e){if(t)(e==="mapStateToProps"||e==="mapDispatchToProps")&&(Object.prototype.hasOwnProperty.call(t,"dependsOnOwnProps")||lze(`The selector for ${e} of connect did not specify a value for dependsOnOwnProps.`));else throw new Error(`Unexpected value for ${e} in connect.`)}function Ihr(t,e,n){tSe(t,"mapStateToProps"),tSe(e,"mapDispatchToProps"),tSe(n,"mergeProps")}const Ahr=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Rhr(t,e,n,i,{areStatesEqual:r,areOwnPropsEqual:o,areStatePropsEqual:s}){let a=!1,l,c,u,d,h;function f(_,w){return l=_,c=w,u=t(l,c),d=e(i,c),h=n(u,d,c),a=!0,h}function m(){return u=t(l,c),e.dependsOnOwnProps&&(d=e(i,c)),h=n(u,d,c),h}function p(){return t.dependsOnOwnProps&&(u=t(l,c)),e.dependsOnOwnProps&&(d=e(i,c)),h=n(u,d,c),h}function g(){const _=t(l,c),w=!s(_,u);return u=_,w&&(h=n(u,d,c)),h}function y(_,w){const C=!o(w,c),N=!r(_,l,w,c);return l=_,c=w,C&&N?m():C?p():N?g():h}return function(w,C){return a?y(w,C):f(w,C)}}function Phr(t,e){let{initMapStateToProps:n,initMapDispatchToProps:i,initMergeProps:r}=e,o=$F(e,Ahr);const s=n(t,o),a=i(t,o),l=r(t,o);return Ihr(s,a,l),Rhr(s,a,l,t,o)}function Ohr(t,e){const n={};for(const i in t){const r=t[i];typeof r=="function"&&(n[i]=(...o)=>e(r(...o)))}return n}function jhr(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);if(e===null)return!0;let n=e;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return e===n}function tzt(t,e,n){jhr(t)||lze(`${n}() in ${e} must return a plain object. Instead received ${t}.`)}function ZRe(t){return function(n){const i=t(n);function r(){return i}return r.dependsOnOwnProps=!1,r}}function $gt(t){return t.dependsOnOwnProps?!!t.dependsOnOwnProps:t.length!==1}function nzt(t,e){return function(i,{displayName:r}){const o=function(a,l){return o.dependsOnOwnProps?o.mapToProps(a,l):o.mapToProps(a,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(a,l){o.mapToProps=t,o.dependsOnOwnProps=$gt(t);let c=o(a,l);return typeof c=="function"&&(o.mapToProps=c,o.dependsOnOwnProps=$gt(c),c=o(a,l)),tzt(c,r,e),c},o}}function cze(t,e){return(n,i)=>{throw new Error(`Invalid value of type ${typeof t} for ${e} argument when connecting component ${i.wrappedComponentName}.`)}}function Fhr(t){return t&&typeof t=="object"?ZRe(e=>Ohr(t,e)):t?typeof t=="function"?nzt(t,"mapDispatchToProps"):cze(t,"mapDispatchToProps"):ZRe(e=>({dispatch:e}))}function $hr(t){return t?typeof t=="function"?nzt(t,"mapStateToProps"):cze(t,"mapStateToProps"):ZRe(()=>({}))}function Vhr(t,e,n){return lt({},n,t,e)}function Bhr(t){return function(n,{displayName:i,areMergedPropsEqual:r}){let o=!1,s;return function(l,c,u){const d=t(l,c,u);return o?r(d,s)||(s=d):(o=!0,s=d,tzt(s,i,"mergeProps")),s}}}function zhr(t){return t?typeof t=="function"?Bhr(t):cze(t,"mergeProps"):()=>Vhr}function Hhr(){const t=Mhr();let e=null,n=null;return{clear(){e=null,n=null},notify(){t(()=>{let i=e;for(;i;)i.callback(),i=i.next})},get(){let i=[],r=e;for(;r;)i.push(r),r=r.next;return i},subscribe(i){let r=!0,o=n={callback:i,next:null,prev:n};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}const Vgt={notify(){},get:()=>[]};function izt(t,e){let n,i=Vgt,r=0,o=!1;function s(p){u();const g=i.subscribe(p);let y=!1;return()=>{y||(y=!0,g(),d())}}function a(){i.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return o}function u(){r++,n||(n=e?e.addNestedSub(l):t.subscribe(l),i=Hhr())}function d(){r--,n&&r===0&&(n(),n=void 0,i.clear(),i=Vgt)}function h(){o||(o=!0,u())}function f(){o&&(o=!1,d())}const m={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:h,tryUnsubscribe:f,getListeners:()=>i};return m}const Whr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Hse=Whr?b.useLayoutEffect:b.useEffect;function Bgt(t,e){return t===e?t!==0||e!==0||1/t===1/e:t!==t&&e!==e}function nSe(t,e){if(Bgt(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;const n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(e,n[r])||!Bgt(t[n[r]],e[n[r]]))return!1;return!0}const Uhr=["reactReduxForwardedRef"];let rzt=Thr;const Khr=t=>{rzt=t},qhr=[null,null],Ghr=t=>{try{return JSON.stringify(t)}catch{return String(t)}};function Yhr(t,e,n){Hse(()=>t(...e),n)}function Xhr(t,e,n,i,r,o){t.current=i,n.current=!1,r.current&&(r.current=null,o())}function Zhr(t,e,n,i,r,o,s,a,l,c,u){if(!t)return()=>{};let d=!1,h=null;const f=()=>{if(d||!a.current)return;const p=e.getState();let g,y;try{g=i(p,r.current)}catch(_){y=_,h=_}y||(h=null),g===o.current?s.current||c():(o.current=g,l.current=g,s.current=!0,u())};return n.onStateChange=f,n.trySubscribe(),f(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,h)throw h}}function Qhr(t,e){return t===e}let zgt=!1;function ozt(t,e,n,{pure:i,areStatesEqual:r=Qhr,areOwnPropsEqual:o=nSe,areStatePropsEqual:s=nSe,areMergedPropsEqual:a=nSe,forwardRef:l=!1,context:c=ezt}={}){i!==void 0&&!zgt&&(zgt=!0,lze('The `pure` option has been removed. `connect` is now always a "pure/memoized" component'));const u=c,d=$hr(t),h=Fhr(e),f=zhr(n),m=!!t;return g=>{if(!DC.isValidElementType(g))throw new Error(`You must pass a component to the function returned by connect. Instead received ${Ghr(g)}`);const y=g.displayName||g.name||"Component",_=`Connect(${y})`,w={shouldHandleStateChanges:m,displayName:_,wrappedComponentName:y,WrappedComponent:g,initMapStateToProps:d,initMapDispatchToProps:h,initMergeProps:f,areStatesEqual:r,areStatePropsEqual:s,areOwnPropsEqual:o,areMergedPropsEqual:a};function C(D){const[k,M,T]=b.useMemo(()=>{const{reactReduxForwardedRef:Q}=D,be=$F(D,Uhr);return[D.context,Q,be]},[D]),A=b.useMemo(()=>k&&k.Consumer&&DC.isContextConsumer(b.createElement(k.Consumer,null))?k:u,[k,u]),R=b.useContext(A),P=!!D.store&&!!D.store.getState&&!!D.store.dispatch,O=!!R&&!!R.store;if(!P&&!O)throw new Error(`Could not find "store" in the context of "${_}". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to ${_} in connect options.`);const V=P?D.store:R.store,F=O?R.getServerState:V.getState,$=b.useMemo(()=>Phr(V.dispatch,w),[V]),[B,z]=b.useMemo(()=>{if(!m)return qhr;const Q=izt(V,P?void 0:R.subscription),be=Q.notifyNestedSubs.bind(Q);return[Q,be]},[V,P,R]),H=b.useMemo(()=>P?R:lt({},R,{subscription:B}),[P,R,B]),K=b.useRef(),q=b.useRef(T),U=b.useRef(),Y=b.useRef(!1);b.useRef(!1);const J=b.useRef(!1),ae=b.useRef();Hse(()=>(J.current=!0,()=>{J.current=!1}),[]);const se=b.useMemo(()=>()=>U.current&&T===q.current?U.current:$(V.getState(),T),[V,T]),oe=b.useMemo(()=>be=>B?Zhr(m,V,B,$,q,K,Y,J,U,z,be):()=>{},[B]);Yhr(Xhr,[q,K,Y,T,U,z]);let fe;try{fe=rzt(oe,se,F?()=>$(F(),T):se)}catch(Q){throw ae.current&&(Q.message+=`
The error may be correlated with this previous error:
${ae.current.stack}

`),Q}Hse(()=>{ae.current=void 0,U.current=void 0,K.current=fe});const de=b.useMemo(()=>b.createElement(g,lt({},fe,{ref:M})),[M,g,fe]);return b.useMemo(()=>m?b.createElement(A.Provider,{value:H},de):de,[A,de,H])}const E=b.memo(C);if(E.WrappedComponent=g,E.displayName=C.displayName=_,l){const k=b.forwardRef(function(T,A){return b.createElement(E,lt({},T,{reactReduxForwardedRef:A}))});return k.displayName=_,k.WrappedComponent=g,qZe(k,g)}return qZe(E,g)}}function Jhr({store:t,context:e,children:n,serverState:i,stabilityCheck:r="once",noopCheck:o="once"}){const s=b.useMemo(()=>{const c=izt(t);return{store:t,subscription:c,getServerState:i?()=>i:void 0,stabilityCheck:r,noopCheck:o}},[t,i,r,o]),a=b.useMemo(()=>t.getState(),[t]);Hse(()=>{const{subscription:c}=s;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),a!==t.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[s,a]);const l=e||ezt;return b.createElement(l.Provider,{value:s},n)}Khr(EFe.useSyncExternalStore);khr(Fc.unstable_batchedUpdates);function efr(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function szt(t,e){var n=b.useState(function(){return{inputs:e,result:t()}})[0],i=b.useRef(!0),r=b.useRef(n),o=i.current||!!(e&&r.current.inputs&&efr(e,r.current.inputs)),s=o?r.current:{inputs:e,result:t()};return b.useEffect(function(){i.current=!1,r.current=s},[s]),s.result}function tfr(t,e){return szt(function(){return t},e)}var Ns=szt,yr=tfr,u0=function(e){var n=e.top,i=e.right,r=e.bottom,o=e.left,s=i-o,a=r-n,l={top:n,right:i,bottom:r,left:o,width:s,height:a,x:o,y:n,center:{x:(i+o)/2,y:(r+n)/2}};return l},uze=function(e,n){return{top:e.top-n.top,left:e.left-n.left,bottom:e.bottom+n.bottom,right:e.right+n.right}},Hgt=function(e,n){return{top:e.top+n.top,left:e.left+n.left,bottom:e.bottom-n.bottom,right:e.right-n.right}},nfr=function(e,n){return{top:e.top+n.y,left:e.left+n.x,bottom:e.bottom+n.y,right:e.right+n.x}},iSe={top:0,right:0,bottom:0,left:0},dze=function(e){var n=e.borderBox,i=e.margin,r=i===void 0?iSe:i,o=e.border,s=o===void 0?iSe:o,a=e.padding,l=a===void 0?iSe:a,c=u0(uze(n,r)),u=u0(Hgt(n,s)),d=u0(Hgt(u,l));return{marginBox:c,borderBox:u0(n),paddingBox:u,contentBox:d,margin:r,border:s,padding:l}},Vb=function(e){var n=e.slice(0,-2),i=e.slice(-2);if(i!=="px")return 0;var r=Number(n);return isNaN(r)&&wk(!1,"Could not parse value [raw: "+e+", without suffix: "+n+"]"),r},ifr=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Wse=function(e,n){var i=e.borderBox,r=e.border,o=e.margin,s=e.padding,a=nfr(i,n);return dze({borderBox:a,border:r,margin:o,padding:s})},Use=function(e,n){return n===void 0&&(n=ifr()),Wse(e,n)},azt=function(e,n){var i={top:Vb(n.marginTop),right:Vb(n.marginRight),bottom:Vb(n.marginBottom),left:Vb(n.marginLeft)},r={top:Vb(n.paddingTop),right:Vb(n.paddingRight),bottom:Vb(n.paddingBottom),left:Vb(n.paddingLeft)},o={top:Vb(n.borderTopWidth),right:Vb(n.borderRightWidth),bottom:Vb(n.borderBottomWidth),left:Vb(n.borderLeftWidth)};return dze({borderBox:e,margin:i,padding:r,border:o})},lzt=function(e){var n=e.getBoundingClientRect(),i=window.getComputedStyle(e);return azt(n,i)},Wgt=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function rfr(t,e){return!!(t===e||Wgt(t)&&Wgt(e))}function ofr(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!rfr(t[n],e[n]))return!1;return!0}function Gd(t,e){e===void 0&&(e=ofr);var n=null;function i(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&e(r,n.lastArgs))return n.lastResult;var s=t.apply(this,r);return n={lastResult:s,lastArgs:r,lastThis:this},s}return i.clear=function(){n=null},i}var cU=function(e){var n=[],i=null,r=function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];n=a,!i&&(i=requestAnimationFrame(function(){i=null,e.apply(void 0,n)}))};return r.cancel=function(){i&&(cancelAnimationFrame(i),i=null)},r};const sfr=/[ \t]{2,}/g,afr=/^[ \t]*/gm,Ugt=t=>t.replace(sfr," ").replace(afr,"").trim(),lfr=t=>Ugt(`
  %c@hello-pangea/dnd

  %c${Ugt(t)}

  %c👷‍ This is a development only message. It will be removed in production builds.
`),cfr=t=>[lfr(t),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"],ufr="__@hello-pangea/dnd-disable-dev-warnings";function czt(t,e){typeof window<"u"&&window[ufr]||console[t](...cfr(e))}const Ml=czt.bind(null,"warn"),QRe=czt.bind(null,"error");function wD(){}function dfr(t,e){return{...t,...e}}function fv(t,e,n){const i=e.map(r=>{const o=dfr(n,r.options);return t.addEventListener(r.eventName,r.fn,o),function(){t.removeEventListener(r.eventName,r.fn,o)}});return function(){i.forEach(o=>{o()})}}const hfr="Invariant failed";class Kse extends Error{}Kse.prototype.toString=function(){return this.message};function $n(t,e){throw new Kse(`${hfr}: ${e||""}`)}let ffr=class extends Z.Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=wD,this.onWindowError=n=>{const i=this.getCallbacks();i.isDragging()&&(i.tryAbort(),Ml(`
        An error was caught by our window 'error' event listener while a drag was occurring.
        The active drag has been aborted.
      `));const r=n.error;r instanceof Kse&&(n.preventDefault(),QRe(r.message))},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=n=>{this.callbacks=n}}componentDidMount(){this.unbind=fv(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(e instanceof Kse){QRe(e.message),this.setState({});return}throw e}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}};const mfr=`
  Press space bar to start a drag.
  When dragging you can use the arrow keys to move the item around and escape to cancel.
  Some screen readers may require you to be in focus mode or to use your pass through key
`,qse=t=>t+1,pfr=t=>`
  You have lifted an item in position ${qse(t.source.index)}
`,uzt=(t,e)=>{const n=t.droppableId===e.droppableId,i=qse(t.index),r=qse(e.index);return n?`
      You have moved the item from position ${i}
      to position ${r}
    `:`
    You have moved the item from position ${i}
    in list ${t.droppableId}
    to list ${e.droppableId}
    in position ${r}
  `},dzt=(t,e,n)=>e.droppableId===n.droppableId?`
      The item ${t}
      has been combined with ${n.draggableId}`:`
      The item ${t}
      in list ${e.droppableId}
      has been combined with ${n.draggableId}
      in list ${n.droppableId}
    `,gfr=t=>{const e=t.destination;if(e)return uzt(t.source,e);const n=t.combine;return n?dzt(t.draggableId,t.source,n):"You are over an area that cannot be dropped on"},Kgt=t=>`
  The item has returned to its starting position
  of ${qse(t.index)}
`,bfr=t=>{if(t.reason==="CANCEL")return`
      Movement cancelled.
      ${Kgt(t.source)}
    `;const e=t.destination,n=t.combine;return e?`
      You have dropped the item.
      ${uzt(t.source,e)}
    `:n?`
      You have dropped the item.
      ${dzt(t.draggableId,t.source,n)}
    `:`
    The item has been dropped while not over a drop area.
    ${Kgt(t.source)}
  `},vfr={dragHandleUsageInstructions:mfr,onDragStart:pfr,onDragUpdate:gfr,onDragEnd:bfr};var Ate=vfr;const Qd={x:0,y:0},Dh=(t,e)=>({x:t.x+e.x,y:t.y+e.y}),Xg=(t,e)=>({x:t.x-e.x,y:t.y-e.y}),CD=(t,e)=>t.x===e.x&&t.y===e.y,p$=t=>({x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}),aA=(t,e,n=0)=>t==="x"?{x:e,y:n}:{x:n,y:e},uU=(t,e)=>Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2),qgt=(t,e)=>Math.min(...e.map(n=>uU(t,n))),hzt=t=>e=>({x:t(e.x),y:t(e.y)});var yfr=(t,e)=>{const n=u0({top:Math.max(e.top,t.top),right:Math.min(e.right,t.right),bottom:Math.min(e.bottom,t.bottom),left:Math.max(e.left,t.left)});return n.width<=0||n.height<=0?null:n};const oG=(t,e)=>({top:t.top+e.y,left:t.left+e.x,bottom:t.bottom+e.y,right:t.right+e.x}),Ggt=t=>[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}],_fr={top:0,right:0,bottom:0,left:0},xfr=(t,e)=>e?oG(t,e.scroll.diff.displacement):t,wfr=(t,e,n)=>n&&n.increasedBy?{...t,[e.end]:t[e.end]+n.increasedBy[e.line]}:t,Cfr=(t,e)=>e&&e.shouldClipSubject?yfr(e.pageMarginBox,t):u0(t);var iF=({page:t,withPlaceholder:e,axis:n,frame:i})=>{const r=xfr(t.marginBox,i),o=wfr(r,n,e),s=Cfr(o,i);return{page:t,withPlaceholder:e,active:s}},hze=(t,e)=>{t.frame||$n();const n=t.frame,i=Xg(e,n.scroll.initial),r=p$(i),o={...n,scroll:{initial:n.scroll.initial,current:e,diff:{value:i,displacement:r},max:n.scroll.max}},s=iF({page:t.subject.page,withPlaceholder:t.subject.withPlaceholder,axis:t.axis,frame:o});return{...t,frame:o,subject:s}};const fzt=Gd(t=>t.reduce((e,n)=>(e[n.descriptor.id]=n,e),{})),mzt=Gd(t=>t.reduce((e,n)=>(e[n.descriptor.id]=n,e),{})),Ipe=Gd(t=>Object.values(t)),Sfr=Gd(t=>Object.values(t));var hR=Gd((t,e)=>Sfr(e).filter(i=>t===i.descriptor.droppableId).sort((i,r)=>i.descriptor.index-r.descriptor.index));function fze(t){return t.at&&t.at.type==="REORDER"?t.at.destination:null}function Ape(t){return t.at&&t.at.type==="COMBINE"?t.at.combine:null}var Rpe=Gd((t,e)=>e.filter(n=>n.descriptor.id!==t.descriptor.id)),Nfr=({isMovingForward:t,draggable:e,destination:n,insideDestination:i,previousImpact:r})=>{if(!n.isCombineEnabled||!fze(r))return null;function s(f){const m={type:"COMBINE",combine:{draggableId:f,droppableId:n.descriptor.id}};return{...r,at:m}}const a=r.displaced.all,l=a.length?a[0]:null;if(t)return l?s(l):null;const c=Rpe(e,i);if(!l){if(!c.length)return null;const f=c[c.length-1];return s(f.descriptor.id)}const u=c.findIndex(f=>f.descriptor.id===l);u===-1&&$n(!1,"Could not find displaced item in set");const d=u-1;if(d<0)return null;const h=c[d];return s(h.descriptor.id)},g$=(t,e)=>t.descriptor.droppableId===e.descriptor.id;const pzt={point:Qd,value:0},dU={invisible:{},visible:{},all:[]},Efr={displaced:dU,displacedBy:pzt,at:null};var Dfr=Efr,wv=(t,e)=>n=>t<=n&&n<=e,gzt=t=>{const e=wv(t.top,t.bottom),n=wv(t.left,t.right);return i=>{if(e(i.top)&&e(i.bottom)&&n(i.left)&&n(i.right))return!0;const o=e(i.top)||e(i.bottom),s=n(i.left)||n(i.right);if(o&&s)return!0;const l=i.top<t.top&&i.bottom>t.bottom,c=i.left<t.left&&i.right>t.right;return l&&c?!0:l&&s||c&&o}},kfr=t=>{const e=wv(t.top,t.bottom),n=wv(t.left,t.right);return i=>e(i.top)&&e(i.bottom)&&n(i.left)&&n(i.right)};const mze={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},bzt={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var Mfr=t=>e=>{const n=wv(e.top,e.bottom),i=wv(e.left,e.right);return r=>t===mze?n(r.top)&&n(r.bottom):i(r.left)&&i(r.right)};const Lfr=(t,e)=>{const n=e.frame?e.frame.scroll.diff.displacement:Qd;return oG(t,n)},Tfr=(t,e,n)=>e.subject.active?n(e.subject.active)(t):!1,Ifr=(t,e,n)=>n(e)(t),pze=({target:t,destination:e,viewport:n,withDroppableDisplacement:i,isVisibleThroughFrameFn:r})=>{const o=i?Lfr(t,e):t;return Tfr(o,e,r)&&Ifr(o,n,r)},Afr=t=>pze({...t,isVisibleThroughFrameFn:gzt}),vzt=t=>pze({...t,isVisibleThroughFrameFn:kfr}),Rfr=t=>pze({...t,isVisibleThroughFrameFn:Mfr(t.destination.axis)}),Pfr=(t,e,n)=>{if(typeof n=="boolean")return n;if(!e)return!0;const{invisible:i,visible:r}=e;if(i[t])return!1;const o=r[t];return o?o.shouldAnimate:!0};function Ofr(t,e){const n=t.page.marginBox,i={top:e.point.y,right:0,bottom:0,left:e.point.x};return u0(uze(n,i))}function hU({afterDragging:t,destination:e,displacedBy:n,viewport:i,forceShouldAnimate:r,last:o}){return t.reduce(function(a,l){const c=Ofr(l,n),u=l.descriptor.id;if(a.all.push(u),!Afr({target:c,destination:e,viewport:i,withDroppableDisplacement:!0}))return a.invisible[l.descriptor.id]=!0,a;const h=Pfr(u,o,r),f={draggableId:u,shouldAnimate:h};return a.visible[u]=f,a},{all:[],visible:{},invisible:{}})}function jfr(t,e){if(!t.length)return 0;const n=t[t.length-1].descriptor.index;return e.inHomeList?n:n+1}function Ygt({insideDestination:t,inHomeList:e,displacedBy:n,destination:i}){const r=jfr(t,{inHomeList:e});return{displaced:dU,displacedBy:n,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:r}}}}function Gse({draggable:t,insideDestination:e,destination:n,viewport:i,displacedBy:r,last:o,index:s,forceShouldAnimate:a}){const l=g$(t,n);if(s==null)return Ygt({insideDestination:e,inHomeList:l,displacedBy:r,destination:n});const c=e.find(m=>m.descriptor.index===s);if(!c)return Ygt({insideDestination:e,inHomeList:l,displacedBy:r,destination:n});const u=Rpe(t,e),d=e.indexOf(c),h=u.slice(d);return{displaced:hU({afterDragging:h,destination:n,displacedBy:r,last:o,viewport:i.frame,forceShouldAnimate:a}),displacedBy:r,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:s}}}}function Ek(t,e){return!!e.effected[t]}var Ffr=({isMovingForward:t,destination:e,draggables:n,combine:i,afterCritical:r})=>{if(!e.isCombineEnabled)return null;const o=i.draggableId,a=n[o].descriptor.index;return Ek(o,r)?t?a:a-1:t?a+1:a},$fr=({isMovingForward:t,isInHomeList:e,insideDestination:n,location:i})=>{if(!n.length)return null;const r=i.index,o=t?r+1:r-1,s=n[0].descriptor.index,a=n[n.length-1].descriptor.index,l=e?a:a+1;return o<s||o>l?null:o},Vfr=({isMovingForward:t,isInHomeList:e,draggable:n,draggables:i,destination:r,insideDestination:o,previousImpact:s,viewport:a,afterCritical:l})=>{const c=s.at;if(c||$n(!1,"Cannot move in direction without previous impact location"),c.type==="REORDER"){const d=$fr({isMovingForward:t,isInHomeList:e,location:c.destination,insideDestination:o});return d==null?null:Gse({draggable:n,insideDestination:o,destination:r,viewport:a,last:s.displaced,displacedBy:s.displacedBy,index:d})}const u=Ffr({isMovingForward:t,destination:r,displaced:s.displaced,draggables:i,combine:c.combine,afterCritical:l});return u==null?null:Gse({draggable:n,insideDestination:o,destination:r,viewport:a,last:s.displaced,displacedBy:s.displacedBy,index:u})},Bfr=({displaced:t,afterCritical:e,combineWith:n,displacedBy:i})=>{const r=!!(t.visible[n]||t.invisible[n]);return Ek(n,e)?r?Qd:p$(i.point):r?i.point:Qd},zfr=({afterCritical:t,impact:e,draggables:n})=>{const i=Ape(e);i||$n();const r=i.draggableId,o=n[r].page.borderBox.center,s=Bfr({displaced:e.displaced,afterCritical:t,combineWith:r,displacedBy:e.displacedBy});return Dh(o,s)};const yzt=(t,e)=>e.margin[t.start]+e.borderBox[t.size]/2,Hfr=(t,e)=>e.margin[t.end]+e.borderBox[t.size]/2,gze=(t,e,n)=>e[t.crossAxisStart]+n.margin[t.crossAxisStart]+n.borderBox[t.crossAxisSize]/2,Xgt=({axis:t,moveRelativeTo:e,isMoving:n})=>aA(t.line,e.marginBox[t.end]+yzt(t,n),gze(t,e.marginBox,n)),Zgt=({axis:t,moveRelativeTo:e,isMoving:n})=>aA(t.line,e.marginBox[t.start]-Hfr(t,n),gze(t,e.marginBox,n)),Wfr=({axis:t,moveInto:e,isMoving:n})=>aA(t.line,e.contentBox[t.start]+yzt(t,n),gze(t,e.contentBox,n));var Ufr=({impact:t,draggable:e,draggables:n,droppable:i,afterCritical:r})=>{const o=hR(i.descriptor.id,n),s=e.page,a=i.axis;if(!o.length)return Wfr({axis:a,moveInto:i.page,isMoving:s});const{displaced:l,displacedBy:c}=t,u=l.all[0];if(u){const h=n[u];if(Ek(u,r))return Zgt({axis:a,moveRelativeTo:h.page,isMoving:s});const f=Wse(h.page,c.point);return Zgt({axis:a,moveRelativeTo:f,isMoving:s})}const d=o[o.length-1];if(d.descriptor.id===e.descriptor.id)return s.borderBox.center;if(Ek(d.descriptor.id,r)){const h=Wse(d.page,p$(r.displacedBy.point));return Xgt({axis:a,moveRelativeTo:h,isMoving:s})}return Xgt({axis:a,moveRelativeTo:d.page,isMoving:s})},JRe=(t,e)=>{const n=t.frame;return n?Dh(e,n.scroll.diff.displacement):e};const Kfr=({impact:t,draggable:e,droppable:n,draggables:i,afterCritical:r})=>{const o=e.page.borderBox.center,s=t.at;return!n||!s?o:s.type==="REORDER"?Ufr({impact:t,draggable:e,draggables:i,droppable:n,afterCritical:r}):zfr({impact:t,draggables:i,afterCritical:r})};var Ppe=t=>{const e=Kfr(t),n=t.droppable;return n?JRe(n,e):e},_zt=(t,e)=>{const n=Xg(e,t.scroll.initial),i=p$(n);return{frame:u0({top:e.y,bottom:e.y+t.frame.height,left:e.x,right:e.x+t.frame.width}),scroll:{initial:t.scroll.initial,max:t.scroll.max,current:e,diff:{value:n,displacement:i}}}};function Qgt(t,e){return t.map(n=>e[n])}function qfr(t,e){for(let n=0;n<e.length;n++){const i=e[n].visible[t];if(i)return i}return null}var Gfr=({impact:t,viewport:e,destination:n,draggables:i,maxScrollChange:r})=>{const o=_zt(e,Dh(e.scroll.current,r)),s=n.frame?hze(n,Dh(n.frame.scroll.current,r)):n,a=t.displaced,l=hU({afterDragging:Qgt(a.all,i),destination:n,displacedBy:t.displacedBy,viewport:o.frame,last:a,forceShouldAnimate:!1}),c=hU({afterDragging:Qgt(a.all,i),destination:s,displacedBy:t.displacedBy,viewport:e.frame,last:a,forceShouldAnimate:!1}),u={},d={},h=[a,l,c];return a.all.forEach(m=>{const p=qfr(m,h);if(p){d[m]=p;return}u[m]=!0}),{...t,displaced:{all:a.all,invisible:u,visible:d}}},Yfr=(t,e)=>Dh(t.scroll.diff.displacement,e),bze=({pageBorderBoxCenter:t,draggable:e,viewport:n})=>{const i=Yfr(n,t),r=Xg(i,e.page.borderBox.center);return Dh(e.client.borderBox.center,r)},xzt=({draggable:t,destination:e,newPageBorderBoxCenter:n,viewport:i,withDroppableDisplacement:r,onlyOnMainAxis:o=!1})=>{const s=Xg(n,t.page.borderBox.center),l={target:oG(t.page.borderBox,s),destination:e,withDroppableDisplacement:r,viewport:i};return o?Rfr(l):vzt(l)},Xfr=({isMovingForward:t,draggable:e,destination:n,draggables:i,previousImpact:r,viewport:o,previousPageBorderBoxCenter:s,previousClientSelection:a,afterCritical:l})=>{if(!n.isEnabled)return null;const c=hR(n.descriptor.id,i),u=g$(e,n),d=Nfr({isMovingForward:t,draggable:e,destination:n,insideDestination:c,previousImpact:r})||Vfr({isMovingForward:t,isInHomeList:u,draggable:e,draggables:i,destination:n,insideDestination:c,previousImpact:r,viewport:o,afterCritical:l});if(!d)return null;const h=Ppe({impact:d,draggable:e,droppable:n,draggables:i,afterCritical:l});if(xzt({draggable:e,destination:n,newPageBorderBoxCenter:h,viewport:o.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:bze({pageBorderBoxCenter:h,draggable:e,viewport:o}),impact:d,scrollJumpRequest:null};const m=Xg(h,s),p=Gfr({impact:d,viewport:o,destination:n,draggables:i,maxScrollChange:m});return{clientSelection:a,impact:p,scrollJumpRequest:m}};const Gf=t=>{const e=t.subject.active;return e||$n(!1,"Cannot get clipped area from droppable"),e};var Zfr=({isMovingForward:t,pageBorderBoxCenter:e,source:n,droppables:i,viewport:r})=>{const o=n.subject.active;if(!o)return null;const s=n.axis,a=wv(o[s.start],o[s.end]),l=Ipe(i).filter(u=>u!==n).filter(u=>u.isEnabled).filter(u=>!!u.subject.active).filter(u=>gzt(r.frame)(Gf(u))).filter(u=>{const d=Gf(u);return t?o[s.crossAxisEnd]<d[s.crossAxisEnd]:d[s.crossAxisStart]<o[s.crossAxisStart]}).filter(u=>{const d=Gf(u),h=wv(d[s.start],d[s.end]);return a(d[s.start])||a(d[s.end])||h(o[s.start])||h(o[s.end])}).sort((u,d)=>{const h=Gf(u)[s.crossAxisStart],f=Gf(d)[s.crossAxisStart];return t?h-f:f-h}).filter((u,d,h)=>Gf(u)[s.crossAxisStart]===Gf(h[0])[s.crossAxisStart]);if(!l.length)return null;if(l.length===1)return l[0];const c=l.filter(u=>wv(Gf(u)[s.start],Gf(u)[s.end])(e[s.line]));return c.length===1?c[0]:c.length>1?c.sort((u,d)=>Gf(u)[s.start]-Gf(d)[s.start])[0]:l.sort((u,d)=>{const h=qgt(e,Ggt(Gf(u))),f=qgt(e,Ggt(Gf(d)));return h!==f?h-f:Gf(u)[s.start]-Gf(d)[s.start]})[0]};const Jgt=(t,e)=>{const n=t.page.borderBox.center;return Ek(t.descriptor.id,e)?Xg(n,e.displacedBy.point):n},Qfr=(t,e)=>{const n=t.page.borderBox;return Ek(t.descriptor.id,e)?oG(n,p$(e.displacedBy.point)):n};var Jfr=({pageBorderBoxCenter:t,viewport:e,destination:n,insideDestination:i,afterCritical:r})=>i.filter(s=>vzt({target:Qfr(s,r),destination:n,viewport:e.frame,withDroppableDisplacement:!0})).sort((s,a)=>{const l=uU(t,JRe(n,Jgt(s,r))),c=uU(t,JRe(n,Jgt(a,r)));return l<c?-1:c<l?1:s.descriptor.index-a.descriptor.index})[0]||null,sG=Gd(function(e,n){const i=n[e.line];return{value:i,point:aA(e.line,i)}});const emr=(t,e,n)=>{const i=t.axis;if(t.descriptor.mode==="virtual")return aA(i.line,e[i.line]);const r=t.subject.page.contentBox[i.size],l=hR(t.descriptor.id,n).reduce((c,u)=>c+u.client.marginBox[i.size],0)+e[i.line]-r;return l<=0?null:aA(i.line,l)},wzt=(t,e)=>({...t,scroll:{...t.scroll,max:e}}),Czt=(t,e,n)=>{const i=t.frame;g$(e,t)&&$n(!1,"Should not add placeholder space to home list"),t.subject.withPlaceholder&&$n(!1,"Cannot add placeholder size to a subject when it already has one");const r=sG(t.axis,e.displaceBy).point,o=emr(t,r,n),s={placeholderSize:r,increasedBy:o,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!i){const u=iF({page:t.subject.page,withPlaceholder:s,axis:t.axis,frame:t.frame});return{...t,subject:u}}const a=o?Dh(i.scroll.max,o):i.scroll.max,l=wzt(i,a),c=iF({page:t.subject.page,withPlaceholder:s,axis:t.axis,frame:l});return{...t,subject:c,frame:l}},tmr=t=>{const e=t.subject.withPlaceholder;e||$n(!1,"Cannot remove placeholder form subject when there was none");const n=t.frame;if(!n){const s=iF({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return{...t,subject:s}}const i=e.oldFrameMaxScroll;i||$n(!1,"Expected droppable with frame to have old max frame scroll when removing placeholder");const r=wzt(n,i),o=iF({page:t.subject.page,axis:t.axis,frame:r,withPlaceholder:null});return{...t,subject:o,frame:r}};var nmr=({previousPageBorderBoxCenter:t,moveRelativeTo:e,insideDestination:n,draggable:i,draggables:r,destination:o,viewport:s,afterCritical:a})=>{if(!e){if(n.length)return null;const d={displaced:dU,displacedBy:pzt,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:0}}},h=Ppe({impact:d,draggable:i,droppable:o,draggables:r,afterCritical:a}),f=g$(i,o)?o:Czt(o,i,r);return xzt({draggable:i,destination:f,newPageBorderBoxCenter:h,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?d:null}const l=t[o.axis.line]<=e.page.borderBox.center[o.axis.line],c=(()=>{const d=e.descriptor.index;return e.descriptor.id===i.descriptor.id||l?d:d+1})(),u=sG(o.axis,i.displaceBy);return Gse({draggable:i,insideDestination:n,destination:o,viewport:s,displacedBy:u,last:dU,index:c})},imr=({isMovingForward:t,previousPageBorderBoxCenter:e,draggable:n,isOver:i,draggables:r,droppables:o,viewport:s,afterCritical:a})=>{const l=Zfr({isMovingForward:t,pageBorderBoxCenter:e,source:i,droppables:o,viewport:s});if(!l)return null;const c=hR(l.descriptor.id,r),u=Jfr({pageBorderBoxCenter:e,viewport:s,destination:l,insideDestination:c,afterCritical:a}),d=nmr({previousPageBorderBoxCenter:e,destination:l,draggable:n,draggables:r,moveRelativeTo:u,insideDestination:c,viewport:s,afterCritical:a});if(!d)return null;const h=Ppe({impact:d,draggable:n,droppable:l,draggables:r,afterCritical:a});return{clientSelection:bze({pageBorderBoxCenter:h,draggable:n,viewport:s}),impact:d,scrollJumpRequest:null}},nb=t=>{const e=t.at;return e?e.type==="REORDER"?e.destination.droppableId:e.combine.droppableId:null};const rmr=(t,e)=>{const n=nb(t);return n?e[n]:null};var omr=({state:t,type:e})=>{const n=rmr(t.impact,t.dimensions.droppables),i=!!n,r=t.dimensions.droppables[t.critical.droppable.id],o=n||r,s=o.axis.direction,a=s==="vertical"&&(e==="MOVE_UP"||e==="MOVE_DOWN")||s==="horizontal"&&(e==="MOVE_LEFT"||e==="MOVE_RIGHT");if(a&&!i)return null;const l=e==="MOVE_DOWN"||e==="MOVE_RIGHT",c=t.dimensions.draggables[t.critical.draggable.id],u=t.current.page.borderBoxCenter,{draggables:d,droppables:h}=t.dimensions;return a?Xfr({isMovingForward:l,previousPageBorderBoxCenter:u,draggable:c,destination:o,draggables:d,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):imr({isMovingForward:l,previousPageBorderBoxCenter:u,draggable:c,isOver:o,draggables:d,droppables:h,viewport:t.viewport,afterCritical:t.afterCritical})};function UL(t){return t.phase==="DRAGGING"||t.phase==="COLLECTING"}function Szt(t){const e=wv(t.top,t.bottom),n=wv(t.left,t.right);return function(r){return e(r.y)&&n(r.x)}}function smr(t,e){return t.left<e.right&&t.right>e.left&&t.top<e.bottom&&t.bottom>e.top}function amr({pageBorderBox:t,draggable:e,candidates:n}){const i=e.page.borderBox.center,r=n.map(o=>{const s=o.axis,a=aA(o.axis.line,t.center[s.line],o.page.borderBox.center[s.crossAxisLine]);return{id:o.descriptor.id,distance:uU(i,a)}}).sort((o,s)=>s.distance-o.distance);return r[0]?r[0].id:null}function lmr({pageBorderBox:t,draggable:e,droppables:n}){const i=Ipe(n).filter(r=>{if(!r.isEnabled)return!1;const o=r.subject.active;if(!o||!smr(t,o))return!1;if(Szt(o)(t.center))return!0;const s=r.axis,a=o.center[s.crossAxisLine],l=t[s.crossAxisStart],c=t[s.crossAxisEnd],u=wv(o[s.crossAxisStart],o[s.crossAxisEnd]),d=u(l),h=u(c);return!d&&!h?!0:d?l<a:c>a});return i.length?i.length===1?i[0].descriptor.id:amr({pageBorderBox:t,draggable:e,candidates:i}):null}const Nzt=(t,e)=>u0(oG(t,e));var cmr=(t,e)=>{const n=t.frame;return n?Nzt(e,n.scroll.diff.value):e};function Ezt({displaced:t,id:e}){return!!(t.visible[e]||t.invisible[e])}function umr({draggable:t,closest:e,inHomeList:n}){return e?n&&e.descriptor.index>t.descriptor.index?e.descriptor.index-1:e.descriptor.index:null}var dmr=({pageBorderBoxWithDroppableScroll:t,draggable:e,destination:n,insideDestination:i,last:r,viewport:o,afterCritical:s})=>{const a=n.axis,l=sG(n.axis,e.displaceBy),c=l.value,u=t[a.start],d=t[a.end],f=Rpe(e,i).find(p=>{const g=p.descriptor.id,y=p.page.borderBox.center[a.line],_=Ek(g,s),w=Ezt({displaced:r,id:g});return _?w?d<=y:u<y-c:w?d<=y+c:u<y})||null,m=umr({draggable:e,closest:f,inHomeList:g$(e,n)});return Gse({draggable:e,insideDestination:i,destination:n,viewport:o,last:r,displacedBy:l,index:m})};const hmr=4;var fmr=({draggable:t,pageBorderBoxWithDroppableScroll:e,previousImpact:n,destination:i,insideDestination:r,afterCritical:o})=>{if(!i.isCombineEnabled)return null;const s=i.axis,a=sG(i.axis,t.displaceBy),l=a.value,c=e[s.start],u=e[s.end],h=Rpe(t,r).find(m=>{const p=m.descriptor.id,g=m.page.borderBox,_=g[s.size]/hmr,w=Ek(p,o),C=Ezt({displaced:n.displaced,id:p});return w?C?u>g[s.start]+_&&u<g[s.end]-_:c>g[s.start]-l+_&&c<g[s.end]-l-_:C?u>g[s.start]+l+_&&u<g[s.end]+l-_:c>g[s.start]+_&&c<g[s.end]-_});return h?{displacedBy:a,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:h.descriptor.id,droppableId:i.descriptor.id}}}:null},Dzt=({pageOffset:t,draggable:e,draggables:n,droppables:i,previousImpact:r,viewport:o,afterCritical:s})=>{const a=Nzt(e.page.borderBox,t),l=lmr({pageBorderBox:a,draggable:e,droppables:i});if(!l)return Dfr;const c=i[l],u=hR(c.descriptor.id,n),d=cmr(c,a);return fmr({pageBorderBoxWithDroppableScroll:d,draggable:e,previousImpact:r,destination:c,insideDestination:u,afterCritical:s})||dmr({pageBorderBoxWithDroppableScroll:d,draggable:e,destination:c,insideDestination:u,last:r.displaced,viewport:o,afterCritical:s})},vze=(t,e)=>({...t,[e.descriptor.id]:e});const mmr=({previousImpact:t,impact:e,droppables:n})=>{const i=nb(t),r=nb(e);if(!i||i===r)return n;const o=n[i];if(!o.subject.withPlaceholder)return n;const s=tmr(o);return vze(n,s)};var pmr=({draggable:t,draggables:e,droppables:n,previousImpact:i,impact:r})=>{const o=mmr({previousImpact:i,impact:r,droppables:n}),s=nb(r);if(!s)return o;const a=n[s];if(g$(t,a)||a.subject.withPlaceholder)return o;const l=Czt(a,t,e);return vze(o,l)},TB=({state:t,clientSelection:e,dimensions:n,viewport:i,impact:r,scrollJumpRequest:o})=>{const s=i||t.viewport,a=n||t.dimensions,l=e||t.current.client.selection,c=Xg(l,t.initial.client.selection),u={offset:c,selection:l,borderBoxCenter:Dh(t.initial.client.borderBoxCenter,c)},d={selection:Dh(u.selection,s.scroll.current),borderBoxCenter:Dh(u.borderBoxCenter,s.scroll.current),offset:Dh(u.offset,s.scroll.diff.value)},h={client:u,page:d};if(t.phase==="COLLECTING")return{...t,dimensions:a,viewport:s,current:h};const f=a.draggables[t.critical.draggable.id],m=r||Dzt({pageOffset:d.offset,draggable:f,draggables:a.draggables,droppables:a.droppables,previousImpact:t.impact,viewport:s,afterCritical:t.afterCritical}),p=pmr({draggable:f,impact:m,previousImpact:t.impact,draggables:a.draggables,droppables:a.droppables});return{...t,current:h,dimensions:{draggables:a.draggables,droppables:p},impact:m,viewport:s,scrollJumpRequest:o||null,forceShouldAnimate:o?!1:null}};function gmr(t,e){return t.map(n=>e[n])}var kzt=({impact:t,viewport:e,draggables:n,destination:i,forceShouldAnimate:r})=>{const o=t.displaced,s=gmr(o.all,n),a=hU({afterDragging:s,destination:i,displacedBy:t.displacedBy,viewport:e.frame,forceShouldAnimate:r,last:o});return{...t,displaced:a}},Mzt=({impact:t,draggable:e,droppable:n,draggables:i,viewport:r,afterCritical:o})=>{const s=Ppe({impact:t,draggable:e,draggables:i,droppable:n,afterCritical:o});return bze({pageBorderBoxCenter:s,draggable:e,viewport:r})},Lzt=({state:t,dimensions:e,viewport:n})=>{t.movementMode!=="SNAP"&&$n();const i=t.impact,r=n||t.viewport,o=e||t.dimensions,{draggables:s,droppables:a}=o,l=s[t.critical.draggable.id],c=nb(i);c||$n(!1,"Must be over a destination in SNAP movement mode");const u=a[c],d=kzt({impact:i,viewport:r,destination:u,draggables:s}),h=Mzt({impact:d,draggable:l,droppable:u,draggables:s,viewport:r,afterCritical:t.afterCritical});return TB({impact:d,clientSelection:h,state:t,dimensions:o,viewport:r})},bmr=t=>({index:t.index,droppableId:t.droppableId}),Tzt=({draggable:t,home:e,draggables:n,viewport:i})=>{const r=sG(e.axis,t.displaceBy),o=hR(e.descriptor.id,n),s=o.indexOf(t);s===-1&&$n(!1,"Expected draggable to be inside home list");const a=o.slice(s+1),l=a.reduce((h,f)=>(h[f.descriptor.id]=!0,h),{}),c={inVirtualList:e.descriptor.mode==="virtual",displacedBy:r,effected:l};return{impact:{displaced:hU({afterDragging:a,destination:e,displacedBy:r,last:null,viewport:i.frame,forceShouldAnimate:!1}),displacedBy:r,at:{type:"REORDER",destination:bmr(t.descriptor)}},afterCritical:c}},vmr=(t,e)=>({draggables:t.draggables,droppables:vze(t.droppables,e)}),ymr=({draggable:t,offset:e,initialWindowScroll:n})=>{const i=Wse(t.client,e),r=Use(i,n);return{...t,placeholder:{...t.placeholder,client:i},client:i,page:r}},_mr=t=>{const e=t.frame;return e||$n(!1,"Expected Droppable to have a frame"),e},xmr=({additions:t,updatedDroppables:e,viewport:n})=>{const i=n.scroll.diff.value;return t.map(r=>{const o=r.descriptor.droppableId,s=e[o],l=_mr(s).scroll.diff.value,c=Dh(i,l);return ymr({draggable:r,offset:c,initialWindowScroll:n.scroll.initial})})},wmr=({state:t,published:e})=>{const n=e.modified.map(y=>{const _=t.dimensions.droppables[y.droppableId];return hze(_,y.scroll)}),i={...t.dimensions.droppables,...fzt(n)},r=mzt(xmr({additions:e.additions,updatedDroppables:i,viewport:t.viewport})),o={...t.dimensions.draggables,...r};e.removals.forEach(y=>{delete o[y]});const s={droppables:i,draggables:o},a=nb(t.impact),l=a?s.droppables[a]:null,c=s.draggables[t.critical.draggable.id],u=s.droppables[t.critical.droppable.id],{impact:d,afterCritical:h}=Tzt({draggable:c,home:u,draggables:o,viewport:t.viewport}),f=l&&l.isCombineEnabled?t.impact:d,m=Dzt({pageOffset:t.current.page.offset,draggable:s.draggables[t.critical.draggable.id],draggables:s.draggables,droppables:s.droppables,previousImpact:f,viewport:t.viewport,afterCritical:h}),p={...t,phase:"DRAGGING",impact:m,onLiftImpact:d,dimensions:s,afterCritical:h,forceShouldAnimate:!1};return t.phase==="COLLECTING"?p:{...p,phase:"DROP_PENDING",reason:t.reason,isWaiting:!1}};const ePe=t=>t.movementMode==="SNAP",rSe=(t,e,n)=>{const i=vmr(t.dimensions,e);return!ePe(t)||n?TB({state:t,dimensions:i}):Lzt({state:t,dimensions:i})};function oSe(t){return t.isDragging&&t.movementMode==="SNAP"?{...t,scrollJumpRequest:null}:t}const ebt={phase:"IDLE",completed:null,shouldFlush:!1};var Cmr=(t=ebt,e)=>{if(e.type==="FLUSH")return{...ebt,shouldFlush:!0};if(e.type==="INITIAL_PUBLISH"){t.phase!=="IDLE"&&$n(!1,"INITIAL_PUBLISH must come after a IDLE phase");const{critical:n,clientSelection:i,viewport:r,dimensions:o,movementMode:s}=e.payload,a=o.draggables[n.draggable.id],l=o.droppables[n.droppable.id],c={selection:i,borderBoxCenter:a.client.borderBox.center,offset:Qd},u={client:c,page:{selection:Dh(c.selection,r.scroll.initial),borderBoxCenter:Dh(c.selection,r.scroll.initial),offset:Dh(c.selection,r.scroll.diff.value)}},d=Ipe(o.droppables).every(p=>!p.isFixedOnPage),{impact:h,afterCritical:f}=Tzt({draggable:a,home:l,draggables:o.draggables,viewport:r});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:s,dimensions:o,initial:u,current:u,isWindowScrollAllowed:d,impact:h,afterCritical:f,onLiftImpact:h,viewport:r,scrollJumpRequest:null,forceShouldAnimate:null}}if(e.type==="COLLECTION_STARTING")return t.phase==="COLLECTING"||t.phase==="DROP_PENDING"?t:(t.phase!=="DRAGGING"&&$n(!1,`Collection cannot start from phase ${t.phase}`),{...t,phase:"COLLECTING"});if(e.type==="PUBLISH_WHILE_DRAGGING")return t.phase==="COLLECTING"||t.phase==="DROP_PENDING"||$n(!1,`Unexpected ${e.type} received in phase ${t.phase}`),wmr({state:t,published:e.payload});if(e.type==="MOVE"){if(t.phase==="DROP_PENDING")return t;UL(t)||$n(!1,`${e.type} not permitted in phase ${t.phase}`);const{client:n}=e.payload;return CD(n,t.current.client.selection)?t:TB({state:t,clientSelection:n,impact:ePe(t)?t.impact:null})}if(e.type==="UPDATE_DROPPABLE_SCROLL"){if(t.phase==="DROP_PENDING"||t.phase==="COLLECTING")return oSe(t);UL(t)||$n(!1,`${e.type} not permitted in phase ${t.phase}`);const{id:n,newScroll:i}=e.payload,r=t.dimensions.droppables[n];if(!r)return t;const o=hze(r,i);return rSe(t,o,!1)}if(e.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(t.phase==="DROP_PENDING")return t;UL(t)||$n(!1,`Attempting to move in an unsupported phase ${t.phase}`);const{id:n,isEnabled:i}=e.payload,r=t.dimensions.droppables[n];r||$n(!1,`Cannot find Droppable[id: ${n}] to toggle its enabled state`),r.isEnabled===i&&$n(!1,`Trying to set droppable isEnabled to ${String(i)}
      but it is already ${String(r.isEnabled)}`);const o={...r,isEnabled:i};return rSe(t,o,!0)}if(e.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(t.phase==="DROP_PENDING")return t;UL(t)||$n(!1,`Attempting to move in an unsupported phase ${t.phase}`);const{id:n,isCombineEnabled:i}=e.payload,r=t.dimensions.droppables[n];r||$n(!1,`Cannot find Droppable[id: ${n}] to toggle its isCombineEnabled state`),r.isCombineEnabled===i&&$n(!1,`Trying to set droppable isCombineEnabled to ${String(i)}
      but it is already ${String(r.isCombineEnabled)}`);const o={...r,isCombineEnabled:i};return rSe(t,o,!0)}if(e.type==="MOVE_BY_WINDOW_SCROLL"){if(t.phase==="DROP_PENDING"||t.phase==="DROP_ANIMATING")return t;UL(t)||$n(!1,`Cannot move by window in phase ${t.phase}`),t.isWindowScrollAllowed||$n(!1,"Window scrolling is currently not supported for fixed lists");const n=e.payload.newScroll;if(CD(t.viewport.scroll.current,n))return oSe(t);const i=_zt(t.viewport,n);return ePe(t)?Lzt({state:t,viewport:i}):TB({state:t,viewport:i})}if(e.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!UL(t))return t;const n=e.payload.maxScroll;if(CD(n,t.viewport.scroll.max))return t;const i={...t.viewport,scroll:{...t.viewport.scroll,max:n}};return{...t,viewport:i}}if(e.type==="MOVE_UP"||e.type==="MOVE_DOWN"||e.type==="MOVE_LEFT"||e.type==="MOVE_RIGHT"){if(t.phase==="COLLECTING"||t.phase==="DROP_PENDING")return t;t.phase!=="DRAGGING"&&$n(!1,`${e.type} received while not in DRAGGING phase`);const n=omr({state:t,type:e.type});return n?TB({state:t,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):t}if(e.type==="DROP_PENDING"){const n=e.payload.reason;return t.phase!=="COLLECTING"&&$n(!1,"Can only move into the DROP_PENDING phase from the COLLECTING phase"),{...t,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if(e.type==="DROP_ANIMATE"){const{completed:n,dropDuration:i,newHomeClientOffset:r}=e.payload;return t.phase==="DRAGGING"||t.phase==="DROP_PENDING"||$n(!1,`Cannot animate drop from phase ${t.phase}`),{phase:"DROP_ANIMATING",completed:n,dropDuration:i,newHomeClientOffset:r,dimensions:t.dimensions}}if(e.type==="DROP_COMPLETE"){const{completed:n}=e.payload;return{phase:"IDLE",completed:n,shouldFlush:!1}}return t};const Smr=t=>({type:"BEFORE_INITIAL_CAPTURE",payload:t}),Nmr=t=>({type:"LIFT",payload:t}),Emr=t=>({type:"INITIAL_PUBLISH",payload:t}),Dmr=t=>({type:"PUBLISH_WHILE_DRAGGING",payload:t}),kmr=()=>({type:"COLLECTION_STARTING",payload:null}),Mmr=t=>({type:"UPDATE_DROPPABLE_SCROLL",payload:t}),Lmr=t=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}),Tmr=t=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}),Izt=t=>({type:"MOVE",payload:t}),Imr=t=>({type:"MOVE_BY_WINDOW_SCROLL",payload:t}),Amr=t=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}),Rmr=()=>({type:"MOVE_UP",payload:null}),Pmr=()=>({type:"MOVE_DOWN",payload:null}),Omr=()=>({type:"MOVE_RIGHT",payload:null}),jmr=()=>({type:"MOVE_LEFT",payload:null}),yze=()=>({type:"FLUSH",payload:null}),Fmr=t=>({type:"DROP_ANIMATE",payload:t}),_ze=t=>({type:"DROP_COMPLETE",payload:t}),Azt=t=>({type:"DROP",payload:t}),$mr=t=>({type:"DROP_PENDING",payload:t}),Rzt=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});function Vmr(t){if(t.length<=1)return;const e=t.map(r=>r.descriptor.index),n={};for(let r=1;r<e.length;r++){const o=e[r],s=e[r-1];o!==s+1&&(n[o]=!0)}if(!Object.keys(n).length)return;const i=e.map(r=>!!n[r]?`[🔥${r}]`:`${r}`).join(", ");Ml(`
    Detected non-consecutive <Draggable /> indexes.

    (This can cause unexpected bugs)

    ${i}
  `)}function Bmr(t,e){{const n=hR(t.droppable.id,e.draggables);Vmr(n)}}var zmr=t=>({getState:e,dispatch:n})=>i=>r=>{if(r.type!=="LIFT"){i(r);return}const{id:o,clientSelection:s,movementMode:a}=r.payload,l=e();l.phase==="DROP_ANIMATING"&&n(_ze({completed:l.completed})),e().phase!=="IDLE"&&$n(!1,"Unexpected phase to start a drag"),n(yze()),n(Smr({draggableId:o,movementMode:a}));const u={draggableId:o,scrollOptions:{shouldPublishImmediately:a==="SNAP"}},{critical:d,dimensions:h,viewport:f}=t.startPublishing(u);Bmr(d,h),n(Emr({critical:d,dimensions:h,clientSelection:s,movementMode:a,viewport:f}))},Hmr=t=>()=>e=>n=>{n.type==="INITIAL_PUBLISH"&&t.dragging(),n.type==="DROP_ANIMATE"&&t.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&t.resting(),e(n)};const xze={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},fU={opacity:{drop:0,combining:.7},scale:{drop:.75}},Pzt={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},CL=`${Pzt.outOfTheWay}s ${xze.outOfTheWay}`,IB={fluid:`opacity ${CL}`,snap:`transform ${CL}, opacity ${CL}`,drop:t=>{const e=`${t}s ${xze.drop}`;return`transform ${e}, opacity ${e}`},outOfTheWay:`transform ${CL}`,placeholder:`height ${CL}, width ${CL}, margin ${CL}`},tbt=t=>CD(t,Qd)?void 0:`translate(${t.x}px, ${t.y}px)`,tPe={moveTo:tbt,drop:(t,e)=>{const n=tbt(t);if(n)return e?`${n} scale(${fU.scale.drop})`:n}},{minDropTime:nPe,maxDropTime:Ozt}=Pzt,Wmr=Ozt-nPe,nbt=1500,Umr=.6;var Kmr=({current:t,destination:e,reason:n})=>{const i=uU(t,e);if(i<=0)return nPe;if(i>=nbt)return Ozt;const r=i/nbt,o=nPe+Wmr*r,s=n==="CANCEL"?o*Umr:o;return Number(s.toFixed(2))},qmr=({impact:t,draggable:e,dimensions:n,viewport:i,afterCritical:r})=>{const{draggables:o,droppables:s}=n,a=nb(t),l=a?s[a]:null,c=s[e.descriptor.droppableId],u=Mzt({impact:t,draggable:e,draggables:o,afterCritical:r,droppable:l||c,viewport:i});return Xg(u,e.client.borderBox.center)},Gmr=({draggables:t,reason:e,lastImpact:n,home:i,viewport:r,onLiftImpact:o})=>!n.at||e!=="DROP"?{impact:kzt({draggables:t,impact:o,destination:i,viewport:r,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:n.at.type==="REORDER"?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:dU},didDropInsideDroppable:!0};const Ymr=({getState:t,dispatch:e})=>n=>i=>{if(i.type!=="DROP"){n(i);return}const r=t(),o=i.payload.reason;if(r.phase==="COLLECTING"){e($mr({reason:o}));return}if(r.phase==="IDLE")return;r.phase==="DROP_PENDING"&&r.isWaiting&&$n(!1,"A DROP action occurred while DROP_PENDING and still waiting"),r.phase==="DRAGGING"||r.phase==="DROP_PENDING"||$n(!1,`Cannot drop in phase: ${r.phase}`);const a=r.critical,l=r.dimensions,c=l.draggables[r.critical.draggable.id],{impact:u,didDropInsideDroppable:d}=Gmr({reason:o,lastImpact:r.impact,afterCritical:r.afterCritical,onLiftImpact:r.onLiftImpact,home:r.dimensions.droppables[r.critical.droppable.id],viewport:r.viewport,draggables:r.dimensions.draggables}),h=d?fze(u):null,f=d?Ape(u):null,m={index:a.draggable.index,droppableId:a.droppable.id},p={draggableId:c.descriptor.id,type:c.descriptor.type,source:m,reason:o,mode:r.movementMode,destination:h,combine:f},g=qmr({impact:u,draggable:c,dimensions:l,viewport:r.viewport,afterCritical:r.afterCritical}),y={critical:r.critical,afterCritical:r.afterCritical,result:p,impact:u};if(!(!CD(r.current.client.offset,g)||!!p.combine)){e(_ze({completed:y}));return}const w=Kmr({current:r.current.client.offset,destination:g,reason:o});e(Fmr({newHomeClientOffset:g,dropDuration:w,completed:y}))};var Xmr=Ymr,jzt=()=>({x:window.pageXOffset,y:window.pageYOffset});function Zmr(t){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:e=>{e.target!==window&&e.target!==window.document||t()}}}function Qmr({onWindowScroll:t}){function e(){t(jzt())}const n=cU(e),i=Zmr(n);let r=wD;function o(){return r!==wD}function s(){o()&&$n(!1,"Cannot start scroll listener when already active"),r=fv(window,[i])}function a(){o()||$n(!1,"Cannot stop scroll listener when not active"),n.cancel(),r(),r=wD}return{start:s,stop:a,isActive:o}}const Jmr=t=>t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH",epr=t=>{const e=Qmr({onWindowScroll:n=>{t.dispatch(Imr({newScroll:n}))}});return n=>i=>{!e.isActive()&&i.type==="INITIAL_PUBLISH"&&e.start(),e.isActive()&&Jmr(i)&&e.stop(),n(i)}};var tpr=epr,npr=t=>{let e=!1,n=!1;const i=setTimeout(()=>{n=!0}),r=o=>{if(e){Ml("Announcement already made. Not making a second announcement");return}if(n){Ml(`
        Announcements cannot be made asynchronously.
        Default message has already been announced.
      `);return}e=!0,t(o),clearTimeout(i)};return r.wasCalled=()=>e,r},ipr=()=>{const t=[],e=r=>{const o=t.findIndex(a=>a.timerId===r);o===-1&&$n(!1,"Could not find timer");const[s]=t.splice(o,1);s.callback()};return{add:r=>{const o=setTimeout(()=>e(o)),s={timerId:o,callback:r};t.push(s)},flush:()=>{if(!t.length)return;const r=[...t];t.length=0,r.forEach(o=>{clearTimeout(o.timerId),o.callback()})}}};const rpr=(t,e)=>t==null&&e==null?!0:t==null||e==null?!1:t.droppableId===e.droppableId&&t.index===e.index,opr=(t,e)=>t==null&&e==null?!0:t==null||e==null?!1:t.draggableId===e.draggableId&&t.droppableId===e.droppableId,spr=(t,e)=>{if(t===e)return!0;const n=t.draggable.id===e.draggable.id&&t.draggable.droppableId===e.draggable.droppableId&&t.draggable.type===e.draggable.type&&t.draggable.index===e.draggable.index,i=t.droppable.id===e.droppable.id&&t.droppable.type===e.droppable.type;return n&&i},w7=(t,e)=>{e()},yJ=(t,e)=>({draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:e});function sSe(t,e,n,i){if(!t){n(i(e));return}const r=npr(n);t(e,{announce:r}),r.wasCalled()||n(i(e))}var apr=(t,e)=>{const n=ipr();let i=null;const r=(d,h)=>{i&&$n(!1,"Cannot fire onBeforeCapture as a drag start has already been published"),w7("onBeforeCapture",()=>{const f=t().onBeforeCapture;f&&f({draggableId:d,mode:h})})},o=(d,h)=>{i&&$n(!1,"Cannot fire onBeforeDragStart as a drag start has already been published"),w7("onBeforeDragStart",()=>{const f=t().onBeforeDragStart;f&&f(yJ(d,h))})},s=(d,h)=>{i&&$n(!1,"Cannot fire onBeforeDragStart as a drag start has already been published");const f=yJ(d,h);i={mode:h,lastCritical:d,lastLocation:f.source,lastCombine:null},n.add(()=>{w7("onDragStart",()=>sSe(t().onDragStart,f,e,Ate.onDragStart))})},a=(d,h)=>{const f=fze(h),m=Ape(h);i||$n(!1,"Cannot fire onDragMove when onDragStart has not been called");const p=!spr(d,i.lastCritical);p&&(i.lastCritical=d);const g=!rpr(i.lastLocation,f);g&&(i.lastLocation=f);const y=!opr(i.lastCombine,m);if(y&&(i.lastCombine=m),!p&&!g&&!y)return;const _={...yJ(d,i.mode),combine:m,destination:f};n.add(()=>{w7("onDragUpdate",()=>sSe(t().onDragUpdate,_,e,Ate.onDragUpdate))})},l=()=>{i||$n(!1,"Can only flush responders while dragging"),n.flush()},c=d=>{i||$n(!1,"Cannot fire onDragEnd when there is no matching onDragStart"),i=null,w7("onDragEnd",()=>sSe(t().onDragEnd,d,e,Ate.onDragEnd))};return{beforeCapture:r,beforeStart:o,start:s,update:a,flush:l,drop:c,abort:()=>{if(!i)return;const d={...yJ(i.lastCritical,i.mode),combine:null,destination:null,reason:"CANCEL"};c(d)}}},lpr=(t,e)=>{const n=apr(t,e);return i=>r=>o=>{if(o.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(o.payload.draggableId,o.payload.movementMode);return}if(o.type==="INITIAL_PUBLISH"){const a=o.payload.critical;n.beforeStart(a,o.payload.movementMode),r(o),n.start(a,o.payload.movementMode);return}if(o.type==="DROP_COMPLETE"){const a=o.payload.completed.result;n.flush(),r(o),n.drop(a);return}if(r(o),o.type==="FLUSH"){n.abort();return}const s=i.getState();s.phase==="DRAGGING"&&n.update(s.critical,s.impact)}};const cpr=t=>e=>n=>{if(n.type!=="DROP_ANIMATION_FINISHED"){e(n);return}const i=t.getState();i.phase!=="DROP_ANIMATING"&&$n(!1,"Cannot finish a drop animating when no drop is occurring"),t.dispatch(_ze({completed:i.completed}))};var upr=cpr;const dpr=t=>{let e=null,n=null;function i(){n&&(cancelAnimationFrame(n),n=null),e&&(e(),e=null)}return r=>o=>{if((o.type==="FLUSH"||o.type==="DROP_COMPLETE"||o.type==="DROP_ANIMATION_FINISHED")&&i(),r(o),o.type!=="DROP_ANIMATE")return;const s={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){t.getState().phase==="DROP_ANIMATING"&&t.dispatch(Rzt())}};n=requestAnimationFrame(()=>{n=null,e=fv(window,[s])})}};var hpr=dpr,fpr=t=>()=>e=>n=>{(n.type==="DROP_COMPLETE"||n.type==="FLUSH"||n.type==="DROP_ANIMATE")&&t.stopPublishing(),e(n)},mpr=t=>{let e=!1;return()=>n=>i=>{if(i.type==="INITIAL_PUBLISH"){e=!0,t.tryRecordFocus(i.payload.critical.draggable.id),n(i),t.tryRestoreFocusRecorded();return}if(n(i),!!e){if(i.type==="FLUSH"){e=!1,t.tryRestoreFocusRecorded();return}if(i.type==="DROP_COMPLETE"){e=!1;const r=i.payload.completed.result;r.combine&&t.tryShiftRecord(r.draggableId,r.combine.draggableId),t.tryRestoreFocusRecorded()}}}};const ppr=t=>t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH";var gpr=t=>e=>n=>i=>{if(ppr(i)){t.stop(),n(i);return}if(i.type==="INITIAL_PUBLISH"){n(i);const r=e.getState();r.phase!=="DRAGGING"&&$n(!1,"Expected phase to be DRAGGING after INITIAL_PUBLISH"),t.start(r);return}n(i),t.scroll(e.getState())};const bpr=t=>e=>n=>{if(e(n),n.type!=="PUBLISH_WHILE_DRAGGING")return;const i=t.getState();i.phase==="DROP_PENDING"&&(i.isWaiting||t.dispatch(Azt({reason:i.reason})))};var vpr=bpr;const ypr=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({name:"@hello-pangea/dnd"}):QBt;var _pr=({dimensionMarshal:t,focusMarshal:e,styleMarshal:n,getResponders:i,announce:r,autoScroller:o})=>ZBt(Cmr,ypr(Nhr(Hmr(n),fpr(t),zmr(t),Xmr,upr,hpr,vpr,gpr(o),tpr,mpr(e),lpr(i,r))));const aSe=()=>({additions:{},removals:{},modified:{}});function xpr({registry:t,callbacks:e}){let n=aSe(),i=null;const r=()=>{i||(e.collectionStarting(),i=requestAnimationFrame(()=>{i=null;const{additions:l,removals:c,modified:u}=n,d=Object.keys(l).map(m=>t.draggable.getById(m).getDimension(Qd)).sort((m,p)=>m.descriptor.index-p.descriptor.index),h=Object.keys(u).map(m=>{const g=t.droppable.getById(m).callbacks.getScrollWhileDragging();return{droppableId:m,scroll:g}}),f={additions:d,removals:Object.keys(c),modified:h};n=aSe(),e.publish(f)}))};return{add:l=>{const c=l.descriptor.id;n.additions[c]=l,n.modified[l.descriptor.droppableId]=!0,n.removals[c]&&delete n.removals[c],r()},remove:l=>{const c=l.descriptor;n.removals[c.id]=!0,n.modified[c.droppableId]=!0,n.additions[c.id]&&delete n.additions[c.id],r()},stop:()=>{i&&(cancelAnimationFrame(i),i=null,n=aSe())}}}var Fzt=({scrollHeight:t,scrollWidth:e,height:n,width:i})=>{const r=Xg({x:e,y:t},{x:i,y:n});return{x:Math.max(0,r.x),y:Math.max(0,r.y)}},$zt=()=>{const t=document.documentElement;return t||$n(!1,"Cannot find document.documentElement"),t},Vzt=()=>{const t=$zt();return Fzt({scrollHeight:t.scrollHeight,scrollWidth:t.scrollWidth,width:t.clientWidth,height:t.clientHeight})},wpr=()=>{const t=jzt(),e=Vzt(),n=t.y,i=t.x,r=$zt(),o=r.clientWidth,s=r.clientHeight,a=i+o,l=n+s;return{frame:u0({top:n,left:i,right:a,bottom:l}),scroll:{initial:t,current:t,max:e,diff:{value:Qd,displacement:Qd}}}},Cpr=({critical:t,scrollOptions:e,registry:n})=>{const i=wpr(),r=i.scroll.current,o=t.droppable,s=n.droppable.getAllByType(o.type).map(u=>u.callbacks.getDimensionAndWatchScroll(r,e)),a=n.draggable.getAllByType(t.draggable.type).map(u=>u.getDimension(r));return{dimensions:{draggables:mzt(a),droppables:fzt(s)},critical:t,viewport:i}};function ibt(t,e,n){return n.descriptor.id===e.id||n.descriptor.type!==e.type?!1:t.droppable.getById(n.descriptor.droppableId).descriptor.mode!=="virtual"?(Ml(`
      You are attempting to add or remove a Draggable [id: ${n.descriptor.id}]
      while a drag is occurring. This is only supported for virtual lists.

      See https://github.com/hello-pangea/dnd/blob/main/docs/patterns/virtual-lists.md
    `),!1):!0}var Spr=(t,e)=>{let n=null;const i=xpr({callbacks:{publish:e.publishWhileDragging,collectionStarting:e.collectionStarting},registry:t}),r=(h,f)=>{t.droppable.exists(h)||$n(!1,`Cannot update is enabled flag of Droppable ${h} as it is not registered`),n&&e.updateDroppableIsEnabled({id:h,isEnabled:f})},o=(h,f)=>{n&&(t.droppable.exists(h)||$n(!1,`Cannot update isCombineEnabled flag of Droppable ${h} as it is not registered`),e.updateDroppableIsCombineEnabled({id:h,isCombineEnabled:f}))},s=(h,f)=>{n&&(t.droppable.exists(h)||$n(!1,`Cannot update the scroll on Droppable ${h} as it is not registered`),e.updateDroppableScroll({id:h,newScroll:f}))},a=(h,f)=>{n&&t.droppable.getById(h).callbacks.scroll(f)},l=()=>{if(!n)return;i.stop();const h=n.critical.droppable;t.droppable.getAllByType(h.type).forEach(f=>f.callbacks.dragStopped()),n.unsubscribe(),n=null},c=h=>{n||$n(!1,"Should only be subscribed when a collection is occurring");const f=n.critical.draggable;h.type==="ADDITION"&&ibt(t,f,h.value)&&i.add(h.value),h.type==="REMOVAL"&&ibt(t,f,h.value)&&i.remove(h.value)};return{updateDroppableIsEnabled:r,updateDroppableIsCombineEnabled:o,scrollDroppable:a,updateDroppableScroll:s,startPublishing:h=>{n&&$n(!1,"Cannot start capturing critical dimensions as there is already a collection");const f=t.draggable.getById(h.draggableId),m=t.droppable.getById(f.descriptor.droppableId),p={draggable:f.descriptor,droppable:m.descriptor},g=t.subscribe(c);return n={critical:p,unsubscribe:g},Cpr({critical:p,registry:t,scrollOptions:h.scrollOptions})},stopPublishing:l}},Bzt=(t,e)=>t.phase==="IDLE"?!0:t.phase!=="DROP_ANIMATING"||t.completed.result.draggableId===e?!1:t.completed.result.reason==="DROP",Npr=t=>{window.scrollBy(t.x,t.y)};const Epr=Gd(t=>Ipe(t).filter(e=>!(!e.isEnabled||!e.frame))),Dpr=(t,e)=>Epr(e).find(i=>(i.frame||$n(!1,"Invalid result"),Szt(i.frame.pageMarginBox)(t)))||null;var kpr=({center:t,destination:e,droppables:n})=>{if(e){const r=n[e];return r.frame?r:null}return Dpr(t,n)};const mU={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:t=>t**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var Mpr=(t,e,n=()=>mU)=>{const i=n(),r=t[e.size]*i.startFromPercentage,o=t[e.size]*i.maxScrollAtPercentage;return{startScrollingFrom:r,maxScrollValueAt:o}},zzt=({startOfRange:t,endOfRange:e,current:n})=>{const i=e-t;return i===0?(Ml(`
      Detected distance range of 0 in the fluid auto scroller
      This is unexpected and would cause a divide by 0 issue.
      Not allowing an auto scroll
    `),0):(n-t)/i},wze=1,Lpr=(t,e,n=()=>mU)=>{const i=n();if(t>e.startScrollingFrom)return 0;if(t<=e.maxScrollValueAt)return i.maxPixelScroll;if(t===e.startScrollingFrom)return wze;const o=1-zzt({startOfRange:e.maxScrollValueAt,endOfRange:e.startScrollingFrom,current:t}),s=i.maxPixelScroll*i.ease(o);return Math.ceil(s)},Tpr=(t,e,n)=>{const i=n(),r=i.durationDampening.accelerateAt,o=i.durationDampening.stopDampeningAt,s=e,a=o,c=Date.now()-s;if(c>=o)return t;if(c<r)return wze;const u=zzt({startOfRange:r,endOfRange:a,current:c}),d=t*i.ease(u);return Math.ceil(d)},rbt=({distanceToEdge:t,thresholds:e,dragStartTime:n,shouldUseTimeDampening:i,getAutoScrollerOptions:r})=>{const o=Lpr(t,e,r);return o===0?0:i?Math.max(Tpr(o,n,r),wze):o},obt=({container:t,distanceToEdges:e,dragStartTime:n,axis:i,shouldUseTimeDampening:r,getAutoScrollerOptions:o})=>{const s=Mpr(t,i,o);return e[i.end]<e[i.start]?rbt({distanceToEdge:e[i.end],thresholds:s,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:o}):-1*rbt({distanceToEdge:e[i.start],thresholds:s,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:o})},Ipr=({container:t,subject:e,proposedScroll:n})=>{const i=e.height>t.height,r=e.width>t.width;return!r&&!i?n:r&&i?null:{x:r?0:n.x,y:i?0:n.y}};const Apr=hzt(t=>t===0?0:t);var Hzt=({dragStartTime:t,container:e,subject:n,center:i,shouldUseTimeDampening:r,getAutoScrollerOptions:o})=>{const s={top:i.y-e.top,right:e.right-i.x,bottom:e.bottom-i.y,left:i.x-e.left},a=obt({container:e,distanceToEdges:s,dragStartTime:t,axis:mze,shouldUseTimeDampening:r,getAutoScrollerOptions:o}),l=obt({container:e,distanceToEdges:s,dragStartTime:t,axis:bzt,shouldUseTimeDampening:r,getAutoScrollerOptions:o}),c=Apr({x:l,y:a});if(CD(c,Qd))return null;const u=Ipr({container:e,subject:n,proposedScroll:c});return u?CD(u,Qd)?null:u:null};const Rpr=hzt(t=>t===0?0:t>0?1:-1),Cze=(()=>{const t=(e,n)=>e<0?e:e>n?e-n:0;return({current:e,max:n,change:i})=>{const r=Dh(e,i),o={x:t(r.x,n.x),y:t(r.y,n.y)};return CD(o,Qd)?null:o}})(),Wzt=({max:t,current:e,change:n})=>{const i={x:Math.max(e.x,t.x),y:Math.max(e.y,t.y)},r=Rpr(n),o=Cze({max:i,current:e,change:r});return!o||r.x!==0&&o.x===0||r.y!==0&&o.y===0},Sze=(t,e)=>Wzt({current:t.scroll.current,max:t.scroll.max,change:e}),Ppr=(t,e)=>{if(!Sze(t,e))return null;const n=t.scroll.max,i=t.scroll.current;return Cze({current:i,max:n,change:e})},Nze=(t,e)=>{const n=t.frame;return n?Wzt({current:n.scroll.current,max:n.scroll.max,change:e}):!1},Opr=(t,e)=>{const n=t.frame;return!n||!Nze(t,e)?null:Cze({current:n.scroll.current,max:n.scroll.max,change:e})};var jpr=({viewport:t,subject:e,center:n,dragStartTime:i,shouldUseTimeDampening:r,getAutoScrollerOptions:o})=>{const s=Hzt({dragStartTime:i,container:t.frame,subject:e,center:n,shouldUseTimeDampening:r,getAutoScrollerOptions:o});return s&&Sze(t,s)?s:null},Fpr=({droppable:t,subject:e,center:n,dragStartTime:i,shouldUseTimeDampening:r,getAutoScrollerOptions:o})=>{const s=t.frame;if(!s)return null;const a=Hzt({dragStartTime:i,container:s.pageMarginBox,subject:e,center:n,shouldUseTimeDampening:r,getAutoScrollerOptions:o});return a&&Nze(t,a)?a:null},sbt=({state:t,dragStartTime:e,shouldUseTimeDampening:n,scrollWindow:i,scrollDroppable:r,getAutoScrollerOptions:o})=>{const s=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){const d=t.viewport,h=jpr({dragStartTime:e,viewport:d,subject:l,center:s,shouldUseTimeDampening:n,getAutoScrollerOptions:o});if(h){i(h);return}}const c=kpr({center:s,destination:nb(t.impact),droppables:t.dimensions.droppables});if(!c)return;const u=Fpr({dragStartTime:e,droppable:c,subject:l,center:s,shouldUseTimeDampening:n,getAutoScrollerOptions:o});u&&r(c.descriptor.id,u)},$pr=({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:n=()=>mU})=>{const i=cU(t),r=cU(e);let o=null;const s=c=>{o||$n(!1,"Cannot fluid scroll if not dragging");const{shouldUseTimeDampening:u,dragStartTime:d}=o;sbt({state:c,scrollWindow:i,scrollDroppable:r,dragStartTime:d,shouldUseTimeDampening:u,getAutoScrollerOptions:n})};return{start:c=>{o&&$n(!1,"Cannot start auto scrolling when already started");const u=Date.now();let d=!1;const h=()=>{d=!0};sbt({state:c,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:h,scrollDroppable:h,getAutoScrollerOptions:n}),o={dragStartTime:u,shouldUseTimeDampening:d},d&&s(c)},stop:()=>{o&&(i.cancel(),r.cancel(),o=null)},scroll:s}},Vpr=({move:t,scrollDroppable:e,scrollWindow:n})=>{const i=(a,l)=>{const c=Dh(a.current.client.selection,l);t({client:c})},r=(a,l)=>{if(!Nze(a,l))return l;const c=Opr(a,l);if(!c)return e(a.descriptor.id,l),null;const u=Xg(l,c);return e(a.descriptor.id,u),Xg(l,u)},o=(a,l,c)=>{if(!a||!Sze(l,c))return c;const u=Ppr(l,c);if(!u)return n(c),null;const d=Xg(c,u);return n(d),Xg(c,d)};return a=>{const l=a.scrollJumpRequest;if(!l)return;const c=nb(a.impact);c||$n(!1,"Cannot perform a jump scroll when there is no destination");const u=r(a.dimensions.droppables[c],l);if(!u)return;const d=a.viewport,h=o(a.isWindowScrollAllowed,d,u);h&&i(a,h)}},Bpr=({scrollDroppable:t,scrollWindow:e,move:n,getAutoScrollerOptions:i})=>{const r=$pr({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:i}),o=Vpr({move:n,scrollWindow:e,scrollDroppable:t});return{scroll:l=>{if(!(i().disabled||l.phase!=="DRAGGING")){if(l.movementMode==="FLUID"){r.scroll(l);return}l.scrollJumpRequest&&o(l)}},start:r.start,stop:r.stop}};const rF="data-rfd",oF=(()=>{const t=`${rF}-drag-handle`;return{base:t,draggableId:`${t}-draggable-id`,contextId:`${t}-context-id`}})(),iPe=(()=>{const t=`${rF}-draggable`;return{base:t,contextId:`${t}-context-id`,id:`${t}-id`}})(),zpr=(()=>{const t=`${rF}-droppable`;return{base:t,contextId:`${t}-context-id`,id:`${t}-id`}})(),abt={contextId:`${rF}-scroll-container-context-id`},Hpr=t=>e=>`[${e}="${t}"]`,C7=(t,e)=>t.map(n=>{const i=n.styles[e];return i?`${n.selector} { ${i} }`:""}).join(" "),Wpr="pointer-events: none;";var Upr=t=>{const e=Hpr(t),n=(()=>{const a=`
      cursor: -webkit-grab;
      cursor: grab;
    `;return{selector:e(oF.contextId),styles:{always:`
          -webkit-touch-callout: none;
          -webkit-tap-highlight-color: rgba(0,0,0,0);
          touch-action: manipulation;
        `,resting:a,dragging:Wpr,dropAnimating:a}}})(),i=(()=>{const a=`
      transition: ${IB.outOfTheWay};
    `;return{selector:e(iPe.contextId),styles:{dragging:a,dropAnimating:a,userCancel:a}}})(),r={selector:e(zpr.contextId),styles:{always:"overflow-anchor: none;"}},s=[i,n,r,{selector:"body",styles:{dragging:`
        cursor: grabbing;
        cursor: -webkit-grabbing;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        overflow-anchor: none;
      `}}];return{always:C7(s,"always"),resting:C7(s,"resting"),dragging:C7(s,"dragging"),dropAnimating:C7(s,"dropAnimating"),userCancel:C7(s,"userCancel")}};const Kpr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?b.useLayoutEffect:b.useEffect;var ib=Kpr;const lSe=()=>{const t=document.querySelector("head");return t||$n(!1,"Cannot find the head to append a style to"),t},lbt=t=>{const e=document.createElement("style");return t&&e.setAttribute("nonce",t),e.type="text/css",e};function qpr(t,e){const n=Ns(()=>Upr(t),[t]),i=b.useRef(null),r=b.useRef(null),o=yr(Gd(d=>{const h=r.current;h||$n(!1,"Cannot set dynamic style element if it is not set"),h.textContent=d}),[]),s=yr(d=>{const h=i.current;h||$n(!1,"Cannot set dynamic style element if it is not set"),h.textContent=d},[]);ib(()=>{!i.current&&!r.current||$n(!1,"style elements already mounted");const d=lbt(e),h=lbt(e);return i.current=d,r.current=h,d.setAttribute(`${rF}-always`,t),h.setAttribute(`${rF}-dynamic`,t),lSe().appendChild(d),lSe().appendChild(h),s(n.always),o(n.resting),()=>{const f=m=>{const p=m.current;p||$n(!1,"Cannot unmount ref as it is not set"),lSe().removeChild(p),m.current=null};f(i),f(r)}},[e,s,o,n.always,n.resting,t]);const a=yr(()=>o(n.dragging),[o,n.dragging]),l=yr(d=>{if(d==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),c=yr(()=>{r.current&&o(n.resting)},[o,n.resting]);return Ns(()=>({dragging:a,dropping:l,resting:c}),[a,l,c])}function Uzt(t,e){return Array.from(t.querySelectorAll(e))}var Kzt=t=>t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window;function aG(t){return t instanceof Kzt(t).HTMLElement}function qzt(t,e){const n=`[${oF.contextId}="${t}"]`,i=Uzt(document,n);if(!i.length)return Ml(`Unable to find any drag handles in the context "${t}"`),null;const r=i.find(o=>o.getAttribute(oF.draggableId)===e);return r?aG(r)?r:(Ml("drag handle needs to be a HTMLElement"),null):(Ml(`Unable to find drag handle with id "${e}" as no handle with a matching id was found`),null)}function Gpr(t){const e=b.useRef({}),n=b.useRef(null),i=b.useRef(null),r=b.useRef(!1),o=yr(function(h,f){const m={id:h,focus:f};return e.current[h]=m,function(){const g=e.current;g[h]!==m&&delete g[h]}},[]),s=yr(function(h){const f=qzt(t,h);f&&f!==document.activeElement&&f.focus()},[t]),a=yr(function(h,f){n.current===h&&(n.current=f)},[]),l=yr(function(){i.current||r.current&&(i.current=requestAnimationFrame(()=>{i.current=null;const h=n.current;h&&s(h)}))},[s]),c=yr(function(h){n.current=null;const f=document.activeElement;f&&f.getAttribute(oF.draggableId)===h&&(n.current=h)},[]);return ib(()=>(r.current=!0,function(){r.current=!1;const h=i.current;h&&cancelAnimationFrame(h)}),[]),Ns(()=>({register:o,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:a}),[o,c,l,a])}function Ypr(){const t={draggables:{},droppables:{}},e=[];function n(d){return e.push(d),function(){const f=e.indexOf(d);f!==-1&&e.splice(f,1)}}function i(d){e.length&&e.forEach(h=>h(d))}function r(d){return t.draggables[d]||null}function o(d){const h=r(d);return h||$n(!1,`Cannot find draggable entry with id [${d}]`),h}const s={register:d=>{t.draggables[d.descriptor.id]=d,i({type:"ADDITION",value:d})},update:(d,h)=>{const f=t.draggables[h.descriptor.id];f&&f.uniqueId===d.uniqueId&&(delete t.draggables[h.descriptor.id],t.draggables[d.descriptor.id]=d)},unregister:d=>{const h=d.descriptor.id,f=r(h);f&&d.uniqueId===f.uniqueId&&(delete t.draggables[h],t.droppables[d.descriptor.droppableId]&&i({type:"REMOVAL",value:d}))},getById:o,findById:r,exists:d=>!!r(d),getAllByType:d=>Object.values(t.draggables).filter(h=>h.descriptor.type===d)};function a(d){return t.droppables[d]||null}function l(d){const h=a(d);return h||$n(!1,`Cannot find droppable entry with id [${d}]`),h}const c={register:d=>{t.droppables[d.descriptor.id]=d},unregister:d=>{const h=a(d.descriptor.id);h&&d.uniqueId===h.uniqueId&&delete t.droppables[d.descriptor.id]},getById:l,findById:a,exists:d=>!!a(d),getAllByType:d=>Object.values(t.droppables).filter(h=>h.descriptor.type===d)};function u(){t.draggables={},t.droppables={},e.length=0}return{draggable:s,droppable:c,subscribe:n,clean:u}}function Xpr(){const t=Ns(Ypr,[]);return b.useEffect(()=>function(){Z.version.startsWith("16")||Z.version.startsWith("17")?requestAnimationFrame(t.clean):t.clean()},[t]),t}var Eze=Z.createContext(null),pU=()=>{const t=document.body;return t||$n(!1,"Cannot find document.body"),t};const Zpr={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};var Qpr=Zpr;const Jpr=t=>`rfd-announcement-${t}`;function egr(t){const e=Ns(()=>Jpr(t),[t]),n=b.useRef(null);return b.useEffect(function(){const o=document.createElement("div");return n.current=o,o.id=e,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),lt(o.style,Qpr),pU().appendChild(o),function(){setTimeout(function(){const l=pU();l.contains(o)&&l.removeChild(o),o===n.current&&(n.current=null)})}},[e]),yr(r=>{const o=n.current;if(o){o.textContent=r;return}Ml(`
      A screen reader message was trying to be announced but it was unable to do so.
      This can occur if you unmount your <DragDropContext /> in your onDragEnd.
      Consider calling provided.announce() before the unmount so that the instruction will
      not be lost for users relying on a screen reader.

      Message not passed to screen reader:

      "${r}"
    `)},[])}let tgr=0;const Gzt={separator:"::"};function ngr(t,e=Gzt){return Ns(()=>`${t}${e.separator}${tgr++}`,[e.separator,t])}function igr(t,e=Gzt){const n=Z.useId();return Ns(()=>`${t}${e.separator}${n}`,[e.separator,t,n])}var Dze="useId"in Z?igr:ngr;function rgr({contextId:t,uniqueId:e}){return`rfd-hidden-text-${t}-${e}`}function ogr({contextId:t,text:e}){const n=Dze("hidden-text",{separator:"-"}),i=Ns(()=>rgr({contextId:t,uniqueId:n}),[n,t]);return b.useEffect(function(){const o=document.createElement("div");return o.id=i,o.textContent=e,o.style.display="none",pU().appendChild(o),function(){const a=pU();a.contains(o)&&a.removeChild(o)}},[i,e]),i}var Ope=Z.createContext(null),sgr={react:"^16.8.5 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.5 || ^17.0.0 || ^18.0.0"};const agr=/(\d+)\.(\d+)\.(\d+)/,cbt=t=>{const e=agr.exec(t);e==null&&$n(!1,`Unable to parse React version ${t}`);const n=Number(e[1]),i=Number(e[2]),r=Number(e[3]);return{major:n,minor:i,patch:r,raw:t}},lgr=(t,e)=>e.major>t.major?!0:e.major<t.major?!1:e.minor>t.minor?!0:e.minor<t.minor?!1:e.patch>=t.patch;var cgr=(t,e)=>{const n=cbt(t),i=cbt(e);lgr(n,i)||Ml(`
    React version: [${i.raw}]
    does not satisfy expected peer dependency version: [${n.raw}]

    This can result in run time bugs, and even fatal crashes
  `)};const cSe=`
  We expect a html5 doctype: <!doctype html>
  This is to ensure consistent browser layout and measurement

  More information: https://github.com/hello-pangea/dnd/blob/main/docs/guides/doctype.md
`;var ugr=t=>{const e=t.doctype;if(!e){Ml(`
      No <!doctype html> found.

      ${cSe}
    `);return}e.name.toLowerCase()!=="html"&&Ml(`
      Unexpected <!doctype> found: (${e.name})

      ${cSe}
    `),e.publicId!==""&&Ml(`
      Unexpected <!doctype> publicId found: (${e.publicId})
      A html5 doctype does not have a publicId

      ${cSe}
    `)};function kze(t){t()}function lG(t,e){kze(()=>{b.useEffect(()=>{try{t()}catch(n){QRe(`
          A setup problem was encountered.

          > ${n.message}
        `)}},e)})}function dgr(){lG(()=>{cgr(sgr.react,Z.version),ugr(document)},[])}function Mze(t){const e=b.useRef(t);return b.useEffect(()=>{e.current=t}),e}function hgr(){let t=null;function e(){return!!t}function n(s){return s===t}function i(s){t&&$n(!1,"Cannot claim lock as it is already claimed");const a={abandon:s};return t=a,a}function r(){t||$n(!1,"Cannot release lock when there is no lock"),t=null}function o(){t&&(t.abandon(),r())}return{isClaimed:e,isActive:n,claim:i,release:r,tryAbandon:o}}function gU(t){return t.phase==="IDLE"||t.phase==="DROP_ANIMATING"?!1:t.isDragging}const fgr=9,mgr=13,Lze=27,Yzt=32,pgr=33,ggr=34,bgr=35,vgr=36,ygr=37,_gr=38,xgr=39,wgr=40,Cgr={[mgr]:!0,[fgr]:!0};var Xzt=t=>{Cgr[t.keyCode]&&t.preventDefault()};const Sgr=(()=>{const t="visibilitychange";return typeof document>"u"?t:[t,`ms${t}`,`webkit${t}`,`moz${t}`,`o${t}`].find(i=>`on${i}`in document)||t})();var jpe=Sgr;const Zzt=0,ubt=5;function Ngr(t,e){return Math.abs(e.x-t.x)>=ubt||Math.abs(e.y-t.y)>=ubt}const dbt={type:"IDLE"};function Egr({cancel:t,completed:e,getPhase:n,setPhase:i}){return[{eventName:"mousemove",fn:r=>{const{button:o,clientX:s,clientY:a}=r;if(o!==Zzt)return;const l={x:s,y:a},c=n();if(c.type==="DRAGGING"){r.preventDefault(),c.actions.move(l);return}c.type!=="PENDING"&&$n(!1,"Cannot be IDLE");const u=c.point;if(!Ngr(u,l))return;r.preventDefault();const d=c.actions.fluidLift(l);i({type:"DRAGGING",actions:d})}},{eventName:"mouseup",fn:r=>{const o=n();if(o.type!=="DRAGGING"){t();return}r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),e()}},{eventName:"mousedown",fn:r=>{n().type==="DRAGGING"&&r.preventDefault(),t()}},{eventName:"keydown",fn:r=>{if(n().type==="PENDING"){t();return}if(r.keyCode===Lze){r.preventDefault(),t();return}Xzt(r)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{n().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:r=>{const o=n();if(o.type==="IDLE"&&$n(!1,"Unexpected phase"),o.actions.shouldRespectForcePress()){t();return}r.preventDefault()}},{eventName:jpe,fn:t}]}function Dgr(t){const e=b.useRef(dbt),n=b.useRef(wD),i=Ns(()=>({eventName:"mousedown",fn:function(d){if(d.defaultPrevented||d.button!==Zzt||d.ctrlKey||d.metaKey||d.shiftKey||d.altKey)return;const h=t.findClosestDraggableId(d);if(!h)return;const f=t.tryGetLock(h,s,{sourceEvent:d});if(!f)return;d.preventDefault();const m={x:d.clientX,y:d.clientY};n.current(),c(f,m)}}),[t]),r=Ns(()=>({eventName:"webkitmouseforcewillbegin",fn:u=>{if(u.defaultPrevented)return;const d=t.findClosestDraggableId(u);if(!d)return;const h=t.findOptionsForDraggable(d);h&&(h.shouldRespectForcePress||t.canGetLock(d)&&u.preventDefault())}}),[t]),o=yr(function(){const d={passive:!1,capture:!0};n.current=fv(window,[r,i],d)},[r,i]),s=yr(()=>{e.current.type!=="IDLE"&&(e.current=dbt,n.current(),o())},[o]),a=yr(()=>{const u=e.current;s(),u.type==="DRAGGING"&&u.actions.cancel({shouldBlockNextClick:!0}),u.type==="PENDING"&&u.actions.abort()},[s]),l=yr(function(){const d={capture:!0,passive:!1},h=Egr({cancel:a,completed:s,getPhase:()=>e.current,setPhase:f=>{e.current=f}});n.current=fv(window,h,d)},[a,s]),c=yr(function(d,h){e.current.type!=="IDLE"&&$n(!1,"Expected to move from IDLE to PENDING drag"),e.current={type:"PENDING",point:h,actions:d},l()},[l]);ib(function(){return o(),function(){n.current()}},[o])}function kgr(){}const Mgr={[ggr]:!0,[pgr]:!0,[vgr]:!0,[bgr]:!0};function Lgr(t,e){function n(){e(),t.cancel()}function i(){e(),t.drop()}return[{eventName:"keydown",fn:r=>{if(r.keyCode===Lze){r.preventDefault(),n();return}if(r.keyCode===Yzt){r.preventDefault(),i();return}if(r.keyCode===wgr){r.preventDefault(),t.moveDown();return}if(r.keyCode===_gr){r.preventDefault(),t.moveUp();return}if(r.keyCode===xgr){r.preventDefault(),t.moveRight();return}if(r.keyCode===ygr){r.preventDefault(),t.moveLeft();return}if(Mgr[r.keyCode]){r.preventDefault();return}Xzt(r)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:jpe,fn:n}]}function Tgr(t){const e=b.useRef(kgr),n=Ns(()=>({eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==Yzt)return;const s=t.findClosestDraggableId(o);if(!s)return;const a=t.tryGetLock(s,u,{sourceEvent:o});if(!a)return;o.preventDefault();let l=!0;const c=a.snapLift();e.current();function u(){l||$n(!1,"Cannot stop capturing a keyboard drag when not capturing"),l=!1,e.current(),i()}e.current=fv(window,Lgr(c,u),{capture:!0,passive:!1})}}),[t]),i=yr(function(){const o={passive:!1,capture:!0};e.current=fv(window,[n],o)},[n]);ib(function(){return i(),function(){e.current()}},[i])}const uSe={type:"IDLE"},Igr=120,Agr=.15;function Rgr({cancel:t,getPhase:e}){return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:n=>{n.preventDefault()}},{eventName:"keydown",fn:n=>{if(e().type!=="DRAGGING"){t();return}n.keyCode===Lze&&n.preventDefault(),t()}},{eventName:jpe,fn:t}]}function Pgr({cancel:t,completed:e,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:i=>{const r=n();if(r.type!=="DRAGGING"){t();return}r.hasMoved=!0;const{clientX:o,clientY:s}=i.touches[0],a={x:o,y:s};i.preventDefault(),r.actions.move(a)}},{eventName:"touchend",fn:i=>{const r=n();if(r.type!=="DRAGGING"){t();return}i.preventDefault(),r.actions.drop({shouldBlockNextClick:!0}),e()}},{eventName:"touchcancel",fn:i=>{if(n().type!=="DRAGGING"){t();return}i.preventDefault(),t()}},{eventName:"touchforcechange",fn:i=>{const r=n();r.type==="IDLE"&&$n();const o=i.touches[0];if(!o||!(o.force>=Agr))return;const a=r.actions.shouldRespectForcePress();if(r.type==="PENDING"){a&&t();return}if(a){if(r.hasMoved){i.preventDefault();return}t();return}i.preventDefault()}},{eventName:jpe,fn:t}]}function Ogr(t){const e=b.useRef(uSe),n=b.useRef(wD),i=yr(function(){return e.current},[]),r=yr(function(f){e.current=f},[]),o=Ns(()=>({eventName:"touchstart",fn:function(f){if(f.defaultPrevented)return;const m=t.findClosestDraggableId(f);if(!m)return;const p=t.tryGetLock(m,a,{sourceEvent:f});if(!p)return;const g=f.touches[0],{clientX:y,clientY:_}=g,w={x:y,y:_};n.current(),d(p,w)}}),[t]),s=yr(function(){const f={capture:!0,passive:!1};n.current=fv(window,[o],f)},[o]),a=yr(()=>{const h=e.current;h.type!=="IDLE"&&(h.type==="PENDING"&&clearTimeout(h.longPressTimerId),r(uSe),n.current(),s())},[s,r]),l=yr(()=>{const h=e.current;a(),h.type==="DRAGGING"&&h.actions.cancel({shouldBlockNextClick:!0}),h.type==="PENDING"&&h.actions.abort()},[a]),c=yr(function(){const f={capture:!0,passive:!1},m={cancel:l,completed:a,getPhase:i},p=fv(window,Pgr(m),f),g=fv(window,Rgr(m),f);n.current=function(){p(),g()}},[l,i,a]),u=yr(function(){const f=i();f.type!=="PENDING"&&$n(!1,`Cannot start dragging from phase ${f.type}`);const m=f.actions.fluidLift(f.point);r({type:"DRAGGING",actions:m,hasMoved:!1})},[i,r]),d=yr(function(f,m){i().type!=="IDLE"&&$n(!1,"Expected to move from IDLE to PENDING drag");const p=setTimeout(u,Igr);r({type:"PENDING",point:m,actions:f,longPressTimerId:p}),c()},[c,i,r,u]);ib(function(){return s(),function(){n.current();const m=i();m.type==="PENDING"&&(clearTimeout(m.longPressTimerId),r(uSe))}},[i,s,r]),ib(function(){return fv(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}function jgr(t){kze(()=>{const e=Mze(t);lG(()=>{e.current.length!==t.length&&$n(!1,"Cannot change the amount of sensor hooks after mounting")})})}const Fgr=["input","button","textarea","select","option","optgroup","video","audio"];function Qzt(t,e){if(e==null)return!1;if(Fgr.includes(e.tagName.toLowerCase()))return!0;const i=e.getAttribute("contenteditable");return i==="true"||i===""?!0:e===t?!1:Qzt(t,e.parentElement)}function $gr(t,e){const n=e.target;return aG(n)?Qzt(t,n):!1}var Vgr=t=>u0(t.getBoundingClientRect()).center;function Bgr(t){return t instanceof Kzt(t).Element}const zgr=(()=>{const t="matches";return typeof document>"u"?t:[t,"msMatchesSelector","webkitMatchesSelector"].find(i=>i in Element.prototype)||t})();function Jzt(t,e){return t==null?null:t[zgr](e)?t:Jzt(t.parentElement,e)}function Hgr(t,e){return t.closest?t.closest(e):Jzt(t,e)}function Wgr(t){return`[${oF.contextId}="${t}"]`}function Ugr(t,e){const n=e.target;if(!Bgr(n))return Ml("event.target must be a Element"),null;const i=Wgr(t),r=Hgr(n,i);return r?aG(r)?r:(Ml("drag handle must be a HTMLElement"),null):null}function Kgr(t,e){const n=Ugr(t,e);return n?n.getAttribute(oF.draggableId):null}function qgr(t,e){const n=`[${iPe.contextId}="${t}"]`,r=Uzt(document,n).find(o=>o.getAttribute(iPe.id)===e);return r?aG(r)?r:(Ml("Draggable element is not a HTMLElement"),null):null}function Ggr(t){t.preventDefault()}function _J({expected:t,phase:e,isLockActive:n,shouldWarn:i}){return n()?t!==e?(i&&Ml(`
        Cannot perform action.
        The actions you used belong to an outdated phase

        Current phase: ${t}
        You called an action from outdated phase: ${e}

        Tips:

        - Do not use preDragActions actions after calling preDragActions.lift()
      `),!1):!0:(i&&Ml(`
        Cannot perform action.
        The sensor no longer has an action lock.

        Tips:

        - Throw away your action handlers when forceStop() is called
        - Check actions.isActive() if you really need to
      `),!1)}function eHt({lockAPI:t,store:e,registry:n,draggableId:i}){if(t.isClaimed())return!1;const r=n.draggable.findById(i);return r?!(!r.options.isEnabled||!Bzt(e.getState(),i)):(Ml(`Unable to find draggable with id: ${i}`),!1)}function Ygr({lockAPI:t,contextId:e,store:n,registry:i,draggableId:r,forceSensorStop:o,sourceEvent:s}){if(!eHt({lockAPI:t,store:n,registry:i,draggableId:r}))return null;const l=i.draggable.getById(r),c=qgr(e,l.descriptor.id);if(!c)return Ml(`Unable to find draggable element with id: ${r}`),null;if(s&&!l.options.canDragInteractiveElements&&$gr(c,s))return null;const u=t.claim(o||wD);let d="PRE_DRAG";function h(){return l.options.shouldRespectForcePress}function f(){return t.isActive(u)}function m(N,E){_J({expected:N,phase:d,isLockActive:f,shouldWarn:!0})&&n.dispatch(E())}const p=m.bind(null,"DRAGGING");function g(N){function E(){t.release(),d="COMPLETED"}d!=="PRE_DRAG"&&(E(),$n(!1,`Cannot lift in phase ${d}`)),n.dispatch(Nmr(N.liftActionArgs)),d="DRAGGING";function D(k,M={shouldBlockNextClick:!1}){if(N.cleanup(),M.shouldBlockNextClick){const T=fv(window,[{eventName:"click",fn:Ggr,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(T)}E(),n.dispatch(Azt({reason:k}))}return{isActive:()=>_J({expected:"DRAGGING",phase:d,isLockActive:f,shouldWarn:!1}),shouldRespectForcePress:h,drop:k=>D("DROP",k),cancel:k=>D("CANCEL",k),...N.actions}}function y(N){const E=cU(k=>{p(()=>Izt({client:k}))});return{...g({liftActionArgs:{id:r,clientSelection:N,movementMode:"FLUID"},cleanup:()=>E.cancel(),actions:{move:E}}),move:E}}function _(){const N={moveUp:()=>p(Rmr),moveRight:()=>p(Omr),moveDown:()=>p(Pmr),moveLeft:()=>p(jmr)};return g({liftActionArgs:{id:r,clientSelection:Vgr(c),movementMode:"SNAP"},cleanup:wD,actions:N})}function w(){_J({expected:"PRE_DRAG",phase:d,isLockActive:f,shouldWarn:!0})&&t.release()}return{isActive:()=>_J({expected:"PRE_DRAG",phase:d,isLockActive:f,shouldWarn:!1}),shouldRespectForcePress:h,fluidLift:y,snapLift:_,abort:w}}const Xgr=[Dgr,Tgr,Ogr];function Zgr({contextId:t,store:e,registry:n,customSensors:i,enableDefaultSensors:r}){const o=[...r?Xgr:[],...i||[]],s=b.useState(()=>hgr())[0],a=yr(function(g,y){gU(g)&&!gU(y)&&s.tryAbandon()},[s]);ib(function(){let g=e.getState();return e.subscribe(()=>{const _=e.getState();a(g,_),g=_})},[s,e,a]),ib(()=>s.tryAbandon,[s.tryAbandon]);const l=yr(p=>eHt({lockAPI:s,registry:n,store:e,draggableId:p}),[s,n,e]),c=yr((p,g,y)=>Ygr({lockAPI:s,registry:n,contextId:t,store:e,draggableId:p,forceSensorStop:g||null,sourceEvent:y&&y.sourceEvent?y.sourceEvent:null}),[t,s,n,e]),u=yr(p=>Kgr(t,p),[t]),d=yr(p=>{const g=n.draggable.findById(p);return g?g.options:null},[n.draggable]),h=yr(function(){s.isClaimed()&&(s.tryAbandon(),e.getState().phase!=="IDLE"&&e.dispatch(yze()))},[s,e]),f=yr(()=>s.isClaimed(),[s]),m=Ns(()=>({canGetLock:l,tryGetLock:c,findClosestDraggableId:u,findOptionsForDraggable:d,tryReleaseLock:h,isLockClaimed:f}),[l,c,u,d,h,f]);jgr(o);for(let p=0;p<o.length;p++)o[p](m)}const Qgr=t=>({onBeforeCapture:e=>{const n=()=>{t.onBeforeCapture&&t.onBeforeCapture(e)};Z.version.startsWith("16")||Z.version.startsWith("17")?n():Fc.flushSync(n)},onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}),Jgr=t=>({...mU,...t.autoScrollerOptions,durationDampening:{...mU.durationDampening,...t.autoScrollerOptions}});function S7(t){return t.current||$n(!1,"Could not find store from lazy ref"),t.current}function ebr(t){const{contextId:e,setCallbacks:n,sensors:i,nonce:r,dragHandleUsageInstructions:o}=t,s=b.useRef(null);dgr();const a=Mze(t),l=yr(()=>Qgr(a.current),[a]),c=yr(()=>Jgr(a.current),[a]),u=egr(e),d=ogr({contextId:e,text:o}),h=qpr(e,r),f=yr(T=>{S7(s).dispatch(T)},[]),m=Ns(()=>Ogt({publishWhileDragging:Dmr,updateDroppableScroll:Mmr,updateDroppableIsEnabled:Lmr,updateDroppableIsCombineEnabled:Tmr,collectionStarting:kmr},f),[f]),p=Xpr(),g=Ns(()=>Spr(p,m),[p,m]),y=Ns(()=>Bpr({scrollWindow:Npr,scrollDroppable:g.scrollDroppable,getAutoScrollerOptions:c,...Ogt({move:Izt},f)}),[g.scrollDroppable,f,c]),_=Gpr(e),w=Ns(()=>_pr({announce:u,autoScroller:y,dimensionMarshal:g,focusMarshal:_,getResponders:l,styleMarshal:h}),[u,y,g,_,l,h]);s.current&&s.current!==w&&Ml("unexpected store change"),s.current=w;const C=yr(()=>{const T=S7(s);T.getState().phase!=="IDLE"&&T.dispatch(yze())},[]),N=yr(()=>{const T=S7(s).getState();return T.phase==="DROP_ANIMATING"?!0:T.phase==="IDLE"?!1:T.isDragging},[]),E=Ns(()=>({isDragging:N,tryAbort:C}),[N,C]);n(E);const D=yr(T=>Bzt(S7(s).getState(),T),[]),k=yr(()=>UL(S7(s).getState()),[]),M=Ns(()=>({marshal:g,focus:_,contextId:e,canLift:D,isMovementAllowed:k,dragHandleUsageInstructionsId:d,registry:p}),[e,g,d,_,D,k,p]);return Zgr({contextId:e,store:w,registry:p,customSensors:i||null,enableDefaultSensors:t.enableDefaultSensors!==!1}),b.useEffect(()=>C,[C]),Z.createElement(Ope.Provider,{value:M},Z.createElement(Jhr,{context:Eze,store:w},t.children))}let tbr=0;function nbr(){return Ns(()=>`${tbr++}`,[])}function ibr(){return Z.useId()}var rbr="useId"in Z?ibr:nbr;function tHt(t){const e=rbr(),n=t.dragHandleUsageInstructions||Ate.dragHandleUsageInstructions;return Z.createElement(ffr,null,i=>Z.createElement(ebr,{nonce:t.nonce,contextId:e,setCallbacks:i,dragHandleUsageInstructions:n,enableDefaultSensors:t.enableDefaultSensors,sensors:t.sensors,onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragUpdate:t.onDragUpdate,onDragEnd:t.onDragEnd,autoScrollerOptions:t.autoScrollerOptions},t.children))}const hbt={dragging:5e3,dropAnimating:4500},obr=(t,e)=>e?IB.drop(e.duration):t?IB.snap:IB.fluid,sbr=(t,e)=>{if(t)return e?fU.opacity.drop:fU.opacity.combining},abr=t=>t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP";function lbr(t){const n=t.dimension.client,{offset:i,combineWith:r,dropping:o}=t,s=!!r,a=abr(t),l=!!o,c=l?tPe.drop(i,s):tPe.moveTo(i);return{position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:obr(a,o),transform:c,opacity:sbr(s,l),zIndex:l?hbt.dropAnimating:hbt.dragging,pointerEvents:"none"}}function cbr(t){return{transform:tPe.moveTo(t.offset),transition:t.shouldAnimateDisplacement?void 0:"none"}}function ubr(t){return t.type==="DRAGGING"?lbr(t):cbr(t)}function dbr(t,e,n=Qd){const i=window.getComputedStyle(e),r=e.getBoundingClientRect(),o=azt(r,i),s=Use(o,n),a={client:o,tagName:e.tagName.toLowerCase(),display:i.display},l={x:o.marginBox.width,y:o.marginBox.height};return{descriptor:t,placeholder:a,displaceBy:l,client:o,page:s}}function hbr(t){const e=Dze("draggable"),{descriptor:n,registry:i,getDraggableRef:r,canDragInteractiveElements:o,shouldRespectForcePress:s,isEnabled:a}=t,l=Ns(()=>({canDragInteractiveElements:o,shouldRespectForcePress:s,isEnabled:a}),[o,a,s]),c=yr(f=>{const m=r();return m||$n(!1,"Cannot get dimension when no ref is set"),dbr(n,m,f)},[n,r]),u=Ns(()=>({uniqueId:e,descriptor:n,options:l,getDimension:c}),[n,c,l,e]),d=b.useRef(u),h=b.useRef(!0);ib(()=>(i.draggable.register(d.current),()=>i.draggable.unregister(d.current)),[i.draggable]),ib(()=>{if(h.current){h.current=!1;return}const f=d.current;d.current=u,i.draggable.update(u,f)},[u,i.draggable])}var Tze=Z.createContext(null);function nHt(t){t&&aG(t)||$n(!1,`
    provided.innerRef has not been provided with a HTMLElement.

    You can find a guide on using the innerRef callback functions at:
    https://github.com/hello-pangea/dnd/blob/main/docs/guides/using-inner-ref.md
  `)}function fbr(t,e,n){lG(()=>{function i(o){return`Draggable[id: ${o}]: `}const r=t.draggableId;r||$n(!1,"Draggable requires a draggableId"),typeof r!="string"&&$n(!1,`Draggable requires a [string] draggableId.
      Provided: [type: ${typeof r}] (value: ${r})`),Number.isInteger(t.index)||$n(!1,`${i(r)} requires an integer index prop`),t.mapped.type!=="DRAGGING"&&(nHt(n()),t.isEnabled&&(qzt(e,r)||$n(!1,`${i(r)} Unable to find drag handle`)))})}function mbr(t){kze(()=>{const e=b.useRef(t);lG(()=>{t!==e.current&&$n(!1,"Draggable isClone prop value changed during component life")},[t])})}function Yse(t){const e=b.useContext(t);return e||$n(!1,"Could not find required context"),e}function pbr(t){t.preventDefault()}const gbr=t=>{const e=b.useRef(null),n=yr((E=null)=>{e.current=E},[]),i=yr(()=>e.current,[]),{contextId:r,dragHandleUsageInstructionsId:o,registry:s}=Yse(Ope),{type:a,droppableId:l}=Yse(Tze),c=Ns(()=>({id:t.draggableId,index:t.index,type:a,droppableId:l}),[t.draggableId,t.index,a,l]),{children:u,draggableId:d,isEnabled:h,shouldRespectForcePress:f,canDragInteractiveElements:m,isClone:p,mapped:g,dropAnimationFinished:y}=t;if(fbr(t,r,i),mbr(p),!p){const E=Ns(()=>({descriptor:c,registry:s,getDraggableRef:i,canDragInteractiveElements:m,shouldRespectForcePress:f,isEnabled:h}),[c,s,i,m,f,h]);hbr(E)}const _=Ns(()=>h?{tabIndex:0,role:"button","aria-describedby":o,"data-rfd-drag-handle-draggable-id":d,"data-rfd-drag-handle-context-id":r,draggable:!1,onDragStart:pbr}:null,[r,o,d,h]),w=yr(E=>{g.type==="DRAGGING"&&g.dropping&&E.propertyName==="transform"&&(Z.version.startsWith("16")||Z.version.startsWith("17")?y():Fc.flushSync(y))},[y,g]),C=Ns(()=>{const E=ubr(g),D=g.type==="DRAGGING"&&g.dropping?w:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":r,"data-rfd-draggable-id":d,style:E,onTransitionEnd:D},dragHandleProps:_}},[r,_,d,g,w,n]),N=Ns(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return Z.createElement(Z.Fragment,null,u(C,g.snapshot,N))};var bbr=gbr,iHt=(t,e)=>t===e,rHt=t=>{const{combine:e,destination:n}=t;return n?n.droppableId:e?e.droppableId:null};const vbr=t=>t.combine?t.combine.draggableId:null,ybr=t=>t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null;function _br(){const t=Gd((r,o)=>({x:r,y:o})),e=Gd((r,o,s=null,a=null,l=null)=>({isDragging:!0,isClone:o,isDropAnimating:!!l,dropAnimation:l,mode:r,draggingOver:s,combineWith:a,combineTargetFor:null})),n=Gd((r,o,s,a,l=null,c=null,u=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:l,combineWith:c,mode:o,offset:r,dimension:s,forceShouldAnimate:u,snapshot:e(o,a,l,c,null)}}));return(r,o)=>{if(gU(r)){if(r.critical.draggable.id!==o.draggableId)return null;const s=r.current.client.offset,a=r.dimensions.draggables[o.draggableId],l=nb(r.impact),c=ybr(r.impact),u=r.forceShouldAnimate;return n(t(s.x,s.y),r.movementMode,a,o.isClone,l,c,u)}if(r.phase==="DROP_ANIMATING"){const s=r.completed;if(s.result.draggableId!==o.draggableId)return null;const a=o.isClone,l=r.dimensions.draggables[o.draggableId],c=s.result,u=c.mode,d=rHt(c),h=vbr(c),m={duration:r.dropDuration,curve:xze.drop,moveTo:r.newHomeClientOffset,opacity:h?fU.opacity.drop:null,scale:h?fU.scale.drop:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:l,dropping:m,draggingOver:d,combineWith:h,mode:u,forceShouldAnimate:null,snapshot:e(u,a,d,h,m)}}}return null}}function oHt(t=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:t,combineWith:null}}const xbr={mapped:{type:"SECONDARY",offset:Qd,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:oHt(null)}};function wbr(){const t=Gd((s,a)=>({x:s,y:a})),e=Gd(oHt),n=Gd((s,a=null,l)=>({mapped:{type:"SECONDARY",offset:s,combineTargetFor:a,shouldAnimateDisplacement:l,snapshot:e(a)}})),i=s=>s?n(Qd,s,!0):null,r=(s,a,l,c)=>{const u=l.displaced.visible[s],d=!!(c.inVirtualList&&c.effected[s]),h=Ape(l),f=h&&h.draggableId===s?a:null;if(!u){if(!d)return i(f);if(l.displaced.invisible[s])return null;const g=p$(c.displacedBy.point),y=t(g.x,g.y);return n(y,f,!0)}if(d)return i(f);const m=l.displacedBy.point,p=t(m.x,m.y);return n(p,f,u.shouldAnimate)};return(s,a)=>{if(gU(s))return s.critical.draggable.id===a.draggableId?null:r(a.draggableId,s.critical.draggable.id,s.impact,s.afterCritical);if(s.phase==="DROP_ANIMATING"){const l=s.completed;return l.result.draggableId===a.draggableId?null:r(a.draggableId,l.result.draggableId,l.impact,l.afterCritical)}return null}}const Cbr=()=>{const t=_br(),e=wbr();return(i,r)=>t(i,r)||e(i,r)||xbr},Sbr={dropAnimationFinished:Rzt},Nbr=ozt(Cbr,Sbr,null,{context:Eze,areStatePropsEqual:iHt})(bbr);var Ebr=Nbr;function sHt(t){return Yse(Tze).isUsingCloneFor===t.draggableId&&!t.isClone?null:Z.createElement(Ebr,t)}function aHt(t){const e=typeof t.isDragDisabled=="boolean"?!t.isDragDisabled:!0,n=!!t.disableInteractiveElementBlocking,i=!!t.shouldRespectForcePress;return Z.createElement(sHt,lt({},t,{isClone:!1,isEnabled:e,canDragInteractiveElements:n,shouldRespectForcePress:i}))}const Ize=t=>e=>t===e,Dbr=Ize("scroll"),kbr=Ize("auto"),Mbr=Ize("visible"),fbt=(t,e)=>e(t.overflowX)||e(t.overflowY),Lbr=(t,e)=>e(t.overflowX)&&e(t.overflowY),lHt=t=>{const e=window.getComputedStyle(t),n={overflowX:e.overflowX,overflowY:e.overflowY};return fbt(n,Dbr)||fbt(n,kbr)},Tbr=()=>{const t=pU(),e=document.documentElement;if(e||$n(),!lHt(t))return!1;const n=window.getComputedStyle(e),i={overflowX:n.overflowX,overflowY:n.overflowY};return Lbr(i,Mbr)||Ml(`
    We have detected that your <body> element might be a scroll container.
    We have found no reliable way of detecting whether the <body> element is a scroll container.
    Under most circumstances a <body> scroll bar will be on the <html> element (document.documentElement)

    Because we cannot determine if the <body> is a scroll container, and generally it is not one,
    we will be treating the <body> as *not* a scroll container

    More information: https://github.com/hello-pangea/dnd/blob/main/docs/guides/how-we-detect-scroll-containers.md
  `),!1},Aze=t=>t==null?null:t===document.body?Tbr()?t:null:t===document.documentElement?null:lHt(t)?t:Aze(t.parentElement);var Ibr=t=>{!t||!Aze(t.parentElement)||Ml(`
    Droppable: unsupported nested scroll container detected.
    A Droppable can only have one scroll parent (which can be itself)
    Nested scroll containers are currently not supported.

    We hope to support nested scroll containers soon: https://github.com/atlassian/react-beautiful-dnd/issues/131
  `)},rPe=t=>({x:t.scrollLeft,y:t.scrollTop});const cHt=t=>t?window.getComputedStyle(t).position==="fixed"?!0:cHt(t.parentElement):!1;var Abr=t=>{const e=Aze(t),n=cHt(t);return{closestScrollable:e,isFixedOnPage:n}},Rbr=({descriptor:t,isEnabled:e,isCombineEnabled:n,isFixedOnPage:i,direction:r,client:o,page:s,closest:a})=>{const l=(()=>{if(!a)return null;const{scrollSize:h,client:f}=a,m=Fzt({scrollHeight:h.scrollHeight,scrollWidth:h.scrollWidth,height:f.paddingBox.height,width:f.paddingBox.width});return{pageMarginBox:a.page.marginBox,frameClient:f,scrollSize:h,shouldClipSubject:a.shouldClipSubject,scroll:{initial:a.scroll,current:a.scroll,max:m,diff:{value:Qd,displacement:Qd}}}})(),c=r==="vertical"?mze:bzt,u=iF({page:s,withPlaceholder:null,axis:c,frame:l});return{descriptor:t,isCombineEnabled:n,isFixedOnPage:i,axis:c,isEnabled:e,client:o,page:s,frame:l,subject:u}};const Pbr=(t,e)=>{const n=lzt(t);if(!e||t!==e)return n;const i=n.paddingBox.top-e.scrollTop,r=n.paddingBox.left-e.scrollLeft,o=i+e.scrollHeight,s=r+e.scrollWidth,l=uze({top:i,right:s,bottom:o,left:r},n.border);return dze({borderBox:l,margin:n.margin,border:n.border,padding:n.padding})};var Obr=({ref:t,descriptor:e,env:n,windowScroll:i,direction:r,isDropDisabled:o,isCombineEnabled:s,shouldClipSubject:a})=>{const l=n.closestScrollable,c=Pbr(t,l),u=Use(c,i),d=(()=>{if(!l)return null;const f=lzt(l),m={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:f,page:Use(f,i),scroll:rPe(l),scrollSize:m,shouldClipSubject:a}})();return Rbr({descriptor:e,isEnabled:!o,isCombineEnabled:s,isFixedOnPage:n.isFixedOnPage,direction:r,client:c,page:u,closest:d})};const jbr={passive:!1},Fbr={passive:!0};var mbt=t=>t.shouldPublishImmediately?jbr:Fbr;const xJ=t=>t&&t.env.closestScrollable||null;function $br(t){const e=b.useRef(null),n=Yse(Ope),i=Dze("droppable"),{registry:r,marshal:o}=n,s=Mze(t),a=Ns(()=>({id:t.droppableId,type:t.type,mode:t.mode}),[t.droppableId,t.mode,t.type]),l=b.useRef(a),c=Ns(()=>Gd((C,N)=>{e.current||$n(!1,"Can only update scroll when dragging");const E={x:C,y:N};o.updateDroppableScroll(a.id,E)}),[a.id,o]),u=yr(()=>{const C=e.current;return!C||!C.env.closestScrollable?Qd:rPe(C.env.closestScrollable)},[]),d=yr(()=>{const C=u();c(C.x,C.y)},[u,c]),h=Ns(()=>cU(d),[d]),f=yr(()=>{const C=e.current,N=xJ(C);if(C&&N||$n(!1,"Could not find scroll options while scrolling"),C.scrollOptions.shouldPublishImmediately){d();return}h()},[h,d]),m=yr((C,N)=>{e.current&&$n(!1,"Cannot collect a droppable while a drag is occurring");const E=s.current,D=E.getDroppableRef();D||$n(!1,"Cannot collect without a droppable ref");const k=Abr(D),M={ref:D,descriptor:a,env:k,scrollOptions:N};e.current=M;const T=Obr({ref:D,descriptor:a,env:k,windowScroll:C,direction:E.direction,isDropDisabled:E.isDropDisabled,isCombineEnabled:E.isCombineEnabled,shouldClipSubject:!E.ignoreContainerClipping}),A=k.closestScrollable;return A&&(A.setAttribute(abt.contextId,n.contextId),A.addEventListener("scroll",f,mbt(M.scrollOptions)),Ibr(A)),T},[n.contextId,a,f,s]),p=yr(()=>{const C=e.current,N=xJ(C);return C&&N||$n(!1,"Can only recollect Droppable client for Droppables that have a scroll container"),rPe(N)},[]),g=yr(()=>{const C=e.current;C||$n(!1,"Cannot stop drag when no active drag");const N=xJ(C);e.current=null,N&&(h.cancel(),N.removeAttribute(abt.contextId),N.removeEventListener("scroll",f,mbt(C.scrollOptions)))},[f,h]),y=yr(C=>{const N=e.current;N||$n(!1,"Cannot scroll when there is no drag");const E=xJ(N);E||$n(!1,"Cannot scroll a droppable with no closest scrollable"),E.scrollTop+=C.y,E.scrollLeft+=C.x},[]),_=Ns(()=>({getDimensionAndWatchScroll:m,getScrollWhileDragging:p,dragStopped:g,scroll:y}),[g,m,p,y]),w=Ns(()=>({uniqueId:i,descriptor:a,callbacks:_}),[_,a,i]);ib(()=>(l.current=w.descriptor,r.droppable.register(w),()=>{e.current&&(Ml("Unsupported: changing the droppableId or type of a Droppable during a drag"),g()),r.droppable.unregister(w)}),[_,a,g,w,o,r.droppable]),ib(()=>{e.current&&o.updateDroppableIsEnabled(l.current.id,!t.isDropDisabled)},[t.isDropDisabled,o]),ib(()=>{e.current&&o.updateDroppableIsCombineEnabled(l.current.id,t.isCombineEnabled)},[t.isCombineEnabled,o])}function dSe(){}const pbt={width:0,height:0,margin:_fr},Vbr=({isAnimatingOpenOnMount:t,placeholder:e,animate:n})=>t||n==="close"?pbt:{height:e.client.borderBox.height,width:e.client.borderBox.width,margin:e.client.margin},Bbr=({isAnimatingOpenOnMount:t,placeholder:e,animate:n})=>{const i=Vbr({isAnimatingOpenOnMount:t,placeholder:e,animate:n});return{display:e.display,boxSizing:"border-box",width:i.width,height:i.height,marginTop:i.margin.top,marginRight:i.margin.right,marginBottom:i.margin.bottom,marginLeft:i.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:n!=="none"?IB.placeholder:null}},zbr=t=>{const e=b.useRef(null),n=yr(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),{animate:i,onTransitionEnd:r,onClose:o,contextId:s}=t,[a,l]=b.useState(t.animate==="open");b.useEffect(()=>a?i!=="open"?(n(),l(!1),dSe):e.current?dSe:(e.current=setTimeout(()=>{e.current=null,l(!1)}),n):dSe,[i,a,n]);const c=yr(d=>{d.propertyName==="height"&&(r(),i==="close"&&o())},[i,o,r]),u=Bbr({isAnimatingOpenOnMount:a,animate:t.animate,placeholder:t.placeholder});return Z.createElement(t.placeholder.tagName,{style:u,"data-rfd-placeholder-context-id":s,onTransitionEnd:c,ref:t.innerRef})};var Hbr=Z.memo(zbr);function hSe(t){return typeof t=="boolean"}function fSe(t,e){e.forEach(n=>n(t))}const Wbr=[function({props:e}){e.droppableId||$n(!1,"A Droppable requires a droppableId prop"),typeof e.droppableId!="string"&&$n(!1,`A Droppable requires a [string] droppableId. Provided: [${typeof e.droppableId}]`)},function({props:e}){hSe(e.isDropDisabled)||$n(!1,"isDropDisabled must be a boolean"),hSe(e.isCombineEnabled)||$n(!1,"isCombineEnabled must be a boolean"),hSe(e.ignoreContainerClipping)||$n(!1,"ignoreContainerClipping must be a boolean")},function({getDroppableRef:e}){nHt(e())}],Ubr=[function({props:e,getPlaceholderRef:n}){!e.placeholder||n()||Ml(`
      Droppable setup issue [droppableId: "${e.droppableId}"]:
      DroppableProvided > placeholder could not be found.

      Please be sure to add the {provided.placeholder} React Node as a child of your Droppable.
      More information: https://github.com/hello-pangea/dnd/blob/main/docs/api/droppable.md
    `)}],Kbr=[function({props:e}){e.renderClone||$n(!1,"Must provide a clone render function (renderClone) for virtual lists")},function({getPlaceholderRef:e}){e()&&$n(!1,"Expected virtual list to not have a placeholder")}];function qbr(t){lG(()=>{fSe(t,Wbr),t.props.mode==="standard"&&fSe(t,Ubr),t.props.mode==="virtual"&&fSe(t,Kbr)})}class Gbr extends Z.PureComponent{constructor(...e){super(...e),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,n){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!e.on,data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}}const Ybr=t=>{const e=b.useContext(Ope);e||$n(!1,"Could not find app context");const{contextId:n,isMovementAllowed:i}=e,r=b.useRef(null),o=b.useRef(null),{children:s,droppableId:a,type:l,mode:c,direction:u,ignoreContainerClipping:d,isDropDisabled:h,isCombineEnabled:f,snapshot:m,useClone:p,updateViewportMaxScroll:g,getContainerForClone:y}=t,_=yr(()=>r.current,[]),w=yr((R=null)=>{r.current=R},[]),C=yr(()=>o.current,[]),N=yr((R=null)=>{o.current=R},[]);qbr({props:t,getDroppableRef:_,getPlaceholderRef:C});const E=yr(()=>{i()&&g({maxScroll:Vzt()})},[i,g]);$br({droppableId:a,type:l,mode:c,direction:u,isDropDisabled:h,isCombineEnabled:f,ignoreContainerClipping:d,getDroppableRef:_});const D=Ns(()=>Z.createElement(Gbr,{on:t.placeholder,shouldAnimate:t.shouldAnimatePlaceholder},({onClose:R,data:P,animate:O})=>Z.createElement(Hbr,{placeholder:P,onClose:R,innerRef:N,animate:O,contextId:n,onTransitionEnd:E})),[n,E,t.placeholder,t.shouldAnimatePlaceholder,N]),k=Ns(()=>({innerRef:w,placeholder:D,droppableProps:{"data-rfd-droppable-id":a,"data-rfd-droppable-context-id":n}}),[n,a,D,w]),M=p?p.dragging.draggableId:null,T=Ns(()=>({droppableId:a,type:l,isUsingCloneFor:M}),[a,M,l]);function A(){if(!p)return null;const{dragging:R,render:P}=p,O=Z.createElement(sHt,{draggableId:R.draggableId,index:R.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(V,F)=>P(V,F,R));return sv.createPortal(O,y())}return Z.createElement(Tze.Provider,{value:T},s(k,m),A())};var Xbr=Ybr;function Zbr(){return document.body||$n(!1,"document.body is not ready"),document.body}const gbt={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:Zbr},uHt=t=>{let e={...t},n;for(n in gbt)t[n]===void 0&&(e={...e,[n]:gbt[n]});return e},mSe=(t,e)=>t===e.droppable.type,bbt=(t,e)=>e.draggables[t.draggable.id],Qbr=()=>{const t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},e={...t,shouldAnimatePlaceholder:!1},n=Gd(o=>({draggableId:o.id,type:o.type,source:{index:o.index,droppableId:o.droppableId}})),i=Gd((o,s,a,l,c,u)=>{const d=c.descriptor.id;if(c.descriptor.droppableId===o){const m=u?{render:u,dragging:n(c.descriptor)}:null,p={isDraggingOver:a,draggingOverWith:a?d:null,draggingFromThisWith:d,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!1,snapshot:p,useClone:m}}if(!s)return e;if(!l)return t;const f={isDraggingOver:a,draggingOverWith:d,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!0,snapshot:f,useClone:null}});return(o,s)=>{const a=uHt(s),l=a.droppableId,c=a.type,u=!a.isDropDisabled,d=a.renderClone;if(gU(o)){const h=o.critical;if(!mSe(c,h))return e;const f=bbt(h,o.dimensions),m=nb(o.impact)===l;return i(l,u,m,m,f,d)}if(o.phase==="DROP_ANIMATING"){const h=o.completed;if(!mSe(c,h.critical))return e;const f=bbt(h.critical,o.dimensions);return i(l,u,rHt(h.result)===l,nb(h.impact)===l,f,d)}if(o.phase==="IDLE"&&o.completed&&!o.shouldFlush){const h=o.completed;if(!mSe(c,h.critical))return e;const f=nb(h.impact)===l,m=!!(h.impact.at&&h.impact.at.type==="COMBINE"),p=h.critical.droppable.id===l;return f?m?t:e:p?t:e}return e}},Jbr={updateViewportMaxScroll:Amr},evr=ozt(Qbr,Jbr,(t,e,n)=>({...uHt(n),...t,...e}),{context:Eze,areStatePropsEqual:iHt})(Xbr);var dHt=evr;const tvr=Ja.getAllCodes();function nvr({isOpen:t,cta:e,existingCta:n,onClose:i,onAdd:r,onEdit:o}){const s=Mt(),[a,l]=b.useState(!1),{data:c}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0}),u=!!e,d=gt.object({genericFields:gt.object({key:gt.string().min(2,{message:s.formatMessage({id:"project_settings.lead_generation.form.key.min_length",defaultMessage:"Key must be at least 2 characters long"})}).max(48,{message:s.formatMessage({id:"project_settings.lead_generation.form.key.max_length",defaultMessage:"Key cannot be longer then 48 characters"})}).regex(new RegExp(/^[a-zA-Z-0-9_-]+$/),{message:s.formatMessage({id:"project_settings.lead_generation.form.key.unsupported",defaultMessage:"Key can only contain a-zA-Z0-9-_"})}).refine(p=>u&&(e==null?void 0:e.key)===p?!0:!n.find(({key:g})=>g===p),{message:s.formatMessage({id:"project_settings.lead_generation.form.key.duplicate",defaultMessage:"CTA with this key already exists"})}),type:gt.enum(["primary","secondary"]),href:gt.string().url()}),label:gt.record(gt.enum(tvr),gt.string().min(2,{message:s.formatMessage({id:"project_settings.lead_generation.form.label.min_length",defaultMessage:"Label must be at least 2 characters long"})}).max(48,{message:s.formatMessage({id:"project_settings.lead_generation.form.label.max_length",defaultMessage:"Label cannot be longer then 48 characters"})}).optional())}),h={genericFields:{key:"",type:"primary",href:""},label:{}},f=ls({initialValues:h,validateInputOnBlur:!0,validate:aa(d),onValuesChange:()=>{const p=!!c&&f.isValid(`label.${c==null?void 0:c.defaultLanguage}`)&&!zp(f.getValues().label[c==null?void 0:c.defaultLanguage]);l(f.isValid("genericFields")&&p&&f.isDirty())}}),m=p=>{if(!a)return;function g(){const y={...p.genericFields,label:p.label};u?o(y):r(y),i()}if(Object.values(p.label).find(y=>zp(y))){Ev.openConfirmModal({title:s.formatMessage({id:"project.form_config.end_of_form_cta.cta_config_modal.confirm_modal.title",defaultMessage:"Continue with empty languages?"}),children:s.formatMessage({id:"project.form_config.end_of_form_cta.cta_config_modal.confirm_modal.description",defaultMessage:"Languages without a CTA label will not be displayed when that language is selected."}),labels:{confirm:s.formatMessage({id:"shared.modal.footer.save",defaultMessage:"Save"}),cancel:s.formatMessage({id:"shared.modal.footer.cancel",defaultMessage:"Cancel"})},onConfirm:g});return}g()};return b.useEffect(()=>{t||(f.setValues(h),f.setInitialValues(h))},[t]),b.useEffect(()=>{if(!c)return;const p={genericFields:e??h.genericFields,label:c==null?void 0:c.languages.reduce((g,y)=>(g[y]=e==null?void 0:e.label[y],g),{})};f.setInitialValues(p),f.setValues(p)},[c,e,t]),v.jsxDEV(bl,{size:"lg",opened:t,onClose:i,title:u?s.formatMessage({id:"project.form_config.end_of_form_cta.cta_config_modal.edit.title",defaultMessage:"Edit call to action"}):s.formatMessage({id:"project.form_config.end_of_form_cta.cta_config_modal.add.title",defaultMessage:"Add call to action"}),closeButtonProps:{"aria-label":s.formatMessage({id:"shared.modal.close",defaultMessage:"Close modal"})},children:v.jsxDEV("form",{onSubmit:p=>{p.stopPropagation(),f.onSubmit(m)(p)},children:v.jsxDEV(Gt,{gap:"lg",children:[v.jsxDEV(pa,{disabled:u,...f.getInputProps("genericFields.key"),label:s.formatMessage({id:"project.form_config.end_of_form_cta.cta_config_modal.button.form.key.label",defaultMessage:"Unique key"}),placeholder:s.formatMessage({id:"project.form_config.end_of_form_cta.cta_config_modal.button.form.key.placeholder",defaultMessage:"e.g. goToSummary"}),description:s.formatMessage({id:"project.form_config.end_of_form_cta.cta_config_modal.button.form.key.help",defaultMessage:"Unique key to identify your call to action."})},f.key("genericFields.key"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:226,columnNumber:6},this),v.jsxDEV(Fm,{...f.getInputProps("genericFields.type"),label:s.formatMessage({id:"project.form_config.end_of_form_cta.cta_config_modal.button.form.type.label",defaultMessage:"Type"}),data:Object.entries(mhr).map(([p,g])=>({value:p,label:s.formatMessage(g)})),allowDeselect:!1},f.key("genericFields.type"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:243,columnNumber:6},this),v.jsxDEV(pa,{...f.getInputProps("genericFields.href"),label:s.formatMessage({id:"project.form_config.end_of_form_cta.cta_config_modal.button.form.href.label",defaultMessage:"Link"}),placeholder:s.formatMessage({id:"project.form_config.end_of_form_cta.cta_config_modal.button.form.href.placeholder",defaultMessage:"https://chathive.co?sessionId={{sessionId}}"}),description:s.formatMessage({id:"project.form_config.end_of_form_cta.cta_config_modal.button.form.href.help",defaultMessage:"Link where the user will be directed to in a new tab."})},f.key("genericFields.href"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:256,columnNumber:6},this),v.jsxDEV("section",{children:[v.jsxDEV(Qe,{fw:"500",size:"sm",children:v.jsxDEV(ee,{id:"project.form_config.end_of_form_cta.cta_config_modal.label.label",defaultMessage:"CTA Label"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:274,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:273,columnNumber:7},this),v.jsxDEV(Gt,{mt:"xs",gap:"xs",children:c&&structuredClone(c.languages).sort((p,g)=>p===c.defaultLanguage&&g!==c.defaultLanguage?-1:g===c.defaultLanguage&&p!==c.defaultLanguage?1:0).map(p=>v.jsxDEV(Gt,{gap:2,children:[v.jsxDEV(un,{gap:4,children:[v.jsxDEV(Qe,{size:"sm",children:Ja.getName(p)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:297,columnNumber:13},this),c.defaultLanguage===p&&v.jsxDEV(ir,{label:s.formatMessage({id:"project_settings.lead_generation.field_config.languages.default_language",defaultMessage:"Default language"}),children:v.jsxDEV(JPt,{size:16,className:"text-theme-primary"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:305,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:299,columnNumber:14},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:296,columnNumber:12},this),v.jsxDEV(pa,{...f.getInputProps(`label.${p}`)},f.key(`label.${p}`),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:309,columnNumber:12},this)]},p,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:295,columnNumber:11},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:279,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:272,columnNumber:6},this),v.jsxDEV("footer",{className:"w-full",children:v.jsxDEV(un,{justify:"flex-end",gap:"xs",children:[v.jsxDEV(Nn,{variant:"outline",size:"xs",onClick:i,children:v.jsxDEV(ee,{id:"shared.modal.footer.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:320,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:319,columnNumber:8},this),v.jsxDEV(Nn,{size:"xs",type:"submit",disabled:!a,children:v.jsxDEV(ee,{id:"shared.modal.footer.save",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:323,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:322,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:318,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:317,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:225,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:219,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/CtaButtonEditModal/index.tsx",lineNumber:200,columnNumber:3},this)}const wJ=5;function ivr({project:t,form:e,showInput:n}){const i=Mt(),r=Oi(ps),[o,s]=oSt([]),a=Oi(Tpe),[l,c]=Pc(!1),[u,d]=b.useState(),h=e.getValues().endOfFormCta.cta.find(D=>D.key===u),f=b.useMemo(()=>{var D,k;return(D=a==null?void 0:a.endOfFormCta)!=null&&D.cta?(k=a==null?void 0:a.endOfFormCta)==null?void 0:k.cta.filter(M=>t.languages.find(T=>!M.label[T])):[]},[a]);b.useEffect(()=>{var k,M;if(!((k=a==null?void 0:a.endOfFormCta)!=null&&k.cta))return;const D=(M=a==null?void 0:a.endOfFormCta)==null?void 0:M.cta.map(T=>{const{supported:A,unsupported:R}=t.languages.reduce((P,O)=>{const V=T.label[O];return zp(V)?P.unsupported.push(O):P.supported.push(O),P},{supported:[],unsupported:[]});return{...T,languageSupport:[...R.map(P=>({language:P,supported:!1})),...A.map(P=>({language:P,supported:!0}))]}}).sort((T,A)=>T.index-A.index);s.setState(D)},[a]);const m=()=>{c.close(),d(void 0)},p=D=>{d(D),c.open()},g=D=>{d(D),Ev.openConfirmModal({title:i.formatMessage({id:"project.form_config.cta.delete_modal.title",defaultMessage:"Delete {key} CTA"},{key:D}),children:v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"project.form_config.cta.delete_modal.description",defaultMessage:"Deleting <bold>{key}</bold> CTA is irreversible and cannot be undone.",values:{key:D,bold:k=>v.jsxDEV("span",{className:"font-bold",children:k},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:128,columnNumber:41},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:125,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:124,columnNumber:5},this),labels:{confirm:i.formatMessage({id:"project.form_config.cta.delete_modal.confirm",defaultMessage:"Delete CTA"}),cancel:i.formatMessage({id:"shared.modal.footer.cancel.delete",defaultMessage:"No don't delete it"})},confirmProps:{color:"red"},onConfirm:()=>y(D)})};async function y(D){const k=e.getValues().endOfFormCta.cta.find(M=>M.key===D);k&&(e.setFieldValue("endOfFormCta.cta",e.getValues().endOfFormCta.cta.reduce((M,T)=>{if(T.key===D)return M;const A=structuredClone(T);return A.index>k.index&&(A.index-=1),M.push(A),M},[])),d(void 0))}const _=async({destination:D,source:k})=>{!D||!k||D.index===k.index||(s.reorder({from:k.index,to:(D==null?void 0:D.index)||0}),w({from:k.index,to:(D==null?void 0:D.index)||0}))},w=({from:D,to:k})=>{const M=structuredClone(e.getValues().endOfFormCta.cta).sort((R,P)=>R.index-P.index),A=Fri({array:M,from:D,to:k}).map((R,P)=>({...R,index:P}));e.setFieldValue("endOfFormCta.cta",A)},C=D=>{e.setFieldValue("endOfFormCta.cta",[...e.getValues().endOfFormCta.cta,{...D,index:e.getValues().endOfFormCta.cta.length}])},N=D=>{const M=e.getValues().endOfFormCta.cta.map(T=>T.key===D.key?{...D,index:T.index}:T);e.setFieldValue("endOfFormCta.cta",M)},E=!!f.length;return v.jsxDEV(Wi.Item,{value:"cta",className:"!bg-white",children:[v.jsxDEV(Wi.Control,{children:v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"project.form_config.cta.title",defaultMessage:"Call to action"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:223,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:222,columnNumber:6},this),E&&v.jsxDEV(ir,{label:i.formatMessage({id:"project.form_config.cta.warning.missing_translation.title",defaultMessage:"{total, plural, =1 {# call to action has} other {# call to actions have}} missing translations"},{total:i.formatNumber(f.length)}),children:v.jsxDEV(kp,{variant:"light",color:"orange",children:v.jsxDEV(ud,{color:"orange",size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:237,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:236,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:226,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:221,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:220,columnNumber:4},this),v.jsxDEV(Wi.Panel,{children:[v.jsxDEV(Gt,{gap:0,className:"w-full",children:[v.jsxDEV(Qe,{c:"dimmed",size:"sm",mb:"md",children:v.jsxDEV(ee,{id:"project.form_config.cta.description",defaultMessage:"Call to actions are custom buttons that are added when your customer has completed the form. These elements won't be processed by AI and will remain the same."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:246,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:245,columnNumber:6},this),v.jsxDEV(Vo,{id:"endOfFormCta.enabled",label:i.formatMessage({id:"project.form_config.cta.enable.label",defaultMessage:"Enable call to actions"}),hideDivider:!n,children:v.jsxDEV(Du,{readOnly:!r,...e.getInputProps("endOfFormCta.enabled",{type:"checkbox"})},e.key("endOfFormCta.enabled"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:259,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:251,columnNumber:6},this),n&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Vo,{id:"endOfFormCta.prompt",label:i.formatMessage({id:"project.form_config.cta.description_prompt.label",defaultMessage:"Description prompt"}),help:i.formatMessage({id:"project.form_config.cta.description_prompt.description",defaultMessage:"Write a prompt that tells the Assistant how it should introduce the CTA buttons."}),vertical:!0,children:v.jsxDEV(Th,{className:"w-full",readOnly:!r,...e.getInputProps("endOfFormCta.prompt"),placeholder:i.formatMessage({id:"project.form_config.cta.description_prompt.placeholder",defaultMessage:"e.g. Explain to form is completed and they can click on one of the buttons beneath to see a summary of this questionnaire."}),rows:3},e.key("endOfFormCta.prompt"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:280,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:267,columnNumber:8},this),v.jsxDEV(Vo,{id:"endOfFormCta.alignment",label:i.formatMessage({id:"project.form_config.cta.alignment.label",defaultMessage:"Alignment"}),help:i.formatMessage({id:"project.form_config.cta.alignment.description",defaultMessage:"Choose how the CTA buttons will be rendered in the message."}),children:v.jsxDEV(Fm,{readOnly:!r,...e.getInputProps("endOfFormCta.alignment"),data:Object.entries(phr).map(([D,k])=>({value:D,label:i.formatMessage(k)})),allowDeselect:!1},e.key("endOfFormCta.alignment"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:304,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:293,columnNumber:8},this),v.jsxDEV("section",{className:"w-full",children:[v.jsxDEV(Qe,{fw:"500",size:"sm",children:v.jsxDEV(ee,{id:"project.form_config.cta.buttons.label",defaultMessage:"Call to action buttons"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:317,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:316,columnNumber:9},this),E&&v.jsxDEV(Yo,{color:"orange",variant:"light",className:"w-full",mt:"xs",title:i.formatMessage({id:"project.form_config.cta.warning.missing_translation.title",defaultMessage:"{total, plural, =1 {# CTA has} other {# CTA's have}} missing translations"},{total:i.formatNumber(f.length)}),icon:v.jsxDEV(ud,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:336,columnNumber:17},this),children:v.jsxDEV(ee,{id:"project.form_config.cta.warning.missing_translation.description",defaultMessage:"CTA's without translations will be hidden from your customers."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:338,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:323,columnNumber:10},this),!!o.length&&v.jsxDEV(tHt,{onDragEnd:_,children:v.jsxDEV(hn.ScrollContainer,{minWidth:500,type:"native",className:"w-full",mt:"xs",children:v.jsxDEV(hn,{highlightOnHover:!0,className:"rounded-md overflow-hidden",children:[v.jsxDEV(hn.Thead,{className:"bg-[var(--mantine-color-gray-1)]",children:v.jsxDEV(hn.Tr,{children:[o.length>1&&v.jsxDEV(hn.Th,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:350,columnNumber:40},this),v.jsxDEV(hn.Th,{className:"break-normal",children:v.jsxDEV(ee,{id:"project.form_config.cta.column.preview",defaultMessage:"Preview"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:352,columnNumber:16},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:351,columnNumber:15},this),v.jsxDEV(hn.Th,{className:"break-normal",children:v.jsxDEV(ee,{id:"project.form_config.cta.column.key",defaultMessage:"Key"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:358,columnNumber:16},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:357,columnNumber:15},this),v.jsxDEV(hn.Th,{className:"break-normal",children:v.jsxDEV(ee,{id:"project.form_config.cta.column.href",defaultMessage:"Link"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:364,columnNumber:16},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:363,columnNumber:15},this),v.jsxDEV(hn.Th,{className:"break-normal",children:v.jsxDEV(ee,{id:"project.form_config.cta.column.languages",defaultMessage:"Languages"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:370,columnNumber:16},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:369,columnNumber:15},this),v.jsxDEV(hn.Th,{className:"break-normal"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:375,columnNumber:15},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:349,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:348,columnNumber:13},this),v.jsxDEV(dHt,{droppableId:"dnd-list",direction:"vertical",children:D=>v.jsxDEV(hn.Tbody,{...D.droppableProps,ref:D.innerRef,children:[o.map((k,M)=>v.jsxDEV(rvr,{row:k,index:M,onEdit:p,isAdmin:r,onDelete:g,allowDrag:o.length>1,defaultLanguage:t.defaultLanguage},k.key,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:385,columnNumber:17},this)),D.placeholder]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:380,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:378,columnNumber:13},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:347,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:346,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:345,columnNumber:10},this),!o.length&&v.jsxDEV(Zd,{className:"my-4",description:i.formatMessage({id:"project.form_config.cta.empty.title",defaultMessage:"No call to actions configured yet."}),children:r&&v.jsxDEV(Nn,{size:"xs",variant:"light",onClick:c.open,disabled:o.length>=wJ,children:v.jsxDEV(ee,{id:"project.form_config.cta.button.add",defaultMessage:"Add CTA"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:419,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:413,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:405,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:315,columnNumber:8},this),!!o.length&&r&&v.jsxDEV("div",{className:"mt-2",children:v.jsxDEV(ir,{label:i.formatMessage({id:"project.form_config.cta.button.tooltip",defaultMessage:"Only {limit} CTA's can be added"},{limit:wJ}),disabled:o.length<wJ,children:v.jsxDEV(Nn,{size:"xs",variant:"subtle",onClick:c.open,leftSection:v.jsxDEV(GA,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:444,columnNumber:25},this),disabled:o.length>=wJ,children:v.jsxDEV(ee,{id:"project.form_config.cta.button.add",defaultMessage:"Add CTA"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:447,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:440,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:430,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:429,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:266,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:244,columnNumber:5},this),v.jsxDEV(nvr,{isOpen:l,onClose:m,cta:h,existingCta:e.getValues().endOfFormCta.cta,onAdd:C,onEdit:N},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:458,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:243,columnNumber:4},this)]},"cta",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:219,columnNumber:3},this)}function rvr({row:t,index:e,allowDrag:n,onEdit:i,onDelete:r,isAdmin:o,defaultLanguage:s}){var c;const a=Mt(),l=!!((c=t.languageSupport.filter(u=>u.supported))!=null&&c.length);return o||(n=!1),v.jsxDEV(aHt,{index:e,draggableId:t.key,children:u=>{var d;return v.jsxDEV(hn.Tr,{ref:u.innerRef,...u.draggableProps,className:"bg-white",children:[v.jsxDEV(hn.Td,{width:24,className:Vt("align-middle",n?"":"hidden"),children:v.jsxDEV("div",{...u.dragHandleProps,className:"h-6 cursor-grab align-middle",children:v.jsxDEV(qPt,{stroke:1,className:"text-neutral-700","aria-label":a.formatMessage({id:"project.form_config.cta.drag_icon",defaultMessage:"Re-order by dragging"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:493,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:492,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:491,columnNumber:6},this),v.jsxDEV(hn.Td,{className:"align-middle max-w-[25ch]",children:v.jsxDEV(Nn,{size:"xs",className:"max-w-full",variant:t.type==="primary"?"filled":"light",children:v.jsxDEV(Qe,{size:"sm",truncate:!0,children:t.label[s]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:505,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:504,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:503,columnNumber:6},this),v.jsxDEV(hn.Td,{className:"align-middle max-w-[15ch]",children:v.jsxDEV(ir,{label:t.key,children:v.jsxDEV(Qe,{title:t.key,className:"truncate",children:v.jsxDEV(rw,{className:"break-normal !rounded-sm",children:t.key},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:511,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:510,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:509,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:508,columnNumber:6},this),v.jsxDEV(hn.Td,{align:"center",className:"align-middle text-left max-w-[25ch]",children:v.jsxDEV(ir,{label:t.href,children:v.jsxDEV(Qe,{fz:"sm",truncate:!0,children:t.href},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:517,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:516,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:515,columnNumber:6},this),v.jsxDEV(hn.Td,{className:"align-middle",children:v.jsxDEV(m$,{children:[l&&((d=t.languageSupport)==null?void 0:d.map(h=>v.jsxDEV(jc,{radius:"md",variant:"light",color:h.supported?"green":"orange",size:"sm",children:h.language},h.language,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:526,columnNumber:10},this))),!l&&v.jsxDEV(ir,{label:a.formatMessage({id:"project.form_config.cta.languages.fallback.tooltip",defaultMessage:"CTA {key} will not be visible"},{key:t.key}),children:v.jsxDEV(Qe,{size:"xs",c:"red",className:"cursor-default",children:v.jsxDEV(ee,{id:"project.form_config.cta.languages.fallback",defaultMessage:"No languages defined"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:547,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:546,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:537,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:523,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:522,columnNumber:6},this),o&&v.jsxDEV(hn.Td,{align:"right",children:v.jsxDEV(un,{justify:"flex-end",gap:4,wrap:"nowrap",children:[v.jsxDEV(ir,{label:a.formatMessage({id:"project.form_config.cta.action.edit.tooltip",defaultMessage:"Edit CTA"}),children:v.jsxDEV(Fr,{variant:"subtle",onClick:()=>i(t.key),"aria-label":a.formatMessage({id:"project.form_config.cta.action.edit",defaultMessage:"Edit {key} CTA"},{key:t.key}),children:v.jsxDEV(e8e,{size:16,stroke:1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:576,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:565,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:559,columnNumber:9},this),v.jsxDEV(ir,{label:a.formatMessage({id:"project.form_config.cta.action.delete.tooltip.enabled",defaultMessage:"Delete field"}),children:v.jsxDEV(Fr,{color:"red",variant:"subtle",onClick:()=>r(t.key),"aria-label":a.formatMessage({id:"project.form_config.cta.action.delete",defaultMessage:"Delete {key} CTA"},{key:t.key}),children:v.jsxDEV(Lw,{size:16,stroke:1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:597,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:585,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:579,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:558,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:557,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:490,columnNumber:5},this)}},t.key,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/CallToAction/index.tsx",lineNumber:488,columnNumber:3},this)}function ovr({value:t,readOnly:e,defaultValue:n=0,onChange:i}){const r=Mt(),[o,s]=b.useState(t||n),[a,l]=b.useState("simple"),c=[{value:.1,label:r.formatMessage({id:"conversation_style.advanced.mark.strict",defaultMessage:"Strict"})},{value:cp.precise,label:r.formatMessage({id:"conversation_style.advanced.mark.precise",defaultMessage:"Precise"})},{value:cp.balanced,label:r.formatMessage({id:"conversation_style.advanced.mark.balanced",defaultMessage:"Balanced"})},{value:cp.creative,label:r.formatMessage({id:"conversation_style.advanced.mark.creative",defaultMessage:"Creative"})},{value:2,label:r.formatMessage({id:"conversation_style.advanced.mark.transcending",defaultMessage:"Transcending"})}],u=[{key:"precise",value:cp.precise,title:r.formatMessage({id:"conversation_style.simple_option.precise.title",defaultMessage:"Precise"}),description:r.formatMessage({id:"conversation_style.simple_option.precise.description",defaultMessage:"The agent will strive to provide answers that are as closely aligned as possible with the information in your documents."})},{key:"balanced",value:cp.balanced,title:r.formatMessage({id:"conversation_style.simple_option.balanced.title",defaultMessage:"Balanced"}),description:r.formatMessage({id:"conversation_style.simple_option.balanced.description",defaultMessage:"The agent will seek a balance between accuracy and creativity."})},{key:"creative",value:cp.creative,title:r.formatMessage({id:"conversation_style.simple_option.creative.title",defaultMessage:"Creative"}),description:r.formatMessage({id:"conversation_style.simple_option.creative.description",defaultMessage:"The agent will express itself in a creative manner but may provide answers that are not necessarily accurate.",description:"This is the description of the creative conversation style option."})}];b.useEffect(()=>{!o||Object.values(cp).includes(o)||l("advanced")},[]);const d=h=>{i(h),s(h)};return v.jsxDEV(Gt,{children:[v.jsxDEV(Yk,{data:[{label:r.formatMessage({id:"conversation_style.mode_selector.option.simple_mode",defaultMessage:"Simple mode"}),value:"simple"},{label:r.formatMessage({id:"conversation_style.mode_selector.option.advanced",defaultMessage:"Advanced mode"}),value:"advanced"}],value:a,onChange:h=>l(h),"aria-label":r.formatMessage({id:"conversation_style.mode_selector.aria_label",defaultMessage:"Conversation style editor mode"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:129,columnNumber:4},this),a==="advanced"&&v.jsxDEV(Qe,{size:"sm",c:"dimmed",children:v.jsxDEV(ee,{id:"conversation_style.advanced.description",defaultMessage:"The advanced Conversation Style Selector gives you greater control over your agent's responses, allowing you to tailor the degree of freedom in the answers to the questions."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:155,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:154,columnNumber:5},this),a==="simple"&&v.jsxDEV(g0.Group,{value:`${o}`,readOnly:e,defaultValue:`${o}`,onChange:h=>d(+h),children:v.jsxDEV(un,{children:u.map(h=>v.jsxDEV(g0.Card,{p:"sm",radius:"md",value:`${h.value}`,className:Vt("h-full items-stretch",e?"cursor-not-allowed":""),children:v.jsxDEV(un,{wrap:"nowrap",align:"flex-start",children:[v.jsxDEV(g0.Indicator,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:178,columnNumber:10},this),v.jsxDEV("div",{children:[v.jsxDEV(Qe,{children:h.title},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:180,columnNumber:11},this),v.jsxDEV(Qe,{size:"sm",c:"dimmed",children:h.description},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:181,columnNumber:11},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:179,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:177,columnNumber:9},this)},h.key,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:170,columnNumber:8},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:168,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:162,columnNumber:5},this),a==="advanced"&&v.jsxDEV("div",{className:"px-2",children:v.jsxDEV(Kde,{min:.1,max:2,step:.01,radius:"xl",marks:c,defaultValue:o,onChange:d,className:"w-full mb-6 rounded form_config-conversation_style-slider"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:193,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:192,columnNumber:5},this),v.jsxDEV(lu,{mounted:o>1,transition:"fade-down",duration:250,timingFunction:"ease-out",children:h=>v.jsxDEV(Yo,{variant:"light",style:h,icon:v.jsxDEV(ud,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:210,columnNumber:13},this),color:"orange",className:"w-full",children:v.jsxDEV(ee,{id:"conversation_style.advanced.creativity_warning.message",defaultMessage:"This conversation style might lead to more creative or less accurate responses."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:214,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:207,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:205,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/ConversationStyle.tsx",lineNumber:128,columnNumber:3},this)}const B_={addButton:{id:"layout.chatbot.languages.add_language.label",defaultMessage:"Add language"},addTitle:{id:"shared.multi_language_section.add_language.title",defaultMessage:"Add language"},editTitle:{id:"shared.multi_language_section.edit_language.title",defaultMessage:"Edit language"},alertTitle:{id:"shared.multi_language_section.warning.missing_language.title",defaultMessage:"{total, plural, =1 {# language is} other {# language are}} not configured"},alertDescription:{id:"shared.multi_language_section.warning.missing_language.description",defaultMessage:"Default language will be used when language hasn't been configured."},confirmDeleteTitle:{id:"layout.chatbot.languages.delete_modal.title",defaultMessage:"Delete {language} language"},confirmDeleteButton:{id:"layout.chatbot.languages.delete_modal.confirm",defaultMessage:"Delete language"},confirmDeleteDescription:{id:"layout.chatbot.languages.delete_modal.description",defaultMessage:"Deleting the language is <bold>irreversible</bold> and cannot be undone. Language will also be removed from the form config."},formSubmit:{id:"shared.modal.footer.save",defaultMessage:"Save"}};function svr({title:t,data:e,locale:n,project:i,description:r,sectionKey:o,isDeleting:s,readOnly:a,allowZero:l,organization:c,isInitialLoading:u,children:d,onSubmit:h,onDelete:f,renderForm:m}){var V,F,$;const p=Mt(),[g,y]=Pc(!1),[_,w]=b.useState(void 0),C=b.useMemo(()=>new Set(Object.keys(e||{})),[e]),N=c.permissions.languageLimit<=C.size,E=b.useMemo(()=>Math.max(i.languages.length-Object.keys(e||{}).length,0),[e,i.languages]),D=b.useMemo(()=>l&&!Object.keys(e||{}).length||u?!1:!!E,[e,E]),k=()=>{y.open(),w(void 0)},M=({language:B})=>{y.open(),w(B)},T=({event:B,language:z})=>{var K,q,U;const H=Ja.getName(z).toLowerCase();B.stopPropagation(),Ev.openConfirmModal({title:p.formatMessage(((K=n==null?void 0:n.confirmDelete)==null?void 0:K.title)||B_.confirmDeleteTitle,{language:H}),children:v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{...((q=n==null?void 0:n.confirmDelete)==null?void 0:q.description)||B_.confirmDeleteDescription,values:{language:H,bold:Y=>v.jsxDEV("span",{className:"font-bold",children:Y},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:164,columnNumber:27},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:160,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:159,columnNumber:5},this),labels:{confirm:p.formatMessage(((U=n==null?void 0:n.confirmDelete)==null?void 0:U.deleteButton)||B_.confirmDeleteButton),cancel:p.formatMessage({id:"shared.modal.footer.cancel.delete",defaultMessage:"No don't delete it"})},confirmProps:{color:"red",loading:s},onConfirm:()=>f(z)})},A=()=>{y.close(),w(void 0)},R=async B=>{try{await h(B),A()}catch{}};function P(){var B,z;return _?p.formatMessage(((B=n==null?void 0:n.editModal)==null?void 0:B.title)||B_.editTitle):p.formatMessage(((z=n==null?void 0:n.addModal)==null?void 0:z.title)||B_.addTitle)}function O(){var z,H;const B=_?(z=n==null?void 0:n.editModal)==null?void 0:z.submitButton:(H=n==null?void 0:n.addModal)==null?void 0:H.submitButton;return p.formatMessage(B||B_.formSubmit)}return v.jsxDEV(Wi.Item,{id:o,value:o,className:"!bg-white",children:[v.jsxDEV(Wi.Control,{children:v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV(Qe,{fw:"600",children:t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:208,columnNumber:6},this),D&&v.jsxDEV(ir,{label:p.formatMessage(((V=n==null?void 0:n.alert)==null?void 0:V.title)||B_.alertTitle,{total:p.formatNumber(E)}),children:v.jsxDEV(kp,{variant:"light",color:"orange",children:v.jsxDEV(ud,{color:"orange",size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:216,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:215,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:210,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:207,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:206,columnNumber:4},this),v.jsxDEV(Wi.Panel,{children:v.jsxDEV(Gt,{className:"w-full",align:"flex-start",children:[r&&v.jsxDEV(Qe,{size:"sm",c:"dimmed",children:[" ",r]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:225,columnNumber:7},this),D&&v.jsxDEV(Yo,{color:"orange",variant:"light",className:"w-full",title:p.formatMessage(((F=n==null?void 0:n.alert)==null?void 0:F.title)||B_.alertTitle,{total:p.formatNumber(E)}),icon:v.jsxDEV(ud,{size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:238,columnNumber:14},this),children:v.jsxDEV(ee,{...(($=n==null?void 0:n.alert)==null?void 0:$.description)||B_.alertDescription},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:240,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:231,columnNumber:7},this),d({onEdit:M,onDelete:T}),N&&v.jsxDEV(ir,{label:p.formatMessage({id:"shared.language_limit_reached.tooltip",defaultMessage:"Language limit reached."}),children:v.jsxDEV(Nn,{size:"xs",to:"/billing",variant:"subtle",component:Np,className:"!text-theme-primary focus-within:bg-theme-primary/10",children:v.jsxDEV(ee,{id:"shared.button.upgrade",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:258,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:251,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:245,columnNumber:7},this),!N&&!a&&v.jsxDEV(Nn,{size:"xs",variant:"subtle",onClick:k,disabled:N,leftSection:v.jsxDEV(GA,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:268,columnNumber:21},this),children:v.jsxDEV(ee,{...(n==null?void 0:n.addButton)||B_.addButton},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:270,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:263,columnNumber:7},this),v.jsxDEV(bl,{onClose:A,opened:g,title:P(),closeButtonProps:{"aria-label":p.formatMessage({id:"shared.modal.close",defaultMessage:"Close modal"})},children:m({selectedLanguage:_,excludedLanguages:C,onSubmit:R,value:_&&e[_],disableLanguage:!!_&&c.permissions.languageLimit!==1,renderFooter:({isValid:B,isLoading:z})=>{if(!a)return v.jsxDEV("footer",{className:"w-full",children:v.jsxDEV(un,{justify:"flex-end",gap:"xs",children:[v.jsxDEV(Nn,{type:"button",variant:"outline",size:"xs",onClick:A,children:v.jsxDEV(ee,{id:"shared.modal.footer.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:298,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:297,columnNumber:12},this),v.jsxDEV(Nn,{type:"submit",size:"xs",disabled:!B,loading:z,children:O()},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:303,columnNumber:12},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:296,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:295,columnNumber:10},this)}})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:274,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:223,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:222,columnNumber:4},this)]},o,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/RawSection.tsx",lineNumber:205,columnNumber:3},this)}function cG({data:t,project:e,readOnly:n,isRequired:i=!0,children:r,renderInTable:o,...s}){const a=Mt();return v.jsxDEV(svr,{...s,data:t,readOnly:n,project:e,renderForm:r,children:({onDelete:l,onEdit:c})=>v.jsxDEV(v.Fragment,{children:Object.keys(t||{}).length>0&&v.jsxDEV(hn.ScrollContainer,{minWidth:250,type:"native",className:"rounded-md",children:v.jsxDEV(hn,{highlightOnHover:!0,striped:"even",className:"rounded-md",layout:"fixed",children:v.jsxDEV(hn.Tbody,{children:Object.entries(t).map(([u,d])=>{const h=u===e.defaultLanguage&&i;return v.jsxDEV(hn.Tr,{className:"cursor-pointer",onClick:f=>c({event:f,language:u}),children:[v.jsxDEV(hn.Td,{width:96,className:"align-middle",children:v.jsxDEV(jc,{variant:"light",radius:"md",className:"min-w-fit",children:Ja.getName(u)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:47,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:46,columnNumber:13},this),v.jsxDEV(hn.Td,{className:"align-middle",children:v.jsxDEV(Qe,{size:"sm",truncate:"end",className:"w-full text-left",children:o(d)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:52,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:51,columnNumber:13},this),!n&&v.jsxDEV(hn.Td,{width:72,children:v.jsxDEV(un,{wrap:"nowrap",gap:0,children:[v.jsxDEV(ir,{openDelay:500,label:a.formatMessage({id:"form_config.welcome_message.row.edit.tooltip",defaultMessage:"Edit language"}),children:v.jsxDEV(Fr,{variant:"subtle",onClick:f=>c({event:f,language:u}),"aria-label":a.formatMessage({id:"layout.chatbot.languages.row.edit.aria_label",defaultMessage:"Edit language"}),children:v.jsxDEV(e8e,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:79,columnNumber:18},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:66,columnNumber:17},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:59,columnNumber:16},this),v.jsxDEV(ir,{openDelay:h?void 0:500,label:h?a.formatMessage({id:"layout.chatbot.languages.row.delete.tooltip.disabled",defaultMessage:"The default language cannot be deleted."}):a.formatMessage({id:"form_config.welcome_message.row.delete.tooltip.info",defaultMessage:"Delete language"}),children:v.jsxDEV(Fr,{color:"red",variant:"subtle",disabled:h,onClick:f=>l({event:f,language:u}),"aria-label":a.formatMessage({id:"layout.chatbot.languages.row.delete.aria_label",defaultMessage:"Delete language"}),children:v.jsxDEV(Lw,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:113,columnNumber:18},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:98,columnNumber:17},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:83,columnNumber:16},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:58,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:57,columnNumber:14},this)]},u,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:41,columnNumber:12},this)})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:36,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:35,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:34,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:32,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MultiLanguageSection/index.tsx",lineNumber:30,columnNumber:3},this)}function mo(t){return{type:t}}const uG=mo("SELECTION_CHANGE_COMMAND"),avr=mo("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),Rze=mo("CLICK_COMMAND"),_I=mo("DELETE_CHARACTER_COMMAND"),H3=mo("INSERT_LINE_BREAK_COMMAND"),Xse=mo("INSERT_PARAGRAPH_COMMAND"),W3=mo("CONTROLLED_TEXT_INSERTION_COMMAND"),Fpe=mo("PASTE_COMMAND"),oPe=mo("REMOVE_TEXT_COMMAND"),bU=mo("DELETE_WORD_COMMAND"),vU=mo("DELETE_LINE_COMMAND"),d0=mo("FORMAT_TEXT_COMMAND"),Pze=mo("UNDO_COMMAND"),Oze=mo("REDO_COMMAND"),lvr=mo("KEYDOWN_COMMAND"),hHt=mo("KEY_ARROW_RIGHT_COMMAND"),cvr=mo("MOVE_TO_END"),fHt=mo("KEY_ARROW_LEFT_COMMAND"),uvr=mo("MOVE_TO_START"),mHt=mo("KEY_ARROW_UP_COMMAND"),pHt=mo("KEY_ARROW_DOWN_COMMAND"),Zse=mo("KEY_ENTER_COMMAND"),dvr=mo("KEY_SPACE_COMMAND"),jze=mo("KEY_BACKSPACE_COMMAND"),gHt=mo("KEY_ESCAPE_COMMAND"),Fze=mo("KEY_DELETE_COMMAND"),hvr=mo("KEY_TAB_COMMAND"),fvr=mo("INSERT_TAB_COMMAND"),mvr=mo("INDENT_CONTENT_COMMAND"),vbt=mo("OUTDENT_CONTENT_COMMAND"),bHt=mo("DROP_COMMAND"),pvr=mo("FORMAT_ELEMENT_COMMAND"),vHt=mo("DRAGSTART_COMMAND"),yHt=mo("DRAGOVER_COMMAND"),gvr=mo("DRAGEND_COMMAND"),$pe=mo("COPY_COMMAND"),$ze=mo("CUT_COMMAND"),sPe=mo("SELECT_ALL_COMMAND"),bvr=mo("CLEAR_EDITOR_COMMAND"),vvr=mo("CLEAR_HISTORY_COMMAND"),Qse=mo("CAN_REDO_COMMAND"),Jse=mo("CAN_UNDO_COMMAND"),yvr=mo("FOCUS_COMMAND"),_vr=mo("BLUR_COMMAND"),xvr=mo("KEY_MODIFIER_COMMAND"),p_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",wvr=p_&&"documentMode"in document?document.documentMode:null,g_=p_&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Dk=p_&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),eae=p_&&"InputEvent"in window&&!wvr?"getTargetRanges"in new window.InputEvent("input"):!1,Vze=p_&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Vpe=p_&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Cvr=p_&&/Android/.test(navigator.userAgent),_Ht=p_&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Svr=p_&&Cvr&&_Ht,Bze=p_&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!_Ht,dG=1,vM=3,lA=0,xHt=1,sF=2,wHt=0,zze=1,Hze=2,Wze=1,Uze=2,tae=4,nae=8,Kze=16,qze=32,Gze=64,Yze=128,Nvr=Wze|Uze|tae|nae|Kze|qze|Gze|Yze,aPe=1,iae=2,Xze=1,Zze=2,Qze=3,Jze=4,eHe=5,tHe=6,CHt=" ",Evr="​",Bpe=Vze||Vpe||Bze?CHt:Evr,CS=`

`,Dvr=Dk?CHt:Bpe,SHt="֑-߿יִ-﷽ﹰ-ﻼ",NHt="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",kvr=new RegExp("^[^"+NHt+"]*["+SHt+"]"),Mvr=new RegExp("^[^"+SHt+"]*["+NHt+"]"),HC={bold:Wze,code:Kze,highlight:Yze,italic:Uze,strikethrough:tae,subscript:qze,superscript:Gze,underline:nae},Lvr={directionless:aPe,unmergeable:iae},ybt={center:Zze,end:tHe,justify:Jze,left:Xze,right:Qze,start:eHe},Tvr={[Zze]:"center",[tHe]:"end",[Jze]:"justify",[Xze]:"left",[Qze]:"right",[eHe]:"start"},Ivr={normal:wHt,segmented:Hze,token:zze},Avr={[wHt]:"normal",[Hze]:"segmented",[zze]:"token"};function rae(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[i]of n.matchAll(/\S+/g))e.push(i);return e}const Rvr=100;let lPe=!1,nHe=0;function Pvr(){return lPe}function Ovr(t){nHe=t.timeStamp}function jvr(t){nHe===0&&Upe(t).addEventListener("textInput",Ovr,!0)}function pSe(t,e,n){return e.__lexicalLineBreak===t||t[`__lexicalKey_${n._key}`]!==void 0}function Fvr(t){return t.getEditorState().read(()=>{const e=Fi();return e!==null?e.clone():null})}function $vr(t,e,n){const i=$w(n._window);let r=null,o=null;i!==null&&i.anchorNode===t&&(r=i.anchorOffset,o=i.focusOffset);const s=t.nodeValue;s!==null&&aHe(e,s,r,o,!1)}function Vvr(t,e,n){if(Jn(t)){const i=t.anchor.getNode();if(i.is(n)&&t.format!==i.getFormat())return!1}return e.nodeType===vM&&n.isAttached()}function EHt(t,e,n){lPe=!0;const i=performance.now()-nHe>Rvr;try{db(t,()=>{const r=Fi()||Fvr(t),o=new Map,s=t.getRootElement(),a=t._editorState,l=t._blockCursorElement;let c=!1,u="";for(let h=0;h<e.length;h++){const f=e[h],m=f.type,p=f.target;let g=cA(p,a);if(!(g===null&&p!==s||Oa(g))){if(m==="characterData")i&&ai(g)&&Vvr(r,p,g)&&$vr(p,g,t);else if(m==="childList"){c=!0;const y=f.addedNodes;for(let C=0;C<y.length;C++){const N=y[C],E=IHt(N),D=N.parentNode;if(D!=null&&N!==l&&E===null&&(N.nodeName!=="BR"||!pSe(N,D,t))){if(Dk){const k=N.innerText||N.nodeValue;k&&(u+=k)}D.removeChild(N)}}const _=f.removedNodes,w=_.length;if(w>0){let C=0;for(let N=0;N<w;N++){const E=_[N];(E.nodeName==="BR"&&pSe(E,p,t)||l===E)&&(p.appendChild(E),C++)}w!==C&&(p===s&&(g=RHt(a)),o.set(p,g))}}}}if(o.size>0)for(const[h,f]of o)if(Mn(f)){const m=f.getChildrenKeys();let p=h.firstChild;for(let g=0;g<m.length;g++){const y=m[g],_=t.getElementByKey(y);_!==null&&(p==null?(h.appendChild(_),p=_):p!==_&&h.replaceChild(_,p),p=p.nextSibling)}}else ai(f)&&f.markDirty();const d=n.takeRecords();if(d.length>0){for(let h=0;h<d.length;h++){const f=d[h],m=f.addedNodes,p=f.target;for(let g=0;g<m.length;g++){const y=m[g],_=y.parentNode;_!=null&&y.nodeName==="BR"&&!pSe(y,p,t)&&_.removeChild(y)}}n.takeRecords()}r!==null&&(c&&(r.dirty=!0,jv(r)),Dk&&BHt(t)&&r.insertRawText(u))})}finally{lPe=!1}}function DHt(t){const e=t._observer;if(e!==null){const n=e.takeRecords();EHt(t,n,e)}}function kHt(t){jvr(t),t._observer=new MutationObserver((e,n)=>{EHt(t,e,n)})}function _bt(t,e){const n=t.__mode,i=t.__format,r=t.__style,o=e.__mode,s=e.__format,a=e.__style;return(n===null||n===o)&&(i===null||i===s)&&(r===null||r===a)}function xbt(t,e){const n=t.mergeWithSibling(e),i=hc()._normalizedNodes;return i.add(t.__key),i.add(e.__key),n}function MHt(t){let e=t;if(e.__text===""&&e.isSimpleText()&&!e.isUnmergeable()){e.remove();return}let n;for(;(n=e.getPreviousSibling())!==null&&ai(n)&&n.isSimpleText()&&!n.isUnmergeable();)if(n.__text==="")n.remove();else if(_bt(n,e)){e=xbt(n,e);break}else break;let i;for(;(i=e.getNextSibling())!==null&&ai(i)&&i.isSimpleText()&&!i.isUnmergeable();)if(i.__text==="")i.remove();else if(_bt(e,i)){e=xbt(e,i);break}else break}function LHt(t){return wbt(t.anchor),wbt(t.focus),t}function wbt(t){for(;t.type==="element";){const e=t.getNode(),n=t.offset;let i,r;if(n===e.getChildrenSize()?(i=e.getChildAtIndex(n-1),r=!0):(i=e.getChildAtIndex(n),r=!1),ai(i)){t.set(i.__key,r?i.getTextContentSize():0,"text");break}else if(!Mn(i))break;t.set(i.__key,r?i.getChildrenSize():0,"element")}}let Bvr=1;function zvr(){return""+Bvr++}function Hvr(t,e){const n=t._nodes.get(e);if(n===void 0)throw Error(`registeredNode: Type ${e} not found`);return n}const Wvr=typeof queueMicrotask=="function"?queueMicrotask:t=>{Promise.resolve().then(t)};function Uvr(t){return Oa(cA(t))}function iHe(t){const e=document.activeElement;if(e===null)return!1;const n=e.nodeName;return Oa(cA(t))&&(n==="INPUT"||n==="TEXTAREA"||e.contentEditable==="true"&&zpe(e)==null)}function hG(t,e,n){const i=t.getRootElement();try{return i!==null&&i.contains(e)&&i.contains(n)&&e!==null&&!iHe(e)&&THt(e)===t}catch{return!1}}function rHe(t){return t instanceof Zpe}function THt(t){let e=t;for(;e!=null;){const n=zpe(e);if(rHe(n))return n;e=Wpe(e)}return null}function zpe(t){return t?t.__lexicalEditor:null}function Kvr(t){return kvr.test(t)?"rtl":Mvr.test(t)?"ltr":null}function OO(t){return t.isToken()||t.isSegmented()}function qvr(t){return t.nodeType===vM}function oae(t){let e=t;for(;e!=null;){if(qvr(e))return e;e=e.firstChild}return null}function cPe(t,e,n){const i=HC[e];if(n!==null&&(t&i)===(n&i))return t;let r=t^i;return e==="subscript"?r&=~HC.superscript:e==="superscript"&&(r&=~HC.subscript),r}function Gvr(t,e){if(e!=null){Yvr(t,e),t.__key=e;return}om(),lWt();const n=hc(),i=tN(),r=zvr();i._nodeMap.set(r,t),Mn(t)?n._dirtyElements.set(r,!0):n._dirtyLeaves.add(r),n._cloneNotNeeded.add(r),n._dirtyType=xHt,t.__key=r}function Yvr(t,e){const n=$0r();if(!n)return;const i=n._nodeMap.get(e);if(i&&i.constructor!==t.constructor)throw t.constructor.name!==i.constructor.name?Error(`Lexical node with constructor ${t.constructor.name} attempted to re-use key from node in active editor state with constructor ${i.constructor.name}. Keys must not be re-used when the type is changed.`):Error(`Lexical node with constructor ${t.constructor.name} attempted to re-use key from node in active editor state with different constructor with the same name (possibly due to invalid Hot Module Replacement). Keys must not be re-used when the type is changed.`)}function Xvr(t,e,n){let i=t;for(;i!==null;){if(n.has(i))return;const r=e.get(i);if(r===void 0)break;n.set(i,!1),i=r.__parent}}function xI(t){const e=t.getParent();if(e!==null){const n=t.getWritable(),i=e.getWritable(),r=t.getPreviousSibling(),o=t.getNextSibling();if(r===null)if(o!==null){const s=o.getWritable();i.__first=o.__key,s.__prev=null}else i.__first=null;else{const s=r.getWritable();if(o!==null){const a=o.getWritable();a.__prev=s.__key,s.__next=a.__key}else s.__next=null;n.__prev=null}if(o===null)if(r!==null){const s=r.getWritable();i.__last=r.__key,s.__next=null}else i.__last=null;else{const s=o.getWritable();if(r!==null){const a=r.getWritable();a.__next=s.__key,s.__prev=a.__key}else s.__prev=null;n.__next=null}i.__size--,n.__parent=null}}function sae(t){lWt();const e=t.getLatest(),n=e.__parent,i=tN(),r=hc(),o=i._nodeMap,s=r._dirtyElements;n!==null&&Xvr(n,o,s);const a=e.__key;r._dirtyType=xHt,Mn(t)?s.set(a,!0):r._dirtyLeaves.add(a)}function Zvr(t){const e=t.getPreviousSibling(),n=t.getNextSibling();e!==null&&sae(e),n!==null&&sae(n)}function xh(t){om();const e=hc(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,n!==null){const i=yf(n);i!==null&&i.getWritable()}if(t!==null){const i=yf(t);i!==null&&i.getWritable()}}}function tD(){return yG()?null:hc()._compositionKey}function yf(t,e){const i=(e||tN())._nodeMap.get(t);return i===void 0?null:i}function IHt(t,e){const n=hc(),i=t[`__lexicalKey_${n._key}`];return i!==void 0?yf(i,e):null}function cA(t,e){let n=t;for(;n!=null;){const i=IHt(n,e);if(i!==null)return i;n=Wpe(n)}return null}function AHt(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function Cbt(t){return t.read(()=>Vc().getTextContent())}function Qvr(t,e){db(t,()=>{const n=tN();if(n.isEmpty())return;if(e==="root"){Vc().markDirty();return}const i=n._nodeMap;for(const[,r]of i)r.markDirty()},t._pendingEditorState===null?{tag:"history-merge"}:void 0)}function Vc(){return RHt(tN())}function RHt(t){return t._nodeMap.get("root")}function jv(t){om();const e=tN();if(t!==null){if(Object.isFrozen(t))throw Error("$setSelection called on frozen selection object. Ensure selection is cloned before passing in.");t.dirty=!0,t.setCachedNodes(null)}e._selection=t}function Jvr(){om();const t=hc();DHt(t)}function L4(t){const e=hc(),n=eyr(t,e);if(n===null){const i=e.getRootElement();return t===i?yf("root"):null}return yf(n)}function Sbt(t,e){return e?t.getTextContentSize():0}function eyr(t,e){let n=t;for(;n!=null;){const i=n[`__lexicalKey_${e._key}`];if(i!==void 0)return i;n=Wpe(n)}return null}function PHt(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function oHe(t){const e=[];let n=t;for(;n!==null;)e.push(n),n=n._parentEditor;return e}function OHt(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function jHt(t){return t.nodeType===vM?t.nodeValue:null}function sHe(t,e,n){const i=$w(e._window);if(i===null)return;const r=i.anchorNode;let{anchorOffset:o,focusOffset:s}=i;if(r!==null){let a=jHt(r);const l=cA(r);if(a!==null&&ai(l)){if(a===Bpe&&n){const c=n.length;a=n,o=c,s=c}a!==null&&aHe(l,a,o,s,t)}}}function aHe(t,e,n,i,r){let o=t;if(o.isAttached()&&(r||!o.isDirty())){const s=o.isComposing();let a=e;(s||r)&&e[e.length-1]===Bpe&&(a=e.slice(0,-1));const l=o.getTextContent();if(r||a!==l){if(a===""){if(xh(null),!Vze&&!Vpe&&!Bze){const p=hc();setTimeout(()=>{p.update(()=>{o.isAttached()&&o.remove()})},20)}else o.remove();return}const c=o.getParent(),u=vG(),d=o.getTextContentSize(),h=tD(),f=o.getKey();if(o.isToken()||h!==null&&f===h&&!s||Jn(u)&&(c!==null&&!c.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===t.__key&&u.anchor.offset===0&&!o.canInsertTextBefore()&&!s||u.focus.key===t.__key&&u.focus.offset===d&&!o.canInsertTextAfter()&&!s)){o.markDirty();return}const m=Fi();if(!Jn(m)||n===null||i===null){o.setTextContent(a);return}if(m.setTextNodeRange(o,n,o,i),o.isSegmented()){const p=o.getTextContent(),g=Dc(p);o.replace(g),o=g}o.setTextContent(a)}}}function tyr(t){const e=t.getPreviousSibling();return(ai(e)||Mn(e)&&e.isInline())&&!e.canInsertTextAfter()}function nyr(t,e){if(e.isSegmented())return!0;if(!t.isCollapsed())return!1;const n=t.anchor.offset,i=e.getParentOrThrow(),r=e.isToken();return n===0?!e.canInsertTextBefore()||!i.canInsertTextBefore()&&!e.isComposing()||r||tyr(e):n===e.getTextContentSize()?!e.canInsertTextAfter()||!i.canInsertTextAfter()&&!e.isComposing()||r:!1}function iyr(t,e,n,i){return t==="Tab"&&!e&&!n&&!i}function ryr(t,e,n,i){return t.toLowerCase()==="b"&&!e&&fG(n,i)}function oyr(t,e,n,i){return t.toLowerCase()==="i"&&!e&&fG(n,i)}function syr(t,e,n,i){return t.toLowerCase()==="u"&&!e&&fG(n,i)}function ayr(t,e){return VHt(t)&&!e}function lyr(t,e){return VHt(t)&&e}function cyr(t,e){return g_&&e&&t.toLowerCase()==="o"}function uyr(t,e,n){return yU(t)&&(g_?e:n)}function dyr(t,e,n){return _U(t)&&(g_?e:n)}function hyr(t,e){return g_&&e&&yU(t)}function fyr(t,e){return g_&&e&&_U(t)}function myr(t,e,n,i){return g_?e||n?!1:yU(t)||t.toLowerCase()==="h"&&i:i||e||n?!1:yU(t)}function pyr(t,e,n,i,r){return g_?n||i||r?!1:_U(t)||t.toLowerCase()==="d"&&e:e||i||r?!1:_U(t)}function gyr(t,e,n,i){return t.toLowerCase()==="z"&&!e&&fG(n,i)}function byr(t,e,n,i){return g_?t.toLowerCase()==="z"&&n&&e:t.toLowerCase()==="y"&&i||t.toLowerCase()==="z"&&i&&e}function vyr(t,e,n,i){return e?!1:t.toLowerCase()==="c"?g_?n:i:!1}function yyr(t,e,n,i){return e?!1:t.toLowerCase()==="x"?g_?n:i:!1}function FHt(t){return t==="ArrowLeft"}function $Ht(t){return t==="ArrowRight"}function _yr(t){return t==="ArrowUp"}function xyr(t){return t==="ArrowDown"}function wyr(t,e,n,i){return FHt(t)&&!e&&!i&&!n}function Cyr(t,e,n,i,r){return FHt(t)&&!i&&!n&&(e||r)}function Syr(t,e,n,i){return $Ht(t)&&!e&&!i&&!n}function Nyr(t,e,n,i,r){return $Ht(t)&&!i&&!n&&(e||r)}function Eyr(t,e,n){return _yr(t)&&!e&&!n}function Dyr(t,e,n){return xyr(t)&&!e&&!n}function kyr(t,e,n,i){return t||e||n||i}function Myr(t){return t===" "}function fG(t,e){return g_?t:e}function VHt(t){return t==="Enter"}function yU(t){return t==="Backspace"}function Lyr(t){return t==="Escape"}function _U(t){return t==="Delete"}function Nbt(t,e,n){return t.toLowerCase()==="a"&&fG(e,n)}function Tyr(){const t=Vc(),e=t.select(0,t.getChildrenSize());jv(LHt(e))}function AB(t,e){t.__lexicalClassNameCache===void 0&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,i=n[e];if(i!==void 0)return i;const r=t[e];if(typeof r=="string"){const o=rae(r);return n[e]=o,o}return r}function lHe(t,e,n,i,r){if(n.size===0)return;const o=i.__type,s=i.__key,a=e.get(o);if(a===void 0)throw Error(`Type ${o} not in registeredNodes`);const l=a.klass;let c=t.get(l);c===void 0&&(c=new Map,t.set(l,c));const u=c.get(s),d=u==="destroyed"&&r==="created";(u===void 0||d)&&c.set(s,d?"updated":r)}function Ebt(t,e,n){const i=t.getParent();let r=n,o=t;return i!==null&&(e&&n===0?(r=o.getIndexWithinParent(),o=i):!e&&n===o.getChildrenSize()&&(r=o.getIndexWithinParent()+1,o=i)),o.getChildAtIndex(e?r-1:r)}function xU(t,e){const n=t.offset;if(t.type==="element"){const i=t.getNode();return Ebt(i,e,n)}else{const i=t.getNode();if(e&&n===0||!e&&n===i.getTextContentSize()){const r=e?i.getPreviousSibling():i.getNextSibling();return r===null?Ebt(i.getParentOrThrow(),e,i.getIndexWithinParent()+(e?0:1)):r}}return null}function BHt(t){const e=Upe(t).event,n=e&&e.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function Bi(t,e,n){return dWt(t,e,n)}function Hpe(t){return!Nf(t)&&!t.isLastChild()&&!t.isInline()}function aae(t,e){const n=t._keyToDOMMap.get(e);if(n===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${e}`);return n}function Wpe(t){const e=t.assignedSlot||t.parentElement;return e!==null&&e.nodeType===11?e.host:e}function Iyr(t,e,n){const i=n.ownerDocument,r=i.defaultView;if(r===null)return;let{top:o,bottom:s}=e,a=0,l=0,c=n;for(;c!==null;){const u=c===i.body;if(u)a=0,l=Upe(t).innerHeight;else{const h=c.getBoundingClientRect();a=h.top,l=h.bottom}let d=0;if(o<a?d=-(a-o):s>l&&(d=s-l),d!==0)if(u)r.scrollBy(0,d);else{const h=c.scrollTop;c.scrollTop+=d;const f=c.scrollTop-h;o-=f,s-=f}if(u)break;c=Wpe(c)}}function Ayr(t){const e=Fi();if(!Jn(e)||!Mn(t))return e;const{anchor:n,focus:i}=e,r=n.getNode(),o=i.getNode();return uPe(r,t)&&n.set(t.__key,0,"element"),uPe(o,t)&&i.set(t.__key,0,"element"),e}function uPe(t,e){let n=t.getParent();for(;n!==null;){if(n.is(e))return!0;n=n.getParent()}return!1}function Ryr(t){const e=t.ownerDocument;return e&&e.defaultView||null}function Upe(t){const e=t._window;if(e===null)throw Error("window object not found");return e}function Pyr(t){let e=t.getParentOrThrow();for(;e!==null;){if(fR(e))return e;e=e.getParentOrThrow()}return e}function fR(t){return Nf(t)||Mn(t)&&t.isShadowRoot()}function Sb(t){const e=hc(),n=t.constructor.getType(),i=e._nodes.get(n);if(i===void 0)throw Error('$initializeNode failed. Ensure node has been registered to the editor. You can do this by passing the node class via the "nodes" array in the editor config.');const r=i.replace;if(r!==null){const o=r(t);if(!(o instanceof t.constructor))throw Error("$initializeNode failed. Ensure replacement node is a subclass of the original node.");return o}return t}function gSe(t,e){const n=t.getParent();if(Nf(n)&&!Mn(e)&&!Oa(e))throw Error("Only element or decorator nodes can be inserted in to the root node")}function Oyr(t){const e=t.theme,n=document.createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let i=e.blockCursor;if(i!==void 0){if(typeof i=="string"){const r=rae(i);i=e.blockCursor=r}i!==void 0&&n.classList.add(...i)}return n}function bSe(t){return(Oa(t)||Mn(t)&&!t.canBeEmpty())&&!t.isInline()}function cHe(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null;const i=t.parentElement;i!==null&&i.removeChild(t)}function jyr(t,e,n){let i=t._blockCursorElement;if(Jn(n)&&n.isCollapsed()&&n.anchor.type==="element"&&e.contains(document.activeElement)){const r=n.anchor,o=r.getNode(),s=r.offset,a=o.getChildrenSize();let l=!1,c=null;if(s===a){const u=o.getChildAtIndex(s-1);bSe(u)&&(l=!0)}else{const u=o.getChildAtIndex(s);if(bSe(u)){const d=u.getPreviousSibling();(d===null||bSe(d))&&(l=!0,c=t.getElementByKey(u.__key))}}if(l){const u=t.getElementByKey(o.__key);i===null&&(t._blockCursorElement=i=Oyr(t._config)),e.style.caretColor="transparent",c===null?u.appendChild(i):u.insertBefore(i,c);return}}i!==null&&cHe(i,t,e)}function $w(t){return p_?(t||window).getSelection():null}function Fyr(t){return eN(t)&&t.tagName==="A"}function eN(t){return t.nodeType===1}function dPe(t){const e=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 t.nodeName.match(e)!==null}function lae(t){const e=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 t.nodeName.match(e)!==null}function jO(t){if(Nf(t)||Oa(t)&&!t.isInline())return!0;if(!Mn(t)||fR(t))return!1;const e=t.getFirstChild(),n=e===null||SS(e)||ai(e)||e.isInline();return!t.isInline()&&t.canBeEmpty()!==!1&&n}function vSe(t,e){let n=t;for(;n!==null&&n.getParent()!==null&&!e(n);)n=n.getParentOrThrow();return e(n)?n:null}function $yr(){return hc()}const Dbt=new WeakMap,Vyr=new Map;function Byr(t){if(!t._readOnly&&t.isEmpty())return Vyr;if(!t._readOnly)throw Error("getCachedTypeToNodeMap called with a writable EditorState");let e=Dbt.get(t);if(!e){e=new Map,Dbt.set(t,e);for(const[n,i]of t._nodeMap){const r=i.__type;let o=e.get(r);o||(o=new Map,e.set(r,o)),o.set(n,i)}}return e}function uHe(t){const e=t.constructor,n=e.clone(t);n.afterCloneFrom(t);{if(n.__key!==t.__key)throw Error(`$cloneWithProperties: ${e.name}.clone(node) (with type '${e.getType()}') did not return a node with the same key, make sure to specify node.__key as the last argument to the constructor`);if(!(n.__parent===t.__parent&&n.__next===t.__next&&n.__prev===t.__prev))throw Error(`$cloneWithProperties: ${e.name}.clone(node) (with type '${e.getType()}') overrided afterCloneFrom but did not call super.afterCloneFrom(prevNode)`)}return n}function zyr(t,e){const n=t._decorators;let r=t._pendingDecorators||n;const o=e._nodeMap;let s;for(s in r)o.has(s)||(r===n&&(r=AHt(t)),delete r[s])}function zHt(t,e,n,i,r,o){let s=t.getFirstChild();for(;s!==null;){const a=s.__key;s.__parent===e&&(Mn(s)&&zHt(s,a,n,i,r,o),n.has(a)||o.delete(a),r.push(a)),s=s.getNextSibling()}}function Hyr(t,e,n,i){const r=t._nodeMap,o=e._nodeMap,s=[];for(const[a]of i){const l=o.get(a);l!==void 0&&(l.isAttached()||(Mn(l)&&zHt(l,a,r,o,s,i),r.has(a)||i.delete(a),s.push(a)))}for(const a of s)o.delete(a);for(const a of n){const l=o.get(a);l!==void 0&&!l.isAttached()&&(r.has(a)||n.delete(a),o.delete(a))}}let sd="",vm="",tw=null,M0="",G1="",kk,Cm,wU,HHt=!1,mG=!1,Kpe,Rte=null,hPe,fPe,uA,t_,mPe,CU;function qpe(t,e){const n=uA.get(t);if(e!==null){const i=fHe(t);i.parentNode===e&&e.removeChild(i)}if(t_.has(t)||Cm._keyToDOMMap.delete(t),Mn(n)){const i=cae(n,uA);dHe(i,0,i.length-1,null)}n!==void 0&&lHe(CU,wU,Kpe,n,"destroyed")}function dHe(t,e,n,i){let r=e;for(;r<=n;++r){const o=t[r];o!==void 0&&qpe(o,i)}}function SL(t,e){t.setProperty("text-align",e)}const Wyr="40px";function WHt(t,e){const n=kk.theme.indent;if(typeof n=="string"){const r=t.classList.contains(n);e>0&&!r?t.classList.add(n):e<1&&r&&t.classList.remove(n)}const i=getComputedStyle(t).getPropertyValue("--lexical-indent-base-value")||Wyr;t.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${i})`)}function UHt(t,e){const n=t.style;e===0?SL(n,""):e===Xze?SL(n,"left"):e===Zze?SL(n,"center"):e===Qze?SL(n,"right"):e===Jze?SL(n,"justify"):e===eHe?SL(n,"start"):e===tHe&&SL(n,"end")}function Gpe(t,e,n){const i=t_.get(t);if(i===void 0)throw Error("createNode: node does not exist in nodeMap");const r=i.createDOM(kk,Cm);if(Jyr(t,r,Cm),ai(i)?r.setAttribute("data-lexical-text","true"):Oa(i)&&r.setAttribute("data-lexical-decorator","true"),Mn(i)){const o=i.__indent,s=i.__size;if(o!==0&&WHt(r,o),s!==0){const l=s-1,c=cae(i,t_);Uyr(c,l,i,r)}const a=i.__format;a!==0&&UHt(r,a),i.isInline()||KHt(null,i,r),Hpe(i)&&(sd+=CS,G1+=CS)}else{const o=i.getTextContent();if(Oa(i)){const s=i.decorate(Cm,kk);s!==null&&GHt(t,s),r.contentEditable="false"}else ai(i)&&(i.isDirectionless()||(vm+=o));sd+=o,G1+=o}if(e!==null)if(n!=null)e.insertBefore(r,n);else{const o=e.__lexicalLineBreak;o!=null?e.insertBefore(r,o):e.appendChild(r)}return Object.freeze(i),lHe(CU,wU,Kpe,i,"created"),r}function Uyr(t,e,n,i){const r=vm;vm="",hHe(t,n,0,e,i,null),qHt(n,i),vm=r}function hHe(t,e,n,i,r,o){const s=sd;sd="";let a=n;for(;a<=i;++a){Gpe(t[a],r,o);const l=t_.get(t[a]);l!==null&&ai(l)&&(tw===null&&(tw=l.getFormat()),M0===""&&(M0=l.getStyle()))}Hpe(e)&&(sd+=CS),r.__lexicalTextContent=sd,sd=s+sd}function kbt(t,e){const n=e.get(t);return SS(n)||Oa(n)&&n.isInline()}function KHt(t,e,n){const i=t!==null&&(t.__size===0||kbt(t.__last,uA)),r=e.__size===0||kbt(e.__last,t_);if(i){if(!r){const o=n.__lexicalLineBreak;if(o!=null)try{n.removeChild(o)}catch(s){if(typeof s=="object"&&s!=null){const a=`${s.toString()} Parent: ${n.tagName}, child: ${o.tagName}.`;throw new Error(a)}else throw s}n.__lexicalLineBreak=null}}else if(r){const o=document.createElement("br");n.__lexicalLineBreak=o,n.appendChild(o)}}function Kyr(t){y$(t)&&tw!=null&&tw!==t.__textFormat&&!mG&&(t.setTextFormat(tw),t.setTextStyle(M0))}function qyr(t){y$(t)&&M0!==""&&M0!==t.__textStyle&&!mG&&t.setTextStyle(M0)}function qHt(t,e){const n=e.__lexicalDirTextContent,i=e.__lexicalDir;if(n!==vm||i!==Rte){const r=vm==="",o=r?Rte:Kvr(vm);if(o!==i){const s=e.classList,a=kk.theme;let l=i!==null?a[i]:void 0,c=o!==null?a[o]:void 0;if(l!==void 0){if(typeof l=="string"){const u=rae(l);l=a[i]=u}s.remove(...l)}if(o===null||r&&o==="ltr")e.removeAttribute("dir");else{if(c!==void 0){if(typeof c=="string"){const u=rae(c);c=a[o]=u}c!==void 0&&s.add(...c)}e.dir=o}if(!mG){const u=t.getWritable();u.__dir=o}}Rte=o,e.__lexicalDirTextContent=vm,e.__lexicalDir=o}}function Gyr(t,e,n){const i=vm;vm="",tw=null,M0="",Yyr(t,e,n),qHt(e,n),Kyr(e),qyr(e),vm=i}function cae(t,e){const n=[];let i=t.__first;for(;i!==null;){const r=e.get(i);if(r===void 0)throw Error("createChildrenArray: node does not exist in nodeMap");n.push(i),i=r.__next}return n}function Yyr(t,e,n){const i=sd,r=t.__size,o=e.__size;if(sd="",r===1&&o===1){const s=t.__first,a=e.__first;if(s===a)RB(s,n);else{const c=fHe(s),u=Gpe(a,null,null);try{n.replaceChild(u,c)}catch(d){if(typeof d=="object"&&d!=null){const h=`${d.toString()} Parent: ${n.tagName}, new child: {tag: ${u.tagName} key: ${a}}, old child: {tag: ${c.tagName}, key: ${s}}.`;throw new Error(h)}else throw d}qpe(s,null)}const l=t_.get(a);ai(l)&&(tw===null&&(tw=l.getFormat()),M0===""&&(M0=l.getStyle()))}else{const s=cae(t,uA),a=cae(e,t_);if(r===0)o!==0&&hHe(a,e,0,o-1,n,null);else if(o===0){if(r!==0){const c=n.__lexicalLineBreak==null;dHe(s,0,r-1,c?null:n),c&&(n.textContent="")}}else Zyr(e,s,a,r,o,n)}Hpe(e)&&(sd+=CS),n.__lexicalTextContent=sd,sd=i+sd}function RB(t,e){const n=uA.get(t);let i=t_.get(t);if(n===void 0||i===void 0)throw Error("reconcileNode: prevNode or nextNode does not exist in nodeMap");const r=HHt||fPe.has(t)||hPe.has(t),o=aae(Cm,t);if(n===i&&!r){if(Mn(n)){const s=o.__lexicalTextContent;s!==void 0&&(sd+=s,G1+=s);const a=o.__lexicalDirTextContent;a!==void 0&&(vm+=a)}else{const s=n.getTextContent();ai(n)&&!n.isDirectionless()&&(vm+=s),G1+=s,sd+=s}return o}if(n!==i&&r&&lHe(CU,wU,Kpe,i,"updated"),i.updateDOM(n,o,kk)){const s=Gpe(t,null,null);if(e===null)throw Error("reconcileNode: parentDOM is null");return e.replaceChild(s,o),qpe(t,null),s}if(Mn(n)&&Mn(i)){const s=i.__indent;s!==n.__indent&&WHt(o,s);const a=i.__format;a!==n.__format&&UHt(o,a),r&&(Gyr(n,i,o),!Nf(i)&&!i.isInline()&&KHt(n,i,o)),Hpe(i)&&(sd+=CS,G1+=CS)}else{const s=i.getTextContent();if(Oa(i)){const a=i.decorate(Cm,kk);a!==null&&GHt(t,a)}else ai(i)&&!i.isDirectionless()&&(vm+=s);sd+=s,G1+=s}if(!mG&&Nf(i)&&i.__cachedText!==G1){const s=i.getWritable();s.__cachedText=G1,i=s}return Object.freeze(i),o}function GHt(t,e){let n=Cm._pendingDecorators;const i=Cm._decorators;if(n===null){if(i[t]===e)return;n=AHt(Cm)}n[t]=e}function Xyr(t){return t.firstChild}function ySe(t){let e=t.nextSibling;return e!==null&&e===Cm._blockCursorElement&&(e=e.nextSibling),e}function Zyr(t,e,n,i,r,o){const s=i-1,a=r-1;let l,c,u=Xyr(o),d=0,h=0;for(;d<=s&&h<=a;){const p=e[d],g=n[h];if(p===g)u=ySe(RB(g,o)),d++,h++;else{l===void 0&&(l=new Set(e)),c===void 0&&(c=new Set(n));const _=c.has(p),w=l.has(g);if(!_)u=ySe(fHe(p)),qpe(p,o),d++;else if(!w)Gpe(g,o,u),h++;else{const C=aae(Cm,g);C===u?u=ySe(RB(g,o)):(u!=null?o.insertBefore(C,u):o.appendChild(C),RB(g,o)),d++,h++}}const y=t_.get(g);y!==null&&ai(y)&&(tw===null&&(tw=y.getFormat()),M0===""&&(M0=y.getStyle()))}const f=d>s,m=h>a;if(f&&!m){const p=n[a+1],g=p===void 0?null:Cm.getElementByKey(p);hHe(n,t,h,a,o,g)}else m&&!f&&dHe(e,d,s,o)}function Qyr(t,e,n,i,r,o){sd="",G1="",vm="",HHt=i===sF,Rte=null,Cm=n,kk=n._config,wU=n._nodes,Kpe=Cm._listeners.mutation,hPe=r,fPe=o,uA=t._nodeMap,t_=e._nodeMap,mG=e._readOnly,mPe=new Map(n._keyToDOMMap);const s=new Map;return CU=s,RB("root",null),Cm=void 0,wU=void 0,hPe=void 0,fPe=void 0,uA=void 0,t_=void 0,kk=void 0,mPe=void 0,CU=void 0,s}function Jyr(t,e,n){const i=n._keyToDOMMap;e["__lexicalKey_"+n._key]=t,i.set(t,e)}function fHe(t){const e=mPe.get(t);if(e===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${t}`);return e}const _1=Object.freeze({}),mHe=30,pPe=[["keydown",l0r],["pointerdown",t0r],["compositionstart",s0r],["compositionend",a0r],["input",o0r],["click",e0r],["cut",_1],["copy",_1],["dragstart",_1],["dragover",_1],["dragend",_1],["paste",_1],["focus",_1],["blur",_1],["drop",_1]];eae&&pPe.push(["beforeinput",(t,e)=>r0r(t,e)]);let pG=0,YHt=null,XHt=0,FO=null;const uae=new WeakMap;let gPe=!1,bPe=!1,PB=!1,a9=!1,ZHt=[0,"",0,"root",0];function QHt(t,e,n,i,r){const o=t.anchor,s=t.focus,a=o.getNode(),l=hc(),c=$w(l._window),u=c!==null?c.anchorNode:null,d=o.key,h=l.getElementByKey(d),f=n.length;return d!==s.key||!ai(a)||(!r&&(!eae||XHt<i+50)||a.isDirty()&&f<2||PHt(n))&&o.offset!==s.offset&&!a.isComposing()||OO(a)||a.isDirty()&&f>1||(r||!eae)&&h!==null&&!a.isComposing()&&u!==oae(h)||c!==null&&e!==null&&(!e.collapsed||e.startContainer!==c.anchorNode||e.startOffset!==c.anchorOffset)||a.getFormat()!==t.format||a.getStyle()!==t.style||nyr(t,a)}function Mbt(t,e){return t!==null&&t.nodeValue!==null&&t.nodeType===vM&&e!==0&&e!==t.nodeValue.length}function Lbt(t,e,n){const{anchorNode:i,anchorOffset:r,focusNode:o,focusOffset:s}=t;gPe&&(gPe=!1,Mbt(i,r)&&Mbt(o,s))||db(e,()=>{if(!n){jv(null);return}if(!hG(e,i,o))return;const a=Fi();if(Jn(a)){const l=a.anchor,c=l.getNode();if(a.isCollapsed()){t.type==="Range"&&t.anchorNode===t.focusNode&&(a.dirty=!0);const u=Upe(e).event,d=u?u.timeStamp:performance.now(),[h,f,m,p,g]=ZHt,y=Vc(),_=e.isComposing()===!1&&y.getTextContent()==="";if(d<g+200&&l.offset===m&&l.key===p)a.format=h,a.style=f;else if(l.type==="text"){if(!ai(c))throw Error("Point.getNode() must return TextNode when type is text");a.format=c.getFormat(),a.style=c.getStyle()}else if(l.type==="element"&&!_){const w=l.getNode();a.style="",w instanceof v$&&w.getChildrenSize()===0?(a.format=w.getTextFormat(),a.style=w.getTextStyle()):a.format=0}}else{const u=l.key,h=a.focus.key,f=a.getNodes(),m=f.length,p=a.isBackward(),g=p?s:r,y=p?r:s,_=p?h:u,w=p?u:h;let C=Nvr,N=!1;for(let E=0;E<m;E++){const D=f[E],k=D.getTextContentSize();if(ai(D)&&k!==0&&!(E===0&&D.__key===_&&g===k||E===m-1&&D.__key===w&&y===0)&&(N=!0,C&=D.getFormat(),C===0))break}a.format=N?C:0}}Bi(e,uG,void 0)})}function e0r(t,e){db(e,()=>{const n=Fi(),i=$w(e._window),r=vG();if(i){if(Jn(n)){const o=n.anchor,s=o.getNode();if(o.type==="element"&&o.offset===0&&n.isCollapsed()&&!Nf(s)&&Vc().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&r!==null&&n.is(r))i.removeAllRanges(),n.dirty=!0;else if(t.detail===3&&!n.isCollapsed()){const l=n.focus.getNode();s!==l&&(Mn(s)?s.select(0):s.getParentOrThrow().select(0))}}else if(t.pointerType==="touch"){const o=i.anchorNode;if(o!==null){const s=o.nodeType;if(s===dG||s===vM){const a=bHe(r,i,e,t);jv(a)}}}}Bi(e,Rze,t)})}function t0r(t,e){const n=t.target,i=t.pointerType;n instanceof Node&&i!=="touch"&&db(e,()=>{Uvr(n)||(bPe=!0)})}function JHt(t){if(!t.getTargetRanges)return null;const e=t.getTargetRanges();return e.length===0?null:e[0]}function n0r(t,e){return t!==e||Mn(t)||Mn(e)||!t.isToken()||!e.isToken()}function i0r(t){return YHt==="MediaLast"&&t<pG+mHe}function r0r(t,e){const n=t.inputType,i=JHt(t);n==="deleteCompositionText"||Dk&&BHt(e)||n!=="insertCompositionText"&&db(e,()=>{const r=Fi();if(n==="deleteContentBackward"){if(r===null){const u=vG();if(!Jn(u))return;jv(u.clone())}if(Jn(r)){const u=r.anchor.key===r.focus.key;if(i0r(t.timeStamp)&&e.isComposing()&&u){if(xh(null),pG=0,setTimeout(()=>{db(e,()=>{xh(null)})},mHe),Jn(r)){const d=r.anchor.getNode();if(d.markDirty(),r.format=d.getFormat(),!ai(d))throw Error("Anchor node must be a TextNode");r.style=d.getStyle()}}else{xh(null),t.preventDefault();const d=r.anchor.getNode().getTextContent(),h=r.anchor.offset===0&&r.focus.offset===d.length;Svr&&u&&!h||Bi(e,_I,!0)}return}}if(!Jn(r))return;const o=t.data;FO!==null&&sHe(!1,e,FO),(!r.dirty||FO!==null)&&r.isCollapsed()&&!Nf(r.anchor.getNode())&&i!==null&&r.applyDOMRange(i),FO=null;const s=r.anchor,a=r.focus,l=s.getNode(),c=a.getNode();if(n==="insertText"||n==="insertTranspose"){if(o===`
`)t.preventDefault(),Bi(e,H3,!1);else if(o===CS)t.preventDefault(),Bi(e,Xse,void 0);else if(o==null&&t.dataTransfer){const u=t.dataTransfer.getData("text/plain");t.preventDefault(),r.insertRawText(u)}else o!=null&&QHt(r,i,o,t.timeStamp,!0)?(t.preventDefault(),Bi(e,W3,o)):FO=o;XHt=t.timeStamp;return}switch(t.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":{Bi(e,W3,t);break}case"insertFromComposition":{xh(null),Bi(e,W3,t);break}case"insertLineBreak":{xh(null),Bi(e,H3,!1);break}case"insertParagraph":{xh(null),PB&&!Vpe?(PB=!1,Bi(e,H3,!1)):Bi(e,Xse,void 0);break}case"insertFromPaste":case"insertFromPasteAsQuotation":{Bi(e,Fpe,t);break}case"deleteByComposition":{n0r(l,c)&&Bi(e,oPe,t);break}case"deleteByDrag":case"deleteByCut":{Bi(e,oPe,t);break}case"deleteContent":{Bi(e,_I,!1);break}case"deleteWordBackward":{Bi(e,bU,!0);break}case"deleteWordForward":{Bi(e,bU,!1);break}case"deleteHardLineBackward":case"deleteSoftLineBackward":{Bi(e,vU,!0);break}case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":{Bi(e,vU,!1);break}case"formatStrikeThrough":{Bi(e,d0,"strikethrough");break}case"formatBold":{Bi(e,d0,"bold");break}case"formatItalic":{Bi(e,d0,"italic");break}case"formatUnderline":{Bi(e,d0,"underline");break}case"historyUndo":{Bi(e,Pze,void 0);break}case"historyRedo":{Bi(e,Oze,void 0);break}}})}function o0r(t,e){t.stopPropagation(),db(e,()=>{const n=Fi(),i=t.data,r=JHt(t);if(i!=null&&Jn(n)&&QHt(n,r,i,t.timeStamp,!1)){a9&&(vPe(e,i),a9=!1);const s=n.anchor.getNode(),a=$w(e._window);if(a===null)return;const l=n.isBackward(),c=l?n.anchor.offset:n.focus.offset,u=l?n.focus.offset:n.anchor.offset;(!eae||n.isCollapsed()||!ai(s)||a.anchorNode===null||s.getTextContent().slice(0,c)+i+s.getTextContent().slice(c+u)!==jHt(a.anchorNode))&&Bi(e,W3,i);const d=i.length;Dk&&d>1&&t.inputType==="insertCompositionText"&&!e.isComposing()&&(n.anchor.offset-=d),!Vze&&!Vpe&&!Bze&&e.isComposing()&&(pG=0,xh(null))}else sHe(!1,e,i!==null?i:void 0),a9&&(vPe(e,i||void 0),a9=!1);Jvr()}),FO=null}function s0r(t,e){db(e,()=>{const n=Fi();if(Jn(n)&&!e.isComposing()){const i=n.anchor,r=n.anchor.getNode();xh(i.key),(t.timeStamp<pG+mHe||i.type==="element"||!n.isCollapsed()||r.getFormat()!==n.format||ai(r)&&r.getStyle()!==n.style)&&Bi(e,W3,Dvr)}})}function vPe(t,e){const n=t._compositionKey;if(xh(null),n!==null&&e!=null){if(e===""){const i=yf(n),r=oae(t.getElementByKey(n));r!==null&&r.nodeValue!==null&&ai(i)&&aHe(i,r.nodeValue,null,null,!0);return}if(e[e.length-1]===`
`){const i=Fi();if(Jn(i)){const r=i.focus;i.anchor.set(r.key,r.offset,r.type),Bi(t,Zse,null);return}}}sHe(!0,t,e)}function a0r(t,e){Dk?a9=!0:db(e,()=>{vPe(e,t.data)})}function l0r(t,e){if(pG=t.timeStamp,YHt=t.key,e.isComposing())return;const{key:n,shiftKey:i,ctrlKey:r,metaKey:o,altKey:s}=t;if(!Bi(e,lvr,t)&&n!=null){if(Syr(n,r,s,o))Bi(e,hHt,t);else if(Nyr(n,r,i,s,o))Bi(e,cvr,t);else if(wyr(n,r,s,o))Bi(e,fHt,t);else if(Cyr(n,r,i,s,o))Bi(e,uvr,t);else if(Eyr(n,r,o))Bi(e,mHt,t);else if(Dyr(n,r,o))Bi(e,pHt,t);else if(lyr(n,i))PB=!0,Bi(e,Zse,t);else if(Myr(n))Bi(e,dvr,t);else if(cyr(n,r))t.preventDefault(),PB=!0,Bi(e,H3,!0);else if(ayr(n,i))PB=!1,Bi(e,Zse,t);else if(myr(n,s,o,r))yU(n)?Bi(e,jze,t):(t.preventDefault(),Bi(e,_I,!0));else if(Lyr(n))Bi(e,gHt,t);else if(pyr(n,r,i,s,o))_U(n)?Bi(e,Fze,t):(t.preventDefault(),Bi(e,_I,!1));else if(uyr(n,s,r))t.preventDefault(),Bi(e,bU,!0);else if(dyr(n,s,r))t.preventDefault(),Bi(e,bU,!1);else if(hyr(n,o))t.preventDefault(),Bi(e,vU,!0);else if(fyr(n,o))t.preventDefault(),Bi(e,vU,!1);else if(ryr(n,s,o,r))t.preventDefault(),Bi(e,d0,"bold");else if(syr(n,s,o,r))t.preventDefault(),Bi(e,d0,"underline");else if(oyr(n,s,o,r))t.preventDefault(),Bi(e,d0,"italic");else if(iyr(n,s,r,o))Bi(e,hvr,t);else if(gyr(n,i,o,r))t.preventDefault(),Bi(e,Pze,void 0);else if(byr(n,i,o,r))t.preventDefault(),Bi(e,Oze,void 0);else{const a=e._editorState._selection;bf(a)?vyr(n,i,o,r)?(t.preventDefault(),Bi(e,$pe,t)):yyr(n,i,o,r)?(t.preventDefault(),Bi(e,$ze,t)):Nbt(n,o,r)&&(t.preventDefault(),Bi(e,sPe,t)):!Dk&&Nbt(n,o,r)&&(t.preventDefault(),Bi(e,sPe,t))}kyr(r,i,s,o)&&Bi(e,xvr,t)}}function eWt(t){let e=t.__lexicalEventHandles;return e===void 0&&(e=[],t.__lexicalEventHandles=e),e}const U3=new Map;function tWt(t){const e=t.target,n=e==null?null:e.nodeType===9?e.defaultView:e.ownerDocument.defaultView,i=$w(n);if(i===null)return;const r=THt(i.anchorNode);if(r===null)return;bPe&&(bPe=!1,db(r,()=>{const u=vG(),d=i.anchorNode;if(d===null)return;const h=d.nodeType;if(h!==dG&&h!==vM)return;const f=bHe(u,i,r,t);jv(f)}));const o=oHe(r),s=o[o.length-1],a=s._key,l=U3.get(a),c=l||s;c!==r&&Lbt(i,c,!1),Lbt(i,r,!0),r!==s?U3.set(a,r):l&&U3.delete(a)}function Tbt(t){t._lexicalHandled=!0}function Ibt(t){return t._lexicalHandled===!0}function c0r(t,e){const n=t.ownerDocument,i=uae.get(n);(i===void 0||i<1)&&n.addEventListener("selectionchange",tWt),uae.set(n,(i||0)+1),t.__lexicalEditor=e;const r=eWt(t);for(let o=0;o<pPe.length;o++){const[s,a]=pPe[o],l=typeof a=="function"?c=>{Ibt(c)||(Tbt(c),(e.isEditable()||s==="click")&&a(c,e))}:c=>{if(Ibt(c))return;Tbt(c);const u=e.isEditable();switch(s){case"cut":return u&&Bi(e,$ze,c);case"copy":return Bi(e,$pe,c);case"paste":return u&&Bi(e,Fpe,c);case"dragstart":return u&&Bi(e,vHt,c);case"dragover":return u&&Bi(e,yHt,c);case"dragend":return u&&Bi(e,gvr,c);case"focus":return u&&Bi(e,yvr,c);case"blur":return u&&Bi(e,_vr,c);case"drop":return u&&Bi(e,bHt,c)}};t.addEventListener(s,l),r.push(()=>{t.removeEventListener(s,l)})}}function u0r(t){const e=t.ownerDocument,n=uae.get(e);if(n===void 0)throw Error("Root element not registered");const i=n-1;if(!(i>=0))throw Error("Root element count less than 0");uae.set(e,i),i===0&&e.removeEventListener("selectionchange",tWt);const r=zpe(t);if(rHe(r))d0r(r),t.__lexicalEditor=null;else if(r)throw Error("Attempted to remove event handlers from a node that does not belong to this build of Lexical");const o=eWt(t);for(let s=0;s<o.length;s++)o[s]();t.__lexicalEventHandles=[]}function d0r(t){if(t._parentEditor!==null){const e=oHe(t),i=e[e.length-1]._key;U3.get(i)===t&&U3.delete(i)}else U3.delete(t._key)}function h0r(){gPe=!0}function f0r(t,e,n,i,r){ZHt=[t,e,n,i,r]}function yPe(t,e,n){om();const i=t.__key,r=t.getParent();if(r===null)return;const o=Ayr(t);let s=!1;if(Jn(o)&&e){const a=o.anchor,l=o.focus;a.key===i&&(fae(a,t,r,t.getPreviousSibling(),t.getNextSibling()),s=!0),l.key===i&&(fae(l,t,r,t.getPreviousSibling(),t.getNextSibling()),s=!0)}else bf(o)&&e&&t.isSelected()&&t.selectPrevious();if(Jn(o)&&e&&!s){const a=t.getIndexWithinParent();xI(t),hae(o,r,a,-1)}else xI(t);!n&&!fR(r)&&!r.canBeEmpty()&&r.isEmpty()&&yPe(r,e),e&&Nf(r)&&r.isEmpty()&&r.selectEnd()}class Ype{static getType(){throw Error(`LexicalNode: Node ${this.name} does not implement .getType().`)}static clone(e){throw Error(`LexicalNode: Node ${this.name} does not implement .clone().`)}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,Gvr(this,e),this.__type!=="root"&&(om(),m0r(this.__type,this.constructor))}getType(){return this.__type}isInline(){throw Error(`LexicalNode: Node ${this.constructor.name} does not implement .isInline().`)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const n=yf(e);if(n===null)break;e=n.__parent}return!1}isSelected(e){const n=e||Fi();if(n==null)return!1;const i=n.getNodes().some(o=>o.__key===this.__key);if(ai(this))return i;if(Jn(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const o=this.getParent();if(Oa(this)&&this.isInline()&&o){const s=n.isBackward()?n.focus:n.anchor,a=s.getNode();if(s.offset===a.getChildrenSize()&&a.is(o)&&a.getLastChildOrThrow().is(this))return!1}}return i}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let n=e.getFirstChild(),i=0;for(;n!==null;){if(this.is(n))return i;i++,n=n.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:yf(e)}getParentOrThrow(){const e=this.getParent();if(e===null)throw Error(`Expected node ${this.__key} to have a parent.`);return e}getTopLevelElement(){let e=this;for(;e!==null;){const n=e.getParent();if(fR(n)){if(!(Mn(e)||e===this&&Oa(e)))throw Error("Children of root nodes must be elements or decorators");return e}e=n}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();if(e===null)throw Error(`Expected node ${this.__key} to have a top parent element.`);return e}getParents(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n),n=n.getParent();return e}getParentKeys(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n.__key),n=n.getParent();return e}getPreviousSibling(){const n=this.getLatest().__prev;return n===null?null:yf(n)}getPreviousSiblings(){const e=[],n=this.getParent();if(n===null)return e;let i=n.getFirstChild();for(;i!==null&&!i.is(this);)e.push(i),i=i.getNextSibling();return e}getNextSibling(){const n=this.getLatest().__next;return n===null?null:yf(n)}getNextSiblings(){const e=[];let n=this.getNextSibling();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getCommonAncestor(e){const n=this.getParents(),i=e.getParents();Mn(this)&&n.unshift(this),Mn(e)&&i.unshift(e);const r=n.length,o=i.length;if(r===0||o===0||n[r-1]!==i[o-1])return null;const s=new Set(i);for(let a=0;a<r;a++){const l=n[a];if(s.has(l))return l}return null}is(e){return e==null?!1:this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;const n=this.getCommonAncestor(e);let i=0,r=0,o=this;for(;;){const s=o.getParentOrThrow();if(s===n){i=o.getIndexWithinParent();break}o=s}for(o=e;;){const s=o.getParentOrThrow();if(s===n){r=o.getIndexWithinParent();break}o=s}return i<r}isParentOf(e){const n=this.__key;if(n===e.__key)return!1;let i=e;for(;i!==null;){if(i.__key===n)return!0;i=i.getParent()}return!1}getNodesBetween(e){const n=this.isBefore(e),i=[],r=new Set;let o=this;for(;o!==null;){const s=o.__key;if(r.has(s)||(r.add(s),i.push(o)),o===e)break;const a=Mn(o)?n?o.getFirstChild():o.getLastChild():null;if(a!==null){o=a;continue}const l=n?o.getNextSibling():o.getPreviousSibling();if(l!==null){o=l;continue}const c=o.getParentOrThrow();if(r.has(c.__key)||i.push(c),c===e)break;let u=null,d=c;do{if(d===null)throw Error("getNodesBetween: ancestor is null");if(u=n?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d!==null)u===null&&!r.has(d.__key)&&i.push(d);else break}while(u===null);o=u}return n||i.reverse(),i}isDirty(){const n=hc()._dirtyLeaves;return n!==null&&n.has(this.__key)}getLatest(){const e=yf(this.__key);if(e===null)throw Error("Lexical node does not exist in active editor state. Avoid using the same node references between nested closures from editorState.read/editor.update.");return e}getWritable(){om();const e=tN(),n=hc(),i=e._nodeMap,r=this.__key,o=this.getLatest(),s=n._cloneNotNeeded,a=Fi();if(a!==null&&a.setCachedNodes(null),s.has(r))return sae(o),o;const l=uHe(o);return s.add(r),sae(l),i.set(r,l),l}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,n){throw Error("createDOM: base method not extended")}updateDOM(e,n,i){throw Error("updateDOM: base method not extended")}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){throw Error("exportJSON: base method not extended")}static importJSON(e){throw Error(`LexicalNode: Node ${this.name} does not implement .importJSON().`)}static transform(){return null}remove(e){yPe(this,!0,e)}replace(e,n){om();let i=Fi();i!==null&&(i=i.clone()),gSe(this,e);const r=this.getLatest(),o=this.__key,s=e.__key,a=e.getWritable(),l=this.getParentOrThrow().getWritable(),c=l.__size;xI(a);const u=r.getPreviousSibling(),d=r.getNextSibling(),h=r.__prev,f=r.__next,m=r.__parent;if(yPe(r,!1,!0),u===null)l.__first=s;else{const p=u.getWritable();p.__next=s}if(a.__prev=h,d===null)l.__last=s;else{const p=d.getWritable();p.__prev=s}if(a.__next=f,a.__parent=m,l.__size=c,n){if(!(Mn(this)&&Mn(a)))throw Error("includeChildren should only be true for ElementNodes");this.getChildren().forEach(p=>{a.append(p)})}if(Jn(i)){jv(i);const p=i.anchor,g=i.focus;p.key===o&&Obt(p,a),g.key===o&&Obt(g,a)}return tD()===o&&xh(s),a}insertAfter(e,n=!0){om(),gSe(this,e);const i=this.getWritable(),r=e.getWritable(),o=r.getParent(),s=Fi();let a=!1,l=!1;if(o!==null){const f=e.getIndexWithinParent();if(xI(r),Jn(s)){const m=o.__key,p=s.anchor,g=s.focus;a=p.type==="element"&&p.key===m&&p.offset===f+1,l=g.type==="element"&&g.key===m&&g.offset===f+1}}const c=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),d=r.__key,h=i.__next;if(c===null)u.__last=d;else{const f=c.getWritable();f.__prev=d}if(u.__size++,i.__next=d,r.__next=h,r.__prev=i.__key,r.__parent=i.__parent,n&&Jn(s)){const f=this.getIndexWithinParent();hae(s,u,f+1);const m=u.__key;a&&s.anchor.set(m,f+2,"element"),l&&s.focus.set(m,f+2,"element")}return e}insertBefore(e,n=!0){om(),gSe(this,e);const i=this.getWritable(),r=e.getWritable(),o=r.__key;xI(r);const s=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),l=i.__prev,c=this.getIndexWithinParent();if(s===null)a.__first=o;else{const d=s.getWritable();d.__next=o}a.__size++,i.__prev=o,r.__prev=l,r.__next=i.__key,r.__parent=i.__parent;const u=Fi();if(n&&Jn(u)){const d=this.getParentOrThrow();hae(u,d,c)}return e}isParentRequired(){return!1}createParentElementNode(){return gd()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,n){om();const i=this.getPreviousSibling(),r=this.getParentOrThrow();if(i===null)return r.select(0,0);if(Mn(i))return i.select();if(!ai(i)){const o=i.getIndexWithinParent()+1;return r.select(o,o)}return i.select(e,n)}selectNext(e,n){om();const i=this.getNextSibling(),r=this.getParentOrThrow();if(i===null)return r.select();if(Mn(i))return i.select(0,0);if(!ai(i)){const o=i.getIndexWithinParent();return r.select(o,o)}return i.select(e,n)}markDirty(){this.getWritable()}}function m0r(t,e){const n=hc()._nodes.get(t);if(n===void 0)throw Error(`Create node: Attempted to create node ${e.name} that was not configured to be used on the editor.`);const i=n.klass;if(i!==e)throw Error(`Create node: Type ${t} in node ${e.name} does not match registered node ${i.name} with the same type`)}function p0r(t,e,n){const i=e.getParentOrThrow().getLastChild();let r=e;const o=[e];for(;r!==i;){if(!r.getNextSibling())throw Error("insertRangeAfter: lastToInsert must be a later sibling of firstToInsert");r=r.getNextSibling(),o.push(r)}let s=t;for(const a of o)s=s.insertAfter(a)}class gG extends Ype{static getType(){return"linebreak"}static clone(e){return new gG(e.__key)}constructor(e){super(e)}getTextContent(){return`
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>b0r(e)||v0r(e)?null:{conversion:g0r,priority:0}}}static importJSON(e){return n_()}exportJSON(){return{type:"linebreak",version:1}}}function g0r(t){return{node:n_()}}function n_(){return Sb(new gG)}function SS(t){return t instanceof gG}function b0r(t){const e=t.parentElement;if(e!==null&&lae(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&dae(n)){const i=e.lastChild;if(i===t||i.previousSibling===t&&dae(i))return!0}}return!1}function v0r(t){const e=t.parentElement;if(e!==null&&lae(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&dae(n))return!1;const i=e.lastChild;if(i===t||i.previousSibling===t&&dae(i))return!0}return!1}function dae(t){return t.nodeType===vM&&/^( |\t|\r?\n)+$/.test(t.textContent||"")}function _Se(t,e){return e&Kze?"code":e&Yze?"mark":e&qze?"sub":e&Gze?"sup":null}function xSe(t,e){return e&Wze?"strong":e&Uze?"em":"span"}function nWt(t,e,n,i,r){const o=i.classList;let s=AB(r,"base");s!==void 0&&o.add(...s),s=AB(r,"underlineStrikethrough");let a=!1;const l=e&nae&&e&tae,c=n&nae&&n&tae;s!==void 0&&(c?(a=!0,l||o.add(...s)):l&&o.remove(...s));for(const u in HC){const h=HC[u];if(s=AB(r,u),s!==void 0)if(n&h){if(a&&(u==="underline"||u==="strikethrough")){e&h&&o.remove(...s);continue}(!(e&h)||l&&u==="underline"||u==="strikethrough")&&o.add(...s)}else e&h&&o.remove(...s)}}function y0r(t,e){const n=t.length,i=e.length;let r=0,o=0;for(;r<n&&r<i&&t[r]===e[r];)r++;for(;o+r<n&&o+r<i&&t[n-o-1]===e[i-o-1];)o++;return[r,n-r-o,e.slice(r,i-o)]}function iWt(t,e,n){const i=e.firstChild,r=n.isComposing(),s=t+(r?Bpe:"");if(i==null)e.textContent=s;else{const a=i.nodeValue;if(a!==s)if(r||Dk){const[l,c,u]=y0r(a,s);c!==0&&i.deleteData(l,c),i.insertData(l,u)}else i.nodeValue=s}}function Abt(t,e,n,i,r,o){iWt(r,t,e);const a=o.theme.text;a!==void 0&&nWt(n,0,i,t,a)}function CJ(t,e){const n=document.createElement(e);return n.appendChild(t),n}class yM extends Ype{static getType(){return"text"}static clone(e){return new yM(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,n){super(n),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 Avr[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===zze}isComposing(){return this.__key===tD()}isSegmented(){return this.getLatest().__mode===Hze}isDirectionless(){return(this.getLatest().__detail&aPe)!==0}isUnmergeable(){return(this.getLatest().__detail&iae)!==0}hasFormat(e){const n=HC[e];return(this.getFormat()&n)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,n){const r=this.getLatest().__format;return cPe(r,e,n)}canHaveFormat(){return!0}createDOM(e,n){const i=this.__format,r=_Se(this,i),o=xSe(this,i),s=r===null?o:r,a=document.createElement(s);let l=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),r!==null&&(l=document.createElement(o),a.appendChild(l));const c=this.__text;Abt(l,this,o,i,c,e);const u=this.__style;return u!==""&&(a.style.cssText=u),a}updateDOM(e,n,i){const r=this.__text,o=e.__format,s=this.__format,a=_Se(this,o),l=_Se(this,s),c=xSe(this,o),u=xSe(this,s);if((a===null?c:a)!==(l===null?u:l))return!0;if(a===l&&c!==u){const _=n.firstChild;if(_==null)throw Error("updateDOM: prevInnerDOM is null or undefined");const w=document.createElement(u);return Abt(w,this,u,s,r,i),n.replaceChild(w,_),!1}let f=n;if(l!==null&&a!==null&&(f=n.firstChild,f==null))throw Error("updateDOM: innerDOM is null or undefined");iWt(r,f,this);const p=i.theme.text;p!==void 0&&o!==s&&nWt(u,o,s,f,p);const g=e.__style,y=this.__style;return g!==y&&(n.style.cssText=y),!1}static importDOM(){return{"#text":()=>({conversion:S0r,priority:0}),b:()=>({conversion:x0r,priority:0}),code:()=>({conversion:VN,priority:0}),em:()=>({conversion:VN,priority:0}),i:()=>({conversion:VN,priority:0}),s:()=>({conversion:VN,priority:0}),span:()=>({conversion:_0r,priority:0}),strong:()=>({conversion:VN,priority:0}),sub:()=>({conversion:VN,priority:0}),sup:()=>({conversion:VN,priority:0}),u:()=>({conversion:VN,priority:0})}}static importJSON(e){const n=Dc(e.text);return n.setFormat(e.format),n.setDetail(e.detail),n.setMode(e.mode),n.setStyle(e.style),n}exportDOM(e){let{element:n}=super.exportDOM(e);if(!(n!==null&&eN(n)))throw Error("Expected TextNode createDOM to always return a HTMLElement");return n.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(n=CJ(n,"b")),this.hasFormat("italic")&&(n=CJ(n,"i")),this.hasFormat("strikethrough")&&(n=CJ(n,"s")),this.hasFormat("underline")&&(n=CJ(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(e,n){}setFormat(e){const n=this.getWritable();return n.__format=typeof e=="string"?HC[e]:e,n}setDetail(e){const n=this.getWritable();return n.__detail=typeof e=="string"?Lvr[e]:e,n}setStyle(e){const n=this.getWritable();return n.__style=e,n}toggleFormat(e){const n=this.getFormat(),i=cPe(n,e,null);return this.setFormat(i)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=aPe,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=iae,e}setMode(e){const n=Ivr[e];if(this.__mode===n)return this;const i=this.getWritable();return i.__mode=n,i}setTextContent(e){if(this.__text===e)return this;const n=this.getWritable();return n.__text=e,n}select(e,n){om();let i=e,r=n;const o=Fi(),s=this.getTextContent(),a=this.__key;if(typeof s=="string"){const l=s.length;i===void 0&&(i=l),r===void 0&&(r=l)}else i=0,r=0;if(Jn(o)){const l=tD();(l===o.anchor.key||l===o.focus.key)&&xh(a),o.setTextNodeRange(this,i,this,r)}else return sWt(a,i,a,r,"text","text");return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,n,i,r){const o=this.getWritable(),s=o.__text,a=i.length;let l=e;l<0&&(l=a+l,l<0&&(l=0));const c=Fi();if(r&&Jn(c)){const d=e+a;c.setTextNodeRange(o,d,o,d)}const u=s.slice(0,l)+i+s.slice(l+n);return o.__text=u,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){om();const n=this.getLatest(),i=n.getTextContent(),r=n.__key,o=tD(),s=new Set(e),a=[],l=i.length;let c="";for(let N=0;N<l;N++)c!==""&&s.has(N)&&(a.push(c),c=""),c+=i[N];c!==""&&a.push(c);const u=a.length;if(u===0)return[];if(a[0]===i)return[n];const d=a[0],h=n.getParent();let f;const m=n.getFormat(),p=n.getStyle(),g=n.__detail;let y=!1;n.isSegmented()?(f=Dc(d),f.__format=m,f.__style=p,f.__detail=g,y=!0):(f=n.getWritable(),f.__text=d);const _=Fi(),w=[f];let C=d.length;for(let N=1;N<u;N++){const E=a[N],D=E.length,k=Dc(E).getWritable();k.__format=m,k.__style=p,k.__detail=g;const M=k.__key,T=C+D;if(Jn(_)){const A=_.anchor,R=_.focus;A.key===r&&A.type==="text"&&A.offset>C&&A.offset<=T&&(A.key=M,A.offset-=C,_.dirty=!0),R.key===r&&R.type==="text"&&R.offset>C&&R.offset<=T&&(R.key=M,R.offset-=C,_.dirty=!0)}o===r&&xh(M),C=T,w.push(k)}if(h!==null){Zvr(this);const N=h.getWritable(),E=this.getIndexWithinParent();y?(N.splice(E,0,w),this.remove()):N.splice(E,1,w),Jn(_)&&hae(_,h,E,u-1)}return w}mergeWithSibling(e){const n=e===this.getPreviousSibling();if(!n&&e!==this.getNextSibling())throw Error("mergeWithSibling: sibling must be a previous or next sibling");const i=this.__key,r=e.__key,o=this.__text,s=o.length;tD()===r&&xh(i);const l=Fi();if(Jn(l)){const h=l.anchor,f=l.focus;h!==null&&h.key===r&&(zbt(h,n,i,e,s),l.dirty=!0),f!==null&&f.key===r&&(zbt(f,n,i,e,s),l.dirty=!0)}const c=e.__text,u=n?c+o:o+c;this.setTextContent(u);const d=this.getWritable();return e.remove(),d}isTextEntity(){return!1}}function _0r(t){const n=t.style;return{forChild:pHe(n),node:null}}function x0r(t){const e=t,n=e.style.fontWeight==="normal";return{forChild:pHe(e.style,n?void 0:"bold"),node:null}}const Rbt=new WeakMap;function w0r(t){return t.nodeName==="PRE"||t.nodeType===dG&&t.style!==void 0&&t.style.whiteSpace!==void 0&&t.style.whiteSpace.startsWith("pre")}function C0r(t){let e,n=t.parentNode;const i=[t];for(;n!==null&&(e=Rbt.get(n))===void 0&&!w0r(n);)i.push(n),n=n.parentNode;const r=e===void 0?n:e;for(let o=0;o<i.length;o++)Rbt.set(i[o],r);return r}function S0r(t){const e=t;if(t.parentElement===null)throw Error("Expected parentElement of Text not to be null");let i=e.textContent||"";if(C0r(e)!==null){const r=i.split(/(\r?\n|\t)/),o=[],s=r.length;for(let a=0;a<s;a++){const l=r[a];l===`
`||l===`\r
`?o.push(n_()):l==="	"?o.push(b$()):l!==""&&o.push(Dc(l))}return{node:o}}if(i=i.replace(/\r/g,"").replace(/[ \t\n]+/g," "),i==="")return{node:null};if(i[0]===" "){let r=e,o=!0;for(;r!==null&&(r=Pbt(r,!1))!==null;){const s=r.textContent||"";if(s.length>0){/[ \t\n]$/.test(s)&&(i=i.slice(1)),o=!1;break}}o&&(i=i.slice(1))}if(i[i.length-1]===" "){let r=e,o=!0;for(;r!==null&&(r=Pbt(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){o=!1;break}o&&(i=i.slice(0,i.length-1))}return i===""?{node:null}:{node:Dc(i)}}function Pbt(t,e){let n=t;for(;;){let i;for(;(i=e?n.nextSibling:n.previousSibling)===null;){const o=n.parentElement;if(o===null)return null;n=o}if(n=i,n.nodeType===dG){const o=n.style.display;if(o===""&&!dPe(n)||o!==""&&!o.startsWith("inline"))return null}let r=n;for(;(r=e?n.firstChild:n.lastChild)!==null;)n=r;if(n.nodeType===vM)return n;if(n.nodeName==="BR")return null}}const N0r={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function VN(t){const e=N0r[t.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:pHe(t.style,e),node:null}}function Dc(t=""){return Sb(new yM(t))}function ai(t){return t instanceof yM}function pHe(t,e){const n=t.fontWeight,i=t.textDecoration.split(" "),r=n==="700"||n==="bold",o=i.includes("line-through"),s=t.fontStyle==="italic",a=i.includes("underline"),l=t.verticalAlign;return c=>(ai(c)&&(r&&!c.hasFormat("bold")&&c.toggleFormat("bold"),o&&!c.hasFormat("strikethrough")&&c.toggleFormat("strikethrough"),s&&!c.hasFormat("italic")&&c.toggleFormat("italic"),a&&!c.hasFormat("underline")&&c.toggleFormat("underline"),l==="sub"&&!c.hasFormat("subscript")&&c.toggleFormat("subscript"),l==="super"&&!c.hasFormat("superscript")&&c.toggleFormat("superscript"),e&&!c.hasFormat(e)&&c.toggleFormat(e)),c)}class bG extends yM{static getType(){return"tab"}static clone(e){return new bG(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text}constructor(e){super("	",e),this.__detail=iae}static importDOM(){return null}static importJSON(e){const n=b$();return n.setFormat(e.format),n.setStyle(e.style),n}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(e){throw Error("TabNode does not support setTextContent")}setDetail(e){throw Error("TabNode does not support setDetail")}setMode(e){throw Error("TabNode does not support setMode")}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function b$(){return Sb(new bG)}function gHe(t){return t instanceof bG}let E0r=class{constructor(e,n,i){this._selection=null,this.key=e,this.offset=n,this.type=i}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let n=this.getNode(),i=e.getNode();const r=this.offset,o=e.offset;if(Mn(n)){const s=n.getDescendantByIndex(r);n=s??n}if(Mn(i)){const s=i.getDescendantByIndex(o);i=s??i}return n===i?r<o:n.isBefore(i)}getNode(){const e=this.key,n=yf(e);if(n===null)throw Error("Point.getNode: node not found");return n}set(e,n,i){const r=this._selection,o=this.key;this.key=e,this.offset=n,this.type=i,yG()||(tD()===o&&xh(e),r!==null&&(r.setCachedNodes(null),r.dirty=!0))}};function xw(t,e,n){return new E0r(t,e,n)}function wSe(t,e){let n=e.__key,i=t.offset,r="element";if(ai(e)){r="text";const o=e.getTextContentSize();i>o&&(i=o)}else if(!Mn(e)){const o=e.getNextSibling();if(ai(o))n=o.__key,i=0,r="text";else{const s=e.getParent();s&&(n=s.__key,i=e.getIndexWithinParent()+1)}}t.set(n,i,r)}function Obt(t,e){if(Mn(e)){const n=e.getLastDescendant();Mn(n)||ai(n)?wSe(t,n):wSe(t,e)}else wSe(t,e)}function D0r(t,e,n,i){const r=t.getNode(),o=r.getChildAtIndex(t.offset),s=Dc(),a=Nf(r)?gd().append(s):s;s.setFormat(n),s.setStyle(i),o===null?r.append(a):o.insertBefore(a),t.is(e)&&e.set(s.__key,0,"text"),t.set(s.__key,0,"text")}function nD(t,e,n,i){t.key=e,t.offset=n,t.type=i}class Xpe{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!bf(e))return!1;const n=this._nodes,i=e._nodes;return n.size===i.size&&Array.from(n).every(r=>i.has(r))}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 Xpe(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const n=this.getNodes(),i=n.length,r=n[i-1];let o;if(ai(r))o=r.select();else{const s=r.getIndexWithinParent()+1;o=r.getParentOrThrow().select(s,s)}o.insertNodes(e);for(let s=0;s<i;s++)n[s].remove()}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const n=this._nodes,i=[];for(const r of n){const o=yf(r);o!==null&&i.push(o)}return yG()||(this._cachedNodes=i),i}getTextContent(){const e=this.getNodes();let n="";for(let i=0;i<e.length;i++)n+=e[i].getTextContent();return n}}function Jn(t){return t instanceof _M}class _M{constructor(e,n,i,r){this.anchor=e,this.focus=n,e._selection=this,n._selection=this,this._cachedNodes=null,this.format=i,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return Jn(e)?this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style:!1}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const n=this.anchor,i=this.focus,r=n.isBefore(i),o=r?n:i,s=r?i:n;let a=o.getNode(),l=s.getNode();const c=o.offset,u=s.offset;if(Mn(a)){const h=a.getDescendantByIndex(c);a=h??a}if(Mn(l)){let h=l.getDescendantByIndex(u);h!==null&&h!==a&&l.getChildAtIndex(u)===h&&(h=h.getPreviousSibling()),l=h??l}let d;return a.is(l)?Mn(a)&&a.getChildrenSize()>0?d=[]:d=[a]:d=a.getNodesBetween(l),yG()||(this._cachedNodes=d),d}setTextNodeRange(e,n,i,r){nD(this.anchor,e.__key,n,"text"),nD(this.focus,i.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const n=e[0],i=e[e.length-1],r=this.anchor,o=this.focus,s=r.isBefore(o),[a,l]=_Pe(this);let c="",u=!0;for(let d=0;d<e.length;d++){const h=e[d];if(Mn(h)&&!h.isInline())u||(c+=`
`),h.isEmpty()?u=!1:u=!0;else if(u=!1,ai(h)){let f=h.getTextContent();h===n?h===i?(r.type!=="element"||o.type!=="element"||o.offset===r.offset)&&(f=a<l?f.slice(a,l):f.slice(l,a)):f=s?f.slice(a):f.slice(l):h===i&&(f=s?f.slice(0,l):f.slice(0,a)),c+=f}else(Oa(h)||SS(h))&&(h!==i||!this.isCollapsed())&&(c+=h.getTextContent())}return c}applyDOMRange(e){const n=hc(),r=n.getEditorState()._selection,o=oWt(e.startContainer,e.startOffset,e.endContainer,e.endOffset,n,r);if(o===null)return;const[s,a]=o;nD(this.anchor,s.key,s.offset,s.type),nD(this.focus,a.key,a.offset,a.type),this._cachedNodes=null}clone(){const e=this.anchor,n=this.focus;return new _M(xw(e.key,e.offset,e.type),xw(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(e){this.format=cPe(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const n=HC[e];return(this.format&n)!==0}insertRawText(e){const n=e.split(/(\r?\n|\t)/),i=[],r=n.length;for(let o=0;o<r;o++){const s=n[o];s===`
`||s===`\r
`?i.push(n_()):s==="	"?i.push(b$()):i.push(Dc(s))}this.insertNodes(i)}insertText(e){const n=this.anchor,i=this.focus,r=this.format,o=this.style;let s=n,a=i;!this.isCollapsed()&&i.isBefore(n)&&(s=i,a=n),s.type==="element"&&D0r(s,a,r,o);const l=s.offset;let c=a.offset;const u=this.getNodes(),d=u.length;let h=u[0];if(!ai(h))throw Error("insertText: first node is not a text node");const m=h.getTextContent().length,p=h.getParentOrThrow(),g=d-1;let y=u[g];if(d===1&&a.type==="element"&&(c=m,a.set(s.key,c,"text")),this.isCollapsed()&&l===m&&(h.isSegmented()||h.isToken()||!h.canInsertTextAfter()||!p.canInsertTextAfter()&&h.getNextSibling()===null)){let _=h.getNextSibling();if((!ai(_)||!_.canInsertTextBefore()||OO(_))&&(_=Dc(),_.setFormat(r),_.setStyle(o),p.canInsertTextAfter()?h.insertAfter(_):p.insertAfter(_)),_.select(0,0),h=_,e!==""){this.insertText(e);return}}else if(this.isCollapsed()&&l===0&&(h.isSegmented()||h.isToken()||!h.canInsertTextBefore()||!p.canInsertTextBefore()&&h.getPreviousSibling()===null)){let _=h.getPreviousSibling();if((!ai(_)||OO(_))&&(_=Dc(),_.setFormat(r),p.canInsertTextBefore()?h.insertBefore(_):p.insertBefore(_)),_.select(),h=_,e!==""){this.insertText(e);return}}else if(h.isSegmented()&&l!==m){const _=Dc(h.getTextContent());_.setFormat(r),h.replace(_),h=_}else if(!this.isCollapsed()&&e!==""){const _=y.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||Mn(_)&&(!_.canInsertTextBefore()||!_.canInsertTextAfter())){this.insertText(""),rWt(this.anchor,this.focus,null),this.insertText(e);return}}if(d===1){if(h.isToken()){const N=Dc(e);N.select(),h.replace(N);return}const _=h.getFormat(),w=h.getStyle();if(l===c&&(_!==r||w!==o))if(h.getTextContent()==="")h.setFormat(r),h.setStyle(o);else{const N=Dc(e);if(N.setFormat(r),N.setStyle(o),N.select(),l===0)h.insertBefore(N,!1);else{const[E]=h.splitText(l);E.insertAfter(N,!1)}N.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length);return}else if(gHe(h)){const N=Dc(e);N.setFormat(r),N.setStyle(o),N.select(),h.replace(N);return}const C=c-l;h=h.spliceText(l,C,e,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(h.isComposing()?this.anchor.offset-=e.length:(this.format=_,this.style=w))}else{const _=new Set([...h.getParentKeys(),...y.getParentKeys()]),w=Mn(h)?h:h.getParentOrThrow();let C=Mn(y)?y:y.getParentOrThrow(),N=y;if(!w.is(C)&&C.isInline())do N=C,C=C.getParentOrThrow();while(C.isInline());if(a.type==="text"&&(c!==0||y.getTextContent()==="")||a.type==="element"&&y.getIndexWithinParent()<c)if(ai(y)&&!y.isToken()&&c!==y.getTextContentSize()){if(y.isSegmented()){const T=Dc(y.getTextContent());y.replace(T),y=T}!Nf(a.getNode())&&a.type==="text"&&(y=y.spliceText(0,c,"")),_.add(y.__key)}else{const T=y.getParentOrThrow();!T.canBeEmpty()&&T.getChildrenSize()===1?T.remove():y.remove()}else _.add(y.__key);const E=C.getChildren(),D=new Set(u),k=w.is(C),M=w.isInline()&&h.getNextSibling()===null?w:h;for(let T=E.length-1;T>=0;T--){const A=E[T];if(A.is(h)||Mn(A)&&A.isParentOf(h))break;A.isAttached()&&(!D.has(A)||A.is(N)?k||M.insertAfter(A,!1):A.remove())}if(!k){let T=C,A=null;for(;T!==null;){const R=T.getChildren(),P=R.length;(P===0||R[P-1].is(A))&&(_.delete(T.__key),A=T),T=T.getParent()}}if(!h.isToken())h=h.spliceText(l,m-l,e,!0),h.getTextContent()===""?h.remove():h.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length);else if(l===m)h.select();else{const T=Dc(e);T.select(),h.replace(T)}for(let T=1;T<d;T++){const A=u[T],R=A.__key;_.has(R)||A.remove()}}}removeText(){this.insertText("")}formatText(e){if(this.isCollapsed()){this.toggleFormat(e),xh(null);return}const n=this.getNodes(),i=[];for(const _ of n)ai(_)&&i.push(_);const r=i.length;if(r===0){this.toggleFormat(e),xh(null);return}const o=this.anchor,s=this.focus,a=this.isBackward(),l=a?s:o,c=a?o:s;let u=0,d=i[0],h=l.type==="element"?0:l.offset;if(l.type==="text"&&h===d.getTextContentSize()&&(u=1,d=i[1],h=0),d==null)return;const f=d.getFormatFlags(e,null),m=r-1;let p=i[m];const g=c.type==="text"?c.offset:p.getTextContentSize();if(d.is(p)){if(h===g)return;if(OO(d)||h===0&&g===d.getTextContentSize())d.setFormat(f);else{const _=d.splitText(h,g),w=h===0?_[0]:_[1];w.setFormat(f),l.type==="text"&&l.set(w.__key,0,"text"),c.type==="text"&&c.set(w.__key,g-h,"text")}this.format=f;return}h!==0&&!OO(d)&&([,d]=d.splitText(h),h=0),d.setFormat(f);const y=p.getFormatFlags(e,f);g>0&&(g!==p.getTextContentSize()&&!OO(p)&&([p]=p.splitText(g)),p.setFormat(y));for(let _=u+1;_<m;_++){const w=i[_],C=w.getFormatFlags(e,y);w.setFormat(C)}l.type==="text"&&l.set(d.__key,h,"text"),c.type==="text"&&c.set(p.__key,g,"text"),this.format=f|y}insertNodes(e){if(e.length===0)return;if(this.anchor.key==="root"){this.insertParagraph();const g=Fi();if(!Jn(g))throw Error("Expected RangeSelection after insertParagraph");return g.insertNodes(e)}const n=this.isBackward()?this.focus:this.anchor,i=vSe(n.getNode(),jO),r=e[e.length-1];if("__language"in i&&Mn(i)){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const g=CSe(this);i.splice(g,0,e),r.selectEnd()}return}const o=g=>(Mn(g)||Oa(g))&&!g.isInline();if(!e.some(o)){if(!Mn(i))throw Error("Expected 'firstBlock' to be an ElementNode");const g=CSe(this);i.splice(g,0,e),r.selectEnd();return}const s=j0r(e),a=s.getLastDescendant(),l=s.getChildren(),c=g=>Mn(g)&&jO(g)&&!g.isEmpty()&&Mn(i)&&(!i.isEmpty()||i.canMergeWhenEmpty()),d=!Mn(i)||!i.isEmpty()?this.insertParagraph():null,h=l[l.length-1];let f=l[0];if(c(f)){if(!Mn(i))throw Error("Expected 'firstBlock' to be an ElementNode");i.append(...f.getChildren()),f=l[1]}f&&p0r(i,f);const m=vSe(a,jO);d&&Mn(m)&&(d.canMergeWhenEmpty()||jO(h))&&(m.append(...d.getChildren()),d.remove()),Mn(i)&&i.isEmpty()&&i.remove(),a.selectEnd();const p=Mn(i)?i.getLastChild():null;SS(p)&&m!==i&&p.remove()}insertParagraph(){if(this.anchor.key==="root"){const s=gd();return Vc().splice(this.anchor.offset,0,[s]),s.select(),s}const e=CSe(this),n=vSe(this.anchor.getNode(),jO);if(!Mn(n))throw Error("Expected ancestor to be an ElementNode");const i=n.getChildAtIndex(e),r=i?[i,...i.getNextSiblings()]:[],o=n.insertNewAfter(this,!1);return o?(o.append(...r),o.selectStart(),o):null}insertLineBreak(e){const n=n_();if(this.insertNodes([n]),e){const i=n.getParentOrThrow(),r=n.getIndexWithinParent();i.select(r,r)}}extract(){const e=this.getNodes(),n=e.length,i=n-1,r=this.anchor,o=this.focus;let s=e[0],a=e[i];const[l,c]=_Pe(this);if(n===0)return[];if(n===1){if(ai(s)&&!this.isCollapsed()){const d=l>c?c:l,h=l>c?l:c,f=s.splitText(d,h),m=d===0?f[0]:f[1];return m!=null?[m]:[]}return[s]}const u=r.isBefore(o);if(ai(s)){const d=u?l:c;d===s.getTextContentSize()?e.shift():d!==0&&([,s]=s.splitText(d),e[0]=s)}if(ai(a)){const h=a.getTextContent().length,f=u?c:l;f===0?e.pop():f!==h&&([a]=a.splitText(f),e[i]=a)}return e}modify(e,n,i){const r=this.focus,o=this.anchor,s=e==="move",a=xU(r,n);if(Oa(a)&&!a.isIsolated()){if(s&&a.isKeyboardSelectable()){const f=wPe();f.add(a.__key),jv(f);return}const h=n?a.getPreviousSibling():a.getNextSibling();if(ai(h)){const f=h.__key,m=n?h.getTextContent().length:0;r.set(f,m,"text"),s&&o.set(f,m,"text");return}else{const f=a.getParentOrThrow();let m,p;Mn(h)?(p=h.__key,m=n?h.getChildrenSize():0):(m=a.getIndexWithinParent(),p=f.__key,n||m++),r.set(p,m,"element"),s&&o.set(p,m,"element");return}}const l=hc(),c=$w(l._window);if(!c)return;const u=l._blockCursorElement,d=l._rootElement;if(d!==null&&u!==null&&Mn(a)&&!a.isInline()&&!a.canBeEmpty()&&cHe(u,l,d),M0r(c,e,n?"backward":"forward",i),c.rangeCount>0){const h=c.getRangeAt(0),f=this.anchor.getNode(),m=Nf(f)?f:Pyr(f);if(this.applyDOMRange(h),this.dirty=!0,!s){const p=this.getNodes(),g=[];let y=!1;for(let _=0;_<p.length;_++){const w=p[_];uPe(w,m)?g.push(w):y=!0}if(y&&g.length>0)if(n){const _=g[0];Mn(_)?_.selectStart():_.getParentOrThrow().selectStart()}else{const _=g[g.length-1];Mn(_)?_.selectEnd():_.getParentOrThrow().selectEnd()}(c.anchorNode!==h.startContainer||c.anchorOffset!==h.startOffset)&&k0r(this)}}}forwardDeletion(e,n,i){if(!i&&(e.type==="element"&&Mn(n)&&e.offset===n.getChildrenSize()||e.type==="text"&&e.offset===n.getTextContentSize())){const r=n.getParent(),o=n.getNextSibling()||(r===null?null:r.getNextSibling());if(Mn(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(e){const n=this.isCollapsed();if(this.isCollapsed()){const i=this.anchor;let r=i.getNode();if(this.forwardDeletion(i,r,e))return;const o=this.focus,s=xU(o,e);if(Oa(s)&&!s.isIsolated()){if(s.isKeyboardSelectable()&&Mn(r)&&r.getChildrenSize()===0){r.remove();const a=wPe();a.add(s.__key),jv(a)}else s.remove(),hc().dispatchCommand(uG,void 0);return}else if(!e&&Mn(s)&&Mn(r)&&r.isEmpty()){r.remove(),s.selectStart();return}if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&i.offset===0&&(i.type==="element"?i.getNode():i.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const a=o.type==="text"?o.getNode():null;if(r=i.type==="text"?i.getNode():null,a!==null&&a.isSegmented()){const l=o.offset,c=a.getTextContentSize();if(a.is(r)||e&&l!==c||!e&&l!==0){Fbt(a,e,l);return}}else if(r!==null&&r.isSegmented()){const l=i.offset,c=r.getTextContentSize();if(r.is(a)||e&&l!==0||!e&&l!==c){Fbt(r,e,l);return}}L0r(this,e)}}if(this.removeText(),e&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const i=this.anchor.getNode();i.isEmpty()&&Nf(i.getParent())&&i.getIndexWithinParent()===0&&i.collapseAtStart(this)}}deleteLine(e){if(this.isCollapsed()){const n=this.anchor.type==="element";if(n&&this.insertText(" "),this.modify("extend",e,"lineboundary"),(e?this.focus:this.anchor).offset===0&&this.modify("extend",e,"character"),n){const r=e?this.anchor:this.focus;r.set(r.key,r.offset+1,r.type)}}this.removeText()}deleteWord(e){if(this.isCollapsed()){const n=this.anchor,i=n.getNode();if(this.forwardDeletion(n,i,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function bf(t){return t instanceof Xpe}function jbt(t){const e=t.offset;if(t.type==="text")return e;const n=t.getNode();return e===n.getChildrenSize()?n.getTextContent().length:0}function _Pe(t){const e=t.getStartEndPoints();if(e===null)return[0,0];const[n,i]=e;return n.type==="element"&&i.type==="element"&&n.key===i.key&&n.offset===i.offset?[0,0]:[jbt(n),jbt(i)]}function k0r(t){const e=t.focus,n=t.anchor,i=n.key,r=n.offset,o=n.type;nD(n,e.key,e.offset,e.type),nD(e,i,r,o),t._cachedNodes=null}function M0r(t,e,n,i){t.modify(e,n,i)}function L0r(t,e){const n=t.anchor,i=t.focus,r=n.getNode(),o=i.getNode();if(r===o&&n.type==="text"&&i.type==="text"){const s=n.offset,a=i.offset,l=s<a,c=l?s:a,u=l?a:s,d=u-1;if(c!==d){const h=r.getTextContent().slice(c,u);PHt(h)||(e?i.offset=d:n.offset=d)}}}function Fbt(t,e,n){const i=t,o=i.getTextContent().split(/(?=\s)/g),s=o.length;let a=0,l=0;for(let u=0;u<s;u++){const d=o[u],h=u===s-1;if(l=a,a+=d.length,e&&a===n||a>n||h){o.splice(u,1),h&&(l=void 0);break}}const c=o.join("").trim();c===""?i.remove():(i.setTextContent(c),i.select(l,l))}function T0r(t,e,n){const i=t.getParent();return n===null||i===null||!i.canBeEmpty()||i!==n.getNode()}function $bt(t,e,n,i){let r=e,o;if(t.nodeType===dG){let s=!1;const a=t.childNodes,l=a.length,c=i._blockCursorElement;r===l&&(s=!0,r=l-1);let u=a[r],d=!1;if(u===c)u=a[r+1],d=!0;else if(c!==null){const h=c.parentNode;if(t===h){const f=Array.prototype.indexOf.call(h.children,c);e>f&&r--}}if(o=L4(u),ai(o))r=Sbt(o,s);else{let h=L4(t);if(h===null)return null;if(Mn(h)){r=Math.min(h.getChildrenSize(),r);let f=h.getChildAtIndex(r);if(Mn(f)&&T0r(f,r,n)){const m=s?f.getLastDescendant():f.getFirstDescendant();m===null?h=f:(f=m,h=Mn(f)?f:f.getParentOrThrow()),r=0}ai(f)?(o=f,h=null,r=Sbt(f,s)):f!==h&&s&&!d&&r++}else{const f=h.getIndexWithinParent();e===0&&Oa(h)&&L4(t)===h?r=f:r=f+1,h=h.getParentOrThrow()}if(Mn(h))return xw(h.__key,r,"element")}}else o=L4(t);return ai(o)?xw(o.__key,r,"text"):null}function Vbt(t,e,n){const i=t.offset,r=t.getNode();if(i===0){const o=r.getPreviousSibling(),s=r.getParent();if(!e)Mn(o)&&!n&&o.isInline()?(t.key=o.__key,t.offset=o.getChildrenSize(),t.type="element"):ai(o)&&(t.key=o.__key,t.offset=o.getTextContent().length);else if((n||!e)&&o===null&&Mn(s)&&s.isInline()){const a=s.getPreviousSibling();ai(a)&&(t.key=a.__key,t.offset=a.getTextContent().length)}}else if(i===r.getTextContent().length){const o=r.getNextSibling(),s=r.getParent();if(e&&Mn(o)&&o.isInline())t.key=o.__key,t.offset=0,t.type="element";else if((n||e)&&o===null&&Mn(s)&&s.isInline()&&!s.canInsertTextAfter()){const a=s.getNextSibling();ai(a)&&(t.key=a.__key,t.offset=0)}}}function rWt(t,e,n){if(t.type==="text"&&e.type==="text"){const i=t.isBefore(e),r=t.is(e);Vbt(t,i,r),Vbt(e,!i,r),r&&(e.key=t.key,e.offset=t.offset,e.type=t.type);const o=hc();if(o.isComposing()&&o._compositionKey!==t.key&&Jn(n)){const s=n.anchor,a=n.focus;nD(t,s.key,s.offset,s.type),nD(e,a.key,a.offset,a.type)}}}function oWt(t,e,n,i,r,o){if(t===null||n===null||!hG(r,t,n))return null;const s=$bt(t,e,Jn(o)?o.anchor:null,r);if(s===null)return null;const a=$bt(n,i,Jn(o)?o.focus:null,r);if(a===null)return null;if(s.type==="element"&&a.type==="element"){const l=L4(t),c=L4(n);if(Oa(l)&&Oa(c))return null}return rWt(s,a,o),[s,a]}function xPe(t){return Mn(t)&&!t.isInline()}function sWt(t,e,n,i,r,o){const s=tN(),a=new _M(xw(t,e,r),xw(n,i,o),0,"");return a.dirty=!0,s._selection=a,a}function aWt(){const t=xw("root",0,"element"),e=xw("root",0,"element");return new _M(t,e,0,"")}function wPe(){return new Xpe(new Set)}function I0r(t){const n=t.getEditorState()._selection,i=$w(t._window);return Jn(n)||n==null?bHe(n,i,t,null):n.clone()}function bHe(t,e,n,i){const r=n._window;if(r===null)return null;const o=i||r.event,s=o?o.type:void 0,a=s==="selectionchange",l=!Pvr()&&(a||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&o&&o.detail===3||s==="drop"||s===void 0);let c,u,d,h;if(!Jn(t)||l){if(e===null)return null;if(c=e.anchorNode,u=e.focusNode,d=e.anchorOffset,h=e.focusOffset,a&&Jn(t)&&!hG(n,c,u))return t.clone()}else return t.clone();const f=oWt(c,d,u,h,n,t);if(f===null)return null;const[m,p]=f;return new _M(m,p,Jn(t)?t.format:0,Jn(t)?t.style:"")}function Fi(){return tN()._selection}function vG(){return hc()._editorState._selection}function hae(t,e,n,i=1){const r=t.anchor,o=t.focus,s=r.getNode(),a=o.getNode();if(!e.is(s)&&!e.is(a))return;const l=e.__key;if(t.isCollapsed()){const c=r.offset;if(n<=c&&i>0||n<c&&i<0){const u=Math.max(0,c+i);r.set(l,u,"element"),o.set(l,u,"element"),Bbt(t)}}else{const c=t.isBackward(),u=c?o:r,d=u.getNode(),h=c?r:o,f=h.getNode();if(e.is(d)){const m=u.offset;(n<=m&&i>0||n<m&&i<0)&&u.set(l,Math.max(0,m+i),"element")}if(e.is(f)){const m=h.offset;(n<=m&&i>0||n<m&&i<0)&&h.set(l,Math.max(0,m+i),"element")}}Bbt(t)}function Bbt(t){const e=t.anchor,n=e.offset,i=t.focus,r=i.offset,o=e.getNode(),s=i.getNode();if(t.isCollapsed()){if(!Mn(o))return;const a=o.getChildrenSize(),l=n>=a,c=l?o.getChildAtIndex(a-1):o.getChildAtIndex(n);if(ai(c)){let u=0;l&&(u=c.getTextContentSize()),e.set(c.__key,u,"text"),i.set(c.__key,u,"text")}return}if(Mn(o)){const a=o.getChildrenSize(),l=n>=a,c=l?o.getChildAtIndex(a-1):o.getChildAtIndex(n);if(ai(c)){let u=0;l&&(u=c.getTextContentSize()),e.set(c.__key,u,"text")}}if(Mn(s)){const a=s.getChildrenSize(),l=r>=a,c=l?s.getChildAtIndex(a-1):s.getChildAtIndex(r);if(ai(c)){let u=0;l&&(u=c.getTextContentSize()),i.set(c.__key,u,"text")}}}function A0r(t,e){const i=e.getEditorState()._selection,r=t._selection;if(Jn(r)){const o=r.anchor,s=r.focus;let a;if(o.type==="text"&&(a=o.getNode(),a.selectionTransform(i,r)),s.type==="text"){const l=s.getNode();a!==l&&l.selectionTransform(i,r)}}}function fae(t,e,n,i,r){let o=null,s=0,a=null;i!==null?(o=i.__key,ai(i)?(s=i.getTextContentSize(),a="text"):Mn(i)&&(s=i.getChildrenSize(),a="element")):r!==null&&(o=r.__key,ai(r)?a="text":Mn(r)&&(a="element")),o!==null&&a!==null?t.set(o,s,a):(s=e.getIndexWithinParent(),s===-1&&(s=n.getChildrenSize()),t.set(n.__key,s,"element"))}function zbt(t,e,n,i,r){t.type==="text"?(t.key=n,e||(t.offset+=r)):t.offset>i.getIndexWithinParent()&&(t.offset-=1)}function R0r(t,e,n,i,r,o,s){const a=i.anchorNode,l=i.focusNode,c=i.anchorOffset,u=i.focusOffset,d=document.activeElement;if(r.has("collaboration")&&d!==o||d!==null&&iHe(d))return;if(!Jn(e)){t!==null&&hG(n,a,l)&&i.removeAllRanges();return}const h=e.anchor,f=e.focus,m=h.key,p=f.key,g=aae(n,m),y=aae(n,p),_=h.offset,w=f.offset,C=e.format,N=e.style,E=e.isCollapsed();let D=g,k=y,M=!1;if(h.type==="text"){D=oae(g);const T=h.getNode();M=T.getFormat()!==C||T.getStyle()!==N}else Jn(t)&&t.anchor.type==="text"&&(M=!0);if(f.type==="text"&&(k=oae(y)),!(D===null||k===null)&&(E&&(t===null||M||Jn(t)&&(t.format!==C||t.style!==N))&&f0r(C,N,_,m,performance.now()),!(c===_&&u===w&&a===D&&l===k&&!(i.type==="Range"&&E)&&((d===null||!o.contains(d))&&o.focus({preventScroll:!0}),h.type!=="element")))){try{i.setBaseAndExtent(D,_,k,w)}catch(T){console.warn(T)}if(!r.has("skip-scroll-into-view")&&e.isCollapsed()&&o!==null&&o===document.activeElement){const T=e instanceof _M&&e.anchor.type==="element"?D.childNodes[_]||null:i.rangeCount>0?i.getRangeAt(0):null;if(T!==null){let A;if(T instanceof Text){const R=document.createRange();R.selectNode(T),A=R.getBoundingClientRect()}else A=T.getBoundingClientRect();Iyr(n,A,o)}}h0r()}}function P0r(t){let e=Fi()||vG();e===null&&(e=Vc().selectEnd()),e.insertNodes(t)}function CSe(t){let e=t;t.isCollapsed()||e.removeText();const n=Fi();if(Jn(n)&&(e=n),!Jn(e))throw Error("Unexpected dirty selection to be null");const i=e.anchor;let r=i.getNode(),o=i.offset;for(;!jO(r);)[r,o]=O0r(r,o);return o}function O0r(t,e){const n=t.getParent();if(!n){const r=gd();return Vc().append(r),r.select(),[Vc(),0]}if(ai(t)){const r=t.splitText(e);if(r.length===0)return[n,t.getIndexWithinParent()];const o=e===0?0:1,s=r[0].getIndexWithinParent()+o;return[n,s]}if(!Mn(t)||e===0)return[n,t.getIndexWithinParent()];const i=t.getChildAtIndex(e);if(i){const r=new _M(xw(t.__key,e,"element"),xw(t.__key,e,"element"),0,""),o=t.insertNewAfter(r);o&&o.append(i,...i.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}function j0r(t){const e=gd();let n=null;for(let i=0;i<t.length;i++){const r=t[i],o=SS(r);if(o||Oa(r)&&r.isInline()||Mn(r)&&r.isInline()||ai(r)||r.isParentRequired()){if(n===null&&(n=r.createParentElementNode(),e.append(n),o))continue;n!==null&&n.append(r)}else e.append(r),n=null}return e}let ld=null,Hd=null,Pp=!1,SSe=!1,mae=0;const Hbt={characterData:!0,childList:!0,subtree:!0};function yG(){return Pp||ld!==null&&ld._readOnly}function om(){if(Pp)throw Error("Cannot use method in read-only mode.")}function lWt(){if(mae>99)throw Error("One or more transforms are endlessly triggering additional transforms. May have encountered infinite recursion caused by transforms that have their preconditions too lose and/or conflict with each other.")}function tN(){if(ld===null)throw Error(`Unable to find an active editor state. State helpers or node methods can only be used synchronously during the callback of editor.update(), editor.read(), or editorState.read().${cWt()}`);return ld}function hc(){if(Hd===null)throw Error(`Unable to find an active editor. This method can only be used synchronously during the callback of editor.update() or editor.read().${cWt()}`);return Hd}function cWt(){let t=0;const e=new Set,n=Zpe.version;if(typeof window<"u")for(const r of document.querySelectorAll("[contenteditable]")){const o=zpe(r);if(rHe(o))t++;else if(o){let s=String(o.constructor.version||"<0.17.1");s===n&&(s+=" (separately built, likely a bundler configuration issue)"),e.add(s)}}let i=` Detected on the page: ${t} compatible editor(s) with version ${n}`;return e.size&&(i+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),i}function F0r(){return Hd}function $0r(){return ld}function Wbt(t,e,n){const i=e.__type,r=Hvr(t,i);let o=n.get(i);o===void 0&&(o=Array.from(r.transforms),n.set(i,o));const s=o.length;for(let a=0;a<s&&(o[a](e),!!e.isAttached());a++);}function Ubt(t,e){return t!==void 0&&t.__key!==e&&t.isAttached()}function V0r(t,e){const n=e._dirtyLeaves,i=t._nodeMap;for(const r of n){const o=i.get(r);ai(o)&&o.isAttached()&&o.isSimpleText()&&!o.isUnmergeable()&&MHt(o)}}function B0r(t,e){const n=e._dirtyLeaves,i=e._dirtyElements,r=t._nodeMap,o=tD(),s=new Map;let a=n,l=a.size,c=i,u=c.size;for(;l>0||u>0;){if(l>0){e._dirtyLeaves=new Set;for(const d of a){const h=r.get(d);ai(h)&&h.isAttached()&&h.isSimpleText()&&!h.isUnmergeable()&&MHt(h),h!==void 0&&Ubt(h,o)&&Wbt(e,h,s),n.add(d)}if(a=e._dirtyLeaves,l=a.size,l>0){mae++;continue}}e._dirtyLeaves=new Set,e._dirtyElements=new Map;for(const d of c){const h=d[0],f=d[1];if(h!=="root"&&!f)continue;const m=r.get(h);m!==void 0&&Ubt(m,o)&&Wbt(e,m,s),i.set(h,f)}a=e._dirtyLeaves,l=a.size,c=e._dirtyElements,u=c.size,mae++}e._dirtyLeaves=n,e._dirtyElements=i}function z0r(t){return vHe(t,hc()._nodes)}function vHe(t,e){const n=t.type,i=e.get(n);if(i===void 0)throw Error(`parseEditorState: type "${n}" + not found`);const r=i.klass;if(t.type!==r.getType())throw Error(`LexicalNode: Node ${r.name} does not implement .importJSON().`);const o=r.importJSON(t),s=t.children;if(Mn(o)&&Array.isArray(s))for(let a=0;a<s.length;a++){const l=s[a],c=vHe(l,e);o.append(c)}return o}function H0r(t,e,n){const i=_He(),r=ld,o=Pp,s=Hd,a=e._dirtyElements,l=e._dirtyLeaves,c=e._cloneNotNeeded,u=e._dirtyType;e._dirtyElements=new Map,e._dirtyLeaves=new Set,e._cloneNotNeeded=new Set,e._dirtyType=0,ld=i,Pp=!1,Hd=e;try{const d=e._nodes,h=t.root;vHe(h,d),n&&n(),i._readOnly=!0,uWt(i)}catch(d){d instanceof Error&&e._onError(d)}finally{e._dirtyElements=a,e._dirtyLeaves=l,e._cloneNotNeeded=c,e._dirtyType=u,ld=r,Pp=o,Hd=s}return i}function Kbt(t,e,n){const i=ld,r=Pp,o=Hd;ld=e,Pp=!0,Hd=t;try{return n()}finally{ld=i,Pp=r,Hd=o}}function uWt(t){const e=t._nodeMap;e.set=()=>{throw new Error("Cannot call set() on a frozen Lexical node map")},e.clear=()=>{throw new Error("Cannot call clear() on a frozen Lexical node map")},e.delete=()=>{throw new Error("Cannot call delete() on a frozen Lexical node map")}}function iD(t,e){const n=t._pendingEditorState,i=t._rootElement,r=t._headless||i===null;if(n===null)return;const o=t._editorState,s=o._selection,a=n._selection,l=t._dirtyType!==lA,c=ld,u=Pp,d=Hd,h=t._updating,f=t._observer;let m=null;if(t._pendingEditorState=null,t._editorState=n,!r&&l&&f!==null){Hd=t,ld=n,Pp=!1,t._updating=!0;try{const E=t._dirtyType,D=t._dirtyElements,k=t._dirtyLeaves;f.disconnect(),m=Qyr(o,n,t,E,D,k)}catch(E){if(E instanceof Error&&t._onError(E),!SSe)gWt(t,null,i,n),kHt(t),t._dirtyType=sF,SSe=!0,iD(t,o),SSe=!1;else throw E;return}finally{f.observe(i,Hbt),t._updating=h,ld=c,Pp=u,Hd=d}}n._readOnly||(n._readOnly=!0,uWt(n),Jn(a)&&(Object.freeze(a.anchor),Object.freeze(a.focus)),Object.freeze(a));const p=t._dirtyLeaves,g=t._dirtyElements,y=t._normalizedNodes,_=t._updateTags,w=t._deferred;l&&(t._dirtyType=lA,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set,t._updateTags=new Set),zyr(t,n);const C=r?null:$w(t._window);if(t._editable&&C!==null&&(l||a===null||a.dirty)){Hd=t,ld=n;try{if(f!==null&&f.disconnect(),l||a===null||a.dirty){const E=t._blockCursorElement;E!==null&&cHe(E,t,i),R0r(s,a,t,C,_,i)}jyr(t,i,a),f!==null&&f.observe(i,Hbt)}finally{Hd=d,ld=c}}m!==null&&U0r(t,m,_,p,o),!Jn(a)&&a!==null&&(s===null||!s.is(a))&&t.dispatchCommand(uG,void 0);const N=t._pendingDecorators;N!==null&&(t._decorators=N,t._pendingDecorators=null,SU("decorator",t,!0,N)),W0r(t,e||o,n),SU("update",t,!0,{dirtyElements:g,dirtyLeaves:p,editorState:n,normalizedNodes:y,prevEditorState:e||o,tags:_}),q0r(t,w),K0r(t)}function W0r(t,e,n){const i=Cbt(e),r=Cbt(n);i!==r&&SU("textcontent",t,!0,r)}function U0r(t,e,n,i,r){const o=Array.from(t._listeners.mutation),s=o.length;for(let a=0;a<s;a++){const[l,c]=o[a],u=e.get(c);u!==void 0&&l(u,{dirtyLeaves:i,prevEditorState:r,updateTags:n})}}function SU(t,e,n,...i){const r=e._updating;e._updating=n;try{const o=Array.from(e._listeners[t]);for(let s=0;s<o.length;s++)o[s].apply(null,i)}finally{e._updating=r}}function dWt(t,e,n){if(t._updating===!1||Hd!==t){let r=!1;return t.update(()=>{r=dWt(t,e,n)}),r}const i=oHe(t);for(let r=4;r>=0;r--)for(let o=0;o<i.length;o++){const l=i[o]._commands.get(e);if(l!==void 0){const c=l[r];if(c!==void 0){const u=Array.from(c),d=u.length;for(let h=0;h<d;h++)if(u[h](n,t)===!0)return!0}}}return!1}function K0r(t){const e=t._updates;if(e.length!==0){const n=e.shift();if(n){const[i,r]=n;hWt(t,i,r)}}}function q0r(t,e){if(t._deferred=[],e.length!==0){const n=t._updating;t._updating=!0;try{for(let i=0;i<e.length;i++)e[i]()}finally{t._updating=n}}}function qbt(t,e){const n=t._updates;let i=e||!1;for(;n.length!==0;){const r=n.shift();if(r){const[o,s]=r;let a,l;if(s!==void 0){if(a=s.onUpdate,l=s.tag,s.skipTransforms&&(i=!0),s.discrete){const c=t._pendingEditorState;if(c===null)throw Error("Unexpected empty pending editor state on discrete nested update");c._flushSync=!0}a&&t._deferred.push(a),l&&t._updateTags.add(l)}o()}}return i}function hWt(t,e,n){const i=t._updateTags;let r,o,s=!1,a=!1;n!==void 0&&(r=n.onUpdate,o=n.tag,o!=null&&i.add(o),s=n.skipTransforms||!1,a=n.discrete||!1),r&&t._deferred.push(r);const l=t._editorState;let c=t._pendingEditorState,u=!1;(c===null||c._readOnly)&&(c=t._pendingEditorState=X0r(c||l),u=!0),c._flushSync=a;const d=ld,h=Pp,f=Hd,m=t._updating;ld=c,Pp=!1,t._updating=!0,Hd=t;try{u&&(t._headless?l._selection!==null&&(c._selection=l._selection.clone()):c._selection=I0r(t));const g=t._compositionKey;e(),s=qbt(t,s),A0r(c,t),t._dirtyType!==lA&&(s?V0r(c,t):B0r(c,t),qbt(t),Hyr(l,c,t._dirtyLeaves,t._dirtyElements));const y=t._compositionKey;g!==y&&(c._flushSync=!0);const _=c._selection;if(Jn(_)){const w=c._nodeMap,C=_.anchor.key,N=_.focus.key;if(w.get(C)===void 0||w.get(N)===void 0)throw Error("updateEditor: selection has been lost because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node.")}else bf(_)&&_._nodes.size===0&&(c._selection=null)}catch(g){g instanceof Error&&t._onError(g),t._pendingEditorState=l,t._dirtyType=sF,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),iD(t);return}finally{ld=d,Pp=h,Hd=f,t._updating=m,mae=0}t._dirtyType!==lA||Y0r(c,t)?c._flushSync?(c._flushSync=!1,iD(t)):u&&Wvr(()=>{iD(t)}):(c._flushSync=!1,u&&(i.clear(),t._deferred=[],t._pendingEditorState=null))}function db(t,e,n){t._updating?t._updates.push([e,n]):hWt(t,e,n)}class Vw extends Ype{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 Tvr[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getChildrenKeys(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n.__key),n=n.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const n=hc()._dirtyElements;return n!==null&&n.has(this.__key)}isLastChild(){const e=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(e)}getAllTextNodes(){const e=[];let n=this.getFirstChild();for(;n!==null;){if(ai(n)&&e.push(n),Mn(n)){const i=n.getAllTextNodes();e.push(...i)}n=n.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;Mn(e);){const n=e.getFirstChild();if(n===null)break;e=n}return e}getLastDescendant(){let e=this.getLastChild();for(;Mn(e);){const n=e.getLastChild();if(n===null)break;e=n}return e}getDescendantByIndex(e){const n=this.getChildren(),i=n.length;if(e>=i){const o=n[i-1];return Mn(o)&&o.getLastDescendant()||o||null}const r=n[e];return Mn(r)&&r.getFirstDescendant()||r||null}getFirstChild(){const n=this.getLatest().__first;return n===null?null:yf(n)}getFirstChildOrThrow(){const e=this.getFirstChild();if(e===null)throw Error(`Expected node ${this.__key} to have a first child.`);return e}getLastChild(){const n=this.getLatest().__last;return n===null?null:yf(n)}getLastChildOrThrow(){const e=this.getLastChild();if(e===null)throw Error(`Expected node ${this.__key} to have a last child.`);return e}getChildAtIndex(e){const n=this.getChildrenSize();let i,r;if(e<n/2){for(i=this.getFirstChild(),r=0;i!==null&&r<=e;){if(r===e)return i;i=i.getNextSibling(),r++}return null}for(i=this.getLastChild(),r=n-1;i!==null&&r>=e;){if(r===e)return i;i=i.getPreviousSibling(),r--}return null}getTextContent(){let e="";const n=this.getChildren(),i=n.length;for(let r=0;r<i;r++){const o=n[r];e+=o.getTextContent(),Mn(o)&&r!==i-1&&!o.isInline()&&(e+=CS)}return e}getTextContentSize(){let e=0;const n=this.getChildren(),i=n.length;for(let r=0;r<i;r++){const o=n[r];e+=o.getTextContentSize(),Mn(o)&&r!==i-1&&!o.isInline()&&(e+=CS.length)}return e}getDirection(){return this.getLatest().__dir}hasFormat(e){if(e!==""){const n=ybt[e];return(this.getFormat()&n)!==0}return!1}select(e,n){om();const i=Fi();let r=e,o=n;const s=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&n===0){const l=this.getFirstChild();if(ai(l)||Mn(l))return l.select(0,0)}else if((e===void 0||e===s)&&(n===void 0||n===s)){const l=this.getLastChild();if(ai(l)||Mn(l))return l.select()}}r===void 0&&(r=s),o===void 0&&(o=s);const a=this.__key;if(Jn(i))i.anchor.set(a,r,"element"),i.focus.set(a,o,"element"),i.dirty=!0;else return sWt(a,r,a,o,"element","element");return i}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(i=>i.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const n=this.getWritable();return n.__dir=e,n}setFormat(e){const n=this.getWritable();return n.__format=e!==""?ybt[e]:0,this}setStyle(e){const n=this.getWritable();return n.__style=e||"",this}setIndent(e){const n=this.getWritable();return n.__indent=e,this}splice(e,n,i){const r=i.length,o=this.getChildrenSize(),s=this.getWritable(),a=s.__key,l=[],c=[],u=this.getChildAtIndex(e+n);let d=null,h=o-n+r;if(e!==0)if(e===o)d=this.getLastChild();else{const m=this.getChildAtIndex(e);m!==null&&(d=m.getPreviousSibling())}if(n>0){let m=d===null?this.getFirstChild():d.getNextSibling();for(let p=0;p<n;p++){if(m===null)throw Error("splice: sibling not found");const g=m.getNextSibling(),y=m.__key,_=m.getWritable();xI(_),c.push(y),m=g}}let f=d;for(let m=0;m<r;m++){const p=i[m];f!==null&&p.is(f)&&(d=f=f.getPreviousSibling());const g=p.getWritable();g.__parent===a&&h--,xI(g);const y=p.__key;if(f===null)s.__first=y,g.__prev=null;else{const _=f.getWritable();_.__next=y,g.__prev=_.__key}if(p.__key===a)throw Error("append: attempting to append self");g.__parent=a,l.push(y),f=p}if(e+n===o){if(f!==null){const m=f.getWritable();m.__next=null,s.__last=f.__key}}else if(u!==null){const m=u.getWritable();if(f!==null){const p=f.getWritable();m.__prev=f.__key,p.__next=u.__key}else m.__prev=null}if(s.__size=h,c.length){const m=Fi();if(Jn(m)){const p=new Set(c),g=new Set(l),{anchor:y,focus:_}=m;Gbt(y,p,g)&&fae(y,y.getNode(),this,d,u),Gbt(_,p,g)&&fae(_,_.getNode(),this,d,u),h===0&&!this.canBeEmpty()&&!fR(this)&&this.remove()}}return s}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(e,n){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,n,i){return!1}canMergeWhenEmpty(){return!1}}function Mn(t){return t instanceof Vw}function Gbt(t,e,n){let i=t.getNode();for(;i;){const r=i.__key;if(e.has(r)&&!n.has(r))return!0;i=i.getParent()}return!1}class yHe extends Ype{constructor(e){super(e)}decorate(e,n){throw Error("decorate: base method not extended")}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Oa(t){return t instanceof yHe}class _G extends Vw{static getType(){return"root"}static clone(){return new _G}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){throw Error("getTopLevelElementOrThrow: root nodes are not top level elements")}getTextContent(){const e=this.__cachedText;return(yG()||hc()._dirtyType===lA)&&e!==null?e:super.getTextContent()}remove(){throw Error("remove: cannot be called on root nodes")}replace(e){throw Error("replace: cannot be called on root nodes")}insertBefore(e){throw Error("insertBefore: cannot be called on root nodes")}insertAfter(e){throw Error("insertAfter: cannot be called on root nodes")}updateDOM(e,n){return!1}append(...e){for(let n=0;n<e.length;n++){const i=e[n];if(!Mn(i)&&!Oa(i))throw Error("rootNode.append: Only element or decorator nodes can be appended to the root node")}return super.append(...e)}static importJSON(e){const n=Vc();return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function G0r(){return new _G}function Nf(t){return t instanceof _G}function Y0r(t,e){const n=e.getEditorState()._selection,i=t._selection;if(i!==null){if(i.dirty||!i.is(n))return!0}else if(n!==null)return!0;return!1}function X0r(t){return new mWt(new Map(t._nodeMap))}function _He(){return new mWt(new Map([["root",G0r()]]))}function fWt(t){const e=t.exportJSON(),n=t.constructor;if(e.type!==n.getType())throw Error(`LexicalNode: Node ${n.name} does not match the serialized type. Check if .exportJSON() is implemented and it is returning the correct type.`);if(Mn(t)){const i=e.children;if(!Array.isArray(i))throw Error(`LexicalNode: Node ${n.name} is an element but .exportJSON() does not have a children array.`);const r=t.getChildren();for(let o=0;o<r.length;o++){const s=r[o],a=fWt(s);i.push(a)}}return e}let mWt=class pWt{constructor(e,n){this._nodeMap=e,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,n){return Kbt(n&&n.editor||null,this,e)}clone(e){const n=new pWt(this._nodeMap,e===void 0?this._selection:e);return n._readOnly=!0,n}toJSON(){return Kbt(null,this,()=>({root:fWt(Vc())}))}};class xHe extends Vw{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class v$ extends Vw{constructor(e){super(e),this.__textFormat=0,this.__textStyle=""}static getType(){return"paragraph"}getTextFormat(){return this.getLatest().__textFormat}setTextFormat(e){const n=this.getWritable();return n.__textFormat=e,n}hasTextFormat(e){const n=HC[e];return(this.getTextFormat()&n)!==0}getTextStyle(){return this.getLatest().__textStyle}setTextStyle(e){const n=this.getWritable();return n.__textStyle=e,n}static clone(e){return new v$(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}createDOM(e){const n=document.createElement("p"),i=AB(e.theme,"paragraph");return i!==void 0&&n.classList.add(...i),n}updateDOM(e,n,i){return!1}static importDOM(){return{p:e=>({conversion:Z0r,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(n&&eN(n)){this.isEmpty()&&n.append(document.createElement("br"));const i=this.getFormatType();n.style.textAlign=i;const r=this.getDirection();r&&(n.dir=r);const o=this.getIndent();o>0&&(n.style.textIndent=`${o*20}px`)}return{element:n}}static importJSON(e){const n=gd();return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n.setTextFormat(e.textFormat),n}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle(),type:"paragraph",version:1}}insertNewAfter(e,n){const i=gd();i.setTextFormat(e.format),i.setTextStyle(e.style);const r=this.getDirection();return i.setDirection(r),i.setFormat(this.getFormatType()),i.setStyle(this.getTextStyle()),this.insertAfter(i,n),i}collapseAtStart(){const e=this.getChildren();if(e.length===0||ai(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function Z0r(t){const e=gd();if(t.style){e.setFormat(t.style.textAlign);const n=parseInt(t.style.textIndent,10)/20;n>0&&e.setIndent(n)}return{node:e}}function gd(){return Sb(new v$)}function y$(t){return t instanceof v$}const Q0r=!0,da=0,K3=1,J0r=4;function gWt(t,e,n,i){const r=t._keyToDOMMap;r.clear(),t._editorState=_He(),t._pendingEditorState=i,t._compositionKey=null,t._dirtyType=lA,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,t._updateTags=new Set,t._updates=[],t._blockCursorElement=null;const o=t._observer;o!==null&&(o.disconnect(),t._observer=null),e!==null&&(e.textContent=""),n!==null&&(n.textContent="",r.set("root",n))}function e_r(t,e){const n=new Map,i=new Set,r=o=>{Object.keys(o).forEach(s=>{let a=n.get(s);a===void 0&&(a=[],n.set(s,a)),a.push(o[s])})};return t.forEach(o=>{const s=o.klass.importDOM;if(s==null||i.has(s))return;i.add(s);const a=s.call(o.klass);a!==null&&r(a)}),e&&r(e),n}function t_r(t){const e=t||{},n=F0r(),i=e.theme||{},r=t===void 0?n:e.parentEditor||null,o=e.disableEvents||!1,s=_He(),a=e.namespace||(r!==null?r._config.namespace:OHt()),l=e.editorState,c=[_G,yM,gG,bG,v$,xHe,...e.nodes||[]],{onError:u,html:d}=e,h=e.editable!==void 0?e.editable:!0;let f;if(t===void 0&&n!==null)f=n._nodes;else{f=new Map;for(let p=0;p<c.length;p++){let g=c[p],y=null,_=null;if(typeof g!="function"){const E=g;g=E.replace,y=E.with,_=E.withKlass||null}{const E=Object.prototype.hasOwnProperty.call(g,"getType")&&g.getType(),D=g.name;if(_&&!(_.prototype instanceof g))throw Error(`${_.name} doesn't extend the ${D}`);if(D!=="RootNode"&&E!=="root"&&E!=="artificial"){const k=g.prototype;["getType","clone"].forEach(M=>{g.hasOwnProperty(M)||console.warn(`${D} must implement static "${M}" method`)}),!g.hasOwnProperty("importDOM")&&g.hasOwnProperty("exportDOM")&&console.warn(`${D} should implement "importDOM" if using a custom "exportDOM" method to ensure HTML serialization (important for copy & paste) works as expected`),k instanceof yHe&&(k.hasOwnProperty("decorate")||console.warn(`${k.constructor.name} must implement "decorate" method`)),g.hasOwnProperty("importJSON")||console.warn(`${D} should implement "importJSON" method to ensure JSON and default HTML serialization works as expected`),k.hasOwnProperty("exportJSON")||console.warn(`${D} should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected`)}}const w=g.getType(),C=g.transform(),N=new Set;C!==null&&N.add(C),f.set(w,{exportDOM:d&&d.export?d.export.get(g):void 0,klass:g,replace:y,replaceWithKlass:_,transforms:N})}}const m=new Zpe(s,r,f,{disableEvents:o,namespace:a,theme:i},u||console.error,e_r(f,d?d.import:void 0),h);return l!==void 0&&(m._pendingEditorState=l,m._dirtyType=sF),m}class Zpe{constructor(e,n,i,r,o,s,a){this._parentEditor=n,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=i,this._decorators={},this._pendingDecorators=null,this._dirtyType=lA,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=OHt(),this._onError=o,this._htmlConversions=s,this._editable=a,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){const n=this._listeners.update;return n.add(e),()=>{n.delete(e)}}registerEditableListener(e){const n=this._listeners.editable;return n.add(e),()=>{n.delete(e)}}registerDecoratorListener(e){const n=this._listeners.decorator;return n.add(e),()=>{n.delete(e)}}registerTextContentListener(e){const n=this._listeners.textcontent;return n.add(e),()=>{n.delete(e)}}registerRootListener(e){const n=this._listeners.root;return e(this._rootElement,null),n.add(e),()=>{e(null,this._rootElement),n.delete(e)}}registerCommand(e,n,i){if(i===void 0)throw Error('Listener for type "command" requires a "priority".');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);if(o===void 0)throw Error(`registerCommand: Command ${String(e)} not found in command map`);const s=o[i];return s.add(n),()=>{s.delete(n),o.every(a=>a.size===0)&&r.delete(e)}}registerMutationListener(e,n,i){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;o.set(n,r);const s=i&&i.skipInitialization;return(s===void 0?Q0r:s)||this.initializeMutationListener(n,r),()=>{o.delete(n)}}getRegisteredNode(e){const n=this._nodes.get(e.getType());if(n===void 0)throw Error(`Node ${e.name} has not been registered. Ensure node has been passed to createEditor.`);return n}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,n){const i=this._editorState,r=Byr(i).get(n.getType());if(!r)return;const o=new Map;for(const s of r.keys())o.set(s,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:i,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,n){const i=this.getRegisteredNode(e);return i.transforms.add(n),i}registerNodeTransform(e,n){const i=this.registerNodeTransformToKlass(e,n),r=[i],o=i.replaceWithKlass;if(o!=null){const s=this.registerNodeTransformToKlass(o,n);r.push(s)}return Qvr(this,e.getType()),()=>{r.forEach(s=>s.transforms.delete(n))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,n){return Bi(this,e,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const n=this._rootElement;if(e!==n){const i=AB(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,gWt(this,n,e,r),n!==null&&(this._config.disableEvents||u0r(n),i!=null&&n.classList.remove(...i)),e!==null){const o=Ryr(e),s=e.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=sF,kHt(this),this._updateTags.add("history-merge"),iD(this),this._config.disableEvents||c0r(e,this),i!=null&&e.classList.add(...i)}else this._editorState=r,this._pendingEditorState=null,this._window=null;SU("root",this,!1,e,n)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,n){if(e.isEmpty())throw Error("setEditorState: the editor state is empty. Ensure the editor state's root node never becomes empty.");DHt(this);const i=this._pendingEditorState,r=this._updateTags,o=n!==void 0?n.tag:null;i!==null&&!i.isEmpty()&&(o!=null&&r.add(o),iD(this)),this._pendingEditorState=e,this._dirtyType=sF,this._dirtyElements.set("root",!1),this._compositionKey=null,o!=null&&r.add(o),iD(this)}parseEditorState(e,n){const i=typeof e=="string"?JSON.parse(e):e;return H0r(i,this,n)}read(e){return iD(this),this.getEditorState().read(e,{editor:this})}update(e,n){db(this,e,n)}focus(e,n={}){const i=this._rootElement;i!==null&&(i.setAttribute("autocapitalize","off"),db(this,()=>{const r=Fi(),o=Vc();r!==null?r.dirty=!0:o.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?o.selectStart():o.selectEnd())},{onUpdate:()=>{i.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),this._pendingEditorState===null&&i.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const n=$w(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,SU("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}Zpe.version="0.17.1+dev.esm";const n_r=new Map;function i_r(t){const e={},n=t.split(";");for(const i of n)if(i!==""){const[r,o]=i.split(/:([^]+)/);r&&o&&(e[r.trim()]=o.trim())}return e}function bWt(t,e){const n=t.getStartEndPoints();if(e.isSelected(t)&&!e.isSegmented()&&!e.isToken()&&n!==null){const[i,r]=n,o=t.isBackward(),s=i.getNode(),a=r.getNode(),l=e.is(s),c=e.is(a);if(l||c){const[u,d]=_Pe(t),h=s.is(a),f=e.is(o?a:s),m=e.is(o?s:a);let p=0,g;if(h)p=u>d?d:u,g=u>d?u:d;else if(f)p=o?d:u,g=void 0;else if(m){const y=o?u:d;p=0,g=y}return e.__text=e.__text.slice(p,g),e}}return e}function pae(t){if(t.type==="text")return t.offset===t.getNode().getTextContentSize();const e=t.getNode();if(!Mn(e))throw Error("isAtNodeEnd: node must be a TextNode or ElementNode");return t.offset===e.getChildrenSize()}function r_r(t){const e=t.getStyle(),n=i_r(e);n_r.set(e,n)}function Ybt(t,e){const n=xU(t.focus,e);return Oa(n)&&!n.isIsolated()||Mn(n)&&!n.isInline()&&!n.canBeEmpty()}function o_r(t,e,n,i){t.modify(e?"extend":"move",n,i)}function s_r(t){const e=t.anchor.getNode();return(Nf(e)?e:e.getParentOrThrow()).getDirection()==="rtl"}function Xbt(t,e,n){const i=s_r(t);o_r(t,e,n?!i:i,"character")}const vWt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a_r=vWt&&"documentMode"in document?document.documentMode:null;vWt&&"InputEvent"in window&&!a_r&&"getTargetRanges"in new window.InputEvent("input");function yWt(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[i]of n.matchAll(/\S+/g))e.push(i);return e}function Bw(...t){return()=>{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}function i_(t,...e){const n=yWt(...e);n.length>0&&t.classList.add(...n)}function Qpe(t,...e){const n=yWt(...e);n.length>0&&t.classList.remove(...n)}function l_r(t){const e=Jpe(t,n=>Mn(n)&&!n.isInline());if(!Mn(e))throw Error(`Expected node ${t.__key} to have closest block element node.`);return e}const Jpe=(t,e)=>{let n=t;for(;n!==Vc()&&n!=null;){if(e(n))return n;n=n.getParent()}return null};function Mk(t,e){return t!==null?Object.getPrototypeOf(t).constructor.name===e.name:!1}const c_r=new Set(["http:","https:","mailto:","sms:","tel:"]);class xM extends Vw{static getType(){return"link"}static clone(e){return new xM(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e,n={},i){super(i);const{target:r=null,rel:o=null,title:s=null}=n;this.__url=e,this.__target=r,this.__rel=o,this.__title=s}createDOM(e){const n=document.createElement("a");return n.href=this.sanitizeUrl(this.__url),this.__target!==null&&(n.target=this.__target),this.__rel!==null&&(n.rel=this.__rel),this.__title!==null&&(n.title=this.__title),i_(n,e.theme.link),n}updateDOM(e,n,i){if(n instanceof HTMLAnchorElement){const r=this.__url,o=this.__target,s=this.__rel,a=this.__title;r!==e.__url&&(n.href=r),o!==e.__target&&(o?n.target=o:n.removeAttribute("target")),s!==e.__rel&&(s?n.rel=s:n.removeAttribute("rel")),a!==e.__title&&(a?n.title=a:n.removeAttribute("title"))}return!1}static importDOM(){return{a:e=>({conversion:u_r,priority:1})}}static importJSON(e){const n=NU(e.url,{rel:e.rel,target:e.target,title:e.title});return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}sanitizeUrl(e){try{const n=new URL(e);if(!c_r.has(n.protocol))return"about:blank"}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(e){const n=this.getWritable();n.__url=e}getTarget(){return this.getLatest().__target}setTarget(e){const n=this.getWritable();n.__target=e}getRel(){return this.getLatest().__rel}setRel(e){const n=this.getWritable();n.__rel=e}getTitle(){return this.getLatest().__title}setTitle(e){const n=this.getWritable();n.__title=e}insertNewAfter(e,n=!0){const i=NU(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(i,n),i}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,n,i){if(!Jn(n))return!1;const r=n.anchor.getNode(),o=n.focus.getNode();return this.isParentOf(r)&&this.isParentOf(o)&&n.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function u_r(t){let e=null;if(Fyr(t)){const n=t.textContent;(n!==null&&n!==""||t.children.length>0)&&(e=NU(t.getAttribute("href")||"",{rel:t.getAttribute("rel"),target:t.getAttribute("target"),title:t.getAttribute("title")}))}return{node:e}}function NU(t,e){return Sb(new xM(t,e))}function i0(t){return t instanceof xM}class _$ extends xM{constructor(e,n={},i){super(e,n,i),this.__isUnlinked=n.isUnlinked!==void 0&&n.isUnlinked!==null?n.isUnlinked:!1}static getType(){return"autolink"}static clone(e){return new _$(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){const n=this.getWritable();return n.__isUnlinked=e,n}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,n,i){return super.updateDOM(e,n,i)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){const n=CPe(e.url,{isUnlinked:e.isUnlinked,rel:e.rel,target:e.target,title:e.title});return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked,type:"autolink",version:1}}insertNewAfter(e,n=!0){const i=this.getParentOrThrow().insertNewAfter(e,n);if(Mn(i)){const r=CPe(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return i.append(r),r}return null}}function CPe(t,e){return Sb(new _$(t,e))}function q3(t){return t instanceof _$}const SD=mo("TOGGLE_LINK_COMMAND");function NSe(t,e={}){const{target:n,title:i}=e,r=e.rel===void 0?"noreferrer":e.rel,o=Fi();if(!Jn(o))return;const s=o.extract();if(t===null)s.forEach(a=>{const l=a.getParent();if(!q3(l)&&i0(l)){const c=l.getChildren();for(let u=0;u<c.length;u++)l.insertBefore(c[u]);l.remove()}});else{if(s.length===1){const c=s[0],u=d_r(c,i0);if(u!==null){u.setURL(t),n!==void 0&&u.setTarget(n),r!==null&&u.setRel(r),i!==void 0&&u.setTitle(i);return}}let a=null,l=null;s.forEach(c=>{const u=c.getParent();if(!(u===l||u===null||Mn(c)&&!c.isInline())){if(i0(u)){l=u,u.setURL(t),n!==void 0&&u.setTarget(n),r!==null&&l.setRel(r),i!==void 0&&l.setTitle(i);return}if(u.is(a)||(a=u,l=NU(t,{rel:r,target:n,title:i}),i0(u)?c.getPreviousSibling()===null?u.insertBefore(l):u.insertAfter(l):c.insertBefore(l)),i0(c)){if(c.is(l))return;if(l!==null){const d=c.getChildren();for(let h=0;h<d.length;h++)l.append(d[h])}c.remove();return}l!==null&&l.append(c)}})}}function d_r(t,e){let n=t;for(;n!==null&&n.getParent()!==null&&!e(n);)n=n.getParentOrThrow();return e(n)?n:null}const _Wt=b.createContext(null);function h_r(t,e){function n(){return e??null}return{getTheme:n}}function Jv(){const t=b.useContext(_Wt);if(t==null)throw Error("LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext");return t}const xWt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",f_r=xWt?b.useLayoutEffect:b.useEffect,SJ={tag:"history-merge"};function m_r({initialConfig:t,children:e}){const n=b.useMemo(()=>{const{theme:i,namespace:r,nodes:o,onError:s,editorState:a,html:l}=t,c=h_r(null,i),u=t_r({editable:t.editable,html:l,namespace:r,nodes:o,onError:d=>s(d,u),theme:i});return p_r(u,a),[u,c]},[]);return f_r(()=>{const i=t.editable,[r]=n;r.setEditable(i!==void 0?i:!0)},[]),ne.jsx(_Wt.Provider,{value:n,children:e})}function p_r(t,e){if(e!==null){if(e===void 0)t.update(()=>{const n=Vc();if(n.isEmpty()){const i=gd();n.append(i);const r=xWt?document.activeElement:null;(Fi()!==null||r!==null&&r===t.getRootElement())&&i.select()}},SJ);else if(e!==null)switch(typeof e){case"string":{const n=t.parseEditorState(e);t.setEditorState(n,SJ);break}case"object":{t.setEditorState(e,SJ);break}case"function":{t.update(()=>{Vc().isEmpty()&&e(t)},SJ);break}}}}function g_r(t){let e=1,n=t.getParent();for(;n!=null;){if(vh(n)){const i=n.getParent();if(Na(i)){e++,n=i.getParent();continue}throw Error("A ListItemNode must have a ListNode for a parent.")}return e}return e}function Sx(t){return vh(t)&&Na(t.getFirstChild())}function Zbt(t){return ww().append(t)}function wWt(t,e){t.splice(t.getChildrenSize(),0,e)}function wHe(t,e){const n=t.getLastChild(),i=e.getFirstChild();n&&i&&Sx(n)&&Sx(i)&&(wHe(n.getFirstChild(),i.getFirstChild()),i.remove());const r=e.getChildren();r.length>0&&t.append(...r),e.remove()}function b_r(t){const e=t.getListType()!=="check";let n=t.getStart();for(const i of t.getChildren())vh(i)&&(i.getValue()!==n&&i.setValue(n),e&&i.getLatest().__checked!=null&&i.setChecked(void 0),Na(i.getFirstChild())||n++)}function v_r(t){const e=t.getNextSibling();Na(e)&&t.getListType()===e.getListType()&&wHe(t,e)}function y_r(t){const e=new Set;if(Sx(t)||e.has(t.getKey()))return;const n=t.getParent(),i=t.getNextSibling(),r=t.getPreviousSibling();if(Sx(i)&&Sx(r)){const o=r.getFirstChild();if(Na(o)){o.append(t);const s=i.getFirstChild();if(Na(s)){const a=s.getChildren();wWt(o,a),i.remove(),e.add(i.getKey())}}}else if(Sx(i)){const o=i.getFirstChild();if(Na(o)){const s=o.getFirstChild();s!==null&&s.insertBefore(t)}}else if(Sx(r)){const o=r.getFirstChild();Na(o)&&o.append(t)}else if(Na(n)){const o=ww(),s=L0(n.getListType());o.append(s),s.append(t),r?r.insertAfter(o):i?i.insertBefore(o):n.append(o)}}function __r(t){if(Sx(t))return;const e=t.getParent(),n=e?e.getParent():void 0,i=n?n.getParent():void 0;if(Na(i)&&vh(n)&&Na(e)){const r=e?e.getFirstChild():void 0,o=e?e.getLastChild():void 0;if(t.is(r))n.insertBefore(t),e.isEmpty()&&n.remove();else if(t.is(o))n.insertAfter(t),e.isEmpty()&&n.remove();else{const s=e.getListType(),a=ww(),l=L0(s);a.append(l),t.getPreviousSiblings().forEach(d=>l.append(d));const c=ww(),u=L0(s);c.append(u),wWt(u,t.getNextSiblings()),n.insertBefore(a),n.insertAfter(c),n.replace(t)}}}function gae(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[i]of n.matchAll(/\S+/g))e.push(i);return e}class mR extends Vw{static getType(){return"listitem"}static clone(e){return new mR(e.__value,e.__checked,e.__key)}constructor(e,n,i){super(i),this.__value=e===void 0?1:e,this.__checked=n}createDOM(e){const n=document.createElement("li"),i=this.getParent();return Na(i)&&i.getListType()==="check"&&Jbt(n,this,null),n.value=this.__value,Qbt(n,e.theme,this),n}updateDOM(e,n,i){const r=this.getParent();return Na(r)&&r.getListType()==="check"&&Jbt(n,this,e),n.value=this.__value,Qbt(n,i.theme,this),!1}static transform(){return e=>{if(!vh(e))throw Error("node is not a ListItemNode");if(e.__checked==null)return;const n=e.getParent();Na(n)&&n.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0)}}static importDOM(){return{li:()=>({conversion:x_r,priority:0})}}static importJSON(e){const n=ww();return n.setChecked(e.checked),n.setValue(e.value),n.setFormat(e.format),n.setDirection(e.direction),n}exportDOM(e){const n=this.createDOM(e._config);return n.style.textAlign=this.getFormatType(),{element:n}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...e){for(let n=0;n<e.length;n++){const i=e[n];if(Mn(i)&&this.canMergeWith(i)){const r=i.getChildren();this.append(...r),i.remove()}else super.append(i)}return this}replace(e,n){if(vh(e))return super.replace(e);this.setIndent(0);const i=this.getParentOrThrow();if(!Na(i))return e;if(i.__first===this.getKey())i.insertBefore(e);else if(i.__last===this.getKey())i.insertAfter(e);else{const r=L0(i.getListType());let o=this.getNextSibling();for(;o;){const s=o;o=o.getNextSibling(),r.append(s)}i.insertAfter(e),e.insertAfter(r)}if(n){if(!Mn(e))throw Error("includeChildren should only be true for ElementNodes");this.getChildren().forEach(r=>{e.append(r)})}return this.remove(),i.getChildrenSize()===0&&i.remove(),e}insertAfter(e,n=!0){const i=this.getParentOrThrow();if(!Na(i))throw Error("insertAfter: list node is not parent of list item node");if(vh(e))return super.insertAfter(e,n);const r=this.getNextSiblings();if(i.insertAfter(e,n),r.length!==0){const o=L0(i.getListType());r.forEach(s=>o.append(s)),e.insertAfter(o,n)}return e}remove(e){const n=this.getPreviousSibling(),i=this.getNextSibling();super.remove(e),n&&i&&Sx(n)&&Sx(i)&&(wHe(n.getFirstChild(),i.getFirstChild()),i.remove())}insertNewAfter(e,n=!0){const i=ww(this.__checked==null?void 0:!1);return this.insertAfter(i,n),i}collapseAtStart(e){const n=gd();this.getChildren().forEach(a=>n.append(a));const r=this.getParentOrThrow(),o=r.getParentOrThrow(),s=vh(o);if(r.getChildrenSize()===1)if(s)r.remove(),o.select();else{r.insertBefore(n),r.remove();const a=e.anchor,l=e.focus,c=n.getKey();a.type==="element"&&a.getNode().is(this)&&a.set(c,a.offset,"element"),l.type==="element"&&l.getNode().is(this)&&l.set(c,l.offset,"element")}else r.insertBefore(n),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){const n=this.getWritable();n.__value=e}getChecked(){const e=this.getLatest();let n;const i=this.getParent();return Na(i)&&(n=i.getListType()),n==="check"?!!e.__checked:void 0}setChecked(e){const n=this.getWritable();n.__checked=e}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){const e=this.getParent();if(e===null)return this.getLatest().__indent;let n=e.getParentOrThrow(),i=0;for(;vh(n);)n=n.getParentOrThrow().getParentOrThrow(),i++;return i}setIndent(e){if(typeof e!="number")throw Error("Invalid indent value.");if(e=Math.floor(e),!(e>=0))throw Error("Indent value must be non-negative.");let n=this.getIndent();for(;n!==e;)n<e?(y_r(this),n++):(__r(this),n--);return this}canInsertAfter(e){return vh(e)}canReplaceWith(e){return vh(e)}canMergeWith(e){return y$(e)||vh(e)}extractWithChild(e,n){if(!Jn(n))return!1;const i=n.anchor.getNode(),r=n.focus.getNode();return this.isParentOf(i)&&this.isParentOf(r)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return L0("bullet")}canMergeWhenEmpty(){return!0}}function Qbt(t,e,n){const i=[],r=[],o=e.list,s=o?o.listitem:void 0;let a;if(o&&o.nested&&(a=o.nested.listitem),s!==void 0&&i.push(...gae(s)),o){const l=n.getParent(),c=Na(l)&&l.getListType()==="check",u=n.getChecked();(!c||u)&&r.push(o.listitemUnchecked),(!c||!u)&&r.push(o.listitemChecked),c&&i.push(u?o.listitemChecked:o.listitemUnchecked)}if(a!==void 0){const l=gae(a);n.getChildren().some(c=>Na(c))?i.push(...l):r.push(...l)}r.length>0&&Qpe(t,...r),i.length>0&&i_(t,...i)}function Jbt(t,e,n,i){Na(e.getFirstChild())?(t.removeAttribute("role"),t.removeAttribute("tabIndex"),t.removeAttribute("aria-checked")):(t.setAttribute("role","checkbox"),t.setAttribute("tabIndex","-1"),(!n||e.__checked!==n.__checked)&&t.setAttribute("aria-checked",e.getChecked()?"true":"false"))}function x_r(t){if(t.classList.contains("task-list-item")){for(const r of t.children)if(r.tagName==="INPUT")return w_r(r)}const n=t.getAttribute("aria-checked");return{node:ww(n==="true"?!0:n==="false"?!1:void 0)}}function w_r(t){if(!(t.getAttribute("type")==="checkbox"))return{node:null};const n=t.hasAttribute("checked");return{node:ww(n)}}function ww(t){return Sb(new mR(void 0,t))}function vh(t){return t instanceof mR}class pR extends Vw{static getType(){return"list"}static clone(e){const n=e.__listType||nvt[e.__tag];return new pR(n,e.__start,e.__key)}constructor(e,n,i){super(i);const r=nvt[e]||e;this.__listType=r,this.__tag=r==="number"?"ol":"ul",this.__start=n}getTag(){return this.__tag}setListType(e){const n=this.getWritable();n.__listType=e,n.__tag=e==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(e,n){const i=this.__tag,r=document.createElement(i);return this.__start!==1&&r.setAttribute("start",String(this.__start)),r.__lexicalListType=this.__listType,evt(r,e.theme,this),r}updateDOM(e,n,i){return e.__tag!==this.__tag?!0:(evt(n,i.theme,this),!1)}static transform(){return e=>{if(!Na(e))throw Error("node is not a ListNode");v_r(e),b_r(e)}}static importDOM(){return{ol:()=>({conversion:tvt,priority:0}),ul:()=>({conversion:tvt,priority:0})}}static importJSON(e){const n=L0(e.listType,e.start);return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportDOM(e){const{element:n}=super.exportDOM(e);return n&&eN(n)&&(this.__start!==1&&n.setAttribute("start",String(this.__start)),this.__listType==="check"&&n.setAttribute("__lexicalListType","check")),{element:n}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...e){for(let n=0;n<e.length;n++){const i=e[n];if(vh(i))super.append(i);else{const r=ww();if(Na(i))r.append(i);else if(Mn(i)){const o=Dc(i.getTextContent());r.append(o)}else r.append(i);super.append(r)}}return this}extractWithChild(e){return vh(e)}}function evt(t,e,n){const i=[],r=[],o=e.list;if(o!==void 0){const s=o[`${n.__tag}Depth`]||[],a=g_r(n)-1,l=a%s.length,c=s[l],u=o[n.__tag];let d;const h=o.nested,f=o.checklist;if(h!==void 0&&h.list&&(d=h.list),u!==void 0&&i.push(u),f!==void 0&&n.__listType==="check"&&i.push(f),c!==void 0){i.push(...gae(c));for(let m=0;m<s.length;m++)m!==l&&r.push(n.__tag+m)}if(d!==void 0){const m=gae(d);a>1?i.push(...m):r.push(...m)}}r.length>0&&Qpe(t,...r),i.length>0&&i_(t,...i)}function C_r(t){const e=[];for(let n=0;n<t.length;n++){const i=t[n];if(vh(i)){e.push(i);const r=i.getChildren();r.length>1&&r.forEach(o=>{Na(o)&&e.push(Zbt(o))})}else e.push(Zbt(i))}return e}function S_r(t){if(t.getAttribute("__lexicallisttype")==="check"||t.classList.contains("contains-task-list"))return!0;for(const e of t.childNodes)if(eN(e)&&e.hasAttribute("aria-checked"))return!0;return!1}function tvt(t){const e=t.nodeName.toLowerCase();let n=null;if(e==="ol"){const i=t.start;n=L0("number",i)}else e==="ul"&&(S_r(t)?n=L0("check"):n=L0("bullet"));return{after:C_r,node:n}}const nvt={ol:"number",ul:"bullet"};function L0(t,e=1){return Sb(new pR(t,e))}function Na(t){return t instanceof pR}var N_r={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
 * Prism: Lightweight, robust, elegant syntax highlighting
 *
 * @license MIT <https://opensource.org/licenses/MIT>
 * @author Lea Verou <https://lea.verou.me>
 * @namespace
 * @public
 */var n=function(i){var r=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,s={},a={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function _(w){return w instanceof l?new l(w.type,_(w.content),w.alias):Array.isArray(w)?w.map(_):w.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(_){return Object.prototype.toString.call(_).slice(8,-1)},objId:function(_){return _.__id||Object.defineProperty(_,"__id",{value:++o}),_.__id},clone:function _(w,C){C=C||{};var N,E;switch(a.util.type(w)){case"Object":if(E=a.util.objId(w),C[E])return C[E];N={},C[E]=N;for(var D in w)w.hasOwnProperty(D)&&(N[D]=_(w[D],C));return N;case"Array":return E=a.util.objId(w),C[E]?C[E]:(N=[],C[E]=N,w.forEach(function(k,M){N[M]=_(k,C)}),N);default:return w}},getLanguage:function(_){for(;_;){var w=r.exec(_.className);if(w)return w[1].toLowerCase();_=_.parentElement}return"none"},setLanguage:function(_,w){_.className=_.className.replace(RegExp(r,"gi"),""),_.classList.add("language-"+w)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(N){var _=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(N.stack)||[])[1];if(_){var w=document.getElementsByTagName("script");for(var C in w)if(w[C].src==_)return w[C]}return null}},isActive:function(_,w,C){for(var N="no-"+w;_;){var E=_.classList;if(E.contains(w))return!0;if(E.contains(N))return!1;_=_.parentElement}return!!C}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(_,w){var C=a.util.clone(a.languages[_]);for(var N in w)C[N]=w[N];return C},insertBefore:function(_,w,C,N){N=N||a.languages;var E=N[_],D={};for(var k in E)if(E.hasOwnProperty(k)){if(k==w)for(var M in C)C.hasOwnProperty(M)&&(D[M]=C[M]);C.hasOwnProperty(k)||(D[k]=E[k])}var T=N[_];return N[_]=D,a.languages.DFS(a.languages,function(A,R){R===T&&A!=_&&(this[A]=D)}),D},DFS:function _(w,C,N,E){E=E||{};var D=a.util.objId;for(var k in w)if(w.hasOwnProperty(k)){C.call(w,k,w[k],N||k);var M=w[k],T=a.util.type(M);T==="Object"&&!E[D(M)]?(E[D(M)]=!0,_(M,C,null,E)):T==="Array"&&!E[D(M)]&&(E[D(M)]=!0,_(M,C,k,E))}}},plugins:{},highlightAll:function(_,w){a.highlightAllUnder(document,_,w)},highlightAllUnder:function(_,w,C){var N={callback:C,container:_,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",N),N.elements=Array.prototype.slice.apply(N.container.querySelectorAll(N.selector)),a.hooks.run("before-all-elements-highlight",N);for(var E=0,D;D=N.elements[E++];)a.highlightElement(D,w===!0,N.callback)},highlightElement:function(_,w,C){var N=a.util.getLanguage(_),E=a.languages[N];a.util.setLanguage(_,N);var D=_.parentElement;D&&D.nodeName.toLowerCase()==="pre"&&a.util.setLanguage(D,N);var k=_.textContent,M={element:_,language:N,grammar:E,code:k};function T(R){M.highlightedCode=R,a.hooks.run("before-insert",M),M.element.innerHTML=M.highlightedCode,a.hooks.run("after-highlight",M),a.hooks.run("complete",M),C&&C.call(M.element)}if(a.hooks.run("before-sanity-check",M),D=M.element.parentElement,D&&D.nodeName.toLowerCase()==="pre"&&!D.hasAttribute("tabindex")&&D.setAttribute("tabindex","0"),!M.code){a.hooks.run("complete",M),C&&C.call(M.element);return}if(a.hooks.run("before-highlight",M),!M.grammar){T(a.util.encode(M.code));return}if(w&&i.Worker){var A=new Worker(a.filename);A.onmessage=function(R){T(R.data)},A.postMessage(JSON.stringify({language:M.language,code:M.code,immediateClose:!0}))}else T(a.highlight(M.code,M.grammar,M.language))},highlight:function(_,w,C){var N={code:_,grammar:w,language:C};if(a.hooks.run("before-tokenize",N),!N.grammar)throw new Error('The language "'+N.language+'" has no grammar.');return N.tokens=a.tokenize(N.code,N.grammar),a.hooks.run("after-tokenize",N),l.stringify(a.util.encode(N.tokens),N.language)},tokenize:function(_,w){var C=w.rest;if(C){for(var N in C)w[N]=C[N];delete w.rest}var E=new d;return h(E,E.head,_),u(_,E,w,E.head,0),m(E)},hooks:{all:{},add:function(_,w){var C=a.hooks.all;C[_]=C[_]||[],C[_].push(w)},run:function(_,w){var C=a.hooks.all[_];if(!(!C||!C.length))for(var N=0,E;E=C[N++];)E(w)}},Token:l};i.Prism=a;function l(_,w,C,N){this.type=_,this.content=w,this.alias=C,this.length=(N||"").length|0}l.stringify=function _(w,C){if(typeof w=="string")return w;if(Array.isArray(w)){var N="";return w.forEach(function(T){N+=_(T,C)}),N}var E={type:w.type,content:_(w.content,C),tag:"span",classes:["token",w.type],attributes:{},language:C},D=w.alias;D&&(Array.isArray(D)?Array.prototype.push.apply(E.classes,D):E.classes.push(D)),a.hooks.run("wrap",E);var k="";for(var M in E.attributes)k+=" "+M+'="'+(E.attributes[M]||"").replace(/"/g,"&quot;")+'"';return"<"+E.tag+' class="'+E.classes.join(" ")+'"'+k+">"+E.content+"</"+E.tag+">"};function c(_,w,C,N){_.lastIndex=w;var E=_.exec(C);if(E&&N&&E[1]){var D=E[1].length;E.index+=D,E[0]=E[0].slice(D)}return E}function u(_,w,C,N,E,D){for(var k in C)if(!(!C.hasOwnProperty(k)||!C[k])){var M=C[k];M=Array.isArray(M)?M:[M];for(var T=0;T<M.length;++T){if(D&&D.cause==k+","+T)return;var A=M[T],R=A.inside,P=!!A.lookbehind,O=!!A.greedy,V=A.alias;if(O&&!A.pattern.global){var F=A.pattern.toString().match(/[imsuy]*$/)[0];A.pattern=RegExp(A.pattern.source,F+"g")}for(var $=A.pattern||A,B=N.next,z=E;B!==w.tail&&!(D&&z>=D.reach);z+=B.value.length,B=B.next){var H=B.value;if(w.length>_.length)return;if(!(H instanceof l)){var K=1,q;if(O){if(q=c($,z,_,P),!q||q.index>=_.length)break;var ae=q.index,U=q.index+q[0].length,Y=z;for(Y+=B.value.length;ae>=Y;)B=B.next,Y+=B.value.length;if(Y-=B.value.length,z=Y,B.value instanceof l)continue;for(var J=B;J!==w.tail&&(Y<U||typeof J.value=="string");J=J.next)K++,Y+=J.value.length;K--,H=_.slice(z,Y),q.index-=z}else if(q=c($,0,H,P),!q)continue;var ae=q.index,se=q[0],oe=H.slice(0,ae),fe=H.slice(ae+se.length),de=z+H.length;D&&de>D.reach&&(D.reach=de);var ie=B.prev;oe&&(ie=h(w,ie,oe),z+=oe.length),f(w,ie,K);var Q=new l(k,R?a.tokenize(se,R):se,V,se);if(B=h(w,ie,Q),fe&&h(w,B,fe),K>1){var be={cause:k+","+T,reach:de};u(_,w,C,B.prev,z,be),D&&be.reach>D.reach&&(D.reach=be.reach)}}}}}}function d(){var _={value:null,prev:null,next:null},w={value:null,prev:_,next:null};_.next=w,this.head=_,this.tail=w,this.length=0}function h(_,w,C){var N=w.next,E={value:C,prev:w,next:N};return w.next=E,N.prev=E,_.length++,E}function f(_,w,C){for(var N=w.next,E=0;E<C&&N!==_.tail;E++)N=N.next;w.next=N,N.prev=w,_.length-=E}function m(_){for(var w=[],C=_.head.next;C!==_.tail;)w.push(C.value),C=C.next;return w}if(!i.document)return i.addEventListener&&(a.disableWorkerMessageHandler||i.addEventListener("message",function(_){var w=JSON.parse(_.data),C=w.language,N=w.code,E=w.immediateClose;i.postMessage(a.highlight(N,a.languages[C],C)),E&&i.close()},!1)),a;var p=a.util.currentScript();p&&(a.filename=p.src,p.hasAttribute("data-manual")&&(a.manual=!0));function g(){a.manual||a.highlightAll()}if(!a.manual){var y=document.readyState;y==="loading"||y==="interactive"&&p&&p.defer?document.addEventListener("DOMContentLoaded",g):window.requestAnimationFrame?window.requestAnimationFrame(g):window.setTimeout(g,16)}return a}(e);t.exports&&(t.exports=n),typeof Bl<"u"&&(Bl.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&amp;/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(r,o){var s={};s["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};a["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var l={};l[r]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:a},n.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(i,r){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:n.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(i){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+r.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var o=i.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading…",r=function(p,g){return"✖ Error "+p+" while fetching file: "+g},o="✖ Error: File does not exist or is empty",s={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},a="data-src-status",l="loading",c="loaded",u="failed",d="pre[data-src]:not(["+a+'="'+c+'"]):not(['+a+'="'+l+'"])';function h(p,g,y){var _=new XMLHttpRequest;_.open("GET",p,!0),_.onreadystatechange=function(){_.readyState==4&&(_.status<400&&_.responseText?g(_.responseText):_.status>=400?y(r(_.status,_.statusText)):y(o))},_.send(null)}function f(p){var g=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(p||"");if(g){var y=Number(g[1]),_=g[2],w=g[3];return _?w?[y,Number(w)]:[y,void 0]:[y,y]}}n.hooks.add("before-highlightall",function(p){p.selector+=", "+d}),n.hooks.add("before-sanity-check",function(p){var g=p.element;if(g.matches(d)){p.code="",g.setAttribute(a,l);var y=g.appendChild(document.createElement("CODE"));y.textContent=i;var _=g.getAttribute("data-src"),w=p.language;if(w==="none"){var C=(/\.(\w+)$/.exec(_)||[,"none"])[1];w=s[C]||C}n.util.setLanguage(y,w),n.util.setLanguage(g,w);var N=n.plugins.autoloader;N&&N.loadLanguages(w),h(_,function(E){g.setAttribute(a,c);var D=f(g.getAttribute("data-range"));if(D){var k=E.split(/\r\n?|\n/g),M=D[0],T=D[1]==null?k.length:D[1];M<0&&(M+=k.length),M=Math.max(0,Math.min(M-1,k.length)),T<0&&(T+=k.length),T=Math.max(0,Math.min(T,k.length)),E=k.slice(M,T).join(`
`),g.hasAttribute("data-start")||g.setAttribute("data-start",String(M+1))}y.textContent=E,n.highlightElement(y)},function(E){g.setAttribute(a,u),y.textContent=E})}}),n.plugins.fileHighlight={highlight:function(g){for(var y=(g||document).querySelectorAll(d),_=0,w;w=y[_++];)n.highlightElement(w)}};var m=!1;n.fileHighlight=function(){m||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),m=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(N_r);Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.replace(/&amp;/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,n){var i={};i["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};r["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(t,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(t){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(u){return u=u.replace(/<inner>/g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+u+")")}var i=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,r=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return i}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+r+o+"(?:"+r+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+r+o+")(?:"+r+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(i),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+r+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+r+"$"),inside:{"table-header":{pattern:RegExp(i),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(u){["url","bold","italic","strike","code-snippet"].forEach(function(d){u!==d&&(t.languages.markdown[u].inside.content.inside[d]=t.languages.markdown[d])})}),t.hooks.add("after-tokenize",function(u){if(u.language!=="markdown"&&u.language!=="md")return;function d(h){if(!(!h||typeof h=="string"))for(var f=0,m=h.length;f<m;f++){var p=h[f];if(p.type!=="code"){d(p.content);continue}var g=p.content[1],y=p.content[3];if(g&&y&&g.type==="code-language"&&y.type==="code-block"&&typeof g.content=="string"){var _=g.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");_=(/[a-z][\w-]*/i.exec(_)||[""])[0].toLowerCase();var w="language-"+_;y.alias?typeof y.alias=="string"?y.alias=[y.alias,w]:y.alias.push(w):y.alias=[w]}}}d(u.tokens)}),t.hooks.add("wrap",function(u){if(u.type==="code-block"){for(var d="",h=0,f=u.classes.length;h<f;h++){var m=u.classes[h],p=/language-(.+)/.exec(m);if(p){d=p[1];break}}var g=t.languages[d];if(g)u.content=t.highlight(c(u.content),g,d);else if(d&&d!=="none"&&t.plugins.autoloader){var y="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);u.attributes.id=y,t.plugins.autoloader.loadLanguages(d,function(){var _=document.getElementById(y);_&&(_.innerHTML=t.highlight(_.textContent,t.languages[d],d))})}}});var s=RegExp(t.languages.markup.tag.pattern.source,"gi"),a={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function c(u){var d=u.replace(s,"");return d=d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(h,f){if(f=f.toLowerCase(),f[0]==="#"){var m;return f[1]==="x"?m=parseInt(f.slice(2),16):m=Number(f.slice(1)),l(m)}else{var p=a[f];return p||h}}),d}t.languages.md=t.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(t){var e=t.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};e.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:e},boolean:e.boolean,variable:e.variable}})(Prism);Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(t){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(Prism);Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ 	]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(t){t.inside.interpolation.inside=Prism.languages.swift});(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var e=t.languages.extend("typescript",{});delete e["class-name"],t.languages.typescript["class-name"].inside=e,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),t.languages.ts=t.languages.typescript})(Prism);(function(t){var e=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,i={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};t.languages.java=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[i,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:i.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:i.inside}],keyword:e,function:[t.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),t.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),t.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:i.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:i.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);(function(t){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return e.source});t.languages.cpp=t.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),t.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),t.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t.languages.cpp}}}}),t.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:t.languages.extend("cpp",{})}}),t.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},t.languages.cpp["base-clause"])})(Prism);const ivt=t=>{try{return t?window.Prism.languages.hasOwnProperty(t):!1}catch{return!1}};function CWt(t,e){for(const n of t.childNodes){if(eN(n)&&n.tagName===e)return!0;CWt(n,e)}return!1}const l9="data-language",NJ="data-highlight-language";class xG extends Vw{static getType(){return"code"}static clone(e){return new xG(e.__language,e.__key)}constructor(e,n){super(n),this.__language=e,this.__isSyntaxHighlightSupported=ivt(e)}createDOM(e){const n=document.createElement("code");i_(n,e.theme.code),n.setAttribute("spellcheck","false");const i=this.getLanguage();return i&&(n.setAttribute(l9,i),this.getIsSyntaxHighlightSupported()&&n.setAttribute(NJ,i)),n}updateDOM(e,n,i){const r=this.__language,o=e.__language;return r?r!==o&&(n.setAttribute(l9,r),this.__isSyntaxHighlightSupported&&n.setAttribute(NJ,r)):o&&(n.removeAttribute(l9),e.__isSyntaxHighlightSupported&&n.removeAttribute(NJ)),!1}exportDOM(e){const n=document.createElement("pre");i_(n,e._config.theme.code),n.setAttribute("spellcheck","false");const i=this.getLanguage();return i&&(n.setAttribute(l9,i),this.getIsSyntaxHighlightSupported()&&n.setAttribute(NJ,i)),{element:n}}static importDOM(){return{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||CWt(e,"BR"))?{conversion:rvt,priority:1}:null,div:()=>({conversion:E_r,priority:1}),pre:()=>({conversion:rvt,priority:0}),table:e=>ESe(e)?{conversion:D_r,priority:3}:null,td:e=>{const n=e,i=n.closest("table");return M_r(n)||i&&ESe(i)?{conversion:ovt,priority:3}:null},tr:e=>{const i=e.closest("table");return i&&ESe(i)?{conversion:ovt,priority:3}:null}}}static importJSON(e){const n=gR(e.language);return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(e,n=!0){const i=this.getChildren(),r=i.length;if(r>=2&&i[r-1].getTextContent()===`
`&&i[r-2].getTextContent()===`
`&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===r){i[r-1].remove(),i[r-2].remove();const c=gd();return this.insertAfter(c,n),c}const{anchor:o,focus:s}=e,l=(o.isBefore(s)?o:s).getNode();if(ai(l)){let c=L_r(l);const u=[];for(;;)if(gHe(c))u.push(b$()),c=c.getNextSibling();else if(EWt(c)){let y=0;const _=c.getTextContent(),w=c.getTextContentSize();for(;y<w&&_[y]===" ";)y++;if(y!==0&&u.push(NWt(" ".repeat(y))),y!==w)break;c=c.getNextSibling()}else break;const d=l.splitText(o.offset)[0],h=o.offset===0?0:1,f=d.getIndexWithinParent()+h,m=l.getParentOrThrow(),p=[n_(),...u];m.splice(f,0,p);const g=u[u.length-1];g?g.select():o.offset===0?d.selectPrevious():d.getNextSibling().selectNext(0,0)}if(CHe(l)){const{offset:c}=e.anchor;l.splice(c,0,[n_()]),l.select(c+1,c+1)}return null}canIndent(){return!1}collapseAtStart(){const e=gd();return this.getChildren().forEach(i=>e.append(i)),this.replace(e),!0}setLanguage(e){const n=this.getWritable();n.__language=e,n.__isSyntaxHighlightSupported=ivt(e)}getLanguage(){return this.getLatest().__language}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}}function gR(t){return Sb(new xG(t))}function CHe(t){return t instanceof xG}function rvt(t){const e=t.getAttribute(l9);return{node:gR(e)}}function E_r(t){const e=t,n=SWt(e);return!n&&!k_r(e)?{node:null}:{node:n?gR():null}}function D_r(){return{node:gR()}}function ovt(){return{node:null}}function SWt(t){return t.style.fontFamily.match("monospace")!==null}function k_r(t){let e=t.parentElement;for(;e!==null;){if(SWt(e))return!0;e=e.parentElement}return!1}function M_r(t){return t.classList.contains("js-file-line")}function ESe(t){return t.classList.contains("js-file-line-container")}class ege extends yM{constructor(e,n,i){super(e,i),this.__highlightType=n}static getType(){return"code-highlight"}static clone(e){return new ege(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}canHaveFormat(){return!1}createDOM(e){const n=super.createDOM(e),i=DSe(e.theme,this.__highlightType);return i_(n,i),n}updateDOM(e,n,i){const r=super.updateDOM(e,n,i),o=DSe(i.theme,e.__highlightType),s=DSe(i.theme,this.__highlightType);return o!==s&&(o&&Qpe(n,o),s&&i_(n,s)),r}static importJSON(e){const n=NWt(e.text,e.highlightType);return n.setFormat(e.format),n.setDetail(e.detail),n.setMode(e.mode),n.setStyle(e.style),n}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return gR()}}function DSe(t,e){return e&&t&&t.codeHighlight&&t.codeHighlight[e]}function NWt(t,e){return Sb(new ege(t,e))}function EWt(t){return t instanceof ege}function L_r(t){let e=t,n=t;for(;EWt(n)||gHe(n);)e=n,n=n.getPreviousSibling();return e}function T_r(t,e){const n=e.body?e.body.childNodes:[];let i=[];const r=[];for(let o=0;o<n.length;o++){const s=n[o];if(!kWt.has(s.nodeName)){const a=MWt(s,t,r,!1);a!==null&&(i=i.concat(a))}}return R_r(r),i}function I_r(t,e){if(typeof document>"u"||typeof window>"u"&&typeof global.window>"u")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=Vc().getChildren();for(let o=0;o<r.length;o++){const s=r[o];DWt(t,s,n,e)}return n.innerHTML}function DWt(t,e,n,i=null){let r=i!==null?e.isSelected(i):!0;const o=Mn(e)&&e.excludeFromCopy("html");let s=e;if(i!==null){let f=uHe(e);f=ai(f)&&i!==null?bWt(i,f):f,s=f}const a=Mn(s)?s.getChildren():[],l=t._nodes.get(s.getType());let c;l&&l.exportDOM!==void 0?c=l.exportDOM(t,s):c=s.exportDOM(t);const{element:u,after:d}=c;if(!u)return!1;const h=document.createDocumentFragment();for(let f=0;f<a.length;f++){const m=a[f],p=DWt(t,m,h,i);!r&&Mn(e)&&p&&e.extractWithChild(m,i,"html")&&(r=!0)}if(r&&!o){if(eN(u)&&u.append(h),n.append(u),d){const f=d.call(s,u);f&&u.replaceWith(f)}}else n.append(h);return r}function A_r(t,e){const{nodeName:n}=t,i=e._htmlConversions.get(n.toLowerCase());let r=null;if(i!==void 0)for(const o of i){const s=o(t);s!==null&&(r===null||(r.priority||0)<(s.priority||0))&&(r=s)}return r!==null?r.conversion:null}const kWt=new Set(["STYLE","SCRIPT"]);function MWt(t,e,n,i,r=new Map,o){let s=[];if(kWt.has(t.nodeName))return s;let a=null;const l=A_r(t,e),c=l?l(t):null;let u=null;if(c!==null){u=c.after;const m=c.node;if(a=Array.isArray(m)?m[m.length-1]:m,a!==null){for(const[,p]of r)if(a=p(a,o),!a)break;a&&s.push(...Array.isArray(m)?m:[a])}c.forChild!=null&&r.set(t.nodeName,c.forChild)}const d=t.childNodes;let h=[];const f=a!=null&&fR(a)?!1:a!=null&&xPe(a)||i;for(let m=0;m<d.length;m++)h.push(...MWt(d[m],e,n,f,new Map(r),a));return u!=null&&(h=u(h)),lae(t)&&(f?h=svt(t,h,()=>{const m=new xHe;return n.push(m),m}):h=svt(t,h,gd)),a==null?h.length>0?s=s.concat(h):lae(t)&&P_r(t)&&(s=s.concat(n_())):Mn(a)&&a.append(...h),s}function svt(t,e,n){const i=t.style.textAlign,r=[];let o=[];for(let s=0;s<e.length;s++){const a=e[s];if(xPe(a))i&&!a.getFormat()&&a.setFormat(i),r.push(a);else if(o.push(a),s===e.length-1||s<e.length-1&&xPe(e[s+1])){const l=n();l.setFormat(i),l.append(...o),r.push(l),o=[]}}return r}function R_r(t){for(const e of t)e.getNextSibling()instanceof xHe&&e.insertAfter(n_());for(const e of t){const n=e.getChildren();for(const i of n)e.insertBefore(i);e.remove()}}function P_r(t){return t.nextSibling==null||t.previousSibling==null?!1:dPe(t.nextSibling)&&dPe(t.previousSibling)}const O_r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",LWt=t=>O_r?(t||window).getSelection():null;function j_r(t,e=Fi()){if(e==null)throw Error("Expected valid LexicalSelection");return Jn(e)&&e.isCollapsed()||e.getNodes().length===0?"":I_r(t,e)}function F_r(t,e=Fi()){if(e==null)throw Error("Expected valid LexicalSelection");return Jn(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(V_r(t,e))}function TWt(t,e,n){const i=t.getData("application/x-lexical-editor");if(i)try{const s=JSON.parse(i);if(s.namespace===n._config.namespace&&Array.isArray(s.nodes)){const a=B_r(s.nodes);return avt(n,a,e)}}catch{}const r=t.getData("text/html");if(r)try{const a=new DOMParser().parseFromString(r,"text/html"),l=T_r(n,a);return avt(n,l,e)}catch{}const o=t.getData("text/plain")||t.getData("text/uri-list");if(o!=null)if(Jn(e)){const s=o.split(/(\r?\n|\t)/);s[s.length-1]===""&&s.pop();for(let a=0;a<s.length;a++){const l=Fi();if(Jn(l)){const c=s[a];c===`
`||c===`\r
`?l.insertParagraph():c==="	"?l.insertNodes([b$()]):l.insertText(c)}}}else e.insertRawText(o)}function avt(t,e,n){t.dispatchCommand(avr,{nodes:e,selection:n})||n.insertNodes(e)}function $_r(t){const e=t.exportJSON(),n=t.constructor;if(e.type!==n.getType())throw Error(`LexicalNode: Node ${n.name} does not implement .exportJSON().`);if(Mn(t)){const i=e.children;if(!Array.isArray(i))throw Error(`LexicalNode: Node ${n.name} is an element but .exportJSON() does not have a children array.`)}return e}function IWt(t,e,n,i=[]){let r=e!==null?n.isSelected(e):!0;const o=Mn(n)&&n.excludeFromCopy("html");let s=n;if(e!==null){let c=uHe(n);c=ai(c)&&e!==null?bWt(e,c):c,s=c}const a=Mn(s)?s.getChildren():[],l=$_r(s);if(ai(s)){const c=s.__text;c.length>0?l.text=c:r=!1}for(let c=0;c<a.length;c++){const u=a[c],d=IWt(t,e,u,l.children);!r&&Mn(n)&&d&&n.extractWithChild(u,e,"clone")&&(r=!0)}if(r&&!o)i.push(l);else if(Array.isArray(l.children))for(let c=0;c<l.children.length;c++){const u=l.children[c];i.push(u)}return r}function V_r(t,e){const n=[],r=Vc().getChildren();for(let o=0;o<r.length;o++){const s=r[o];IWt(t,e,s,n)}return{namespace:t._config.namespace,nodes:n}}function B_r(t){const e=[];for(let n=0;n<t.length;n++){const i=t[n],r=z0r(i);ai(r)&&r_r(r),e.push(r)}return e}const z_r=50;let cO=null;async function AWt(t,e,n){if(cO!==null)return!1;if(e!==null)return new Promise((l,c)=>{t.update(()=>{l(lvt(t,e,n))})});const i=t.getRootElement(),r=t._window==null?window.document:t._window.document,o=LWt(t._window);if(i===null||o===null)return!1;const s=r.createElement("span");s.style.cssText="position: fixed; top: -1000px;",s.append(r.createTextNode("#")),i.append(s);const a=new Range;return a.setStart(s,0),a.setEnd(s,1),o.removeAllRanges(),o.addRange(a),new Promise((l,c)=>{const u=t.registerCommand($pe,d=>(Mk(d,ClipboardEvent)&&(u(),cO!==null&&(window.clearTimeout(cO),cO=null),l(lvt(t,d,n))),!0),J0r);cO=window.setTimeout(()=>{u(),cO=null,l(!1)},z_r),r.execCommand("copy"),s.remove()})}function lvt(t,e,n){if(n===void 0){const r=LWt(t._window);if(!r)return!1;const o=r.anchorNode,s=r.focusNode;if(o!==null&&s!==null&&!hG(t,o,s))return!1;const a=Fi();if(a===null)return!1;n=W_r(a)}e.preventDefault();const i=e.clipboardData;return i===null?!1:(U_r(i,n),!0)}const H_r=[["text/html",j_r],["application/x-lexical-editor",F_r]];function W_r(t=Fi()){const e={"text/plain":t?t.getTextContent():""};if(t){const n=$yr();for(const[i,r]of H_r){const o=r(n,t);o!==null&&(e[i]=o)}}return e}function U_r(t,e){for(const n in e){const i=e[n];i!==void 0&&t.setData(n,i)}}function cvt(t,e){if(typeof document.caretRangeFromPoint<"u"){const n=document.caretRangeFromPoint(t,e);return n===null?null:{node:n.startContainer,offset:n.startOffset}}else if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(t,e);return n===null?null:{node:n.offsetNode,offset:n.offset}}else return null}const x$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",K_r=x$&&"documentMode"in document?document.documentMode:null,q_r=x$&&"InputEvent"in window&&!K_r?"getTargetRanges"in new window.InputEvent("input"):!1,G_r=x$&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Y_r=x$&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,X_r=x$&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Z_r=x$&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!X_r,uvt=mo("DRAG_DROP_PASTE_FILE");class wG extends Vw{static getType(){return"quote"}static clone(e){return new wG(e.__key)}constructor(e){super(e)}createDOM(e){const n=document.createElement("blockquote");return i_(n,e.theme.quote),n}updateDOM(e,n){return!1}static importDOM(){return{blockquote:e=>({conversion:Q_r,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(n&&eN(n)){this.isEmpty()&&n.append(document.createElement("br"));const i=this.getFormatType();n.style.textAlign=i;const r=this.getDirection();r&&(n.dir=r)}return{element:n}}static importJSON(e){const n=SHe();return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(e,n){const i=gd(),r=this.getDirection();return i.setDirection(r),this.insertAfter(i,n),i}collapseAtStart(){const e=gd();return this.getChildren().forEach(i=>e.append(i)),this.replace(e),!0}canMergeWhenEmpty(){return!0}}function SHe(){return Sb(new wG)}function SPe(t){return t instanceof wG}class CG extends Vw{static getType(){return"heading"}static clone(e){return new CG(e.__tag,e.__key)}constructor(e,n){super(n),this.__tag=e}getTag(){return this.__tag}createDOM(e){const n=this.__tag,i=document.createElement(n),o=e.theme.heading;if(o!==void 0){const s=o[n];i_(i,s)}return i}updateDOM(e,n){return!1}static importDOM(){return{h1:e=>({conversion:uO,priority:0}),h2:e=>({conversion:uO,priority:0}),h3:e=>({conversion:uO,priority:0}),h4:e=>({conversion:uO,priority:0}),h5:e=>({conversion:uO,priority:0}),h6:e=>({conversion:uO,priority:0}),p:e=>{const i=e.firstChild;return i!==null&&dvt(i)?{conversion:()=>({node:null}),priority:3}:null},span:e=>dvt(e)?{conversion:n=>({node:T4("h1")}),priority:3}:null}}exportDOM(e){const{element:n}=super.exportDOM(e);if(n&&eN(n)){this.isEmpty()&&n.append(document.createElement("br"));const i=this.getFormatType();n.style.textAlign=i;const r=this.getDirection();r&&(n.dir=r)}return{element:n}}static importJSON(e){const n=T4(e.tag);return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(e,n=!0){const i=e?e.anchor.offset:0,r=this.getLastDescendant(),s=!r||e&&e.anchor.key===r.getKey()&&i===r.getTextContentSize()||!e?gd():T4(this.getTag()),a=this.getDirection();if(s.setDirection(a),this.insertAfter(s,n),i===0&&!this.isEmpty()&&e){const l=gd();l.select(),this.replace(l,!0)}return s}collapseAtStart(){const e=this.isEmpty()?gd():T4(this.getTag());return this.getChildren().forEach(i=>e.append(i)),this.replace(e),!0}extractWithChild(){return!0}}function dvt(t){return t.nodeName.toLowerCase()==="span"?t.style.fontSize==="26pt":!1}function uO(t){const e=t.nodeName.toLowerCase();let n=null;return(e==="h1"||e==="h2"||e==="h3"||e==="h4"||e==="h5"||e==="h6")&&(n=T4(e),t.style!==null&&n.setFormat(t.style.textAlign)),{node:n}}function Q_r(t){const e=SHe();return t.style!==null&&e.setFormat(t.style.textAlign),{node:e}}function T4(t){return Sb(new CG(t))}function J_r(t){return t instanceof CG}function exr(t,e){t.preventDefault(),e.update(()=>{const n=Fi(),i=Mk(t,InputEvent)||Mk(t,KeyboardEvent)?null:t.clipboardData;i!=null&&n!==null&&TWt(i,n,e)},{tag:"paste"})}async function txr(t,e){await AWt(e,Mk(t,ClipboardEvent)?t:null),e.update(()=>{const n=Fi();Jn(n)?n.removeText():bf(n)&&n.getNodes().forEach(i=>i.remove())})}function EJ(t){let e=null;if(Mk(t,DragEvent)?e=t.dataTransfer:Mk(t,ClipboardEvent)&&(e=t.clipboardData),e===null)return[!1,[],!1];const n=e.types,i=n.includes("Files"),r=n.includes("text/html")||n.includes("text/plain");return[i,Array.from(e.files),r]}function hvt(t){const e=Fi();if(!Jn(e))return!1;const n=new Set,i=e.getNodes();for(let r=0;r<i.length;r++){const o=i[r],s=o.getKey();if(n.has(s))continue;const a=Jpe(o,c=>Mn(c)&&!c.isInline());if(a===null)continue;const l=a.getKey();a.canIndent()&&!n.has(l)&&(n.add(l),t(a))}return n.size>0}function DJ(t){const e=cA(t);return Oa(e)}function nxr(t){const e=t.focus;return e.key==="root"&&e.offset===Vc().getChildrenSize()}function ixr(t){return Bw(t.registerCommand(Rze,n=>{const i=Fi();return bf(i)?(i.clear(),!0):!1},0),t.registerCommand(_I,n=>{const i=Fi();return Jn(i)?(i.deleteCharacter(n),!0):!1},da),t.registerCommand(bU,n=>{const i=Fi();return Jn(i)?(i.deleteWord(n),!0):!1},da),t.registerCommand(vU,n=>{const i=Fi();return Jn(i)?(i.deleteLine(n),!0):!1},da),t.registerCommand(W3,n=>{const i=Fi();if(typeof n=="string")i!==null&&i.insertText(n);else{if(i===null)return!1;const r=n.dataTransfer;if(r!=null)TWt(r,i,t);else if(Jn(i)){const o=n.data;return o&&i.insertText(o),!0}}return!0},da),t.registerCommand(oPe,()=>{const n=Fi();return Jn(n)?(n.removeText(),!0):!1},da),t.registerCommand(d0,n=>{const i=Fi();return Jn(i)?(i.formatText(n),!0):!1},da),t.registerCommand(pvr,n=>{const i=Fi();if(!Jn(i)&&!bf(i))return!1;const r=i.getNodes();for(const o of r){const s=Jpe(o,a=>Mn(a)&&!a.isInline());s!==null&&s.setFormat(n)}return!0},da),t.registerCommand(H3,n=>{const i=Fi();return Jn(i)?(i.insertLineBreak(n),!0):!1},da),t.registerCommand(Xse,()=>{const n=Fi();return Jn(n)?(n.insertParagraph(),!0):!1},da),t.registerCommand(fvr,()=>(P0r([b$()]),!0),da),t.registerCommand(mvr,()=>hvt(n=>{const i=n.getIndent();n.setIndent(i+1)}),da),t.registerCommand(vbt,()=>hvt(n=>{const i=n.getIndent();i>0&&n.setIndent(i-1)}),da),t.registerCommand(mHt,n=>{const i=Fi();if(bf(i)&&!DJ(n.target)){const r=i.getNodes();if(r.length>0)return r[0].selectPrevious(),!0}else if(Jn(i)){const r=xU(i.focus,!0);if(!n.shiftKey&&Oa(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),n.preventDefault(),!0}return!1},da),t.registerCommand(pHt,n=>{const i=Fi();if(bf(i)){const r=i.getNodes();if(r.length>0)return r[0].selectNext(0,0),!0}else if(Jn(i)){if(nxr(i))return n.preventDefault(),!0;const r=xU(i.focus,!1);if(!n.shiftKey&&Oa(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),n.preventDefault(),!0}return!1},da),t.registerCommand(fHt,n=>{const i=Fi();if(bf(i)){const r=i.getNodes();if(r.length>0)return n.preventDefault(),r[0].selectPrevious(),!0}if(!Jn(i))return!1;if(Ybt(i,!0)){const r=n.shiftKey;return n.preventDefault(),Xbt(i,r,!0),!0}return!1},da),t.registerCommand(hHt,n=>{const i=Fi();if(bf(i)&&!DJ(n.target)){const o=i.getNodes();if(o.length>0)return n.preventDefault(),o[0].selectNext(0,0),!0}if(!Jn(i))return!1;const r=n.shiftKey;return Ybt(i,!1)?(n.preventDefault(),Xbt(i,r,!1),!0):!1},da),t.registerCommand(jze,n=>{if(DJ(n.target))return!1;const i=Fi();if(!Jn(i))return!1;n.preventDefault();const{anchor:r}=i,o=r.getNode();return i.isCollapsed()&&r.offset===0&&!Nf(o)&&l_r(o).getIndent()>0?t.dispatchCommand(vbt,void 0):t.dispatchCommand(_I,!0)},da),t.registerCommand(Fze,n=>{if(DJ(n.target))return!1;const i=Fi();return Jn(i)?(n.preventDefault(),t.dispatchCommand(_I,!1)):!1},da),t.registerCommand(Zse,n=>{const i=Fi();if(!Jn(i))return!1;if(n!==null){if((Y_r||G_r||Z_r)&&q_r)return!1;if(n.preventDefault(),n.shiftKey)return t.dispatchCommand(H3,!1)}return t.dispatchCommand(Xse,void 0)},da),t.registerCommand(gHt,()=>{const n=Fi();return Jn(n)?(t.blur(),!0):!1},da),t.registerCommand(bHt,n=>{const[,i]=EJ(n);if(i.length>0){const o=n.clientX,s=n.clientY,a=cvt(o,s);if(a!==null){const{offset:l,node:c}=a,u=cA(c);if(u!==null){const d=aWt();if(ai(u))d.anchor.set(u.getKey(),l,"text"),d.focus.set(u.getKey(),l,"text");else{const f=u.getParentOrThrow().getKey(),m=u.getIndexWithinParent()+1;d.anchor.set(f,m,"element"),d.focus.set(f,m,"element")}const h=LHt(d);jv(h)}t.dispatchCommand(uvt,i)}return n.preventDefault(),!0}const r=Fi();return!!Jn(r)},da),t.registerCommand(vHt,n=>{const[i]=EJ(n),r=Fi();return!(i&&!Jn(r))},da),t.registerCommand(yHt,n=>{const[i]=EJ(n),r=Fi();if(i&&!Jn(r))return!1;const o=n.clientX,s=n.clientY,a=cvt(o,s);if(a!==null){const l=cA(a.node);Oa(l)&&n.preventDefault()}return!0},da),t.registerCommand(sPe,()=>(Tyr(),!0),da),t.registerCommand($pe,n=>(AWt(t,Mk(n,ClipboardEvent)?n:null),!0),da),t.registerCommand($ze,n=>(txr(n,t),!0),da),t.registerCommand(Fpe,n=>{const[,i,r]=EJ(n);return i.length>0&&!r?(t.dispatchCommand(uvt,i),!0):iHe(n.target)?!1:Fi()!==null?(exr(n,t),!0):!1},da))}function NPe(t,e){const n={};for(const i of t){const r=e(i);n[r]?n[r].push(i):n[r]=[i]}return n}function NHe(t){const e=NPe(t,n=>n.type);return{element:e.element||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const bae=/[!-/:-@[-`{-~\s]/,rxr=/^\s{0,3}$/;function EPe(t){if(!y$(t))return!1;const e=t.getFirstChild();return e==null||t.getChildrenSize()===1&&ai(e)&&rxr.test(e.getTextContent())}function oxr(t,e=!1){const n=NHe(t),i=!e,r=n.textFormat.filter(o=>o.format.length===1);return o=>{const s=[],a=(o||Vc()).getChildren();for(let l=0;l<a.length;l++){const c=a[l],u=sxr(c,n.element,r,n.textMatch);u!=null&&s.push(i&&l>0&&!EPe(c)&&!EPe(a[l-1])?`
`.concat(u):u)}return s.join(`
`)}}function sxr(t,e,n,i){for(const r of e){const o=r.export(t,s=>vae(s,n,i));if(o!=null)return o}return Mn(t)?vae(t,n,i):Oa(t)?t.getTextContent():null}function vae(t,e,n){const i=[],r=t.getChildren();e:for(const o of r){for(const s of n){const a=s.export(o,l=>vae(l,e,n),(l,c)=>fvt(l,c,e));if(a!=null){i.push(a);continue e}}SS(o)?i.push(`
`):ai(o)?i.push(fvt(o,o.getTextContent(),e)):Mn(o)?i.push(vae(o,e,n)):Oa(o)&&i.push(o.getTextContent())}return i.join("")}function fvt(t,e,n){const i=e.trim();let r=i;const o=new Set;for(const s of n){const a=s.format[0],l=s.tag;if(kSe(t,a)&&!o.has(a)){o.add(a);const c=mvt(t,!0);kSe(c,a)||(r=l+r);const u=mvt(t,!1);kSe(u,a)||(r+=l)}}return e.replace(i,()=>r)}function mvt(t,e){let n=e?t.getPreviousSibling():t.getNextSibling();if(!n){const i=t.getParentOrThrow();i.isInline()&&(n=e?i.getPreviousSibling():i.getNextSibling())}for(;n;){if(Mn(n)){if(!n.isInline())break;const i=e?n.getLastDescendant():n.getFirstDescendant();if(ai(i))return i;n=e?n.getPreviousSibling():n.getNextSibling()}if(ai(n))return n;if(!Mn(n))return null}return null}function kSe(t,e){return ai(t)&&t.hasFormat(e)}const w$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",axr=w$&&"documentMode"in document?document.documentMode:null;w$&&"InputEvent"in window&&!axr&&"getTargetRanges"in new window.InputEvent("input");const pvt=w$&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),gvt=w$&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,lxr=w$&&/^(?=.*Chrome).*/i.test(navigator.userAgent),bvt=w$&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!lxr,vvt=/^[ \t]*```(\w{1,10})?\s?$/;function cxr(t,e=!1){const n=NHe(t),i=fxr(n.textFormat);return(r,o)=>{const s=r.split(`
`),a=s.length,l=o||Vc();l.clear();for(let u=0;u<a;u++){const d=s[u],[h,f]=dxr(s,u,l);if(h!=null){u=f;continue}uxr(d,l,n.element,i,n.textMatch)}const c=l.getChildren();for(const u of c)!e&&EPe(u)&&l.getChildrenSize()>1&&u.remove();Fi()!==null&&l.selectStart()}}function uxr(t,e,n,i,r){const o=Dc(t),s=gd();s.append(o),e.append(s);for(const{regExp:a,replace:l}of n){const c=t.match(a);if(c){o.setTextContent(t.slice(c[0].length)),l(s,[o],c,!0);break}}if(Pte(o,i,r),s.isAttached()&&t.length>0){const a=s.getPreviousSibling();if(y$(a)||SPe(a)||Na(a)){let l=a;if(Na(a)){const c=a.getLastDescendant();c==null?l=null:l=Jpe(c,vh)}l!=null&&l.getTextContentSize()>0&&(l.splice(l.getChildrenSize(),0,[n_(),...s.getChildren()]),s.remove())}}}function dxr(t,e,n){const i=t[e].match(vvt);if(i){let r=e;const o=t.length;for(;++r<o;)if(t[r].match(vvt)){const a=gR(i[1]),l=Dc(t.slice(e+1,r).join(`
`));return a.append(l),n.append(a),[a,r]}}return[null,e]}function Pte(t,e,n){const i=t.getTextContent(),r=hxr(i,e);if(!r){RWt(t,n);return}let o,s,a;if(r[0]===i)o=t;else{const c=r.index||0,u=c+r[0].length;c===0?[o,s]=t.splitText(u):[a,o,s]=t.splitText(c,u)}o.setTextContent(r[2]);const l=e.transformersByTag[r[1]];if(l)for(const c of l.format)o.hasFormat(c)||o.toggleFormat(c);o.hasFormat("code")||Pte(o,e,n),a&&Pte(a,e,n),s&&Pte(s,e,n)}function RWt(t,e){let n=t;e:for(;n;){for(const i of e){const r=n.getTextContent().match(i.importRegExp);if(!r)continue;const o=r.index||0,s=o+r[0].length;let a,l;o===0?[a,n]=n.splitText(s):[,a,l]=n.splitText(o,s),l&&RWt(l,e),i.replace(a,r);continue e}break}}function hxr(t,e){const n=t.match(e.openTagsRegExp);if(n==null)return null;for(const i of n){const r=i.replace(/^\s/,""),o=e.fullMatchRegExpByTag[r];if(o==null)continue;const s=t.match(o),a=e.transformersByTag[r];if(s!=null&&a!=null){if(a.intraword!==!1)return s;const{index:l=0}=s,c=t[l-1],u=t[l+s[0].length];if((!c||bae.test(c))&&(!u||bae.test(u)))return s}}return null}function fxr(t){const e={},n={},i=[],r="(?<![\\\\])";for(const o of t){const{tag:s}=o;e[s]=o;const a=s.replace(/(\*|\^|\+)/g,"\\$1");i.push(a),pvt||gvt||bvt?n[s]=new RegExp(`(${a})(?![${a}\\s])(.*?[^${a}\\s])${a}(?!${a})`):n[s]=new RegExp(`(?<![\\\\${a}])(${a})((\\\\${a})?.*?[^${a}\\s](\\\\${a})?)((?<!\\\\)|(?<=\\\\\\\\))(${a})(?![\\\\${a}])`)}return{fullMatchRegExpByTag:n,openTagsRegExp:new RegExp((pvt||gvt||bvt?"":`${r}`)+"("+i.join("|")+")","g"),transformersByTag:e}}function mxr(t,e,n,i){const r=t.getParent();if(!fR(r)||t.getFirstChild()!==e)return!1;const o=e.getTextContent();if(o[n-1]!==" ")return!1;for(const{regExp:s,replace:a}of i){const l=o.match(s);if(l&&l[0].length===n){const c=e.getNextSiblings(),[u,d]=e.splitText(n);u.remove();const h=d?[d,...c]:c;return a(t,h,l,!1),!0}}return!1}function pxr(t,e,n){let i=t.getTextContent();const r=i[e-1],o=n[r];if(o==null)return!1;e<i.length&&(i=i.slice(0,e));for(const s of o){const a=i.match(s.regExp);if(a===null)continue;const l=a.index||0,c=l+a[0].length;let u;return l===0?[u]=t.splitText(c):[,u]=t.splitText(l,c),u.selectNext(0,0),s.replace(u,a),!0}return!1}function gxr(t,e,n){const i=t.getTextContent(),r=e-1,o=i[r],s=n[o];if(!s)return!1;for(const a of s){const{tag:l}=a,c=l.length,u=r-c+1;if(c>1&&!PWt(i,u,l,0,c)||i[u-1]===" ")continue;const d=i[r+1];if(a.intraword===!1&&d&&!bae.test(d))continue;const h=t;let f=h,m=yvt(i,u,l),p=f;for(;m<0&&(p=p.getPreviousSibling())&&!SS(p);)if(ai(p)){const k=p.getTextContent();f=p,m=yvt(k,k.length,l)}if(m<0||f===h&&m+c===u)continue;const g=f.getTextContent();if(m>0&&g[m-1]===o)continue;const y=g[m-1];if(a.intraword===!1&&y&&!bae.test(y))continue;const _=h.getTextContent(),w=_.slice(0,u)+_.slice(r+1);h.setTextContent(w);const C=f===h?w:g;f.setTextContent(C.slice(0,m)+C.slice(m+c));const N=Fi(),E=aWt();jv(E);const D=r-c*(f===h?2:1)+1;E.anchor.set(f.__key,m,"text"),E.focus.set(h.__key,D,"text");for(const k of a.format)E.hasFormat(k)||E.formatText(k);E.anchor.set(E.focus.key,E.focus.offset,E.focus.type);for(const k of a.format)E.hasFormat(k)&&E.toggleFormat(k);return Jn(N)&&(E.format=N.format),!0}return!1}function yvt(t,e,n){const i=n.length;for(let r=e;r>=i;r--){const o=r-i;if(PWt(t,o,n,0,i)&&t[o+i]!==" ")return o}return-1}function PWt(t,e,n,i,r){for(let o=0;o<r;o++)if(t[e+o]!==n[i+o])return!1;return!0}function bxr(t,e=C$){const n=NHe(e),i=NPe(n.textFormat,({tag:s})=>s[s.length-1]),r=NPe(n.textMatch,({trigger:s})=>s);for(const s of e){const a=s.type;if(a==="element"||a==="text-match"){const l=s.dependencies;for(const c of l)if(!t.hasNode(c))throw Error(`MarkdownShortcuts: missing dependency ${c.getType()} for transformer. Ensure node dependency is included in editor initial config.`)}}const o=(s,a,l)=>{mxr(s,a,l,n.element)||pxr(a,l,r)||gxr(a,l,i)};return t.registerUpdateListener(({tags:s,dirtyLeaves:a,editorState:l,prevEditorState:c})=>{if(s.has("collaboration")||s.has("historic")||t.isComposing())return;const u=l.read(Fi),d=c.read(Fi);if(!Jn(d)||!Jn(u)||!u.isCollapsed())return;const h=u.anchor.key,f=u.anchor.offset,m=l._nodeMap.get(h);!ai(m)||!a.has(h)||f!==1&&f>d.anchor.offset+1||t.update(()=>{if(m.hasFormat("code"))return;const p=m.getParent();p===null||CHe(p)||o(p,m,u.anchor.offset)})})}const OWt=t=>(e,n,i)=>{const r=t(i);r.append(...n),e.replace(r),r.select(0,0)},jWt=4;function vxr(t){const e=t.match(/\t/g),n=t.match(/ /g);let i=0;return e&&(i+=e.length),n&&(i+=Math.floor(n.length/jWt)),i}const FWt=t=>(e,n,i)=>{const r=e.getPreviousSibling(),o=e.getNextSibling(),s=ww(t==="check"?i[3]==="x":void 0);if(Na(o)&&o.getListType()===t){const l=o.getFirstChild();l!==null?l.insertBefore(s):o.append(s),e.remove()}else if(Na(r)&&r.getListType()===t)r.append(s),e.remove();else{const l=L0(t,t==="number"?Number(i[2]):void 0);l.append(s),e.replace(l)}s.append(...n),s.select(0,0);const a=vxr(i[1]);a&&s.setIndent(a)},EHe=(t,e,n)=>{const i=[],r=t.getChildren();let o=0;for(const s of r)if(vh(s)){if(s.getChildrenSize()===1){const u=s.getFirstChild();if(Na(u)){i.push(EHe(u,e,n+1));continue}}const a=" ".repeat(n*jWt),l=t.getListType(),c=l==="number"?`${t.getStart()+o}. `:l==="check"?`- [${s.getChecked()?"x":" "}] `:"- ";i.push(a+c+e(s)),o++}return i.join(`
`)},yxr={dependencies:[CG],export:(t,e)=>{if(!J_r(t))return null;const n=Number(t.getTag().slice(1));return"#".repeat(n)+" "+e(t)},regExp:/^(#{1,6})\s/,replace:OWt(t=>{const e="h"+t[1].length;return T4(e)}),type:"element"},_xr={dependencies:[wG],export:(t,e)=>{if(!SPe(t))return null;const n=e(t).split(`
`),i=[];for(const r of n)i.push("> "+r);return i.join(`
`)},regExp:/^>\s/,replace:(t,e,n,i)=>{if(i){const o=t.getPreviousSibling();if(SPe(o)){o.splice(o.getChildrenSize(),0,[n_(),...e]),o.select(0,0),t.remove();return}}const r=SHe();r.append(...e),t.replace(r),r.select(0,0)},type:"element"},xxr={dependencies:[xG],export:t=>{if(!CHe(t))return null;const e=t.getTextContent();return"```"+(t.getLanguage()||"")+(e?`
`+e:"")+"\n```"},regExp:/^[ \t]*```(\w{1,10})?\s/,replace:OWt(t=>gR(t?t[1]:void 0)),type:"element"},wxr={dependencies:[pR,mR],export:(t,e)=>Na(t)?EHe(t,e,0):null,regExp:/^(\s*)[-*+]\s/,replace:FWt("bullet"),type:"element"},Cxr={dependencies:[pR,mR],export:(t,e)=>Na(t)?EHe(t,e,0):null,regExp:/^(\s*)(\d{1,})\.\s/,replace:FWt("number"),type:"element"},Sxr={format:["code"],tag:"`",type:"text-format"},Nxr={format:["highlight"],tag:"==",type:"text-format"},Exr={format:["bold","italic"],tag:"***",type:"text-format"},Dxr={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},kxr={format:["bold"],tag:"**",type:"text-format"},Mxr={format:["bold"],intraword:!1,tag:"__",type:"text-format"},Lxr={format:["strikethrough"],tag:"~~",type:"text-format"},Txr={format:["italic"],tag:"*",type:"text-format"},Ixr={format:["italic"],intraword:!1,tag:"_",type:"text-format"},Axr={dependencies:[xM],export:(t,e,n)=>{if(!i0(t))return null;const i=t.getTitle(),r=i?`[${t.getTextContent()}](${t.getURL()} "${i}")`:`[${t.getTextContent()}](${t.getURL()})`,o=t.getFirstChild();return t.getChildrenSize()===1&&ai(o)?n(o,r):r},importRegExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(t,e)=>{const[,n,i,r]=e,o=NU(i,{title:r}),s=Dc(n);s.setFormat(t.getFormat()),o.append(s),t.replace(o)},trigger:")",type:"text-match"},Rxr=[yxr,_xr,xxr,wxr,Cxr],$Wt=[Sxr,Exr,Dxr,kxr,Mxr,Nxr,Txr,Ixr,Lxr],VWt=[Axr],C$=[...Rxr,...$Wt,...VWt];function Pxr(t,e=C$,n,i=!1){return cxr(e,i)(t,n)}function Oxr(t=C$,e,n=!1){return oxr(t,n)(e)}const jxr={indent:"markdown_editor-indent",link:"markdown_editor-link",mark:"markdown_editor-mark",markOverlap:"markdown_editor-markOverlap",paragraph:"markdown_editor-paragraph",text:{bold:"markdown_editor-text-bold",code:"markdown_editor-text-code",italic:"markdown_editor-text-italic",underline:"markdown_editor-text-underline",strikethrough:"markdown_editor-text-strike_through",underlineStrikethrough:"markdown_editor-text-underline_strike_through"}};function Fxr(){return Vc().getTextContent()}function $xr(t,e=!0){if(t)return!1;let n=Fxr();return e&&(n=n.trim()),n===""}function Vxr(t){if(!$xr(t,!1))return!1;const n=Vc().getChildren(),i=n.length;if(i>1)return!1;for(let r=0;r<i;r++){const o=n[r];if(Oa(o))return!1;if(Mn(o)){if(!y$(o)||o.__indent!==0)return!1;const s=o.getChildren(),a=s.length;for(let l=0;l<a;l++){const c=s[r];if(!ai(c))return!1}}}return!0}function BWt(t){return()=>Vxr(t)}const Bxr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",zWt=Bxr?b.useLayoutEffect:b.useEffect;function zxr(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}function Hxr({editor:t,ariaActiveDescendant:e,ariaAutoComplete:n,ariaControls:i,ariaDescribedBy:r,ariaExpanded:o,ariaLabel:s,ariaLabelledBy:a,ariaMultiline:l,ariaOwns:c,ariaRequired:u,autoCapitalize:d,className:h,id:f,role:m="textbox",spellCheck:p=!0,style:g,tabIndex:y,"data-testid":_,...w},C){const[N,E]=b.useState(t.isEditable()),D=b.useCallback(M=>{M&&M.ownerDocument&&M.ownerDocument.defaultView?t.setRootElement(M):t.setRootElement(null)},[t]),k=b.useMemo(()=>zxr(C,D),[D,C]);return zWt(()=>(E(t.isEditable()),t.registerEditableListener(M=>{E(M)})),[t]),ne.jsx("div",{...w,"aria-activedescendant":N?e:void 0,"aria-autocomplete":N?n:"none","aria-controls":N?i:void 0,"aria-describedby":r,"aria-expanded":N&&m==="combobox"?!!o:void 0,"aria-label":s,"aria-labelledby":a,"aria-multiline":l,"aria-owns":N?c:void 0,"aria-readonly":N?void 0:!0,"aria-required":u,autoCapitalize:d,className:h,contentEditable:N,"data-testid":_,id:f,ref:k,role:N?m:void 0,spellCheck:p,style:g,tabIndex:y})}const Wxr=b.forwardRef(Hxr);function _vt(t){return t.getEditorState().read(BWt(t.isComposing()))}function Uxr(t){const[e,n]=b.useState(()=>_vt(t));return zWt(()=>{function i(){const r=_vt(t);n(r)}return i(),Bw(t.registerUpdateListener(()=>{i()}),t.registerEditableListener(()=>{i()}))},[t]),e}const Kxr=b.forwardRef(qxr);function qxr(t,e){const{placeholder:n,...i}=t,[r]=Jv();return ne.jsxs(ne.Fragment,{children:[ne.jsx(Wxr,{editor:r,...i,ref:e}),n!=null&&ne.jsx(Gxr,{editor:r,content:n})]})}function Gxr({content:t,editor:e}){const n=Uxr(e),[i,r]=b.useState(e.isEditable());if(b.useLayoutEffect(()=>(r(e.isEditable()),e.registerEditableListener(s=>{r(s)})),[e]),!n)return null;let o=null;return typeof t=="function"?o=t(i):t!==null&&(o=t),o===null?null:ne.jsx("div",{"aria-hidden":!0,children:o})}function DPe(t,e){return DPe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},DPe(t,e)}function Yxr(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,DPe(t,e)}var Xxr=function(e,n){return e===void 0&&(e=[]),n===void 0&&(n=[]),e.length!==n.length||e.some(function(i,r){return!Object.is(i,n[r])})},xvt={error:null},Zxr=function(t){Yxr(e,t);function e(){for(var i,r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o))||this,i.state=xvt,i.resetErrorBoundary=function(){for(var a,l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];i.props.onReset==null||(a=i.props).onReset.apply(a,c),i.reset()},i}e.getDerivedStateFromError=function(r){return{error:r}};var n=e.prototype;return n.reset=function(){this.setState(xvt)},n.componentDidCatch=function(r,o){var s,a;(s=(a=this.props).onError)==null||s.call(a,r,o)},n.componentDidUpdate=function(r,o){var s=this.state.error,a=this.props.resetKeys;if(s!==null&&o.error!==null&&Xxr(r.resetKeys,a)){var l,c;(l=(c=this.props).onResetKeysChange)==null||l.call(c,r.resetKeys,a),this.reset()}},n.render=function(){var r=this.state.error,o=this.props,s=o.fallbackRender,a=o.FallbackComponent,l=o.fallback;if(r!==null){var c={error:r,resetErrorBoundary:this.resetErrorBoundary};if(b.isValidElement(l))return l;if(typeof s=="function")return s(c);if(a)return b.createElement(a,c);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},e}(b.Component);function Qxr({children:t,onError:e}){return ne.jsx(Zxr,{fallback:ne.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:e,children:t})}const kJ=0,kPe=1,MPe=2,Ry=0,Jxr=1,wvt=2,ewr=3,twr=4;function nwr(t,e,n){const i=t._nodeMap,r=[];for(const o of e){const s=i.get(o);s!==void 0&&r.push(s)}for(const[o,s]of n){if(!s)continue;const a=i.get(o);a!==void 0&&!Nf(a)&&r.push(a)}return r}function iwr(t,e,n,i,r){if(t===null||n.size===0&&i.size===0&&!r)return Ry;const o=e._selection,s=t._selection;if(r)return Jxr;if(!Jn(o)||!Jn(s)||!s.isCollapsed()||!o.isCollapsed())return Ry;const a=nwr(e,n,i);if(a.length===0)return Ry;if(a.length>1){const y=e._nodeMap,_=y.get(o.anchor.key),w=y.get(s.anchor.key);return _&&w&&!t._nodeMap.has(_.__key)&&ai(_)&&_.__text.length===1&&o.anchor.offset===1?wvt:Ry}const l=a[0],c=t._nodeMap.get(l.__key);if(!ai(c)||!ai(l)||c.__mode!==l.__mode)return Ry;const u=c.__text,d=l.__text;if(u===d)return Ry;const h=o.anchor,f=s.anchor;if(h.key!==f.key||h.type!=="text")return Ry;const m=h.offset,p=f.offset,g=d.length-u.length;return g===1&&p===m-1?wvt:g===-1&&p===m+1?ewr:g===-1&&p===m?twr:Ry}function rwr(t,e,n){const i=e._nodeMap.get(t),r=n._nodeMap.get(t),o=e._selection,s=n._selection;return!(Jn(o)&&Jn(s)&&o.anchor.type==="element"&&o.focus.type==="element"&&s.anchor.type==="text"&&s.focus.type==="text")&&ai(i)&&ai(r)&&i.__parent===r.__parent?JSON.stringify(e.read(()=>i.exportJSON()))===JSON.stringify(n.read(()=>r.exportJSON())):!1}function owr(t,e){let n=Date.now(),i=Ry;return(r,o,s,a,l,c)=>{const u=Date.now();if(c.has("historic"))return i=Ry,n=u,MPe;const d=iwr(r,o,a,l,t.isComposing()),h=(()=>{const f=s===null||s.editor===t,m=c.has("history-push");if(!m&&f&&c.has("history-merge"))return kJ;if(r===null)return kPe;const g=o._selection;if(!(a.size>0||l.size>0))return g!==null?kJ:MPe;if(m===!1&&d!==Ry&&d===i&&u<n+e&&f)return kJ;if(a.size===1){const _=Array.from(a)[0];if(rwr(_,r,o))return kJ}return kPe})();return n=u,i=d,h}}function swr(t,e){const n=e.redoStack,i=e.undoStack;if(n.length!==0){const r=e.current;r!==null&&(i.push(r),t.dispatchCommand(Jse,!0));const o=n.pop();n.length===0&&t.dispatchCommand(Qse,!1),e.current=o||null,o&&o.editor.setEditorState(o.editorState,{tag:"historic"})}}function awr(t,e){const n=e.redoStack,i=e.undoStack;if(i.length!==0){const o=e.current,s=i.pop();o!==null&&(n.push(o),t.dispatchCommand(Qse,!0)),i.length===0&&t.dispatchCommand(Jse,!1),e.current=s||null,s&&s.editor.setEditorState(s.editorState,{tag:"historic"})}}function Cvt(t){t.undoStack=[],t.redoStack=[],t.current=null}function lwr(t,e,n){const i=owr(t,n),r=({editorState:s,prevEditorState:a,dirtyLeaves:l,dirtyElements:c,tags:u})=>{const d=e.current,h=e.redoStack,f=e.undoStack,m=d===null?null:d.editorState;if(d!==null&&s===m)return;const p=i(a,s,d,l,c,u);if(p===kPe)h.length!==0&&(e.redoStack=[],t.dispatchCommand(Qse,!1)),d!==null&&(f.push({...d}),t.dispatchCommand(Jse,!0));else if(p===MPe)return;e.current={editor:t,editorState:s}};return Bw(t.registerCommand(Pze,()=>(awr(t,e),!0),da),t.registerCommand(Oze,()=>(swr(t,e),!0),da),t.registerCommand(bvr,()=>(Cvt(e),!1),da),t.registerCommand(vvr,()=>(Cvt(e),t.dispatchCommand(Qse,!1),t.dispatchCommand(Jse,!1),!0),da),t.registerUpdateListener(r))}function cwr(){return{current:null,redoStack:[],undoStack:[]}}function uwr(t,e,n=1e3){const i=b.useMemo(()=>e||cwr(),[e]);b.useEffect(()=>lwr(t,i,n),[n,t,i])}function dwr({delay:t,externalHistoryState:e}){const[n]=Jv();return uwr(n,e,t),null}function hwr({validateUrl:t}){const[e]=Jv();return b.useEffect(()=>{if(!e.hasNodes([xM]))throw new Error("LinkPlugin: LinkNode not registered on editor");return Bw(e.registerCommand(SD,n=>{if(n===null)return NSe(n),!0;if(typeof n=="string")return t===void 0||t(n)?(NSe(n),!0):!1;{const{url:i,target:r,rel:o,title:s}=n;return NSe(i,{rel:o,target:r,title:s}),!0}},K3),t!==void 0?e.registerCommand(Fpe,n=>{const i=Fi();if(!Jn(i)||i.isCollapsed()||!Mk(n,ClipboardEvent))return!1;const r=n;if(r.clipboardData===null)return!1;const o=r.clipboardData.getData("text");return t(o)?i.getNodes().some(s=>Mn(s))?!1:(e.dispatchCommand(SD,o),n.preventDefault(),!0):!1},K3):()=>{})},[e,t]),null}function Svt(t,e){return t.getEditorState().read(()=>{const n=yf(e);return n===null?!1:n.isSelected()})}function fwr(t){const[e]=Jv(),[n,i]=b.useState(()=>Svt(e,t));b.useEffect(()=>{let s=!0;const a=e.registerUpdateListener(()=>{s&&i(Svt(e,t))});return()=>{s=!1,a()}},[e,t]);const r=b.useCallback(s=>{e.update(()=>{let a=Fi();bf(a)||(a=wPe(),jv(a)),bf(a)&&(s?a.add(t):a.delete(t))})},[e,t]),o=b.useCallback(()=>{e.update(()=>{const s=Fi();bf(s)&&s.clear()})},[e]);return[n,r,o]}function mwr({nodeKey:t}){const[e]=Jv(),[n,i,r]=fwr(t),o=b.useCallback(s=>{const a=Fi();return n&&bf(a)&&(s.preventDefault(),e.update(()=>{a.getNodes().forEach(l=>{HWt(l)&&l.remove()})})),!1},[e,n]);return b.useEffect(()=>Bw(e.registerCommand(Rze,s=>{const a=e.getElementByKey(t);return s.target===a?(s.shiftKey||r(),i(!n),!0):!1},K3),e.registerCommand(Fze,o,K3),e.registerCommand(jze,o,K3)),[r,e,n,t,o,i]),b.useEffect(()=>{const s=e.getElementByKey(t),a="selected";s!==null&&(n?i_(s,a):Qpe(s,a))},[e,n,t]),null}class SG extends yHe{static getType(){return"horizontalrule"}static clone(e){return new SG(e.__key)}static importJSON(e){return DHe()}static importDOM(){return{hr:()=>({conversion:pwr,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(e){const n=document.createElement("hr");return i_(n,e.theme.hr),n}getTextContent(){return`
`}isInline(){return!1}updateDOM(){return!1}decorate(){return ne.jsx(mwr,{nodeKey:this.__key})}}function pwr(){return{node:DHe()}}function DHe(){return Sb(new SG)}function HWt(t){return t instanceof SG}const gwr={dependencies:[SG],export:t=>HWt(t)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(t,e,n,i)=>{const r=DHe();i||t.getNextSibling()!=null?t.replace(r):t.insertBefore(r),r.selectNext()},type:"element"},bwr=[gwr,...C$];function vwr({transformers:t=bwr}){const[e]=Jv();return b.useEffect(()=>bxr(e,t),[e,t]),null}const ywr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_wr=ywr?b.useLayoutEffect:b.useEffect;function xwr({ignoreHistoryMergeTagChange:t=!0,ignoreSelectionChange:e=!1,onChange:n}){const[i]=Jv();return _wr(()=>{if(n)return i.registerUpdateListener(({editorState:r,dirtyElements:o,dirtyLeaves:s,prevEditorState:a,tags:l})=>{e&&o.size===0&&s.size===0||t&&l.has("history-merge")||a.isEmpty()||n(r,i,l)})},[i,t,e,n]),null}const wwr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Cwr=wwr?b.useLayoutEffect:b.useEffect;function Swr(t){const[e]=Jv(),n=b.useMemo(()=>t(e),[e,t]),i=b.useRef(n.initialValueFn()),[r,o]=b.useState(i.current);return Cwr(()=>{const{initialValueFn:s,subscribe:a}=n,l=s();return i.current!==l&&(i.current=l,o(l)),a(c=>{i.current=c,o(c)})},[n,t]),r}function Nwr(t){return{initialValueFn:()=>t.isEditable(),subscribe:e=>t.registerEditableListener(e)}}function Ewr(){return Swr(Nwr)}function Dwr(t){const e=window.location.origin,n=i=>{if(i.origin!==e)return;const r=t.getRootElement();if(document.activeElement!==r)return;const o=i.data;if(typeof o=="string"){let s;try{s=JSON.parse(o)}catch{return}if(s&&s.protocol==="nuanria_messaging"&&s.type==="request"){const a=s.payload;if(a&&a.functionId==="makeChanges"){const l=a.args;if(l){const[c,u,d,h,f,m]=l;t.update(()=>{const p=Fi();if(Jn(p)){const g=p.anchor;let y=g.getNode(),_=0,w=0;if(ai(y)&&c>=0&&u>=0&&(_=c,w=c+u,p.setTextNodeRange(y,_,y,w)),(_!==w||d!=="")&&(p.insertRawText(d),y=g.getNode()),ai(y)){_=h,w=h+f;const C=y.getTextContentSize();_=_>C?C:_,w=w>C?C:w,p.setTextNodeRange(y,_,y,w)}i.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}const kwr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",kHe=kwr?b.useLayoutEffect:b.useEffect;function Nvt(t){return t.getEditorState().read(BWt(t.isComposing()))}function Mwr(t){const[e,n]=b.useState(()=>Nvt(t));return kHe(()=>{function i(){const r=Nvt(t);n(r)}return i(),Bw(t.registerUpdateListener(()=>{i()}),t.registerEditableListener(()=>{i()}))},[t]),e}function Lwr(t,e){const[n,i]=b.useState(()=>t.getDecorators());return kHe(()=>t.registerDecoratorListener(r=>{Fc.flushSync(()=>{i(r)})}),[t]),b.useEffect(()=>{i(t.getDecorators())},[t]),b.useMemo(()=>{const r=[],o=Object.keys(n);for(let s=0;s<o.length;s++){const a=o[s],l=ne.jsx(e,{onError:u=>t._onError(u),children:ne.jsx(b.Suspense,{fallback:null,children:n[a]})}),c=t.getElementByKey(a);c!==null&&r.push(Fc.createPortal(l,c,a))}return r},[e,n,t])}function Twr(t){kHe(()=>Bw(ixr(t),Dwr(t)),[t])}function Iwr({contentEditable:t,placeholder:e=null,ErrorBoundary:n}){const[i]=Jv(),r=Lwr(i,n);return Twr(i),ne.jsxs(ne.Fragment,{children:[t,ne.jsx(Awr,{content:e}),r]})}function Awr({content:t}){const[e]=Jv(),n=Mwr(e),i=Ewr();return n?typeof t=="function"?t(i):t:null}function WWt(t,e){for(let n=0;n<e.length;n++){const i=e[n](t);if(i)return i}return null}const Rwr=/[.,;\s]/;function yae(t){return Rwr.test(t)}function UWt(t){return yae(t[t.length-1])}function MHe(t){return yae(t[0])}function Pwr(t,e){return e?/^\.[a-zA-Z]{2,}/.test(t):/^\.[a-zA-Z0-9]{1,}/.test(t)}function KWt(t){let e=t.getPreviousSibling();return Mn(e)&&(e=e.getLastDescendant()),e===null||SS(e)||ai(e)&&UWt(e.getTextContent())}function qWt(t){let e=t.getNextSibling();return Mn(e)&&(e=e.getFirstDescendant()),e===null||SS(e)||ai(e)&&MHe(e.getTextContent())}function Owr(t,e,n,i){return(t>0?yae(n[t-1]):KWt(i[0]))?e<n.length?yae(n[e]):qWt(i[i.length-1]):!1}function jwr(t,e,n){const i=[],r=[],o=[];let s=0,a=0;const l=[...t];for(;l.length>0;){const c=l[0],d=c.getTextContent().length,h=a;a+d<=e?(i.push(c),s+=d):h>=n?o.push(c):r.push(c),a+=d,l.shift()}return[s,i,r,o]}function Fwr(t,e,n,i){const r=CPe(i.url,i.attributes);if(t.length===1){let o=t[0],s;e===0?[s,o]=o.splitText(n):[,s,o]=o.splitText(e,n);const a=Dc(i.text);return a.setFormat(s.getFormat()),a.setDetail(s.getDetail()),a.setStyle(s.getStyle()),r.append(a),s.replace(r),o}else if(t.length>1){const o=t[0];let s=o.getTextContent().length,a;e===0?a=o:[,a]=o.splitText(e);const l=[];let c;for(let f=1;f<t.length;f++){const m=t[f],g=m.getTextContent().length,y=s,_=s+g;if(y<n)if(_<=n)l.push(m);else{const[w,C]=m.splitText(n-y);l.push(w),c=C}s+=g}const u=Fi(),d=u?u.getNodes().find(ai):void 0,h=Dc(a.getTextContent());return h.setFormat(a.getFormat()),h.setDetail(a.getDetail()),h.setStyle(a.getStyle()),r.append(h,...l),d&&d===a&&(Jn(u)?h.select(u.anchor.offset,u.focus.offset):bf(u)&&h.select(0,h.getTextContent().length)),a.replace(r),c}}function $wr(t,e,n){let i=[...t];const r=i.map(l=>l.getTextContent()).join("");let o=r,s,a=0;for(;(s=WWt(o,e))&&s!==null;){const l=s.index,c=s.length,u=l+c;if(Owr(a+l,a+u,r,i)){const[h,,f,m]=jwr(i,a+l,a+u),p=a+l-h,g=a+u-h,y=Fwr(f,p,g,s);i=y?[y,...m]:m,n(s.url,null),a=0}else a+=u;o=o.substring(u)}}function LPe(t,e,n){const i=t.getChildren(),r=i.length;for(let l=0;l<r;l++){const c=i[l];if(!ai(c)||!c.isSimpleText()){Ote(t),n(null,t.getURL());return}}const o=t.getTextContent(),s=WWt(o,e);if(s===null||s.text!==o){Ote(t),n(null,t.getURL());return}if(!KWt(t)||!qWt(t)){Ote(t),n(null,t.getURL());return}const a=t.getURL();if(a!==s.url&&(t.setURL(s.url),n(s.url,a)),s.attributes){const l=t.getRel();l!==s.attributes.rel&&(t.setRel(s.attributes.rel||null),n(s.attributes.rel||null,l));const c=t.getTarget();c!==s.attributes.target&&(t.setTarget(s.attributes.target||null),n(s.attributes.target||null,c))}}function Vwr(t,e,n){const i=t.getPreviousSibling(),r=t.getNextSibling(),o=t.getTextContent();q3(i)&&!i.getIsUnlinked()&&(!MHe(o)||Pwr(o,i.isEmailURI()))&&(i.append(t),LPe(i,e,n),n(null,i.getURL())),q3(r)&&!r.getIsUnlinked()&&!UWt(o)&&(Ote(r),LPe(r,e,n),n(null,r.getURL()))}function Ote(t){const e=t.getChildren(),n=e.length;for(let i=n-1;i>=0;i--)t.insertAfter(e[i]);return t.remove(),e.map(i=>i.getLatest())}function Bwr(t){const e=[t];let n=t.getNextSibling();for(;n!==null&&ai(n)&&n.isSimpleText()&&(e.push(n),!/[\s]/.test(n.getTextContent()));)n=n.getNextSibling();return e}function zwr(t,e,n){b.useEffect(()=>{if(!t.hasNodes([_$]))throw Error("LexicalAutoLinkPlugin: AutoLinkNode not registered on editor");const i=(r,o)=>{n&&n(r,o)};return Bw(t.registerNodeTransform(yM,r=>{const o=r.getParentOrThrow(),s=r.getPreviousSibling();if(q3(o)&&!o.getIsUnlinked())LPe(o,e,i);else if(!i0(o)){if(r.isSimpleText()&&(MHe(r.getTextContent())||!q3(s))){const a=Bwr(r);$wr(a,e,i)}Vwr(r,e,i)}}),t.registerCommand(SD,r=>{const o=Fi();return r!==null||!Jn(o)||o.extract().forEach(a=>{const l=a.getParent();if(q3(l))return l.setIsUnlinked(!l.getIsUnlinked()),l.markDirty(),!0}),!1},K3))},[t,e,n])}function Hwr({matchers:t,onChange:e}){const[n]=Jv();return zwr(n,t,e),null}const Wwr=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,Uwr=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,Kwr=[t=>{const e=Wwr.exec(t);return e&&{index:e.index,length:e[0].length,text:e[0],url:e[0]}},t=>{const e=Uwr.exec(t);return e&&{index:e.index,length:e[0].length,text:e[0],url:`mailto:${e[0]}`}}];function qwr(){return v.jsxDEV(Hwr,{matchers:Kwr},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/plugin/autoLinkPlugin.tsx",lineNumber:37,columnNumber:9},this)}function Gwr(t){const e=t.anchor,n=t.focus,i=t.anchor.getNode(),r=t.focus.getNode();return i===r?i:t.isBackward()?pae(n)?i:r:pae(e)?r:i}function Evt(t,e){if(e===null){t.style.opacity="0",t.style.top="-1000px",t.style.left="-1000px";return}t.style.opacity="1",t.style.top=`${e.top+e.height+window.scrollY+10}px`,t.style.left=`${e.left+window.scrollX-t.offsetWidth/2+e.width/2}px`}function Ywr({editor:t}){const e=Mt(),n=b.useRef(!1),[i,r]=b.useState(""),o=b.useRef(null),s=b.useRef(null),[a,l]=b.useState(!1),[c,u]=b.useState(null),d=b.useCallback(()=>{const p=Fi();if(Jn(p)){const C=Gwr(p),N=C.getParent();i0(N)?r(N.getURL()):i0(C)?r(C.getURL()):r("")}const g=o.current,y=window.getSelection(),_=document.activeElement;if(g===null)return;const w=t.getRootElement();if(y&&p!==null&&w!==null&&!y.isCollapsed&&w.contains(y.anchorNode)){let C;const N=y.getRangeAt(0);if(y.anchorNode===w){let E=w;for(;E.firstElementChild!=null;)E=E.firstElementChild;C=E.getBoundingClientRect()}else C=N.getBoundingClientRect();n.current||Evt(g,C),u(p)}else(!_||_.className!=="link-input")&&(Evt(g,null),u(null),l(!1),r(""));return!0},[t]);b.useEffect(()=>Bw(t.registerUpdateListener(({editorState:p})=>p.read(()=>d())),t.registerCommand(uG,()=>(d(),!0),1)),[t,d]),b.useEffect(()=>{t.getEditorState().read(()=>d())},[t,d]),b.useEffect(()=>{a&&s.current&&s.current.focus()},[a]);const h=p=>{if(p.key==="Enter"){p.preventDefault(),c!==null&&(i!==""&&t.dispatchCommand(SD,i),l(!1));return}if(p.key==="Escape"){p.preventDefault(),l(!1);return}},f=()=>{t.dispatchCommand(SD,null)},m=()=>{t.dispatchCommand(SD,i),l(!1)};return v.jsxDEV(or,{shadow:"xl",withBorder:!0,px:"xs",py:6,ref:o,className:"markdown_editor-floating_link_editor",children:[!a&&v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:i},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/components/floatingLinkEditor.tsx",lineNumber:168,columnNumber:6},this),v.jsxDEV(zl,{orientation:"vertical"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/components/floatingLinkEditor.tsx",lineNumber:171,columnNumber:6},this),v.jsxDEV(un,{gap:4,children:[v.jsxDEV(Fr,{size:"sm",radius:"sm",color:"black",variant:"subtle",onClick:()=>l(!0),"aria-label":e.formatMessage({id:"markdown_editor.toolbar.link.editor_modal.edit_button.aria_label",defaultMessage:"Edit link"}),children:v.jsxDEV(Xsi,{size:18,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/components/floatingLinkEditor.tsx",lineNumber:184,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/components/floatingLinkEditor.tsx",lineNumber:173,columnNumber:7},this),v.jsxDEV(Fr,{size:"sm",radius:"sm",color:"black",variant:"subtle",onClick:f,"aria-label":e.formatMessage({id:"markdown_editor.toolbar.link.editor_modal.unlink_button.aria_label",defaultMessage:"Unlink link"}),children:v.jsxDEV(Cai,{size:18,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/components/floatingLinkEditor.tsx",lineNumber:197,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/components/floatingLinkEditor.tsx",lineNumber:186,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/components/floatingLinkEditor.tsx",lineNumber:172,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/components/floatingLinkEditor.tsx",lineNumber:167,columnNumber:5},this),a&&v.jsxDEV(pa,{ref:s,value:i,onKeyDown:h,onChange:p=>r(p.target.value),rightSection:v.jsxDEV(Fr,{size:"sm",radius:"sm",onClick:m,disabled:!i.length,"aria-label":e.formatMessage({id:"markdown_editor.toolbar.link.editor_modal.save_button.aria_label",defaultMessage:"Save link"}),children:v.jsxDEV(Ysi,{size:18,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/components/floatingLinkEditor.tsx",lineNumber:219,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/components/floatingLinkEditor.tsx",lineNumber:209,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/components/floatingLinkEditor.tsx",lineNumber:203,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/components/floatingLinkEditor.tsx",lineNumber:165,columnNumber:3},this)}function Xwr(t){const e=t.focus,n=t.anchor,i=t.focus.getNode(),r=t.anchor.getNode();return r===i?r:t.isBackward()?pae(e)?r:i:pae(n)?i:r}function Zwr(){const t=Mt(),[e,n]=b.useState(!1),[i,r]=b.useState(!1),[o]=Jv(),s=b.useRef(null),[a,l]=b.useState(!1),[c,u]=b.useState(!1),[d,h]=b.useState(!1),f=b.useCallback(()=>{const p=Fi();if(!Jn(p))return;r(p.hasFormat("bold")),l(p.hasFormat("italic")),u(p.hasFormat("underline")),h(p.hasFormat("strikethrough"));const g=Xwr(p),y=g.getParent();n(i0(y)||i0(g))},[o]);b.useEffect(()=>Bw(o.registerUpdateListener(({editorState:p})=>p.read(()=>f())),o.registerCommand(uG,p=>(f(),!1),1)),[o,f]);const m=b.useCallback(()=>{if(!e){o.dispatchCommand(SD,"https://");return}o.dispatchCommand(SD,null)},[o,e]);return v.jsxDEV(un,{className:"markdown_editor-toolbar",gap:"xs",ref:s,children:[v.jsxDEV(un,{gap:"0",children:[v.jsxDEV(Fr,{color:"gray",size:"sm",radius:"sm",variant:i?"primary":"subtle",onClick:()=>o.dispatchCommand(d0,"bold"),"aria-label":i?t.formatMessage({id:"markdown_editor.toolbar.bold.aria_label.active",defaultMessage:"Remove bold format"}):t.formatMessage({id:"markdown_editor.toolbar.bold.aria_label",description:"format text to bold"}),children:v.jsxDEV(Vsi,{size:18,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/ToolbarPlugin.tsx",lineNumber:100,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/ToolbarPlugin.tsx",lineNumber:82,columnNumber:5},this),v.jsxDEV(Fr,{color:"gray",size:"sm",radius:"sm",variant:a?"primary":"subtle","aria-label":a?t.formatMessage({id:"markdown_editor.toolbar.italic.aria_label.active",defaultMessage:"Remove italic format"}):t.formatMessage({id:"markdown_editor.toolbar.italic.aria_label",description:"format text to italic"}),onClick:()=>o.dispatchCommand(d0,"italic"),children:v.jsxDEV(aai,{size:18,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/ToolbarPlugin.tsx",lineNumber:120,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/ToolbarPlugin.tsx",lineNumber:102,columnNumber:5},this),v.jsxDEV(Fr,{color:"gray",size:"sm",radius:"sm",variant:d?"primary":"subtle","aria-label":d?t.formatMessage({id:"markdown_editor.toolbar.strike_through.aria_label.active",defaultMessage:"Remove strike through format"}):t.formatMessage({id:"markdown_editor.toolbar.strike_through.aria_label",description:"format text to strike through"}),onClick:()=>o.dispatchCommand(d0,"strikethrough"),children:v.jsxDEV(_ai,{size:18,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/ToolbarPlugin.tsx",lineNumber:160,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/ToolbarPlugin.tsx",lineNumber:142,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/ToolbarPlugin.tsx",lineNumber:81,columnNumber:4},this),v.jsxDEV(zl,{orientation:"vertical"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/ToolbarPlugin.tsx",lineNumber:163,columnNumber:4},this),v.jsxDEV(Fr,{color:"gray",size:"sm",radius:"sm",variant:e?"primary":"subtle","aria-label":t.formatMessage({id:"markdown_editor.toolbar.link.aria_label",defaultMessage:"Insert link"}),onClick:m,children:v.jsxDEV(cai,{size:18,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/ToolbarPlugin.tsx",lineNumber:175,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/ToolbarPlugin.tsx",lineNumber:164,columnNumber:4},this),e&&Fc.createPortal(v.jsxDEV(Ywr,{editor:o},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/ToolbarPlugin.tsx",lineNumber:177,columnNumber:28},this),document.body)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/ToolbarPlugin.tsx",lineNumber:80,columnNumber:3},this)}const Qwr=({id:t,placeholder:e,onChange:n,className:i=""})=>{function r(o){o.read(()=>{if(!n)return;const s=Oxr(C$);n(s)})}return v.jsxDEV("div",{id:t,className:"wysiwyg-container",children:[v.jsxDEV(Zwr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/editor.tsx",lineNumber:41,columnNumber:4},void 0),v.jsxDEV("div",{className:"wysiwyg-inner",children:[v.jsxDEV(Iwr,{contentEditable:v.jsxDEV(Kxr,{className:`wysiwyg-input ${i}`},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/editor.tsx",lineNumber:44,columnNumber:23},void 0),placeholder:()=>v.jsxDEV("div",{className:"wysiwyg-placeholder",children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/editor.tsx",lineNumber:45,columnNumber:25},void 0),ErrorBoundary:Qxr},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/editor.tsx",lineNumber:43,columnNumber:5},void 0),v.jsxDEV(hwr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/editor.tsx",lineNumber:48,columnNumber:5},void 0),v.jsxDEV(dwr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/editor.tsx",lineNumber:49,columnNumber:5},void 0),v.jsxDEV(qwr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/editor.tsx",lineNumber:50,columnNumber:5},void 0),v.jsxDEV(xwr,{onChange:r},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/editor.tsx",lineNumber:51,columnNumber:5},void 0),v.jsxDEV(vwr,{transformers:[...$Wt,...VWt]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/editor.tsx",lineNumber:52,columnNumber:5},void 0)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/editor.tsx",lineNumber:42,columnNumber:4},void 0)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/editor.tsx",lineNumber:40,columnNumber:3},void 0)};function _ae({id:t,value:e,defaultValue:n,placeholder:i="",onChange:r,className:o}){const[s,a]=au({value:e,defaultValue:n,finalValue:"Final",onChange:r}),l={namespace:"markdownEditor",theme:jxr,editorState:()=>e&&Pxr(e,C$),onError(c){throw c},nodes:[_$,xM,pR,mR]};return v.jsxDEV(m_r,{initialConfig:l,children:v.jsxDEV(Qwr,{id:t,placeholder:i,onChange:a,className:o},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/index.tsx",lineNumber:40,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/MarkdownEditor/index.tsx",lineNumber:39,columnNumber:3},this)}const Jwr=Ja.getAllCodes();function e1r({value:t,disableLanguage:e,excludedLanguages:n,projectLanguages:i,renderFooter:r,onSubmit:o}){const s=Mt(),a=gt.object({language:gt.enum(Jwr,{required_error:s.formatMessage({id:"form_config.welcome_message.form.language.required",defaultMessage:"Language is required"})}),welcomeMessage:gt.string({required_error:s.formatMessage({id:"form_config.welcome_message.form.welcomeMessage.required",defaultMessage:"Welcome message is required"})}).min(1,{message:s.formatMessage({id:"form_config.welcome_message.form.welcomeMessage.required",defaultMessage:"Welcome message is required"})}).max(2048,{message:s.formatMessage({id:"form_config.welcome_message.form.welcomeMessage.max_length",defaultMessage:"Welcome message cannot be longer then 4.096 characters"})}).optional(),startButton:gt.string({required_error:s.formatMessage({id:"form_config.start_button.form.fields.required",defaultMessage:"Start button is required"})}).max(256,{message:s.formatMessage({id:"form_config.start_button.form.fields.max_length",defaultMessage:"Start button cannot be longer then 256 characters"})}).optional()}),l=b.useMemo(()=>[...i].filter(m=>!n.has(m))[0],[i,n]),[c,u]=b.useState(!1),d=ls({validateInputOnBlur:!0,validate:aa(a),initialValues:{language:l,...t},onValuesChange:()=>u(d.isValid()&&d.isDirty())}),h=()=>{const{language:f,...m}=d.values;o({[`${f}`]:m})};return v.jsxDEV("form",{onSubmit:f=>{f.preventDefault(),f.stopPropagation(),h()},children:v.jsxDEV(Gt,{gap:"sm",children:[v.jsxDEV(wS,{strict:!1,allowDeselect:!1,disabled:e,locales:i,exclude:new Set([...n].filter(f=>f!==(t==null?void 0:t.language))),...d.getInputProps("language"),label:s.formatMessage({id:"form_config.welcome_message.form.language.label",defaultMessage:"Language"})},d.key("language"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/WelcomeMessage/LanguageForm.tsx",lineNumber:111,columnNumber:5},this),d.values.language&&!i.has(d.values.language)&&v.jsxDEV(Yo,{children:v.jsxDEV(ee,{id:"shared.language.info.unsupported",defaultMessage:"{language} has not been added to your project, we will add it for you.",values:{language:Mp(Ja.getName(d.values.language))}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/WelcomeMessage/LanguageForm.tsx",lineNumber:126,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/WelcomeMessage/LanguageForm.tsx",lineNumber:125,columnNumber:6},this),v.jsxDEV(ra.Wrapper,{id:"welcomeMessage",label:s.formatMessage({id:"form_config.welcome_message.form.welcomeMessage.label",defaultMessage:"Welcome message"}),children:v.jsxDEV(_ae,{...d.getInputProps("welcomeMessage"),className:"max-h-[124px] overflow-y"},d.key("welcomeMessage"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/WelcomeMessage/LanguageForm.tsx",lineNumber:140,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/WelcomeMessage/LanguageForm.tsx",lineNumber:133,columnNumber:5},this),v.jsxDEV(Th,{...d.getInputProps("startButton"),label:v.jsxDEV(_m,{label:s.formatMessage({id:"form_config.welcome_message.form.startButton.label",defaultMessage:"Start button"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/WelcomeMessage/LanguageForm.tsx",lineNumber:151,columnNumber:7},this),description:s.formatMessage({id:"form_config.welcome_message.form.startButton..description",defaultMessage:"If you don't set a start button your customer will see the reply field"}),minRows:1,maxRows:4,autosize:!0},d.key("startButton"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/WelcomeMessage/LanguageForm.tsx",lineNumber:147,columnNumber:5},this),r({isValid:c})]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/WelcomeMessage/LanguageForm.tsx",lineNumber:110,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/WelcomeMessage/LanguageForm.tsx",lineNumber:103,columnNumber:3},this)}function t1r({value:t={},project:e,isInitialLoading:n,readOnly:i,organization:r,onChange:o}){const s=Mt(),a=c=>{if(!o)return;const u={...t};delete u[c],o(u)},l=c=>{o&&o({...t,...c})};return v.jsxDEV(cG,{readOnly:i,sectionKey:"welcomeMessage",isInitialLoading:n,title:s.formatMessage({id:"form_config.languages.title",defaultMessage:"Welcome message"}),description:s.formatMessage({id:"form_config.welcome_message.description",defaultMessage:"The welcome message and start button are the first things your users will see. Since these elements won't be processed by AI and will remain the same, you're responsible for providing them in all the necessary languages."}),locale:{confirmDelete:{title:{id:"form_config.welcome_message.delete_modal.title",defaultMessage:"Delete {language} welcome message"},description:{id:"form_config.welcome_message.delete_modal.description",defaultMessage:"Deleting the welcome message is <bold>irreversible</bold> and cannot be undone. Language will also be removed from the layout."},deleteButton:{id:"form_config.welcome_message.delete_modal.confirm",defaultMessage:"Delete welcome message"}},formSubmit:{id:"form_config.welcome_message.modal.submit",defaultMessage:"Add"}},project:e,organization:r,data:t,renderInTable:c=>v.jsxDEV(Qe,{size:"sm",truncate:"end",className:"w-full text-left",children:c.welcomeMessage},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/WelcomeMessage/index.tsx",lineNumber:74,columnNumber:5},this),onSubmit:l,onDelete:a,children:c=>v.jsxDEV(e1r,{...c,projectLanguages:new Set(e.languages),value:c.value&&{language:c.selectedLanguage,...c.value},renderFooter:({isValid:u})=>c.renderFooter({isValid:u})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/WelcomeMessage/index.tsx",lineNumber:82,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/WelcomeMessage/index.tsx",lineNumber:36,columnNumber:3},this)}function n1r({form:t,showInput:e,permissions:n}){var s,a,l;const i=Mt(),r=Oi(ps),o=(((s=t.values.suggestions.rules)==null?void 0:s.length)||0)<eD;return(a=n==null?void 0:n.aiForm)!=null&&a.allowSuggestions?v.jsxDEV(Wi.Item,{value:"suggestions",className:"!bg-white",children:[v.jsxDEV(Wi.Control,{children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"project.form_config.suggestions.title",defaultMessage:"Suggestions"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:61,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:60,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:59,columnNumber:4},this),v.jsxDEV(Wi.Panel,{children:v.jsxDEV(Gt,{gap:0,className:"w-full",children:[v.jsxDEV(Qe,{c:"dimmed",size:"sm",mb:"md",children:v.jsxDEV(ee,{id:"project.form_config.suggestions.description",defaultMessage:"Let your assistant suggest possible answers when it makes sense. It'll will use 1 extra message credit."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:67,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:66,columnNumber:6},this),v.jsxDEV(Vo,{id:"suggestions.isEnabled",label:i.formatMessage({id:"project.form_config.suggestions.is_enable.label",defaultMessage:"Enable suggestions"}),hideDivider:!e,children:v.jsxDEV(Du,{...t.getInputProps("suggestions.isEnabled",{type:"checkbox"})},t.key("suggestions.isEnabled"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:80,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:72,columnNumber:6},this),e&&v.jsxDEV(ra.Wrapper,{label:i.formatMessage({id:"project.form_config.suggestions.rules.label",defaultMessage:"Rules"}),description:i.formatMessage({id:"project.form_config.suggestions.rules.description",defaultMessage:"Provide extra rules your assistant needs to follow when generating suggestions."}),inputWrapperOrder:["label","description","input","error"],children:v.jsxDEV(Gt,{align:"flex-start",gap:"xs",mt:"xs",children:[(l=t.values.suggestions.rules)==null?void 0:l.map((c,u)=>v.jsxDEV(uu,{gap:"xs",align:"flex-start",className:"w-full",children:[v.jsxDEV(Qe,{className:"w-4 whitespace-nowrap text-right !leading-9",children:u+1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:101,columnNumber:11},this),v.jsxDEV(Th,{autosize:!0,minRows:1,maxRows:5,resize:"vertical",className:"w-full",readOnly:!r,...t.getInputProps(`suggestions.rules.${u}`),"aria-label":i.formatMessage({id:"form_config.config.rules.field.aria_label",defaultMessage:"Rule {number}"},{number:u+1})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:102,columnNumber:11},this),r&&v.jsxDEV(ir,{openDelay:500,label:i.formatMessage({id:"form_config.config.rules.delete.tooltip",defaultMessage:"Delete rule"}),children:v.jsxDEV(Fr,{size:"lg",color:"red",variant:"subtle","aria-label":i.formatMessage({id:"form_config.config.rules.delete.aria_label",defaultMessage:"Delete rule {number}"},{number:u+1}),onClick:()=>t.removeListItem("suggestions.rules",u),children:v.jsxDEV(Lw,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:139,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:126,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:119,columnNumber:12},this)]},`${c}_${u}`,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:100,columnNumber:10},this)),r&&v.jsxDEV(Nn,{size:"xs",variant:"subtle",disabled:!o,leftSection:o&&v.jsxDEV(GA,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:150,columnNumber:47},this),onClick:()=>t.insertListItem("suggestions.rules",""),children:[!o&&v.jsxDEV(ee,{id:"form_config.config.rules.add.disabled",defaultMessage:"Rules limit ({limit}) reached",values:{limit:eD}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:154,columnNumber:12},this),o&&v.jsxDEV(ee,{id:"form_config.config.rules.add",defaultMessage:"Add rule"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:161,columnNumber:12},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:146,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:98,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:86,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:65,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:64,columnNumber:4},this)]},"suggestions",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:58,columnNumber:3},this):v.jsxDEV(Wi.Item,{value:"suggestions",className:"!bg-white",children:[v.jsxDEV(Wi.Control,{children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"project.form_config.suggestions.title",defaultMessage:"Suggestions"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:31,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:30,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:29,columnNumber:5},this),v.jsxDEV(Wi.Panel,{children:v.jsxDEV(Gt,{gap:0,className:"w-full",align:"flex-start",children:[v.jsxDEV(Qe,{c:"dimmed",size:"sm",mb:"md",children:v.jsxDEV(ee,{id:"project.form_config.suggestions.upgrade.description",defaultMessage:"Let your assistant suggest possible answers when it makes sense, helping your customers complete the form with ease."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:37,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:36,columnNumber:7},this),v.jsxDEV(Nn,{size:"sm",to:"/billing",variant:"subtle",component:Np,className:"!text-theme-primary focus-within:bg-theme-primary/10",children:v.jsxDEV(ee,{id:"shared.button.upgrade",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:49,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:42,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:35,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:34,columnNumber:5},this)]},"suggestions",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/Suggestions/index.tsx",lineNumber:28,columnNumber:4},this)}const i1r=60,r1r=Ja.getAllCodes();function o1r({project:t,openTesting:e}){var F,$,B,z,H,K,q,U,Y,J,ae;const n=Mt(),i=Je.useUtils(),[r]=Bv(),o=Oi(ps),[s,a]=b.useState(!1),[l,c]=b.useState(!1),u=Wd(Tpe),[d,h]=f0(lU),[f,m]=TA({key:"formConfigAccordionState",defaultValue:["welcomeMessage","config"]}),[p,g]=b.useState(t.config.endOfFormCta.enabled),[y,_]=b.useState(((F=t.config.suggestions)==null?void 0:F.isEnabled)||!1),w=Je.aiForm.updateFormConfig.useMutation(),{data:C,isInitialLoading:N}=Je.getWidget.useQuery(void 0,{staleTime:1/0}),{data:E}=Je.getOrganization.useQuery(void 0,{staleTime:1/0}),D=Math.min(hri[t.config.model].input??0,(E==null?void 0:E.permissions.contextWindowLimit)??0)??4096,[k,M]=b.useState(Dvt({prompt:t.config.prompt[t.defaultLanguage]??"",fields:t.config.fields??"",rules:t.config.rules})),T=k>D,A=k/D*100>=i1r,R=ls({mode:"uncontrolled",initialValues:structuredClone({rules:t.config.rules||[],temperature:t.config.temperature,fields:t.config.fields,forceLanguage:t.config.forceLanguage||!1,suggestions:t.config.suggestions,prompt:t.config.prompt[t.defaultLanguage],keepActiveAfterCompletion:t.config.keepActiveAfterCompletion||!1,endOfFormCta:{enabled:!!(($=t.config.endOfFormCta)!=null&&$.enabled),prompt:((B=t.config.endOfFormCta)==null?void 0:B.prompt)??"",alignment:((z=t.config.endOfFormCta)==null?void 0:z.alignment)??"vertical",cta:(H=t.config.endOfFormCta)==null?void 0:H.cta}}),validateInputOnBlur:!0,validate:aa(s1r({contentCharacterLimit:D,intl:n})),onValuesChange:se=>{var de,ie;const oe=Dvt(se);_((de=se.suggestions)==null?void 0:de.isEnabled),M(oe),g((ie=se.endOfFormCta)==null?void 0:ie.enabled);const fe=oe<D;c(R.isDirty()),a(R.isValid()&&(l||R.isDirty())&&fe),KA(()=>u(structuredClone(se)))}}),P=se=>{h(se),a(R.isValid()),c(!0)},O=async se=>{var oe;try{const fe=((oe=se.rules)==null?void 0:oe.filter(de=>!zp(de.trim())))||[];await w.mutateAsync({...se,rules:fe,introMessage:d,endOfFormCta:{prompt:se.endOfFormCta.prompt,enabled:se.endOfFormCta.enabled,alignment:se.endOfFormCta.alignment,cta:se.endOfFormCta.cta}}),a(!1),c(!1),R.resetDirty(),R.setInitialValues(structuredClone(se)),i.getWidget.invalidate(),i.project.getCurrent.invalidate(),In.show({color:"green",message:n.formatMessage({id:"form_config.configuration.update.notification.succeeded",defaultMessage:"Config has been updated"}),autoClose:5e3})}catch(fe){console.error("Failed to update ai form config",fe),In.show({color:"red",title:n.formatMessage({id:"form_config.configuration.update.notification.failed.title",defaultMessage:"Configuration could not be updated"}),message:n.formatMessage({id:"form_config.configuration.update.notification.failed.message",defaultMessage:"We cannot update your configuration at this moment, please try again later."}),autoClose:1e4})}};b.useEffect(()=>{var se,oe,fe;h(C==null?void 0:C.content),u({rules:t.config.rules||[],temperature:t.config.temperature,fields:t.config.fields,suggestions:t.config.suggestions,prompt:t.config.prompt[t.defaultLanguage],keepActiveAfterCompletion:t.config.keepActiveAfterCompletion||!1,endOfFormCta:{enabled:!!((se=t.config.endOfFormCta)!=null&&se.enabled),prompt:((oe=t.config.endOfFormCta)==null?void 0:oe.prompt)??"",alignment:t.config.endOfFormCta.alignment,cta:(fe=t.config.endOfFormCta)==null?void 0:fe.cta}})},[C,t]),b.useEffect(()=>{const se=r.get("accordion");se&&m([...f,...se.split(",")])},[r]);const V=(((K=R.values.rules)==null?void 0:K.length)||0)<eD;if(E)return v.jsxDEV("form",{onSubmit:R.onSubmit(O),className:"h-full flex flex-col",children:[v.jsxDEV(dhr,{isDirty:l},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:212,columnNumber:4},this),v.jsxDEV("header",{className:"w-full p-4 py-3 bg-white border-b lg:border-r border-gray-200 border-solid",children:v.jsxDEV(un,{justify:"space-between",className:"my-auto",wrap:"wrap",children:[v.jsxDEV(Gt,{gap:0,children:v.jsxDEV(Qe,{fw:600,size:"md",truncate:"end",children:v.jsxDEV(ee,{id:"form_config.title",defaultMessage:"Form configuration"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:217,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:216,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:215,columnNumber:6},this),v.jsxDEV(un,{gap:"xs",justify:"flex-end",children:[v.jsxDEV(ir,{label:n.formatMessage({id:"form_config.form.testing",defaultMessage:"Test configuration"}),openDelay:500,children:v.jsxDEV(Fr,{size:"lg",variant:"light",className:"lg:!hidden",onClick:e,children:v.jsxDEV(QPt,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:229,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:228,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:221,columnNumber:7},this),o&&v.jsxDEV(Nn,{type:"submit",variant:"filled",id:"saveFormConfig",disabled:!s,loading:w.isLoading,children:v.jsxDEV(ee,{id:"form_config.form.submit",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:240,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:233,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:220,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:214,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:213,columnNumber:4},this),v.jsxDEV(Gt,{gap:"md",id:"formConfigStack",className:"overflow-auto overflow-x-hidden h-full p-4",children:v.jsxDEV(Wi,{multiple:!0,className:"w-full",variant:"separated",value:f,onChange:m,children:[v.jsxDEV(t1r,{project:t,readOnly:!o,value:d,organization:E,isInitialLoading:N,onChange:P},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:254,columnNumber:6},this),v.jsxDEV(Wi.Item,{value:"config",className:"!bg-white",children:[v.jsxDEV(Wi.Control,{children:v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV(Qe,{id:"config",fw:"600",children:v.jsxDEV(ee,{id:"form_config.config.title",defaultMessage:"Configuration"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:266,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:265,columnNumber:9},this),T&&v.jsxDEV(ir,{label:n.formatMessage(dO.limitTitle),children:v.jsxDEV(kp,{variant:"light",color:"red",children:v.jsxDEV(ud,{color:"red",size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:271,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:270,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:269,columnNumber:10},this),!T&&A&&v.jsxDEV(ir,{label:n.formatMessage(dO.thresholdTitle),children:v.jsxDEV(kp,{variant:"light",color:"orange",children:v.jsxDEV(ud,{color:"orange",size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:278,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:277,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:276,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:264,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:263,columnNumber:7},this),v.jsxDEV(Wi.Panel,{children:v.jsxDEV(Gt,{id:"configSection",children:[T&&v.jsxDEV(Yo,{color:"red",variant:"light",className:"w-full",title:n.formatMessage(dO.limitTitle),icon:v.jsxDEV(ud,{size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:292,columnNumber:17},this),children:v.jsxDEV(ee,{...dO.limitDescription,values:{limit:n.formatNumber(D)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:294,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:287,columnNumber:10},this),!T&&A&&v.jsxDEV(Yo,{color:"orange",variant:"light",className:"w-full",title:n.formatMessage(dO.thresholdTitle),icon:v.jsxDEV(ud,{size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:306,columnNumber:17},this),children:v.jsxDEV(ee,{...dO.thresholdDescription},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:308,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:301,columnNumber:10},this),v.jsxDEV(Th,{...R.getInputProps("prompt"),label:n.formatMessage({id:"form_config.config.prompt.label",defaultMessage:"Describe your form"}),description:n.formatMessage({id:"form_config.config.prompt.description",defaultMessage:"Let the AI assistant know what it's purpose is and why it needs data from your customers."}),inputWrapperOrder:["label","description","input","error"],readOnly:!o,resize:"vertical",minRows:4,maxRows:24,autosize:!0},R.key("prompt"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:311,columnNumber:9},this),v.jsxDEV(Th,{label:n.formatMessage({id:"form_config.config.fields.label",defaultMessage:"Fields"}),description:n.formatMessage({id:"form_config.config.fields.description",defaultMessage:"Let the AI assistant know exactly what fields they need to request from your customers."}),...R.getInputProps("fields"),placeholder:n.formatMessage({id:"form_config.config.fields.placeholder",defaultMessage:"What data do you want to collect?"}),inputWrapperOrder:["label","description","input","error"],readOnly:!o,resize:"vertical",minRows:4,maxRows:24,autosize:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:330,columnNumber:9},this),v.jsxDEV(ra.Wrapper,{label:n.formatMessage({id:"form_config.config.rules.label",defaultMessage:"Rules"}),description:n.formatMessage({id:"form_config.config.rules.description",defaultMessage:"Provide extra rules your assistant needs to follow when talking to your customers."}),inputWrapperOrder:["label","description","input","error"],children:v.jsxDEV(Gt,{align:"flex-start",gap:"xs",mt:"xs",children:[(q=R.values.rules)==null?void 0:q.map((se,oe)=>v.jsxDEV(uu,{gap:"xs",align:"flex-start",className:"w-full",children:[v.jsxDEV(Qe,{className:"w-4 whitespace-nowrap text-right !leading-9",children:oe+1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:372,columnNumber:13},this),v.jsxDEV(Th,{autosize:!0,minRows:1,maxRows:5,resize:"vertical",className:"w-full",readOnly:!o,...R.getInputProps(`rules.${oe}`),"aria-label":n.formatMessage({id:"form_config.config.rules.field.aria_label",defaultMessage:"Rule {number}"},{number:oe+1})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:375,columnNumber:13},this),o&&v.jsxDEV(ir,{openDelay:500,label:n.formatMessage({id:"form_config.config.rules.delete.tooltip",defaultMessage:"Delete rule"}),children:v.jsxDEV(Fr,{size:"lg",color:"red",variant:"subtle","aria-label":n.formatMessage({id:"form_config.config.rules.delete.aria_label",defaultMessage:"Delete rule {number}"},{number:oe+1}),onClick:()=>R.removeListItem("rules",oe),children:v.jsxDEV(Lw,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:412,columnNumber:16},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:399,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:392,columnNumber:14},this)]},`${se}_${oe}`,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:366,columnNumber:12},this)),o&&v.jsxDEV(Nn,{size:"xs",variant:"subtle",disabled:!V,leftSection:V&&v.jsxDEV(GA,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:423,columnNumber:49},this),onClick:()=>R.insertListItem("rules",""),children:[!V&&v.jsxDEV(ee,{id:"form_config.config.rules.add.disabled",defaultMessage:"Rules limit ({limit}) reached",values:{limit:eD}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:427,columnNumber:14},this),V&&v.jsxDEV(ee,{id:"form_config.config.rules.add",defaultMessage:"Add rule"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:434,columnNumber:14},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:419,columnNumber:12},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:364,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:352,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:285,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:284,columnNumber:7},this)]},"config",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:262,columnNumber:6},this),v.jsxDEV(ivr,{project:t,form:R,showInput:p},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:446,columnNumber:6},this),v.jsxDEV(n1r,{form:R,showInput:y,permissions:E.permissions},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:447,columnNumber:6},this),v.jsxDEV(Wi.Item,{value:"conversationStyle",className:"!bg-white",children:[v.jsxDEV(Wi.Control,{children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"form_config.conversation_style.title",defaultMessage:"Conversation style"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:451,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:450,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:449,columnNumber:7},this),v.jsxDEV(Wi.Panel,{children:v.jsxDEV(ovr,{readOnly:!o,...R.getInputProps("temperature")},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:458,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:457,columnNumber:7},this)]},"conversationStyle",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:448,columnNumber:6},this),v.jsxDEV(Wi.Item,{value:"advanced",className:"!bg-white",children:[v.jsxDEV(Wi.Control,{children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"form_config.advanced.title",defaultMessage:"Advanced"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:465,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:464,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:463,columnNumber:7},this),v.jsxDEV(Wi.Panel,{children:[v.jsxDEV(Vo,{id:"forceLanguage",label:n.formatMessage({id:"form_config.advanced.force_language.label",defaultMessage:"Force language"}),help:n.formatMessage({id:"form_config.advanced.force_language.help",defaultMessage:"Force the agent to answer in the set language and only use documents matching the language."}),children:v.jsxDEV(Du,{id:"forceLanguage",readOnly:!o,...R.getInputProps("forceLanguage",{type:"checkbox"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:481,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:469,columnNumber:8},this),v.jsxDEV(Vo,{hideDivider:!0,id:"keepActiveAfterCompletion",label:n.formatMessage({id:"form_config.advanced.keep_active_after_completion.label",defaultMessage:"Keep active after completion"}),help:n.formatMessage({id:"form_config.advanced.end_flow.label",defaultMessage:"Let customers ask questions even when form has been completed."}),children:[((Y=(U=E==null?void 0:E.permissions)==null?void 0:U.aiForm)==null?void 0:Y.allowKeepActive)&&v.jsxDEV(Du,{readOnly:!o,id:"keepActiveAfterCompletion",...R.getInputProps("keepActiveAfterCompletion",{type:"checkbox"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:500,columnNumber:10},this),!((ae=(J=E==null?void 0:E.permissions)==null?void 0:J.aiForm)!=null&&ae.allowKeepActive)&&v.jsxDEV(Nn,{size:"sm",to:"/billing",variant:"subtle",component:Np,className:"!text-theme-primary focus-within:bg-theme-primary/10",children:v.jsxDEV(ee,{id:"shared.button.upgrade",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:514,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:507,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:487,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:468,columnNumber:7},this)]},"advanced",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:462,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:247,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:246,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/Configuration/index.tsx",lineNumber:211,columnNumber:3},this)}const dO={limitTitle:{id:"ai_form.content.level.limit.title",defaultMessage:"Content limit exceeded"},limitDescription:{id:"ai_form.content.level.limit.description",defaultMessage:"Your prompts exceed the character limit of {limit}. Please consider upgrading or simplifying the content to avoid cut-offs or errors."},thresholdTitle:{id:"ai_form.content.level.threshold.title",defaultMessage:"Content length might impact performance"},thresholdDescription:{id:"ai_form.content.level.threshold.description",defaultMessage:"You're nearing the character limit for your plan. You can add more content, but some message history or training data might be excluded, leading to less accurate responses."}};function Dvt({prompt:t,fields:e,rules:n}){return[t,e,n==null?void 0:n.join("")].filter(Boolean).join("").length}function s1r({contentCharacterLimit:t,intl:e}){const n=gt.object({alignment:gt.string()}),i=gt.object({key:gt.string().min(2).max(48).regex(new RegExp(/^[a-zA-Z-0-9_-]+$/)),type:gt.enum(["primary","secondary"]),href:gt.string().url(),label:gt.record(gt.enum(r1r),gt.string().min(2).max(48).optional())}),r=gt.discriminatedUnion("enabled",[gt.object({enabled:gt.literal(!0),prompt:gt.string().min(1,{message:e.formatMessage({id:"form_config.form.prompt.required",defaultMessage:"Prompt is required"})}).max(t,{message:e.formatMessage({id:"form_config.form.prompt.max_length",defaultMessage:"Prompt cannot be longer then {limit} characters"},{limit:t})}).trim().optional(),cta:gt.array(i).min(1,{message:e.formatMessage({id:"form_config.form.cta.required",defaultMessage:"You need to have at least 1 cta button"})})}).merge(n),gt.object({enabled:gt.literal(!1),prompt:gt.string().max(t,{message:e.formatMessage({id:"form_config.form.prompt.max_length",defaultMessage:"Prompt cannot be longer then {limit} characters"},{limit:t})}).trim().optional(),cta:gt.array(i)}).merge(n)]);return gt.object({prompt:gt.string({required_error:e.formatMessage({id:"form_config.form.prompt.required",defaultMessage:"Prompt is required"})}).min(1,{message:e.formatMessage({id:"form_config.form.prompt.required",defaultMessage:"Prompt is required"})}).max(t,{message:e.formatMessage({id:"form_config.form.prompt.max_length",defaultMessage:"Prompt cannot be longer then {limit} characters"},{limit:t})}).trim(),fields:gt.string({required_error:e.formatMessage({id:"form_config.form.fields.required",defaultMessage:"Fields is required"})}).min(1,{message:e.formatMessage({id:"form_config.form.fields.required",defaultMessage:"Fields is required"})}).max(t,{message:e.formatMessage({id:"form_config.form.fields.max_length",defaultMessage:"Fields cannot be longer then {limit} characters"},{limit:t})}).trim(),rules:gt.array(gt.string().max(256,{message:e.formatMessage({id:"form_config.form.rules.max_length",defaultMessage:"Rule cannot be longer then 256 characters"})}).trim()).max(eD,{message:e.formatMessage({id:"form_config.form.rules.total",defaultMessage:"Only {limit} rules are allowed"},{limit:eD})}).optional(),forceLanguage:gt.boolean().optional(),keepActiveAfterCompletion:gt.boolean().optional(),temperature:gt.number().min(.1,{message:e.formatMessage({id:"form_config.form.temperature.min",defaultMessage:"Conversation style must be at least 0.1"})}).max(2,{message:e.formatMessage({id:"form_config.form.temperature.max",defaultMessage:"Conversation style can be maximum 2"})}),endOfFormCta:r,suggestions:gt.object({isEnabled:gt.boolean(),rules:gt.array(gt.string().max(256,{message:e.formatMessage({id:"form_config.form.suggestions.rules.max_length",defaultMessage:"Rule cannot be longer then 256 characters"})}).trim()).max(eD,{message:e.formatMessage({id:"form_config.form.suggestions.rules.total",defaultMessage:"Only {limit} rules are allowed"},{limit:eD})}).optional()})})}function GWt({loading:t,deleted:e,sessionData:n,tableScrollContainerProps:i,pageSize:r=15}){var c;const o=Mt(),[s,a]=b.useState(1),l=n?pPt(Object.entries(n),r):[];return t?v.jsxDEV(Gt,{gap:"sm",children:[v.jsxDEV(li,{height:24},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:32,columnNumber:5},this),v.jsxDEV(li,{height:24},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:33,columnNumber:5},this),v.jsxDEV(li,{height:24},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:34,columnNumber:5},this),v.jsxDEV(li,{height:24},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:35,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:31,columnNumber:4},this):e?v.jsxDEV(Zd,{className:"m-12",title:o.formatMessage({id:"session_detail.table.is_deleted",defaultMessage:"Session has been deleted"}),description:e.deletedReason==="GDPR_RETENTION"?o.formatMessage({id:"session_detail.table.deleted",defaultMessage:"The session was deleted due to your project's data retention settings."}):void 0,src:"/img/svg/deleted_project.svg"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:42,columnNumber:4},this):!n||!Object.keys(n).length?v.jsxDEV(Zd,{className:"m-12",title:o.formatMessage({id:"session_detail.table.no_results",defaultMessage:"No session data available"}),src:"/img/svg/no_results.svg"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:63,columnNumber:4},this):v.jsxDEV(Gt,{children:[v.jsxDEV(hn.ScrollContainer,{type:"native",className:"rounded-md",...i,children:v.jsxDEV(hn,{highlightOnHover:!0,className:"rounded-md overflow-hidden",children:[v.jsxDEV(hn.Thead,{className:"bg-[var(--mantine-color-gray-1)]",children:v.jsxDEV(hn.Tr,{children:[v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"session_detail.table.column.key",defaultMessage:"Key"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:81,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:80,columnNumber:8},this),v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"session_detail.table.column.value",defaultMessage:"Value"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:84,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:83,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:79,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:78,columnNumber:6},this),v.jsxDEV(hn.Tbody,{children:(c=l[s-1])==null?void 0:c.map(([u,d])=>v.jsxDEV(hn.Tr,{children:[v.jsxDEV(hn.Td,{miw:"10rem",children:v.jsxDEV(Qe,{size:"sm",children:u},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:93,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:92,columnNumber:10},this),v.jsxDEV(hn.Td,{miw:"10rem",children:v.jsxDEV(Qe,{size:"sm",children:d},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:96,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:95,columnNumber:10},this)]},u,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:91,columnNumber:9},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:88,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:77,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:76,columnNumber:4},this),v.jsxDEV(Kh,{total:l.length,value:s,onChange:a,hideWithOnePage:!0,size:"sm",mt:"sm",ml:"auto"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:104,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDataTable.tsx",lineNumber:75,columnNumber:3},this)}function kvt({avatar:t,name:e,message:n,direction:i,messageStyle:r,className:o,showAvatar:s=!1,showSourceReferences:a=!1}){var u;const l=i==="left",c=!!((u=n.sourceReferences)!=null&&u.length&&n.done);return v.jsxDEV(uu,{className:"w-full",justify:i==="left"?"flex-start":"flex-end",align:"flex-start",gap:8,children:[l&&s&&v.jsxDEV(IS,{src:t,radius:"md",size:"md"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Message.tsx",lineNumber:36,columnNumber:30},this),v.jsxDEV("span",{className:"sr-only",children:[l&&v.jsxDEV(ee,{id:"shared.message.screen_reader.agent",defaultMessage:"{name} says:",values:{name:e}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Message.tsx",lineNumber:39,columnNumber:6},this),!l&&v.jsxDEV(ee,{id:"shared.message.screen_reader.self",defaultMessage:"I say"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Message.tsx",lineNumber:45,columnNumber:18},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Message.tsx",lineNumber:37,columnNumber:4},this),v.jsxDEV("div",{"aria-live":l?"polite":"off",className:Vt("p-2 rounded-lg shadow-sm border border-solid border-[var(--mantine-color-gray-4)]",l?"rounded-tl-sm":"rounded-tr-sm bg-theme-primary text-white",o),style:r,children:[v.jsxDEV(Yg,{inverse:!l,children:n.content},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Message.tsx",lineNumber:56,columnNumber:5},this),n.endOfFormCta&&v.jsxDEV("ul",{className:Vt("gap-2 mt-4 w-full flex-wrap",n.endOfFormCta.alignment==="horizontal"?"flex":"grid"),children:n.endOfFormCta.cta.map(d=>v.jsxDEV(Nn,{component:"a",target:"_blank",rel:"noopener noreferrer",variant:d.type==="primary"?"filled":"light",href:d.href,className:Vt({"!text-white !bg-theme-primary":d.type==="primary","!text-theme-primary !bg-theme-primary/10 hover:!bg-theme-primary/20":d.type==="secondary"}),children:v.jsxDEV(Qe,{size:"sm",fw:"600",c:"inherit",truncate:!0,children:d.label},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Message.tsx",lineNumber:79,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Message.tsx",lineNumber:65,columnNumber:8},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Message.tsx",lineNumber:58,columnNumber:6},this),v.jsxDEV(lu,{mounted:c&&a,transition:"fade-down",duration:150,children:d=>{var h;return v.jsxDEV("div",{style:d,className:"mt-4",children:[v.jsxDEV(Qe,{fz:"xs",mb:4,fw:700,children:v.jsxDEV(ee,{id:"message.sources.title",defaultMessage:"Sources",description:"Title that is shown above the source references"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Message.tsx",lineNumber:94,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Message.tsx",lineNumber:93,columnNumber:8},this),v.jsxDEV(m$,{children:(h=n.sourceReferences)==null?void 0:h.map(f=>{if(f.url)return v.jsxDEV(Nn,{size:"xs",component:"a",target:"_blank",href:f.url,variant:"outline",rel:"noopener noreferrer",className:"!h-6 !px-2 !text-theme-primary",children:f.title||f.url},f._id,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Message.tsx",lineNumber:106,columnNumber:11},this)})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Message.tsx",lineNumber:101,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Message.tsx",lineNumber:92,columnNumber:7},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Message.tsx",lineNumber:86,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Message.tsx",lineNumber:47,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Message.tsx",lineNumber:35,columnNumber:3},this)}function a1r({name:t}){const e="size-4 bg-theme-primary rounded";return v.jsxDEV(uu,{justify:"flex-start",align:"flex-start",gap:8,children:[v.jsxDEV("span",{className:"sr-only",children:v.jsxDEV(ee,{id:"shared.typing_indicator.aria-label",defaultMessage:"{name} is typing",values:{name:t}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/TypingIndicator.tsx",lineNumber:15,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/TypingIndicator.tsx",lineNumber:14,columnNumber:4},this),v.jsxDEV(Ew,{radius:"md",shadow:"xl",withBorder:!0,p:"sm",children:v.jsxDEV(un,{gap:4,children:[v.jsxDEV("div",{className:Vt(e,"animate-[fluid_2.4s_infinite]")},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/TypingIndicator.tsx",lineNumber:23,columnNumber:6},this),v.jsxDEV("div",{className:Vt(e,"animate-[fluid_2.4s_0.8s_infinite]")},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/TypingIndicator.tsx",lineNumber:24,columnNumber:6},this),v.jsxDEV("div",{className:Vt(e,"animate-[fluid_2.4s_1.6s_infinite]")},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/TypingIndicator.tsx",lineNumber:25,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/TypingIndicator.tsx",lineNumber:22,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/TypingIndicator.tsx",lineNumber:21,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/TypingIndicator.tsx",lineNumber:13,columnNumber:3},this)}function l1r({project:t,onSend:e}){var u,d;const n=Oi(ew),i=Oi(rG),r=Oi(aze),o=Oi(lU),{data:s}=Je.getOrganization.useQuery(void 0,{staleTime:1/0}),a=b.useRef(null);b.useEffect(()=>{var f,m,p;if(!a.current||!((f=a.current.children)!=null&&f.length))return;const h=(p=a.current)==null?void 0:p.children[((m=a.current)==null?void 0:m.children.length)-1];h&&setTimeout(()=>{if(!a.current)return;const y=a.current.scrollHeight-h.clientHeight-128;a.current.scrollTo({behavior:"smooth",top:y})},150)},[n.length,(u=n==null?void 0:n[n.length-1])==null?void 0:u.content]);const l=b.useMemo(()=>{var m;const h={agent:t.agent,project:{name:t.name},organization:{name:s==null?void 0:s.name}},f=(m=o==null?void 0:o[t.defaultLanguage])==null?void 0:m.welcomeMessage;return Xj({string:f,payload:h})},[s,t.defaultLanguage,o]);if(!o)return null;const c=(d=o[t.defaultLanguage])==null?void 0:d.startButton;return v.jsxDEV(Gt,{ref:a,className:"w-full h-full flex flex-col justify-between p-4 pb-24 overflow-auto",children:[lU&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(kvt,{direction:"left",name:t.agent.name,message:{role:"assistant",content:l,done:!0}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/AIFormChat.tsx",lineNumber:70,columnNumber:6},this),!n.length&&!i&&!!(c!=null&&c.length)&&v.jsxDEV(Nn,{size:"md",variant:"light",id:"formConfigStartButton",className:"max-w-full min-h-fit !py-3 self-center",onClick:()=>e(c),children:v.jsxDEV(Qe,{className:"w-full whitespace-pre-wrap self-center align-middle",children:c},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/AIFormChat.tsx",lineNumber:83,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/AIFormChat.tsx",lineNumber:76,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/AIFormChat.tsx",lineNumber:69,columnNumber:5},this),n.map(h=>{var f;return v.jsxDEV(kvt,{message:h,name:(f=t==null?void 0:t.agent)==null?void 0:f.name,direction:h.role==="user"?"right":"left",showSourceReferences:!0},`${h._id}`,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/AIFormChat.tsx",lineNumber:89,columnNumber:5},this)}),i&&v.jsxDEV(a1r,{name:t.agent.name},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/AIFormChat.tsx",lineNumber:97,columnNumber:17},this),!r&&!i&&v.jsxDEV(iw,{className:"h-full p-2",children:v.jsxDEV(Gt,{align:"center",gap:2,children:[v.jsxDEV(Qe,{ta:"center",c:"dimmed",className:"max-w-prose",children:v.jsxDEV(QPt,{size:48,stroke:1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/AIFormChat.tsx",lineNumber:102,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/AIFormChat.tsx",lineNumber:101,columnNumber:7},this),v.jsxDEV(Qe,{ta:"center",c:"dimmed",className:"max-w-prose",children:v.jsxDEV(ee,{id:"form_config.test_env.empty.title",defaultMessage:"Test here your form"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/AIFormChat.tsx",lineNumber:105,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/AIFormChat.tsx",lineNumber:104,columnNumber:7},this),v.jsxDEV(Qe,{ta:"center",c:"dimmed",size:"sm",className:"max-w-96",children:v.jsxDEV(ee,{id:"form_config.test_env.empty.description",defaultMessage:"Test and experiment with your prompts until you get the result you want. No need to save every change you make in your prompt will be used immediately"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/AIFormChat.tsx",lineNumber:111,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/AIFormChat.tsx",lineNumber:110,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/AIFormChat.tsx",lineNumber:100,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/AIFormChat.tsx",lineNumber:99,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/AIFormChat.tsx",lineNumber:67,columnNumber:3},this)}function c1r({suggestions:t,isLoading:e,onSuggestionClick:n}){return v.jsxDEV(lu,{duration:250,mounted:!!(t!=null&&t.length),transition:"slide-up",timingFunction:"easeOut",children:i=>v.jsxDEV(un,{style:i,gap:"xs",children:(t==null?void 0:t.length)&&t.map(r=>v.jsxDEV(Nn,{variant:"light",disabled:e,onClick:()=>n(r),children:v.jsxDEV("span",{className:"text-inherit",children:r},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/MessageSuggestions.tsx",lineNumber:22,columnNumber:9},this)},r,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/MessageSuggestions.tsx",lineNumber:16,columnNumber:8},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/MessageSuggestions.tsx",lineNumber:13,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/MessageSuggestions.tsx",lineNumber:11,columnNumber:3},this)}function u1r({onSend:t,suggestions:e,project:n,isLoading:i}){var w,C;const r=Mt(),[o,s]=b.useState(""),a=Oi(rG),l=Oi(ghr),c=Oi(XBt),u=Oi(aze),d=Oi(Tpe),h=Oi(YBt),f=Oi(lU),m=()=>p(o),p=N=>{const E=N.trim();zp(E)||(t(E),s(""))},g=h||(u||!((C=(w=f==null?void 0:f[n.defaultLanguage])==null?void 0:w.startButton)!=null&&C.length))&&(!c||(d==null?void 0:d.keepActiveAfterCompletion)),y=()=>{if(!o.trim().length)return!0;if(h)return!1;if(a||l)return!0},_=N=>{N.key==="Enter"&&(y()||(N.preventDefault(),m()))};return c&&!g&&!a&&!l?v.jsxDEV(Yo,{variant:"light",color:"green",icon:v.jsxDEV(X$e,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/index.tsx",lineNumber:77,columnNumber:11},this),title:r.formatMessage({id:"form_config.test_env.is_completed.title",defaultMessage:"Form has been completed"}),children:v.jsxDEV(ee,{id:"form_config.test_env.is_completed.description",defaultMessage:"Reset to test again or turn on <bold>advanced > Keep active after completion</bold> to keep the conversation active.",values:{bold:N=>v.jsxDEV("span",{className:"font-bold",children:N},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/index.tsx",lineNumber:86,columnNumber:35},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/index.tsx",lineNumber:83,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/index.tsx",lineNumber:74,columnNumber:4},this):g?v.jsxDEV(Gt,{align:"start",gap:"xs",className:"w-full",children:[v.jsxDEV(c1r,{suggestions:e,isLoading:i,onSuggestionClick:p},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/index.tsx",lineNumber:96,columnNumber:4},this),v.jsxDEV(Gt,{className:"w-full flow-reply_field",gap:1,children:[v.jsxDEV(Ew,{radius:"md",shadow:"xl",withBorder:!0,className:"pl-2 pr-1 w-full focus-within:border-theme-primary",children:v.jsxDEV(uu,{justify:"space-between",align:"flex-start",children:[v.jsxDEV(Th,{autosize:!0,autoFocus:!0,minRows:1,maxRows:3,id:"send_button",value:o,autoComplete:"off",variant:"unstyled",onKeyDown:_,className:"w-full leading-6",rightSectionPointerEvents:"all",onChange:N=>s(N.currentTarget.value),placeholder:r.formatMessage({id:"form_config.test_env.reply_field.placeholder",defaultMessage:"Reply to the message"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/index.tsx",lineNumber:105,columnNumber:7},this),v.jsxDEV(ir,{label:r.formatMessage({id:"form_config.test_env.reply_field.send.tooltip",defaultMessage:"Send message"}),openDelay:500,children:v.jsxDEV(Fr,{className:"mt-1",variant:"filled",onClick:m,disabled:y(),"aria-label":r.formatMessage({id:"form_config.test_env.reply_field.send.aria_label",defaultMessage:"Send message"}),children:v.jsxDEV(t8e,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/index.tsx",lineNumber:142,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/index.tsx",lineNumber:130,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/index.tsx",lineNumber:123,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/index.tsx",lineNumber:104,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/index.tsx",lineNumber:98,columnNumber:5},this),v.jsxDEV("div",{className:"w-full h-2",children:v.jsxDEV(Qe,{c:"dimmed",size:"xs",className:"hidden flow-reply_field-help",children:v.jsxDEV(ee,{id:"form_config.test_env.reply_field.tip",defaultMessage:"TIP: Press enter to send"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/index.tsx",lineNumber:149,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/index.tsx",lineNumber:148,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/index.tsx",lineNumber:147,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/index.tsx",lineNumber:97,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/ReplyField/index.tsx",lineNumber:95,columnNumber:3},this):null}function d1r({project:t,onClose:e,className:n}){var $,B;const i=Mt(),r=Je.useUtils(),o=Wd(vhr),s=Wd(rG),a=Wd(XBt),l=Wd(bhr),[c,u]=f0(ew),[d,h]=f0(GBt),[f,m]=f0(yhr),p=Oi(Tpe),g=Oi(lU),[y,_]=b.useState(void 0),[w,C]=Pc(!1),N=c[c.length-1],E=Je.aiForm.sendMessage.useMutation(),D=Je.aiForm.continueAssistant.useMutation(),{data:k,isLoading:M,refetch:T}=Je.session.getBySessionId.useQuery({sessionId:f},{enabled:!!f}),{data:A}=Je.getOrganization.useQuery(void 0,{staleTime:1/0}),R=+Object.keys((k==null?void 0:k.data)??{}).length;Je.aiForm.subscribeToChat.useSubscription({sessionId:f,projectId:t._id,token:localStorage.getItem("TOKEN")||"",organizationId:`${t.organizationId}`},{onData(z){switch(s(!1),z.done||_(void 0),z==null?void 0:z.finishReason){case"content_filter":return h("contentFilter");case"max_tokens":return h("tokenLimitReached")}if(z!=null&&z.error)return h("notResponding");!(z!=null&&z.error)&&d&&h(void 0),z.message&&(z!=null&&z.done&&T(),l({...z.message,sourceReferences:z.sourceReferences,done:z.done,incomplete:!1,endOfFormCta:z.endOfFormCta}))},onError(z){console.error("AI form chat subscription failed",z),h("notResponding"),s(!1),u([])}}),Je.aiForm.subscribeToMessageSuggestions.useSubscription({sessionId:f,projectId:t._id,token:localStorage.getItem("TOKEN")||"",organizationId:`${t.organizationId}`},{onData(z){z.messageId!==N._id||N.role!=="assistant"||_(z.suggestions.length?z.suggestions:void 0)}}),Je.aiForm.subscribeToCompleteEvent.useSubscription({sessionId:f,projectId:t._id,token:localStorage.getItem("TOKEN")||"",organizationId:`${t.organizationId}`},{onData(){a(!0)}});const P=async()=>{if(p)try{_(void 0),s(!0),await D.mutateAsync({language:t.defaultLanguage,sessionId:f,...p})}catch(z){const H=z;if(s(!1),c.length<=1&&u([]),H.message.includes("messageLimitExceeded")){h("messageLimitExceeded");return}h("notResponding")}},O=async z=>{var H;if(p)try{if(_(void 0),!z||zp(z))return;s(!0),o(z),await E.mutateAsync({welcomeMessage:(H=g==null?void 0:g[t.defaultLanguage])==null?void 0:H.welcomeMessage,language:t.defaultLanguage,sessionId:f,message:z,...p})}catch(K){const q=K;if(s(!1),c.length<=1&&u([]),q.message.includes("messageLimitExceeded")){h("messageLimitExceeded");return}h("notResponding")}},V=async()=>{m(z$e()),a(!1),s(!1),u([]),d!=="messageLimitExceeded"&&h(void 0),In.show({color:"primary",message:i.formatMessage({id:"form_config.test_env.reset.notification",defaultMessage:"Conversation has been reset"}),autoClose:2500})},F=()=>{C.open(),r.session.getBySessionId.refetch()};return v.jsxDEV("section",{className:Vt("w-full h-full bg-white flex flex-col justify-start overflow-hidden",n),children:[v.jsxDEV("header",{className:Vt("w-full p-4 flex flex-row justify-between items-center","border-b border-gray-200 border-solid"),children:[v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV(Fr,{onClick:e,variant:"subtle",className:"lg:!hidden","aria-label":i.formatMessage({id:"form_config.test_env.close.aria_label",defaultMessage:"Close"}),children:v.jsxDEV(wfe,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:240,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:231,columnNumber:6},this),v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"form_config.test_env.title",defaultMessage:"Test configuration"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:243,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:242,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:230,columnNumber:5},this),v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV(ir,{label:i.formatMessage({id:"form_config.test_env.actions.see_fields.tooltip",defaultMessage:"See detected fields"}),openDelay:500,children:v.jsxDEV(kde,{inline:!0,disabled:!R,label:R,size:16,children:v.jsxDEV(Fr,{variant:"light",disabled:!k,onClick:F,"aria-label":i.formatMessage({id:"form_config.test_env.actions.see_fields.aria_label",defaultMessage:"Detected fields"}),children:v.jsxDEV(Gsi,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:264,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:255,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:254,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:247,columnNumber:6},this),v.jsxDEV(ir,{label:i.formatMessage({id:"form_config.test_env.actions.reset.tooltip",defaultMessage:"Reset"}),openDelay:500,children:v.jsxDEV(Fr,{variant:"light",id:"resetFormConfig",onClick:V,"aria-label":i.formatMessage({id:"form_config.test_env.actions.reset.aria_label",defaultMessage:"Reset test conversation"}),children:v.jsxDEV(bai,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:284,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:275,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:268,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:246,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:224,columnNumber:4},this),d&&typeof d=="string"&&(($=Mvt[d])==null?void 0:$.id)&&v.jsxDEV(Yo,{color:"red",radius:0,className:"min-h-fit !overflow-visible",children:v.jsxDEV(un,{justify:"space-between",children:[v.jsxDEV(ee,{...Mvt[d],values:{name:t.agent.name,resetDate:A&&i.formatDate(ffe((B=A==null?void 0:A.billing)==null?void 0:B.startDate))}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:292,columnNumber:7},this),d==="messageLimitExceeded"&&v.jsxDEV(Nn,{size:"xs",to:"/billing",variant:"subtle",component:Np,className:"!text-theme-primary focus-within:bg-theme-primary/10",children:v.jsxDEV(ee,{id:"shared.button.upgrade",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:309,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:302,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:291,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:290,columnNumber:5},this),v.jsxDEV(l1r,{project:t,onSend:O},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:315,columnNumber:4},this),v.jsxDEV("section",{className:"flex justify-center",children:v.jsxDEV(h1r,{onContinue:P},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:317,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:316,columnNumber:4},this),v.jsxDEV("footer",{className:"w-full p-4 pt-1",children:v.jsxDEV(u1r,{project:t,suggestions:y,isLoading:E.isLoading,onSend:O},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:320,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:319,columnNumber:4},this),v.jsxDEV(kw,{size:"xl",position:"right",opened:w,onClose:C.close,title:i.formatMessage({id:"form_config.test.detected_fields.title",defaultMessage:"Detected fields"}),closeButtonProps:{"aria-label":i.formatMessage({id:"shared.modal.close",defaultMessage:"Close modal"})},children:v.jsxDEV(Gt,{children:[v.jsxDEV(Qe,{size:"xs",c:"dimmed",children:v.jsxDEV(ee,{id:"form_config.test.detected_fields.description",defaultMessage:"Compare the fields collected in this conversation with the fields you have configured to be retrieved."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:342,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:341,columnNumber:6},this),v.jsxDEV(GWt,{pageSize:20,loading:M,sessionData:k==null?void 0:k.data,tableScrollContainerProps:{minWidth:100}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:347,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:340,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:327,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:223,columnNumber:3},this)}const Mvt={contentFilter:{id:"form_config.test.error_profanity",defaultMessage:"Your request couldn't be processed due to our content guidelines. Please try a different prompt."},notResponding:{id:"form_config.test.not_responding",defaultMessage:"{name} is currently experiencing some technical difficulties and can't provide an answer at the moment. Please try again in a few minutes."},messageLimitExceeded:{id:"form_config.test.message_limit_exceeded",defaultMessage:"You've reached the message limit for this conversation, consider upgrading your plan."}};function h1r({onContinue:t}){const e=Oi(YBt);return v.jsxDEV(lu,{mounted:e,transition:"fade-up",children:n=>v.jsxDEV(Nn,{style:n,variant:"light",className:"my-2",color:"red",leftSection:v.jsxDEV(hai,{size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:387,columnNumber:19},this),onClick:t,children:v.jsxDEV(ee,{id:"form_config.test_env.button.continue",defaultMessage:"Continue"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:390,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:382,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/TestEnvironment/index.tsx",lineNumber:380,columnNumber:3},this)}function f1r({onClose:t,onNext:e}){const n=Mt();return v.jsxDEV(bl,{p:"lg",opened:!0,withCloseButton:!1,closeOnEscape:!1,onClose:t,closeButtonProps:{"aria-label":n.formatMessage({id:"shared.modal.close",defaultMessage:"Close modal"})},children:v.jsxDEV(Gt,{gap:"lg",children:[v.jsxDEV("img",{src:"/img/svg/onboarding.svg",className:"h-44"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/WalkthroughModal.tsx",lineNumber:19,columnNumber:5},this),v.jsxDEV(Gt,{gap:"xs",children:[v.jsxDEV("h1",{className:"font-bold text-xl text-center",children:v.jsxDEV(ee,{id:"form_config.introduction_walk_through.init.title",defaultMessage:"Build your AI form"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/WalkthroughModal.tsx",lineNumber:22,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/WalkthroughModal.tsx",lineNumber:21,columnNumber:6},this),v.jsxDEV(Qe,{className:"text-center",children:v.jsxDEV(ee,{id:"form_config.introduction_walk_through.init.title",defaultMessage:"Set up your AI assistant by deciding what info it should ask for from customers and how it should ask for it."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/WalkthroughModal.tsx",lineNumber:28,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/WalkthroughModal.tsx",lineNumber:27,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/WalkthroughModal.tsx",lineNumber:20,columnNumber:5},this),v.jsxDEV(un,{gap:"sm",justify:"flex-end",children:[v.jsxDEV(Nn,{autoFocus:!1,variant:"light",onClick:t,children:v.jsxDEV(ee,{id:"form_config.introduction_walk_through.footer.skip_tour",defaultMessage:"Skip",description:"Skip tour button"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/WalkthroughModal.tsx",lineNumber:36,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/WalkthroughModal.tsx",lineNumber:35,columnNumber:6},this),v.jsxDEV(Nn,{autoFocus:!0,onClick:e,children:v.jsxDEV(ee,{id:"form_config.introduction_walk_through.footer.start_tour",defaultMessage:"Show me how"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/WalkthroughModal.tsx",lineNumber:43,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/WalkthroughModal.tsx",lineNumber:42,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/WalkthroughModal.tsx",lineNumber:34,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/WalkthroughModal.tsx",lineNumber:18,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/WalkthroughModal.tsx",lineNumber:8,columnNumber:3},this)}function m1r(){const t=Mt(),[e]=Bv(),[n,i]=b.useState(!1),{data:r,isLoading:o}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0});if(ga(t.formatMessage({id:"form_config.page.title",defaultMessage:"Form config - Chathive"})),b.useEffect(()=>{i(e.get("testOpen")==="true")},[e]),!r||o)return v.jsxDEV("div",{className:"w-full h-full flex flex-row gap-4 p-4",children:[v.jsxDEV(li,{height:"100%",className:"w-full h-full hidden sm:block"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:38,columnNumber:5},this),v.jsxDEV(li,{height:"100%",className:"w-full h-full"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:39,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:37,columnNumber:4},this);const s=[{isInModal:!0,selector:"#welcomeMessage",key:"form_config.introduction_walk_through.welcome_message",url:`/${r==null?void 0:r._id}/form-config?accordion=welcomeMessage`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{fw:"bold",children:v.jsxDEV(ee,{id:"form_config.introduction_walk_through.welcome_message.title",defaultMessage:"Set up a friendly welcome message"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:53,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:52,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"form_config.introduction_walk_through.welcome_message.description",defaultMessage:"That encourages customers to start chatting. You can tweak this message in all your languages."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:59,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:58,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:51,columnNumber:5},this)},{isInModal:!0,selector:"#configSection",key:"form_config.introduction_walk_through.configuration",url:`/${r==null?void 0:r._id}/form-config?accordion=config`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{fw:"bold",children:v.jsxDEV(ee,{id:"form_config.introduction_walk_through.configuration.title",defaultMessage:"Explain what data you want to gather"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:75,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:74,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"form_config.introduction_walk_through.configuration.description",defaultMessage:"Let your AI assistant know its role, what info it needs to ask from customers, and the guidelines it should stick to when chatting with them."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:81,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:80,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:73,columnNumber:5},this)},{isInModal:!0,selector:"#formConfigStartButton",key:"form_config.introduction_walk_through.start_button",url:`/${r==null?void 0:r._id}/form-config?accordion=testOpen`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{fw:"bold",children:v.jsxDEV(ee,{id:"form_config.introduction_walk_through.start_button.title",defaultMessage:"Test your configuration"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:97,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:96,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"form_config.introduction_walk_through.start_button.description",defaultMessage:"Test your setup to see how it performs and how customers will experience it, all without needing to save anything."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:103,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:102,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:95,columnNumber:5},this)},{isInModal:!0,selector:"#resetFormConfig",key:"form_config.introduction_walk_through.reset",url:`/${r==null?void 0:r._id}/form-config?accordion=testOpen`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{fw:"bold",children:v.jsxDEV(ee,{id:"form_config.introduction_walk_through.reset.title",defaultMessage:"Need a fresh start?"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:119,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:118,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"form_config.introduction_walk_through.reset.description",defaultMessage:"Just reset the conversation here and you're good to go again."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:125,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:124,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:117,columnNumber:5},this)},{selector:"#saveFormConfig",key:"form_config.introduction_walk_through.save",url:`/${r==null?void 0:r._id}/form-config?accordion=testOpen`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{fw:"bold",children:v.jsxDEV(ee,{id:"form_config.introduction_walk_through.save.title",defaultMessage:"Happy with the changes?"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:140,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:139,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"form_config.introduction_walk_through.save.description",defaultMessage:"Save your form configuration here and easily share it with your customers! Want to know how? Visit our implementation page for details."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:146,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:145,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:138,columnNumber:5},this)}];return v.jsxDEV(S6,{steps:s,startModal:a=>v.jsxDEV(f1r,{...a},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:159,columnNumber:27},this),usesModalOverlay:!1,walkthroughType:"formConfigIntroduction",children:v.jsxDEV("div",{className:"w-full h-full flex flex-row relative overflow-hidden",children:[v.jsxDEV("div",{className:"w-full h-full lg:w-1/2 overflow-hidden",children:v.jsxDEV(o1r,{project:r,openTesting:()=>i(!0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:165,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:164,columnNumber:5},this),v.jsxDEV("div",{className:Vt(n?"flex absolute w-full h-full lg:relative z-10":"hidden","lg:flex lg:w-1/2"),children:v.jsxDEV(d1r,{project:r,onClose:()=>i(!1)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:173,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:167,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:163,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/FormConfig/index.tsx",lineNumber:157,columnNumber:3},this)}function rD({children:t}){return v.jsxDEV("pre",{className:"font-mono bg-gray-100 border border-gray-200 border-solid px-1 py-[.125rem] w-max rounded-md text-xs select-all text-theme-primary inline",children:v.jsxDEV("code",{children:t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Code.tsx",lineNumber:4,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/Code.tsx",lineNumber:3,columnNumber:3},this)}function gC({value:t,className:e}){return v.jsxDEV("article",{className:Vt("bg-gray-100 relative rounded-lg",e),children:v.jsxDEV("pre",{className:"p-4 overflow-x-auto",children:[v.jsxDEV("code",{className:Vt("text-sm font-mono select-all"),children:t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/CodeSnippet.tsx",lineNumber:9,columnNumber:5},this),v.jsxDEV("div",{className:"absolute top-2 right-2",children:v.jsxDEV(sU,{value:t,variant:"subtle",color:"gray"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/CodeSnippet.tsx",lineNumber:11,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/CodeSnippet.tsx",lineNumber:10,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/CodeSnippet.tsx",lineNumber:8,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/CodeSnippet.tsx",lineNumber:7,columnNumber:3},this)}function p1r({apiKey:t,language:e}){const n=Mt();return v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Gt,{gap:"xs",children:[v.jsxDEV("h2",{className:"font-semibold font-xl",children:v.jsxDEV(ee,{id:"implementation.ai_form.installation_steps.embed.title",defaultMessage:"Embed onto your website"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:18,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:17,columnNumber:5},this),v.jsxDEV(Yg,{className:"max-w-prose whitespace-pre-wrap",components:{code:i=>v.jsxDEV(rD,{children:i.children},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:25,columnNumber:37},this)},children:n.formatMessage({id:"implementation.ai_form.installation_steps.embed.init",defaultMessage:`First you need to setup your AI form, call the constructor to initialise your AI form.
See the [configuration documentation]({link}) for more details.`},{link:`${lq.sdk}/ai-form/configuration`})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:23,columnNumber:5},this),v.jsxDEV(gC,{value:`<script>
    const aiForm = new Chathive.AIForm({ apiKey: "${t}" });
<\/script>`},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:35,columnNumber:5},this),v.jsxDEV(Yg,{className:"max-w-prose whitespace-pre-wrap",components:{code:i=>v.jsxDEV(rD,{children:i.children},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:42,columnNumber:37},this)},children:n.formatMessage({id:"implementation.ai_form.installation_steps.embed.description",defaultMessage:"After initializing your AI form, you can embed it into your application. Ensure this is done after the selector element has rendered."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:40,columnNumber:5},this),v.jsxDEV(gC,{value:`<script>
    aiForm.embed({ selector: "#embed" }).then(() => console.info("AI form is embedded"));
<\/script>`},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:51,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:16,columnNumber:4},this),v.jsxDEV(Gt,{gap:"xs",children:[v.jsxDEV("h2",{className:"font-semibold font-xl",children:v.jsxDEV(ee,{id:"implementation.ai_form.installation_steps.language.title",defaultMessage:"Set language"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:59,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:58,columnNumber:5},this),v.jsxDEV(Yg,{components:{code:i=>v.jsxDEV(rD,{children:i.children},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:65,columnNumber:37},this)},rehypePlugins:[[NBt,{rel:["nofollow"],target:"_blank"}]],children:n.formatMessage({id:"implementation.ai_form.installation_steps.language.description.init_setter",defaultMessage:"We support all [```ISO 639-1``` language codes](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).\n\nThere are two options for setting or changing the language: either specify it during initialization:"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:64,columnNumber:5},this),v.jsxDEV(gC,{value:`<script>
    const aiForm = new Chathive.AIForm({ apiKey: "${t}", language: "${e}" });
<\/script>`},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:73,columnNumber:5},this),v.jsxDEV(Yg,{components:{code:i=>v.jsxDEV(rD,{children:i.children},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:79,columnNumber:37},this)},children:n.formatMessage({id:"implementation.ai_form.installation_steps.language.description.set_function",defaultMessage:"Or utilise the SDK's ```setLanguage``` function for dynamic changes (for instance, if a user alters the website's language). Ensure the ```setLanguage``` function is called after the init function has been executed to match your visitor's preferences."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:78,columnNumber:5},this),v.jsxDEV(gC,{value:`<script>
    aiForm.setLanguage("${e}");
<\/script>`},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:86,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:57,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/AiFromDocumentation.tsx",lineNumber:15,columnNumber:3},this)}function g1r({apiKey:t,language:e}){const n=Mt();return v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Gt,{gap:"xs",children:[v.jsxDEV("h2",{className:"font-semibold font-lg",children:v.jsxDEV(ee,{id:"implementation.chatbot.installation_steps.chatbot.title",defaultMessage:"The chatbot"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/ChatbotDocumentation.tsx",lineNumber:16,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/ChatbotDocumentation.tsx",lineNumber:15,columnNumber:5},this),v.jsxDEV(Yg,{className:"max-w-prose",components:{code:i=>v.jsxDEV(rD,{children:i.children},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/ChatbotDocumentation.tsx",lineNumber:23,columnNumber:37},this)},children:n.formatMessage({id:"implementation.chatbot.installation_steps.chatbot.description",defaultMessage:"Add this piece of code in the ```<body>``` tag."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/ChatbotDocumentation.tsx",lineNumber:21,columnNumber:5},this),v.jsxDEV(gC,{value:`<script>
    Chathive.widget.init({ apiKey: "${t}" });
<\/script>`},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/ChatbotDocumentation.tsx",lineNumber:29,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/ChatbotDocumentation.tsx",lineNumber:14,columnNumber:4},this),v.jsxDEV(Gt,{gap:"xs",children:[v.jsxDEV("h2",{className:"font-semibold font-lg",children:v.jsxDEV(ee,{id:"implementation.chatbot.installation_steps.language.title",defaultMessage:"Set language"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/ChatbotDocumentation.tsx",lineNumber:37,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/ChatbotDocumentation.tsx",lineNumber:36,columnNumber:5},this),v.jsxDEV(Yg,{components:{code:i=>v.jsxDEV(rD,{children:i.children},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/ChatbotDocumentation.tsx",lineNumber:43,columnNumber:37},this)},children:n.formatMessage({id:"implementation.chatbot.installation_steps.language.description.init_setter",defaultMessage:"We support all [```ISO 639-1``` language codes](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).\n\nTo set/change the language, you have two options: either define the language in the init function:",description:"Description how they can set the language of the widget in the init function"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/ChatbotDocumentation.tsx",lineNumber:42,columnNumber:5},this),v.jsxDEV(gC,{value:`<script>
	Chathive.widget.init({ apiKey: "${t}", language: "${e}" });
<\/script>`},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/ChatbotDocumentation.tsx",lineNumber:51,columnNumber:5},this),v.jsxDEV(Yg,{components:{code:i=>v.jsxDEV(rD,{children:i.children},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/ChatbotDocumentation.tsx",lineNumber:57,columnNumber:37},this)},children:n.formatMessage({id:"implementation.chatbot.installation_steps.language.description.set_function",defaultMessage:"Or utilize the SDK's ```setLanguage``` function for dynamic changes (for instance, if a user alters the website's language). Ensure the ```setLanguage``` function is called after the init function has been executed to match your visitor's preferences.",description:"Description how they can set the language of the widget through the setLanguage function"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/ChatbotDocumentation.tsx",lineNumber:56,columnNumber:5},this),v.jsxDEV(gC,{value:`<script>
    Chathive.widget.setLanguage("${e}");
<\/script>`},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/ChatbotDocumentation.tsx",lineNumber:66,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/ChatbotDocumentation.tsx",lineNumber:35,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/components/ChatbotDocumentation.tsx",lineNumber:13,columnNumber:3},this)}function b1r(){const t=Mt(),e=Qr();ga(t.formatMessage({id:"implementation.page.title",defaultMessage:"Implementation - Chathive"}));const n=gt.object({email:gt.string({required_error:t.formatMessage({id:"implementation.form.error.required",defaultMessage:"Email address is required"})}).email({message:t.formatMessage({id:"implementation.form.error.email",defaultMessage:"Provide a valid email address"})})}),i=ls({initialValues:{email:""},validateInputOnBlur:!0,validate:aa(n)}),r=Je.sendToDeveloper.useMutation(),{data:o}=Je.getReseller.useQuery(void 0),{data:s,isLoading:a}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0}),l=async()=>{try{await r.mutateAsync({email:i.values.email})||In.show({color:"red",message:t.formatMessage({id:"implementation.email.sent.error",defaultMessage:"Something went wrong while trying to send the implementation email to {email}. Please try again.",description:"Email could not be send to web developer, probably because email is not valid are email server crashed"},{email:i.values.email}),autoClose:5e3}),In.show({color:"green",message:t.formatMessage({id:"implementation.email.sent.success",defaultMessage:"The implementation email has been sent to {email}.",description:"Success message when email is sent to the developer"},{email:i.values.email}),autoClose:5e3}),i.reset()}catch(c){const u=c;let d=t.formatMessage({id:"implementation.email.sent.generic.error",defaultMessage:"Error while trying to send the widget code, please try again."});console.error("Failed to send implementation email",u),u.errorFields&&(d=u.errorFields[0].errors[0]),In.show({color:"red",message:d,autoClose:5e3})}};return a?v.jsxDEV("section",{className:"w-full pt-6 bg-white sm:pt-0 sm:bg-transparent sm:grid sm:gap-4 max-w-4xl",children:[v.jsxDEV(li,{height:192},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:111,columnNumber:5},this),v.jsxDEV(li,{height:192},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:112,columnNumber:5},this),v.jsxDEV(li,{height:512},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:113,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:110,columnNumber:4},this):s!=null&&s.apiKey?v.jsxDEV("section",{className:"w-full pt-6 bg-white sm:pt-0 sm:bg-transparent sm:grid sm:gap-4 max-w-4xl",children:[v.jsxDEV(or,{id:"implementationSentToDeveloper",children:v.jsxDEV(Gt,{justify:"space-between",gap:"md",children:[v.jsxDEV(Gt,{gap:"xs",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"implementation.title",defaultMessage:"Bring your project to life on your website."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:129,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:128,columnNumber:7},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"implementation.description",defaultMessage:"Share the email address of your web developer, so we can send the required instructions to install the chatbot on your website."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:135,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:134,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:127,columnNumber:6},this),!!s.disabledAt&&v.jsxDEV(Yo,{variant:"light",color:"gray",children:v.jsxDEV(ee,{id:"implementation.send_to_developer.tooltip.disabled_project",defaultMessage:"This project has been disabled. You cannot share this API key with your developer."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:144,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:143,columnNumber:7},this),!s.disabledAt&&v.jsxDEV("form",{onSubmit:i.onSubmit(l),children:v.jsxDEV(un,{gap:"xs",wrap:"nowrap",align:"flex-start",children:[v.jsxDEV(pa,{name:"email",type:"email",className:"w-full",...i.getInputProps("email"),placeholder:t.formatMessage({id:"implementation.email_field.placeholder",defaultMessage:"yourdeveloper@yourcompany.com"})},i.key("email"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:154,columnNumber:9},this),v.jsxDEV(Nn,{type:"submit",className:"min-w-max",loading:r.isLoading,disabled:!i.isValid()||!!(s!=null&&s.disabledAt),children:v.jsxDEV(ee,{id:"implementation.send_to_developer.label",defaultMessage:"Send"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:171,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:165,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:153,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:152,columnNumber:7},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"implementation.extra",defaultMessage:"Or, easily copy and paste the code snippets at <bold>Installation steps</bold> into your website's code.",description:"Description that says in the card beneath you can follow steps to install the widget",values:{bold:c=>v.jsxDEV("a",{href:"#installationSteps",className:"font-semibold",children:c},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:185,columnNumber:37},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:181,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:180,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:126,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:125,columnNumber:4},this),v.jsxDEV(or,{children:v.jsxDEV(Gt,{gap:"xs",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"implementation.api_key.title",defaultMessage:"Public API key"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:194,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:193,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"implementation.api_key.description",defaultMessage:"This is your unique public API key, this key can only be used to implement the project on your website or use the chat API."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:197,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:196,columnNumber:6},this),v.jsxDEV(gC,{value:s==null?void 0:s.apiKey},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:202,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:192,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:191,columnNumber:4},this),v.jsxDEV(or,{id:"installationSteps",children:v.jsxDEV(Gt,{justify:"space-between",gap:"md",children:[v.jsxDEV(un,{justify:"space-between",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"implementation.installation_steps.title",defaultMessage:"Installation steps"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:210,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:209,columnNumber:7},this),v.jsxDEV(Nn,{size:"xs",component:"a",variant:"light",target:"_blank",href:lq.sdk,children:v.jsxDEV(ee,{id:"implementation.installation_steps.documentation",defaultMessage:"Documentation"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:216,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:215,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:208,columnNumber:6},this),v.jsxDEV(Yo,{variant:"light",color:"blue",icon:v.jsxDEV(uq,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:222,columnNumber:48},this),children:v.jsxDEV(ee,{id:"implementation.installation_steps.notes.questions",defaultMessage:"If you have any questions or problems, you can reach us at <link></link>.",values:{link:()=>v.jsxDEV("a",{href:`mailto:${(o==null?void 0:o.email)||"support@chathive.co"}`,children:(o==null?void 0:o.email)||"support@chathive.co"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:228,columnNumber:10},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:223,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:222,columnNumber:6},this),v.jsxDEV(Gt,{gap:"xs",children:[v.jsxDEV("h2",{className:"font-semibold font-lg",children:v.jsxDEV(ee,{id:"implementation.installation_steps.import_sdk.title",defaultMessage:"Import SDK"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:239,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:238,columnNumber:7},this),v.jsxDEV(CBt,{components:{code:c=>v.jsxDEV(rD,{children:c.children},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:245,columnNumber:39},this)},children:t.formatMessage({id:"implementation.installation_steps.import_sdk.description",defaultMessage:"To install the SDK on your website, copy and paste the snippet below right before the closing ```</head>``` tag on every page where you want the SDK and widget to appear."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:244,columnNumber:7},this),v.jsxDEV(gC,{value:'<script src="https://sdk.chathive.app"><\/script>'},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:252,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:237,columnNumber:6},this),(s==null?void 0:s.projectType)==="aiForm"&&v.jsxDEV(p1r,{apiKey:s.apiKey,language:s.defaultLanguage},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:256,columnNumber:7},this),(s==null?void 0:s.projectType)==="chatbot"&&v.jsxDEV(g1r,{apiKey:s.apiKey,language:s.defaultLanguage},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:259,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:207,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:206,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Implementation/index.tsx",lineNumber:124,columnNumber:3},this):(e("/"),null)}function v1r({isOpen:t,onClose:e}){const n=Mt(),i=Je.useUtils(),[r,o]=b.useState(!0),s=gt.object({name:gt.string({required_error:n.formatMessage({id:"create_shareable_link.form.name.error.required",defaultMessage:"Name is required"})}).min(1,{message:n.formatMessage({id:"create_shareable_link.form.name.error.required",defaultMessage:"Name is required"})}).max(128,{message:n.formatMessage({id:"create_shareable_link.form.name.error.max_length",defaultMessage:"Name cannot be longer then 128 characters"})})}),a=ls({mode:"uncontrolled",validateInputOnBlur:!0,validate:aa(s),initialValues:{name:n.formatMessage({id:"create_shareable_link.default_name",defaultMessage:"link-{date}"},{date:$ri(new Date)})},onValuesChange:()=>o(a.isValid())}),l=Je.project.shareableLink.create.useMutation(),c=async u=>{try{await l.mutateAsync(u),e(),i.project.getCurrent.invalidate(),In.show({color:"green",message:n.formatMessage({id:"create_shareable_link.create.notification.succeeded",defaultMessage:"Shareable link has been created"}),autoClose:5e3})}catch(d){console.error("Failed to create shareable link",d),In.show({color:"red",title:n.formatMessage({id:"create_shareable_link.create.notification.failed.title",defaultMessage:"Shareable link could not be created"}),message:n.formatMessage({id:"create_shareable_link.create.notification.failed.message",defaultMessage:"We cannot create a unique shareable link at this time. Please try again or contact our support team."}),autoClose:5e3})}};return v.jsxDEV(bl,{opened:t,onClose:e,title:n.formatMessage({id:"create_shareable_link.header.title",defaultMessage:"Create sharable link"}),closeButtonProps:{"aria-label":n.formatMessage({id:"shared.modal.close",defaultMessage:"Close modal"})},children:v.jsxDEV("form",{onSubmit:a.onSubmit(c),className:"flex flex-col gap-4",children:[v.jsxDEV(pa,{...a.getInputProps("name"),label:n.formatMessage({id:"create_shareable_link.form.name.label",defaultMessage:"Give your link a unique name"}),description:n.formatMessage({id:"create_shareable_link.form.title.description",defaultMessage:"A unique name can help identify it in your logs."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/CreateShareableLink.tsx",lineNumber:106,columnNumber:5},this),v.jsxDEV(un,{justify:"flex-end",mt:"md",children:v.jsxDEV(Nn,{size:"sm",type:"submit",disabled:!r,loading:l.isLoading,children:v.jsxDEV(ee,{id:"create_shareable_link.form.submit",defaultMessage:"Create shareable link"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/CreateShareableLink.tsx",lineNumber:119,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/CreateShareableLink.tsx",lineNumber:118,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/CreateShareableLink.tsx",lineNumber:117,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/CreateShareableLink.tsx",lineNumber:105,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/CreateShareableLink.tsx",lineNumber:94,columnNumber:3},this)}function y1r({auditLog:t}){var r,o;const[e,n]=Pc(),i=["project.share.created","project.share.updated","project.share.event"].includes(t.type);return v.jsxDEV(Ew,{children:v.jsxDEV(Gt,{gap:4,children:[v.jsxDEV(uu,{gap:4,children:[v.jsxDEV(ad,{className:"w-full",children:[v.jsxDEV(ad.Col,{span:5,children:[((r=t.meta)==null?void 0:r.ip)&&v.jsxDEV(Qe,{children:(o=t.meta)==null?void 0:o.ip},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:19,columnNumber:30},this),(t==null?void 0:t.user)&&v.jsxDEV(Qe,{children:B$e(t==null?void 0:t.user)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:20,columnNumber:27},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:18,columnNumber:7},this),v.jsxDEV(ad.Col,{span:4,children:v.jsxDEV(Qe,{children:t.type},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:23,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:22,columnNumber:7},this),v.jsxDEV(ad.Col,{span:3,children:v.jsxDEV(Qe,{children:v.jsxDEV(z0,{value:t.createdAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:27,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:26,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:25,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:17,columnNumber:6},this),i?v.jsxDEV(Fr,{variant:"subtle",color:"gray",onClick:n.toggle,children:[!e&&v.jsxDEV(Z$e,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:33,columnNumber:22},this),e&&v.jsxDEV(J$e,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:34,columnNumber:21},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:32,columnNumber:7},this):v.jsxDEV("div",{className:"w-8"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:36,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:16,columnNumber:5},this),e&&v.jsxDEV("section",{className:"p-2 bg-gray-100 rounded",children:[t.payload&&v.jsxDEV(rw,{block:!0,children:JSON.stringify(t.payload,null,2)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:40,columnNumber:28},this),t.meta&&v.jsxDEV(rw,{block:!0,children:JSON.stringify(t.meta,null,2)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:41,columnNumber:25},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:39,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:15,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/components/AuditLogItem.tsx",lineNumber:14,columnNumber:3},this)}function _1r({linkId:t,organization:e}){var r;const n=Mt(),i=Qr();return(r=e==null?void 0:e.permissions)!=null&&r.auditLogHistory?v.jsxDEV(r8e,{filter:{entityId:t},actions:["project.share.created","project.share.updated","project.share.enabled","project.share.disabled","project.share.event"],columns:[{span:5,label:n.formatMessage({id:"share_project.audit_log.list.header.triggered_by",defaultMessage:"Triggered by"})},{span:4,label:n.formatMessage({id:"share_project.audit_log.list.header.action",defaultMessage:"Action"})},{span:3,label:n.formatMessage({id:"share_project.audit_log.list.header.time",defaultMessage:"Time"})}],renderRows:({auditLog:o})=>v.jsxDEV(y1r,{auditLog:o},o._id,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/AuditLogs.tsx",lineNumber:73,columnNumber:34},this),className:"!max-h-[calc(100vh_-_48px_-_2rem)]"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/AuditLogs.tsx",lineNumber:41,columnNumber:3},this):v.jsxDEV(or,{children:v.jsxDEV(Gt,{align:"flex-start",children:[v.jsxDEV(un,{justify:"space-between",className:"mb-4",children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"share_project.audit_log.title",defaultMessage:"Audit logs"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/AuditLogs.tsx",lineNumber:23,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/AuditLogs.tsx",lineNumber:22,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/AuditLogs.tsx",lineNumber:21,columnNumber:6},this),v.jsxDEV(Qe,{className:"max-w-prose",children:v.jsxDEV(ee,{id:"share_project.audit_log.description",defaultMessage:"Audit logs offer advanced features for greater transparency in your links usage. Boost your security and compliance by upgrading today!"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/AuditLogs.tsx",lineNumber:27,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/AuditLogs.tsx",lineNumber:26,columnNumber:6},this),v.jsxDEV(Nn,{onClick:()=>i("/billing"),children:v.jsxDEV(ee,{id:"general.upgrade.submit",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/AuditLogs.tsx",lineNumber:33,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/AuditLogs.tsx",lineNumber:32,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/AuditLogs.tsx",lineNumber:20,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/AuditLogs.tsx",lineNumber:19,columnNumber:4},this)}function x1r({shareableLink:t}){const e=Mt(),n=Je.useUtils(),i=Oi(ps),r=Je.project.shareableLink.regenerateLink.useMutation(),o=Je.project.shareableLink.changeEnableState.useMutation(),s=()=>{Ev.openConfirmModal({title:e.formatMessage({id:"share_project.confirm_regenerate_link.title",defaultMessage:"Confirm regenerate"}),children:v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"share_project.confirm_regenerate_link.description",defaultMessage:"If you regenerate your link, the old one will no longer be accessible."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:34,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:33,columnNumber:5},this),labels:{confirm:e.formatMessage({id:"share_project.confirm_regenerate_link.confirm",defaultMessage:"Regenerate link"}),cancel:e.formatMessage({id:"shared.modal.footer.cancel",defaultMessage:"Cancel"})},onConfirm:a})},a=async()=>{try{await r.mutateAsync(),n.auditLog.getAll.invalidate(),n.project.getCurrent.invalidate(),In.show({color:"green",message:e.formatMessage({id:"share_project.notification.regenerate.succeeded",defaultMessage:"Link has been regenerated"}),autoClose:5e3})}catch(d){console.error("Failed to regenerate link",d),In.show({color:"red",title:e.formatMessage({id:"share_project.notification.regenerate.failed.title",defaultMessage:"Shareable link could not be regenerated"}),message:e.formatMessage({id:"share_project.notification.regenerate.failed.message",defaultMessage:"We cannot regenerate your link at this time. Please try again or contact our support team."}),autoClose:5e3})}},l=`https://ai-form.chathive.app?key=${t.key}`,c=d=>{if(d.target.checked)return u(!0);Ev.openConfirmModal({title:e.formatMessage({id:"share_project.details.confirm_disable.title",defaultMessage:"Confirm disable"}),children:v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"share_project.details.confirm_disable.description",defaultMessage:"Your link will be temporarily unavailable, you can restore it by re-enabling it."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:97,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:96,columnNumber:5},this),labels:{confirm:e.formatMessage({id:"share_project.details.confirm_disable.confirm",defaultMessage:"Disable link"}),cancel:e.formatMessage({id:"shared.modal.footer.cancel",defaultMessage:"Cancel"})},confirmProps:{loading:o.isLoading,color:"red"},onConfirm:()=>u(!1)})},u=async d=>{try{await o.mutateAsync({isEnabled:d}),n.auditLog.getAll.invalidate(),n.project.getCurrent.invalidate()}catch{In.show({color:"red",message:e.formatMessage(d?Tvt.enabled:Tvt.disabled),autoClose:5e3})}};return v.jsxDEV(v.Fragment,{children:[!t.isEnabled&&v.jsxDEV(Yo,{color:"orange",variant:"light",icon:v.jsxDEV(ud,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:139,columnNumber:12},this),className:"[&>.mantine-Alert-wrapper]:items-center",children:v.jsxDEV(un,{justify:"space-between",children:[v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"share_project.details.warning.disabled.description",defaultMessage:"Your link has been disabled and cannot be accessed right now."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:144,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:143,columnNumber:7},this),v.jsxDEV(Nn,{color:"black",variant:"subtle",onClick:()=>u(!0),loading:o.isLoading,children:v.jsxDEV(ee,{id:"share_project.details.warning.disabled.enable_button",defaultMessage:"Enable link"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:155,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:149,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:142,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:136,columnNumber:5},this),v.jsxDEV(or,{children:v.jsxDEV(Gt,{gap:"xs",children:[v.jsxDEV(un,{justify:"space-between",className:"w-full",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"share_project.details.title",defaultMessage:"Shareable link"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:167,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:166,columnNumber:7},this),v.jsxDEV(ir,{refProp:"rootRef",label:e.formatMessage(t.isEnabled?Lvt.enabled:Lvt.disabled),children:v.jsxDEV(Du,{color:"green",disabled:!i,onChange:c,checked:t.isEnabled},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:175,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:169,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:165,columnNumber:6},this),v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"share_project.details.description",defaultMessage:"This is your project's unique link. Share it with your team or customers to let them fill out your AI form."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:184,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:183,columnNumber:6},this),v.jsxDEV(un,{wrap:"nowrap",justify:"space-between",className:"p-4 bg-gray-100 relative rounded-lg",children:[v.jsxDEV("code",{className:"text-sm font-mono select-all truncate",children:l},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:190,columnNumber:7},this),v.jsxDEV(un,{gap:0,wrap:"nowrap",children:[v.jsxDEV(sU,{value:l,variant:"subtle"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:192,columnNumber:8},this),i&&v.jsxDEV(ir,{label:e.formatMessage({id:"share_project.unique_link.regenerate",defaultMessage:"Regenerate link"}),children:v.jsxDEV(Fr,{variant:"subtle",size:"lg",onClick:s,children:[!r.isLoading&&v.jsxDEV(mai,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:201,columnNumber:41},this),r.isLoading&&v.jsxDEV(pie,{size:16,stroke:1.5,className:"animate-spin"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:203,columnNumber:12},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:200,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:194,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:191,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:189,columnNumber:6},this),v.jsxDEV(Qe,{size:"xs",children:v.jsxDEV(ee,{id:"share_project.details.warning.disabled.description",defaultMessage:"If you want to embed this project in your own application, go to <link>implementation</link> for more detail.",values:{link:d=>v.jsxDEV(T0,{to:"../implementation",children:d},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:214,columnNumber:37},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:211,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:210,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:164,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:163,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkDetail.tsx",lineNumber:134,columnNumber:3},this)}const Lvt={enabled:{id:"share_project.details.status.is_enabled",defaultMessage:"Your link is active."},disabled:{id:"share_project.details.status.is_disabled",defaultMessage:"Your link has been disabled."}},Tvt={enabled:{id:"share_project.details.notification.is_enabled.failed",defaultMessage:"We cannot enable your link at Shareable link can not be delete"},disabled:{id:"share_project.details.notification.is_disabled.failed",defaultMessage:"Shareable link could not be delete"}};function w1r({shareableLink:t}){const e=Mt(),n=Je.useUtils(),i=Oi(ps),[r,o]=b.useState(!1),s=Je.project.shareableLink.update.useMutation(),a=gt.object({name:gt.string({required_error:e.formatMessage({id:"shareable_link.settings.form.name.error.required",defaultMessage:"Name is required"})}).min(1,{message:e.formatMessage({id:"shareable_link.settings.form.name.error.required",defaultMessage:"Name is required"})}).max(128,{message:e.formatMessage({id:"shareable_link.settings.form.name.error.max_length",defaultMessage:"Name cannot be longer then 128 characters"})})}),l=ls({mode:"uncontrolled",validateInputOnBlur:!0,validate:aa(a),initialValues:{name:t.name},onValuesChange:()=>o(l.isValid()&&l.isDirty())}),c=async u=>{try{await s.mutateAsync(u),o(!1),l.setInitialValues(u),n.auditLog.getAll.invalidate(),n.project.getCurrent.invalidate(),In.show({color:"green",message:e.formatMessage({id:"shareable_link.settings.notification.updated.succeeded",defaultMessage:"Shareable link has been updated"}),autoClose:5e3})}catch(d){console.error("Failed to create shareable link",d),In.show({color:"red",title:e.formatMessage({id:"shareable_link.settings.notification.updated.failed.title",defaultMessage:"Shareable link could not be updated"}),message:e.formatMessage({id:"shareable_link.settings.notification.updated.failed.message",defaultMessage:"We cannot update the shareable link at this time. Please try again or contact our support team."}),autoClose:5e3})}};return i?v.jsxDEV(or,{children:v.jsxDEV("form",{onSubmit:l.onSubmit(c),children:v.jsxDEV(Gt,{children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"share_project.settings.title",defaultMessage:"Settings"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkSettings.tsx",lineNumber:100,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkSettings.tsx",lineNumber:99,columnNumber:6},this),v.jsxDEV(zl,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkSettings.tsx",lineNumber:102,columnNumber:6},this),v.jsxDEV(Gt,{gap:0,children:[v.jsxDEV(Vo,{id:"name",label:e.formatMessage({id:"share_project.form.name.label",defaultMessage:"Name"}),children:v.jsxDEV(pa,{...l.getInputProps("name"),readOnly:!i},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkSettings.tsx",lineNumber:111,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkSettings.tsx",lineNumber:104,columnNumber:7},this),v.jsxDEV(un,{justify:"flex-start",children:v.jsxDEV(Nn,{size:"sm",type:"submit",disabled:!r,loading:s.isLoading,children:v.jsxDEV(ee,{id:"share_project.form.submit",defaultMessage:"Update"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkSettings.tsx",lineNumber:115,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkSettings.tsx",lineNumber:114,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkSettings.tsx",lineNumber:113,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkSettings.tsx",lineNumber:103,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkSettings.tsx",lineNumber:98,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkSettings.tsx",lineNumber:97,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkSettings.tsx",lineNumber:96,columnNumber:3},this):null}function C1r({shareableLink:t}){var r,o;const e=Mt(),{data:n,isInitialLoading:i}=Je.project.shareableLink.getStatistic.useQuery({linkId:`${t==null?void 0:t._id}`},{enabled:!!(t!=null&&t._id)});return v.jsxDEV(or,{children:[v.jsxDEV(un,{justify:"space-between",className:"mb-4",children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"share_project.statistics.title",defaultMessage:"Statistics"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkStatistic.tsx",lineNumber:23,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkStatistic.tsx",lineNumber:22,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkStatistic.tsx",lineNumber:21,columnNumber:4},this),i&&v.jsxDEV(li,{height:72},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkStatistic.tsx",lineNumber:26,columnNumber:25},this),!i&&v.jsxDEV(un,{justify:"space-between",align:"flex-start",children:[v.jsxDEV($E,{label:e.formatMessage({id:"share_project.statistic.total_used.label",defaultMessage:"Total used last 30 days"}),value:e.formatNumber((n==null?void 0:n.usageInLastMonth)||0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkStatistic.tsx",lineNumber:29,columnNumber:6},this),v.jsxDEV($E,{label:e.formatMessage({id:"share_project.statistic.last_used.label",defaultMessage:"Last used"}),value:n!=null&&n.lastUsed?v.jsxDEV(z0,{value:n.lastUsed},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkStatistic.tsx",lineNumber:43,columnNumber:9},this):e.formatMessage({id:"share_project.statistic.last_used.value",defaultMessage:"Not used"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkStatistic.tsx",lineNumber:36,columnNumber:6},this),v.jsxDEV($E,{label:e.formatMessage({id:"share_project.statistic.created_by.label",defaultMessage:"CreatedBy"}),value:[(r=n==null?void 0:n.createdBy)==null?void 0:r.firstName,(o=n==null?void 0:n.createdBy)==null?void 0:o.lastName].join(" ").trim()},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkStatistic.tsx",lineNumber:52,columnNumber:6},this),v.jsxDEV($E,{label:e.formatMessage({id:"share_project.statistic.created_at.label",defaultMessage:"Created at"}),value:e.formatDate(t.createdAt)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkStatistic.tsx",lineNumber:59,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkStatistic.tsx",lineNumber:28,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/LinkStatistic.tsx",lineNumber:20,columnNumber:3},this)}function S1r(){const t=Mt(),e=Je.useUtils(),n=Oi(ps),i=Je.project.shareableLink.deleteLink.useMutation(),r=()=>{Ev.openConfirmModal({title:t.formatMessage({id:"share_project.confirm_delete.title",defaultMessage:"Delete shareable link"}),children:v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"share_project.confirm_delete.description",defaultMessage:"If you delete this shareable link, there's no going back. This means the link will no longer work, and your customers won't be able to access it."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/DeleteLink.tsx",lineNumber:25,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/DeleteLink.tsx",lineNumber:24,columnNumber:5},this),labels:{confirm:t.formatMessage({id:"share_project.confirm_delete.confirm",defaultMessage:"Delete"}),cancel:t.formatMessage({id:"shared.modal.footer.cancel.delete",defaultMessage:"No don't delete it"})},confirmProps:{color:"red"},onConfirm:o})},o=async()=>{try{await i.mutateAsync(),e.project.getCurrent.invalidate(),In.show({color:"green",message:t.formatMessage({id:"share_project.notification.delete.succeeded",defaultMessage:"Shareable link has been delete"}),autoClose:5e3})}catch(s){console.error("Failed to delete shareable link",s),In.show({color:"red",title:t.formatMessage({id:"share_project.notification.delete.failed.title",defaultMessage:"Shareable link could not be delete"}),message:t.formatMessage({id:"share_project.notification.delete.failed.message",defaultMessage:"We cannot delete your link at this time. Please try again or contact our support team."}),autoClose:5e3})}};return n?v.jsxDEV(or,{children:v.jsxDEV(Gt,{children:[v.jsxDEV(un,{justify:"space-between",children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"share_project.delete.title",defaultMessage:"Delete link"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/DeleteLink.tsx",lineNumber:83,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/DeleteLink.tsx",lineNumber:82,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/DeleteLink.tsx",lineNumber:81,columnNumber:5},this),v.jsxDEV(un,{wrap:"nowrap",justify:"flex-start",children:[v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"share_project.delete.description",defaultMessage:"Deleting your shareable link is permanent and cannot be undone. Once deleted, the link will no longer be accessible, and anyone trying to use it will be redirected to a fallback page."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/DeleteLink.tsx",lineNumber:88,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/DeleteLink.tsx",lineNumber:87,columnNumber:6},this),v.jsxDEV(Nn,{className:"min-w-fit",variant:"light",color:"red",onClick:r,children:v.jsxDEV(ee,{id:"share_project.delete.button",defaultMessage:"Delete link"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/DeleteLink.tsx",lineNumber:94,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/DeleteLink.tsx",lineNumber:93,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/DeleteLink.tsx",lineNumber:86,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/DeleteLink.tsx",lineNumber:80,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/DeleteLink.tsx",lineNumber:79,columnNumber:3},this):null}function N1r(){var s;const t=Mt(),e=Oi(ps),[n,i]=Pc(),{data:r}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0}),{data:o}=Je.getOrganization.useQuery(void 0,{staleTime:1/0});return ide(t.formatMessage({id:"share_project.page.title",defaultMessage:"Share project - Chathive"})),(s=r==null?void 0:r.shareableLink)!=null&&s.key?v.jsxDEV("main",{className:"grid gap-4 w-full max-w-4xl",children:[v.jsxDEV(x1r,{shareableLink:r.shareableLink},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/index.tsx",lineNumber:66,columnNumber:4},this),v.jsxDEV(C1r,{shareableLink:r.shareableLink},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/index.tsx",lineNumber:67,columnNumber:4},this),v.jsxDEV(w1r,{shareableLink:r.shareableLink},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/index.tsx",lineNumber:68,columnNumber:4},this),v.jsxDEV(_1r,{linkId:`${r.shareableLink._id}`,organization:o},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/index.tsx",lineNumber:69,columnNumber:4},this),v.jsxDEV(S1r,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/index.tsx",lineNumber:70,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/index.tsx",lineNumber:65,columnNumber:3},this):v.jsxDEV("section",{className:"w-full h-full",children:[v.jsxDEV(or,{className:"m-auto",children:v.jsxDEV(Zd,{imgClassName:"h-44",src:"/img/svg/share_link.svg",title:t.formatMessage({id:"share_project.empty.title",defaultMessage:"Share your AI form"}),description:t.formatMessage({id:"share_project.empty.description",defaultMessage:"Share your AI form with your customers effortlessly through a unique link, no development needed. Simply create the link and share it!"}),className:"m-8",children:e&&v.jsxDEV(Nn,{size:"xs",variant:"filled",onClick:i.open,children:v.jsxDEV(ee,{id:"share_project.empty.button",defaultMessage:"Create your unique shareable link"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/index.tsx",lineNumber:51,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/index.tsx",lineNumber:50,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/index.tsx",lineNumber:36,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/index.tsx",lineNumber:35,columnNumber:5},this),v.jsxDEV(v1r,{isOpen:n,onClose:i.close},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/index.tsx",lineNumber:59,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/ShareProject/index.tsx",lineNumber:34,columnNumber:4},this)}const S$=Xp({key:"lytAgentState",default:void 0}),bR=Xp({key:"lytBrandingState",default:void 0}),wM=Xp({key:"lytLayoutState",default:void 0}),LHe=Xp({key:"lytFeaturesState",default:void 0}),YWt={standalone:!1,embedded:!1,widget:!1};function XWt({className:t}){const e=Oi(wM);return e!=null&&e.isWhiteLabeled?null:v.jsxDEV(E5e,{href:"https://chathive.co/",target:"_blank",size:"sm",className:t,children:v.jsxDEV(Ew,{shadow:"xl",radius:0,withBorder:!0,className:"!rounded-t-lg border border-slate-200 dark:border-slate-500 border-b-0 py-1 px-2 !text-black",children:v.jsxDEV(un,{gap:4,wrap:"nowrap",children:[v.jsxDEV("img",{src:"/img/svg/icon.svg",className:"size-3 object-contain"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Branding.tsx",lineNumber:21,columnNumber:6},this),v.jsxDEV(Qe,{size:"xs",className:"whitespace-nowrap",children:v.jsxDEV(ee,{id:"layout.ai_form.preview.powered_by",defaultMessage:"Powered by Chathive"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Branding.tsx",lineNumber:23,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Branding.tsx",lineNumber:22,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Branding.tsx",lineNumber:20,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Branding.tsx",lineNumber:14,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Branding.tsx",lineNumber:13,columnNumber:3},this)}function ZWt({css:t,namespace:e}){var n,i;return(i=(n=t==null?void 0:t.split(/{|}/))==null?void 0:n.map((r,o)=>o%2===0?`.${e} ${r}{`:`${r}
}`))==null?void 0:i.join(`
`)}function QWt(){const t=Oi(bR),e="ai-form-preview-inject-styling";return v.jsxDEV("style",{children:[`.${e} {
				--aif-accent-light: ${t.backgroundColor};
				--aif-accent-color-light: ${t.fontColor};
				--aif-color-light: #000000;
				--aif-background-light: #ffffff;
				--aif-border-color-light: #e5e7eb;
				--aif-button-bg-light: ${t.backgroundColor}20;
				--aif-card-bg-light: #ffffff;
				--aif-error-light: #fa5252;
			}`,t.css&&ZWt({css:t.css,namespace:e})]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/InjectStyling.tsx",lineNumber:11,columnNumber:3},this)}const E1r={aiForm:"aiFormLayoutIntroduction",chatbot:"chatbotLayoutIntroduction"},jx={headerTitle:"layout-header__title",header:"layout-header",content:"layout-content",contentAvatar:"layout-content__avatar",contentMessageAssistant:"layout-content__message--assistant",contentMessageCustomer:"layout-content__message-—customer",reply:"layout-reply",replyField:"layout-reply__field",replyFieldTip:"layout-layout-reply__field--tip",replySubmitButton:"layout-reply__submit-button"},Ka={headerTitle:"header__title",headerCloseButton:"header__close_button",headerDescription:"header__description",container:"chat__container",containerList:"chat__container__list",footerActions:"chat__footer__actions",footerActionsLeadGen:"chat__footer__actions__leadgen-trigger",suggestions:"chat__footer__suggestions",suggestionsButton:"chat__footer__suggestions__button",replyFieldWrapper:"chat__footer__reply-wrapper",replyField:"chat__footer__reply__field",replyButton:"chat__footer__reply__button",messageWrapper:"message__wrapper",messageAvatar:"message__avatar",messageAssistant:"message--assistant",messageCustomer:"message--customer",messageVotes:"message__votes",messagePositiveVote:"message__votes__positive",messageNegativeVote:"message__votes__negative",messageTypingIndicator:"message--typing-indicator",messageSources:"message__sources",messageSourcesList:"message__source__list",messageSourcesItem:"message__source__item",notificationList:"notification-list",notificationClearButton:"notification-list__clear-button",notificationListItem:"notification__list-item",leadgenModalOverlay:"leadgen__modal__overlay",leadgenModalContent:"leadgen__modal__content",leadgenModalHeader:" leadgen__modal__header",leadgenModalHeaderTitle:"leadgen__modal__header__title",leadgenModalHeaderCloseButton:"leadgen__modal__header__close-button",leadgenModalHeaderDescription:"leadgen__modal__header__description",leadgenModalBody:"leadgen__modal__body",leadgenModalBodyFormLabel:"leadgen__modal__body__form__label",leadgenNumberInput:"leadgen__modal__body__input-number",leadgenTextarea:"leadgen__modal__body__input-textarea",leadgenTextInput:"leadgen__modal__body__input-text",leadgenSubmit:"leadgen__modal__body__submit",leadgenNotificationFailed:"leadgen__modal__notification--failed",launcher:"launcher",launcherIcon:"launcher__icon",launcherCloseIcon:"launcher__close-icon"},D1r={aiForm:Object.values(jx),chatbot:Object.values(Ka)};function MSe({direction:t,message:e,className:n,sourceReferences:i}){const r=Oi(S$),o=Oi(wM),s=t==="left";return v.jsxDEV(uu,{gap:8,align:"flex-start",className:n,justify:t==="left"?"flex-start":"flex-end",children:[s&&(o==null?void 0:o.showAvatar)&&v.jsxDEV(IS,{className:jx.contentAvatar,src:r.avatar,radius:"md",size:"md"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Message.tsx",lineNumber:30,columnNumber:5},this),v.jsxDEV("span",{className:"sr-only",children:[s&&v.jsxDEV(ee,{id:"layout.ai_form.preview.sender.agent",defaultMessage:"{name} says:",values:{name:r.name}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Message.tsx",lineNumber:34,columnNumber:6},this),!s&&v.jsxDEV(ee,{id:"layout.ai_form.preview.sender.self",defaultMessage:"I say"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Message.tsx",lineNumber:40,columnNumber:18},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Message.tsx",lineNumber:32,columnNumber:4},this),v.jsxDEV("div",{className:Vt("max-w-prose p-2 font-normal rounded-lg shadow-lg border-solid border-[var(--aif-border-color-light)]",s?`${jx.contentMessageAssistant} border rounded-tl-sm bg-[var(--aif-card-bg-light)]`:`${jx.contentMessageCustomer} rounded-tr-sm bg-[var(--aif-accent-light)]`),children:[v.jsxDEV(Yg,{inverse:!s,className:s?"text-[var(--aif-color-light)]":"text-[var(--aif-accent-color-light)]",children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Message.tsx",lineNumber:50,columnNumber:5},this),(o==null?void 0:o.showSourceReferences)&&!!(i!=null&&i.length)&&v.jsxDEV("div",{className:"mt-4",children:[v.jsxDEV("p",{className:"font-bold text-[var(--aif-color-light)] text-xs mb-1",children:v.jsxDEV(ee,{id:"sourcesLabel",defaultMessage:"Sources"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Message.tsx",lineNumber:59,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Message.tsx",lineNumber:58,columnNumber:7},this),i==null?void 0:i.map(a=>{if(a)return v.jsxDEV("div",{className:Vt("py-1 px-2 leading-normal cursor-not-allowed rounded-md text-xs w-fit","font-medium border border-solid border-[var(--aif-accent-light)] text-[var(--aif-accent-light)]","active:scale-95 active:shadow duration-200"),children:a},a,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Message.tsx",lineNumber:65,columnNumber:9},this)})]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Message.tsx",lineNumber:57,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Message.tsx",lineNumber:42,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Message.tsx",lineNumber:23,columnNumber:3},this)}function JWt({widget:t,project:e,organization:n,className:i}){var u;const r=Mt(),[o,s]=b.useState(!1),a=(u=t.content)==null?void 0:u[e.defaultLanguage],l=b.useMemo(()=>{const d={agent:e.agent,project:{name:e.name},organization:{name:n==null?void 0:n.name}},h=(a==null?void 0:a.welcomeMessage)||"";return Xj({string:h,payload:d})},[n,e,t.content]),c=d=>{d.key==="Enter"&&(d.preventDefault(),s(!0))};return v.jsxDEV("section",{className:Vt("overflow-hidden bg-[var(--aif-background-light)]",i,jx.content),children:v.jsxDEV(Gt,{p:"md",justify:"flex-start",className:Vt("w-full h-full overflow-auto !pb-36"),children:[v.jsxDEV(MSe,{direction:"left",className:"max-w-[90%]",message:l},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:46,columnNumber:5},this),v.jsxDEV(MSe,{direction:"right",message:(a==null?void 0:a.startButton)||r.formatMessage({id:"layout.ai_form.preview.customer.response",defaultMessage:"-- customer response --",description:"Fallback when no start button is defined"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:47,columnNumber:5},this),v.jsxDEV(MSe,{direction:"left",className:"max-w-[90%]",message:r.formatMessage({id:"layout.ai_form.preview.agent.response",defaultMessage:"-- AI generated response --"}),sourceReferences:[r.formatMessage({id:"layout.ai_form.preview.assistant.response.sources",defaultMessage:"Chathive | Home"})]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:58,columnNumber:5},this),v.jsxDEV(Gt,{className:Vt("w-full ml-auto min-w-[60%] max-w-[80%] relative",jx.reply),gap:1,children:[v.jsxDEV("div",{className:Vt("pl-2 pr-1 w-full rounded-md shadow-lg bg-[var(--aif-card-bg-light)]","border border-solid border-[var(--aif-border-color-light)]","focus-within:border-[var(--aif-accent-light)]",jx.replyField),children:v.jsxDEV(un,{wrap:"nowrap",align:"center",children:[v.jsxDEV(Th,{autosize:!0,size:"md",autoFocus:!0,minRows:1,maxRows:5,tabIndex:-1,id:"send_button",autoComplete:"off",variant:"unstyled",className:"w-full",rightSectionPointerEvents:"all",placeholder:a==null?void 0:a.replyField,onKeyDown:c},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:82,columnNumber:8},this),v.jsxDEV("button",{onClick:()=>s(!0),className:Vt("size-8 min-w-8 rounded disabled:bg-gray-100","outline-none border-0 flex flex-col justify-center","text-[var(--aif-accent-color-light)] bg-[var(--aif-accent-light)]","disabled:text-gray-400 disabled:cursor-not-allowed","active:scale-90 disabled:active:scale-100 duration-200",jx.replySubmitButton),children:v.jsxDEV(t8e,{size:16,stroke:1.5,className:"m-auto text-inherit"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:108,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:97,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:81,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:73,columnNumber:6},this),v.jsxDEV("p",{className:"text-xs !text-neutral-400 layout-reply__field--tip",children:v.jsxDEV(ee,{id:"layout.ai_form.preview.agent.reply_field.tip",defaultMessage:"TIP: Press enter to send"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:113,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:112,columnNumber:6},this),v.jsxDEV(lu,{duration:400,transition:"scale-y",timingFunction:"easeIn",mounted:o,children:d=>v.jsxDEV("div",{style:d,className:"w-full h-full !absolute right-0 z-60 -bottom-12 bg-white",children:v.jsxDEV(Yo,{color:"red",withCloseButton:!0,className:"w-full !absolute !overflow-visible",onClose:()=>s(!1),closeButtonLabel:r.formatMessage({id:"layout.ai_form.preview.reply_field_disabled.close.aria_label",defaultMessage:"Close"}),children:v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"layout.ai_form.preview.reply_field_disabled",defaultMessage:"In layout preview mode, message sending is disabled. To test the functionality, use the <bold>Test Configuration</bold> option in the form-config settings.",values:{bold:h=>v.jsxDEV("span",{className:"font-bold",children:h},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:140,columnNumber:41},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:137,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:136,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:126,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:125,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:118,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:72,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:45,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Content.tsx",lineNumber:42,columnNumber:3},this)}function eUt({widget:t,project:e,className:n}){var r;const i=Oi(wM);return i!=null&&i.showHeader?v.jsxDEV("header",{className:Vt("w-full p-4 flex flex-row justify-start items-center bg-[var(--aif-background-light)]",jx.header,n),children:v.jsxDEV("h1",{className:Vt("font-bold text-base",jx.headerTitle),children:(r=t.content[e.defaultLanguage])==null?void 0:r.title},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Header.tsx",lineNumber:26,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/components/Header.tsx",lineNumber:19,columnNumber:3},this):null}function k1r(t){return v.jsxDEV("main",{className:Vt("ai-form-preview-inject-styling relative bg-[var(--aif-background-light)]","flex h-full w-full flex-col rounded-lg overflow-hidden"),children:[v.jsxDEV(QWt,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/EmbeddedPreview.tsx",lineNumber:22,columnNumber:4},this),v.jsxDEV(eUt,{...t,className:"border-b border-solid border-[var(--aif-border-color-light)]"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/EmbeddedPreview.tsx",lineNumber:23,columnNumber:4},this),v.jsxDEV(JWt,{...t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/EmbeddedPreview.tsx",lineNumber:24,columnNumber:4},this),v.jsxDEV(XWt,{className:"absolute bottom-0 left-1/2 -translate-x-1/2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/EmbeddedPreview.tsx",lineNumber:25,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/EmbeddedPreview.tsx",lineNumber:16,columnNumber:3},this)}function M1r(t){return v.jsxDEV("main",{className:Vt("ai-form-preview-inject-styling relative h-full w-full flex flex-col gap-4 rounded-lg"),children:[v.jsxDEV(QWt,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/StandalonePreview.tsx",lineNumber:17,columnNumber:4},this),v.jsxDEV(eUt,{...t,className:"rounded"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/StandalonePreview.tsx",lineNumber:18,columnNumber:4},this),v.jsxDEV(JWt,{...t,className:"rounded"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/StandalonePreview.tsx",lineNumber:19,columnNumber:4},this),v.jsxDEV(XWt,{className:"absolute -bottom-8 left-1/2 -translate-x-1/2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/StandalonePreview.tsx",lineNumber:20,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/InterfacePreview/StandalonePreview.tsx",lineNumber:16,columnNumber:3},this)}function L1r({project:t,widget:e,organization:n,onClose:i,className:r}){const o=Mt(),s=Oi(bR),[a,l]=b.useState("standalone"),[c,u]=TA({key:"hideLayoutPreviewTypeBanner",defaultValue:YWt});function d(){u(h=>({...h,[a]:!0}))}if(s)return v.jsxDEV("section",{className:Vt("w-full h-full bg-white flex flex-col justify-start z-10 lg:z-0",r),children:[v.jsxDEV(Gt,{id:"previewChanges",className:"p-4",children:[v.jsxDEV(un,{gap:"xs",wrap:"nowrap",children:[v.jsxDEV(Fr,{size:"lg",variant:"subtle",onClick:i,className:"lg:!hidden","aria-label":o.formatMessage({id:"layout.preview.close.aria_label",defaultMessage:"Close preview"}),children:v.jsxDEV(wfe,{size:24,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:49,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:39,columnNumber:6},this),v.jsxDEV("div",{className:"w-full",children:v.jsxDEV(Yk,{fullWidth:!0,value:a,"aria-label":o.formatMessage({id:"layout.preview.types.aria-label",defaultMessage:"Preview type"}),onChange:h=>l(h),data:[{label:o.formatMessage({id:"layout.preview.types.standalone",defaultMessage:"Standalone"}),value:"standalone"},{label:o.formatMessage({id:"layout.preview.types.embedded",defaultMessage:"Embedded"}),value:"embedded"}]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:52,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:51,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:38,columnNumber:5},this),!c[a]&&v.jsxDEV(Yo,{withCloseButton:!0,icon:v.jsxDEV(uq,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:82,columnNumber:13},this),onClose:d,closeButtonLabel:o.formatMessage({id:"layout.info_banner.close.aria_label",defaultMessage:"Hide preview explanation"}),children:[a==="standalone"&&v.jsxDEV(ee,{id:"layout.preview.standalone.description",defaultMessage:"A <bold>standalone interface</bold> is a full-screen system that works on its own and doesn't need installation. You can share it easily with a public, shareable link.",values:{bold:h=>v.jsxDEV("span",{className:"font-bold",children:h},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:93,columnNumber:38},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:90,columnNumber:8},this),a==="embedded"&&v.jsxDEV(ee,{id:"layout.preview.embedded.description",defaultMessage:"An <bold>embedded interface</bold> is built into your application, allowing customers to interact with it without leaving your application. It integrates seamlessly with the surrounding content.",values:{bold:h=>v.jsxDEV("span",{className:"font-bold",children:h},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:100,columnNumber:38},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:97,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:80,columnNumber:6},this),v.jsxDEV("div",{className:"w-full min-h-96 relative rounded-lg p-8",style:{backgroundColor:s==null?void 0:s.backgroundColor},children:[a==="embedded"&&v.jsxDEV(k1r,{project:t,organization:n,widget:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:110,columnNumber:7},this),a==="standalone"&&v.jsxDEV(M1r,{project:t,organization:n,widget:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:113,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:105,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:37,columnNumber:4},this),v.jsxDEV("footer",{className:"w-full flex flex-row justify-center pb-2",children:v.jsxDEV(Qe,{c:"dimmed",size:"xs",className:"max-w-prose text-center",children:v.jsxDEV(ee,{id:"layout.preview.footer.disclaimer",defaultMessage:"This is just a preview, the final design may vary depending on the implementation."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:120,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:119,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:118,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/Preview/index.tsx",lineNumber:36,columnNumber:3},this)}const T1r={aiForm:{id:"layout.advanced.is_hidden.ai_form.help",defaultMessage:"The embedding will not be visible into your application"},chatbot:{id:"layout.advanced.is_hidden.chatbot.help",defaultMessage:"Widget or embedding will not be visible into your application"}},Ivt={aiForm:{id:"layout.advanced.is_hidden.ai_form.warning",defaultMessage:"The AI form is not visible in your application or as standalone application.",description:"Explain widget is hidden and will not be visible on their website"},chatbot:{id:"layout.advanced.is_hidden.chatbot.warning",defaultMessage:"The widget is not visible to your users or in preview mode.",description:"Explain widget is hidden and will not be visible on their website"}};function tUt({widget:t}){const e=Mt(),n=Je.useUtils(),i=Oi(ps),[r,o]=b.useState(!1),[s,a]=b.useState(t.advanced.isHidden),l=Je.layout.updateAdvancedSettings.useMutation(),c=gt.object({characterLimit:gt.number({required_error:e.formatMessage({id:"layout.advanced.character_limit.required",defaultMessage:"Character limit is required, use 0 to use the maximum limit"})}).min(0,{message:e.formatMessage({id:"layout.advanced.character_limit.min",defaultMessage:"Character limit must be a positive number or 0"})}).max(2048,{message:e.formatMessage({id:"layout.advanced.character_limit.max",defaultMessage:"Character limit can not be greater then 2.048 use 0 to disable."})}),isHidden:gt.boolean().default(!1)}),u=ls({mode:"uncontrolled",validateInputOnBlur:!0,validate:aa(c),initialValues:structuredClone(t.advanced),onValuesChange:h=>{a(h.isHidden),o(u.isValid()&&u.isDirty())}}),d=async h=>{try{await l.mutateAsync(h),o(!1),u.setInitialValues(structuredClone(h)),n.project.getCurrent.invalidate(),n.getWidget.invalidate(),In.show({color:"green",message:e.formatMessage({id:"layout.advanced.update.notification.succeeded",defaultMessage:"Settings have been updated"}),autoClose:5e3})}catch(f){console.error("Failed to update advanced layout settings",f),In.show({color:"red",title:e.formatMessage({id:"layout.advanced.update.notification.failed.title",defaultMessage:"Settings could not be updated"}),message:e.formatMessage({id:"layout.advanced.update.notification.failed.message",defaultMessage:"We cannot update your settings at this moment, please try again later."}),autoClose:1e4})}};return v.jsxDEV(Wi.Item,{value:"advanced",className:"!bg-white",children:[v.jsxDEV(Wi.Control,{children:v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"layout.advanced.title",defaultMessage:"Advanced"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/AdvancedSettings.tsx",lineNumber:129,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/AdvancedSettings.tsx",lineNumber:128,columnNumber:6},this),s&&v.jsxDEV(ir,{label:e.formatMessage(Ivt[t.type]),children:v.jsxDEV(kp,{variant:"light",color:"orange",children:v.jsxDEV(ud,{color:"orange",size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/AdvancedSettings.tsx",lineNumber:134,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/AdvancedSettings.tsx",lineNumber:133,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/AdvancedSettings.tsx",lineNumber:132,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/AdvancedSettings.tsx",lineNumber:127,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/AdvancedSettings.tsx",lineNumber:126,columnNumber:4},this),v.jsxDEV(Wi.Panel,{children:v.jsxDEV("form",{onSubmit:u.onSubmit(d),children:[v.jsxDEV(Vo,{id:"characterLimit",label:e.formatMessage({id:"layout.advanced.character_limit.label",defaultMessage:"Character limit"}),help:e.formatMessage({id:"layout.advanced.character_limit.help",defaultMessage:"Limit the characters a customer can use in their message."}),children:v.jsxDEV(Fde,{readOnly:!i,id:"characterLimit",...u.getInputProps("characterLimit"),min:0,max:2048},u.key("characterLimit"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/AdvancedSettings.tsx",lineNumber:153,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/AdvancedSettings.tsx",lineNumber:142,columnNumber:6},this),v.jsxDEV(Vo,{id:"isHidden",label:e.formatMessage({id:"layout.advanced.is_hidden.label",defaultMessage:"Is hidden"}),help:e.formatMessage(T1r[t.type]),warning:s?e.formatMessage(Ivt[t.type]):void 0,children:v.jsxDEV(Du,{id:"isHidden",readOnly:!i,...u.getInputProps("isHidden",{type:"checkbox"})},u.key("isHidden"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/AdvancedSettings.tsx",lineNumber:171,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/AdvancedSettings.tsx",lineNumber:162,columnNumber:6},this),i&&v.jsxDEV(Nn,{type:"submit",loading:l.isLoading,disabled:!r,size:"sm",children:v.jsxDEV(ee,{id:"shared.submit",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/AdvancedSettings.tsx",lineNumber:180,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/AdvancedSettings.tsx",lineNumber:179,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/AdvancedSettings.tsx",lineNumber:141,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/AdvancedSettings.tsx",lineNumber:140,columnNumber:4},this)]},"advanced",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/AdvancedSettings.tsx",lineNumber:125,columnNumber:3},this)}const I1r=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function NG(t,e){const n=A1r(t);if(typeof n.path!="string"){const{webkitRelativePath:i}=t;Object.defineProperty(n,"path",{value:typeof e=="string"?e:typeof i=="string"&&i.length>0?i:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}function A1r(t){const{name:e}=t;if(e&&e.lastIndexOf(".")!==-1&&!t.type){const i=e.split(".").pop().toLowerCase(),r=I1r.get(i);r&&Object.defineProperty(t,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return t}var N$=(t,e,n)=>new Promise((i,r)=>{var o=l=>{try{a(n.next(l))}catch(c){r(c)}},s=l=>{try{a(n.throw(l))}catch(c){r(c)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});const R1r=[".DS_Store","Thumbs.db"];function P1r(t){return N$(this,null,function*(){return xae(t)&&O1r(t.dataTransfer)?V1r(t.dataTransfer,t.type):j1r(t)?F1r(t):Array.isArray(t)&&t.every(e=>"getFile"in e&&typeof e.getFile=="function")?$1r(t):[]})}function O1r(t){return xae(t)}function j1r(t){return xae(t)&&xae(t.target)}function xae(t){return typeof t=="object"&&t!==null}function F1r(t){return TPe(t.target.files).map(e=>NG(e))}function $1r(t){return N$(this,null,function*(){return(yield Promise.all(t.map(n=>n.getFile()))).map(n=>NG(n))})}function V1r(t,e){return N$(this,null,function*(){if(t.items){const n=TPe(t.items).filter(r=>r.kind==="file");if(e!=="drop")return n;const i=yield Promise.all(n.map(B1r));return Avt(nUt(i))}return Avt(TPe(t.files).map(n=>NG(n)))})}function Avt(t){return t.filter(e=>R1r.indexOf(e.name)===-1)}function TPe(t){if(t===null)return[];const e=[];for(let n=0;n<t.length;n++){const i=t[n];e.push(i)}return e}function B1r(t){if(typeof t.webkitGetAsEntry!="function")return Rvt(t);const e=t.webkitGetAsEntry();return e&&e.isDirectory?iUt(e):Rvt(t)}function nUt(t){return t.reduce((e,n)=>[...e,...Array.isArray(n)?nUt(n):[n]],[])}function Rvt(t){const e=t.getAsFile();if(!e)return Promise.reject(`${t} is not a File`);const n=NG(e);return Promise.resolve(n)}function z1r(t){return N$(this,null,function*(){return t.isDirectory?iUt(t):H1r(t)})}function iUt(t){const e=t.createReader();return new Promise((n,i)=>{const r=[];function o(){e.readEntries(s=>N$(this,null,function*(){if(s.length){const a=Promise.all(s.map(z1r));r.push(a),o()}else try{const a=yield Promise.all(r);n(a)}catch(a){i(a)}}),s=>{i(s)})}o()})}function H1r(t){return N$(this,null,function*(){return new Promise((e,n)=>{t.file(i=>{const r=NG(i,t.fullPath);e(r)},i=>{n(i)})})})}function W1r(t,e){if(t&&e){const n=Array.isArray(e)?e:e.split(","),i=t.name||"",r=(t.type||"").toLowerCase(),o=r.replace(/\/.*$/,"");return n.some(s=>{const a=s.trim().toLowerCase();return a.charAt(0)==="."?i.toLowerCase().endsWith(a):a.endsWith("/*")?o===a.replace(/\/.*$/,""):r===a})}return!0}var U1r=Object.defineProperty,K1r=Object.defineProperties,q1r=Object.getOwnPropertyDescriptors,Pvt=Object.getOwnPropertySymbols,G1r=Object.prototype.hasOwnProperty,Y1r=Object.prototype.propertyIsEnumerable,Ovt=(t,e,n)=>e in t?U1r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,X1r=(t,e)=>{for(var n in e||(e={}))G1r.call(e,n)&&Ovt(t,n,e[n]);if(Pvt)for(var n of Pvt(e))Y1r.call(e,n)&&Ovt(t,n,e[n]);return t},Z1r=(t,e)=>K1r(t,q1r(e));const Q1r="file-invalid-type",J1r="file-too-large",eCr="file-too-small",tCr="too-many-files",nCr=t=>{t=Array.isArray(t)&&t.length===1?t[0]:t;const e=Array.isArray(t)?`one of ${t.join(", ")}`:t;return{code:Q1r,message:`File type must be ${e}`}},jvt=t=>({code:J1r,message:`File is larger than ${t} ${t===1?"byte":"bytes"}`}),Fvt=t=>({code:eCr,message:`File is smaller than ${t} ${t===1?"byte":"bytes"}`}),iCr={code:tCr,message:"Too many files"};function rUt(t,e){const n=t.type==="application/x-moz-file"||W1r(t,e);return[n,n?null:nCr(e)]}function oUt(t,e,n){if(pT(t.size))if(pT(e)&&pT(n)){if(t.size>n)return[!1,jvt(n)];if(t.size<e)return[!1,Fvt(e)]}else{if(pT(e)&&t.size<e)return[!1,Fvt(e)];if(pT(n)&&t.size>n)return[!1,jvt(n)]}return[!0,null]}function pT(t){return t!=null}function rCr({files:t,accept:e,minSize:n,maxSize:i,multiple:r,maxFiles:o,validator:s}){return!r&&t.length>1||r&&o>=1&&t.length>o?!1:t.every(a=>{const[l]=rUt(a,e),[c]=oUt(a,n,i),u=s?s(a):null;return l&&c&&!u})}function wae(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function MJ(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,e=>e==="Files"||e==="application/x-moz-file"):!!t.target&&!!t.target.files}function $vt(t){t.preventDefault()}function oCr(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function sCr(t){return t.indexOf("Edge/")!==-1}function aCr(t=window.navigator.userAgent){return oCr(t)||sCr(t)}function z_(...t){return(e,...n)=>t.some(i=>(!wae(e)&&i&&i(e,...n),wae(e)))}function lCr(){return"showOpenFilePicker"in window}function cCr(t){return pT(t)?[{description:"Files",accept:Object.entries(t).filter(([n,i])=>{let r=!0;return sUt(n)||(console.warn(`Skipped "${n}" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.`),r=!1),(!Array.isArray(i)||!i.every(aUt))&&(console.warn(`Skipped "${n}" because an invalid file extension was provided.`),r=!1),r}).reduce((n,[i,r])=>Z1r(X1r({},n),{[i]:r}),{})}]:t}function uCr(t){if(pT(t))return Object.entries(t).reduce((e,[n,i])=>[...e,n,...i],[]).filter(e=>sUt(e)||aUt(e)).join(",")}function dCr(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function hCr(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function sUt(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||/\w+\/[-+.\w]+/g.test(t)}function aUt(t){return/^.*\.[\w]+$/.test(t)}var fCr=Object.defineProperty,mCr=Object.defineProperties,pCr=Object.getOwnPropertyDescriptors,Cae=Object.getOwnPropertySymbols,lUt=Object.prototype.hasOwnProperty,cUt=Object.prototype.propertyIsEnumerable,Vvt=(t,e,n)=>e in t?fCr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sm=(t,e)=>{for(var n in e||(e={}))lUt.call(e,n)&&Vvt(t,n,e[n]);if(Cae)for(var n of Cae(e))cUt.call(e,n)&&Vvt(t,n,e[n]);return t},uE=(t,e)=>mCr(t,pCr(e)),Sae=(t,e)=>{var n={};for(var i in t)lUt.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Cae)for(var i of Cae(t))e.indexOf(i)<0&&cUt.call(t,i)&&(n[i]=t[i]);return n};const THe=b.forwardRef((t,e)=>{var n=t,{children:i}=n,r=Sae(n,["children"]);const o=dUt(r),{open:s}=o,a=Sae(o,["open"]);return b.useImperativeHandle(e,()=>({open:s}),[s]),Z.createElement(b.Fragment,null,i(uE(sm({},a),{open:s})))});THe.displayName="Dropzone";const uUt={disabled:!1,getFilesFromEvent:P1r,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};THe.defaultProps=uUt;THe.propTypes={children:Tn.func,accept:Tn.objectOf(Tn.arrayOf(Tn.string)),multiple:Tn.bool,preventDropOnDocument:Tn.bool,noClick:Tn.bool,noKeyboard:Tn.bool,noDrag:Tn.bool,noDragEventsBubbling:Tn.bool,minSize:Tn.number,maxSize:Tn.number,maxFiles:Tn.number,disabled:Tn.bool,getFilesFromEvent:Tn.func,onFileDialogCancel:Tn.func,onFileDialogOpen:Tn.func,useFsAccessApi:Tn.bool,autoFocus:Tn.bool,onDragEnter:Tn.func,onDragLeave:Tn.func,onDragOver:Tn.func,onDrop:Tn.func,onDropAccepted:Tn.func,onDropRejected:Tn.func,onError:Tn.func,validator:Tn.func};const IPe={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function dUt(t={}){const{accept:e,disabled:n,getFilesFromEvent:i,maxSize:r,minSize:o,multiple:s,maxFiles:a,onDragEnter:l,onDragLeave:c,onDragOver:u,onDrop:d,onDropAccepted:h,onDropRejected:f,onFileDialogCancel:m,onFileDialogOpen:p,useFsAccessApi:g,autoFocus:y,preventDropOnDocument:_,noClick:w,noKeyboard:C,noDrag:N,noDragEventsBubbling:E,onError:D,validator:k}=sm(sm({},uUt),t),M=b.useMemo(()=>uCr(e),[e]),T=b.useMemo(()=>cCr(e),[e]),A=b.useMemo(()=>typeof p=="function"?p:Bvt,[p]),R=b.useMemo(()=>typeof m=="function"?m:Bvt,[m]),P=b.useRef(null),O=b.useRef(null),[V,F]=b.useReducer(gCr,IPe),{isFocused:$,isFileDialogActive:B}=V,z=b.useRef(typeof window<"u"&&window.isSecureContext&&g&&lCr()),H=()=>{!z.current&&B&&setTimeout(()=>{if(O.current){const{files:he}=O.current;he.length||(F({type:"closeDialog"}),R())}},300)};b.useEffect(()=>(window.addEventListener("focus",H,!1),()=>{window.removeEventListener("focus",H,!1)}),[O,B,R,z]);const K=b.useRef([]),q=he=>{P.current&&P.current.contains(he.target)||(he.preventDefault(),K.current=[])};b.useEffect(()=>(_&&(document.addEventListener("dragover",$vt,!1),document.addEventListener("drop",q,!1)),()=>{_&&(document.removeEventListener("dragover",$vt),document.removeEventListener("drop",q))}),[P,_]),b.useEffect(()=>(!n&&y&&P.current&&P.current.focus(),()=>{}),[P,y,n]);const U=b.useCallback(he=>{D?D(he):console.error(he)},[D]),Y=b.useCallback(he=>{he.preventDefault(),he.persist(),Te(he),K.current=[...K.current,he.target],MJ(he)&&Promise.resolve(i(he)).then(me=>{if(wae(he)&&!E)return;const X=me.length,re=X>0&&rCr({files:me,accept:M,minSize:o,maxSize:r,multiple:s,maxFiles:a,validator:k}),we=X>0&&!re;F({isDragAccept:re,isDragReject:we,isDragActive:!0,type:"setDraggedFiles"}),l&&l(he)}).catch(me=>U(me))},[i,l,U,E,M,o,r,s,a,k]),J=b.useCallback(he=>{he.preventDefault(),he.persist(),Te(he);const me=MJ(he);if(me&&he.dataTransfer)try{he.dataTransfer.dropEffect="copy"}catch{}return me&&u&&u(he),!1},[u,E]),ae=b.useCallback(he=>{he.preventDefault(),he.persist(),Te(he);const me=K.current.filter(re=>P.current&&P.current.contains(re)),X=me.indexOf(he.target);X!==-1&&me.splice(X,1),K.current=me,!(me.length>0)&&(F({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),MJ(he)&&c&&c(he))},[P,c,E]),se=b.useCallback((he,me)=>{const X=[],re=[];he.forEach(we=>{const[ue,Ce]=rUt(we,M),[ze,Ye]=oUt(we,o,r),Ke=k?k(we):null;if(ue&&ze&&!Ke)X.push(we);else{let Xe=[Ce,Ye];Ke&&(Xe=Xe.concat(Ke)),re.push({file:we,errors:Xe.filter(it=>it)})}}),(!s&&X.length>1||s&&a>=1&&X.length>a)&&(X.forEach(we=>{re.push({file:we,errors:[iCr]})}),X.splice(0)),F({acceptedFiles:X,fileRejections:re,type:"setFiles"}),d&&d(X,re,me),re.length>0&&f&&f(re,me),X.length>0&&h&&h(X,me)},[F,s,M,o,r,a,d,h,f,k]),oe=b.useCallback(he=>{he.preventDefault(),he.persist(),Te(he),K.current=[],MJ(he)&&Promise.resolve(i(he)).then(me=>{wae(he)&&!E||se(me,he)}).catch(me=>U(me)),F({type:"reset"})},[i,se,U,E]),fe=b.useCallback(()=>{if(z.current){F({type:"openDialog"}),A();const he={multiple:s,types:T};window.showOpenFilePicker(he).then(me=>i(me)).then(me=>{se(me,null),F({type:"closeDialog"})}).catch(me=>{dCr(me)?(R(me),F({type:"closeDialog"})):hCr(me)?(z.current=!1,O.current?(O.current.value=null,O.current.click()):U(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):U(me)});return}O.current&&(F({type:"openDialog"}),A(),O.current.value=null,O.current.click())},[F,A,R,g,se,U,T,s]),de=b.useCallback(he=>{!P.current||!P.current.isEqualNode(he.target)||(he.key===" "||he.key==="Enter"||he.keyCode===32||he.keyCode===13)&&(he.preventDefault(),fe())},[P,fe]),ie=b.useCallback(()=>{F({type:"focus"})},[]),Q=b.useCallback(()=>{F({type:"blur"})},[]),be=b.useCallback(()=>{w||(aCr()?setTimeout(fe,0):fe())},[w,fe]),le=he=>n?null:he,Ne=he=>C?null:le(he),Le=he=>N?null:le(he),Te=he=>{E&&he.stopPropagation()},De=b.useMemo(()=>(he={})=>{var me=he,{refKey:X="ref",role:re,onKeyDown:we,onFocus:ue,onBlur:Ce,onClick:ze,onDragEnter:Ye,onDragOver:Ke,onDragLeave:Xe,onDrop:it}=me,ut=Sae(me,["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"]);return sm(sm({onKeyDown:Ne(z_(we,de)),onFocus:Ne(z_(ue,ie)),onBlur:Ne(z_(Ce,Q)),onClick:le(z_(ze,be)),onDragEnter:Le(z_(Ye,Y)),onDragOver:Le(z_(Ke,J)),onDragLeave:Le(z_(Xe,ae)),onDrop:Le(z_(it,oe)),role:typeof re=="string"&&re!==""?re:"presentation",[X]:P},!n&&!C?{tabIndex:0}:{}),ut)},[P,de,ie,Q,be,Y,J,ae,oe,C,N,n]),Pe=b.useCallback(he=>{he.stopPropagation()},[]),ge=b.useMemo(()=>(he={})=>{var me=he,{refKey:X="ref",onChange:re,onClick:we}=me,ue=Sae(me,["refKey","onChange","onClick"]);const Ce={accept:M,multiple:s,type:"file",style:{display:"none"},onChange:le(z_(re,oe)),onClick:le(z_(we,Pe)),tabIndex:-1,[X]:O};return sm(sm({},Ce),ue)},[O,e,s,oe,n]);return uE(sm({},V),{isFocused:$&&!n,getRootProps:De,getInputProps:ge,rootRef:P,inputRef:O,open:le(fe)})}function gCr(t,e){switch(e.type){case"focus":return uE(sm({},t),{isFocused:!0});case"blur":return uE(sm({},t),{isFocused:!1});case"openDialog":return uE(sm({},IPe),{isFileDialogActive:!0});case"closeDialog":return uE(sm({},t),{isFileDialogActive:!1});case"setDraggedFiles":return uE(sm({},t),{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return uE(sm({},t),{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return sm({},IPe);default:return t}}function Bvt(){}const[bCr,vCr]=Uh("Dropzone component was not found in tree");function IHe(t){const e=n=>{const{children:i,...r}=Kt(`Dropzone${aJe(t)}`,{},n),o=vCr(),s=Nw(i)?i:ne.jsx("span",{children:i});return o[t]?b.cloneElement(s,r):null};return e.displayName=`@mantine/dropzone/${aJe(t)}`,e}const yCr=IHe("accept"),_Cr=IHe("reject"),xCr=IHe("idle");var EU={root:"m_d46a4834",inner:"m_b85f7144",fullScreen:"m_96f6e9ad",dropzone:"m_7946116d"};const wCr={loading:!1,multiple:!0,maxSize:1/0,autoFocus:!1,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,useFsAccessApi:!0,variant:"light",rejectColor:"red"},CCr=(t,{radius:e,variant:n,acceptColor:i,rejectColor:r})=>{const o=t.variantColorResolver({color:i||t.primaryColor,theme:t,variant:n}),s=t.variantColorResolver({color:r||"red",theme:t,variant:n});return{root:{"--dropzone-radius":Va(e),"--dropzone-accept-color":o.color,"--dropzone-accept-bg":o.background,"--dropzone-reject-color":s.color,"--dropzone-reject-bg":s.background}}},CM=Dn((t,e)=>{const n=Kt("Dropzone",wCr,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,radius:c,disabled:u,loading:d,multiple:h,maxSize:f,accept:m,children:p,onDropAny:g,onDrop:y,onReject:_,openRef:w,name:C,maxFiles:N,autoFocus:E,activateOnClick:D,activateOnDrag:k,dragEventsBubbling:M,activateOnKeyboard:T,onDragEnter:A,onDragLeave:R,onDragOver:P,onFileDialogCancel:O,onFileDialogOpen:V,preventDropOnDocument:F,useFsAccessApi:$,getFilesFromEvent:B,validator:z,rejectColor:H,acceptColor:K,enablePointerEvents:q,loaderProps:U,inputProps:Y,mod:J,...ae}=n,se=hi({name:"Dropzone",classes:EU,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:CCr}),{getRootProps:oe,getInputProps:fe,isDragAccept:de,isDragReject:ie,open:Q}=dUt({onDrop:g,onDropAccepted:y,onDropRejected:_,disabled:u||d,accept:Array.isArray(m)?m.reduce((le,Ne)=>({...le,[Ne]:[]}),{}):m,multiple:h,maxSize:f,maxFiles:N,autoFocus:E,noClick:!D,noDrag:!k,noDragEventsBubbling:!M,noKeyboard:!T,onDragEnter:A,onDragLeave:R,onDragOver:P,onFileDialogCancel:O,onFileDialogOpen:V,preventDropOnDocument:F,useFsAccessApi:$,validator:z,...B?{getFilesFromEvent:B}:null});SK(w,Q);const be=!de&&!ie;return ne.jsx(bCr,{value:{accept:de,reject:ie,idle:be},children:ne.jsxs(mn,{...oe(),...se("root",{focusable:!0}),...ae,mod:[{accept:de,reject:ie,idle:be,disabled:u,loading:d,"activate-on-click":D},J],children:[ne.jsx(tFe,{visible:d,overlayProps:{radius:c},unstyled:a,loaderProps:U}),ne.jsx("input",{...fe(Y),name:C}),ne.jsx("div",{...se("inner"),ref:e,"data-enable-pointer-events":q||void 0,children:p})]})})});CM.classes=EU;CM.displayName="@mantine/dropzone/Dropzone";CM.Accept=yCr;CM.Idle=xCr;CM.Reject=_Cr;const SCr={loading:!1,maxSize:1/0,activateOnClick:!1,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,active:!0,zIndex:gb("max"),withinPortal:!0},AHe=Dn((t,e)=>{const n=Kt("DropzoneFullScreen",SCr,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,active:c,onDrop:u,onReject:d,zIndex:h,withinPortal:f,portalProps:m,...p}=n,g=hi({name:"DropzoneFullScreen",classes:EU,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,rootSelector:"fullScreen"}),{resolvedClassNames:y,resolvedStyles:_}=zv({classNames:i,styles:s,props:n}),[w,C]=b.useState(0),[N,{open:E,close:D}]=Pc(!1),k=T=>{var A;(A=T.dataTransfer)!=null&&A.types.includes("Files")&&(C(R=>R+1),E())},M=()=>{C(T=>T-1)};return b.useEffect(()=>{w===0&&D()},[w]),b.useEffect(()=>{if(c)return document.addEventListener("dragenter",k,!1),document.addEventListener("dragleave",M,!1),()=>{document.removeEventListener("dragenter",k,!1),document.removeEventListener("dragleave",M,!1)}},[c]),ne.jsx(AA,{...m,withinPortal:f,children:ne.jsx(mn,{...g("fullScreen",{style:{opacity:N?1:0,pointerEvents:N?"all":"none",zIndex:h}}),ref:e,children:ne.jsx(CM,{...p,classNames:y,styles:_,unstyled:a,className:EU.dropzone,onDrop:T=>{u==null||u(T),D(),C(0)},onReject:T=>{d==null||d(T),D(),C(0)}})})})});AHe.classes=EU;AHe.displayName="@mantine/dropzone/DropzoneFullScreen";const BN={png:"image/png",gif:"image/gif",jpeg:"image/jpeg",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif",heic:"image/heic",heif:"image/heif",mp4:"video/mp4",zip:"application/zip",rar:"application/x-rar","7z":"application/x-7z-compressed",csv:"text/csv",pdf:"application/pdf",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",exe:"application/vnd.microsoft.portable-executable"},NCr=[BN.png,BN.gif,BN.jpeg,BN.svg,BN.webp,BN.avif,BN.heic,BN.heif];CM.FullScreen=AHe;const ECr=CM;function APe(t,e){var n,i;return t&&e?(n=""+t+e[0].toUpperCase()+e.slice(1),i=t+"-"+e):(n=t||e,i=t||e),{camelCase:n,snakeCase:i}}function hUt(t){return/^blob:/.test(t)}function DCr(t){return/^data:/.test(t)}function fUt(t){return hUt(t)||DCr(t)}function kCr(t){if(fUt(t))return!1;var e=window.location,n=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/,i=n.exec(t)||[],r={protocol:i[1]||"",host:i[2]||"",port:i[3]||""},o=function(a){return a==="http"?80:433},s=function(a){return a.port||o(a.protocol||e.protocol)};return!(!r.protocol&&!r.host&&!r.port||r.protocol&&r.protocol==e.protocol&&r.host&&r.host==e.host&&r.host&&s(r)==s(e))}function MCr(t){return Array.isArray(t)}function ha(t){return typeof t=="function"}function ku(t){return t===void 0}var wI=function(t){return t!==null&&typeof t=="object"};function EG(t,e,n){n===void 0&&(n={});var i={};return wI(t)?(Object.keys(e).forEach(function(r){ku(t[r])?i[r]=e[r]:wI(e[r])?wI(t[r])?i[r]=EG(t[r],e[r],n[r]):i[r]=t[r]?e[r]:n[r]:e[r]===!0||e[r]===!1?i[r]=!!t[r]:i[r]=t[r]}),i):t?e:n}function oD(t){var e=Number(t);return Number.isNaN(e)?t:e}function zvt(t){return t===!0||t===!1}function ml(t){return typeof t=="number"}function LCr(t){return typeof t=="string"}function mUt(t){return t!==t}function h0(t){return ml(t)&&!mUt(t)||LCr(t)&&!Number.isNaN(parseFloat(t))&&isFinite(parseFloat(t))}function pUt(t,e){return Math.sqrt(Math.pow(t.left-e.left,2)+Math.pow(t.top-e.top,2))}function WC(t,e,n){return n===void 0&&(n=.001),Math.abs(e-t)<n}function Lk(t,e,n){return WC(t,e,n)?!1:t>e}function aF(t,e,n){return WC(t,e,n)?!1:t<e}function TCr(t){var e=+t;return e===0||mUt(e)?e:e>0?1:-1}function Hvt(t){return new Promise(function(e){setTimeout(function(){e()},t)})}function DU(t){if(!wI(t))return t;var e={};return Array.isArray(t)?e=t.map(function(n){return DU(n)}):Object.keys(t).forEach(function(n){return e[n]=DU(t[n])}),e}function G3(t,e,n){if(n===void 0&&(n=.001),ml(t)&&ml(e)&&WC(t,e,n)||t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var i,r=void 0;if(Array.isArray(t)){if(i=t.length,i!=e.length)return!1;for(r=i;r--!==0;)if(!G3(t[r],e[r],n))return!1;return!0}if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();var o=Object.keys(t);if(i=o.length,i!==Object.keys(e).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[r]))return!1;for(r=i;r--!==0;){var s=o[r];if(!G3(t[s],e[s],n))return!1}return!0}return t!==t&&e!==e}function gUt(){return{left:0,top:0,width:0,height:0}}function ICr(t){return t==="west"||t==="south"||t==="north"||t==="east"}function bUt(t,e){var n,i;function r(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var l=Date.now()-n,c=ha(e)?e():e||0;l<c&&l>=0?i=setTimeout(function(){return r.apply(void 0,s)},c-l):t.apply(void 0,s)}function o(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];n=Date.now(),i=setTimeout(function(){return r.apply(void 0,s)},ha(e)?e():e||0)}return o.clear=function(){clearTimeout(i)},o}var Gy=["left","right","top","bottom"],ACr=["left","right"],RCr=["top","bottom"];function r_(t,e){return{left:t.left-e.left,top:t.top-e.top}}function Nl(t){return{left:t.left+t.width/2,top:t.top+t.height/2}}function PCr(t){return{left:"right",top:"bottom",right:"left",bottom:"top"}[t]}function Wvt(t,e){return Math.pow(t.width-e.width,2)+Math.pow(t.height-e.height,2)}function vx(t,e){return{left:t.left-e.left,top:t.top-e.top,width:t.width+e.left+e.right,height:t.height+e.top+e.bottom}}function RHe(t){return{left:-t.left,top:-t.top}}function zh(t,e){return Et(Et({},t),{left:t.left+e.left,top:t.top+e.top})}function hb(t){return{left:t.left,top:t.top,right:t.left+t.width,bottom:t.top+t.height}}function nw(t,e,n,i){if(e!==1)if("left"in t||"top"in t)if(n){var r=Nl(t);return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2+(n.left-r.left)*(1-e),top:t.top+t.height*(1-e)/2+(n.top-r.top)*(1-e)}}else return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2,top:t.top+t.height*(1-e)/2};else return{width:t.width*e,height:t.height*e};else return t}function Mo(t){return t.width/t.height}function RPe(t,e){return Math.min(e.maxWidth?e.maxWidth/t.width:1/0,e.maxHeight?e.maxHeight/t.height:1/0)}function OCr(t,e){return Math.max(e.minWidth?e.minWidth/t.width:0,e.minHeight?e.minHeight/t.height:0)}function kU(t,e){var n;return e.minimum&&aF(t,e.minimum)?n=e.minimum:e.maximum&&Lk(t,e.maximum)&&(n=e.maximum),n}function PHe(t,e){var n=Mo(t),i=1;return e.minWidth>0&&e.minHeight>0?n>e.minWidth/e.minHeight?t.height<e.minHeight&&(i=e.minHeight/t.height):t.width<e.minWidth&&(i=e.minWidth/t.width):e.minWidth>0?t.width<e.minWidth&&(i=e.minWidth/t.width):e.minHeight>0&&t.height<e.minHeight&&(i=e.minHeight/t.height),e.maxWidth<1/0&&e.maxHeight<1/0?n>e.maxWidth/e.maxHeight?t.width>e.maxWidth&&(i=e.maxWidth/t.width):t.height>e.maxHeight&&(i=e.maxHeight/t.height):e.maxWidth<1/0?t.width>e.maxWidth&&(i=e.maxWidth/t.width):e.maxHeight<1/0&&t.height>e.maxHeight&&(i=e.maxHeight/t.height),i}function Nae(t,e){var n={left:0,top:0,right:0,bottom:0};return Gy.forEach(function(i){var r=e[i],o=hb(t)[i];r!==void 0&&o!==void 0?i==="left"||i==="top"?n[i]=Math.max(0,r-o):n[i]=Math.max(0,o-r):n[i]=0}),n}function tge(t,e){return nw(t,PHe(t,e))}function vUt(t,e){var n=e*Math.PI/180;return{width:Math.abs(t.width*Math.cos(n))+Math.abs(t.height*Math.sin(n)),height:Math.abs(t.width*Math.sin(n))+Math.abs(t.height*Math.cos(n))}}function nC(t,e,n){var i=e*Math.PI/180;return n?{left:(t.left-n.left)*Math.cos(i)-(t.top-n.top)*Math.sin(i)+n.left,top:(t.left-n.left)*Math.sin(i)+(t.top-n.top)*Math.cos(i)+n.top}:{left:t.left*Math.cos(i)-t.top*Math.sin(i),top:t.left*Math.sin(i)+t.top*Math.cos(i)}}function yUt(t){return{minWidth:0,minHeight:0,maxWidth:t.right!==void 0&&t.left!==void 0?t.right-t.left:1/0,maxHeight:t.bottom!==void 0&&t.top!==void 0?t.bottom-t.top:1/0}}function SM(t,e){var n={};return Gy.forEach(function(i){var r=t[i],o=e[i];r!==void 0&&o!==void 0?i==="left"||i==="top"?n[i]=Math.max(r,o):n[i]=Math.min(r,o):o!==void 0?n[i]=o:r!==void 0&&(n[i]=r)}),n}function nge(t,e){var n={left:0,top:0},i=Nae(t,e);return i.left&&i.left>0?n.left=i.left:i.right&&i.right>0&&(n.left=-i.right),i.top&&i.top>0?n.top=i.top:i.bottom&&i.bottom>0&&(n.top=-i.bottom),n}function iu(t,e){return zh(t,nge(t,e))}function jCr(t,e){return e?t?{minimum:Math.min(t.maximum,Math.max(t.minimum,e.minimum)),maximum:Math.max(t.minimum,Math.min(t.maximum,e.maximum))}:e:t}function vR(t){return t===void 0&&(t={}),ml(t)?{minimum:t,maximum:t}:{minimum:h0(t.minimum)?t.minimum:0,maximum:h0(t.maximum)?t.maximum:1/0}}function PPe(t,e){return(ku(e.maxWidth)||!Lk(t.width,e.maxWidth))&&(ku(e.maxHeight)||!Lk(t.height,e.maxHeight))&&(ku(e.minHeight)||!aF(t.height,e.minHeight))&&(ku(e.minWidth)||!aF(t.width,e.minWidth))}function Uvt(t,e){return(ku(e.left)||!aF(t.left,e.left))&&(ku(e.top)||!aF(t.top,e.top))&&(ku(e.right)||!Lk(t.left+t.width,e.right))&&(ku(e.bottom)||!Lk(t.top+t.height,e.bottom))}function FCr(t,e,n,i){var r=function(o){return t.reduce(function(s,a){var l=ha(n)?n(a):n,c=l.maxHeight,u=l.maxWidth,d=l.minWidth,h=l.minHeight,f=vR(ha(i)?i(a):i),m=o?{maxWidth:u,maxHeight:c}:{maxWidth:u,maxHeight:c,minWidth:d,minHeight:h};return PPe(a,m)&&!kU(Mo(a),f)&&a.width&&a.height&&(!s||aF(Wvt(a,e),Wvt(s,e)))?a:s},null)};return r()||r(!0)}function ey(t){return!!(t&&t.visibleArea&&t.coordinates)}function b_(t,e){return HCr(t,e)}function o_(t,e){return ha(e.areaPositionRestrictions)?e.areaPositionRestrictions(t,e):e.areaPositionRestrictions}function v_(t,e){return zCr(t,e)}function fb(t,e){return ha(e.positionRestrictions)?e.positionRestrictions(t,e):e.positionRestrictions}function yR(t){return t.visibleArea?t.visibleArea.width/t.boundary.width:0}function OHe(t){if(ey(t)){var e=t.coordinates,n=e.width,i=e.height,r=e.left,o=e.top,s=yR(t);return{width:n/s,height:i/s,left:(r-t.visibleArea.left)/s,top:(o-t.visibleArea.top)/s}}else return gUt()}function NM(t,e){return vR(ha(e.aspectRatio)?e.aspectRatio(t,e):e.aspectRatio)}function Kvt(t,e){return ha(e.defaultCoordinates)?e.defaultCoordinates(t,e):e.defaultCoordinates}function qvt(t,e){return ha(e.defaultVisibleArea)?e.defaultVisibleArea(t,e):e.defaultVisibleArea}function $Cr(t,e){var n=Et(Et({},t.transforms),{flip:Et({},t.transforms.flip)});if(e.defaultTransforms){var i=ha(e.defaultTransforms)?e.defaultTransforms(t,e):e.defaultTransforms;ml(i.rotate)&&(n.rotate=i.rotate),i.flip&&(zvt(i.flip.horizontal)&&(n.flip.horizontal=i.flip.horizontal),zvt(i.flip.vertical)&&(n.flip.vertical=i.flip.vertical))}return n}function NS(t){return t.imageSize&&t.imageSize.width&&t.imageSize.height?vUt(t.imageSize,t.transforms.rotate):{width:0,height:0}}function VCr(t){return t.coordinates?Math.min(t.coordinates.width,t.coordinates.height,20*yR(t)):1}function BCr(t,e){if(ey(t)){var n=v_(t,e),i=fb(t,e),r={width:Math.round(t.coordinates.width),height:Math.round(t.coordinates.height),left:Math.round(t.coordinates.left),top:Math.round(t.coordinates.top)};return r.width>n.maxWidth?r.width=Math.floor(t.coordinates.width):r.width<n.minWidth&&(r.width=Math.ceil(t.coordinates.width)),r.height>n.maxHeight?r.height=Math.floor(t.coordinates.height):r.height<n.minHeight&&(r.height=Math.ceil(t.coordinates.height)),iu(r,i)}else return null}function Gvt(t,e){return ey(t)?!kU(Mo(t.coordinates),NM(t,e))&&PPe(t.visibleArea,b_(t,e))&&PPe(t.coordinates,v_(t,e))&&Uvt(t.visibleArea,o_(t,e))&&Uvt(t.coordinates,fb(t,e)):!0}function jHe(t){var e=Et({},t);return e.minWidth>e.maxWidth&&(e.minWidth=e.maxWidth),e.minHeight>e.maxHeight&&(e.minHeight=e.maxHeight),e}function FHe(t,e){var n=t,i=Et({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0},e);return jHe({maxHeight:Math.min(n.maxHeight,i.maxHeight),minHeight:Math.max(n.minHeight,i.minHeight),maxWidth:Math.min(n.maxWidth,i.maxWidth),minWidth:Math.max(n.minWidth,i.minWidth)})}function zCr(t,e){var n=ha(e.sizeRestrictions)?e.sizeRestrictions(t,e):e.sizeRestrictions,i=fb(t,e),r={minWidth:h0(n.minWidth)?oD(n.minWidth):0,minHeight:h0(n.minHeight)?oD(n.minHeight):0,maxWidth:h0(n.maxWidth)?oD(n.maxWidth):1/0,maxHeight:h0(n.maxHeight)?oD(n.maxHeight):1/0};return i.left!==void 0&&i.right!==void 0&&(r.maxWidth=Math.min(r.maxWidth,i.right-i.left)),i.bottom!==void 0&&i.top!==void 0&&(r.maxHeight=Math.min(r.maxHeight,i.bottom-i.top)),jHe(r)}function HCr(t,e){var n=ha(e.areaSizeRestrictions)?e.areaSizeRestrictions(t,e):e.areaSizeRestrictions;return n.maxWidth<1/0&&n.maxHeight<1/0&&(Mo(t.boundary)>n.maxWidth/n.maxHeight?n.maxHeight=n.maxWidth/Mo(t.boundary):n.maxWidth=n.maxHeight*Mo(t.boundary)),jHe(n)}function Rm(t){return DU(t)}var dA;(function(t){t.fillArea="fillArea",t.fitArea="fitArea",t.stencil="stencil",t.none="none"})(dA||(dA={}));var OPe;(function(t){t.coordinates="coordinates",t.visibleArea="visibleArea"})(OPe||(OPe={}));function s_(t){var e=t.width,n=t.height,i=t.sizeRestrictions||{minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0},r=vR(t.aspectRatio),o={width:Math.max(i.minWidth,Math.min(i.maxWidth,e)),height:Math.max(i.minHeight,Math.min(i.maxHeight,n))},s=[o];return r&&[r.minimum,r.maximum].forEach(function(a){a&&s.push({width:o.width,height:o.width/a},{width:o.height*a,height:o.height})}),s=s.map(function(a){return tge(a,i)}),FCr(s,{width:e,height:n},i,r)}function _Ut(t,e){var n=Rm(t);if(t.visibleArea){var i=b_(t,e);n.visibleArea=Et(Et({},t.visibleArea),s_({width:t.visibleArea.width,height:t.visibleArea.height,aspectRatio:{minimum:Mo(n.boundary),maximum:Mo(n.boundary)},sizeRestrictions:i})),n.visibleArea=zh(n.visibleArea,r_(Nl(t.visibleArea),Nl(n.visibleArea))),n.visibleArea=iu(n.visibleArea,o_(n,e))}return n}function xUt(t,e,n){var i=zh(t,e);return n?iu(i,n):i}var Nx;(function(t){t.limit="limit",t.zoom="zoom",t.unsafe="unsafe"})(Nx||(Nx={}));function jPe(t,e,n,i){i===void 0&&(i=!0);var r=i===!1?Nx.unsafe:i===!0?Nx.zoom:i,o=NM(t,e),s=v_(t,e);t.visibleArea&&r===Nx.limit&&(s=Et(Et({},s),{minWidth:Math.min(t.visibleArea.width,s.minWidth),minHeight:Math.min(t.visibleArea.height,s.minHeight),maxWidth:Math.min(t.visibleArea.width,s.maxWidth),maxHeight:Math.min(t.visibleArea.height,s.maxHeight)}));var a=fb(t,e);t.visibleArea&&r===Nx.limit&&(a=SM(a,hb(t.visibleArea)));var l=function(y,_){return xUt(y,{left:_.left-(y.left||0),top:_.top-(y.top||0)},a)},c=function(y,_){var w=Et(Et(Et({},y),s_({width:_.width,height:_.height,sizeRestrictions:s,aspectRatio:o})),{left:0,top:0});return l(w,{left:y.left||0,top:y.top||0})},u=t.coordinates?Et({},t.coordinates):gUt(),d=Array.isArray(n)?n:[n];d.forEach(function(y){var _;typeof y=="function"?_=y(Et(Et({},t),{coordinates:u}),e):_=y,_&&((!ku(_.width)||!ku(_.height))&&(u=c(u,Et(Et({},u),_))),(!ku(_.left)||!ku(_.top))&&(u=l(u,Et(Et({},u),_))))});var h=Et(Et({},Rm(t)),{coordinates:u});if(h.visibleArea&&r===Nx.zoom){var f=Math.max(0,h.coordinates.width-h.visibleArea.width),m=Math.max(0,h.coordinates.height-h.visibleArea.height),p=b_(t,e),g=f>m?h.coordinates.width/h.visibleArea.width:h.coordinates.height/h.visibleArea.height;return g>1&&(h.visibleArea=nw(h.visibleArea,Math.min(g,RPe(h.visibleArea,p)))),h.visibleArea=zh(h.visibleArea,RHe(nge(h.coordinates,hb(h.visibleArea)))),_Ut(h,e)}else return h}function wUt(t,e){if(t.coordinates){var n=Rm(t),i=NM(t,e),r=v_(t,e);return n.coordinates=Et(Et({},t.coordinates),s_({width:t.coordinates.width,height:t.coordinates.height,aspectRatio:i,sizeRestrictions:t.visibleArea?{maxWidth:Math.min(t.visibleArea.width,r.maxWidth),maxHeight:Math.min(t.visibleArea.height,r.maxHeight),minHeight:Math.min(t.visibleArea.height,r.minHeight),minWidth:Math.min(t.visibleArea.width,r.minWidth)}:r})),n.coordinates=zh(n.coordinates,r_(Nl(t.coordinates),Nl(n.coordinates))),n.coordinates=iu(n.coordinates,t.visibleArea?SM(hb(t.visibleArea),fb(n,e)):fb(n,e)),n}return t}function FPe(t,e,n,i){i===void 0&&(i=!0);var r=Et(Et({},Rm(t)),{visibleArea:n});return r=_Ut(r,e),i&&(r=wUt(r,e)),r}function WCr(t,e){var n,i,r,o,s,a=t.boundary,l=t.image,c={boundary:{width:a.width,height:a.height},imageSize:{width:l.width,height:l.height},transforms:{rotate:((n=l.transforms)===null||n===void 0?void 0:n.rotate)||0,flip:{horizontal:((r=(i=l.transforms)===null||i===void 0?void 0:i.flip)===null||r===void 0?void 0:r.horizontal)||!1,vertical:((s=(o=l.transforms)===null||o===void 0?void 0:o.flip)===null||s===void 0?void 0:s.vertical)||!1}},visibleArea:null,coordinates:null};return e.defaultTransforms&&(c.transforms=$Cr(c,e)),e.priority===OPe.visibleArea?(c=FPe(c,e,qvt(c,e),!1),c=jPe(c,e,Kvt(c,e),Nx.limit)):(c=jPe(c,e,Kvt(c,e),Nx.unsafe),c=FPe(c,e,qvt(c,e),!0)),c}function UCr(t,e,n){if(ey(t)){var i=Rm(t);return i.coordinates=zh(i.coordinates,n),i.coordinates=iu(i.coordinates,SM(hb(i.visibleArea),fb(i,e))),i}return t}function Yvt(t){var e=t.coordinates,n=t.directions,i=t.positionRestrictions,r=t.sizeRestrictions,o=t.preserveRatio,s=t.allowedDirections,a=t.compensate,l=a===void 0?!0:a,c=Et({},n),u=vx(e,c).width,d=vx(e,c).height;u<0&&(c.left<0&&c.right<0?(c.left=-(e.width-r.minWidth)/(c.left/c.right),c.right=-(e.width-r.minWidth)/(c.right/c.left)):c.left<0?c.left=-(e.width-r.minWidth):c.right<0&&(c.right=-(e.width-r.minWidth))),d<0&&(c.top<0&&c.bottom<0?(c.top=-(e.height-r.minHeight)/(c.top/c.bottom),c.bottom=-(e.height-r.minHeight)/(c.bottom/c.top)):c.top<0?c.top=-(e.height-r.minHeight):c.bottom<0&&(c.bottom=-(e.height-r.minHeight)));var h=Nae(vx(e,c),i),f=Gy.every(function(y){return!Lk(h[PCr(y)],0)||s[y]});l&&f&&(h.left&&h.left>0&&h.right===0?(c.right+=h.left,c.left-=h.left):h.right&&h.right>0&&h.left===0&&(c.left+=h.right,c.right-=h.right),h.top&&h.top>0&&h.bottom===0?(c.bottom+=h.top,c.top-=h.top):h.bottom&&h.bottom>0&&h.top===0&&(c.top+=h.bottom,c.bottom-=h.bottom),h=Nae(vx(e,c),i));var m={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(Gy.forEach(function(y){var _=h[y];_&&c[y]&&(m[y]=Math.max(0,1-_/c[y]))}),o){var p=Math.min.apply(Math,Gy.map(function(y){return m[y]}));p!==1/0&&Gy.forEach(function(y){c[y]*=p})}else Gy.forEach(function(y){m[y]!==1/0&&(c[y]*=m[y])});if(u=vx(e,c).width,d=vx(e,c).height,c.right+c.left&&(u>r.maxWidth?m.width=(r.maxWidth-e.width)/(c.right+c.left):u<r.minWidth&&(m.width=(r.minWidth-e.width)/(c.right+c.left))),c.bottom+c.top&&(d>r.maxHeight?m.height=(r.maxHeight-e.height)/(c.bottom+c.top):d<r.minHeight&&(m.height=(r.minHeight-e.height)/(c.bottom+c.top))),o){var g=Math.min(m.width,m.height);g!==1/0&&Gy.forEach(function(y){c[y]*=g})}else m.width!==1/0&&ACr.forEach(function(y){c[y]*=m.width}),m.height!==1/0&&RCr.forEach(function(y){c[y]*=m.height});return c}function LJ(t,e,n){return WC(e+n,0)?t/2:WC(e,0)?0:WC(n,0)?t:t*Math.abs(e/(e+n))}function KCr(t,e,n,i){var r=i.aspectRatio,o=i.positionRestrictions,s=i.sizeRestrictions,a=Et({},t);e=Et({},e);var l=n.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};t.width<s.minWidth&&(e.left=0,e.right=0),t.height<s.minHeight&&(e.top=0,e.bottom=0),Gy.forEach(function(w){l[w]||(e[w]=0)}),e=Yvt({coordinates:a,directions:e,sizeRestrictions:s,positionRestrictions:o,allowedDirections:l});var c=vx(a,e).width,u=vx(a,e).height,d=n.preserveAspectRatio?Mo(a):kU(c/u,r);if(d){var h=n.respectDirection;if(h!=="width"&&h!=="height"&&(a.width>=a.height||d===1?h="width":h="height"),h==="width"){var f=c/d-a.height;if(l.top&&l.bottom){var m=e.top,p=e.bottom;e.bottom=LJ(f,p,m),e.top=LJ(f,m,p)}else l.bottom?e.bottom=f:l.top?e.top=f:l.right?e.right=0:l.left&&(e.left=0)}else if(h==="height"){var g=a.width-u*d;if(l.left&&l.right){var y=e.left,_=e.right;e.left=-LJ(g,y,_),e.right=-LJ(g,_,y)}else l.left?e.left=-g:l.right?e.right=-g:l.top?e.top=0:l.bottom&&(e.bottom=0)}e=Yvt({directions:e,coordinates:a,sizeRestrictions:s,positionRestrictions:o,preserveRatio:!0,compensate:n.compensate,allowedDirections:l})}return c=vx(a,e).width,u=vx(a,e).height,d=n.preserveAspectRatio?Mo(a):kU(c/u,r),d&&Lk(Math.abs(d-c/u),0)&&Gy.forEach(function(w){e[w]=0}),xUt({width:t.width+e.right+e.left,height:t.height+e.top+e.bottom,left:t.left,top:t.top},{left:-e.left,top:-e.top},o)}function Xvt(t,e){var n=e.toLowerCase();return{left:t.left+t.width*(n.indexOf("west")!==-1?1:n.indexOf("east")!==-1?0:.5),top:t.top+t.height*(n.indexOf("north")!==-1?1:n.indexOf("south")!==-1?0:.5)}}function CUt(t){var e=t.toLowerCase();return{left:e.indexOf("east")===-1,top:e.indexOf("south")===-1,right:e.indexOf("west")===-1,bottom:e.indexOf("north")===-1}}function qCr(t,e){var n=t.toLowerCase(),i={left:n.indexOf("west")===-1?e.left:-e.left,top:-e.top,right:e.left,bottom:e.top};["north","south","center"].every(function(o){return n.indexOf(o)===-1})&&(i.top=0,i.bottom=0),["west","east","center"].every(function(o){return n.indexOf(o)===-1})&&(i.left=0,i.right=0);var r=CUt(t);return Gy.forEach(function(o){r[o]||(i[o]=0)}),i}function GCr(t,e,n,i,r){var o=i.reference,s=qCr(e,n),a=CUt(e),l=KCr(t,s,Et(Et({},i),{allowedDirections:a}),r);return o&&(l=zh(l,r_(Xvt(o,e),Xvt(l,e)))),iu(l,r.positionRestrictions)}function YCr(t,e,n,i,r){var o=VCr(t),s=v_(t,e);return ey(t)?Et(Et({},Rm(t)),{coordinates:GCr(t.coordinates,n,i,r,{positionRestrictions:SM(fb(t,e),hb(t.visibleArea)),sizeRestrictions:{maxWidth:Math.min(s.maxWidth,t.visibleArea.width),maxHeight:Math.min(s.maxHeight,t.visibleArea.height),minWidth:Math.max(Math.min(s.minWidth,t.visibleArea.width),o),minHeight:Math.max(Math.min(s.minHeight,t.visibleArea.height),o)},aspectRatio:NM(t,e)})}):t}function XCr(t,e,n){var i=Et(Et({},Rm(t)),{boundary:n});if(i.visibleArea&&i.coordinates&&t.visibleArea){i.visibleArea.height=i.visibleArea.width/Mo(n),i.visibleArea.top+=(t.visibleArea.height-i.visibleArea.height)/2;var r=v_(i,e);(Math.max(r.minHeight,i.coordinates.height)-i.visibleArea.height>0||Math.max(r.minWidth,i.coordinates.width)-i.visibleArea.width>0)&&(i.visibleArea=nw(i.visibleArea,Math.max(Math.max(r.minHeight,i.coordinates.height)/i.visibleArea.height,Math.max(r.minWidth,i.coordinates.width)/i.visibleArea.width))),i.visibleArea=tge(i.visibleArea,b_(i,e));var o=RHe(nge(i.coordinates,hb(i.visibleArea)));i.visibleArea.width<i.coordinates.width&&(o.left=0),i.visibleArea.height<i.coordinates.height&&(o.top=0),i.visibleArea=zh(i.visibleArea,o),i.visibleArea=iu(i.visibleArea,o_(i,e)),i=wUt(i,e)}return i}function ZCr(t,e,n){if(ey(t)){var i=Rm(t),r=ml(n)?n:n.angle,o=nC(Nl(Et({left:0,top:0},NS(t))),r);i.transforms.rotate+=r,i.coordinates=Et(Et({},s_({sizeRestrictions:v_(i,e),aspectRatio:NM(i,e),width:i.coordinates.width,height:i.coordinates.height})),nC(Nl(i.coordinates),r));var s=!ml(n)&&n.center?n.center:Nl(t.coordinates),a=r_(Nl(t.coordinates),nC(Nl(t.coordinates),r,s)),l=NS(i);return i.coordinates.left-=o.left-l.width/2+i.coordinates.width/2-a.left,i.coordinates.top-=o.top-l.height/2+i.coordinates.height/2-a.top,i.visibleArea=tge(i.visibleArea,FHe(b_(i,e),{minWidth:i.coordinates.width,minHeight:i.coordinates.height})),i.coordinates=iu(i.coordinates,fb(i,e)),i.visibleArea=zh(i.visibleArea,r_(Nl(i.coordinates),Nl(t.coordinates))),i.visibleArea=iu(i.visibleArea,o_(i,e)),i}return t}function QCr(t,e,n,i){if(ey(t)){var r=Rm(t),o=t.transforms.rotate,s=NS(t),a={horizontal:n,vertical:i};if(a.horizontal||a.vertical){var l=nC({left:s.width/2,top:s.height/2},-o),c=nC(Nl(r.coordinates),-o),u=nC({left:a.horizontal?l.left-(c.left-l.left):c.left,top:a.vertical?l.top-(c.top-l.top):c.top},o);r.coordinates=zh(r.coordinates,r_(u,Nl(r.coordinates))),c=nC(Nl(r.visibleArea),-o),u=nC({left:a.horizontal?l.left-(c.left-l.left):c.left,top:a.vertical?l.top-(c.top-l.top):c.top},o),r.visibleArea=zh(r.visibleArea,r_(u,Nl(r.visibleArea))),r.visibleArea=iu(r.visibleArea,o_(r,e))}return a.horizontal&&(r.transforms.flip.horizontal=!t.transforms.flip.horizontal),a.vertical&&(r.transforms.flip.vertical=!t.transforms.flip.vertical),r}return t}function JCr(t,e,n){var i,r=n.scale,o=r===void 0?1:r,s=n.move,a=s===void 0?{}:s;if(ey(t)){var l=Rm(t),c=1/(ml(o)?o:o.factor),u=ml(o)?void 0:o.center,d=!WC(c,1),h=1,f=1;l.visibleArea=zh(l.visibleArea,{left:a.left||0,top:a.top||0});var m=v_(l,e),p=fb(l,e),g=b_(l,e),y={stencil:{minimum:Math.max(m.minWidth?m.minWidth/l.coordinates.width:0,m.minHeight?m.minHeight/l.coordinates.height:0),maximum:Math.min(m.maxWidth?m.maxWidth/l.coordinates.width:1/0,m.maxHeight?m.maxHeight/l.coordinates.height:1/0,RPe(l.coordinates,yUt(p)))},area:{maximum:RPe(l.visibleArea,g),minimum:OCr(l.visibleArea,g)}};c&&d&&(c<1?(f=Math.max(c,Math.max(y.area.minimum,y.stencil.minimum)),f>1&&(f=1)):c>1&&(f=Math.min(c,Math.min(y.area.maximum,y.stencil.maximum)),f<1&&(f=1))),f&&(l.visibleArea=nw(l.visibleArea,f,u));var _={left:t.coordinates.left-t.visibleArea.left,right:t.visibleArea.width+t.visibleArea.left-(t.coordinates.width+t.coordinates.left),top:t.coordinates.top-t.visibleArea.top,bottom:t.visibleArea.height+t.visibleArea.top-(t.coordinates.height+t.coordinates.top)};return l.visibleArea=iu(l.visibleArea,{left:p.left!==void 0?p.left-_.left*f:void 0,top:p.top!==void 0?p.top-_.top*f:void 0,bottom:p.bottom!==void 0?p.bottom+_.bottom*f:void 0,right:p.right!==void 0?p.right+_.right*f:void 0}),l.visibleArea=iu(l.visibleArea,o_(l,e)),l.coordinates.width=l.coordinates.width*f,l.coordinates.height=l.coordinates.height*f,l.coordinates.left=l.visibleArea.left+_.left*f,l.coordinates.top=l.visibleArea.top+_.top*f,l.coordinates=iu(l.coordinates,SM(hb(l.visibleArea),p)),d&&c&&(!((i=e.transformImage)===null||i===void 0)&&i.adjustStencil)&&(c>1?h=Math.min(y.area.maximum,c)/f:c<1&&(h=Math.max(l.coordinates.height/l.visibleArea.height,l.coordinates.width/l.visibleArea.width,c/f)),h!==1&&(l.visibleArea=nw(l.visibleArea,h,c>1?u:Nl(l.coordinates)),l.visibleArea=iu(l.visibleArea,o_(l,e)),l.visibleArea=zh(l.visibleArea,RHe(nge(l.coordinates,hb(l.visibleArea)))))),l}return t}function eSr(t,e,n){return n.rotate&&(t=ZCr(t,e,n.rotate)),n.flip&&(t=QCr(t,e,n.flip.horizontal,n.flip.vertical)),(n.move||n.scale)&&(t=JCr(t,e,n)),t}function tSr(t,e){if(ey(t)){var n=Rm(t),i=NM(t,e),r=v_(t,e),o=b_(t,e),s=kU(Mo(t.coordinates),i),a=s?{height:t.coordinates.height,width:t.coordinates.height*s}:t.coordinates;n.coordinates=Et(Et({},n.coordinates),s_({width:a.width,height:a.height,aspectRatio:i,sizeRestrictions:FHe(o,r)})),n.coordinates=zh(n.coordinates,r_(Nl(t.coordinates),Nl(n.coordinates)));var l=Math.max(n.coordinates.width/n.visibleArea.width,n.coordinates.height/n.visibleArea.height,1);return n.visibleArea=Et(Et({},t.visibleArea),s_({width:t.visibleArea.width*l,height:t.visibleArea.height*l,aspectRatio:{minimum:Mo(n.boundary),maximum:Mo(n.boundary)},sizeRestrictions:o})),n.visibleArea=zh(n.visibleArea,r_(Nl(t.visibleArea),Nl(n.visibleArea))),n.visibleArea=iu(n.visibleArea,o_(n,e)),n.coordinates=iu(n.coordinates,SM(hb(n.visibleArea),fb(n,e))),n}return t}function nSr(t,e){var n=yR(t);return{left:ml(e.left)?e.left*n:0,top:ml(e.top)?e.top*n:0,right:ml(e.right)?e.right*n:0,bottom:ml(e.bottom)?e.bottom*n:0}}function Zvt(t,e){var n=yR(t);return t.visibleArea?{left:e.left*n+t.visibleArea.left,top:e.top*n+t.visibleArea.top}:e}function iSr(t,e){if(t){var n=Math.abs(t.transforms.rotate%180);return n<=45||n>=135?e:{horizontal:e.vertical,vertical:e.horizontal}}return e}function rSr(t){return{left:ml(t.left)?t.left:0,top:ml(t.top)?t.top:0}}function oSr(t){return{left:ml(t.left)?t.left:0,top:ml(t.top)?t.top:0,right:ml(t.right)?t.right:0,bottom:ml(t.bottom)?t.bottom:0}}function SUt(t,e){var n=yR(t);return{left:ml(e.left)?e.left*n:0,top:ml(e.top)?e.top*n:0}}function sSr(t,e){return e.scale&&(e.scale={factor:ml(e.scale)?e.scale:e.scale.factor,center:!ml(e.scale)&&e.scale.center?Zvt(t,e.scale.center):void 0}),e.rotate&&(e.rotate={angle:ml(e.rotate)?e.rotate:e.rotate.angle,center:!ml(e.rotate)&&e.rotate.center?Zvt(t,e.rotate.center):void 0}),e.move&&(e.move=SUt(t,e.move)),e}function Qvt(t,e){var n=e.getBoundingClientRect(),i=n.left,r=n.top,o={left:0,top:0},s=0;return t.forEach(function(a){o.left+=(a.clientX-i)/t.length,o.top+=(a.clientY-r)/t.length}),t.forEach(function(a){s+=pUt({left:o.left,top:o.top},{left:a.clientX-i,top:a.clientY-r})}),{centerMass:o,spread:s,count:t.length}}function aSr(t,e,n,i){i===void 0&&(i={});var r,o,s;if(e.length===1&&t.length===1)i.move&&(r={left:e[0].clientX-t[0].clientX,top:e[0].clientY-t[0].clientY});else if(t.length>1){var a=Qvt(e,n),l=Qvt(t,n);if(i.rotate&&e.length===2&&t.length===2){var c={left:[t[0].clientX-t[1].clientX,e[0].clientX-e[1].clientX],top:[t[0].clientY-t[1].clientY,e[0].clientY-e[1].clientY]},u=c.left[0]*c.top[1]-c.left[1]*c.top[0],d=c.left[0]*c.left[1]+c.top[0]*c.top[1];if(!WC(d,0)&&!WC(u,0)){var h=Math.atan2(u,d),f=-(h*180)/Math.PI;s={center:l.centerMass,angle:f}}}i.move&&(r={left:a.centerMass.left-l.centerMass.left,top:a.centerMass.top-l.centerMass.top}),i.scale&&(o={factor:l.spread/a.spread,center:l.centerMass})}return{move:r,scale:o,rotate:s}}function lSr(t,e,n){n===void 0&&(n=.1);var i=e.getBoundingClientRect(),r=i.left,o=i.top,s=1-n*TCr(t.deltaY||t.detail||t.wheelDelta),a={left:t.clientX-r,top:t.clientY-o};return{scale:{factor:s,center:a}}}function TJ(t){return t.moveCoordinates||t.resizeCoordinates||t.transformImage.move||t.transformImage.rotate||t.transformImage.flip||t.transformImage.scale}function cSr(){return{moveCoordinates:!1,resizeCoordinates:!1,transformImage:{rotate:!1,move:!1,scale:!1,flip:!1}}}function uSr(t,e){var n=NS(t),i={};return e.imageRestriction&&e.imageRestriction!=="none"&&(i={left:0,top:0,right:n.width,bottom:n.height}),i}function dSr(t,e){var n=t.coordinates,i=t.boundary,r=NS(t),o=Mo(i);if(n){var s={height:Math.max(n.height,r.height),width:Math.max(n.width,r.width)},a={left:0,top:0,width:Mo(s)>o?s.width:s.height*o,height:Mo(s)>o?s.width/o:s.height};a=tge(a,b_(t,e)),a.left=n.left+n.width/2-a.width/2,a.top=n.top+n.height/2-a.height/2;var l=Nae(n,hb(Et({left:0,top:0},r))),c={};return!l.left&&!l.right&&a.width<=r.width&&(c.left=0,c.right=r.width),!l.top&&!l.bottom&&a.height<=r.height&&(c.top=0,c.bottom=r.height),iu(a,c)}else{var u=Mo(r),d={height:u<o?r.height:r.width/o,width:u<o?r.height*o:r.width};return{left:r.width/2-d.width/2,top:r.height/2-d.height/2,width:d.width,height:d.height}}}function hSr(t,e){var n=t.imageSize,i=t.visibleArea,r=v_(t,e),o=NM(t,e),s;if(i)s=i;else{var a=yUt(fb(t,e));s={width:Math.max(a.minWidth,Math.min(a.maxWidth,n.width)),height:Math.max(a.minHeight,Math.min(a.maxHeight,n.height))}}var l=Math.min(o.maximum||1/0,Math.max(o.minimum||0,Mo(s))),c=s.width<s.height?{width:s.width*.8,height:s.width*.8/l}:{height:s.height*.8,width:s.height*.8*l};return s_(Et(Et({},c),{aspectRatio:o,sizeRestrictions:r}))}function fSr(t){return{minWidth:h0(t.minWidth)?oD(t.minWidth):0,minHeight:h0(t.minHeight)?oD(t.minHeight):0,maxWidth:h0(t.maxWidth)?oD(t.maxWidth):1/0,maxHeight:h0(t.maxHeight)?oD(t.maxHeight):1/0}}function NUt(t,e){return fSr(e)}function mSr(t){var e=t.visibleArea,n=t.coordinates,i=e||NS(t);return{left:(e?e.left:0)+i.width/2-(n?n.width/2:0),top:(e?e.top:0)+i.height/2-(n?n.height/2:0)}}function pSr(t,e){var n=t.visibleArea,i=t.boundary,r=e.imageRestriction,o=NS(t),s={};return r===dA.fillArea?s={left:0,top:0,right:o.width,bottom:o.height}:r===dA.fitArea&&(Mo(i)>Mo(o)?(s={top:0,bottom:o.height},n&&(n.width>o.width?(s.left=-(n.width-o.width)/2,s.right=o.width-s.left):(s.left=0,s.right=o.width))):(s={left:0,right:o.width},n&&(n.height>o.height?(s.top=-(n.height-o.height)/2,s.bottom=o.height-s.top):(s.top=0,s.bottom=o.height)))),s}function gSr(t,e){var n=t.boundary,i=e.imageRestriction,r=NS(t),o={minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0};return i===dA.fillArea?(o.maxWidth=r.width,o.maxHeight=r.height):i===dA.fitArea&&(Mo(n)>Mo(r)?(o.maxHeight=r.height,o.maxWidth=r.height*Mo(n)):(o.maxWidth=r.width,o.maxHeight=r.width/Mo(n))),o}function bSr(t){var e=t.getBoundingClientRect(),n=e.width,i=e.height;return{width:n,height:i}}function EUt(t,e){return t.aspectRatio?{}:{aspectRatio:vR(ha(e.aspectRatio)?e.aspectRatio():e.aspectRatio)}}function vSr(t){return function(e,n){var i=ha(t)?t(e,n):t;return FHe(NUt(e,n),i)}}function ySr(t){return Et(Et({},t),{sizeRestrictions:function(e,n){var i;return t.sizeRestrictions?i=ha(t.sizeRestrictions)?t.sizeRestrictions(e,n):t.sizeRestrictions:i=NUt(e,n),i},areaPositionRestrictions:function(e,n){return t.areaPositionRestrictions?ha(t.areaPositionRestrictions)?t.areaPositionRestrictions(e,n):t.areaPositionRestrictions:pSr(e,n)},areaSizeRestrictions:function(e,n){return t.areaSizeRestrictions?ha(t.areaSizeRestrictions)?t.areaSizeRestrictions(e,n):t.areaSizeRestrictions:gSr(e,n)},positionRestrictions:function(e,n){return t.positionRestrictions?ha(t.positionRestrictions)?t.positionRestrictions(e,n):t.positionRestrictions:uSr(e,n)},defaultCoordinates:function(e,n){if(t.defaultCoordinates)return ha(t.defaultCoordinates)?t.defaultCoordinates(e,n):t.defaultCoordinates;var i=t.defaultSize;i||(i=hSr);var r=ha(i)?i(e,n):i,o=t.defaultPosition||mSr;return[r,function(s){return Et({},ha(o)?o(s,n):o)}]},defaultVisibleArea:function(e,n){return t.defaultVisibleArea?ha(t.defaultVisibleArea)?t.defaultVisibleArea(e,n):t.defaultVisibleArea:dSr(e,n)},aspectRatio:function(e,n){return vR(ha(t.aspectRatio)?t.aspectRatio(e,n):t.aspectRatio)}})}function jte(t,e){if(t&&e){var n=e();n&&t(n)}}function LSe(t,e){t.forEach(function(n){jte(n,e)})}var _Sr=function(){function t(){var e=this;this.getTransitions=function(){var n=e.getData(),i=e.getProps().transitions;return Et(Et({},EG(i,{timingFunction:"ease-in-out",duration:350})),{active:n.transitions})},this.getInteractions=function(){var n=e.getData().interactions;return DU(n)},this.hasInteractions=function(){var n=e.getData().interactions;return TJ(n)},this.startTransitions=function(){var n=e.getProps(),i=n.onTransitionsStart,r=n.onUpdate,o=n.getInstance,s=e.getData(),a=s.transitions,l=km(s,["transitions"]);e.setData(Et(Et({},l),{transitions:!0})),a||LSe([i,r],o),e.endTransitions()},this.endTransitions=bUt(function(){var n=e.getProps(),i=n.onTransitionsEnd,r=n.onUpdate,o=n.getInstance;e.setData(Et(Et({},e.getData()),{transitions:!1})),LSe([i,r],o)},function(){return e.getTransitions().duration}),this.applyPostProcess=function(n,i){var r=e.getProps(),o=r.settings,s=r.postProcess,a=n.name,l=n.interaction,c=l===void 0?!1:l,u=n.transitions,d=u===void 0?!1:u,h=n.immediately,f=h===void 0?!1:h,m={name:a,interaction:c,transitions:d,immediately:f};return MCr(s)?s.reduce(function(p,g){return g(p,o,m)},i):ha(s)?s(i,o,m):i},this.updateState=function(n,i,r){i===void 0&&(i={}),r===void 0&&(r=[]);var o=i.transitions,s=o===void 0?!1:o,a=e.getProps(),l=a.onTransitionsStart,c=a.getInstance,u=a.onChange,d=a.onUpdate,h=a.settings,f=e.getData(),m=ha(n)?n(f.state,h):n,p=m?.001*yR(m):.001,g=!G3(f.state,m,p),y=["coordinates","boundary","visibleArea","imageSize","transforms"].some(function(w){var C;return!G3((C=f.state)===null||C===void 0?void 0:C[w],m==null?void 0:m[w],p)}),_=f;g&&(s&&y&&e.endTransitions(),_=Et(Et({},_),{state:Rm(m),transitions:s&&y}),e.setData(_),jte(u,c)),_.transitions&&!f.transitions&&jte(l,c),LSe(VCn(r,[d]),c)},this.setInteractions=function(n){var i=e.getProps(),r=i.onInteractionStart,o=i.onInteractionEnd,s=i.getInstance,a=e.getInteractions(),l=Et(Et({},a),n);if(G3(a,l)||e.setData(Et(Et({},e.getData()),{interactions:l})),TJ(a)!==TJ(l))if(!TJ(a))jte(r,s);else{var c=e.getData().state;e.updateState(function(){return c&&e.applyPostProcess({name:"interactionEnd",immediately:!0,transitions:!0},c)},{transitions:!0},[o])}},this.resetState=function(n,i){e.updateState(e.createDefaultState(n,i))},this.clear=function(){e.updateState(null)},this.reconcileState=function(n){n===void 0&&(n={});var i=e.getProps(),r=i.reconcileStateAlgorithm,o=i.settings,s=e.getData().state,a=n.transitions,l=a===void 0?!1:a;if(s&&!Gvt(s,o)){var c=(r||tSr)(s,o);c=e.applyPostProcess({name:"reconcileState",immediately:!0,transitions:l},c),e.updateState(c,{transitions:l})}},this.transformImage=function(n,i){i===void 0&&(i={});var r=i.transitions,o=r===void 0?!0:r,s=i.interaction,a=s===void 0?!0:s,l=i.immediately,c=l===void 0?!1:l,u=i.normalize,d=u===void 0?!0:u,h=e.getProps(),f=h.transformImageAlgorithm,m=h.onTransformImage,p=h.onTransformImageEnd,g=h.settings,y=e.getData().state,_=[];if(y){d&&(n=sSr(y,n));var w=e.applyPostProcess({name:"transformImage",transitions:o,immediately:c},(f||eSr)(y,g,n));_.push(m),a?e.setInteractions({transformImage:{rotate:!ku(n.rotate),flip:!ku(n.flip),scale:!ku(n.scale),move:!ku(n.move)}}):(w=e.applyPostProcess({name:"transformImageEnd",transitions:o,immediately:!0},w),_.push(p)),e.updateState(w,{transitions:c&&o},_)}},this.transformImageEnd=function(n){n===void 0&&(n={});var i=n.immediately,r=i===void 0?!0:i,o=n.transitions,s=o===void 0?!0:o,a=e.getData().state,l=e.getProps().onTransformImageEnd;e.updateState(function(){return a&&e.applyPostProcess({name:"transformImageEnd",immediately:r,transitions:s},a)},{transitions:s},[l]),e.setInteractions({transformImage:{rotate:!1,flip:!1,scale:!1,move:!1}})},this.zoomImage=function(n,i){i===void 0&&(i={});var r=i.interaction,o=r===void 0?!1:r,s=i.immediately,a=s===void 0?!0:s,l=i.transitions,c=l===void 0?!0:l,u=i.normalize,d=u===void 0?!1:u;e.transformImage({scale:n},{interaction:o,immediately:a,transitions:c,normalize:d})},this.moveImage=function(n,i,r){r===void 0&&(r={});var o=r.interaction,s=o===void 0?!1:o,a=r.immediately,l=a===void 0?!0:a,c=r.transitions,u=c===void 0?!0:c,d=r.normalize,h=d===void 0?!1:d;e.transformImage({move:{left:n,top:i}},{interaction:s,immediately:l,transitions:u,normalize:h})},this.flipImage=function(n,i,r){r===void 0&&(r={});var o=r.interaction,s=o===void 0?!1:o,a=r.immediately,l=a===void 0?!0:a,c=r.transitions,u=c===void 0?!0:c,d=r.normalize,h=d===void 0?!0:d,f=e.getState(),m={horizontal:n,vertical:i};e.transformImage({flip:f&&h?iSr(f,m):m},{interaction:s,immediately:l,transitions:u})},this.rotateImage=function(n,i){i===void 0&&(i={});var r=i.interaction,o=r===void 0?!1:r,s=i.immediately,a=s===void 0?!0:s,l=i.transitions,c=l===void 0?!0:l,u=i.normalize,d=u===void 0?!1:u;e.transformImage({rotate:n},{interaction:o,immediately:a,transitions:c,normalize:d})},this.reset=function(n,i){e.resetState(n,i)},this.setState=function(n,i){i===void 0&&(i={});var r=e.getSettings(),o=e.getData().state,s=i.transitions,a=s===void 0?!0:s,l=i.immediately,c=l===void 0?!1:l,u=i.interaction,d=u===void 0?!1:u,h=i.postprocess,f=h===void 0?!1:h,m=n&&(ha(n)?n(o,r):Et(Et({},o),n));e.updateState(function(){return f?m&&e.applyPostProcess({name:"setState",immediately:c,transitions:a,interaction:d},m):m},{transitions:a})},this.setCoordinates=function(n,i){i===void 0&&(i={});var r=e.getData().state,o=e.getProps(),s=o.setCoordinatesAlgorithm,a=o.settings,l=i.transitions,c=l===void 0?!0:l,u=i.immediately,d=u===void 0?!0:u;e.updateState(function(){return r&&e.applyPostProcess({name:"setCoordinates",immediately:d,transitions:c},(s||jPe)(r,a,n,Nx.zoom))},{transitions:c})},this.setVisibleArea=function(n,i){i===void 0&&(i={});var r=i.transitions,o=r===void 0?!0:r,s=i.immediately,a=s===void 0?!0:s,l=e.getData().state,c=e.getProps(),u=c.setVisibleAreaAlgorithm,d=c.settings;e.updateState(function(){return l&&e.applyPostProcess({name:"setVisibleArea",immediately:a,transitions:o},(u||FPe)(l,d,n))},{transitions:o})},this.setBoundary=function(n,i){i===void 0&&(i={});var r=e.getData().state,o=e.getProps(),s=o.setBoundaryAlgorithm,a=o.settings,l=i.transitions,c=l===void 0?!1:l,u=i.immediately,d=u===void 0?!0:u;n?e.updateState(function(){return r&&e.applyPostProcess({name:"setBoundary",immediately:d,transitions:c},(s||XCr)(r,a,n))}):e.updateState(null)},this.moveCoordinates=function(n,i){i===void 0&&(i={});var r=e.getData(),o=e.getProps(),s=o.moveCoordinatesAlgorithm,a=o.onMove,l=o.onMoveEnd,c=o.settings,u=i.interaction,d=u===void 0?!0:u,h=i.transitions,f=h===void 0?!1:h,m=i.immediately,p=m===void 0?!1:m,g=i.normalize,y=g===void 0?!0:g,_=[];if(!r.transitions&&r.state){var w=y?SUt(r.state,n):rSr(n),C=e.applyPostProcess({name:"moveCoordinates",interaction:d,immediately:p,transitions:f},(s||UCr)(r.state,c,w));_.push(a),d?e.setInteractions({moveCoordinates:!0}):(C=e.applyPostProcess({name:"moveCoordinatesEnd",interaction:d,immediately:p,transitions:f},C),_.push(l)),e.updateState(C,{transitions:p&&f},_)}},this.moveCoordinatesEnd=function(n){n===void 0&&(n={});var i=e.getData().state,r=e.getProps().onMoveEnd,o=n.transitions,s=o===void 0?!0:o,a=n.immediately,l=a===void 0?!1:a;e.updateState(function(){return i&&e.applyPostProcess({name:"moveCoordinatesEnd",transitions:s,immediately:l},i)},{transitions:s},[r]),e.setInteractions({moveCoordinates:!1})},this.resizeCoordinates=function(n,i,r,o){o===void 0&&(o={});var s=e.getData().state,a=e.getProps(),l=a.resizeCoordinatesAlgorithm,c=a.onResize,u=a.onResizeEnd,d=a.settings,h=o.interaction,f=h===void 0?!0:h,m=o.transitions,p=m===void 0?!1:m,g=o.immediately,y=g===void 0?!1:g,_=o.normalize,w=_===void 0?!0:_,C=e.getTransitions();if(!C.active&&s){var N=[],E=w?nSr(s,i):oSr(i),D=e.applyPostProcess({name:"resizeCoordinates",interaction:f,immediately:y,transitions:p},(l||YCr)(s,d,n,E,wI(r)?r:{}));N.push(c),f?e.setInteractions({resizeCoordinates:!0}):(D=e.applyPostProcess({name:"resizeCoordinatesEnd",interaction:f,immediately:y,transitions:p},D),N.push(u)),e.updateState(D,{transitions:y&&p},N)}},this.resizeCoordinatesEnd=function(n){n===void 0&&(n={});var i=e.getProps().onResizeEnd,r=e.getData().state,o=n.transitions,s=o===void 0?!0:o,a=n.immediately,l=a===void 0?!1:a;e.updateState(function(){return r&&e.applyPostProcess({name:"resizeCoordinatesEnd",transitions:s,immediately:l},r)},{transitions:s},[i]),e.setInteractions({resizeCoordinates:!1})},this.getStencilCoordinates=function(){var n=e.getData().state;return OHe(n)},this.getCoordinates=function(n){n===void 0&&(n={});var i=e.getData().state,r=e.getProps().settings;if(i&&i.coordinates){var o=n.round,s=o===void 0?!0:o;return s?BCr(i,r):Et({},i.coordinates)}else return null},this.getVisibleArea=function(){var n=e.getData().state;return n!=null&&n.visibleArea?Et({},n.visibleArea):null},this.getSettings=function(){var n=e.getProps().settings;return Et({},n)},this.getState=function(){var n=e.getData().state;return Rm(n)},this.getTransforms=function(){var n=e.getData().state;return n?DU(n.transforms):{rotate:0,flip:{horizontal:!1,vertical:!1}}},this.createDefaultState=function(n,i){var r=e.getProps(),o=r.createStateAlgorithm,s=r.settings;return e.applyPostProcess({name:"createState",immediately:!0,transitions:!1},(o||WCr)({image:i,boundary:n},s))},this.isConsistent=function(){var n=e.getData().state,i=e.getProps().settings;return n?Gvt(n,i):!0}}return t}(),Jvt={linear:function(t){return t},"ease-in":function(t){return Math.pow(t,1.675)},"ease-out":function(t){return 1-Math.pow(1-t,1.675)},"ease-in-out":function(t){return .5*(Math.sin((t-.5)*Math.PI)+1)}},xSr=function(){function t(){this.active=!1}return t.prototype.start=function(e){var n;this.onStart=e.onStart,this.onProgress=e.onProgress,this.onStop=e.onStop,this.active||(n=this.onStart)===null||n===void 0||n.call(this),this.id&&window.cancelAnimationFrame(this.id),this.startTime=performance.now(),this.timingFunction=e.timingFunction,this.endTime=this.startTime+e.duration,this.active=!0,this.animate()},t.prototype.animate=function(){var e=this;if(this.startTime&&this.endTime){var n=Jvt[this.timingFunction];n||(console.warn("[Animation] The timing function '"+n+"' is not supported. Available timing function: 'linear', 'ease-in', 'ease-in-out', 'ease-out'. Reset to 'ease-out'."),n=Jvt["ease-out"]);var i=1-(this.endTime-performance.now())/(this.endTime-this.startTime),r=Math.min(1,n(i));this.onProgress&&this.onProgress(r),i<1?this.id=window.requestAnimationFrame(function(){return e.animate()}):this.stop()}else this.stop()},t.prototype.stop=function(){this.active=!1,this.id&&window.cancelAnimationFrame(this.id),this.onStop&&this.onStop()},t}();function wSr(t,e,n){var i=n.rotate,r=n.flip,o={width:"naturalWidth"in e?e.naturalWidth:e.width,height:"naturalHeight"in e?e.naturalHeight:e.height},s=vUt(o,i),a=t.getContext("2d");if(t.height=s.height,t.width=s.width,a){a.save();var l=nC(Nl(Et({left:0,top:0},o)),i);a.translate(-(l.left-s.width/2),-(l.top-s.height/2)),a.rotate(i*Math.PI/180),a.translate(r.horizontal?o.width:0,r.vertical?o.height:0),a.scale(r.horizontal?-1:1,r.vertical?-1:1),a.drawImage(e,0,0,o.width,o.height),a.restore()}return t}function CSr(t,e,n,i,r){t.width=i?i.width:n.width,t.height=i?i.height:n.height;var o=t.getContext("2d");if(o){o.clearRect(0,0,t.width,t.height),r&&(r.imageSmoothingEnabled&&(o.imageSmoothingEnabled=r.imageSmoothingEnabled),r.imageSmoothingQuality&&(o.imageSmoothingQuality=r.imageSmoothingQuality),r.fillColor&&(o.fillStyle=r.fillColor,o.fillRect(0,0,t.width,t.height),o.save()));var s=n.left<0?-n.left:0,a=n.top<0?-n.top:0;o.drawImage(e,n.left+s,n.top+a,n.width,n.height,s*(t.width/n.width),a*(t.height/n.height),t.width,t.height)}return t}function SSr(t,e,n,i,r){if(ey(t)){var o=t.transforms,s=t.coordinates,a=o.rotate!==0||o.flip.horizontal||o.flip.vertical,l=a?wSr(i,e,o):e,c=Et({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:1/0,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},r),u=function(f){return f.find(function(m){return h0(m)})},d=s_({sizeRestrictions:{minWidth:u([c.width,c.minWidth])||0,minHeight:u([c.height,c.minHeight])||0,maxWidth:u([c.width,c.maxWidth])||1/0,maxHeight:u([c.height,c.maxHeight])||1/0},width:s.width,height:s.height,aspectRatio:{minimum:s.width/s.height,maximum:s.width/s.height}});if(c.maxArea&&d.width*d.height>c.maxArea){var h=Math.sqrt(c.maxArea/(d.width*d.height));d={width:Math.round(h*d.width),height:Math.round(h*d.height)}}return CSr(n,l,s,d,c)}else return null}function NSr(t,e,n){e.style.width="0px",e.style.height="0px",e.style.width=Math.max(t.clientWidth,n.width)+"px";var i=n.width/n.height;e.style.height=Math.max(t.clientHeight,e.clientWidth/i)+"px",e.style.width=e.clientHeight*i+"px"}function ESr(t,e,n){e.style.width="0px",e.style.height="0px",e.style.width=Math.max(t.getBoundingClientRect().width,n.width)+"px";var i=n.width/n.height;e.style.height=Math.max(t.getBoundingClientRect().height,e.getBoundingClientRect().width/i)+"px",e.style.width=e.getBoundingClientRect().height*i+"px",e.clientWidth/e.clientHeight>t.clientWidth/t.clientHeight?e.clientWidth>t.clientWidth&&(e.style.width=t.clientWidth+"px",e.style.height=t.clientWidth/i+"px"):e.clientHeight>t.clientHeight&&(e.style.height=t.clientHeight+"px",e.style.width=t.clientHeight*i+"px")}var DSr=4;function kSr(t){t=t.replace(/^data:([^;]+);base64,/gim,"");for(var e=atob(t),n=e.length,i=new ArrayBuffer(n),r=new Uint8Array(i),o=0;o<n;o++)r[o]=e.charCodeAt(o);return i}function MSr(t,e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="blob",n.onload=function(){(this.status==200||this.status===0)&&e(this.response)},n.send()}function LSr(t){var e={flip:{horizontal:!1,vertical:!1},rotate:0};if(t)switch(t){case 2:e.flip.horizontal=!0;break;case 3:e.rotate=-180;break;case 4:e.flip.vertical=!0;break;case 5:e.rotate=90,e.flip.vertical=!0;break;case 6:e.rotate=90;break;case 7:e.rotate=90,e.flip.horizontal=!0;break;case 8:e.rotate=-90;break}return e}function TSr(t){return new Promise(function(e,n){try{if(t)if(/^data:/i.test(t))e(kSr(t));else if(/^blob:/i.test(t)){var i=new FileReader;i.onload=function(o){var s;e((s=o.target)===null||s===void 0?void 0:s.result)},MSr(t,function(o){i.readAsArrayBuffer(o)})}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===DSr&&(r.status===200||r.status===0?e(r.response):n("Warning: could not load an image to parse its orientation"))},r.onprogress=function(){r.getResponseHeader("content-type")!=="image/jpeg"&&r.abort()},r.withCredentials=!1,r.open("GET",t,!0),r.responseType="arraybuffer",r.send(null)}else n("Error: the image is empty")}catch(o){n(o)}})}function ISr(t){var e=t.rotate,n=e===void 0?0:e,i=t.flip,r=i===void 0?{horizontal:!1,vertical:!1}:i,o=t.scale,s=o===void 0?1:o;return" rotate("+n+"deg) scaleX("+s*(r.horizontal?-1:1)+") scaleY("+s*(r.vertical?-1:1)+")"}function ASr(t,e,n){var i="",r;for(r=e,n+=e;r<n;r++)i+=String.fromCharCode(t.getUint8(r));return i}function RSr(t){try{var e=new DataView(t),n,i=void 0,r=void 0,o=void 0,s=void 0,a=void 0;if(e.getUint8(0)===255&&e.getUint8(1)===216)for(var l=e.byteLength,c=2;c+1<l;){if(e.getUint8(c)===255&&e.getUint8(c+1)===225){s=c;break}c++}if(s&&(i=s+4,r=s+10,ASr(e,i,4)==="Exif")){var u=e.getUint16(r);if(o=u===18761,(o||u===19789)&&e.getUint16(r+2,o)===42){var d=e.getUint32(r+4,o);d>=8&&(a=r+d)}}if(a)for(var h=e.getUint16(a,o),f=0;f<h;f++){var c=a+f*12+2;if(e.getUint16(c,o)===274){c+=8,n=e.getUint16(c,o),e.setUint16(c,1,o);break}}return n}catch{return null}}function PSr(t){for(var e=[],n=8192,i=new Uint8Array(t);i.length>0;){var r=i.subarray(0,n);e.push(String.fromCharCode.apply(null,Array.from?Array.from(r):r.slice())),i=i.subarray(n)}return"data:image/jpeg;base64,"+btoa(e.join(""))}function TSe(t){var e=t.src,n=t.arrayBuffer,i=n===void 0?null:n,r=t.orientation,o=r===void 0?null:r,s={src:e,arrayBuffer:i,revoke:!1,transforms:{flip:{horizontal:!1,vertical:!1},rotate:0}};return i&&o&&o>1?hUt(e)||!fUt(e)?(s.src=URL.createObjectURL(new Blob([i])),s.revoke=!0):s.src=PSr(i):s.src=e,o&&(s.transforms=LSr(o)),s}function OSr(t,e){e===void 0&&(e={});var n=e.checkOrientation,i=e.parse;return new Promise(function(r){n||i?TSr(t).then(function(o){var s=RSr(o);r(TSe(o?{src:t,arrayBuffer:o,orientation:s}:{src:t,arrayBuffer:null,orientation:null}))}).catch(function(o){console.warn(o),r(TSe({src:t}))}):r(TSe({src:t}))})}function jSr(t,e){return e===void 0&&(e={}),new Promise(function(n,i){var r=document.createElement("img");e.crossOrigin&&(r.crossOrigin=e.crossOrigin!==!0?e.crossOrigin:"anonymous"),r.src=t,r.style.visibility="hidden",r.style.position="fixed",document.body.appendChild(r),r.complete?(n(r),document.body.removeChild(r)):(r.addEventListener("load",function(){n(r),document.body.removeChild(r)}),r.addEventListener("error",function(){i(null),document.body.removeChild(r)}))})}function FSr(t,e){return e===void 0&&(e={}),OSr(t,Et(Et({},e),{crossOrigin:kCr(t)&&e.crossOrigin})).then(function(n){return new Promise(function(i,r){jSr(n.src,e).then(function(o){i(Et(Et({},n),{width:o.naturalWidth,height:o.naturalHeight}))}).catch(function(){r(null)})})})}function DUt(t,e,n,i,r){r===void 0&&(r=null);var o=t.width>t.height?{width:Math.min(512,t.width),height:Math.min(512,t.width)/(t.width/t.height)}:{height:Math.min(512,t.height),width:Math.min(512,t.height)*(t.width/t.height)},s=NS(e),a={rotate:e.transforms.rotate,flip:{horizontal:e.transforms.flip.horizontal,vertical:e.transforms.flip.vertical},translateX:n.left/i,translateY:n.top/i,scale:1/i},l={rotate:{left:(o.width-s.width)/(2*i),top:(o.height-s.height)/(2*i)},scale:{left:(1-1/i)*o.width/2,top:(1-1/i)*o.height/2}},c=Et(Et({},a),{scale:a.scale*(t.width/o.width)}),u={width:o.width+"px",height:o.height+"px",left:"0px",top:"0px",transition:"none",transform:"translate3d("+(-l.rotate.left-l.scale.left-a.translateX)+"px, "+(-l.rotate.top-l.scale.top-a.translateY)+"px, 0px)"+ISr(c),willChange:"none"};return r&&r.active&&(u.willChange="transform",u.transition=r.duration+"ms "+r.timingFunction),u}function $Sr(t,e,n){return n===void 0&&(n=null),t&&e&&e.visibleArea?DUt(t,e,e.visibleArea,yR(e),n):{}}function VSr(t,e,n,i){return i===void 0&&(i=null),t&&e&&e.visibleArea&&e.coordinates?DUt(t,e,e.coordinates,Mo(e.coordinates)>Mo(n)?e.coordinates.width/n.width:e.coordinates.height/n.height,i):{}}function BSr(t,e){if(ey(t)){var n=Rm(t),i={width:0,height:0};Mo(n.boundary)>Mo(n.coordinates)?(i.height=n.boundary.height*.8,i.width=i.height*Mo(n.coordinates)):(i.width=n.boundary.width*.8,i.height=i.width*Mo(n.coordinates)),n.visibleArea=nw(n.visibleArea,n.coordinates.width*n.boundary.width/(n.visibleArea.width*i.width));var r=PHe(n.visibleArea,b_(n,e));return n.visibleArea=nw(n.visibleArea,r),r!==1&&(i.height/=r,i.width/=r),n.visibleArea=zh(n.visibleArea,r_(Nl(n.coordinates),Nl(n.visibleArea))),n.visibleArea=iu(n.visibleArea,o_(n,e)),n.coordinates=iu(n.coordinates,SM(hb(n.visibleArea),fb(n,e))),n}return t}function zSr(t,e,n){return n.immediately?BSr(t,e):t}function HSr(){var t=b.useRef([]);return function(e){t.current.indexOf(e)===-1&&t.current.push(e)}}function WSr(t){return b.forwardRef(t)}function USr(){var t=b.useRef(!0);return t.current?(t.current=!1,!0):t.current}var OB=function(t,e){var n=USr();b.useEffect(function(){if(!n)return t()},e)};function kUt(t){var e=Ac(b.useState(t),2),n=e[0],i=e[1],r=Ac(b.useState(null),2),o=r[0],s=r[1],a=b.useRef(t);return OB(function(){o&&o(n,a.current)},[o]),[n,function(l,c){a.current=n,i(l),s(function(){return c})}]}var KSr=function(t){Af(e,t);function e(n,i){var r=t.call(this)||this;return r.props=n,r.notify=i,r.data={state:null,transitions:!1,interactions:cSr()},r}return e.prototype.getProps=function(){return this.props()},e.prototype.setData=function(n){this.data=n,this.notify()},e.prototype.getData=function(){return this.data},e}(_Sr);function MUt(){var t=Ac(b.useState({}),2);t[0];var e=t[1];return function(){e({})}}function qSr(t){var e=b.useRef(t);return e.current=t,function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e.current.apply(e,Zc([],Ac(n),!1))}}function GSr(t){var e=MUt(),n=qSr(function(){var r=t(),o=r.settings,s=km(r,["settings"]),a=Et({imageRestriction:dA.fitArea,transformImage:{adjustStencil:!0}},o),l=Et({transitions:!0},s);return Et({settings:Et(Et({},a),ySr(a))},l)}),i=b.useRef(new KSr(n,e));return i.current}function YSr(t){var e=t.src,n=t.onLoadingStart,i=t.onLoadingEnd,r=t.onError,o=t.onLoad,s=t.crossOrigin,a=t.checkOrientation,l=t.canvas,c=t.unloadTime,u=Ac(b.useState(null),2),d=u[0],h=u[1],f=Ac(b.useState(!1),2),m=f[0],p=f[1],g=Ac(kUt(!1),2),y=g[0],_=g[1],w=b.useRef(null);return b.useEffect(function(){if(w.current!==e)if(w.current=e||null,_(!1),e){p(!0),n==null||n();var C=[FSr(e,{crossOrigin:ku(s)?l:s,checkOrientation:a})];y&&c&&C.push(Hvt(c)),Promise.all(C).then(function(N){var E=Ac(N,1),D=E[0];w.current===e&&h(D)}).catch(function(){w.current===e&&(r==null||r())}).finally(function(){w.current===e&&(i==null||i(),p(!1))})}else c?Hvt(c).then(function(){w.current===e&&h(null)}):h(null)},[e,d]),b.useEffect(function(){d&&_(!0,function(){o==null||o(d)})},[d]),{isLoading:function(){return m},isLoaded:function(){return y},getImage:function(){return d},setImage:h}}var LUt=function(t){var e=b.useRef(t),n=function(){e.current&&e.current()};b.useEffect(function(){e.current=t},[t]),b.useEffect(function(){return window.addEventListener("resize",n),window.addEventListener("orientationchange",n),function(){window.removeEventListener("resize",n),window.removeEventListener("orientationchange",n)}},[])};function XSr(t,e){e===void 0&&(e=!0);var n=Ac(b.useState(e),2),i=n[0],r=n[1];return b.useLayoutEffect(function(){i&&!t.hasInteractions()&&t.reconcileState()}),{pause:function(){r(!1)},resume:function(){r(!0)}}}function ZSr(t){var e=this,n=t(),i=n.src,r=n.onReady,o=n.onError,s=n.onUpdate,a=n.canvas,l=a===void 0?!0:a,c=n.unloadTime,u=c===void 0?500:c,d=n.crossOrigin,h=d===void 0?!0:d,f=n.checkOrientation,m=f===void 0?!0:f,p=n.autoReconcileState,g=p===void 0?!0:p,y=b.useRef(null),_=b.useRef(null),w=b.useRef(null),C=b.useRef(null),N=Ac(kUt(null),2),E=N[0],D=N[1],k=GSr(function(){return Et(Et({},t()),{getInstance:function(){return C.current}})}),M=YSr({src:i,crossOrigin:h,checkOrientation:m,unloadTime:u,canvas:l,onError:function(){C.current&&(o==null||o(C.current))}}),T=XSr(k,g),A=function(){return GO(e,void 0,void 0,function(){var O,V,F;return JQe(this,function($){switch($.label){case 0:return _.current?(T.pause(),O=M.getImage(),[4,(F=_.current)===null||F===void 0?void 0:F.stretchTo(O)]):[3,2];case 1:V=$.sent(),D(O,function(){V&&O?k.reset(V,O):k.clear()}),T.resume(),$.label=2;case 2:return[2]}})})},R=function(){return GO(e,void 0,void 0,function(){var O,V,F,$;return JQe(this,function(B){switch(B.label){case 0:return _.current?(T.pause(),O=M.getImage(),[4,($=_.current)===null||$===void 0?void 0:$.stretchTo(O)]):[3,2];case 1:V=B.sent(),V&&O?(F=k.getState(),F?(V.width!==F.boundary.width||V.height!==F.boundary.height)&&(k.setBoundary(V),k.reconcileState()):k.reset(V,O)):k.clear(),T.resume(),B.label=2;case 2:return[2]}})})},P={reset:function(){return A()},refresh:function(){return R()},setImage:function(O){return D(O)},reconcileState:k.reconcileState,moveCoordinates:k.moveCoordinates,moveCoordinatesEnd:k.moveCoordinatesEnd,resizeCoordinates:k.resizeCoordinates,clear:k.clear,resizeCoordinatesEnd:k.resizeCoordinatesEnd,moveImage:k.moveImage,flipImage:k.flipImage,zoomImage:k.zoomImage,rotateImage:k.rotateImage,transformImage:k.transformImage,transformImageEnd:k.transformImageEnd,setCoordinates:k.setCoordinates,setVisibleArea:k.setVisibleArea,startTransitions:k.startTransitions,setState:k.setState,hasInteractions:k.hasInteractions,getStencilCoordinates:k.getStencilCoordinates,getCoordinates:k.getCoordinates,getVisibleArea:k.getVisibleArea,getTransforms:k.getTransforms,getTransitions:k.getTransitions,getInteractions:k.getInteractions,getSettings:k.getSettings,getState:k.getState,getDefaultState:function(){var O=k.getState(),V=M.getImage();return O&&V?k.createDefaultState(O.boundary,V):null},getCanvas:function(O){var V=k.getState();return y.current&&w.current&&V?w.current.draw(V,y.current,O):null},getImage:function(){return E?Et({},E):null},isLoading:M.isLoading,isLoaded:M.isLoaded};return LUt(function(){R()}),OB(function(){A()},[M.getImage()]),OB(function(){C.current&&E&&(r==null||r(C.current))},[E]),OB(function(){C.current&&(s==null||s(C.current))},[M.isLoaded(),M.isLoading()]),b.useImperativeHandle(C,function(){return P}),{cropper:P,refs:{image:y,boundary:_,canvas:w},image:E}}var $He=b.forwardRef(function(t,e){var n=t.className,i=t.style,r=t.stretcherClassName,o=t.contentClassName,s=t.stretchAlgorithm,a=s===void 0?NSr:s,l=t.sizeAlgorithm,c=l===void 0?bSr:l,u=t.children,d=b.useRef(null),h=b.useRef(null);return b.useImperativeHandle(e,function(){return{reset:function(){var f=d.current;f&&(f.style.height="",f.style.width="")},stretchTo:function(f){var m=d.current,p=h.current;if(f!=null&&f.width&&(f!=null&&f.height)&&m&&p){a(p,m,f);var g=c(p,f);return Promise.resolve(g.width&&g.height?g:null)}else return m&&(m.style.height="",m.style.width=""),Promise.resolve(null)}}}),Z.createElement("div",{ref:h,style:i,className:Me("advanced-cropper-boundary",n)},Z.createElement("div",{ref:d,className:Me(["advanced-cropper-boundary__stretcher",r])}),Z.createElement("div",{className:Me(["advanced-cropper-boundary__content",o])},u))});$He.displayName="StretchableBoundary";var TUt=function(t){var e=t.visible,n=t.className,i=t.style,r=t.children;return Z.createElement("div",{style:i,className:Me(n,"advanced-cropper-fade",!!e&&"advanced-cropper-fade--visible")},r)},QSr=function(t){var e=t.cropper,n=t.children,i=t.className,r=t.style,o=e?e.getState():null,s=e?e.isLoaded():!1;return Z.createElement("div",{className:Me(i,"advanced-cropper-wrapper"),style:r},Z.createElement(TUt,{visible:o&&s,className:"advanced-cropper-wrapper__fade"},n))};function IUt(t){t.preventDefault()}var AUt=b.forwardRef(function(t,e){var n=t.className,i=t.style,r=t.cropper,o=t.crossOrigin,s=o===void 0?!0:o,a=r.getState(),l=r.getTransitions(),c=r.getImage(),u=c&&a?$Sr(c,a,l):{},d=c?c.src:void 0;return d?Z.createElement("img",{key:d,ref:e,className:Me("advanced-cropper-background-image",n),src:d,crossOrigin:s===!0?"anonymous":s||void 0,style:Et(Et({},u),i),onMouseDown:IUt}):null});AUt.displayName="CropperBackgroundImage";var RUt=b.forwardRef(function(t,e){var n=b.useRef(null),i=b.useRef(null);return b.useImperativeHandle(e,function(){return{draw:function(r,o,s){return s===void 0&&(s={}),o&&n.current&&i.current?SSr(r,o,n.current,i.current,s):null}}}),Z.createElement(Z.Fragment,null,Z.createElement("canvas",{className:"advanced-cropper-canvas",ref:n}),Z.createElement("canvas",{className:"advanced-cropper-canvas",ref:i}))});RUt.displayName="CropperCanvas";var ige=function(t){Af(e,t);function e(n){var i=t.call(this,n)||this;return i.processMove=function(r,o){var s,a=i.container.current;if(a&&i.touches.length){var l=a.getBoundingClientRect(),c=l.left,u=l.top;if(i.touches.length===1&&o.length===1&&i.props.onMove){var d={left:Math.abs(o[0].clientX-i.anchor.left-c)<Math.abs(i.touches[0].clientX-i.anchor.left-c),top:Math.abs(o[0].clientY-i.anchor.top-u)<Math.abs(i.touches[0].clientY-i.anchor.top-u)},h={left:0,top:0};(!i.props.useAnchor||!d.left)&&(h.left=o[0].clientX-i.touches[0].clientX),(!i.props.useAnchor||!d.top)&&(h.top=o[0].clientY-i.touches[0].clientY),(s=i.props)===null||s===void 0||s.onMove(h,r),i.touches=Zc([],Ac(o),!1)}}},i.processEnd=function(){var r=i.props,o=r.onMoveEnd,s=r.onLeave;!i.props.disabled&&i.touches.length&&(o==null||o()),i.hovered&&(s==null||s(),i.hovered=!1),i.touches=[]},i.initAnchor=function(r){var o=i.container.current;if(o){var s=o.getBoundingClientRect(),a=s.left,l=s.top;i.anchor={left:r.clientX-a,top:r.clientY-l}}},i.onMouseOver=function(){var r=i.props,o=r.onEnter,s=r.disabled;!i.hovered&&!s&&(i.hovered=!0,o==null||o())},i.onMouseLeave=function(){var r=i.props.onLeave;i.hovered&&!i.touches.length&&(i.hovered=!1,r==null||r())},i.onTouchStart=function(r){var o=i.props,s=o.onEnter,a=o.onMoveStart,l=o.disabled;if(r.cancelable){i.touches=Array.from(r.touches);var c=!l&&r.touches.length===1;c&&(i.touches=Array.from(r.touches),a==null||a()),!i.hovered&&!l&&(i.hovered=!0,s==null||s()),(i.started||c)&&(r.preventDefault(),r.stopPropagation())}},i.onTouchEnd=function(){i.started=!1,i.processEnd()},i.onTouchMove=function(r){i.touches.length>=1&&(i.started?(i.processMove(r,Array.from(r.touches)),r.preventDefault(),r.stopPropagation()):pUt({left:i.touches[0].clientX,top:i.touches[0].clientY},{left:r.touches[0].clientX,top:r.touches[0].clientY})>(i.props.activationDistance||0)&&(i.initAnchor({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY}),i.started=!0))},i.onMouseDown=function(r){var o=i.props,s=o.onMoveStart,a=o.disabled;if(!a&&r.button===0){var l={clientX:r.clientX,clientY:r.clientY};i.touches=[l],i.initAnchor(l),r.stopPropagation(),s==null||s()}},i.onMouseMove=function(r){!i.props.disabled&&i.touches.length&&(i.processMove(r,[{clientX:r.clientX,clientY:r.clientY}]),r.preventDefault&&r.cancelable&&r.preventDefault(),r.stopPropagation())},i.onMouseUp=function(){i.processEnd()},i.touches=[],i.hovered=!1,i.started=!1,i.anchor={left:0,top:0},i.container=b.createRef(),i}return e.prototype.componentWillUnmount=function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd);var n=this.container.current;n&&(n.removeEventListener("touchstart",this.onTouchStart),n.removeEventListener("mousedown",this.onMouseDown))},e.prototype.componentDidMount=function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1});var n=this.container.current;n&&(n.addEventListener("touchstart",this.onTouchStart,{passive:!1}),n.addEventListener("mousedown",this.onMouseDown,{passive:!1}))},e.prototype.componentDidUpdate=function(n){this.props.disabled&&!n.disabled&&(this.touches=[])},e.prototype.render=function(){var n=this.props,i=n.children,r=n.className;return Z.createElement("div",{className:Me("advanced-cropper-draggable-element",r),ref:this.container,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave},i)},e.defaultProps={disabled:!1,activationDistance:30,useAnchor:!0,rerender:!0},e}(b.Component),JSr=function(t){var e=t.position,n=t.className,i=t.disabled,r=t.onDrag,o=t.onDragEnd,s=t.onLeave,a=t.onEnter,l=t.children;return Z.createElement(ige,{className:Me(["advanced-cropper-line-wrapper",e&&"advanced-cropper-line-wrapper--".concat(e),i&&"advanced-cropper-line-wrapper--disabled",n]),disabled:i,onMove:r,onMoveEnd:o,onLeave:s,onEnter:a,activationDistance:0},Z.createElement("div",{className:Me(["advanced-cropper-line-wrapper__content",e&&"advanced-cropper-line-wrapper__content--".concat(e)])},l))},VHe=function(t){var e,n,i=t.position,r=t.hoverClassName,o=t.wrapperClassName,s=t.defaultClassName,a=t.disabled,l=t.onMove,c=t.onMoveEnd,u=Ac(b.useState(!1),2),d=u[0],h=u[1],f=function(){h(!0)},m=function(){h(!1)};return Z.createElement(JSr,{className:Me("advanced-cropper-simple-line-wrapper",o,(e={},e["advanced-cropper-simple-line-wrapper--".concat(i)]=!!i,e)),position:i,disabled:a,onDrag:l,onDragEnd:c,onLeave:m,onEnter:f},Z.createElement("div",{className:Me("advanced-cropper-simple-line",d&&"advanced-cropper-simple-line--hover",s,d&&r,(n={},n["advanced-cropper-simple-line--".concat(i)]=!!i,n))}))},eNr=function(t){var e=t.horizontalPosition,n=t.verticalPosition,i=t.className,r=t.disabled,o=t.onDrag,s=t.onDragEnd,a=t.onLeave,l=t.onEnter,c=t.children,u=t.style,d=e||n?APe(e,n).snakeCase:null;return Z.createElement("div",{style:u,className:Me(i,"advanced-cropper-handler-wrapper",d&&"advanced-cropper-handler-wrapper--".concat(d),r&&"advanced-cropper-handler-wrapper--disabled")},Z.createElement(ige,{className:"advanced-cropper-handler-wrapper__draggable",disabled:r,onMove:o,onMoveEnd:s,onLeave:a,onEnter:l,activationDistance:0},c))},BHe=function(t){var e,n=t.verticalPosition,i=t.horizontalPosition,r=t.hoverClassName,o=t.wrapperClassName,s=t.defaultClassName,a=t.wrapperStyle,l=t.disabled,c=t.onMove,u=t.onMoveEnd,d=Ac(b.useState(!1),2),h=d[0],f=d[1],m=function(){f(!0)},p=function(){f(!1)};return Z.createElement(eNr,{style:a,className:Me("advanced-cropper-simple-handler-wrapper",o,n&&"advanced-cropper-simple-handler-wrapper--".concat(n),i&&"advanced-cropper-simple-handler-wrapper--".concat(i),i&&n&&"advanced-cropper-simple-handler-wrapper--".concat(i,"-").concat(n),h&&"advanced-cropper-simple-handler-wrapper--hover"),verticalPosition:n,horizontalPosition:i,disabled:l,onDrag:c,onDragEnd:u,onLeave:p,onEnter:m},Z.createElement("div",{className:Me("advanced-cropper-simple-handler",h&&"advanced-cropper-simple-handler--hover",s,h&&r,(e={},e["advanced-cropper-simple-handler--".concat(n)]=!!n,e["advanced-cropper-simple-handler--".concat(i)]=!!i,e["advanced-cropper-simple-handler--".concat(i,"-").concat(n)]=i&&n,e))}))},tNr=["east","west",null],nNr=["south","north",null],PUt=function(t){var e=t.style,n=t.className,i=t.children,r=t.onResize,o=t.onResizeEnd,s=t.handlerComponent,a=s===void 0?BHe:s,l=t.handlers,c=l===void 0?{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}:l,u=t.handlerClassNames,d=u===void 0?{}:u,h=t.handlerWrapperClassNames,f=h===void 0?{}:h,m=t.lines,p=m===void 0?{west:!0,north:!0,east:!0,south:!0}:m,g=t.lineComponent,y=g===void 0?VHe:g,_=t.lineClassNames,w=_===void 0?{}:_,C=t.lineWrapperClassNames,N=C===void 0?{}:C,E=t.disabled,D=E===void 0?!1:E,k=t.reference,M=k===void 0?null:k,T=Ac(b.useState(null),2),A=T[0],R=T[1],P=b.useMemo(function(){var B=[];return tNr.forEach(function(z){nNr.forEach(function(H){if(z!==H){var K=APe(z,H),q=K.snakeCase,U=K.camelCase;q&&U&&B.push({name:U,className:q,verticalPosition:H,horizontalPosition:z})}})}),B},[]),O=b.useMemo(function(){var B=[];return P.forEach(function(z){ICr(z.name)&&(wI(p)?p[z.name]:p)&&B.push({name:z.name,component:y,className:Me(w.default,w[z.name],D&&w.disabled),wrapperClassName:Me("advanced-cropper-bounding-box__line","advanced-cropper-bounding-box__line--".concat(z.name),N.default,N[z.name],D&&N.disabled),hoverClassName:w.hover,verticalPosition:z.verticalPosition,horizontalPosition:z.horizontalPosition,disabled:D})}),B},[P,p,y,w,N,D]),V=b.useMemo(function(){var B=[];return P.forEach(function(z){(wI(c)?c[z.name]:c)&&B.push({name:z.name,component:a,className:Me(d.default,d[z.name]),containerClassName:Me("advanced-cropper-bounding-box__handler-wrapper","advanced-cropper-bounding-box__handler-wrapper--".concat(z.className)),wrapperClassName:Me("advanced-cropper-bounding-box__handler","advanced-cropper-bounding-box__handler--".concat(z.className),f.default,f[z.name]),hoverClassName:d.hover,verticalPosition:z.verticalPosition,horizontalPosition:z.horizontalPosition,disabled:D})}),B},[P,c,a,d,f,D]),F=function(B,z){return function(H,K){var q=H.left,U=H.top,Y={left:q,top:U},J;if(!z&&B?J="width":z&&!B&&(J="height"),!D){if(r){var ae=APe(B,z).camelCase;ae&&r(ae,Y,{reference:A||M,preserveAspectRatio:K&&K.shiftKey,respectDirection:J,compensate:!0})}A||R(M)}}},$=function(){o==null||o(),R(null)};return Z.createElement("div",{className:Me("advanced-cropper-bounding-box",n),style:e},i,Z.createElement("div",null,O.map(function(B){return Z.createElement(B.component,{key:B.name,defaultClassName:B.className,hoverClassName:B.hoverClassName,wrapperClassName:B.wrapperClassName,position:B.name,disabled:B.disabled,onMove:F(B.horizontalPosition,B.verticalPosition),onMoveEnd:$})})),Z.createElement("div",null,V.map(function(B){var z=Z.createElement(B.component,{defaultClassName:B.className,hoverClassName:B.hoverClassName,wrapperClassName:B.wrapperClassName,horizontalPosition:B.horizontalPosition,verticalPosition:B.verticalPosition,disabled:B.disabled,onMove:F(B.horizontalPosition,B.verticalPosition),onMoveEnd:$});return Z.createElement("div",{key:B.name,className:B.containerClassName},z)})))},OUt=function(t){var e=t.className,n=t.children;return Z.createElement("div",{className:Me("advanced-cropper-stencil-overlay",e)},n)};function iNr(t){t===void 0&&(t=null);var e=b.useRef(new xSr),n=Ac(b.useState(!1),2),i=n[0],r=n[1];return[function(o){t&&t.active?e.current.start(Et(Et({},t),{onStart:function(){r(!0)},onProgress:function(s){o(s)},onStop:function(){r(!1)}})):e.current.active||o(1)},i]}var rNr=function(t){var e=t.className,n=t.transitions,i=t.children,r=km(t,["className","transitions","children"]),o=b.useRef(null),s=b.useRef(r),a=Ac(b.useState(r),2),l=a[0],c=a[1],u=Ac(iNr(n),2),d=u[0],h=u[1];b.useLayoutEffect(function(){if(!G3(l,r)){c(r);var p=h?Et({},s.current):l;d(function(g){var y=["left","top","height","width"];y.forEach(function(_){var w=r[_],C=p[_];s.current[_]=ml(C)&&ml(w)?C+(w-C)*g:w}),o.current&&(o.current.style.width="".concat(s.current.width,"px"),o.current.style.height="".concat(s.current.height,"px"),o.current.style.transform="translate3d(".concat(s.current.left,"px, ").concat(s.current.top,"px, 0px)"))})}},[l,h,r.width,r.height,r.top,r.left]);var f=h?s.current:r,m={left:0,top:0,width:"".concat(f.width,"px"),height:"".concat(f.height,"px"),transform:"translate3d(".concat(f.left,"px, ").concat(f.top,"px, 0px)")};return Z.createElement("div",{ref:o,className:Me("advanced-cropper-artificial-transition",e),style:m},i)},jUt=function(t){var e=t.className,n=t.transitions,i=t.width,r=t.height,o=t.left,s=t.top,a=t.children;return Z.createElement(rNr,{className:Me("advanced-cropper-stencil-wrapper",e),transitions:n,width:i,height:r,top:s,left:o},a)},FUt=function(t){var e=t.columns,n=e===void 0?3:e,i=t.rows,r=i===void 0?3:i,o=t.visible,s=o===void 0?!1:o,a=t.className,l=[],c=Ac(b.useState(n),2),u=c[0],d=c[1],h=Ac(b.useState(r),2),f=h[0],m=h[1];OB(function(){s&&(m(r),d(n))},[s,n,r]);for(var p=0;p<f;p++){for(var g=[],y=0;y<u;y++)g.push(Z.createElement("div",{key:y,className:Me("advanced-cropper-stencil-grid__cell",p===0&&"advanced-cropper-stencil-grid__cell--top",p===f-1&&"advanced-cropper-stencil-grid__cell--bottom",y===0&&"advanced-cropper-stencil-grid__cell--left",y===u-1&&"advanced-cropper-stencil-grid__cell--right")}));l.push(Z.createElement("div",{key:p,className:"advanced-cropper-stencil-grid__row"},g))}return Z.createElement("div",{className:Me("advanced-cropper-stencil-grid",s&&"advanced-cropper-stencil-grid--visible",a)},l)},$Ut=b.forwardRef(function(t,e){var n=t.cropper,i=t.coordinates,r=t.aspectRatio,o=t.minAspectRatio,s=t.maxAspectRatio,a=t.handlerComponent,l=a===void 0?BHe:a,c=t.handlers,u=c===void 0?{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}:c,d=t.handlerClassNames,h=d===void 0?{}:d,f=t.handlerWrapperClassNames,m=f===void 0?{}:f,p=t.lines,g=p===void 0?{west:!0,north:!0,east:!0,south:!0}:p,y=t.lineComponent,_=y===void 0?VHe:y,w=t.lineClassNames,C=w===void 0?{}:w,N=t.lineWrapperClassNames,E=N===void 0?{}:N,D=t.resizable,k=D===void 0?!0:D,M=t.movable,T=M===void 0?!0:M,A=t.grid,R=t.gridClassName,P=t.className,O=t.movingClassName,V=t.resizingClassName,F=t.previewClassName,$=t.boundingBoxClassName,B=t.overlayClassName,z=t.draggableAreaClassName,H=t.disabled,K=n.getState(),q=n.getTransitions(),U=n.getInteractions(),Y=k&&!H,J=T&&!H;b.useImperativeHandle(e,function(){return{aspectRatio:vR(r||{minimum:o,maximum:s})}});var ae=function(Ne){n&&J&&n.moveCoordinates(Ne)},se=function(){n&&n.moveCoordinatesEnd()},oe=function(Ne,Le,Te){n&&Y&&n.resizeCoordinates(Ne,Le,Te)},fe=function(){n&&n.resizeCoordinatesEnd()},de=i?ha(i)?i(K):i:OHe(K),ie=de.width,Q=de.height,be=de.left,le=de.top;return K&&Z.createElement(jUt,{className:Me("advanced-cropper-rectangle-stencil",P,U.moveCoordinates&&O,U.resizeCoordinates&&V,{"advanced-cropper-rectangle-stencil--movable":J,"advanced-cropper-rectangle-stencil--moving":U.moveCoordinates,"advanced-cropper-rectangle-stencil--resizable":Y,"advanced-cropper-rectangle-stencil--resizing":U.resizeCoordinates,"advanced-cropper-rectangle-stencil--disabled":H}),width:ie,height:Q,left:be,top:le,transitions:q},Z.createElement(PUt,{reference:K.coordinates,className:Me($,"advanced-cropper-rectangle-stencil__bounding-box"),handlers:u,handlerComponent:l,handlerClassNames:h,handlerWrapperClassNames:m,lines:g,lineComponent:_,lineClassNames:C,lineWrapperClassNames:E,onResize:oe,onResizeEnd:fe,disabled:!Y},Z.createElement(ige,{disabled:!J,onMove:ae,onMoveEnd:se,className:Me("advanced-cropper-rectangle-stencil__draggable-area",z)},Z.createElement(OUt,{className:Me("advanced-cropper-rectangle-stencil__overlay",B)},A&&Z.createElement(FUt,{visible:n.hasInteractions(),columns:U.transformImage.rotate?9:3,rows:U.transformImage.rotate?9:3,className:Me("advanced-cropper-rectangle-stencil__grid",R)}),Z.createElement("div",{className:Me("advanced-cropper-rectangle-stencil__preview",F)})))))});$Ut.displayName="RectangleStencil";function oNr(t){return b.useMemo(function(){return EG(t,{touch:!0},{touch:!1})},[t])}function sNr(t){return b.useMemo(function(){return EG(t,{touch:!0,wheel:{ratio:.1}},{touch:!1,wheel:!1})},[t])}function aNr(t){return b.useMemo(function(){return EG(t,{touch:!0,mouse:!0},{touch:!1,mouse:!1})},[t])}var lNr=function(){function t(e){var n=e.active;this.active=n,this.defaultPrevented=!1}return t.prototype.preventDefault=function(){this.defaultPrevented=!0},t}(),cNr=function(t){Af(e,t);function e(n){var i=t.call(this,n)||this;return i.processMove=function(r){var o=i.props,s=o.onTransform,a=o.touchScale,l=o.touchMove,c=o.touchRotate,u=i.container.current;u&&s&&(s(aSr(r,i.touches,u,{scale:a,rotate:c,move:l})),i.touches=r)},i.processEnd=function(){var r=i.props.onTransformEnd;i.transforming&&(i.transforming=!1,r&&r())},i.processStart=function(){i.transforming=!0,i.debouncedProcessEnd.clear()},i.processEvent=function(r){var o=i.props,s=o.onEvent,a=o.disabled,l=o.preventDefault,c=l===void 0?!0:l,u=new lNr({active:i.transforming});return s?s(u,r):c&&(r.preventDefault(),r.stopPropagation()),!a&&!u.defaultPrevented},i.onWheel=function(r){var o=i.props,s=o.onTransform,a=o.wheelScale,l=i.container.current;a&&i.processEvent(r)&&(i.processStart(),s&&l&&s(lSr(r,l,a===!0?.1:a.ratio)),i.touches.length||i.debouncedProcessEnd())},i.onTouchStart=function(r){var o=i.props,s=o.touchMove,a=o.touchScale,l=o.touchRotate;if(r.cancelable&&(s||(a||l)&&r.touches.length>1)&&i.processEvent(r)){var c=i.container.current;if(c){var u=c.getBoundingClientRect(),d=u.left,h=u.top,f=u.bottom,m=u.right;i.touches=Array.from(r.touches).filter(function(p){return p.clientX>d&&p.clientX<m&&p.clientY>h&&p.clientY<f})}}},i.onTouchEnd=function(r){r.touches.length===0&&(i.touches=[],i.processEnd())},i.onTouchMove=function(r){if(i.touches.length){var o=Zc([],Ac(r.touches),!1).filter(function(s){return!s.identifier||i.touches.find(function(a){return a.identifier===s.identifier})});i.processEvent(r)&&(i.processMove(o),i.processStart())}},i.onMouseDown=function(r){var o=i.props.mouseMove;if(o&&"buttons"in r&&r.buttons===1&&i.processEvent(r)){var s={clientX:r.clientX,clientY:r.clientY};i.touches=[s],i.processStart()}},i.onMouseMove=function(r){i.touches.length&&i.processEvent(r)&&i.processMove([{clientX:r.clientX,clientY:r.clientY}])},i.onMouseUp=function(){i.touches=[],i.processEnd()},i.transforming=!1,i.touches=[],i.anchor={left:0,top:0},i.container=b.createRef(),i.debouncedProcessEnd=bUt(i.processEnd,n.timeout),i}return e.prototype.shouldComponentUpdate=function(){return!0},e.prototype.componentWillUnmount=function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd);var n=this.container.current;n&&(n.removeEventListener("touchstart",this.onTouchStart),n.removeEventListener("mousedown",this.onMouseDown),n.removeEventListener("wheel",this.onWheel))},e.prototype.componentDidMount=function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1});var n=this.container.current;n&&(n.addEventListener("touchstart",this.onTouchStart,{passive:!1}),n.addEventListener("mousedown",this.onMouseDown,{passive:!1}),n.addEventListener("wheel",this.onWheel,{passive:!1}))},e.prototype.render=function(){var n=this.props,i=n.className,r=n.children,o=n.style;return Z.createElement("div",{className:i,style:o,ref:this.container},r)},e.defaultProps={touchMove:!0,mouseMove:!0,touchScale:!0,touchRotate:!1,wheelScale:!0,timeout:500},e}(b.Component),uNr=function(t){var e=t.scaleImage,n=e===void 0?!0:e,i=t.moveImage,r=i===void 0?!0:i,o=t.rotateImage,s=o===void 0?!1:o,a=t.children,l=t.className,c=t.style,u=t.cropper,d=t.timeout,h=t.disabled,f=u.getTransitions(),m=oNr(s),p=sNr(n),g=aNr(r);return Z.createElement(cNr,{className:l,style:c,onTransform:u.transformImage,onTransformEnd:u.transformImageEnd,touchMove:g.touch,mouseMove:g.mouse,touchScale:p.touch,wheelScale:p.wheel,touchRotate:m.touch,disabled:f.active||h,preventDefault:!h,timeout:d},a)},dNr=function(t,e){var n=t.style,i=t.className,r=t.stencilComponent,o=r===void 0?$Ut:r,s=t.stencilConstraints,a=s===void 0?EUt:s,l=t.stencilProps,c=l===void 0?{}:l,u=t.wrapperComponent,d=u===void 0?QSr:u,h=t.wrapperProps,f=h===void 0?{}:h,m=t.backgroundComponent,p=m===void 0?AUt:m,g=t.backgroundProps,y=g===void 0?{}:g,_=t.backgroundClassName,w=t.backgroundWrapperComponent,C=w===void 0?uNr:w,N=t.backgroundWrapperProps,E=N===void 0?{}:N,D=t.boundaryComponent,k=D===void 0?$He:D,M=t.boundaryProps,T=t.boundaryClassName,A=t.canvas,R=A===void 0?!0:A,P=t.crossOrigin,O=P===void 0?!0:P,V=t.disabled,F=t.settings,$=km(t,["style","className","stencilComponent","stencilConstraints","stencilProps","wrapperComponent","wrapperProps","backgroundComponent","backgroundProps","backgroundClassName","backgroundWrapperComponent","backgroundWrapperProps","boundaryComponent","boundaryProps","boundaryClassName","canvas","crossOrigin","disabled","settings"]),B=b.useRef(null),z=ZSr(function(){return Et(Et({},$),{crossOrigin:O,stencilProps:c,canvas:R,settings:Et(Et({},F),a(F,Et(Et({},c),B.current)))})}),H=z.cropper,K=z.image,q=z.refs,U=o,Y=d,J=C,ae=p,se=k;b.useImperativeHandle(e,function(){return H});var oe={loading:H.isLoading(),loaded:H.isLoaded()};return Z.createElement(Y,Et({},f,{disabled:V,className:Me("advanced-cropper",i),cropper:H,style:n},oe),Z.createElement(se,Et({},M,{ref:q.boundary,className:Me("advanced-cropper__boundary",T)}),Z.createElement(J,Et({},E,{disabled:V,cropper:H,className:"advanced-cropper__background-wrapper"}),H.getState()&&Z.createElement(ae,Et({},y,{ref:q.image,crossOrigin:O,cropper:H,className:Me("advanced-cropper__background",_)})),Z.createElement(U,Et({},c,{disabled:V,ref:B,cropper:H,image:K}))),R&&Z.createElement(RUt,{ref:q.canvas})))},VUt=WSr(dNr),BUt=["transformImage","moveCoordinates","resizeCoordinates","defaultCoordinates","defaultVisibleArea","areaPositionRestrictions","areaSizeRestrictions","sizeRestrictions","positionRestrictions","aspectRatio","minWidth","minHeight","maxWidth","maxHeight","defaultSize","defaultPosition","defaultTransforms","imageRestriction","priority"];function zUt(t,e){e===void 0&&(e=BUt);var n={settings:{},props:{}};return Object.keys(t).forEach(function(i){e.some(function(r){return r===i})?n.settings[i]=t[i]:n.props[i]=t[i]}),n}function hNr(t,e){var n=EUt({},e);return{stencilSize:function(i,r){var o=ha(t.stencilSize)?t.stencilSize(i,r):t.stencilSize;return s_(Et(Et({},o),{aspectRatio:jCr(n.aspectRatio,vR(Mo(o)))}))}}}function zHe(t,e){var n=t.boundary,i=ha(e.stencilSize)?e.stencilSize(t,e):e.stencilSize;return(i.width>n.width||i.height>n.height)&&(i=s_({sizeRestrictions:{maxWidth:n.width,maxHeight:n.height,minWidth:0,minHeight:0},width:i.width,height:i.height,aspectRatio:{minimum:Mo(i),maximum:Mo(i)}})),i}function fNr(t,e){var n=zHe(t,Et(Et({},e),{stencilSize:e.stencilSize})),i=b_(t,e);return{maxWidth:i.maxWidth*n.width/t.boundary.width,maxHeight:i.maxHeight*n.height/t.boundary.height,minWidth:0,minHeight:0}}function mNr(t,e){var n=t.imageSize,i=t.visibleArea,r=t.boundary,o=v_(t,e),s=NM(t,e),a=ha(e.stencilSize)?e.stencilSize(t,e):e.stencilSize,l=i||n,c,u;return Mo(l)>Mo(r)?(c=a.height*l.height/r.height,u=c*Mo(a)):(u=a.width*l.width/r.width,c=u/Mo(a)),s_({width:u,height:c,aspectRatio:s,sizeRestrictions:o})}function pNr(t,e){var n=Mo(zHe(t,e));return{minimum:n,maximum:n}}function gNr(t,e){if(ey(t)){var n=Rm(t),i=zHe(t,e);n.visibleArea=nw(n.visibleArea,n.coordinates.width*n.boundary.width/(n.visibleArea.width*i.width));var r=PHe(n.visibleArea,b_(n,e));return r!==1&&(n.visibleArea=nw(n.visibleArea,r),n.coordinates=nw(n.coordinates,r)),n.visibleArea=zh(n.visibleArea,r_(Nl(n.coordinates),Nl(n.visibleArea))),n.visibleArea=iu(n.visibleArea,o_(n,e)),n.coordinates=iu(n.coordinates,SM(hb(n.visibleArea),o_(n,e))),n}return t}function bNr(t,e,n){return n&&n.immediately?gNr(t,e):t}var HUt=b.forwardRef(function(t,e){var n=zUt(t,Zc(Zc([],Ac(BUt),!1),["stencilSize"],!1));return Z.createElement(VUt,Et({postProcess:bNr,stencilConstraints:hNr},n.props,{settings:Et(Et({defaultSize:mNr,aspectRatio:pNr,sizeRestrictions:vSr(fNr)},n.settings),{transformImage:Et(Et({},n.settings.transformImage),{adjustStencil:!1})}),ref:e}))});HUt.displayName="FixedCropper";var WUt=b.forwardRef(function(t,e){var n=zUt(t),i=n.props,r=n.settings,o=r.stencilSize,s=r.autoZoom,a=km(r,["stencilSize","autoZoom"]),l=HSr();return ku(s)||(i.postProcess||o?l("prop 'autoZoom' is deprecated now and will be removed, use 'postProcess' prop to pass your auto zoom function."):(l("prop 'autoZoom' is deprecated now and will be removed, use 'postProcess' prop to pass your auto zoom function. The 'postProcess' automatically set to 'hybridAutoZoom'"),i.postProcess=zSr)),ku(o)?Z.createElement(VUt,Et({},i,{ref:e,settings:a})):(l("prop 'stencilSize' is deprecated for <Cropper/> component now and will be removed, use <FixedCropper/> component instead."),Z.createElement(HUt,Et({ref:e,stencilSize:o},a,i)))});WUt.displayName="CropperComponent";var vNr=b.forwardRef(function(t,e){var n=t.cropper,i=t.coordinates,r=t.handlerComponent,o=r===void 0?BHe:r,s=t.handlers,a=s===void 0?{eastNorth:!0,westNorth:!0,westSouth:!0,eastSouth:!0}:s,l=t.handlerClassNames,c=l===void 0?{}:l,u=t.handlerWrapperClassNames,d=u===void 0?{}:u,h=t.lines,f=h===void 0?{west:!0,north:!0,east:!0,south:!0}:h,m=t.lineComponent,p=m===void 0?VHe:m,g=t.lineClassNames,y=g===void 0?{}:g,_=t.lineWrapperClassNames,w=_===void 0?{}:_,C=t.resizable,N=C===void 0?!0:C,E=t.movable,D=E===void 0?!0:E,k=t.grid,M=t.gridClassName,T=t.className,A=t.movingClassName,R=t.resizingClassName,P=t.previewClassName,O=t.boundingBoxClassName,V=t.overlayClassName,F=t.draggableAreaClassName,$=t.disabled,B=n.getState(),z=n.getTransitions(),H=n.getInteractions(),K=N&&!$,q=D&&!$;b.useImperativeHandle(e,function(){return{aspectRatio:1,boundingBox:"circle"}});var U=function(Q){n&&q&&n.moveCoordinates(Q)},Y=function(){n&&n.moveCoordinatesEnd()},J=function(Q,be,le){n&&K&&n.resizeCoordinates(Q,be,le)},ae=function(){n&&n.resizeCoordinatesEnd()},se=i?ha(i)?i(B):i:OHe(B),oe=se.width,fe=se.height,de=se.left,ie=se.top;return B&&Z.createElement(jUt,{className:Me("advanced-cropper-circle-stencil",T,H.moveCoordinates&&A,H.resizeCoordinates&&R,{"advanced-cropper-circle-stencil--movable":q,"advanced-cropper-circle-stencil--moving":H.moveCoordinates,"advanced-cropper-circle-stencil--resizable":K,"advanced-cropper-circle-stencil--resizing":H.resizeCoordinates,"advanced-cropper-circle-stencil--disabled":$}),width:oe,height:fe,left:de,top:ie,transitions:z},Z.createElement(PUt,{reference:B.coordinates,className:Me(O,"advanced-cropper-circle-stencil__bounding-box"),handlers:a,handlerComponent:o,handlerClassNames:c,handlerWrapperClassNames:d,lines:f,lineComponent:p,lineClassNames:y,lineWrapperClassNames:w,onResize:J,onResizeEnd:ae,disabled:!K},Z.createElement(ige,{disabled:!q,onMove:U,onMoveEnd:Y,className:Me("advanced-cropper-circle-stencil__draggable-area",F)},Z.createElement(OUt,{className:Me("advanced-cropper-circle-stencil__overlay",V)},k&&Z.createElement(FUt,{visible:n.hasInteractions(),columns:H.transformImage.rotate?9:3,rows:H.transformImage.rotate?9:3,className:Me("advanced-cropper-circle-stencil__grid",M)}),Z.createElement("div",{className:Me("advanced-cropper-circle-stencil__preview",P)})))))});vNr.displayName="CircleStencil";var yNr=b.forwardRef(function(t,e){var n=t.src,i=t.crossOrigin,r=i===void 0?!0:i,o=km(t,["src","crossOrigin"]);return n?Z.createElement("img",Et({key:n,ref:e,src:n,className:Me("advanced-cropper-source"),crossOrigin:r===!0?"anonymous":r||void 0},o)):null});yNr.displayName="CropperSource";var _Nr=function(t){var e=t.children,n=t.cropper,i=t.className,r=t.style;return Z.createElement("div",{className:Me(i,"cropper-preview-wrapper"),style:r},Z.createElement(TUt,{visible:n==null?void 0:n.isLoaded(),className:"cropper-preview-wrapper__fade"},e))},xNr=function(t){var e=t.className,n=t.cropper,i=t.crossOrigin,r=i===void 0?!0:i,o=t.size,s=t.style,a=n.getState(),l=n.getTransitions(),c=n.getImage(),u=o&&c&&(a!=null&&a.coordinates)?VSr(c,a,o,l):{},d=c?c.src:void 0;return d?Z.createElement("img",{key:d,className:Me("advanced-cropper-background-image",e),src:d,crossOrigin:r===!0?"anonymous":r||void 0,style:Et(Et({},u),s),onMouseDown:IUt}):null};b.forwardRef(function(t,e){var n,i,r,o,s=t.className,a=t.contentClassName,l=t.state,c=l===void 0?null:l,u=t.image,d=u===void 0?null:u,h=t.transitions,f=h===void 0?null:h,m=t.backgroundComponent,p=m===void 0?xNr:m,g=t.backgroundProps,y=t.backgroundClassName,_=t.boundaryComponent,w=_===void 0?$He:_,C=t.boundaryProps,N=t.boundaryClassName,E=t.wrapperComponent,D=E===void 0?_Nr:E,k=t.wrapperProps,M=t.loaded,T=M===void 0?!0:M,A=t.loading,R=A===void 0?!1:A,P=t.style,O=t.cropper,V=MUt(),F=b.useRef(null),$=b.useRef(null),B=O||($.current?$:{current:{getState:function(){return c},getTransitions:function(){return f},getImage:function(){return d},isLoaded:function(){return T},isLoading:function(){return R}}}),z=Ac(b.useState(null),2),H=z[0],K=z[1],q=(i=(n=B.current)===null||n===void 0?void 0:n.getState())===null||i===void 0?void 0:i.coordinates,U=(o=(r=B.current)===null||r===void 0?void 0:r.getImage())===null||o===void 0?void 0:o.src,Y=H?{width:"".concat(H.width,"px"),height:"".concat(H.height,"px")}:{},J=function(){var fe,de,ie=(de=(fe=B.current)===null||fe===void 0?void 0:fe.getState())===null||de===void 0?void 0:de.coordinates;F.current&&ie&&F.current.stretchTo(ie).then(function(Q){Q&&ie?Lk(Mo(ie),Mo(Q))?K({width:Q.width,height:Q.width/Mo(ie)}):K({width:Q.height*Mo(ie),height:Q.height}):K(null)}),V()};LUt(J),b.useLayoutEffect(J,[q==null?void 0:q.height,q==null?void 0:q.width]),b.useImperativeHandle(e,function(){return{refresh:J,update:function(fe){fe?$.current=fe:$.current=null,J()}}});var ae=D,se=p,oe=w;return Z.createElement(ae,Et({},k,{className:Me(s,"advanced-cropper-preview"),cropper:B.current,style:P}),Z.createElement(oe,Et({ref:F,stretchAlgorithm:ESr},C,{className:Me("advanced-cropper-preview__boundary",N)}),Z.createElement("div",{className:Me(a,"advanced-cropper-preview__content"),style:Y},B.current&&Z.createElement(se,Et({},g,{cropper:B.current,size:H,className:Me(y,"advanced-cropper-preview__image",U&&"advanced-cropper-preview__image--visible")})))))});function wNr({file:t,isOpen:e,aspect:n=1,onClose:i,onSave:r}){var d;const o=Mt();let s=b.useRef(void 0);const[a,l]=b.useState(!1),c=async()=>{try{if(!s.current||!t)return;r(s.current)}catch(h){console.error("Failed to crop image",h),In.show({color:"red",autoClose:1e4,message:o.formatMessage({id:"shared.image_upload.notification.crop_failed",defaultMessage:"Failed to edit image"})})}l(!1)},u=h=>{t&&KA(()=>{const f=h.getCanvas();f&&f.toBlob(m=>{if(!m)return;const p=t.type.includes("svg")?"image/png":t.type;s.current=new File([m],t.name,{type:p})})},500)};return v.jsxDEV(bl,{opened:e,onClose:i,title:o.formatMessage({id:"shared.image_upload.crop.title",defaultMessage:"Edit image"}),closeButtonProps:{"aria-label":o.formatMessage({id:"shared.modal.close",defaultMessage:"Close modal"})},children:v.jsxDEV(Gt,{children:[v.jsxDEV(WUt,{onChange:u,src:(d=t==null?void 0:t.data)==null?void 0:d.toString(),stencilProps:{aspectRatio:n},className:"w-full max-h-96 rounded overflow-hidden"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ImageUpload/CropModal.tsx",lineNumber:77,columnNumber:5},this),v.jsxDEV(un,{justify:"flex-end",gap:"xs",children:[v.jsxDEV(Nn,{type:"button",variant:"outline",size:"xs",onClick:i,children:v.jsxDEV(ee,{id:"shared.button.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ImageUpload/CropModal.tsx",lineNumber:86,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ImageUpload/CropModal.tsx",lineNumber:85,columnNumber:6},this),v.jsxDEV(Nn,{size:"xs",onClick:c,loading:a,children:v.jsxDEV(ee,{id:"shared.button.ok",defaultMessage:"Ok"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ImageUpload/CropModal.tsx",lineNumber:89,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ImageUpload/CropModal.tsx",lineNumber:88,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ImageUpload/CropModal.tsx",lineNumber:84,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ImageUpload/CropModal.tsx",lineNumber:76,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ImageUpload/CropModal.tsx",lineNumber:65,columnNumber:3},this)}const CNr={"file-invalid-type":{id:"shared.image_upload.error.invalid_type",defaultMessage:"File type is not supported"},"file-too-large":{id:"shared.image_upload.error.to_large",defaultMessage:"File cannot be larger then 5MB"}};function UUt({id:t,value:e,aspect:n,disabled:i,ariaLabel:r,placeholder:o,defaultValue:s,isLoading:a,readOnly:l,onUpload:c,className:u="w-20 h-20"}){const d=Mt(),h=b.useRef(),[f,m]=b.useState(!1),[p,g]=b.useState(),[y,_]=Pc(!1),w=e||s,C=async D=>{if(!l){m(!0),g(void 0);try{h.current=await Pri(D[0]),_.open()}catch(k){console.error("Failed to locally upload image",k),In.show({color:"red",autoClose:1e4,message:d.formatMessage({id:"shared.image_upload.notification.failed",defaultMessage:"Failed to upload image"})})}m(!1)}},N=D=>{g(D[0].errors[0].code)},E=async D=>{if(l)return;const k=await new Promise(M=>xPt(D,M));c({file:D,data:k})};return v.jsxDEV(Gt,{gap:5,children:[v.jsxDEV(ECr,{id:t,role:"button",multiple:!1,onDrop:C,onReject:N,accept:NCr,maxSize:F$e.maxAvatar,disabled:i||l,loading:f||a,"aria-label":r||d.formatMessage({id:"shared.image_upload.aria_label",defaultMessage:"Upload image"}),className:Vt("!p-0 [&>.mantine-Dropzone-inner]:h-full",l?"!cursor-default":"hover:border-theme-primary",p?"!border-red-400":"",u),children:[!w&&v.jsxDEV(iw,{className:"h-full",children:v.jsxDEV(Qe,{c:"dimmed",size:"xs",className:"text-center",children:o||v.jsxDEV(ee,{id:"shared.image_upload.placeholder",defaultMessage:"Add image"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ImageUpload/index.tsx",lineNumber:126,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ImageUpload/index.tsx",lineNumber:124,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ImageUpload/index.tsx",lineNumber:123,columnNumber:6},this),w&&v.jsxDEV(Q5e,{radius:"md",src:w,className:"w-full",fit:"contain",alt:""},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ImageUpload/index.tsx",lineNumber:131,columnNumber:16},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ImageUpload/index.tsx",lineNumber:101,columnNumber:4},this),p&&v.jsxDEV(Qe,{c:"red",size:"xs",className:"w-full",children:v.jsxDEV(ee,{...CNr[p]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ImageUpload/index.tsx",lineNumber:135,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ImageUpload/index.tsx",lineNumber:134,columnNumber:5},this),v.jsxDEV(wNr,{aspect:n,onSave:E,isOpen:y,file:h.current,onClose:_.close},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ImageUpload/index.tsx",lineNumber:138,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/ImageUpload/index.tsx",lineNumber:100,columnNumber:3},this)}function KUt({project:t}){const e="project_agent_avatar",n=Mt(),i=Je.useUtils(),r=b.useRef(),o=Oi(ps),[s,a]=b.useState(!1),l=Wd(S$),c=Je.updateAgent.useMutation(),u=Je.getSignedUrl.useMutation(),d=Je.generateAssetLink.useMutation(),h=gt.object({name:gt.string({required_error:n.formatMessage({id:"layout.assistant.form.name.error.required",defaultMessage:"Name is required"})}).min(1,{message:n.formatMessage({id:"layout.assistant.form.name.error.required",defaultMessage:"Name is required"})}).max(48,{message:n.formatMessage({id:"layout.assistant.form.name.error.max_length",defaultMessage:"Name cannot be longer then 48 characters."})}),avatar:gt.string({required_error:n.formatMessage({id:"layout.assistant.form.avatar.error.required",defaultMessage:"Avatar is required"})})}),f=ls({mode:"uncontrolled",validateInputOnBlur:!0,validate:aa(h),initialValues:structuredClone(t.agent),onValuesChange:y=>{l(structuredClone(y)),a(f.isValid()&&f.isDirty())}}),m=async y=>{try{const _=await p();await c.mutateAsync({...y,avatar:_||y.avatar}),a(!1),f.setInitialValues(structuredClone(y)),i.project.getCurrent.invalidate(),In.show({color:"green",autoClose:5e3,message:n.formatMessage({id:"layout.assistant.update.notification.succeeded",defaultMessage:"Assistant has been updated"})})}catch(_){console.error("Failed to update assistant config",_),In.show({color:"red",title:n.formatMessage({id:"layout.assistant.update.notification.failed.title",defaultMessage:"Assistant could not be updated"}),message:n.formatMessage({id:"layout.assistant.update.notification.failed.message",defaultMessage:"We cannot update your assistant at this moment, please try again later."}),autoClose:1e4})}},p=async()=>{const y=r.current;if(!y)return;const _=await u.mutateAsync({contentType:y.type,fileName:e});return new Promise(w=>{die({file:y,action:_,onSuccess:async()=>{let E=await d.mutateAsync({fileName:e,type:"directLink"});w(`${E}?v=${hie({max:69420,min:1})}`)},onError:()=>{In.show({color:"red",autoClose:1e4,message:n.formatMessage({id:"layout.assistant.avatar.upload.failed",defaultMessage:"Something went wrong while uploading the avatar."})})}})})},g=async({data:y,file:_})=>{r.current=_,f.setFieldValue("avatar",y)};return v.jsxDEV(Wi.Item,{id:"assistant",value:"assistant",className:"!bg-white",children:[v.jsxDEV(Wi.Control,{children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"layout.assistant.title",defaultMessage:"Assistant persona"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Assistant.tsx",lineNumber:152,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Assistant.tsx",lineNumber:151,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Assistant.tsx",lineNumber:150,columnNumber:4},this),v.jsxDEV(Wi.Panel,{children:v.jsxDEV("form",{onSubmit:f.onSubmit(m),children:[v.jsxDEV(Vo,{id:"agentName",label:n.formatMessage({id:"layout.assistant.name.label",defaultMessage:"Name"}),children:v.jsxDEV(pa,{id:"agentName",...f.getInputProps("name"),readOnly:!o},f.key("name"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Assistant.tsx",lineNumber:161,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Assistant.tsx",lineNumber:157,columnNumber:6},this),v.jsxDEV(Vo,{id:"agentAvatar",label:n.formatMessage({id:"layout.assistant.avatar.label",defaultMessage:"Avatar"}),children:v.jsxDEV(UUt,{id:"agentAvatar",readOnly:!o,onUpload:g,...f.getInputProps("avatar"),ariaLabel:n.formatMessage({id:"layout.assistant.avatar.aria_label",defaultMessage:"Change assistant avatar"})},f.key("avatar"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Assistant.tsx",lineNumber:172,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Assistant.tsx",lineNumber:168,columnNumber:6},this),o&&v.jsxDEV(Nn,{type:"submit",loading:c.isLoading,disabled:!s,size:"sm",children:v.jsxDEV(ee,{id:"shared.submit",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Assistant.tsx",lineNumber:186,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Assistant.tsx",lineNumber:185,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Assistant.tsx",lineNumber:156,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Assistant.tsx",lineNumber:155,columnNumber:4},this)]},"assistant",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Assistant.tsx",lineNumber:149,columnNumber:3},this)}function qUt({widget:t,organization:e}){const n=Mt(),i=Je.useUtils(),r=Oi(ps),[o,s]=b.useState(!1),a=Wd(bR),l=Je.layout.updateStyling.useMutation(),c=gt.object({fontColor:gt.string({required_error:n.formatMessage({id:"layout.branding.form.font_color.required",defaultMessage:"Font color is required"})}).startsWith("#",{message:n.formatMessage({id:"layout.branding.form.error.starts_with",defaultMessage:"Hex color should start with #"})}).max(7,{message:n.formatMessage({id:"layout.branding.form.error.max_length",defaultMessage:"Expected a hex color"})}),backgroundColor:gt.string({required_error:n.formatMessage({id:"layout.branding.form.background_color.required",defaultMessage:"Background color is required"})}).startsWith("#",{message:n.formatMessage({id:"layout.branding.form.error.starts_with",defaultMessage:"Hex color should start with #"})}).max(7,{message:n.formatMessage({id:"layout.branding.form.error.max_length",defaultMessage:"Expected a hex color"})}),css:gt.string().optional()}),u=ls({mode:"uncontrolled",validateInputOnBlur:!0,validate:aa(c),initialValues:structuredClone(t.styling),onValuesChange:h=>{s(u.isValid()&&u.isDirty()),a(structuredClone(h))}}),d=async h=>{try{await l.mutateAsync({styling:h}),s(!1),u.setInitialValues(structuredClone(h)),i.getWidget.invalidate(),In.show({color:"green",message:n.formatMessage({id:"layout.branding.update.notification.succeeded",defaultMessage:"Branding has been updated"}),autoClose:5e3})}catch(f){console.error("Failed to update branding config",f),In.show({color:"red",title:n.formatMessage({id:"layout.branding.update.notification.failed.title",defaultMessage:"Branding could not be updated"}),message:n.formatMessage({id:"layout.branding.update.notification.failed.message",defaultMessage:"We cannot update your branding at this moment, please try again later."}),autoClose:1e4})}};return v.jsxDEV(Wi.Item,{id:"branding",value:"branding",className:"!bg-white",children:[v.jsxDEV(Wi.Control,{children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"layout.branding.title",defaultMessage:"Branding"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Branding.tsx",lineNumber:125,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Branding.tsx",lineNumber:124,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Branding.tsx",lineNumber:123,columnNumber:4},this),v.jsxDEV(Wi.Panel,{children:v.jsxDEV("form",{onSubmit:u.onSubmit(d),children:[v.jsxDEV(Vo,{id:"fontColor",label:n.formatMessage({id:"layout.branding.font_color.label",defaultMessage:"Font color"}),children:v.jsxDEV(Ine,{id:"fontColor",readOnly:!r,...u.getInputProps("fontColor")},u.key("fontColor"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Branding.tsx",lineNumber:137,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Branding.tsx",lineNumber:130,columnNumber:6},this),v.jsxDEV(Vo,{id:"backgroundColor",label:n.formatMessage({id:"layout.branding.background_color.label",defaultMessage:"Background color"}),children:v.jsxDEV(Ine,{id:"backgroundColor",readOnly:!r,...u.getInputProps("backgroundColor")},u.key("backgroundColor"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Branding.tsx",lineNumber:151,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Branding.tsx",lineNumber:144,columnNumber:6},this),v.jsxDEV(Vo,{id:"css",label:n.formatMessage({id:"layout.branding.css.label",defaultMessage:"Custom CSS"}),help:n.formatMessage({id:"layout.branding.css.help",defaultMessage:"Customize fonts, alter backgrounds, redesign chat bubbles, and much more."}),vertical:e==null?void 0:e.permissions.customCss,children:[!(e!=null&&e.permissions.customCss)&&v.jsxDEV(Nn,{size:"sm",to:"/billing",variant:"subtle",component:Np,className:"justify-self-start !text-theme-primary focus-within:bg-theme-primary/10",children:v.jsxDEV(ee,{id:"layout.branding.css.upgrade",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Branding.tsx",lineNumber:178,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Branding.tsx",lineNumber:171,columnNumber:8},this),(e==null?void 0:e.permissions.customCss)&&v.jsxDEV(Z7e,{theme:"light",language:"css",readOnly:!r,suggestions:D1r[t.type],...u.getInputProps("css"),ariaLabel:n.formatMessage({id:"layout.branding.css.aria_label",defaultMessage:"Custom CSS code editor"}),value:u.getInputProps("css").defaultValue,className:"w-full min-h-48 rounded border border-[var(--mantine-color-gray-4)] border-solid"},u.key("css"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Branding.tsx",lineNumber:182,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Branding.tsx",lineNumber:158,columnNumber:6},this),r&&v.jsxDEV(Nn,{type:"submit",loading:l.isLoading,disabled:!o,size:"sm",children:v.jsxDEV(ee,{id:"shared.submit",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Branding.tsx",lineNumber:200,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Branding.tsx",lineNumber:199,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Branding.tsx",lineNumber:129,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Branding.tsx",lineNumber:128,columnNumber:4},this)]},"branding",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/Branding.tsx",lineNumber:122,columnNumber:3},this)}function GUt({widget:t,organization:e}){var h,f,m,p;const n=Mt(),i=Je.useUtils(),r=Oi(ps),o=Wd(wM),[s,a]=b.useState(!1),l=Je.layout.updateLayout.useMutation(),c=gt.object({showHeader:gt.boolean().default(!0),showAvatar:gt.boolean().default(!0),isWhiteLabeled:gt.boolean().default(!1),showSourceReferences:gt.boolean().default(!1)}),u=ls({mode:"uncontrolled",validateInputOnBlur:!0,validate:aa(c),initialValues:structuredClone(t.layout||{}),onValuesChange:g=>{a(u.isValid()&&u.isDirty()),o(structuredClone(g))}}),d=async g=>{try{await l.mutateAsync(g),a(!1),u.setInitialValues(structuredClone(g)),i.getWidget.invalidate(),In.show({color:"green",message:n.formatMessage({id:"layout.shared.layout.update.notification.succeeded",defaultMessage:"Layout has been updated"}),autoClose:5e3})}catch(y){console.error("Failed to update layout config",y),In.show({color:"red",title:n.formatMessage({id:"layout.shared.layout.update.notification.failed.title",defaultMessage:"Layout could not be updated"}),message:n.formatMessage({id:"layout.shared.layout.update.notification.failed.message",defaultMessage:"We cannot update your layout at this moment, please try again later."}),autoClose:1e4})}};return v.jsxDEV(Wi.Item,{value:"layout",className:"!bg-white",children:[v.jsxDEV(Wi.Control,{children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"layout.shared.layout.title",defaultMessage:"Layout"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:88,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:87,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:86,columnNumber:4},this),v.jsxDEV(Wi.Panel,{children:v.jsxDEV("form",{onSubmit:u.onSubmit(d),children:[v.jsxDEV(Vo,{id:"showHeader",label:n.formatMessage({id:"layout.shared.layout.show_header.label",defaultMessage:"Show header"}),children:v.jsxDEV(Du,{id:"showHeader",...u.getInputProps("showHeader",{type:"checkbox"})},u.key("showHeader"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:100,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:93,columnNumber:6},this),v.jsxDEV(Vo,{id:"showAvatar",label:n.formatMessage({id:"layout.shared.layout.show_avatar.label",defaultMessage:"Show avatar"}),children:v.jsxDEV(Du,{id:"showAvatar",...u.getInputProps("showAvatar",{type:"checkbox"})},u.key("showAvatar"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:113,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:106,columnNumber:6},this),v.jsxDEV(Vo,{id:"showSourceReferences",label:n.formatMessage({id:"form_config.advanced.show_source_references.label",defaultMessage:"Show source references"}),help:n.formatMessage({id:"form_config.advanced.show_source_references.help",defaultMessage:"Display the sources used to generate the assistant's response beneath the message."}),children:[((h=e==null?void 0:e.permissions)==null?void 0:h.showSourceReference)&&v.jsxDEV(Du,{id:"showSourceReferences",...u.getInputProps("showSourceReferences",{type:"checkbox"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:132,columnNumber:8},this),!((f=e==null?void 0:e.permissions)!=null&&f.showSourceReference)&&v.jsxDEV(Nn,{size:"sm",to:"/billing",variant:"subtle",component:Np,className:"!text-theme-primary focus-within:bg-theme-primary/10",children:v.jsxDEV(ee,{id:"shared.button.upgrade",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:145,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:138,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:119,columnNumber:6},this),v.jsxDEV(Vo,{id:"isWhiteLabeled",label:n.formatMessage({id:"layout.shared.layout.is_white_labeled.label",defaultMessage:"Hide Chathive branding"}),children:[((m=e==null?void 0:e.permissions)==null?void 0:m.removeBranding)&&v.jsxDEV(Du,{id:"isWhiteLabeled",...u.getInputProps("isWhiteLabeled",{type:"checkbox"})},u.key("isWhiteLabeled"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:157,columnNumber:8},this),!((p=e==null?void 0:e.permissions)!=null&&p.removeBranding)&&v.jsxDEV(Nn,{size:"sm",to:"/billing",variant:"subtle",component:Np,className:"!text-theme-primary focus-within:bg-theme-primary/10",children:v.jsxDEV(ee,{id:"shared.button.upgrade",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:171,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:164,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:149,columnNumber:6},this),r&&v.jsxDEV(Nn,{type:"submit",loading:l.isLoading,disabled:!s,size:"sm",children:v.jsxDEV(ee,{id:"shared.submit",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:177,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:176,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:92,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:91,columnNumber:4},this)]},"layout",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/LayoutSettings.tsx",lineNumber:85,columnNumber:3},this)}const ISe=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform"];function YUt({widget:t,organization:e}){var f,m;const n=Mt(),i=Qr(),r=Je.useUtils(),[o,s]=b.useState(!1),a=!Oi(ps),l=Je.layout.updateUTMTags.useMutation(),c=gt.object({list:gt.array(gt.object({key:gt.enum(ISe),value:gt.string({required_error:n.formatMessage({id:"layout.utm_tags.form.required",defaultMessage:"UTM Tag value is required"})}).min(1,{message:n.formatMessage({id:"layout.utm_tags.form.required",defaultMessage:"UTM Tag value is required"})}).max(512,{message:n.formatMessage({id:"layout.utm_tags.form.error.max_length",defaultMessage:"UTM Tag value cannot be longer then 512 characters."})})}))}),u=()=>({list:Object.entries(t.utmTags||{}).map(([p,g])=>({key:p,value:g}))}),d=ls({mode:"uncontrolled",validateInputOnBlur:!0,validate:aa(c),initialValues:u(),onValuesChange:()=>s(d.isValid()&&d.isDirty())}),h=async p=>{try{const g=p.list.reduce((y,_)=>({...y,[_.key]:_.value}),{});await l.mutateAsync({utmTags:g}),s(!1),d.setInitialValues(p),r.getWidget.invalidate(),In.show({color:"green",message:n.formatMessage({id:"layout.utm_tags.update.notification.succeeded",defaultMessage:"UTM tags have been updated"}),autoClose:5e3})}catch(g){console.error("Failed to updated UTM tags",g),In.show({color:"red",title:n.formatMessage({id:"layout.utm_tags.update.notification.failed.title",defaultMessage:"UTM tags could not be updated"}),message:n.formatMessage({id:"layout.utm_tags.update.notification.failed.message",defaultMessage:"We cannot update your UTM tags at this moment, please try again later."}),autoClose:1e4})}};return v.jsxDEV(Wi.Item,{value:"utmTags",className:"!bg-white",children:[v.jsxDEV(Wi.Control,{children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"layout.utm_tags.title",defaultMessage:"UTM Tags"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:130,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:129,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:128,columnNumber:4},this),v.jsxDEV(Wi.Panel,{children:[!(e!=null&&e.permissions.utmTags)&&v.jsxDEV(Yo,{color:"blue",variant:"light",title:n.formatMessage({id:"layout.utm_tags.upgrade_banner.Title",defaultMessage:"Upgrade to configure UTM tags"}),children:v.jsxDEV(uu,{gap:"xs",children:[v.jsxDEV(ee,{id:"layout.utm_tags.upgrade_banner.description",defaultMessage:"Add UTM tags into URL's within the widget's welcome message, responses and sourced websites to effectively track marketing performance."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:144,columnNumber:8},this),v.jsxDEV(Nn,{size:"xs",onClick:()=>i("/billing"),className:"min-w-fit",children:v.jsxDEV(ee,{id:"layout.utm_tags.upgrade_banner.upgrade",defaultMessage:"Upgrade my plan"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:149,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:148,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:143,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:135,columnNumber:6},this),(e==null?void 0:e.permissions.utmTags)&&v.jsxDEV("form",{onSubmit:d.onSubmit(h),children:v.jsxDEV(Gt,{align:"flex-start",gap:"xs",mt:"xs",children:[v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"layout.utm_tags.description",defaultMessage:"Incorporate UTM tags into URL's within the widget description, welcome message, responses and sourced websites in your chatbot app to effectively track marketing performance."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:161,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:160,columnNumber:8},this),(f=d.values.list)==null?void 0:f.map((p,g)=>v.jsxDEV("div",{className:"w-full flex flex-row sm:gap-4 items-start",children:[v.jsxDEV(Fm,{readOnly:a,...d.getInputProps(`list.${g}.key`),placeholder:n.formatMessage({id:"layout.utm_tags.key.placeholder",defaultMessage:"Select tag"}),"aria-label":n.formatMessage({id:"layout.utm_tags.key.aria_label",defaultMessage:"Select UTM tag"}),data:ISe.reduce((y,_)=>d.values.list.find((w,C)=>w.key===_&&g!==C)?y:[...y,_],[])},d.key(`list.${g}.key`),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:171,columnNumber:10},this),v.jsxDEV(pa,{readOnly:a,...d.getInputProps(`list.${g}.value`),"aria-label":n.formatMessage({id:"layout.utm_tags.value.aria_label",defaultMessage:"UTM tag value"}),placeholder:n.formatMessage({id:"layout.utm_tags.value.placeholder",defaultMessage:"UTM Tag value"}),className:"w-full"},d.key(`list.${g}.value`),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:196,columnNumber:10},this),!a&&v.jsxDEV(Fr,{size:"lg",color:"red",variant:"subtle","aria-label":n.formatMessage({id:"layout.utm_tags.delete.aria_label",defaultMessage:"Delete"}),onClick:()=>d.removeListItem("list",g),children:v.jsxDEV(Lw,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:220,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:210,columnNumber:26},this)]},d.key(`list.${g}`),!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:167,columnNumber:9},this)),(((m=d.values.list)==null?void 0:m.length)||0)<ISe.length&&!a&&v.jsxDEV(Nn,{size:"xs",variant:"subtle",leftSection:v.jsxDEV(GA,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:228,columnNumber:23},this),onClick:()=>d.insertListItem("list",{}),children:v.jsxDEV(ee,{id:"layout.utm_tags.add",defaultMessage:"Add UTM tag"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:231,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:225,columnNumber:9},this),!a&&v.jsxDEV(Nn,{type:"submit",loading:l.isLoading,disabled:!o,size:"sm",children:v.jsxDEV(ee,{id:"shared.submit",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:237,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:236,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:159,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:158,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:133,columnNumber:4},this)]},"utmTags",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/shared/UtmTags.tsx",lineNumber:127,columnNumber:3},this)}const SNr=Ja.getAllCodes();function NNr({value:t,disableLanguage:e,excludedLanguages:n,projectLanguages:i,renderFooter:r,onSubmit:o}){const s=Mt(),a=gt.object({language:gt.enum(SNr,{required_error:s.formatMessage({id:"layout.ai_form.language.form.language.required",defaultMessage:"Language is required"})}),title:gt.string().max(128,{message:s.formatMessage({id:"layout.ai_form.language.form.title.max_length",defaultMessage:"Title cannot be longer then 128 characters"})}).optional(),welcomeMessage:gt.string({required_error:s.formatMessage({id:"layout.ai_form.language.form.welcomeMessage.required",defaultMessage:"Welcome message is required"})}).min(1,{message:s.formatMessage({id:"layout.ai_form.language.form.welcomeMessage.required",defaultMessage:"Welcome message is required"})}).max(2048,{message:s.formatMessage({id:"layout.ai_form.language.form.welcomeMessage.max_length",defaultMessage:"Welcome message cannot be longer then 4.096 characters"})}),startButton:gt.string({required_error:s.formatMessage({id:"layout.ai_form.language.form.start_button.required",defaultMessage:"Start button is required"})}).max(256,{message:s.formatMessage({id:"layout.ai_form.language.form.start_button.max_length",defaultMessage:"Start button cannot be longer then 256 characters"})}).optional(),replyField:gt.string().max(48,{message:s.formatMessage({id:"layout.ai_form.language.form.reply_field.max_length",defaultMessage:"Reply field placeholder cannot be longer then 48 characters"})}).optional()}),l=b.useMemo(()=>[...i].filter(m=>!n.has(m))[0],[i,n]),[c,u]=b.useState(!1),d=ls({validateInputOnBlur:!0,validate:aa(a),initialValues:{language:l,...t},onValuesChange:()=>u(d.isValid()&&d.isDirty())}),h=()=>{const{language:f,...m}=d.values;o({[`${f}`]:m})};return v.jsxDEV("form",{onSubmit:f=>{f.preventDefault(),f.stopPropagation(),h()},children:v.jsxDEV(Gt,{gap:"sm",children:[v.jsxDEV(wS,{strict:!1,allowDeselect:!1,disabled:e,locales:new Set(i),exclude:new Set([...n].filter(f=>f!==(t==null?void 0:t.language))),...d.getInputProps("language"),label:s.formatMessage({id:"layout.ai_form.language.form.language.label",defaultMessage:"Language"})},d.key("language"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:128,columnNumber:5},this),d.values.language&&!i.has(d.values.language)&&v.jsxDEV(Yo,{children:v.jsxDEV(ee,{id:"shared.language.info.unsupported",defaultMessage:"{language} has not been added to your project, we will add it for you.",values:{language:Mp(Ja.getName(d.values.language))}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:143,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:142,columnNumber:6},this),v.jsxDEV(pa,{...d.getInputProps("title"),label:v.jsxDEV(_m,{label:s.formatMessage({id:"layout.ai_form.language.form.title.label",defaultMessage:"Title"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:154,columnNumber:7},this)},d.key("title"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:150,columnNumber:5},this),v.jsxDEV(ra.Wrapper,{id:"welcomeMessage",label:s.formatMessage({id:"layout.ai_form.language.form.welcomeMessage.label",defaultMessage:"Welcome message"}),children:v.jsxDEV(_ae,{...d.getInputProps("welcomeMessage"),className:"max-h-[124px] overflow-y"},d.key("welcomeMessage"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:169,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:162,columnNumber:5},this),v.jsxDEV(Th,{...d.getInputProps("startButton"),label:v.jsxDEV(_m,{label:s.formatMessage({id:"layout.ai_form.language.form.startButton.label",defaultMessage:"Start button"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:179,columnNumber:7},this),description:s.formatMessage({id:"layout.ai_form.language.form.startButton.description",defaultMessage:"If you don't set a start button your customer will see the reply field"}),minRows:1,maxRows:4,autosize:!0},d.key("startButton"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:175,columnNumber:5},this),v.jsxDEV(pa,{...d.getInputProps("replyField"),label:v.jsxDEV(_m,{label:s.formatMessage({id:"layout.ai_form.language.form.reply_field.label",defaultMessage:"Reply field placeholder"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:198,columnNumber:7},this)},d.key("replyField"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:194,columnNumber:5},this),r({isValid:c})]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:127,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:120,columnNumber:3},this)}function ENr({widget:t,project:e,organization:n}){const i=Mt(),r=Je.useUtils(),o=!Oi(ps),s=Je.aiForm.patchContent.useMutation(),a=Je.layout.deleteContentLanguage.useMutation();async function l(u){try{await a.mutateAsync({language:u}),In.show({color:"green",message:i.formatMessage({id:"layout.ai_form.languages.delete.succeeded",defaultMessage:"Successfully deleted language"}),autoClose:5e3}),r.getWidget.invalidate(),r.project.getCurrent.invalidate()}catch{In.show({color:"red",message:i.formatMessage({id:"layout.ai_form.languages.delete.failed",defaultMessage:"Something went wrong while deleting language, please try again later."}),autoClose:1e4}),r.getWidget.invalidate()}}const c=async u=>{try{await s.mutateAsync({content:u}),r.getWidget.invalidate(),r.project.getCurrent.invalidate(),In.show({color:"green",message:i.formatMessage({id:"layout.ai_form.languages.update.succeeded",defaultMessage:"Successfully update languages"}),autoClose:5e3})}catch{In.show({color:"red",message:i.formatMessage({id:"layout.ai_form.languages.update.failed",defaultMessage:"Something went wrong while updating the languages, please try again later."}),autoClose:1e4})}};return v.jsxDEV(cG,{sectionKey:"languages",title:i.formatMessage({id:"layout.ai_form.languages.title",defaultMessage:"Languages"}),description:i.formatMessage({id:"layout.ai_form.languages.description",defaultMessage:"Present the text (title, welcome message, etc.) in your customer's language based on their device settings. If a language isn't included, the default will be used."}),project:e,readOnly:o,organization:n,isDeleting:a.isLoading,data:t.content,renderInTable:u=>v.jsxDEV(Qe,{size:"sm",truncate:"end",className:"w-full text-left",children:u.title||v.jsxDEV("span",{className:"italic",children:v.jsxDEV(ee,{id:"layout.ai_form.languages.title.fallback",defaultMessage:"No title set"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/index.tsx",lineNumber:101,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/index.tsx",lineNumber:100,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/index.tsx",lineNumber:98,columnNumber:5},this),onSubmit:c,onDelete:l,children:u=>v.jsxDEV(NNr,{...u,projectLanguages:new Set(e.languages),value:u.value&&{language:u.selectedLanguage,...u.value},renderFooter:({isValid:d})=>u.renderFooter({isValid:d,isLoading:s.isLoading})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/index.tsx",lineNumber:113,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/LayoutLanguages/index.tsx",lineNumber:81,columnNumber:3},this)}function DNr({project:t,widget:e,organization:n,accordionState:i,onAccordionChange:r}){return v.jsxDEV(Wi,{multiple:!0,className:"w-full",variant:"separated",value:i,onChange:r,children:[v.jsxDEV(KUt,{project:t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/index.tsx",lineNumber:18,columnNumber:4},this),v.jsxDEV(ENr,{project:t,widget:e,organization:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/index.tsx",lineNumber:19,columnNumber:4},this),v.jsxDEV(qUt,{widget:e,organization:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/index.tsx",lineNumber:20,columnNumber:4},this),v.jsxDEV(GUt,{widget:e,organization:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/index.tsx",lineNumber:21,columnNumber:4},this),v.jsxDEV(YUt,{widget:e,organization:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/index.tsx",lineNumber:22,columnNumber:4},this),v.jsxDEV(tUt,{widget:e,organization:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/index.tsx",lineNumber:23,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/LayoutForm/index.tsx",lineNumber:17,columnNumber:3},this)}function kNr({projectId:t}){return[{key:"setup.layout.aiForm.agent",selector:"#assistant",url:`/${t}/layout?accordion=agent`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{fw:"bold",className:"mb-2",children:v.jsxDEV(ee,{id:"layout.ai_form.walkthrough.agent.title",defaultMessage:"Personalize your assistant"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:15,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:14,columnNumber:6},this),v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"layout.ai_form.walkthrough.agent.description",defaultMessage:"Personalize your AI assistant, give it a friendly face that fits your brand."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:21,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:20,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:13,columnNumber:5},this)},{key:"setup.layout.aiForm.languages",selector:"#languages",url:`/${t}/layout?accordion=languages`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{fw:"bold",className:"mb-2",children:v.jsxDEV(ee,{id:"layout.ai_form.walkthrough.languages.title",defaultMessage:"Make your form multilingual"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:36,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:35,columnNumber:6},this),v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"layout.ai_form.walkthrough.languages.description",defaultMessage:"Localize your form's static texts and communicate with customers in their language."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:42,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:41,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:34,columnNumber:5},this)},{key:"setup.layout.aiForm.branding",selector:"#branding",url:`/${t}/layout?accordion=branding`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{fw:"bold",className:"mb-2",children:v.jsxDEV(ee,{id:"layout.ai_form.walkthrough.branding.title",defaultMessage:"Style the form"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:57,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:56,columnNumber:6},this),v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"layout.ai_form.walkthrough.branding.description",defaultMessage:"Customize the look and feel of your form to match your brand. You can change the font color, background color, and add custom CSS."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:63,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:62,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:55,columnNumber:5},this)},{key:"setup.layout.aiForm.preview",selector:"#previewChanges",url:`/${t}/layout?previewOpen=true`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{fw:"bold",className:"mb-2",children:v.jsxDEV(ee,{id:"layout.ai_form.walkthrough.preview.title",defaultMessage:"See your changes in real-time"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:78,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:77,columnNumber:6},this),v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"layout.ai_form.walkthrough.preview.description",defaultMessage:"Preview your changes in real-time before you'll publish the widget to your application."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:84,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:83,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/AiForm/WalkthroughSteps.tsx",lineNumber:76,columnNumber:5},this)}]}const XUt={id:"layout.chatbot.welcome_message_example",defaultMessage:"*Create a welcome message that encourages your customers to interact with the widget.*",description:"Start and end sentence with * to show it as italic"};function eyt({direction:t,sources:e,message:n}){const i=Oi(S$),r=Oi(LHe),o=Oi(wM),[s,a]=b.useState(void 0),l=t==="left";return v.jsxDEV("div",{role:"row","data-is-agent":l,className:Vt("w-full flex flex-row items-start gap-2",l?"justify-start":"justify-end",Ka.messageWrapper),children:[l&&(o==null?void 0:o.showAvatar)&&v.jsxDEV("img",{className:Vt("size-8 rounded",Ka.messageAvatar),src:i.avatar,alt:""},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Message.tsx",lineNumber:37,columnNumber:5},this),v.jsxDEV(Gt,{gap:4,children:[v.jsxDEV("div",{role:"gridcell",className:Vt("min-w-fit sm:max-w-prose p-2 font-normal rounded-lg shadow-lg border-solid border-[var(--cw-border-color-light)]",l?`${Ka.messageAssistant} border rounded-tl-sm bg-[var(--cw-card-bg-light)]`:`${Ka.messageCustomer} rounded-tr-sm bg-[var(--cw-accent-light)] outline-offset-2 `),children:[v.jsxDEV(Yg,{inverse:!l,className:l?"text-[var(--cw-color-light)]":"text-[var(--cw-accent-color-light)]",children:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Message.tsx",lineNumber:49,columnNumber:6},this),v.jsxDEV(lu,{duration:150,transition:"fade-down",mounted:!!(e!=null&&e.length&&(o!=null&&o.showSourceReferences)),children:c=>v.jsxDEV("div",{style:c,className:"mt-4 ${chatbotLayoutClasses.messageSources}",children:[v.jsxDEV("p",{className:" font-bold text-xs mb-1",children:v.jsxDEV(ee,{id:"layout.chatbot.preview.message.sources_label",defaultMessage:"Sources"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Message.tsx",lineNumber:63,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Message.tsx",lineNumber:62,columnNumber:9},this),v.jsxDEV(m$,{className:Ka.messageSourcesList,children:e==null?void 0:e.map(u=>v.jsxDEV("a",{href:"#",target:"_blank",rel:"noopener noreferrer",className:Vt("py-1 px-2 leading-normal rounded-md text-xs font-medium border border-accent-light text-accent-light","dark:border-accent-dark dark:text-accent-dark","active:scale-95 active:shadow duration-200",Ka.messageSourcesItem),children:u},u,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Message.tsx",lineNumber:70,columnNumber:11},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Message.tsx",lineNumber:68,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Message.tsx",lineNumber:61,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Message.tsx",lineNumber:55,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Message.tsx",lineNumber:40,columnNumber:5},this),(r==null?void 0:r.isFeedbackEnabled)&&l&&v.jsxDEV(un,{gap:4,className:Ka.messageVotes,children:[v.jsxDEV("button",{tabIndex:-1,"data-checked":s==="positive",onClick:()=>a("positive"),className:Vt("size-5 p-0 flex flex-col justify-center items-center cursor-pointer","border border-solid border-neutral-400 text-neutral-400 rounded bg-transparent","hover:border-green-500 hover:text-green-500 hover:bg-green-100","data-[checked=true]:border-green-500 data-[checked=true]:text-white data-[checked=true]:bg-green-500",Ka.messagePositiveVote),children:v.jsxDEV(wai,{size:12},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Message.tsx",lineNumber:105,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Message.tsx",lineNumber:93,columnNumber:7},this),v.jsxDEV("button",{tabIndex:-1,"data-checked":s==="negative",onClick:()=>a("negative"),className:Vt("size-5 p-0 flex flex-col justify-center items-center cursor-pointer","border border-solid border-neutral-400 text-neutral-400 rounded bg-transparent","hover:border-[var(--cw-error-light)] hover:text-[var(--cw-error-light)] hover:bg-red-100","data-[checked=true]:border-[var(--cw-error-light)] data-[checked=true]:text-white data-[checked=true]:bg-[var(--cw-error-light)]",Ka.messageNegativeVote),children:v.jsxDEV(xai,{size:12},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Message.tsx",lineNumber:119,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Message.tsx",lineNumber:107,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Message.tsx",lineNumber:92,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Message.tsx",lineNumber:39,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Message.tsx",lineNumber:27,columnNumber:3},this)}function ZUt({widget:t,project:e,organization:n}){const i=Mt(),r=b.useMemo(()=>{var a,l;const o={agent:e.agent,project:{name:e.name},organization:{name:n==null?void 0:n.name}},s=((l=(a=t.content)==null?void 0:a[e.defaultLanguage])==null?void 0:l.welcomeMessage)||"";return zp(s)?i.formatMessage(XUt):Xj({string:s,payload:o})},[n,e,t.content]);return v.jsxDEV("section",{className:Vt("w-full overflow-auto p-4 pb-12 min-h-96 flex flex-col gap-4",Ka.containerList),children:[v.jsxDEV(eyt,{direction:"left",message:r},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Content.tsx",lineNumber:38,columnNumber:4},this),v.jsxDEV(eyt,{direction:"right",message:i.formatMessage({id:"layout.chatbot.preview.user.response",defaultMessage:"Make sure everything is readable."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Content.tsx",lineNumber:39,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Content.tsx",lineNumber:32,columnNumber:3},this)}function QUt({widget:t,organization:e,project:n,isDynamic:i,onClose:r}){const o=Mt(),s=Oi(S$),a=Oi(wM),l=b.useMemo(()=>{const u={agent:s,project:{name:n.name},organization:{name:e==null?void 0:e.name}},d=t.content[n.defaultLanguage];return d?{title:Xj({string:d.title,payload:u}),description:d.description&&Xj({string:d.description,payload:u})}:{}},[e,n.defaultLanguage,s,t.content]);if(!(a!=null&&a.showHeader))return null;let c="";return i&&(c=Vt("relative","before:w-[100%] before:h-2 before:bg-[var(--cw-background-light)]","before:absolute before:content-[attr(before)] before:-bottom-0.5 before:left-0","before:rotate-[-1deg] before:shadow-[0_10px_6px_0_#00000005] before:z-10")),v.jsxDEV("header",{className:Vt("w-full max-h-48 p-4 flex flex-col justify-start items-start bg-[var(--cw-background-light)]",c),children:[v.jsxDEV(un,{justify:"space-between",align:"flex-start",className:"w-full",wrap:"nowrap",gap:0,children:[v.jsxDEV("h1",{className:`font-bold text-2xl overflow-auto ${Ka.headerTitle}`,children:l==null?void 0:l.title},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Header.tsx",lineNumber:65,columnNumber:5},this),v.jsxDEV("button",{onClick:r,"aria-label":o.formatMessage({id:"closeAriaLabel",defaultMessage:"Close widget"}),className:Vt("size-8 rounded text-[var(--cw-color-light)] hover:bg-[var(--cw-button-bg-light)]","active:scale-90 disabled:active:scale-100 duration-200","appearance-none border-none bg-transparent flex sm:hidden",Ka.headerCloseButton),children:v.jsxDEV(n8e,{"aria-hidden":!0,stroke:1.5,className:"m-auto"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Header.tsx",lineNumber:78,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Header.tsx",lineNumber:68,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Header.tsx",lineNumber:64,columnNumber:4},this),(l==null?void 0:l.description)&&v.jsxDEV(Yg,{className:`text-sm overflow-auto ${Ka.headerDescription}`,children:l==null?void 0:l.description},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Header.tsx",lineNumber:82,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Header.tsx",lineNumber:58,columnNumber:3},this)}function JUt(){const t=Oi(bR),e="chatbot-preview-inject-styling";return v.jsxDEV("style",{children:[`.${e} {
				--cw-accent-light: ${t.backgroundColor};
				--cw-bg-accent-light: ${t.backgroundColor}13;
				--cw-accent-color-light: ${t.fontColor};
				--cw-color-light: #000000;
				--cw-background-light: #ffffff;
				--cw-border-color-light: #e5e7eb;
				--cw-button-bg-light: ${t.backgroundColor}20;
				--cw-card-bg-light: #ffffff;
				--cw-error-light: #fa5252;
			}`,t.css&&ZWt({css:t.css,namespace:e})]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/InjectStyling.tsx",lineNumber:11,columnNumber:3},this)}function MNr(){const t=Oi(wM);return t!=null&&t.isWhiteLabeled?v.jsxDEV("div",{className:"h-4"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/Branding.tsx",lineNumber:10,columnNumber:37},this):v.jsxDEV("a",{href:"https://chathive.co/",target:"_blank",className:"mx-auto py-1",children:v.jsxDEV(un,{gap:4,wrap:"nowrap",justify:"center",children:[v.jsxDEV("img",{src:"/img/svg/icon.svg",className:"size-3 object-contain"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/Branding.tsx",lineNumber:15,columnNumber:5},this),v.jsxDEV(Qe,{size:"xs",c:"dimmed",children:v.jsxDEV(ee,{id:"layout.ai_form.preview.powered_by",defaultMessage:"Powered by Chathive"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/Branding.tsx",lineNumber:17,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/Branding.tsx",lineNumber:16,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/Branding.tsx",lineNumber:14,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/Branding.tsx",lineNumber:13,columnNumber:3},this)}function LNr({widget:t,project:e,isScrollbarVisible:n}){var c;const i=Mt(),[r,o]=b.useState(""),[s,a]=b.useState(!1),l=u=>{u.key==="Enter"&&(u.preventDefault(),a(!0))};return v.jsxDEV("div",{className:Vt("w-full px-4 relative"),children:[v.jsxDEV(lu,{duration:400,mounted:s,transition:"slide-up",timingFunction:"easeIn",children:u=>v.jsxDEV("div",{style:u,className:"w-full !absolute -left-0 z-40 px-4 bottom-24 bg-white",children:v.jsxDEV(Yo,{variant:"light",color:"red",withCloseButton:!0,onClose:()=>a(!1),closeButtonLabel:i.formatMessage({id:"layout.chatbot.preview.reply_field_disabled.close.aria_label",defaultMessage:"Close"}),children:v.jsxDEV(ee,{id:"layout.chatbot.preview.reply_field_disabled",defaultMessage:"In layout preview mode, messaging functionality is disabled. To test the layout and see it in action, use the <bold>preview URL below</bold>.",values:{bold:d=>v.jsxDEV("span",{className:"font-bold",children:d},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/ReplyField.tsx",lineNumber:47,columnNumber:38},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/ReplyField.tsx",lineNumber:44,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/ReplyField.tsx",lineNumber:34,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/ReplyField.tsx",lineNumber:33,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/ReplyField.tsx",lineNumber:31,columnNumber:4},this),v.jsxDEV("div",{className:Vt("min-h-10 px-2 pr-1","w-full rounded-md shadow-lg bg-[var(--cw-background-light)]","border border-solid border-[var(--cw-border-color-light)] focus-within:border-[var(--cw-accent-light)]",n?"!rounded-t-none":"","flex flex-row justify-between gap-0",Ka.replyFieldWrapper),children:[v.jsxDEV(Th,{autosize:!0,autoFocus:!0,size:"lg",minRows:1,maxRows:3,id:"send_button",autoComplete:"off",variant:"unstyled",onKeyDown:l,rightSectionPointerEvents:"all",onChange:u=>o(u.target.value),placeholder:(c=t.content[e.defaultLanguage])==null?void 0:c.replyField,className:Vt("w-full leading-5",Ka.replyField)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/ReplyField.tsx",lineNumber:63,columnNumber:5},this),v.jsxDEV("button",{disabled:!r.length,onClick:()=>a(!0),"aria-label":i.formatMessage({id:"layout.chatbot.preview.reply_field.send_button.aria_label",defaultMessage:"Send message"}),className:Vt("size-8 rounded border-0 flex flex-col justify-center bg-transparent cursor-pointer mt-2","text-[var(--cw-accent-light)] disabled:bg-gray-100 disabled:text-gray-400 disabled:cursor-not-allowed","active:scale-90 disabled:active:scale-100 duration-200 hover:bg-[var(--cw-button-bg-light)]",n?"!rounded-tr-none":"",Ka.replyButton),children:v.jsxDEV(t8e,{size:16,stroke:1.5,className:"mx-auto text-inherit"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/ReplyField.tsx",lineNumber:90,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/ReplyField.tsx",lineNumber:78,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/ReplyField.tsx",lineNumber:53,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/ReplyField.tsx",lineNumber:30,columnNumber:3},this)}function eKt({widget:t,project:e}){var s;const[n,i]=b.useState(null),r=((s=t.messageSuggestions)==null?void 0:s[e.defaultLanguage])||[],o=b.useMemo(()=>n?n.clientWidth<n.scrollWidth:!1,[n==null?void 0:n.scrollWidth]);return v.jsxDEV("footer",{className:"relative w-full pb-1 flex flex-col gap-0",children:[v.jsxDEV(lu,{duration:400,transition:"slide-up",timingFunction:"easeIn",mounted:e.settings.leadGeneration.isEnabled,children:a=>v.jsxDEV("div",{style:a,className:Vt("w-full flex flex-row justify-end absolute -top-8 px-4 pb-2 z-10",Ka.footerActions),children:v.jsxDEV("button",{className:Vt("w-fit text-xs bg-[var(--cw-background-light)] p-1 rounded","flex flex-row justify-center items-center gap-1 cursor-not-allowed","border border-solid border-[var(--cw-accent-light)] text-[var(--cw-accent-light)]","transition hover:bg-[var(--cw-accent-light)] hover:text-[var(--cw-accent-color-light)]","active:scale-95 disabled:active:scale-100 duration-200",Ka.footerActionsLeadGen),children:[v.jsxDEV(uai,{size:14,stroke:1.5,className:"text-inherit block"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/index.tsx",lineNumber:54,columnNumber:8},this),v.jsxDEV(ee,{id:"layout.chatbot.preview.lead_gen_button",defaultMessage:"Contact me"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/index.tsx",lineNumber:55,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/index.tsx",lineNumber:44,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/index.tsx",lineNumber:37,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/index.tsx",lineNumber:30,columnNumber:4},this),v.jsxDEV(lu,{duration:400,transition:"slide-up",timingFunction:"easeIn",mounted:!!r.length,children:a=>v.jsxDEV("div",{style:a,ref:l=>i(l),className:Vt("w-full px-4 pb-1","flex flex-row flex-nowrap overflow-x-auto gap-1",Ka.suggestions),children:[v.jsxDEV("label",{className:"sr-only absolute",children:v.jsxDEV(ee,{id:"chat.suggestions.title",defaultMessage:"Suggested replies"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/index.tsx",lineNumber:73,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/index.tsx",lineNumber:72,columnNumber:7},this),r==null?void 0:r.map((l,c)=>v.jsxDEV("button",{className:Vt("min-w-fit text-xs rounded whitespace-nowrap cursor-not-allowed","flex flex-row flex-nowrap justify-center items-center gap-2 p-1","border border-solid border-transparent text-[var(--cw-accent-light)] bg-[var(--cw-button-bg-light)]","transition hover:bg-[var(--cw-accent-light)] hover:text-[var(--cw-accent-color-light)]","active:scale-95 disabled:active:scale-100 duration-200",Ka.suggestionsButton),children:l},c,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/index.tsx",lineNumber:76,columnNumber:8},this))]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/index.tsx",lineNumber:63,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/index.tsx",lineNumber:61,columnNumber:4},this),v.jsxDEV(LNr,{widget:t,project:e,isScrollbarVisible:o},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/index.tsx",lineNumber:93,columnNumber:4},this),v.jsxDEV(MNr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/index.tsx",lineNumber:94,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Footer/index.tsx",lineNumber:29,columnNumber:3},this)}function TNr(t){const e=Oi(bR);return v.jsxDEV("div",{className:"w-full min-h-96 relative rounded-lg p-8",style:{background:e.backgroundColor},children:[v.jsxDEV(JUt,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/EmbeddedPreview.tsx",lineNumber:21,columnNumber:4},this),v.jsxDEV("main",{id:"mainLayout",className:Vt("chatbot-preview-inject-styling w-full h-full shadow bg-[var(--cw-background-light)] !overflow-hidden","animate-open transition[all_85ms_ease-out] rounded-xl flex flex-col flex-nowrap justify-end relative"),children:[v.jsxDEV(QUt,{...t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/EmbeddedPreview.tsx",lineNumber:29,columnNumber:5},this),v.jsxDEV("div",{className:Vt("w-full h-full flex flex-col justify-between flex-grow overflow-auto","bg-[var(--cw-background-light)] bg-gradient-to-b from-[var(--cw-bg-accent-light)] to-[var(--cw-background-light)] to-75%","chat__container"),children:[v.jsxDEV(ZUt,{...t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/EmbeddedPreview.tsx",lineNumber:37,columnNumber:6},this),v.jsxDEV(eKt,{...t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/EmbeddedPreview.tsx",lineNumber:38,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/EmbeddedPreview.tsx",lineNumber:30,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/EmbeddedPreview.tsx",lineNumber:22,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/EmbeddedPreview.tsx",lineNumber:20,columnNumber:3},this)}const tyt={close:{id:"layout.chatbot.preview.control.close",defaultMessage:"Close widget"},open:{id:"layout.chatbot.preview.control.open",defaultMessage:"Open widget"}};function INr({isOpen:t,hasNotification:e,onClick:n}){const i=Mt(),[r,o]=TA({key:"previewNotificationTested",defaultValue:!1}),s=()=>{!r&&e&&o(!0),n()};return v.jsxDEV("button",{onClick:s,className:Vt("relative size-12 min-h-12 rounded-full bg-[var(--cw-accent-light)] outline-offset-2","active:scale-75 duration-[0.16s] ease-linear cursor-pointer","flex-col items-center justify-center relative border-none shadow overflow-visible",t?"hidden xs:flex":"flex",Ka.launcher),"aria-label":i.formatMessage(t?tyt.close:tyt.open),children:[e&&!r&&v.jsxDEV("div",{className:"absolute top-0 right-0 size-4",children:[v.jsxDEV("div",{className:"size-full rounded-full bg-theme-primary border border-solid border-white/20"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Launcher.tsx",lineNumber:44,columnNumber:6},this),v.jsxDEV("div",{className:"absolute top-0 size-full rounded-full animate-ping bg-theme-primary opacity-75"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Launcher.tsx",lineNumber:45,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Launcher.tsx",lineNumber:43,columnNumber:5},this),!t&&v.jsxDEV("div",{className:Vt("size-6 bg-[var(--cw-accent-color-light)] relative rounded-md rounded-br-none","before:w-[60%] before:h-[2px] before:rounded","before:bg-[var(--cw-accent-light)] before:text-[var(--cw-accent-light)]","before:absolute before:content-[attr(before)] before:top-[20%] before:left-[24%]","before:shadow-[-4px_4px_0_0_currentColor_,_-4px_8px_0_0_currentColor_,_0px_12px_0_0_currentColor]",Ka.launcherIcon)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Launcher.tsx",lineNumber:49,columnNumber:5},this),t&&v.jsxDEV("div",{className:Vt("size-6 relative rounded-md rounded-br-none","before:w-1 before:h-full before:rounded before:bg-[var(--cw-accent-color-light)]","after:w-1 after:h-full after:rounded after:bg-[var(--cw-accent-color-light)]","before:absolute before:content-[attr(before)] before:top-1/2 before:left-1/2","after:absolute after:content-[attr(before)] after:top-1/2 before:left-1/2","before:-translate-y-1/2 before:-translate-x-1/2 before:rotate-45","after:-translate-y-1/2 after:-translate-x-1/2 after:-rotate-45",Ka.launcherCloseIcon)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Launcher.tsx",lineNumber:61,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/Launcher.tsx",lineNumber:31,columnNumber:3},this)}const nyt=128;function ANr({project:t,organization:e,widget:n,isMounted:i,onClick:r}){const o=Mt(),s=Oi(S$),a=b.useMemo(()=>{var d,h;const l={agent:t.agent,project:{name:t.name},organization:{name:e==null?void 0:e.name}};let c=((h=(d=n.content)==null?void 0:d[t.defaultLanguage])==null?void 0:h.welcomeMessage)||"";zp(c)&&(c=o.formatMessage(XUt));const u=Xj({string:c,payload:l});return nyt<u.length?`${u.slice(0,nyt)}...`:u},[e,t,n.content]);return v.jsxDEV(lu,{duration:400,transition:"pop",exitDuration:0,mounted:i,keepMounted:!1,timingFunction:"ease-out",children:l=>v.jsxDEV("div",{style:l,className:Vt("max-w-96 flex flex-col items-end gap-2 p-2",Ka.notificationList),children:[v.jsxDEV("button",{className:Vt("appearance-none text-xs bg-[var(--cw-accent-light)] text-[var(--cw-accent-color-light)]","flex flex-row items-center gap-1 outline-offset-2 py-0.5 px-1 pr-2 rounded-md","transition-opacity opacity-20 hover:opacity-100 focus:opacity-100 border-none",Ka.notificationClearButton),children:[v.jsxDEV(n8e,{size:14,className:"text-[var(--cw-accent-color-light)]"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/NotificationList.tsx",lineNumber:67,columnNumber:7},this),v.jsxDEV(ee,{id:"layout.chatbot.preview.notification.close",defaultMessage:"Close"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/NotificationList.tsx",lineNumber:68,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/NotificationList.tsx",lineNumber:59,columnNumber:6},this),v.jsxDEV("div",{onClick:r,className:Vt("p-4 font-normal rounded-lg shadow-md bg-[var(--cw-background-light)]","active:scale-95 duration-[0.16s] ease-linear cursor-pointer","flex flex-col justify-between gap-2 outline-offset-2",Ka.notificationListItem),children:[v.jsxDEV(uu,{gap:8,align:"center",justify:"flex-start",children:[v.jsxDEV("img",{src:s.avatar,alt:"",className:"size-6 rounded overflow-hidden"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/NotificationList.tsx",lineNumber:80,columnNumber:8},this),v.jsxDEV("p",{className:"text-sm",children:s.name},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/NotificationList.tsx",lineNumber:81,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/NotificationList.tsx",lineNumber:79,columnNumber:7},this),v.jsxDEV(Yg,{children:a},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/NotificationList.tsx",lineNumber:83,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/NotificationList.tsx",lineNumber:70,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/NotificationList.tsx",lineNumber:55,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/NotificationList.tsx",lineNumber:46,columnNumber:3},this)}function RNr(t){var i;const[e,n]=Pc(!0);return v.jsxDEV("div",{className:"w-full min-h-[420px] relative rounded-lg bg-neutral-100",children:v.jsxDEV("div",{className:Vt("chatbot-preview-inject-styling relative ","flex h-full w-full flex-col justify-end items-end flex-nowrap gap-2 rounded-lg overflow-hidden p-2"),children:[v.jsxDEV(JUt,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/WidgetPreview.tsx",lineNumber:30,columnNumber:5},this),v.jsxDEV(lu,{duration:400,transition:"pop",exitDuration:0,mounted:e,keepMounted:!1,timingFunction:"ease-out",children:r=>v.jsxDEV("main",{style:r,id:"mainLayout",className:Vt("w-full max-w-[480px] h-full shadow bg-[var(--cw-background-light)] !overflow-hidden","animate-open transition[all_85ms_ease-out] rounded-xl flex flex-col flex-nowrap justify-end relative"),children:[v.jsxDEV(QUt,{...t,isDynamic:!0,onClose:n.close},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/WidgetPreview.tsx",lineNumber:48,columnNumber:8},this),v.jsxDEV("div",{className:Vt("w-full h-full flex flex-col justify-between flex-grow overflow-auto","bg-[var(--cw-background-light)] bg-gradient-to-b from-[var(--cw-bg-accent-light)] to-[var(--cw-background-light)] to-75%",Ka.container),children:[v.jsxDEV(ZUt,{...t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/WidgetPreview.tsx",lineNumber:56,columnNumber:9},this),v.jsxDEV(eKt,{...t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/WidgetPreview.tsx",lineNumber:57,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/WidgetPreview.tsx",lineNumber:49,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/WidgetPreview.tsx",lineNumber:40,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/WidgetPreview.tsx",lineNumber:31,columnNumber:5},this),v.jsxDEV(ANr,{...t,onClick:n.toggle,isMounted:!e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/WidgetPreview.tsx",lineNumber:62,columnNumber:5},this),v.jsxDEV(INr,{...t,isOpen:e,onClick:n.toggle,hasNotification:!!((i=t.widget.content[t.project.defaultLanguage])!=null&&i.welcomeMessage)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/WidgetPreview.tsx",lineNumber:63,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/WidgetPreview.tsx",lineNumber:24,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/WidgetPreview.tsx",lineNumber:23,columnNumber:3},this)}const PNr=new Event("closeWalkthrough");function ONr({project:t,widget:e,className:n}){const i=Mt(),r=Qr(),[o,s]=b.useState(!!t.previewUrl),a=Je.project.updatePreviewUrl.useMutation(),l=gt.object({url:gt.string({required_error:i.formatMessage({id:"layout.chatbot.preview_on_website.form.required",defaultMessage:"Url is required"})}).url({message:i.formatMessage({id:"layout.chatbot.preview_on_website.form.required",defaultMessage:"Enter a valid URL"})})}),c=ls({mode:"uncontrolled",validateInputOnBlur:!0,validate:aa(l),initialValues:{url:t.previewUrl||""},onValuesChange:()=>s(c.isValid()&&c.isDirty())}),u=f=>{if(!t)return;const m={installWidget:()=>r(`/${t._id}/implementation`),training:()=>r(`/${t._id}/training`)};m[f.data.action]&&(m[f.data.action](),window.dispatchEvent(PNr),window.focus())},d=({url:f})=>{const m=f.toLowerCase().match(/^http:|https:/)?f:`https://${f}`;window.name="chathive_parent",window.open(`/preview?api_key=${t==null?void 0:t.apiKey}&website=${m}`,"chathive_preview"),window.addEventListener("message",u,!1),a.mutate({url:m}),c.setInitialValues({url:f})},h=f=>{let m=f.target.value;m.startsWith("http")||(m=`https://${m}`),c.getInputProps("url").onChange(m)};return v.jsxDEV(or,{id:"widgetPreviewButton",withBorder:!0,shadow:"lg",className:n,children:v.jsxDEV(Gt,{gap:"sm",children:[v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV(Qe,{size:"sm",children:i.formatMessage({id:"layout.chatbot.preview_on_website.label",defaultMessage:"Preview how the widget would look on your website"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/PreviewOnWebsite.tsx",lineNumber:91,columnNumber:6},this),e.advanced.isHidden&&v.jsxDEV(ir,{label:i.formatMessage({id:"layout.chatbot.preview_on_website.warning.is_hidden",defaultMessage:"Widget is hidden and won't be visible in the preview."}),children:v.jsxDEV(kp,{variant:"light",size:"sm",color:"orange",children:v.jsxDEV(ud,{color:"orange",size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/PreviewOnWebsite.tsx",lineNumber:105,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/PreviewOnWebsite.tsx",lineNumber:104,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/PreviewOnWebsite.tsx",lineNumber:98,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/PreviewOnWebsite.tsx",lineNumber:90,columnNumber:5},this),v.jsxDEV("form",{onSubmit:c.onSubmit(d),className:"w-full",children:v.jsxDEV(pa,{id:"url",...c.getInputProps("url"),onChange:h,placeholder:"https://preview.chathive.app",rightSectionWidth:"w-fit",rightSection:v.jsxDEV(Nn,{type:"submit",size:"xs",className:"h-full mr-0.5",disabled:!o||e.advanced.isHidden,children:v.jsxDEV(ee,{id:"layout.chatbot.preview_on_website.preview",defaultMessage:"preview"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/PreviewOnWebsite.tsx",lineNumber:125,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/PreviewOnWebsite.tsx",lineNumber:119,columnNumber:8},this)},c.key("url"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/PreviewOnWebsite.tsx",lineNumber:111,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/PreviewOnWebsite.tsx",lineNumber:110,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/PreviewOnWebsite.tsx",lineNumber:89,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/InterfacePreview/components/PreviewOnWebsite.tsx",lineNumber:88,columnNumber:3},this)}function jNr({project:t,widget:e,organization:n,onClose:i,className:r}){const o=Mt(),s=Oi(bR),[a,l]=b.useState("widget"),[c,u]=TA({key:"hideLayoutPreviewTypeBanner",defaultValue:YWt});function d(){u(h=>({...h,[a]:!0}))}if(s)return v.jsxDEV(Gt,{id:"previewChanges",className:Vt("w-full p-4 flex flex-col justify-start z-10 lg:z-0",r),children:[v.jsxDEV(un,{gap:"xs",wrap:"nowrap",children:[v.jsxDEV(Fr,{size:"lg",variant:"subtle",onClick:i,className:"lg:!hidden","aria-label":o.formatMessage({id:"layout.preview.close.aria_label",defaultMessage:"Close preview"}),children:v.jsxDEV(wfe,{size:24,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:49,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:39,columnNumber:5},this),v.jsxDEV("div",{className:"w-full",children:v.jsxDEV(Yk,{fullWidth:!0,"aria-label":o.formatMessage({id:"layout.preview.types.aria-label",defaultMessage:"Preview type"}),data:[{label:o.formatMessage({id:"layout.preview.types.widget",defaultMessage:"Widget"}),value:"widget"},{label:o.formatMessage({id:"layout.preview.types.embedded",defaultMessage:"Embedded"}),value:"embedded"}],onChange:h=>l(h)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:52,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:51,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:38,columnNumber:4},this),!c[a]&&v.jsxDEV(Yo,{withCloseButton:!0,icon:v.jsxDEV(uq,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:81,columnNumber:12},this),onClose:d,closeButtonLabel:o.formatMessage({id:"layout.info_banner.close.aria_label",defaultMessage:"Hide preview explanation"}),children:[a==="widget"&&v.jsxDEV(ee,{id:"layout.preview.widget.description",defaultMessage:"The <bold>widget interface</bold> is placed on top of your application, allowing customers to initiate conversation directly through the interface without the need for expensive development.",values:{bold:h=>v.jsxDEV("span",{className:"font-bold",children:h},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:92,columnNumber:37},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:89,columnNumber:7},this),a==="embedded"&&v.jsxDEV(ee,{id:"layout.preview.embedded.description",defaultMessage:"An <bold>embedded interface</bold> is built into your application, allowing customers to interact with it without leaving your application. It integrates seamlessly with the surrounding content.",values:{bold:h=>v.jsxDEV("span",{className:"font-bold",children:h},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:99,columnNumber:37},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:96,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:79,columnNumber:5},this),a==="widget"&&v.jsxDEV(RNr,{project:t,organization:n,widget:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:105,columnNumber:5},this),a==="embedded"&&v.jsxDEV(TNr,{project:t,organization:n,widget:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:108,columnNumber:5},this),v.jsxDEV("footer",{className:"w-full flex flex-row justify-center",children:v.jsxDEV(Qe,{c:"dimmed",size:"xs",className:"max-w-prose text-center",children:v.jsxDEV(ee,{id:"layout.preview.footer.disclaimer",defaultMessage:"This is just a preview, the final design may vary depending on the implementation."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:112,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:111,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:110,columnNumber:4},this),v.jsxDEV(ONr,{project:t,widget:e,className:"mt-4"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:118,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/Preview/index.tsx",lineNumber:37,columnNumber:3},this)}function FNr({widget:t,organization:e}){var h,f,m,p;const n=Mt(),i=Je.useUtils(),r=Oi(ps),[o,s]=b.useState(!1),a=Wd(LHe),l=Je.layout.updateFeatures.useMutation(),c=gt.object({isFeedbackEnabled:gt.boolean().default(!1)}),u=ls({mode:"uncontrolled",validateInputOnBlur:!0,validate:aa(c),initialValues:structuredClone(t.features),onValuesChange:g=>{a(structuredClone(g)),s(u.isValid()&&u.isDirty())}}),d=async g=>{try{await l.mutateAsync(g),s(!1),u.setInitialValues(structuredClone(g)),i.getWidget.invalidate(),In.show({color:"green",message:n.formatMessage({id:"layout.chatbot.features.update.notification.succeeded",defaultMessage:"Settings have been updated"}),autoClose:5e3})}catch(y){console.error("Failed to update advanced layout settings",y),In.show({color:"red",title:n.formatMessage({id:"layout.chatbot.features.update.notification.failed.title",defaultMessage:"Settings could not be updated"}),message:n.formatMessage({id:"layout.chatbot.features.update.notification.failed.message",defaultMessage:"We cannot update your settings at this moment, please try again later."}),autoClose:1e4})}};return v.jsxDEV(Wi.Item,{value:"features",className:"!bg-white",children:[v.jsxDEV(Wi.Control,{children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"layout.chatbot.features.title",defaultMessage:"Features"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:86,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:85,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:84,columnNumber:4},this),v.jsxDEV(Wi.Panel,{children:v.jsxDEV("form",{onSubmit:u.onSubmit(d),children:[v.jsxDEV(Vo,{id:"isFeedbackEnabled",label:n.formatMessage({id:"layout.chatbot.features.feedback_module.label",defaultMessage:"Feedback module"}),help:n.formatMessage({id:"layout.chatbot.features.feedback_module.help",defaultMessage:"The feedback module allows customers to rate every response, providing valuable insights."}),children:[((h=e==null?void 0:e.permissions)==null?void 0:h.feedbackModule)&&v.jsxDEV(Du,{id:"isFeedbackEnabled",...u.getInputProps("isFeedbackEnabled",{type:"checkbox"})},u.key("isFeedbackEnabled"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:104,columnNumber:8},this),!((f=e==null?void 0:e.permissions)!=null&&f.feedbackModule)&&v.jsxDEV(Nn,{size:"sm",to:"/billing",variant:"subtle",component:Np,className:"!text-theme-primary focus-within:bg-theme-primary/10",children:v.jsxDEV(ee,{id:"shared.button.upgrade",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:118,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:111,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:91,columnNumber:6},this),v.jsxDEV(Vo,{id:"leadGeneration",label:n.formatMessage({id:"layout.chatbot.features.lead_generation.label",defaultMessage:"Lead generation"}),help:n.formatMessage({id:"layout.chatbot.features.lead_generation.help",defaultMessage:"Provide a way for customers to contact a human and capture leads."}),children:[((m=e==null?void 0:e.permissions)==null?void 0:m.allowLeadGeneration)&&v.jsxDEV(Nn,{size:"sm",variant:"light",component:Np,to:"../settings/lead-generation",rightSection:v.jsxDEV(Qsi,{size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:139,columnNumber:23},this),className:"!text-theme-primary  focus-within:bg-theme-primary/10",children:v.jsxDEV(ee,{id:"layout.chatbot.features.lead_generation.got_to_settings",defaultMessage:"Go to settings"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:142,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:134,columnNumber:8},this),!((p=e==null?void 0:e.permissions)!=null&&p.allowLeadGeneration)&&v.jsxDEV(Nn,{size:"sm",to:"/billing",variant:"subtle",component:Np,className:"!text-theme-primary focus-within:bg-theme-primary/10",children:v.jsxDEV(ee,{id:"layout.chatbot.features.is_white_labeled.upgrade",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:156,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:149,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:122,columnNumber:6},this),r&&v.jsxDEV(Nn,{type:"submit",loading:l.isLoading,disabled:!o,size:"sm",children:v.jsxDEV(ee,{id:"shared.submit",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:165,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:164,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:90,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:89,columnNumber:4},this)]},"features",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/Features.tsx",lineNumber:83,columnNumber:3},this)}const $Nr=Ja.getAllCodes();function VNr({value:t,disableLanguage:e,excludedLanguages:n,projectLanguages:i,renderFooter:r,onSubmit:o}){const s=Mt(),a=gt.object({language:gt.enum($Nr,{required_error:s.formatMessage({id:"layout.chatbot.language.form.language.required",defaultMessage:"Language is required"})}),title:gt.string({required_error:s.formatMessage({id:"layout.chatbot.language.form.title.required",defaultMessage:"Title is required"})}).min(1,{message:s.formatMessage({id:"layout.chatbot.language.form.title.required",defaultMessage:"Title is required"})}).max(24,{message:s.formatMessage({id:"layout.chatbot.language.form.title.max_length",defaultMessage:"Title must be 24 characters or less."})}),description:gt.string().max(512,{message:s.formatMessage({id:"layout.chatbot.language.form.description.max_length",defaultMessage:"Description must be 512 characters or less."})}).optional(),welcomeMessage:gt.string().max(512,{message:s.formatMessage({id:"layout.chatbot.language.form.welcome_message.max_length",defaultMessage:"Description must be 512 characters or less."})}).optional(),replyField:gt.string().max(48,{message:s.formatMessage({id:"layout.chatbot.language.form.reply_field.max_length",defaultMessage:"Reply field placeholder cannot be longer then 48 characters"})}).optional()}),l=b.useMemo(()=>[...i].filter(m=>!n.has(m))[0],[i,n]),[c,u]=b.useState(!1),d=ls({validateInputOnBlur:!0,validate:aa(a),initialValues:{language:l,...t},onValuesChange:()=>u(d.isValid()&&d.isDirty())}),h=()=>{const{language:f,...m}=d.values;o({[`${f}`]:m})};return v.jsxDEV("form",{onSubmit:f=>{f.preventDefault(),f.stopPropagation(),h()},children:v.jsxDEV(Gt,{gap:"sm",children:[v.jsxDEV(wS,{strict:!1,allowDeselect:!1,disabled:e,locales:new Set(i),exclude:new Set([...n].filter(f=>f!==(t==null?void 0:t.language))),...d.getInputProps("language"),label:s.formatMessage({id:"layout.chatbot.language.form.language.label",defaultMessage:"Language"})},d.key("language"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:123,columnNumber:5},this),d.values.language&&!i.has(d.values.language)&&v.jsxDEV(Yo,{children:v.jsxDEV(ee,{id:"shared.language.info.unsupported",defaultMessage:"{language} has not been added to your project, we will add it for you.",values:{language:Mp(Ja.getName(d.values.language))}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:138,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:137,columnNumber:6},this),v.jsxDEV(pa,{...d.getInputProps("title"),label:s.formatMessage({id:"layout.chatbot.language.form.title.label",defaultMessage:"Title"})},d.key("title"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:145,columnNumber:5},this),v.jsxDEV(ra.Wrapper,{id:"description",label:v.jsxDEV(_m,{label:s.formatMessage({id:"widget.content.form.input.description.label",defaultMessage:"Description"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:156,columnNumber:7},this),children:v.jsxDEV(_ae,{...d.getInputProps("description"),className:"max-h-[124px] overflow-x",placeholder:s.formatMessage({id:"widget.content.form.input.description.placeholder",defaultMessage:"Describe the purpose of your chatbot: e.g. Hello I am a chatbot designed to answer any of your questions.",description:"The description of the chat widget"})},d.key("description"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:164,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:153,columnNumber:5},this),v.jsxDEV(zl,{className:"mt-4"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:176,columnNumber:5},this),v.jsxDEV(ra.Wrapper,{id:"welcomeMessage",label:v.jsxDEV(_m,{label:s.formatMessage({id:"widget.content.form.input.welcomeMessage.label",defaultMessage:"Welcome message"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:180,columnNumber:7},this),description:s.formatMessage({id:"widget.welcome_message.title.help",defaultMessage:"Welcome message helps attract your web visitors to the widget"}),children:v.jsxDEV(_ae,{...d.getInputProps("welcomeMessage"),className:"max-h-[124px] overflow-x",placeholder:s.formatMessage({id:"widget.content.form.input.welcomeMessage.placeholder",defaultMessage:"👋 Welcome to our website! Need assistance?. Don't hesitate to start the conversation. 😊"})},d.key("welcomeMessage"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:192,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:177,columnNumber:5},this),v.jsxDEV(zl,{className:"mt-4"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:203,columnNumber:5},this),v.jsxDEV(pa,{...d.getInputProps("replyField"),label:v.jsxDEV(_m,{label:s.formatMessage({id:"layout.chatbot.language.form.reply_field.label",defaultMessage:"Reply field placeholder"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:208,columnNumber:7},this)},d.key("replyField"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:204,columnNumber:5},this),r({isValid:c})]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:122,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/LanguageForm.tsx",lineNumber:115,columnNumber:3},this)}function BNr({widget:t,project:e,organization:n}){const i=Mt(),r=Je.useUtils(),o=!Oi(ps),s=Je.layout.patchChatbotContent.useMutation(),a=Je.layout.deleteContentLanguage.useMutation();async function l(u){try{await a.mutateAsync({language:u}),In.show({color:"green",message:i.formatMessage({id:"layout.chatbot.languages.delete.succeeded",defaultMessage:"Successfully deleted language"}),autoClose:5e3}),r.getWidget.invalidate(),r.project.getCurrent.invalidate()}catch{In.show({color:"red",message:i.formatMessage({id:"layout.chatbot.languages.delete.failed",defaultMessage:"Something went wrong while deleting language, please try again later."}),autoClose:1e4}),r.getWidget.invalidate()}}const c=async u=>{try{await s.mutateAsync({content:u}),r.getWidget.invalidate(),r.project.getCurrent.invalidate(),In.show({color:"green",message:i.formatMessage({id:"layout.chatbot.languages.update.succeeded",defaultMessage:"Successfully update languages"}),autoClose:5e3})}catch{In.show({color:"red",message:i.formatMessage({id:"layout.chatbot.languages.update.failed",defaultMessage:"Something went wrong while updating the languages, please try again later."}),autoClose:1e4})}};return v.jsxDEV(cG,{sectionKey:"languages",title:i.formatMessage({id:"layout.chatbot.languages.title",defaultMessage:"Languages"}),description:i.formatMessage({id:"layout.chatbot.languages.description",defaultMessage:"Present the text (title, description, etc.) in your customer's language based on their device settings. If a language isn't included, the default will be used."}),project:e,readOnly:o,organization:n,isDeleting:a.isLoading,data:t.content,renderInTable:u=>v.jsxDEV(Qe,{size:"sm",truncate:"end",className:"w-full text-left",children:u==null?void 0:u.title},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/index.tsx",lineNumber:98,columnNumber:5},this),onSubmit:c,onDelete:l,children:u=>v.jsxDEV(VNr,{...u,projectLanguages:new Set(e.languages),value:u.value&&{language:u.selectedLanguage,...u.value},renderFooter:({isValid:d})=>u.renderFooter({isValid:d,isLoading:s.isLoading})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/index.tsx",lineNumber:106,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/LayoutLanguages/index.tsx",lineNumber:81,columnNumber:3},this)}const zNr=Ja.getAllCodes();function HNr({value:t,disableLanguage:e,excludedLanguages:n,projectLanguages:i,renderFooter:r,onSubmit:o}){var h,f,m;const s=Mt(),a=5,l=gt.object({language:gt.enum(zNr,{required_error:s.formatMessage({id:"layout.chatbot.message_suggestions.form.language.required",defaultMessage:"Language is required"})}),list:gt.array(gt.string().max(64,{message:s.formatMessage({id:"layout.chatbot.message_suggestions.form.list.max_length",defaultMessage:"Suggestion cannot be longer then 64 characters"})}).optional()).max(1,{message:s.formatMessage({id:"layout.chatbot.message_suggestions.form.list.min",defaultMessage:"You must have at least 1 suggestion."},{max:a})}).max(a,{message:s.formatMessage({id:"layout.chatbot.message_suggestions.form.list.total",defaultMessage:"Only {max} suggestion can be added."},{max:a})})}),c=b.useMemo(()=>[...i].filter(g=>!n.has(g))[0],[i,n]),u=ls({validateInputOnBlur:!0,validate:aa(l),initialValues:{language:c,list:[""],...t}}),d=()=>{const{language:p,list:g}=u.values;o({[`${p}`]:g})};return v.jsxDEV("form",{onSubmit:p=>{p.preventDefault(),p.stopPropagation(),d()},children:v.jsxDEV(Gt,{gap:"sm",children:[v.jsxDEV(wS,{strict:!1,className:"w-full",allowDeselect:!1,disabled:e,locales:new Set(i),exclude:new Set([...n].filter(p=>p!==(t==null?void 0:t.language))),...u.getInputProps("language"),label:s.formatMessage({id:"layout.chatbot.message_suggestions.form.language.label",defaultMessage:"Language"})},u.key("language"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/SuggestionsForm.tsx",lineNumber:105,columnNumber:5},this),u.values.language&&!i.has(u.values.language)&&v.jsxDEV(Yo,{children:v.jsxDEV(ee,{id:"shared.language.info.unsupported",defaultMessage:"{language} has not been added to your project, we will add it for you.",values:{language:Mp(Ja.getName(u.values.language))}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/SuggestionsForm.tsx",lineNumber:121,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/SuggestionsForm.tsx",lineNumber:120,columnNumber:6},this),v.jsxDEV(ra.Wrapper,{id:"list",label:v.jsxDEV(un,{gap:4,children:[v.jsxDEV(ee,{id:"layout.chatbot.message_suggestions.form.list.label",defaultMessage:"Suggestions"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/SuggestionsForm.tsx",lineNumber:133,columnNumber:8},this)," ",v.jsxDEV(Qe,{size:"xs",c:"dimmed",children:["(",(h=u.getValues().list)==null?void 0:h.length,"/",a,")"]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/SuggestionsForm.tsx",lineNumber:137,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/SuggestionsForm.tsx",lineNumber:132,columnNumber:7},this),children:v.jsxDEV(Gt,{mt:2,gap:"sm",className:"w-full",align:"flex-start",children:[(f=u.getValues().list)==null?void 0:f.map((p,g)=>v.jsxDEV("div",{className:"w-full flex flex-row sm:gap-2 items-start",children:[v.jsxDEV(pa,{...u.getInputProps(`list.${g}`),"aria-label":s.formatMessage({id:"layout.chatbot.message_suggestions.form.input.aria_label",defaultMessage:"Message suggestion"}),className:"w-full"},u.key(`list.${g}`),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/SuggestionsForm.tsx",lineNumber:146,columnNumber:9},this),v.jsxDEV(Fr,{size:"lg",color:"red",variant:"subtle","aria-label":s.formatMessage({id:"shared.button.delete.aria_label",defaultMessage:"Delete"}),onClick:()=>u.removeListItem("list",g),children:v.jsxDEV(Lw,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/SuggestionsForm.tsx",lineNumber:165,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/SuggestionsForm.tsx",lineNumber:155,columnNumber:9},this)]},u.key(`list.${g}`),!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/SuggestionsForm.tsx",lineNumber:145,columnNumber:8},this)),(((m=u.values.list)==null?void 0:m.length)||0)<a&&v.jsxDEV(Nn,{size:"xs",variant:"subtle",leftSection:v.jsxDEV(GA,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/SuggestionsForm.tsx",lineNumber:173,columnNumber:22},this),onClick:()=>u.insertListItem("list",""),children:v.jsxDEV(ee,{id:"layout.chatbot.message_suggestions.form.add",defaultMessage:"Add suggestion"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/SuggestionsForm.tsx",lineNumber:176,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/SuggestionsForm.tsx",lineNumber:170,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/SuggestionsForm.tsx",lineNumber:143,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/SuggestionsForm.tsx",lineNumber:129,columnNumber:5},this),r({isValid:u.isValid()&&u.isDirty()})]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/SuggestionsForm.tsx",lineNumber:104,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/SuggestionsForm.tsx",lineNumber:97,columnNumber:3},this)}function WNr({widget:t,project:e,organization:n}){const i=Mt(),r=Je.useUtils(),o=!Oi(ps),s=Je.layout.messageSuggestions.patch.useMutation(),a=Je.layout.messageSuggestions.deleteLanguage.useMutation();async function l(u){try{await a.mutateAsync({language:u}),In.show({color:"green",message:i.formatMessage({id:"layout.chatbot.message_suggestion.delete.succeeded",defaultMessage:"Successfully deleted your message suggestions"}),autoClose:5e3}),r.getWidget.invalidate(),r.project.getCurrent.invalidate()}catch{In.show({color:"red",message:i.formatMessage({id:"layout.chatbot.message_suggestion.delete.failed",defaultMessage:"Something went wrong while deleting your message suggestions, please try again later."}),autoClose:1e4}),r.getWidget.invalidate()}}const c=async u=>{try{await s.mutateAsync({content:u}),r.getWidget.invalidate(),r.project.getCurrent.invalidate(),In.show({color:"green",message:i.formatMessage({id:"layout.chatbot.message_suggestion.update.succeeded",defaultMessage:"Successfully update your message suggestions"}),autoClose:5e3})}catch{In.show({color:"red",message:i.formatMessage({id:"layout.chatbot.message_suggestion.update.failed",defaultMessage:"Something went wrong while updating your message suggestions, please try again later."}),autoClose:1e4})}};return v.jsxDEV(cG,{sectionKey:"messageSuggestion",title:i.formatMessage({id:"layout.chatbot.message_suggestion.title",defaultMessage:"Message Suggestion"}),description:i.formatMessage({id:"layout.chatbot.message_suggestion.description",defaultMessage:"Give your customers some ideas to help them start the conversation."}),project:e,isRequired:!1,readOnly:o,organization:n,data:t.messageSuggestions||{},isDeleting:a.isLoading,renderInTable:u=>u&&v.jsxDEV(m$,{children:u==null?void 0:u.map(d=>v.jsxDEV(jc,{variant:"light",radius:"md",color:"gray",children:d},d,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/index.tsx",lineNumber:104,columnNumber:8},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/index.tsx",lineNumber:102,columnNumber:6},this),onSubmit:c,onDelete:l,locale:{confirmDelete:{title:{id:"layout.chatbot.message_suggestion.confirm_delete.title",defaultMessage:"Delete Message Suggestions for {language} "},description:{id:"layout.chatbot.message_suggestion.confirm_delete.description",defaultMessage:"If you remove a message suggestion for a specific language, it will be permanently deleted from the chat interface until it's added again."}},alert:{description:{id:"layout.chatbot.message_suggestion.alert.description",defaultMessage:"Message suggestions will only appear if they're configured for the selected language."}},addButton:{id:"layout.chatbot.message_suggestion.add",defaultMessage:"Add message suggestions"}},children:u=>v.jsxDEV(HNr,{...u,projectLanguages:new Set(e.languages),value:u.selectedLanguage&&{language:u.selectedLanguage,list:u.value||[]},renderFooter:({isValid:d})=>u.renderFooter({isValid:d,isLoading:s.isLoading})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/index.tsx",lineNumber:139,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/MessageSuggestions/index.tsx",lineNumber:84,columnNumber:3},this)}function UNr({project:t,widget:e,organization:n,accordionState:i,onAccordionChange:r}){return v.jsxDEV(Wi,{multiple:!0,className:"w-full",variant:"separated",value:i,onChange:r,children:[v.jsxDEV(KUt,{project:t},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/index.tsx",lineNumber:19,columnNumber:4},this),v.jsxDEV(BNr,{project:t,widget:e,organization:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/index.tsx",lineNumber:20,columnNumber:4},this),v.jsxDEV(WNr,{project:t,widget:e,organization:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/index.tsx",lineNumber:21,columnNumber:4},this),v.jsxDEV(qUt,{widget:e,organization:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/index.tsx",lineNumber:22,columnNumber:4},this),v.jsxDEV(GUt,{widget:e,organization:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/index.tsx",lineNumber:23,columnNumber:4},this),v.jsxDEV(FNr,{widget:e,organization:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/index.tsx",lineNumber:24,columnNumber:4},this),v.jsxDEV(YUt,{widget:e,organization:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/index.tsx",lineNumber:25,columnNumber:4},this),v.jsxDEV(tUt,{widget:e,organization:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/index.tsx",lineNumber:26,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/LayoutForm/index.tsx",lineNumber:18,columnNumber:3},this)}function KNr({projectId:t}){return[{key:"setup.layout.chatbot.languages",selector:"#languages",url:`/${t}/layout?accordion=languages`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{fw:"bold",className:"mb-2",children:v.jsxDEV(ee,{id:"layout.chatbot.walkthrough.languages.title",defaultMessage:"Make your layout multilingual"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:15,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:14,columnNumber:6},this),v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"layout.chatbot.walkthrough.languages.description",defaultMessage:"Localize your layout's static texts and communicate with customers in their language."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:21,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:20,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:13,columnNumber:5},this)},{key:"setup.layout.chatbot.message_suggestions",selector:"#messageSuggestion",url:`/${t}/layout?accordion=messageSuggestion`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{fw:"bold",className:"mb-2",children:v.jsxDEV(ee,{id:"layout.chatbot.walkthrough.message_suggestions.title",defaultMessage:"Message Suggestion"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:59,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:58,columnNumber:6},this),v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"layout.chatbot.walkthrough.message_suggestions.description",defaultMessage:"You can add 1 or more suggestions that will be displayed above the input field to give your customers some ideas to start the conversation."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:65,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:64,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:57,columnNumber:5},this)},{key:"setup.layout.chatbot.branding",selector:"#branding",url:`/${t}/layout?accordion=branding`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{fw:"bold",className:"mb-2",children:v.jsxDEV(ee,{id:"layout.chatbot.walkthrough.branding.title",defaultMessage:"Style the layout"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:80,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:79,columnNumber:6},this),v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"layout.chatbot.walkthrough.branding.description",defaultMessage:"Customize the look and feel of your layout to match your brand. You can change the font color, background color, and add custom CSS."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:86,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:85,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:78,columnNumber:5},this)},{key:"setup.layout.chatbot.preview",selector:"#previewChanges",url:`/${t}/layout?previewOpen=true`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{fw:"bold",className:"mb-2",children:v.jsxDEV(ee,{id:"layout.chatbot.walkthrough.preview_widget.title",defaultMessage:"See your changes in real-time"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:101,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:100,columnNumber:6},this),v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"layout.chatbot.walkthrough.preview_widget.description",defaultMessage:"Preview your changes in real-time before you'll publish the layout to your application."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:107,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:106,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:99,columnNumber:5},this)},{key:"setup.layout.chatbot.preview_on_website",selector:"#widgetPreviewButton",url:`/${t}/layout?previewOpen=true`,content:v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{fw:"bold",className:"mb-2",children:v.jsxDEV(ee,{id:"layout.chatbot.walkthrough.preview_on_website.title",defaultMessage:"Preview and test on your website"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:122,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:121,columnNumber:6},this),v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"layout.chatbot.walkthrough.preview_on_website.description",defaultMessage:"Is the real-time preview not enough? view it directly on your website, test it, and share it with colleagues for feedback before deploying it on your site."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:128,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:127,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/chatbot/WalkthroughSteps.tsx",lineNumber:120,columnNumber:5},this)}]}function qNr(){const t=Mt(),[e]=Bv(),[n,i]=TA({key:"formLayoutAccordionState",defaultValue:[]}),r=Wd(S$),o=Wd(wM),s=Wd(bR),a=Wd(LHe),[l,c]=b.useState(!1),{data:u,isLoading:d}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0}),{data:h}=Je.getWidget.useQuery(void 0,{staleTime:1/0}),{data:f}=Je.getOrganization.useQuery(void 0,{staleTime:1/0});ga(t.formatMessage({id:"form_config.page.title",defaultMessage:"Form config - Chathive"}));const m=b.useMemo(()=>{if(!u)return[];switch(u.projectType){case"aiForm":return kNr({projectId:u._id});case"chatbot":return KNr({projectId:u._id});default:return[]}},[u]);return b.useEffect(()=>{!h||!u||(r(u.agent),o(h.layout),s(h.styling),"features"in h&&a(h.features))},[h,u]),b.useEffect(()=>{c(e.get("previewOpen")==="true")},[e]),b.useEffect(()=>{const p=e.get("accordion");p&&i(p.split(","))},[e]),!u||!h||!f||d?v.jsxDEV("div",{className:"w-full h-full flex flex-row gap-4 p-4",children:[v.jsxDEV(li,{height:"100%",className:"w-full h-full hidden sm:block"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/index.tsx",lineNumber:78,columnNumber:5},this),v.jsxDEV(li,{height:"100%",className:"w-full h-full"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/index.tsx",lineNumber:79,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/index.tsx",lineNumber:77,columnNumber:4},this):v.jsxDEV(S6,{usesModalOverlay:!0,steps:m,walkthroughType:E1r[u.projectType],children:v.jsxDEV("div",{className:"w-full h-full flex flex-row relative",children:[v.jsxDEV(Gt,{gap:"md",className:"w-full h-full lg:w-1/2 pt-4 sm:p-4 overflow-auto overflow-x-hidden",children:[v.jsxDEV(or,{className:"min-h-16 sticky flex flex-row-reverse justify-between md:flex-row ",children:v.jsxDEV(un,{gap:"xs",justify:"space-between",className:"h-full",children:[v.jsxDEV(Qe,{fw:600,size:"md",truncate:"end",children:v.jsxDEV(ee,{id:"layout.title",defaultMessage:"Configure layout"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/index.tsx",lineNumber:95,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/index.tsx",lineNumber:94,columnNumber:8},this),v.jsxDEV(Nn,{variant:"subtle",className:"lg:!hidden",onClick:()=>c(!0),children:v.jsxDEV(ee,{id:"layout.open_preview",defaultMessage:"Show preview"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/index.tsx",lineNumber:102,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/index.tsx",lineNumber:97,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/index.tsx",lineNumber:93,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/index.tsx",lineNumber:92,columnNumber:6},this),u.projectType==="aiForm"&&v.jsxDEV(DNr,{project:u,organization:f,widget:h,accordionState:n,onAccordionChange:i},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/index.tsx",lineNumber:107,columnNumber:7},this),u.projectType==="chatbot"&&v.jsxDEV(UNr,{project:u,organization:f,widget:h,accordionState:n,onAccordionChange:i},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/index.tsx",lineNumber:116,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/index.tsx",lineNumber:91,columnNumber:5},this),v.jsxDEV("div",{className:Vt("h-full bg-white flex-col justify-start overflow-auto lg:w-1/2",l?"flex absolute w-full lg:relative":"hidden lg:flex"),children:[u.projectType==="aiForm"&&v.jsxDEV(L1r,{project:u,organization:f,widget:h,onClose:()=>c(!1)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/index.tsx",lineNumber:132,columnNumber:7},this),u.projectType==="chatbot"&&v.jsxDEV(jNr,{organization:f,project:u,widget:h,onClose:()=>c(!1)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/index.tsx",lineNumber:140,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/index.tsx",lineNumber:125,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/index.tsx",lineNumber:90,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Layout/index.tsx",lineNumber:85,columnNumber:3},this)}const tKt={created:"orange",inProgress:"primary",started:"blue",completed:"green",stopped:"red"},$Pe={created:{id:"session.status.created",defaultMessage:"Created"},started:{id:"session.status.started",defaultMessage:"Started"},inProgress:{id:"session.status.in_progress",defaultMessage:"In progress"},completed:{id:"session.status.completed",defaultMessage:"Completed"},stopped:{id:"session.status.stopped",defaultMessage:"Stopped"}},iyt={seen:{id:"session.status.seen",defaultMessage:"Seen"},unseen:{id:"session.status.unseen",defaultMessage:"Unseen"}},VPe={status:void 0,seen:"unseen",archivedOnly:!1,range:[null,null]};function BPe(t){return Object.entries(t).reduce((n,[i,r])=>!r||zp(r)?n:i==="range"&&typeof r=="object"&&r.length===2?(r[0]instanceof Date&&(n.startDate=Nri(r[0]).toISOString()),r[1]instanceof Date&&(n.endDate=kri(r[1]).toISOString()),n):(n[i]=r,n),{})}function nKt(t){return{...VPe,...t.get("status")&&{status:t.get("status")},...t.get("seen")&&{seen:t.get("seen")},archivedOnly:!!t.get("archivedOnly"),range:[t.get("startDate")?new Date(t.get("startDate")):null,t.get("endDate")?new Date(t.get("endDate")):null]}}function GNr({sessionId:t,isOpen:e,onClose:n}){const i=Mt(),r=Je.session.exportSession.useMutation(),o=ls({validateInputOnBlur:!0,initialValues:{format:"csv"},validate:aa(gt.object({format:gt.enum(["csv","json"])}))}),s=async a=>{try{const l=await r.mutateAsync({sessionId:t,format:a.format}),c=i.formatMessage({id:"session.export.file_name",defaultMessage:`session_export_${t}`});V$e({file:l,fileName:c,format:a.format}),n()}catch{In.show({color:"red",message:i.formatMessage({id:"session.actions.export.failed",defaultMessage:`Could not export session to ${a.format}.`}),autoClose:5e3})}};return b.useEffect(()=>{o.reset()},[e]),v.jsxDEV(bl,{opened:e,onClose:n,title:i.formatMessage({id:"project_settings.session.export_session.title",defaultMessage:"Export session"}),closeButtonProps:{"aria-label":i.formatMessage({id:"shared.modal.close",defaultMessage:"Close modal"})},children:v.jsxDEV("form",{onSubmit:o.onSubmit(s),children:v.jsxDEV(Gt,{gap:"md",align:"flex-start",children:[v.jsxDEV(Gt,{gap:3,className:"w-full",children:[v.jsxDEV(Qe,{size:"sm",fw:500,children:v.jsxDEV(ee,{id:"project_settings.session.export_session.form.format.label",defaultMessage:"Export format"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/Export.tsx",lineNumber:82,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/Export.tsx",lineNumber:81,columnNumber:7},this),v.jsxDEV(Yk,{color:yd,data:["csv","json"],...o.getInputProps("format")},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/Export.tsx",lineNumber:87,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/Export.tsx",lineNumber:80,columnNumber:6},this),v.jsxDEV(un,{justify:"flex-end",gap:"sm",className:"w-full mt-4",children:[v.jsxDEV(Nn,{variant:"outline",onClick:n,children:v.jsxDEV(ee,{id:"shared.modal.footer.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/Export.tsx",lineNumber:95,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/Export.tsx",lineNumber:94,columnNumber:7},this),v.jsxDEV(Nn,{type:"submit",loading:r.isLoading,disabled:!o.isValid(),children:v.jsxDEV(ee,{id:"project_settings.session.export_session.form.submit",defaultMessage:"Export"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/Export.tsx",lineNumber:98,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/Export.tsx",lineNumber:97,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/Export.tsx",lineNumber:93,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/Export.tsx",lineNumber:79,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/Export.tsx",lineNumber:78,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/Export.tsx",lineNumber:67,columnNumber:3},this)}function YNr({session:t,loading:e}){var r,o,s,a,l,c,u;const n=Mt(),i=b.useMemo(()=>{const d=(t==null?void 0:t.completedAt)||(t==null?void 0:t.stoppedAt);if(!(!d||!(t!=null&&t.createdAt)))return Ari(Mri(d,t.createdAt))},[t]);return v.jsxDEV(or,{className:"h-min",children:[v.jsxDEV(or.Section,{withBorder:!0,p:"sm",mb:"md",children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"session_detail.meta.title",defaultMessage:"Session details"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:44,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:43,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:42,columnNumber:4},this),e&&v.jsxDEV(Gt,{children:[v.jsxDEV(li,{height:40},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:49,columnNumber:6},this),v.jsxDEV(li,{height:40},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:50,columnNumber:6},this),v.jsxDEV(li,{height:40},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:51,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:48,columnNumber:5},this),t&&v.jsxDEV(Gt,{gap:"md",children:[v.jsxDEV(op,{truncate:"end",icon:v.jsxDEV(sai,{size:20},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:58,columnNumber:13},this),label:n.formatMessage({id:"session_detail.details.session_id.label",defaultMessage:"Session ID"}),value:v.jsxDEV("div",{className:"grid grid-flow-col max-w-max gap-2",children:[v.jsxDEV(Qe,{size:"xs",truncate:"end",children:v.jsxDEV(rw,{className:"!rounded-sm",children:t.sessionId},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:66,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:65,columnNumber:9},this),v.jsxDEV(sU,{size:"xs",value:t.sessionId},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:68,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:64,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:56,columnNumber:6},this),((r=t.conversation)==null?void 0:r._id)&&v.jsxDEV(op,{truncate:"end",icon:v.jsxDEV(Y$e,{size:20},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:75,columnNumber:14},this),label:n.formatMessage({id:"session_detail.details.session_id.label",defaultMessage:"Conversation ID"}),value:v.jsxDEV("div",{className:"grid grid-flow-col max-w-max gap-2",children:[v.jsxDEV(Qe,{size:"xs",truncate:"end",children:v.jsxDEV(rw,{className:"!rounded-sm",children:t.conversation._id},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:83,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:82,columnNumber:10},this),v.jsxDEV(sU,{size:"xs",value:t.conversation._id},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:85,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:81,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:73,columnNumber:7},this),v.jsxDEV(v.Fragment,{children:[v.jsxDEV(zl,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:92,columnNumber:7},this),v.jsxDEV(op,{truncate:"end",icon:v.jsxDEV(pai,{size:20},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:95,columnNumber:14},this),label:n.formatMessage({id:"session_detail.details.total_fields.label",defaultMessage:"Total fields"}),value:n.formatMessage({id:"session_detail.details.total_fields.description",defaultMessage:"{totalFields, plural, =1 {# field} other {# fields}} detected"},{totalFields:Object.keys(t.data||{}).length})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:93,columnNumber:7},this),!!((s=(o=t.conversation)==null?void 0:o.messages)!=null&&s.length)&&v.jsxDEV(op,{truncate:"end",icon:v.jsxDEV(dai,{size:20},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:113,columnNumber:15},this),label:n.formatMessage({id:"session_detail.details.total_messages.label",defaultMessage:"Total messages"}),value:v.jsxDEV(T0,{to:`../conversations/${(a=t.conversation)==null?void 0:a._id}`,className:"!text-black hover:!underline underline-offset-4",children:v.jsxDEV(ee,{id:"session_detail.details.total_messages.description",defaultMessage:"{messages, plural, =1 {# message} other {# messages}} sent",values:{messages:((c=(l=t.conversation)==null?void 0:l.messages)==null?void 0:c.length)||0}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:123,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:119,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:111,columnNumber:8},this),i&&v.jsxDEV(op,{truncate:"end",icon:v.jsxDEV(yai,{size:20},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:135,columnNumber:15},this),label:n.formatMessage({id:"session_detail.details.duration.label",defaultMessage:"Duration"}),value:n.formatMessage(XNr[i.unit],{value:i.value})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:133,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:91,columnNumber:6},this),v.jsxDEV(zl,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:146,columnNumber:6},this),v.jsxDEV(op,{truncate:"end",icon:v.jsxDEV(Wsi,{size:20},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:149,columnNumber:13},this),label:n.formatMessage({id:"session_detail.details.created.label",defaultMessage:"Created"}),value:`${n.formatDate(t.createdAt)} ${n.formatTime(t.createdAt)}`},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:147,columnNumber:6},this),v.jsxDEV(op,{truncate:"end",icon:v.jsxDEV(Bsi,{size:20},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:158,columnNumber:13},this),label:n.formatMessage({id:"session_detail.details.updated.label",defaultMessage:"Updated"}),value:`${n.formatDate(t.updatedAt)} ${n.formatTime(t.updatedAt)}`},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:156,columnNumber:6},this),t.stoppedAt&&v.jsxDEV(op,{truncate:"end",icon:v.jsxDEV(Hsi,{size:20},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:168,columnNumber:14},this),label:n.formatMessage({id:"session_detail.details.stopped.label",defaultMessage:"Stopped"}),value:`${n.formatDate(t.stoppedAt)} ${n.formatTime(t.stoppedAt)}`},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:166,columnNumber:7},this),t.completedAt&&v.jsxDEV(op,{truncate:"end",icon:v.jsxDEV(zsi,{size:20},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:179,columnNumber:14},this),label:n.formatMessage({id:"session_detail.details.completed.label",defaultMessage:"Completed"}),value:`${n.formatDate(t.completedAt)} ${n.formatTime(t.completedAt)}`},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:177,columnNumber:7},this),t.archivedAt&&v.jsxDEV(op,{truncate:"end",icon:v.jsxDEV(G$e,{size:20},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:190,columnNumber:14},this),label:n.formatMessage({id:"session_detail.details.archived.label",defaultMessage:"Archived"}),value:`${n.formatDate(t.archivedAt)} ${n.formatTime(t.archivedAt)}`},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:188,columnNumber:7},this),((u=t.deleted)==null?void 0:u.deletedAt)&&v.jsxDEV(op,{truncate:"end",icon:v.jsxDEV(Lw,{size:20},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:201,columnNumber:14},this),label:n.formatMessage({id:"session_detail.details.deleted.label",defaultMessage:"Deleted"}),value:`${n.formatDate(t.deleted.deletedAt)} ${n.formatTime(t.deleted.deletedAt)}`},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:199,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:55,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionMetaData.tsx",lineNumber:41,columnNumber:3},this)}const XNr={second:{id:"session_detail.details.duration.second",defaultMessage:"{value, number} {value, plural, one {second} other {seconds}}"},minute:{id:"session_detail.details.duration.minute",defaultMessage:"{value, number} {value, plural, one {minute} other {minutes}}"},hour:{id:"session_detail.details.duration.hour",defaultMessage:"{value, number} {value, plural, one {hour} other {hours}}"}};function ZNr(){const t=Mt(),e=Qr(),n=Je.useUtils(),i=If(),[r,o]=Pc(!1),{data:s,isLoading:a}=Je.session.getById.useQuery({sessionId:i.sessionId},{enabled:!!i.sessionId}),l=Je.session.updateSeenStatus.useMutation(),c=Je.session.updateArchived.useMutation();async function u(C){try{await l.mutateAsync({sessionId:C,seen:!0}),n.session.getById.invalidate({sessionId:C}),n.session.getAll.invalidate()}catch{In.show({color:"red",message:t.formatMessage({id:"session.actions.mark_as_seen.failed",defaultMessage:"Could not mark session as seen"}),autoClose:5e3})}}async function d(C){try{await l.mutateAsync({sessionId:C,seen:!1}),n.session.getById.invalidate({sessionId:C}),n.session.getAll.invalidate()}catch{In.show({color:"red",message:t.formatMessage({id:"session.actions.mark_as_unseen.failed",defaultMessage:"Could not mark session as unseen"}),autoClose:5e3})}}async function h(C){try{await c.mutateAsync({sessionId:C,archive:!0}),n.session.getById.invalidate({sessionId:C}),n.session.getAll.invalidate()}catch{In.show({color:"red",message:t.formatMessage({id:"session.actions.archive.failed",defaultMessage:"Could not archive session"}),autoClose:5e3})}}async function f(C){try{await c.mutateAsync({sessionId:C,archive:!1}),n.session.getById.invalidate({sessionId:C}),n.session.getAll.invalidate()}catch{In.show({color:"red",message:t.formatMessage({id:"session.actions.unarchive.failed",defaultMessage:"Could not unarchive session"}),autoClose:5e3})}}function m(){s!=null&&s.conversation&&e(`/${i.projectId}/conversations/${s.conversation._id}`)}const[p]=Bv(),g=nKt(p),y=b.useMemo(()=>!!s&&["stopped","inProgress","completed"].includes(s.status),[s]);function _(){e({pathname:`/${i.projectId}/sessions`,search:wz(BPe(g)).toString()})}if(!s&&!a||!i.sessionId)return v.jsxDEV(Zd,{src:"/img/svg/empty_inbox.svg",className:Vt("lg:col-span-2 xl:col-span-3 my-auto lg:!flex",!i.sessionId&&"!hidden"),imgClassName:"h-[25vh] mb-8",description:t.formatMessage({id:"conversations.overview.fallback",defaultMessage:"Select a session to get started",description:"Fallback message when user hasn't selected a session"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:136,columnNumber:4},this);const w=!!(s!=null&&s.deleted);return v.jsxDEV(v.Fragment,{children:[v.jsxDEV("section",{className:Vt("lg:col-span-2 xl:col-span-3 lg:!grid grid content-start gap-4 grid-cols-12 h-full overflow-auto sm:-mr-4 sm:pr-4",!i.sessionId&&"!hidden"),children:[v.jsxDEV(or,{className:"w-full col-span-12 lg:col-span-8 xl:col-span-9 h-min",children:[v.jsxDEV(or.Section,{withBorder:!0,p:"sm",mb:"md",children:v.jsxDEV(uu,{gap:"xs",children:[v.jsxDEV(Fr,{className:"lg:!hidden",variant:"subtle",onClick:()=>_(),"aria-label":t.formatMessage({id:"session_detail.return_to_list.aria-label",defaultMessage:"Return to session list"}),children:v.jsxDEV(wfe,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:171,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:162,columnNumber:8},this),s?v.jsxDEV(un,{align:"top",justify:"space-between",w:"100%",wrap:"nowrap",children:[v.jsxDEV(un,{gap:0,wrap:"nowrap",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"session_detail.header.title",defaultMessage:"Session"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:177,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:176,columnNumber:11},this),v.jsxDEV(jc,{ml:"sm",color:tKt[s==null?void 0:s.status],variant:"light",children:v.jsxDEV(ee,{...$Pe[s==null?void 0:s.status]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:183,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:182,columnNumber:11},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:175,columnNumber:10},this),v.jsxDEV(un,{gap:"xs",children:[s.seenBy.length?v.jsxDEV(ir,{disabled:w,label:t.formatMessage({id:"session_detail.header.action.unseen.tooltip",defaultMessage:"Mark as unseen"}),children:v.jsxDEV(Fr,{variant:"light",disabled:w,onClick:()=>d(s._id),"aria-label":t.formatMessage({id:"session_detail.header.action.unseen.tooltip",defaultMessage:"Mark as unseen"}),children:v.jsxDEV(Jsi,{size:16,stroke:1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:205,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:196,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:189,columnNumber:12},this):v.jsxDEV(ir,{disabled:w,label:t.formatMessage({id:"session_detail.header.action.seen.tooltip",defaultMessage:"Mark as seen"}),children:v.jsxDEV(Fr,{variant:"light",disabled:w,onClick:()=>u(s._id),"aria-label":t.formatMessage({id:"session_detail.header.action.seen.tooltip",defaultMessage:"Mark as seen"}),children:v.jsxDEV(eai,{size:16,stroke:1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:225,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:216,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:209,columnNumber:12},this),s.archivedAt?v.jsxDEV(ir,{disabled:w,label:t.formatMessage({id:"session_detail.header.action.unarchive.tooltip",defaultMessage:"Unarchive session"}),children:v.jsxDEV(Fr,{variant:"light",disabled:w,onClick:()=>f(s._id),"aria-label":t.formatMessage({id:"session_detail.header.action.unarchive.tooltip",defaultMessage:"Unarchive session"}),children:v.jsxDEV(jsi,{size:16,stroke:1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:266,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:257,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:250,columnNumber:12},this):v.jsxDEV(ir,{disabled:w,label:t.formatMessage({id:"session_detail.header.action.archive.tooltip",defaultMessage:"Archive session"}),children:v.jsxDEV(Fr,{variant:"light",disabled:w,onClick:()=>h(s._id),"aria-label":t.formatMessage({id:"session_detail.header.action.archive.tooltip",defaultMessage:"Archive session"}),children:v.jsxDEV(G$e,{size:16,stroke:1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:246,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:237,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:230,columnNumber:12},this),v.jsxDEV(ir,{disabled:w,label:t.formatMessage({id:"session_detail.header.action.view_conversation.tooltip",defaultMessage:"Export session"}),children:v.jsxDEV(Fr,{variant:"light",onClick:o.open,disabled:!y||w,"aria-label":t.formatMessage({id:"session_detail.header.action.view_conversation.tooltip",defaultMessage:"Export session"}),children:v.jsxDEV(UPt,{size:16,stroke:1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:286,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:277,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:270,columnNumber:11},this),v.jsxDEV(zl,{orientation:"vertical",h:"50%",my:"auto"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:289,columnNumber:11},this),v.jsxDEV(ir,{disabled:w,label:t.formatMessage({id:"session_detail.header.action.view_conversation.tooltip",defaultMessage:"View conversation"}),children:v.jsxDEV(Fr,{variant:"light",disabled:w,onClick:()=>m(),"aria-label":t.formatMessage({id:"session_detail.header.action.view_conversation.tooltip",defaultMessage:"View conversation"}),children:v.jsxDEV(Y$e,{size:16,stroke:1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:306,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:297,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:290,columnNumber:11},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:187,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:174,columnNumber:9},this):v.jsxDEV(li,{height:50,width:300},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:312,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:161,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:160,columnNumber:6},this),v.jsxDEV(GWt,{pageSize:15,loading:a,deleted:s==null?void 0:s.deleted,sessionData:s==null?void 0:s.data,tableScrollContainerProps:{minWidth:100}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:316,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:159,columnNumber:5},this),v.jsxDEV("aside",{className:"col-span-12 lg:col-span-4 xl:col-span-3 h-min grid gap-4 sm:grid-cols-2 lg:grid-cols-1",children:[v.jsxDEV(P9t,{size:"sm",className:"h-min",loading:a,anonymous:!(s!=null&&s.customer),...(s==null?void 0:s.customer)||{}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:325,columnNumber:6},this),v.jsxDEV(YNr,{loading:a,session:s},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:332,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:324,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:153,columnNumber:4},this),i.sessionId&&v.jsxDEV(GNr,{sessionId:i.sessionId,isOpen:r,onClose:o.close},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:336,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionDetail.tsx",lineNumber:152,columnNumber:3},this)}function QNr({type:t,date:e,locale:n,format:i,labelSeparator:r}){const o=s=>An(s).locale(n).format(i);return t==="default"?e===null?"":o(e):t==="multiple"?e.map(o).join(", "):t==="range"&&Array.isArray(e)?e[0]&&e[1]?`${o(e[0])} ${r} ${o(e[1])}`:e[0]?`${o(e[0])} ${r} `:"":""}function JNr({formatter:t,...e}){return(t||QNr)(e)}function eEr({direction:t,levelIndex:e,rowIndex:n,cellIndex:i,size:r}){switch(t){case"up":return e===0&&n===0?null:n===0?{levelIndex:e-1,rowIndex:i<=r[e-1][r[e-1].length-1]-1?r[e-1].length-1:r[e-1].length-2,cellIndex:i}:{levelIndex:e,rowIndex:n-1,cellIndex:i};case"down":return n===r[e].length-1?{levelIndex:e+1,rowIndex:0,cellIndex:i}:n===r[e].length-2&&i>=r[e][r[e].length-1]?{levelIndex:e+1,rowIndex:0,cellIndex:i}:{levelIndex:e,rowIndex:n+1,cellIndex:i};case"left":return e===0&&n===0&&i===0?null:n===0&&i===0?{levelIndex:e-1,rowIndex:r[e-1].length-1,cellIndex:r[e-1][r[e-1].length-1]-1}:i===0?{levelIndex:e,rowIndex:n-1,cellIndex:r[e][n-1]-1}:{levelIndex:e,rowIndex:n,cellIndex:i-1};case"right":return n===r[e].length-1&&i===r[e][n]-1?{levelIndex:e+1,rowIndex:0,cellIndex:0}:i===r[e][n]-1?{levelIndex:e,rowIndex:n+1,cellIndex:0}:{levelIndex:e,rowIndex:n,cellIndex:i+1};default:return{levelIndex:e,rowIndex:n,cellIndex:i}}}function iKt({controlsRef:t,direction:e,levelIndex:n,rowIndex:i,cellIndex:r,size:o}){var l,c,u;const s=eEr({direction:e,size:o,rowIndex:i,cellIndex:r,levelIndex:n});if(!s)return;const a=(u=(c=(l=t.current)==null?void 0:l[s.levelIndex])==null?void 0:c[s.rowIndex])==null?void 0:u[s.cellIndex];a&&(a.disabled||a.getAttribute("data-hidden")||a.getAttribute("data-outside")?iKt({controlsRef:t,direction:e,levelIndex:s.levelIndex,cellIndex:s.cellIndex,rowIndex:s.rowIndex,size:o}):a.focus())}function tEr(t){switch(t){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function nEr(t){var e;return(e=t.current)==null?void 0:e.map(n=>n.map(i=>i.length))}function HHe({controlsRef:t,levelIndex:e,rowIndex:n,cellIndex:i,event:r}){const o=tEr(r.key);if(o){r.preventDefault();const s=nEr(t);iKt({controlsRef:t,direction:o,levelIndex:e,rowIndex:n,cellIndex:i,size:s})}}var rKt={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Bl,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},i={};return function(r,o,s){var a,l=function(h,f,m){m===void 0&&(m={});var p=new Date(h),g=function(y,_){_===void 0&&(_={});var w=_.timeZoneName||"short",C=y+"|"+w,N=i[C];return N||(N=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:y,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:w}),i[C]=N),N}(f,m);return g.formatToParts(p)},c=function(h,f){for(var m=l(h,f),p=[],g=0;g<m.length;g+=1){var y=m[g],_=y.type,w=y.value,C=n[_];C>=0&&(p[C]=parseInt(w,10))}var N=p[3],E=N===24?0:N,D=p[0]+"-"+p[1]+"-"+p[2]+" "+E+":"+p[4]+":"+p[5]+":000",k=+h;return(s.utc(D).valueOf()-(k-=k%1e3))/6e4},u=o.prototype;u.tz=function(h,f){h===void 0&&(h=a);var m,p=this.utcOffset(),g=this.toDate(),y=g.toLocaleString("en-US",{timeZone:h}),_=Math.round((g-new Date(y))/1e3/60),w=15*-Math.round(g.getTimezoneOffset()/15)-_;if(!Number(w))m=this.utcOffset(0,f);else if(m=s(y,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(w,!0),f){var C=m.utcOffset();m=m.add(p-C,"minute")}return m.$x.$timezone=h,m},u.offsetName=function(h){var f=this.$x.$timezone||s.tz.guess(),m=l(this.valueOf(),f,{timeZoneName:h}).find(function(p){return p.type.toLowerCase()==="timezonename"});return m&&m.value};var d=u.startOf;u.startOf=function(h,f){if(!this.$x||!this.$x.$timezone)return d.call(this,h,f);var m=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return d.call(m,h,f).tz(this.$x.$timezone,!0)},s.tz=function(h,f,m){var p=m&&f,g=m||f||a,y=c(+s(),g);if(typeof h!="string")return s(h).tz(g);var _=function(E,D,k){var M=E-60*D*1e3,T=c(M,k);if(D===T)return[M,D];var A=c(M-=60*(T-D)*1e3,k);return T===A?[M,T]:[E-60*Math.min(T,A)*1e3,Math.max(T,A)]}(s.utc(h,p).valueOf(),y,g),w=_[0],C=_[1],N=s(w).utcOffset(C);return N.$x.$timezone=g,N},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(h){a=h}}})})(rKt);var iEr=rKt.exports;const rEr=ao(iEr);var oKt={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Bl,function(){var n="minute",i=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(o,s,a){var l=s.prototype;a.utc=function(p){var g={date:p,utc:!0,args:arguments};return new s(g)},l.utc=function(p){var g=a(this.toDate(),{locale:this.$L,utc:!0});return p?g.add(this.utcOffset(),n):g},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var c=l.parse;l.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),c.call(this,p)};var u=l.init;l.init=function(){if(this.$u){var p=this.$d;this.$y=p.getUTCFullYear(),this.$M=p.getUTCMonth(),this.$D=p.getUTCDate(),this.$W=p.getUTCDay(),this.$H=p.getUTCHours(),this.$m=p.getUTCMinutes(),this.$s=p.getUTCSeconds(),this.$ms=p.getUTCMilliseconds()}else u.call(this)};var d=l.utcOffset;l.utcOffset=function(p,g){var y=this.$utils().u;if(y(p))return this.$u?0:y(this.$offset)?d.call(this):this.$offset;if(typeof p=="string"&&(p=function(N){N===void 0&&(N="");var E=N.match(i);if(!E)return null;var D=(""+E[0]).match(r)||["-",0,0],k=D[0],M=60*+D[1]+ +D[2];return M===0?0:k==="+"?M:-M}(p),p===null))return this;var _=Math.abs(p)<=16?60*p:p,w=this;if(g)return w.$offset=_,w.$u=p===0,w;if(p!==0){var C=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(w=this.local().add(_+C,n)).$offset=_,w.$x.$localOffset=C}else w=this.utc();return w};var h=l.format;l.format=function(p){var g=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,g)},l.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var f=l.toDate;l.toDate=function(p){return p==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var m=l.diff;l.diff=function(p,g,y){if(p&&this.$u===p.$u)return m.call(this,p,g,y);var _=this.local(),w=a(p).local();return m.call(_,w,g,y)}}})})(oKt);var oEr=oKt.exports;const sEr=ao(oEr);An.extend(sEr);An.extend(rEr);function aEr(t,e){return e?An(t).tz(e).utcOffset()+t.getTimezoneOffset():0}const ryt=(t,e,n)=>{if(!t)return null;if(!e)return t;let i=aEr(t,e);return n==="remove"&&(i*=-1),An(t).add(i,"minutes").toDate()};function UC(t,e,n,i){return i||!e?e:Array.isArray(e)?e.map(r=>ryt(r,n,t)):ryt(e,n,t)}function lEr({minDate:t,maxDate:e,timezone:n}){const i=UC("add",new Date,n);return!t&&!e?i:t&&An(i).isBefore(t)?t:e&&An(i).isAfter(e)?e:i}const cEr={locale:"en",timezone:null,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},uEr=b.createContext(cEr);function og(){const t=b.useContext(uEr),e=b.useCallback(s=>s||t.locale,[t.locale]),n=b.useCallback(s=>s||t.timezone||void 0,[t.timezone]),i=b.useCallback(s=>typeof s=="number"?s:t.firstDayOfWeek,[t.firstDayOfWeek]),r=b.useCallback(s=>Array.isArray(s)?s:t.weekendDays,[t.weekendDays]),o=b.useCallback(s=>typeof s=="string"?s:t.labelSeparator,[t.labelSeparator]);return{...t,getLocale:e,getTimezone:n,getFirstDayOfWeek:i,getWeekendDays:r,getLabelSeparator:o}}function dEr(t,e){const n=og(),i=r=>UC("remove",r,n.getTimezone()).toISOString();if(e==="range"&&Array.isArray(t)){const[r,o]=t;return r?o?`${i(r)} – ${i(o)}`:`${i(r)} –`:""}return e==="multiple"&&Array.isArray(t)?t.map(r=>r&&i(r)).filter(Boolean).join(", "):!Array.isArray(t)&&t?i(t):""}function sKt({value:t,type:e,name:n,form:i}){return ne.jsx("input",{type:"hidden",value:dEr(t,e),name:n,form:i})}sKt.displayName="@mantine/dates/HiddenDatesInput";var aKt={day:"m_396ce5cb"};const hEr={},fEr=(t,{size:e})=>({day:{"--day-size":Hr(e,"day-size")}}),WHe=Dn((t,e)=>{const n=Kt("Day",hEr,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,date:c,disabled:u,__staticSelector:d,weekend:h,outside:f,selected:m,renderDay:p,inRange:g,firstInRange:y,lastInRange:_,hidden:w,static:C,highlightToday:N,...E}=n,D=hi({name:d||"Day",classes:aKt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:fEr,rootSelector:"day"}),k=og();return ne.jsx(Lh,{...D("day",{style:w?{display:"none"}:void 0}),component:C?"div":"button",ref:e,disabled:u,"data-today":An(c).isSame(UC("add",new Date,k.getTimezone()),"day")||void 0,"data-hidden":w||void 0,"data-highlight-today":N||void 0,"data-disabled":u||void 0,"data-weekend":!u&&!f&&h||void 0,"data-outside":!u&&f||void 0,"data-selected":!u&&m||void 0,"data-in-range":g&&!u||void 0,"data-first-in-range":y&&!u||void 0,"data-last-in-range":_&&!u||void 0,"data-static":C||void 0,unstyled:a,...E,children:(p==null?void 0:p(c))||c.getDate()})});WHe.classes=aKt;WHe.displayName="@mantine/dates/Day";function mEr({locale:t,format:e="dd",firstDayOfWeek:n=1}){const i=An().day(n),r=[];for(let o=0;o<7;o+=1)typeof e=="string"?r.push(An(i).add(o,"days").locale(t).format(e)):r.push(e(An(i).add(o,"days").toDate()));return r}var lKt={weekday:"m_18a3eca"};const pEr={},gEr=(t,{size:e})=>({weekdaysRow:{"--wr-fz":hd(e),"--wr-spacing":Rc(e)}}),UHe=Dn((t,e)=>{const n=Kt("WeekdaysRow",pEr,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,locale:c,firstDayOfWeek:u,weekdayFormat:d,cellComponent:h="th",__staticSelector:f,...m}=n,p=hi({name:f||"WeekdaysRow",classes:lKt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:gEr,rootSelector:"weekdaysRow"}),g=og(),y=mEr({locale:g.getLocale(c),format:d,firstDayOfWeek:g.getFirstDayOfWeek(u)}).map((_,w)=>ne.jsx(h,{...p("weekday"),children:_},w));return ne.jsx(mn,{component:"tr",ref:e,...p("weekdaysRow"),...m,children:y})});UHe.classes=lKt;UHe.displayName="@mantine/dates/WeekdaysRow";function bEr(t,e=1){const n=new Date(t),i=e===0?6:e-1;for(;n.getDay()!==i;)n.setDate(n.getDate()+1);return n}function vEr(t,e=1){const n=new Date(t);for(;n.getDay()!==e;)n.setDate(n.getDate()-1);return n}function yEr({month:t,firstDayOfWeek:e=1,consistentWeeks:n}){const i=t.getMonth(),r=new Date(t.getFullYear(),i,1),o=new Date(t.getFullYear(),t.getMonth()+1,0),s=bEr(o,e),a=vEr(r,e),l=[];for(;a<=s;){const c=[];for(let u=0;u<7;u+=1)c.push(new Date(a)),a.setDate(a.getDate()+1);l.push(c)}if(n&&l.length<6){const c=l[l.length-1],u=c[c.length-1],d=new Date(u);for(d.setDate(d.getDate()+1);l.length<6;){const h=[];for(let f=0;f<7;f+=1)h.push(new Date(d)),d.setDate(d.getDate()+1);l.push(h)}}return l}function cKt(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function uKt(t,e){return e instanceof Date?An(t).isAfter(An(e).subtract(1,"day"),"day"):!0}function dKt(t,e){return e instanceof Date?An(t).isBefore(An(e).add(1,"day"),"day"):!0}function _Er(t,e,n,i,r,o,s){const a=t.flat().filter(u=>{var d;return dKt(u,n)&&uKt(u,e)&&!(r!=null&&r(u))&&!((d=i==null?void 0:i(u))!=null&&d.disabled)&&(!o||cKt(u,s))}),l=a.find(u=>{var d;return(d=i==null?void 0:i(u))==null?void 0:d.selected});if(l)return l;const c=a.find(u=>An().isSame(u,"date"));return c||a[0]}var hKt={month:"m_cc9820d3",monthCell:"m_8f457cd5"};const xEr={withCellSpacing:!0},rge=Dn((t,e)=>{const n=Kt("Month",xEr,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,__staticSelector:c,locale:u,firstDayOfWeek:d,weekdayFormat:h,month:f,weekendDays:m,getDayProps:p,excludeDate:g,minDate:y,maxDate:_,renderDay:w,hideOutsideDates:C,hideWeekdays:N,getDayAriaLabel:E,static:D,__getDayRef:k,__onDayKeyDown:M,__onDayClick:T,__onDayMouseEnter:A,__preventFocus:R,__stopPropagation:P,withCellSpacing:O,size:V,highlightToday:F,...$}=n,B=hi({name:c||"Month",classes:hKt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,rootSelector:"month"}),z=og(),H=yEr({month:f,firstDayOfWeek:z.getFirstDayOfWeek(d),consistentWeeks:z.consistentWeeks}),K=_Er(H,y,_,p,g,C,f),{resolvedClassNames:q,resolvedStyles:U}=zv({classNames:i,styles:s,props:n}),Y=H.map((J,ae)=>{const se=J.map((oe,fe)=>{const de=!cKt(oe,f),ie=(E==null?void 0:E(oe))||An(oe).locale(u||z.locale).format("D MMMM YYYY"),Q=p==null?void 0:p(oe),be=An(oe).isSame(K,"date");return ne.jsx("td",{...B("monthCell"),"data-with-spacing":O||void 0,children:ne.jsx(WHe,{__staticSelector:c||"Month",classNames:q,styles:U,unstyled:a,"data-mantine-stop-propagation":P||void 0,highlightToday:F,renderDay:w,date:oe,size:V,weekend:z.getWeekendDays(m).includes(oe.getDay()),outside:de,hidden:C?de:!1,"aria-label":ie,static:D,disabled:(g==null?void 0:g(oe))||!dKt(oe,_)||!uKt(oe,y),ref:le=>k==null?void 0:k(ae,fe,le),...Q,onKeyDown:le=>{var Ne;(Ne=Q==null?void 0:Q.onKeyDown)==null||Ne.call(Q,le),M==null||M(le,{rowIndex:ae,cellIndex:fe,date:oe})},onMouseEnter:le=>{var Ne;(Ne=Q==null?void 0:Q.onMouseEnter)==null||Ne.call(Q,le),A==null||A(le,oe)},onClick:le=>{var Ne;(Ne=Q==null?void 0:Q.onClick)==null||Ne.call(Q,le),T==null||T(le,oe)},onMouseDown:le=>{var Ne;(Ne=Q==null?void 0:Q.onMouseDown)==null||Ne.call(Q,le),R&&le.preventDefault()},tabIndex:R||!be?-1:0})},oe.toString())});return ne.jsx("tr",{...B("monthRow"),children:se},ae)});return ne.jsxs(mn,{component:"table",...B("month"),size:V,ref:e,...$,children:[!N&&ne.jsx("thead",{...B("monthThead"),children:ne.jsx(UHe,{__staticSelector:c||"Month",locale:u,firstDayOfWeek:d,weekdayFormat:h,size:V,classNames:q,styles:U,unstyled:a})}),ne.jsx("tbody",{...B("monthTbody"),children:Y})]})});rge.classes=hKt;rge.displayName="@mantine/dates/Month";var fKt={pickerControl:"m_dc6a3c71"};const wEr={},CEr=(t,{size:e})=>({pickerControl:{"--dpc-fz":hd(e),"--dpc-size":Hr(e,"dpc-size")}}),oge=Dn((t,e)=>{const n=Kt("PickerControl",wEr,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,firstInRange:c,lastInRange:u,inRange:d,__staticSelector:h,selected:f,disabled:m,...p}=n,g=hi({name:h||"PickerControl",classes:fKt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:CEr,rootSelector:"pickerControl"});return ne.jsx(Lh,{...g("pickerControl"),ref:e,unstyled:a,"data-picker-control":!0,"data-selected":f&&!m||void 0,"data-disabled":m||void 0,"data-in-range":d&&!m&&!f||void 0,"data-first-in-range":c&&!m||void 0,"data-last-in-range":u&&!m||void 0,disabled:m,...p})});oge.classes=fKt;oge.displayName="@mantine/dates/PickerControl";function mKt(t,e,n){return!e&&!n?!1:!!(e&&An(t).isBefore(e,"year")||n&&An(t).isAfter(n,"year"))}function SEr(t,e,n,i){const r=t.flat().filter(a=>{var l;return!mKt(a,e,n)&&!((l=i==null?void 0:i(a))!=null&&l.disabled)}),o=r.find(a=>{var l;return(l=i==null?void 0:i(a))==null?void 0:l.selected});if(o)return o;const s=r.find(a=>An().isSame(a,"year"));return s||r[0]}function pKt(t){const e=t.getFullYear(),n=e-e%10;let i=0;const r=[[],[],[],[]];for(let o=0;o<4;o+=1){const s=o===3?1:3;for(let a=0;a<s;a+=1)r[o].push(new Date(n+i,0)),i+=1}return r}var gKt={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const NEr={yearsListFormat:"YYYY",withCellSpacing:!0},sge=Dn((t,e)=>{const n=Kt("YearsList",NEr,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,decade:c,yearsListFormat:u,locale:d,minDate:h,maxDate:f,getYearControlProps:m,__staticSelector:p,__getControlRef:g,__onControlKeyDown:y,__onControlClick:_,__onControlMouseEnter:w,__preventFocus:C,__stopPropagation:N,withCellSpacing:E,size:D,...k}=n,M=hi({name:p||"YearsList",classes:gKt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,rootSelector:"yearsList"}),T=og(),A=pKt(c),R=SEr(A,h,f,m),P=A.map((O,V)=>{const F=O.map(($,B)=>{const z=m==null?void 0:m($),H=An($).isSame(R,"year");return ne.jsx("td",{...M("yearsListCell"),"data-with-spacing":E||void 0,children:ne.jsx(oge,{...M("yearsListControl"),size:D,unstyled:a,"data-mantine-stop-propagation":N||void 0,disabled:mKt($,h,f),ref:K=>g==null?void 0:g(V,B,K),...z,onKeyDown:K=>{var q;(q=z==null?void 0:z.onKeyDown)==null||q.call(z,K),y==null||y(K,{rowIndex:V,cellIndex:B,date:$})},onClick:K=>{var q;(q=z==null?void 0:z.onClick)==null||q.call(z,K),_==null||_(K,$)},onMouseEnter:K=>{var q;(q=z==null?void 0:z.onMouseEnter)==null||q.call(z,K),w==null||w(K,$)},onMouseDown:K=>{var q;(q=z==null?void 0:z.onMouseDown)==null||q.call(z,K),C&&K.preventDefault()},tabIndex:C||!H?-1:0,children:An($).locale(T.getLocale(d)).format(u)})},B)});return ne.jsx("tr",{...M("yearsListRow"),children:F},V)});return ne.jsx(mn,{component:"table",ref:e,size:D,...M("yearsList"),...k,children:ne.jsx("tbody",{children:P})})});sge.classes=gKt;sge.displayName="@mantine/dates/YearsList";function bKt(t,e,n){return!e&&!n?!1:!!(e&&An(t).isBefore(e,"month")||n&&An(t).isAfter(n,"month"))}function EEr(t,e,n,i){const r=t.flat().filter(a=>{var l;return!bKt(a,e,n)&&!((l=i==null?void 0:i(a))!=null&&l.disabled)}),o=r.find(a=>{var l;return(l=i==null?void 0:i(a))==null?void 0:l.selected});if(o)return o;const s=r.find(a=>An().isSame(a,"month"));return s||r[0]}function DEr(t){const e=An(t).startOf("year").toDate(),n=[[],[],[],[]];let i=0;for(let r=0;r<4;r+=1)for(let o=0;o<3;o+=1)n[r].push(An(e).add(i,"months").toDate()),i+=1;return n}var vKt={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const kEr={monthsListFormat:"MMM",withCellSpacing:!0},age=Dn((t,e)=>{const n=Kt("MonthsList",kEr,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,__staticSelector:c,year:u,monthsListFormat:d,locale:h,minDate:f,maxDate:m,getMonthControlProps:p,__getControlRef:g,__onControlKeyDown:y,__onControlClick:_,__onControlMouseEnter:w,__preventFocus:C,__stopPropagation:N,withCellSpacing:E,size:D,...k}=n,M=hi({name:c||"MonthsList",classes:vKt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,rootSelector:"monthsList"}),T=og(),A=DEr(u),R=EEr(A,f,m,p),P=A.map((O,V)=>{const F=O.map(($,B)=>{const z=p==null?void 0:p($),H=An($).isSame(R,"month");return ne.jsx("td",{...M("monthsListCell"),"data-with-spacing":E||void 0,children:ne.jsx(oge,{...M("monthsListControl"),size:D,unstyled:a,__staticSelector:c||"MonthsList","data-mantine-stop-propagation":N||void 0,disabled:bKt($,f,m),ref:K=>g==null?void 0:g(V,B,K),...z,onKeyDown:K=>{var q;(q=z==null?void 0:z.onKeyDown)==null||q.call(z,K),y==null||y(K,{rowIndex:V,cellIndex:B,date:$})},onClick:K=>{var q;(q=z==null?void 0:z.onClick)==null||q.call(z,K),_==null||_(K,$)},onMouseEnter:K=>{var q;(q=z==null?void 0:z.onMouseEnter)==null||q.call(z,K),w==null||w(K,$)},onMouseDown:K=>{var q;(q=z==null?void 0:z.onMouseDown)==null||q.call(z,K),C&&K.preventDefault()},tabIndex:C||!H?-1:0,children:An($).locale(T.getLocale(h)).format(d)})},B)});return ne.jsx("tr",{...M("monthsListRow"),children:F},V)});return ne.jsx(mn,{component:"table",ref:e,size:D,...M("monthsList"),...k,children:ne.jsx("tbody",{children:P})})});age.classes=vKt;age.displayName="@mantine/dates/MonthsList";var yKt={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const MEr={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0},LEr=(t,{size:e})=>({calendarHeader:{"--dch-control-size":Hr(e,"dch-control-size"),"--dch-fz":hd(e)}}),EM=Dn((t,e)=>{const n=Kt("CalendarHeader",MEr,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,nextIcon:c,previousIcon:u,nextLabel:d,previousLabel:h,onNext:f,onPrevious:m,onLevelClick:p,label:g,nextDisabled:y,previousDisabled:_,hasNextLevel:w,levelControlAriaLabel:C,withNext:N,withPrevious:E,__staticSelector:D,__preventFocus:k,__stopPropagation:M,...T}=n,A=hi({name:D||"CalendarHeader",classes:yKt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,varsResolver:LEr,rootSelector:"calendarHeader"}),R=k?P=>P.preventDefault():void 0;return ne.jsxs(mn,{...A("calendarHeader"),ref:e,...T,children:[E&&ne.jsx(Lh,{...A("calendarHeaderControl"),"data-direction":"previous","aria-label":h,onClick:m,unstyled:a,onMouseDown:R,disabled:_,"data-disabled":_||void 0,tabIndex:k||_?-1:0,"data-mantine-stop-propagation":M||void 0,children:u||ne.jsx(Tz,{...A("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})}),ne.jsx(Lh,{component:w?"button":"div",...A("calendarHeaderLevel"),onClick:w?p:void 0,unstyled:a,onMouseDown:w?R:void 0,disabled:!w,"data-static":!w||void 0,"aria-label":C,tabIndex:k||!w?-1:0,"data-mantine-stop-propagation":M||void 0,children:g}),N&&ne.jsx(Lh,{...A("calendarHeaderControl"),"data-direction":"next","aria-label":d,onClick:f,unstyled:a,onMouseDown:R,disabled:y,"data-disabled":y||void 0,tabIndex:k||y?-1:0,"data-mantine-stop-propagation":M||void 0,children:c||ne.jsx(Tz,{...A("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})})]})});EM.classes=yKt;EM.displayName="@mantine/dates/CalendarHeader";function TEr(t){const e=pKt(t);return[e[0][0],e[3][0]]}const IEr={decadeLabelFormat:"YYYY"},lge=Dn((t,e)=>{const n=Kt("DecadeLevel",IEr,t),{decade:i,locale:r,minDate:o,maxDate:s,yearsListFormat:a,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:h,withCellSpacing:f,__preventFocus:m,nextIcon:p,previousIcon:g,nextLabel:y,previousLabel:_,onNext:w,onPrevious:C,nextDisabled:N,previousDisabled:E,levelControlAriaLabel:D,withNext:k,withPrevious:M,decadeLabelFormat:T,classNames:A,styles:R,unstyled:P,__staticSelector:O,__stopPropagation:V,size:F,...$}=n,B=og(),[z,H]=TEr(i),K={__staticSelector:O||"DecadeLevel",classNames:A,styles:R,unstyled:P,size:F},q=typeof N=="boolean"?N:s?!An(H).endOf("year").isBefore(s):!1,U=typeof E=="boolean"?E:o?!An(z).startOf("year").isAfter(o):!1,Y=(J,ae)=>An(J).locale(r||B.locale).format(ae);return ne.jsxs(mn,{"data-decade-level":!0,size:F,ref:e,...$,children:[ne.jsx(EM,{label:typeof T=="function"?T(z,H):`${Y(z,T)} – ${Y(H,T)}`,__preventFocus:m,__stopPropagation:V,nextIcon:p,previousIcon:g,nextLabel:y,previousLabel:_,onNext:w,onPrevious:C,nextDisabled:q,previousDisabled:U,hasNextLevel:!1,levelControlAriaLabel:D,withNext:k,withPrevious:M,...K}),ne.jsx(sge,{decade:i,locale:r,minDate:o,maxDate:s,yearsListFormat:a,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:h,__preventFocus:m,__stopPropagation:V,withCellSpacing:f,...K})]})});lge.classes={...sge.classes,...EM.classes};lge.displayName="@mantine/dates/DecadeLevel";const AEr={yearLabelFormat:"YYYY"},cge=Dn((t,e)=>{const n=Kt("YearLevel",AEr,t),{year:i,locale:r,minDate:o,maxDate:s,monthsListFormat:a,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:h,withCellSpacing:f,__preventFocus:m,nextIcon:p,previousIcon:g,nextLabel:y,previousLabel:_,onNext:w,onPrevious:C,onLevelClick:N,nextDisabled:E,previousDisabled:D,hasNextLevel:k,levelControlAriaLabel:M,withNext:T,withPrevious:A,yearLabelFormat:R,__staticSelector:P,__stopPropagation:O,size:V,classNames:F,styles:$,unstyled:B,...z}=n,H=og(),K={__staticSelector:P||"YearLevel",classNames:F,styles:$,unstyled:B,size:V},q=typeof E=="boolean"?E:s?!An(i).endOf("year").isBefore(s):!1,U=typeof D=="boolean"?D:o?!An(i).startOf("year").isAfter(o):!1;return ne.jsxs(mn,{"data-year-level":!0,size:V,ref:e,...z,children:[ne.jsx(EM,{label:typeof R=="function"?R(i):An(i).locale(r||H.locale).format(R),__preventFocus:m,__stopPropagation:O,nextIcon:p,previousIcon:g,nextLabel:y,previousLabel:_,onNext:w,onPrevious:C,onLevelClick:N,nextDisabled:q,previousDisabled:U,hasNextLevel:k,levelControlAriaLabel:M,withNext:T,withPrevious:A,...K}),ne.jsx(age,{year:i,locale:r,minDate:o,maxDate:s,monthsListFormat:a,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:h,__preventFocus:m,__stopPropagation:O,withCellSpacing:f,...K})]})});cge.classes={...EM.classes,...age.classes};cge.displayName="@mantine/dates/YearLevel";const REr={monthLabelFormat:"MMMM YYYY"},uge=Dn((t,e)=>{const n=Kt("MonthLevel",REr,t),{month:i,locale:r,firstDayOfWeek:o,weekdayFormat:s,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:h,hideOutsideDates:f,hideWeekdays:m,getDayAriaLabel:p,__getDayRef:g,__onDayKeyDown:y,__onDayClick:_,__onDayMouseEnter:w,withCellSpacing:C,highlightToday:N,__preventFocus:E,__stopPropagation:D,nextIcon:k,previousIcon:M,nextLabel:T,previousLabel:A,onNext:R,onPrevious:P,onLevelClick:O,nextDisabled:V,previousDisabled:F,hasNextLevel:$,levelControlAriaLabel:B,withNext:z,withPrevious:H,monthLabelFormat:K,classNames:q,styles:U,unstyled:Y,__staticSelector:J,size:ae,static:se,...oe}=n,fe=og(),de={__staticSelector:J||"MonthLevel",classNames:q,styles:U,unstyled:Y,size:ae},ie=typeof V=="boolean"?V:d?!An(i).endOf("month").isBefore(d):!1,Q=typeof F=="boolean"?F:u?!An(i).startOf("month").isAfter(u):!1;return ne.jsxs(mn,{"data-month-level":!0,size:ae,ref:e,...oe,children:[ne.jsx(EM,{label:typeof K=="function"?K(i):An(i).locale(r||fe.locale).format(K),__preventFocus:E,__stopPropagation:D,nextIcon:k,previousIcon:M,nextLabel:T,previousLabel:A,onNext:R,onPrevious:P,onLevelClick:O,nextDisabled:ie,previousDisabled:Q,hasNextLevel:$,levelControlAriaLabel:B,withNext:z,withPrevious:H,...de}),ne.jsx(rge,{month:i,locale:r,firstDayOfWeek:o,weekdayFormat:s,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:h,hideOutsideDates:f,hideWeekdays:m,getDayAriaLabel:p,__getDayRef:g,__onDayKeyDown:y,__onDayClick:_,__onDayMouseEnter:w,__preventFocus:E,__stopPropagation:D,static:se,withCellSpacing:C,highlightToday:N,...de})]})});uge.classes={...rge.classes,...EM.classes};uge.displayName="@mantine/dates/MonthLevel";var _Kt={levelsGroup:"m_30b26e33"};const PEr={},DM=Dn((t,e)=>{const n=Kt("LevelsGroup",PEr,t),{classNames:i,className:r,style:o,styles:s,unstyled:a,vars:l,__staticSelector:c,...u}=n,d=hi({name:c||"LevelsGroup",classes:_Kt,props:n,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:l,rootSelector:"levelsGroup"});return ne.jsx(mn,{ref:e,...d("levelsGroup"),...u})});DM.classes=_Kt;DM.displayName="@mantine/dates/LevelsGroup";const OEr={numberOfColumns:1},dge=Dn((t,e)=>{const n=Kt("DecadeLevelGroup",OEr,t),{decade:i,locale:r,minDate:o,maxDate:s,yearsListFormat:a,getYearControlProps:l,__onControlClick:c,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:h,nextIcon:f,previousIcon:m,nextLabel:p,previousLabel:g,onNext:y,onPrevious:_,nextDisabled:w,previousDisabled:C,classNames:N,styles:E,unstyled:D,__staticSelector:k,__stopPropagation:M,numberOfColumns:T,levelControlAriaLabel:A,decadeLabelFormat:R,size:P,vars:O,...V}=n,F=b.useRef([]),$=Array(T).fill(0).map((B,z)=>{const H=An(i).add(z*10,"years").toDate();return ne.jsx(lge,{size:P,yearsListFormat:a,decade:H,withNext:z===T-1,withPrevious:z===0,decadeLabelFormat:R,__onControlClick:c,__onControlMouseEnter:u,__onControlKeyDown:(K,q)=>HHe({levelIndex:z,rowIndex:q.rowIndex,cellIndex:q.cellIndex,event:K,controlsRef:F}),__getControlRef:(K,q,U)=>{Array.isArray(F.current[z])||(F.current[z]=[]),Array.isArray(F.current[z][K])||(F.current[z][K]=[]),F.current[z][K][q]=U},levelControlAriaLabel:typeof A=="function"?A(H):A,locale:r,minDate:o,maxDate:s,__preventFocus:h,__stopPropagation:M,nextIcon:f,previousIcon:m,nextLabel:p,previousLabel:g,onNext:y,onPrevious:_,nextDisabled:w,previousDisabled:C,getYearControlProps:l,__staticSelector:k||"DecadeLevelGroup",classNames:N,styles:E,unstyled:D,withCellSpacing:d},z)});return ne.jsx(DM,{classNames:N,styles:E,__staticSelector:k||"DecadeLevelGroup",ref:e,size:P,unstyled:D,...V,children:$})});dge.classes={...DM.classes,...lge.classes};dge.displayName="@mantine/dates/DecadeLevelGroup";const jEr={numberOfColumns:1},hge=Dn((t,e)=>{const n=Kt("YearLevelGroup",jEr,t),{year:i,locale:r,minDate:o,maxDate:s,monthsListFormat:a,getMonthControlProps:l,__onControlClick:c,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:h,nextIcon:f,previousIcon:m,nextLabel:p,previousLabel:g,onNext:y,onPrevious:_,onLevelClick:w,nextDisabled:C,previousDisabled:N,hasNextLevel:E,classNames:D,styles:k,unstyled:M,__staticSelector:T,__stopPropagation:A,numberOfColumns:R,levelControlAriaLabel:P,yearLabelFormat:O,size:V,vars:F,...$}=n,B=b.useRef([]),z=Array(R).fill(0).map((H,K)=>{const q=An(i).add(K,"years").toDate();return ne.jsx(cge,{size:V,monthsListFormat:a,year:q,withNext:K===R-1,withPrevious:K===0,yearLabelFormat:O,__stopPropagation:A,__onControlClick:c,__onControlMouseEnter:u,__onControlKeyDown:(U,Y)=>HHe({levelIndex:K,rowIndex:Y.rowIndex,cellIndex:Y.cellIndex,event:U,controlsRef:B}),__getControlRef:(U,Y,J)=>{Array.isArray(B.current[K])||(B.current[K]=[]),Array.isArray(B.current[K][U])||(B.current[K][U]=[]),B.current[K][U][Y]=J},levelControlAriaLabel:typeof P=="function"?P(q):P,locale:r,minDate:o,maxDate:s,__preventFocus:h,nextIcon:f,previousIcon:m,nextLabel:p,previousLabel:g,onNext:y,onPrevious:_,onLevelClick:w,nextDisabled:C,previousDisabled:N,hasNextLevel:E,getMonthControlProps:l,classNames:D,styles:k,unstyled:M,__staticSelector:T||"YearLevelGroup",withCellSpacing:d},K)});return ne.jsx(DM,{classNames:D,styles:k,__staticSelector:T||"YearLevelGroup",ref:e,size:V,unstyled:M,...$,children:z})});hge.classes={...cge.classes,...DM.classes};hge.displayName="@mantine/dates/YearLevelGroup";const FEr={numberOfColumns:1},fge=Dn((t,e)=>{const n=Kt("MonthLevelGroup",FEr,t),{month:i,locale:r,firstDayOfWeek:o,weekdayFormat:s,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:h,hideOutsideDates:f,hideWeekdays:m,getDayAriaLabel:p,__onDayClick:g,__onDayMouseEnter:y,withCellSpacing:_,highlightToday:w,__preventFocus:C,nextIcon:N,previousIcon:E,nextLabel:D,previousLabel:k,onNext:M,onPrevious:T,onLevelClick:A,nextDisabled:R,previousDisabled:P,hasNextLevel:O,classNames:V,styles:F,unstyled:$,numberOfColumns:B,levelControlAriaLabel:z,monthLabelFormat:H,__staticSelector:K,__stopPropagation:q,size:U,static:Y,vars:J,...ae}=n,se=b.useRef([]),oe=Array(B).fill(0).map((fe,de)=>{const ie=An(i).add(de,"months").toDate();return ne.jsx(uge,{month:ie,withNext:de===B-1,withPrevious:de===0,monthLabelFormat:H,__stopPropagation:q,__onDayClick:g,__onDayMouseEnter:y,__onDayKeyDown:(Q,be)=>HHe({levelIndex:de,rowIndex:be.rowIndex,cellIndex:be.cellIndex,event:Q,controlsRef:se}),__getDayRef:(Q,be,le)=>{Array.isArray(se.current[de])||(se.current[de]=[]),Array.isArray(se.current[de][Q])||(se.current[de][Q]=[]),se.current[de][Q][be]=le},levelControlAriaLabel:typeof z=="function"?z(ie):z,locale:r,firstDayOfWeek:o,weekdayFormat:s,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:h,hideOutsideDates:f,hideWeekdays:m,getDayAriaLabel:p,__preventFocus:C,nextIcon:N,previousIcon:E,nextLabel:D,previousLabel:k,onNext:M,onPrevious:T,onLevelClick:A,nextDisabled:R,previousDisabled:P,hasNextLevel:O,classNames:V,styles:F,unstyled:$,__staticSelector:K||"MonthLevelGroup",size:U,static:Y,withCellSpacing:_,highlightToday:w},de)});return ne.jsx(DM,{classNames:V,styles:F,__staticSelector:K||"MonthLevelGroup",ref:e,size:U,...ae,children:oe})});fge.classes={...DM.classes,...uge.classes};fge.displayName="@mantine/dates/MonthLevelGroup";var xKt={input:"m_6fa5e2aa"};const $Er={},mge=Dn((t,e)=>{const{inputProps:n,wrapperProps:i,placeholder:r,classNames:o,styles:s,unstyled:a,popoverProps:l,modalProps:c,dropdownType:u,children:d,formattedValue:h,dropdownHandlers:f,dropdownOpened:m,onClick:p,clearable:g,onClear:y,clearButtonProps:_,rightSection:w,shouldClear:C,readOnly:N,disabled:E,value:D,name:k,form:M,type:T,...A}=_5e("PickerInputBase",$Er,t),R=w||(g&&C&&!N&&!E?ne.jsx(Gk,{variant:"transparent",onClick:y,unstyled:a,size:n.size||"sm",..._}):null),P=()=>{T==="range"&&Array.isArray(D)&&D[0]&&!D[1]&&y(),f.close()};return ne.jsxs(ne.Fragment,{children:[u==="modal"&&!N&&ne.jsx(bl,{opened:m,onClose:P,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:a,...c,children:d}),ne.jsx(ra.Wrapper,{...i,children:ne.jsxs(Iu,{position:"bottom-start",opened:m,trapFocus:!0,returnFocus:!0,unstyled:a,...l,disabled:(l==null?void 0:l.disabled)||u==="modal"||N,onClose:()=>{var O;(O=l==null?void 0:l.onClose)==null||O.call(l),P()},children:[ne.jsx(Iu.Target,{children:ne.jsx(ra,{"data-dates-input":!0,"data-read-only":N||void 0,disabled:E,component:"button",type:"button",multiline:!0,onClick:O=>{p==null||p(O),f.toggle()},rightSection:R,...n,ref:e,classNames:{...o,input:Vt(xKt.input,o==null?void 0:o.input)},...A,children:h||ne.jsx(ra.Placeholder,{error:n.error,unstyled:a,className:o==null?void 0:o.placeholder,style:s==null?void 0:s.placeholder,children:r})})}),ne.jsx(Iu.Dropdown,{"data-dates-dropdown":!0,children:d})]})}),ne.jsx(sKt,{value:D,name:k,form:M,type:T})]})});mge.classes=xKt;mge.displayName="@mantine/dates/PickerInputBase";const oyt=t=>t==="range"?[null,null]:t==="multiple"?[]:null;function KHe({type:t,value:e,defaultValue:n,onChange:i,applyTimezone:r=!0}){const o=b.useRef(t),s=og(),[a,l,c]=au({value:UC("add",e,s.getTimezone(),!r),defaultValue:UC("add",n,s.getTimezone(),!r),finalValue:oyt(t),onChange:d=>{i==null||i(UC("remove",d,s.getTimezone(),!r))}});let u=a;return o.current!==t&&(o.current=t,e===void 0&&(u=n!==void 0?n:oyt(t),l(u))),[u,l,c]}function ASe(t,e){return t?t==="month"?0:t==="year"?1:2:e||0}function VEr(t){return t===0?"month":t===1?"year":"decade"}function N7(t,e,n){return VEr(av(ASe(t,0),ASe(e,0),ASe(n,2)))}const BEr={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},pge=Dn((t,e)=>{const n=Kt("Calendar",BEr,t),{vars:i,maxLevel:r,minLevel:o,defaultLevel:s,level:a,onLevelChange:l,date:c,defaultDate:u,onDateChange:d,numberOfColumns:h,columnsToScroll:f,ariaLabels:m,nextLabel:p,previousLabel:g,onYearSelect:y,onMonthSelect:_,onYearMouseEnter:w,onMonthMouseEnter:C,__updateDateOnYearSelect:N,__updateDateOnMonthSelect:E,firstDayOfWeek:D,weekdayFormat:k,weekendDays:M,getDayProps:T,excludeDate:A,renderDay:R,hideOutsideDates:P,hideWeekdays:O,getDayAriaLabel:V,monthLabelFormat:F,nextIcon:$,previousIcon:B,__onDayClick:z,__onDayMouseEnter:H,withCellSpacing:K,highlightToday:q,monthsListFormat:U,getMonthControlProps:Y,yearLabelFormat:J,yearsListFormat:ae,getYearControlProps:se,decadeLabelFormat:oe,classNames:fe,styles:de,unstyled:ie,minDate:Q,maxDate:be,locale:le,__staticSelector:Ne,size:Le,__preventFocus:Te,__stopPropagation:De,onNextDecade:Pe,onPreviousDecade:ge,onNextYear:he,onPreviousYear:me,onNextMonth:X,onPreviousMonth:re,static:we,__timezoneApplied:ue,...Ce}=n,{resolvedClassNames:ze,resolvedStyles:Ye}=zv({classNames:fe,styles:de,props:n}),[Ke,Xe]=au({value:a?N7(a,o,r):void 0,defaultValue:s?N7(s,o,r):void 0,finalValue:N7(void 0,o,r),onChange:l}),[it,ut]=KHe({type:"default",value:c,defaultValue:u,onChange:d,applyTimezone:!ue}),Ge={__staticSelector:Ne||"Calendar",styles:Ye,classNames:ze,unstyled:ie,size:Le},Ee=og(),Se=f||h||1,je=new Date,nt=Q&&Q>je?Q:je,rt=it||UC("add",nt,Ee.getTimezone()),St=()=>{const Jt=An(rt).add(Se,"month").toDate();X==null||X(Jt),ut(Jt)},At=()=>{const Jt=An(rt).subtract(Se,"month").toDate();re==null||re(Jt),ut(Jt)},Nt=()=>{const Jt=An(rt).add(Se,"year").toDate();he==null||he(Jt),ut(Jt)},vt=()=>{const Jt=An(rt).subtract(Se,"year").toDate();me==null||me(Jt),ut(Jt)},$t=()=>{const Jt=An(rt).add(10*Se,"year").toDate();Pe==null||Pe(Jt),ut(Jt)},ln=()=>{const Jt=An(rt).subtract(10*Se,"year").toDate();ge==null||ge(Jt),ut(Jt)};return ne.jsxs(mn,{ref:e,size:Le,"data-calendar":!0,...Ce,children:[Ke==="month"&&ne.jsx(fge,{month:rt,minDate:Q,maxDate:be,firstDayOfWeek:D,weekdayFormat:k,weekendDays:M,getDayProps:T,excludeDate:A,renderDay:R,hideOutsideDates:P,hideWeekdays:O,getDayAriaLabel:V,onNext:St,onPrevious:At,hasNextLevel:r!=="month",onLevelClick:()=>Xe("year"),numberOfColumns:h,locale:le,levelControlAriaLabel:m==null?void 0:m.monthLevelControl,nextLabel:(m==null?void 0:m.nextMonth)??p,nextIcon:$,previousLabel:(m==null?void 0:m.previousMonth)??g,previousIcon:B,monthLabelFormat:F,__onDayClick:z,__onDayMouseEnter:H,__preventFocus:Te,__stopPropagation:De,static:we,withCellSpacing:K,highlightToday:q,...Ge}),Ke==="year"&&ne.jsx(hge,{year:rt,numberOfColumns:h,minDate:Q,maxDate:be,monthsListFormat:U,getMonthControlProps:Y,locale:le,onNext:Nt,onPrevious:vt,hasNextLevel:r!=="month"&&r!=="year",onLevelClick:()=>Xe("decade"),levelControlAriaLabel:m==null?void 0:m.yearLevelControl,nextLabel:(m==null?void 0:m.nextYear)??p,nextIcon:$,previousLabel:(m==null?void 0:m.previousYear)??g,previousIcon:B,yearLabelFormat:J,__onControlMouseEnter:C,__onControlClick:(Jt,en)=>{E&&ut(en),Xe(N7("month",o,r)),_==null||_(en)},__preventFocus:Te,__stopPropagation:De,withCellSpacing:K,...Ge}),Ke==="decade"&&ne.jsx(dge,{decade:rt,minDate:Q,maxDate:be,yearsListFormat:ae,getYearControlProps:se,locale:le,onNext:$t,onPrevious:ln,numberOfColumns:h,nextLabel:(m==null?void 0:m.nextDecade)??p,nextIcon:$,previousLabel:(m==null?void 0:m.previousDecade)??g,previousIcon:B,decadeLabelFormat:oe,__onControlMouseEnter:w,__onControlClick:(Jt,en)=>{N&&ut(en),Xe(N7("year",o,r)),y==null||y(en)},__preventFocus:Te,__stopPropagation:De,withCellSpacing:K,...Ge})]})});pge.classes={...dge.classes,...hge.classes,...fge.classes};pge.displayName="@mantine/dates/Calendar";function zEr(t){const{maxLevel:e,minLevel:n,defaultLevel:i,level:r,onLevelChange:o,nextIcon:s,previousIcon:a,date:l,defaultDate:c,onDateChange:u,numberOfColumns:d,columnsToScroll:h,ariaLabels:f,onYearSelect:m,onMonthSelect:p,onYearMouseEnter:g,onMonthMouseEnter:y,onNextMonth:_,onPreviousMonth:w,onNextYear:C,onPreviousYear:N,onNextDecade:E,onPreviousDecade:D,withCellSpacing:k,highlightToday:M,__updateDateOnYearSelect:T,__updateDateOnMonthSelect:A,firstDayOfWeek:R,weekdayFormat:P,weekendDays:O,getDayProps:V,excludeDate:F,renderDay:$,hideOutsideDates:B,hideWeekdays:z,getDayAriaLabel:H,monthLabelFormat:K,monthsListFormat:q,getMonthControlProps:U,yearLabelFormat:Y,yearsListFormat:J,getYearControlProps:ae,decadeLabelFormat:se,allowSingleDateInRange:oe,allowDeselect:fe,minDate:de,maxDate:ie,locale:Q,...be}=t;return{calendarProps:{maxLevel:e,minLevel:n,defaultLevel:i,level:r,onLevelChange:o,nextIcon:s,previousIcon:a,date:l,defaultDate:c,onDateChange:u,numberOfColumns:d,columnsToScroll:h,ariaLabels:f,onYearSelect:m,onMonthSelect:p,onYearMouseEnter:g,onMonthMouseEnter:y,onNextMonth:_,onPreviousMonth:w,onNextYear:C,onPreviousYear:N,onNextDecade:E,onPreviousDecade:D,withCellSpacing:k,highlightToday:M,__updateDateOnYearSelect:T,__updateDateOnMonthSelect:A,firstDayOfWeek:R,weekdayFormat:P,weekendDays:O,getDayProps:V,excludeDate:F,renderDay:$,hideOutsideDates:B,hideWeekdays:z,getDayAriaLabel:H,monthLabelFormat:K,monthsListFormat:q,getMonthControlProps:U,yearLabelFormat:Y,yearsListFormat:J,getYearControlProps:ae,decadeLabelFormat:se,allowSingleDateInRange:oe,allowDeselect:fe,minDate:de,maxDate:ie,locale:Q},others:be}}function syt(t,e){const n=[...e].sort((i,r)=>i.getTime()-r.getTime());return An(n[0]).startOf("day").subtract(1,"ms").isBefore(t)&&An(n[1]).endOf("day").add(1,"ms").isAfter(t)}function HEr({type:t,level:e,value:n,defaultValue:i,onChange:r,allowSingleDateInRange:o,allowDeselect:s,onMouseLeave:a,applyTimezone:l=!0}){const[c,u]=KHe({type:t,value:n,defaultValue:i,onChange:r,applyTimezone:l}),[d,h]=b.useState(t==="range"&&c[0]&&!c[1]?c[0]:null),[f,m]=b.useState(null),p=E=>{if(t==="range"){if(d instanceof Date&&!c[1]){if(An(E).isSame(d,e)&&!o){h(null),m(null),u([null,null]);return}const D=[E,d];D.sort((k,M)=>k.getTime()-M.getTime()),u(D),m(null),h(null);return}if(c[0]&&!c[1]&&An(E).isSame(c[0],e)&&!o){h(null),m(null),u([null,null]);return}u([E,null]),m(null),h(E);return}if(t==="multiple"){c.some(D=>An(D).isSame(E,e))?u(c.filter(D=>!An(D).isSame(E,e))):u([...c,E]);return}c&&s&&An(E).isSame(c,e)?u(null):u(E)},g=E=>d instanceof Date&&f instanceof Date?syt(E,[f,d]):c[0]instanceof Date&&c[1]instanceof Date?syt(E,c):!1,y=t==="range"?E=>{a==null||a(E),m(null)}:a,_=E=>c[0]instanceof Date&&An(E).isSame(c[0],e)?!(f&&An(f).isBefore(c[0])):!1,w=E=>c[1]instanceof Date?An(E).isSame(c[1],e):!(c[0]instanceof Date)||!f?!1:An(f).isBefore(c[0])&&An(E).isSame(c[0],e),C=E=>{if(t==="range")return{selected:c.some(k=>k&&An(k).isSame(E,e)),inRange:g(E),firstInRange:_(E),lastInRange:w(E),"data-autofocus":!!c[0]&&An(c[0]).isSame(E,e)||void 0};if(t==="multiple")return{selected:c.some(k=>k&&An(k).isSame(E,e)),"data-autofocus":!!c[0]&&An(c[0]).isSame(E,e)||void 0};const D=An(c).isSame(E,e);return{selected:D,"data-autofocus":D||void 0}},N=t==="range"&&d?m:()=>{};return b.useEffect(()=>{if(t!=="range")return;const E=c[0]==null&&c[1]==null,D=c[0]!=null&&c[1]!=null;(E||D)&&(h(null),m(null))},[c]),{onDateChange:p,onRootMouseLeave:y,onHoveredDateChange:N,getControlProps:C,_value:c,setValue:u}}const WEr={type:"default",defaultLevel:"month",numberOfColumns:1},gge=Dn((t,e)=>{const n=Kt("DatePicker",WEr,t),{classNames:i,styles:r,vars:o,type:s,defaultValue:a,value:l,onChange:c,__staticSelector:u,getDayProps:d,allowSingleDateInRange:h,allowDeselect:f,onMouseLeave:m,numberOfColumns:p,hideOutsideDates:g,__onDayMouseEnter:y,__onDayClick:_,__timezoneApplied:w,...C}=n,{onDateChange:N,onRootMouseLeave:E,onHoveredDateChange:D,getControlProps:k}=HEr({type:s,level:"day",allowDeselect:f,allowSingleDateInRange:h,value:l,defaultValue:a,onChange:c,onMouseLeave:m,applyTimezone:!w}),{resolvedClassNames:M,resolvedStyles:T}=zv({classNames:i,styles:r,props:n}),A=og();return ne.jsx(pge,{ref:e,minLevel:"month",classNames:M,styles:T,__staticSelector:u||"DatePicker",onMouseLeave:E,numberOfColumns:p,hideOutsideDates:g??p!==1,__onDayMouseEnter:(R,P)=>{D(P),y==null||y(R,P)},__onDayClick:(R,P)=>{N(P),_==null||_(R,P)},getDayProps:R=>({...k(R),...d==null?void 0:d(R)}),...C,date:UC("add",C.date,A.getTimezone(),w),__timezoneApplied:!0})});gge.classes=pge.classes;gge.displayName="@mantine/dates/DatePicker";function UEr({type:t,value:e,defaultValue:n,onChange:i,locale:r,format:o,closeOnChange:s,sortDates:a,labelSeparator:l,valueFormatter:c}){const u=og(),[d,h]=Pc(!1),[f,m]=KHe({type:t,value:e,defaultValue:n,onChange:i}),p=JNr({type:t,date:f,locale:u.getLocale(r),format:o,labelSeparator:u.getLabelSeparator(l),formatter:c}),g=w=>{s&&(t==="default"&&h.close(),t==="range"&&w[0]&&w[1]&&h.close()),m(a&&t==="multiple"?[...w].sort((C,N)=>C.getTime()-N.getTime()):w)},y=()=>g(t==="range"?[null,null]:t==="multiple"?[]:null),_=t==="range"?!!f[0]:t==="multiple"?f.length>0:f!==null;return{_value:f,setValue:g,onClear:y,shouldClear:_,formattedValue:p,dropdownOpened:d,dropdownHandlers:h}}const KEr={type:"default",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},qHe=Dn((t,e)=>{const n=Kt("DatePickerInput",KEr,t),{type:i,value:r,defaultValue:o,onChange:s,valueFormat:a,labelSeparator:l,locale:c,classNames:u,styles:d,unstyled:h,closeOnChange:f,size:m,variant:p,dropdownType:g,sortDates:y,minDate:_,maxDate:w,vars:C,defaultDate:N,valueFormatter:E,...D}=n,{resolvedClassNames:k,resolvedStyles:M}=zv({classNames:u,styles:d,props:n}),{calendarProps:T,others:A}=zEr(D),{_value:R,setValue:P,formattedValue:O,dropdownHandlers:V,dropdownOpened:F,onClear:$,shouldClear:B}=UEr({type:i,value:r,defaultValue:o,onChange:s,locale:c,format:a,labelSeparator:l,closeOnChange:f,sortDates:y,valueFormatter:E}),z=Array.isArray(R)?R[0]||N:R||N,H=og();return ne.jsx(mge,{formattedValue:O,dropdownOpened:F,dropdownHandlers:V,classNames:k,styles:M,unstyled:h,ref:e,onClear:$,shouldClear:B,value:R,size:m,variant:p,dropdownType:g,...A,type:i,__staticSelector:"DatePickerInput",children:ne.jsx(gge,{...T,size:m,variant:p,type:i,value:R,defaultDate:z||lEr({maxDate:w,minDate:_,timezone:H.getTimezone()}),onChange:P,locale:c,classNames:k,styles:M,unstyled:h,__staticSelector:"DatePickerInput",__stopPropagation:g==="popover",minDate:_,maxDate:w,date:UC("add",T.date,H.getTimezone()),__timezoneApplied:!0})})});qHe.classes={...mge.classes,...gge.classes};qHe.displayName="@mantine/dates/DatePickerInput";function qEr(){var _;const t=Mt(),e=Qr(),n=If(),[i,r]=b.useState(!1),[o,s]=Bv(),a=nKt(o),l=JSON.stringify(a)===JSON.stringify(VPe),c=b.useMemo(()=>Object.keys(a).reduce((w,C)=>{var N;return C==="range"&&!((N=a.range)!=null&&N.filter(Boolean).length)||C==="seen"&&a.seen==="all"||!a[C]?w:w+1},0),[a]),u=ls({mode:"uncontrolled",initialValues:a,onValuesChange:w=>s(BPe(w))});function d(){u.setValues(VPe)}const{data:h,isInitialLoading:f,fetchNextPage:m}=Je.session.getAll.useInfiniteQuery({status:a.status,seen:a.seen,archivedOnly:a.archivedOnly,range:a.range,limit:30},{getNextPageParam:w=>{var N,E,D;if(!w||!((N=w==null?void 0:w.data)!=null&&N.length))return;const C=(D=w==null?void 0:w.data)==null?void 0:D[((E=w==null?void 0:w.data)==null?void 0:E.length)-1];return{_id:C._id,createdAt:C.createdAt}},keepPreviousData:!0}),p=((_=h==null?void 0:h.pages[0])==null?void 0:_.total)||0,g=b.useMemo(()=>(h==null?void 0:h.pages.flatMap(w=>w.data))||[],[h==null?void 0:h.pages]);b.useEffect(()=>{var w,C;if(!(n.sessionId||!((w=h==null?void 0:h.pages[0])!=null&&w.total)||window.innerWidth<1024)){if(`${(C=h==null?void 0:h.pages[0].data[0])==null?void 0:C.projectId}`!==n.projectId)return e(`/${n.projectId}/sessions`);y(h==null?void 0:h.pages[0].data[0]._id)}},[n.sessionId,h==null?void 0:h.pages]);const y=w=>{e({pathname:`/${n.projectId}/sessions/${w}`,search:wz(BPe(a)).toString()})};return v.jsxDEV(or,{className:Vt("lg:col-span-1 h-full lg:!flex",n.sessionId&&"!hidden"),children:[v.jsxDEV(or.Section,{withBorder:!0,p:"sm",mb:"sm",children:v.jsxDEV(un,{justify:"space-between",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"session_detail.table.title",defaultMessage:"Session list"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:125,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:124,columnNumber:6},this),v.jsxDEV(Iu,{width:300,position:"bottom",withArrow:!0,trapFocus:!0,shadow:"md",opened:i,onChange:r,closeOnClickOutside:!0,children:[v.jsxDEV(Iu.Target,{children:v.jsxDEV(kde,{inline:!0,label:c,disabled:!c,size:16,children:v.jsxDEV(ir,{label:t.formatMessage({id:"session_overview.filter.button.aria_label",defaultMessage:"Filter session list"}),children:v.jsxDEV(Fr,{"aria-label":t.formatMessage({id:"session_overview.filter.button.aria_label",defaultMessage:"Filter session list"}),variant:"light",onClick:()=>r(w=>!w),children:v.jsxDEV(nai,{size:16,stroke:1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:153,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:145,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:139,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:138,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:137,columnNumber:7},this),v.jsxDEV(Iu.Dropdown,{children:v.jsxDEV(Gt,{children:[v.jsxDEV(Fm,{comboboxProps:{withinPortal:!1},size:"xs",clearable:!0,clearButtonProps:{"aria-label":t.formatMessage({id:"session_overview.filter.status.clear",defaultMessage:"Clear status"})},...u.getInputProps("status"),label:t.formatMessage({id:"session_overview.filter.status.label",defaultMessage:"Status"}),placeholder:t.formatMessage({id:"session_overview.filter.status.placeholder",defaultMessage:"All statuses"}),data:Object.entries($Pe).map(([w,C])=>({value:w,label:t.formatMessage(C)}))},u.key("status"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:160,columnNumber:9},this),v.jsxDEV(qHe,{size:"xs",type:"range",allowSingleDateInRange:!0,numberOfColumns:2,popoverProps:{withinPortal:!1},clearable:!0,clearButtonProps:{"aria-label":t.formatMessage({id:"session_overview.filter.range.clear",defaultMessage:"Clear date range"})},...u.getInputProps("range"),label:t.formatMessage({id:"session_overview.filter.range.label",defaultMessage:"Date range"}),placeholder:t.formatMessage({id:"session_overview.filter.range.placeholder",defaultMessage:"No specific date selected"}),ariaLabels:{nextDecade:t.formatMessage({id:"session_overview.filter.range.aria_label.next_decade",defaultMessage:"Next decade"}),previousDecade:t.formatMessage({id:"session_overview.filter.range.aria_label.previous_decade",defaultMessage:"Previous decade"}),nextYear:t.formatMessage({id:"session_overview.filter.range.aria_label.next_year",defaultMessage:"Next year"}),previousYear:t.formatMessage({id:"session_overview.filter.range.aria_label.previous_year",defaultMessage:"Previous year"}),nextMonth:t.formatMessage({id:"session_overview.filter.range.aria_label.next_month",defaultMessage:"Next month"}),previousMonth:t.formatMessage({id:"session_overview.filter.range.aria_label.previous_month",defaultMessage:"Previous month"}),yearLevelControl:t.formatMessage({id:"session_overview.filter.range.aria_label.year_level_control",defaultMessage:"Change to decade view"}),monthLevelControl:t.formatMessage({id:"session_overview.filter.range.aria_label.month_level_control",defaultMessage:"Change to year view"})}},u.key("range"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:185,columnNumber:9},this),v.jsxDEV(Yk,{"aria-label":t.formatMessage({id:"session_overview.filter.seen.label",defaultMessage:"Filter on seen status"}),size:"xs",...u.getInputProps("seen"),data:[{label:t.formatMessage({id:"session_overview.filter.seen.seen.label",defaultMessage:"Seen"}),value:"seen"},{label:t.formatMessage({id:"session_overview.filter.seen.unseen.label",defaultMessage:"Unseen"}),value:"unseen"},{label:t.formatMessage({id:"session_overview.filter.seen.all.label",defaultMessage:"All"}),value:"all"}]},u.key("seen"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:243,columnNumber:9},this),v.jsxDEV(Du,{size:"xs",className:"mb-2",...u.getInputProps("archivedOnly",{type:"checkbox"}),label:t.formatMessage({id:"session_overview.filter.archived_only.label",defaultMessage:"Show archived"})},u.key("archivedOnly"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:275,columnNumber:9},this),!l&&v.jsxDEV(Nn,{size:"xs",variant:"subtle",onClick:()=>d(),children:v.jsxDEV(ee,{id:"session_overview.filter.reset.label",defaultMessage:"Reset to default"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:287,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:286,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:159,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:158,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:127,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:123,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:122,columnNumber:4},this),!f&&!!p&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Qe,{className:"!-mx-2",size:"xs",c:"dimmed",children:v.jsxDEV(ee,{id:"session_overview.table.total",defaultMessage:"{total, plural, =1 {# session} other {# sessions}} found",values:{total:p}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:301,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:300,columnNumber:6},this),v.jsxDEV("div",{id:"sessionInfiniteScroll",className:"h-full overflow-y-auto overflow-x-hidden mt-2 -mx-4 -mb-4 px-2",children:v.jsxDEV(jBe,{next:m,scrollThreshold:.6,dataLength:(g==null?void 0:g.length)||0,hasMore:((g==null?void 0:g.length)||0)<p,loader:v.jsxDEV(li,{height:60},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:316,columnNumber:16},this),endMessage:h&&g.length>=p&&g.length!==0&&v.jsxDEV(zl,{my:"sm",labelPosition:"center",label:t.formatMessage({id:"sessions.list.end_of_list",defaultMessage:"All sessions are fetched 📭",description:"Message user has reached the end off the sessions list"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:321,columnNumber:10},this),scrollableTarget:"sessionInfiniteScroll",className:"flex flex-col gap-2 h-full list-none",children:v.jsxDEV(OBe,{children:g.map((w,C)=>{var N,E,D;return v.jsxDEV(PBe.li,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0},transition:{duration:.15,delay:C*.0125},children:v.jsxDEV(or,{component:"button",p:"xs",className:Vt("w-full cursor-pointer","hover:!bg-gray-100","focus-visible:border-theme-primary",n.sessionId===w._id&&"!bg-theme-primary/5"),onClick:()=>y(w._id),withBorder:!0,children:[v.jsxDEV(un,{align:"start",gap:"xs",wrap:"nowrap",children:[v.jsxDEV(IS,{size:"md",radius:"md",src:(N=w.customer)==null?void 0:N.avatar},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:358,columnNumber:13},this),v.jsxDEV(Gt,{gap:2,children:[v.jsxDEV(un,{gap:"xs",wrap:"nowrap",children:[v.jsxDEV(Qe,{size:"sm",truncate:"end",children:w.customer?[(E=w.customer)==null?void 0:E.firstName,(D=w.customer)==null?void 0:D.lastName].join(" "):v.jsxDEV(ee,{id:"session_overview.table.column.customer.anonymous",defaultMessage:"Anonymous"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:368,columnNumber:17},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:361,columnNumber:15},this),v.jsxDEV(jc,{color:tKt[w.status],variant:"light",children:v.jsxDEV(ee,{...$Pe[w.status]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:378,columnNumber:16},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:374,columnNumber:15},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:360,columnNumber:14},this),v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV(Qe,{size:"xs",c:"dimmed",truncate:"end",children:v.jsxDEV(tu,{value:w.createdAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:383,columnNumber:17},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:382,columnNumber:15},this),v.jsxDEV(zl,{orientation:"vertical"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:385,columnNumber:15},this),v.jsxDEV(Qe,{size:"xs",c:"dimmed",truncate:"end",children:t.formatMessage(w.seenBy.length?iyt.seen:iyt.unseen)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:386,columnNumber:15},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:381,columnNumber:14},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:359,columnNumber:13},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:357,columnNumber:12},this),w.archivedAt&&v.jsxDEV(ir,{label:t.formatMessage({id:"session.status.archived",defaultMessage:"Session is archived"}),children:v.jsxDEV(kp,{size:"lg",radius:100,className:"!absolute -right-1 -top-1",children:v.jsxDEV(G$e,{stroke:1,size:14},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:408,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:403,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:397,columnNumber:13},this)]},w._id,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:344,columnNumber:11},this)},w._id,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:337,columnNumber:10},this)})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:335,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:311,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:307,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:299,columnNumber:5},this),!f&&!p&&v.jsxDEV(iw,{className:"p-4 my-auto",children:v.jsxDEV(Zd,{description:t.formatMessage({id:"session_overview.table.no_results",defaultMessage:"Your AI form hasn't had any sessions yet. It must be perfecting the art of silence, meditation at its best!"}),src:"/img/svg/no_results.svg"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:422,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:421,columnNumber:5},this),f&&v.jsxDEV(Gt,{gap:"xs",children:[v.jsxDEV(li,{height:60},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:434,columnNumber:6},this),v.jsxDEV(li,{height:60},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:435,columnNumber:6},this),v.jsxDEV(li,{height:60},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:436,columnNumber:6},this),v.jsxDEV(li,{height:60},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:437,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:433,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/components/SessionList.tsx",lineNumber:121,columnNumber:3},this)}function GEr(){const t=Mt();return ga(t.formatMessage({id:"session_overview.page.title",defaultMessage:"Sessions - Chathive"})),v.jsxDEV("section",{className:"grid lg:grid-cols-3 xl:grid-cols-4 gap-4 w-full h-full sm:p-4",children:[v.jsxDEV(qEr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/index.tsx",lineNumber:23,columnNumber:4},this),v.jsxDEV(ZNr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/index.tsx",lineNumber:24,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Sessions/index.tsx",lineNumber:18,columnNumber:3},this)}function YEr(){var d,h,f,m,p,g;const t=Mt(),e=Je.useUtils(),n=Oi(ps),{data:i}=Je.getOrganization.useQuery(void 0,{staleTime:1/0}),{data:r,isLoading:o}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0}),s=Je.project.updateRetentionSettings.useMutation(),a=gt.object({isSavedForeverEnabled:gt.boolean().default(!0),conversationRetentionMonths:gt.number({required_error:t.formatMessage({id:"project_settings.conversation_retention.form.months.required",defaultMessage:"Please enter the number of months"})}).min(1,{message:t.formatMessage({id:"project_settings.conversation_retention.form.months.invalid",defaultMessage:"Please enter a value between 1 and 60"})}).max(60,{message:t.formatMessage({id:"project_settings.conversation_retention.form.months.invalid",defaultMessage:"Please enter a value between 1 and 60"})}).optional()}),l=ls({validateInputOnBlur:!0,initialValues:{isSavedForeverEnabled:((d=r==null?void 0:r.settings)==null?void 0:d.conversationRetentionMonths)===void 0||!((h=r==null?void 0:r.settings)!=null&&h.conversationRetentionMonths),conversationRetentionMonths:((f=r==null?void 0:r.settings)==null?void 0:f.conversationRetentionMonths)||6},validate:aa(a)}),c=async y=>{var _;if((_=i==null?void 0:i.permissions)!=null&&_.conversationRetention){if(y.isSavedForeverEnabled)return u();Ev.openConfirmModal({title:t.formatMessage({id:"project_settings.retention_modal.title",defaultMessage:"Update Retention Settings"}),children:v.jsxDEV(Gt,{children:[v.jsxDEV(Yo,{color:"orange",variant:"light",icon:v.jsxDEV(ud,{size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:77,columnNumber:50},this),children:v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"project_settings.retention_modal.description.warning",defaultMessage:"Once a conversation is deleted, it will be permanently removed from our system."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:79,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:78,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:77,columnNumber:6},this),v.jsxDEV(Qe,{c:"dimmed",size:"sm",children:v.jsxDEV(ee,{id:"project_settings.retention_modal.description.info",defaultMessage:"Conversations that are older then {months} months will be deleted. Changes may take up to 24 hours.",values:{months:l.values.conversationRetentionMonths}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:86,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:85,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:76,columnNumber:5},this),labels:{confirm:t.formatMessage({id:"project_settings.retention_modal.button.confirm",defaultMessage:"Confirm"}),cancel:t.formatMessage({id:"shared.button.cancel",defaultMessage:"Cancel"})},confirmProps:{loading:s.isLoading},onConfirm:()=>u()})}},u=async()=>{var y;try{const _=l.values.isSavedForeverEnabled||(y=l.values)==null?void 0:y.conversationRetentionMonths;await s.mutateAsync({conversationRetentionMonths:_}),e.project.getCurrent.invalidate(),l.setInitialValues(structuredClone(l.values)),In.show({color:"green",message:t.formatMessage({id:"project_settings.retention_modal.success",defaultMessage:"Successfully updated retention settings"}),autoClose:5e3})}catch{In.show({color:"red",autoClose:5e3,message:t.formatMessage({id:"project_settings.retention_modal.error",defaultMessage:"Failed to update retention settings"})})}};return!i||!r?v.jsxDEV(Gt,{className:"w-full h-full overflow-auto",children:v.jsxDEV(li,{height:"288px",className:"w-full"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:141,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:140,columnNumber:4},this):v.jsxDEV(or,{children:[v.jsxDEV(Gt,{justify:"space-between",gap:2,children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"project_settings.conversation_retention.title",defaultMessage:"Data Retention Settings"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:150,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:149,columnNumber:5},this),v.jsxDEV(Qe,{c:"dimmed",size:"sm",className:"max-w-prose",children:v.jsxDEV(ee,{id:"project_settings.conversation_retention.warning.description",defaultMessage:"Manage how long we should retain your project data in our system. After that period, the following data will be permanently deleted from our system:"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:156,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:155,columnNumber:5},this),v.jsxDEV(mm,{size:"sm",withPadding:!0,className:"list-disc pt-2",children:(m=XEr[r.projectType])==null?void 0:m.map(y=>v.jsxDEV(mm.Item,{c:"dimmed",children:t.formatMessage(y)},y.id,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:163,columnNumber:7},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:161,columnNumber:5},this),v.jsxDEV(zl,{my:"md"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:168,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:148,columnNumber:4},this),!o&&r&&v.jsxDEV("form",{onSubmit:l.onSubmit(c),children:[v.jsxDEV(Vo,{id:"isSavedForeverEnabled",label:t.formatMessage({id:"project_settings.conversation_retention.form.save_forever",defaultMessage:"Keep project data forever."}),children:v.jsxDEV(Du,{id:"isSavedForeverEnabled",...l.getInputProps("isSavedForeverEnabled",{type:"checkbox"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:179,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:172,columnNumber:6},this),!l.values.isSavedForeverEnabled&&v.jsxDEV(Vo,{id:"email",label:t.formatMessage({id:"project_settings.conversation_retention.form.save_for_next.label",defaultMessage:"Number of months to retain project data"}),help:t.formatMessage({id:"project_settings.conversation_retention.form.save_for_next.label",defaultMessage:"Project data older then the set months will be deleted forever."}),children:v.jsxDEV(Fde,{min:1,max:60,placeholder:"6",className:"max-w-32",rightSectionWidth:"w-fit",...l.getInputProps("conversationRetentionMonths"),rightSectionProps:{className:"w-fit bg-neutral-100 px-2"},rightSection:t.formatMessage({id:"project_settings.conversation_retention.form.save_for_next.months",defaultMessage:"Months"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:196,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:185,columnNumber:7},this),n&&((p=i==null?void 0:i.permissions)==null?void 0:p.conversationRetention)&&v.jsxDEV(Nn,{type:"submit",loading:s.isLoading,disabled:!l.isDirty()||!l.isValid(),children:v.jsxDEV(ee,{id:"shared.submit",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:218,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:213,columnNumber:7},this),n&&!((g=i==null?void 0:i.permissions)!=null&&g.conversationRetention)&&v.jsxDEV(Nn,{size:"sm",to:"/billing",variant:"subtle",component:Np,className:"!text-theme-primary focus-within:bg-theme-primary/10",children:v.jsxDEV(ee,{id:"shared.button.upgrade",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:229,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:222,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:171,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/ConversationRetention.tsx",lineNumber:147,columnNumber:3},this)}const XEr={chatbot:[{id:"project_settings.conversation_retention.data.conversations",defaultMessage:"Conversations and messages"},{id:"project_settings.conversation_retention.data.lead_generations",defaultMessage:"Lead generations sessions"}],aiForm:[{id:"project_settings.conversation_retention.data.conversations",defaultMessage:"Conversations and messages"},{id:"project_settings.conversation_retention.data.sessions",defaultMessage:"AI from sessions"}]};function ZEr(){const t=Mt();return ga(t.formatMessage({id:"project_settings.gdpr_settings.page.title",defaultMessage:"GDPR settings - Chathive"})),v.jsxDEV("div",{className:"w-full max-w-screen-xl bg-white pt-6 sm:bg-transparent sm:pt-0 sm:gap-4 flex flex-col self-start",children:v.jsxDEV(YEr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/index.tsx",lineNumber:18,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GdprSettings/index.tsx",lineNumber:17,columnNumber:3},this)}function QEr({project:t}){var c;const e=Mt(),n=Je.useUtils(),i=Oi(ps),r=Je.project.activate.useMutation(),{data:o}=Je.getOrganization.useQuery(void 0,{staleTime:1/0}),{data:s}=Je.project.getTotalActiveProject.useQuery(void 0,{staleTime:1/0});if(!(t!=null&&t.disabledAt))return null;const a=(((c=o==null?void 0:o.permissions)==null?void 0:c.projects[t==null?void 0:t.projectType])||0)<((s==null?void 0:s[t==null?void 0:t.projectType])||0),l=async()=>{try{await r.mutateAsync(),n.project.getCurrent.invalidate(),In.show({color:"green",autoClose:5e3,message:e.formatMessage({id:"project_settings.activate_project.success.message",defaultMessage:"Successfully activated {projectName}."},{projectName:t==null?void 0:t.name})})}catch{In.show({color:"red",title:e.formatMessage({id:"project_settings.lead_generation.enable_settings.notification.failed.title",defaultMessage:"Settings could not be updated"}),message:e.formatMessage({id:"project_settings.activate_project.failed.message",defaultMessage:'Cannot activate your project "{projectName}" at this moment. Please try again later.',description:"Failed to activate project, because server crashed or organization has exceeded the total allowed projects"},{projectName:t==null?void 0:t.name}),autoClose:5e3})}};return v.jsxDEV(Yo,{variant:"light",color:"yellow",children:v.jsxDEV(un,{className:"w-full",justify:"space-between",wrap:"nowrap",children:[v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"project_settings.activate_project.description",defaultMessage:"Activate this project to start using it again.<newLine></newLine>This is only possible if you have deleted another project or upgraded your plan to a higher tier with more projects.",values:{name:t==null?void 0:t.name,newLine:()=>v.jsxDEV("br",{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/ActivateProject.tsx",lineNumber:72,columnNumber:23},this),bold:u=>v.jsxDEV("span",{className:"font-bold",children:u},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/ActivateProject.tsx",lineNumber:73,columnNumber:27},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/ActivateProject.tsx",lineNumber:67,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/ActivateProject.tsx",lineNumber:66,columnNumber:5},this),v.jsxDEV(ir,{disabled:!a,label:e.formatMessage({id:"project_settings.activate_project.button.tooltip",defaultMessage:"Delete another {projectType} project before you can enable {projectName}"},{projectName:t==null?void 0:t.name,projectType:t==null?void 0:t.projectType}),children:v.jsxDEV(Nn,{onClick:l,loading:r.isLoading,disabled:a||!i,children:v.jsxDEV(ee,{id:"project_settings.activate_project.button",defaultMessage:"Enable project"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/ActivateProject.tsx",lineNumber:93,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/ActivateProject.tsx",lineNumber:88,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/ActivateProject.tsx",lineNumber:78,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/ActivateProject.tsx",lineNumber:65,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/ActivateProject.tsx",lineNumber:64,columnNumber:3},this)}function JEr(t){const e=Mt(),n=Qr(),i=Je.useContext(),[r,o]=b.useState(!1),{data:s}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0}),a=Je.project.deleteProject.useMutation(),l=async()=>{try{if(!r)return;await a.mutateAsync(),i.project.getAll.invalidate(),Ei.success({placement:"bottomRight",message:e.formatMessage({id:"project_settings.delete_project_modal.success.message",defaultMessage:"Successfully deleted your project {projectName}."},{projectName:s==null?void 0:s.name})}),n("/")}catch{Ei.error({placement:"bottomRight",message:e.formatMessage({id:"project_settings.delete_project_modal.failed.message",defaultMessage:"Cannot delete your project {projectName} at this moment. Please try again later."},{projectName:s==null?void 0:s.name})})}},c=u=>{o(u.target.value===(s==null?void 0:s.name))};return v.jsxDEV(Ma,{...t,destroyOnClose:!0,title:e.formatMessage({id:"project_settings.delete_project_modal.title",defaultMessage:"Delete project"}),footer:[v.jsxDEV(vn,{type:"text",onClick:t.onCancel,children:v.jsxDEV(ee,{id:"project_settings.delete_project_modal.button.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/components/DeleteModal.tsx",lineNumber:64,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/components/DeleteModal.tsx",lineNumber:63,columnNumber:5},this),v.jsxDEV(vn,{danger:!0,type:"primary",onClick:l,loading:a.isLoading,disabled:!r,children:v.jsxDEV(ee,{id:"project_settings.delete_project_modal.button.delete",defaultMessage:"Delete project"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/components/DeleteModal.tsx",lineNumber:76,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/components/DeleteModal.tsx",lineNumber:69,columnNumber:5},this)],children:v.jsxDEV(aS,{direction:"vertical",size:"middle",children:[v.jsxDEV(Fn.Text,{className:"whitespace-pre-wrap",children:v.jsxDEV(ee,{id:"project_settings.delete_project_modal.description.label",defaultMessage:"Type in your project name <bold>{name}</bold> to delete it. This action is irreversible and will happen immediately.",values:{name:s==null?void 0:s.name,bold:u=>v.jsxDEV(Fn.Text,{strong:!0,children:u},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/components/DeleteModal.tsx",lineNumber:90,columnNumber:27},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/components/DeleteModal.tsx",lineNumber:85,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/components/DeleteModal.tsx",lineNumber:84,columnNumber:5},this),v.jsxDEV(es,{size:"large",onChange:c,placeholder:e.formatMessage({id:"project_settings.delete_project_modal.description.placeholder",defaultMessage:"Type {projectName}",description:"Placeholder of the input field in the delete modal where user needs to enter the project name"},{projectName:s==null?void 0:s.name})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/components/DeleteModal.tsx",lineNumber:94,columnNumber:5},this),v.jsxDEV(Fn.Text,{className:"italic",children:v.jsxDEV(ee,{id:"project_settings.delete_project_modal.description.help",defaultMessage:"The above field is case sensitive.",description:"Let user know the project name they have to enter to confirm they are about to delete the project needs to be entered case sensitive."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/components/DeleteModal.tsx",lineNumber:108,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/components/DeleteModal.tsx",lineNumber:107,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/components/DeleteModal.tsx",lineNumber:83,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/components/DeleteModal.tsx",lineNumber:55,columnNumber:3},this)}function eDr({project:t}){const e=Oi(ps),[n,i]=b.useState(!1);return e?v.jsxDEV(or,{children:[v.jsxDEV(Gt,{children:[v.jsxDEV(un,{justify:"space-between",children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"project_settings.delete_project.title",defaultMessage:"Delete project"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:21,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:20,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:19,columnNumber:5},this),v.jsxDEV(un,{wrap:"nowrap",justify:"space-between",children:[v.jsxDEV(Gt,{children:[v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"project_settings.delete_project.description",defaultMessage:"Deleting your project <bold>{name}</bold> is irreversible and will affect the following:",values:{name:t==null?void 0:t.name,bold:r=>v.jsxDEV("span",{className:"font-bold",children:r},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:32,columnNumber:29},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:27,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:26,columnNumber:7},this),v.jsxDEV(mm,{className:"list-disc",size:"sm",children:[v.jsxDEV(mm.Item,{children:v.jsxDEV(ee,{id:"project_settings.delete_project.description.list.item_1",defaultMessage:"Your training tokens will <bold>NOT</bold> reset.",values:{bold:r=>v.jsxDEV("span",{className:"font-bold",children:r},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:42,columnNumber:30},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:38,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:37,columnNumber:8},this),v.jsxDEV(mm.Item,{children:v.jsxDEV(ee,{id:"project_settings.delete_project.description.list.item_2",defaultMessage:"The widget will not be visible on your website."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:47,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:46,columnNumber:8},this),v.jsxDEV(mm.Item,{children:v.jsxDEV(ee,{id:"project_settings.delete_project.description.list.item_3",defaultMessage:"All your conversations, sessions, analytics will be deleted."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:53,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:52,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:36,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:25,columnNumber:6},this),v.jsxDEV(Nn,{className:"min-w-fit",variant:"light",color:"red",onClick:()=>i(!0),children:v.jsxDEV(ee,{id:"project_settings.delete_project.button",defaultMessage:"Delete project"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:61,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:60,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:24,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:18,columnNumber:4},this),v.jsxDEV(JEr,{open:n,onCancel:()=>i(!1)},`${n}`,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:65,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/DeleteProject.tsx",lineNumber:17,columnNumber:3},this):null}const ayt=Ja.getAllCodes();function tDr({organization:t,project:e}){var m;const n=Mt(),i=Je.useUtils(),r=Oi(ps),[o,s]=b.useState(!1),a=lSt(()=>s(!0),1e3),l=Je.project.updateLanguages.useMutation(),c=gt.object({languages:gt.array(gt.enum(ayt),{required_error:n.formatMessage({id:"project_settings.languages.form.languages.validation.required_error",defaultMessage:"Your project must have at least 1 language"})}).min(1,{message:n.formatMessage({id:"project_settings.languages.form.languages.validation.required_error",defaultMessage:"Your project must have at least 1 language"})}).max(t.permissions.languageLimit,{message:n.formatMessage({id:"project_settings.languages.form.languages.validation.limit",defaultMessage:"Upgrade to add more languages"})}),defaultLanguage:gt.enum(ayt,{required_error:n.formatMessage({id:"project_settings.languages.form.default_languages.validation.required_error",defaultMessage:"Your project must have a default language"})})}),u=ls({validateInputOnBlur:!0,initialValues:{languages:e.languages,defaultLanguage:e.defaultLanguage},validate:iOt(c)});function d(p){if(!e)return;const g=e.languages.filter(y=>!p.languages.includes(y));if(!g.length){h(p);return}Ev.openConfirmModal({title:n.formatMessage({id:"project_settings.languages.confirm_delete.title",defaultMessage:"You are deleting {languages}"},{languages:n.formatList(g.map(y=>Ja.getName(y)))}),children:v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"project_settings.languages.confirm_delete.description",defaultMessage:"We will clean up {total, plural, =1 {this language} other {these languages}} from your widget, layout, lead generation and other project specific fields. You will lose this content if you continue.",values:{total:g.length}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:93,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:92,columnNumber:5},this),labels:{confirm:n.formatMessage({id:"project_settings.languages.confirm_delete.confirm",defaultMessage:"Oke"}),cancel:n.formatMessage({id:"project_settings.languages.confirm_delete.cancel",defaultMessage:"Cancel"})},confirmProps:{loading:l.isLoading,color:"red"},onConfirm:()=>h(p)})}async function h(p){try{a.start(),await l.mutateAsync(p),u.resetDirty(),i.getWidget.invalidate(),i.project.getCurrent.invalidate(),u.setInitialValues(structuredClone(p)),In.show({color:"green",message:n.formatMessage({id:"project_settings.languages.update.executed.success.message",defaultMessage:"Successfully updated project settings."}),autoClose:5e3})}catch{In.show({color:"red",message:n.formatMessage({id:"project_settings.languages.update.executed.error.message",defaultMessage:"Something went wrong while changing the project’s languages."}),autoClose:5e3})}a.clear(),s(!1)}let f=t!=null&&t.permissions&&t.permissions.languageLimit<1e3?`(${u.values.languages.length} / ${t.permissions.languageLimit})`:"";return v.jsxDEV(or,{children:v.jsxDEV(Gt,{children:[v.jsxDEV(un,{justify:"space-between",children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"project_settings.languages.title",defaultMessage:"Languages"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:158,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:157,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:156,columnNumber:5},this),v.jsxDEV("form",{onSubmit:u.onSubmit(d),children:[v.jsxDEV(Vo,{id:"languages",label:n.formatMessage({id:"project_settings.languages.form.languages.label",defaultMessage:"Languages {total}"},{total:f}),help:n.formatMessage({id:"project_settings.languages.form.languages.description",defaultMessage:"The languages supported in your project"}),children:v.jsxDEV(wS,{mode:"multiple",readOnly:!r,...u.getInputProps("languages"),placeholder:(m=u.values.languages)!=null&&m.length?void 0:n.formatMessage({id:"project_settings.languages.form.languages.placeholder",defaultMessage:"Pick a language."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:176,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:162,columnNumber:6},this),v.jsxDEV(Vo,{id:"defaultLanguage",label:n.formatMessage({id:"project_settings.languages.form.default_languages.label",defaultMessage:"Default language"}),help:n.formatMessage({id:"project_settings.languages.form.default_languages.description",defaultMessage:"The Language that will be used by default if language is not specified."}),children:v.jsxDEV(wS,{readOnly:!r,...u.getInputProps("defaultLanguage"),locales:new Set(u.values.languages),placeholder:n.formatMessage({id:"project_settings.languages.form.languages.placeholder",defaultMessage:"Pick a language."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:202,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:191,columnNumber:6},this),r&&v.jsxDEV(un,{children:[v.jsxDEV(Nn,{size:"sm",type:"submit",disabled:!(u.isValid()&&u.isDirty()),loading:l.isLoading,children:v.jsxDEV(ee,{id:"project_settings.languages.form.button.save",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:221,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:215,columnNumber:8},this),v.jsxDEV(lu,{mounted:o,transition:"fade-right",children:p=>v.jsxDEV(Qe,{size:"xs",style:p,children:v.jsxDEV(ee,{id:"project_settings.languages.form.button.takes_a_moment",defaultMessage:"This may take a few seconds as we translate your content."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:229,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:228,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:226,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:214,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:161,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:155,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/LanguageSettings.tsx",lineNumber:154,columnNumber:3},this)}function nDr({project:t}){const e="project_agent_avatar",n=Mt(),i=Je.useUtils(),r=b.useRef(),o=Oi(ps),[s,a]=b.useState(!1),l=Je.getSignedUrl.useMutation(),c=Je.project.update.useMutation(),u=Je.generateAssetLink.useMutation(),d=gt.object({name:gt.string({required_error:n.formatMessage({id:"project_settings.main_settings.form.name.validation.required_error",defaultMessage:"Give your project a name"})}).min(1,{message:n.formatMessage({id:"project_settings.main_settings.form.name.validation.required_error",defaultMessage:"Give your project a name"})}).max(48,{message:n.formatMessage({id:"project_settings.main_settings.form.name.validation.max_length",defaultMessage:"Name cannot be longer then 48 characters."})}),avatar:gt.string({required_error:n.formatMessage({id:"project_settings.main_settings.form.avatar.error.required",defaultMessage:"Avatar is required"})})}),h=ls({mode:"uncontrolled",validateInputOnBlur:!0,validate:aa(d),initialValues:{name:t.name,avatar:t.avatar},onValuesChange:()=>a(h.isValid()&&h.isDirty())});async function f(g){var y;try{const _=await m();await c.mutateAsync({...g,avatar:_||g.avatar}),a(!1),h.setInitialValues(structuredClone(g)),i.project.getAll.invalidate(),i.project.getCurrent.invalidate(),In.show({color:"green",autoClose:5e3,message:n.formatMessage({id:"project_settings.main_settings.update.executed.success.message",defaultMessage:"Successfully updated project settings."})})}catch(_){const w=_;console.error("Failed to update main project settings",w);let C=n.formatMessage({id:"project_settings.main_settings.update.executed.error.message",defaultMessage:"Something went wrong while changing the project's avatar."});((y=w==null?void 0:w.data)==null?void 0:y.httpStatus)===409&&(C=n.formatMessage({id:"project_settings.main_settings.update.executed.error.duplicate",defaultMessage:"You already have a project with this name.",description:"Show error to the user they already have a project with this name"})),In.show({color:"red",message:C,autoClose:1e4})}}const m=async()=>{const g=r.current;if(!g)return;const y=await l.mutateAsync({contentType:g.type,fileName:e});return new Promise(_=>{die({file:g,action:y,onSuccess:async()=>{let N=await u.mutateAsync({fileName:e,type:"directLink"});_(`${N}?v=${hie({max:69420,min:1})}`)},onError:()=>{In.show({color:"red",autoClose:1e4,message:n.formatMessage({id:"project_settings.main_settings.update.avatar.upload.failed",defaultMessage:"Something went wrong while uploading the avatar."})})}})})},p=async({data:g,file:y})=>{r.current=y,h.setFieldValue("avatar",g)};return v.jsxDEV(or,{children:v.jsxDEV(Gt,{children:[v.jsxDEV(un,{justify:"space-between",children:v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"project_settings.main_settings.title",defaultMessage:"Project settings"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/MainSettings.tsx",lineNumber:157,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/MainSettings.tsx",lineNumber:156,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/MainSettings.tsx",lineNumber:155,columnNumber:5},this),v.jsxDEV("form",{onSubmit:h.onSubmit(f),children:[v.jsxDEV(Vo,{id:"name",label:n.formatMessage({id:"project_settings.main_settings.form.name.label",defaultMessage:"Project name"}),children:v.jsxDEV(pa,{id:"agentName",readOnly:!o,...h.getInputProps("name"),placeholder:n.formatMessage({id:"project_settings.main_settings.form.name.placeholder",defaultMessage:"E.g. Customer support bot",description:"Project settings name input placeholder"})},h.key("name"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/MainSettings.tsx",lineNumber:169,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/MainSettings.tsx",lineNumber:162,columnNumber:6},this),v.jsxDEV(Vo,{id:"avatar",label:n.formatMessage({id:"project_settings.main_settings.form.icon.label",defaultMessage:"Icon"}),children:v.jsxDEV(UUt,{id:"agentAvatar",readOnly:!o,onUpload:p,...h.getInputProps("avatar"),ariaLabel:n.formatMessage({id:"project_settings.main_settings.form.icon.aria_label",defaultMessage:"Change project icon"})},h.key("avatar"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/MainSettings.tsx",lineNumber:189,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/MainSettings.tsx",lineNumber:182,columnNumber:6},this),o&&v.jsxDEV(Nn,{type:"submit",loading:c.isLoading,disabled:!s,size:"sm",children:v.jsxDEV(ee,{id:"project_settings.main_settings.form.button.save",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/MainSettings.tsx",lineNumber:203,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/MainSettings.tsx",lineNumber:202,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/MainSettings.tsx",lineNumber:161,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/MainSettings.tsx",lineNumber:154,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/MainSettings.tsx",lineNumber:153,columnNumber:3},this)}function iDr(){const t=Mt(),{data:e,isLoading:n}=Je.project.getCurrent.useQuery(void 0),{data:i}=Je.getOrganization.useQuery(void 0,{staleTime:1/0});return ga(t.formatMessage({id:"project_settings.general_settings.page.title",defaultMessage:"Project settings - Chathive"})),n||!e||!i?v.jsxDEV(Gt,{className:"w-full max-w-screen-xl h-full overflow-auto self-start",children:[v.jsxDEV(li,{height:"288px",className:"w-full"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/index.tsx",lineNumber:27,columnNumber:5},this),v.jsxDEV(li,{height:"192px",className:"w-full"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/index.tsx",lineNumber:28,columnNumber:5},this),v.jsxDEV(li,{height:"192px",className:"w-full"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/index.tsx",lineNumber:29,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/index.tsx",lineNumber:26,columnNumber:4},this):v.jsxDEV("div",{className:"w-full max-w-screen-xl bg-white pt-6 sm:bg-transparent sm:pt-0 sm:gap-4 flex flex-col self-start",children:[v.jsxDEV(QEr,{project:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/index.tsx",lineNumber:36,columnNumber:4},this),v.jsxDEV(nDr,{project:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/index.tsx",lineNumber:37,columnNumber:4},this),v.jsxDEV(tDr,{organization:i,project:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/index.tsx",lineNumber:38,columnNumber:4},this),v.jsxDEV(eDr,{project:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/index.tsx",lineNumber:39,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/GeneralSettings/index.tsx",lineNumber:35,columnNumber:3},this)}function rDr({project:t,organization:e}){var c,u;const n=Mt(),i=Je.useUtils(),r=!Oi(ps),o=Je.leadGeneration.patchLeadGeneration.useMutation(),s=gt.discriminatedUnion("isEnabled",[gt.object({isEnabled:gt.literal(!0),email:gt.string().email({message:n.formatMessage({id:"project_settings.lead_generation.enable_settings.form.email.invalid",defaultMessage:"Please enter a valid email address."})}).optional()}),gt.object({isEnabled:gt.literal(!1),email:gt.string().max(48).optional()})]),a=ls({validateInputOnBlur:!0,initialValues:t.settings.leadGeneration,validate:aa(s)});async function l(d){try{await o.mutateAsync(d),a.setInitialValues(structuredClone(d)),i.project.getCurrent.invalidate(),In.show({color:"green",message:n.formatMessage({id:"project_settings.lead_generation.enable_settings.notification.succeeded",defaultMessage:"Settings have been updated"}),autoClose:5e3})}catch{In.show({color:"red",title:n.formatMessage({id:"project_settings.lead_generation.enable_settings.notification.failed.title",defaultMessage:"Settings could not be updated"}),message:n.formatMessage({id:"project_settings.lead_generation.enable_settings.notification.failed.message",defaultMessage:"We cannot update your settings at this time. Please try again or contact our support team."}),autoClose:5e3})}}return v.jsxDEV(or,{children:[v.jsxDEV(Gt,{justify:"space-between",gap:2,children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"project_settings.lead_generation.enable_settings.title",defaultMessage:"Lead generation"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/EnableLeadGeneration.tsx",lineNumber:91,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/EnableLeadGeneration.tsx",lineNumber:90,columnNumber:5},this),v.jsxDEV(Qe,{c:"dimmed",size:"sm",children:v.jsxDEV(ee,{id:"project_settings.lead_generation.enable_settings.description",defaultMessage:"Capture information from your users or leads and forward them to your support channels."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/EnableLeadGeneration.tsx",lineNumber:97,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/EnableLeadGeneration.tsx",lineNumber:96,columnNumber:5},this),v.jsxDEV(zl,{my:"md"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/EnableLeadGeneration.tsx",lineNumber:102,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/EnableLeadGeneration.tsx",lineNumber:89,columnNumber:4},this),v.jsxDEV("form",{onSubmit:a.onSubmit(l),children:[v.jsxDEV(Vo,{id:"isEnabled",label:n.formatMessage({id:"project_settings.lead_generation.enable_settings.form.is_enabled.label",defaultMessage:"Enable lead generation"}),children:v.jsxDEV(Du,{id:"isEnabled",readOnly:r,...a.getInputProps("isEnabled",{type:"checkbox"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/EnableLeadGeneration.tsx",lineNumber:112,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/EnableLeadGeneration.tsx",lineNumber:105,columnNumber:5},this),a.values.isEnabled&&v.jsxDEV(Vo,{id:"email",label:n.formatMessage({id:"project_settings.lead_generation.enable_settings.form.email.label",defaultMessage:"Email"}),help:n.formatMessage({id:"project_settings.lead_generation.enable_settings.form.email.help",defaultMessage:"This email will be used to notify your team when a user requests assistance."}),children:v.jsxDEV(pa,{readOnly:r,...a.getInputProps("email"),placeholder:n.formatMessage({id:"project_settings.lead_generation.enable_settings.form.email.placeholder",defaultMessage:"support@chathive.co"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/EnableLeadGeneration.tsx",lineNumber:131,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/EnableLeadGeneration.tsx",lineNumber:119,columnNumber:6},this),((c=e==null?void 0:e.permissions)==null?void 0:c.allowLeadGeneration)&&!r&&v.jsxDEV(Nn,{type:"submit",loading:o.isLoading,disabled:!(a.isValid()&&a.isDirty()),children:v.jsxDEV(ee,{id:"shared.submit",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/EnableLeadGeneration.tsx",lineNumber:147,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/EnableLeadGeneration.tsx",lineNumber:142,columnNumber:6},this),!((u=e==null?void 0:e.permissions)!=null&&u.allowLeadGeneration)&&!r&&v.jsxDEV(Nn,{size:"sm",to:"/billing",variant:"subtle",component:Np,className:"!text-theme-primary focus-within:bg-theme-primary/10",children:v.jsxDEV(ee,{id:"shared.button.upgrade",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/EnableLeadGeneration.tsx",lineNumber:158,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/EnableLeadGeneration.tsx",lineNumber:151,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/EnableLeadGeneration.tsx",lineNumber:104,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/EnableLeadGeneration.tsx",lineNumber:88,columnNumber:3},this)}const wKt={email:{id:"lead_generation.field_types.email",defaultMessage:"Email"},text:{id:"lead_generation.field_types.text",defaultMessage:"Text"},number:{id:"lead_generation.field_types.number",defaultMessage:"Number"},textarea:{id:"lead_generation.field_types.textarea",defaultMessage:"Textarea"}},oDr={email:"cyan",text:"indigo",textarea:"violet",number:"orange"};function sDr({form:t}){const e=Mt(),{data:n}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0}),i=b.useMemo(()=>(n==null?void 0:n.languages)||[],[n]);return v.jsxDEV(Wi,{variant:"contained",defaultValue:n==null?void 0:n.defaultLanguage,children:i.map((r,o)=>{var a;const s=t.values.languages[o];return v.jsxDEV(Wi.Item,{value:r,children:[v.jsxDEV(Wi.Control,{icon:(n==null?void 0:n.defaultLanguage)===r&&v.jsxDEV(ir,{label:e.formatMessage({id:"project_settings.lead_generation.field_config.languages.default_language",defaultMessage:"Default language"}),children:v.jsxDEV(JPt,{size:16,className:"text-theme-primary"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/LanguagesForm.tsx",lineNumber:44,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/LanguagesForm.tsx",lineNumber:38,columnNumber:10},this),children:v.jsxDEV(un,{gap:"xs",children:[Ja.getName(r),t.isValid(`languages.${o}`)&&((a=s.label)==null?void 0:a.length)&&v.jsxDEV(ir,{label:e.formatMessage({id:"project_settings.lead_generation.field_config.language.valid_form",defaultMessage:"Is enabled"}),children:v.jsxDEV(VPt,{size:16,className:"text-theme-primary"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/LanguagesForm.tsx",lineNumber:58,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/LanguagesForm.tsx",lineNumber:52,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/LanguagesForm.tsx",lineNumber:49,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/LanguagesForm.tsx",lineNumber:35,columnNumber:7},this),v.jsxDEV(Wi.Panel,{children:v.jsxDEV(Gt,{children:[v.jsxDEV(un,{grow:!0,align:"flex-start",children:[v.jsxDEV(pa,{...t.getInputProps(`languages.${o}.label`),label:e.formatMessage({id:"project_settings.lead_generation.field_config.languages.form.label.label",defaultMessage:"Label"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/LanguagesForm.tsx",lineNumber:66,columnNumber:10},this),v.jsxDEV(pa,{...t.getInputProps(`languages.${o}.placeholder`),label:v.jsxDEV(_m,{label:e.formatMessage({id:"project_settings.lead_generation.field_config.languages.form.placeholder.label",defaultMessage:"Placeholder"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/LanguagesForm.tsx",lineNumber:76,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/LanguagesForm.tsx",lineNumber:73,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/LanguagesForm.tsx",lineNumber:65,columnNumber:9},this),v.jsxDEV(pa,{...t.getInputProps(`languages.${o}.helpText`),label:v.jsxDEV(_m,{label:e.formatMessage({id:"project_settings.lead_generation.field_config.languages.form.help_text.placeholder",defaultMessage:"Help text"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/LanguagesForm.tsx",lineNumber:88,columnNumber:11},this),description:e.formatMessage({id:"project_settings.lead_generation.field_config.languages.form.help_text.description",defaultMessage:"Give customer extra information what to put into the field, just like this example."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/LanguagesForm.tsx",lineNumber:85,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/LanguagesForm.tsx",lineNumber:64,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/LanguagesForm.tsx",lineNumber:63,columnNumber:7},this)]},r,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/LanguagesForm.tsx",lineNumber:34,columnNumber:6},this)})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/LanguagesForm.tsx",lineNumber:29,columnNumber:3},this)}const aDr=Ja.getAllCodes(),hO={fieldTypes:{name:"",type:"text",isRequired:!0},languages:[]};function lDr({isOpen:t,fieldName:e,fieldConfig:n,onClose:i}){const r=Mt(),o=Je.useUtils(),s=!!e,[a,l]=b.useState(!1),{data:c}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0}),u=Je.leadGeneration.addField.useMutation(),d=Je.leadGeneration.updateField.useMutation(),h=gt.object({fieldTypes:gt.object({type:gt.enum(["email","text","textarea","number"]),isRequired:gt.boolean(),name:gt.string().min(2,{message:r.formatMessage({id:"project_settings.lead_generation.form.name.min_length",defaultMessage:"Name must be at least 2 characters long"})}).max(48,{message:r.formatMessage({id:"project_settings.lead_generation.form.name.max_length",defaultMessage:"Name cannot be longer then 48 characters"})}).regex(new RegExp(/^[a-zA-Z-0-9_-]+$/),{message:r.formatMessage({id:"project_settings.lead_generation.form.name.unsupported",defaultMessage:"Name can only contain a-zA-Z0-9-_"})})}),languages:gt.array(gt.object({language:gt.enum(mfe(aDr)),label:gt.string().max(48,{message:r.formatMessage({id:"project_settings.lead_generation.form.label.max_length",defaultMessage:"Label cannot be longer then 48 characters"})}),placeholder:gt.string().max(48,{message:r.formatMessage({id:"project_settings.lead_generation.form.placeholder.max_length",defaultMessage:"Placeholder cannot be longer then 48 characters"})}).optional(),helpText:gt.string().max(128,{message:r.formatMessage({id:"project_settings.lead_generation.form.help_text.max_length",defaultMessage:"Help text cannot be longer then 128 characters"})}).optional()}))}),f=ls({initialValues:hO,validateInputOnBlur:!0,validate:aa(h),onValuesChange:()=>{var C,N;const w=!zp((N=(C=f.values.languages)==null?void 0:C[m])==null?void 0:N.label);l(w&&f.isDirty()&&f.isValid())}}),m=b.useMemo(()=>f.values.languages.findIndex(w=>w.language===(c==null?void 0:c.defaultLanguage)),[c,f.values]),p=w=>{if(a){if(w.languages.find((C,N)=>!f.isValid(`languages.${N}`))){Ev.openConfirmModal({title:r.formatMessage({id:"project_settings.lead_generation.field_config.confirm_modal.title",defaultMessage:"Continue with empty languages?"}),children:r.formatMessage({id:"project_settings.lead_generation.field_config.confirm_modal.description",defaultMessage:"Languages without a label will not be displayed when that language is selected."}),labels:{confirm:r.formatMessage({id:"project_settings.lead_generation.field_config.confirm_modal.save",defaultMessage:"Save"}),cancel:r.formatMessage({id:"project_settings.lead_generation.field_config.confirm_modal.cancel",defaultMessage:"Cancel"})},confirmProps:{loading:u.isLoading||d.isLoading},onConfirm:()=>g(w)});return}g(w)}},g=async w=>{if(s)return _(w);y(w)},y=async({fieldTypes:w,languages:C})=>{try{await u.mutateAsync({...w,languages:C}),i(),o.project.getCurrent.invalidate(),In.show({color:"green",message:r.formatMessage({id:"project_settings.lead_generation.field_config.notification.create.succeeded",defaultMessage:"New field added"}),autoClose:5e3})}catch(N){const E=N;let D=r.formatMessage({id:"project_settings.lead_generation.field_config.notification.create.failed.message",defaultMessage:"We cannot create a field at this time. Please try again or contact our support team."});E.message.includes("NAME_ALREADY_EXISTS")&&(D=r.formatMessage({id:"project_settings.lead_generation.field_config.notification.create.failed.conflict",defaultMessage:"A field with this name already exist."})),In.show({color:"red",title:r.formatMessage({id:"project_settings.lead_generation.field_config.notification.create.failed.title",defaultMessage:"Field could not be created."}),message:D,autoClose:1e4})}},_=async({fieldTypes:w,languages:C})=>{try{if(!n||!e)return;await d.mutateAsync({...w,name:e,index:n.index,languages:C}),i(),o.project.getCurrent.invalidate(),In.show({color:"green",message:r.formatMessage({id:"project_settings.lead_generation.field_config.notification.update.succeeded",defaultMessage:"Field has been updated"}),autoClose:5e3})}catch{In.show({color:"red",title:r.formatMessage({id:"project_settings.lead_generation.field_config.notification.update.failed.title",defaultMessage:"Field could not be updated."}),message:r.formatMessage({id:"project_settings.lead_generation.field_config.notification.update.failed.message",defaultMessage:"We cannot update this field at this time. Please try again or contact our support team."}),autoClose:1e4})}};return b.useEffect(()=>{t||(f.setValues(hO),f.setInitialValues(hO))},[t]),b.useEffect(()=>{if(!c)return;const w=new Set(c.languages),C={fieldTypes:{name:e||hO.fieldTypes.name,type:(n==null?void 0:n.type)||hO.fieldTypes.type,isRequired:(n==null?void 0:n.isRequired)||hO.fieldTypes.isRequired},languages:[...w].map(N=>{var E;return{language:N,label:"",...((E=n==null?void 0:n.languages)==null?void 0:E[N])||{}}})};f.setInitialValues(C),f.setValues(C)},[c,n,t]),v.jsxDEV(bl,{size:"lg",opened:t,onClose:i,title:r.formatMessage({id:"project_settings.lead_generation.field_config.title",defaultMessage:"Lead generation field config"}),closeButtonProps:{"aria-label":r.formatMessage({id:"shared.modal.close",defaultMessage:"Close modal"})},children:v.jsxDEV("form",{onSubmit:f.onSubmit(p),children:v.jsxDEV(Gt,{gap:"lg",children:[v.jsxDEV(Fm,{disabled:s,...f.getInputProps("fieldTypes.type"),label:r.formatMessage({id:"project_settings.lead_generation.field_config.field.form.type.label",defaultMessage:"Type"}),data:Object.entries(wKt).map(([w,C])=>({value:w,label:r.formatMessage(C)}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/index.tsx",lineNumber:283,columnNumber:6},this),v.jsxDEV(pa,{disabled:s,...f.getInputProps("fieldTypes.name"),label:r.formatMessage({id:"project_settings.lead_generation.field_config.field.form.name.label",defaultMessage:"Name"}),placeholder:r.formatMessage({id:"project_settings.lead_generation.field_config.field.form.placeholder",defaultMessage:"phone_number"}),description:r.formatMessage({id:"project_settings.lead_generation.field_config.field.form.help",defaultMessage:"Name will be used to save the fields value"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/index.tsx",lineNumber:295,columnNumber:6},this),v.jsxDEV(Du,{labelPosition:"left",...f.getInputProps("fieldTypes.isRequired",{type:"checkbox"}),label:r.formatMessage({id:"project_settings.lead_generation.field_config.field.form.required.label",defaultMessage:"Is field required"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/index.tsx",lineNumber:311,columnNumber:6},this),v.jsxDEV(sDr,{form:f},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/index.tsx",lineNumber:319,columnNumber:6},this),v.jsxDEV("footer",{className:"w-full",children:v.jsxDEV(un,{justify:"flex-end",gap:"xs",children:[v.jsxDEV(Nn,{variant:"outline",size:"xs",onClick:i,children:v.jsxDEV(ee,{id:"shared.modal.footer.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/index.tsx",lineNumber:323,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/index.tsx",lineNumber:322,columnNumber:8},this),v.jsxDEV(Nn,{size:"xs",type:"submit",disabled:!a,loading:u.isLoading||d.isLoading,children:v.jsxDEV(ee,{id:"shared.modal.footer.save",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/index.tsx",lineNumber:331,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/index.tsx",lineNumber:325,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/index.tsx",lineNumber:321,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/index.tsx",lineNumber:320,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/index.tsx",lineNumber:282,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/index.tsx",lineNumber:281,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/FieldConfig/index.tsx",lineNumber:269,columnNumber:3},this)}const RSe=3;function cDr({project:t,organization:e}){var C,N,E,D,k,M;const n=Mt(),i=!Oi(ps),[r,o]=Pc(!1),[s,a]=oSt([]),[l,c]=b.useState(),u=Je.useUtils(),d=Je.leadGeneration.reorderField.useMutation(),h=Je.leadGeneration.deleteField.useMutation(),f=b.useMemo(()=>t.settings.leadGeneration.formFields?Object.keys(t.settings.leadGeneration.formFields).filter(T=>t.languages.find(A=>{var R,P;return!((P=(R=t.settings.leadGeneration.formFields[T])==null?void 0:R.languages)!=null&&P[A])})):[],[t]);if(b.useEffect(()=>{if(!t.settings.leadGeneration.formFields)return;const T=Object.entries(t.settings.leadGeneration.formFields).map(([A,R])=>{const{supported:P,unsupported:O}=t.languages.reduce((V,F)=>(!!R.languages[F]?V.supported.push(F):V.unsupported.push(F),V),{supported:[],unsupported:[]});return{...R,name:A,languageSupport:[...O.map(V=>({language:V,supported:!1})),...P.map(V=>({language:V,supported:!0}))]}}).sort((A,R)=>A.index-R.index);a.setState(T)},[t]),!((N=(C=t==null?void 0:t.settings)==null?void 0:C.leadGeneration)!=null&&N.isEnabled))return null;const m=()=>{o.close(),c(void 0)},p=T=>{c(T),o.open()},g=T=>{c(T),Ev.openConfirmModal({title:n.formatMessage({id:"project_settings.lead_generation.form_fields.delete_modal.title",defaultMessage:"Delete {fieldName} field"},{fieldName:T}),children:v.jsxDEV(Qe,{size:"sm",children:v.jsxDEV(ee,{id:"project_settings.lead_generation.form_fields.delete_modal.description",defaultMessage:"Deleting <bold>{fieldName}</bold> field is irreversible and cannot be undone.",values:{fieldName:T,bold:A=>v.jsxDEV("span",{className:"font-bold",children:A},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:128,columnNumber:47},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:125,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:124,columnNumber:5},this),labels:{confirm:n.formatMessage({id:"project_settings.lead_generation.form_fields.delete_modal.confirm",defaultMessage:"Delete field"}),cancel:n.formatMessage({id:"shared.modal.footer.cancel.delete",defaultMessage:"No don't delete it"})},confirmProps:{color:"red",loading:h.isLoading},onConfirm:()=>y(T)})};async function y(T){try{await h.mutateAsync({name:T}),In.show({color:"green",message:n.formatMessage({id:"project_settings.lead_generation.form_fields.delete_notification.succeeded",defaultMessage:"Successfully deleted Field."}),autoClose:5e3}),a.remove(s.findIndex(A=>A.name===T)),u.project.getCurrent.invalidate(),c(void 0)}catch{In.show({color:"red",title:n.formatMessage({id:"project_settings.lead_generation.form_fields.delete_notification.failed.title",defaultMessage:"Field could not be deleted"}),message:n.formatMessage({id:"project_settings.lead_generation.form_fields.delete_notification.failed.message",defaultMessage:"We cannot delete the field at this time. Please try again or contact our support team."}),autoClose:5e3})}}const _=async({destination:T,source:A})=>{!T||!A||T.index===A.index||(a.reorder({from:A.index,to:(T==null?void 0:T.index)||0}),await d.mutateAsync({from:A.index,to:(T==null?void 0:T.index)||0}))},w=!!f.length;return v.jsxDEV(Wi.Item,{value:"formFields",className:"!bg-white",children:[v.jsxDEV(Wi.Control,{children:v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"project_settings.lead_generation.form_fields.title",defaultMessage:"Lead generation fields"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:195,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:194,columnNumber:6},this),w&&v.jsxDEV(ir,{label:n.formatMessage({id:"project_settings.lead_generation.form_fields.warning.missing_translation.title",defaultMessage:"{total, plural, =1 {# field has} other {# fields have}} missing translations"},{total:n.formatNumber(f.length)}),children:v.jsxDEV(kp,{variant:"light",color:"orange",children:v.jsxDEV(ud,{color:"orange",size:16},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:212,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:211,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:201,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:193,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:192,columnNumber:4},this),v.jsxDEV(Wi.Panel,{children:[v.jsxDEV(Gt,{className:"w-full",align:"flex-start",children:[v.jsxDEV(Qe,{c:"dimmed",size:"sm",children:v.jsxDEV(ee,{id:"project_settings.lead_generation.form_fields.description",defaultMessage:"Customize the information we will requested before we will send them to you."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:221,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:220,columnNumber:6},this),w&&v.jsxDEV(Yo,{color:"orange",variant:"light",className:"w-full",title:n.formatMessage({id:"project_settings.lead_generation.form_fields.warning.missing_translation.title",defaultMessage:"{total, plural, =1 {# field has} other {# fields have}} missing translations"},{total:n.formatNumber(f.length)}),icon:v.jsxDEV(ud,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:239,columnNumber:14},this),children:v.jsxDEV(ee,{id:"project_settings.lead_generation.form_fields.warning.missing_translation.description",defaultMessage:"Fields without translations will be hidden from your customers."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:241,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:227,columnNumber:7},this),v.jsxDEV(tHt,{onDragEnd:_,children:v.jsxDEV(hn.ScrollContainer,{minWidth:500,type:"native",className:"w-full",children:v.jsxDEV(hn,{highlightOnHover:!0,className:"rounded-md overflow-hidden",children:[v.jsxDEV(hn.Thead,{className:"bg-[var(--mantine-color-gray-1)]",children:v.jsxDEV(hn.Tr,{children:[s.length>1&&v.jsxDEV(hn.Th,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:252,columnNumber:36},this),v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"project_settings.lead_generation.form_fields.column.name",defaultMessage:"Name"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:254,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:253,columnNumber:11},this),v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"project_settings.lead_generation.form_fields.column.type",defaultMessage:"Type"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:260,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:259,columnNumber:11},this),v.jsxDEV(hn.Th,{className:"min-w-24",children:v.jsxDEV(ee,{id:"project_settings.lead_generation.form_fields.column.required",defaultMessage:"Is required"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:266,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:265,columnNumber:11},this),v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"project_settings.lead_generation.form_fields.column.languages",defaultMessage:"Languages"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:272,columnNumber:12},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:271,columnNumber:11},this),v.jsxDEV(hn.Th,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:277,columnNumber:11},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:251,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:250,columnNumber:9},this),v.jsxDEV(dHt,{droppableId:"dnd-list",direction:"vertical",children:T=>v.jsxDEV(hn.Tbody,{...T.droppableProps,ref:T.innerRef,children:[s.map((A,R)=>v.jsxDEV(uDr,{row:A,index:R,onEdit:p,isReadOnly:i,onDelete:g,allowDrag:s.length>1,isDeleteDisabled:s.length===1},A.index,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:284,columnNumber:13},this)),T.placeholder]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:282,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:280,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:249,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:248,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:247,columnNumber:6},this),!((E=e==null?void 0:e.permissions)!=null&&E.customizeLeadGeneration)&&!i&&v.jsxDEV(ir,{label:n.formatMessage({id:"project_settings.lead_generation.form_fields.upgrade_button.tooltip",defaultMessage:"Upgrade to add your own custom fields"}),children:v.jsxDEV(Nn,{size:"xs",to:"/billing",variant:"subtle",component:Np,className:"!text-theme-primary focus-within:bg-theme-primary/10",children:v.jsxDEV(ee,{id:"shared.button.upgrade",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:316,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:309,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:303,columnNumber:7},this),((D=e==null?void 0:e.permissions)==null?void 0:D.customizeLeadGeneration)&&!i&&v.jsxDEV(ir,{label:n.formatMessage({id:"project_settings.lead_generation.form_fields.button.tooltip",defaultMessage:"Only {limit} fields can be added"},{limit:RSe}),disabled:s.length<RSe,children:v.jsxDEV(Nn,{size:"xs",variant:"subtle",onClick:o.open,leftSection:v.jsxDEV(GA,{size:16,stroke:1.5},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:335,columnNumber:22},this),disabled:s.length>=RSe,children:v.jsxDEV(ee,{id:"project_settings.lead_generation.form_fields.button.add",defaultMessage:"Add field"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:338,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:331,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:321,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:219,columnNumber:5},this),v.jsxDEV(lDr,{isOpen:r,onClose:m,fieldName:l,fieldConfig:l?(M=(k=t.settings.leadGeneration)==null?void 0:k.formFields)==null?void 0:M[l]:void 0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:346,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:218,columnNumber:4},this)]},"formFields",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:191,columnNumber:3},this)}function uDr({row:t,index:e,allowDrag:n,isReadOnly:i,isDeleteDisabled:r,onEdit:o,onDelete:s}){const a=Mt();let l=n&&!i;return v.jsxDEV(aHt,{index:e,draggableId:t.name,children:c=>{var u,d;return v.jsxDEV(hn.Tr,{ref:c.innerRef,...c.draggableProps,className:"bg-white",children:[v.jsxDEV(hn.Td,{width:24,className:Vt("align-middle",l?"":"hidden"),children:v.jsxDEV("div",{...c.dragHandleProps,className:"h-6 cursor-grab align-middle",children:v.jsxDEV(qPt,{stroke:1,className:"text-neutral-700","aria-label":a.formatMessage({id:"project_settings.lead_generation.form_fields.drag_icon",defaultMessage:"Re-order {fieldName} by dragging"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:379,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:378,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:377,columnNumber:6},this),v.jsxDEV(hn.Td,{className:"align-middle",children:t.name},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:389,columnNumber:6},this),v.jsxDEV(hn.Td,{width:96,className:"align-middle",children:v.jsxDEV(jc,{radius:"md",variant:"light",color:oDr[t.type],children:v.jsxDEV(ee,{...wKt[t.type]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:392,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:391,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:390,columnNumber:6},this),v.jsxDEV(hn.Td,{width:96,align:"center",className:"align-middle",children:t.isRequired&&v.jsxDEV(X$e,{stroke:1,className:"text-neutral-700","aria-label":a.formatMessage({id:"project_settings.lead_generation.form_fields.is_required.aria_label",defaultMessage:"{fieldName} is required"},{fieldName:t.name})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:397,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:395,columnNumber:6},this),v.jsxDEV(hn.Td,{className:"align-middle",children:v.jsxDEV(m$,{children:[(u=t.languageSupport)==null?void 0:u.map(({language:h,supported:f})=>v.jsxDEV(jc,{radius:"md",variant:"light",color:f?"green":"orange",size:"sm",children:Ja.getName(h)},h,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:413,columnNumber:9},this)),!((d=t.languageSupport)!=null&&d.length)&&v.jsxDEV(ir,{label:a.formatMessage({id:"project_settings.lead_generation.form_fields.languages.fallback.tooltip",defaultMessage:"Field will not be visible"},{fieldName:t.name}),children:v.jsxDEV(Qe,{size:"sm",c:"red",className:"cursor-default",children:v.jsxDEV(ee,{id:"project_settings.lead_generation.form_fields.languages.fallback",defaultMessage:"No languages defined"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:434,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:433,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:424,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:411,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:410,columnNumber:6},this),v.jsxDEV(hn.Td,{align:"right",children:!i&&v.jsxDEV(un,{justify:"flex-end",gap:4,wrap:"nowrap",children:[v.jsxDEV(ir,{label:a.formatMessage({id:"project_settings.lead_generation.form_fields.action.edit.tooltip",defaultMessage:"Edit field"}),children:v.jsxDEV(Fr,{variant:"subtle",onClick:()=>o(t.name),"aria-label":a.formatMessage({id:"project_settings.lead_generation.form_fields.action.edit",defaultMessage:"Edit {fieldName} field"},{fieldName:t.name}),children:v.jsxDEV(e8e,{size:16,stroke:1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:463,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:452,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:446,columnNumber:9},this),v.jsxDEV(ir,{label:r?a.formatMessage({id:"project_settings.lead_generation.form_fields.action.delete.tooltip.disabled",defaultMessage:"Must have at least 1 field"}):a.formatMessage({id:"project_settings.lead_generation.form_fields.action.delete.tooltip.enabled",defaultMessage:"Delete field"}),children:v.jsxDEV(Fr,{color:"red",variant:"subtle",disabled:r,onClick:()=>s(t.name),"aria-label":a.formatMessage({id:"project_settings.lead_generation.form_fields.action.delete",defaultMessage:"Delete {fieldName} field"},{fieldName:t.name}),children:v.jsxDEV(Lw,{size:16,stroke:1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:492,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:479,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:466,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:445,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:443,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:376,columnNumber:5},this)}},t.name,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/FormFields.tsx",lineNumber:374,columnNumber:3},this)}function dDr({isOpen:t,onClose:e}){const n=Mt(),i=Je.leadGeneration.exportSessions.useMutation(),r=ls({validateInputOnBlur:!0,initialValues:{format:"csv",dateRange:[An().subtract(30,"d").startOf("day").toString(),An().endOf("day").toString()]},validate:aa(gt.object({dateRange:gt.array(gt.string()),format:gt.enum(["csv","json"])}))}),o=async s=>{try{const a=await i.mutateAsync(s),l=n.formatMessage({id:"conversations.export.file_name",defaultMessage:"conversations_export"});V$e({file:a,fileName:l,format:s.format}),e()}catch{}};return b.useEffect(()=>{r.reset()},[t]),v.jsxDEV(bl,{opened:t,onClose:e,title:n.formatMessage({id:"project_settings.lead_generation.export_session.title",defaultMessage:"Export leads list"}),closeButtonProps:{"aria-label":n.formatMessage({id:"shared.modal.close",defaultMessage:"Close modal"})},children:v.jsxDEV("form",{onSubmit:r.onSubmit(o),children:v.jsxDEV(Gt,{gap:"md",align:"flex-start",children:[v.jsxDEV(Gt,{gap:3,className:"w-full",children:[v.jsxDEV(Qe,{size:"sm",fw:500,children:v.jsxDEV(ee,{id:"project_settings.lead_generation.export_session.form.date_range.label",defaultMessage:"Date range"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/ExportSession/index.tsx",lineNumber:76,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/ExportSession/index.tsx",lineNumber:75,columnNumber:7},this),v.jsxDEV(Spe,{size:"large",className:"w-full",...r.getInputProps("dateRange")},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/ExportSession/index.tsx",lineNumber:81,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/ExportSession/index.tsx",lineNumber:74,columnNumber:6},this),v.jsxDEV(Gt,{gap:3,className:"w-full",children:[v.jsxDEV(Qe,{size:"sm",fw:500,children:v.jsxDEV(ee,{id:"project_settings.lead_generation.export_session.form.format.label",defaultMessage:"Export format"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/ExportSession/index.tsx",lineNumber:85,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/ExportSession/index.tsx",lineNumber:84,columnNumber:7},this),v.jsxDEV(Yk,{color:yd,data:["csv","json"],...r.getInputProps("format")},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/ExportSession/index.tsx",lineNumber:90,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/ExportSession/index.tsx",lineNumber:83,columnNumber:6},this),v.jsxDEV(un,{justify:"flex-end",gap:"sm",className:"w-full mt-4",children:[v.jsxDEV(Nn,{variant:"outline",onClick:e,children:v.jsxDEV(ee,{id:"shared.modal.footer.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/ExportSession/index.tsx",lineNumber:98,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/ExportSession/index.tsx",lineNumber:97,columnNumber:7},this),v.jsxDEV(Nn,{type:"submit",loading:i.isLoading,disabled:!r.isValid(),children:v.jsxDEV(ee,{id:"project_settings.lead_generation.export_session.form.submit",defaultMessage:"Export"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/ExportSession/index.tsx",lineNumber:105,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/ExportSession/index.tsx",lineNumber:100,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/ExportSession/index.tsx",lineNumber:96,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/ExportSession/index.tsx",lineNumber:73,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/ExportSession/index.tsx",lineNumber:72,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/components/ExportSession/index.tsx",lineNumber:61,columnNumber:3},this)}const hDr={"customerData.id":{id:"project_settings.lead_generation.sessions.column.customer_data.id",defaultMessage:"Customer id"},"customerData.email":{id:"project_settings.lead_generation.sessions.column.customer_data.email",defaultMessage:"Customer email"},"customerData.firstName":{id:"project_settings.lead_generation.sessions.column.customer_data.first_name",defaultMessage:"First name"},"customerData.lastName":{id:"project_settings.lead_generation.sessions.column.customer_data.last_name",defaultMessage:"Last name"}};function fDr({project:t}){const n=Mt(),i=Qr(),[r,o]=b.useState(1),[s,a]=Pc(!1),{projectId:l}=If(),c=20*(r-1),{data:u,isLoading:d}=Je.leadGeneration.getSessions.useQuery({limit:20,offset:c}),h=b.useMemo(()=>{var p;return(p=u==null?void 0:u.data)!=null&&p.length?[...new Set(u==null?void 0:u.data.reduce((g,y)=>{var _,w,C,N;return(_=y.customerData)!=null&&_.id&&g.push("customerData.id"),(w=y.customerData)!=null&&w.email&&g.push("customerData.email"),(C=y.customerData)!=null&&C.firstName&&g.push("customerData.firstName"),(N=y.customerData)!=null&&N.lastName&&g.push("customerData.lastName"),[...g,...Object.keys(y.fields)]},[]))].map(g=>g.startsWith("customerData.")?{name:n.formatMessage(hDr[g]),path:g}:{name:g,path:`fields.${g}`}):[]},[u==null?void 0:u.data]);if(!t.settings.leadGeneration.isEnabled&&!(u!=null&&u.total))return null;const f=u!=null&&u.total?Math.ceil(u.total/20):0;return v.jsxDEV(v.Fragment,{children:[v.jsxDEV(or,{className:"max-h-[calc(100vh_-_48px_-_2rem)]",children:v.jsxDEV(Gt,{className:"h-full",children:[v.jsxDEV(un,{justify:"space-between",children:[v.jsxDEV(Qe,{fw:"600",children:v.jsxDEV(ee,{id:"project_settings.lead_generation.sessions.title",defaultMessage:"Leads list"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:91,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:90,columnNumber:7},this),!!(u!=null&&u.total)&&v.jsxDEV(Nn,{size:"xs",variant:"light",onClick:a.open,leftSection:v.jsxDEV(UPt,{size:16,stroke:1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:101,columnNumber:22},this),children:v.jsxDEV(ee,{id:"project_settings.lead_generation.sessions.export_button.tooltip",defaultMessage:"Export list"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:103,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:97,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:89,columnNumber:6},this),!(u!=null&&u.total)&&!d&&v.jsxDEV(Zd,{src:"/img/svg/no_results.svg",imgClassName:"h-44",title:n.formatMessage({id:"project_settings.lead_generation.sessions.empty.title",defaultMessage:"No leads yet"}),description:n.formatMessage({id:"project_settings.lead_generation.sessions.empty.description",defaultMessage:"Here you will find the list with all your leads"}),className:"m-8"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:111,columnNumber:7},this),d&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:127,columnNumber:8},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:128,columnNumber:8},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:129,columnNumber:8},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:130,columnNumber:8},this),v.jsxDEV(li,{height:32},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:131,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:126,columnNumber:7},this),!!(u!=null&&u.total)&&!d&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(hn.ScrollContainer,{minWidth:500,type:"native",className:"rounded-md",children:v.jsxDEV(hn,{highlightOnHover:!0,stickyHeader:!0,striped:"even",className:"rounded-md",children:[v.jsxDEV(hn.Thead,{className:"!bg-[var(--mantine-color-gray-1)]",children:v.jsxDEV(hn.Tr,{children:[h.map(m=>v.jsxDEV(hn.Th,{className:"min-w-fit break-keep text-nowrap",children:m.name},m.path,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:141,columnNumber:13},this)),v.jsxDEV(hn.Th,{children:v.jsxDEV(ee,{id:"project_settings.lead_generation.sessions.column.date",defaultMessage:"Date"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:149,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:148,columnNumber:12},this),v.jsxDEV(hn.Th,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:154,columnNumber:12},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:139,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:138,columnNumber:10},this),v.jsxDEV(hn.Tbody,{children:u.data.map(m=>v.jsxDEV(hn.Tr,{children:[h.map(p=>v.jsxDEV(hn.Td,{className:"max-w-44 break-words align-middle",children:APt(m,p.path)},`${m._id}_${p.path}`,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:161,columnNumber:14},this)),v.jsxDEV(hn.Td,{className:"align-middle",children:yPt({date:m.createdAt})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:168,columnNumber:13},this),v.jsxDEV(hn.Td,{width:24,children:v.jsxDEV(ir,{label:n.formatMessage({id:"project_settings.lead_generation.sessions.row.conversation.tooltip",defaultMessage:"View conversation"}),children:v.jsxDEV(Fr,{variant:"light",onClick:()=>i(`/${l}/conversations/${m.conversationId}`),children:v.jsxDEV(Y$e,{size:16,stroke:1,"aria-label":n.formatMessage({id:"project_settings.lead_generation.sessions.row.conversation.aria-label",defaultMessage:"View conversation"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:186,columnNumber:16},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:178,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:172,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:171,columnNumber:13},this)]},m._id,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:159,columnNumber:12},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:157,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:137,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:136,columnNumber:8},this),f>1&&v.jsxDEV(uu,{justify:"flex-end",children:v.jsxDEV(Kh,{size:"sm",total:f,hideWithOnePage:!0,value:r,onChange:o},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:204,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:203,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:135,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:88,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:87,columnNumber:4},this),v.jsxDEV(dDr,{isOpen:s,onClose:a.close},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:217,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/SessionsList.tsx",lineNumber:86,columnNumber:3},this)}const mDr=Ja.getAllCodes();function pDr({value:t,disableLanguage:e,excludedLanguages:n,projectLanguages:i,renderFooter:r,onSubmit:o}){const s=Mt(),a=gt.object({language:gt.enum(mDr,{required_error:s.formatMessage({id:"project_settings.lead_generation.responses.form.language.required",defaultMessage:"Language is required"})}),response:gt.string({required_error:s.formatMessage({id:"project_settings.lead_generation.responses.form.response.required",defaultMessage:"Response is required"})}).min(1,{message:s.formatMessage({id:"project_settings.lead_generation.responses.form.response.required",defaultMessage:"Response is required"})}).max(4096,{message:s.formatMessage({id:"project_settings.lead_generation.responses.form.response.max_length",defaultMessage:"Response cannot be longer then 4.096 characters"})})}),l=b.useMemo(()=>[...i].filter(m=>!n.has(m))[0],[i,n]),[c,u]=b.useState(!1),d=ls({validateInputOnBlur:!0,validate:aa(a),onValuesChange:()=>u(d.isValid()&&d.isDirty()),initialValues:{response:(t==null?void 0:t.response)||"",language:(t==null?void 0:t.language)||l}}),h=()=>{o({[d.values.language]:d.values.response})};return v.jsxDEV("form",{onSubmit:f=>{f.preventDefault(),f.stopPropagation(),h()},children:v.jsxDEV(Gt,{gap:"sm",children:[v.jsxDEV(wS,{strict:!1,allowDeselect:!1,disabled:e,locales:i,...d.getInputProps("language"),exclude:new Set([...n].filter(f=>f!==(t==null?void 0:t.language))),label:s.formatMessage({id:"project_settings.lead_generation.responses.form.language.label",defaultMessage:"Language"})},d.key("language"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/Responses/LocaleForm.tsx",lineNumber:98,columnNumber:5},this),d.values.language&&!i.has(d.values.language)&&v.jsxDEV(Yo,{children:v.jsxDEV(ee,{id:"shared.language.info.unsupported",defaultMessage:"{language} has not been added to your project, we will add it for you.",values:{language:Mp(Ja.getName(d.values.language))}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/Responses/LocaleForm.tsx",lineNumber:113,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/Responses/LocaleForm.tsx",lineNumber:112,columnNumber:6},this),v.jsxDEV(Th,{...d.getInputProps("response"),label:s.formatMessage({id:"project_settings.lead_generation.responses.form.response.label",defaultMessage:"Response"}),minRows:4,maxRows:24,autosize:!0},d.key("response"),!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/Responses/LocaleForm.tsx",lineNumber:120,columnNumber:5},this),r({isValid:c})]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/Responses/LocaleForm.tsx",lineNumber:97,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/Responses/LocaleForm.tsx",lineNumber:90,columnNumber:3},this)}function gDr({project:t,organization:e}){const n=Mt(),i=Je.useUtils(),r=!Oi(ps),o=Je.leadGeneration.patchResponse.useMutation(),s=Je.leadGeneration.deleteResponse.useMutation();if(!t.settings.leadGeneration.isEnabled)return null;async function a(c){try{await s.mutateAsync({language:c}),In.show({color:"green",message:n.formatMessage({id:"project_settings.lead_generation.responses.delete.succeeded",defaultMessage:"Successfully deleted response"}),autoClose:5e3}),i.project.getCurrent.invalidate()}catch{In.show({color:"red",message:n.formatMessage({id:"project_settings.lead_generation.responses.delete.failed",defaultMessage:"Something went wrong while deleting the response, please try again later."}),autoClose:1e4}),i.project.getCurrent.invalidate()}}const l=async c=>{try{const[u,d]=Object.entries(c)[0];await o.mutateAsync({language:u,response:d}),i.project.getCurrent.invalidate(),In.show({color:"green",message:n.formatMessage({id:"project_settings.lead_generation.responses.update.succeeded",defaultMessage:"Successfully updated responses"}),autoClose:5e3})}catch(u){console.error("Patch response failed",u),In.show({color:"red",message:n.formatMessage({id:"project_settings.lead_generation.responses.update.failed",defaultMessage:"Something went wrong while updating the responses, please try again later."}),autoClose:1e4})}};return v.jsxDEV(cG,{sectionKey:"responses",title:n.formatMessage({id:"project_settings.lead_generation.responses.title",defaultMessage:"Customize response"}),description:n.formatMessage({id:"layout.ai_form.languages.description",defaultMessage:"Present the text (title, welcome message, etc.) in your customer's language based on their device settings. If a language isn't included, the default will be used."}),locale:{alert:{title:{id:"project_settings.lead_generation.responses.warning.missing_languages.title",defaultMessage:"{total, plural, =1 {# response is} other {# response are}} not translated"},description:{id:"project_settings.lead_generation.responses.warning.missing_languages.description",defaultMessage:"If no custom response has been set our default response will be used."}},confirmDelete:{title:{id:"project_settings.lead_generation.response.delete_modal.title",defaultMessage:"Delete {language} response"},description:{id:"project_settings.lead_generation.response.delete_modal.description",defaultMessage:"Deleting <bold>{language}</bold> response is irreversible and cannot be undone."},deleteButton:{id:"project_settings.lead_generation.response.delete_modal.confirm",defaultMessage:"Delete response"}}},allowZero:!0,project:t,readOnly:r,organization:e,isDeleting:s.isLoading,data:t.settings.leadGeneration.response,renderInTable:c=>v.jsxDEV(Qe,{size:"sm",truncate:"end",className:"w-full text-left",children:c},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/Responses/index.tsx",lineNumber:129,columnNumber:5},this),onSubmit:l,onDelete:a,children:c=>v.jsxDEV(pDr,{...c,projectLanguages:new Set(t.languages),renderFooter:({isValid:u})=>c.renderFooter({isValid:u,isLoading:o.isLoading}),value:c.selectedLanguage&&{language:c.selectedLanguage,response:c.value||""}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/Responses/index.tsx",lineNumber:137,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/Responses/index.tsx",lineNumber:84,columnNumber:3},this)}function bDr(){var r,o,s;const t=Mt(),e=Qr(),{data:n}=Je.getOrganization.useQuery(void 0,{staleTime:1/0}),{data:i}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0});return ide(t.formatMessage({id:"project_settings.lead_generation.page.title",defaultMessage:"Lead generation - Chathive"})),!n||!i?v.jsxDEV(Gt,{className:"w-full h-full overflow-auto",children:[v.jsxDEV(li,{height:"288px",className:"w-full"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:33,columnNumber:5},this),v.jsxDEV(li,{height:"128px",className:"w-full"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:34,columnNumber:5},this),v.jsxDEV(li,{height:"128px",className:"w-full"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:35,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:32,columnNumber:4},this):(i==null?void 0:i.projectType)!=="chatbot"?v.jsxDEV(Nie,{to:"/dashboard"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:40,columnNumber:49},this):(r=n==null?void 0:n.permissions)!=null&&r.allowLeadGeneration?v.jsxDEV("div",{className:"w-full max-w-screen-xl bg-white pt-6 sm:bg-transparent sm:pt-0 sm:gap-4 flex flex-col self-start",children:[v.jsxDEV(rDr,{project:i,organization:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:76,columnNumber:4},this),((s=(o=i==null?void 0:i.settings)==null?void 0:o.leadGeneration)==null?void 0:s.isEnabled)&&v.jsxDEV(Wi,{multiple:!0,variant:"separated",className:"w-full",children:[v.jsxDEV(cDr,{project:i,organization:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:79,columnNumber:6},this),v.jsxDEV(gDr,{project:i,organization:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:80,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:78,columnNumber:5},this),v.jsxDEV(fDr,{project:i},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:83,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:75,columnNumber:3},this):v.jsxDEV("div",{className:"w-full max-w-screen-xl bg-white pt-6 sm:bg-transparent sm:pt-0 sm:gap-4 flex flex-col self-start",children:v.jsxDEV(or,{children:v.jsxDEV(Gt,{justify:"space-between",align:"flex-start",gap:8,children:[v.jsxDEV(Gt,{justify:"space-between",align:"flex-start",gap:2,children:[v.jsxDEV(Qe,{fw:"600",size:"xl",children:v.jsxDEV(ee,{id:"project_settings.lead_generation.upgrade.title",defaultMessage:"Lead generation"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:49,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:48,columnNumber:8},this),v.jsxDEV(Qe,{children:v.jsxDEV(ee,{id:"project_settings.lead_generation.upgrade.description",defaultMessage:"Capture information from your users or leads and forward them to your support channels."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:55,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:54,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:47,columnNumber:7},this),v.jsxDEV("img",{src:"/img/png/lead_generation_upgrade.png",alt:"",className:"h-64"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:61,columnNumber:7},this),v.jsxDEV(Nn,{onClick:()=>e("/billing"),children:v.jsxDEV(ee,{id:"project_settings.lead_generation.upgrade.submit",defaultMessage:"Upgrade"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:63,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:62,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:46,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:45,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/LeadGeneration/index.tsx",lineNumber:44,columnNumber:4},this)}function vDr({project:t,organization:e}){var u,d,h,f;const n=Mt(),[i]=Ut.useForm(),r=Je.useUtils(),o=Oi(ps),s=Je.project.updateAdvancedSettings.useMutation();async function a(m){try{await s.mutateAsync(m),Ei.success({placement:"bottomRight",message:n.formatMessage({id:"project_settings.advanced_priority_settings.update.succeeded",defaultMessage:"Successfully updated the projects advanced settings."})}),r.project.getCurrent.invalidate(),r.project.getAll.invalidate()}catch{Ei.error({placement:"bottomRight",message:n.formatMessage({id:"project_settings.advanced_priority_settings.update.failed",defaultMessage:"Something went wrong while updating the projects advanced settings. Try again later"})})}}const l=Ut.useWatch("topK",i),c=Ut.useWatch("scoringSet",i);return v.jsxDEV(uo,{bordered:!1,title:n.formatMessage({id:"project_settings.advanced_priority_settings.title",defaultMessage:"Advanced priority settings"}),className:"w-full",children:v.jsxDEV("div",{className:"flex flex-col gap-4",children:[v.jsxDEV(Fn.Text,{children:v.jsxDEV(ee,{id:"project_settings.advanced_priority_settings.warning.help",defaultMessage:"Seize control with our advanced priority settings, putting you in the driver's seat to finely adjust how your training documents are prioritized based on what works best for you.<bold>Use these settings with care:</bold> they have the power to completely reshape the reliability of the answers you receive.",values:{bold:m=>v.jsxDEV(Fn.Text,{strong:!0,className:"text-theme-primary",children:[v.jsxDEV("br",{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:73,columnNumber:10},this),m]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:72,columnNumber:9},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:67,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:66,columnNumber:5},this),v.jsxDEV(Ut,{form:i,layout:"horizontal",requiredMark:!1,onFinish:a,initialValues:{...((u=t==null?void 0:t.config)==null?void 0:u.scoring)||{},...((d=t==null?void 0:t.config)==null?void 0:d.sorter)||{}},disabled:!!(t!=null&&t.disabledAt)||!o,children:[v.jsxDEV(ZD,{className:"col-span-2 !my-4"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:91,columnNumber:6},this),v.jsxDEV(Vo,{id:"scoringType",label:n.formatMessage({id:"project_settings.advanced_priority_settings.form.scoring_type.label",defaultMessage:"Scoring"}),help:n.formatMessage({id:"project_settings.advanced_priority_settings.form.scoring_type.help",defaultMessage:"Scoring defines how our GPT engine will search for relevant data. Changing this might highly impact how your chatbot will respond, use it with care."}),children:v.jsxDEV(Ut.Item,{name:"scoringType",className:"!mb-0",children:v.jsxDEV(Lo,{id:"scoringType",options:Object.keys(Brt).map(m=>({value:m,label:n.formatMessage(Brt[m])}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:105,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:104,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:92,columnNumber:6},this),v.jsxDEV(Vo,{id:"scoringSet",label:n.formatMessage({id:"project_settings.advanced_priority_settings.form.scoring_set.label",defaultMessage:"Scoring set: <bold> {scoringSet} </bold>"},{scoringSet:c,bold:m=>v.jsxDEV(Fn.Text,{strong:!0,className:"mx-1",children:m},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:124,columnNumber:10},this)}),help:n.formatMessage({id:"project_settings.advanced_priority_settings.form.scoring_set.help",defaultMessage:"The higher the number how longer it will take for the chatbot to respond and the higher the risk for false positives."}),children:v.jsxDEV(Ut.Item,{name:"scoringSet",className:"!mb-0",children:v.jsxDEV(MC,{id:"scoringSet",min:25,max:250,marks:{25:25,100:100,150:150,200:200,250:250}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:137,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:136,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:114,columnNumber:6},this),v.jsxDEV(Vo,{id:"topK",label:n.formatMessage({id:"project_settings.advanced_priority_settings.form.range.label",defaultMessage:"Only include the first top <bold>{topK}</bold> scoring data sources"},{topK:l,bold:m=>v.jsxDEV(Fn.Text,{strong:!0,className:"mx-0.5",children:m},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:155,columnNumber:10},this)}),children:v.jsxDEV(Ut.Item,{name:"topK",className:"w-full !mb-0 [&>div>.ant-form-item-label]:!pb-0",children:v.jsxDEV(MC,{id:"topK",min:2,max:10,marks:{2:2,4:4,6:6,8:8,10:10}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:163,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:162,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:145,columnNumber:6},this),((h=e==null?void 0:e.permissions)==null?void 0:h.advanced)&&o&&v.jsxDEV(Ut.Item,{shouldUpdate:!0,noStyle:!0,children:m=>{const p=!m.isFieldsTouched()||m.getFieldsError().some(({errors:g})=>g.length);return v.jsxDEV(vn,{type:"primary",htmlType:"submit",className:"w-fit",disabled:p||!!(t!=null&&t.disabledAt),loading:m.isFieldsTouched()&&s.isLoading,children:v.jsxDEV(ee,{id:"project_settings.advanced_priority_settings.form.button.save",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:181,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:174,columnNumber:10},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:167,columnNumber:7},this),!((f=e==null?void 0:e.permissions)!=null&&f.advanced)&&v.jsxDEV(vn,{type:"primary",href:"/billing",children:v.jsxDEV(ee,{id:"project_settings.advanced_priority_settings.form.upgrade_button",defaultMessage:"Upgrade plan"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:192,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:191,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:80,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:65,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/AdvancedPrioritySettings.tsx",lineNumber:57,columnNumber:3},this)}function yDr({project:t,organization:e}){var y,_,w,C,N,E,D,k,M,T,A,R;const n=Mt(),i=Je.useUtils(),r=Oi(ps),[o]=Ut.useForm(),[s,a]=TA({key:"highlightFusionBannerState",defaultValue:!0}),l=Je.project.updateModelSettings.useMutation(),c=P=>{if(!(t!=null&&t.config))return;const O=WP[t.config.model]+(AV[t.config.preProcessorType]||0),V=WP[P.model]+(AV[P.preProcessorType]||0);if(O===V)return u();Ma.confirm({title:n.formatMessage({id:"project_settings.model_settings.confirm.title",defaultMessage:"This action has impact on your billing"}),content:v.jsxDEV("div",{className:"flex flex-col gap-2 items-start",children:[v.jsxDEV("p",{children:n.formatMessage({id:"project_settings.model_settings.confirm.content",defaultMessage:"Changing these settings will use up your message credits faster and might affect your current limit, so be careful."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:60,columnNumber:6},this),v.jsxDEV("div",{className:"w-full flex flex-row gap-2 justify-between py-4",children:[v.jsxDEV("p",{children:n.formatMessage({id:"project_settings.model_settings.confirm.content.credits",defaultMessage:"{credits, plural, =1 {# message credit} other {# message credits}}"},{credits:O})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:68,columnNumber:7},this),v.jsxDEV(F2t,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:78,columnNumber:7},this),v.jsxDEV("p",{children:n.formatMessage({id:"project_settings.model_settings.confirm.content.credits",defaultMessage:"{credits, plural, =1 {# message credit} other {# message credits}}"},{credits:V})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:79,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:67,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:59,columnNumber:5},this),onOk(){u()}})};async function u(){try{await l.mutateAsync(o.getFieldsValue()),Ei.success({placement:"bottomRight",message:n.formatMessage({id:"project_settings.model_settings.update.succeeded",defaultMessage:"Successfully updated the project settings."})}),i.project.getCurrent.invalidate(),i.project.getAll.invalidate()}catch{Ei.error({placement:"bottomRight",message:n.formatMessage({id:"project_settings.model_settings.update.failed",defaultMessage:"Something went wrong while updating the project settings. Try again later"})})}}const d=Ut.useWatch("model",o),h=Ut.useWatch("aiService",o),f=Ut.useWatch("contextSize",o),m=Ut.useWatch("totalRephrases",o),p=Ut.useWatch("preProcessorType",o),g=P=>{!P.aiService||!(t!=null&&t.projectType)||lwe[t.projectType][P.aiService].includes(d)||o.setFieldValue("model",lwe[t.projectType][P.aiService][0])};return v.jsxDEV(v.Fragment,{children:[s&&v.jsxDEV(Yo,{withCloseButton:!0,icon:v.jsxDEV(tot,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:141,columnNumber:12},this),onClose:()=>a(!1),closeButtonLabel:n.formatMessage({id:"training.info_banner.close.aria_label",defaultMessage:"Hide banner"}),children:v.jsxDEV(ee,{id:"project_settings.model_settings.new_algorithm_banner.title",defaultMessage:"Introducing the <b>Fusion Algorithm</b>! This new algorithm boosts your AI assistant's accuracy, ensures it stays on topic, and enhances its ability to maintain seamless conversational flow.",values:{b:P=>v.jsxDEV("span",{className:"font-bold",children:P},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:152,columnNumber:24},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:148,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:139,columnNumber:5},this),v.jsxDEV(uo,{bordered:!1,title:n.formatMessage({id:"project_settings.model_settings.title",defaultMessage:"Model settings"}),className:"w-full",children:v.jsxDEV(Ut,{form:o,layout:"horizontal",requiredMark:!1,onFinish:c,onValuesChange:g,initialValues:{model:(y=t==null?void 0:t.config)==null?void 0:y.model,aiService:(_=t==null?void 0:t.config)==null?void 0:_.aiService,preProcessorType:(w=t==null?void 0:t.config)==null?void 0:w.preProcessorType,contextSize:(N=(C=t==null?void 0:t.config)==null?void 0:C.processingConfig)==null?void 0:N.contextSize,totalRephrases:(D=(E=t==null?void 0:t.config)==null?void 0:E.processingConfig)==null?void 0:D.totalRephrases},disabled:!!(t!=null&&t.disabledAt)||!r,children:[v.jsxDEV(Vo,{id:"preProcessorType",label:n.formatMessage({id:"project_settings.model_settings.form.results.label",defaultMessage:"Message credits that will be used for 1 message"}),children:v.jsxDEV(Fn.Text,{strong:!0,children:v.jsxDEV(ee,{id:"project_settings.model_settings.form.result.value",defaultMessage:"{credits, plural, =1 {# message credit} other {# message credits}}",values:{credits:WP[d]+AV[p]||1}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:188,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:187,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:180,columnNumber:6},this),v.jsxDEV(Vo,{id:"aiService",label:n.formatMessage({id:"project_settings.model_settings.ai_service.label",defaultMessage:"AI service"}),warning:h==="azureOpenAi"?n.formatMessage({id:"project_settings.model_settings.ai_service.warning.azure_open_ai",defaultMessage:"Azure OpenAI uses older model versions and might not always perform like expected."}):void 0,children:v.jsxDEV(Vs,{trigger:(k=e==null?void 0:e.config)!=null&&k.allowOtherAiServicePerProject?[]:["hover"],title:n.formatMessage({id:"project_settings.model_settings.ai_service.disabled.tooltip",defaultMessage:"Your organization doesn't allow separate AI services per project"}),children:v.jsxDEV(Ut.Item,{name:"aiService",className:"!mb-0",children:v.jsxDEV(Lo,{id:"aiService",disabled:!((M=e==null?void 0:e.config)!=null&&M.allowOtherAiServicePerProject)||!r,options:[{value:"azureOpenAi",label:aE.azureOpenAi},{value:"openAi",label:aE.openAi}]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:219,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:218,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:211,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:195,columnNumber:6},this),v.jsxDEV(Vo,{id:"model",label:n.formatMessage({id:"project_settings.model_settings.form.model.label",defaultMessage:"GPT-Model"}),help:((T=t==null?void 0:t.config)==null?void 0:T.model)==="gpt-3.5-turbo"&&h==="openAi"?n.formatMessage({id:"project_settings.model_settings.form.model.deprecation",defaultMessage:"Model {model} is deprecated and will be removed in the near future"},{model:(A=t==null?void 0:t.config)==null?void 0:A.model}):"",children:v.jsxDEV(Ut.Item,{name:"model",className:"!mb-0",children:v.jsxDEV(Lo,{id:"model",optionLabelProp:"selected",options:(R=lwe[t==null?void 0:t.projectType][h])==null?void 0:R.map(P=>{var O,V;return{value:P,label:P,selected:WP[P]===1?P:n.formatMessage({id:"project_settings.model_settings.form.model.option.selected",defaultMessage:"{label} <Credits>+ {credit} message credits</Credits>"},{label:P,credit:WP[P],Credits:F=>v.jsxDEV(Fn.Text,{type:"secondary",className:"!text-xs",children:F},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:276,columnNumber:16},this)}),disabled:!((V=(O=e==null?void 0:e.permissions)==null?void 0:O.allowedModels)!=null&&V.includes(P))}}),optionRender:P=>v.jsxDEV(Vs,{trigger:P.data.disabled?["hover"]:[],title:n.formatMessage({id:"project_settings.model_settings.form.model.option.disabled",defaultMessage:"Upgrade for this model"}),children:v.jsxDEV("div",{className:"flex flex-col gap-1 items-start",children:[v.jsxDEV(Fn.Text,{type:P.data.disabled?"secondary":void 0,children:P.label},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:293,columnNumber:12},this),v.jsxDEV(Fn.Text,{type:"secondary",className:"!text-xs",children:v.jsxDEV(ee,{id:"project_settings.model_settings.form.model.option.credits",defaultMessage:"1 message = {credit, plural, =1 {# message credit} other {# message credits}}",values:{credit:WP[P.value]}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:297,columnNumber:13},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:296,columnNumber:12},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:292,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:285,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:256,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:255,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:236,columnNumber:6},this),v.jsxDEV(Vo,{id:"preProcessorType",label:v.jsxDEV(un,{gap:"xs",children:[v.jsxDEV(ee,{id:"project_settings.model_settings.form.pre_processor_type.label",defaultMessage:"Algorithm"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:313,columnNumber:9},this),v.jsxDEV(jc,{size:"xs",color:"violet",radius:"md",variant:"light",leftSection:v.jsxDEV(tot,{size:14,stroke:1},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:322,columnNumber:23},this),children:v.jsxDEV(ee,{id:"general.new",defaultMessage:"New"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:324,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:317,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:312,columnNumber:8},this),children:v.jsxDEV(Gt,{gap:"xs",children:v.jsxDEV(Ut.Item,{name:"preProcessorType",className:"!mb-0",children:v.jsxDEV(Lo,{id:"preProcessorType",optionLabelProp:"selected",options:[{value:"rag",selected:n.formatMessage({id:"project_settings.model_settings.form.pre_processor_type.option.rag",defaultMessage:"Default"}),label:n.formatMessage({id:"project_settings.model_settings.form.pre_processor_type.option.rag",defaultMessage:"Default"})},{value:"rag-fusion",label:n.formatMessage({id:"project_settings.model_settings.form.pre_processor_type.option.rag_fusion",defaultMessage:"Fusion algorithm"}),selected:n.formatMessage({id:"project_settings.model_settings.form.pre_processor_type.option.selected",defaultMessage:"Fusion algorithm <Credits>+ {credit} message credits</Credits>"},{credit:AV["rag-fusion"],Credits:P=>v.jsxDEV(Qe,{c:"dimmed",size:"xs",className:"inline",children:P},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:362,columnNumber:15},this)})}],optionRender:P=>{const O=AV[P.value],V=cri[P.value];return v.jsxDEV(Gt,{gap:4,children:[v.jsxDEV(un,{justify:"space-between",gap:"xs",children:[v.jsxDEV(Fn.Text,{children:P.label},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:377,columnNumber:14},this),!!O&&v.jsxDEV(Fn.Text,{type:"secondary",className:"!text-xs",children:v.jsxDEV(ee,{id:"project_settings.model_settings.form.model.option.credits",defaultMessage:"+{credits, plural, =1 {# message credit} other {# message credits}}",values:{credits:O}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:380,columnNumber:16},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:379,columnNumber:15},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:376,columnNumber:13},this),V&&v.jsxDEV(Qe,{size:"xs",c:"dimmed",className:"!text-wrap",children:v.jsxDEV(ee,{...V},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:390,columnNumber:15},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:389,columnNumber:14},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:375,columnNumber:12},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:331,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:330,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:329,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:309,columnNumber:6},this),p==="rag-fusion"&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Vo,{id:"totalRephrases",label:n.formatMessage({id:"project_settings.model_settings.form.rephrases.label",defaultMessage:"Total rephrases: <bold> {totalRephrases} </bold>"},{totalRephrases:m,bold:P=>v.jsxDEV(Fn.Text,{strong:!0,className:"mx-1",children:P},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:413,columnNumber:12},this)}),help:n.formatMessage({id:"project_settings.model_settings.form.rephrases.help",defaultMessage:"Analyze the input and create multiple rephrases for more accurate responses."}),children:v.jsxDEV(Ut.Item,{name:"totalRephrases",className:"!mb-0",children:v.jsxDEV(MC,{dots:!0,min:1,max:5,id:"totalRephrases",marks:{1:"1",2:"2",3:"3",4:"4",5:"5"}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:426,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:425,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:402,columnNumber:8},this),v.jsxDEV(Vo,{id:"contextSize",label:n.formatMessage({id:"project_settings.model_settings.form.context_size.label",defaultMessage:"Context size: <bold>{contextSize}</bold>"},{contextSize:f,bold:P=>v.jsxDEV(Fn.Text,{strong:!0,className:"mx-1",children:P},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:446,columnNumber:12},this)}),help:n.formatMessage({id:"project_settings.model_settings.form.context_size.help",defaultMessage:"Define the number of previous messages are used to rephrase responses."}),children:v.jsxDEV(Ut.Item,{name:"contextSize",className:"!mb-0",children:v.jsxDEV(MC,{dots:!0,min:2,max:8,id:"contextSize",marks:{2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8"}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:459,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:458,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:435,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:401,columnNumber:7},this),r&&v.jsxDEV(Ut.Item,{shouldUpdate:!0,noStyle:!0,children:P=>{const O=!P.isFieldsTouched()||P.getFieldsError().some(({errors:V})=>V.length);return v.jsxDEV(vn,{type:"primary",htmlType:"submit",className:"w-fit",disabled:O||!!(t!=null&&t.disabledAt),loading:P.isFieldsTouched()&&l.isLoading,children:v.jsxDEV(ee,{id:"project_settings.model_settings.form.button.save",defaultMessage:"Save"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:483,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:476,columnNumber:9},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:470,columnNumber:18},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:165,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:157,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/ModelSettings.tsx",lineNumber:137,columnNumber:3},this)}function _Dr(){const t=Mt(),{data:e}=Je.getOrganization.useQuery(void 0,{staleTime:1/0}),{data:n}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0});return ga(t.formatMessage({id:"project_settings.general_settings.page.title",defaultMessage:"Project model settings - Chathive"})),!e||!n?v.jsxDEV(Gt,{className:"w-full h-full overflow-auto",children:[v.jsxDEV(li,{height:"384px",className:"w-full"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/index.tsx",lineNumber:25,columnNumber:5},this),v.jsxDEV(li,{height:"512px",className:"w-full"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/index.tsx",lineNumber:26,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/index.tsx",lineNumber:24,columnNumber:4},this):v.jsxDEV("div",{className:"w-full max-w-screen-xl bg-white pt-6 sm:bg-transparent sm:pt-0 sm:gap-4 flex flex-col self-start",children:[v.jsxDEV(yDr,{organization:e,project:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/index.tsx",lineNumber:33,columnNumber:4},this),v.jsxDEV(vDr,{organization:e,project:n},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/index.tsx",lineNumber:34,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/settings/ModelSettings/index.tsx",lineNumber:32,columnNumber:3},this)}function xDr({auditLog:t,label:e}){var s,a,l,c,u,d;const n=Mt(),[i,r]=b.useState(!1);let o="";return t.user&&(o=[(s=t.user)==null?void 0:s.firstName,(a=t.user)==null?void 0:a.lastName].join(" ").trim()),!((l=t.meta)!=null&&l.executorName)&&((c=t.meta)==null?void 0:c.executedBy)==="CRAWLER"&&(o=n.formatMessage({id:"training.audit_log.re_crawler",defaultMessage:"Crawler"})),(u=t.meta)!=null&&u.executorName&&(o=(d=t.meta)==null?void 0:d.executorName),v.jsxDEV("div",{className:"w-full flex flex-col gap-2 rounded px-1 hover:bg-stone-50",children:[v.jsxDEV("div",{className:"flex flex-row justify-between items-center",children:[v.jsxDEV("div",{className:"flex flex-col gap-0",children:[v.jsxDEV("p",{className:"font-bold",children:e},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLogTimelineItem.tsx",lineNumber:30,columnNumber:6},this),v.jsxDEV("p",{className:"text-slate-500 text-xs",children:[o,n.formatDate(t.createdAt)].filter(Boolean).join(" - ").trim()},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLogTimelineItem.tsx",lineNumber:31,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLogTimelineItem.tsx",lineNumber:29,columnNumber:5},this),v.jsxDEV("div",{className:"flex flex-row gap-2 items-center",children:[wDr(t),!!t.payload&&v.jsxDEV(vn,{type:"text",size:"small",onClick:()=>r(!i),children:i?v.jsxDEV(Phe,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLogTimelineItem.tsx",lineNumber:39,columnNumber:23},this):v.jsxDEV(h6,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLogTimelineItem.tsx",lineNumber:39,columnNumber:40},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLogTimelineItem.tsx",lineNumber:38,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLogTimelineItem.tsx",lineNumber:35,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLogTimelineItem.tsx",lineNumber:28,columnNumber:4},this),i&&v.jsxDEV("div",{className:"w-full p-2 box-border",children:v.jsxDEV("div",{className:"w-full p-2 box-border border border-solid border-slate-300 rounded",children:v.jsxDEV("p",{className:"text-slate-500 text-xs",children:JSON.stringify(t.payload)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLogTimelineItem.tsx",lineNumber:47,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLogTimelineItem.tsx",lineNumber:46,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLogTimelineItem.tsx",lineNumber:45,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLogTimelineItem.tsx",lineNumber:27,columnNumber:3},this)}function wDr(t){var e,n;return t.type==="training.re_crawl"?((e=t.meta)==null?void 0:e.status)==="failed"?v.jsxDEV("p",{className:"text-red-500 text-xs mr-2",children:v.jsxDEV(ee,{id:"training.audit_log.re_crawler.status.failed",defaultMessage:"Re-crawl failed"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLogTimelineItem.tsx",lineNumber:60,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLogTimelineItem.tsx",lineNumber:59,columnNumber:5},this):v.jsxDEV("p",{className:"text-xs mr-2",children:(n=t.meta)!=null&&n.changed?v.jsxDEV(ee,{id:"training.audit_log.re_crawler.status.updated",defaultMessage:"Updated"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLogTimelineItem.tsx",lineNumber:71,columnNumber:6},this):v.jsxDEV(ee,{id:"training.audit_log.re_crawler.status.no_changes",defaultMessage:"No changes"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLogTimelineItem.tsx",lineNumber:73,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLogTimelineItem.tsx",lineNumber:69,columnNumber:4},this):null}function CDr({document:t,organization:e}){var u,d,h,f;const n=Mt(),{data:i,isInitialLoading:r,fetchNextPage:o,isLoading:s,isError:a}=Je.auditLog.getAll.useInfiniteQuery({entityId:t._id},{enabled:!!e.permissions.auditLogHistory,getNextPageParam:m=>{var g,y,_;if(!m||!((g=m==null?void 0:m.data)!=null&&g.length))return;const p=(_=m==null?void 0:m.data)==null?void 0:_[((y=m==null?void 0:m.data)==null?void 0:y.length)-1];return{_id:p._id,createdAt:p.createdAt}},keepPreviousData:!0}),l=b.useMemo(()=>(i==null?void 0:i.pages.flatMap(m=>m.data))||[],[i==null?void 0:i.pages]);if(!e.permissions.auditLogHistory)return v.jsxDEV(pl,{type:"info",message:n.formatMessage({id:"training.audit_log.upgrade.title",defaultMessage:"Upgrade your plan to gain more insights."}),description:n.formatMessage({id:"training.audit_log.upgrade.description",defaultMessage:"With audit logs you get more insights in what happens to your training documents"}),className:"flex flex-col gap-2 sm:flex-row !rounded-t-none",action:v.jsxDEV(vn,{type:"primary",href:"/billing",children:v.jsxDEV(ee,{id:"training.audit_log.upgrade.button",defaultMessage:"Upgrade plan"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:52,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:51,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:39,columnNumber:4},this);if(a)return v.jsxDEV(pl,{type:"error",className:"!rounded-t-none",description:n.formatMessage({id:"training.audit_log.failed_to_fetch",defaultMessage:"We encountered an issue while attempting to retrieve your audit logs."})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:61,columnNumber:4},this);if(r)return v.jsxDEV(ja,{active:!0,title:!1,paragraph:{rows:4,width:"100%"},className:"p-4"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:73,columnNumber:10},this);if(!((d=(u=i==null?void 0:i.pages)==null?void 0:u[0])!=null&&d.total))return v.jsxDEV("div",{className:"w-full h-16 flex flex-col justify-center content-center text-center",children:v.jsxDEV("p",{className:"text-slate-500",children:v.jsxDEV(ee,{id:"training.audit_log.empty",defaultMessage:"You currently have no activity logs."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:79,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:78,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:77,columnNumber:4},this);const c={"training.bulk_update":{color:"orange",dot:v.jsxDEV(_ke,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:91,columnNumber:9},this),label:n.formatMessage({id:"training.audit_log.bulk_update",defaultMessage:"Bulk priority change"})},"training.re_crawl":{color:"blue",dot:v.jsxDEV(fAt,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:99,columnNumber:9},this),label:n.formatMessage({id:"training.audit_log.re_crawl",defaultMessage:"Re crawl"})},"training.create":{color:"green",dot:v.jsxDEV(uAt,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:107,columnNumber:9},this),label:n.formatMessage({id:"training.audit_log.create",defaultMessage:"Created"})},"training.update":{color:"orange",dot:v.jsxDEV(_ke,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:112,columnNumber:9},this),label:n.formatMessage({id:"training.audit_log.update",defaultMessage:"Updated"})},"training.delete":{color:"red",dot:v.jsxDEV(Uhe,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:117,columnNumber:9},this),label:n.formatMessage({id:"training.audit_log.delete",defaultMessage:"Deleted"})}};return v.jsxDEV("div",{className:"w-full max-h-[254px] p-2 pt-4 overflow-auto box-border",children:[v.jsxDEV(M$e,{pending:s,className:"[&>.ant-timeline-item-last]:!pb-0",items:l.map(m=>{const p=c[m.type];return{dot:p.dot,color:p.color,children:v.jsxDEV(xDr,{auditLog:m,label:p.label},m._id,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:134,columnNumber:8},this)}})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:124,columnNumber:4},this),(l==null?void 0:l.length)<((f=(h=i==null?void 0:i.pages)==null?void 0:h[0])==null?void 0:f.total)&&v.jsxDEV(vn,{type:"text",size:"small",onClick:()=>o(),children:v.jsxDEV(ee,{id:"training.audit_log.re_crawler.fetch_more",defaultMessage:"Fetch more"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:145,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:144,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/AuditLog.tsx",lineNumber:123,columnNumber:3},this)}function SDr({children:t,document:e,onSubmit:n,onClose:i}){const r=Mt(),[o]=Ut.useForm(),s=Je.useUtils(),a=Je.reCrawlUrl.useMutation(),l=()=>{o.resetFields(),i()},c=async()=>{try{if(!e)return;if((await a.mutateAsync({id:e._id})).error==="NOT_FOUND"){Ei.error({duration:10,placement:"bottomRight",message:r.formatMessage({id:"training.data.edit_url.edit_url.re_crawl.not_found",defaultMessage:"URL not found. Please verify if the URL still exists. If the problem persists, contact our support team."})});return}Ei.success({placement:"bottomRight",message:r.formatMessage({id:"training.data.edit_url.edit_url.re_crawl.notification.succeeded",defaultMessage:"URL has been re-crawl.",description:"Show notification url has started to re crawl this can take up to 5min to complete"})}),s.getTotalTokensUsed.invalidate(),s.getTrainingDataByType.invalidate(),l()}catch(d){O2({error:d,intl:r})}},u=[{span:3,key:"url",label:r.formatMessage({id:"conversations.action.change_training_documents.detail.url",defaultMessage:"URL"}),children:v.jsxDEV(Vhe,{justify:"space-between",className:"w-full",gap:8,children:[v.jsxDEV("a",{href:e==null?void 0:e.url,rel:"noopener noreferrer",target:"_blank",children:e==null?void 0:e.url},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/EditUrl.tsx",lineNumber:77,columnNumber:6},this),v.jsxDEV(vn,{type:"default",size:"small",onClick:c,loading:a.isLoading,icon:v.jsxDEV(vAt,{className:"mr-2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/EditUrl.tsx",lineNumber:85,columnNumber:13},this),children:v.jsxDEV(ee,{id:"training.data.edit_url.edit_url.actions.re_crawl_resource",defaultMessage:"Re-crawl",description:"Small button text to trigger url re-crawl"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/EditUrl.tsx",lineNumber:87,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/EditUrl.tsx",lineNumber:80,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/EditUrl.tsx",lineNumber:76,columnNumber:5},this)},{span:3,key:"createdAt",label:r.formatMessage({id:"conversations.action.change_training_documents.detail.date_created",defaultMessage:"Date created"}),children:v.jsxDEV(tu,{value:e==null?void 0:e.createdAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/EditUrl.tsx",lineNumber:103,columnNumber:14},this)},{span:3,key:"updatedAt",label:r.formatMessage({id:"conversations.action.change_training_documents.detail.updated_at",defaultMessage:"Last updated"}),children:v.jsxDEV(tu,{value:e==null?void 0:e.updatedAt},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/EditUrl.tsx",lineNumber:112,columnNumber:14},this)}];return v.jsxDEV(v.Fragment,{children:[v.jsxDEV($he,{items:u},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/EditUrl.tsx",lineNumber:118,columnNumber:4},this),v.jsxDEV(Ut,{form:o,layout:"vertical",onFinish:n,requiredMark:"optional",className:"flex flex-col gap-2",initialValues:{title:e==null?void 0:e.title,language:e==null?void 0:e.language,priority:(e==null?void 0:e.priority)||"default",documentDate:(e==null?void 0:e.documentDate)&&An(e==null?void 0:e.documentDate)},children:[v.jsxDEV(Ut.Item,{name:"title",className:"!mb-0",rules:[{required:!0,message:r.formatMessage({id:"training.data.edit_url.edit_url.title.required",defaultMessage:"Please enter a title."})}],label:r.formatMessage({id:"training.data.edit_url.edit_url.title.label",defaultMessage:"Title"}),children:v.jsxDEV(es,{maxLength:128,showCount:!0,placeholder:r.formatMessage({id:"training.data.edit_url.edit_url.title.placeholder",defaultMessage:"E.g. Open vacancies"})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/EditUrl.tsx",lineNumber:150,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/EditUrl.tsx",lineNumber:133,columnNumber:5},this),t&&t({isLoading:a.isLoading})]},e==null?void 0:e._id,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/EditUrl.tsx",lineNumber:119,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/TrainingDocumentsForm/EditUrl.tsx",lineNumber:117,columnNumber:3},this)}function NDr({type:t,isOpen:e,document:n,isDisabled:i,organization:r,onClose:o}){const s=Mt(),a=Je.useUtils(),[l,c]=b.useState(t),u=Je.updateFaq.useMutation(),d=Je.updateTrainingText.useMutation(),h=Je.updateTrainingUrl.useMutation(),f=Je.deleteTrainingDocumentById.useMutation();b.useEffect(()=>{t!==l&&c(t)},[t]);const m=async y=>{try{let _=Object.entries(y).reduce((w,[C,N])=>({...w,[C]:N??void 0}),{});switch("documentDate"in _&&_.documentDate&&(_.documentDate=_.documentDate.format("YYYY-MM-DD")),l){case"faq":await u.mutateAsync({..._,documentId:n._id});break;case"text":await d.mutateAsync({..._,documentId:n._id});break;case"website":await h.mutateAsync({..._,id:n._id});break}Ei.success({placement:"bottomRight",message:s.formatMessage({id:"edit_training_documents.notification.success",defaultMessage:"Document has been updated."})}),a.getTrainingDataByType.invalidate(),o()}catch(_){O2({intl:s,error:_})}},p=()=>{Ma.confirm({width:512,title:s.formatMessage(VBe[n.type]),icon:v.jsxDEV(Uhe,{style:{color:"#DE5050"}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:96,columnNumber:10},this),content:s.formatMessage(BBe[n.type],{title:(n==null?void 0:n.title)||"",url:(n==null?void 0:n.url)||""}),okText:s.formatMessage(Fse[n.type]),okButtonProps:{danger:!0,loading:f.isLoading},onOk(){if(!n)return Ei.error({placement:"bottomRight",message:s.formatMessage({id:"edit_training_documents.notification.delete.success",defaultMessage:"Document successfully removed."})});f.mutate({id:n._id},{onSuccess:()=>{Ei.success({placement:"bottomRight",message:s.formatMessage({id:"edit_training_documents.notification.delete.success",defaultMessage:"Document successfully removed."})}),a.getTrainingDataByType.invalidate(),o()},onError:()=>{Ei.error({placement:"bottomRight",message:s.formatMessage({id:"edit_training_documents.notification.delete.failed",defaultMessage:"Something went wrong while removing training data. Please try again later or contact customer support."})})}})}})},g=u.isLoading||d.isLoading||h.isLoading;return v.jsxDEV(Ma,{centered:!0,width:800,open:e,footer:null,destroyOnClose:!0,onCancel:o,title:s.formatMessage({id:"edit_training_documents.title",defaultMessage:"Edit training document"}),children:v.jsxDEV(EDr,{type:l,document:n,onSubmit:m,onClose:o,children:()=>v.jsxDEV(v.Fragment,{children:[v.jsxDEV(Ut.Item,{name:"priority",rules:[{required:!0,message:s.formatMessage({id:"edit_training_documents.form.priority.required",defaultMessage:"Select a priority"})}],label:s.formatMessage({id:"edit_training_documents.form.priority.label",defaultMessage:"Priority"}),help:s.formatMessage({id:"edit_training_documents.form.priority.help",defaultMessage:"Training documents with a higher priority will be considered more relevant"}),children:v.jsxDEV(Lo,{defaultValue:"default",options:Object.keys(bv).map(y=>({value:y,label:s.formatMessage(bv[y])}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:183,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:162,columnNumber:7},this),v.jsxDEV(Ut.Item,{name:"documentDate",label:s.formatMessage({id:"edit_training_documents.form.document_date.label",defaultMessage:"Document date"}),help:s.formatMessage({id:"edit_training_documents.form.document_date.help",defaultMessage:"Date of the document content, this date can be used by the model"}),children:v.jsxDEV(Qk,{locale:$Be,showTime:!1,format:"DD/MM/YYYY",className:"w-full"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:202,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:191,columnNumber:7},this),v.jsxDEV(Ut.Item,{name:"language",className:"!mb-0",label:s.formatMessage({id:"edit_training_documents.form.language.label",defaultMessage:"Language"}),children:v.jsxDEV(u$,{allowClear:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:212,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:204,columnNumber:7},this),v.jsxDEV("div",{className:"pt-4",children:[v.jsxDEV(Kkt,{size:"small",expandIcon:()=>v.jsxDEV(h$e,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:220,columnNumber:28},this),items:[{key:"auditLog",label:s.formatMessage({id:"edit_training_documents.collapse.audit_log.title",defaultMessage:"Activity logs"}),children:v.jsxDEV(CDr,{document:n,organization:r},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:228,columnNumber:22},this),className:Vt("[&>.ant-collapse-content>.ant-collapse-content-box]:!p-0","[&>.ant-collapse-content>.ant-collapse-content-box]:overflow-auto")}]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:218,columnNumber:9},this),v.jsxDEV("footer",{className:"flex justify-between items-center w-full !pt-4",children:[v.jsxDEV(vn,{type:"text",onClick:o,children:v.jsxDEV(ee,{id:"edit_training_documents.footer.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:239,columnNumber:10},this)},"back",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:238,columnNumber:9},this),v.jsxDEV("div",{children:[v.jsxDEV(vn,{danger:!0,type:"text",onClick:p,disabled:g||i,loading:f.isLoading,children:v.jsxDEV(ee,{id:"edit_training_documents.footer.delete",defaultMessage:"Delete"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:252,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:245,columnNumber:10},this),v.jsxDEV(Ut.Item,{shouldUpdate:!0,noStyle:!0,children:y=>{const _=!y.isFieldsTouched()||y.getFieldsError().some(({errors:w})=>w.length);return v.jsxDEV(vn,{type:"primary",htmlType:"submit",loading:g,disabled:_||i||f.isLoading,children:v.jsxDEV(ee,{id:"edit_training_documents.footer.submit",defaultMessage:"Update"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:272,columnNumber:14},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:264,columnNumber:13},this)}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:257,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:244,columnNumber:9},this)]},"modalFooter",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:237,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:215,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:161,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:159,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:147,columnNumber:3},this)}function EDr({type:t,document:e,onSubmit:n,onClose:i,children:r}){switch(t){case"document":return;case"faq":return v.jsxDEV(I9t,{document:e,onSubmit:n,onClose:i,children:r},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:303,columnNumber:5},this);case"text":return v.jsxDEV(A9t,{document:e,onSubmit:n,onClose:i,children:r},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:309,columnNumber:5},this);case"website":return v.jsxDEV(SDr,{document:e,onSubmit:n,onClose:i,children:r},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/EditTrainingDocument.tsx",lineNumber:315,columnNumber:5},this);default:return}}const DDr=({documentIds:t,isOpen:e,onClose:n})=>{const i=Mt(),r=Je.useContext(),[o]=Ut.useForm(),s=Je.bulkPriorityChange.useMutation(),a=async()=>{try{const{priority:c}=o.getFieldsValue();await s.mutateAsync({priority:c,documentIds:t}),n(),r.getTrainingDataByType.invalidate(),Ei.success({placement:"bottomRight",message:i.formatMessage({id:"training.bulk_priority_change.update.succeeded",defaultMessage:"Priority has been changed to {label}"},{label:i.formatMessage(bv[c]).toLowerCase()})})}catch{Ei.error({placement:"bottomRight",message:i.formatMessage({id:"training.bulk_priority_change.update.failed",defaultMessage:"Something went wrong while updating your documents. Please try again later or contact customer support."})})}},l=()=>{o.resetFields(),n()};return v.jsxDEV(Ma,{width:550,open:e,onOk:a,onCancel:l,title:i.formatMessage({id:"training.bulk_priority_change.title",defaultMessage:"Change priority"}),footer:[v.jsxDEV("div",{className:"flex justify-between items-center w-full mt-10",children:[v.jsxDEV(vn,{type:"text",onClick:l,disabled:s.isLoading,children:v.jsxDEV(ee,{id:"training.bulk_priority_change.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkPriorityChange.tsx",lineNumber:72,columnNumber:7},void 0)},"back",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkPriorityChange.tsx",lineNumber:71,columnNumber:6},void 0),v.jsxDEV(vn,{type:"primary",htmlType:"submit",form:"bulkChangePriorityForm",loading:s.isLoading,children:v.jsxDEV(ee,{id:"training.bulk_priority_change.submit",defaultMessage:"Update"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkPriorityChange.tsx",lineNumber:81,columnNumber:7},void 0)},"submit",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkPriorityChange.tsx",lineNumber:74,columnNumber:6},void 0)]},"modalFooter",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkPriorityChange.tsx",lineNumber:70,columnNumber:5},void 0)],children:[v.jsxDEV("p",{className:"mb-2",children:v.jsxDEV(ee,{id:"training.bulk_priority_change.explanation",defaultMessage:"Pick the priority you want give to {total, plural, =1 {this training document (#)} other {these # training documents}}.",values:{total:t.length}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkPriorityChange.tsx",lineNumber:87,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkPriorityChange.tsx",lineNumber:86,columnNumber:4},void 0),v.jsxDEV(Ut,{name:"bulkChangePriorityForm",id:"bulkChangePriorityForm",form:o,layout:"vertical",requiredMark:!1,initialValues:{priority:"default"},onFinish:a,children:v.jsxDEV(Ut.Item,{name:"priority",rules:[{required:!0,message:i.formatMessage({id:"training.bulk_priority_change.form.priority.required",defaultMessage:"pick a priority"})}],help:i.formatMessage({id:"training.bulk_priority_change.form.priority.help",defaultMessage:"Training documents with a higher priority will be considered more relevant"}),children:v.jsxDEV(Lo,{defaultValue:"default",options:Object.keys(bv).map(c=>({value:c,label:i.formatMessage(bv[c])}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkPriorityChange.tsx",lineNumber:118,columnNumber:6},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkPriorityChange.tsx",lineNumber:102,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkPriorityChange.tsx",lineNumber:93,columnNumber:4},void 0)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkPriorityChange.tsx",lineNumber:60,columnNumber:3},void 0)},kDr=({documentIds:t,isOpen:e,onClose:n})=>{const i=Mt(),r=Je.useContext(),[o]=Ut.useForm(),s=Je.bulkReCrawl.useMutation(),a=async()=>{try{if((await s.mutateAsync({documentIds:t})).error==="NOT_FOUND"){Ei.error({duration:10,placement:"bottomRight",message:i.formatMessage({id:"training.bulk_re_crawl.not_found",defaultMessage:"URL not found. Please verify if the URL still exists. If the problem persists, contact our support team."})});return}if(n(),r.getTrainingDataByType.invalidate(),t.length===1){Ei.success({placement:"bottomRight",message:i.formatMessage({id:"training.bulk_re_crawl.notification.succeeded",defaultMessage:"Url has been recrawled"})});return}Ei.info({icon:v.jsxDEV(Xd,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkReCrawlModal.tsx",lineNumber:54,columnNumber:11},void 0),placement:"bottomRight",message:i.formatMessage({id:"training.bulk_re_crawl.notification.started",defaultMessage:"Re crawl has started, this might take a few moments"})})}catch{Ei.error({placement:"bottomRight",message:i.formatMessage({id:"training.bulk_re_crawl.notification.failed",defaultMessage:"Something went wrong while recrawling your {total, plural, =1 {# url} other {{formattedTotal} url's}}. Please try again later or contact customer support."},{total:t==null?void 0:t.length,formattedTotal:i.formatNumber(t==null?void 0:t.length)})})}},l=()=>{o.resetFields(),n()};return v.jsxDEV(Ma,{title:i.formatMessage({id:"training.bulk_re_crawl.title",defaultMessage:"Confirm the re crawl for {total, plural, =1 {# url} other {{formattedTotal} url's}}"},{total:t==null?void 0:t.length,formattedTotal:i.formatNumber(t==null?void 0:t.length)}),open:e,onOk:a,onCancel:l,footer:[v.jsxDEV("div",{className:"flex justify-between items-center w-full",children:[v.jsxDEV(vn,{type:"text",onClick:l,disabled:s.isLoading,children:v.jsxDEV(ee,{id:"training.bulk_re_crawl.cancel",defaultMessage:"Cancel"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkReCrawlModal.tsx",lineNumber:97,columnNumber:7},void 0)},"back",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkReCrawlModal.tsx",lineNumber:96,columnNumber:6},void 0),v.jsxDEV(vn,{type:"primary",onClick:a,loading:s.isLoading,children:v.jsxDEV(ee,{id:"training.bulk_re_crawl.submit",defaultMessage:"Start re crawl"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkReCrawlModal.tsx",lineNumber:100,columnNumber:7},void 0)},"submit",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkReCrawlModal.tsx",lineNumber:99,columnNumber:6},void 0)]},"modalFooter",!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkReCrawlModal.tsx",lineNumber:95,columnNumber:5},void 0)],children:v.jsxDEV("p",{children:[i.formatMessage({id:"training.bulk_actions.re_crawl.description",defaultMessage:"We will exclusively crawl the selected {total, plural, =1 {URL} other {URL's}} without initiating a deep crawl. If you wish to start a thorough re-crawl from the {total, plural, =1 {URL} other {URL's}}, remove it first and then re-add it."},{total:t==null?void 0:t.length}),(t==null?void 0:t.length)>1&&v.jsxDEV(v.Fragment,{children:[v.jsxDEV("br",{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkReCrawlModal.tsx",lineNumber:116,columnNumber:7},void 0),v.jsxDEV("br",{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkReCrawlModal.tsx",lineNumber:117,columnNumber:7},void 0),i.formatMessage({id:"training.bulk_actions.re_crawl.description.line_2",defaultMessage:"Just a heads up, this will create a new crawler that will only crawl the selected url's. You might need to edit the crawler to crawler behind login walls."})]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkReCrawlModal.tsx",lineNumber:115,columnNumber:6},void 0)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkReCrawlModal.tsx",lineNumber:105,columnNumber:4},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/BulkReCrawlModal.tsx",lineNumber:82,columnNumber:3},void 0)},PSe={reCrawler:200};function MDr({total:t,pageSize:e,isError:n,isLoading:i,currentPage:r,dataType:o,isInitialLoading:s,data:a,onSelectRow:l,onPageChange:c,onAddDocument:u,onPageSizeChange:d}){var R,P;const h=Mt(),f=Je.useUtils(),[m,p]=b.useState([]),[g,y]=b.useState(void 0),[_,w]=b.useState(!1),[C,N]=b.useState(!1),E=Je.bulkDeleteDocuments.useMutation(),D=Je.deleteTrainingDocumentById.useMutation(),k=b.useMemo(()=>a.find(O=>O._id===g),[a,g]),M=async()=>{if(!g)return Ei.error({placement:"bottomRight",message:h.formatMessage({id:"training.data.delete.success",defaultMessage:"Data successfully removed."})});try{await D.mutateAsync({id:g}),Ei.success({placement:"bottomRight",message:h.formatMessage({id:"training.data.delete.success",defaultMessage:"Data successfully removed."})}),f.getTotalTokensUsed.invalidate(),f.getTrainingDataByType.invalidate(),y(void 0),p([])}catch{Ei.error({placement:"bottomRight",message:h.formatMessage({id:"training.data.delete.failed",defaultMessage:"Something went wrong while removing training data. Please try again later or contact customer support."})})}},T=O=>{const V=a==null?void 0:a.find(F=>F._id===O);V&&l(V)},A=()=>{Ma.confirm({width:512,icon:v.jsxDEV(Uhe,{style:{color:"#DE5050"}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:126,columnNumber:10},this),title:h.formatMessage({id:"training.bulk_actions.delete.confirm.title",defaultMessage:"Confirm deletion of {selectedRows, plural, =1 {# training document} other {# training documents}}"},{selectedRows:h.formatNumber(m==null?void 0:m.length)}),content:h.formatMessage({id:"training.bulk_actions.delete.confirm.description",defaultMessage:"If you delete {selectedRows,plural, =1 {# this training document} other {these training documents}}, the data on which your chatbot is trained will be lost. However, your bot may still attempt to answer these questions in its own manner."},{selectedRows:h.formatNumber(m==null?void 0:m.length)}),okText:h.formatMessage(Fse.website),cancelButtonProps:{className:"border-theme-primary"},okButtonProps:{danger:!0,loading:E.isLoading},onOk(){E.mutate({documentIds:m},{onSuccess:()=>{Ei.success({placement:"bottomRight",message:h.formatMessage({id:"training.bulk_actions.delete.success",defaultMessage:"The selected training documents have been deleted."})}),f.getTotalTokensUsed.invalidate(),f.getTrainingDataByType.invalidate(),y(void 0),p([])},onError:()=>{Ei.error({placement:"bottomRight",message:h.formatMessage({id:"training.bulk_actions.delete.failed",defaultMessage:"Something went wrong while deleting your training documents. Please try again later or contact customer support."})})}})}})};return v.jsxDEV(v.Fragment,{children:[n&&!i&&v.jsxDEV(pl,{message:h.formatMessage({id:"training.data.error",defaultMessage:"Something went wrong while loading data."}),type:"error"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:182,columnNumber:5},this),!!(m!=null&&m.length)&&v.jsxDEV("div",{className:"flex flex-row justify-between",children:[v.jsxDEV(Vhe,{gap:8,children:[v.jsxDEV("p",{children:v.jsxDEV(ee,{id:"training.bulk_actions.description",defaultMessage:"{selectedRows, plural, =1 {# document} other {# documents}} selected: ",values:{selectedRows:h.formatNumber(m==null?void 0:m.length)||0}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:195,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:194,columnNumber:7},this),v.jsxDEV(Vs,{trigger:PSe.reCrawler<(m==null?void 0:m.length)?["hover"]:[],title:h.formatMessage({id:"training.bulk_actions.change_priority.tooltip",defaultMessage:"You can only change the priority of {limit} training documents at a time."},{limit:PSe.reCrawler}),children:v.jsxDEV(vn,{size:"small",disabled:PSe.reCrawler<(m==null?void 0:m.length),onClick:()=>N(!0),children:v.jsxDEV(ee,{id:"training.bulk_actions.change_priority",defaultMessage:"Change priority"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:217,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:212,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:201,columnNumber:7},this),o==="website"&&v.jsxDEV(vn,{size:"small",onClick:()=>w(!0),children:v.jsxDEV(ee,{id:"training.bulk_actions.re_crawl",defaultMessage:"Recrawl"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:225,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:224,columnNumber:8},this),v.jsxDEV(vn,{size:"small",danger:!0,onClick:A,children:v.jsxDEV(ee,{id:"training.bulk_actions.delete",defaultMessage:"Delete"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:229,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:228,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:193,columnNumber:6},this),v.jsxDEV(vn,{size:"small",onClick:()=>p([]),icon:v.jsxDEV(vb,{className:"mr-2"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:233,columnNumber:69},this),children:v.jsxDEV(ee,{id:"training.bulk_actions.reset_selection",defaultMessage:"Reset selection"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:234,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:233,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:192,columnNumber:5},this),!n&&s&&v.jsxDEV(ja,{active:!0,title:!1,paragraph:{rows:8,width:"100%"},className:"[&>div>ul>li]:!h-12"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:240,columnNumber:5},this),!n&&!s&&!!t&&v.jsxDEV(qs,{rowKey:"_id",dataSource:a,loading:i,pagination:{total:t,pageSize:e,current:r,showSizeChanger:!0,onChange:(O,V)=>{c(O),V&&d(V)},pageSizeOptions:["10","20","50","100","200"]},rowSelection:{type:"checkbox",preserveSelectedRowKeys:!0,selectedRowKeys:m,onChange:O=>p(O)},style:{overflowX:"auto"},locale:{emptyText:a&&a.length>0?null:v.jsxDEV("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[v.jsxDEV("img",{src:"/img/svg/no_results.svg",alt:"No results",className:"max-h-52 p-8"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:270,columnNumber:10},this),v.jsxDEV("p",{children:v.jsxDEV(ee,{id:"training.data.table.no_results",defaultMessage:"No training documents found"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:272,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:271,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:269,columnNumber:9},this)},children:[((R=a==null?void 0:a[0])==null?void 0:R.url)&&v.jsxDEV(qs.Column,{ellipsis:!0,width:"50%",dataIndex:[],className:"min-w-[128px]",title:h.formatMessage({id:"training.data.table.column.page",defaultMessage:"Page"}),render:O=>v.jsxDEV("div",{className:"flex flex-col",children:[O.title,v.jsxDEV("a",{href:O.url,className:O.title&&"text-xs",target:"_blank",rel:"noopener noreferrer",children:O.url.replace(/^https:\/\/www.|^https:\/\/|\/$/g,"")},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:295,columnNumber:10},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:293,columnNumber:9},this)},"page",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:282,columnNumber:7},this),((P=a==null?void 0:a[0])==null?void 0:P.type)!=="website"&&v.jsxDEV(qs.Column,{width:"50%",dataIndex:["title"],className:"min-w-[128px]",title:h.formatMessage({id:"training.data.table.column.title",defaultMessage:"Title"}),render:O=>v.jsxDEV(Fn.Paragraph,{ellipsis:{rows:2},children:O},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:318,columnNumber:9},this)},"title",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:308,columnNumber:7},this),v.jsxDEV(qs.Column,{width:"124px",align:"right",className:"min-w-[124px]",dataIndex:"tokensUsed",title:h.formatMessage({id:"training.data.table.column.tokens",defaultMessage:"Characters"}),render:O=>v.jsxDEV(Qb,{value:TRe(O)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:332,columnNumber:27},this)},"tokensUsed",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:322,columnNumber:6},this),v.jsxDEV(qs.Column,{width:"96px",dataIndex:"priority",className:"min-w-[96px]",title:h.formatMessage({id:"training.data.table.column.priority",defaultMessage:"Priority"}),render:O=>O&&v.jsxDEV(ee,{...bv[O]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:343,columnNumber:41},this)},"priority",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:334,columnNumber:6},this),v.jsxDEV(qs.Column,{width:"124px",className:"min-w-[124px]",dataIndex:"crawledAt",title:h.formatMessage({id:"training.data.table.column.scrapedAt",defaultMessage:"Added at",description:"Added at column title"}),render:O=>v.jsxDEV(tu,{value:new Date(O),day:"numeric",month:"short",year:"numeric"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:356,columnNumber:8},this)},"crawledAt",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:345,columnNumber:6},this),v.jsxDEV(qs.Column,{width:"96px",align:"center",dataIndex:"status",className:"min-w-[96px]",title:h.formatMessage({id:"training.data.table.column.training",defaultMessage:"Status",description:"Shows the status if the training data is ready to be used in the chatbot"}),render:O=>O==="finished"?v.jsxDEV(Vs,{title:h.formatMessage({id:"training.data.tooltip.ready",defaultMessage:"Data ready to be used.",description:"Tooltip message for when the training data is ready"}),children:v.jsxDEV(W2t,{twoToneColor:"#52c41a"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:380,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:373,columnNumber:10},this):O==="failed"?v.jsxDEV(Vs,{title:h.formatMessage({id:"training.data.tooltip.failed",defaultMessage:"An error occured while training your chatbot on this document. Please try again.",description:"Tooltip message for when the training document failed"}),children:v.jsxDEV(U2t,{twoToneColor:"#ff4d4f"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:395,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:387,columnNumber:10},this):v.jsxDEV(Vs,{title:h.formatMessage({id:"training.data.tooltip.inProgress",defaultMessage:"Data preparation in progress.",description:"Tooltip message for when the training data is being prepared"}),children:v.jsxDEV(Xd,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:408,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:401,columnNumber:9},this)},"status",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:359,columnNumber:6},this),v.jsxDEV(qs.Column,{width:"96px",align:"center",className:"min-w-[96px]",title:h.formatMessage({id:"training.data.table.column.action",defaultMessage:"Action"}),render:(O,V)=>v.jsxDEV(vn,{type:"text",onClick:()=>T(V._id),children:v.jsxDEV(ee,{id:"training.data.table.column.edit",defaultMessage:"edit"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:425,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:424,columnNumber:9},this)},"action",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:413,columnNumber:6},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:244,columnNumber:5},this),!t&&!i&&v.jsxDEV(uo,{children:v.jsxDEV("section",{className:"w-full flex flex-col items-center",children:[v.jsxDEV("p",{className:"text-xl max-w-md text-center",children:v.jsxDEV(ee,{id:"training.data.empty.title",defaultMessage:"It's a bit empty here!"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:443,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:442,columnNumber:7},this),v.jsxDEV("p",{className:"text-gray-400 max-w-xs text-center mt-2",children:v.jsxDEV(ee,{id:"training.data.empty.cta",defaultMessage:"Start by adding new training documents. You can choose one of the types beneath."},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:446,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:445,columnNumber:7},this),v.jsxDEV("div",{className:Vt("w-full max-w-[256px] grid gap-4 py-4","grid-cols-1","sm:grid-cols-2 sm:max-w-[720px]","md:grid-cols-3","signUp:grid-cols-3","signUpXl:grid-cols-3"),children:zBe.map(O=>O.id==="document"?null:v.jsxDEV(T9t,{...O,onClick:()=>u(O.id)},O.id,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:464,columnNumber:10},this))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:451,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:441,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:440,columnNumber:5},this),v.jsxDEV(xpe,{isOpen:!!g,title:h.formatMessage(VBe[o]),description:h.formatMessage(BBe[o],{title:(k==null?void 0:k.title)||"",url:(k==null?void 0:k.url)||""}),isDeleting:D.isLoading,deleteText:h.formatMessage(Fse[o]),onClose:()=>y(void 0),onDelete:()=>M()},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:475,columnNumber:4},this),v.jsxDEV(DDr,{documentIds:m,isOpen:C,onClose:()=>N(!1)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:487,columnNumber:4},this),v.jsxDEV(kDr,{documentIds:m,isOpen:_,onClose:()=>w(!1)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:492,columnNumber:4},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/components/Table.tsx",lineNumber:180,columnNumber:3},this)}function LDr(){var $,B;const t=Mt(),e=Qr(),n=b.useRef(),[i,r]=b.useState(),[o,s]=b.useState(10),[a,l]=b.useState(!1),[c,u]=b.useState(!1),[d,h]=b.useState(1),[f,m]=b.useState("website"),[p,g]=TA({key:"trainingBannerState",defaultValue:{chatbot:!0,aiForm:!0}});ga(t.formatMessage({id:"training.page.title",defaultMessage:"Training - Chathive"}));const{data:y}=Je.getTotalTokensUsed.useQuery(void 0),{data:_}=Je.project.getCurrent.useQuery(void 0,{staleTime:1/0}),{data:w}=Je.getOrganization.useQuery(void 0,{staleTime:36e5}),{data:C}=Je.isFairUsePolicyHit.useQuery(void 0,{staleTime:36e5}),{data:N,isLoading:E,isInitialLoading:D,isError:k}=Je.getTrainingDataByType.useQuery({query:i,limit:o,type:f,offset:(d-1)*o}),M=b.useMemo(()=>{var H;const z=((H=w==null?void 0:w.permissions)==null?void 0:H.trainingTokens)||0;return(y||0)>=z},[w,y]),T=z=>{KA(()=>r(z.target.value),250)},A=z=>{_!=null&&_.disabledAt||(l(!0),m(z))},R=()=>{window._cio.track("voted_for_documents"),Ei.open({closeIcon:!1,placement:"top",style:{textAlign:"center"},message:t.formatMessage({id:"training.coming_soon.documents.notification",defaultMessage:"🎉🎉 Thank you for your vote 🎉🎉",description:"Show confirmation user has voted"})})},P=z=>{n.current=z,u(!0)},O=()=>{u(!1),n.current=void 0},V=()=>{_!=null&&_.projectType&&g(z=>({...z,[_==null?void 0:_.projectType]:!1}))},F={aiForm:{id:"training.info_banner.ai_form",defaultMessage:"Training data helps your agent answer customer questions as they fill out the AI form, ensuring they get the right information and enjoy a smoother experience."},chatbot:{id:"training.info_banner.chatbot",defaultMessage:"Analytics have moved to your organizations dashboard."}};return v.jsxDEV("section",{className:"w-full h-full py-4 bg-white sm:pt-0 sm:bg-transparent flex flex-col gap-4",children:[(_==null?void 0:_.projectType)&&p[_.projectType]&&v.jsxDEV(Yo,{className:"min-h-14",withCloseButton:!0,icon:v.jsxDEV(uq,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:113,columnNumber:12},this),onClose:V,closeButtonLabel:t.formatMessage({id:"training.info_banner.close.aria_label",defaultMessage:"Hide banner"}),children:_.projectType&&v.jsxDEV(ee,{...F[_.projectType]},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:120,columnNumber:30},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:110,columnNumber:5},this),C&&v.jsxDEV(Yo,{variant:"light",color:"orange",icon:v.jsxDEV(ud,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:124,columnNumber:71},this),children:v.jsxDEV(ee,{id:"organization_dashboard.usage_analytics.fair_use_policy.description",defaultMessage:"You've reached your fair use limit. Please wait until {date} to upload more, or reach out to our support team for help.",values:{date:(($=w==null?void 0:w.billing)==null?void 0:$.startDate)&&t.formatDate(ffe((B=w==null?void 0:w.billing)==null?void 0:B.startDate))}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:125,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:124,columnNumber:27},this),v.jsxDEV(uo,{title:t.formatMessage({id:"training.card.training_documents.title",defaultMessage:"Training documents"}),bordered:!1,extra:v.jsxDEV(v.Fragment,{children:[!M&&v.jsxDEV(vn,{type:"primary",className:"inline-flex",id:"trainingAddDocumentButton",onClick:()=>A(f),disabled:!!(_!=null&&_.disabledAt),children:v.jsxDEV(ee,{id:"training.data.table.add_training_document",defaultMessage:"Add training document"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:151,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:144,columnNumber:8},this),M&&v.jsxDEV(vn,{id:"trainingAddDocumentButton",className:"inline-flex",type:"primary",onClick:()=>e("/billing"),children:v.jsxDEV(ee,{id:"training.data.upgrade",defaultMessage:"Upgrade plan"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:164,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:158,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:142,columnNumber:6},this),children:v.jsxDEV("div",{className:"flex flex-col space-y-6 overflow-auto",children:[v.jsxDEV("div",{className:"flex flex-col items-end sm:flex-row gap-4",children:v.jsxDEV(Ut,{layout:"vertical",className:"flex w-full gap-4",children:[v.jsxDEV(Ut.Item,{className:"!mb-0",htmlFor:"trainingSwitch",label:t.formatMessage({id:"filter.document_type",defaultMessage:"Type"}),children:v.jsxDEV(Lo,{value:f,id:"trainingSwitch",className:"w-full sm:min-w-[128px] sm:w-[128px]",onChange:m,popupMatchSelectWidth:!1,options:Object.keys(Apt).map(z=>({value:z,label:t.formatMessage(Apt[z])}))},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:181,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:173,columnNumber:8},this),v.jsxDEV(Ut.Item,{className:"!mb-0 w-full",htmlFor:"trainingSearch",label:t.formatMessage({id:"filter.document_type",defaultMessage:"Search on"}),children:v.jsxDEV(es.Search,{id:"trainingSearch",loading:E,onChange:T,placeholder:t.formatMessage({...krr[f]})},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:198,columnNumber:9},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:193,columnNumber:8},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:172,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:171,columnNumber:6},this),f!=="document"&&v.jsxDEV(MDr,{isError:k,pageSize:o,isLoading:E,total:(N==null?void 0:N.total)||0,data:(N==null?void 0:N.result)||[],currentPage:d,dataType:f,onSelectRow:P,onAddDocument:A,isInitialLoading:D,onPageChange:z=>h(z),onPageSizeChange:z=>s(z)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:208,columnNumber:7},this),f==="document"&&v.jsxDEV(uo,{children:v.jsxDEV(fd,{className:"max-w-4xl mx-auto",title:t.formatMessage({id:"training.coming_soon.documents.title",defaultMessage:"Coming soon: document upload ⏳",description:"Fallback message to let user know documents upload is coming soon"}),subTitle:t.formatMessage({id:"training.coming_soon.documents.description",defaultMessage:"Coming soon: you'll be able to upload PDFs, Word documents, or text files to empower your chatbot with more knowledge and capabilities. Click the button below to express your interest in this upcoming feature.",description:"Fallback message to let user know documents upload is coming soon"}),icon:v.jsxDEV("img",{src:"/img/svg/coming_soon.svg",className:"h-48 mx-auto"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:238,columnNumber:15},this),extra:v.jsxDEV(vn,{type:"primary",onClick:R,children:v.jsxDEV(ee,{id:"training.coming_soon.documents.button",defaultMessage:"I’m interested!"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:241,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:240,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:225,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:224,columnNumber:7},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:170,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:135,columnNumber:4},this),v.jsxDEV(R9t,{type:f,isOpen:a,isDisabled:!!(_!=null&&_.disabledAt),onClose:()=>l(!1)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:252,columnNumber:4},this),n.current&&w&&_&&v.jsxDEV(NDr,{type:f,isOpen:c,organization:w,isDisabled:!!(_!=null&&_.disabledAt),document:n.current,onClose:O},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:259,columnNumber:5},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/Training/index.tsx",lineNumber:108,columnNumber:3},this)}const CKt=[{path:"dashboard",navigationKey:"dashboard",element:v.jsxDEV(V_,{children:v.jsxDEV(uhr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:79,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:78,columnNumber:4},void 0),icon:v.jsxDEV(Khe,{className:"app_shell-icon-green p-2 rounded","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:82,columnNumber:9},void 0),type:"default",label:{id:"app_shell.project.menu.dashboard.label",defaultMessage:"Dashboard"},projectTypes:["chatbot","aiForm"]},{path:"sessions/:sessionId?",navigationKey:"sessions",element:v.jsxDEV(V_,{className:"p-0",children:v.jsxDEV(GEr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:95,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:94,columnNumber:4},void 0),icon:v.jsxDEV(h$e,{className:"app_shell-icon-pastel_green p-2 rounded",id:"sessionsTourButton","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:98,columnNumber:9},void 0),type:"default",label:{id:"app_shell.project.menu.sessions.label",defaultMessage:"Sessions"},projectTypes:["aiForm"]},{path:"conversations/:conversationId?",navigationKey:"conversations",element:v.jsxDEV(V_,{children:v.jsxDEV(Jdr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:111,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:110,columnNumber:4},void 0),icon:v.jsxDEV(a$e,{className:"app_shell-icon-blue_green p-2 rounded",id:"conversationsTourButton","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:115,columnNumber:4},void 0),type:"default",label:{id:"app_shell.project.menu.conversations.label",defaultMessage:"Conversations"},projectTypes:["chatbot","aiForm"]},{type:"divider",className:"!my-4"},{path:"training",navigationKey:"training",element:v.jsxDEV(V_,{children:v.jsxDEV(LDr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:130,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:129,columnNumber:4},void 0),icon:v.jsxDEV(qhe,{className:"app_shell-icon-blue p-2 rounded",id:"trainingTourButton","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:133,columnNumber:9},void 0),type:"default",label:{id:"app_shell.project.menu.training_data.label",defaultMessage:"Training data"},projectTypes:["chatbot","aiForm"]},{path:"form-config",navigationKey:"form-config",element:v.jsxDEV(V_,{className:"p-0",children:v.jsxDEV(m1r,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:146,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:145,columnNumber:4},void 0),icon:v.jsxDEV(lie,{className:"app_shell-icon-purple p-2 rounded",id:"formConfigTourButton","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:149,columnNumber:9},void 0),type:"default",label:{id:"app_shell.project.menu.formConfig.label",defaultMessage:"Form config"},projectTypes:["aiForm"]},{path:"agent",navigationKey:"agent",element:v.jsxDEV(V_,{children:v.jsxDEV(Nrr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:162,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:161,columnNumber:4},void 0),icon:v.jsxDEV(lie,{className:"app_shell-icon-purple p-2 rounded",id:"agentTourButton","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:165,columnNumber:9},void 0),type:"default",label:{id:"app_shell.project.menu.prompt_config.label",defaultMessage:"Prompt config"},projectTypes:["chatbot"]},{path:"layout",navigationKey:"layout",element:v.jsxDEV(V_,{className:"p-0",children:v.jsxDEV(qNr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:178,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:177,columnNumber:4},void 0),icon:v.jsxDEV(j2t,{className:"app_shell-icon-dark_rose p-2 rounded",id:"layoutTourButton","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:181,columnNumber:9},void 0),type:"default",label:{id:"app_shell.project.menu.layout.label",defaultMessage:"Layout"},projectTypes:["aiForm","chatbot"]},{type:"divider",className:"!my-4"},{path:"share",navigationKey:"share",element:v.jsxDEV(V_,{children:v.jsxDEV(N1r,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:195,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:194,columnNumber:4},void 0),icon:v.jsxDEV(gAt,{className:"app_shell-icon-orange p-2 rounded",id:"shareTourButton","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:199,columnNumber:4},void 0),type:"default",label:{id:"app_shell.project.menu.share.label",defaultMessage:"Share"},projectTypes:["aiForm"]},{path:"implementation",navigationKey:"implementation",element:v.jsxDEV(V_,{children:v.jsxDEV(b1r,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:217,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:216,columnNumber:4},void 0),icon:v.jsxDEV(O2t,{className:"app_shell-icon-blood_orange p-2 rounded",id:"implementationTourButton","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:221,columnNumber:4},void 0),type:"default",label:{id:"app_shell.project.menu.implementation.label",defaultMessage:"Implementation"},projectTypes:["chatbot","aiForm"]},{path:"settings",navigationKey:"settings",element:v.jsxDEV(V_,{children:v.jsxDEV(Cj,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:239,columnNumber:5},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:238,columnNumber:4},void 0),icon:v.jsxDEV(Xhe,{className:"app_shell-icon-red p-2 rounded",id:"settingsTourButton","aria-hidden":!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:242,columnNumber:9},void 0),type:"default",label:{id:"app_shell.project.menu.project_settings.label",defaultMessage:"Settings"},projectTypes:["chatbot","aiForm"],children:[{path:"general",navigationKey:"general",element:v.jsxDEV(iDr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:253,columnNumber:14},void 0),type:"default",label:{id:"project_settings.menu.general.label",defaultMessage:"General settings"},projectTypes:["chatbot","aiForm"]},{path:"model",navigationKey:"model",element:v.jsxDEV(_Dr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:264,columnNumber:14},void 0),type:"default",label:{id:"project_settings.menu.model.label",defaultMessage:"Model settings"},projectTypes:["chatbot","aiForm"]},{path:"lead-generation",navigationKey:"lead-generation",element:v.jsxDEV(bDr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:275,columnNumber:14},void 0),type:"default",label:{id:"project_settings.menu.lead_generation.label",defaultMessage:"Lead generation"},projectTypes:["chatbot"]},{path:"gdpr",navigationKey:"gdpr",element:v.jsxDEV(ZEr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:286,columnNumber:14},void 0),type:"default",label:{id:"project_settings.menu.gdpr.label",defaultMessage:"GDPR settings"},projectTypes:["chatbot","aiForm"]},{path:"",element:v.jsxDEV(Nie,{to:"/general"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:296,columnNumber:14},void 0),type:"redirect"}]},{type:"redirect",path:"/:projectId",element:v.jsxDEV(Nie,{to:"/dashboard"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:304,columnNumber:12},void 0)}];function SKt({type:t,intl:e,config:n=CKt}){return t?n.reduce((i,r)=>r.type==="redirect"?i:r.type==="divider"?(i.push(r),i):(r.projectTypes.includes(t)&&i.push({key:r.navigationKey,label:e.formatMessage(r.label),icon:r.icon,...r.children&&r.children.length&&{children:SKt({type:t,intl:e,config:r.children})}}),i),[]):[]}function TDr({allowedTypes:t,children:e}){const{projectId:n}=If(),{data:i,isFetching:r}=Je.project.getById.useQuery({projectId:n},{enabled:!!n,staleTime:1/0});return!i&&r?v.jsxDEV(M9t,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:364,columnNumber:37},this):i!=null&&i.projectType&&!t.includes(i.projectType)?v.jsxDEV(Op,{to:"/",replace:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:367,columnNumber:10},this):e}function NKt(t){return t=t??CKt,t.reduce((e,n)=>(n.type==="divider"||(n.type==="redirect"&&e.push(n),n.type==="default"&&e.push({path:n.path,element:v.jsxDEV(TDr,{allowedTypes:n.projectTypes,children:n.element},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/modules/project/config.tsx",lineNumber:387,columnNumber:14},this),...n.children&&n.children.length&&{children:NKt(n.children)}})),e),[])}const IDr=NKt(),ADr=nbn([{path:"/",element:v.jsxDEV(crr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/router.tsx",lineNumber:18,columnNumber:12},void 0),children:[{path:":projectId",element:v.jsxDEV(urr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/router.tsx",lineNumber:22,columnNumber:14},void 0),children:IDr},...xir,{path:"account",element:v.jsxDEV(Cj,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/router.tsx",lineNumber:28,columnNumber:14},void 0),children:[{path:"organizations",element:v.jsxDEV(eot,{children:v.jsxDEV(Eir,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/router.tsx",lineNumber:34,columnNumber:9},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/router.tsx",lineNumber:33,columnNumber:8},void 0)},{path:"reseller",element:v.jsxDEV(eot,{children:v.jsxDEV(lrr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/router.tsx",lineNumber:42,columnNumber:9},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/router.tsx",lineNumber:41,columnNumber:8},void 0)},{path:"/account",element:v.jsxDEV(Op,{to:"/account/organizations",replace:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/router.tsx",lineNumber:48,columnNumber:16},void 0)}]},{path:"/",element:v.jsxDEV(Op,{to:"/projects",replace:!0},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/router.tsx",lineNumber:54,columnNumber:14},void 0)}]},{path:"/billing_completed",element:v.jsxDEV(wir,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/router.tsx",lineNumber:60,columnNumber:12},void 0)},{path:"/login",element:v.jsxDEV(Tai,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/router.tsx",lineNumber:64,columnNumber:12},void 0)},{path:"/sign_up",element:v.jsxDEV(Cj,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/router.tsx",lineNumber:68,columnNumber:12},void 0),children:yrr},{path:"/invite",element:v.jsxDEV(vrr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/router.tsx",lineNumber:73,columnNumber:12},void 0)},{path:"/preview",element:v.jsxDEV(_rr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/router.tsx",lineNumber:77,columnNumber:12},void 0)},{path:"/pricing-table",element:v.jsxDEV(Dir,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/router.tsx",lineNumber:82,columnNumber:12},void 0)}]);function lyt(){const t=Mt();return v.jsxDEV(fd,{icon:v.jsxDEV(BS,{src:"/img/svg/global_error.svg",preview:!1,className:"mb-4",style:{height:"25vh"}},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/globalError.tsx",lineNumber:10,columnNumber:5},this),title:t.formatMessage({id:"component.global_error.title",defaultMessage:"We're sorry, but we cannot find what you are looking for.",description:"Website crashed on root level. probably because wrong url was provided"}),subTitle:t.formatMessage({id:"component.global_error.description",defaultMessage:"It seems like the page you are looking for cannot be found.",description:"Website crashed on root level. probably because wrong url was provided. Show error with explanation and fallback image"}),extra:v.jsxDEV(vn,{href:"/",type:"primary",children:v.jsxDEV(ee,{id:"component.global_error.button",defaultMessage:"Go to dashboard",description:"button on error message to return user to dashboard"},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/globalError.tsx",lineNumber:26,columnNumber:6},this)},"backButton",!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/globalError.tsx",lineNumber:25,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/shared/components/globalError.tsx",lineNumber:8,columnNumber:3},this)}const RDr={primaryColor:"primary",cursorType:"pointer",autoContrast:!0,scale:1,colors:{primary:["#5445ff","#5445ff","#5445ff","#5445ff","#5445ff","#5445ff","#5445ff","#5445ff","#5445ff","#5445ff"]},defaultRadius:"md",fontSizes:{},radius:{xs:"2px",sm:"4px",md:"6px",lg:"8px",xl:"10px"},components:{button:{styles:{inner:{fontSize:"14px",height:"32px"}}},Input:{defaultProps:{inputWrapperOrder:["label","input","description","error"]}},InputWrapper:{defaultProps:{inputWrapperOrder:["label","input","description","error"]}},TextInput:{defaultProps:{inputWrapperOrder:["label","input","description","error"]}},MultiSelect:{defaultProps:{inputWrapperOrder:["label","input","description","error"]}},Textarea:{defaultProps:{inputWrapperOrder:["label","input","description","error"]}}}},PDr=hSt(sde,RDr),ODr={},jDr={nl:ODr};function FDr(){const t=b.useMemo(()=>new oRn,[]),e=b.useMemo(()=>Je.createClient({transformer:HS,links:[CRn({condition(n){return n.type==="subscription"},true:WRn({client:HRn({url:"wss://api.chathive.app/trpc"})}),false:BRn({url:"https://api.chathive.app/trpc",headers(){return{authorization:localStorage.getItem("TOKEN")||"",projectId:localStorage.getItem("projectId")||"",organizationId:localStorage.getItem("organizationId")||""}}})})]}),[]);return v.jsxDEV(_ii,{locale:"en-BE",messages:jDr.en,onError:()=>{},children:v.jsxDEV(Kv,{locale:eni,theme:{token:{colorPrimary:yd,colorText:ori},components:{Layout:{headerHeight:48}}},children:v.jsxDEV(B1n,{hashPriority:"high",children:v.jsxDEV(Je.Provider,{client:e,queryClient:t,children:v.jsxDEV(gSt,{theme:PDr,children:v.jsxDEV(oAn,{children:[v.jsxDEV(OS,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/App.tsx",lineNumber:78,columnNumber:9},this),v.jsxDEV(dRn,{client:t,contextSharing:!0,children:v.jsxDEV(kwt,{fallback:lyt,dialogOptions:{colorScheme:"light",themeLight:{submitBackground:yd,submitBackgroundHover:dfe}},children:v.jsxDEV(cbn,{router:ADr,fallbackElement:v.jsxDEV(lyt,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/App.tsx",lineNumber:90,columnNumber:60},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/App.tsx",lineNumber:90,columnNumber:11},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/App.tsx",lineNumber:80,columnNumber:10},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/App.tsx",lineNumber:79,columnNumber:9},this)]},void 0,!0,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/App.tsx",lineNumber:77,columnNumber:8},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/App.tsx",lineNumber:76,columnNumber:7},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/App.tsx",lineNumber:75,columnNumber:6},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/App.tsx",lineNumber:74,columnNumber:5},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/App.tsx",lineNumber:58,columnNumber:4},this)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/App.tsx",lineNumber:57,columnNumber:3},this)}/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.51.0(67d664a32968e19e2eb08b696a92463804182ae4)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/var $Dr=Object.defineProperty,VDr=Object.getOwnPropertyDescriptor,BDr=Object.getOwnPropertyNames,zDr=Object.prototype.hasOwnProperty,HDr=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of BDr(e))!zDr.call(t,r)&&r!==n&&$Dr(t,r,{get:()=>e[r],enumerable:!(i=VDr(e,r))||i.enumerable});return t},WDr=(t,e,n)=>(HDr(t,e,"default"),n),c9={};WDr(c9,Hq);var EKt={},OSe={},UDr=class DKt{static getOrCreate(e){return OSe[e]||(OSe[e]=new DKt(e)),OSe[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((n,i)=>{this._lazyLoadPromiseResolve=n,this._lazyLoadPromiseReject=i})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,EKt[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function ti(t){const e=t.id;EKt[e]=t,c9.languages.register(t);const n=UDr.getOrCreate(e);c9.languages.registerTokensProviderFactory(e,{create:async()=>(await n.load()).language}),c9.languages.onLanguageEncountered(e,async()=>{const i=await n.load();c9.languages.setLanguageConfiguration(e,i.conf)})}ti({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Gn(()=>import("./abap-Eabmoog9.js"),[])});ti({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Gn(()=>import("./apex-Ez0JDXSX.js"),[])});ti({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Gn(()=>import("./azcli-Bi9XleDY.js"),[])});ti({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Gn(()=>import("./bat-BJPgnU1o.js"),[])});ti({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Gn(()=>import("./bicep-vwS0ert2.js"),[])});ti({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Gn(()=>import("./cameligo-CXYPKBQm.js"),[])});ti({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Gn(()=>import("./clojure-NTZ-Mawc.js"),[])});ti({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Gn(()=>import("./coffee-CHEFzUZr.js"),[])});ti({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Gn(()=>import("./cpp-Bodl3iQ3.js"),[])});ti({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Gn(()=>import("./cpp-Bodl3iQ3.js"),[])});ti({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Gn(()=>import("./csharp-BoYrPezm.js"),[])});ti({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>Gn(()=>import("./csp-XzjzQJAS.js"),[])});ti({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Gn(()=>import("./css-hbxtHnI2.js"),[])});ti({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>Gn(()=>import("./cypher-Eb8BKSyM.js"),[])});ti({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Gn(()=>import("./dart-CV487FuO.js"),[])});ti({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Gn(()=>import("./dockerfile-C0Dutnxx.js"),[])});ti({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Gn(()=>import("./ecl-D3uAxEKv.js"),[])});ti({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Gn(()=>import("./elixir-WIgQSLfV.js"),[])});ti({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Gn(()=>import("./flow9-D1jgRr-A.js"),[])});ti({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Gn(()=>import("./fsharp-BiRIo-8D.js"),[])});ti({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Gn(()=>import("./freemarker2-Bpnx0TIG.js"),[]).then(t=>t.TagAutoInterpolationDollar)});ti({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Gn(()=>import("./freemarker2-Bpnx0TIG.js"),[]).then(t=>t.TagAngleInterpolationDollar)});ti({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Gn(()=>import("./freemarker2-Bpnx0TIG.js"),[]).then(t=>t.TagBracketInterpolationDollar)});ti({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Gn(()=>import("./freemarker2-Bpnx0TIG.js"),[]).then(t=>t.TagAngleInterpolationBracket)});ti({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Gn(()=>import("./freemarker2-Bpnx0TIG.js"),[]).then(t=>t.TagBracketInterpolationBracket)});ti({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Gn(()=>import("./freemarker2-Bpnx0TIG.js"),[]).then(t=>t.TagAutoInterpolationDollar)});ti({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Gn(()=>import("./freemarker2-Bpnx0TIG.js"),[]).then(t=>t.TagAutoInterpolationBracket)});ti({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Gn(()=>import("./go-CmhYPhRB.js"),[])});ti({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Gn(()=>import("./graphql-laPwGhyz.js"),[])});ti({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Gn(()=>import("./handlebars-Bjdmki__.js"),[])});ti({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Gn(()=>import("./hcl-CGaAZJA8.js"),[])});ti({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>Gn(()=>import("./html-CVYhlRxn.js"),[])});ti({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Gn(()=>import("./ini-ClmXsJR7.js"),[])});ti({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Gn(()=>import("./java-uHnaXnbE.js"),[])});ti({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Gn(()=>import("./javascript-DSjyp_zn.js"),__vite__mapDeps([0,1]))});ti({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Gn(()=>import("./julia-CMmaBfsx.js"),[])});ti({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Gn(()=>import("./kotlin-DH3fENGA.js"),[])});ti({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Gn(()=>import("./less-DxhxX0Da.js"),[])});ti({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Gn(()=>import("./lexon-DBQeiiee.js"),[])});ti({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Gn(()=>import("./lua-DWEneg7V.js"),[])});ti({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Gn(()=>import("./liquid-CvjCHQ-D.js"),[])});ti({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Gn(()=>import("./m3-CHjEtyCi.js"),[])});ti({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Gn(()=>import("./markdown-Cjb4pde9.js"),[])});ti({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>Gn(()=>import("./mdx-CYbJjTOd.js"),[])});ti({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Gn(()=>import("./mips-BIdf2MOo.js"),[])});ti({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Gn(()=>import("./msdax-BvDQVcnM.js"),[])});ti({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Gn(()=>import("./mysql-C-Zrxrp8.js"),[])});ti({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Gn(()=>import("./objective-c-B-IX7nM8.js"),[])});ti({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Gn(()=>import("./pascal-C7id5dyp.js"),[])});ti({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Gn(()=>import("./pascaligo-BEcOARY1.js"),[])});ti({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>Gn(()=>import("./perl-B25rIk19.js"),[])});ti({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Gn(()=>import("./pgsql-BHMcANUI.js"),[])});ti({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Gn(()=>import("./php-CpI7q9LZ.js"),[])});ti({id:"pla",extensions:[".pla"],loader:()=>Gn(()=>import("./pla-BN_lO8dm.js"),[])});ti({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Gn(()=>import("./postiats-BbK-V0zf.js"),[])});ti({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Gn(()=>import("./powerquery-Cg24Gwdc.js"),[])});ti({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Gn(()=>import("./powershell-DJq46Tdb.js"),[])});ti({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Gn(()=>import("./protobuf-DG0dXYmt.js"),[])});ti({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Gn(()=>import("./pug-Hz3N6TBI.js"),[])});ti({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Gn(()=>import("./python-CocV7d2O.js"),[])});ti({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Gn(()=>import("./qsharp-DX7Fbopp.js"),[])});ti({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Gn(()=>import("./r-ZH9bZPmh.js"),[])});ti({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Gn(()=>import("./razor-5uy6Vd01.js"),[])});ti({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Gn(()=>import("./redis-BzH2yteE.js"),[])});ti({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Gn(()=>import("./redshift-BdbUb2oA.js"),[])});ti({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Gn(()=>import("./restructuredtext-C-XjBKLO.js"),[])});ti({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Gn(()=>import("./ruby-BY6GPUMu.js"),[])});ti({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Gn(()=>import("./rust-Dk88Kuwl.js"),[])});ti({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Gn(()=>import("./sb-CJsDWwZ1.js"),[])});ti({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>Gn(()=>import("./scala-Cutn977k.js"),[])});ti({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Gn(()=>import("./scheme-C2o8sVvg.js"),[])});ti({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Gn(()=>import("./scss-GQ2hWI41.js"),[])});ti({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Gn(()=>import("./shell-CwYKbXgk.js"),[])});ti({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Gn(()=>import("./solidity-B-RLSu2_.js"),[])});ti({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Gn(()=>import("./sophia-DMkVlZ1z.js"),[])});ti({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Gn(()=>import("./sparql-CYX1qyox.js"),[])});ti({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Gn(()=>import("./sql-G53RBTtP.js"),[])});ti({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>Gn(()=>import("./st-BEFsT6Ln.js"),[])});ti({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Gn(()=>import("./swift-CbItaH_y.js"),[])});ti({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Gn(()=>import("./systemverilog-BPNb0oFX.js"),[])});ti({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Gn(()=>import("./systemverilog-BPNb0oFX.js"),[])});ti({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Gn(()=>import("./tcl-cgcBmvtN.js"),[])});ti({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Gn(()=>import("./twig-bK5nZLn5.js"),[])});ti({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Gn(()=>import("./typescript-CQXWgW2t.js"),[])});ti({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>Gn(()=>import("./typespec-Cd6NKU2I.js"),[])});ti({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Gn(()=>import("./vb-Dy9sNJC_.js"),[])});ti({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>Gn(()=>import("./wgsl-BV5hR_Tl.js"),[])});ti({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>Gn(()=>import("./xml-CyITHV0V.js"),[])});ti({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Gn(()=>import("./yaml-DAoMaJ3U.js"),[])});/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.51.0(67d664a32968e19e2eb08b696a92463804182ae4)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/var KDr=Object.defineProperty,qDr=Object.getOwnPropertyDescriptor,GDr=Object.getOwnPropertyNames,YDr=Object.prototype.hasOwnProperty,XDr=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of GDr(e))!YDr.call(t,r)&&r!==n&&KDr(t,r,{get:()=>e[r],enumerable:!(i=qDr(e,r))||i.enumerable});return t},ZDr=(t,e,n)=>(XDr(t,e,"default"),n),E$={};ZDr(E$,Hq);var GHe=class{constructor(e,n,i){this._onDidChange=new E$.Emitter,this._languageId=e,this.setOptions(n),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},YHe={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},XHe={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},kKt=new GHe("css",YHe,XHe),MKt=new GHe("scss",YHe,XHe),LKt=new GHe("less",YHe,XHe);E$.languages.css={cssDefaults:kKt,lessDefaults:LKt,scssDefaults:MKt};function ZHe(){return Gn(()=>import("./cssMode-CGA2njBh.js"),[])}E$.languages.onLanguage("less",()=>{ZHe().then(t=>t.setupMode(LKt))});E$.languages.onLanguage("scss",()=>{ZHe().then(t=>t.setupMode(MKt))});E$.languages.onLanguage("css",()=>{ZHe().then(t=>t.setupMode(kKt))});/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.51.0(67d664a32968e19e2eb08b696a92463804182ae4)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/var QDr=Object.defineProperty,JDr=Object.getOwnPropertyDescriptor,ekr=Object.getOwnPropertyNames,tkr=Object.prototype.hasOwnProperty,nkr=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ekr(e))!tkr.call(t,r)&&r!==n&&QDr(t,r,{get:()=>e[r],enumerable:!(i=JDr(e,r))||i.enumerable});return t},ikr=(t,e,n)=>(nkr(t,e,"default"),n),bge={};ikr(bge,Hq);var rkr=class{constructor(e,n,i){this._onDidChange=new bge.Emitter,this._languageId=e,this.setOptions(n),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},okr={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},vge={format:okr,suggest:{},data:{useDefaultDataProvider:!0}};function yge(t){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:t===jB,documentFormattingEdits:t===jB,documentRangeFormattingEdits:t===jB}}var jB="html",cyt="handlebars",uyt="razor",TKt=_ge(jB,vge,yge(jB)),skr=TKt.defaults,IKt=_ge(cyt,vge,yge(cyt)),akr=IKt.defaults,AKt=_ge(uyt,vge,yge(uyt)),lkr=AKt.defaults;bge.languages.html={htmlDefaults:skr,razorDefaults:lkr,handlebarDefaults:akr,htmlLanguageService:TKt,handlebarLanguageService:IKt,razorLanguageService:AKt,registerHTMLLanguageService:_ge};function ckr(){return Gn(()=>import("./htmlMode-CN8-I5_b.js"),[])}function _ge(t,e=vge,n=yge(t)){const i=new rkr(t,e,n);let r;const o=bge.languages.onLanguage(t,async()=>{r=(await ckr()).setupMode(i)});return{defaults:i,dispose(){o.dispose(),r==null||r.dispose(),r=void 0}}}/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.51.0(67d664a32968e19e2eb08b696a92463804182ae4)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/var ukr=Object.defineProperty,dkr=Object.getOwnPropertyDescriptor,hkr=Object.getOwnPropertyNames,fkr=Object.prototype.hasOwnProperty,mkr=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of hkr(e))!fkr.call(t,r)&&r!==n&&ukr(t,r,{get:()=>e[r],enumerable:!(i=dkr(e,r))||i.enumerable});return t},pkr=(t,e,n)=>(mkr(t,e,"default"),n),DG={};pkr(DG,Hq);var gkr=class{constructor(e,n,i){this._onDidChange=new DG.Emitter,this._languageId=e,this.setDiagnosticsOptions(n),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},bkr={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},vkr={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},RKt=new gkr("json",bkr,vkr),ykr=()=>PKt().then(t=>t.getWorker());DG.languages.json={jsonDefaults:RKt,getWorker:ykr};function PKt(){return Gn(()=>import("./jsonMode-B2GS9t8t.js"),[])}DG.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});DG.languages.onLanguage("json",()=>{PKt().then(t=>t.setupMode(RKt))});/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.51.0(67d664a32968e19e2eb08b696a92463804182ae4)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/var _kr=Object.defineProperty,xkr=Object.getOwnPropertyDescriptor,wkr=Object.getOwnPropertyNames,Ckr=Object.prototype.hasOwnProperty,Skr=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of wkr(e))!Ckr.call(t,r)&&r!==n&&_kr(t,r,{get:()=>e[r],enumerable:!(i=xkr(e,r))||i.enumerable});return t},Nkr=(t,e,n)=>(Skr(t,e,"default"),n),Ekr="5.4.5",lF={};Nkr(lF,Hq);var OKt=(t=>(t[t.None=0]="None",t[t.CommonJS=1]="CommonJS",t[t.AMD=2]="AMD",t[t.UMD=3]="UMD",t[t.System=4]="System",t[t.ES2015=5]="ES2015",t[t.ESNext=99]="ESNext",t))(OKt||{}),jKt=(t=>(t[t.None=0]="None",t[t.Preserve=1]="Preserve",t[t.React=2]="React",t[t.ReactNative=3]="ReactNative",t[t.ReactJSX=4]="ReactJSX",t[t.ReactJSXDev=5]="ReactJSXDev",t))(jKt||{}),FKt=(t=>(t[t.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",t[t.LineFeed=1]="LineFeed",t))(FKt||{}),$Kt=(t=>(t[t.ES3=0]="ES3",t[t.ES5=1]="ES5",t[t.ES2015=2]="ES2015",t[t.ES2016=3]="ES2016",t[t.ES2017=4]="ES2017",t[t.ES2018=5]="ES2018",t[t.ES2019=6]="ES2019",t[t.ES2020=7]="ES2020",t[t.ESNext=99]="ESNext",t[t.JSON=100]="JSON",t[t.Latest=99]="Latest",t))($Kt||{}),VKt=(t=>(t[t.Classic=1]="Classic",t[t.NodeJs=2]="NodeJs",t))(VKt||{}),BKt=class{constructor(t,e,n,i,r){this._onDidChange=new lF.Emitter,this._onDidExtraLibsChange=new lF.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(t),this.setDiagnosticsOptions(e),this.setWorkerOptions(n),this.setInlayHintsOptions(i),this.setModeConfiguration(r),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(t,e){let n;if(typeof e>"u"?n=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:n=e,this._extraLibs[n]&&this._extraLibs[n].content===t)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[n]&&(i=this._removedExtraLibs[n]+1),this._extraLibs[n]&&(i=this._extraLibs[n].version+1),this._extraLibs[n]={content:t,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let r=this._extraLibs[n];r&&r.version===i&&(delete this._extraLibs[n],this._removedExtraLibs[n]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(t){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),t&&t.length>0)for(const e of t){const n=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let r=1;this._removedExtraLibs[n]&&(r=this._removedExtraLibs[n]+1),this._extraLibs[n]={content:i,version:r}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(t){this._compilerOptions=t||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(t){this._diagnosticsOptions=t||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(t){this._workerOptions=t||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(t){this._inlayHintsOptions=t||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(t){}setEagerModelSync(t){this._eagerModelSync=t}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(t){this._modeConfiguration=t||Object.create(null),this._onDidChange.fire(void 0)}},Dkr=Ekr,zKt={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},HKt=new BKt({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},zKt),WKt=new BKt({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},zKt),kkr=()=>xge().then(t=>t.getTypeScriptWorker()),Mkr=()=>xge().then(t=>t.getJavaScriptWorker());lF.languages.typescript={ModuleKind:OKt,JsxEmit:jKt,NewLineKind:FKt,ScriptTarget:$Kt,ModuleResolutionKind:VKt,typescriptVersion:Dkr,typescriptDefaults:HKt,javascriptDefaults:WKt,getTypeScriptWorker:kkr,getJavaScriptWorker:Mkr};function xge(){return Gn(()=>import("./tsMode-CI2GNegA.js"),[])}lF.languages.onLanguage("typescript",()=>xge().then(t=>t.setupTypeScript(HKt)));lF.languages.onLanguage("javascript",()=>xge().then(t=>t.setupJavaScript(WKt)));class Lkr extends qh{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:Ci("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:qt.map,toggled:Tt.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:Tt.has("isInDiffEditor"),menu:{when:Tt.has("isInDiffEditor"),id:Rn.EditorTitle,order:22,group:"navigation"}})}run(e,...n){const i=e.get(cr),r=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",r)}}class UKt extends qh{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:Ci("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:Tt.has("isInDiffEditor")})}run(e,...n){const i=e.get(cr),r=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",r)}}class KKt extends qh{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:Ci("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:Tt.has("isInDiffEditor")})}run(e,...n){const i=e.get(cr),r=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",r)}}const kG=Ci("diffEditor","Diff Editor");class Tkr extends c_{constructor(){super({id:"diffEditor.switchSide",title:Ci("switchSide","Switch Side"),icon:qt.arrowSwap,precondition:Tt.has("isInDiffEditor"),f1:!0,category:kG})}runEditorCommand(e,n,i){const r=D$(e);if(r instanceof bS){if(i&&i.dryRun)return{destinationSelection:r.mapToOtherSide().destinationSelection};r.switchSide()}}}class Ikr extends c_{constructor(){super({id:"diffEditor.exitCompareMove",title:Ci("exitCompareMove","Exit Compare Move"),icon:qt.close,precondition:Re.comparingMovedCode,f1:!1,category:kG,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,n,...i){const r=D$(e);r instanceof bS&&r.exitCompareMove()}}class Akr extends c_{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:Ci("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:qt.fold,precondition:Tt.has("isInDiffEditor"),f1:!0,category:kG})}runEditorCommand(e,n,...i){const r=D$(e);r instanceof bS&&r.collapseAllUnchangedRegions()}}class Rkr extends c_{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:Ci("showAllUnchangedRegions","Show All Unchanged Regions"),icon:qt.unfold,precondition:Tt.has("isInDiffEditor"),f1:!0,category:kG})}runEditorCommand(e,n,...i){const r=D$(e);r instanceof bS&&r.showAllUnchangedRegions()}}class zPe extends qh{constructor(){super({id:"diffEditor.revert",title:Ci("revert","Revert"),f1:!1,category:kG})}run(e,n){const i=Pkr(e,n.originalUri,n.modifiedUri);i instanceof bS&&i.revertRangeMappings(n.mapping.innerChanges??[])}}const qKt=Ci("accessibleDiffViewer","Accessible Diff Viewer"),yce=class yce extends qh{constructor(){super({id:yce.id,title:Ci("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:qKt,precondition:Tt.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const n=D$(e);n==null||n.accessibleDiffViewerNext()}};yce.id="editor.action.accessibleDiffViewer.next";let MU=yce;const _ce=class _ce extends qh{constructor(){super({id:_ce.id,title:Ci("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:qKt,precondition:Tt.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const n=D$(e);n==null||n.accessibleDiffViewerPrev()}};_ce.id="editor.action.accessibleDiffViewer.prev";let Eae=_ce;function Pkr(t,e,n){return t.get(Yr).listDiffEditors().find(o=>{var l,c;const s=o.getModifiedEditor(),a=o.getOriginalEditor();return s&&((l=s.getModel())==null?void 0:l.uri.toString())===n.toString()&&a&&((c=a.getModel())==null?void 0:c.uri.toString())===e.toString()})||null}function D$(t){const n=t.get(Yr).listDiffEditors(),i=Au();if(i)for(const r of n){const o=r.getContainerDomNode();if(Okr(o,i))return r}return null}function Okr(t,e){let n=e;for(;n;){if(n===t)return!0;n=n.parentElement}return!1}cs(Lkr);cs(UKt);cs(KKt);Oc.appendMenuItem(Rn.EditorTitle,{command:{id:new KKt().desc.id,title:I("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:Tt.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:Tt.has("isInDiffEditor")},order:11,group:"1_diff",when:Tt.and(Re.diffEditorRenderSideBySideInlineBreakpointReached,Tt.has("isInDiffEditor"))});Oc.appendMenuItem(Rn.EditorTitle,{command:{id:new UKt().desc.id,title:I("showMoves","Show Moved Code Blocks"),icon:qt.move,toggled:L6.create("config.diffEditor.experimental.showMoves",!0),precondition:Tt.has("isInDiffEditor")},order:10,group:"1_diff",when:Tt.has("isInDiffEditor")});cs(zPe);for(const t of[{icon:qt.arrowRight,key:Re.diffEditorInlineMode.toNegated()},{icon:qt.discard,key:Re.diffEditorInlineMode}])Oc.appendMenuItem(Rn.DiffEditorHunkToolbar,{command:{id:new zPe().desc.id,title:I("revertHunk","Revert Block"),icon:t.icon},when:Tt.and(Re.diffEditorModifiedWritable,t.key),order:5,group:"primary"}),Oc.appendMenuItem(Rn.DiffEditorSelectionToolbar,{command:{id:new zPe().desc.id,title:I("revertSelection","Revert Selection"),icon:t.icon},when:Tt.and(Re.diffEditorModifiedWritable,t.key),order:5,group:"primary"});cs(Tkr);cs(Ikr);cs(Akr);cs(Rkr);Oc.appendMenuItem(Rn.EditorTitle,{command:{id:MU.id,title:I("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:Tt.has("isInDiffEditor")},order:10,group:"2_diff",when:Tt.and(Re.accessibleDiffViewerVisible.negate(),Tt.has("isInDiffEditor"))});Ar.registerCommandAlias("editor.action.diffReview.next",MU.id);cs(MU);Ar.registerCommandAlias("editor.action.diffReview.prev",Eae.id);cs(Eae);var jkr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Fkr=function(t,e){return function(n,i){e(n,i,t)}},HPe;const wge=new gn("selectionAnchorSet",!1);var PI;let Tk=(PI=class{static get(e){return e.getContribution(HPe.ID)}constructor(e,n){this.editor=e,this.selectionAnchorSetContextKey=wge.bindTo(n),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(n=>{this.decorationId&&n.removeDecoration(this.decorationId),this.decorationId=n.addDecoration(Pn.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new rd().appendText(I("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Am(I("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const n=this.editor.getPosition();this.editor.setSelection(Pn.fromPositions(e.getStartPosition(),n)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(n=>{n.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}},HPe=PI,PI.ID="editor.contrib.selectionAnchorController",PI);Tk=HPe=jkr([Fkr(1,vi)],Tk);class $kr extends En{constructor(){super({id:"editor.action.setSelectionAnchor",label:I("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2080),weight:100}})}async run(e,n){var i;(i=Tk.get(n))==null||i.setSelectionAnchor()}}class Vkr extends En{constructor(){super({id:"editor.action.goToSelectionAnchor",label:I("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:wge})}async run(e,n){var i;(i=Tk.get(n))==null||i.goToSelectionAnchor()}}class Bkr extends En{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:I("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:wge,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2089),weight:100}})}async run(e,n){var i;(i=Tk.get(n))==null||i.selectFromAnchorToCursor()}}class zkr extends En{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:I("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:wge,kbOpts:{kbExpr:Re.editorTextFocus,primary:9,weight:100}})}async run(e,n){var i;(i=Tk.get(n))==null||i.cancelSelectionAnchor()}}Wr(Tk.ID,Tk,4);Ht($kr);Ht(Vkr);Ht(Bkr);Ht(zkr);const Hkr=Fe("editorOverviewRuler.bracketMatchForeground","#A0A0A0",I("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class Wkr extends En{constructor(){super({id:"editor.action.jumpToBracket",label:I("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:Re.editorTextFocus,primary:3165,weight:100}})}run(e,n){var i;(i=hA.get(n))==null||i.jumpToBracket()}}class Ukr extends En{constructor(){super({id:"editor.action.selectToBracket",label:I("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:Ci("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,n,i){var o;let r=!0;i&&i.selectBrackets===!1&&(r=!1),(o=hA.get(n))==null||o.selectToBracket(r)}}class Kkr extends En{constructor(){super({id:"editor.action.removeBrackets",label:I("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:Re.editorTextFocus,primary:2561,weight:100}})}run(e,n){var i;(i=hA.get(n))==null||i.removeBrackets(this.id)}}class qkr{constructor(e,n,i){this.position=e,this.brackets=n,this.options=i}}const pE=class pE extends ct{static get(e){return e.getContribution(pE.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Wo(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(72),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(n=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(n=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(n=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(n=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(n=>{n.hasChanged(72)&&(this._matchBrackets=this._editor.getOption(72),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),n=this._editor.getSelections().map(i=>{const r=i.getStartPosition(),o=e.bracketPairs.matchBracket(r);let s=null;if(o)o[0].containsPosition(r)&&!o[1].containsPosition(r)?s=o[1].getStartPosition():o[1].containsPosition(r)&&(s=o[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(r);if(a)s=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(r);l&&l.range&&(s=l.range.getStartPosition())}}return s?new Pn(s.lineNumber,s.column,s.lineNumber,s.column):new Pn(r.lineNumber,r.column,r.lineNumber,r.column)});this._editor.setSelections(n),this._editor.revealRange(n[0])}selectToBracket(e){if(!this._editor.hasModel())return;const n=this._editor.getModel(),i=[];this._editor.getSelections().forEach(r=>{const o=r.getStartPosition();let s=n.bracketPairs.matchBracket(o);if(!s&&(s=n.bracketPairs.findEnclosingBrackets(o),!s)){const c=n.bracketPairs.findNextBracket(o);c&&c.range&&(s=n.bracketPairs.matchBracket(c.range.getStartPosition()))}let a=null,l=null;if(s){s.sort(ve.compareRangesUsingStarts);const[c,u]=s;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?u.getEndPosition():u.getStartPosition(),u.containsPosition(o)){const d=a;a=l,l=d}}a&&l&&i.push(new Pn(a.lineNumber,a.column,l.lineNumber,l.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const n=this._editor.getModel();this._editor.getSelections().forEach(i=>{const r=i.getPosition();let o=n.bracketPairs.matchBracket(r);o||(o=n.bracketPairs.findEnclosingBrackets(r)),o&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:o[0],text:""},{range:o[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let n=0;for(const i of this._lastBracketsData){const r=i.brackets;r&&(e[n++]={range:r[0],options:i.options},e[n++]={range:r[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const n=this._editor.getModel(),i=n.getVersionId();let r=[];this._lastVersionId===i&&(r=this._lastBracketsData);const o=[];let s=0;for(let d=0,h=e.length;d<h;d++){const f=e[d];f.isEmpty()&&(o[s++]=f.getStartPosition())}o.length>1&&o.sort(ot.compare);const a=[];let l=0,c=0;const u=r.length;for(let d=0,h=o.length;d<h;d++){const f=o[d];for(;c<u&&r[c].position.isBefore(f);)c++;if(c<u&&r[c].position.equals(f))a[l++]=r[c];else{let m=n.bracketPairs.matchBracket(f,20),p=pE._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!m&&this._matchBrackets==="always"&&(m=n.bracketPairs.findEnclosingBrackets(f,20),p=pE._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new qkr(f,m,p)}}this._lastBracketsData=a,this._lastVersionId=i}};pE.ID="editor.contrib.bracketMatchingController",pE._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=Hi.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:Sa(Hkr),position:Tp.Center}}),pE._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=Hi.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});let hA=pE;Wr(hA.ID,hA,1);Ht(Ukr);Ht(Wkr);Ht(Kkr);Oc.appendMenuItem(Rn.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:I({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class Gkr{constructor(e,n){this._selection=e,this._isMovingLeft=n}getEditOperations(e,n){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,r=this._selection.startColumn,o=this._selection.endColumn;if(!(this._isMovingLeft&&r===1)&&!(!this._isMovingLeft&&o===e.getLineMaxColumn(i)))if(this._isMovingLeft){const s=new ve(i,r-1,i,r),a=e.getValueInRange(s);n.addEditOperation(s,null),n.addEditOperation(new ve(i,o,i,o),a)}else{const s=new ve(i,o,i,o+1),a=e.getValueInRange(s);n.addEditOperation(s,null),n.addEditOperation(new ve(i,r,i,r),a)}}computeCursorState(e,n){return this._isMovingLeft?new Pn(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new Pn(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class GKt extends En{constructor(e,n){super(n),this.left=e}run(e,n){if(!n.hasModel())return;const i=[],r=n.getSelections();for(const o of r)i.push(new Gkr(o,this.left));n.pushUndoStop(),n.executeCommands(this.id,i),n.pushUndoStop()}}class Ykr extends GKt{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:I("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:Re.writable})}}class Xkr extends GKt{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:I("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:Re.writable})}}Ht(Ykr);Ht(Xkr);class Zkr extends En{constructor(){super({id:"editor.action.transposeLetters",label:I("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:Re.writable,kbOpts:{kbExpr:Re.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,n){if(!n.hasModel())return;const i=n.getModel(),r=[],o=n.getSelections();for(const s of o){if(!s.isEmpty())continue;const a=s.startLineNumber,l=s.startColumn,c=i.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&c===2))continue;const u=l===c?s.getPosition():No.rightPosition(i,s.getPosition().lineNumber,s.getPosition().column),d=No.leftPosition(i,u),h=No.leftPosition(i,d),f=i.getValueInRange(ve.fromPositions(h,d)),m=i.getValueInRange(ve.fromPositions(d,u)),p=ve.fromPositions(h,u);r.push(new Su(p,m+f))}r.length>0&&(n.pushUndoStop(),n.executeCommands(this.id,r),n.pushUndoStop())}}Ht(Zkr);const Cge=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let t;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?t=crypto.getRandomValues.bind(crypto):t=function(i){for(let r=0;r<i.length;r++)i[r]=Math.floor(Math.random()*256);return i};const e=new Uint8Array(16),n=[];for(let i=0;i<256;i++)n.push(i.toString(16).padStart(2,"0"));return function(){t(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let r=0,o="";return o+=n[e[r++]],o+=n[e[r++]],o+=n[e[r++]],o+=n[e[r++]],o+="-",o+=n[e[r++]],o+=n[e[r++]],o+="-",o+=n[e[r++]],o+=n[e[r++]],o+="-",o+=n[e[r++]],o+=n[e[r++]],o+="-",o+=n[e[r++]],o+=n[e[r++]],o+=n[e[r++]],o+=n[e[r++]],o+=n[e[r++]],o+=n[e[r++]],o}}();function QHe(t){return{asString:async()=>t,asFile:()=>{},value:typeof t=="string"?t:void 0}}function Qkr(t,e,n){const i={id:Cge(),name:t,uri:e,data:n};return{asString:async()=>"",asFile:()=>i,value:void 0}}class YKt{constructor(){this._entries=new Map}get size(){let e=0;for(const n of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const n=[...this._entries.keys()];return Ir.some(this,([i,r])=>r.asFile())&&n.push("files"),ZKt(Dae(e),n)}get(e){var n;return(n=this._entries.get(this.toKey(e)))==null?void 0:n[0]}append(e,n){const i=this._entries.get(e);i?i.push(n):this._entries.set(this.toKey(e),[n])}replace(e,n){this._entries.set(this.toKey(e),[n])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,n]of this._entries)for(const i of n)yield[e,i]}toKey(e){return Dae(e)}}function Dae(t){return t.toLowerCase()}function XKt(t,e){return ZKt(Dae(t),e.map(Dae))}function ZKt(t,e){if(t==="*/*")return e.length>0;if(e.includes(t))return!0;const n=t.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!n)return!1;const[i,r,o]=n;return o==="*"?e.some(s=>s.startsWith(r+"/")):!1}const Sge=Object.freeze({create:t=>cS(t.map(e=>e.toString())).join(`\r
`),split:t=>t.split(`\r
`),parse:t=>Sge.split(t).filter(e=>!e.startsWith("#"))}),sx=class sx{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+sx.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new sx((this.value?[this.value,...e]:e).join(sx.sep))}};sx.sep=".",sx.None=new sx("@@none@@"),sx.Empty=new sx("");let Ys=sx;const dyt={EDITORS:"CodeEditors",FILES:"CodeFiles"};class Jkr{}const eMr={DragAndDropContribution:"workbench.contributions.dragAndDrop"};la.add(eMr.DragAndDropContribution,new Jkr);const lz=class lz{constructor(){}static getInstance(){return lz.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}};lz.INSTANCE=new lz;let WPe=lz;function QKt(t){const e=new YKt;for(const n of t.items){const i=n.type;if(n.kind==="string"){const r=new Promise(o=>n.getAsString(o));e.append(i,QHe(r))}else if(n.kind==="file"){const r=n.getAsFile();r&&e.append(i,tMr(r))}}return e}function tMr(t){const e=t.path?ri.parse(t.path):void 0;return Qkr(t.name,e,async()=>new Uint8Array(await t.arrayBuffer()))}const nMr=Object.freeze([dyt.EDITORS,dyt.FILES,oW.RESOURCES,oW.INTERNAL_URI_LIST]);function JKt(t,e=!1){const n=QKt(t),i=n.get(oW.INTERNAL_URI_LIST);if(i)n.replace(Pa.uriList,i);else if(e||!n.has(Pa.uriList)){const r=[];for(const o of t.items){const s=o.getAsFile();if(s){const a=s.path;try{a?r.push(ri.file(a).toString()):r.push(ri.parse(s.name,!0).toString())}catch{}}}r.length&&n.replace(Pa.uriList,QHe(Sge.create(r)))}for(const r of nMr)n.delete(r);return n}var JHe=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},LU=function(t,e){return function(n,i){e(n,i,t)}};class eWe{async provideDocumentPasteEdits(e,n,i,r,o){const s=await this.getEdit(i,o);if(s)return{edits:[{insertText:s.insertText,title:s.title,kind:s.kind,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,n,i,r){const o=await this.getEdit(i,r);if(o)return{edits:[{insertText:o.insertText,title:o.title,kind:o.kind,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}],dispose(){}}}}const cz=class cz extends eWe{constructor(){super(...arguments),this.kind=cz.kind,this.dropMimeTypes=[Pa.text],this.pasteMimeTypes=[Pa.text]}async getEdit(e,n){const i=e.get(Pa.text);if(!i||e.has(Pa.uriList))return;const r=await i.asString();return{handledMimeType:Pa.text,title:I("text.label","Insert Plain Text"),insertText:r,kind:this.kind}}};cz.id="text",cz.kind=new Ys("text.plain");let fA=cz;class eqt extends eWe{constructor(){super(...arguments),this.kind=new Ys("uri.absolute"),this.dropMimeTypes=[Pa.uriList],this.pasteMimeTypes=[Pa.uriList]}async getEdit(e,n){const i=await tqt(e);if(!i.length||n.isCancellationRequested)return;let r=0;const o=i.map(({uri:a,originalText:l})=>a.scheme===Ti.file?a.fsPath:(r++,l)).join(" ");let s;return r>0?s=i.length>1?I("defaultDropProvider.uriList.uris","Insert Uris"):I("defaultDropProvider.uriList.uri","Insert Uri"):s=i.length>1?I("defaultDropProvider.uriList.paths","Insert Paths"):I("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:Pa.uriList,insertText:o,title:s,kind:this.kind}}}let kae=class extends eWe{constructor(e){super(),this._workspaceContextService=e,this.kind=new Ys("uri.relative"),this.dropMimeTypes=[Pa.uriList],this.pasteMimeTypes=[Pa.uriList]}async getEdit(e,n){const i=await tqt(e);if(!i.length||n.isCancellationRequested)return;const r=H0(i.map(({uri:o})=>{const s=this._workspaceContextService.getWorkspaceFolder(o);return s?wxi(s.uri,o):void 0}));if(r.length)return{handledMimeType:Pa.uriList,insertText:r.join(" "),title:i.length>1?I("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):I("defaultDropProvider.uriList.relativePath","Insert Relative Path"),kind:this.kind}}};kae=JHe([LU(0,Z2)],kae);class iMr{constructor(){this.kind=new Ys("html"),this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:Pa.text}]}async provideDocumentPasteEdits(e,n,i,r,o){var l;if(r.triggerKind!==_H.PasteAs&&!((l=r.only)!=null&&l.contains(this.kind)))return;const s=i.get("text/html"),a=await(s==null?void 0:s.asString());if(!(!a||o.isCancellationRequested))return{dispose(){},edits:[{insertText:a,yieldTo:this._yieldTo,title:I("pasteHtmlLabel","Insert HTML"),kind:this.kind}]}}}async function tqt(t){const e=t.get(Pa.uriList);if(!e)return[];const n=await e.asString(),i=[];for(const r of Sge.parse(n))try{i.push({uri:ri.parse(r),originalText:r})}catch{}return i}let UPe=class extends ct{constructor(e,n){super(),this._register(e.documentDropEditProvider.register("*",new fA)),this._register(e.documentDropEditProvider.register("*",new eqt)),this._register(e.documentDropEditProvider.register("*",new kae(n)))}};UPe=JHe([LU(0,Ln),LU(1,Z2)],UPe);let KPe=class extends ct{constructor(e,n){super(),this._register(e.documentPasteEditProvider.register("*",new fA)),this._register(e.documentPasteEditProvider.register("*",new eqt)),this._register(e.documentPasteEditProvider.register("*",new kae(n))),this._register(e.documentPasteEditProvider.register("*",new iMr))}};KPe=JHe([LU(0,Ln),LU(1,Z2)],KPe);const qb=class qb{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let n=0,i=this.value.charCodeAt(e),r;if(r=qb._table[i],typeof r=="number")return this.pos+=1,{type:r,pos:e,len:1};if(qb.isDigitCharacter(i)){r=8;do n+=1,i=this.value.charCodeAt(e+n);while(qb.isDigitCharacter(i));return this.pos+=n,{type:r,pos:e,len:n}}if(qb.isVariableCharacter(i)){r=9;do i=this.value.charCodeAt(e+ ++n);while(qb.isVariableCharacter(i)||qb.isDigitCharacter(i));return this.pos+=n,{type:r,pos:e,len:n}}r=10;do n+=1,i=this.value.charCodeAt(e+n);while(!isNaN(i)&&typeof qb._table[i]>"u"&&!qb.isDigitCharacter(i)&&!qb.isVariableCharacter(i));return this.pos+=n,{type:r,pos:e,len:n}}};qb._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};let qPe=qb;class k${constructor(){this._children=[]}appendChild(e){return e instanceof lm&&this._children[this._children.length-1]instanceof lm?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,n){const{parent:i}=e,r=i.children.indexOf(e),o=i.children.slice(0);o.splice(r,1,...n),i._children=o,function s(a,l){for(const c of a)c.parent=l,s(c.children,c)}(n,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof MG)return e;e=e.parent}}toString(){return this.children.reduce((e,n)=>e+n.toString(),"")}len(){return 0}}let lm=class nqt extends k${constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new nqt(this.value)}};class iqt extends k${}class Pg extends iqt{static compareByIndex(e,n){return e.index===n.index?0:e.isFinalTabstop?1:n.isFinalTabstop||e.index<n.index?-1:e.index>n.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof M$?this._children[0]:void 0}clone(){const e=new Pg(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(n=>n.clone()),e}}class M$ extends k${constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof lm&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new M$;return this.options.forEach(e.appendChild,e),e}}class tWe extends k${constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const n=this;let i=!1,r=e.replace(this.regexp,function(){return i=!0,n._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(o=>o instanceof Hy&&!!o.elseValue)&&(r=this._replace([])),r}_replace(e){let n="";for(const i of this._children)if(i instanceof Hy){let r=e[i.index]||"";r=i.resolve(r),n+=r}else n+=i.toString();return n}toString(){return""}clone(){const e=new tWe;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(n=>n.clone()),e}}class Hy extends k${constructor(e,n,i,r){super(),this.index=e,this.shorthandName=n,this.ifValue=i,this.elseValue=r}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const n=e.match(/[a-z0-9]+/gi);return n?n.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){const n=e.match(/[a-z0-9]+/gi);return n?n.map((i,r)=>r===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}clone(){return new Hy(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class TU extends iqt{constructor(e){super(),this.name=e}resolve(e){let n=e.resolve(this);return this.transform&&(n=this.transform.resolve(n||"")),n!==void 0?(this._children=[new lm(n)],!0):!1}clone(){const e=new TU(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(n=>n.clone()),e}}function hyt(t,e){const n=[...t];for(;n.length>0;){const i=n.shift();if(!e(i))break;n.unshift(...i.children)}}class MG extends k${get placeholderInfo(){if(!this._placeholders){const e=[];let n;this.walk(function(i){return i instanceof Pg&&(e.push(i),n=!n||n.index<i.index?i:n),!0}),this._placeholders={all:e,last:n}}return this._placeholders}get placeholders(){const{all:e}=this.placeholderInfo;return e}offset(e){let n=0,i=!1;return this.walk(r=>r===e?(i=!0,!1):(n+=r.len(),!0)),i?n:-1}fullLen(e){let n=0;return hyt([e],i=>(n+=i.len(),!0)),n}enclosingPlaceholders(e){const n=[];let{parent:i}=e;for(;i;)i instanceof Pg&&n.push(i),i=i.parent;return n}resolveVariables(e){return this.walk(n=>(n instanceof TU&&n.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,n){return this._placeholders=void 0,super.replace(e,n)}clone(){const e=new MG;return this._children=this.children.map(n=>n.clone()),e}walk(e){hyt(this.children,e)}}class mA{constructor(){this._scanner=new qPe,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,n,i){const r=new MG;return this.parseFragment(e,r),this.ensureFinalTabstop(r,i??!1,n??!1),r}parseFragment(e,n){const i=n.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(n););const r=new Map,o=[];n.walk(l=>(l instanceof Pg&&(l.isFinalTabstop?r.set(0,void 0):!r.has(l.index)&&l.children.length>0?r.set(l.index,l.children):o.push(l)),!0));const s=(l,c)=>{const u=r.get(l.index);if(!u)return;const d=new Pg(l.index);d.transform=l.transform;for(const h of u){const f=h.clone();d.appendChild(f),f instanceof Pg&&r.has(f.index)&&!c.has(f.index)&&(c.add(f.index),s(f,c),c.delete(f.index))}n.replace(l,[d])},a=new Set;for(const l of o)s(l,a);return n.children.slice(i)}ensureFinalTabstop(e,n,i){(n||i&&e.placeholders.length>0)&&(e.placeholders.find(o=>o.index===0)||e.appendChild(new Pg(0)))}_accept(e,n){if(e===void 0||this._token.type===e){const i=n?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const n=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const r=this._scanner.next();if(r.type!==0&&r.type!==4&&r.type!==5)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(n.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let n;return(n=this._accept(5,!0))?(n=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||n,e.appendChild(new lm(n)),!0):!1}_parseTabstopOrVariableName(e){let n;const i=this._token;return this._accept(0)&&(n=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(n)?new Pg(Number(n)):new TU(n)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let n;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(n=this._accept(8,!0))))return this._backTo(i);const o=new Pg(Number(n));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new lm("${"+n+":")),o.children.forEach(e.appendChild,e),!0}else if(o.index>0&&this._accept(7)){const s=new M$;for(;;){if(this._parseChoiceElement(s)){if(this._accept(2))continue;if(this._accept(7)&&(o.appendChild(s),this._accept(4)))return e.appendChild(o),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(i)}_parseChoiceElement(e){const n=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let r;if((r=this._accept(5,!0))?r=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||r:r=this._accept(void 0,!0),!r)return this._backTo(n),!1;i.push(r)}return i.length===0?(this._backTo(n),!1):(e.appendChild(new lm(i.join(""))),!0)}_parseComplexVariable(e){let n;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(n=this._accept(9,!0))))return this._backTo(i);const o=new TU(n);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new lm("${"+n+":")),o.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(i)}_parseTransform(e){const n=new tWe;let i="",r="";for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(6,!0)||o,i+=o;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(5,!0)||this._accept(6,!0)||o,n.appendChild(new lm(o));continue}if(!(this._parseFormatString(n)||this._parseAnything(n)))return!1}for(;!this._accept(4);){if(this._token.type!==14){r+=this._accept(void 0,!0);continue}return!1}try{n.regexp=new RegExp(i,r)}catch{return!1}return e.transform=n,!0}_parseFormatString(e){const n=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const r=this._accept(8,!0);if(r)if(i){if(this._accept(4))return e.appendChild(new Hy(Number(r))),!0;if(!this._accept(1))return this._backTo(n),!1}else return e.appendChild(new Hy(Number(r))),!0;else return this._backTo(n),!1;if(this._accept(6)){const o=this._accept(9,!0);return!o||!this._accept(4)?(this._backTo(n),!1):(e.appendChild(new Hy(Number(r),o)),!0)}else if(this._accept(11)){const o=this._until(4);if(o)return e.appendChild(new Hy(Number(r),void 0,o,void 0)),!0}else if(this._accept(12)){const o=this._until(4);if(o)return e.appendChild(new Hy(Number(r),void 0,void 0,o)),!0}else if(this._accept(13)){const o=this._until(1);if(o){const s=this._until(4);if(s)return e.appendChild(new Hy(Number(r),void 0,o,s)),!0}}else{const o=this._until(4);if(o)return e.appendChild(new Hy(Number(r),void 0,void 0,o)),!0}return this._backTo(n),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new lm(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}function rqt(t,e,n){var i,r;return(typeof n.insertText=="string"?n.insertText==="":n.insertText.snippet==="")?{edits:((i=n.additionalEdit)==null?void 0:i.edits)??[]}:{edits:[...e.map(o=>new vD(t,{range:o,text:typeof n.insertText=="string"?mA.escape(n.insertText)+"$0":n.insertText.snippet,insertAsSnippet:!0})),...((r=n.additionalEdit)==null?void 0:r.edits)??[]]}}function oqt(t){function e(s,a){return"mimeType"in s?s.mimeType===a.handledMimeType:!!a.kind&&s.kind.contains(a.kind)}const n=new Map;for(const s of t)for(const a of s.yieldTo??[])for(const l of t)if(l!==s&&e(a,l)){let c=n.get(s);c||(c=[],n.set(s,c)),c.push(l)}if(!n.size)return Array.from(t);const i=new Set,r=[];function o(s){if(!s.length)return[];const a=s[0];if(r.includes(a))return console.warn("Yield to cycle detected",a),s;if(i.has(a))return o(s.slice(1));let l=[];const c=n.get(a);return c&&(r.push(a),l=o(c),r.pop()),i.add(a),[...l,a,...o(s.slice(1))]}return o(Array.from(t))}var rMr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},oMr=function(t,e){return function(n,i){e(n,i,t)}};const sMr=Hi.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:m4t,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),xce=class xce extends ct{constructor(e,n,i,r,o){super(),this.typeId=e,this.editor=n,this.range=i,this.delegate=o,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(r),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=Xt(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const n=Xt("span.icon");this.domNode.append(n),n.classList.add(...ci.asClassNameArray(qt.loading),"codicon-modifier-spin");const i=()=>{const r=this.editor.getOption(67);this.domNode.style.height=`${r}px`,this.domNode.style.width=`${Math.ceil(.8*r)}px`};i(),this._register(this.editor.onDidChangeConfiguration(r=>{(r.hasChanged(52)||r.hasChanged(67))&&i()})),this._register(yt(this.domNode,Yt.CLICK,r=>{this.delegate.cancel()}))}getId(){return xce.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}};xce.baseId="editor.widget.inlineProgressWidget";let GPe=xce,Mae=class extends ct{constructor(e,n,i){super(),this.id=e,this._editor=n,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new mc),this._currentWidget=this._register(new mc),this._operationIdPool=0,this._currentDecorations=n.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,n,i,r,o){const s=this._operationIdPool++;this._currentOperation=s,this.clear(),this._showPromise.value=dk(()=>{const a=ve.fromPositions(e);this._currentDecorations.set([{range:a,options:sMr}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(GPe,this.id,this._editor,a,n,r))},o??this._showDelay);try{return await i}finally{this._currentOperation===s&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};Mae=rMr([oMr(2,qn)],Mae);var aMr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},fyt=function(t,e){return function(n,i){e(n,i,t)}},Fte,DD;let Sm=(DD=class{static get(e){return e.getContribution(Fte.ID)}constructor(e,n,i){this._openerService=i,this._messageWidget=new mc,this._messageListeners=new Lt,this._mouseOverMessage=!1,this._editor=e,this._visible=Fte.MESSAGE_VISIBLE.bindTo(n)}dispose(){var e;(e=this._message)==null||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,n){Am(E0(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=E0(e)?bme(e,{actionHandler:{callback:r=>{this.closeMessage(),o7e(this._openerService,r,E0(e)?e.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new myt(this._editor,n,typeof e=="string"?e:this._message.element),this._messageListeners.add(rn.debounce(this._editor.onDidBlurEditorText,(r,o)=>o,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&ac(Au(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(yt(this._messageWidget.value.getDomNode(),Yt.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(yt(this._messageWidget.value.getDomNode(),Yt.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let i;this._messageListeners.add(this._editor.onMouseMove(r=>{r.target.position&&(i?i.containsPosition(r.target.position)||this.closeMessage():i=new ve(n.lineNumber-3,1,r.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(myt.fadeOut(this._messageWidget.value))}},Fte=DD,DD.ID="editor.contrib.messageController",DD.MESSAGE_VISIBLE=new gn("messageVisible",!1,I("messageVisible","Whether the editor is currently showing an inline message")),DD);Sm=Fte=aMr([fyt(1,vi),fyt(2,Wm)],Sm);const lMr=Zl.bindToContribution(Sm.get);fn(new lMr({id:"leaveEditorMessage",precondition:Sm.MESSAGE_VISIBLE,handler:t=>t.closeMessage(),kbOpts:{weight:130,primary:9}}));let myt=class{static fadeOut(e){const n=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",n)},i=setTimeout(n,110);return e.getDomNode().addEventListener("animationend",n),e.getDomNode().classList.add("fadeOut"),{dispose:n}}constructor(e,{lineNumber:n,column:i},r){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(n,n,0),this._position={lineNumber:n,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const s=document.createElement("div");typeof r=="string"?(s.classList.add("message"),s.textContent=r):(r.classList.add("message"),s.appendChild(r)),this._domNode.appendChild(s);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};Wr(Sm.ID,Sm,4);function jSe(t,e){return e&&(t.stack||t.stacktrace)?I("stackTrace.format","{0}: {1}",gyt(t),pyt(t.stack)||pyt(t.stacktrace)):gyt(t)}function pyt(t){return Array.isArray(t)?t.join(`
`):t}function gyt(t){return t.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${t.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof t.code=="string"&&typeof t.errno=="number"&&typeof t.syscall=="string"?I("nodeExceptionMessage","A system error occurred ({0})",t.message):t.message||I("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function Lae(t=null,e=!1){if(!t)return I("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(t)){const n=H0(t),i=Lae(n[0],e);return n.length>1?I("error.moreErrors","{0} ({1} errors in total)",i,n.length):i}if(Cf(t))return t;if(t.detail){const n=t.detail;if(n.error)return jSe(n.error,e);if(n.exception)return jSe(n.exception,e)}return t.stack?jSe(t,e):t.message?t.message:I("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var sqt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Y3=function(t,e){return function(n,i){e(n,i,t)}},YPe,OI;let XPe=(OI=class extends ct{constructor(e,n,i,r,o,s,a,l,c,u){super(),this.typeId=e,this.editor=n,this.showCommand=r,this.range=o,this.edits=s,this.onSelectNewEdit=a,this._contextMenuService=l,this._keybindingService=u,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(c),this.visibleContext.set(!0),this._register(Kn(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(Kn(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(d=>{o.containsPosition(d.position)||this.dispose()})),this._register(rn.runAndSubscribe(u.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var n;const e=(n=this._keybindingService.lookupKeybinding(this.showCommand.id))==null?void 0:n.getLabel();this.button.element.title=this.showCommand.label+(e?` (${e})`:"")}create(){this.domNode=Xt(".post-edit-widget"),this.button=this._register(new eoe(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(yt(this.domNode,Yt.CLICK,()=>this.showSelector()))}getId(){return YPe.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=Ga(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,n)=>aI({id:"",label:e.title,checked:n===this.edits.activeEditIndex,run:()=>{if(n!==this.edits.activeEditIndex)return this.onSelectNewEdit(n)}}))})}},YPe=OI,OI.baseId="editor.widget.postEditWidget",OI);XPe=YPe=sqt([Y3(7,Hm),Y3(8,vi),Y3(9,vo)],XPe);let Tae=class extends ct{constructor(e,n,i,r,o,s,a){super(),this._id=e,this._editor=n,this._visibleContext=i,this._showCommand=r,this._instantiationService=o,this._bulkEditService=s,this._notificationService=a,this._currentWidget=this._register(new mc),this._register(rn.any(n.onDidChangeModel,n.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,n,i,r,o){const s=this._editor.getModel();if(!s||!e.length)return;const a=n.allEdits.at(n.activeEditIndex);if(!a)return;const l=async g=>{const y=this._editor.getModel();y&&(await y.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:g,allEdits:n.allEdits},i,r,o))},c=(g,y)=>{yb(g)||(this._notificationService.error(y),i&&this.show(e[0],n,l))};let u;try{u=await r(a,o)}catch(g){return c(g,I("resolveError",`Error resolving edit '{0}':
{1}`,a.title,Lae(g)))}if(o.isCancellationRequested)return;const d=rqt(s.uri,e,u),h=e[0],f=s.deltaDecorations([],[{range:h,options:{description:"paste-line-suffix",stickiness:0}}]);this._editor.focus();let m,p;try{m=await this._bulkEditService.apply(d,{editor:this._editor,token:o}),p=s.getDecorationRange(f[0])}catch(g){return c(g,I("applyError",`Error applying edit '{0}':
{1}`,a.title,Lae(g)))}finally{s.deltaDecorations(f,[])}o.isCancellationRequested||i&&m.isApplied&&n.allEdits.length>1&&this.show(p??h,n,l)}show(e,n,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(XPe,this._id,this._editor,this._visibleContext,this._showCommand,e,n,i))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)==null||e.showSelector()}};Tae=sqt([Y3(4,qn),Y3(5,Iq),Y3(6,tl)],Tae);var cMr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},fO=function(t,e){return function(n,i){e(n,i,t)}},KL;const aqt="editor.changePasteType",nWe=new gn("pasteWidgetVisible",!1,I("pasteWidgetVisible","Whether the paste widget is showing")),FSe="application/vnd.code.copyMetadata";var jI;let ES=(jI=class extends ct{static get(e){return e.getContribution(KL.ID)}constructor(e,n,i,r,o,s,a){super(),this._bulkEditService=i,this._clipboardService=r,this._languageFeaturesService=o,this._quickInputService=s,this._progressService=a,this._editor=e;const l=e.getContainerDomNode();this._register(yt(l,"copy",c=>this.handleCopy(c))),this._register(yt(l,"cut",c=>this.handleCopy(c))),this._register(yt(l,"paste",c=>this.handlePaste(c),!0)),this._pasteProgressManager=this._register(new Mae("pasteIntoEditor",e,n)),this._postPasteWidgetManager=this._register(n.createInstance(Tae,"pasteIntoEditor",e,nWe,{id:aqt,label:I("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferred:e},M6().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}clearWidgets(){this._postPasteWidgetManager.clear()}isPasteAsEnabled(){return this._editor.getOption(85).enabled&&!this._editor.getOption(92)}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){var p,g;if(!this._editor.hasTextFocus()||(eM&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled()))return;const n=this._editor.getModel(),i=this._editor.getSelections();if(!n||!(i!=null&&i.length))return;const r=this._editor.getOption(37);let o=i;const s=i.length===1&&i[0].isEmpty();if(s){if(!r)return;o=[new ve(o[0].startLineNumber,1,o[0].startLineNumber,1+n.getLineLength(o[0].startLineNumber))]}const a=(p=this._editor._getViewModel())==null?void 0:p.getPlainTextToCopy(i,r,Fu),c={multicursorText:Array.isArray(a)?a:null,pasteOnNewLine:s,mode:null},u=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter(y=>!!y.prepareDocumentPaste);if(!u.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:c});return}const d=QKt(e.clipboardData),h=u.flatMap(y=>y.copyMimeTypes??[]),f=Cge();this.setCopyMetadata(e.clipboardData,{id:f,providerCopyMimeTypes:h,defaultPastePayload:c});const m=cc(async y=>{const _=H0(await Promise.all(u.map(async w=>{try{return await w.prepareDocumentPaste(n,o,d,y)}catch(C){console.error(C);return}})));_.reverse();for(const w of _)for(const[C,N]of w)d.replace(C,N);return d});(g=KL._currentCopyOperation)==null||g.dataTransferPromise.cancel(),KL._currentCopyOperation={handle:f,dataTransferPromise:m}}async handlePaste(e){var l,c,u;if(!e.clipboardData||!this._editor.hasTextFocus())return;(l=Sm.get(this._editor))==null||l.closeMessage(),(c=this._currentPasteOperation)==null||c.cancel(),this._currentPasteOperation=void 0;const n=this._editor.getModel(),i=this._editor.getSelections();if(!(i!=null&&i.length)||!n||!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;const r=this.fetchCopyMetadata(e),o=JKt(e.clipboardData);o.delete(FSe);const s=[...e.clipboardData.types,...(r==null?void 0:r.providerCopyMimeTypes)??[],Pa.uriList],a=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter(d=>{var f,m;const h=(f=this._pasteAsActionContext)==null?void 0:f.preferred;return h&&d.providedPasteEditKinds&&!this.providerMatchesPreference(d,h)?!1:(m=d.pasteMimeTypes)==null?void 0:m.some(p=>XKt(p,s))});if(!a.length){(u=this._pasteAsActionContext)!=null&&u.preferred&&this.showPasteAsNoEditMessage(i,this._pasteAsActionContext.preferred);return}e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferred,a,i,o,r):this.doPasteInline(a,i,o,r,e)}showPasteAsNoEditMessage(e,n){var i;(i=Sm.get(this._editor))==null||i.showMessage(I("pasteAsError","No paste edits for '{0}' found",n instanceof Ys?n.value:n.providerId),e[0].getStartPosition())}doPasteInline(e,n,i,r,o){const s=this._editor;if(!s.hasModel())return;const a=new xk(s,3,void 0),l=cc(async c=>{const u=this._editor;if(!u.hasModel())return;const d=u.getModel(),h=new Lt,f=h.add(new oa(c));h.add(a.token.onCancellationRequested(()=>f.cancel()));const m=f.token;try{if(await this.mergeInDataFromCopy(i,r,m),m.isCancellationRequested)return;const p=e.filter(_=>this.isSupportedPasteProvider(_,i));if(!p.length||p.length===1&&p[0]instanceof fA)return this.applyDefaultPasteHandler(i,r,m,o);const g={triggerKind:_H.Automatic},y=await this.getPasteEdits(p,i,d,n,g,m);if(h.add(y),m.isCancellationRequested)return;if(y.edits.length===1&&y.edits[0].provider instanceof fA)return this.applyDefaultPasteHandler(i,r,m,o);if(y.edits.length){const _=u.getOption(85).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(n,{activeEditIndex:0,allEdits:y.edits},_,(w,C)=>new Promise((N,E)=>{(async()=>{var D,k;try{const M=(k=(D=w.provider).resolveDocumentPasteEdit)==null?void 0:k.call(D,w,C),T=new k6,A=M&&await this._pasteProgressManager.showWhile(n[0].getEndPosition(),I("resolveProcess","Resolving paste edit. Click to cancel"),Promise.race([T.p,M]),{cancel:()=>(T.cancel(),E(new Mv))},0);return A&&(w.additionalEdit=A.additionalEdit),N(w)}catch(M){return E(M)}})()}),m)}await this.applyDefaultPasteHandler(i,r,m,o)}finally{h.dispose(),this._currentPasteOperation===l&&(this._currentPasteOperation=void 0)}});this._pasteProgressManager.showWhile(n[0].getEndPosition(),I("pasteIntoEditorProgress","Running paste handlers. Click to cancel and do basic paste"),l,{cancel:async()=>{try{if(l.cancel(),a.token.isCancellationRequested)return;await this.applyDefaultPasteHandler(i,r,a.token,o)}finally{a.dispose()}}}).then(()=>{a.dispose()}),this._currentPasteOperation=l}showPasteAsPick(e,n,i,r,o){const s=cc(async a=>{const l=this._editor;if(!l.hasModel())return;const c=l.getModel(),u=new Lt,d=u.add(new xk(l,3,void 0,a));try{if(await this.mergeInDataFromCopy(r,o,d.token),d.token.isCancellationRequested)return;let h=n.filter(y=>this.isSupportedPasteProvider(y,r,e));e&&(h=h.filter(y=>this.providerMatchesPreference(y,e)));const f={triggerKind:_H.PasteAs,only:e&&e instanceof Ys?e:void 0};let m=u.add(await this.getPasteEdits(h,r,c,i,f,d.token));if(d.token.isCancellationRequested)return;if(e&&(m={edits:m.edits.filter(y=>e instanceof Ys?e.contains(y.kind):e.providerId===y.provider.id),dispose:m.dispose}),!m.edits.length){f.only&&this.showPasteAsNoEditMessage(i,f.only);return}let p;if(e)p=m.edits.at(0);else{const y=await this._quickInputService.pick(m.edits.map(_=>{var w;return{label:_.title,description:(w=_.kind)==null?void 0:w.value,edit:_}}),{placeHolder:I("pasteAsPickerPlaceholder","Select Paste Action")});p=y==null?void 0:y.edit}if(!p)return;const g=rqt(c.uri,i,p);await this._bulkEditService.apply(g,{editor:this._editor})}finally{u.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}});this._progressService.withProgress({location:10,title:I("pasteAsProgress","Running paste handlers")},()=>s)}setCopyMetadata(e,n){e.setData(FSe,JSON.stringify(n))}fetchCopyMetadata(e){if(!e.clipboardData)return;const n=e.clipboardData.getData(FSe);if(n)try{return JSON.parse(n)}catch{return}const[i,r]=cTe.getTextData(e.clipboardData);if(r)return{defaultPastePayload:{mode:r.mode,multicursorText:r.multicursorText??null,pasteOnNewLine:!!r.isFromEmptySelection}}}async mergeInDataFromCopy(e,n,i){var r;if(n!=null&&n.id&&((r=KL._currentCopyOperation)==null?void 0:r.handle)===n.id){const o=await KL._currentCopyOperation.dataTransferPromise;if(i.isCancellationRequested)return;for(const[s,a]of o)e.replace(s,a)}if(!e.has(Pa.uriList)){const o=await this._clipboardService.readResources();if(i.isCancellationRequested)return;o.length&&e.append(Pa.uriList,QHe(Sge.create(o)))}}async getPasteEdits(e,n,i,r,o,s){const a=new Lt,l=await vq(Promise.all(e.map(async u=>{var d,h;try{const f=await((d=u.provideDocumentPasteEdits)==null?void 0:d.call(u,i,r,n,o,s));return f&&a.add(f),(h=f==null?void 0:f.edits)==null?void 0:h.map(m=>({...m,provider:u}))}catch(f){yb(f)||console.error(f);return}})),s),c=H0(l??[]).flat().filter(u=>!o.only||o.only.contains(u.kind));return{edits:oqt(c),dispose:()=>a.dispose()}}async applyDefaultPasteHandler(e,n,i,r){const o=e.get(Pa.text)??e.get("text"),s=await(o==null?void 0:o.asString())??"";if(i.isCancellationRequested)return;const a={clipboardEvent:r,text:s,pasteOnNewLine:(n==null?void 0:n.defaultPastePayload.pasteOnNewLine)??!1,multicursorText:(n==null?void 0:n.defaultPastePayload.multicursorText)??null,mode:null};this._editor.trigger("keyboard","paste",a)}isSupportedPasteProvider(e,n,i){var r;return(r=e.pasteMimeTypes)!=null&&r.some(o=>n.matches(o))?!i||this.providerMatchesPreference(e,i):!1}providerMatchesPreference(e,n){return n instanceof Ys?e.providedPasteEditKinds?e.providedPasteEditKinds.some(i=>n.contains(i)):!0:e.id===n.providerId}},KL=jI,jI.ID="editor.contrib.copyPasteActionController",jI);ES=KL=cMr([fO(1,qn),fO(2,Iq),fO(3,GS),fO(4,Ln),fO(5,wb),fO(6,D5t)],ES);const pA="9_cutcopypaste",uMr=y0||document.queryCommandSupported("cut"),lqt=y0||document.queryCommandSupported("copy"),dMr=typeof navigator.clipboard>"u"||sb?document.queryCommandSupported("paste"):!0;function iWe(t){return t.register(),t}const hMr=uMr?iWe(new T6({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:y0?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:Rn.MenubarEditMenu,group:"2_ccp",title:I({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:Rn.EditorContext,group:pA,title:I("actions.clipboard.cutLabel","Cut"),when:Re.writable,order:1},{menuId:Rn.CommandPalette,group:"",title:I("actions.clipboard.cutLabel","Cut"),order:1},{menuId:Rn.SimpleEditorContext,group:pA,title:I("actions.clipboard.cutLabel","Cut"),when:Re.writable,order:1}]})):void 0,fMr=lqt?iWe(new T6({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:y0?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:Rn.MenubarEditMenu,group:"2_ccp",title:I({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:Rn.EditorContext,group:pA,title:I("actions.clipboard.copyLabel","Copy"),order:2},{menuId:Rn.CommandPalette,group:"",title:I("actions.clipboard.copyLabel","Copy"),order:1},{menuId:Rn.SimpleEditorContext,group:pA,title:I("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;Oc.appendMenuItem(Rn.MenubarEditMenu,{submenu:Rn.MenubarCopy,title:Ci("copy as","Copy As"),group:"2_ccp",order:3});Oc.appendMenuItem(Rn.EditorContext,{submenu:Rn.EditorContextCopy,title:Ci("copy as","Copy As"),group:pA,order:3});Oc.appendMenuItem(Rn.EditorContext,{submenu:Rn.EditorContextShare,title:Ci("share","Share"),group:"11_share",order:-1,when:Tt.and(Tt.notEquals("resourceScheme","output"),Re.editorTextFocus)});Oc.appendMenuItem(Rn.ExplorerContext,{submenu:Rn.ExplorerContextShare,title:Ci("share","Share"),group:"11_share",order:-1});const $Se=dMr?iWe(new T6({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:y0?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:Rn.MenubarEditMenu,group:"2_ccp",title:I({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:Rn.EditorContext,group:pA,title:I("actions.clipboard.pasteLabel","Paste"),when:Re.writable,order:4},{menuId:Rn.CommandPalette,group:"",title:I("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:Rn.SimpleEditorContext,group:pA,title:I("actions.clipboard.pasteLabel","Paste"),when:Re.writable,order:4}]})):void 0;class mMr extends En{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:I("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:Re.textInputFocus,primary:0,weight:100}})}run(e,n){!n.hasModel()||!n.getOption(37)&&n.getSelection().isEmpty()||(aTe.forceCopyWithSyntaxHighlighting=!0,n.focus(),n.getContainerDomNode().ownerDocument.execCommand("copy"),aTe.forceCopyWithSyntaxHighlighting=!1)}}function cqt(t,e){t&&(t.addImplementation(1e4,"code-editor",(n,i)=>{const r=n.get(Yr).getFocusedCodeEditor();if(r&&r.hasTextFocus()){const o=r.getOption(37),s=r.getSelection();return s&&s.isEmpty()&&!o||r.getContainerDomNode().ownerDocument.execCommand(e),!0}return!1}),t.addImplementation(0,"generic-dom",(n,i)=>(M6().execCommand(e),!0)))}cqt(hMr,"cut");cqt(fMr,"copy");$Se&&($Se.addImplementation(1e4,"code-editor",(t,e)=>{var o;const n=t.get(Yr),i=t.get(GS),r=n.getFocusedCodeEditor();return r&&r.hasTextFocus()?r.getContainerDomNode().ownerDocument.execCommand("paste")?((o=ES.get(r))==null?void 0:o.finishedPaste())??Promise.resolve():eM?(async()=>{const a=await i.readText();if(a!==""){const l=WH.INSTANCE.get(a);let c=!1,u=null,d=null;l&&(c=r.getOption(37)&&!!l.isFromEmptySelection,u=typeof l.multicursorText<"u"?l.multicursorText:null,d=l.mode),r.trigger("keyboard","paste",{text:a,pasteOnNewLine:c,multicursorText:u,mode:d})}})():!0:!1}),$Se.addImplementation(0,"generic-dom",(t,e)=>(M6().execCommand("paste"),!0)));lqt&&Ht(mMr);const js=new class{constructor(){this.QuickFix=new Ys("quickfix"),this.Refactor=new Ys("refactor"),this.RefactorExtract=this.Refactor.append("extract"),this.RefactorInline=this.Refactor.append("inline"),this.RefactorMove=this.Refactor.append("move"),this.RefactorRewrite=this.Refactor.append("rewrite"),this.Notebook=new Ys("notebook"),this.Source=new Ys("source"),this.SourceOrganizeImports=this.Source.append("organizeImports"),this.SourceFixAll=this.Source.append("fixAll"),this.SurroundWith=this.Refactor.append("surround")}};var Pm;(function(t){t.Refactor="refactor",t.RefactorPreview="refactor preview",t.Lightbulb="lightbulb",t.Default="other (default)",t.SourceAction="source action",t.QuickFix="quick fix action",t.FixAll="fix all",t.OrganizeImports="organize imports",t.AutoFix="auto fix",t.QuickFixHover="quick fix hover window",t.OnSave="save participants",t.ProblemsView="problems view"})(Pm||(Pm={}));function pMr(t,e){return!(t.include&&!t.include.intersects(e)||t.excludes&&t.excludes.some(n=>uqt(e,n,t.include))||!t.includeSourceActions&&js.Source.contains(e))}function gMr(t,e){const n=e.kind?new Ys(e.kind):void 0;return!(t.include&&(!n||!t.include.contains(n))||t.excludes&&n&&t.excludes.some(i=>uqt(n,i,t.include))||!t.includeSourceActions&&n&&js.Source.contains(n)||t.onlyIncludePreferredActions&&!e.isPreferred)}function uqt(t,e,n){return!(!e.contains(t)||n&&e.contains(n))}class Ex{static fromUser(e,n){return!e||typeof e!="object"?new Ex(n.kind,n.apply,!1):new Ex(Ex.getKindFromUser(e,n.kind),Ex.getApplyFromUser(e,n.apply),Ex.getPreferredUser(e))}static getApplyFromUser(e,n){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return n}}static getKindFromUser(e,n){return typeof e.kind=="string"?new Ys(e.kind):n}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,n,i){this.kind=e,this.apply=n,this.preferred=i}}class bMr{constructor(e,n,i){this.action=e,this.provider=n,this.highlightRange=i}async resolve(e){var n;if((n=this.provider)!=null&&n.resolveCodeAction&&!this.action.edit){let i;try{i=await this.provider.resolveCodeAction(this.action,e)}catch(r){$a(r)}i&&(this.action.edit=i.edit)}return this}}const dqt="editor.action.codeAction",rWe="editor.action.quickFix",hqt="editor.action.autoFix",fqt="editor.action.refactor",mqt="editor.action.sourceAction",ZPe="editor.action.organizeImports",QPe="editor.action.fixAll";class FB extends ct{static codeActionsPreferredComparator(e,n){return e.isPreferred&&!n.isPreferred?-1:!e.isPreferred&&n.isPreferred?1:0}static codeActionsComparator({action:e},{action:n}){return e.isAI&&!n.isAI?1:!e.isAI&&n.isAI?-1:md(e.diagnostics)?md(n.diagnostics)?FB.codeActionsPreferredComparator(e,n):-1:md(n.diagnostics)?1:FB.codeActionsPreferredComparator(e,n)}constructor(e,n,i){super(),this.documentation=n,this._register(i),this.allActions=[...e].sort(FB.codeActionsComparator),this.validActions=this.allActions.filter(({action:r})=>!r.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&js.QuickFix.contains(new Ys(e.kind))&&!!e.isPreferred)}get hasAIFix(){return this.validActions.some(({action:e})=>!!e.isAI)}get allAIFixes(){return this.validActions.every(({action:e})=>!!e.isAI)}}const byt={actions:[],documentation:void 0};async function $B(t,e,n,i,r,o){var p;const s=i.filter||{},a={...s,excludes:[...s.excludes||[],js.Notebook]},l={only:(p=s.include)==null?void 0:p.value,trigger:i.type},c=new Y7e(e,o),u=i.type===2,d=vMr(t,e,u?a:s),h=new Lt,f=d.map(async g=>{try{r.report(g);const y=await g.provideCodeActions(e,n,l,c.token);if(y&&h.add(y),c.token.isCancellationRequested)return byt;const _=((y==null?void 0:y.actions)||[]).filter(C=>C&&gMr(s,C)),w=_Mr(g,_,s.include);return{actions:_.map(C=>new bMr(C,g)),documentation:w}}catch(y){if(yb(y))throw y;return $a(y),byt}}),m=t.onDidChange(()=>{const g=t.all(e);Xs(g,d)||c.cancel()});try{const g=await Promise.all(f),y=g.map(w=>w.actions).flat(),_=[...H0(g.map(w=>w.documentation)),...yMr(t,e,i,y)];return new FB(y,_,h)}finally{m.dispose(),c.dispose()}}function vMr(t,e,n){return t.all(e).filter(i=>i.providedCodeActionKinds?i.providedCodeActionKinds.some(r=>pMr(n,new Ys(r))):!0)}function*yMr(t,e,n,i){var r,o,s;if(e&&i.length)for(const a of t.all(e))a._getAdditionalMenuItems&&(yield*(s=a._getAdditionalMenuItems)==null?void 0:s.call(a,{trigger:n.type,only:(o=(r=n.filter)==null?void 0:r.include)==null?void 0:o.value},i.map(l=>l.action)))}function _Mr(t,e,n){if(!t.documentation)return;const i=t.documentation.map(r=>({kind:new Ys(r.kind),command:r.command}));if(n){let r;for(const o of i)o.kind.contains(n)&&(r?r.kind.contains(o.kind)&&(r=o):r=o);if(r)return r==null?void 0:r.command}for(const r of e)if(r.kind){for(const o of i)if(o.kind.contains(new Ys(r.kind)))return o.command}}var qT;(function(t){t.OnSave="onSave",t.FromProblemsView="fromProblemsView",t.FromCodeActions="fromCodeActions",t.FromAILightbulb="fromAILightbulb"})(qT||(qT={}));async function xMr(t,e,n,i,r=er.None){var c;const o=t.get(Iq),s=t.get(gs),a=t.get(eh),l=t.get(tl);if(a.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:n}),await e.resolve(r),!r.isCancellationRequested&&!((c=e.action.edit)!=null&&c.edits.length&&!(await o.apply(e.action.edit,{editor:i==null?void 0:i.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:n!==qT.OnSave,showPreview:i==null?void 0:i.preview})).isApplied)&&e.action.command)try{await s.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(u){const d=wMr(u);l.error(typeof d=="string"?d:I("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}function wMr(t){return typeof t=="string"?t:t instanceof Error&&typeof t.message=="string"?t.message:void 0}Ar.registerCommand("_executeCodeActionProvider",async function(t,e,n,i,r){if(!(e instanceof ri))throw Jg();const{codeActionProvider:o}=t.get(Ln),s=t.get(Ds).getModel(e);if(!s)throw Jg();const a=Pn.isISelection(n)?Pn.liftSelection(n):ve.isIRange(n)?s.validateRange(n):void 0;if(!a)throw Jg();const l=typeof i=="string"?new Ys(i):void 0,c=await $B(o,s,a,{type:1,triggerAction:Pm.Default,filter:{includeSourceActions:!0,include:l}},Ux.None,er.None),u=[],d=Math.min(c.validActions.length,typeof r=="number"?r:0);for(let h=0;h<d;h++)u.push(c.validActions[h].resolve(er.None));try{return await Promise.all(u),c.validActions.map(h=>h.action)}finally{setTimeout(()=>c.dispose(),100)}});var CMr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},SMr=function(t,e){return function(n,i){e(n,i,t)}},JPe,FI;let eOe=(FI=class{constructor(e){this.keybindingService=e}getResolver(){const e=new U0(()=>this.keybindingService.getKeybindings().filter(n=>JPe.codeActionCommands.indexOf(n.command)>=0).filter(n=>n.resolvedKeybinding).map(n=>{let i=n.commandArgs;return n.command===ZPe?i={kind:js.SourceOrganizeImports.value}:n.command===QPe&&(i={kind:js.SourceFixAll.value}),{resolvedKeybinding:n.resolvedKeybinding,...Ex.fromUser(i,{kind:Ys.None,apply:"never"})}}));return n=>{if(n.kind){const i=this.bestKeybindingForCodeAction(n,e.value);return i==null?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,n){if(!e.kind)return;const i=new Ys(e.kind);return n.filter(r=>r.kind.contains(i)).filter(r=>r.preferred?e.isPreferred:!0).reduceRight((r,o)=>r?r.kind.contains(o.kind)?o:r:o,void 0)}},JPe=FI,FI.codeActionCommands=[fqt,dqt,mqt,ZPe,QPe],FI);eOe=JPe=CMr([SMr(0,vo)],eOe);Fe("symbolIcon.arrayForeground",hr,I("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.booleanForeground",hr,I("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},I("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.colorForeground",hr,I("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.constantForeground",hr,I("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},I("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},I("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},I("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},I("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},I("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.fileForeground",hr,I("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.folderForeground",hr,I("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},I("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},I("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.keyForeground",hr,I("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.keywordForeground",hr,I("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},I("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.moduleForeground",hr,I("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.namespaceForeground",hr,I("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.nullForeground",hr,I("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.numberForeground",hr,I("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.objectForeground",hr,I("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.operatorForeground",hr,I("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.packageForeground",hr,I("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.propertyForeground",hr,I("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.referenceForeground",hr,I("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.snippetForeground",hr,I("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.stringForeground",hr,I("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.structForeground",hr,I("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.textForeground",hr,I("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.typeParameterForeground",hr,I("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.unitForeground",hr,I("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Fe("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},I("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const pqt=Object.freeze({kind:Ys.Empty,title:I("codeAction.widget.id.more","More Actions...")}),NMr=Object.freeze([{kind:js.QuickFix,title:I("codeAction.widget.id.quickfix","Quick Fix")},{kind:js.RefactorExtract,title:I("codeAction.widget.id.extract","Extract"),icon:qt.wrench},{kind:js.RefactorInline,title:I("codeAction.widget.id.inline","Inline"),icon:qt.wrench},{kind:js.RefactorRewrite,title:I("codeAction.widget.id.convert","Rewrite"),icon:qt.wrench},{kind:js.RefactorMove,title:I("codeAction.widget.id.move","Move"),icon:qt.wrench},{kind:js.SurroundWith,title:I("codeAction.widget.id.surround","Surround With"),icon:qt.surroundWith},{kind:js.Source,title:I("codeAction.widget.id.source","Source Action"),icon:qt.symbolFile},pqt]);function EMr(t,e,n){if(!e)return t.map(o=>{var s;return{kind:"action",item:o,group:pqt,disabled:!!o.action.disabled,label:o.action.disabled||o.action.title,canPreview:!!((s=o.action.edit)!=null&&s.edits.length)}});const i=NMr.map(o=>({group:o,actions:[]}));for(const o of t){const s=o.action.kind?new Ys(o.action.kind):Ys.None;for(const a of i)if(a.group.kind.contains(s)){a.actions.push(o);break}}const r=[];for(const o of i)if(o.actions.length){r.push({kind:"header",group:o.group});for(const s of o.actions){const a=o.group;r.push({kind:"action",item:s,group:s.action.isAI?{title:a.title,kind:a.kind,icon:qt.sparkle}:a,label:s.action.title,disabled:!!s.action.disabled,keybinding:n(s.action)})}}return r}var DMr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},kMr=function(t,e){return function(n,i){e(n,i,t)}},$O;const vyt=ks("gutter-lightbulb",qt.lightBulb,I("gutterLightbulbWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor.")),yyt=ks("gutter-lightbulb-auto-fix",qt.lightbulbAutofix,I("gutterLightbulbAutoFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and a quick fix is available.")),_yt=ks("gutter-lightbulb-sparkle",qt.lightbulbSparkle,I("gutterLightbulbAIFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix is available.")),xyt=ks("gutter-lightbulb-aifix-auto-fix",qt.lightbulbSparkleAutofix,I("gutterLightbulbAIFixAutoFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.")),wyt=ks("gutter-lightbulb-sparkle-filled",qt.sparkleFilled,I("gutterLightbulbSparkleFilledWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available."));var Ly;(function(t){t.Hidden={type:0};class e{constructor(i,r,o,s){this.actions=i,this.trigger=r,this.editorPosition=o,this.widgetPosition=s,this.type=1}}t.Showing=e})(Ly||(Ly={}));var xC;let IU=(xC=class extends ct{constructor(e,n){super(),this._editor=e,this._keybindingService=n,this._onClick=this._register(new st),this.onClick=this._onClick.event,this._state=Ly.Hidden,this._gutterState=Ly.Hidden,this._iconClasses=[],this.gutterDecoration=$O.GUTTER_DECORATION,this._domNode=Xt("div.lightBulbWidget"),this._domNode.role="listbox",this._register(xd.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(i=>{const r=this._editor.getModel();(this.state.type!==1||!r||this.state.editorPosition.lineNumber>=r.getLineCount())&&this.hide(),(this.gutterState.type!==1||!r||this.gutterState.editorPosition.lineNumber>=r.getLineCount())&&this.gutterHide()})),this._register(nfi(this._domNode,i=>{if(this.state.type!==1)return;this._editor.focus(),i.preventDefault();const{top:r,height:o}=Ga(this._domNode),s=this._editor.getOption(67);let a=Math.floor(s/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(a+=s),this._onClick.fire({x:i.posx,y:r+o+a,actions:this.state.actions,trigger:this.state.trigger})})),this._register(yt(this._domNode,"mouseenter",i=>{(i.buttons&1)===1&&this.hide()})),this._register(rn.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{var i,r;this._preferredKbLabel=((i=this._keybindingService.lookupKeybinding(hqt))==null?void 0:i.getLabel())??void 0,this._quickFixKbLabel=((r=this._keybindingService.lookupKeybinding(rWe))==null?void 0:r.getLabel())??void 0,this._updateLightBulbTitleAndIcon()})),this._register(this._editor.onMouseDown(async i=>{const r=["codicon-"+vyt.id,"codicon-"+xyt.id,"codicon-"+yyt.id,"codicon-"+_yt.id,"codicon-"+wyt.id];if(!i.target.element||!r.some(c=>i.target.element&&i.target.element.classList.contains(c))||this.gutterState.type!==1)return;this._editor.focus();const{top:o,height:s}=Ga(i.target.element),a=this._editor.getOption(67);let l=Math.floor(a/3);this.gutterState.widgetPosition.position!==null&&this.gutterState.widgetPosition.position.lineNumber<this.gutterState.editorPosition.lineNumber&&(l+=a),this._onClick.fire({x:i.event.posx,y:o+s+l,actions:this.gutterState.actions,trigger:this.gutterState.trigger})}))}dispose(){super.dispose(),this._editor.removeContentWidget(this),this._gutterDecorationID&&this._removeGutterDecoration(this._gutterDecorationID)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,n,i){var _;if(e.validActions.length<=0)return this.gutterHide(),this.hide();if(!this._editor.getOptions().get(65).enabled)return this.gutterHide(),this.hide();const o=this._editor.getModel();if(!o)return this.gutterHide(),this.hide();const{lineNumber:s,column:a}=o.validatePosition(i),l=o.getOptions().tabSize,c=this._editor.getOptions().get(50),u=o.getLineContent(s),d=ume(u,l),h=c.spaceWidth*d>22,f=w=>w>2&&this._editor.getTopForLineNumber(w)===this._editor.getTopForLineNumber(w-1);let m=s,p=1;if(!h){const w=C=>{const N=o.getLineContent(C);return/^\s*$|^\s+/.test(N)||N.length<=p};if(s>1&&!f(s-1)){const C=o.getLineCount(),N=s===C,E=s>1&&w(s-1),D=!N&&w(s+1),k=w(s),M=!D&&!E;let T=!1;const A=this._editor.getLineDecorations(s);if(A)for(const R of A)(_=R.options.glyphMarginClassName)!=null&&_.includes(qt.debugBreakpoint.id)&&(T=!0);if(!D&&!E&&!T)return this.gutterState=new Ly.Showing(e,n,i,{position:{lineNumber:m,column:p},preference:$O._posPref}),this.renderGutterLightbub(),this.hide();E||N||M&&!k?m-=1:(D||M&&k)&&(m+=1)}else{if(s===1&&(s===o.getLineCount()||!w(s+1)&&!w(s)))return this.gutterState=new Ly.Showing(e,n,i,{position:{lineNumber:m,column:p},preference:$O._posPref}),this.renderGutterLightbub(),this.hide();if(s<o.getLineCount()&&!f(s+1))m+=1;else if(a*c.spaceWidth<22)return this.hide()}p=/^\S\s*$/.test(o.getLineContent(m))?2:1}this.state=new Ly.Showing(e,n,i,{position:{lineNumber:m,column:p},preference:$O._posPref}),this._gutterDecorationID&&(this._removeGutterDecoration(this._gutterDecorationID),this.gutterHide());const g=e.validActions,y=e.validActions[0].action.kind;if(g.length!==1||!y){this._editor.layoutContentWidget(this);return}this._editor.layoutContentWidget(this)}hide(){this.state!==Ly.Hidden&&(this.state=Ly.Hidden,this._editor.layoutContentWidget(this))}gutterHide(){this.gutterState!==Ly.Hidden&&(this._gutterDecorationID&&this._removeGutterDecoration(this._gutterDecorationID),this.gutterState=Ly.Hidden)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}get gutterState(){return this._gutterState}set gutterState(e){this._gutterState=e,this._updateGutterLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this._domNode.classList.remove(...this._iconClasses),this._iconClasses=[],this.state.type!==1)return;let e,n=!1;this.state.actions.allAIFixes?(e=qt.sparkleFilled,this.state.actions.validActions.length===1&&(n=!0)):this.state.actions.hasAutoFix?this.state.actions.hasAIFix?e=qt.lightbulbSparkleAutofix:e=qt.lightbulbAutofix:this.state.actions.hasAIFix?e=qt.lightbulbSparkle:e=qt.lightBulb,this._updateLightbulbTitle(this.state.actions.hasAutoFix,n),this._iconClasses=ci.asClassNameArray(e),this._domNode.classList.add(...this._iconClasses)}_updateGutterLightBulbTitleAndIcon(){if(this.gutterState.type!==1)return;let e,n=!1;this.gutterState.actions.allAIFixes?(e=wyt,this.gutterState.actions.validActions.length===1&&(n=!0)):this.gutterState.actions.hasAutoFix?this.gutterState.actions.hasAIFix?e=xyt:e=yyt:this.gutterState.actions.hasAIFix?e=_yt:e=vyt,this._updateLightbulbTitle(this.gutterState.actions.hasAutoFix,n);const i=Hi.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:ci.asClassName(e),glyphMargin:{position:Iv.Left},stickiness:1});this.gutterDecoration=i}renderGutterLightbub(){const e=this._editor.getSelection();e&&(this._gutterDecorationID===void 0?this._addGutterDecoration(e.startLineNumber):this._updateGutterDecoration(this._gutterDecorationID,e.startLineNumber))}_addGutterDecoration(e){this._editor.changeDecorations(n=>{this._gutterDecorationID=n.addDecoration(new ve(e,0,e,0),this.gutterDecoration)})}_removeGutterDecoration(e){this._editor.changeDecorations(n=>{n.removeDecoration(e),this._gutterDecorationID=void 0})}_updateGutterDecoration(e,n){this._editor.changeDecorations(i=>{i.changeDecoration(e,new ve(n,0,n,0)),i.changeDecorationOptions(e,this.gutterDecoration)})}_updateLightbulbTitle(e,n){this.state.type===1&&(n?this.title=I("codeActionAutoRun","Run: {0}",this.state.actions.validActions[0].action.title):e&&this._preferredKbLabel?this.title=I("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel):!e&&this._quickFixKbLabel?this.title=I("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):e||(this.title=I("codeAction","Show Code Actions")))}set title(e){this._domNode.title=e}},$O=xC,xC.GUTTER_DECORATION=Hi.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:ci.asClassName(qt.lightBulb),glyphMargin:{position:Iv.Left},stickiness:1}),xC.ID="editor.contrib.lightbulbWidget",xC._posPref=[0],xC);IU=$O=DMr([kMr(1,vo)],IU);var gqt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},tOe=function(t,e){return function(n,i){e(n,i,t)}};const bqt="acceptSelectedCodeAction",vqt="previewSelectedCodeAction";class MMr{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const n=document.createElement("span");return e.append(n),{container:e,text:n}}renderElement(e,n,i){var r;i.text.textContent=((r=e.group)==null?void 0:r.title)??""}disposeTemplate(e){}}let nOe=class{get templateId(){return"action"}constructor(e,n){this._supportsPreview=e,this._keybindingService=n}renderTemplate(e){e.classList.add(this.templateId);const n=document.createElement("div");n.className="icon",e.append(n);const i=document.createElement("span");i.className="title",e.append(i);const r=new W6(e,pm);return{container:e,icon:n,text:i,keybinding:r}}renderElement(e,n,i){var s,a,l;if((s=e.group)!=null&&s.icon?(i.icon.className=ci.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=Cn(e.group.icon.color.id))):(i.icon.className=ci.asClassName(qt.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=yqt(e.label),i.keybinding.set(e.keybinding),bfi(!!e.keybinding,i.keybinding.element);const r=(a=this._keybindingService.lookupKeybinding(bqt))==null?void 0:a.getLabel(),o=(l=this._keybindingService.lookupKeybinding(vqt))==null?void 0:l.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:r&&o?this._supportsPreview&&e.canPreview?i.container.title=I({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to Apply, Shift+F2 to Preview"']},"{0} to Apply, {1} to Preview",r,o):i.container.title=I({key:"label",comment:['placeholder is a keybinding, e.g "F2 to Apply"']},"{0} to Apply",r):i.container.title=""}disposeTemplate(e){e.keybinding.dispose()}};nOe=gqt([tOe(1,vo)],nOe);class LMr extends UIEvent{constructor(){super("acceptSelectedAction")}}class Cyt extends UIEvent{constructor(){super("previewSelectedAction")}}function TMr(t){if(t.kind==="action")return t.label}let iOe=class extends ct{constructor(e,n,i,r,o,s){super(),this._delegate=r,this._contextViewService=o,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new oa),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const a={getHeight:l=>l.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:l=>l.kind};this._list=this._register(new ng(e,this.domNode,a,[new nOe(n,this._keybindingService),new MMr],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:TMr},accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let c=l.label?yqt(l==null?void 0:l.label):"";return l.disabled&&(c=I({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",c,l.disabled)),c}return null},getWidgetAriaLabel:()=>I({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(nR),this._register(this._list.onMouseClick(l=>this.onListClick(l))),this._register(this._list.onMouseOver(l=>this.onListHover(l))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(l=>this.onListSelection(l))),this._allMenuItems=i,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const n=this._allMenuItems.filter(l=>l.kind==="header").length,r=this._allMenuItems.length*this._actionLineHeight+n*this._headerLineHeight-n*this._actionLineHeight;this._list.layout(r);let o=e;if(this._allMenuItems.length>=50)o=380;else{const l=this._allMenuItems.map((c,u)=>{const d=this.domNode.ownerDocument.getElementById(this._list.getElementID(u));if(d){d.style.width="auto";const h=d.getBoundingClientRect().width;return d.style.width="",h}return 0});o=Math.max(...l,e)}const a=Math.min(r,this.domNode.ownerDocument.body.clientHeight*.7);return this._list.layout(a,o),this.domNode.style.height=`${a}px`,this._list.domFocus(),o}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const n=this._list.getFocus();if(n.length===0)return;const i=n[0],r=this._list.element(i);if(!this.focusCondition(r))return;const o=e?new Cyt:new LMr;this._list.setSelection([i],o)}onListSelection(e){if(!e.elements.length)return;const n=e.elements[0];n.item&&this.focusCondition(n)?this._delegate.onSelect(n.item,e.browserEvent instanceof Cyt):this._list.setSelection([])}onFocus(){var r,o;const e=this._list.getFocus();if(e.length===0)return;const n=e[0],i=this._list.element(n);(o=(r=this._delegate).onFocus)==null||o.call(r,i.item)}async onListHover(e){const n=e.element;if(n&&n.item&&this.focusCondition(n)){if(this._delegate.onHover&&!n.disabled&&n.kind==="action"){const i=await this._delegate.onHover(n.item,this.cts.token);n.canPreview=i?i.canPreview:void 0}e.index&&this._list.splice(e.index,1,[n])}this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};iOe=gqt([tOe(4,US),tOe(5,vo)],iOe);function yqt(t){return t.replace(/\r\n|\r|\n/g," ")}var IMr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},VSe=function(t,e){return function(n,i){e(n,i,t)}};Fe("actionBar.toggledBackground",Sq,I("actionBar.toggledBackground","Background color for toggled action items in action bar."));const gA={Visible:new gn("codeActionMenuVisible",!1,I("codeActionMenuVisible","Whether the action widget list is visible"))},_R=Sr("actionWidgetService");let bA=class extends ct{get isVisible(){return gA.Visible.getValue(this._contextKeyService)||!1}constructor(e,n,i){super(),this._contextViewService=e,this._contextKeyService=n,this._instantiationService=i,this._list=this._register(new mc)}show(e,n,i,r,o,s,a){const l=gA.Visible.bindTo(this._contextKeyService),c=this._instantiationService.createInstance(iOe,e,n,i,r);this._contextViewService.showContextView({getAnchor:()=>o,render:u=>(l.set(!0),this._renderWidget(u,c,a??[])),onHide:u=>{l.reset(),this._onWidgetClosed(u)}},s,!1)}acceptSelected(e){var n;(n=this._list.value)==null||n.acceptSelected(e)}focusPrevious(){var e,n;(n=(e=this._list)==null?void 0:e.value)==null||n.focusPrevious()}focusNext(){var e,n;(n=(e=this._list)==null?void 0:e.value)==null||n.focusNext()}hide(e){var n;(n=this._list.value)==null||n.hide(e),this._list.clear()}_renderWidget(e,n,i){var f;const r=document.createElement("div");if(r.classList.add("action-widget"),e.appendChild(r),this._list.value=n,this._list.value)r.appendChild(this._list.value.domNode);else throw new Error("List has no value");const o=new Lt,s=document.createElement("div"),a=e.appendChild(s);a.classList.add("context-view-block"),o.add(yt(a,Yt.MOUSE_DOWN,m=>m.stopPropagation()));const l=document.createElement("div"),c=e.appendChild(l);c.classList.add("context-view-pointerBlock"),o.add(yt(c,Yt.POINTER_MOVE,()=>c.remove())),o.add(yt(c,Yt.MOUSE_DOWN,()=>c.remove()));let u=0;if(i.length){const m=this._createActionBar(".action-widget-action-bar",i);m&&(r.appendChild(m.getContainer().parentElement),o.add(m),u=m.getContainer().offsetWidth)}const d=(f=this._list.value)==null?void 0:f.layout(u);r.style.width=`${d}px`;const h=o.add(q0(e));return o.add(h.onDidBlur(()=>this.hide(!0))),o}_createActionBar(e,n){if(!n.length)return;const i=Xt(e),r=new Ap(i);return r.push(n,{icon:!1,label:!0}),r}_onWidgetClosed(e){var n;(n=this._list.value)==null||n.hide(e)}};bA=IMr([VSe(0,US),VSe(1,vi),VSe(2,qn)],bA);Rr(_R,bA,1);const LG=1100;cs(class extends qh{constructor(){super({id:"hideCodeActionWidget",title:Ci("hideCodeActionWidget.title","Hide action widget"),precondition:gA.Visible,keybinding:{weight:LG,primary:9,secondary:[1033]}})}run(t){t.get(_R).hide(!0)}});cs(class extends qh{constructor(){super({id:"selectPrevCodeAction",title:Ci("selectPrevCodeAction.title","Select previous action"),precondition:gA.Visible,keybinding:{weight:LG,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(t){const e=t.get(_R);e instanceof bA&&e.focusPrevious()}});cs(class extends qh{constructor(){super({id:"selectNextCodeAction",title:Ci("selectNextCodeAction.title","Select next action"),precondition:gA.Visible,keybinding:{weight:LG,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(t){const e=t.get(_R);e instanceof bA&&e.focusNext()}});cs(class extends qh{constructor(){super({id:bqt,title:Ci("acceptSelected.title","Accept selected action"),precondition:gA.Visible,keybinding:{weight:LG,primary:3,secondary:[2137]}})}run(t){const e=t.get(_R);e instanceof bA&&e.acceptSelected()}});cs(class extends qh{constructor(){super({id:vqt,title:Ci("previewSelected.title","Preview selected action"),precondition:gA.Visible,keybinding:{weight:LG,primary:2051}})}run(t){const e=t.get(_R);e instanceof bA&&e.acceptSelected(!0)}});const _qt=new gn("supportedCodeAction",""),Syt="_typescript.applyFixAllCodeAction";class AMr extends ct{constructor(e,n,i,r=250){super(),this._editor=e,this._markerService=n,this._signalChange=i,this._delay=r,this._autoTriggerTimer=this._register(new Gv),this._register(this._markerService.onMarkerChanged(o=>this._onMarkerChanges(o))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const n=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(n?{trigger:e,selection:n}:void 0)}_onMarkerChanges(e){const n=this._editor.getModel();n&&e.some(i=>IVe(i,n.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Pm.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const n=this._editor.getSelection();if(e.type===1)return n;const i=this._editor.getOption(65).enabled;if(i!==Jb.Off){{if(i===Jb.On)return n;if(i===Jb.OnCode){if(!n.isEmpty())return n;const o=this._editor.getModel(),{lineNumber:s,column:a}=n.getPosition(),l=o.getLineContent(s);if(l.length===0)return;if(a===1){if(/\s/.test(l[0]))return}else if(a===o.getLineMaxColumn(s)){if(/\s/.test(l[l.length-1]))return}else if(/\s/.test(l[a-2])&&/\s/.test(l[a-1]))return}}return n}}}var gT;(function(t){t.Empty={type:0};class e{constructor(i,r,o){this.trigger=i,this.position=r,this._cancellablePromise=o,this.type=1,this.actions=o.catch(s=>{if(yb(s))return xqt;throw s})}cancel(){this._cancellablePromise.cancel()}}t.Triggered=e})(gT||(gT={}));const xqt=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class RMr extends ct{constructor(e,n,i,r,o,s){super(),this._editor=e,this._registry=n,this._markerService=i,this._progressService=o,this._configurationService=s,this._codeActionOracle=this._register(new mc),this._state=gT.Empty,this._onDidChangeState=this._register(new st),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=_qt.bindTo(r),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._register(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(65)&&this._update()})),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(gT.Empty,!0))}_settingEnabledNearbyQuickfixes(){var n;const e=(n=this._editor)==null?void 0:n.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:e==null?void 0:e.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(gT.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(92)){const n=this._registry.all(e).flatMap(i=>i.providedCodeActionKinds??[]);this._supportedCodeActions.set(n.join(" ")),this._codeActionOracle.value=new AMr(this._editor,this._markerService,i=>{var l;if(!i){this.setState(gT.Empty);return}const r=i.selection.getStartPosition(),o=cc(async c=>{var u,d,h,f,m,p,g,y,_,w;if(this._settingEnabledNearbyQuickfixes()&&i.trigger.type===1&&(i.trigger.triggerAction===Pm.QuickFix||(d=(u=i.trigger.filter)==null?void 0:u.include)!=null&&d.contains(js.QuickFix))){const C=await $B(this._registry,e,i.selection,i.trigger,Ux.None,c),N=[...C.allActions];if(c.isCancellationRequested)return xqt;const E=(h=C.validActions)==null?void 0:h.some(k=>k.action.kind?js.QuickFix.contains(new Ys(k.action.kind)):!1),D=this._markerService.read({resource:e.uri});if(E){for(const k of C.validActions)(m=(f=k.action.command)==null?void 0:f.arguments)!=null&&m.some(M=>typeof M=="string"&&M.includes(Syt))&&(k.action.diagnostics=[...D.filter(M=>M.relatedInformation)]);return{validActions:C.validActions,allActions:N,documentation:C.documentation,hasAutoFix:C.hasAutoFix,hasAIFix:C.hasAIFix,allAIFixes:C.allAIFixes,dispose:()=>{C.dispose()}}}else if(!E&&D.length>0){const k=i.selection.getPosition();let M=k,T=Number.MAX_VALUE;const A=[...C.validActions];for(const P of D){const O=P.endColumn,V=P.endLineNumber,F=P.startLineNumber;if(V===k.lineNumber||F===k.lineNumber){M=new ot(V,O);const $={type:i.trigger.type,triggerAction:i.trigger.triggerAction,filter:{include:(p=i.trigger.filter)!=null&&p.include?(g=i.trigger.filter)==null?void 0:g.include:js.QuickFix},autoApply:i.trigger.autoApply,context:{notAvailableMessage:((y=i.trigger.context)==null?void 0:y.notAvailableMessage)||"",position:M}},B=new Pn(M.lineNumber,M.column,M.lineNumber,M.column),z=await $B(this._registry,e,B,$,Ux.None,c);if(z.validActions.length!==0){for(const H of z.validActions)(w=(_=H.action.command)==null?void 0:_.arguments)!=null&&w.some(K=>typeof K=="string"&&K.includes(Syt))&&(H.action.diagnostics=[...D.filter(K=>K.relatedInformation)]);C.allActions.length===0&&N.push(...z.allActions),Math.abs(k.column-O)<T?A.unshift(...z.validActions):A.push(...z.validActions)}T=Math.abs(k.column-O)}}const R=A.filter((P,O,V)=>V.findIndex(F=>F.action.title===P.action.title)===O);return R.sort((P,O)=>P.action.isPreferred&&!O.action.isPreferred?-1:!P.action.isPreferred&&O.action.isPreferred||P.action.isAI&&!O.action.isAI?1:!P.action.isAI&&O.action.isAI?-1:0),{validActions:R,allActions:N,documentation:C.documentation,hasAutoFix:C.hasAutoFix,hasAIFix:C.hasAIFix,allAIFixes:C.allAIFixes,dispose:()=>{C.dispose()}}}}return $B(this._registry,e,i.selection,i.trigger,Ux.None,c)});i.trigger.type===1&&((l=this._progressService)==null||l.showWhile(o,250));const s=new gT.Triggered(i.trigger,r,o);let a=!1;this._state.type===1&&(a=this._state.trigger.type===1&&s.type===1&&s.trigger.type===2&&this._state.position!==s.position),a?setTimeout(()=>{this.setState(s)},500):this.setState(s)},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Pm.Default})}else this._supportedCodeActions.reset()}trigger(e){var n;(n=this._codeActionOracle.value)==null||n.trigger(e)}setState(e,n){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!n&&!this._disposed&&this._onDidChangeState.fire(e))}}var PMr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},x1=function(t,e){return function(n,i){e(n,i,t)}},VO;const OMr="quickfix-edit-highlight";var kD;let cF=(kD=class extends ct{static get(e){return e.getContribution(VO.ID)}constructor(e,n,i,r,o,s,a,l,c,u){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=c,this._instantiationService=u,this._activeCodeActions=this._register(new mc),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new RMr(this._editor,o.codeActionProvider,n,i,s,l)),this._register(this._model.onDidChangeState(d=>this.update(d))),this._lightBulbWidget=new U0(()=>{const d=this._editor.getContribution(IU.ID);return d&&this._register(d.onClick(h=>this.showCodeActionsFromLightbulb(h.actions,h))),d}),this._resolver=r.createInstance(eOe),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(e,n){if(e.allAIFixes&&e.validActions.length===1){const i=e.validActions[0],r=i.action.command;r&&r.id==="inlineChat.start"&&r.arguments&&r.arguments.length>=1&&(r.arguments[0]={...r.arguments[0],autoSend:!1}),await this._applyCodeAction(i,!1,!1,qT.FromAILightbulb);return}await this.showCodeActionList(e,n,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(e,n,i){return this.showCodeActionList(n,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,n,i,r){var s;if(!this._editor.hasModel())return;(s=Sm.get(this._editor))==null||s.closeMessage();const o=this._editor.getPosition();this._trigger({type:1,triggerAction:n,filter:i,autoApply:r,context:{notAvailableMessage:e,position:o}})}_trigger(e){return this._model.trigger(e)}async _applyCodeAction(e,n,i,r){try{await this._instantiationService.invokeFunction(xMr,e,r,{preview:i,editor:this._editor})}finally{n&&this._trigger({type:2,triggerAction:Pm.QuickFix,filter:{}})}}hideLightBulbWidget(){var e,n;(e=this._lightBulbWidget.rawValue)==null||e.hide(),(n=this._lightBulbWidget.rawValue)==null||n.gutterHide()}async update(e){var i,r,o,s,a;if(e.type!==1){this.hideLightBulbWidget();return}let n;try{n=await e.actions}catch(l){ji(l);return}if(!this._disposed)if((i=this._lightBulbWidget.value)==null||i.update(n,e.trigger,e.position),e.trigger.type===1){if((r=e.trigger.filter)!=null&&r.include){const c=this.tryGetValidActionToApply(e.trigger,n);if(c){try{this.hideLightBulbWidget(),await this._applyCodeAction(c,!1,!1,qT.FromCodeActions)}finally{n.dispose()}return}if(e.trigger.context){const u=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,n);if(u&&u.action.disabled){(o=Sm.get(this._editor))==null||o.showMessage(u.action.disabled,e.trigger.context.position),n.dispose();return}}}const l=!!((s=e.trigger.filter)!=null&&s.include);if(e.trigger.context&&(!n.allActions.length||!l&&!n.validActions.length)){(a=Sm.get(this._editor))==null||a.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=n,n.dispose();return}this._activeCodeActions.value=n,this.showCodeActionList(n,this.toCoords(e.position),{includeDisabledActions:l,fromLightbulb:!1})}else this._actionWidgetService.isVisible?n.dispose():this._activeCodeActions.value=n}getInvalidActionThatWouldHaveBeenApplied(e,n){if(n.allActions.length&&(e.autoApply==="first"&&n.validActions.length===0||e.autoApply==="ifSingle"&&n.allActions.length===1))return n.allActions.find(({action:i})=>i.disabled)}tryGetValidActionToApply(e,n){if(n.validActions.length&&(e.autoApply==="first"&&n.validActions.length>0||e.autoApply==="ifSingle"&&n.validActions.length===1))return n.validActions[0]}async showCodeActionList(e,n,i){const r=this._editor.createDecorationsCollection(),o=this._editor.getDomNode();if(!o)return;const s=i.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!s.length)return;const a=ot.isIPosition(n)?this.toCoords(n):n,l={onSelect:async(c,u)=>{this._applyCodeAction(c,!0,!!u,i.fromLightbulb?qT.FromAILightbulb:qT.FromCodeActions),this._actionWidgetService.hide(!1),r.clear()},onHide:c=>{var u;(u=this._editor)==null||u.focus(),r.clear()},onHover:async(c,u)=>{var f;if(u.isCancellationRequested)return;let d=!1;const h=c.action.kind;if(h){const m=new Ys(h);d=[js.RefactorExtract,js.RefactorInline,js.RefactorRewrite,js.RefactorMove,js.Source].some(g=>g.contains(m))}return{canPreview:d||!!((f=c.action.edit)!=null&&f.edits.length)}},onFocus:c=>{var u,d;if(c&&c.action){const h=c.action.ranges,f=c.action.diagnostics;if(r.clear(),h&&h.length>0){const m=f&&(f==null?void 0:f.length)>1?f.map(p=>({range:p,options:VO.DECORATION})):h.map(p=>({range:p,options:VO.DECORATION}));r.set(m)}else if(f&&f.length>0){const m=f.map(g=>({range:g,options:VO.DECORATION}));r.set(m);const p=f[0];if(p.startLineNumber&&p.startColumn){const g=(d=(u=this._editor.getModel())==null?void 0:u.getWordAtPosition({lineNumber:p.startLineNumber,column:p.startColumn}))==null?void 0:d.word;hw(I("editingNewSelection","Context: {0} at line {1} and column {2}.",g,p.startLineNumber,p.startColumn))}}}else r.clear()}};this._actionWidgetService.show("codeActionWidget",!0,EMr(s,this._shouldShowHeaders(),this._resolver.getResolver()),l,a,o,this._getActionBarActions(e,n,i))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const n=this._editor.getScrolledVisiblePosition(e),i=Ga(this._editor.getDomNode()),r=i.left+n.left,o=i.top+n.top+n.height;return{x:r,y:o}}_shouldShowHeaders(){var n;const e=(n=this._editor)==null?void 0:n.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:e==null?void 0:e.uri})}_getActionBarActions(e,n,i){if(i.fromLightbulb)return[];const r=e.documentation.map(o=>({id:o.id,label:o.title,tooltip:o.tooltip??"",class:void 0,enabled:!0,run:()=>this._commandService.executeCommand(o.id,...o.arguments??[])}));return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&r.push(this._showDisabled?{id:"hideMoreActions",label:I("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,n,i))}:{id:"showMoreActions",label:I("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,n,i))}),r}},VO=kD,kD.ID="editor.contrib.codeActionController",kD.DECORATION=Hi.register({description:"quickfix-highlight",className:OMr}),kD);cF=VO=PMr([x1(1,Ow),x1(2,vi),x1(3,qn),x1(4,Ln),x1(5,oM),x1(6,gs),x1(7,cr),x1(8,_R),x1(9,qn)],cF);_b((t,e)=>{((r,o)=>{o&&e.addRule(`.monaco-editor ${r} { background-color: ${o}; }`)})(".quickfix-edit-highlight",t.getColor(lC));const i=t.getColor(WE);i&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${S0(t.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`)});function TG(t){return Tt.regex(_qt.keys()[0],new RegExp("(\\s|^)"+Hp(t.value)+"\\b"))}const oWe={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:I("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:I("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[I("args.schema.apply.first","Always apply the first returned code action."),I("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),I("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:I("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function xR(t,e,n,i,r=Pm.Default){if(t.hasModel()){const o=cF.get(t);o==null||o.manualTriggerAtCurrentPosition(e,r,n,i)}}class jMr extends En{constructor(){super({id:rWe,label:I("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:Tt.and(Re.writable,Re.hasCodeActionsProvider),kbOpts:{kbExpr:Re.textInputFocus,primary:2137,weight:100}})}run(e,n){return xR(n,I("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Pm.QuickFix)}}class FMr extends Zl{constructor(){super({id:dqt,precondition:Tt.and(Re.writable,Re.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:oWe}]}})}runEditorCommand(e,n,i){const r=Ex.fromUser(i,{kind:Ys.Empty,apply:"ifSingle"});return xR(n,typeof(i==null?void 0:i.kind)=="string"?r.preferred?I("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):I("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):r.preferred?I("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):I("editor.action.codeAction.noneMessage","No code actions available"),{include:r.kind,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}}class $Mr extends En{constructor(){super({id:fqt,label:I("refactor.label","Refactor..."),alias:"Refactor...",precondition:Tt.and(Re.writable,Re.hasCodeActionsProvider),kbOpts:{kbExpr:Re.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:Tt.and(Re.writable,TG(js.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:oWe}]}})}run(e,n,i){const r=Ex.fromUser(i,{kind:js.Refactor,apply:"never"});return xR(n,typeof(i==null?void 0:i.kind)=="string"?r.preferred?I("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):I("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):r.preferred?I("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):I("editor.action.refactor.noneMessage","No refactorings available"),{include:js.Refactor.contains(r.kind)?r.kind:Ys.None,onlyIncludePreferredActions:r.preferred},r.apply,Pm.Refactor)}}class VMr extends En{constructor(){super({id:mqt,label:I("source.label","Source Action..."),alias:"Source Action...",precondition:Tt.and(Re.writable,Re.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:Tt.and(Re.writable,TG(js.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:oWe}]}})}run(e,n,i){const r=Ex.fromUser(i,{kind:js.Source,apply:"never"});return xR(n,typeof(i==null?void 0:i.kind)=="string"?r.preferred?I("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):I("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):r.preferred?I("editor.action.source.noneMessage.preferred","No preferred source actions available"):I("editor.action.source.noneMessage","No source actions available"),{include:js.Source.contains(r.kind)?r.kind:Ys.None,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply,Pm.SourceAction)}}class BMr extends En{constructor(){super({id:ZPe,label:I("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:Tt.and(Re.writable,TG(js.SourceOrganizeImports)),kbOpts:{kbExpr:Re.textInputFocus,primary:1581,weight:100}})}run(e,n){return xR(n,I("editor.action.organize.noneMessage","No organize imports action available"),{include:js.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Pm.OrganizeImports)}}class zMr extends En{constructor(){super({id:QPe,label:I("fixAll.label","Fix All"),alias:"Fix All",precondition:Tt.and(Re.writable,TG(js.SourceFixAll))})}run(e,n){return xR(n,I("fixAll.noneMessage","No fix all action available"),{include:js.SourceFixAll,includeSourceActions:!0},"ifSingle",Pm.FixAll)}}class HMr extends En{constructor(){super({id:hqt,label:I("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:Tt.and(Re.writable,TG(js.QuickFix)),kbOpts:{kbExpr:Re.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,n){return xR(n,I("editor.action.autoFix.noneMessage","No auto fixes available"),{include:js.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Pm.AutoFix)}}Wr(cF.ID,cF,3);Wr(IU.ID,IU,4);Ht(jMr);Ht($Mr);Ht(VMr);Ht(BMr);Ht(HMr);Ht(zMr);fn(new FMr);la.as(Yv.Configuration).registerConfiguration({...Aq,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:I("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}});la.as(Yv.Configuration).registerConfiguration({...Aq,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:I("includeNearbyQuickFixes","Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}});la.as(Yv.Configuration).registerConfiguration({...Aq,properties:{"editor.codeActions.triggerOnFocusChange":{type:"boolean",scope:5,markdownDescription:I("triggerOnFocusChange","Enable triggering {0} when {1} is set to {2}. Code Actions must be set to {3} to be triggered for window and focus changes.","`#editor.codeActionsOnSave#`","`#files.autoSave#`","`afterDelay`","`always`"),default:!1}}});class rOe{constructor(){this.lenses=[],this._disposables=new Lt}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,n){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:n})}}async function wqt(t,e,n){const i=t.ordered(e),r=new Map,o=new rOe,s=i.map(async(a,l)=>{r.set(a,l);try{const c=await Promise.resolve(a.provideCodeLenses(e,n));c&&o.add(c,a)}catch(c){$a(c)}});return await Promise.all(s),o.lenses=o.lenses.sort((a,l)=>a.symbol.range.startLineNumber<l.symbol.range.startLineNumber?-1:a.symbol.range.startLineNumber>l.symbol.range.startLineNumber?1:r.get(a.provider)<r.get(l.provider)?-1:r.get(a.provider)>r.get(l.provider)?1:a.symbol.range.startColumn<l.symbol.range.startColumn?-1:a.symbol.range.startColumn>l.symbol.range.startColumn?1:0),o}Ar.registerCommand("_executeCodeLensProvider",function(t,...e){let[n,i]=e;Gr(ri.isUri(n)),Gr(typeof i=="number"||!i);const{codeLensProvider:r}=t.get(Ln),o=t.get(Ds).getModel(n);if(!o)throw Jg();const s=[],a=new Lt;return wqt(r,o,er.None).then(l=>{a.add(l);const c=[];for(const u of l.lenses)i==null||u.symbol.command?s.push(u.symbol):i-- >0&&u.provider.resolveCodeLens&&c.push(Promise.resolve(u.provider.resolveCodeLens(o,u.symbol,er.None)).then(d=>s.push(d||u.symbol)));return Promise.all(c)}).then(()=>s).finally(()=>{setTimeout(()=>a.dispose(),100)})});var WMr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},UMr=function(t,e){return function(n,i){e(n,i,t)}};const Cqt=Sr("ICodeLensCache");class Nyt{constructor(e,n){this.lineCount=e,this.data=n}}let oOe=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new Aw(20,.75);const n="codelens/cache";q7(Go,()=>e.remove(n,1));const i="codelens/cache2",r=e.get(i,1,"{}");this._deserialize(r);const o=rn.filter(e.onWillSaveState,s=>s.reason===lW.SHUTDOWN);rn.once(o)(s=>{e.store(i,this._serialize(),1,1)})}put(e,n){const i=n.lenses.map(s=>{var a;return{range:s.symbol.range,command:s.symbol.command&&{id:"",title:(a=s.symbol.command)==null?void 0:a.title}}}),r=new rOe;r.add({lenses:i,dispose:()=>{}},this._fakeProvider);const o=new Nyt(e.getLineCount(),r);this._cache.set(e.uri.toString(),o)}get(e){const n=this._cache.get(e.uri.toString());return n&&n.lineCount===e.getLineCount()?n.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[n,i]of this._cache){const r=new Set;for(const o of i.data.lenses)r.add(o.symbol.range.startLineNumber);e[n]={lineCount:i.lineCount,lines:[...r.values()]}}return JSON.stringify(e)}_deserialize(e){try{const n=JSON.parse(e);for(const i in n){const r=n[i],o=[];for(const a of r.lines)o.push({range:new ve(a,1,a,11)});const s=new rOe;s.add({lenses:o,dispose(){}},this._fakeProvider),this._cache.set(i,new Nyt(r.lineCount,s))}}catch{}}};oOe=WMr([UMr(0,Xv)],oOe);Rr(Cqt,oOe,1);class KMr{constructor(e,n,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=n,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}const uz=class uz{constructor(e,n){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${uz._idPool++}`,this.updatePosition(n),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,n){this._commands.clear();const i=[];let r=!1;for(let o=0;o<e.length;o++){const s=e[o];if(s&&(r=!0,s.command)){const a=bD(s.command.title.trim());if(s.command.id){const l=`c${uz._idPool++}`;i.push(Xt("a",{id:l,title:s.command.tooltip,role:"button"},...a)),this._commands.set(l,s.command)}else i.push(Xt("span",{title:s.command.tooltip},...a));o+1<e.length&&i.push(Xt("span",void 0," | "))}}r?(ou(this._domNode,...i),this._isEmpty&&n&&this._domNode.classList.add("fadein"),this._isEmpty=!1):ou(this._domNode,Xt("span",void 0,"no commands"))}getCommand(e){return e.parentElement===this._domNode?this._commands.get(e.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(e){const n=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:n},preference:[1]}}getPosition(){return this._widgetPosition||null}};uz._idPool=0;let sOe=uz;class BSe{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(e,n){this._addDecorations.push(e),this._addDecorationsCallbacks.push(n)}removeDecoration(e){this._removeDecorations.push(e)}commit(e){const n=e.deltaDecorations(this._removeDecorations,this._addDecorations);for(let i=0,r=n.length;i<r;i++)this._addDecorationsCallbacks[i](n[i])}}const Eyt=Hi.register({collapseOnReplaceEdit:!0,description:"codelens"});class Dyt{constructor(e,n,i,r,o,s){this._isDisposed=!1,this._editor=n,this._data=e,this._decorationIds=[];let a;const l=[];this._data.forEach((c,u)=>{c.symbol.command&&l.push(c.symbol),i.addDecoration({range:c.symbol.range,options:Eyt},d=>this._decorationIds[u]=d),a?a=ve.plusRange(a,c.symbol.range):a=ve.lift(c.symbol.range)}),this._viewZone=new KMr(a.startLineNumber-1,o,s),this._viewZoneId=r.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new sOe(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,n){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],n==null||n.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,n)=>{const i=this._editor.getModel().getDecorationRange(e),r=this._data[n].symbol;return!!(i&&ve.isEmpty(r.range)===i.isEmpty())})}updateCodeLensSymbols(e,n){this._decorationIds.forEach(n.removeDecoration,n),this._decorationIds=[],this._data=e,this._data.forEach((i,r)=>{n.addDecoration({range:i.symbol.range,options:Eyt},o=>this._decorationIds[r]=o)})}updateHeight(e,n){this._viewZone.heightInPx=e,n.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let n=0;n<this._decorationIds.length;n++){const i=e.getDecorationRange(this._decorationIds[n]);i&&(this._data[n].symbol.range=i)}return this._data}updateCommands(e){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(e,!0);for(let n=0;n<this._data.length;n++){const i=e[n];if(i){const{symbol:r}=this._data[n];r.command=i.command||r.command}}}getCommand(e){var n;return(n=this._contentWidget)==null?void 0:n.getCommand(e)}getLineNumber(){const e=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return e?e.startLineNumber:-1}update(e){if(this.isValid()){const n=this._editor.getModel().getDecorationRange(this._decorationIds[0]);n&&(this._viewZone.afterLineNumber=n.startLineNumber-1,e.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(n.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}}var qMr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},E7=function(t,e){return function(n,i){e(n,i,t)}},ej;let AU=(ej=class{constructor(e,n,i,r,o,s){this._editor=e,this._languageFeaturesService=n,this._commandService=r,this._notificationService=o,this._codeLensCache=s,this._disposables=new Lt,this._localToDispose=new Lt,this._lenses=[],this._oldCodeLensModels=new Lt,this._provideCodeLensDebounce=i.for(n.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(n.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Wo(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{(a.hasChanged(50)||a.hasChanged(19)||a.hasChanged(18))&&this._updateLensStyle(),a.hasChanged(17)&&this._onModelChange()})),this._disposables.add(n.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)==null||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(67)/this._editor.getOption(52));let n=this._editor.getOption(19);return(!n||n<5)&&(n=this._editor.getOption(52)*.9|0),{fontSize:n,codeLensHeight:n*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:n}=this._getLayoutInfo(),i=this._editor.getOption(18),r=this._editor.getOption(50),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${n}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",r.fontFeatureSettings),i&&(o.setProperty("--vscode-editorCodeLens-fontFamily",i),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",Rh.fontFamily)),this._editor.changeViewZones(s=>{for(const a of this._lenses)a.updateHeight(e,s)})}_localDispose(){var e,n,i;(e=this._getCodeLensModelPromise)==null||e.cancel(),this._getCodeLensModelPromise=void 0,(n=this._resolveCodeLensesPromise)==null||n.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(i=this._currentCodeLensModel)==null||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const n=this._codeLensCache.get(e);if(n&&this._renderCodeLensSymbols(n),!this._languageFeaturesService.codeLensProvider.has(e)){n&&dk(()=>{const r=this._codeLensCache.get(e);n===r&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3,this._localToDispose);return}for(const r of this._languageFeaturesService.codeLensProvider.all(e))if(typeof r.onDidChange=="function"){const o=r.onDidChange(()=>i.schedule());this._localToDispose.add(o)}const i=new Wo(()=>{var o;const r=Date.now();(o=this._getCodeLensModelPromise)==null||o.cancel(),this._getCodeLensModelPromise=cc(s=>wqt(this._languageFeaturesService.codeLensProvider,e,s)),this._getCodeLensModelPromise.then(s=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=s,this._codeLensCache.put(e,s);const a=this._provideCodeLensDebounce.update(e,Date.now()-r);i.delay=a,this._renderCodeLensSymbols(s),this._resolveCodeLensesInViewportSoon()},ji)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(Kn(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var r;this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{const a=[];let l=-1;this._lenses.forEach(u=>{!u.isValid()||l===u.getLineNumber()?a.push(u):(u.update(s),l=u.getLineNumber())});const c=new BSe;a.forEach(u=>{u.dispose(c,s),this._lenses.splice(this._lenses.indexOf(u),1)}),c.commit(o)})}),i.schedule(),this._resolveCodeLensesScheduler.cancel(),(r=this._resolveCodeLensesPromise)==null||r.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorText(()=>{i.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{i.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(r=>{r.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Kn(()=>{if(this._editor.getModel()){const r=J0.capture(this._editor);this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{this._disposeAllLenses(o,s)})}),r.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(r=>{if(r.target.type!==9)return;let o=r.target.element;if((o==null?void 0:o.tagName)==="SPAN"&&(o=o.parentElement),(o==null?void 0:o.tagName)==="A")for(const s of this._lenses){const a=s.getCommand(o);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),i.schedule()}_disposeAllLenses(e,n){const i=new BSe;for(const r of this._lenses)r.dispose(i,n);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const n=this._editor.getModel().getLineCount(),i=[];let r;for(const a of e.lenses){const l=a.symbol.range.startLineNumber;l<1||l>n||(r&&r[r.length-1].symbol.range.startLineNumber===l?r.push(a):(r=[a],i.push(r)))}if(!i.length&&!this._lenses.length)return;const o=J0.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{const c=new BSe;let u=0,d=0;for(;d<i.length&&u<this._lenses.length;){const h=i[d][0].symbol.range.startLineNumber,f=this._lenses[u].getLineNumber();f<h?(this._lenses[u].dispose(c,l),this._lenses.splice(u,1)):f===h?(this._lenses[u].updateCodeLensSymbols(i[d],c),d++,u++):(this._lenses.splice(u,0,new Dyt(i[d],this._editor,c,l,s.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),u++,d++)}for(;u<this._lenses.length;)this._lenses[u].dispose(c,l),this._lenses.splice(u,1);for(;d<i.length;)this._lenses.push(new Dyt(i[d],this._editor,c,l,s.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),d++;c.commit(a)})}),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var s;(s=this._resolveCodeLensesPromise)==null||s.cancel(),this._resolveCodeLensesPromise=void 0;const e=this._editor.getModel();if(!e)return;const n=[],i=[];if(this._lenses.forEach(a=>{const l=a.computeIfNecessary(e);l&&(n.push(l),i.push(a))}),n.length===0)return;const r=Date.now(),o=cc(a=>{const l=n.map((c,u)=>{const d=new Array(c.length),h=c.map((f,m)=>!f.symbol.command&&typeof f.provider.resolveCodeLens=="function"?Promise.resolve(f.provider.resolveCodeLens(e,f.symbol,a)).then(p=>{d[m]=p},$a):(d[m]=f.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!a.isCancellationRequested&&!i[u].isDisposed()&&i[u].updateCommands(d)})});return Promise.all(l)});this._resolveCodeLensesPromise=o,this._resolveCodeLensesPromise.then(()=>{const a=this._resolveCodeLensesDebounce.update(e,Date.now()-r);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(e,this._currentCodeLensModel),this._oldCodeLensModels.clear(),o===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{ji(a),o===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}async getModel(){var e;return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,(e=this._currentCodeLensModel)!=null&&e.isDisposed?void 0:this._currentCodeLensModel}},ej.ID="css.editor.codeLens",ej);AU=qMr([E7(1,Ln),E7(2,tg),E7(3,gs),E7(4,tl),E7(5,Cqt)],AU);Wr(AU.ID,AU,1);Ht(class extends En{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:Re.hasCodeLensProvider,label:I("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}async run(e,n){if(!n.hasModel())return;const i=e.get(wb),r=e.get(gs),o=e.get(tl),s=n.getSelection().positionLineNumber,a=n.getContribution(AU.ID);if(!a)return;const l=await a.getModel();if(!l)return;const c=[];for(const h of l.lenses)h.symbol.command&&h.symbol.range.startLineNumber===s&&c.push({label:h.symbol.command.title,command:h.symbol.command});if(c.length===0)return;const u=await i.pick(c,{canPickMany:!1,placeHolder:I("placeHolder","Select a command")});if(!u)return;let d=u.command;if(l.isDisposed){const h=await a.getModel(),f=h==null?void 0:h.lenses.find(m=>{var p;return m.symbol.range.startLineNumber===s&&((p=m.symbol.command)==null?void 0:p.title)===d.title});if(!f||!f.symbol.command)return;d=f.symbol.command}try{await r.executeCommand(d.id,...d.arguments||[])}catch(h){o.error(h)}}});var GMr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},zSe=function(t,e){return function(n,i){e(n,i,t)}};class sWe{constructor(e,n){this._editorWorkerClient=new G8e(e,!1,"editorWorkerService",n)}async provideDocumentColors(e,n){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,n,i){const r=n.range,o=n.color,s=o.alpha,a=new Rt(new jr(Math.round(255*o.red),Math.round(255*o.green),Math.round(255*o.blue),s)),l=s?Rt.Format.CSS.formatRGB(a):Rt.Format.CSS.formatRGBA(a),c=s?Rt.Format.CSS.formatHSL(a):Rt.Format.CSS.formatHSLA(a),u=s?Rt.Format.CSS.formatHex(a):Rt.Format.CSS.formatHexA(a),d=[];return d.push({label:l,textEdit:{range:r,text:l}}),d.push({label:c,textEdit:{range:r,text:c}}),d.push({label:u,textEdit:{range:r,text:u}}),d}}let aOe=class extends ct{constructor(e,n,i){super(),this._register(i.colorProvider.register("*",new sWe(e,n)))}};aOe=GMr([zSe(0,Ds),zSe(1,bs),zSe(2,Ln)],aOe);Bq(aOe);async function Sqt(t,e,n,i=!0){return aWe(new YMr,t,e,n,i)}function Nqt(t,e,n,i){return Promise.resolve(n.provideColorPresentations(t,e,i))}class YMr{constructor(){}async compute(e,n,i,r){const o=await e.provideDocumentColors(n,i);if(Array.isArray(o))for(const s of o)r.push({colorInfo:s,provider:e});return Array.isArray(o)}}class XMr{constructor(){}async compute(e,n,i,r){const o=await e.provideDocumentColors(n,i);if(Array.isArray(o))for(const s of o)r.push({range:s.range,color:[s.color.red,s.color.green,s.color.blue,s.color.alpha]});return Array.isArray(o)}}class ZMr{constructor(e){this.colorInfo=e}async compute(e,n,i,r){const o=await e.provideColorPresentations(n,this.colorInfo,er.None);return Array.isArray(o)&&r.push(...o),Array.isArray(o)}}async function aWe(t,e,n,i,r){let o=!1,s;const a=[],l=e.ordered(n);for(let c=l.length-1;c>=0;c--){const u=l[c];if(u instanceof sWe)s=u;else try{await t.compute(u,n,i,a)&&(o=!0)}catch(d){$a(d)}}return o?a:s&&r?(await t.compute(s,n,i,a),a):[]}function Eqt(t,e){const{colorProvider:n}=t.get(Ln),i=t.get(Ds).getModel(e);if(!i)throw Jg();const r=t.get(cr).getValue("editor.defaultColorDecorators",{resource:e});return{model:i,colorProviderRegistry:n,isDefaultColorDecoratorsEnabled:r}}Ar.registerCommand("_executeDocumentColorProvider",function(t,...e){const[n]=e;if(!(n instanceof ri))throw Jg();const{model:i,colorProviderRegistry:r,isDefaultColorDecoratorsEnabled:o}=Eqt(t,n);return aWe(new XMr,r,i,er.None,o)});Ar.registerCommand("_executeColorPresentationProvider",function(t,...e){const[n,i]=e,{uri:r,range:o}=i;if(!(r instanceof ri)||!Array.isArray(n)||n.length!==4||!ve.isIRange(o))throw Jg();const{model:s,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=Eqt(t,r),[c,u,d,h]=n;return aWe(new ZMr({range:o,color:{red:c,green:u,blue:d,alpha:h}}),a,s,er.None,l)});var QMr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},HSe=function(t,e){return function(n,i){e(n,i,t)}},lOe;const Dqt=Object.create({});var MD;let uF=(MD=class extends ct{constructor(e,n,i,r){super(),this._editor=e,this._configurationService=n,this._languageFeaturesService=i,this._localToDispose=this._register(new Lt),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new dre(this._editor),this._decoratorLimitReporter=new JMr,this._colorDecorationClassRefs=this._register(new Lt),this._debounceInformation=r.for(i.colorProvider,"Document Colors",{min:lOe.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(i.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(o=>{const s=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148);const a=s!==this._isColorDecoratorsEnabled||o.hasChanged(21),l=o.hasChanged(148);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const n=e.getLanguageId(),i=this._configurationService.getValue(n);if(i&&typeof i=="object"){const r=i.colorDecorators;if(r&&r.enable!==void 0&&!r.enable)return r.enable}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new Gv,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}async beginCompute(){this._computePromise=cc(async e=>{const n=this._editor.getModel();if(!n)return[];const i=new cu(!1),r=await Sqt(this._languageFeaturesService.colorProvider,n,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(n,i.elapsed()),r});try{const e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){ji(e)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const n=e.map(i=>({range:{startLineNumber:i.colorInfo.range.startLineNumber,startColumn:i.colorInfo.range.startColumn,endLineNumber:i.colorInfo.range.endLineNumber,endColumn:i.colorInfo.range.endColumn},options:Hi.EMPTY}));this._editor.changeDecorations(i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,n),this._colorDatas=new Map,this._decorationsIds.forEach((r,o)=>this._colorDatas.set(r,e[o]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const n=[],i=this._editor.getOption(21);for(let o=0;o<e.length&&n.length<i;o++){const{red:s,green:a,blue:l,alpha:c}=e[o].colorInfo.color,u=new jr(Math.round(s*255),Math.round(a*255),Math.round(l*255),c),d=`rgba(${u.r}, ${u.g}, ${u.b}, ${u.a})`,h=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:d}));n.push({range:{startLineNumber:e[o].colorInfo.range.startLineNumber,startColumn:e[o].colorInfo.range.startColumn,endLineNumber:e[o].colorInfo.range.endLineNumber,endColumn:e[o].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:m4t,inlineClassName:`${h.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:Dqt}}})}const r=i<e.length?i:!1;this._decoratorLimitReporter.update(e.length,r),this._colorDecoratorIds.set(n)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(e){const n=this._editor.getModel();if(!n)return null;const i=n.getDecorationsInRange(ve.fromPositions(e,e)).filter(r=>this._colorDatas.has(r.id));return i.length===0?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}},lOe=MD,MD.ID="editor.contrib.colorDetector",MD.RECOMPUTE_TIME=1e3,MD);uF=lOe=QMr([HSe(1,cr),HSe(2,Ln),HSe(3,tg)],uF);class JMr{constructor(){this._onDidChange=new st,this._computed=0,this._limited=!1}update(e,n){(e!==this._computed||n!==this._limited)&&(this._computed=e,this._limited=n,this._onDidChange.fire())}}Wr(uF.ID,uF,1);class eLr{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,n,i){this.presentationIndex=i,this._onColorFlushed=new st,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new st,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new st,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=n}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,n){let i=-1;for(let r=0;r<this.colorPresentations.length;r++)if(n.toLowerCase()===this.colorPresentations[r].label){i=r;break}if(i===-1){const r=n.split("(")[0].toLowerCase();for(let o=0;o<this.colorPresentations.length;o++)if(this.colorPresentations[o].label.toLowerCase().startsWith(r)){i=o;break}}i!==-1&&i!==this.presentationIndex&&(this.presentationIndex=i,this._onDidChangePresentation.fire(this.presentation))}flushColor(){this._onColorFlushed.fire(this._color)}}const vp=Xt;class tLr extends ct{constructor(e,n,i,r=!1){super(),this.model=n,this.showingStandaloneColorPicker=r,this._closeButton=null,this._domNode=vp(".colorpicker-header"),jt(e,this._domNode),this._pickedColorNode=jt(this._domNode,vp(".picked-color")),jt(this._pickedColorNode,vp("span.codicon.codicon-color-mode")),this._pickedColorPresentation=jt(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");const o=I("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",o),this._originalColorNode=jt(this._domNode,vp(".original-color")),this._originalColorNode.style.backgroundColor=Rt.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=i.getColorTheme().getColor(cre)||Rt.white,this._register(i.onDidColorThemeChange(s=>{this.backgroundColor=s.getColor(cre)||Rt.white})),this._register(yt(this._pickedColorNode,Yt.CLICK,()=>this.model.selectNextColorPresentation())),this._register(yt(this._originalColorNode,Yt.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(n.onDidChangeColor(this.onDidChangeColor,this)),this._register(n.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=Rt.Format.CSS.format(n.color)||"",this._pickedColorNode.classList.toggle("light",n.color.rgba.a<.5?this.backgroundColor.isLighter():n.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new nLr(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=Rt.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}class nLr extends ct{constructor(e){super(),this._onClicked=this._register(new st),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),jt(e,this._button);const n=document.createElement("div");n.classList.add("close-button-inner-div"),jt(this._button,n),jt(n,vp(".button"+ci.asCSSSelector(ks("color-picker-close",qt.close,I("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._register(yt(this._button,Yt.CLICK,()=>{this._onClicked.fire()}))}}class iLr extends ct{constructor(e,n,i,r=!1){super(),this.model=n,this.pixelRatio=i,this._insertButton=null,this._domNode=vp(".colorpicker-body"),jt(e,this._domNode),this._saturationBox=new rLr(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new oLr(this._domNode,this.model,r),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new sLr(this._domNode,this.model,r),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),r&&(this._insertButton=this._register(new aLr(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:n}){const i=this.model.color.hsva;this.model.color=new Rt(new Rx(i.h,e,n,i.a))}onDidOpacityChange(e){const n=this.model.color.hsva;this.model.color=new Rt(new Rx(n.h,n.s,n.v,e))}onDidHueChange(e){const n=this.model.color.hsva,i=(1-e)*360;this.model.color=new Rt(new Rx(i===360?0:i,n.s,n.v,n.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class rLr extends ct{constructor(e,n,i){super(),this.model=n,this.pixelRatio=i,this._onDidChange=new st,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new st,this.onColorFlushed=this._onColorFlushed.event,this._domNode=vp(".saturation-wrap"),jt(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",jt(this._domNode,this._canvas),this.selection=vp(".saturation-selection"),jt(this._domNode,this.selection),this.layout(),this._register(yt(this._domNode,Yt.POINTER_DOWN,r=>this.onPointerDown(r))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new R6);const n=Ga(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>this.onDidChangePosition(r.pageX-n.left,r.pageY-n.top),()=>null);const i=yt(e.target.ownerDocument,Yt.POINTER_UP,()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,n){const i=Math.max(0,Math.min(1,e/this.width)),r=Math.max(0,Math.min(1,1-n/this.height));this.paintSelection(i,r),this._onDidChange.fire({s:i,v:r})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,n=new Rt(new Rx(e.h,1,1,1)),i=this._canvas.getContext("2d"),r=i.createLinearGradient(0,0,this._canvas.width,0);r.addColorStop(0,"rgba(255, 255, 255, 1)"),r.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),r.addColorStop(1,"rgba(255, 255, 255, 0)");const o=i.createLinearGradient(0,0,0,this._canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this._canvas.width,this._canvas.height),i.fillStyle=Rt.Format.CSS.format(n),i.fill(),i.fillStyle=r,i.fill(),i.fillStyle=o,i.fill()}paintSelection(e,n){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-n*this.height}px`}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const n=e.hsva;this.paintSelection(n.s,n.v)}}class kqt extends ct{constructor(e,n,i=!1){super(),this.model=n,this._onDidChange=new st,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new st,this.onColorFlushed=this._onColorFlushed.event,i?(this.domNode=jt(e,vp(".standalone-strip")),this.overlay=jt(this.domNode,vp(".standalone-overlay"))):(this.domNode=jt(e,vp(".strip")),this.overlay=jt(this.domNode,vp(".overlay"))),this.slider=jt(this.domNode,vp(".slider")),this.slider.style.top="0px",this._register(yt(this.domNode,Yt.POINTER_DOWN,r=>this.onPointerDown(r))),this._register(n.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const n=this.getValue(e);this.updateSliderPosition(n)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const n=this._register(new R6),i=Ga(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),n.startMonitoring(e.target,e.pointerId,e.buttons,o=>this.onDidChangeTop(o.pageY-i.top),()=>null);const r=yt(e.target.ownerDocument,Yt.POINTER_UP,()=>{this._onColorFlushed.fire(),r.dispose(),n.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const n=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(n),this._onDidChange.fire(n)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class oLr extends kqt{constructor(e,n,i=!1){super(e,n,i),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:n,g:i,b:r}=e.rgba,o=new Rt(new jr(n,i,r,1)),s=new Rt(new jr(n,i,r,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}}class sLr extends kqt{constructor(e,n,i=!1){super(e,n,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class aLr extends ct{constructor(e){super(),this._onClicked=this._register(new st),this.onClicked=this._onClicked.event,this._button=jt(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._register(yt(this._button,Yt.CLICK,()=>{this._onClicked.fire()}))}get button(){return this._button}}class lLr extends eg{constructor(e,n,i,r,o=!1){super(),this.model=n,this.pixelRatio=i,this._register(EH.getInstance(ei(e)).onDidChange(()=>this.layout())),this._domNode=vp(".colorpicker-widget"),e.appendChild(this._domNode),this.header=this._register(new tLr(this._domNode,this.model,r,o)),this.body=this._register(new iLr(this._domNode,this.model,this.pixelRatio,o))}layout(){this.body.layout()}get domNode(){return this._domNode}}class WSe{constructor(e,n,i,r){this.priority=e,this.range=n,this.initialMousePosX=i,this.initialMousePosY=r,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,n){return e.type===1&&n.lineNumber===this.range.startLineNumber}}class $te{constructor(e,n,i,r,o,s){this.priority=e,this.owner=n,this.range=i,this.initialMousePosX=r,this.initialMousePosY=o,this.supportsMarkerHover=s,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,n){return e.type===2&&this.owner===e.owner}}class vA{constructor(e){this.renderedHoverParts=e}dispose(){for(const e of this.renderedHoverParts)e.dispose()}}const wR=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};var Mqt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Lqt=function(t,e){return function(n,i){e(n,i,t)}};class cLr{constructor(e,n,i,r){this.owner=e,this.range=n,this.model=i,this.provider=r,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let RU=class{constructor(e,n){this._editor=e,this._themeService=n,this.hoverOrdinal=2}computeSync(e,n){return[]}computeAsync(e,n,i){return xp.fromPromise(this._computeAsync(e,n,i))}async _computeAsync(e,n,i){if(!this._editor.hasModel())return[];const r=uF.get(this._editor);if(!r)return[];for(const o of n){if(!r.isColorDecoration(o))continue;const s=r.getColorData(o.range.getStartPosition());if(s)return[await Tqt(this,this._editor.getModel(),s.colorInfo,s.provider)]}return[]}renderHoverParts(e,n){const i=Iqt(this,this._editor,this._themeService,n,e);if(!i)return new vA([]);this._colorPicker=i.colorPicker;const r={hoverPart:i.hoverPart,hoverElement:this._colorPicker.domNode,dispose(){i.disposables.dispose()}};return new vA([r])}handleResize(){var e;(e=this._colorPicker)==null||e.layout()}isColorPickerVisible(){return!!this._colorPicker}};RU=Mqt([Lqt(1,Ql)],RU);class uLr{constructor(e,n,i,r){this.owner=e,this.range=n,this.model=i,this.provider=r}}let PU=class{constructor(e,n){this._editor=e,this._themeService=n,this._color=null}async createColorHover(e,n,i){if(!this._editor.hasModel()||!uF.get(this._editor))return null;const o=await Sqt(i,this._editor.getModel(),er.None);let s=null,a=null;for(const d of o){const h=d.colorInfo;ve.containsRange(h.range,e.range)&&(s=h,a=d.provider)}const l=s??e,c=a??n,u=!!s;return{colorHover:await Tqt(this,this._editor.getModel(),l,c),foundInEditor:u}}async updateEditorModel(e){if(!this._editor.hasModel())return;const n=e.model;let i=new ve(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(await Vte(this._editor.getModel(),n,this._color,i,e),i=Aqt(this._editor,i,n))}renderHoverParts(e,n){return Iqt(this,this._editor,this._themeService,n,e)}set color(e){this._color=e}get color(){return this._color}};PU=Mqt([Lqt(1,Ql)],PU);async function Tqt(t,e,n,i){const r=e.getValueInRange(n.range),{red:o,green:s,blue:a,alpha:l}=n.color,c=new jr(Math.round(o*255),Math.round(s*255),Math.round(a*255),l),u=new Rt(c),d=await Nqt(e,n,i,er.None),h=new eLr(u,[],0);return h.colorPresentations=d||[],h.guessColorPresentation(u,r),t instanceof RU?new cLr(t,ve.lift(n.range),h,i):new uLr(t,ve.lift(n.range),h,i)}function Iqt(t,e,n,i,r){if(i.length===0||!e.hasModel())return;if(r.setMinimumDimensions){const h=e.getOption(67)+8;r.setMinimumDimensions(new Do(302,h))}const o=new Lt,s=i[0],a=e.getModel(),l=s.model,c=o.add(new lLr(r.fragment,l,e.getOption(144),n,t instanceof PU));let u=!1,d=new ve(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn);if(t instanceof PU){const h=s.model.color;t.color=h,Vte(a,l,h,d,s),o.add(l.onColorFlushed(f=>{t.color=f}))}else o.add(l.onColorFlushed(async h=>{await Vte(a,l,h,d,s),u=!0,d=Aqt(e,d,l)}));return o.add(l.onDidChangeColor(h=>{Vte(a,l,h,d,s)})),o.add(e.onDidChangeModelContent(h=>{u?u=!1:(r.hide(),e.focus())})),{hoverPart:s,colorPicker:c,disposables:o}}function Aqt(t,e,n){const i=[],r=n.presentation.textEdit??{range:e,text:n.presentation.label,forceMoveMarkers:!1};i.push(r),n.presentation.additionalTextEdits&&i.push(...n.presentation.additionalTextEdits);const o=ve.lift(r.range),s=t.getModel()._setTrackedRange(null,o,3);return t.executeEdits("colorpicker",i),t.pushUndoStop(),t.getModel()._getTrackedRange(s)??o}async function Vte(t,e,n,i,r){const o=await Nqt(t,{range:i,color:{red:n.rgba.r/255,green:n.rgba.g/255,blue:n.rgba.b/255,alpha:n.rgba.a}},r.provider,er.None);e.colorPresentations=o||[]}const Rqt="editor.action.showHover",dLr="editor.action.showDefinitionPreviewHover",hLr="editor.action.scrollUpHover",fLr="editor.action.scrollDownHover",mLr="editor.action.scrollLeftHover",pLr="editor.action.scrollRightHover",gLr="editor.action.pageUpHover",bLr="editor.action.pageDownHover",vLr="editor.action.goToTopHover",yLr="editor.action.goToBottomHover",Nge="editor.action.increaseHoverVerbosityLevel",_Lr=I({key:"increaseHoverVerbosityLevel",comment:["Label for action that will increase the hover verbosity level."]},"Increase Hover Verbosity Level"),Ege="editor.action.decreaseHoverVerbosityLevel",xLr=I({key:"decreaseHoverVerbosityLevel",comment:["Label for action that will decrease the hover verbosity level."]},"Decrease Hover Verbosity Level"),Pqt="editor.action.inlineSuggest.commit",Oqt="editor.action.inlineSuggest.showPrevious",jqt="editor.action.inlineSuggest.showNext";var lWe=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},rv=function(t,e){return function(n,i){e(n,i,t)}},Bte;let cOe=class extends ct{constructor(e,n,i){super(),this.editor=e,this.model=n,this.instantiationService=i,this.alwaysShowToolbar=Oo(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).showToolbar==="always"),this.sessionPosition=void 0,this.position=Vn(this,r=>{var l,c;const o=(l=this.model.read(r))==null?void 0:l.primaryGhostText.read(r);if(!this.alwaysShowToolbar.read(r)||!o||o.parts.length===0)return this.sessionPosition=void 0,null;const s=o.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==o.lineNumber&&(this.sessionPosition=void 0);const a=new ot(o.lineNumber,Math.min(s,((c=this.sessionPosition)==null?void 0:c.column)??Number.MAX_SAFE_INTEGER));return this.sessionPosition=a,a}),this._register(Sf((r,o)=>{const s=this.model.read(r);if(!s||!this.alwaysShowToolbar.read(r))return;const a=sM((c,u)=>{const d=u.add(this.instantiationService.createInstance(dF,this.editor,!0,this.position,s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.activeCommands));return e.addContentWidget(d),u.add(Kn(()=>e.removeContentWidget(d))),u.add(ki(h=>{this.position.read(h)&&s.lastTriggerKind.read(h)!==x0.Explicit&&s.triggerExplicitly()})),d}),l=Fq(this,(c,u)=>!!this.position.read(c)||!!u);o.add(ki(c=>{l.read(c)&&a.read(c)}))}))}};cOe=lWe([rv(2,qn)],cOe);const wLr=ks("inline-suggestion-hints-next",qt.chevronRight,I("parameterHintsNextIcon","Icon for show next parameter hint.")),CLr=ks("inline-suggestion-hints-previous",qt.chevronLeft,I("parameterHintsPreviousIcon","Icon for show previous parameter hint."));var LD;let dF=(LD=class extends ct{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,n,i){const r=new xm(e,n,i,!0,()=>this._commandService.executeCommand(e)),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let s=n;return o&&(s=I({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",n,o.getLabel())),r.tooltip=s,r}constructor(e,n,i,r,o,s,a,l,c,u,d){super(),this.editor=e,this.withBorder=n,this._position=i,this._currentSuggestionIdx=r,this._suggestionCount=o,this._extraCommands=s,this._commandService=a,this.keybindingService=c,this._contextKeyService=u,this._menuService=d,this.id=`InlineSuggestionHintsContentWidget${Bte.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=pr("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[pr("div@toolBar")]),this.previousAction=this.createCommandAction(Oqt,I("previous","Previous"),ci.asClassName(CLr)),this.availableSuggestionCountAction=new xm("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(jqt,I("next","Next"),ci.asClassName(wLr)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(Rn.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Wo(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new Wo(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.toolBar=this._register(l.createInstance(uOe,this.nodes.toolBar,Rn.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:h=>h.startsWith("primary")},actionViewItemProvider:(h,f)=>{if(h instanceof wm)return l.createInstance(NLr,h,void 0);if(h===this.availableSuggestionCountAction){const m=new SLr(void 0,h,{label:!0,icon:!1});return m.setClass("availableSuggestionCount"),m}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(h=>{Bte._dropDownVisible=h})),this._register(ki(h=>{this._position.read(h),this.editor.layoutContentWidget(this)})),this._register(ki(h=>{const f=this._suggestionCount.read(h),m=this._currentSuggestionIdx.read(h);f!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${m+1}/${f}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),f!==void 0&&f>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(ki(h=>{const m=this._extraCommands.read(h).map(p=>({class:void 0,id:p.id,enabled:!0,tooltip:p.tooltip||"",label:p.title,run:g=>this._commandService.executeCommand(p.id)}));for(const[p,g]of this.inlineCompletionsActionsMenus.getActions())for(const y of g)y instanceof wm&&m.push(y);m.length>0&&m.unshift(new dc),this.toolBar.setAdditionalSecondaryActions(m)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}},Bte=LD,LD._dropDownVisible=!1,LD.id=0,LD);dF=Bte=lWe([rv(6,gs),rv(7,qn),rv(8,vo),rv(9,vi),rv(10,Jp)],dF);class SLr extends y5{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}updateTooltip(){}}let NLr=class extends _k{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const n=pr("div.keybinding").root;this._register(new W6(n,pm,{disableTitle:!0,...EFt})).set(e),this.label.textContent=this._action.label,this.label.appendChild(n),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}updateTooltip(){}},uOe=class extends gW{constructor(e,n,i,r,o,s,a,l,c){super(e,{resetMenu:n,...i},r,o,s,a,l,c),this.menuId=n,this.options2=i,this.menuService=r,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var i,r,o,s,a,l,c;const e=[],n=[];Cme(this.menu,(i=this.options2)==null?void 0:i.menuOptions,{primary:e,secondary:n},(o=(r=this.options2)==null?void 0:r.toolbarOptions)==null?void 0:o.primaryGroup,(a=(s=this.options2)==null?void 0:s.toolbarOptions)==null?void 0:a.shouldInlineSubmenu,(c=(l=this.options2)==null?void 0:l.toolbarOptions)==null?void 0:c.useSeparatorsInPrimaryActions),n.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),this.setActions(e,n)}setPrependedPrimaryActions(e){Xs(this.prependedPrimaryActions,e,(n,i)=>n===i)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){Xs(this.additionalActions,e,(n,i)=>n===i)||(this.additionalActions=e,this.updateToolbar())}};uOe=lWe([rv(3,Jp),rv(4,vi),rv(5,Hm),rv(6,vo),rv(7,gs),rv(8,eh)],uOe);class cWe{constructor(){this._onDidWillResize=new st,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new st,this.onDidResize=this._onDidResize.event,this._sashListener=new Lt,this._size=new Do(0,0),this._minSize=new Do(0,0),this._maxSize=new Do(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new td(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new td(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new td(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:toe.North}),this._southSash=new td(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:toe.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,n=0,i=0;this._sashListener.add(rn.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,n=0,i=0)})),this._sashListener.add(rn.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,n=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(r=>{e&&(i=r.currentX-r.startX,this.layout(e.height+n,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(r=>{e&&(i=-(r.currentX-r.startX),this.layout(e.height+n,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(r=>{e&&(n=-(r.currentY-r.startY),this.layout(e.height+n,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(r=>{e&&(n=r.currentY-r.startY,this.layout(e.height+n,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(rn.any(this._eastSash.onDidReset,this._westSash.onDidReset)(r=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(rn.any(this._northSash.onDidReset,this._southSash.onDidReset)(r=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,n,i,r){this._northSash.state=e?3:0,this._eastSash.state=n?3:0,this._southSash.state=i?3:0,this._westSash.state=r?3:0}layout(e=this.size.height,n=this.size.width){const{height:i,width:r}=this._minSize,{height:o,width:s}=this._maxSize;e=Math.max(i,Math.min(o,e)),n=Math.max(r,Math.min(s,n));const a=new Do(n,e);Do.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=n+"px",this._size=a,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}const ELr=30,DLr=24;class kLr extends ct{constructor(e,n=new Do(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new cWe),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=Do.lift(n),this._resizableNode.layout(n.height,n.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(i=>{this._resize(new Do(i.dimension.width,i.dimension.height)),i.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return(e=this._contentPosition)!=null&&e.position?ot.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const n=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);return!n||!i?void 0:Ga(n).top+i.top-ELr}_availableVerticalSpaceBelow(e){const n=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!n||!i)return;const r=Ga(n),o=hk(n.ownerDocument.body),s=r.top+i.top+i.height;return o.height-s-DLr}_findPositionPreference(e,n){const i=Math.min(this._availableVerticalSpaceBelow(n)??1/0,e),r=Math.min(this._availableVerticalSpaceAbove(n)??1/0,e),o=Math.min(Math.max(r,i),e),s=Math.min(e,o);let a;return this._editor.getOption(60).above?a=s<=r?1:2:a=s<=i?2:1,a===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),a}_resize(e){this._resizableNode.layout(e.height,e.width)}}var MLr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},IJ=function(t,e){return function(n,i){e(n,i,t)}},X_;const kyt=30,LLr=6;var TD;let Iae=(TD=class extends kLr{get isVisibleFromKeyboard(){var e;return((e=this._renderedHover)==null?void 0:e.source)===1}get isVisible(){return this._hoverVisibleKey.get()??!1}get isFocused(){return this._hoverFocusedKey.get()??!1}constructor(e,n,i,r,o){const s=e.getOption(67)+8,a=150,l=new Do(a,s);super(e,l),this._configurationService=i,this._accessibilityService=r,this._keybindingService=o,this._hover=this._register(new YVe),this._onDidResize=this._register(new st),this.onDidResize=this._onDidResize.event,this._minimumSize=l,this._hoverVisibleKey=Re.hoverVisible.bindTo(n),this._hoverFocusedKey=Re.hoverFocused.bindTo(n),jt(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>{this.isVisible&&this._updateMaxDimensions()})),this._register(this._editor.onDidChangeConfiguration(u=>{u.hasChanged(50)&&this._updateFont()}));const c=this._register(q0(this._resizableNode.domNode));this._register(c.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(c.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setRenderedHover(void 0),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),(e=this._renderedHover)==null||e.dispose(),this._editor.removeContentWidget(this)}getId(){return X_.ID}static _applyDimensions(e,n,i){const r=typeof n=="number"?`${n}px`:n,o=typeof i=="number"?`${i}px`:i;e.style.width=r,e.style.height=o}_setContentsDomNodeDimensions(e,n){const i=this._hover.contentsDomNode;return X_._applyDimensions(i,e,n)}_setContainerDomNodeDimensions(e,n){const i=this._hover.containerDomNode;return X_._applyDimensions(i,e,n)}_setHoverWidgetDimensions(e,n){this._setContentsDomNodeDimensions(e,n),this._setContainerDomNodeDimensions(e,n),this._layoutContentWidget()}static _applyMaxDimensions(e,n,i){const r=typeof n=="number"?`${n}px`:n,o=typeof i=="number"?`${i}px`:i;e.style.maxWidth=r,e.style.maxHeight=o}_setHoverWidgetMaxDimensions(e,n){X_._applyMaxDimensions(this._hover.contentsDomNode,e,n),X_._applyMaxDimensions(this._hover.containerDomNode,e,n),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const n=e.width,i=e.height;this._setHoverWidgetDimensions(n,i)}_updateResizableNodeMaxDimensions(){const e=this._findMaximumRenderingWidth()??1/0,n=this._findMaximumRenderingHeight()??1/0;this._resizableNode.maxSize=new Do(e,n),this._setHoverWidgetMaxDimensions(e,n)}_resize(e){X_._lastDimensions=new Do(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),this._onDidResize.fire()}_findAvailableSpaceVertically(){var n;const e=(n=this._renderedHover)==null?void 0:n.showAtPosition;if(e)return this._positionPreference===1?this._availableVerticalSpaceAbove(e):this._availableVerticalSpaceBelow(e)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let n=LLr;return Array.from(this._hover.contentsDomNode.children).forEach(i=>{n+=i.clientHeight}),Math.min(e,n)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some(n=>n.scrollWidth>n.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),n=typeof this._contentWidth>"u"?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidth<n?hk(this._hover.containerDomNode.ownerDocument.body).width-14:this._hover.containerDomNode.clientWidth+2}isMouseGettingCloser(e,n){if(!this._renderedHover)return!1;if(this._renderedHover.initialMousePosX===void 0||this._renderedHover.initialMousePosY===void 0)return this._renderedHover.initialMousePosX=e,this._renderedHover.initialMousePosY=n,!1;const i=Ga(this.getDomNode());this._renderedHover.closestMouseDistance===void 0&&(this._renderedHover.closestMouseDistance=Myt(this._renderedHover.initialMousePosX,this._renderedHover.initialMousePosY,i.left,i.top,i.width,i.height));const r=Myt(e,n,i.left,i.top,i.width,i.height);return r>this._renderedHover.closestMouseDistance+4?!1:(this._renderedHover.closestMouseDistance=Math.min(this._renderedHover.closestMouseDistance,r),!0)}_setRenderedHover(e){var n;(n=this._renderedHover)==null||n.dispose(),this._renderedHover=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){const{fontSize:e,lineHeight:n}=this._editor.getOption(50),i=this._hover.contentsDomNode;i.style.fontSize=`${e}px`,i.style.lineHeight=`${n/e}`,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(o=>this._editor.applyFontInfo(o))}_updateContent(e){const n=this._hover.contentsDomNode;n.style.paddingBottom="",n.textContent="",n.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,X_._lastDimensions.height),n=Math.max(this._editor.getLayoutInfo().width*.66,500,X_._lastDimensions.width);this._setHoverWidgetMaxDimensions(n,e)}_render(e){this._setRenderedHover(e),this._updateFont(),this._updateContent(e.domNode),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){return this._renderedHover?{position:this._renderedHover.showAtPosition,secondaryPosition:this._renderedHover.showAtSecondaryPosition,positionAffinity:this._renderedHover.shouldAppearBeforeContent?3:void 0,preference:[this._positionPreference??1]}:null}show(e){var s;if(!this._editor||!this._editor.hasModel())return;this._render(e);const n=oC(this._hover.containerDomNode),i=e.showAtPosition;this._positionPreference=this._findPositionPreference(n,i)??1,this.onContentsChanged(),e.shouldFocus&&this._hover.containerDomNode.focus(),this._onDidResize.fire();const o=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&l5t(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),((s=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))==null?void 0:s.getAriaLabel())??"");o&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+o)}hide(){if(!this._renderedHover)return;const e=this._renderedHover.shouldFocus||this._hoverFocusedKey.get();this._setRenderedHover(void 0),this._resizableNode.maxSize=new Do(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}setMinimumDimensions(e){this._minimumSize=new Do(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new Do(e,this._minimumSize.height)}onContentsChanged(){var r;this._removeConstraintsRenderNormally();const e=this._hover.containerDomNode;let n=oC(e),i=Jf(e);if(this._resizableNode.layout(n,i),this._setHoverWidgetDimensions(i,n),n=oC(e),i=Jf(e),this._contentWidth=i,this._updateMinimumWidth(),this._resizableNode.layout(n,i),(r=this._renderedHover)!=null&&r.showAtPosition){const o=oC(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(o,this._renderedHover.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,n=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-n.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,n=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+n.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-kyt})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+kyt})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,n=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-n})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,n=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+n})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}},X_=TD,TD.ID="editor.contrib.resizableContentHoverWidget",TD._lastDimensions=new Do(0,0),TD);Iae=X_=MLr([IJ(1,vi),IJ(2,cr),IJ(3,Bm),IJ(4,vo)],Iae);function Myt(t,e,n,i,r,o){const s=n+r/2,a=i+o/2,l=Math.max(Math.abs(t-s)-r/2,0),c=Math.max(Math.abs(e-a)-o/2,0);return Math.sqrt(l*l+c*c)}let TLr=class{constructor(e,n,i){this.value=e,this.isComplete=n,this.hasLoadingMessage=i}};class Fqt extends ct{constructor(e,n){super(),this._editor=e,this._computer=n,this._onResult=this._register(new st),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Wo(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Wo(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Wo(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,n=!0){this._state=e,n&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=Chi(e=>this._computer.computeAsync(e)),(async()=>{try{for await(const e of this._asyncIterable)e&&(this._result.push(e),this._fireResult());this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(e){ji(e)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const e=this._state===0,n=this._state===4;this._onResult.fire(new TLr(this._result.slice(0),e,n))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class Aae{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,n){this._editor=e,this._participants=n,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,n){if(n.type!==1&&!n.supportsMarkerHover)return[];const i=e.getModel(),r=n.range.startLineNumber;if(r>i.getLineCount())return[];const o=i.getLineMaxColumn(r);return e.getLineDecorations(r).filter(s=>{if(s.options.isWholeLine)return!0;const a=s.range.startLineNumber===r?s.range.startColumn:1,l=s.range.endLineNumber===r?s.range.endColumn:o;if(s.options.showIfCollapsed){if(a>n.range.startColumn+1||n.range.endColumn-1>l)return!1}else if(a>n.range.startColumn||n.range.endColumn>l)return!1;return!0})}computeAsync(e){const n=this._anchor;if(!this._editor.hasModel()||!n)return xp.EMPTY;const i=Aae._getLineDecorations(this._editor,n);return xp.merge(this._participants.map(r=>r.computeAsync?r.computeAsync(n,i,e):xp.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=Aae._getLineDecorations(this._editor,this._anchor);let n=[];for(const i of this._participants)n=n.concat(i.computeSync(this._anchor,e));return H0(n)}}class $qt{constructor(e,n,i){this.anchor=e,this.hoverParts=n,this.isComplete=i}filter(e){const n=this.hoverParts.filter(i=>i.isValidForHoverAnchor(e));return n.length===this.hoverParts.length?this:new ILr(this,this.anchor,n,this.isComplete)}}class ILr extends $qt{constructor(e,n,i,r){super(n,i,r),this.original=e}filter(e){return this.original.filter(e)}}var ALr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},RLr=function(t,e){return function(n,i){e(n,i,t)}};const Lyt=Xt;let Rae=class extends ct{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this.actions=[],this._hasContent=!1,this.hoverElement=Lyt("div.hover-row.status-bar"),this.hoverElement.tabIndex=0,this.actionsElement=jt(this.hoverElement,Lyt("div.actions"))}addAction(e){const n=this._keybindingService.lookupKeybinding(e.commandId),i=n?n.getLabel():null;this._hasContent=!0;const r=this._register(pme.render(this.actionsElement,e,i));return this.actions.push(r),r}append(e){const n=jt(this.actionsElement,e);return this._hasContent=!0,n}};Rae=ALr([RLr(0,vo)],Rae);class PLr{constructor(e,n,i){this.provider=e,this.hover=n,this.ordinal=i}}async function OLr(t,e,n,i,r){const o=await Promise.resolve(t.provideHover(n,i,r)).catch($a);if(!(!o||!jLr(o)))return new PLr(t,o,e)}function uWe(t,e,n,i,r=!1){const s=t.ordered(e,r).map((a,l)=>OLr(a,l,e,n,i));return xp.fromPromises(s).coalesce()}function Vqt(t,e,n,i,r=!1){return uWe(t,e,n,i,r).map(o=>o.hover).toPromise()}Pf("_executeHoverProvider",(t,e,n)=>{const i=t.get(Ln);return Vqt(i.hoverProvider,e,n,er.None)});Pf("_executeHoverProvider_recursive",(t,e,n)=>{const i=t.get(Ln);return Vqt(i.hoverProvider,e,n,er.None,!0)});function jLr(t){const e=typeof t.range<"u",n=typeof t.contents<"u"&&t.contents&&t.contents.length>0;return e&&n}var FLr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},NL=function(t,e){return function(n,i){e(n,i,t)}};const I4=Xt,$Lr=ks("hover-increase-verbosity",qt.add,I("increaseHoverVerbosity","Icon for increaseing hover verbosity.")),VLr=ks("hover-decrease-verbosity",qt.remove,I("decreaseHoverVerbosity","Icon for decreasing hover verbosity."));class ov{constructor(e,n,i,r,o,s=void 0){this.owner=e,this.range=n,this.contents=i,this.isBeforeContent=r,this.ordinal=o,this.source=s}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}class Bqt{constructor(e,n,i){this.hover=e,this.hoverProvider=n,this.hoverPosition=i}supportsVerbosityAction(e){switch(e){case rm.Increase:return this.hover.canIncreaseVerbosity??!1;case rm.Decrease:return this.hover.canDecreaseVerbosity??!1}}}let OU=class{constructor(e,n,i,r,o,s,a,l){this._editor=e,this._languageService=n,this._openerService=i,this._configurationService=r,this._languageFeaturesService=o,this._keybindingService=s,this._hoverService=a,this._commandService=l,this.hoverOrdinal=3}createLoadingMessage(e){return new ov(this,e.range,[new rd().appendText(I("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,n){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),r=e.range.startLineNumber,o=i.getLineMaxColumn(r),s=[];let a=1e3;const l=i.getLineLength(r),c=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),u=this._editor.getOption(118),d=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:c});let h=!1;u>=0&&l>u&&e.range.startColumn>=u&&(h=!0,s.push(new ov(this,e.range,[{value:I("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,a++))),!h&&typeof d=="number"&&l>=d&&s.push(new ov(this,e.range,[{value:I("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let f=!1;for(const m of n){const p=m.range.startLineNumber===r?m.range.startColumn:1,g=m.range.endLineNumber===r?m.range.endColumn:o,y=m.options.hoverMessage;if(!y||p5(y))continue;m.options.beforeContentClassName&&(f=!0);const _=new ve(e.range.startLineNumber,p,e.range.startLineNumber,g);s.push(new ov(this,_,a8e(y),f,a++))}return s}computeAsync(e,n,i){if(!this._editor.hasModel()||e.type!==1)return xp.EMPTY;const r=this._editor.getModel(),o=this._languageFeaturesService.hoverProvider;return o.has(r)?this._getMarkdownHovers(o,r,e,i):xp.EMPTY}_getMarkdownHovers(e,n,i,r){const o=i.range.getStartPosition();return uWe(e,n,o,r).filter(l=>!p5(l.hover.contents)).map(l=>{const c=l.hover.range?ve.lift(l.hover.range):i.range,u=new Bqt(l.hover,l.provider,o);return new ov(this,c,l.hover.contents,!1,l.ordinal,u)})}renderHoverParts(e,n){return this._renderedHoverParts=new BLr(n,e.fragment,this,this._editor,this._languageService,this._openerService,this._commandService,this._keybindingService,this._hoverService,this._configurationService,e.onContentsChanged),this._renderedHoverParts}updateMarkdownHoverVerbosityLevel(e,n,i){var r;return Promise.resolve((r=this._renderedHoverParts)==null?void 0:r.updateMarkdownHoverPartVerbosityLevel(e,n,i))}};OU=FLr([NL(1,Qs),NL(2,Wm),NL(3,cr),NL(4,Ln),NL(5,vo),NL(6,Pw),NL(7,gs)],OU);class AJ{constructor(e,n,i){this.hoverPart=e,this.hoverElement=n,this.disposables=i}dispose(){this.disposables.dispose()}}class BLr{constructor(e,n,i,r,o,s,a,l,c,u,d){this._hoverParticipant=i,this._editor=r,this._languageService=o,this._openerService=s,this._commandService=a,this._keybindingService=l,this._hoverService=c,this._configurationService=u,this._onFinishedRendering=d,this._ongoingHoverOperations=new Map,this._disposables=new Lt,this.renderedHoverParts=this._renderHoverParts(e,n,this._onFinishedRendering),this._disposables.add(Kn(()=>{this.renderedHoverParts.forEach(h=>{h.dispose()}),this._ongoingHoverOperations.forEach(h=>{h.tokenSource.dispose(!0)})}))}_renderHoverParts(e,n,i){return e.sort(Ah(r=>r.ordinal,vv)),e.map(r=>{const o=this._renderHoverPart(r,i);return n.appendChild(o.hoverElement),o})}_renderHoverPart(e,n){const i=this._renderMarkdownHover(e,n),r=i.hoverElement,o=e.source,s=new Lt;if(s.add(i),!o)return new AJ(e,r,s);const a=o.supportsVerbosityAction(rm.Increase),l=o.supportsVerbosityAction(rm.Decrease);if(!a&&!l)return new AJ(e,r,s);const c=I4("div.verbosity-actions");return r.prepend(c),s.add(this._renderHoverExpansionAction(c,rm.Increase,a)),s.add(this._renderHoverExpansionAction(c,rm.Decrease,l)),new AJ(e,r,s)}_renderMarkdownHover(e,n){return zqt(this._editor,e,this._languageService,this._openerService,n)}_renderHoverExpansionAction(e,n,i){const r=new Lt,o=n===rm.Increase,s=jt(e,I4(ci.asCSSSelector(o?$Lr:VLr)));s.tabIndex=0;const a=new m5("mouse",!1,{target:e,position:{hoverPosition:0}},this._configurationService,this._hoverService);if(r.add(this._hoverService.setupManagedHover(a,s,HLr(this._keybindingService,n))),!i)return s.classList.add("disabled"),r;s.classList.add("enabled");const l=()=>this._commandService.executeCommand(n===rm.Increase?Nge:Ege);return r.add(new c5t(s,l)),r.add(new u5t(s,l,[3,10])),r}async updateMarkdownHoverPartVerbosityLevel(e,n,i=!0){const r=this._editor.getModel();if(!r)return;const o=this._getRenderedHoverPartAtIndex(n),s=o==null?void 0:o.hoverPart.source;if(!o||!(s!=null&&s.supportsVerbosityAction(e)))return;const a=await this._fetchHover(s,r,e);if(!a)return;const l=new Bqt(a,s.hoverProvider,s.hoverPosition),c=o.hoverPart,u=new ov(this._hoverParticipant,c.range,a.contents,c.isBeforeContent,c.ordinal,l),d=this._renderHoverPart(u,this._onFinishedRendering);return this._replaceRenderedHoverPartAtIndex(n,d,u),i&&this._focusOnHoverPartWithIndex(n),{hoverPart:u,hoverElement:d.hoverElement}}async _fetchHover(e,n,i){let r=i===rm.Increase?1:-1;const o=e.hoverProvider,s=this._ongoingHoverOperations.get(o);s&&(s.tokenSource.cancel(),r+=s.verbosityDelta);const a=new oa;this._ongoingHoverOperations.set(o,{verbosityDelta:r,tokenSource:a});const l={verbosityRequest:{verbosityDelta:r,previousHover:e.hover}};let c;try{c=await Promise.resolve(o.provideHover(n,e.hoverPosition,a.token,l))}catch(u){$a(u)}return a.dispose(),this._ongoingHoverOperations.delete(o),c}_replaceRenderedHoverPartAtIndex(e,n,i){if(e>=this.renderedHoverParts.length||e<0)return;const r=this.renderedHoverParts[e],o=r.hoverElement,s=n.hoverElement,a=Array.from(s.children);o.replaceChildren(...a);const l=new AJ(i,o,n.disposables);o.focus(),r.dispose(),this.renderedHoverParts[e]=l}_focusOnHoverPartWithIndex(e){this.renderedHoverParts[e].hoverElement.focus()}_getRenderedHoverPartAtIndex(e){return this.renderedHoverParts[e]}dispose(){this._disposables.dispose()}}function zLr(t,e,n,i,r){e.sort(Ah(s=>s.ordinal,vv));const o=[];for(const s of e)o.push(zqt(n,s,i,r,t.onContentsChanged));return new vA(o)}function zqt(t,e,n,i,r){const o=new Lt,s=I4("div.hover-row"),a=I4("div.hover-row-contents");s.appendChild(a);const l=e.contents;for(const u of l){if(p5(u))continue;const d=I4("div.markdown-hover"),h=jt(d,I4("div.hover-contents")),f=o.add(new pS({editor:t},n,i));o.add(f.onDidRenderAsync(()=>{h.className="hover-contents code-hover-contents",r()}));const m=o.add(f.render(u));h.appendChild(m.element),a.appendChild(d)}return{hoverPart:e,hoverElement:s,dispose(){o.dispose()}}}function HLr(t,e){switch(e){case rm.Increase:{const n=t.lookupKeybinding(Nge);return n?I("increaseVerbosityWithKb","Increase Hover Verbosity ({0})",n.getLabel()):I("increaseVerbosity","Increase Hover Verbosity")}case rm.Decrease:{const n=t.lookupKeybinding(Ege);return n?I("decreaseVerbosityWithKb","Decrease Hover Verbosity ({0})",n.getLabel()):I("decreaseVerbosity","Decrease Hover Verbosity")}}}function dOe(t,e){return!!t[e]}class USe{constructor(e,n){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=dOe(e.event,n.triggerModifier),this.hasSideBySideModifier=dOe(e.event,n.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class Tyt{constructor(e,n){this.keyCodeIsTriggerKey=e.keyCode===n.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===n.triggerSideBySideKey,this.hasTriggerModifier=dOe(e,n.triggerModifier)}}class RJ{constructor(e,n,i,r){this.triggerKey=e,this.triggerModifier=n,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=r}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function Iyt(t){return t==="altKey"?xr?new RJ(57,"metaKey",6,"altKey"):new RJ(5,"ctrlKey",6,"altKey"):xr?new RJ(6,"altKey",57,"metaKey"):new RJ(6,"altKey",5,"ctrlKey")}class Dge extends ct{constructor(e,n){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new st),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new st),this.onExecute=this._onExecute.event,this._onCancel=this._register(new st),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=(n==null?void 0:n.extractLineNumberFromMouseEvent)??(i=>i.target.position?i.target.position.lineNumber:0),this._opts=Iyt(this._editor.getOption(78)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(i=>{if(i.hasChanged(78)){const r=Iyt(this._editor.getOption(78));if(this._opts.equals(r))return;this._opts=r,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(i=>this._onEditorMouseMove(new USe(i,this._opts)))),this._register(this._editor.onMouseDown(i=>this._onEditorMouseDown(new USe(i,this._opts)))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(new USe(i,this._opts)))),this._register(this._editor.onKeyDown(i=>this._onEditorKeyDown(new Tyt(i,this._opts)))),this._register(this._editor.onKeyUp(i=>this._onEditorKeyUp(new Tyt(i,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(i=>this._onDidChangeCursorSelection(i))),this._register(this._editor.onDidChangeModel(i=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(i=>{(i.scrollTopChanged||i.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const n=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===n&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}class Hqt{constructor(e,n){this.range=e,this.direction=n}}class dWe{constructor(e,n,i){this.hint=e,this.anchor=n,this.provider=i,this._isResolved=!1}with(e){const n=new dWe(this.hint,e.anchor,this.provider);return n._isResolved=this._isResolved,n._currentResolve=this._currentResolve,n}async resolve(e){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return await this._currentResolve,e.isCancellationRequested?void 0:this.resolve(e);this._isResolved||(this._currentResolve=this._doResolve(e).finally(()=>this._currentResolve=void 0)),await this._currentResolve}}async _doResolve(e){try{const n=await Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=(n==null?void 0:n.tooltip)??this.hint.tooltip,this.hint.label=(n==null?void 0:n.label)??this.hint.label,this.hint.textEdits=(n==null?void 0:n.textEdits)??this.hint.textEdits,this._isResolved=!0}catch(n){$a(n),this._isResolved=!1}}}const G4=class G4{static async create(e,n,i,r){const o=[],s=e.ordered(n).reverse().map(a=>i.map(async l=>{try{const c=await a.provideInlayHints(n,l,r);(c!=null&&c.hints.length||a.onDidChangeInlayHints)&&o.push([c??G4._emptyInlayHintList,a])}catch(c){$a(c)}}));if(await Promise.all(s.flat()),r.isCancellationRequested||n.isDisposed())throw new Mv;return new G4(i,o,n)}constructor(e,n,i){this._disposables=new Lt,this.ranges=e,this.provider=new Set;const r=[];for(const[o,s]of n){this._disposables.add(o),this.provider.add(s);for(const a of o.hints){const l=i.validatePosition(a.position);let c="before";const u=G4._getRangeAtPosition(i,l);let d;u.getStartPosition().isBefore(l)?(d=ve.fromPositions(u.getStartPosition(),l),c="after"):(d=ve.fromPositions(l,u.getEndPosition()),c="before"),r.push(new dWe(a,new Hqt(d,c),s))}}this.items=r.sort((o,s)=>ot.compare(o.hint.position,s.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,n){const i=n.lineNumber,r=e.getWordAtPosition(n);if(r)return new ve(i,r.startColumn,i,r.endColumn);e.tokenization.tokenizeIfCheap(i);const o=e.tokenization.getLineTokens(i),s=n.column-1,a=o.findTokenIndexAtOffset(s);let l=o.getStartOffset(a),c=o.getEndOffset(a);return c-l===1&&(l===s&&a>1?(l=o.getStartOffset(a-1),c=o.getEndOffset(a-1)):c===s&&a<o.getCount()-1&&(l=o.getStartOffset(a+1),c=o.getEndOffset(a+1))),new ve(i,l+1,i,c+1)}};G4._emptyInlayHintList=Object.freeze({dispose(){},hints:[]});let Pae=G4;function WLr(t){return ri.from({scheme:Ti.command,path:t.id,query:t.arguments&&encodeURIComponent(JSON.stringify(t.arguments))}).toString()}var ULr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},w1=function(t,e){return function(n,i){e(n,i,t)}};let Fv=class extends JH{constructor(e,n,i,r,o,s,a,l,c,u,d,h,f){super(e,{...r.getRawOptions(),overflowWidgetsDomNode:r.getOverflowWidgetsDomNode()},i,o,s,a,l,c,u,d,h,f),this._parentEditor=r,this._overwriteOptions=n,super.updateOptions(this._overwriteOptions),this._register(r.onDidChangeConfiguration(m=>this._onParentConfigurationChanged(m)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){Efe(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Fv=ULr([w1(4,qn),w1(5,Yr),w1(6,gs),w1(7,vi),w1(8,Ql),w1(9,tl),w1(10,Bm),w1(11,bs),w1(12,Ln)],Fv);const Ayt=new Rt(new jr(0,122,204)),KLr={showArrow:!0,showFrame:!0,className:"",frameColor:Ayt,arrowColor:Ayt,keepEditorSelection:!1},qLr="vs.editor.contrib.zoneWidget";class GLr{constructor(e,n,i,r,o,s,a,l){this.id="",this.domNode=e,this.afterLineNumber=n,this.afterColumn=i,this.heightInLines=r,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class YLr{constructor(e,n){this._id=e,this._domNode=n}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}const wce=class wce{constructor(e){this._editor=e,this._ruleName=wce._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),DLe(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){DLe(this._ruleName),Kie(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px !important; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:ve.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}};wce._IdGenerator=new r7e(".arrow-decoration-");let hOe=wce;class XLr{constructor(e,n={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new Lt,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=W1(n),Efe(this.options,KLr,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(i=>{const r=this._getWidth(i);this.domNode.style.width=r+"px",this.domNode.style.left=this._getLeft(i)+"px",this._onWidth(r)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new hOe(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var n;if(this.domNode.style.height=`${e}px`,this.container){const i=e-this._decoratingElementsHeight();this.container.style.height=`${i}px`;const r=this.editor.getLayoutInfo();this._doLayout(i,this._getWidth(r))}(n=this._resizeSash)==null||n.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,n){const i=ve.isIRange(e)?ve.lift(e):ve.fromPositions(e);this._isShowing=!0,this._showImpl(i,n),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:Hi.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(n=>{this._viewZone&&n.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)==null||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(67);let n=0;if(this.options.showArrow){const i=Math.round(e/3);n+=2*i}if(this.options.showFrame){const i=Math.round(e/9);n+=2*i}return n}_showImpl(e,n){const i=e.getStartPosition(),r=this.editor.getLayoutInfo(),o=this._getWidth(r);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(r)+"px";const s=document.createElement("div");s.style.overflow="hidden";const a=this.editor.getOption(67);if(!this.options.allowUnlimitedHeight){const h=Math.max(12,this.editor.getLayoutInfo().height/a*.8);n=Math.min(n,h)}let l=0,c=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(c=Math.round(a/9)),this.editor.changeViewZones(h=>{this._viewZone&&h.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new GLr(s,i.lineNumber,i.column,n,f=>this._onViewZoneTop(f),f=>this._onViewZoneHeight(f),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new YLr(qLr+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const h=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}const u=n*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=u+"px",this.container.style.overflow="hidden"),this._doLayout(u,o),this.options.keepEditorSelection||this.editor.setSelection(e);const d=this.editor.getModel();if(d){const h=d.validateRange(new ve(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(h,h.startLineNumber===d.getLineCount())}}revealRange(e,n){n?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,n){this.container&&(n&&this.container.classList.remove(n),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,n){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(n=>{this._viewZone&&(this._viewZone.heightInLines=e,n.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new td(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(n=>{this._viewZone&&(e={startY:n.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(n=>{if(e){const i=(n.currentY-e.startY)/this.editor.getOption(67),r=i<0?Math.ceil(i):Math.floor(i),o=e.heightInLines+r;o>5&&o<35&&this._relayout(o)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var Wqt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Uqt=function(t,e){return function(n,i){e(n,i,t)}};const Kqt=Sr("IPeekViewService");Rr(Kqt,class{constructor(){this._widgets=new Map}addExclusiveWidget(t,e){const n=this._widgets.get(t);n&&(n.listener.dispose(),n.widget.dispose());const i=()=>{const r=this._widgets.get(t);r&&r.widget===e&&(r.listener.dispose(),this._widgets.delete(t))};this._widgets.set(t,{widget:e,listener:e.onDidClose(i)})}},1);var Lf;(function(t){t.inPeekEditor=new gn("inReferenceSearchEditor",!0,I("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),t.notInPeekEditor=t.inPeekEditor.toNegated()})(Lf||(Lf={}));var tj;let Oae=(tj=class{constructor(e,n){e instanceof Fv&&Lf.inPeekEditor.bindTo(n)}dispose(){}},tj.ID="editor.contrib.referenceController",tj);Oae=Wqt([Uqt(1,vi)],Oae);Wr(Oae.ID,Oae,0);function ZLr(t){const e=t.get(Yr).getFocusedCodeEditor();return e instanceof Fv?e.getParentEditor():e}const QLr={headerBackgroundColor:Rt.white,primaryHeadingColor:Rt.fromHex("#333333"),secondaryHeadingColor:Rt.fromHex("#6c6c6cb3")};let jae=class extends XLr{constructor(e,n,i){super(e,n),this.instantiationService=i,this._onDidClose=new st,this.onDidClose=this._onDidClose.event,Efe(this.options,QLr,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const n=this.options;e.headerBackgroundColor&&(n.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(n.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(n.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=Xt(".head"),this._bodyElement=Xt(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,n){this._titleElement=Xt(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),Fa(this._titleElement,"click",o=>this._onTitleClick(o))),jt(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=Xt("span.filename"),this._secondaryHeading=Xt("span.dirname"),this._metaHeading=Xt("span.meta"),jt(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=Xt(".peekview-actions");jt(this._headElement,i);const r=this._getActionBarOptions();this._actionbarWidget=new Ap(i,r),this._disposables.add(this._actionbarWidget),n||this._actionbarWidget.push(new xm("peekview.close",I("label.close","Close"),ci.asClassName(qt.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:Y5t.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,n){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),n?this._secondaryHeading.innerText=n:ru(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,um(this._metaHeading)):yh(this._metaHeading))}_doLayout(e,n){if(!this._isShowing&&e<0){this.dispose();return}const i=Math.ceil(this.editor.getOption(67)*1.2),r=Math.round(e-(i+2));this._doLayoutHead(i,n),this._doLayoutBody(r,n)}_doLayoutHead(e,n){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,n){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};jae=Wqt([Uqt(2,qn)],jae);const JLr=Fe("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:Rt.black,hcLight:Rt.white},I("peekViewTitleBackground","Background color of the peek view title area.")),qqt=Fe("peekViewTitleLabel.foreground",{dark:Rt.white,light:Rt.black,hcDark:Rt.white,hcLight:Rw},I("peekViewTitleForeground","Color of the peek view title.")),Gqt=Fe("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},I("peekViewTitleInfoForeground","Color of the peek view title info.")),eTr=Fe("peekView.border",{dark:mw,light:mw,hcDark:$r,hcLight:$r},I("peekViewBorder","Color of the peek view borders and arrow.")),tTr=Fe("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:Rt.black,hcLight:Rt.white},I("peekViewResultsBackground","Background color of the peek view result list."));Fe("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:Rt.white,hcLight:Rw},I("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));Fe("peekViewResult.fileForeground",{dark:Rt.white,light:"#1E1E1E",hcDark:Rt.white,hcLight:Rw},I("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));Fe("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},I("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));Fe("peekViewResult.selectionForeground",{dark:Rt.white,light:"#6C6C6C",hcDark:Rt.white,hcLight:Rw},I("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const Yqt=Fe("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:Rt.black,hcLight:Rt.white},I("peekViewEditorBackground","Background color of the peek view editor."));Fe("peekViewEditorGutter.background",Yqt,I("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));Fe("peekViewEditorStickyScroll.background",Yqt,I("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));Fe("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},I("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));Fe("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},I("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));Fe("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:Bs,hcLight:Bs},I("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));class Ik{constructor(e,n,i,r){this.isProviderFirst=e,this.parent=n,this.link=i,this._rangeCallback=r,this.id=GTe.nextId()}get uri(){return this.link.uri}get range(){return this._range??this.link.targetSelectionRange??this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var n;const e=(n=this.parent.getPreview(this))==null?void 0:n.preview(this.range);return e?I({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",e.value,cb(this.uri),this.range.startLineNumber,this.range.startColumn):I("aria.oneReference","in {0} on line {1} at column {2}",cb(this.uri),this.range.startLineNumber,this.range.startColumn)}}class nTr{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,n=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:r,startColumn:o,endLineNumber:s,endColumn:a}=e,l=i.getWordUntilPosition({lineNumber:r,column:o-n}),c=new ve(r,l.startColumn,r,o),u=new ve(s,a,s,1073741824),d=i.getValueInRange(c).replace(/^\s+/,""),h=i.getValueInRange(e),f=i.getValueInRange(u).replace(/\s+$/,"");return{value:d+h+f,highlight:{start:d.length,end:d.length+h.length}}}}class jU{constructor(e,n){this.parent=e,this.uri=n,this.children=[],this._previews=new Xl}dispose(){Jo(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?I("aria.fileReferences.1","1 symbol in {0}, full path {1}",cb(this.uri),this.uri.fsPath):I("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,cb(this.uri),this.uri.fsPath)}async resolve(e){if(this._previews.size!==0)return this;for(const n of this.children)if(!this._previews.has(n.uri))try{const i=await e.createModelReference(n.uri);this._previews.set(n.uri,new nTr(i))}catch(i){ji(i)}return this}}class Nm{constructor(e,n){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new st,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=n;const[i]=e;e.sort(Nm._compareReferences);let r;for(const o of e)if((!r||!zs.isEqual(r.uri,o.uri,!0))&&(r=new jU(this,o.uri),this.groups.push(r)),r.children.length===0||Nm._compareReferences(o,r.children[r.children.length-1])!==0){const s=new Ik(i===o,r,o,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(s),r.children.push(s)}}dispose(){Jo(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new Nm(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?I("aria.result.0","No results found"):this.references.length===1?I("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?I("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):I("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,n){const{parent:i}=e;let r=i.children.indexOf(e);const o=i.children.length,s=i.parent.groups.length;return s===1||n&&r+1<o||!n&&r>0?(n?r=(r+1)%o:r=(r+o-1)%o,i.children[r]):(r=i.parent.groups.indexOf(i),n?(r=(r+1)%s,i.parent.groups[r].children[0]):(r=(r+s-1)%s,i.parent.groups[r].children[i.parent.groups[r].children.length-1]))}nearestReference(e,n){const i=this.references.map((r,o)=>({idx:o,prefixLen:ck(r.uri.toString(),e.toString()),offsetDist:Math.abs(r.range.startLineNumber-n.lineNumber)*100+Math.abs(r.range.startColumn-n.column)})).sort((r,o)=>r.prefixLen>o.prefixLen?-1:r.prefixLen<o.prefixLen?1:r.offsetDist<o.offsetDist?-1:r.offsetDist>o.offsetDist?1:0)[0];if(i)return this.references[i.idx]}referenceAt(e,n){for(const i of this.references)if(i.uri.toString()===e.toString()&&ve.containsPosition(i.range,n))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,n){return zs.compare(e.uri,n.uri)||ve.compareRangesUsingStarts(e.range,n.range)}}var kge=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Mge=function(t,e){return function(n,i){e(n,i,t)}},fOe;let mOe=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof Nm||e instanceof jU}getChildren(e){if(e instanceof Nm)return e.groups;if(e instanceof jU)return e.resolve(this._resolverService).then(n=>n.children);throw new Error("bad tree")}};mOe=kge([Mge(0,Rf)],mOe);class iTr{getHeight(){return 23}getTemplateId(e){return e instanceof jU?Fae.id:$ae.id}}let pOe=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var n;if(e instanceof Ik){const i=(n=e.parent.getPreview(e))==null?void 0:n.preview(e.range);if(i)return i.value}return cb(e.uri)}};pOe=kge([Mge(0,vo)],pOe);class rTr{getId(e){return e instanceof Ik?e.id:e.uri}}let gOe=class extends ct{constructor(e,n){super(),this._labelService=n;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new uoe(i,{supportHighlights:!0})),this.badge=new OIe(jt(i,Xt(".count")),{},q5t),e.appendChild(i)}set(e,n){const i=dme(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:n});const r=e.children.length;this.badge.setCount(r),r>1?this.badge.setTitleFormat(I("referencesCount","{0} references",r)):this.badge.setTitleFormat(I("referenceCount","{0} reference",r))}};gOe=kge([Mge(1,g5)],gOe);var $I;let Fae=($I=class{constructor(e){this._instantiationService=e,this.templateId=fOe.id}renderTemplate(e){return this._instantiationService.createInstance(gOe,e)}renderElement(e,n,i){i.set(e.element,Tq(e.filterData))}disposeTemplate(e){e.dispose()}},fOe=$I,$I.id="FileReferencesRenderer",$I);Fae=fOe=kge([Mge(0,qn)],Fae);class oTr extends ct{constructor(e){super(),this.label=this._register(new _D(e))}set(e,n){var r;const i=(r=e.parent.getPreview(e))==null?void 0:r.preview(e.range);if(!i||!i.value)this.label.set(`${cb(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:o,highlight:s}=i;n&&!N0.isDefault(n)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(o,Tq(n))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(o,[s]))}}}const Cce=class Cce{constructor(){this.templateId=Cce.id}renderTemplate(e){return new oTr(e)}renderElement(e,n,i){i.set(e.element,e.filterData)}disposeTemplate(e){e.dispose()}};Cce.id="OneReferenceRenderer";let $ae=Cce;class sTr{getWidgetAriaLabel(){return I("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var aTr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},C1=function(t,e){return function(n,i){e(n,i,t)}};const Sce=class Sce{constructor(e,n){this._editor=e,this._model=n,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new Lt,this._callOnModelChange=new Lt,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e){for(const n of this._model.references)if(n.uri.toString()===e.uri.toString()){this._addDecorations(n.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const n=[],i=[];for(let r=0,o=e.children.length;r<o;r++){const s=e.children[r];this._decorationIgnoreSet.has(s.id)||s.uri.toString()===this._editor.getModel().uri.toString()&&(n.push({range:s.range,options:Sce.DecorationOptions}),i.push(r))}this._editor.changeDecorations(r=>{const o=r.deltaDecorations([],n);for(let s=0;s<o.length;s++)this._decorations.set(o[s],e.children[i[s]])})}_onDecorationChanged(){const e=[],n=this._editor.getModel();if(n){for(const[i,r]of this._decorations){const o=n.getDecorationRange(i);if(!o)continue;let s=!1;if(!ve.equalsRange(o,r.range)){if(ve.spansMultipleLines(o))s=!0;else{const a=r.range.endColumn-r.range.startColumn,l=o.endColumn-o.startColumn;a!==l&&(s=!0)}s?(this._decorationIgnoreSet.add(r.id),e.push(i)):r.range=o}}for(let i=0,r=e.length;i<r;i++)this._decorations.delete(e[i]);this._editor.removeDecorations(e)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}};Sce.DecorationOptions=Hi.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});let bOe=Sce;class lTr{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let n,i;try{const r=JSON.parse(e);n=r.ratio,i=r.heightInLines}catch{}return{ratio:n||.7,heightInLines:i||18}}}class cTr extends WIe{}let vOe=class extends jae{constructor(e,n,i,r,o,s,a,l,c,u,d,h){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},s),this._defaultTreeKeyboardSupport=n,this.layoutData=i,this._textModelResolverService=o,this._instantiationService=s,this._peekViewService=a,this._uriLabel=l,this._undoRedoService=c,this._keybindingService=u,this._languageService=d,this._languageConfigurationService=h,this._disposeOnNewModel=new Lt,this._callOnDispose=new Lt,this._onDidSelectReference=new st,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new Do(0,0),this._applyTheme(r.getColorTheme()),this._callOnDispose.add(r.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(e,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),Jo(this._preview),Jo(this._previewNotAvailableMessage),Jo(this._tree),Jo(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){const n=e.getColor(eTr)||Rt.transparent;this.style({arrowColor:n,frameColor:n,headerBackgroundColor:e.getColor(JLr)||Rt.transparent,primaryHeadingColor:e.getColor(qqt),secondaryHeadingColor:e.getColor(Gqt)})}show(e){super.show(e,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey||e.altKey?"side":"open",source:"title"})}_fillBody(e){this.setCssClass("reference-zone-widget"),this._messageContainer=jt(e,Xt("div.messages")),yh(this._messageContainer),this._splitView=new aFt(e,{orientation:1}),this._previewContainer=jt(e,Xt("div.preview.inline"));const n={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!0},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(Fv,this._previewContainer,n,{},this.editor),yh(this._previewContainer),this._previewNotAvailableMessage=new l0(I("missingPreviewMessage","no preview available"),Ph,l0.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=jt(e,Xt("div.ref-tree.inline"));const i={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new sTr,keyboardNavigationLabelProvider:this._instantiationService.createInstance(pOe),identityProvider:new rTr,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:tTr}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(Fa(this._treeContainer,"keydown",o=>{o.equals(9)&&(this._keybindingService.dispatchEvent(o,o.target),o.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(cTr,"ReferencesWidget",this._treeContainer,new iTr,[this._instantiationService.createInstance(Fae),this._instantiationService.createInstance($ae)],this._instantiationService.createInstance(mOe),i),this._splitView.addView({onDidChange:rn.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:o=>{this._preview.layout({height:this._dim.height,width:o})}},ioe.Distribute),this._splitView.addView({onDidChange:rn.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:o=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${o}px`,this._tree.layout(this._dim.height,o)}},ioe.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const r=(o,s)=>{o instanceof Ik&&(s==="show"&&this._revealReference(o,!1),this._onDidSelectReference.fire({element:o,kind:s,source:"tree"}))};this._disposables.add(this._tree.onDidOpen(o=>{o.sideBySide?r(o.element,"side"):o.editorOptions.pinned?r(o.element,"goto"):r(o.element,"show")})),yh(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,n){super._doLayoutBody(e,n),this._dim=new Do(n,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(n),this._splitView.resizeView(0,n*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=I("noResults","No results"),um(this._messageContainer),Promise.resolve(void 0)):(yh(this._messageContainer),this._decorationsManager=new bOe(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:n,target:i}=e;if(n.detail!==2)return;const r=this._getFocusedReference();r&&this._onDidSelectReference.fire({element:{uri:r.uri,range:i.range},kind:n.ctrlKey||n.metaKey||n.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),um(this._treeContainer),um(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof Ik)return e;if(e instanceof jU&&e.children.length>0)return e.children[0]}async revealReference(e){await this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}async _revealReference(e,n){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Ti.inMemory?this.setTitle(vxi(e.uri),this._uriLabel.getUriLabel(dme(e.uri))):this.setTitle(I("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(n&&this._tree.reveal(e.parent),await this._tree.expand(e.parent),this._tree.reveal(e));const r=await i;if(!this._model){r.dispose();return}Jo(this._previewModelReference);const o=r.object;if(o){const s=this._preview.getModel()===o.textEditorModel?0:1,a=ve.lift(e.range).collapseToStart();this._previewModelReference=r,this._preview.setModel(o.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,s)}else this._preview.setModel(this._previewNotAvailableMessage),r.dispose()}};vOe=aTr([C1(3,Ql),C1(4,Rf),C1(5,qn),C1(6,Kqt),C1(7,g5),C1(8,hme),C1(9,vo),C1(10,Qs),C1(11,bs)],vOe);var uTr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},mO=function(t,e){return function(n,i){e(n,i,t)}},zte;const CR=new gn("referenceSearchVisible",!1,I("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));var VI;let yA=(VI=class{static get(e){return e.getContribution(zte.ID)}constructor(e,n,i,r,o,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=n,this._editorService=r,this._notificationService=o,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new Lt,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=CR.bindTo(i)}dispose(){var e,n;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)==null||e.dispose(),(n=this._model)==null||n.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,n,i){let r;if(this._widget&&(r=this._widget.position),this.closeWidget(),r&&e.containsPosition(r))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const o="peekViewLayout",s=lTr.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(vOe,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(I("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{n.cancel(),this._widget&&(this._storageService.store(o,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(l=>{const{element:c,kind:u}=l;if(c)switch(u){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(c,!1,!1);break;case"side":this.openReference(c,!0,!1);break;case"goto":i?this._gotoReference(c,!0):this.openReference(c,!1,!0);break}}));const a=++this._requestIdPool;n.then(l=>{var c;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(c=this._model)==null||c.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(I("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const u=this._editor.getModel().uri,d=new ot(e.startLineNumber,e.startColumn),h=this._model.nearestReference(u,d);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(87)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(e){if(!this._editor.hasModel()||!this._model||!this._widget)return;const n=this._widget.position;if(!n)return;const i=this._model.nearestReference(this._editor.getModel().uri,n);if(!i)return;const r=this._model.nextOrPreviousReference(i,e),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();await this._widget.setSelection(r),await this._gotoReference(r,!1),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()}async revealReference(e){!this._editor.hasModel()||!this._model||!this._widget||await this._widget.revealReference(e)}closeWidget(e=!0){var n,i;(n=this._widget)==null||n.dispose(),(i=this._model)==null||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,n){var r;(r=this._widget)==null||r.hide(),this._ignoreModelChangeEvent=!0;const i=ve.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:i,selectionSource:"code.jump",pinned:n}},this._editor).then(o=>{if(this._ignoreModelChangeEvent=!1,!o||!this._widget){this.closeWidget();return}if(this._editor===o)this._widget.show(i),this._widget.focusOnReferenceTree();else{const s=zte.get(o),a=this._model.clone();this.closeWidget(),o.focus(),s==null||s.toggleWidget(i,cc(l=>Promise.resolve(a)),this._peekMode??!1)}},o=>{this._ignoreModelChangeEvent=!1,ji(o)})}openReference(e,n,i){n||this.closeWidget();const{uri:r,range:o}=e;this._editorService.openCodeEditor({resource:r,options:{selection:o,selectionSource:"code.jump",pinned:i}},this._editor,n)}},zte=VI,VI.ID="editor.contrib.referencesController",VI);yA=zte=uTr([mO(2,vi),mO(3,Yr),mO(4,tl),mO(5,qn),mO(6,Xv),mO(7,cr)],yA);function SR(t,e){const n=ZLr(t);if(!n)return;const i=yA.get(n);i&&e(i)}Bh.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Tl(2089,60),when:Tt.or(CR,Lf.inPeekEditor),handler(t){SR(t,e=>{e.changeFocusBetweenPreviewAndReferences()})}});Bh.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:Tt.or(CR,Lf.inPeekEditor),handler(t){SR(t,e=>{e.goToNextOrPreviousReference(!0)})}});Bh.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:Tt.or(CR,Lf.inPeekEditor),handler(t){SR(t,e=>{e.goToNextOrPreviousReference(!1)})}});Ar.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");Ar.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");Ar.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");Ar.registerCommand("closeReferenceSearch",t=>SR(t,e=>e.closeWidget()));Bh.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:Tt.and(Lf.inPeekEditor,Tt.not("config.editor.stablePeek"))});Bh.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:Tt.and(CR,Tt.not("config.editor.stablePeek"),Tt.or(Re.editorTextFocus,bFt.negate()))});Bh.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:Tt.and(CR,_Ft,E7e.negate(),D7e.negate()),handler(t){var i;const n=(i=t.get(Cb).lastFocusedList)==null?void 0:i.getFocus();Array.isArray(n)&&n[0]instanceof Ik&&SR(t,r=>r.revealReference(n[0]))}});Bh.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:Tt.and(CR,_Ft,E7e.negate(),D7e.negate()),handler(t){var i;const n=(i=t.get(Cb).lastFocusedList)==null?void 0:i.getFocus();Array.isArray(n)&&n[0]instanceof Ik&&SR(t,r=>r.openReference(n[0],!0,!0))}});Ar.registerCommand("openReference",t=>{var i;const n=(i=t.get(Cb).lastFocusedList)==null?void 0:i.getFocus();Array.isArray(n)&&n[0]instanceof Ik&&SR(t,r=>r.openReference(n[0],!1,!0))});var Xqt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},u9=function(t,e){return function(n,i){e(n,i,t)}};const hWe=new gn("hasSymbols",!1,I("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),Lge=Sr("ISymbolNavigationService");let yOe=class{constructor(e,n,i,r){this._editorService=n,this._notificationService=i,this._keybindingService=r,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=hWe.bindTo(e)}reset(){var e,n;this._ctxHasSymbols.reset(),(e=this._currentState)==null||e.dispose(),(n=this._currentMessage)==null||n.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const n=e.parent.parent;if(n.references.length<=1){this.reset();return}this._currentModel=n,this._currentIdx=n.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new _Oe(this._editorService),r=i.onDidChange(o=>{if(this._ignoreEditorChange)return;const s=this._editorService.getActiveCodeEditor();if(!s)return;const a=s.getModel(),l=s.getPosition();if(!a||!l)return;let c=!1,u=!1;for(const d of n.references)if(IVe(d.uri,a.uri))c=!0,u=u||ve.containsPosition(d.range,l);else if(c)break;(!c||!u)&&this.reset()});this._currentState=yv(i,r)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const n=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:n.uri,options:{selection:ve.collapseToStart(n.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var i;(i=this._currentMessage)==null||i.dispose();const e=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=e?I("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,e.getLabel()):I("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};yOe=Xqt([u9(0,vi),u9(1,Yr),u9(2,tl),u9(3,vo)],yOe);Rr(Lge,yOe,1);fn(new class extends Zl{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:hWe,kbOpts:{weight:100,primary:70}})}runEditorCommand(t,e){return t.get(Lge).revealNext(e)}});Bh.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:hWe,primary:9,handler(t){t.get(Lge).reset()}});let _Oe=class{constructor(e){this._listener=new Map,this._disposables=new Lt,this._onDidChange=new st,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),Jo(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,yv(e.onDidChangeCursorPosition(n=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(n=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var n;(n=this._listener.get(e))==null||n.dispose(),this._listener.delete(e)}};_Oe=Xqt([u9(0,Yr)],_Oe);function xOe(t,e){return e.uri.scheme===t.uri.scheme?!0:!SLe(e.uri,Ti.walkThroughSnippet,Ti.vscodeChatCodeBlock,Ti.vscodeChatCodeCompareBlock,Ti.vscodeCopilotBackingChatCodeBlock)}async function IG(t,e,n,i,r){const s=n.ordered(t,i).map(l=>Promise.resolve(r(l,t,e)).then(void 0,c=>{$a(c)})),a=await Promise.all(s);return H0(a.flat()).filter(l=>xOe(t,l))}function AG(t,e,n,i,r){return IG(e,n,t,i,(o,s,a)=>o.provideDefinition(s,a,r))}function fWe(t,e,n,i,r){return IG(e,n,t,i,(o,s,a)=>o.provideDeclaration(s,a,r))}function mWe(t,e,n,i,r){return IG(e,n,t,i,(o,s,a)=>o.provideImplementation(s,a,r))}function pWe(t,e,n,i,r){return IG(e,n,t,i,(o,s,a)=>o.provideTypeDefinition(s,a,r))}function RG(t,e,n,i,r,o){return IG(e,n,t,r,async(s,a,l)=>{var d,h;const c=(d=await s.provideReferences(a,l,{includeDeclaration:!0},o))==null?void 0:d.filter(f=>xOe(a,f));if(!i||!c||c.length!==2)return c;const u=(h=await s.provideReferences(a,l,{includeDeclaration:!1},o))==null?void 0:h.filter(f=>xOe(a,f));return u&&u.length===1?u:c})}async function zw(t){const e=await t(),n=new Nm(e,""),i=n.references.map(r=>r.link);return n.dispose(),i}Pf("_executeDefinitionProvider",(t,e,n)=>{const i=t.get(Ln),r=AG(i.definitionProvider,e,n,!1,er.None);return zw(()=>r)});Pf("_executeDefinitionProvider_recursive",(t,e,n)=>{const i=t.get(Ln),r=AG(i.definitionProvider,e,n,!0,er.None);return zw(()=>r)});Pf("_executeTypeDefinitionProvider",(t,e,n)=>{const i=t.get(Ln),r=pWe(i.typeDefinitionProvider,e,n,!1,er.None);return zw(()=>r)});Pf("_executeTypeDefinitionProvider_recursive",(t,e,n)=>{const i=t.get(Ln),r=pWe(i.typeDefinitionProvider,e,n,!0,er.None);return zw(()=>r)});Pf("_executeDeclarationProvider",(t,e,n)=>{const i=t.get(Ln),r=fWe(i.declarationProvider,e,n,!1,er.None);return zw(()=>r)});Pf("_executeDeclarationProvider_recursive",(t,e,n)=>{const i=t.get(Ln),r=fWe(i.declarationProvider,e,n,!0,er.None);return zw(()=>r)});Pf("_executeReferenceProvider",(t,e,n)=>{const i=t.get(Ln),r=RG(i.referenceProvider,e,n,!1,!1,er.None);return zw(()=>r)});Pf("_executeReferenceProvider_recursive",(t,e,n)=>{const i=t.get(Ln),r=RG(i.referenceProvider,e,n,!1,!0,er.None);return zw(()=>r)});Pf("_executeImplementationProvider",(t,e,n)=>{const i=t.get(Ln),r=mWe(i.implementationProvider,e,n,!1,er.None);return zw(()=>r)});Pf("_executeImplementationProvider_recursive",(t,e,n)=>{const i=t.get(Ln),r=mWe(i.implementationProvider,e,n,!0,er.None);return zw(()=>r)});Oc.appendMenuItem(Rn.EditorContext,{submenu:Rn.EditorContextPeek,title:I("peek.submenu","Peek"),group:"navigation",order:100});class hF{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof hF||ot.isIPosition(e.position)&&e.model)}constructor(e,n){this.model=e,this.position=n}}const Gb=class Gb extends c_{static all(){return Gb._allSymbolNavigationCommands.values()}static _patchConfig(e){const n={...e,f1:!0};if(n.menu)for(const i of Ir.wrap(n.menu))(i.id===Rn.EditorContext||i.id===Rn.EditorContextPeek)&&(i.when=Tt.and(e.precondition,i.when));return n}constructor(e,n){super(Gb._patchConfig(n)),this.configuration=e,Gb._allSymbolNavigationCommands.set(n.id,this)}runEditorCommand(e,n,i,r){if(!n.hasModel())return Promise.resolve(void 0);const o=e.get(tl),s=e.get(Yr),a=e.get(oM),l=e.get(Lge),c=e.get(Ln),u=e.get(qn),d=n.getModel(),h=n.getPosition(),f=hF.is(i)?i:new hF(d,h),m=new xk(n,5),p=vq(this._getLocationModel(c,f.model,f.position,m.token),m.token).then(async g=>{var w;if(!g||m.token.isCancellationRequested)return;Am(g.ariaMessage);let y;if(g.referenceAt(d.uri,h)){const C=this._getAlternativeCommand(n);!Gb._activeAlternativeCommands.has(C)&&Gb._allSymbolNavigationCommands.has(C)&&(y=Gb._allSymbolNavigationCommands.get(C))}const _=g.references.length;if(_===0){if(!this.configuration.muteMessage){const C=d.getWordAtPosition(h);(w=Sm.get(n))==null||w.showMessage(this._getNoResultFoundMessage(C),h)}}else if(_===1&&y)Gb._activeAlternativeCommands.add(this.desc.id),u.invokeFunction(C=>y.runEditorCommand(C,n,i,r).finally(()=>{Gb._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(s,l,n,g,r)},g=>{o.error(g)}).finally(()=>{m.dispose()});return a.showWhile(p,250),p}async _onResult(e,n,i,r,o){const s=this._getGoToPreference(i);if(!(i instanceof Fv)&&(this.configuration.openInPeek||s==="peek"&&r.references.length>1))this._openInPeek(i,r,o);else{const a=r.firstReference(),l=r.references.length>1&&s==="gotoAndPeek",c=await this._openReference(i,e,a,this.configuration.openToSide,!l);l&&c?this._openInPeek(c,r,o):r.dispose(),s==="goto"&&n.put(a)}}async _openReference(e,n,i,r,o){let s;if(jdi(i)&&(s=i.targetSelectionRange),s||(s=i.range),!s)return;const a=await n.openCodeEditor({resource:i.uri,options:{selection:ve.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,r);if(a){if(o){const l=a.getModel(),c=a.createDecorationsCollection([{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&c.clear()},350)}return a}}_openInPeek(e,n,i){const r=yA.get(e);r&&e.hasModel()?r.toggleWidget(i??e.getSelection(),cc(o=>Promise.resolve(n)),this.configuration.openInPeek):n.dispose()}};Gb._allSymbolNavigationCommands=new Map,Gb._activeAlternativeCommands=new Set;let DS=Gb;class PG extends DS{async _getLocationModel(e,n,i,r){return new Nm(await AG(e.definitionProvider,n,i,!1,r),I("def.title","Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?I("noResultWord","No definition found for '{0}'",e.word):I("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}var ID;cs((ID=class extends PG{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:ID.id,title:{...Ci("actions.goToDecl.label","Go to Definition"),mnemonicTitle:I({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:Re.hasDefinitionProvider,keybinding:[{when:Re.editorTextFocus,primary:70,weight:100},{when:Tt.and(Re.editorTextFocus,pFt),primary:2118,weight:100}],menu:[{id:Rn.EditorContext,group:"navigation",order:1.1},{id:Rn.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),Ar.registerCommandAlias("editor.action.goToDeclaration",ID.id)}},ID.id="editor.action.revealDefinition",ID));var AD;cs((AD=class extends PG{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:AD.id,title:Ci("actions.goToDeclToSide.label","Open Definition to the Side"),precondition:Tt.and(Re.hasDefinitionProvider,Re.isInEmbeddedEditor.toNegated()),keybinding:[{when:Re.editorTextFocus,primary:Tl(2089,70),weight:100},{when:Tt.and(Re.editorTextFocus,pFt),primary:Tl(2089,2118),weight:100}]}),Ar.registerCommandAlias("editor.action.openDeclarationToTheSide",AD.id)}},AD.id="editor.action.revealDefinitionAside",AD));var RD;cs((RD=class extends PG{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:RD.id,title:Ci("actions.previewDecl.label","Peek Definition"),precondition:Tt.and(Re.hasDefinitionProvider,Lf.notInPeekEditor,Re.isInEmbeddedEditor.toNegated()),keybinding:{when:Re.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:Rn.EditorContextPeek,group:"peek",order:2}}),Ar.registerCommandAlias("editor.action.previewDeclaration",RD.id)}},RD.id="editor.action.peekDefinition",RD));class Zqt extends DS{async _getLocationModel(e,n,i,r){return new Nm(await fWe(e.declarationProvider,n,i,!1,r),I("decl.title","Declarations"))}_getNoResultFoundMessage(e){return e&&e.word?I("decl.noResultWord","No declaration found for '{0}'",e.word):I("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}var BI;cs((BI=class extends Zqt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:BI.id,title:{...Ci("actions.goToDeclaration.label","Go to Declaration"),mnemonicTitle:I({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:Tt.and(Re.hasDeclarationProvider,Re.isInEmbeddedEditor.toNegated()),menu:[{id:Rn.EditorContext,group:"navigation",order:1.3},{id:Rn.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?I("decl.noResultWord","No declaration found for '{0}'",e.word):I("decl.generic.noResults","No declaration found")}},BI.id="editor.action.revealDeclaration",BI));cs(class extends Zqt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:Ci("actions.peekDecl.label","Peek Declaration"),precondition:Tt.and(Re.hasDeclarationProvider,Lf.notInPeekEditor,Re.isInEmbeddedEditor.toNegated()),menu:{id:Rn.EditorContextPeek,group:"peek",order:3}})}});class Qqt extends DS{async _getLocationModel(e,n,i,r){return new Nm(await pWe(e.typeDefinitionProvider,n,i,!1,r),I("typedef.title","Type Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?I("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):I("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}var zI;cs((zI=class extends Qqt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:zI.ID,title:{...Ci("actions.goToTypeDefinition.label","Go to Type Definition"),mnemonicTitle:I({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:Re.hasTypeDefinitionProvider,keybinding:{when:Re.editorTextFocus,primary:0,weight:100},menu:[{id:Rn.EditorContext,group:"navigation",order:1.4},{id:Rn.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},zI.ID="editor.action.goToTypeDefinition",zI));var HI;cs((HI=class extends Qqt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:HI.ID,title:Ci("actions.peekTypeDefinition.label","Peek Type Definition"),precondition:Tt.and(Re.hasTypeDefinitionProvider,Lf.notInPeekEditor,Re.isInEmbeddedEditor.toNegated()),menu:{id:Rn.EditorContextPeek,group:"peek",order:4}})}},HI.ID="editor.action.peekTypeDefinition",HI));class Jqt extends DS{async _getLocationModel(e,n,i,r){return new Nm(await mWe(e.implementationProvider,n,i,!1,r),I("impl.title","Implementations"))}_getNoResultFoundMessage(e){return e&&e.word?I("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):I("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}var WI;cs((WI=class extends Jqt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:WI.ID,title:{...Ci("actions.goToImplementation.label","Go to Implementations"),mnemonicTitle:I({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:Re.hasImplementationProvider,keybinding:{when:Re.editorTextFocus,primary:2118,weight:100},menu:[{id:Rn.EditorContext,group:"navigation",order:1.45},{id:Rn.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},WI.ID="editor.action.goToImplementation",WI));var UI;cs((UI=class extends Jqt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:UI.ID,title:Ci("actions.peekImplementation.label","Peek Implementations"),precondition:Tt.and(Re.hasImplementationProvider,Lf.notInPeekEditor,Re.isInEmbeddedEditor.toNegated()),keybinding:{when:Re.editorTextFocus,primary:3142,weight:100},menu:{id:Rn.EditorContextPeek,group:"peek",order:5}})}},UI.ID="editor.action.peekImplementation",UI));class eGt extends DS{_getNoResultFoundMessage(e){return e?I("references.no","No references found for '{0}'",e.word):I("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}cs(class extends eGt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{...Ci("goToReferences.label","Go to References"),mnemonicTitle:I({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:Tt.and(Re.hasReferenceProvider,Lf.notInPeekEditor,Re.isInEmbeddedEditor.toNegated()),keybinding:{when:Re.editorTextFocus,primary:1094,weight:100},menu:[{id:Rn.EditorContext,group:"navigation",order:1.45},{id:Rn.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(e,n,i,r){return new Nm(await RG(e.referenceProvider,n,i,!0,!1,r),I("ref.title","References"))}});cs(class extends eGt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:Ci("references.action.label","Peek References"),precondition:Tt.and(Re.hasReferenceProvider,Lf.notInPeekEditor,Re.isInEmbeddedEditor.toNegated()),menu:{id:Rn.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,n,i,r){return new Nm(await RG(e.referenceProvider,n,i,!1,!1,r),I("ref.title","References"))}});class dTr extends DS{constructor(e,n,i){super(e,{id:"editor.action.goToLocation",title:Ci("label.generic","Go to Any Symbol"),precondition:Tt.and(Lf.notInPeekEditor,Re.isInEmbeddedEditor.toNegated())}),this._references=n,this._gotoMultipleBehaviour=i}async _getLocationModel(e,n,i,r){return new Nm(this._references,I("generic.title","Locations"))}_getNoResultFoundMessage(e){return e&&I("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){return this._gotoMultipleBehaviour??e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}Ar.registerCommand({id:"editor.action.goToLocations",metadata:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:ri},{name:"position",description:"The position at which to start",constraint:ot.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:async(t,e,n,i,r,o,s)=>{Gr(ri.isUri(e)),Gr(ot.isIPosition(n)),Gr(Array.isArray(i)),Gr(typeof r>"u"||typeof r=="string"),Gr(typeof s>"u"||typeof s=="boolean");const a=t.get(Yr),l=await a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(yw(l))return l.setPosition(n),l.revealPositionInCenterIfOutsideViewport(n,0),l.invokeWithinContext(c=>{const u=new class extends dTr{_getNoResultFoundMessage(d){return o||super._getNoResultFoundMessage(d)}}({muteMessage:!o,openInPeek:!!s,openToSide:!1},i,r);c.get(qn).invokeFunction(u.run.bind(u),l)})}});Ar.registerCommand({id:"editor.action.peekLocations",metadata:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:ri},{name:"position",description:"The position at which to start",constraint:ot.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"}]},handler:async(t,e,n,i,r)=>{t.get(gs).executeCommand("editor.action.goToLocations",e,n,i,r,void 0,!0)}});Ar.registerCommand({id:"editor.action.findReferences",handler:(t,e,n)=>{Gr(ri.isUri(e)),Gr(ot.isIPosition(n));const i=t.get(Ln),r=t.get(Yr);return r.openCodeEditor({resource:e},r.getFocusedCodeEditor()).then(o=>{if(!yw(o)||!o.hasModel())return;const s=yA.get(o);if(!s)return;const a=cc(c=>RG(i.referenceProvider,o.getModel(),ot.lift(n),!1,!1,c).then(u=>new Nm(u,I("ref.title","References")))),l=new ve(n.lineNumber,n.column,n.lineNumber,n.column);return Promise.resolve(s.toggleWidget(l,a,!1))})}});Ar.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");async function hTr(t,e,n,i){const r=t.get(Rf),o=t.get(Hm),s=t.get(gs),a=t.get(qn),l=t.get(tl);if(await i.item.resolve(er.None),!i.part.location)return;const c=i.part.location,u=[],d=new Set(Oc.getMenuItems(Rn.EditorContext).map(f=>v3(f)?f.command.id:Cge()));for(const f of DS.all())d.has(f.desc.id)&&u.push(new xm(f.desc.id,wm.label(f.desc,{renderShortTitle:!0}),void 0,!0,async()=>{const m=await r.createModelReference(c.uri);try{const p=new hF(m.object.textEditorModel,ve.getStartPosition(c.range)),g=i.item.anchor.range;await a.invokeFunction(f.runEditorCommand.bind(f),e,p,g)}finally{m.dispose()}}));if(i.part.command){const{command:f}=i.part;u.push(new dc),u.push(new xm(f.id,f.title,void 0,!0,async()=>{try{await s.executeCommand(f.id,...f.arguments??[])}catch(m){l.notify({severity:fme.Error,source:i.item.provider.displayName,message:m})}}))}const h=e.getOption(128);o.showContextMenu({domForShadowRoot:h?e.getDomNode()??void 0:void 0,getAnchor:()=>{const f=Ga(n);return{x:f.left,y:f.top+f.height+8}},getActions:()=>u,onHide:()=>{e.focus()},autoSelectFirstItem:!0})}async function tGt(t,e,n,i){const o=await t.get(Rf).createModelReference(i.uri);await n.invokeWithinContext(async s=>{const a=e.hasSideBySideModifier,l=s.get(vi),c=Lf.inPeekEditor.getValue(l),u=!a&&n.getOption(89)&&!c;return new PG({openToSide:a,openInPeek:u,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(s,new hF(o.object.textEditorModel,ve.getStartPosition(i.range)),ve.lift(i.range))}),o.dispose()}var fTr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},pO=function(t,e){return function(n,i){e(n,i,t)}},BO;class Vae{constructor(){this._entries=new Aw(50)}get(e){const n=Vae._key(e);return this._entries.get(n)}set(e,n){const i=Vae._key(e);this._entries.set(i,n)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const nGt=Sr("IInlayHintsCache");Rr(nGt,Vae,1);class wOe{constructor(e,n){this.item=e,this.index=n}get part(){const e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}}class mTr{constructor(e,n){this.part=e,this.hasTriggerModifier=n}}var wC;let FU=(wC=class{static get(e){return e.getContribution(BO.ID)??void 0}constructor(e,n,i,r,o,s,a){this._editor=e,this._languageFeaturesService=n,this._inlayHintsCache=r,this._commandService=o,this._notificationService=s,this._instaService=a,this._disposables=new Lt,this._sessionDisposables=new Lt,this._decorationsMetadata=new Map,this._ruleFactory=new dre(this._editor),this._activeRenderMode=0,this._debounceInfo=i.for(n.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(n.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(l=>{l.hasChanged(142)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(142);if(e.enabled==="off")return;const n=this._editor.getModel();if(!n||!this._languageFeaturesService.inlayHintsProvider.has(n))return;if(e.enabled==="on")this._activeRenderMode=0;else{let a,l;e.enabled==="onUnlessPressed"?(a=0,l=1):(a=1,l=0),this._activeRenderMode=a,this._sessionDisposables.add(sC.getInstance().event(c=>{if(!this._editor.hasModel())return;const u=c.altKey&&c.ctrlKey&&!(c.shiftKey||c.metaKey)?l:a;if(u!==this._activeRenderMode){this._activeRenderMode=u;const d=this._editor.getModel(),h=this._copyInlayHintsWithCurrentAnchor(d);this._updateHintsDecorators([d.getFullModelRange()],h),s.schedule(0)}}))}const i=this._inlayHintsCache.get(n);i&&this._updateHintsDecorators([n.getFullModelRange()],i),this._sessionDisposables.add(Kn(()=>{n.isDisposed()||this._cacheHintsForFastRestore(n)}));let r;const o=new Set,s=new Wo(async()=>{const a=Date.now();r==null||r.dispose(!0),r=new oa;const l=n.onWillDispose(()=>r==null?void 0:r.cancel());try{const c=r.token,u=await Pae.create(this._languageFeaturesService.inlayHintsProvider,n,this._getHintsRanges(),c);if(s.delay=this._debounceInfo.update(n,Date.now()-a),c.isCancellationRequested){u.dispose();return}for(const d of u.provider)typeof d.onDidChangeInlayHints=="function"&&!o.has(d)&&(o.add(d),this._sessionDisposables.add(d.onDidChangeInlayHints(()=>{s.isScheduled()||s.schedule()})));this._sessionDisposables.add(u),this._updateHintsDecorators(u.ranges,u.items),this._cacheHintsForFastRestore(n)}catch(c){ji(c)}finally{r.dispose(),l.dispose()}},this._debounceInfo.get(n));this._sessionDisposables.add(s),this._sessionDisposables.add(Kn(()=>r==null?void 0:r.dispose(!0))),s.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(a=>{(a.scrollTopChanged||!s.isScheduled())&&s.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(a=>{r==null||r.cancel();const l=Math.max(s.delay,1250);s.schedule(l)})),this._sessionDisposables.add(this._installDblClickGesture(()=>s.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new Lt,n=e.add(new Dge(this._editor)),i=new Lt;return e.add(i),e.add(n.onMouseMoveOrRelevantKeyDown(r=>{const[o]=r,s=this._getInlayHintLabelPart(o),a=this._editor.getModel();if(!s||!a){i.clear();return}const l=new oa;i.add(Kn(()=>l.dispose(!0))),s.item.resolve(l.token),this._activeInlayHintPart=s.part.command||s.part.location?new mTr(s,o.hasTriggerModifier):void 0;const c=a.validatePosition(s.item.hint.position).lineNumber,u=new ve(c,1,c,a.getLineMaxColumn(c)),d=this._getInlineHintsForRange(u);this._updateHintsDecorators([u],d),i.add(Kn(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([u],d)}))})),e.add(n.onCancel(()=>i.clear())),e.add(n.onExecute(async r=>{const o=this._getInlayHintLabelPart(r);if(o){const s=o.part;s.location?this._instaService.invokeFunction(tGt,r,this._editor,s.location):SMe.is(s.command)&&await this._invokeCommand(s.command,o.item)}})),e}_getInlineHintsForRange(e){const n=new Set;for(const i of this._decorationsMetadata.values())e.containsRange(i.item.anchor.range)&&n.add(i.item);return Array.from(n)}_installDblClickGesture(e){return this._editor.onMouseUp(async n=>{if(n.event.detail!==2)return;const i=this._getInlayHintLabelPart(n);if(i&&(n.event.preventDefault(),await i.item.resolve(er.None),md(i.item.hint.textEdits))){const r=i.item.hint.textEdits.map(o=>ia.replace(ve.lift(o.range),o.text));this._editor.executeEdits("inlayHint.default",r),e()}})}_installContextMenu(){return this._editor.onContextMenu(async e=>{if(!uc(e.event.target))return;const n=this._getInlayHintLabelPart(e);n&&await this._instaService.invokeFunction(hTr,this._editor,e.event.target,n)})}_getInlayHintLabelPart(e){var i;if(e.target.type!==6)return;const n=(i=e.target.detail.injectedText)==null?void 0:i.options;if(n instanceof yk&&(n==null?void 0:n.attachedData)instanceof wOe)return n.attachedData}async _invokeCommand(e,n){try{await this._commandService.executeCommand(e.id,...e.arguments??[])}catch(i){this._notificationService.notify({severity:fme.Error,source:n.provider.displayName,message:i})}}_cacheHintsForFastRestore(e){const n=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,n)}_copyInlayHintsWithCurrentAnchor(e){const n=new Map;for(const[i,r]of this._decorationsMetadata){if(n.has(r.item))continue;const o=e.getDecorationRange(i);if(o){const s=new Hqt(o,r.item.anchor.direction),a=r.item.with({anchor:s});n.set(r.item,a)}}return Array.from(n.values())}_getHintsRanges(){const n=this._editor.getModel(),i=this._editor.getVisibleRangesPlusViewportAboveBelow(),r=[];for(const o of i.sort(ve.compareRangesUsingStarts)){const s=n.validateRange(new ve(o.startLineNumber-30,o.startColumn,o.endLineNumber+30,o.endColumn));r.length===0||!ve.areIntersectingOrTouching(r[r.length-1],s)?r.push(s):r[r.length-1]=ve.plusRange(r[r.length-1],s)}return r}_updateHintsDecorators(e,n){var m,p;const i=[],r=(g,y,_,w,C)=>{const N={content:_,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:y.className,cursorStops:w,attachedData:C};i.push({item:g,classNameRef:y,decoration:{range:g.anchor.range,options:{description:"InlayHint",showIfCollapsed:g.anchor.range.isEmpty(),collapseOnReplaceEdit:!g.anchor.range.isEmpty(),stickiness:0,[g.anchor.direction]:this._activeRenderMode===0?N:void 0}}})},o=(g,y)=>{const _=this._ruleFactory.createClassNameRef({width:`${s/3|0}px`,display:"inline-block"});r(g,_," ",y?dv.Right:dv.None)},{fontSize:s,fontFamily:a,padding:l,isUniform:c}=this._getLayoutInfo(),u="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(u,a);let d={line:0,totalLen:0};for(const g of n){if(d.line!==g.anchor.range.startLineNumber&&(d={line:g.anchor.range.startLineNumber,totalLen:0}),d.totalLen>BO._MAX_LABEL_LEN)continue;g.hint.paddingLeft&&o(g,!1);const y=typeof g.hint.label=="string"?[{label:g.hint.label}]:g.hint.label;for(let _=0;_<y.length;_++){const w=y[_],C=_===0,N=_===y.length-1,E={fontSize:`${s}px`,fontFamily:`var(${u}), ${Rh.fontFamily}`,verticalAlign:c?"baseline":"middle",unicodeBidi:"isolate"};md(g.hint.textEdits)&&(E.cursor="default"),this._fillInColors(E,g.hint),(w.command||w.location)&&((m=this._activeInlayHintPart)==null?void 0:m.part.item)===g&&this._activeInlayHintPart.part.index===_&&(E.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(E.color=Sa(lbi),E.cursor="pointer")),l&&(C&&N?(E.padding=`1px ${Math.max(1,s/4)|0}px`,E.borderRadius=`${s/4|0}px`):C?(E.padding=`1px 0 1px ${Math.max(1,s/4)|0}px`,E.borderRadius=`${s/4|0}px 0 0 ${s/4|0}px`):N?(E.padding=`1px ${Math.max(1,s/4)|0}px 1px 0`,E.borderRadius=`0 ${s/4|0}px ${s/4|0}px 0`):E.padding="1px 0 1px 0");let D=w.label;d.totalLen+=D.length;let k=!1;const M=d.totalLen-BO._MAX_LABEL_LEN;if(M>0&&(D=D.slice(0,-M)+"…",k=!0),r(g,this._ruleFactory.createClassNameRef(E),pTr(D),N&&!g.hint.paddingRight?dv.Right:dv.None,new wOe(g,_)),k)break}if(g.hint.paddingRight&&o(g,!0),i.length>BO._MAX_DECORATORS)break}const h=[];for(const[g,y]of this._decorationsMetadata){const _=(p=this._editor.getModel())==null?void 0:p.getDecorationRange(g);_&&e.some(w=>w.containsRange(_))&&(h.push(g),y.classNameRef.dispose(),this._decorationsMetadata.delete(g))}const f=J0.capture(this._editor);this._editor.changeDecorations(g=>{const y=g.deltaDecorations(h,i.map(_=>_.decoration));for(let _=0;_<y.length;_++){const w=i[_];this._decorationsMetadata.set(y[_],w)}}),f.restore(this._editor)}_fillInColors(e,n){n.kind===jie.Parameter?(e.backgroundColor=Sa(gbi),e.color=Sa(pbi)):n.kind===jie.Type?(e.backgroundColor=Sa(mbi),e.color=Sa(fbi)):(e.backgroundColor=Sa(sVe),e.color=Sa(oVe))}_getLayoutInfo(){const e=this._editor.getOption(142),n=e.padding,i=this._editor.getOption(52),r=this._editor.getOption(49);let o=e.fontSize;(!o||o<5||o>i)&&(o=i);const s=e.fontFamily||r;return{fontSize:o,fontFamily:s,padding:n,isUniform:!n&&s===r&&o===i}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}},BO=wC,wC.ID="editor.contrib.InlayHints",wC._MAX_DECORATORS=1500,wC._MAX_LABEL_LEN=43,wC);FU=BO=fTr([pO(1,Ln),pO(2,tg),pO(3,nGt),pO(4,gs),pO(5,tl),pO(6,qn)],FU);function pTr(t){return t.replace(/[ \t]/g," ")}Ar.registerCommand("_executeInlayHintProvider",async(t,...e)=>{const[n,i]=e;Gr(ri.isUri(n)),Gr(ve.isIRange(i));const{inlayHintsProvider:r}=t.get(Ln),o=await t.get(Rf).createModelReference(n);try{const s=await Pae.create(r,o.object.textEditorModel,[ve.lift(i)],er.None),a=s.items.map(l=>l.hint);return setTimeout(()=>s.dispose(),0),a}finally{o.dispose()}});var gTr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},zN=function(t,e){return function(n,i){e(n,i,t)}};class Ryt extends $te{constructor(e,n,i,r){super(10,n,e.item.anchor.range,i,r,!0),this.part=e}}let Bae=class extends OU{constructor(e,n,i,r,o,s,a,l,c){super(e,n,i,s,l,r,o,c),this._resolverService=a,this.hoverOrdinal=6}suggestHoverAnchor(e){var r;if(!FU.get(this._editor)||e.target.type!==6)return null;const i=(r=e.target.detail.injectedText)==null?void 0:r.options;return i instanceof yk&&i.attachedData instanceof wOe?new Ryt(i.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,n,i){return e instanceof Ryt?new xp(async r=>{const{part:o}=e;if(await o.item.resolve(i),i.isCancellationRequested)return;let s;typeof o.item.hint.tooltip=="string"?s=new rd().appendText(o.item.hint.tooltip):o.item.hint.tooltip&&(s=o.item.hint.tooltip),s&&r.emitOne(new ov(this,e.range,[s],!1,0)),md(o.item.hint.textEdits)&&r.emitOne(new ov(this,e.range,[new rd().appendText(I("hint.dbl","Double-click to insert"))],!1,10001));let a;if(typeof o.part.tooltip=="string"?a=new rd().appendText(o.part.tooltip):o.part.tooltip&&(a=o.part.tooltip),a&&r.emitOne(new ov(this,e.range,[a],!1,1)),o.part.location||o.part.command){let c;const d=this._editor.getOption(78)==="altKey"?xr?I("links.navigate.kb.meta.mac","cmd + click"):I("links.navigate.kb.meta","ctrl + click"):xr?I("links.navigate.kb.alt.mac","option + click"):I("links.navigate.kb.alt","alt + click");o.part.location&&o.part.command?c=new rd().appendText(I("hint.defAndCommand","Go to Definition ({0}), right click for more",d)):o.part.location?c=new rd().appendText(I("hint.def","Go to Definition ({0})",d)):o.part.command&&(c=new rd(`[${I("hint.cmd","Execute Command")}](${WLr(o.part.command)} "${o.part.command.title}") (${d})`,{isTrusted:!0})),c&&r.emitOne(new ov(this,e.range,[c],!1,1e4))}const l=await this._resolveInlayHintLabelPartHover(o,i);for await(const c of l)r.emitOne(c)}):xp.EMPTY}async _resolveInlayHintLabelPartHover(e,n){if(!e.part.location)return xp.EMPTY;const{uri:i,range:r}=e.part.location,o=await this._resolverService.createModelReference(i);try{const s=o.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(s)?uWe(this._languageFeaturesService.hoverProvider,s,new ot(r.startLineNumber,r.startColumn),n).filter(a=>!p5(a.hover.contents)).map(a=>new ov(this,e.item.anchor.range,a.hover.contents,!1,2+a.ordinal)):xp.EMPTY}finally{o.dispose()}}};Bae=gTr([zN(1,Qs),zN(2,Wm),zN(3,vo),zN(4,Pw),zN(5,cr),zN(6,Rf),zN(7,Ln),zN(8,gs)],Bae);class gWe extends ct{constructor(e,n,i,r,o,s){super();const a=n.anchor,l=n.hoverParts;this._renderedHoverParts=this._register(new COe(e,i,l,s,o));const{showAtPosition:c,showAtSecondaryPosition:u}=gWe.computeHoverPositions(e,a.range,l);this.shouldAppearBeforeContent=l.some(d=>d.isBeforeContent),this.showAtPosition=c,this.showAtSecondaryPosition=u,this.initialMousePosX=a.initialMousePosX,this.initialMousePosY=a.initialMousePosY,this.shouldFocus=r.shouldFocus,this.source=r.source}get domNode(){return this._renderedHoverParts.domNode}get domNodeHasChildren(){return this._renderedHoverParts.domNodeHasChildren}get focusedHoverPartIndex(){return this._renderedHoverParts.focusedHoverPartIndex}async updateHoverVerbosityLevel(e,n,i){this._renderedHoverParts.updateHoverVerbosityLevel(e,n,i)}isColorPickerVisible(){return this._renderedHoverParts.isColorPickerVisible()}static computeHoverPositions(e,n,i){let r=1;if(e.hasModel()){const u=e._getViewModel(),d=u.coordinatesConverter,h=d.convertModelRangeToViewRange(n),f=u.getLineMinColumn(h.startLineNumber),m=new ot(h.startLineNumber,f);r=d.convertViewPositionToModelPosition(m).column}const o=n.startLineNumber;let s=n.startColumn,a;for(const u of i){const d=u.range,h=d.startLineNumber===o,f=d.endLineNumber===o;if(h&&f){const p=d.startColumn,g=Math.min(s,p);s=Math.max(g,r)}u.forceShowAtRange&&(a=d)}let l,c;if(a){const u=a.getStartPosition();l=u,c=u}else l=n.getStartPosition(),c=new ot(o,s);return{showAtPosition:l,showAtSecondaryPosition:c}}}class bTr{constructor(e,n){this._statusBar=n,e.appendChild(this._statusBar.hoverElement)}get hoverElement(){return this._statusBar.hoverElement}get actions(){return this._statusBar.actions}dispose(){this._statusBar.dispose()}}const Nce=class Nce extends ct{constructor(e,n,i,r,o){super(),this._renderedParts=[],this._focusedHoverPartIndex=-1,this._context=o,this._fragment=document.createDocumentFragment(),this._register(this._renderParts(n,i,o,r)),this._register(this._registerListenersOnRenderedParts()),this._register(this._createEditorDecorations(e,i)),this._updateMarkdownAndColorParticipantInfo(n)}_createEditorDecorations(e,n){if(n.length===0)return ct.None;let i=n[0].range;for(const o of n){const s=o.range;i=ve.plusRange(i,s)}const r=e.createDecorationsCollection();return r.set([{range:i,options:Nce._DECORATION_OPTIONS}]),Kn(()=>{r.clear()})}_renderParts(e,n,i,r){const o=new Rae(r),s={fragment:this._fragment,statusBar:o,...i},a=new Lt;for(const c of e){const u=this._renderHoverPartsForParticipant(n,c,s);a.add(u);for(const d of u.renderedHoverParts)this._renderedParts.push({type:"hoverPart",participant:c,hoverPart:d.hoverPart,hoverElement:d.hoverElement})}const l=this._renderStatusBar(this._fragment,o);return l&&(a.add(l),this._renderedParts.push({type:"statusBar",hoverElement:l.hoverElement,actions:l.actions})),Kn(()=>{a.dispose()})}_renderHoverPartsForParticipant(e,n,i){const r=e.filter(s=>s.owner===n);return r.length>0?n.renderHoverParts(i,r):new vA([])}_renderStatusBar(e,n){if(n.hasContent)return new bTr(e,n)}_registerListenersOnRenderedParts(){const e=new Lt;return this._renderedParts.forEach((n,i)=>{const r=n.hoverElement;r.tabIndex=0,e.add(yt(r,Yt.FOCUS_IN,o=>{o.stopPropagation(),this._focusedHoverPartIndex=i})),e.add(yt(r,Yt.FOCUS_OUT,o=>{o.stopPropagation(),this._focusedHoverPartIndex=-1}))}),e}_updateMarkdownAndColorParticipantInfo(e){const n=e.find(i=>i instanceof OU&&!(i instanceof Bae));n&&(this._markdownHoverParticipant=n),this._colorHoverParticipant=e.find(i=>i instanceof RU)}async updateHoverVerbosityLevel(e,n,i){if(!this._markdownHoverParticipant)return;const r=this._normalizedIndexToMarkdownHoverIndexRange(this._markdownHoverParticipant,n);if(r===void 0)return;const o=await this._markdownHoverParticipant.updateMarkdownHoverVerbosityLevel(e,r,i);o&&(this._renderedParts[n]={type:"hoverPart",participant:this._markdownHoverParticipant,hoverPart:o.hoverPart,hoverElement:o.hoverElement},this._context.onContentsChanged())}isColorPickerVisible(){var e;return((e=this._colorHoverParticipant)==null?void 0:e.isColorPickerVisible())??!1}_normalizedIndexToMarkdownHoverIndexRange(e,n){const i=this._renderedParts[n];if(!i||i.type!=="hoverPart"||!(i.participant===e))return;const o=this._renderedParts.findIndex(s=>s.type==="hoverPart"&&s.participant===e);if(o===-1)throw new co;return n-o}get domNode(){return this._fragment}get domNodeHasChildren(){return this._fragment.hasChildNodes()}get focusedHoverPartIndex(){return this._focusedHoverPartIndex}};Nce._DECORATION_OPTIONS=Hi.register({description:"content-hover-highlight",className:"hoverHighlight"});let COe=Nce;var vTr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Pyt=function(t,e){return function(n,i){e(n,i,t)}};let SOe=class extends ct{constructor(e,n,i){super(),this._editor=e,this._instantiationService=n,this._keybindingService=i,this._currentResult=null,this._onContentsChanged=this._register(new st),this.onContentsChanged=this._onContentsChanged.event,this._contentHoverWidget=this._register(this._instantiationService.createInstance(Iae,this._editor)),this._participants=this._initializeHoverParticipants(),this._computer=new Aae(this._editor,this._participants),this._hoverOperation=this._register(new Fqt(this._editor,this._computer)),this._registerListeners()}_initializeHoverParticipants(){const e=[];for(const n of wR.getAll()){const i=this._instantiationService.createInstance(n,this._editor);e.push(i)}return e.sort((n,i)=>n.hoverOrdinal-i.hoverOrdinal),this._register(this._contentHoverWidget.onDidResize(()=>{this._participants.forEach(n=>{var i;return(i=n.handleResize)==null?void 0:i.call(n)})})),e}_registerListeners(){this._register(this._hoverOperation.onResult(e=>{if(!this._computer.anchor)return;const n=e.hasLoadingMessage?this._addLoadingMessage(e.value):e.value;this._withResult(new $qt(this._computer.anchor,n,e.isComplete))})),this._register(Fa(this._contentHoverWidget.getDomNode(),"keydown",e=>{e.equals(9)&&this.hide()})),this._register(Ca.onDidChange(()=>{this._contentHoverWidget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}_startShowingOrUpdateHover(e,n,i,r,o){if(!(this._contentHoverWidget.position&&this._currentResult))return e?(this._startHoverOperationIfNecessary(e,n,i,r,!1),!0):!1;const a=this._editor.getOption(60).sticky,l=o&&this._contentHoverWidget.isMouseGettingCloser(o.event.posx,o.event.posy);return a&&l?(e&&this._startHoverOperationIfNecessary(e,n,i,r,!0),!0):e?this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._contentHoverWidget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,n,i,r,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,n,i,r,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,n,i,r,o){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=r,this._computer.source=i,this._computer.insistOnKeepingHoverVisible=o,this._hoverOperation.start(n))}_setCurrentResult(e){let n=e;if(this._currentResult===n)return;n&&n.hoverParts.length===0&&(n=null),this._currentResult=n,this._currentResult?this._showHover(this._currentResult):this._hideHover()}_addLoadingMessage(e){if(!this._computer.anchor)return e;for(const n of this._participants){if(!n.createLoadingMessage)continue;const i=n.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}return e}_withResult(e){if(this._contentHoverWidget.position&&this._currentResult&&this._currentResult.isComplete||this._setCurrentResult(e),!e.isComplete)return;const r=e.hoverParts.length===0,o=this._computer.insistOnKeepingHoverVisible;r&&o||this._setCurrentResult(e)}_showHover(e){const n=this._getHoverContext();this._renderedContentHover=new gWe(this._editor,e,this._participants,this._computer,n,this._keybindingService),this._renderedContentHover.domNodeHasChildren?this._contentHoverWidget.show(this._renderedContentHover):this._renderedContentHover.dispose()}_hideHover(){this._contentHoverWidget.hide()}_getHoverContext(){return{hide:()=>{this.hide()},onContentsChanged:()=>{this._onContentsChanged.fire(),this._contentHoverWidget.onContentsChanged()},setMinimumDimensions:r=>{this._contentHoverWidget.setMinimumDimensions(r)}}}showsOrWillShow(e){if(this._contentHoverWidget.isResizing)return!0;const i=this._findHoverAnchorCandidates(e);if(!(i.length>0))return this._startShowingOrUpdateHover(null,0,0,!1,e);const o=i[0];return this._startShowingOrUpdateHover(o,0,0,!1,e)}_findHoverAnchorCandidates(e){const n=[];for(const r of this._participants){if(!r.suggestHoverAnchor)continue;const o=r.suggestHoverAnchor(e);o&&n.push(o)}const i=e.target;switch(i.type){case 6:{n.push(new WSe(0,i.range,e.event.posx,e.event.posy));break}case 7:{const r=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;if(!(!i.detail.isAfterLines&&typeof i.detail.horizontalDistanceToText=="number"&&i.detail.horizontalDistanceToText<r))break;n.push(new WSe(0,i.range,e.event.posx,e.event.posy));break}}return n.sort((r,o)=>o.priority-r.priority),n}startShowingAtRange(e,n,i,r){this._startShowingOrUpdateHover(new WSe(0,e,void 0,void 0),n,i,r,null)}async updateHoverVerbosityLevel(e,n,i){var r;(r=this._renderedContentHover)==null||r.updateHoverVerbosityLevel(e,n,i)}focusedHoverPartIndex(){var e;return((e=this._renderedContentHover)==null?void 0:e.focusedHoverPartIndex)??-1}containsNode(e){return e?this._contentHoverWidget.getDomNode().contains(e):!1}focus(){this._contentHoverWidget.focus()}scrollUp(){this._contentHoverWidget.scrollUp()}scrollDown(){this._contentHoverWidget.scrollDown()}scrollLeft(){this._contentHoverWidget.scrollLeft()}scrollRight(){this._contentHoverWidget.scrollRight()}pageUp(){this._contentHoverWidget.pageUp()}pageDown(){this._contentHoverWidget.pageDown()}goToTop(){this._contentHoverWidget.goToTop()}goToBottom(){this._contentHoverWidget.goToBottom()}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){var e;return((e=this._renderedContentHover)==null?void 0:e.isColorPickerVisible())??!1}get isVisibleFromKeyboard(){return this._contentHoverWidget.isVisibleFromKeyboard}get isVisible(){return this._contentHoverWidget.isVisible}get isFocused(){return this._contentHoverWidget.isFocused}get isResizing(){return this._contentHoverWidget.isResizing}get widget(){return this._contentHoverWidget}};SOe=vTr([Pyt(1,qn),Pyt(2,vo)],SOe);class yTr{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}get lane(){return this._laneOrLine}set lane(e){this._laneOrLine=e}constructor(e){this._editor=e,this._lineNumber=-1,this._laneOrLine=Iv.Center}computeSync(){var o;const e=s=>({value:s}),n=this._editor.getLineDecorations(this._lineNumber),i=[],r=this._laneOrLine==="lineNo";if(!n)return i;for(const s of n){const a=((o=s.options.glyphMargin)==null?void 0:o.position)??Iv.Center;if(!r&&a!==this._laneOrLine)continue;const l=r?s.options.lineNumberHoverMessage:s.options.glyphMarginHoverMessage;!l||p5(l)||i.push(...a8e(l).map(e))}return i}}const Oyt=Xt,Ece=class Ece extends ct{constructor(e,n,i){super(),this._renderDisposeables=this._register(new Lt),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new YVe),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new pS({editor:this._editor},n,i)),this._computer=new yTr(this._editor),this._hoverOperation=this._register(new Fqt(this._editor,this._computer)),this._register(this._hoverOperation.onResult(r=>{this._withResult(r.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(50)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Ece.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(n=>this._editor.applyFontInfo(n))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}showsOrWillShow(e){const n=e.target;return n.type===2&&n.detail.glyphMarginLane?(this._startShowingAt(n.position.lineNumber,n.detail.glyphMarginLane),!0):n.type===3?(this._startShowingAt(n.position.lineNumber,"lineNo"),!0):!1}_startShowingAt(e,n){this._computer.lineNumber===e&&this._computer.lane===n||(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._computer.lane=n,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,n){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const r of n){const o=Oyt("div.hover-row.markdown-hover"),s=jt(o,Oyt("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(r.value));s.appendChild(a.element),i.appendChild(o)}this._updateContents(i),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const n=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),r=this._editor.getScrollTop(),o=this._editor.getOption(67),s=this._hover.containerDomNode.clientHeight,a=i-r-(s-o)/2,l=n.glyphMarginLeft+n.glyphMarginWidth+(this._computer.lane==="lineNo"?n.lineNumbersWidth:0);this._hover.containerDomNode.style.left=`${l}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}};Ece.ID="editor.contrib.modesGlyphHoverWidget";let zae=Ece;var _Tr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},jyt=function(t,e){return function(n,i){e(n,i,t)}},NOe;const xTr=!1;var KI;let Jd=(KI=class extends ct{constructor(e,n,i){super(),this._editor=e,this._instantiationService=n,this._keybindingService=i,this._onHoverContentsChanged=this._register(new st),this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new Lt,this._hoverState={mouseDown:!1,activatedByDecoratorClick:!1},this._reactToEditorMouseMoveRunner=this._register(new Wo(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())}))}static get(e){return e.getContribution(NOe.ID)}_hookListeners(){const e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.delay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown(n=>this._onEditorMouseDown(n))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._listenersStore.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))):(this._listenersStore.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._listenersStore.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))),this._listenersStore.add(this._editor.onMouseLeave(n=>this._onEditorMouseLeave(n))),this._listenersStore.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this._hideWidgets()})),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(n=>this._onEditorScrollChanged(n)))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,!this._shouldNotHideCurrentHoverWidget(e)&&this._hideWidgets()}_shouldNotHideCurrentHoverWidget(e){return!!(this._isMouseOnContentHoverWidget(e)||this._isMouseOnMarginHoverWidget(e)||this._isContentWidgetResizing())}_isMouseOnMarginHoverWidget(e){const n=e.target;return n?n.type===12&&n.detail===zae.ID:!1}_isMouseOnContentHoverWidget(e){const n=e.target;return n?n.type===9&&n.detail===Iae.ID:!1}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._shouldNotHideCurrentHoverWidget(e))||this._hideWidgets()}_shouldNotRecomputeCurrentHoverWidget(e){const n=this._hoverSettings.sticky,i=(a,l)=>{const c=this._isMouseOnMarginHoverWidget(a);return l&&c},r=(a,l)=>{const c=this._isMouseOnContentHoverWidget(a);return l&&c},o=a=>{var u;const l=this._isMouseOnContentHoverWidget(a),c=(u=this._contentWidget)==null?void 0:u.isColorPickerVisible;return l&&c},s=(a,l)=>{var c,u,d,h;return l&&((u=this._contentWidget)==null?void 0:u.containsNode((c=a.event.browserEvent.view)==null?void 0:c.document.activeElement))&&!((h=(d=a.event.browserEvent.view)==null?void 0:d.getSelection())!=null&&h.isCollapsed)};return!!(i(e,n)||r(e,n)||o(e)||s(e,n))}_onEditorMouseMove(e){var a,l,c,u;if(this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._mouseMoveEvent=e,(a=this._contentWidget)!=null&&a.isFocused||(l=this._contentWidget)!=null&&l.isResizing))return;const n=this._hoverSettings.sticky;if(n&&((c=this._contentWidget)!=null&&c.isVisibleFromKeyboard))return;if(this._shouldNotRecomputeCurrentHoverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}const r=this._hoverSettings.hidingDelay;if(((u=this._contentWidget)==null?void 0:u.isVisible)&&n&&r>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(r);return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){var c;if(!e)return;const i=(c=e.target.element)==null?void 0:c.classList.contains("colorpicker-color-decoration"),r=this._editor.getOption(149),o=this._hoverSettings.enabled,s=this._hoverState.activatedByDecoratorClick;if(i&&(r==="click"&&!s||r==="hover"&&!o&&!xTr||r==="clickAndHover"&&!o&&!s)||!i&&!o&&!s){this._hideWidgets();return}this._tryShowHoverWidget(e,0)||this._tryShowHoverWidget(e,1)||this._hideWidgets()}_tryShowHoverWidget(e,n){const i=this._getOrCreateContentWidget(),r=this._getOrCreateGlyphWidget();let o,s;switch(n){case 0:o=i,s=r;break;case 1:o=r,s=i;break;default:throw new Error(`HoverWidgetType ${n} is unrecognized`)}const a=o.showsOrWillShow(e);return a&&s.hide(),a}_onKeyDown(e){var r;if(!this._editor.hasModel())return;const n=this._keybindingService.softDispatch(e,this._editor.getDomNode()),i=n.kind===1||n.kind===2&&(n.commandId===Rqt||n.commandId===Nge||n.commandId===Ege)&&((r=this._contentWidget)==null?void 0:r.isVisible);e.keyCode===5||e.keyCode===6||e.keyCode===57||e.keyCode===4||i||this._hideWidgets()}_hideWidgets(){var e,n,i;this._hoverState.mouseDown&&((e=this._contentWidget)!=null&&e.isColorPickerVisible)||dF.dropDownVisible||(this._hoverState.activatedByDecoratorClick=!1,(n=this._glyphWidget)==null||n.hide(),(i=this._contentWidget)==null||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(SOe,this._editor),this._listenersStore.add(this._contentWidget.onContentsChanged(()=>this._onHoverContentsChanged.fire()))),this._contentWidget}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=this._instantiationService.createInstance(zae,this._editor)),this._glyphWidget}showContentHover(e,n,i,r,o=!1){this._hoverState.activatedByDecoratorClick=o,this._getOrCreateContentWidget().startShowingAtRange(e,n,i,r)}_isContentWidgetResizing(){var e;return((e=this._contentWidget)==null?void 0:e.widget.isResizing)||!1}focusedHoverPartIndex(){return this._getOrCreateContentWidget().focusedHoverPartIndex()}updateHoverVerbosityLevel(e,n,i){this._getOrCreateContentWidget().updateHoverVerbosityLevel(e,n,i)}focus(){var e;(e=this._contentWidget)==null||e.focus()}scrollUp(){var e;(e=this._contentWidget)==null||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)==null||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)==null||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)==null||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)==null||e.pageUp()}pageDown(){var e;(e=this._contentWidget)==null||e.pageDown()}goToTop(){var e;(e=this._contentWidget)==null||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)==null||e.goToBottom()}get isColorPickerVisible(){var e;return(e=this._contentWidget)==null?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return(e=this._contentWidget)==null?void 0:e.isVisible}dispose(){var e,n;super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),(e=this._glyphWidget)==null||e.dispose(),(n=this._contentWidget)==null||n.dispose()}},NOe=KI,KI.ID="editor.contrib.hover",KI);Jd=NOe=_Tr([jyt(1,qn),jyt(2,vo)],Jd);const YWe=class YWe extends ct{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(n=>this.onMouseDown(n)))}dispose(){super.dispose()}onMouseDown(e){const n=this._editor.getOption(149);if(n!=="click"&&n!=="clickAndHover")return;const i=e.target;if(i.type!==6||!i.detail.injectedText||i.detail.injectedText.options.attachedData!==Dqt||!i.range)return;const r=this._editor.getContribution(Jd.ID);if(r&&!r.isColorPickerVisible){const o=new ve(i.range.startLineNumber,i.range.startColumn+1,i.range.endLineNumber,i.range.endColumn+1);r.showContentHover(o,1,0,!1,!0)}}};YWe.ID="editor.contrib.colorContribution";let Hae=YWe;Wr(Hae.ID,Hae,2);wR.register(RU);var iGt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Yy=function(t,e){return function(n,i){e(n,i,t)}},EOe,DOe,qI;let _A=(qI=class extends ct{constructor(e,n,i,r,o,s,a){super(),this._editor=e,this._modelService=i,this._keybindingService=r,this._instantiationService=o,this._languageFeatureService=s,this._languageConfigurationService=a,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=Re.standaloneColorPickerVisible.bindTo(n),this._standaloneColorPickerFocused=Re.standaloneColorPickerFocused.bindTo(n)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)==null||e.focus():this._standaloneColorPickerWidget=new kOe(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)==null||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)==null||e.updateEditor(),this.hide()}static get(e){return e.getContribution(EOe.ID)}},EOe=qI,qI.ID="editor.contrib.standaloneColorPickerController",qI);_A=EOe=iGt([Yy(1,vi),Yy(2,Ds),Yy(3,vo),Yy(4,qn),Yy(5,Ln),Yy(6,bs)],_A);Wr(_A.ID,_A,1);const Fyt=8,wTr=22;var GI;let kOe=(GI=class extends ct{constructor(e,n,i,r,o,s,a,l){var h;super(),this._editor=e,this._standaloneColorPickerVisible=n,this._standaloneColorPickerFocused=i,this._modelService=o,this._keybindingService=s,this._languageFeaturesService=a,this._languageConfigurationService=l,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new st),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=r.createInstance(PU,this._editor),this._position=(h=this._editor._getViewModel())==null?void 0:h.getPrimaryCursorState().modelState.position;const c=this._editor.getSelection(),u=c?{startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},d=this._register(q0(this._body));this._register(d.onDidBlur(f=>{this.hide()})),this._register(d.onDidFocus(f=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(f=>{var p;const m=(p=f.target.element)==null?void 0:p.classList;m&&m.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(f=>{this._render(f.value,f.foundInEditor)})),this._start(u),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return DOe.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(e){const n=await this._computeAsync(e);n&&this._onResult.fire(new CTr(n.result,n.foundInEditor))}async _computeAsync(e){if(!this._editor.hasModel())return null;const n={range:e,color:{red:0,green:0,blue:0,alpha:1}},i=await this._standaloneColorPickerParticipant.createColorHover(n,new sWe(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null}_render(e,n){const i=document.createDocumentFragment(),r=this._register(new Rae(this._keybindingService)),o={fragment:i,statusBar:r,onContentsChanged:()=>{},hide:()=>this.hide()};this._colorHover=e;const s=this._standaloneColorPickerParticipant.renderHoverParts(o,[e]);if(!s)return;this._register(s.disposables);const a=s.colorPicker;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(i),a.layout();const l=a.body,c=l.saturationBox.domNode.clientWidth,u=l.domNode.clientWidth-c-wTr-Fyt,d=a.body.enterButton;d==null||d.onClicked(()=>{this.updateEditor(),this.hide()});const h=a.header,f=h.pickedColorNode;f.style.width=c+Fyt+"px";const m=h.originalColorNode;m.style.width=u+"px";const p=a.header.closeButton;p==null||p.onClicked(()=>{this.hide()}),n&&(d&&(d.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}},DOe=GI,GI.ID="editor.contrib.standaloneColorPickerWidget",GI);kOe=DOe=iGt([Yy(3,qn),Yy(4,Ds),Yy(5,vo),Yy(6,Ln),Yy(7,bs)],kOe);class CTr{constructor(e,n){this.value=e,this.foundInEditor=n}}class STr extends c_{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{...Ci("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:I({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker")},precondition:void 0,menu:[{id:Rn.CommandPalette}],metadata:{description:Ci("showOrFocusStandaloneColorPickerDescription","Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors.")}})}runEditorCommand(e,n){var i;(i=_A.get(n))==null||i.showOrFocus()}}class NTr extends En{constructor(){super({id:"editor.action.hideColorPicker",label:I({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:Re.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100},metadata:{description:Ci("hideColorPickerDescription","Hide the standalone color picker.")}})}run(e,n){var i;(i=_A.get(n))==null||i.hide()}}class ETr extends En{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:I({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:Re.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100},metadata:{description:Ci("insertColorWithStandaloneColorPickerDescription","Insert hex/rgb/hsl colors with the focused standalone color picker.")}})}run(e,n){var i;(i=_A.get(n))==null||i.insertColor()}}Ht(NTr);Ht(ETr);cs(STr);class sD{constructor(e,n,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=n,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,n,i){if(i<0)return!1;const r=n.length,o=e.length;if(i+r>o)return!1;for(let s=0;s<r;s++){const a=e.charCodeAt(i+s),l=n.charCodeAt(s);if(a!==l&&!(a>=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,n,i,r,o,s){const a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,u=e.endColumn,d=o.getLineContent(a),h=o.getLineContent(c);let f=d.lastIndexOf(n,l-1+n.length),m=h.indexOf(i,u-1-i.length);if(f!==-1&&m!==-1)if(a===c)d.substring(f+n.length,m).indexOf(i)>=0&&(f=-1,m=-1);else{const g=d.substring(f+n.length),y=h.substring(0,m);(g.indexOf(i)>=0||y.indexOf(i)>=0)&&(f=-1,m=-1)}let p;f!==-1&&m!==-1?(r&&f+n.length<d.length&&d.charCodeAt(f+n.length)===32&&(n=n+" "),r&&m>0&&h.charCodeAt(m-1)===32&&(i=" "+i,m-=1),p=sD._createRemoveBlockCommentOperations(new ve(a,f+n.length+1,c,m+1),n,i)):(p=sD._createAddBlockCommentOperations(e,n,i,this._insertSpace),this._usedEndToken=p.length===1?i:null);for(const g of p)s.addTrackedEditOperation(g.range,g.text)}static _createRemoveBlockCommentOperations(e,n,i){const r=[];return ve.isEmpty(e)?r.push(ia.delete(new ve(e.startLineNumber,e.startColumn-n.length,e.endLineNumber,e.endColumn+i.length))):(r.push(ia.delete(new ve(e.startLineNumber,e.startColumn-n.length,e.startLineNumber,e.startColumn))),r.push(ia.delete(new ve(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),r}static _createAddBlockCommentOperations(e,n,i,r){const o=[];return ve.isEmpty(e)?o.push(ia.replace(new ve(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),n+"  "+i)):(o.push(ia.insert(new ot(e.startLineNumber,e.startColumn),n+(r?" ":""))),o.push(ia.insert(new ot(e.endLineNumber,e.endColumn),(r?" ":"")+i))),o}getEditOperations(e,n){const i=this._selection.startLineNumber,r=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const o=e.getLanguageIdAtPosition(i,r),s=this.languageConfigurationService.getLanguageConfiguration(o).comments;!s||!s.blockCommentStartToken||!s.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,n)}computeCursorState(e,n){const i=n.getInverseEditOperations();if(i.length===2){const r=i[0],o=i[1];return new Pn(r.range.endLineNumber,r.range.endColumn,o.range.startLineNumber,o.range.startColumn)}else{const r=i[0].range,o=this._usedEndToken?-this._usedEndToken.length-1:0;return new Pn(r.endLineNumber,r.endColumn+o,r.endLineNumber,r.endColumn+o)}}}class O1{constructor(e,n,i,r,o,s,a){this.languageConfigurationService=e,this._selection=n,this._indentSize=i,this._type=r,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,n,i,r){e.tokenization.tokenizeIfCheap(n);const o=e.getLanguageIdAtPosition(n,1),s=r.getLanguageConfiguration(o).comments,a=s?s.lineCommentToken:null;if(!a)return null;const l=[];for(let c=0,u=i-n+1;c<u;c++)l[c]={ignore:!1,commentStr:a,commentStrOffset:0,commentStrLength:a.length};return l}static _analyzeLines(e,n,i,r,o,s,a,l){let c=!0,u;e===0?u=!0:e===1?u=!1:u=!0;for(let d=0,h=r.length;d<h;d++){const f=r[d],m=o+d;if(m===o&&a){f.ignore=!0;continue}const p=i.getLineContent(m),g=qd(p);if(g===-1){f.ignore=s,f.commentStrOffset=p.length;continue}if(c=!1,f.ignore=!1,f.commentStrOffset=g,u&&!sD._haystackHasNeedleAtOffset(p,f.commentStr,g)&&(e===0?u=!1:e===1||(f.ignore=!0)),u&&n){const y=g+f.commentStrLength;y<p.length&&p.charCodeAt(y)===32&&(f.commentStrLength+=1)}}if(e===0&&c){u=!1;for(let d=0,h=r.length;d<h;d++)r[d].ignore=!1}return{supported:!0,shouldRemoveComments:u,lines:r}}static _gatherPreflightData(e,n,i,r,o,s,a,l){const c=O1._gatherPreflightCommentStrings(i,r,o,l);return c===null?{supported:!1}:O1._analyzeLines(e,n,i,c,r,s,a,l)}_executeLineComments(e,n,i,r){let o;i.shouldRemoveComments?o=O1._createRemoveLineCommentsOperations(i.lines,r.startLineNumber):(O1._normalizeInsertionPoint(e,i.lines,r.startLineNumber,this._indentSize),o=this._createAddLineCommentsOperations(i.lines,r.startLineNumber));const s=new ot(r.positionLineNumber,r.positionColumn);for(let a=0,l=o.length;a<l;a++)n.addEditOperation(o[a].range,o[a].text),ve.isEmpty(o[a].range)&&ve.getStartPosition(o[a].range).equals(s)&&e.getLineContent(s.lineNumber).length+1===s.column&&(this._deltaColumn=(o[a].text||"").length);this._selectionId=n.trackSelection(r)}_attemptRemoveBlockComment(e,n,i,r){let o=n.startLineNumber,s=n.endLineNumber;const a=r.length+Math.max(e.getLineFirstNonWhitespaceColumn(n.startLineNumber),n.startColumn);let l=e.getLineContent(o).lastIndexOf(i,a-1),c=e.getLineContent(s).indexOf(r,n.endColumn-1-i.length);return l!==-1&&c===-1&&(c=e.getLineContent(o).indexOf(r,l+i.length),s=o),l===-1&&c!==-1&&(l=e.getLineContent(s).lastIndexOf(i,c),o=s),n.isEmpty()&&(l===-1||c===-1)&&(l=e.getLineContent(o).indexOf(i),l!==-1&&(c=e.getLineContent(o).indexOf(r,l+i.length))),l!==-1&&e.getLineContent(o).charCodeAt(l+i.length)===32&&(i+=" "),c!==-1&&e.getLineContent(s).charCodeAt(c-1)===32&&(r=" "+r,c-=1),l!==-1&&c!==-1?sD._createRemoveBlockCommentOperations(new ve(o,l+i.length+1,s,c+1),i,r):null}_executeBlockComment(e,n,i){e.tokenization.tokenizeIfCheap(i.startLineNumber);const r=e.getLanguageIdAtPosition(i.startLineNumber,1),o=this.languageConfigurationService.getLanguageConfiguration(r).comments;if(!o||!o.blockCommentStartToken||!o.blockCommentEndToken)return;const s=o.blockCommentStartToken,a=o.blockCommentEndToken;let l=this._attemptRemoveBlockComment(e,i,s,a);if(!l){if(i.isEmpty()){const c=e.getLineContent(i.startLineNumber);let u=qd(c);u===-1&&(u=c.length),l=sD._createAddBlockCommentOperations(new ve(i.startLineNumber,u+1,i.startLineNumber,c.length+1),s,a,this._insertSpace)}else l=sD._createAddBlockCommentOperations(new ve(i.startLineNumber,e.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),s,a,this._insertSpace);l.length===1&&(this._deltaColumn=s.length+1)}this._selectionId=n.trackSelection(i);for(const c of l)n.addEditOperation(c.range,c.text)}getEditOperations(e,n){let i=this._selection;if(this._moveEndPositionDown=!1,i.startLineNumber===i.endLineNumber&&this._ignoreFirstLine){n.addEditOperation(new ve(i.startLineNumber,e.getLineMaxColumn(i.startLineNumber),i.startLineNumber+1,1),i.startLineNumber===e.getLineCount()?"":`
`),this._selectionId=n.trackSelection(i);return}i.startLineNumber<i.endLineNumber&&i.endColumn===1&&(this._moveEndPositionDown=!0,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));const r=O1._gatherPreflightData(this._type,this._insertSpace,e,i.startLineNumber,i.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return r.supported?this._executeLineComments(e,n,r,i):this._executeBlockComment(e,n,i)}computeCursorState(e,n){let i=n.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),new Pn(i.selectionStartLineNumber,i.selectionStartColumn+this._deltaColumn,i.positionLineNumber,i.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,n){const i=[];for(let r=0,o=e.length;r<o;r++){const s=e[r];s.ignore||i.push(ia.delete(new ve(n+r,s.commentStrOffset+1,n+r,s.commentStrOffset+s.commentStrLength+1)))}return i}_createAddLineCommentsOperations(e,n){const i=[],r=this._insertSpace?" ":"";for(let o=0,s=e.length;o<s;o++){const a=e[o];a.ignore||i.push(ia.insert(new ot(n+o,a.commentStrOffset+1),a.commentStr+r))}return i}static nextVisibleColumn(e,n,i,r){return i?e+(n-e%n):e+r}static _normalizeInsertionPoint(e,n,i,r){let o=1073741824,s,a;for(let l=0,c=n.length;l<c;l++){if(n[l].ignore)continue;const u=e.getLineContent(i+l);let d=0;for(let h=0,f=n[l].commentStrOffset;d<o&&h<f;h++)d=O1.nextVisibleColumn(d,r,u.charCodeAt(h)===9,1);d<o&&(o=d)}o=Math.floor(o/r)*r;for(let l=0,c=n.length;l<c;l++){if(n[l].ignore)continue;const u=e.getLineContent(i+l);let d=0;for(s=0,a=n[l].commentStrOffset;d<o&&s<a;s++)d=O1.nextVisibleColumn(d,r,u.charCodeAt(s)===9,1);d>o?n[l].commentStrOffset=s-1:n[l].commentStrOffset=s}}}class bWe extends En{constructor(e,n){super(n),this._type=e}run(e,n){const i=e.get(bs);if(!n.hasModel())return;const r=n.getModel(),o=[],s=r.getOptions(),a=n.getOption(23),l=n.getSelections().map((u,d)=>({selection:u,index:d,ignoreFirstLine:!1}));l.sort((u,d)=>ve.compareRangesUsingStarts(u.selection,d.selection));let c=l[0];for(let u=1;u<l.length;u++){const d=l[u];c.selection.endLineNumber===d.selection.startLineNumber&&(c.index<d.index?d.ignoreFirstLine=!0:(c.ignoreFirstLine=!0,c=d))}for(const u of l)o.push(new O1(i,u.selection,s.indentSize,this._type,a.insertSpace,a.ignoreEmptyLines,u.ignoreFirstLine));n.pushUndoStop(),n.executeCommands(this.id,o),n.pushUndoStop()}}class DTr extends bWe{constructor(){super(0,{id:"editor.action.commentLine",label:I("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:Re.writable,kbOpts:{kbExpr:Re.editorTextFocus,primary:2138,weight:100},menuOpts:{menuId:Rn.MenubarEditMenu,group:"5_insert",title:I({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}}class kTr extends bWe{constructor(){super(1,{id:"editor.action.addCommentLine",label:I("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:Re.writable,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2081),weight:100}})}}class MTr extends bWe{constructor(){super(2,{id:"editor.action.removeCommentLine",label:I("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:Re.writable,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2099),weight:100}})}}class LTr extends En{constructor(){super({id:"editor.action.blockComment",label:I("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:Re.writable,kbOpts:{kbExpr:Re.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:Rn.MenubarEditMenu,group:"5_insert",title:I({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,n){const i=e.get(bs);if(!n.hasModel())return;const r=n.getOption(23),o=[],s=n.getSelections();for(const a of s)o.push(new sD(a,r.insertSpace,i));n.pushUndoStop(),n.executeCommands(this.id,o),n.pushUndoStop()}}Ht(DTr);Ht(kTr);Ht(MTr);Ht(LTr);var TTr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},EL=function(t,e){return function(n,i){e(n,i,t)}},MOe,YI;let fF=(YI=class{static get(e){return e.getContribution(MOe.ID)}constructor(e,n,i,r,o,s,a,l){this._contextMenuService=n,this._contextViewService=i,this._contextKeyService=r,this._keybindingService=o,this._menuService=s,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new Lt,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(c=>this._onContextMenu(c))),this._toDispose.add(this._editor.onMouseWheel(c=>{if(this._contextMenuIsBeingShownCount>0){const u=this._contextViewService.getContextViewElement(),d=c.srcElement;d.shadowRoot&&W2(u)===d.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(c=>{this._editor.getOption(24)&&c.keyCode===58&&(c.preventDefault(),c.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu(e.event);if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let i=!1;for(const r of this._editor.getSelections())if(r.containsPosition(e.target.position)){i=!0;break}i||this._editor.setPosition(e.target.position)}let n=null;e.target.type!==1&&(n=e.event),this.showContextMenu(n)}showContextMenu(e){if(!this._editor.getOption(24)||!this._editor.hasModel())return;const n=this._getMenuActions(this._editor.getModel(),this._editor.contextMenuId);n.length>0&&this._doShowContextMenu(n,e)}_getMenuActions(e,n){const i=[],r=this._menuService.getMenuActions(n,this._contextKeyService,{arg:e.uri});for(const o of r){const[,s]=o;let a=0;for(const l of s)if(l instanceof y3){const c=this._getMenuActions(e,l.item.submenu);c.length>0&&(i.push(new i5(l.id,l.label,c)),a++)}else i.push(l),a++;a&&i.push(new dc)}return i.length&&i.pop(),i}_doShowContextMenu(e,n=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let r=n;if(!r){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const s=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),a=Ga(this._editor.getDomNode()),l=a.left+s.left,c=a.top+s.top+s.height;r={x:l,y:c}}const o=this._editor.getOption(128)&&!W0;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:o?this._editor.getOverflowWidgetsDomNode()??this._editor.getDomNode():void 0,getAnchor:()=>r,getActions:()=>e,getActionViewItem:s=>{const a=this._keybindingFor(s);if(a)return new y5(s,s,{label:!0,keybinding:a.getLabel(),isMenu:!0});const l=s;return typeof l.getActionViewItem=="function"?l.getActionViewItem():new y5(s,s,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:s=>this._keybindingFor(s),onHide:s=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||WSi(this._workspaceContextService.getWorkspace()))return;const n=this._editor.getOption(73);let i=0;const r=c=>({id:`menu-action-${++i}`,label:c.label,tooltip:"",class:void 0,enabled:typeof c.enabled>"u"?!0:c.enabled,checked:c.checked,run:c.run}),o=(c,u)=>new i5(`menu-action-${++i}`,c,u,void 0),s=(c,u,d,h,f)=>{if(!u)return r({label:c,enabled:u,run:()=>{}});const m=g=>()=>{this._configurationService.updateValue(d,g)},p=[];for(const g of f)p.push(r({label:g.label,checked:h===g.value,run:m(g.value)}));return o(c,p)},a=[];a.push(r({label:I("context.minimap.minimap","Minimap"),checked:n.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!n.enabled)}})),a.push(new dc),a.push(r({label:I("context.minimap.renderCharacters","Render Characters"),enabled:n.enabled,checked:n.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!n.renderCharacters)}})),a.push(s(I("context.minimap.size","Vertical size"),n.enabled,"editor.minimap.size",n.size,[{label:I("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:I("context.minimap.size.fill","Fill"),value:"fill"},{label:I("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(s(I("context.minimap.slider","Slider"),n.enabled,"editor.minimap.showSlider",n.showSlider,[{label:I("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:I("context.minimap.slider.always","Always"),value:"always"}]));const l=this._editor.getOption(128)&&!W0;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:c=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}},MOe=YI,YI.ID="editor.contrib.contextmenu",YI);fF=MOe=TTr([EL(1,Hm),EL(2,US),EL(3,vi),EL(4,vo),EL(5,Jp),EL(6,cr),EL(7,Z2)],fF);class ITr extends En{constructor(){super({id:"editor.action.showContextMenu",label:I("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:Re.textInputFocus,primary:1092,weight:100}})}run(e,n){var i;(i=fF.get(n))==null||i.showContextMenu()}}Wr(fF.ID,fF,2);Ht(ITr);class KSe{constructor(e){this.selections=e}equals(e){const n=this.selections.length,i=e.selections.length;if(n!==i)return!1;for(let r=0;r<n;r++)if(!this.selections[r].equalsSelection(e.selections[r]))return!1;return!0}}class qSe{constructor(e,n,i){this.cursorState=e,this.scrollTop=n,this.scrollLeft=i}}const Dce=class Dce extends ct{static get(e){return e.getContribution(Dce.ID)}constructor(e){super(),this._editor=e,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(e.onDidChangeModel(n=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(n=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(n=>{if(this._isCursorUndoRedo||!n.oldSelections||n.oldModelVersionId!==n.modelVersionId)return;const i=new KSe(n.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new qSe(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new qSe(new KSe(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new qSe(new KSe(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}};Dce.ID="editor.contrib.cursorUndoRedoController";let mF=Dce;class ATr extends En{constructor(){super({id:"cursorUndo",label:I("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:Re.textInputFocus,primary:2099,weight:100}})}run(e,n,i){var r;(r=mF.get(n))==null||r.cursorUndo()}}class RTr extends En{constructor(){super({id:"cursorRedo",label:I("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,n,i){var r;(r=mF.get(n))==null||r.cursorRedo()}}Wr(mF.ID,mF,0);Ht(ATr);Ht(RTr);class PTr{constructor(e,n,i){this.selection=e,this.targetPosition=n,this.copy=i,this.targetSelection=null}getEditOperations(e,n){const i=e.getValueInRange(this.selection);if(this.copy||n.addEditOperation(this.selection,null),n.addEditOperation(new ve(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new Pn(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new Pn(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber<this.selection.endLineNumber){this.targetSelection=new Pn(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new Pn(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new Pn(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(e,n){return this.targetSelection}}function gO(t){return xr?t.altKey:t.ctrlKey}const gE=class gE extends ct{constructor(e){super(),this._editor=e,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(n))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(n))),this._register(this._editor.onMouseDrag(n=>this._onEditorMouseDrag(n))),this._register(this._editor.onMouseDrop(n=>this._onEditorMouseDrop(n))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(n=>this.onEditorKeyDown(n))),this._register(this._editor.onKeyUp(n=>this.onEditorKeyUp(n))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(35)||this._editor.getOption(22)||(gO(e)&&(this._modifierPressed=!0),this._mouseDown&&gO(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(35)||this._editor.getOption(22)||(gO(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===gE.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const n=e.target;if(this._dragSelection===null){const r=(this._editor.getSelections()||[]).filter(o=>n.position&&o.containsPosition(n.position));if(r.length===1)this._dragSelection=r[0];else return}gO(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),n.position&&(this._dragSelection.containsPosition(n.position)?this._removeDecoration():this.showAt(n.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const n=new ot(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let i=null;if(e.event.shiftKey){const r=this._editor.getSelection();if(r){const{selectionStartLineNumber:o,selectionStartColumn:s}=r;i=[new Pn(o,s,n.lineNumber,n.column)]}}else i=(this._editor.getSelections()||[]).map(r=>r.containsPosition(n)?new Pn(n.lineNumber,n.column,n.lineNumber,n.column):r);this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(n)||(gO(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(n)||this._dragSelection.getStartPosition().equals(n)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(gE.ID,new PTr(this._dragSelection,n,gO(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new ve(e.lineNumber,e.column,e.lineNumber,e.column),options:gE._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}};gE.ID="editor.contrib.dragAndDrop",gE.TRIGGER_KEY_VALUE=xr?6:5,gE._DECORATION_OPTIONS=Hi.register({description:"dnd-target",className:"dnd-target"});let Wae=gE;Wr(Wae.ID,Wae,2);Wr(ES.ID,ES,0);Bq(KPe);fn(new class extends Zl{constructor(){super({id:aqt,precondition:nWe,kbOpts:{weight:100,primary:2137}})}runEditorCommand(t,e){var n;return(n=ES.get(e))==null?void 0:n.changePasteType()}});fn(new class extends Zl{constructor(){super({id:"editor.hidePasteWidget",precondition:nWe,kbOpts:{weight:100,primary:9}})}runEditorCommand(t,e){var n;(n=ES.get(e))==null||n.clearWidgets()}});var XI;Ht((XI=class extends En{constructor(){super({id:"editor.action.pasteAs",label:I("pasteAs","Paste As..."),alias:"Paste As...",precondition:Re.writable,metadata:{description:"Paste as",args:[{name:"args",schema:XI.argsSchema}]}})}run(e,n,i){var o;let r=typeof(i==null?void 0:i.kind)=="string"?i.kind:void 0;return!r&&i&&(r=typeof i.id=="string"?i.id:void 0),(o=ES.get(n))==null?void 0:o.pasteAs(r?new Ys(r):void 0)}},XI.argsSchema={type:"object",properties:{kind:{type:"string",description:I("pasteAs.kind","The kind of the paste edit to try applying. If not provided or there are multiple edits for this kind, the editor will show a picker.")}}},XI));Ht(class extends En{constructor(){super({id:"editor.action.pasteAsText",label:I("pasteAsText","Paste as Text"),alias:"Paste as Text",precondition:Re.writable})}run(t,e){var n;return(n=ES.get(e))==null?void 0:n.pasteAs({providerId:fA.id})}});class OTr{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const n=this._dragOperations.get(e);return this._dragOperations.delete(e),n}}}class $yt{constructor(e){this.identifier=e}}const rGt=Sr("treeViewsDndService");Rr(rGt,OTr,1);var jTr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},PJ=function(t,e){return function(n,i){e(n,i,t)}},LOe;const oGt="editor.experimental.dropIntoEditor.defaultProvider",sGt="editor.changeDropType",vWe=new gn("dropWidgetVisible",!1,I("dropWidgetVisible","Whether the drop widget is showing"));var ZI;let pF=(ZI=class extends ct{static get(e){return e.getContribution(LOe.ID)}constructor(e,n,i,r,o){super(),this._configService=i,this._languageFeaturesService=r,this._treeViewsDragAndDropService=o,this.treeItemsTransfer=WPe.getInstance(),this._dropProgressManager=this._register(n.createInstance(Mae,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(n.createInstance(Tae,"dropIntoEditor",e,vWe,{id:sGt,label:I("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(s=>this.onDropIntoEditor(e,s.position,s.event)))}clearWidgets(){this._postDropWidgetManager.clear()}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,n,i){var o;if(!i.dataTransfer||!e.hasModel())return;(o=this._currentOperation)==null||o.cancel(),e.focus(),e.setPosition(n);const r=cc(async s=>{const a=new Lt,l=a.add(new xk(e,1,void 0,s));try{const c=await this.extractDataTransferData(i);if(c.size===0||l.token.isCancellationRequested)return;const u=e.getModel();if(!u)return;const d=this._languageFeaturesService.documentDropEditProvider.ordered(u).filter(f=>f.dropMimeTypes?f.dropMimeTypes.some(m=>c.matches(m)):!0),h=a.add(await this.getDropEdits(d,u,n,c,l));if(l.token.isCancellationRequested)return;if(h.edits.length){const f=this.getInitialActiveEditIndex(u,h.edits),m=e.getOption(36).showDropSelector==="afterDrop";await this._postDropWidgetManager.applyEditAndShowIfNeeded([ve.fromPositions(n)],{activeEditIndex:f,allEdits:h.edits},m,async p=>p,s)}}finally{a.dispose(),this._currentOperation===r&&(this._currentOperation=void 0)}});this._dropProgressManager.showWhile(n,I("dropIntoEditorProgress","Running drop handlers. Click to cancel"),r,{cancel:()=>r.cancel()}),this._currentOperation=r}async getDropEdits(e,n,i,r,o){const s=new Lt,a=await vq(Promise.all(e.map(async c=>{try{const u=await c.provideDocumentDropEdits(n,i,r,o.token);return u&&s.add(u),u==null?void 0:u.edits.map(d=>({...d,providerId:c.id}))}catch(u){console.error(u)}})),o.token),l=H0(a??[]).flat();return{edits:oqt(l),dispose:()=>s.dispose()}}getInitialActiveEditIndex(e,n){const i=this._configService.getValue(oGt,{resource:e.uri});for(const[r,o]of Object.entries(i)){const s=new Ys(o),a=n.findIndex(l=>s.value===l.providerId&&l.handledMimeType&&XKt(r,[l.handledMimeType]));if(a>=0)return a}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new YKt;const n=JKt(e.dataTransfer);if(this.treeItemsTransfer.hasData($yt.prototype)){const i=this.treeItemsTransfer.getData($yt.prototype);if(Array.isArray(i))for(const r of i){const o=await this._treeViewsDragAndDropService.removeDragOperationTransfer(r.identifier);if(o)for(const[s,a]of o)n.replace(s,a)}}return n}},LOe=ZI,ZI.ID="editor.contrib.dropIntoEditorController",ZI);pF=LOe=jTr([PJ(1,qn),PJ(2,cr),PJ(3,Ln),PJ(4,rGt)],pF);Wr(pF.ID,pF,2);Bq(UPe);fn(new class extends Zl{constructor(){super({id:sGt,precondition:vWe,kbOpts:{weight:100,primary:2137}})}runEditorCommand(t,e,n){var i;(i=pF.get(e))==null||i.changeDropType()}});fn(new class extends Zl{constructor(){super({id:"editor.hideDropWidget",precondition:vWe,kbOpts:{weight:100,primary:9}})}runEditorCommand(t,e,n){var i;(i=pF.get(e))==null||i.clearWidgets()}});la.as(Yv.Configuration).registerConfiguration({...Aq,properties:{[oGt]:{type:"object",scope:5,description:I("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}});const Rd=class Rd{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(n=>this._editor.getModel().getDecorationRange(n)).filter(n=>!!n);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const n=this._decorations.indexOf(e);return n>=0?n+1:1}getDecorationRangeAt(e){const n=e<this._decorations.length?this._decorations[e]:null;return n?this._editor.getModel().getDecorationRange(n):null}getCurrentMatchesPosition(e){const n=this._editor.getModel().getDecorationsInRange(e);for(const i of n){const r=i.options;if(r===Rd._FIND_MATCH_DECORATION||r===Rd._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(i.id)}return 0}setCurrentFindMatch(e){let n=null,i=0;if(e)for(let r=0,o=this._decorations.length;r<o;r++){const s=this._editor.getModel().getDecorationRange(this._decorations[r]);if(e.equalsRange(s)){n=this._decorations[r],i=r+1;break}}return(this._highlightedDecorationId!==null||n!==null)&&this._editor.changeDecorations(r=>{if(this._highlightedDecorationId!==null&&(r.changeDecorationOptions(this._highlightedDecorationId,Rd._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),n!==null&&(this._highlightedDecorationId=n,r.changeDecorationOptions(this._highlightedDecorationId,Rd._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(r.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),n!==null){let o=this._editor.getModel().getDecorationRange(n);if(o.startLineNumber!==o.endLineNumber&&o.endColumn===1){const s=o.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(s);o=new ve(o.startLineNumber,o.startColumn,s,a)}this._rangeHighlightDecorationId=r.addDecoration(o,Rd._RANGE_HIGHLIGHT_DECORATION)}}),i}set(e,n){this._editor.changeDecorations(i=>{let r=Rd._FIND_MATCH_DECORATION;const o=[];if(e.length>1e3){r=Rd._FIND_MATCH_NO_OVERVIEW_DECORATION;const a=this._editor.getModel().getLineCount(),c=this._editor.getLayoutInfo().height/a,u=Math.max(2,Math.ceil(3/c));let d=e[0].range.startLineNumber,h=e[0].range.endLineNumber;for(let f=1,m=e.length;f<m;f++){const p=e[f].range;h+u>=p.startLineNumber?p.endLineNumber>h&&(h=p.endLineNumber):(o.push({range:new ve(d,1,h,1),options:Rd._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),d=p.startLineNumber,h=p.endLineNumber)}o.push({range:new ve(d,1,h,1),options:Rd._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const s=new Array(e.length);for(let a=0,l=e.length;a<l;a++)s[a]={range:e[a].range,options:r};this._decorations=i.deltaDecorations(this._decorations,s),this._overviewRulerApproximateDecorations=i.deltaDecorations(this._overviewRulerApproximateDecorations,o),this._rangeHighlightDecorationId&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(a=>i.removeDecoration(a)),this._findScopeDecorationIds=[]),n!=null&&n.length&&(this._findScopeDecorationIds=n.map(a=>i.addDecoration(a,Rd._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let n=this._decorations.length-1;n>=0;n--){const i=this._decorations[n],r=this._editor.getModel().getDecorationRange(i);if(!(!r||r.endLineNumber>e.lineNumber)){if(r.endLineNumber<e.lineNumber)return r;if(!(r.endColumn>e.column))return r}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let n=0,i=this._decorations.length;n<i;n++){const r=this._decorations[n],o=this._editor.getModel().getDecorationRange(r);if(!(!o||o.startLineNumber<e.lineNumber)){if(o.startLineNumber>e.lineNumber)return o;if(!(o.startColumn<e.column))return o}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let e=[];return e=e.concat(this._decorations),e=e.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&e.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&e.push(this._rangeHighlightDecorationId),e}};Rd._CURRENT_FIND_MATCH_DECORATION=Hi.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",inlineClassName:"currentFindMatchInline",showIfCollapsed:!0,overviewRuler:{color:Sa(Ywe),position:Tp.Center},minimap:{color:Sa(nTe),position:1}}),Rd._FIND_MATCH_DECORATION=Hi.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",inlineClassName:"findMatchInline",showIfCollapsed:!0,overviewRuler:{color:Sa(Ywe),position:Tp.Center},minimap:{color:Sa(nTe),position:1}}),Rd._FIND_MATCH_NO_OVERVIEW_DECORATION=Hi.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0}),Rd._FIND_MATCH_ONLY_OVERVIEW_DECORATION=Hi.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:Sa(Ywe),position:Tp.Center}}),Rd._RANGE_HIGHLIGHT_DECORATION=Hi.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),Rd._FIND_SCOPE_DECORATION=Hi.register({description:"find-scope",className:"findScope",isWholeLine:!0});let TOe=Rd;class FTr{constructor(e,n,i){this._editorSelection=e,this._ranges=n,this._replaceStrings=i,this._trackedEditorSelectionId=null}getEditOperations(e,n){if(this._ranges.length>0){const i=[];for(let s=0;s<this._ranges.length;s++)i.push({range:this._ranges[s],text:this._replaceStrings[s]});i.sort((s,a)=>ve.compareRangesUsingStarts(s.range,a.range));const r=[];let o=i[0];for(let s=1;s<i.length;s++)o.range.endLineNumber===i[s].range.startLineNumber&&o.range.endColumn===i[s].range.startColumn?(o.range=o.range.plusRange(i[s].range),o.text=o.text+i[s].text):(r.push(o),o=i[s]);r.push(o);for(const s of r)n.addEditOperation(s.range,s.text)}this._trackedEditorSelectionId=n.trackSelection(this._editorSelection)}computeCursorState(e,n){return n.getTrackedSelection(this._trackedEditorSelectionId)}}function aGt(t,e){if(t&&t[0]!==""){const n=Vyt(t,e,"-"),i=Vyt(t,e,"_");return n&&!i?Byt(t,e,"-"):!n&&i?Byt(t,e,"_"):t[0].toUpperCase()===t[0]?e.toUpperCase():t[0].toLowerCase()===t[0]?e.toLowerCase():nhi(t[0][0])&&e.length>0?e[0].toUpperCase()+e.substr(1):t[0][0].toUpperCase()!==t[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function Vyt(t,e,n){return t[0].indexOf(n)!==-1&&e.indexOf(n)!==-1&&t[0].split(n).length===e.split(n).length}function Byt(t,e,n){const i=e.split(n),r=t[0].split(n);let o="";return i.forEach((s,a)=>{o+=aGt([r[a]],s)+n}),o.slice(0,-1)}class zyt{constructor(e){this.staticValue=e,this.kind=0}}class $Tr{constructor(e){this.pieces=e,this.kind=1}}class gF{static fromStaticValue(e){return new gF([CI.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new zyt(""):e.length===1&&e[0].staticValue!==null?this._state=new zyt(e[0].staticValue):this._state=new $Tr(e)}buildReplaceString(e,n){if(this._state.kind===0)return n?aGt(e,this._state.staticValue):this._state.staticValue;let i="";for(let r=0,o=this._state.pieces.length;r<o;r++){const s=this._state.pieces[r];if(s.staticValue!==null){i+=s.staticValue;continue}let a=gF._substitute(s.matchIndex,e);if(s.caseOps!==null&&s.caseOps.length>0){const l=[],c=s.caseOps.length;let u=0;for(let d=0,h=a.length;d<h;d++){if(u>=c){l.push(a.slice(d));break}switch(s.caseOps[u]){case"U":l.push(a[d].toUpperCase());break;case"u":l.push(a[d].toUpperCase()),u++;break;case"L":l.push(a[d].toLowerCase());break;case"l":l.push(a[d].toLowerCase()),u++;break;default:l.push(a[d])}}a=l.join("")}i+=a}return i}static _substitute(e,n){if(n===null)return"";if(e===0)return n[0];let i="";for(;e>0;){if(e<n.length)return(n[e]||"")+i;i=String(e%10)+i,e=Math.floor(e/10)}return"$"+i}}class CI{static staticValue(e){return new CI(e,-1,null)}static caseOps(e,n){return new CI(null,e,n)}constructor(e,n,i){this.staticValue=e,this.matchIndex=n,!i||i.length===0?this.caseOps=null:this.caseOps=i.slice(0)}}class VTr{constructor(e){this._source=e,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(e){this._emitStatic(this._source.substring(this._lastCharIndex,e)),this._lastCharIndex=e}emitStatic(e,n){this._emitStatic(e),this._lastCharIndex=n}_emitStatic(e){e.length!==0&&(this._currentStaticPiece+=e)}emitMatchIndex(e,n,i){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=CI.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=CI.caseOps(e,i),this._lastCharIndex=n}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=CI.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new gF(this._result)}}function BTr(t){if(!t||t.length===0)return new gF(null);const e=[],n=new VTr(t);for(let i=0,r=t.length;i<r;i++){const o=t.charCodeAt(i);if(o===92){if(i++,i>=r)break;const s=t.charCodeAt(i);switch(s){case 92:n.emitUnchanged(i-1),n.emitStatic("\\",i+1);break;case 110:n.emitUnchanged(i-1),n.emitStatic(`
`,i+1);break;case 116:n.emitUnchanged(i-1),n.emitStatic("	",i+1);break;case 117:case 85:case 108:case 76:n.emitUnchanged(i-1),n.emitStatic("",i+1),e.push(String.fromCharCode(s));break}continue}if(o===36){if(i++,i>=r)break;const s=t.charCodeAt(i);if(s===36){n.emitUnchanged(i-1),n.emitStatic("$",i+1);continue}if(s===48||s===38){n.emitUnchanged(i-1),n.emitMatchIndex(0,i+1,e),e.length=0;continue}if(49<=s&&s<=57){let a=s-48;if(i+1<r){const l=t.charCodeAt(i+1);if(48<=l&&l<=57){i++,a=a*10+(l-48),n.emitUnchanged(i-2),n.emitMatchIndex(a,i+1,e),e.length=0;continue}}n.emitUnchanged(i-1),n.emitMatchIndex(a,i+1,e),e.length=0;continue}}}return n.finalize()}const nN=new gn("findWidgetVisible",!1);nN.toNegated();const Tge=new gn("findInputFocussed",!1),yWe=new gn("replaceInputFocussed",!1),OJ={primary:545,mac:{primary:2593}},jJ={primary:565,mac:{primary:2613}},FJ={primary:560,mac:{primary:2608}},$J={primary:554,mac:{primary:2602}},VJ={primary:558,mac:{primary:2606}},ws={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},aD=19999,zTr=240;class VB{constructor(e,n){this._toDispose=new Lt,this._editor=e,this._state=n,this._isDisposed=!1,this._startSearchingTimer=new Gv,this._decorations=new TOe(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new Wo(()=>{if(this._editor.hasModel())return this.research(!1)},100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(i=>{(i.reason===3||i.reason===5||i.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(i=>{this._ignoreModelContentChanged||(i.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(i=>this._onStateChanged(i))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,Jo(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},zTr)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,n){return n||e.getFullModelRange()}research(e,n){let i=null;typeof n<"u"?n!==null&&(Array.isArray(n)?i=n:i=[n]):i=this._decorations.getFindScopes(),i!==null&&(i=i.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new ve(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));const r=this._findMatches(i,!1,aD);this._decorations.set(r,i);const o=this._editor.getSelection();let s=this._decorations.getCurrentMatchesPosition(o);if(s===0&&r.length>0){const a=TH(r.map(l=>l.range),l=>ve.compareRangesUsingStarts(l,o)>=0);s=a>0?a-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const n=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(n,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const n=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:r}=e;const o=this._editor.getModel();return n||r===1?(i===1?i=o.getLineCount():i--,r=o.getLineMaxColumn(i)):r--,new ot(i,r)}_moveToPrevMatch(e,n=!1){if(!this._state.canNavigateBack()){const u=this._decorations.matchAfterPosition(e);u&&this._setCurrentFindMatch(u);return}if(this._decorations.getCount()<aD){let u=this._decorations.matchBeforePosition(e);u&&u.isEmpty()&&u.getStartPosition().equals(e)&&(e=this._prevSearchPosition(e),u=this._decorations.matchBeforePosition(e)),u&&this._setCurrentFindMatch(u);return}if(this._cannotFind())return;const i=this._decorations.getFindScope(),r=VB._getSearchRange(this._editor.getModel(),i);r.getEndPosition().isBefore(e)&&(e=r.getEndPosition()),e.isBefore(r.getStartPosition())&&(e=r.getEndPosition());const{lineNumber:o,column:s}=e,a=this._editor.getModel();let l=new ot(o,s),c=a.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,!1);if(c&&c.range.isEmpty()&&c.range.getStartPosition().equals(l)&&(l=this._prevSearchPosition(l),c=a.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,!1)),!!c){if(!n&&!r.containsRange(c.range))return this._moveToPrevMatch(c.range.getStartPosition(),!0);this._setCurrentFindMatch(c.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(e){const n=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:r}=e;const o=this._editor.getModel();return n||r===o.getLineMaxColumn(i)?(i===o.getLineCount()?i=1:i++,r=1):r++,new ot(i,r)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const i=this._decorations.matchBeforePosition(e);i&&this._setCurrentFindMatch(i);return}if(this._decorations.getCount()<aD){let i=this._decorations.matchAfterPosition(e);i&&i.isEmpty()&&i.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),i=this._decorations.matchAfterPosition(e)),i&&this._setCurrentFindMatch(i);return}const n=this._getNextMatch(e,!1,!0);n&&this._setCurrentFindMatch(n.range)}_getNextMatch(e,n,i,r=!1){if(this._cannotFind())return null;const o=this._decorations.getFindScope(),s=VB._getSearchRange(this._editor.getModel(),o);s.getEndPosition().isBefore(e)&&(e=s.getStartPosition()),e.isBefore(s.getStartPosition())&&(e=s.getStartPosition());const{lineNumber:a,column:l}=e,c=this._editor.getModel();let u=new ot(a,l),d=c.findNextMatch(this._state.searchString,u,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,n);return i&&d&&d.range.isEmpty()&&d.range.getStartPosition().equals(u)&&(u=this._nextSearchPosition(u),d=c.findNextMatch(this._state.searchString,u,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,n)),d?!r&&!s.containsRange(d.range)?this._getNextMatch(d.range.getEndPosition(),n,i,!0):d:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_moveToMatch(e){const n=this._decorations.getDecorationRangeAt(e);n&&this._setCurrentFindMatch(n)}moveToMatch(e){this._moveToMatch(e)}_getReplacePattern(){return this._state.isRegex?BTr(this._state.replaceString):gF.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const e=this._getReplacePattern(),n=this._editor.getSelection(),i=this._getNextMatch(n.getStartPosition(),!0,!1);if(i)if(n.equalsRange(i.range)){const r=e.buildReplaceString(i.matches,this._state.preserveCase),o=new Su(n,r);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new ot(n.startLineNumber,n.startColumn+r.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(i.range)}_findMatches(e,n,i){const r=(e||[null]).map(o=>VB._getSearchRange(this._editor.getModel(),o));return this._editor.getModel().findMatches(this._state.searchString,r,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,n,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=aD?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const n=new AL(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null).parseSearchRequest();if(!n)return;let i=n.regex;if(!i.multiline){let d="mu";i.ignoreCase&&(d+="i"),i.global&&(d+="g"),i=new RegExp(i.source,d)}const r=this._editor.getModel(),o=r.getValue(1),s=r.getFullModelRange(),a=this._getReplacePattern();let l;const c=this._state.preserveCase;a.hasReplacementPatterns||c?l=o.replace(i,function(){return a.buildReplaceString(arguments,c)}):l=o.replace(i,a.buildReplaceString(null,c));const u=new yVe(s,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",u)}_regularReplaceAll(e){const n=this._getReplacePattern(),i=this._findMatches(e,n.hasReplacementPatterns||this._state.preserveCase,1073741824),r=[];for(let s=0,a=i.length;s<a;s++)r[s]=n.buildReplaceString(i[s].matches,this._state.preserveCase);const o=new FTr(this._editor.getSelection(),i.map(s=>s.range),r);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let i=this._findMatches(e,!1,1073741824).map(o=>new Pn(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn));const r=this._editor.getSelection();for(let o=0,s=i.length;o<s;o++)if(i[o].equalsRange(r)){i=[r].concat(i.slice(0,o)).concat(i.slice(o+1));break}this._editor.setSelections(i)}_executeEditorCommand(e,n){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(e,n),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}const kce=class kce extends eg{constructor(e,n,i){super(),this._hideSoon=this._register(new Wo(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=n,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const r={inputActiveOptionBorder:Cn(Jfe),inputActiveOptionForeground:Cn(eme),inputActiveOptionBackground:Cn(Sq)},o=this._register(v5());this.caseSensitive=this._register(new tFt({appendTitle:this._keybindingLabelFor(ws.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,hoverDelegate:o,...r})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new nFt({appendTitle:this._keybindingLabelFor(ws.ToggleWholeWordCommand),isChecked:this._state.wholeWord,hoverDelegate:o,...r})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new iFt({appendTitle:this._keybindingLabelFor(ws.ToggleRegexCommand),isChecked:this._state.isRegex,hoverDelegate:o,...r})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(s=>{let a=!1;s.isRegex&&(this.regex.checked=this._state.isRegex,a=!0),s.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,a=!0),s.matchCase&&(this.caseSensitive.checked=this._state.matchCase,a=!0),!this._state.isRevealed&&a&&this._revealTemporarily()})),this._register(yt(this._domNode,Yt.MOUSE_LEAVE,s=>this._onMouseLeave())),this._register(yt(this._domNode,"mouseover",s=>this._onMouseOver()))}_keybindingLabelFor(e){const n=this._keybindingService.lookupKeybinding(e);return n?` (${n.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return kce.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}};kce.ID="editor.contrib.findOptionsWidget";let IOe=kce;function BJ(t,e){return t===1?!0:t===2?!1:e}class HTr extends ct{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return BJ(this._isRegexOverride,this._isRegex)}get wholeWord(){return BJ(this._wholeWordOverride,this._wholeWord)}get matchCase(){return BJ(this._matchCaseOverride,this._matchCase)}get preserveCase(){return BJ(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new st),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,n,i){const r={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let o=!1;n===0&&(e=0),e>n&&(e=n),this._matchesPosition!==e&&(this._matchesPosition=e,r.matchesPosition=!0,o=!0),this._matchesCount!==n&&(this._matchesCount=n,r.matchesCount=!0,o=!0),typeof i<"u"&&(ve.equalsRange(this._currentMatch,i)||(this._currentMatch=i,r.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(r)}change(e,n,i=!0){var u;const r={moveCursor:n,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let o=!1;const s=this.isRegex,a=this.wholeWord,l=this.matchCase,c=this.preserveCase;typeof e.searchString<"u"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,r.searchString=!0,o=!0),typeof e.replaceString<"u"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,r.replaceString=!0,o=!0),typeof e.isRevealed<"u"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,r.isRevealed=!0,o=!0),typeof e.isReplaceRevealed<"u"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,r.isReplaceRevealed=!0,o=!0),typeof e.isRegex<"u"&&(this._isRegex=e.isRegex),typeof e.wholeWord<"u"&&(this._wholeWord=e.wholeWord),typeof e.matchCase<"u"&&(this._matchCase=e.matchCase),typeof e.preserveCase<"u"&&(this._preserveCase=e.preserveCase),typeof e.searchScope<"u"&&((u=e.searchScope)!=null&&u.every(d=>{var h;return(h=this._searchScope)==null?void 0:h.some(f=>!ve.equalsRange(f,d))})||(this._searchScope=e.searchScope,r.searchScope=!0,o=!0)),typeof e.loop<"u"&&this._loop!==e.loop&&(this._loop=e.loop,r.loop=!0,o=!0),typeof e.isSearching<"u"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,r.isSearching=!0,o=!0),typeof e.filters<"u"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,r.filters=!0,o=!0),this._isRegexOverride=typeof e.isRegexOverride<"u"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride<"u"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride<"u"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride<"u"?e.preserveCaseOverride:0,s!==this.isRegex&&(o=!0,r.isRegex=!0),a!==this.wholeWord&&(o=!0,r.wholeWord=!0),l!==this.matchCase&&(o=!0,r.matchCase=!0),c!==this.preserveCase&&(o=!0,r.preserveCase=!0),o&&this._onFindReplaceStateChange.fire(r)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=aD}}const WTr=I("defaultLabel","input"),UTr=I("label.preserveCaseToggle","Preserve Case");class KTr extends z6{constructor(e){super({icon:qt.preserveCase,title:UTr+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??Yh("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class qTr extends eg{constructor(e,n,i,r){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new st),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new st),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new st),this._onInput=this._register(new st),this._onKeyUp=this._register(new st),this._onPreserveCaseKeyDown=this._register(new st),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=n,this.placeholder=r.placeholder||"",this.validation=r.validation,this.label=r.label||WTr;const o=r.appendPreserveCaseLabel||"",s=r.history||[],a=!!r.flexibleHeight,l=!!r.flexibleWidth,c=r.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new rFt(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:s,showHistoryHint:r.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c,inputBoxStyles:r.inputBoxStyles})),this.preserveCase=this._register(new KTr({appendTitle:o,isChecked:!1,...r.toggleStyles})),this._register(this.preserveCase.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(h=>{this._onPreserveCaseKeyDown.fire(h)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const u=[this.preserveCase.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){const f=u.indexOf(this.domNode.ownerDocument.activeElement);if(f>=0){let m=-1;h.equals(17)?m=(f+1)%u.length:h.equals(15)&&(f===0?m=u.length-1:m=f-1),h.equals(9)?(u[f].blur(),this.inputBox.focus()):m>=0&&u[m].focus(),Mr.stop(h,!0)}}});const d=document.createElement("div");d.className="controls",d.style.display=this._showOptionButtons?"block":"none",d.appendChild(this.preserveCase.domNode),this.domNode.appendChild(d),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,h=>this._onKeyDown.fire(h)),this.onkeyup(this.inputBox.inputElement,h=>this._onKeyUp.fire(h)),this.oninput(this.inputBox.inputElement,h=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,h=>this._onMouseDown.fire(h))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;(e=this.inputBox)==null||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var lGt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},cGt=function(t,e){return function(n,i){e(n,i,t)}};const _We=new gn("suggestWidgetVisible",!1,I("suggestWidgetVisible","Whether suggestion are visible")),xWe="historyNavigationWidgetFocus",uGt="historyNavigationForwardsEnabled",dGt="historyNavigationBackwardsEnabled";let KC;const zJ=[];function hGt(t,e){if(zJ.includes(e))throw new Error("Cannot register the same widget multiple times");zJ.push(e);const n=new Lt,i=new gn(xWe,!1).bindTo(t),r=new gn(uGt,!0).bindTo(t),o=new gn(dGt,!0).bindTo(t),s=()=>{i.set(!0),KC=e},a=()=>{i.set(!1),KC===e&&(KC=void 0)};return Rfe(e.element)&&s(),n.add(e.onDidFocus(()=>s())),n.add(e.onDidBlur(()=>a())),n.add(Kn(()=>{zJ.splice(zJ.indexOf(e),1),a()})),{historyNavigationForwardsEnablement:r,historyNavigationBackwardsEnablement:o,dispose(){n.dispose()}}}let AOe=class extends oFt{constructor(e,n,i,r){super(e,n,i);const o=this._register(r.createScoped(this.inputBox.element));this._register(hGt(o,this.inputBox))}};AOe=lGt([cGt(3,vi)],AOe);let ROe=class extends qTr{constructor(e,n,i,r,o=!1){super(e,n,o,i);const s=this._register(r.createScoped(this.inputBox.element));this._register(hGt(s,this.inputBox))}};ROe=lGt([cGt(3,vi)],ROe);Bh.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:Tt.and(Tt.has(xWe),Tt.equals(dGt,!0),Tt.not("isComposing"),_We.isEqualTo(!1)),primary:16,secondary:[528],handler:t=>{KC==null||KC.showPreviousValue()}});Bh.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:Tt.and(Tt.has(xWe),Tt.equals(uGt,!0),Tt.not("isComposing"),_We.isEqualTo(!1)),primary:18,secondary:[530],handler:t=>{KC==null||KC.showNextValue()}});function Hyt(t){var e,n;return((e=t.lookupKeybinding("history.showPrevious"))==null?void 0:e.getElectronAccelerator())==="Up"&&((n=t.lookupKeybinding("history.showNext"))==null?void 0:n.getElectronAccelerator())==="Down"}const Wyt=ks("find-collapsed",qt.chevronRight,I("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),Uyt=ks("find-expanded",qt.chevronDown,I("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),GTr=ks("find-selection",qt.selection,I("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),YTr=ks("find-replace",qt.replace,I("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),XTr=ks("find-replace-all",qt.replaceAll,I("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),ZTr=ks("find-previous-match",qt.arrowUp,I("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),QTr=ks("find-next-match",qt.arrowDown,I("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),JTr=I("label.findDialog","Find / Replace"),eIr=I("label.find","Find"),tIr=I("placeholder.find","Find"),nIr=I("label.previousMatchButton","Previous Match"),iIr=I("label.nextMatchButton","Next Match"),rIr=I("label.toggleSelectionFind","Find in Selection"),oIr=I("label.closeButton","Close"),sIr=I("label.replace","Replace"),aIr=I("placeholder.replace","Replace"),lIr=I("label.replaceButton","Replace"),cIr=I("label.replaceAllButton","Replace All"),uIr=I("label.toggleReplaceButton","Toggle Replace"),dIr=I("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",aD),hIr=I("label.matchesLocation","{0} of {1}"),Kyt=I("label.noResults","No results"),H_=419,fIr=275,mIr=fIr-54;let D7=69;const pIr=33,qyt="ctrlEnterReplaceAll.windows.donotask",Gyt=xr?256:2048;class GSe{constructor(e){this.afterLineNumber=e,this.heightInPx=pIr,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function Yyt(t,e,n){const i=!!e.match(/\n/);if(n&&i&&n.selectionStart>0){t.stopPropagation();return}}function Xyt(t,e,n){const i=!!e.match(/\n/);if(n&&i&&n.selectionEnd<n.value.length){t.stopPropagation();return}}const Mce=class Mce extends eg{constructor(e,n,i,r,o,s,a,l,c,u){super(),this._hoverService=u,this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=n,this._state=i,this._contextViewProvider=r,this._keybindingService=o,this._contextKeyService=s,this._storageService=l,this._notificationService=c,this._ctrlEnterReplaceAllWarningPrompted=!!l.getBoolean(qyt,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new Lv(500),this._register(Kn(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(d=>this._onStateChanged(d))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(d=>{if(d.hasChanged(92)&&(this._codeEditor.getOption(92)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),d.hasChanged(146)&&this._tryUpdateWidgetWidth(),d.hasChanged(2)&&this.updateAccessibilitySupport(),d.hasChanged(41)){const h=this._codeEditor.getOption(41).loop;this._state.change({loop:h},!1);const f=this._codeEditor.getOption(41).addExtraSpaceOnTop;f&&!this._viewZone&&(this._viewZone=new GSe(0),this._showViewZone()),!f&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(async()=>{if(this._isVisible){const d=await this._controller.getGlobalBufferTerm();d&&d!==this._state.searchString&&(this._state.change({searchString:d},!1),this._findInput.select())}})),this._findInputFocused=Tge.bindTo(s),this._findFocusTracker=this._register(q0(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=yWe.bindTo(s),this._replaceFocusTracker=this._register(q0(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new GSe(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(d=>{if(d.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return Mce.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(92)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=Jf(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const n=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",n),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,ji)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){var n;this._matchesCount.style.minWidth=D7+"px",this._state.matchesCount>=aD?this._matchesCount.title=dIr:this._matchesCount.title="",(n=this._matchesCount.firstChild)==null||n.remove();let e;if(this._state.matchesCount>0){let i=String(this._state.matchesCount);this._state.matchesCount>=aD&&(i+="+");let r=String(this._state.matchesPosition);r==="0"&&(r="?"),e=B2(hIr,r,i)}else e=Kyt;this._matchesCount.appendChild(document.createTextNode(e)),Am(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),D7=Math.max(D7,this._matchesCount.clientWidth)}_getAriaLabel(e,n,i){if(e===Kyt)return i===""?I("ariaSearchNoResultEmpty","{0} found",e):I("ariaSearchNoResult","{0} found for '{1}'",e,i);if(n){const r=I("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,n.startLineNumber+":"+n.startColumn),o=this._codeEditor.getModel();return o&&n.startLineNumber<=o.getLineCount()&&n.startLineNumber>=1?`${o.getLineContent(n.startLineNumber)}, ${r}`:r}return I("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),n=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,i=this._toggleSelectionFind.checked;this._isVisible&&(i||n)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,n=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&n&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&n&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const i=!this._codeEditor.getOption(92);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const i=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=i;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let n=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const r=Ga(i),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=r.left+(o?o.left:0),a=o?o.top:0;if(this._viewZone&&a<this._viewZone.heightInPx){e.endLineNumber>e.startLineNumber&&(n=!1);const l=I4t(this._domNode).left;s>l&&(n=!1);const c=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());r.left+(c?c.left:0)>l&&(n=!1)}}}this._showViewZone(n)}}_hide(e){this._revealTimeouts.forEach(n=>{clearTimeout(n)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const i=this._viewZone;this._viewZoneId!==void 0||!i||this._codeEditor.changeViewZones(r=>{i.heightInPx=this._getHeight(),this._viewZoneId=r.addZone(i),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+i.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new GSe(0));const i=this._viewZone;this._codeEditor.changeViewZones(r=>{if(this._viewZoneId!==void 0){const o=this._getHeight();if(o===i.heightInPx)return;const s=o-i.heightInPx;i.heightInPx=o,r.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s);return}else{let o=this._getHeight();if(o-=this._codeEditor.getOption(84).top,o<=0)return;i.heightInPx=o,this._viewZoneId=r.addZone(i),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!this._domNode.isConnected)return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const i=e.width,r=e.minimap.minimapWidth;let o=!1,s=!1,a=!1;if(this._resized&&Jf(this._domNode)>H_){this._domNode.style.maxWidth=`${i-28-r-15}px`,this._replaceInput.width=Jf(this._findInput.domNode);return}if(H_+28+r>=i&&(s=!0),H_+28+r-D7>=i&&(a=!0),H_+28+r-D7>=i+50&&(o=!0),this._domNode.classList.toggle("collapsed-find-widget",o),this._domNode.classList.toggle("narrow-find-widget",a),this._domNode.classList.toggle("reduced-find-widget",s),!a&&!o&&(this._domNode.style.maxWidth=`${i-28-r-15}px`),this._findInput.layout({collapsedFindWidget:o,narrowFindWidget:a,reducedFindWidget:s}),this._resized){const l=this._findInput.inputBox.element.clientWidth;l>0&&(this._replaceInput.width=l)}else this._isReplaceVisible&&(this._replaceInput.width=Jf(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map(n=>{n.endColumn===1&&n.endLineNumber>n.startLineNumber&&(n=n.setEndPosition(n.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(n.endLineNumber-1)));const i=this._state.currentMatch;return n.startLineNumber!==n.endLineNumber&&!ve.equalsRange(n,i)?n:null}).filter(n=>!!n),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(Gyt|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(`
`),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return Yyt(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return Xyt(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(Gyt|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{Fu&&y0&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(I("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(qyt,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(`
`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return Yyt(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return Xyt(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const n=this._keybindingService.lookupKeybinding(e);return n?` (${n.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new AOe(null,this._contextViewProvider,{width:mIr,label:eIr,placeholder:tIr,appendCaseSensitiveLabel:this._keybindingLabelFor(ws.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(ws.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(ws.ToggleRegexCommand),validation:u=>{if(u.length===0||!this._findInput.getRegex())return null;try{return new RegExp(u,"gu"),null}catch(d){return{content:d.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>Hyt(this._keybindingService),inputBoxStyles:Kre,toggleStyles:Ure},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(u=>this._onFindInputKeyDown(u))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(u=>{u.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),u.preventDefault())})),this._register(this._findInput.onRegexKeyDown(u=>{u.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),u.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(u=>{this._tryUpdateHeight()&&this._showViewZone()})),$h&&this._register(this._findInput.onMouseDown(u=>this._onFindInputMouseDown(u))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount();const i=this._register(v5());this._prevBtn=this._register(new bO({label:nIr+this._keybindingLabelFor(ws.PreviousMatchFindAction),icon:ZTr,hoverDelegate:i,onTrigger:()=>{VE(this._codeEditor.getAction(ws.PreviousMatchFindAction)).run().then(void 0,ji)}},this._hoverService)),this._nextBtn=this._register(new bO({label:iIr+this._keybindingLabelFor(ws.NextMatchFindAction),icon:QTr,hoverDelegate:i,onTrigger:()=>{VE(this._codeEditor.getAction(ws.NextMatchFindAction)).run().then(void 0,ji)}},this._hoverService));const r=document.createElement("div");r.className="find-part",r.appendChild(this._findInput.domNode);const o=document.createElement("div");o.className="find-actions",r.appendChild(o),o.appendChild(this._matchesCount),o.appendChild(this._prevBtn.domNode),o.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new z6({icon:GTr,title:rIr+this._keybindingLabelFor(ws.ToggleSearchScopeCommand),isChecked:!1,hoverDelegate:i,inputActiveOptionBackground:Cn(Sq),inputActiveOptionBorder:Cn(Jfe),inputActiveOptionForeground:Cn(eme)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let u=this._codeEditor.getSelections();u=u.map(d=>(d.endColumn===1&&d.endLineNumber>d.startLineNumber&&(d=d.setEndPosition(d.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(d.endLineNumber-1))),d.isEmpty()?null:d)).filter(d=>!!d),u.length&&this._state.change({searchScope:u},!0)}}else this._state.change({searchScope:null},!0)})),o.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new bO({label:oIr+this._keybindingLabelFor(ws.CloseFindWidgetCommand),icon:PFt,hoverDelegate:i,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:u=>{u.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),u.preventDefault())}},this._hoverService)),this._replaceInput=this._register(new ROe(null,void 0,{label:sIr,placeholder:aIr,appendPreserveCaseLabel:this._keybindingLabelFor(ws.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>Hyt(this._keybindingService),inputBoxStyles:Kre,toggleStyles:Ure},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(u=>this._onReplaceInputKeyDown(u))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(u=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(u=>{u.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),u.preventDefault())}));const s=this._register(v5());this._replaceBtn=this._register(new bO({label:lIr+this._keybindingLabelFor(ws.ReplaceOneAction),icon:YTr,hoverDelegate:s,onTrigger:()=>{this._controller.replace()},onKeyDown:u=>{u.equals(1026)&&(this._closeBtn.focus(),u.preventDefault())}},this._hoverService)),this._replaceAllBtn=this._register(new bO({label:cIr+this._keybindingLabelFor(ws.ReplaceAllAction),icon:XTr,hoverDelegate:s,onTrigger:()=>{this._controller.replaceAll()}},this._hoverService));const a=document.createElement("div");a.className="replace-part",a.appendChild(this._replaceInput.domNode);const l=document.createElement("div");l.className="replace-actions",a.appendChild(l),l.appendChild(this._replaceBtn.domNode),l.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new bO({label:uIr,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=Jf(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}},this._hoverService)),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=JTr,this._domNode.role="dialog",this._domNode.style.width=`${H_}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(r),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(a),this._resizeSash=this._register(new td(this._domNode,this,{orientation:0,size:2})),this._resized=!1;let c=H_;this._register(this._resizeSash.onDidStart(()=>{c=Jf(this._domNode)})),this._register(this._resizeSash.onDidChange(u=>{this._resized=!0;const d=c+u.startX-u.currentX;if(d<H_)return;const h=parseFloat(Afe(this._domNode).maxWidth)||0;d>h||(this._domNode.style.width=`${d}px`,this._isReplaceVisible&&(this._replaceInput.width=Jf(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const u=Jf(this._domNode);if(u<H_)return;let d=H_;if(!this._resized||u===H_){const h=this._codeEditor.getLayoutInfo();d=h.width-28-h.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${d}px`,this._isReplaceVisible&&(this._replaceInput.width=Jf(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(e!==2)}};Mce.ID="editor.contrib.findWidget";let POe=Mce;class bO extends eg{constructor(e,n){super(),this._opts=e;let i="button";this._opts.className&&(i=i+" "+this._opts.className),this._opts.icon&&(i=i+" "+ci.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.tabIndex=0,this._domNode.className=i,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this._register(n.setupManagedHover(e.hoverDelegate??Yh("element"),this._domNode,this._opts.label)),this.onclick(this._domNode,r=>{this._opts.onTrigger(),r.preventDefault()}),this.onkeydown(this._domNode,r=>{var o,s;if(r.equals(10)||r.equals(3)){this._opts.onTrigger(),r.preventDefault();return}(s=(o=this._opts).onKeyDown)==null||s.call(o,r)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...ci.asClassNameArray(Wyt)),this._domNode.classList.add(...ci.asClassNameArray(Uyt))):(this._domNode.classList.remove(...ci.asClassNameArray(Uyt)),this._domNode.classList.add(...ci.asClassNameArray(Wyt)))}}_b((t,e)=>{const n=t.getColor(WE);n&&e.addRule(`.monaco-editor .findMatch { border: 1px ${S0(t.type)?"dotted":"solid"} ${n}; box-sizing: border-box; }`);const i=t.getColor(hbi);i&&e.addRule(`.monaco-editor .findScope { border: 1px ${S0(t.type)?"dashed":"solid"} ${i}; }`);const r=t.getColor($r);r&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${r}; }`);const o=t.getColor(ubi);o&&e.addRule(`.monaco-editor .findMatchInline { color: ${o}; }`);const s=t.getColor(dbi);s&&e.addRule(`.monaco-editor .currentFindMatchInline { color: ${s}; }`)});var fGt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Lg=function(t,e){return function(n,i){e(n,i,t)}},OOe;const gIr=524288;function jOe(t,e="single",n=!1){if(!t.hasModel())return null;const i=t.getSelection();if(e==="single"&&i.startLineNumber===i.endLineNumber||e==="multiple"){if(i.isEmpty()){const r=t.getConfiguredWordAtPosition(i.getStartPosition());if(r&&n===!1)return r.word}else if(t.getModel().getValueLengthInRange(i)<gIr)return t.getModel().getValueInRange(i)}return null}var QI;let Tf=(QI=class extends ct{get editor(){return this._editor}static get(e){return e.getContribution(OOe.ID)}constructor(e,n,i,r,o,s){super(),this._editor=e,this._findWidgetVisible=nN.bindTo(n),this._contextKeyService=n,this._storageService=i,this._clipboardService=r,this._notificationService=o,this._hoverService=s,this._updateHistoryDelayer=new Lv(500),this._state=this._register(new HTr),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(a=>this._onStateChanged(a))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const a=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),a&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!Tge.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e=e.map(n=>(n.endColumn===1&&n.endLineNumber>n.startLineNumber&&(n=n.setEndPosition(n.endLineNumber-1,this._editor.getModel().getLineMaxColumn(n.endLineNumber-1))),n.isEmpty()?null:n)).filter(n=>!!n),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=Hp(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}async _start(e,n){if(this.disposeModel(),!this._editor.hasModel())return;const i={...n,isRevealed:!0};if(e.seedSearchStringFromSelection==="single"){const r=jOe(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);r&&(this._state.isRegex?i.searchString=Hp(r):i.searchString=r)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){const r=jOe(this._editor,e.seedSearchStringFromSelection);r&&(i.searchString=r)}if(!i.searchString&&e.seedSearchStringFromGlobalClipboard){const r=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;r&&(i.searchString=r)}if(e.forceRevealReplace||i.isReplaceRevealed?i.isReplaceRevealed=!0:this._findWidgetVisible.get()||(i.isReplaceRevealed=!1),e.updateSearchScope){const r=this._editor.getSelections();r.some(o=>!o.isEmpty())&&(i.searchScope=r)}i.loop=e.loop,this._state.change(i,!1),this._model||(this._model=new VB(this._editor,this._state))}start(e,n){return this._start(e,n)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(e){return this._model?(this._model.moveToMatch(e),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){var e;return this._model?(e=this._editor.getModel())!=null&&e.isTooLargeForHeapOperation()?(this._notificationService.warn(I("too.large.for.replaceall","The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}async getGlobalBufferTerm(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(e){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}},OOe=QI,QI.ID="editor.contrib.findController",QI);Tf=OOe=fGt([Lg(1,vi),Lg(2,Xv),Lg(3,GS),Lg(4,tl),Lg(5,Pw)],Tf);let FOe=class extends Tf{constructor(e,n,i,r,o,s,a,l,c){super(e,i,a,l,s,c),this._contextViewService=n,this._keybindingService=r,this._themeService=o,this._widget=null,this._findOptionsWidget=null}async _start(e,n){this._widget||this._createFindWidget();const i=this._editor.getSelection();let r=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":r=!0;break;case"never":r=!1;break;case"multiline":{r=!!i&&i.startLineNumber!==i.endLineNumber;break}}e.updateSearchScope=e.updateSearchScope||r,await super._start(e,n),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new POe(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService,this._hoverService)),this._findOptionsWidget=this._register(new IOe(this._editor,this._state,this._keybindingService))}};FOe=fGt([Lg(1,US),Lg(2,vi),Lg(3,vo),Lg(4,Ql),Lg(5,tl),Lg(6,Xv),Lg(7,GS),Lg(8,Pw)],FOe);const bIr=Y4t(new G4t({id:ws.StartFindAction,label:I("startFindAction","Find"),alias:"Find",precondition:Tt.or(Re.focus,Tt.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:Rn.MenubarEditMenu,group:"3_find",title:I({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));bIr.addImplementation(0,(t,e,n)=>{const i=Tf.get(e);return i?i.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop}):!1});const vIr={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},isRegex:{type:"boolean"},matchWholeWord:{type:"boolean"},isCaseSensitive:{type:"boolean"},preserveCase:{type:"boolean"},findInSelection:{type:"boolean"}}}}]};class yIr extends En{constructor(){super({id:ws.StartFindWithArgs,label:I("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:vIr})}async run(e,n,i){const r=Tf.get(n);if(r){const o=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:i.replaceString!==void 0,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};await r.start({forceRevealReplace:!1,seedSearchStringFromSelection:r.getState().searchString.length===0&&n.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:n.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(i==null?void 0:i.findInSelection)||!1,loop:n.getOption(41).loop},o),r.setGlobalBufferTerm(r.getState().searchString)}}}class _Ir extends En{constructor(){super({id:ws.StartFindWithSelection,label:I("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(e,n){const i=Tf.get(n);i&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:n.getOption(41).loop}),i.setGlobalBufferTerm(i.getState().searchString))}}class mGt extends En{async run(e,n){const i=Tf.get(n);i&&!this._run(i)&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:i.getState().searchString.length===0&&n.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:n.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:n.getOption(41).loop}),this._run(i))}}class xIr extends mGt{constructor(){super({id:ws.NextMatchFindAction,label:I("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:Re.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:Tt.and(Re.focus,Tge),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}}class wIr extends mGt{constructor(){super({id:ws.PreviousMatchFindAction,label:I("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:Re.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:Tt.and(Re.focus,Tge),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class CIr extends En{constructor(){super({id:ws.GoToMatchFindAction,label:I("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:nN}),this._highlightDecorations=[]}run(e,n,i){const r=Tf.get(n);if(!r)return;const o=r.getState().matchesCount;if(o<1){e.get(tl).notify({severity:fme.Warning,message:I("findMatchAction.noResults","No matches. Try searching for something else.")});return}const a=e.get(wb).createInputBox();a.placeholder=I("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",o);const l=u=>{const d=parseInt(u);if(isNaN(d))return;const h=r.getState().matchesCount;if(d>0&&d<=h)return d-1;if(d<0&&d>=-h)return h+d},c=u=>{const d=l(u);if(typeof d=="number"){a.validationMessage=void 0,r.goToMatch(d);const h=r.getState().currentMatch;h&&this.addDecorations(n,h)}else a.validationMessage=I("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",r.getState().matchesCount),this.clearDecorations(n)};a.onDidChangeValue(u=>{c(u)}),a.onDidAccept(()=>{const u=l(a.value);typeof u=="number"?(r.goToMatch(u),a.hide()):a.validationMessage=I("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",r.getState().matchesCount)}),a.onDidHide(()=>{this.clearDecorations(n),a.dispose()}),a.show()}clearDecorations(e){e.changeDecorations(n=>{this._highlightDecorations=n.deltaDecorations(this._highlightDecorations,[])})}addDecorations(e,n){e.changeDecorations(i=>{this._highlightDecorations=i.deltaDecorations(this._highlightDecorations,[{range:n,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:n,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:Sa(rjt),position:Tp.Full}}}])})}}class pGt extends En{async run(e,n){const i=Tf.get(n);if(!i)return;const r=jOe(n,"single",!1);r&&i.setSearchString(r),this._run(i)||(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:n.getOption(41).loop}),this._run(i))}}class SIr extends pGt{constructor(){super({id:ws.NextSelectionMatchFindAction,label:I("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:Re.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class NIr extends pGt{constructor(){super({id:ws.PreviousSelectionMatchFindAction,label:I("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:Re.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const EIr=Y4t(new G4t({id:ws.StartFindReplaceAction,label:I("startReplace","Replace"),alias:"Replace",precondition:Tt.or(Re.focus,Tt.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:Rn.MenubarEditMenu,group:"3_find",title:I({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));EIr.addImplementation(0,(t,e,n)=>{if(!e.hasModel()||e.getOption(92))return!1;const i=Tf.get(e);if(!i)return!1;const r=e.getSelection(),o=i.isFindInputFocused(),s=!r.isEmpty()&&r.startLineNumber===r.endLineNumber&&e.getOption(41).seedSearchStringFromSelection!=="never"&&!o,a=o||s?2:1;return i.start({forceRevealReplace:!0,seedSearchStringFromSelection:s?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop})});Wr(Tf.ID,FOe,0);Ht(yIr);Ht(_Ir);Ht(xIr);Ht(wIr);Ht(CIr);Ht(SIr);Ht(NIr);const y_=Zl.bindToContribution(Tf.get);fn(new y_({id:ws.CloseFindWidgetCommand,precondition:nN,handler:t=>t.closeFindWidget(),kbOpts:{weight:105,kbExpr:Tt.and(Re.focus,Tt.not("isComposing")),primary:9,secondary:[1033]}}));fn(new y_({id:ws.ToggleCaseSensitiveCommand,precondition:void 0,handler:t=>t.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:Re.focus,primary:OJ.primary,mac:OJ.mac,win:OJ.win,linux:OJ.linux}}));fn(new y_({id:ws.ToggleWholeWordCommand,precondition:void 0,handler:t=>t.toggleWholeWords(),kbOpts:{weight:105,kbExpr:Re.focus,primary:jJ.primary,mac:jJ.mac,win:jJ.win,linux:jJ.linux}}));fn(new y_({id:ws.ToggleRegexCommand,precondition:void 0,handler:t=>t.toggleRegex(),kbOpts:{weight:105,kbExpr:Re.focus,primary:FJ.primary,mac:FJ.mac,win:FJ.win,linux:FJ.linux}}));fn(new y_({id:ws.ToggleSearchScopeCommand,precondition:void 0,handler:t=>t.toggleSearchScope(),kbOpts:{weight:105,kbExpr:Re.focus,primary:$J.primary,mac:$J.mac,win:$J.win,linux:$J.linux}}));fn(new y_({id:ws.TogglePreserveCaseCommand,precondition:void 0,handler:t=>t.togglePreserveCase(),kbOpts:{weight:105,kbExpr:Re.focus,primary:VJ.primary,mac:VJ.mac,win:VJ.win,linux:VJ.linux}}));fn(new y_({id:ws.ReplaceOneAction,precondition:nN,handler:t=>t.replace(),kbOpts:{weight:105,kbExpr:Re.focus,primary:3094}}));fn(new y_({id:ws.ReplaceOneAction,precondition:nN,handler:t=>t.replace(),kbOpts:{weight:105,kbExpr:Tt.and(Re.focus,yWe),primary:3}}));fn(new y_({id:ws.ReplaceAllAction,precondition:nN,handler:t=>t.replaceAll(),kbOpts:{weight:105,kbExpr:Re.focus,primary:2563}}));fn(new y_({id:ws.ReplaceAllAction,precondition:nN,handler:t=>t.replaceAll(),kbOpts:{weight:105,kbExpr:Tt.and(Re.focus,yWe),primary:void 0,mac:{primary:2051}}}));fn(new y_({id:ws.SelectAllMatchesAction,precondition:nN,handler:t=>t.selectAllMatches(),kbOpts:{weight:105,kbExpr:Re.focus,primary:515}}));const DIr={0:" ",1:"u",2:"r"},Zyt=65535,Wy=16777215,Qyt=4278190080;class YSe{constructor(e){const n=Math.ceil(e/32);this._states=new Uint32Array(n)}get(e){const n=e/32|0,i=e%32;return(this._states[n]&1<<i)!==0}set(e,n){const i=e/32|0,r=e%32,o=this._states[i];n?this._states[i]=o|1<<r:this._states[i]=o&~(1<<r)}}class mp{constructor(e,n,i){if(e.length!==n.length||e.length>Zyt)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=n,this._collapseStates=new YSe(e.length),this._userDefinedStates=new YSe(e.length),this._recoveredStates=new YSe(e.length),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],n=(i,r)=>{const o=e[e.length-1];return this.getStartLineNumber(o)<=i&&this.getEndLineNumber(o)>=r};for(let i=0,r=this._startIndexes.length;i<r;i++){const o=this._startIndexes[i],s=this._endIndexes[i];if(o>Wy||s>Wy)throw new Error("startLineNumber or endLineNumber must not exceed "+Wy);for(;e.length>0&&!n(o,s);)e.pop();const a=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=o+((a&255)<<24),this._endIndexes[i]=s+((a&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&Wy}getEndLineNumber(e){return this._endIndexes[e]&Wy}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,n){this._collapseStates.set(e,n)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,n){return this._userDefinedStates.set(e,n)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,n){return this._recoveredStates.set(e,n)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,n){n===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):n===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,n){let i=!1;if(this._types)for(let r=0;r<this._types.length;r++)this._types[r]===e&&(this.setCollapsed(r,n),i=!0);return i}toRegion(e){return new kIr(this,e)}getParentIndex(e){this.ensureParentIndices();const n=((this._startIndexes[e]&Qyt)>>>24)+((this._endIndexes[e]&Qyt)>>>16);return n===Zyt?-1:n}contains(e,n){return this.getStartLineNumber(e)<=n&&this.getEndLineNumber(e)>=n}findIndex(e){let n=0,i=this._startIndexes.length;if(i===0)return-1;for(;n<i;){const r=Math.floor((n+i)/2);e<this.getStartLineNumber(r)?i=r:n=r+1}return n-1}findRange(e){let n=this.findIndex(e);if(n>=0){if(this.getEndLineNumber(n)>=e)return n;for(n=this.getParentIndex(n);n!==-1;){if(this.contains(n,e))return n;n=this.getParentIndex(n)}}return-1}toString(){const e=[];for(let n=0;n<this.length;n++)e[n]=`[${DIr[this.getSource(n)]}${this.isCollapsed(n)?"+":"-"}] ${this.getStartLineNumber(n)}/${this.getEndLineNumber(n)}`;return e.join(", ")}toFoldRange(e){return{startLineNumber:this._startIndexes[e]&Wy,endLineNumber:this._endIndexes[e]&Wy,type:this._types?this._types[e]:void 0,isCollapsed:this.isCollapsed(e),source:this.getSource(e)}}static fromFoldRanges(e){const n=e.length,i=new Uint32Array(n),r=new Uint32Array(n);let o=[],s=!1;for(let l=0;l<n;l++){const c=e[l];i[l]=c.startLineNumber,r[l]=c.endLineNumber,o.push(c.type),c.type&&(s=!0)}s||(o=void 0);const a=new mp(i,r,o);for(let l=0;l<n;l++)e[l].isCollapsed&&a.setCollapsed(l,!0),a.setSource(l,e[l].source);return a}static sanitizeAndMerge(e,n,i){i=i??Number.MAX_VALUE;const r=(p,g)=>Array.isArray(p)?y=>y<g?p[y]:void 0:y=>y<g?p.toFoldRange(y):void 0,o=r(e,e.length),s=r(n,n.length);let a=0,l=0,c=o(0),u=s(0);const d=[];let h,f=0;const m=[];for(;c||u;){let p;if(u&&(!c||c.startLineNumber>=u.startLineNumber))c&&c.startLineNumber===u.startLineNumber?(u.source===1?p=u:(p=c,p.isCollapsed=u.isCollapsed&&c.endLineNumber===u.endLineNumber,p.source=0),c=o(++a)):(p=u,u.isCollapsed&&u.source===0&&(p.source=2)),u=s(++l);else{let g=l,y=u;for(;;){if(!y||y.startLineNumber>c.endLineNumber){p=c;break}if(y.source===1&&y.endLineNumber>c.endLineNumber)break;y=s(++g)}c=o(++a)}if(p){for(;h&&h.endLineNumber<p.startLineNumber;)h=d.pop();p.endLineNumber>p.startLineNumber&&p.startLineNumber>f&&p.endLineNumber<=i&&(!h||h.endLineNumber>=p.endLineNumber)&&(m.push(p),f=p.startLineNumber,h&&d.push(h),h=p)}}return m}}class kIr{constructor(e,n){this.ranges=e,this.index=n}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class MIr{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,n){this._updateEventEmitter=new st,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=n,this._regions=new mp(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((i,r)=>i.regionIndex-r.regionIndex);const n={};this._decorationProvider.changeDecorations(i=>{let r=0,o=-1,s=-1;const a=l=>{for(;r<l;){const c=this._regions.getEndLineNumber(r),u=this._regions.isCollapsed(r);if(c<=o){const d=this.regions.getSource(r)!==0;i.changeDecorationOptions(this._editorDecorationIds[r],this._decorationProvider.getDecorationOption(u,c<=s,d))}u&&c>s&&(s=c),r++}};for(const l of e){const c=l.regionIndex,u=this._editorDecorationIds[c];if(u&&!n[u]){n[u]=!0,a(c);const d=!this._regions.isCollapsed(c);this._regions.setCollapsed(c,d),o=Math.max(o,this._regions.getEndLineNumber(c))}}a(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const n=new Array,i=r=>{for(const o of e)if(!(o.startLineNumber>r.endLineNumber||r.startLineNumber>o.endLineNumber))return!0;return!1};for(let r=0;r<this._regions.length;r++){const o=this._regions.toFoldRange(r);(o.source===0||!i(o))&&n.push(o)}this.updatePost(mp.fromFoldRanges(n))}update(e,n=[]){const i=this._currentFoldedOrManualRanges(n),r=mp.sanitizeAndMerge(e,i,this._textModel.getLineCount());this.updatePost(mp.fromFoldRanges(r))}updatePost(e){const n=[];let i=-1;for(let r=0,o=e.length;r<o;r++){const s=e.getStartLineNumber(r),a=e.getEndLineNumber(r),l=e.isCollapsed(r),c=e.getSource(r)!==0,u={startLineNumber:s,startColumn:this._textModel.getLineMaxColumn(s),endLineNumber:a,endColumn:this._textModel.getLineMaxColumn(a)+1};n.push({range:u,options:this._decorationProvider.getDecorationOption(l,a<=i,c)}),l&&a>i&&(i=a)}this._decorationProvider.changeDecorations(r=>this._editorDecorationIds=r.deltaDecorations(this._editorDecorationIds,n)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){const n=(r,o)=>{for(const s of e)if(r<s&&s<=o)return!0;return!1},i=[];for(let r=0,o=this._regions.length;r<o;r++){let s=this.regions.isCollapsed(r);const a=this.regions.getSource(r);if(s||a!==0){const l=this._regions.toFoldRange(r),c=this._textModel.getDecorationRange(this._editorDecorationIds[r]);c&&(s&&n(c.startLineNumber,c.endLineNumber)&&(s=!1),i.push({startLineNumber:c.startLineNumber,endLineNumber:c.endLineNumber,type:l.type,isCollapsed:s,source:a}))}}return i}getMemento(){const e=this._currentFoldedOrManualRanges(),n=[],i=this._textModel.getLineCount();for(let r=0,o=e.length;r<o;r++){const s=e[r];if(s.startLineNumber>=s.endLineNumber||s.startLineNumber<1||s.endLineNumber>i)continue;const a=this._getLinesChecksum(s.startLineNumber+1,s.endLineNumber);n.push({startLineNumber:s.startLineNumber,endLineNumber:s.endLineNumber,isCollapsed:s.isCollapsed,source:s.source,checksum:a})}return n.length>0?n:void 0}applyMemento(e){if(!Array.isArray(e))return;const n=[],i=this._textModel.getLineCount();for(const o of e){if(o.startLineNumber>=o.endLineNumber||o.startLineNumber<1||o.endLineNumber>i)continue;const s=this._getLinesChecksum(o.startLineNumber+1,o.endLineNumber);(!o.checksum||s===o.checksum)&&n.push({startLineNumber:o.startLineNumber,endLineNumber:o.endLineNumber,type:void 0,isCollapsed:o.isCollapsed??!0,source:o.source??0})}const r=mp.sanitizeAndMerge(this._regions,n,i);this.updatePost(mp.fromFoldRanges(r))}_getLinesChecksum(e,n){return Lfe(this._textModel.getLineContent(e)+this._textModel.getLineContent(n))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,n){const i=[];if(this._regions){let r=this._regions.findRange(e),o=1;for(;r>=0;){const s=this._regions.toRegion(r);(!n||n(s,o))&&i.push(s),o++,r=s.parentIndex}}return i}getRegionAtLine(e){if(this._regions){const n=this._regions.findRange(e);if(n>=0)return this._regions.toRegion(n)}return null}getRegionsInside(e,n){const i=[],r=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(n&&n.length===2){const s=[];for(let a=r,l=this._regions.length;a<l;a++){const c=this._regions.toRegion(a);if(this._regions.getStartLineNumber(a)<o){for(;s.length>0&&!c.containedBy(s[s.length-1]);)s.pop();s.push(c),n(c,s.length)&&i.push(c)}else break}}else for(let s=r,a=this._regions.length;s<a;s++){const l=this._regions.toRegion(s);if(this._regions.getStartLineNumber(s)<o)(!n||n(l))&&i.push(l);else break}return i}}function wWe(t,e,n){const i=[];for(const r of n){const o=t.getRegionAtLine(r);if(o){const s=!o.isCollapsed;if(i.push(o),e>1){const a=t.getRegionsInside(o,(l,c)=>l.isCollapsed!==s&&c<e);i.push(...a)}}}t.toggleCollapseState(i)}function L$(t,e,n=Number.MAX_VALUE,i){const r=[];if(i&&i.length>0)for(const o of i){const s=t.getRegionAtLine(o);if(s&&(s.isCollapsed!==e&&r.push(s),n>1)){const a=t.getRegionsInside(s,(l,c)=>l.isCollapsed!==e&&c<n);r.push(...a)}}else{const o=t.getRegionsInside(null,(s,a)=>s.isCollapsed!==e&&a<n);r.push(...o)}t.toggleCollapseState(r)}function gGt(t,e,n,i){const r=[];for(const o of i){const s=t.getAllRegionsAtLine(o,(a,l)=>a.isCollapsed!==e&&l<=n);r.push(...s)}t.toggleCollapseState(r)}function LIr(t,e,n){const i=[];for(const r of n){const o=t.getAllRegionsAtLine(r,s=>s.isCollapsed!==e);o.length>0&&i.push(o[0])}t.toggleCollapseState(i)}function TIr(t,e,n,i){const r=(s,a)=>a===e&&s.isCollapsed!==n&&!i.some(l=>s.containsLine(l)),o=t.getRegionsInside(null,r);t.toggleCollapseState(o)}function bGt(t,e,n){const i=[];for(const s of n){const a=t.getAllRegionsAtLine(s,void 0);a.length>0&&i.push(a[0])}const r=s=>i.every(a=>!a.containedBy(s)&&!s.containedBy(a))&&s.isCollapsed!==e,o=t.getRegionsInside(null,r);t.toggleCollapseState(o)}function CWe(t,e,n){const i=t.textModel,r=t.regions,o=[];for(let s=r.length-1;s>=0;s--)if(n!==r.isCollapsed(s)){const a=r.getStartLineNumber(s);e.test(i.getLineContent(a))&&o.push(r.toRegion(s))}t.toggleCollapseState(o)}function SWe(t,e,n){const i=t.regions,r=[];for(let o=i.length-1;o>=0;o--)n!==i.isCollapsed(o)&&e===i.getType(o)&&r.push(i.toRegion(o));t.toggleCollapseState(r)}function IIr(t,e){let n=null;const i=e.getRegionAtLine(t);if(i!==null&&(n=i.startLineNumber,t===n)){const r=i.parentIndex;r!==-1?n=e.regions.getStartLineNumber(r):n=null}return n}function AIr(t,e){let n=e.getRegionAtLine(t);if(n!==null&&n.startLineNumber===t){if(t!==n.startLineNumber)return n.startLineNumber;{const i=n.parentIndex;let r=0;for(i!==-1&&(r=e.regions.getStartLineNumber(n.parentIndex));n!==null;)if(n.regionIndex>0){if(n=e.regions.toRegion(n.regionIndex-1),n.startLineNumber<=r)return null;if(n.parentIndex===i)return n.startLineNumber}else return null}}else if(e.regions.length>0)for(n=e.regions.toRegion(e.regions.length-1);n!==null;){if(n.startLineNumber<t)return n.startLineNumber;n.regionIndex>0?n=e.regions.toRegion(n.regionIndex-1):n=null}return null}function RIr(t,e){let n=e.getRegionAtLine(t);if(n!==null&&n.startLineNumber===t){const i=n.parentIndex;let r=0;if(i!==-1)r=e.regions.getEndLineNumber(n.parentIndex);else{if(e.regions.length===0)return null;r=e.regions.getEndLineNumber(e.regions.length-1)}for(;n!==null;)if(n.regionIndex<e.regions.length){if(n=e.regions.toRegion(n.regionIndex+1),n.startLineNumber>=r)return null;if(n.parentIndex===i)return n.startLineNumber}else return null}else if(e.regions.length>0)for(n=e.regions.toRegion(0);n!==null;){if(n.startLineNumber>t)return n.startLineNumber;n.regionIndex<e.regions.length?n=e.regions.toRegion(n.regionIndex+1):n=null}return null}class PIr{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new st,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange(n=>this.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(n=>n.range.endLineNumber!==n.range.startLineNumber||gk(n.text)[0]!==0))}updateHiddenRanges(){let e=!1;const n=[];let i=0,r=0,o=Number.MAX_VALUE,s=-1;const a=this._foldingModel.regions;for(;i<a.length;i++){if(!a.isCollapsed(i))continue;const l=a.getStartLineNumber(i)+1,c=a.getEndLineNumber(i);o<=l&&c<=s||(!e&&r<this._hiddenRanges.length&&this._hiddenRanges[r].startLineNumber===l&&this._hiddenRanges[r].endLineNumber===c?(n.push(this._hiddenRanges[r]),r++):(e=!0,n.push(new ve(l,1,c,1))),o=l,s=c)}(this._hasLineChanges||e||r<this._hiddenRanges.length)&&this.applyHiddenRanges(n)}applyHiddenRanges(e){this._hiddenRanges=e,this._hasLineChanges=!1,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return Jyt(this._hiddenRanges,e)!==null}adjustSelections(e){let n=!1;const i=this._foldingModel.textModel;let r=null;const o=s=>((!r||!OIr(s,r))&&(r=Jyt(this._hiddenRanges,s)),r?r.startLineNumber-1:null);for(let s=0,a=e.length;s<a;s++){let l=e[s];const c=o(l.startLineNumber);c&&(l=l.setStartPosition(c,i.getLineMaxColumn(c)),n=!0);const u=o(l.endLineNumber);u&&(l=l.setEndPosition(u,i.getLineMaxColumn(u)),n=!0),e[s]=l}return n}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function OIr(t,e){return t>=e.startLineNumber&&t<=e.endLineNumber}function Jyt(t,e){const n=TH(t,i=>e<i.startLineNumber)-1;return n>=0&&t[n].endLineNumber>=e?t[n]:null}const jIr=5e3,FIr="indent";class NWe{constructor(e,n,i){this.editorModel=e,this.languageConfigurationService=n,this.foldingRangesLimit=i,this.id=FIr}dispose(){}compute(e){const n=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=n&&!!n.offSide,r=n&&n.markers;return Promise.resolve(BIr(this.editorModel,i,r,this.foldingRangesLimit))}}let $Ir=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,n,i){if(e>Wy||n>Wy)return;const r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=n,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){const n=this._foldingRangesLimit.limit;if(this._length<=n){this._foldingRangesLimit.update(this._length,!1);const i=new Uint32Array(this._length),r=new Uint32Array(this._length);for(let o=this._length-1,s=0;o>=0;o--,s++)i[s]=this._startIndexes[o],r[s]=this._endIndexes[o];return new mp(i,r)}else{this._foldingRangesLimit.update(this._length,n);let i=0,r=this._indentOccurrences.length;for(let l=0;l<this._indentOccurrences.length;l++){const c=this._indentOccurrences[l];if(c){if(c+i>n){r=l;break}i+=c}}const o=e.getOptions().tabSize,s=new Uint32Array(n),a=new Uint32Array(n);for(let l=this._length-1,c=0;l>=0;l--){const u=this._startIndexes[l],d=e.getLineContent(u),h=ume(d,o);(h<r||h===r&&i++<n)&&(s[c]=u,a[c]=this._endIndexes[l],c++)}return new mp(s,a)}}};const VIr={limit:jIr,update:()=>{}};function BIr(t,e,n,i=VIr){const r=t.getOptions().tabSize,o=new $Ir(i);let s;n&&(s=new RegExp(`(${n.start.source})|(?:${n.end.source})`));const a=[],l=t.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let c=t.getLineCount();c>0;c--){const u=t.getLineContent(c),d=ume(u,r);let h=a[a.length-1];if(d===-1){e&&(h.endAbove=c);continue}let f;if(s&&(f=u.match(s)))if(f[1]){let m=a.length-1;for(;m>0&&a[m].indent!==-2;)m--;if(m>0){a.length=m+1,h=a[m],o.insertFirst(c,h.line,d),h.line=c,h.indent=d,h.endAbove=c;continue}}else{a.push({indent:-2,endAbove:c,line:c});continue}if(h.indent>d){do a.pop(),h=a[a.length-1];while(h.indent>d);const m=h.endAbove-1;m-c>=1&&o.insertFirst(c,m,d)}h.indent===d?h.endAbove=c:a.push({indent:d,endAbove:c,line:c})}return o.toIndentRanges(t)}const zIr=Fe("editor.foldBackground",{light:rr(HE,.3),dark:rr(HE,.3),hcDark:null,hcLight:null},I("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);Fe("editor.foldPlaceholderForeground",{light:"#808080",dark:"#808080",hcDark:null,hcLight:null},I("collapsedTextColor","Color of the collapsed text after the first line of a folded range."));Fe("editorGutter.foldingControlForeground",lre,I("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));const Uae=ks("folding-expanded",qt.chevronDown,I("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),Kae=ks("folding-collapsed",qt.chevronRight,I("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),e0t=ks("folding-manual-collapsed",Kae,I("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),t0t=ks("folding-manual-expanded",Uae,I("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),XSe={color:Sa(zIr),position:1},vO=I("linesCollapsed","Click to expand the range."),HJ=I("linesExpanded","Click to collapse the range."),xl=class xl{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,n,i){return n?xl.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?e?this.showFoldingHighlights?xl.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:xl.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:xl.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?i?this.showFoldingHighlights?xl.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:xl.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?xl.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:xl.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?i?xl.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:xl.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i?xl.MANUALLY_EXPANDED_VISUAL_DECORATION:xl.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}};xl.COLLAPSED_VISUAL_DECORATION=Hi.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:vO,firstLineDecorationClassName:ci.asClassName(Kae)}),xl.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Hi.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:XSe,isWholeLine:!0,linesDecorationsTooltip:vO,firstLineDecorationClassName:ci.asClassName(Kae)}),xl.MANUALLY_COLLAPSED_VISUAL_DECORATION=Hi.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:vO,firstLineDecorationClassName:ci.asClassName(e0t)}),xl.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Hi.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:XSe,isWholeLine:!0,linesDecorationsTooltip:vO,firstLineDecorationClassName:ci.asClassName(e0t)}),xl.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=Hi.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:vO}),xl.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=Hi.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:XSe,isWholeLine:!0,linesDecorationsTooltip:vO}),xl.EXPANDED_VISUAL_DECORATION=Hi.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+ci.asClassName(Uae),linesDecorationsTooltip:HJ}),xl.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Hi.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:ci.asClassName(Uae),linesDecorationsTooltip:HJ}),xl.MANUALLY_EXPANDED_VISUAL_DECORATION=Hi.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+ci.asClassName(t0t),linesDecorationsTooltip:HJ}),xl.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Hi.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:ci.asClassName(t0t),linesDecorationsTooltip:HJ}),xl.NO_CONTROLS_EXPANDED_RANGE_DECORATION=Hi.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0}),xl.HIDDEN_RANGE_DECORATION=Hi.register({description:"folding-hidden-range-decoration",stickiness:1});let $Oe=xl;const HIr={},WIr="syntax";class EWe{constructor(e,n,i,r,o){this.editorModel=e,this.providers=n,this.handleFoldingRangesChange=i,this.foldingRangesLimit=r,this.fallbackRangeProvider=o,this.id=WIr,this.disposables=new Lt,o&&this.disposables.add(o);for(const s of n)typeof s.onDidChange=="function"&&this.disposables.add(s.onDidChange(i))}compute(e){return UIr(this.providers,this.editorModel,e).then(n=>{var i;return n?qIr(n,this.foldingRangesLimit):((i=this.fallbackRangeProvider)==null?void 0:i.compute(e))??null})}dispose(){this.disposables.dispose()}}function UIr(t,e,n){let i=null;const r=t.map((o,s)=>Promise.resolve(o.provideFoldingRanges(e,HIr,n)).then(a=>{if(!n.isCancellationRequested&&Array.isArray(a)){Array.isArray(i)||(i=[]);const l=e.getLineCount();for(const c of a)c.start>0&&c.end>c.start&&c.end<=l&&i.push({start:c.start,end:c.end,rank:s,kind:c.kind})}},$a));return Promise.all(r).then(o=>i)}class KIr{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,n,i,r){if(e>Wy||n>Wy)return;const o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=n,this._nestingLevels[o]=r,this._types[o]=i,this._length++,r<30&&(this._nestingLevelCounts[r]=(this._nestingLevelCounts[r]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);const n=new Uint32Array(this._length),i=new Uint32Array(this._length);for(let r=0;r<this._length;r++)n[r]=this._startIndexes[r],i[r]=this._endIndexes[r];return new mp(n,i,this._types)}else{this._foldingRangesLimit.update(this._length,e);let n=0,i=this._nestingLevelCounts.length;for(let a=0;a<this._nestingLevelCounts.length;a++){const l=this._nestingLevelCounts[a];if(l){if(l+n>e){i=a;break}n+=l}}const r=new Uint32Array(e),o=new Uint32Array(e),s=[];for(let a=0,l=0;a<this._length;a++){const c=this._nestingLevels[a];(c<i||c===i&&n++<e)&&(r[l]=this._startIndexes[a],o[l]=this._endIndexes[a],s[l]=this._types[a],l++)}return new mp(r,o,s)}}}function qIr(t,e){const n=t.sort((s,a)=>{let l=s.start-a.start;return l===0&&(l=s.rank-a.rank),l}),i=new KIr(e);let r;const o=[];for(const s of n)if(!r)r=s,i.add(s.start,s.end,s.kind&&s.kind.value,o.length);else if(s.start>r.start)if(s.end<=r.end)o.push(r),r=s,i.add(s.start,s.end,s.kind&&s.kind.value,o.length);else{if(s.start>r.end){do r=o.pop();while(r&&s.start>r.end);r&&o.push(r),r=s}i.add(s.start,s.end,s.kind&&s.kind.value,o.length)}return i.toIndentRanges()}var GIr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},k7=function(t,e){return function(n,i){e(n,i,t)}},qL;const Bu=new gn("foldingEnabled",!1);var JI;let Ak=(JI=class extends ct{static get(e){return e.getContribution(qL.ID)}static getFoldingRangeProviders(e,n){var r;const i=e.foldingRangeProvider.ordered(n);return((r=qL._foldingRangeSelector)==null?void 0:r.call(qL,i,n))??i}constructor(e,n,i,r,o,s){super(),this.contextKeyService=n,this.languageConfigurationService=i,this.languageFeaturesService=s,this.localToDispose=this._register(new Lt),this.editor=e,this._foldingLimitReporter=new vGt(e);const a=this.editor.getOptions();this._isEnabled=a.get(43),this._useFoldingProviders=a.get(44)!=="indentation",this._unfoldOnClickAfterEndOfLine=a.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=a.get(46),this.updateDebounceInfo=o.for(s.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new $Oe(e),this.foldingDecorationProvider.showFoldingControls=a.get(111),this.foldingDecorationProvider.showFoldingHighlights=a.get(45),this.foldingEnabled=Bu.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(l=>{if(l.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),l.hasChanged(47)&&this.onModelChanged(),l.hasChanged(111)||l.hasChanged(45)){const c=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=c.get(111),this.foldingDecorationProvider.showFoldingHighlights=c.get(45),this.triggerFoldingModelChanged()}l.hasChanged(44)&&(this._useFoldingProviders=this.editor.getOptions().get(44)!=="indentation",this.onFoldingStrategyChanged()),l.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),l.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))})),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const n=this.foldingModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:n,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const n=this.editor.getModel();if(!(!n||!this._isEnabled||n.isTooLargeForTokenization()||!this.hiddenRangeModel)&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new MIr(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new PIr(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(n=>this.onHiddenRangesChanges(n))),this.updateScheduler=new Lv(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new Wo(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(n=>this.onDidChangeModelContent(n))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(n=>this.onEditorMouseDown(n))),this.localToDispose.add(this.editor.onMouseUp(n=>this.onEditorMouseUp(n))),this.localToDispose.add({dispose:()=>{var n,i;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(n=this.updateScheduler)==null||n.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(i=this.rangeProvider)==null||i.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;(e=this.rangeProvider)==null||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const n=new NWe(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=n,this._useFoldingProviders&&this.foldingModel){const i=qL.getFoldingRangeProviders(this.languageFeaturesService,e);i.length>0&&(this.rangeProvider=new EWe(e,i,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,n))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var n;(n=this.hiddenRangeModel)==null||n.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const e=this.foldingModel;if(!e)return null;const n=new cu,i=this.getRangeProvider(e.textModel),r=this.foldingRegionPromise=cc(o=>i.compute(o));return r.then(o=>{if(o&&r===this.foldingRegionPromise){let s;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const u=o.setCollapsedAllOfType(lk.Imports.value,!0);u&&(s=J0.capture(this.editor),this._currentModelHasFoldedImports=u)}const a=this.editor.getSelections(),l=a?a.map(u=>u.startLineNumber):[];e.update(o,l),s==null||s.restore(this.editor);const c=this.updateDebounceInfo.update(e.textModel,n.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=c)}return e})}).then(void 0,e=>(ji(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const n=this.editor.getSelections();n&&this.hiddenRangeModel.adjustSelections(n)&&this.editor.setSelections(n)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then(n=>{if(n){const i=this.editor.getSelections();if(i&&i.length>0){const r=[];for(const o of i){const s=o.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(s)&&r.push(...n.getAllRegionsAtLine(s,a=>a.isCollapsed&&s>a.startLineNumber))}r.length&&(n.toggleCollapseState(r),this.reveal(i[0].getPosition()))}}}).then(void 0,ji)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;const n=e.target.range;let i=!1;switch(e.target.type){case 4:{const r=e.target.detail,o=e.target.element.offsetLeft;if(r.offsetX-o<4)return;i=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){const r=this.editor.getModel();if(r&&n.startColumn===r.getLineMaxColumn(n.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:n.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const n=this.foldingModel;if(!n||!this.mouseDownInfo||!e.target)return;const i=this.mouseDownInfo.lineNumber,r=this.mouseDownInfo.iconClicked,o=e.target.range;if(!o||o.startLineNumber!==i)return;if(r){if(e.target.type!==4)return}else{const a=this.editor.getModel();if(!a||o.startColumn!==a.getLineMaxColumn(i))return}const s=n.getRegionAtLine(i);if(s&&s.startLineNumber===i){const a=s.isCollapsed;if(r||a){const l=e.event.altKey;let c=[];if(l){const u=h=>!h.containedBy(s)&&!s.containedBy(h),d=n.getRegionsInside(null,u);for(const h of d)h.isCollapsed&&c.push(h);c.length===0&&(c=d)}else{const u=e.event.middleButton||e.event.shiftKey;if(u)for(const d of n.getRegionsInside(s))d.isCollapsed===a&&c.push(d);(a||!u||c.length===0)&&c.push(s)}n.toggleCollapseState(c),this.reveal({lineNumber:i,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}},qL=JI,JI.ID="editor.contrib.folding",JI);Ak=qL=GIr([k7(1,vi),k7(2,bs),k7(3,tl),k7(4,tg),k7(5,Ln)],Ak);class vGt{constructor(e){this.editor=e,this._onDidChange=new st,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(e,n){(e!==this._computed||n!==this._limited)&&(this._computed=e,this._limited=n,this._onDidChange.fire())}}class Dd extends En{runEditorCommand(e,n,i){const r=e.get(bs),o=Ak.get(n);if(!o)return;const s=o.getFoldingModel();if(s)return this.reportTelemetry(e,n),s.then(a=>{if(a){this.invoke(o,a,n,i,r);const l=n.getSelection();l&&o.reveal(l.getStartPosition())}})}getSelectedLines(e){const n=e.getSelections();return n?n.map(i=>i.startLineNumber):[]}getLineNumbers(e,n){return e&&e.selectionLines?e.selectionLines.map(i=>i+1):this.getSelectedLines(n)}run(e,n){}}function yGt(t){if(!Ud(t)){if(!Ic(t))return!1;const e=t;if(!Ud(e.levels)&&!ok(e.levels)||!Ud(e.direction)&&!Cf(e.direction)||!Ud(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(ok)))return!1}return!0}class YIr extends Dd{constructor(){super({id:"editor.unfold",label:I("unfoldAction.label","Unfold"),alias:"Unfold",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},metadata:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument:
						* 'levels': Number of levels to unfold. If not set, defaults to 1.
						* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.
						* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.
						`,constraint:yGt,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,n,i,r){const o=r&&r.levels||1,s=this.getLineNumbers(r,i);r&&r.direction==="up"?gGt(n,!1,o,s):L$(n,!1,o,s)}}class XIr extends Dd{constructor(){super({id:"editor.unfoldRecursively",label:I("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2142),weight:100}})}invoke(e,n,i,r){L$(n,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}class ZIr extends Dd{constructor(){super({id:"editor.fold",label:I("foldAction.label","Fold"),alias:"Fold",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},metadata:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument:
							* 'levels': Number of levels to fold.
							* 'direction': If 'up', folds given number of levels up otherwise folds down.
							* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.
							If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.
						`,constraint:yGt,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,n,i,r){const o=this.getLineNumbers(r,i),s=r&&r.levels,a=r&&r.direction;typeof s!="number"&&typeof a!="string"?LIr(n,!0,o):a==="up"?gGt(n,!0,s||1,o):L$(n,!0,s||1,o)}}class QIr extends Dd{constructor(){super({id:"editor.toggleFold",label:I("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2090),weight:100}})}invoke(e,n,i){const r=this.getSelectedLines(i);wWe(n,1,r)}}class JIr extends Dd{constructor(){super({id:"editor.foldRecursively",label:I("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2140),weight:100}})}invoke(e,n,i){const r=this.getSelectedLines(i);L$(n,!0,Number.MAX_VALUE,r)}}class e2r extends Dd{constructor(){super({id:"editor.toggleFoldRecursively",label:I("toggleFoldRecursivelyAction.label","Toggle Fold Recursively"),alias:"Toggle Fold Recursively",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,3114),weight:100}})}invoke(e,n,i){const r=this.getSelectedLines(i);wWe(n,Number.MAX_VALUE,r)}}class t2r extends Dd{constructor(){super({id:"editor.foldAllBlockComments",label:I("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2138),weight:100}})}invoke(e,n,i,r,o){if(n.regions.hasTypes())SWe(n,lk.Comment.value,!0);else{const s=i.getModel();if(!s)return;const a=o.getLanguageConfiguration(s.getLanguageId()).comments;if(a&&a.blockCommentStartToken){const l=new RegExp("^\\s*"+Hp(a.blockCommentStartToken));CWe(n,l,!0)}}}}class n2r extends Dd{constructor(){super({id:"editor.foldAllMarkerRegions",label:I("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2077),weight:100}})}invoke(e,n,i,r,o){if(n.regions.hasTypes())SWe(n,lk.Region.value,!0);else{const s=i.getModel();if(!s)return;const a=o.getLanguageConfiguration(s.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){const l=new RegExp(a.markers.start);CWe(n,l,!0)}}}}class i2r extends Dd{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:I("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2078),weight:100}})}invoke(e,n,i,r,o){if(n.regions.hasTypes())SWe(n,lk.Region.value,!1);else{const s=i.getModel();if(!s)return;const a=o.getLanguageConfiguration(s.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){const l=new RegExp(a.markers.start);CWe(n,l,!1)}}}}class r2r extends Dd{constructor(){super({id:"editor.foldAllExcept",label:I("foldAllExcept.label","Fold All Except Selected"),alias:"Fold All Except Selected",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2136),weight:100}})}invoke(e,n,i){const r=this.getSelectedLines(i);bGt(n,!0,r)}}class o2r extends Dd{constructor(){super({id:"editor.unfoldAllExcept",label:I("unfoldAllExcept.label","Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2134),weight:100}})}invoke(e,n,i){const r=this.getSelectedLines(i);bGt(n,!1,r)}}class s2r extends Dd{constructor(){super({id:"editor.foldAll",label:I("foldAllAction.label","Fold All"),alias:"Fold All",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2069),weight:100}})}invoke(e,n,i){L$(n,!0)}}class a2r extends Dd{constructor(){super({id:"editor.unfoldAll",label:I("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2088),weight:100}})}invoke(e,n,i){L$(n,!1)}}const Y4=class Y4 extends Dd{getFoldingLevel(){return parseInt(this.id.substr(Y4.ID_PREFIX.length))}invoke(e,n,i){TIr(n,this.getFoldingLevel(),!0,this.getSelectedLines(i))}};Y4.ID_PREFIX="editor.foldLevel",Y4.ID=e=>Y4.ID_PREFIX+e;let qae=Y4;class l2r extends Dd{constructor(){super({id:"editor.gotoParentFold",label:I("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,weight:100}})}invoke(e,n,i){const r=this.getSelectedLines(i);if(r.length>0){const o=IIr(r[0],n);o!==null&&i.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}}class c2r extends Dd{constructor(){super({id:"editor.gotoPreviousFold",label:I("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,weight:100}})}invoke(e,n,i){const r=this.getSelectedLines(i);if(r.length>0){const o=AIr(r[0],n);o!==null&&i.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}}class u2r extends Dd{constructor(){super({id:"editor.gotoNextFold",label:I("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,weight:100}})}invoke(e,n,i){const r=this.getSelectedLines(i);if(r.length>0){const o=RIr(r[0],n);o!==null&&i.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}}class d2r extends Dd{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:I("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2135),weight:100}})}invoke(e,n,i){var s;const r=[],o=i.getSelections();if(o){for(const a of o){let l=a.endLineNumber;a.endColumn===1&&--l,l>a.startLineNumber&&(r.push({startLineNumber:a.startLineNumber,endLineNumber:l,type:void 0,isCollapsed:!0,source:1}),i.setSelection({startLineNumber:a.startLineNumber,startColumn:1,endLineNumber:a.startLineNumber,endColumn:1}))}if(r.length>0){r.sort((l,c)=>l.startLineNumber-c.startLineNumber);const a=mp.sanitizeAndMerge(n.regions,r,(s=i.getModel())==null?void 0:s.getLineCount());n.updatePost(mp.fromFoldRanges(a))}}}}class h2r extends Dd{constructor(){super({id:"editor.removeManualFoldingRanges",label:I("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2137),weight:100}})}invoke(e,n,i){const r=i.getSelections();if(r){const o=[];for(const s of r){const{startLineNumber:a,endLineNumber:l}=s;o.push(l>=a?{startLineNumber:a,endLineNumber:l}:{endLineNumber:l,startLineNumber:a})}n.removeManualRanges(o),e.triggerFoldingModelChanged()}}}Wr(Ak.ID,Ak,0);Ht(YIr);Ht(XIr);Ht(ZIr);Ht(JIr);Ht(e2r);Ht(s2r);Ht(a2r);Ht(t2r);Ht(n2r);Ht(i2r);Ht(r2r);Ht(o2r);Ht(QIr);Ht(l2r);Ht(c2r);Ht(u2r);Ht(d2r);Ht(h2r);for(let t=1;t<=7;t++)Jfi(new qae({id:qae.ID(t),label:I("foldLevelAction.label","Fold Level {0}",t),alias:`Fold Level ${t}`,precondition:Bu,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2048|21+t),weight:100}}));Ar.registerCommand("_executeFoldingRangeProvider",async function(t,...e){const[n]=e;if(!(n instanceof ri))throw Jg();const i=t.get(Ln),r=t.get(Ds).getModel(n);if(!r)throw Jg();const o=t.get(cr);if(!o.getValue("editor.folding",{resource:n}))return[];const s=t.get(bs),a=o.getValue("editor.foldingStrategy",{resource:n}),l={get limit(){return o.getValue("editor.foldingMaximumRegions",{resource:n})},update:(f,m)=>{}},c=new NWe(r,s,l);let u=c;if(a!=="indentation"){const f=Ak.getFoldingRangeProviders(i,r);f.length&&(u=new EWe(r,f,()=>{},l,c))}const d=await u.compute(er.None),h=[];try{if(d)for(let f=0;f<d.length;f++){const m=d.getType(f);h.push({start:d.getStartLineNumber(f),end:d.getEndLineNumber(f),kind:m?lk.fromValue(m):void 0})}return h}finally{u.dispose()}});class f2r extends En{constructor(){super({id:"editor.action.fontZoomIn",label:I("EditorFontZoomIn.label","Increase Editor Font Size"),alias:"Increase Editor Font Size",precondition:void 0})}run(e,n){jg.setZoomLevel(jg.getZoomLevel()+1)}}class m2r extends En{constructor(){super({id:"editor.action.fontZoomOut",label:I("EditorFontZoomOut.label","Decrease Editor Font Size"),alias:"Decrease Editor Font Size",precondition:void 0})}run(e,n){jg.setZoomLevel(jg.getZoomLevel()-1)}}class p2r extends En{constructor(){super({id:"editor.action.fontZoomReset",label:I("EditorFontZoomReset.label","Reset Editor Font Size"),alias:"Reset Editor Font Size",precondition:void 0})}run(e,n){jg.setZoomLevel(0)}}Ht(f2r);Ht(m2r);Ht(p2r);var _Gt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},BB=function(t,e){return function(n,i){e(n,i,t)}},nj;let Gae=(nj=class{constructor(e,n,i,r){this._editor=e,this._languageFeaturesService=n,this._workerService=i,this._accessibilitySignalService=r,this._disposables=new Lt,this._sessionDisposables=new Lt,this._disposables.add(n.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(o=>{o.hasChanged(56)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56)||!this._editor.hasModel())return;const e=this._editor.getModel(),[n]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!n||!n.autoFormatTriggerCharacters)return;const i=new Jie;for(const r of n.autoFormatTriggerCharacters)i.add(r.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(r=>{const o=r.charCodeAt(r.length-1);i.has(o)&&this._trigger(String.fromCharCode(o))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const n=this._editor.getModel(),i=this._editor.getPosition(),r=new oa,o=this._editor.onDidChangeModelContent(s=>{if(s.isFlush){r.cancel(),o.dispose();return}for(let a=0,l=s.changes.length;a<l;a++)if(s.changes[a].range.endLineNumber<=i.lineNumber){r.cancel(),o.dispose();return}});a6t(this._workerService,this._languageFeaturesService,n,i,e,n.getFormattingOptions(),r.token).then(s=>{r.token.isCancellationRequested||md(s)&&(this._accessibilitySignalService.playSignal(fp.format,{userGesture:!1}),N5.execute(this._editor,s,!0))}).finally(()=>{o.dispose()})}},nj.ID="editor.contrib.autoFormat",nj);Gae=_Gt([BB(1,Ln),BB(2,xb),BB(3,lM)],Gae);var ij;let Yae=(ij=class{constructor(e,n,i){this.editor=e,this._languageFeaturesService=n,this._instantiationService=i,this._callOnDispose=new Lt,this._callOnModel=new Lt,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(n.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(s6t,this.editor,e,2,Ux.None,er.None,!1).catch(ji))}},ij.ID="editor.contrib.formatOnPaste",ij);Yae=_Gt([BB(1,Ln),BB(2,qn)],Yae);class g2r extends En{constructor(){super({id:"editor.action.formatDocument",label:I("formatDocument.label","Format Document"),alias:"Format Document",precondition:Tt.and(Re.notInCompositeEditor,Re.writable,Re.hasDocumentFormattingProvider),kbOpts:{kbExpr:Re.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(e,n){if(n.hasModel()){const i=e.get(qn);await e.get(oM).showWhile(i.invokeFunction(VTi,n,1,Ux.None,er.None,!0),250)}}}class b2r extends En{constructor(){super({id:"editor.action.formatSelection",label:I("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:Tt.and(Re.writable,Re.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2084),weight:100},contextMenuOpts:{when:Re.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(e,n){if(!n.hasModel())return;const i=e.get(qn),r=n.getModel(),o=n.getSelections().map(a=>a.isEmpty()?new ve(a.startLineNumber,1,a.startLineNumber,r.getLineMaxColumn(a.startLineNumber)):a);await e.get(oM).showWhile(i.invokeFunction(s6t,n,o,1,Ux.None,er.None,!0),250)}}Wr(Gae.ID,Gae,2);Wr(Yae.ID,Yae,2);Ht(g2r);Ht(b2r);Ar.registerCommand("editor.action.format",async t=>{const e=t.get(Yr).getFocusedCodeEditor();if(!e||!e.hasModel())return;const n=t.get(gs);e.getSelection().isEmpty()?await n.executeCommand("editor.action.formatDocument"):await n.executeCommand("editor.action.formatSelection")});var v2r=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},ZSe=function(t,e){return function(n,i){e(n,i,t)}};class A4{remove(){var e;(e=this.parent)==null||e.children.delete(this.id)}static findId(e,n){let i;typeof e=="string"?i=`${n.id}/${e}`:(i=`${n.id}/${e.name}`,n.children.get(i)!==void 0&&(i=`${n.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let r=i;for(let o=0;n.children.get(r)!==void 0;o++)r=`${i}_${o}`;return r}static empty(e){return e.children.size===0}}class VOe extends A4{constructor(e,n,i){super(),this.id=e,this.parent=n,this.symbol=i,this.children=new Map}}class xGt extends A4{constructor(e,n,i,r){super(),this.id=e,this.parent=n,this.label=i,this.order=r,this.children=new Map}}class Y1 extends A4{static create(e,n,i){const r=new oa(i),o=new Y1(n.uri),s=e.ordered(n),a=s.map((c,u)=>{const d=A4.findId(`provider_${u}`,o),h=new xGt(d,o,c.displayName??"Unknown Outline Provider",u);return Promise.resolve(c.provideDocumentSymbols(n,r.token)).then(f=>{for(const m of f||[])Y1._makeOutlineElement(m,h);return h},f=>($a(f),h)).then(f=>{A4.empty(f)?f.remove():o._groups.set(d,f)})}),l=e.onDidChange(()=>{const c=e.ordered(n);Xs(c,s)||r.cancel()});return Promise.all(a).then(()=>r.token.isCancellationRequested&&!i.isCancellationRequested?Y1.create(e,n,i):o._compact()).finally(()=>{r.dispose(),l.dispose(),r.dispose()})}static _makeOutlineElement(e,n){const i=A4.findId(e,n),r=new VOe(i,n,e);if(e.children)for(const o of e.children)Y1._makeOutlineElement(o,r);n.children.set(r.id,r)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[n,i]of this._groups)i.children.size===0?this._groups.delete(n):e+=1;if(e!==1)this.children=this._groups;else{const n=Ir.first(this._groups.values());for(const[,i]of n.children)i.parent=this,this.children.set(i.id,i)}return this}getTopLevelSymbols(){const e=[];for(const n of this.children.values())n instanceof VOe?e.push(n.symbol):e.push(...Ir.map(n.children.values(),i=>i.symbol));return e.sort((n,i)=>ve.compareRangesUsingStarts(n.range,i.range))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),n=[];return Y1._flattenDocumentSymbols(n,e,""),n.sort((i,r)=>ot.compare(ve.getStartPosition(i.range),ve.getStartPosition(r.range))||ot.compare(ve.getEndPosition(r.range),ve.getEndPosition(i.range)))}static _flattenDocumentSymbols(e,n,i){for(const r of n)e.push({kind:r.kind,tags:r.tags,name:r.name,detail:r.detail,containerName:r.containerName||i,range:r.range,selectionRange:r.selectionRange,children:void 0}),r.children&&Y1._flattenDocumentSymbols(e,r.children,r.name)}}const OG=Sr("IOutlineModelService");let BOe=class{constructor(e,n,i){this._languageFeaturesService=e,this._disposables=new Lt,this._cache=new Aw(10,.7),this._debounceInformation=n.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(i.onModelRemoved(r=>{this._cache.delete(r.id)}))}dispose(){this._disposables.dispose()}async getOrCreate(e,n){const i=this._languageFeaturesService.documentSymbolProvider,r=i.ordered(e);let o=this._cache.get(e.id);if(!o||o.versionId!==e.getVersionId()||!Xs(o.provider,r)){const a=new oa;o={versionId:e.getVersionId(),provider:r,promiseCnt:0,source:a,promise:Y1.create(i,e,a.token),model:void 0},this._cache.set(e.id,o);const l=Date.now();o.promise.then(c=>{o.model=c,this._debounceInformation.update(e,Date.now()-l)}).catch(c=>{this._cache.delete(e.id)})}if(o.model)return o.model;o.promiseCnt+=1;const s=n.onCancellationRequested(()=>{--o.promiseCnt===0&&(o.source.cancel(),this._cache.delete(e.id))});try{return await o.promise}finally{s.dispose()}}};BOe=v2r([ZSe(0,Ln),ZSe(1,tg),ZSe(2,Ds)],BOe);Rr(OG,BOe,1);Ar.registerCommand("_executeDocumentSymbolProvider",async function(t,...e){const[n]=e;Gr(ri.isUri(n));const i=t.get(OG),o=await t.get(Rf).createModelReference(n);try{return(await i.getOrCreate(o.object.textEditorModel,er.None)).getTopLevelSymbols()}finally{o.dispose()}});const ax=class ax extends ct{constructor(e,n){super(),this.contextKeyService=e,this.model=n,this.inlineCompletionVisible=ax.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=ax.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=ax.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=ax.suppressSuggestions.bindTo(this.contextKeyService),this._register(ki(i=>{const r=this.model.read(i),o=r==null?void 0:r.state.read(i),s=!!(o!=null&&o.inlineCompletion)&&(o==null?void 0:o.primaryGhostText)!==void 0&&!(o!=null&&o.primaryGhostText.isEmpty());this.inlineCompletionVisible.set(s),o!=null&&o.primaryGhostText&&(o!=null&&o.inlineCompletion)&&this.suppressSuggestions.set(o.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register(ki(i=>{const r=this.model.read(i);let o=!1,s=!0;const a=r==null?void 0:r.primaryGhostText.read(i);if(r!=null&&r.selectedSuggestItem&&a&&a.parts.length>0){const{column:l,lines:c}=a.parts[0],u=c[0],d=r.textModel.getLineIndentColumn(a.lineNumber);if(l<=d){let f=qd(u);f===-1&&(f=u.length-1),o=f>0;const m=r.textModel.getOptions().tabSize;s=Kl.visibleColumnFromColumn(u,f+1,m)<m}}this.inlineCompletionSuggestsIndentation.set(o),this.inlineCompletionSuggestsIndentationLessThanTabSize.set(s)}))}};ax.inlineSuggestionVisible=new gn("inlineSuggestionVisible",!1,I("inlineSuggestionVisible","Whether an inline suggestion is visible")),ax.inlineSuggestionHasIndentation=new gn("inlineSuggestionHasIndentation",!1,I("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace")),ax.inlineSuggestionHasIndentationLessThanTabSize=new gn("inlineSuggestionHasIndentationLessThanTabSize",!0,I("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab")),ax.suppressSuggestions=new gn("inlineSuggestionSuppressSuggestions",void 0,I("suppressSuggestions","Whether suggestions should be suppressed for the current suggestion"));let Em=ax;function y2r(t){const e=new Lt,n=e.add(O4t());return e.add(ki(i=>{n.setStyle(t.read(i))})),e}class $U{constructor(e,n){this.lineNumber=e,this.parts=n}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every((n,i)=>n.equals(e.parts[i]))}renderForScreenReader(e){if(this.parts.length===0)return"";const n=this.parts[this.parts.length-1],i=e.substr(0,n.column-1);return new U8e([...this.parts.map(o=>new dw(ve.fromPositions(new ot(1,o.column)),o.lines.join(`
`)))]).applyToString(i).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}get lineCount(){return 1+this.parts.reduce((e,n)=>e+n.lines.length-1,0)}}class Xae{constructor(e,n,i){this.column=e,this.text=n,this.preview=i,this.lines=Tw(this.text)}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every((n,i)=>n===e.lines[i])}}class zOe{constructor(e,n,i,r=0){this.lineNumber=e,this.columnRange=n,this.text=i,this.additionalReservedLineCount=r,this.parts=[new Xae(this.columnRange.endColumnExclusive,this.text,!1)],this.newLines=Tw(this.text)}renderForScreenReader(e){return this.newLines.join(`
`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every((n,i)=>n===e.newLines[i])&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function n0t(t,e){return Xs(t,e,wGt)}function wGt(t,e){return t===e?!0:!t||!e?!1:t instanceof $U&&e instanceof $U||t instanceof zOe&&e instanceof zOe?t.equals(e):!1}const _2r=[];function x2r(){return _2r}class CGt{constructor(e,n){if(this.startColumn=e,this.endColumnExclusive=n,e>n)throw new co(`startColumn ${e} cannot be after endColumnExclusive ${n}`)}toRange(e){return new ve(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}function SGt(t,e){const n=new Lt,i=t.createDecorationsCollection();return n.add(Oq({debugName:()=>`Apply decorations from ${e.debugName}`},r=>{const o=e.read(r);i.set(o)})),n.add({dispose:()=>{i.clear()}}),n}function w2r(t,e){return new ot(t.lineNumber+e.lineNumber-1,e.lineNumber===1?t.column+e.column-1:e.column)}function i0t(t,e){return new ot(t.lineNumber-e.lineNumber+1,t.lineNumber-e.lineNumber===0?t.column-e.column+1:t.column)}var C2r=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},S2r=function(t,e){return function(n,i){e(n,i,t)}};const r0t="ghost-text";let HOe=class extends ct{constructor(e,n,i){super(),this.editor=e,this.model=n,this.languageService=i,this.isDisposed=lr(this,!1),this.currentTextModel=Oo(this,this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=Vn(this,r=>{if(this.isDisposed.read(r))return;const o=this.currentTextModel.read(r);if(o!==this.model.targetTextModel.read(r))return;const s=this.model.ghostText.read(r);if(!s)return;const a=s instanceof zOe?s.columnRange:void 0,l=[],c=[];function u(p,g){if(c.length>0){const y=c[c.length-1];g&&y.decorations.push(new Sh(y.content.length+1,y.content.length+1+p[0].length,g,0)),y.content+=p[0],p=p.slice(1)}for(const y of p)c.push({content:y,decorations:g?[new Sh(1,y.length+1,g,0)]:[]})}const d=o.getLineContent(s.lineNumber);let h,f=0;for(const p of s.parts){let g=p.lines;h===void 0?(l.push({column:p.column,text:g[0],preview:p.preview}),g=g.slice(1)):u([d.substring(f,p.column-1)],void 0),g.length>0&&(u(g,r0t),h===void 0&&p.column<=d.length&&(h=p.column)),f=p.column-1}h!==void 0&&u([d.substring(f)],void 0);const m=h!==void 0?new CGt(h,d.length+1):void 0;return{replacedRange:a,inlineTexts:l,additionalLines:c,hiddenRange:m,lineNumber:s.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(r),targetTextModel:o}}),this.decorations=Vn(this,r=>{const o=this.uiState.read(r);if(!o)return[];const s=[];o.replacedRange&&s.push({range:o.replacedRange.toRange(o.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),o.hiddenRange&&s.push({range:o.hiddenRange.toRange(o.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const a of o.inlineTexts)s.push({range:ve.fromPositions(new ot(o.lineNumber,a.column)),options:{description:r0t,after:{content:a.text,inlineClassName:a.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:dv.Left},showIfCollapsed:!0}});return s}),this.additionalLinesWidget=this._register(new N2r(this.editor,this.languageService.languageIdCodec,Vn(r=>{const o=this.uiState.read(r);return o?{lineNumber:o.lineNumber,additionalLines:o.additionalLines,minReservedLineCount:o.additionalReservedLineCount,targetTextModel:o.targetTextModel}:void 0}))),this._register(Kn(()=>{this.isDisposed.set(!0,void 0)})),this._register(SGt(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};HOe=C2r([S2r(2,Qs)],HOe);class N2r extends ct{get viewZoneId(){return this._viewZoneId}constructor(e,n,i){super(),this.editor=e,this.languageIdCodec=n,this.lines=i,this._viewZoneId=void 0,this.editorOptionsChanged=Nu("editorOptionChanged",rn.filter(this.editor.onDidChangeConfiguration,r=>r.hasChanged(33)||r.hasChanged(118)||r.hasChanged(100)||r.hasChanged(95)||r.hasChanged(51)||r.hasChanged(50)||r.hasChanged(67))),this._register(ki(r=>{const o=this.lines.read(r);this.editorOptionsChanged.read(r),o?this.updateLines(o.lineNumber,o.additionalLines,o.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,n,i){const r=this.editor.getModel();if(!r)return;const{tabSize:o}=r.getOptions();this.editor.changeViewZones(s=>{this._viewZoneId&&(s.removeZone(this._viewZoneId),this._viewZoneId=void 0);const a=Math.max(n.length,i);if(a>0){const l=document.createElement("div");E2r(l,o,n,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=s.addZone({afterLineNumber:e,heightInLines:a,domNode:l,afterColumnAffinity:1})}})}}function E2r(t,e,n,i,r){const o=i.get(33),s=i.get(118),a="none",l=i.get(95),c=i.get(51),u=i.get(50),d=i.get(67),h=new I6(1e4);h.appendString('<div class="suggest-preview-text">');for(let p=0,g=n.length;p<g;p++){const y=n[p],_=y.content;h.appendString('<div class="view-line'),h.appendString('" style="top:'),h.appendString(String(p*d)),h.appendString('px;width:1000000px;">');const w=gq(_),C=n5(_),N=$u.createEmpty(_,r);wq(new nM(u.isMonospace&&!o,u.canUseHalfwidthRightwardsArrow,_,!1,w,C,0,N,y.decorations,e,0,u.spaceWidth,u.middotWidth,u.wsmiddotWidth,s,a,l,c!==sk.OFF,null),h),h.appendString("</div>")}h.appendString("</div>"),su(t,u);const f=h.build(),m=o0t?o0t.createHTML(f):f;t.innerHTML=m}const o0t=WS("editorGhostText",{createHTML:t=>t});function D2r(t,e){const n=new kjt,i=new Ljt(n,c=>e.getLanguageConfiguration(c)),r=new Mjt(new k2r([t]),i),o=wTe(r,[],void 0,!0);let s="";const a=t.getLineContent();function l(c,u){if(c.kind===2)if(l(c.openingBracket,u),u=Ea(u,c.openingBracket.length),c.child&&(l(c.child,u),u=Ea(u,c.child.length)),c.closingBracket)l(c.closingBracket,u),u=Ea(u,c.closingBracket.length);else{const h=i.getSingleLanguageBracketTokens(c.openingBracket.languageId).findClosingTokenText(c.openingBracket.bracketIds);s+=h}else if(c.kind!==3){if(c.kind===0||c.kind===1)s+=a.substring(u,Ea(u,c.length));else if(c.kind===4)for(const d of c.children)l(d,u),u=Ea(u,d.length)}}return l(o,Nh),s}class k2r{constructor(e){this.lines=e,this.tokenization={getLineTokens:n=>this.lines[n-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}async function NGt(t,e,n,i,r=er.None,o){const s=e instanceof ot?T2r(e,n):e,a=t.all(n),l=new V8e;for(const y of a)y.groupId&&l.add(y.groupId,y);function c(y){if(!y.yieldsToGroupIds)return[];const _=[];for(const w of y.yieldsToGroupIds||[]){const C=l.get(w);for(const N of C)_.push(N)}return _}const u=new Map,d=new Set;function h(y,_){if(_=[..._,y],d.has(y))return _;d.add(y);try{const w=c(y);for(const C of w){const N=h(C,_);if(N)return N}}finally{d.delete(y)}}function f(y){const _=u.get(y);if(_)return _;const w=h(y,[]);w&&$a(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${w.map(N=>N.toString?N.toString():""+N).join(" -> ")}`));const C=new k6;return u.set(y,C.p),(async()=>{var N;if(!w){const E=c(y);for(const D of E){const k=await f(D);if(k&&k.items.length>0)return}}try{return e instanceof ot?await y.provideInlineCompletions(n,e,i,r):await((N=y.provideInlineEdits)==null?void 0:N.call(y,n,e,i,r))}catch(E){$a(E);return}})().then(N=>C.complete(N),N=>C.error(N)),C.p}const m=await Promise.all(a.map(async y=>({provider:y,completions:await f(y)}))),p=new Map,g=[];for(const y of m){const _=y.completions;if(!_)continue;const w=new L2r(_,y.provider);g.push(w);for(const C of _.items){const N=Zae.from(C,w,s,n,o);p.set(N.hash(),N)}}return new M2r(Array.from(p.values()),new Set(p.keys()),g)}class M2r{constructor(e,n,i){this.completions=e,this.hashs=n,this.providerResults=i}has(e){return this.hashs.has(e.hash())}dispose(){for(const e of this.providerResults)e.removeRef()}}class L2r{constructor(e,n){this.inlineCompletions=e,this.provider=n,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}}class Zae{static from(e,n,i,r,o){let s,a,l=e.range?ve.lift(e.range):i;if(typeof e.insertText=="string"){if(s=e.insertText,o&&e.completeBracketPairs){s=s0t(s,l.getStartPosition(),r,o);const c=s.length-e.insertText.length;c!==0&&(l=new ve(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+c))}a=void 0}else if("snippet"in e.insertText){const c=e.insertText.snippet.length;if(o&&e.completeBracketPairs){e.insertText.snippet=s0t(e.insertText.snippet,l.getStartPosition(),r,o);const d=e.insertText.snippet.length-c;d!==0&&(l=new ve(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+d))}const u=new mA().parse(e.insertText.snippet);u.children.length===1&&u.children[0]instanceof lm?(s=u.children[0].value,a=void 0):(s=u.toString(),a={snippet:e.insertText.snippet,range:l})}else Hfe(e.insertText);return new Zae(s,e.command,l,s,a,e.additionalTextEdits||x2r(),e,n)}constructor(e,n,i,r,o,s,a,l){this.filterText=e,this.command=n,this.range=i,this.insertText=r,this.snippetInfo=o,this.additionalTextEdits=s,this.sourceInlineCompletion=a,this.source=l,e=e.replace(/\r\n|\r/g,`
`),r=e.replace(/\r\n|\r/g,`
`)}withRange(e){return new Zae(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}toSingleTextEdit(){return new dw(this.range,this.insertText)}}function T2r(t,e){const n=e.getWordAtPosition(t),i=e.getLineMaxColumn(t.lineNumber);return n?new ve(t.lineNumber,n.startColumn,t.lineNumber,i):ve.fromPositions(t,t.with(void 0,i))}function s0t(t,e,n,i){const o=n.getLineContent(e.lineNumber).substring(0,e.column-1)+t,s=n.tokenization.tokenizeLineWithEdit(e,o.length-(e.column-1),t),a=s==null?void 0:s.sliceAndInflate(e.column-1,o.length,0);return a?D2r(a,i):t}function SI(t,e,n){const i=n?t.range.intersectRanges(n):t.range;if(!i)return t;const r=e.getValueInRange(i,1),o=ck(r,t.text),s=Av.ofText(r.substring(0,o)).addToPosition(t.range.getStartPosition()),a=t.text.substring(o),l=ve.fromPositions(s,t.range.getEndPosition());return new dw(l,a)}function EGt(t,e){return t.text.startsWith(e.text)&&I2r(t.range,e.range)}function a0t(t,e,n,i,r=0){let o=SI(t,e);if(o.range.endLineNumber!==o.range.startLineNumber)return;const s=e.getLineContent(o.range.startLineNumber),a=Zo(s).length;if(o.range.startColumn-1<=a){const m=Zo(o.text).length,p=s.substring(o.range.startColumn-1,a),[g,y]=[o.range.getStartPosition(),o.range.getEndPosition()],_=g.column+p.length<=y.column?g.delta(0,p.length):y,w=ve.fromPositions(_,y),C=o.text.startsWith(p)?o.text.substring(p.length):o.text.substring(m);o=new dw(w,C)}const c=e.getValueInRange(o.range),u=A2r(c,o.text);if(!u)return;const d=o.range.startLineNumber,h=new Array;if(n==="prefix"){const m=u.filter(p=>p.originalLength===0);if(m.length>1||m.length===1&&m[0].originalStart!==c.length)return}const f=o.text.length-r;for(const m of u){const p=o.range.startColumn+m.originalStart+m.originalLength;if(n==="subwordSmart"&&i&&i.lineNumber===o.range.startLineNumber&&p<i.column||m.originalLength>0)return;if(m.modifiedLength===0)continue;const g=m.modifiedStart+m.modifiedLength,y=Math.max(m.modifiedStart,Math.min(g,f)),_=o.text.substring(m.modifiedStart,y),w=o.text.substring(y,Math.max(m.modifiedStart,g));_.length>0&&h.push(new Xae(p,_,!1)),w.length>0&&h.push(new Xae(p,w,!0))}return new $U(d,h)}function I2r(t,e){return e.getStartPosition().equals(t.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(t.getEndPosition())}let W_;function A2r(t,e){if((W_==null?void 0:W_.originalValue)===t&&(W_==null?void 0:W_.newValue)===e)return W_==null?void 0:W_.changes;{let n=c0t(t,e,!0);if(n){const i=l0t(n);if(i>0){const r=c0t(t,e,!1);r&&l0t(r)<i&&(n=r)}}return W_={originalValue:t,newValue:e,changes:n},n}}function l0t(t){let e=0;for(const n of t)e+=n.originalLength;return e}function c0t(t,e,n){if(t.length>5e3||e.length>5e3)return;function i(c){let u=0;for(let d=0,h=c.length;d<h;d++){const f=c.charCodeAt(d);f>u&&(u=f)}return u}const r=Math.max(i(t),i(e));function o(c){if(c<0)throw new Error("unexpected");return r+c+1}function s(c){let u=0,d=0;const h=new Int32Array(c.length);for(let f=0,m=c.length;f<m;f++)if(n&&c[f]==="("){const p=d*100+u;h[f]=o(2*p),u++}else if(n&&c[f]===")"){u=Math.max(u-1,0);const p=d*100+u;h[f]=o(2*p+1),u===0&&d++}else h[f]=c.charCodeAt(f);return h}const a=s(t),l=s(e);return new wx({getElements:()=>a},{getElements:()=>l}).ComputeDiff(!1).changes}var R2r=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},u0t=function(t,e){return function(n,i){e(n,i,t)}};let WOe=class extends ct{constructor(e,n,i,r,o){super(),this.textModel=e,this.versionId=n,this._debounceValue=i,this.languageFeaturesService=r,this.languageConfigurationService=o,this._updateOperation=this._register(new mc),this.inlineCompletions=sW("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=sW("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,n,i){var u,d;const r=new O2r(e,n,this.textModel.getVersionId()),o=n.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if((u=this._updateOperation.value)!=null&&u.request.satisfies(r))return this._updateOperation.value.promise;if((d=o.get())!=null&&d.request.satisfies(r))return Promise.resolve(!0);const s=!!this._updateOperation.value;this._updateOperation.clear();const a=new oa,l=(async()=>{if((s||n.triggerKind===x0.Automatic)&&await P2r(this._debounceValue.get(this.textModel),a.token),a.token.isCancellationRequested||this._store.isDisposed||this.textModel.getVersionId()!==r.versionId)return!1;const f=new Date,m=await NGt(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,n,a.token,this.languageConfigurationService);if(a.token.isCancellationRequested||this._store.isDisposed||this.textModel.getVersionId()!==r.versionId)return!1;const p=new Date;this._debounceValue.update(this.textModel,p.getTime()-f.getTime());const g=new F2r(m,r,this.textModel,this.versionId);if(i){const y=i.toInlineCompletion(void 0);i.canBeReused(this.textModel,e)&&!m.has(y)&&g.prepend(i.inlineCompletion,y.range,!0)}return this._updateOperation.clear(),ma(y=>{o.set(g,y)}),!0})(),c=new j2r(r,a,l);return this._updateOperation.value=c,l}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var n;(n=this._updateOperation.value)!=null&&n.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};WOe=R2r([u0t(3,Ln),u0t(4,bs)],WOe);function P2r(t,e){return new Promise(n=>{let i;const r=setTimeout(()=>{i&&i.dispose(),n()},t);e&&(i=e.onCancellationRequested(()=>{clearTimeout(r),i&&i.dispose(),n()}))})}class O2r{constructor(e,n,i){this.position=e,this.context=n,this.versionId=i}satisfies(e){return this.position.equals(e.position)&&hIe(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,hNi())&&(e.context.triggerKind===x0.Automatic||this.context.triggerKind===x0.Explicit)&&this.versionId===e.versionId}}class j2r{constructor(e,n,i){this.request=e,this.cancellationTokenSource=n,this.promise=i}dispose(){this.cancellationTokenSource.cancel()}}class F2r{get inlineCompletions(){return this._inlineCompletions}constructor(e,n,i,r){this.inlineCompletionProviderResult=e,this.request=n,this._textModel=i,this._versionId=r,this._refCount=1,this._prependedInlineCompletionItems=[];const o=i.deltaDecorations([],e.completions.map(s=>({range:s.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=e.completions.map((s,a)=>new d0t(s,o[a],this._textModel,this._versionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){setTimeout(()=>{this._textModel.isDisposed()||this._textModel.deltaDecorations(this._inlineCompletions.map(e=>e.decorationId),[])},0),this.inlineCompletionProviderResult.dispose();for(const e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,n,i){i&&e.source.addRef();const r=this._textModel.deltaDecorations([],[{range:n,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new d0t(e,r,this._textModel,this._versionId)),this._prependedInlineCompletionItems.push(e)}}class d0t{get forwardStable(){return this.inlineCompletion.source.inlineCompletions.enableForwardStability??!1}constructor(e,n,i,r){this.inlineCompletion=e,this.decorationId=n,this._textModel=i,this._modelVersion=r,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._updatedRange=gp({owner:this,equalsFn:ve.equalsRange},o=>(this._modelVersion.read(o),this._textModel.getDecorationRange(this.decorationId)))}toInlineCompletion(e){return this.inlineCompletion.withRange(this._updatedRange.read(e)??QSe)}toSingleTextEdit(e){return new dw(this._updatedRange.read(e)??QSe,this.inlineCompletion.insertText)}isVisible(e,n,i){const r=SI(this._toFilterTextReplacement(i),e),o=this._updatedRange.read(i);if(!o||!this.inlineCompletion.range.getStartPosition().equals(o.getStartPosition())||n.lineNumber!==r.range.startLineNumber)return!1;const s=e.getValueInRange(r.range,1),a=r.text,l=Math.max(0,n.column-r.range.startColumn);let c=a.substring(0,l),u=a.substring(l),d=s.substring(0,l),h=s.substring(l);const f=e.getLineIndentColumn(r.range.startLineNumber);return r.range.startColumn<=f&&(d=d.trimStart(),d.length===0&&(h=h.trimStart()),c=c.trimStart(),c.length===0&&(u=u.trimStart())),c.startsWith(d)&&!!m5t(h,u)}canBeReused(e,n){const i=this._updatedRange.read(void 0);return!!i&&i.containsPosition(n)&&this.isVisible(e,n,void 0)&&Av.ofRange(i).isGreaterThanOrEqualTo(Av.ofRange(this.inlineCompletion.range))}_toFilterTextReplacement(e){return new dw(this._updatedRange.read(e)??QSe,this.inlineCompletion.filterText)}}const QSe=new ve(1,1,1,1),nr={Visible:_We,HasFocusedSuggestion:new gn("suggestWidgetHasFocusedSuggestion",!1,I("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new gn("suggestWidgetDetailsVisible",!1,I("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new gn("suggestWidgetMultipleSuggestions",!1,I("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new gn("suggestionMakesTextEdit",!0,I("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new gn("acceptSuggestionOnEnter",!0,I("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new gn("suggestionHasInsertAndReplaceRange",!1,I("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new gn("suggestionInsertMode",void 0,{type:"string",description:I("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new gn("suggestionCanResolve",!1,I("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},ND=new Rn("suggestWidgetStatusBar");class $2r{constructor(e,n,i,r){var o;this.position=e,this.completion=n,this.container=i,this.provider=r,this.isInvalid=!1,this.score=N0.Default,this.distance=0,this.textLabel=typeof n.label=="string"?n.label:(o=n.label)==null?void 0:o.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=n.sortText&&n.sortText.toLowerCase(),this.filterTextLow=n.filterText&&n.filterText.toLowerCase(),this.extensionId=n.extensionId,ve.isIRange(n.range)?(this.editStart=new ot(n.range.startLineNumber,n.range.startColumn),this.editInsertEnd=new ot(n.range.endLineNumber,n.range.endColumn),this.editReplaceEnd=new ot(n.range.endLineNumber,n.range.endColumn),this.isInvalid=this.isInvalid||ve.spansMultipleLines(n.range)||n.range.startLineNumber!==e.lineNumber):(this.editStart=new ot(n.range.insert.startLineNumber,n.range.insert.startColumn),this.editInsertEnd=new ot(n.range.insert.endLineNumber,n.range.insert.endColumn),this.editReplaceEnd=new ot(n.range.replace.endLineNumber,n.range.replace.endColumn),this.isInvalid=this.isInvalid||ve.spansMultipleLines(n.range.insert)||ve.spansMultipleLines(n.range.replace)||n.range.insert.startLineNumber!==e.lineNumber||n.range.replace.startLineNumber!==e.lineNumber||n.range.insert.startColumn!==n.range.replace.startColumn),typeof r.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}async resolve(e){if(!this._resolveCache){const n=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),i=new cu(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(r=>{Object.assign(this.completion,r),this._resolveDuration=i.elapsed()},r=>{yb(r)&&(this._resolveCache=void 0,this._resolveDuration=void 0)}).finally(()=>{n.dispose()})}return this._resolveCache}}const Lce=class Lce{constructor(e=2,n=new Set,i=new Set,r=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=n,this.providerFilter=i,this.providerItemsToReuse=r,this.showDeprecated=o}};Lce.default=new Lce;let VU=Lce,V2r;function B2r(){return V2r}class z2r{constructor(e,n,i,r){this.items=e,this.needsClipboard=n,this.durations=i,this.disposable=r}}async function DWe(t,e,n,i=VU.default,r={triggerKind:0},o=er.None){const s=new cu;n=n.clone();const a=e.getWordAtPosition(n),l=a?new ve(n.lineNumber,a.startColumn,n.lineNumber,a.endColumn):ve.fromPositions(n),c={replace:l,insert:l.setEndPosition(n.lineNumber,n.column)},u=[],d=new Lt,h=[];let f=!1;const m=(g,y,_)=>{var C;let w=!1;if(!y)return w;for(const N of y.suggestions)if(!i.kindFilter.has(N.kind)){if(!i.showDeprecated&&((C=N==null?void 0:N.tags)!=null&&C.includes(1)))continue;N.range||(N.range=c),N.sortText||(N.sortText=typeof N.label=="string"?N.label:N.label.label),!f&&N.insertTextRules&&N.insertTextRules&4&&(f=mA.guessNeedsClipboard(N.insertText)),u.push(new $2r(n,N,y,g)),w=!0}return kfe(y)&&d.add(y),h.push({providerName:g._debugDisplayName??"unknown_provider",elapsedProvider:y.duration??-1,elapsedOverall:_.elapsed()}),w},p=(async()=>{})();for(const g of t.orderedGroups(e)){let y=!1;if(await Promise.all(g.map(async _=>{if(i.providerItemsToReuse.has(_)){const w=i.providerItemsToReuse.get(_);w.forEach(C=>u.push(C)),y=y||w.length>0;return}if(!(i.providerFilter.size>0&&!i.providerFilter.has(_)))try{const w=new cu,C=await _.provideCompletionItems(e,n,r,o);y=m(_,C,w)||y}catch(w){$a(w)}})),y||o.isCancellationRequested)break}return await p,o.isCancellationRequested?(d.dispose(),Promise.reject(new Mv)):new z2r(u.sort(U2r(i.snippetSortOrder)),f,{entries:h,elapsed:s.elapsed()},d)}function kWe(t,e){if(t.sortTextLow&&e.sortTextLow){if(t.sortTextLow<e.sortTextLow)return-1;if(t.sortTextLow>e.sortTextLow)return 1}return t.textLabel<e.textLabel?-1:t.textLabel>e.textLabel?1:t.completion.kind-e.completion.kind}function H2r(t,e){if(t.completion.kind!==e.completion.kind){if(t.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return kWe(t,e)}function W2r(t,e){if(t.completion.kind!==e.completion.kind){if(t.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return kWe(t,e)}const Ige=new Map;Ige.set(0,H2r);Ige.set(2,W2r);Ige.set(1,kWe);function U2r(t){return Ige.get(t)}Ar.registerCommand("_executeCompletionItemProvider",async(t,...e)=>{const[n,i,r,o]=e;Gr(ri.isUri(n)),Gr(ot.isIPosition(i)),Gr(typeof r=="string"||!r),Gr(typeof o=="number"||!o);const{completionProvider:s}=t.get(Ln),a=await t.get(Rf).createModelReference(n);try{const l={incomplete:!1,suggestions:[]},c=[],u=a.object.textEditorModel.validatePosition(i),d=await DWe(s,a.object.textEditorModel,u,void 0,{triggerCharacter:r??void 0,triggerKind:r?1:0});for(const h of d.items)c.length<(o??0)&&c.push(h.resolve(er.None)),l.incomplete=l.incomplete||h.container.incomplete,l.suggestions.push(h.completion);try{return await Promise.all(c),l}finally{setTimeout(()=>d.disposable.dispose(),100)}}finally{a.dispose()}});function K2r(t,e){var n;(n=t.getContribution("editor.contrib.suggestController"))==null||n.triggerSuggest(new Set().add(e),void 0,!0)}class R4{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,n){switch(n){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}function h0t(t,e=Fu){return gxi(t,e)?t.charAt(0).toUpperCase()+t.slice(1):t}var q2r=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},G2r=function(t,e){return function(n,i){e(n,i,t)}};class f0t{constructor(e){this._delegates=e}resolve(e){for(const n of this._delegates){const i=n.resolve(e);if(i!==void 0)return i}}}class m0t{constructor(e,n,i,r){this._model=e,this._selection=n,this._selectionIdx=i,this._overtypingCapturer=r}resolve(e){const{name:n}=e;if(n==="SELECTION"||n==="TM_SELECTED_TEXT"){let i=this._model.getValueInRange(this._selection)||void 0,r=this._selection.startLineNumber!==this._selection.endLineNumber;if(!i&&this._overtypingCapturer){const o=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);o&&(i=o.value,r=o.multiline)}if(i&&r&&e.snippet){const o=this._model.getLineContent(this._selection.startLineNumber),s=Zo(o,0,this._selection.startColumn-1);let a=s;e.snippet.walk(c=>c===e?!1:(c instanceof lm&&(a=Zo(Tw(c.value).pop())),!0));const l=ck(a,s);i=i.replace(/(\r\n|\r|\n)(.*)/g,(c,u,d)=>`${u}${a.substr(l)}${d}`)}return i}else{if(n==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(n==="TM_CURRENT_WORD"){const i=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return i&&i.word||void 0}else{if(n==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(n==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(n==="CURSOR_INDEX")return String(this._selectionIdx);if(n==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}class p0t{constructor(e,n){this._labelService=e,this._model=n}resolve(e){const{name:n}=e;if(n==="TM_FILENAME")return pD(this._model.uri.fsPath);if(n==="TM_FILENAME_BASE"){const i=pD(this._model.uri.fsPath),r=i.lastIndexOf(".");return r<=0?i:i.slice(0,r)}else{if(n==="TM_DIRECTORY")return JOt(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(dme(this._model.uri));if(n==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(n==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}class g0t{constructor(e,n,i,r){this._readClipboardText=e,this._selectionIdx=n,this._selectionCount=i,this._spread=r}resolve(e){if(e.name!=="CLIPBOARD")return;const n=this._readClipboardText();if(n){if(this._spread){const i=n.split(/\r\n|\n|\r/).filter(r=>!a4t(r));if(i.length===this._selectionCount)return i[this._selectionIdx]}return n}}}let Qae=class{constructor(e,n,i){this._model=e,this._selection=n,this._languageConfigurationService=i}resolve(e){const{name:n}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),r=this._languageConfigurationService.getLanguageConfiguration(i).comments;if(r){if(n==="LINE_COMMENT")return r.lineCommentToken||void 0;if(n==="BLOCK_COMMENT_START")return r.blockCommentStartToken||void 0;if(n==="BLOCK_COMMENT_END")return r.blockCommentEndToken||void 0}}};Qae=q2r([G2r(2,bs)],Qae);const lx=class lx{constructor(){this._date=new Date}resolve(e){const{name:n}=e;if(n==="CURRENT_YEAR")return String(this._date.getFullYear());if(n==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(n==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(n==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(n==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(n==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(n==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(n==="CURRENT_DAY_NAME")return lx.dayNames[this._date.getDay()];if(n==="CURRENT_DAY_NAME_SHORT")return lx.dayNamesShort[this._date.getDay()];if(n==="CURRENT_MONTH_NAME")return lx.monthNames[this._date.getMonth()];if(n==="CURRENT_MONTH_NAME_SHORT")return lx.monthNamesShort[this._date.getMonth()];if(n==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(n==="CURRENT_TIMEZONE_OFFSET"){const i=this._date.getTimezoneOffset(),r=i>0?"-":"+",o=Math.trunc(Math.abs(i/60)),s=o<10?"0"+o:o,a=Math.abs(i)-o*60,l=a<10?"0"+a:a;return r+s+":"+l}}};lx.dayNames=[I("Sunday","Sunday"),I("Monday","Monday"),I("Tuesday","Tuesday"),I("Wednesday","Wednesday"),I("Thursday","Thursday"),I("Friday","Friday"),I("Saturday","Saturday")],lx.dayNamesShort=[I("SundayShort","Sun"),I("MondayShort","Mon"),I("TuesdayShort","Tue"),I("WednesdayShort","Wed"),I("ThursdayShort","Thu"),I("FridayShort","Fri"),I("SaturdayShort","Sat")],lx.monthNames=[I("January","January"),I("February","February"),I("March","March"),I("April","April"),I("May","May"),I("June","June"),I("July","July"),I("August","August"),I("September","September"),I("October","October"),I("November","November"),I("December","December")],lx.monthNamesShort=[I("JanuaryShort","Jan"),I("FebruaryShort","Feb"),I("MarchShort","Mar"),I("AprilShort","Apr"),I("MayShort","May"),I("JuneShort","Jun"),I("JulyShort","Jul"),I("AugustShort","Aug"),I("SeptemberShort","Sep"),I("OctoberShort","Oct"),I("NovemberShort","Nov"),I("DecemberShort","Dec")];let Jae=lx;class b0t{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const n=BSi(this._workspaceService.getWorkspace());if(!$Si(n)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(n);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(n)}}_resolveWorkspaceName(e){if(iIe(e))return pD(e.uri.path);let n=pD(e.configPath.path);return n.endsWith(rIe)&&(n=n.substr(0,n.length-rIe.length-1)),n}_resoveWorkspacePath(e){if(iIe(e))return h0t(e.uri.fsPath);const n=pD(e.configPath.path);let i=e.configPath.fsPath;return i.endsWith(n)&&(i=i.substr(0,i.length-n.length-1)),i?h0t(i):"/"}}class v0t{resolve(e){const{name:n}=e;if(n==="RANDOM")return Math.random().toString().slice(-6);if(n==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(n==="UUID")return Cge()}}var Y2r=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},X2r=function(t,e){return function(n,i){e(n,i,t)}},Dy;const Yb=class Yb{constructor(e,n,i){this._editor=e,this._snippet=n,this._snippetLineLeadingWhitespace=i,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=wot(n.placeholders,Pg.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations(n=>{for(const i of this._snippet.placeholders){const r=this._snippet.offset(i),o=this._snippet.fullLen(i),s=ve.fromPositions(e.getPositionAt(this._offset+r),e.getPositionAt(this._offset+r+o)),a=i.isFinalTabstop?Yb._decor.inactiveFinal:Yb._decor.inactive,l=n.addDecoration(s,a);this._placeholderDecorations.set(i,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const r=[];for(const o of this._placeholderGroups[this._placeholderGroupsIdx])if(o.transform){const s=this._placeholderDecorations.get(o),a=this._editor.getModel().getDecorationRange(s),l=this._editor.getModel().getValueInRange(a),c=o.transform.resolve(l).split(/\r\n|\r|\n/);for(let u=1;u<c.length;u++)c[u]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+c[u]);r.push(ia.replace(a,c.join(this._editor.getModel().getEOL())))}r.length>0&&this._editor.executeEdits("snippet.placeholderTransform",r)}let n=!1;e===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,n=!0):e===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,n=!0);const i=this._editor.getModel().changeDecorations(r=>{const o=new Set,s=[];for(const a of this._placeholderGroups[this._placeholderGroupsIdx]){const l=this._placeholderDecorations.get(a),c=this._editor.getModel().getDecorationRange(l);s.push(new Pn(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn)),n=n&&this._hasPlaceholderBeenCollapsed(a),r.changeDecorationOptions(l,a.isFinalTabstop?Yb._decor.activeFinal:Yb._decor.active),o.add(a);for(const u of this._snippet.enclosingPlaceholders(a)){const d=this._placeholderDecorations.get(u);r.changeDecorationOptions(d,u.isFinalTabstop?Yb._decor.activeFinal:Yb._decor.active),o.add(u)}}for(const[a,l]of this._placeholderDecorations)o.has(a)||r.changeDecorationOptions(l,a.isFinalTabstop?Yb._decor.inactiveFinal:Yb._decor.inactive);return s});return n?this.move(e):i??[]}_hasPlaceholderBeenCollapsed(e){let n=e;for(;n;){if(n instanceof Pg){const i=this._placeholderDecorations.get(n);if(this._editor.getModel().getDecorationRange(i).isEmpty()&&n.toString().length>0)return!0}n=n.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const n of this._placeholderGroups){let i;for(const r of n){if(r.isFinalTabstop)break;i||(i=[],e.set(r.index,i));const o=this._placeholderDecorations.get(r),s=this._editor.getModel().getDecorationRange(o);if(!s){e.delete(r.index);break}i.push(s)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(e!=null&&e.choice))return;const n=this._placeholderDecorations.get(e);if(!n)return;const i=this._editor.getModel().getDecorationRange(n);if(i)return{range:i,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(n=>(e=n instanceof M$,!e)),e}merge(e){const n=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(i=>{for(const r of this._placeholderGroups[this._placeholderGroupsIdx]){const o=e.shift();console.assert(o._offset!==-1),console.assert(!o._placeholderDecorations);const s=o._snippet.placeholderInfo.last.index;for(const l of o._snippet.placeholderInfo.all)l.isFinalTabstop?l.index=r.index+(s+1)/this._nestingLevel:l.index=r.index+l.index/this._nestingLevel;this._snippet.replace(r,o._snippet.children);const a=this._placeholderDecorations.get(r);i.removeDecoration(a),this._placeholderDecorations.delete(r);for(const l of o._snippet.placeholders){const c=o._snippet.offset(l),u=o._snippet.fullLen(l),d=ve.fromPositions(n.getPositionAt(o._offset+c),n.getPositionAt(o._offset+c+u)),h=i.addDecoration(d,Yb._decor.inactive);this._placeholderDecorations.set(l,h)}}this._placeholderGroups=wot(this._snippet.placeholders,Pg.compareByIndex)})}};Yb._decor={active:Hi.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:Hi.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:Hi.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:Hi.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};let ele=Yb;const y0t={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let tle=Dy=class{static adjustWhitespace(e,n,i,r,o){const s=e.getLineContent(n.lineNumber),a=Zo(s,0,n.column-1);let l;return r.walk(c=>{if(!(c instanceof lm)||c.parent instanceof M$||o&&!o.has(c))return!0;const u=c.value.split(/\r\n|\r|\n/);if(i){const h=r.offset(c);if(h===0)u[0]=e.normalizeIndentation(u[0]);else{l=l??r.toString();const f=l.charCodeAt(h-1);(f===10||f===13)&&(u[0]=e.normalizeIndentation(a+u[0]))}for(let f=1;f<u.length;f++)u[f]=e.normalizeIndentation(a+u[f])}const d=u.join(e.getEOL());return d!==c.value&&(c.parent.replace(c,[new lm(d)]),l=void 0),!0}),a}static adjustSelection(e,n,i,r){if(i!==0||r!==0){const{positionLineNumber:o,positionColumn:s}=n,a=s-i,l=s+r,c=e.validateRange({startLineNumber:o,startColumn:a,endLineNumber:o,endColumn:l});n=Pn.createWithDirection(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn,n.getDirection())}return n}static createEditsAndSnippetsFromSelections(e,n,i,r,o,s,a,l,c){const u=[],d=[];if(!e.hasModel())return{edits:u,snippets:d};const h=e.getModel(),f=e.invokeWithinContext(C=>C.get(Z2)),m=e.invokeWithinContext(C=>new p0t(C.get(g5),h)),p=()=>a,g=h.getValueInRange(Dy.adjustSelection(h,e.getSelection(),i,0)),y=h.getValueInRange(Dy.adjustSelection(h,e.getSelection(),0,r)),_=h.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),w=e.getSelections().map((C,N)=>({selection:C,idx:N})).sort((C,N)=>ve.compareRangesUsingStarts(C.selection,N.selection));for(const{selection:C,idx:N}of w){let E=Dy.adjustSelection(h,C,i,0),D=Dy.adjustSelection(h,C,0,r);g!==h.getValueInRange(E)&&(E=C),y!==h.getValueInRange(D)&&(D=C);const k=C.setStartPosition(E.startLineNumber,E.startColumn).setEndPosition(D.endLineNumber,D.endColumn),M=new mA().parse(n,!0,o),T=k.getStartPosition(),A=Dy.adjustWhitespace(h,T,s||N>0&&_!==h.getLineFirstNonWhitespaceColumn(C.positionLineNumber),M);M.resolveVariables(new f0t([m,new g0t(p,N,w.length,e.getOption(79)==="spread"),new m0t(h,C,N,l),new Qae(h,C,c),new Jae,new b0t(f),new v0t])),u[N]=ia.replace(k,M.toString()),u[N].identifier={major:N,minor:0},u[N]._isTracked=!0,d[N]=new ele(e,M,A)}return{edits:u,snippets:d}}static createEditsAndSnippetsFromEdits(e,n,i,r,o,s,a){if(!e.hasModel()||n.length===0)return{edits:[],snippets:[]};const l=[],c=e.getModel(),u=new mA,d=new MG,h=new f0t([e.invokeWithinContext(m=>new p0t(m.get(g5),c)),new g0t(()=>o,0,e.getSelections().length,e.getOption(79)==="spread"),new m0t(c,e.getSelection(),0,s),new Qae(c,e.getSelection(),a),new Jae,new b0t(e.invokeWithinContext(m=>m.get(Z2))),new v0t]);n=n.sort((m,p)=>ve.compareRangesUsingStarts(m.range,p.range));let f=0;for(let m=0;m<n.length;m++){const{range:p,template:g}=n[m];if(m>0){const N=n[m-1].range,E=ve.fromPositions(N.getEndPosition(),p.getStartPosition()),D=new lm(c.getValueInRange(E));d.appendChild(D),f+=D.value.length}const y=u.parseFragment(g,d);Dy.adjustWhitespace(c,p.getStartPosition(),!0,d,new Set(y)),d.resolveVariables(h);const _=d.toString(),w=_.slice(f);f=_.length;const C=ia.replace(p,w);C.identifier={major:m,minor:0},C._isTracked=!0,l.push(C)}return u.ensureFinalTabstop(d,i,!0),{edits:l,snippets:[new ele(e,d,"")]}}constructor(e,n,i=y0t,r){this._editor=e,this._template=n,this._options=i,this._languageConfigurationService=r,this._templateMerges=[],this._snippets=[]}dispose(){Jo(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:n}=typeof this._template=="string"?Dy.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):Dy.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=n,this._editor.executeEdits("snippet",e,i=>{const r=i.filter(o=>!!o.identifier);for(let o=0;o<n.length;o++)n[o].initialize(r[o].textChange);return this._snippets[0].hasPlaceholder?this._move(!0):r.map(o=>Pn.fromPositions(o.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,n=y0t){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:r}=Dy.createEditsAndSnippetsFromSelections(this._editor,e,n.overwriteBefore,n.overwriteAfter,!0,n.adjustWhitespace,n.clipboardText,n.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",i,o=>{const s=o.filter(l=>!!l.identifier);for(let l=0;l<r.length;l++)r[l].initialize(s[l].textChange);const a=r[0].isTrivialSnippet;if(!a){for(const l of this._snippets)l.merge(r);console.assert(r.length===0)}return this._snippets[0].hasPlaceholder&&!a?this._move(void 0):s.map(l=>Pn.fromPositions(l.range.getEndPosition()))})}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const n=[];for(const i of this._snippets){const r=i.move(e);n.push(...r)}return n}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length<this._snippets.length)return!1;const n=new Map;for(const i of this._snippets){const r=i.computePossibleSelections();if(n.size===0)for(const[o,s]of r){s.sort(ve.compareRangesUsingStarts);for(const a of e)if(s[0].containsRange(a)){n.set(o,[]);break}}if(n.size===0)return!1;n.forEach((o,s)=>{o.push(...r.get(s))})}e.sort(ve.compareRangesUsingStarts);for(const[i,r]of n){if(r.length!==e.length){n.delete(i);continue}r.sort(ve.compareRangesUsingStarts);for(let o=0;o<r.length;o++)if(!r[o].containsRange(e[o])){n.delete(i);continue}}return n.size>0}};tle=Dy=Y2r([X2r(3,bs)],tle);var Z2r=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},WJ=function(t,e){return function(n,i){e(n,i,t)}},zO;const _0t={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};var kx;let Hh=(kx=class{static get(e){return e.getContribution(zO.ID)}constructor(e,n,i,r,o){this._editor=e,this._logService=n,this._languageFeaturesService=i,this._languageConfigurationService=o,this._snippetListener=new Lt,this._modelVersionId=-1,this._inSnippet=zO.InSnippetMode.bindTo(r),this._hasNextTabstop=zO.HasNextTabstop.bindTo(r),this._hasPrevTabstop=zO.HasPrevTabstop.bindTo(r)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)==null||e.dispose(),this._snippetListener.dispose()}insert(e,n){try{this._doInsert(e,typeof n>"u"?_0t:{..._0t,...n})}catch(i){this.cancel(),this._logService.error(i),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(e,n){var i;if(this._editor.hasModel()){if(this._snippetListener.clear(),n.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(Gr(typeof e=="string"),this._session.merge(e,n)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new tle(this._editor,e,n,this._languageConfigurationService),this._session.insert()),n.undoStopAfter&&this._editor.getModel().pushStackElement(),(i=this._session)!=null&&i.hasChoice){const r={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(u,d)=>{if(!this._session||u!==this._editor.getModel()||!ot.equals(this._editor.getPosition(),d))return;const{activeChoice:h}=this._session;if(!h||h.choice.options.length===0)return;const f=u.getValueInRange(h.range),m=!!h.choice.options.find(g=>g.value===f),p=[];for(let g=0;g<h.choice.options.length;g++){const y=h.choice.options[g];p.push({kind:13,label:y.value,insertText:y.value,sortText:"a".repeat(g+1),range:h.range,filterText:m?`${f}_${y.value}`:void 0,command:{id:"jumpToNextSnippetPlaceholder",title:I("next","Go to next placeholder...")}})}return{suggestions:p}}},o=this._editor.getModel();let s,a=!1;const l=()=>{s==null||s.dispose(),a=!1},c=()=>{a||(s=this._languageFeaturesService.completionProvider.register({language:o.getLanguageId(),pattern:o.uri.fsPath,scheme:o.uri.scheme,exclusive:!0},r),this._snippetListener.add(s),a=!0)};this._choiceCompletions={provider:r,enable:c,disable:l}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(r=>r.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){var n;if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{activeChoice:e}=this._session;if(!e||!this._choiceCompletions){(n=this._choiceCompletions)==null||n.disable(),this._currentChoice=void 0;return}this._currentChoice!==e.choice&&(this._currentChoice=e.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{K2r(this._editor,this._choiceCompletions.provider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var n;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(n=this._session)==null||n.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;(e=this._session)==null||e.prev(),this._updateState()}next(){var e;(e=this._session)==null||e.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}},zO=kx,kx.ID="snippetController2",kx.InSnippetMode=new gn("inSnippetMode",!1,I("inSnippetMode","Whether the editor in current in snippet mode")),kx.HasNextTabstop=new gn("hasNextTabstop",!1,I("hasNextTabstop","Whether there is a next tab stop when in snippet mode")),kx.HasPrevTabstop=new gn("hasPrevTabstop",!1,I("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode")),kx);Hh=zO=Z2r([WJ(1,Nd),WJ(2,Ln),WJ(3,vi),WJ(4,bs)],Hh);Wr(Hh.ID,Hh,4);const Age=Zl.bindToContribution(Hh.get);fn(new Age({id:"jumpToNextSnippetPlaceholder",precondition:Tt.and(Hh.InSnippetMode,Hh.HasNextTabstop),handler:t=>t.next(),kbOpts:{weight:130,kbExpr:Re.textInputFocus,primary:2}}));fn(new Age({id:"jumpToPrevSnippetPlaceholder",precondition:Tt.and(Hh.InSnippetMode,Hh.HasPrevTabstop),handler:t=>t.prev(),kbOpts:{weight:130,kbExpr:Re.textInputFocus,primary:1026}}));fn(new Age({id:"leaveSnippet",precondition:Hh.InSnippetMode,handler:t=>t.cancel(!0),kbOpts:{weight:130,kbExpr:Re.textInputFocus,primary:9,secondary:[1033]}}));fn(new Age({id:"acceptSnippet",precondition:Hh.InSnippetMode,handler:t=>t.finish()}));var Q2r=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},JSe=function(t,e){return function(n,i){e(n,i,t)}};let UOe=class extends ct{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,n,i,r,o,s,a,l,c,u,d,h){super(),this.textModel=e,this.selectedSuggestItem=n,this._textModelVersionId=i,this._positions=r,this._debounceValue=o,this._suggestPreviewEnabled=s,this._suggestPreviewMode=a,this._inlineSuggestMode=l,this._enabled=c,this._instantiationService=u,this._commandService=d,this._languageConfigurationService=h,this._source=this._register(this._instantiationService.createInstance(WOe,this.textModel,this._textModelVersionId,this._debounceValue)),this._isActive=lr(this,!1),this._forceUpdateExplicitlySignal=V6(this),this._selectedInlineCompletionId=lr(this,void 0),this._primaryPosition=Vn(this,m=>this._positions.read(m)[0]??new ot(1,1)),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([j1.Redo,j1.Undo,j1.AcceptWord]),this._fetchInlineCompletionsPromise=j5t({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:x0.Automatic}),handleChange:(m,p)=>(m.didChange(this._textModelVersionId)&&this._preserveCurrentCompletionReasons.has(this._getReason(m.change))?p.preserveCurrentCompletion=!0:m.didChange(this._forceUpdateExplicitlySignal)&&(p.inlineCompletionTriggerKind=x0.Explicit),!0)},(m,p)=>{if(this._forceUpdateExplicitlySignal.read(m),!(this._enabled.read(m)&&this.selectedSuggestItem.read(m)||this._isActive.read(m))){this._source.cancelUpdate();return}this._textModelVersionId.read(m);const y=this._source.suggestWidgetInlineCompletions.get(),_=this.selectedSuggestItem.read(m);if(y&&!_){const D=this._source.inlineCompletions.get();ma(k=>{(!D||y.request.versionId>D.request.versionId)&&this._source.inlineCompletions.set(y.clone(),k),this._source.clearSuggestWidgetInlineCompletions(k)})}const w=this._primaryPosition.read(m),C={triggerKind:p.inlineCompletionTriggerKind,selectedSuggestionInfo:_==null?void 0:_.toSelectedSuggestionInfo()},N=this.selectedInlineCompletion.get(),E=p.preserveCurrentCompletion||N!=null&&N.forwardStable?N:void 0;return this._source.fetch(w,C,E)}),this._filteredInlineCompletionItems=gp({owner:this,equalsFn:Bre()},m=>{const p=this._source.inlineCompletions.read(m);if(!p)return[];const g=this._primaryPosition.read(m);return p.inlineCompletions.filter(_=>_.isVisible(this.textModel,g,m))}),this.selectedInlineCompletionIndex=Vn(this,m=>{const p=this._selectedInlineCompletionId.read(m),g=this._filteredInlineCompletionItems.read(m),y=this._selectedInlineCompletionId===void 0?-1:g.findIndex(_=>_.semanticId===p);return y===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):y}),this.selectedInlineCompletion=Vn(this,m=>{const p=this._filteredInlineCompletionItems.read(m),g=this.selectedInlineCompletionIndex.read(m);return p[g]}),this.activeCommands=gp({owner:this,equalsFn:Bre()},m=>{var p;return((p=this.selectedInlineCompletion.read(m))==null?void 0:p.inlineCompletion.source.inlineCompletions.commands)??[]}),this.lastTriggerKind=this._source.inlineCompletions.map(this,m=>m==null?void 0:m.request.context.triggerKind),this.inlineCompletionsCount=Vn(this,m=>{if(this.lastTriggerKind.read(m)===x0.Explicit)return this._filteredInlineCompletionItems.read(m).length}),this.state=gp({owner:this,equalsFn:(m,p)=>!m||!p?m===p:n0t(m.ghostTexts,p.ghostTexts)&&m.inlineCompletion===p.inlineCompletion&&m.suggestItem===p.suggestItem},m=>{const p=this.textModel,g=this.selectedSuggestItem.read(m);if(g){const y=SI(g.toSingleTextEdit(),p),_=this._computeAugmentation(y,m);if(!this._suggestPreviewEnabled.read(m)&&!_)return;const C=(_==null?void 0:_.edit)??y,N=_?_.edit.text.length-y.text.length:0,E=this._suggestPreviewMode.read(m),D=this._positions.read(m),k=[C,...eNe(this.textModel,D,C)],M=k.map((A,R)=>a0t(A,p,E,D[R],N)).filter(zx),T=M[0]??new $U(C.range.endLineNumber,[]);return{edits:k,primaryGhostText:T,ghostTexts:M,inlineCompletion:_==null?void 0:_.completion,suggestItem:g}}else{if(!this._isActive.read(m))return;const y=this.selectedInlineCompletion.read(m);if(!y)return;const _=y.toSingleTextEdit(m),w=this._inlineSuggestMode.read(m),C=this._positions.read(m),N=[_,...eNe(this.textModel,C,_)],E=N.map((D,k)=>a0t(D,p,w,C[k],0)).filter(zx);return E[0]?{edits:N,primaryGhostText:E[0],ghostTexts:E,inlineCompletion:y,suggestItem:void 0}:void 0}}),this.ghostTexts=gp({owner:this,equalsFn:n0t},m=>{const p=this.state.read(m);if(p)return p.ghostTexts}),this.primaryGhostText=gp({owner:this,equalsFn:wGt},m=>{const p=this.state.read(m);if(p)return p==null?void 0:p.primaryGhostText}),this._register(B6(this._fetchInlineCompletionsPromise));let f;this._register(ki(m=>{var y,_;const p=this.state.read(m),g=p==null?void 0:p.inlineCompletion;if((g==null?void 0:g.semanticId)!==(f==null?void 0:f.semanticId)&&(f=g,g)){const w=g.inlineCompletion,C=w.source;(_=(y=C.provider).handleItemDidShow)==null||_.call(y,C.inlineCompletions,w.sourceInlineCompletion,w.insertText)}}))}_getReason(e){return e!=null&&e.isUndoing?j1.Undo:e!=null&&e.isRedoing?j1.Redo:this.isAcceptingPartially?j1.AcceptWord:j1.Other}async trigger(e){this._isActive.set(!0,e),await this._fetchInlineCompletionsPromise.get()}async triggerExplicitly(e){Q2(e,n=>{this._isActive.set(!0,n),this._forceUpdateExplicitlySignal.trigger(n)}),await this._fetchInlineCompletionsPromise.get()}stop(e){Q2(e,n=>{this._isActive.set(!1,n),this._source.clear(n)})}_computeAugmentation(e,n){const i=this.textModel,r=this._source.suggestWidgetInlineCompletions.read(n),o=r?r.inlineCompletions:[this.selectedInlineCompletion.read(n)].filter(zx);return Cpi(o,a=>{let l=a.toSingleTextEdit(n);return l=SI(l,i,ve.fromPositions(l.range.getStartPosition(),e.range.getEndPosition())),EGt(l,e)?{completion:a,edit:l}:void 0})}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const n=this._filteredInlineCompletionItems.get()||[];if(n.length>0){const i=(this.selectedInlineCompletionIndex.get()+e+n.length)%n.length;this._selectedInlineCompletionId.set(n[i].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){var r;if(e.getModel()!==this.textModel)throw new co;const n=this.state.get();if(!n||n.primaryGhostText.isEmpty()||!n.inlineCompletion)return;const i=n.inlineCompletion.toInlineCompletion(void 0);if(i.command&&i.source.addRef(),e.pushUndoStop(),i.snippetInfo)e.executeEdits("inlineSuggestion.accept",[ia.replace(i.range,""),...i.additionalTextEdits]),e.setPosition(i.snippetInfo.range.getStartPosition(),"inlineCompletionAccept"),(r=Hh.get(e))==null||r.insert(i.snippetInfo.snippet,{undoStopBefore:!1});else{const o=n.edits,s=x0t(o).map(a=>Pn.fromPositions(a));e.executeEdits("inlineSuggestion.accept",[...o.map(a=>ia.replace(a.range,a.text)),...i.additionalTextEdits]),e.setSelections(s,"inlineCompletionAccept")}this.stop(),i.command&&(await this._commandService.executeCommand(i.command.id,...i.command.arguments||[]).then(void 0,$a),i.source.removeRef())}async acceptNextWord(e){await this._acceptNext(e,(n,i)=>{const r=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column),o=this._languageConfigurationService.getLanguageConfiguration(r),s=new RegExp(o.wordDefinition.source,o.wordDefinition.flags.replace("g","")),a=i.match(s);let l=0;a&&a.index!==void 0?a.index===0?l=a[0].length:l=a.index:l=i.length;const u=/\s+/g.exec(i);return u&&u.index!==void 0&&u.index+u[0].length<l&&(l=u.index+u[0].length),l},0)}async acceptNextLine(e){await this._acceptNext(e,(n,i)=>{const r=i.match(/\n/);return r&&r.index!==void 0?r.index+1:i.length},1)}async _acceptNext(e,n,i){if(e.getModel()!==this.textModel)throw new co;const r=this.state.get();if(!r||r.primaryGhostText.isEmpty()||!r.inlineCompletion)return;const o=r.primaryGhostText,s=r.inlineCompletion.toInlineCompletion(void 0);if(s.snippetInfo||s.filterText!==s.insertText){await this.accept(e);return}const a=o.parts[0],l=new ot(o.lineNumber,a.column),c=a.text,u=n(l,c);if(u===c.length&&o.parts.length===1){this.accept(e);return}const d=c.substring(0,u),h=this._positions.get(),f=h[0];s.source.addRef();try{this._isAcceptingPartially=!0;try{e.pushUndoStop();const m=ve.fromPositions(f,l),p=e.getModel().getValueInRange(m)+d,g=new dw(m,p),y=[g,...eNe(this.textModel,h,g)],_=x0t(y).map(w=>Pn.fromPositions(w));e.executeEdits("inlineSuggestion.accept",y.map(w=>ia.replace(w.range,w.text))),e.setSelections(_,"inlineCompletionPartialAccept"),e.revealPositionInCenterIfOutsideViewport(e.getPosition(),1)}finally{this._isAcceptingPartially=!1}if(s.source.provider.handlePartialAccept){const m=ve.fromPositions(s.range.getStartPosition(),Av.ofText(d).addToPosition(l)),p=e.getModel().getValueInRange(m,1);s.source.provider.handlePartialAccept(s.source.inlineCompletions,s.sourceInlineCompletion,p.length,{kind:i})}}finally{s.source.removeRef()}}handleSuggestAccepted(e){var o,s;const n=SI(e.toSingleTextEdit(),this.textModel),i=this._computeAugmentation(n,void 0);if(!i)return;const r=i.completion.inlineCompletion;(s=(o=r.source.provider).handlePartialAccept)==null||s.call(o,r.source.inlineCompletions,r.sourceInlineCompletion,n.text.length,{kind:2})}};UOe=Q2r([JSe(9,qn),JSe(10,gs),JSe(11,bs)],UOe);var j1;(function(t){t[t.Undo=0]="Undo",t[t.Redo=1]="Redo",t[t.AcceptWord=2]="AcceptWord",t[t.Other=3]="Other"})(j1||(j1={}));function eNe(t,e,n){if(e.length===1)return[];const i=e[0],r=e.slice(1),o=n.range.getStartPosition(),s=n.range.getEndPosition(),a=t.getValueInRange(ve.fromPositions(i,s)),l=i0t(i,o);if(l.lineNumber<1)return ji(new co(`positionWithinTextEdit line number should be bigger than 0.
			Invalid subtraction between ${i.toString()} and ${o.toString()}`)),[];const c=J2r(n.text,l);return r.map(u=>{const d=w2r(i0t(u,o),s),h=t.getValueInRange(ve.fromPositions(u,d)),f=ck(a,h),m=ve.fromPositions(u,u.delta(0,f));return new dw(m,c)})}function J2r(t,e){let n="";const i=Xdi(t);for(let r=e.lineNumber-1;r<i.length;r++)n+=i[r].substring(r===e.lineNumber-1?e.column-1:0);return n}function x0t(t){const e=Die.createSortPermutation(t,Ah(o=>o.range,ve.compareRangesUsingStarts)),i=new U8e(e.apply(t)).getNewRanges();return e.inverse().apply(i).map(o=>o.getEndPosition())}var eAr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},w0t=function(t,e){return function(n,i){e(n,i,t)}},d9;class MWe{constructor(e){this.name=e}select(e,n,i){if(i.length===0)return 0;const r=i[0].score[0];for(let o=0;o<i.length;o++){const{score:s,completion:a}=i[o];if(s[0]!==r)break;if(a.preselect)return o}return 0}}class C0t extends MWe{constructor(){super("first")}memorize(e,n,i){}toJSON(){}fromJSON(){}}class tAr extends MWe{constructor(){super("recentlyUsed"),this._cache=new Aw(300,.66),this._seq=0}memorize(e,n,i){const r=`${e.getLanguageId()}/${i.textLabel}`;this._cache.set(r,{touch:this._seq++,type:i.completion.kind,insertText:i.completion.insertText})}select(e,n,i){if(i.length===0)return 0;const r=e.getLineContent(n.lineNumber).substr(n.column-10,n.column-1);if(/\s$/.test(r))return super.select(e,n,i);const o=i[0].score[0];let s=-1,a=-1,l=-1;for(let c=0;c<i.length&&i[c].score[0]===o;c++){const u=`${e.getLanguageId()}/${i[c].textLabel}`,d=this._cache.peek(u);if(d&&d.touch>l&&d.type===i[c].completion.kind&&d.insertText===i[c].completion.insertText&&(l=d.touch,a=c),i[c].completion.preselect&&s===-1)return s=c}return a!==-1?a:s!==-1?s:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();const n=0;for(const[i,r]of e)r.touch=n,r.type=typeof r.type=="number"?r.type:yH.fromString(r.type),this._cache.set(i,r);this._seq=this._cache.size}}class nAr extends MWe{constructor(){super("recentlyUsedByPrefix"),this._trie=A3.forStrings(),this._seq=0}memorize(e,n,i){const{word:r}=e.getWordUntilPosition(n),o=`${e.getLanguageId()}/${r}`;this._trie.set(o,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,n,i){const{word:r}=e.getWordUntilPosition(n);if(!r)return super.select(e,n,i);const o=`${e.getLanguageId()}/${r}`;let s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(let a=0;a<i.length;a++){const{kind:l,insertText:c}=i[a].completion;if(l===s.type&&c===s.insertText)return a}return super.select(e,n,i)}toJSON(){const e=[];return this._trie.forEach((n,i)=>e.push([i,n])),e.sort((n,i)=>-(n[1].touch-i[1].touch)).forEach((n,i)=>n[1].touch=i),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[n,i]of e)i.type=typeof i.type=="number"?i.type:yH.fromString(i.type),this._trie.set(n,i)}}}var PD;let KOe=(PD=class{constructor(e,n){this._storageService=e,this._configService=n,this._disposables=new Lt,this._persistSoon=new Wo(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(i=>{i.reason===lW.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,n,i){this._withStrategy(e,n).memorize(e,n,i),this._persistSoon.schedule()}select(e,n,i){return this._withStrategy(e,n).select(e,n,i)}_withStrategy(e,n){var r;const i=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(n.lineNumber,n.column),resource:e.uri});if(((r=this._strategy)==null?void 0:r.name)!==i){this._saveState();const o=d9._strategyCtors.get(i)||C0t;this._strategy=new o;try{const a=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,l=this._storageService.get(`${d9._storagePrefix}/${i}`,a);l&&this._strategy.fromJSON(JSON.parse(l))}catch{}}return this._strategy}_saveState(){if(this._strategy){const n=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=JSON.stringify(this._strategy);this._storageService.store(`${d9._storagePrefix}/${this._strategy.name}`,i,n,1)}}},d9=PD,PD._strategyCtors=new Map([["recentlyUsedByPrefix",nAr],["recentlyUsed",tAr],["first",C0t]]),PD._storagePrefix="suggest/memories",PD);KOe=d9=eAr([w0t(0,Xv),w0t(1,cr)],KOe);const Rge=Sr("ISuggestMemories");Rr(Rge,KOe,1);var iAr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},rAr=function(t,e){return function(n,i){e(n,i,t)}},qOe,e2;let nle=(e2=class{constructor(e,n){this._editor=e,this._enabled=!1,this._ckAtEnd=qOe.AtEnd.bindTo(n),this._configListener=this._editor.onDidChangeConfiguration(i=>i.hasChanged(124)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),(e=this._selectionListener)==null||e.dispose(),this._ckAtEnd.reset()}_update(){const e=this._editor.getOption(124)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){const n=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const i=this._editor.getModel(),r=this._editor.getSelection(),o=i.getWordAtPosition(r.getStartPosition());if(!o){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(o.endColumn===r.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(n),n()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}},qOe=e2,e2.AtEnd=new gn("atEndOfWord",!1),e2);nle=qOe=iAr([rAr(1,vi)],nle);var oAr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},sAr=function(t,e){return function(n,i){e(n,i,t)}},h9,t2;let bF=(t2=class{constructor(e,n){this._editor=e,this._index=0,this._ckOtherSuggestions=h9.OtherSuggestions.bindTo(n)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),(e=this._listener)==null||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:n},i){if(e.items.length===0){this.reset();return}if(h9._moveIndex(!0,e,n)===n){this.reset();return}this._acceptNext=i,this._model=e,this._index=n,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,n,i){let r=i;for(let o=n.items.length;o>0&&(r=(r+n.items.length+(e?1:-1))%n.items.length,!(r===i||!n.items[r].completion.additionalTextEdits));o--);return r}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=h9._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}},h9=t2,t2.OtherSuggestions=new gn("hasOtherSuggestions",!1),t2);bF=h9=oAr([sAr(1,vi)],bF);class aAr{constructor(e,n,i,r){this._disposables=new Lt,this._disposables.add(i.onDidSuggest(o=>{o.completionModel.items.length===0&&this.reset()})),this._disposables.add(i.onDidCancel(o=>{this.reset()})),this._disposables.add(n.onDidShow(()=>this._onItem(n.getFocusedItem()))),this._disposables.add(n.onDidFocus(this._onItem,this)),this._disposables.add(n.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(o=>{if(this._active&&!n.isFrozen()&&i.state!==0){const s=o.charCodeAt(o.length-1);this._active.acceptCharacters.has(s)&&e.getOption(0)&&r(this._active.item)}}))}_onItem(e){if(!e||!md(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;const n=new Jie;for(const i of e.item.completion.commitCharacters)i.length>0&&n.add(i.charCodeAt(0));this._active={acceptCharacters:n,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}const Dg=class Dg{async provideSelectionRanges(e,n){const i=[];for(const r of n){const o=[];i.push(o);const s=new Map;await new Promise(a=>Dg._bracketsRightYield(a,0,e,r,s)),await new Promise(a=>Dg._bracketsLeftYield(a,0,e,r,s,o))}return i}static _bracketsRightYield(e,n,i,r,o){const s=new Map,a=Date.now();for(;;){if(n>=Dg._maxRounds){e();break}if(!r){e();break}const l=i.bracketPairs.findNextBracket(r);if(!l){e();break}if(Date.now()-a>Dg._maxDuration){setTimeout(()=>Dg._bracketsRightYield(e,n+1,i,r,o));break}if(l.bracketInfo.isOpeningBracket){const u=l.bracketInfo.bracketText,d=s.has(u)?s.get(u):0;s.set(u,d+1)}else{const u=l.bracketInfo.getOpeningBrackets()[0].bracketText;let d=s.has(u)?s.get(u):0;if(d-=1,s.set(u,Math.max(0,d)),d<0){let h=o.get(u);h||(h=new Ch,o.set(u,h)),h.push(l.range)}}r=l.range.getEndPosition()}}static _bracketsLeftYield(e,n,i,r,o,s){const a=new Map,l=Date.now();for(;;){if(n>=Dg._maxRounds&&o.size===0){e();break}if(!r){e();break}const c=i.bracketPairs.findPrevBracket(r);if(!c){e();break}if(Date.now()-l>Dg._maxDuration){setTimeout(()=>Dg._bracketsLeftYield(e,n+1,i,r,o,s));break}if(c.bracketInfo.isOpeningBracket){const d=c.bracketInfo.bracketText;let h=a.has(d)?a.get(d):0;if(h-=1,a.set(d,Math.max(0,h)),h<0){const f=o.get(d);if(f){const m=f.shift();f.size===0&&o.delete(d);const p=ve.fromPositions(c.range.getEndPosition(),m.getStartPosition()),g=ve.fromPositions(c.range.getStartPosition(),m.getEndPosition());s.push({range:p}),s.push({range:g}),Dg._addBracketLeading(i,g,s)}}}else{const d=c.bracketInfo.getOpeningBrackets()[0].bracketText,h=a.has(d)?a.get(d):0;a.set(d,h+1)}r=c.range.getStartPosition()}}static _addBracketLeading(e,n,i){if(n.startLineNumber===n.endLineNumber)return;const r=n.startLineNumber,o=e.getLineFirstNonWhitespaceColumn(r);o!==0&&o!==n.startColumn&&(i.push({range:ve.fromPositions(new ot(r,o),n.getEndPosition())}),i.push({range:ve.fromPositions(new ot(r,1),n.getEndPosition())}));const s=r-1;if(s>0){const a=e.getLineFirstNonWhitespaceColumn(s);a===n.startColumn&&a!==e.getLineLastNonWhitespaceColumn(s)&&(i.push({range:ve.fromPositions(new ot(s,a),n.getEndPosition())}),i.push({range:ve.fromPositions(new ot(s,1),n.getEndPosition())}))}}};Dg._maxDuration=30,Dg._maxRounds=2;let ile=Dg;const cx=class cx{static async create(e,n){if(!n.getOption(119).localityBonus||!n.hasModel())return cx.None;const i=n.getModel(),r=n.getPosition();if(!e.canComputeWordRanges(i.uri))return cx.None;const[o]=await new ile().provideSelectionRanges(i,[r]);if(o.length===0)return cx.None;const s=await e.computeWordRanges(i.uri,o[0].range);if(!s)return cx.None;const a=i.getWordUntilPosition(r);return delete s[a.word],new class extends cx{distance(l,c){if(!r.equals(n.getPosition()))return 0;if(c.kind===17)return 2<<20;const u=typeof c.label=="string"?c.label:c.label.label,d=s[u];if(DOt(d))return 2<<20;const h=fH(d,ve.fromPositions(l),ve.compareRangesUsingStarts),f=h>=0?d[h]:d[Math.max(0,~h-1)];let m=o.length;for(const p of o){if(!ve.containsRange(p.range,f))break;m-=1}return m}}}};cx.None=new class extends cx{distance(){return 0}};let rle=cx,S0t=class{constructor(e,n){this.leadingLineContent=e,this.characterCountDelta=n}};class ME{constructor(e,n,i,r,o,s,a=tW.default,l=void 0){this.clipboardText=l,this._snippetCompareFn=ME._compareCompletionItems,this._items=e,this._column=n,this._wordDistance=r,this._options=o,this._refilterKind=1,this._lineContext=i,this._fuzzyScoreOptions=a,s==="top"?this._snippetCompareFn=ME._compareCompletionItemsSnippetsUp:s==="bottom"&&(this._snippetCompareFn=ME._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<e.characterCountDelta&&this._filteredItems?2:1,this._lineContext=e)}get items(){return this._ensureCachedState(),this._filteredItems}getItemsByProvider(){return this._ensureCachedState(),this._itemsByProvider}getIncompleteProvider(){this._ensureCachedState();const e=new Set;for(const[n,i]of this.getItemsByProvider())i.length>0&&i[0].container.incomplete&&e.add(n);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:n,characterCountDelta:i}=this._lineContext;let r="",o="";const s=this._refilterKind===1?this._items:this._filteredItems,a=[],l=!this._options.filterGraceful||s.length>2e3?X2:xCi;for(let c=0;c<s.length;c++){const u=s[c];if(u.isInvalid)continue;const d=this._itemsByProvider.get(u.provider);d?d.push(u):this._itemsByProvider.set(u.provider,[u]);const h=u.position.column-u.editStart.column,f=h+i-(u.position.column-this._column);if(r.length!==f&&(r=f===0?"":n.slice(-f),o=r.toLowerCase()),u.word=r,f===0)u.score=N0.Default;else{let m=0;for(;m<h;){const p=r.charCodeAt(m);if(p===32||p===9)m+=1;else break}if(m>=f)u.score=N0.Default;else if(typeof u.completion.filterText=="string"){const p=l(r,o,m,u.completion.filterText,u.filterTextLow,0,this._fuzzyScoreOptions);if(!p)continue;bLe(u.completion.filterText,u.textLabel)===0?u.score=p:(u.score=bCi(r,o,m,u.textLabel,u.labelLow,0),u.score[0]=p[0])}else{const p=l(r,o,m,u.textLabel,u.labelLow,0,this._fuzzyScoreOptions);if(!p)continue;u.score=p}}u.idx=c,u.distance=this._wordDistance.distance(u.position,u.completion),a.push(u),e.push(u.textLabel.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?uMe(e.length-.85,e,(c,u)=>c-u):0}}static _compareCompletionItems(e,n){return e.score[0]>n.score[0]?-1:e.score[0]<n.score[0]?1:e.distance<n.distance?-1:e.distance>n.distance?1:e.idx<n.idx?-1:e.idx>n.idx?1:0}static _compareCompletionItemsSnippetsDown(e,n){if(e.completion.kind!==n.completion.kind){if(e.completion.kind===27)return 1;if(n.completion.kind===27)return-1}return ME._compareCompletionItems(e,n)}static _compareCompletionItemsSnippetsUp(e,n){if(e.completion.kind!==n.completion.kind){if(e.completion.kind===27)return-1;if(n.completion.kind===27)return 1}return ME._compareCompletionItems(e,n)}}var lAr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},HN=function(t,e){return function(n,i){e(n,i,t)}},GOe;class DL{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const n=e.getModel(),i=e.getPosition();n.tokenization.tokenizeIfCheap(i.lineNumber);const r=n.getWordAtPosition(i);return!(!r||r.endColumn!==i.column&&r.startColumn+1!==i.column||!isNaN(Number(r.word)))}constructor(e,n,i){this.leadingLineContent=e.getLineContent(n.lineNumber).substr(0,n.column-1),this.leadingWord=e.getWordUntilPosition(n),this.lineNumber=n.lineNumber,this.column=n.column,this.triggerOptions=i}}function cAr(t,e,n){if(!e.getContextKeyValue(Em.inlineSuggestionVisible.key))return!0;const i=e.getContextKeyValue(Em.suppressSuggestions.key);return i!==void 0?!i:!t.getOption(62).suppressSuggestions}function uAr(t,e,n){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;const i=e.getContextKeyValue(Em.suppressSuggestions.key);return i!==void 0?!i:!t.getOption(62).suppressSuggestions}let ole=GOe=class{constructor(e,n,i,r,o,s,a,l,c){this._editor=e,this._editorWorkerService=n,this._clipboardService=i,this._telemetryService=r,this._logService=o,this._contextKeyService=s,this._configurationService=a,this._languageFeaturesService=l,this._envService=c,this._toDispose=new Lt,this._triggerCharacterListener=new Lt,this._triggerQuickSuggest=new Gv,this._triggerState=void 0,this._completionDisposables=new Lt,this._onDidCancel=new st,this._onDidTrigger=new st,this._onDidSuggest=new st,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new Pn(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let u=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{u=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{u=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(d=>{u||this._onCursorChange(d)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!u&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){Jo(this._triggerCharacterListener),Jo([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(92)||!this._editor.hasModel()||!this._editor.getOption(122))return;const e=new Map;for(const i of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const r of i.triggerCharacters||[]){let o=e.get(r);o||(o=new Set,o.add(B2r()),e.set(r,o)),o.add(i)}const n=i=>{var s;if(!uAr(this._editor,this._contextKeyService,this._configurationService)||DL.shouldAutoTrigger(this._editor))return;if(!i){const a=this._editor.getPosition();i=this._editor.getModel().getLineContent(a.lineNumber).substr(0,a.column-1)}let r="";z2(i.charCodeAt(i.length-1))?sc(i.charCodeAt(i.length-2))&&(r=i.substr(i.length-2)):r=i.charAt(i.length-1);const o=e.get(r);if(o){const a=new Map;if(this._completionModel)for(const[l,c]of this._completionModel.getItemsByProvider())o.has(l)||a.set(l,c);this.trigger({auto:!0,triggerKind:1,triggerCharacter:r,retrigger:!!this._completionModel,clipboardText:(s=this._completionModel)==null?void 0:s.clipboardText,completionOptions:{providerFilter:o,providerItemsToReuse:a}})}};this._triggerCharacterListener.add(this._editor.onDidType(n)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>n()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var n;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(n=this._requestToken)==null||n.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(e){if(!this._editor.hasModel())return;const n=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&e.reason===0?(n.containsRange(this._currentSelection)||n.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;R4.isAllOff(this._editor.getOption(90))||this._editor.getOption(119).snippetsPreventQuickSuggestions&&((e=Hh.get(this._editor))!=null&&e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!DL.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const n=this._editor.getModel(),i=this._editor.getPosition(),r=this._editor.getOption(90);if(!R4.isAllOff(r)){if(!R4.isAllOn(r)){n.tokenization.tokenizeIfCheap(i.lineNumber);const o=n.tokenization.getLineTokens(i.lineNumber),s=o.getStandardTokenType(o.findTokenIndexAtOffset(Math.max(i.column-1-1,0)));if(R4.valueFor(r,s)!=="on")return}cAr(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(n)&&this.trigger({auto:!0})}},this._editor.getOption(91)))}_refilterCompletionItems(){Gr(this._editor.hasModel()),Gr(this._triggerState!==void 0);const e=this._editor.getModel(),n=this._editor.getPosition(),i=new DL(e,n,{...this._triggerState,refilter:!0});this._onNewContext(i)}trigger(e){var h,f,m;if(!this._editor.hasModel())return;const n=this._editor.getModel(),i=new DL(n,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:e.shy??!1,position:this._editor.getPosition()}),this._context=i;let r={triggerKind:e.triggerKind??0};e.triggerCharacter&&(r={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new oa;const o=this._editor.getOption(113);let s=1;switch(o){case"top":s=0;break;case"bottom":s=2;break}const{itemKind:a,showDeprecated:l}=GOe.createSuggestFilter(this._editor),c=new VU(s,((h=e.completionOptions)==null?void 0:h.kindFilter)??a,(f=e.completionOptions)==null?void 0:f.providerFilter,(m=e.completionOptions)==null?void 0:m.providerItemsToReuse,l),u=rle.create(this._editorWorkerService,this._editor),d=DWe(this._languageFeaturesService.completionProvider,n,this._editor.getPosition(),c,r,this._requestToken.token);Promise.all([d,u]).then(async([p,g])=>{var N;if((N=this._requestToken)==null||N.dispose(),!this._editor.hasModel())return;let y=e==null?void 0:e.clipboardText;if(!y&&p.needsClipboard&&(y=await this._clipboardService.readText()),this._triggerState===void 0)return;const _=this._editor.getModel(),w=new DL(_,this._editor.getPosition(),e),C={...tW.default,firstMatchCanBeWeak:!this._editor.getOption(119).matchOnWordStartOnly};if(this._completionModel=new ME(p.items,this._context.column,{leadingLineContent:w.leadingLineContent,characterCountDelta:w.column-this._context.column},g,this._editor.getOption(119),this._editor.getOption(113),C,y),this._completionDisposables.add(p.disposable),this._onNewContext(w),this._reportDurationsTelemetry(p.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const E of p.items)E.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${E.provider._debugDisplayName}`,E.completion)}).catch(ji)}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static createSuggestFilter(e){const n=new Set;e.getOption(113)==="none"&&n.add(27);const r=e.getOption(119);return r.showMethods||n.add(0),r.showFunctions||n.add(1),r.showConstructors||n.add(2),r.showFields||n.add(3),r.showVariables||n.add(4),r.showClasses||n.add(5),r.showStructs||n.add(6),r.showInterfaces||n.add(7),r.showModules||n.add(8),r.showProperties||n.add(9),r.showEvents||n.add(10),r.showOperators||n.add(11),r.showUnits||n.add(12),r.showValues||n.add(13),r.showConstants||n.add(14),r.showEnums||n.add(15),r.showEnumMembers||n.add(16),r.showKeywords||n.add(17),r.showWords||n.add(18),r.showColors||n.add(19),r.showFiles||n.add(20),r.showReferences||n.add(21),r.showColors||n.add(22),r.showFolders||n.add(23),r.showTypeParameters||n.add(24),r.showSnippets||n.add(27),r.showUsers||n.add(25),r.showIssues||n.add(26),{itemKind:n,showDeprecated:r.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(Zo(e.leadingLineContent)!==Zo(this._context.leadingLineContent)){this.cancel();return}if(e.column<this._context.column){e.leadingWord.word?this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0}):this.cancel();return}if(this._completionModel){if(e.leadingWord.word.length!==0&&e.leadingWord.startColumn>this._context.leadingWord.startColumn){if(DL.shouldAutoTrigger(this._editor)&&this._context){const i=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:i}})}return}if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&e.leadingWord.word.length!==0){const n=new Map,i=new Set;for(const[r,o]of this._completionModel.getItemsByProvider())o.length>0&&o[0].container.incomplete?i.add(r):n.set(r,o);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:i,providerItemsToReuse:n}})}else{const n=this._completionModel.lineContext;let i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){const r=DL.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(r&&this._context.leadingWord.endColumn<e.leadingWord.startColumn){this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0});return}if(this._context.triggerOptions.auto){this.cancel();return}else if(this._completionModel.lineContext=n,i=this._completionModel.items.length>0,i&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:i})}}}}};ole=GOe=lAr([HN(1,xb),HN(2,GS),HN(3,eh),HN(4,Nd),HN(5,vi),HN(6,cr),HN(7,Ln),HN(8,KVe)],ole);const Tce=class Tce{constructor(e,n){this._disposables=new Lt,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType(()=>{if(this._locked||!e.hasModel())return;const i=e.getSelections(),r=i.length;let o=!1;for(let a=0;a<r;a++)if(!i[a].isEmpty()){o=!0;break}if(!o){this._lastOvertyped.length!==0&&(this._lastOvertyped.length=0);return}this._lastOvertyped=[];const s=e.getModel();for(let a=0;a<r;a++){const l=i[a];if(s.getValueLengthInRange(l)>Tce._maxSelectionLength)return;this._lastOvertyped[a]={value:s.getValueInRange(l),multiline:l.startLineNumber!==l.endLineNumber}}})),this._disposables.add(n.onDidTrigger(i=>{this._locked=!0})),this._disposables.add(n.onDidCancel(i=>{this._locked=!1}))}getLastOvertypedInfo(e){if(e>=0&&e<this._lastOvertyped.length)return this._lastOvertyped[e]}dispose(){this._disposables.dispose()}};Tce._maxSelectionLength=51200;let YOe=Tce;var dAr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},tNe=function(t,e){return function(n,i){e(n,i,t)}};let XOe=class{constructor(e,n,i,r,o){this._menuId=n,this._menuService=r,this._contextKeyService=o,this._menuDisposables=new Lt,this.element=jt(e,Xt(".suggest-status-bar"));const s=a=>a instanceof wm?i.createInstance(d7e,a,{useComma:!0}):void 0;this._leftActions=new Ap(this.element,{actionViewItemProvider:s}),this._rightActions=new Ap(this.element,{actionViewItemProvider:s}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),n=()=>{const i=[],r=[];for(const[o,s]of e.getActions())o==="left"?i.push(...s):r.push(...s);this._leftActions.clear(),this._leftActions.push(i),this._rightActions.clear(),this._rightActions.push(r)};this._menuDisposables.add(e.onDidChange(()=>n())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};XOe=dAr([tNe(2,qn),tNe(3,Jp),tNe(4,vi)],XOe);var hAr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},fAr=function(t,e){return function(n,i){e(n,i,t)}};function LWe(t){return!!t&&!!(t.completion.documentation||t.completion.detail&&t.completion.detail!==t.completion.label)}let ZOe=class{constructor(e,n){this._editor=e,this._onDidClose=new st,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new st,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new Lt,this._renderDisposeable=new Lt,this._borderWidth=1,this._size=new Do(330,0),this.domNode=Xt(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=n.createInstance(pS,{editor:e}),this._body=Xt(".body"),this._scrollbar=new Eq(this._body,{alwaysConsumeMouseWheel:!0}),jt(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=jt(this._body,Xt(".header")),this._close=jt(this._header,Xt("span"+ci.asCSSSelector(qt.close))),this._close.title=I("details.close","Close"),this._type=jt(this._header,Xt("p.type")),this._docs=jt(this._body,Xt("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(50)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),n=e.get(50),i=n.getMassagedFontFamily(),r=e.get(120)||n.fontSize,o=e.get(121)||n.lineHeight,s=n.fontWeight,a=`${r}px`,l=`${o}px`;this.domNode.style.fontSize=a,this.domNode.style.lineHeight=`${o/r}`,this.domNode.style.fontWeight=s,this.domNode.style.fontFeatureSettings=n.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=l,this._close.style.width=l}getLayoutInfo(){const e=this._editor.getOption(121)||this._editor.getOption(50).lineHeight,n=this._borderWidth,i=n*2;return{lineHeight:e,borderWidth:n,borderHeight:i,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=I("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,n){var o;this._renderDisposeable.clear();let{detail:i,documentation:r}=e.completion;if(n){let s="";s+=`score: ${e.score[0]}
`,s+=`prefix: ${e.word??"(no prefix)"}
`,s+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}
`,s+=`distance: ${e.distance} (localityBonus-setting)
`,s+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}
`,s+=`commit_chars: ${(o=e.completion.commitCharacters)==null?void 0:o.join("")}
`,r=new rd().appendCodeblock("empty",s),i=`Provider: ${e.provider._debugDisplayName}`}if(!n&&!LWe(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),i){const s=i.length>1e5?`${i.substr(0,1e5)}…`:i;this._type.textContent=s,this._type.title=s,um(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(s))}else ru(this._type),this._type.title="",yh(this._type),this.domNode.classList.add("no-type");if(ru(this._docs),typeof r=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=r;else if(r){this._docs.classList.add("markdown-docs"),ru(this._docs);const s=this._markdownRenderer.render(r);this._docs.appendChild(s.element),this._renderDisposeable.add(s),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=s=>{s.preventDefault(),s.stopPropagation()},this._close.onclick=s=>{s.preventDefault(),s.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get isEmpty(){return this.domNode.classList.contains("no-docs")}get size(){return this._size}layout(e,n){const i=new Do(e,n);Do.equals(i,this._size)||(this._size=i,rfi(this.domNode,e,n)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};ZOe=hAr([fAr(1,qn)],ZOe);class mAr{constructor(e,n){this.widget=e,this._editor=n,this.allowEditorOverflow=!0,this._disposables=new Lt,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new cWe,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let i,r,o=0,s=0;this._disposables.add(this._resizable.onDidWillResize(()=>{i=this._topLeft,r=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(i&&r){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(s=r.width-a.dimension.width,l=!0),a.north&&(o=r.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:i.top+o,left:i.left+s})}a.done&&(i=void 0,r=void 0,o=0,s=0,this._userSize=a.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{this._anchorBox&&this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return this._topLeft?{preference:this._topLeft}:null}show(){this._added||(this._editor.addOverlayWidget(this),this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,n){const i=e.getBoundingClientRect();this._anchorBox=i,this._preferAlignAtTop=n,this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,n)}_placeAtAnchor(e,n,i){const r=hk(this.getDomNode().ownerDocument.body),o=this.widget.getLayoutInfo(),s=new Do(220,2*o.lineHeight),a=e.top,l=function(){const N=r.width-(e.left+e.width+o.borderWidth+o.horizontalPadding),E=-o.borderWidth+e.left+e.width,D=new Do(N,r.height-e.top-o.borderHeight-o.verticalPadding),k=D.with(void 0,e.top+e.height-o.borderHeight-o.verticalPadding);return{top:a,left:E,fit:N-n.width,maxSizeTop:D,maxSizeBottom:k,minSize:s.with(Math.min(N,s.width))}}(),c=function(){const N=e.left-o.borderWidth-o.horizontalPadding,E=Math.max(o.horizontalPadding,e.left-n.width-o.borderWidth),D=new Do(N,r.height-e.top-o.borderHeight-o.verticalPadding),k=D.with(void 0,e.top+e.height-o.borderHeight-o.verticalPadding);return{top:a,left:E,fit:N-n.width,maxSizeTop:D,maxSizeBottom:k,minSize:s.with(Math.min(N,s.width))}}(),u=function(){const N=e.left,E=-o.borderWidth+e.top+e.height,D=new Do(e.width-o.borderHeight,r.height-e.top-e.height-o.verticalPadding);return{top:E,left:N,fit:D.height-n.height,maxSizeBottom:D,maxSizeTop:D,minSize:s.with(D.width)}}(),d=[l,c,u],h=d.find(N=>N.fit>=0)??d.sort((N,E)=>E.fit-N.fit)[0],f=e.top+e.height-o.borderHeight;let m,p=n.height;const g=Math.max(h.maxSizeTop.height,h.maxSizeBottom.height);p>g&&(p=g);let y;i?p<=h.maxSizeTop.height?(m=!0,y=h.maxSizeTop):(m=!1,y=h.maxSizeBottom):p<=h.maxSizeBottom.height?(m=!1,y=h.maxSizeBottom):(m=!0,y=h.maxSizeTop);let{top:_,left:w}=h;!m&&p>e.height&&(_=f-p);const C=this._editor.getDomNode();if(C){const N=C.getBoundingClientRect();_-=N.top,w-=N.left}this._applyTopLeft({left:w,top:_}),this._resizable.enableSashes(!m,h===l,m,h!==l),this._resizable.minSize=h.minSize,this._resizable.maxSize=y,this._resizable.layout(p,Math.min(y.width,n.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this._editor.layoutOverlayWidget(this)}}var Fx;(function(t){t[t.FILE=0]="FILE",t[t.FOLDER=1]="FOLDER",t[t.ROOT_FOLDER=2]="ROOT_FOLDER"})(Fx||(Fx={}));const pAr=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function UJ(t,e,n,i,r){if(ci.isThemeIcon(r))return[`codicon-${r.id}`,"predefined-file-icon"];if(ri.isUri(r))return[];const o=i===Fx.ROOT_FOLDER?["rootfolder-icon"]:i===Fx.FOLDER?["folder-icon"]:["file-icon"];if(n){let s;if(n.scheme===Ti.data)s=bk.parseMetaData(n).get(bk.META_DATA_LABEL);else{const a=n.path.match(pAr);a?(s=KJ(a[2].toLowerCase()),a[1]&&o.push(`${KJ(a[1].toLowerCase())}-name-dir-icon`)):s=KJ(n.authority.toLowerCase())}if(i===Fx.ROOT_FOLDER)o.push(`${s}-root-name-folder-icon`);else if(i===Fx.FOLDER)o.push(`${s}-name-folder-icon`);else{if(s){if(o.push(`${s}-name-file-icon`),o.push("name-file-icon"),s.length<=255){const l=s.split(".");for(let c=1;c<l.length;c++)o.push(`${l.slice(c).join(".")}-ext-file-icon`)}o.push("ext-file-icon")}const a=gAr(t,e,n);a&&o.push(`${KJ(a)}-lang-file-icon`)}}return o}function gAr(t,e,n){if(!n)return null;let i=null;if(n.scheme===Ti.data){const o=bk.parseMetaData(n).get(bk.META_DATA_MIME);o&&(i=e.getLanguageIdByMimeType(o))}else{const r=t.getModel(n);r&&(i=r.getLanguageId())}return i&&i!==Ph?i:e.guessLanguageIdByFilepathOrFirstLine(n)}function KJ(t){return t.replace(/[\x11\x12\x14\x15\x40]/g,"/")}var bAr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},nNe=function(t,e){return function(n,i){e(n,i,t)}};function DGt(t){return`suggest-aria-id:${t}`}const vAr=ks("suggest-more-info",qt.chevronRight,I("suggestMoreInfoIcon","Icon for more information in the suggest widget."));var Zy;const yAr=new(Zy=class{extract(e,n){if(e.textLabel.match(Zy._regexStrict))return n[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(Zy._regexStrict))return n[0]=e.completion.detail,!0;if(e.completion.documentation){const i=typeof e.completion.documentation=="string"?e.completion.documentation:e.completion.documentation.value,r=Zy._regexRelaxed.exec(i);if(r&&(r.index===0||r.index+r[0].length===i.length))return n[0]=r[0],!0}return!1}},Zy._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,Zy._regexStrict=new RegExp(`^${Zy._regexRelaxed.source}$`,"i"),Zy);let QOe=class{constructor(e,n,i,r){this._editor=e,this._modelService=n,this._languageService=i,this._themeService=r,this._onDidToggleDetails=new st,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const n=new Lt,i=e;i.classList.add("show-file-icons");const r=jt(e,Xt(".icon")),o=jt(r,Xt("span.colorspan")),s=jt(e,Xt(".contents")),a=jt(s,Xt(".main")),l=jt(a,Xt(".icon-label.codicon")),c=jt(a,Xt("span.left")),u=jt(a,Xt("span.right")),d=new uoe(c,{supportHighlights:!0,supportIcons:!0});n.add(d);const h=jt(c,Xt("span.signature-label")),f=jt(c,Xt("span.qualifier-label")),m=jt(u,Xt("span.details-label")),p=jt(u,Xt("span.readMore"+ci.asCSSSelector(vAr)));return p.title=I("readMore","Read More"),{root:i,left:c,right:u,icon:r,colorspan:o,iconLabel:d,iconContainer:l,parametersLabel:h,qualifierLabel:f,detailsLabel:m,readMore:p,disposables:n,configureFont:()=>{const y=this._editor.getOptions(),_=y.get(50),w=_.getMassagedFontFamily(),C=_.fontFeatureSettings,N=y.get(120)||_.fontSize,E=y.get(121)||_.lineHeight,D=_.fontWeight,k=_.letterSpacing,M=`${N}px`,T=`${E}px`,A=`${k}px`;i.style.fontSize=M,i.style.fontWeight=D,i.style.letterSpacing=A,a.style.fontFamily=w,a.style.fontFeatureSettings=C,a.style.lineHeight=T,r.style.height=T,r.style.width=T,p.style.height=T,p.style.width=T}}}renderElement(e,n,i){i.configureFont();const{completion:r}=e;i.root.id=DGt(n),i.colorspan.style.backgroundColor="";const o={labelEscapeNewLines:!0,matches:Tq(e.score)},s=[];if(r.kind===19&&yAr.extract(e,s))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=s[0];else if(r.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const a=UJ(this._modelService,this._languageService,ri.from({scheme:"fake",path:e.textLabel}),Fx.FILE),l=UJ(this._modelService,this._languageService,ri.from({scheme:"fake",path:r.detail}),Fx.FILE);o.extraClasses=a.length>l.length?a:l}else r.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",o.extraClasses=[UJ(this._modelService,this._languageService,ri.from({scheme:"fake",path:e.textLabel}),Fx.FOLDER),UJ(this._modelService,this._languageService,ri.from({scheme:"fake",path:r.detail}),Fx.FOLDER)].flat()):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...ci.asClassNameArray(yH.toIcon(r.kind))));r.tags&&r.tags.indexOf(1)>=0&&(o.extraClasses=(o.extraClasses||[]).concat(["deprecated"]),o.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,o),typeof r.label=="string"?(i.parametersLabel.textContent="",i.detailsLabel.textContent=iNe(r.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=iNe(r.label.detail||""),i.detailsLabel.textContent=iNe(r.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(119).showInlineDetails?um(i.detailsLabel):yh(i.detailsLabel),LWe(e)?(i.right.classList.add("can-expand-details"),um(i.readMore),i.readMore.onmousedown=a=>{a.stopPropagation(),a.preventDefault()},i.readMore.onclick=a=>{a.stopPropagation(),a.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),yh(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};QOe=bAr([nNe(1,Ds),nNe(2,Qs),nNe(3,Ql)],QOe);function iNe(t){return t.replace(/\r\n|\r|\n/g,"")}var _Ar=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},qJ=function(t,e){return function(n,i){e(n,i,t)}},HO;Fe("editorSuggestWidget.background",Kg,I("editorSuggestWidgetBackground","Background color of the suggest widget."));Fe("editorSuggestWidget.border",iVe,I("editorSuggestWidgetBorder","Border color of the suggest widget."));const xAr=Fe("editorSuggestWidget.foreground",Rw,I("editorSuggestWidgetForeground","Foreground color of the suggest widget."));Fe("editorSuggestWidget.selectedForeground",VH,I("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));Fe("editorSuggestWidget.selectedIconForeground",uVe,I("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));const wAr=Fe("editorSuggestWidget.selectedBackground",BH,I("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));Fe("editorSuggestWidget.highlightForeground",h4,I("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));Fe("editorSuggestWidget.focusHighlightForeground",yvi,I("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));Fe("editorSuggestWidgetStatus.foreground",rr(xAr,.5),I("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));class CAr{constructor(e,n){this._service=e,this._key=`suggestWidget.size/${n.getEditorType()}/${n instanceof Fv}`}restore(){const e=this._service.get(this._key,0)??"";try{const n=JSON.parse(e);if(Do.is(n))return Do.lift(n)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}var OD;let JOe=(OD=class{constructor(e,n,i,r,o){this.editor=e,this._storageService=n,this._state=0,this._isAuto=!1,this._pendingLayout=new mc,this._pendingShowDetails=new mc,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new Gv,this._disposables=new Lt,this._onDidSelect=new V2,this._onDidFocus=new V2,this._onDidHide=new st,this._onDidShow=new st,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new st,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new cWe,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new SAr(this,e),this._persistedSize=new CAr(n,e);class s{constructor(f,m,p=!1,g=!1){this.persistedSize=f,this.currentSize=m,this.persistHeight=p,this.persistWidth=g}}let a;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),a=new s(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(h=>{var f,m;if(this._resize(h.dimension.width,h.dimension.height),a&&(a.persistHeight=a.persistHeight||!!h.north||!!h.south,a.persistWidth=a.persistWidth||!!h.east||!!h.west),!!h.done){if(a){const{itemHeight:p,defaultSize:g}=this.getLayoutInfo(),y=Math.round(p/2);let{width:_,height:w}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-w)<=y)&&(w=((f=a.persistedSize)==null?void 0:f.height)??g.height),(!a.persistWidth||Math.abs(a.currentSize.width-_)<=y)&&(_=((m=a.persistedSize)==null?void 0:m.width)??g.width),this._persistedSize.store(new Do(_,w))}this._contentWidget.unlockPreference(),a=void 0}})),this._messageElement=jt(this.element.domNode,Xt(".message")),this._listElement=jt(this.element.domNode,Xt(".tree"));const l=this._disposables.add(o.createInstance(ZOe,this.editor));l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new mAr(l,this.editor);const c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(119).showIcons);c();const u=o.createInstance(QOe,this.editor);this._disposables.add(u),this._disposables.add(u.onDidToggleDetails(()=>this.toggleDetails())),this._list=new ng("SuggestWidget",this._listElement,{getHeight:h=>this.getLayoutInfo().itemHeight,getTemplateId:h=>"suggestion"},[u],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>I("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:h=>{let f=h.textLabel;if(typeof h.completion.label!="string"){const{detail:y,description:_}=h.completion.label;y&&_?f=I("label.full","{0} {1}, {2}",f,y,_):y?f=I("label.detail","{0} {1}",f,y):_&&(f=I("label.desc","{0}, {1}",f,_))}if(!h.isResolved||!this._isDetailsVisible())return f;const{documentation:m,detail:p}=h.completion,g=B2("{0}{1}",p||"",m?typeof m=="string"?m:m.value:"");return I("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",f,g)}}}),this._list.style(iR({listInactiveFocusBackground:wAr,listInactiveFocusOutline:Bs})),this._status=o.createInstance(XOe,this.element.domNode,ND);const d=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(119).showStatusBar);d(),this._disposables.add(r.onDidColorThemeChange(h=>this._onThemeChange(h))),this._onThemeChange(r.getColorTheme()),this._disposables.add(this._list.onMouseDown(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onTap(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onDidChangeSelection(h=>this._onListSelection(h))),this._disposables.add(this._list.onDidChangeFocus(h=>this._onListFocus(h))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(h=>{h.hasChanged(119)&&(d(),c()),this._completionModel&&(h.hasChanged(50)||h.hasChanged(120)||h.hasChanged(121))&&this._list.splice(0,this._list.length,this._completionModel.items)})),this._ctxSuggestWidgetVisible=nr.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=nr.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=nr.MultipleSuggestions.bindTo(i),this._ctxSuggestWidgetHasFocusedSuggestion=nr.HasFocusedSuggestion.bindTo(i),this._disposables.add(Fa(this._details.widget.domNode,"keydown",h=>{this._onDetailsKeydown.fire(h)})),this._disposables.add(this.editor.onMouseDown(h=>this._onEditorMouseDown(h)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(e=this._loadingTimeout)==null||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element>"u"||typeof e.index>"u"||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,n){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:n,model:i}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=S0(e.type)?2:1}_onListFocus(e){var r;if(this._ignoreFocusEvents)return;if(!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const n=e.elements[0],i=e.indexes[0];n!==this._focusedItem&&((r=this._currentSuggestionDetails)==null||r.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=n,this._list.reveal(i),this._currentSuggestionDetails=cc(async o=>{const s=dk(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),a=o.onCancellationRequested(()=>s.dispose());try{return await n.resolve(o)}finally{s.dispose(),a.dispose()}}),this._currentSuggestionDetails.then(()=>{i>=this._list.length||n!==this._list.element(i)||(this._ignoreFocusEvents=!0,this._list.splice(i,1,[n]),this._list.setFocus([i]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:DGt(i)}))}).catch(ji)),this._onDidFocus.fire({item:n,index:i,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",e===4),this.element.domNode.classList.remove("message"),e){case 0:yh(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=HO.LOADING_MESSAGE,yh(this._listElement,this._status.element),um(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,hw(HO.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=HO.NO_SUGGESTIONS_MESSAGE,yh(this._listElement,this._status.element),um(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,hw(HO.NO_SUGGESTIONS_MESSAGE);break;case 3:yh(this._messageElement),um(this._listElement,this._status.element),this._show();break;case 4:yh(this._messageElement),um(this._listElement,this._status.element),this._show();break;case 5:yh(this._messageElement),um(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,n){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=dk(()=>this._setState(1),n)))}showSuggestions(e,n,i,r,o){var l,c;if(this._contentWidget.setPosition(this.editor.getPosition()),(l=this._loadingTimeout)==null||l.dispose(),(c=this._currentSuggestionDetails)==null||c.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&this._state!==2&&this._state!==0){this._setState(4);return}const s=this._completionModel.items.length,a=s===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(s>1),a){this._setState(r?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(n,0),this._list.setFocus(o?[]:[n])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=Wie(ei(this.element.domNode),()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(LWe(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=Wie(ei(this.element.domNode),()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._details.widget.isEmpty?this._details.hide():(this._positionDetails(),this.element.domNode.classList.add("shows-details")),this.editor.focus()})}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var i;this._pendingLayout.clear(),this._pendingShowDetails.clear(),(i=this._loadingTimeout)==null||i.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const e=this._persistedSize.restore(),n=Math.ceil(this.getLayoutInfo().itemHeight*4.3);e&&e.height<n&&this._persistedSize.store(e.with(void 0,n))}isFrozen(){return this._state===4}_afterRender(e){if(e===null){this._isDetailsVisible()&&this._details.hide();return}this._state===2||this._state===1||(this._isDetailsVisible()&&!this._details.widget.isEmpty&&this._details.show(),this._positionDetails())}_layout(e){var s,a;if(!this.editor.hasModel()||!this.editor.getDomNode())return;const n=hk(this.element.domNode.ownerDocument.body),i=this.getLayoutInfo();e||(e=i.defaultSize);let r=e.height,o=e.width;if(this._status.element.style.height=`${i.itemHeight}px`,this._state===2||this._state===1)r=i.itemHeight+i.borderHeight,o=i.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new Do(o,r),this._contentWidget.setPreference(2);else{const l=n.width-i.borderHeight-2*i.horizontalPadding;o>l&&(o=l);const c=this._completionModel?this._completionModel.stats.pLabelLen*i.typicalHalfwidthCharacterWidth:o,u=i.statusBarHeight+this._list.contentHeight+i.borderHeight,d=i.itemHeight+i.statusBarHeight,h=Ga(this.editor.getDomNode()),f=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),m=h.top+f.top+f.height,p=Math.min(n.height-m-i.verticalPadding,u),g=h.top+f.top-i.verticalPadding,y=Math.min(g,u);let _=Math.min(Math.max(y,p)+i.borderHeight,u);r===((s=this._cappedHeight)==null?void 0:s.capped)&&(r=this._cappedHeight.wanted),r<d&&(r=d),r>_&&(r=_),r>p||this._forceRenderingAbove&&g>150?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),_=y):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),_=p),this.element.preferredSize=new Do(c,i.defaultSize.height),this.element.maxSize=new Do(l,_),this.element.minSize=new Do(220,d),this._cappedHeight=r===u?{wanted:((a=this._cappedHeight)==null?void 0:a.wanted)??e.height,capped:r}:void 0}this._resize(o,r)}_resize(e,n){const{width:i,height:r}=this.element.maxSize;e=Math.min(i,e),n=Math.min(r,n);const{statusBarHeight:o}=this.getLayoutInfo();this._list.layout(n-o,e),this._listElement.style.height=`${n-o}px`,this.element.layout(n,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((e=this._contentWidget.getPosition())==null?void 0:e.preference[0])===2)}getLayoutInfo(){const e=this.editor.getOption(50),n=bh(this.editor.getOption(121)||e.lineHeight,8,1e3),i=!this.editor.getOption(119).showStatusBar||this._state===2||this._state===1?0:n,r=this._details.widget.borderWidth,o=2*r;return{itemHeight:n,statusBarHeight:i,borderWidth:r,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new Do(430,i+12*n+o)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}},HO=OD,OD.LOADING_MESSAGE=I("suggestWidget.loading","Loading..."),OD.NO_SUGGESTIONS_MESSAGE=I("suggestWidget.noSuggestions","No suggestions."),OD);JOe=HO=_Ar([qJ(1,Xv),qJ(2,vi),qJ(3,Ql),qJ(4,qn)],JOe);class SAr{constructor(e,n){this._widget=e,this._editor=n,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:e,width:n}=this._widget.element.size,{borderWidth:i,horizontalPadding:r}=this._widget.getLayoutInfo();return new Do(n+2*i+r,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var NAr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},yO=function(t,e){return function(n,i){e(n,i,t)}},e4e;class EAr{constructor(e,n){if(this._model=e,this._position=n,this._decorationOptions=Hi.register({description:"suggest-line-suffix",stickiness:1}),e.getLineMaxColumn(n.lineNumber)!==n.column){const r=e.getOffsetAt(n),o=e.getPositionAt(r+1);e.changeDecorations(s=>{this._marker&&s.removeDecoration(this._marker),this._marker=s.addDecoration(ve.fromPositions(n,o),this._decorationOptions)})}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.changeDecorations(e=>{e.removeDecoration(this._marker),this._marker=void 0})}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const n=this._model.getDecorationRange(this._marker);return this._model.getOffsetAt(n.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}}var n2;let mv=(n2=class{static get(e){return e.getContribution(e4e.ID)}constructor(e,n,i,r,o,s,a){this._memoryService=n,this._commandService=i,this._contextKeyService=r,this._instantiationService=o,this._logService=s,this._telemetryService=a,this._lineSuffix=new mc,this._toDispose=new Lt,this._selectors=new DAr(d=>d.priority),this._onWillInsertSuggestItem=new st,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=o.createInstance(ole,this.editor),this._selectors.register({priority:0,select:(d,h,f)=>this._memoryService.select(d,h,f)});const l=nr.InsertMode.bindTo(r);l.set(e.getOption(119).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>l.set(e.getOption(119).insertMode))),this.widget=this._toDispose.add(new kwe(ei(e.getDomNode()),()=>{const d=this._instantiationService.createInstance(JOe,this.editor);this._toDispose.add(d),this._toDispose.add(d.onDidSelect(g=>this._insertSuggestion(g,0),this));const h=new aAr(this.editor,d,this.model,g=>this._insertSuggestion(g,2));this._toDispose.add(h);const f=nr.MakesTextEdit.bindTo(this._contextKeyService),m=nr.HasInsertAndReplaceRange.bindTo(this._contextKeyService),p=nr.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(Kn(()=>{f.reset(),m.reset(),p.reset()})),this._toDispose.add(d.onDidFocus(({item:g})=>{const y=this.editor.getPosition(),_=g.editStart.column,w=y.column;let C=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!g.completion.additionalTextEdits&&!(g.completion.insertTextRules&4)&&w-_===g.completion.insertText.length&&(C=this.editor.getModel().getValueInRange({startLineNumber:y.lineNumber,startColumn:_,endLineNumber:y.lineNumber,endColumn:w})!==g.completion.insertText),f.set(C),m.set(!ot.equals(g.editInsertEnd,g.editReplaceEnd)),p.set(!!g.provider.resolveCompletionItem||!!g.completion.documentation||g.completion.detail!==g.completion.label)})),this._toDispose.add(d.onDetailsKeyDown(g=>{if(g.toKeyCodeChord().equals(new hS(!0,!1,!1,!1,33))||xr&&g.toKeyCodeChord().equals(new hS(!1,!1,!1,!0,33))){g.stopPropagation();return}g.toKeyCodeChord().isModifierKey()||this.editor.focus()})),d})),this._overtypingCapturer=this._toDispose.add(new kwe(ei(e.getDomNode()),()=>this._toDispose.add(new YOe(this.editor,this.model)))),this._alternatives=this._toDispose.add(new kwe(ei(e.getDomNode()),()=>this._toDispose.add(new bF(this.editor,this._contextKeyService)))),this._toDispose.add(o.createInstance(nle,e)),this._toDispose.add(this.model.onDidTrigger(d=>{this.widget.value.showTriggered(d.auto,d.shy?250:50),this._lineSuffix.value=new EAr(this.editor.getModel(),d.position)})),this._toDispose.add(this.model.onDidSuggest(d=>{if(d.triggerOptions.shy)return;let h=-1;for(const m of this._selectors.itemsOrderedByPriorityDesc)if(h=m.select(this.editor.getModel(),this.editor.getPosition(),d.completionModel.items),h!==-1)break;if(h===-1&&(h=0),this.model.state===0)return;let f=!1;if(d.triggerOptions.auto){const m=this.editor.getOption(119);m.selectionMode==="never"||m.selectionMode==="always"?f=m.selectionMode==="never":m.selectionMode==="whenTriggerCharacter"?f=d.triggerOptions.triggerKind!==1:m.selectionMode==="whenQuickSuggestion"&&(f=d.triggerOptions.triggerKind===1&&!d.triggerOptions.refilter)}this.widget.value.showSuggestions(d.completionModel,h,d.isFrozen,d.triggerOptions.auto,f)})),this._toDispose.add(this.model.onDidCancel(d=>{d.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{this.model.cancel(),this.model.clear()}));const c=nr.AcceptSuggestionsOnEnter.bindTo(r),u=()=>{const d=this.editor.getOption(1);c.set(d==="on"||d==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>u())),u()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,n){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const i=Hh.get(this.editor);if(!i)return;this._onWillInsertSuggestItem.fire({item:e.item});const r=this.editor.getModel(),o=r.getAlternativeVersionId(),{item:s}=e,a=[],l=new oa;n&1||this.editor.pushUndoStop();const c=this.getOverwriteInfo(s,!!(n&8));this._memoryService.memorize(r,this.editor.getPosition(),s);const u=s.isResolved;let d=-1,h=-1;if(Array.isArray(s.completion.additionalTextEdits)){this.model.cancel();const m=J0.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map(p=>{let g=ve.lift(p.range);if(g.startLineNumber===s.position.lineNumber&&g.startColumn>s.position.column){const y=this.editor.getPosition().column-s.position.column,_=y,w=ve.spansMultipleLines(g)?0:y;g=new ve(g.startLineNumber,g.startColumn+_,g.endLineNumber,g.endColumn+w)}return ia.replaceMove(g,p.text)})),m.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!u){const m=new cu;let p;const g=r.onDidChangeContent(C=>{if(C.isFlush){l.cancel(),g.dispose();return}for(const N of C.changes){const E=ve.getEndPosition(N.range);(!p||ot.isBefore(E,p))&&(p=E)}}),y=n;n|=2;let _=!1;const w=this.editor.onWillType(()=>{w.dispose(),_=!0,y&2||this.editor.pushUndoStop()});a.push(s.resolve(l.token).then(()=>{if(!s.completion.additionalTextEdits||l.token.isCancellationRequested)return;if(p&&s.completion.additionalTextEdits.some(N=>ot.isBefore(p,ve.getStartPosition(N.range))))return!1;_&&this.editor.pushUndoStop();const C=J0.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map(N=>ia.replaceMove(ve.lift(N.range),N.text))),C.restoreRelativeVerticalPositionOfCursor(this.editor),(_||!(y&2))&&this.editor.pushUndoStop(),!0}).then(C=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",m.elapsed(),C),h=C===!0?1:C===!1?0:-2}).finally(()=>{g.dispose(),w.dispose()}))}let{insertText:f}=s.completion;if(s.completion.insertTextRules&4||(f=mA.escape(f)),this.model.cancel(),i.insert(f,{overwriteBefore:c.overwriteBefore,overwriteAfter:c.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(s.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),n&2||this.editor.pushUndoStop(),s.completion.command)if(s.completion.command.id===sle.id)this.model.trigger({auto:!0,retrigger:!0});else{const m=new cu;a.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch(p=>{s.completion.extensionId?$a(p):ji(p)}).finally(()=>{d=m.elapsed()}))}n&4&&this._alternatives.value.set(e,m=>{for(l.cancel();r.canUndo();){o!==r.getAlternativeVersionId()&&r.undo(),this._insertSuggestion(m,3|(n&8?8:0));break}}),this._alertCompletionItem(s),Promise.all(a).finally(()=>{this._reportSuggestionAcceptedTelemetry(s,r,u,d,h),this.model.clear(),l.dispose()})}_reportSuggestionAcceptedTelemetry(e,n,i,r,o){var s;Math.floor(Math.random()*100)!==0&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:((s=e.extensionId)==null?void 0:s.value)??"unknown",providerId:e.provider._debugDisplayName??"unknown",kind:e.completion.kind,basenameHash:Lfe(cb(n.uri)).toString(16),languageId:n.getLanguageId(),fileExtension:yxi(n.uri),resolveInfo:e.provider.resolveCompletionItem?i?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:r,additionalEditsAsync:o})}getOverwriteInfo(e,n){Gr(this.editor.hasModel());let i=this.editor.getOption(119).insertMode==="replace";n&&(i=!i);const r=e.position.column-e.editStart.column,o=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,s=this.editor.getPosition().column-e.position.column,a=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:r+s,overwriteAfter:o+a}}_alertCompletionItem(e){if(md(e.completion.additionalTextEdits)){const n=I("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);Am(n)}}triggerSuggest(e,n,i){this.editor.hasModel()&&(this.model.trigger({auto:n??!1,completionOptions:{providerFilter:e,kindFilter:i?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const n=this.editor.getPosition(),i=()=>{n.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},r=o=>{if(o.completion.insertTextRules&4||o.completion.additionalTextEdits)return!0;const s=this.editor.getPosition(),a=o.editStart.column,l=s.column;return l-a!==o.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:s.lineNumber,startColumn:a,endLineNumber:s.lineNumber,endColumn:l})!==o.completion.insertText};rn.once(this.model.onDidTrigger)(o=>{const s=[];rn.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{Jo(s),i()},void 0,s),this.model.onDidSuggest(({completionModel:a})=>{if(Jo(s),a.items.length===0){i();return}const l=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),a.items),c=a.items[l];if(!r(c)){i();return}this.editor.pushUndoStop(),this._insertSuggestion({index:l,item:c,model:a},7)},void 0,s)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(n,0),this.editor.focus()}acceptSelectedSuggestion(e,n){const i=this.widget.value.getFocusedItem();let r=0;e&&(r|=4),n&&(r|=8),this._insertSuggestion(i,r)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}},e4e=n2,n2.ID="editor.contrib.suggestController",n2);mv=e4e=NAr([yO(1,Rge),yO(2,gs),yO(3,vi),yO(4,qn),yO(5,Nd),yO(6,eh)],mv);class DAr{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((n,i)=>this.prioritySelector(i)-this.prioritySelector(n)),{dispose:()=>{const n=this._items.indexOf(e);n>=0&&this._items.splice(n,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}const Ice=class Ice extends En{constructor(){super({id:Ice.id,label:I("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:Tt.and(Re.writable,Re.hasCompletionItemProvider,nr.Visible.toNegated()),kbOpts:{kbExpr:Re.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,n,i){const r=mv.get(n);if(!r)return;let o;i&&typeof i=="object"&&i.auto===!0&&(o=!0),r.triggerSuggest(void 0,o,void 0)}};Ice.id="editor.action.triggerSuggest";let sle=Ice;Wr(mv.ID,mv,2);Ht(sle);const qp=190,Zh=Zl.bindToContribution(mv.get);fn(new Zh({id:"acceptSelectedSuggestion",precondition:Tt.and(nr.Visible,nr.HasFocusedSuggestion),handler(t){t.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:Tt.and(nr.Visible,Re.textInputFocus),weight:qp},{primary:3,kbExpr:Tt.and(nr.Visible,Re.textInputFocus,nr.AcceptSuggestionsOnEnter,nr.MakesTextEdit),weight:qp}],menuOpts:[{menuId:ND,title:I("accept.insert","Insert"),group:"left",order:1,when:nr.HasInsertAndReplaceRange.toNegated()},{menuId:ND,title:I("accept.insert","Insert"),group:"left",order:1,when:Tt.and(nr.HasInsertAndReplaceRange,nr.InsertMode.isEqualTo("insert"))},{menuId:ND,title:I("accept.replace","Replace"),group:"left",order:1,when:Tt.and(nr.HasInsertAndReplaceRange,nr.InsertMode.isEqualTo("replace"))}]}));fn(new Zh({id:"acceptAlternativeSelectedSuggestion",precondition:Tt.and(nr.Visible,Re.textInputFocus,nr.HasFocusedSuggestion),kbOpts:{weight:qp,kbExpr:Re.textInputFocus,primary:1027,secondary:[1026]},handler(t){t.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:ND,group:"left",order:2,when:Tt.and(nr.HasInsertAndReplaceRange,nr.InsertMode.isEqualTo("insert")),title:I("accept.replace","Replace")},{menuId:ND,group:"left",order:2,when:Tt.and(nr.HasInsertAndReplaceRange,nr.InsertMode.isEqualTo("replace")),title:I("accept.insert","Insert")}]}));Ar.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");fn(new Zh({id:"hideSuggestWidget",precondition:nr.Visible,handler:t=>t.cancelSuggestWidget(),kbOpts:{weight:qp,kbExpr:Re.textInputFocus,primary:9,secondary:[1033]}}));fn(new Zh({id:"selectNextSuggestion",precondition:Tt.and(nr.Visible,Tt.or(nr.MultipleSuggestions,nr.HasFocusedSuggestion.negate())),handler:t=>t.selectNextSuggestion(),kbOpts:{weight:qp,kbExpr:Re.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));fn(new Zh({id:"selectNextPageSuggestion",precondition:Tt.and(nr.Visible,Tt.or(nr.MultipleSuggestions,nr.HasFocusedSuggestion.negate())),handler:t=>t.selectNextPageSuggestion(),kbOpts:{weight:qp,kbExpr:Re.textInputFocus,primary:12,secondary:[2060]}}));fn(new Zh({id:"selectLastSuggestion",precondition:Tt.and(nr.Visible,Tt.or(nr.MultipleSuggestions,nr.HasFocusedSuggestion.negate())),handler:t=>t.selectLastSuggestion()}));fn(new Zh({id:"selectPrevSuggestion",precondition:Tt.and(nr.Visible,Tt.or(nr.MultipleSuggestions,nr.HasFocusedSuggestion.negate())),handler:t=>t.selectPrevSuggestion(),kbOpts:{weight:qp,kbExpr:Re.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));fn(new Zh({id:"selectPrevPageSuggestion",precondition:Tt.and(nr.Visible,Tt.or(nr.MultipleSuggestions,nr.HasFocusedSuggestion.negate())),handler:t=>t.selectPrevPageSuggestion(),kbOpts:{weight:qp,kbExpr:Re.textInputFocus,primary:11,secondary:[2059]}}));fn(new Zh({id:"selectFirstSuggestion",precondition:Tt.and(nr.Visible,Tt.or(nr.MultipleSuggestions,nr.HasFocusedSuggestion.negate())),handler:t=>t.selectFirstSuggestion()}));fn(new Zh({id:"focusSuggestion",precondition:Tt.and(nr.Visible,nr.HasFocusedSuggestion.negate()),handler:t=>t.focusSuggestion(),kbOpts:{weight:qp,kbExpr:Re.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}}));fn(new Zh({id:"focusAndAcceptSuggestion",precondition:Tt.and(nr.Visible,nr.HasFocusedSuggestion.negate()),handler:t=>{t.focusSuggestion(),t.acceptSelectedSuggestion(!0,!1)}}));fn(new Zh({id:"toggleSuggestionDetails",precondition:Tt.and(nr.Visible,nr.HasFocusedSuggestion),handler:t=>t.toggleSuggestionDetails(),kbOpts:{weight:qp,kbExpr:Re.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:ND,group:"right",order:1,when:Tt.and(nr.DetailsVisible,nr.CanResolve),title:I("detail.more","show less")},{menuId:ND,group:"right",order:1,when:Tt.and(nr.DetailsVisible.toNegated(),nr.CanResolve),title:I("detail.less","show more")}]}));fn(new Zh({id:"toggleExplainMode",precondition:nr.Visible,handler:t=>t.toggleExplainMode(),kbOpts:{weight:100,primary:2138}}));fn(new Zh({id:"toggleSuggestionFocus",precondition:nr.Visible,handler:t=>t.toggleSuggestionFocus(),kbOpts:{weight:qp,kbExpr:Re.textInputFocus,primary:2570,mac:{primary:778}}}));fn(new Zh({id:"insertBestCompletion",precondition:Tt.and(Re.textInputFocus,Tt.equals("config.editor.tabCompletion","on"),nle.AtEnd,nr.Visible.toNegated(),bF.OtherSuggestions.toNegated(),Hh.InSnippetMode.toNegated()),handler:(t,e)=>{t.triggerSuggestAndAcceptBest(Ic(e)?{fallback:"tab",...e}:{fallback:"tab"})},kbOpts:{weight:qp,primary:2}}));fn(new Zh({id:"insertNextSuggestion",precondition:Tt.and(Re.textInputFocus,Tt.equals("config.editor.tabCompletion","on"),bF.OtherSuggestions,nr.Visible.toNegated(),Hh.InSnippetMode.toNegated()),handler:t=>t.acceptNextSuggestion(),kbOpts:{weight:qp,kbExpr:Re.textInputFocus,primary:2}}));fn(new Zh({id:"insertPrevSuggestion",precondition:Tt.and(Re.textInputFocus,Tt.equals("config.editor.tabCompletion","on"),bF.OtherSuggestions,nr.Visible.toNegated(),Hh.InSnippetMode.toNegated()),handler:t=>t.acceptPrevSuggestion(),kbOpts:{weight:qp,kbExpr:Re.textInputFocus,primary:1026}}));Ht(class extends En{constructor(){super({id:"editor.action.resetSuggestSize",label:I("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(t,e){var n;(n=mv.get(e))==null||n.resetWidgetSize()}});class kAr extends ct{get selectedItem(){return this._currentSuggestItemInfo}constructor(e,n,i){super(),this.editor=e,this.suggestControllerPreselector=n,this.onWillAccept=i,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._onDidSelectedItemChange=this._register(new st),this.onDidSelectedItemChange=this._onDidSelectedItemChange.event,this._register(e.onKeyDown(o=>{o.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(o=>{o.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const r=mv.get(this.editor);if(r){this._register(r.registerSelector({priority:100,select:(a,l,c)=>{const u=this.editor.getModel();if(!u)return-1;const d=this.suggestControllerPreselector(),h=d?SI(d,u):void 0;if(!h)return-1;const f=ot.lift(l),m=c.map((g,y)=>{const _=zB.fromSuggestion(r,u,f,g,this.isShiftKeyPressed),w=SI(_.toSingleTextEdit(),u),C=EGt(h,w);return{index:y,valid:C,prefixLength:w.text.length,suggestItem:g}}).filter(g=>g&&g.valid&&g.prefixLength>0),p=W8e(m,Ah(g=>g.prefixLength,vv));return p?p.index:-1}}));let o=!1;const s=()=>{o||(o=!0,this._register(r.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(r.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(r.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(rn.once(r.model.onDidTrigger)(a=>{s()})),this._register(r.onWillInsertSuggestItem(a=>{const l=this.editor.getPosition(),c=this.editor.getModel();if(!l||!c)return;const u=zB.fromSuggestion(r,c,l,a.item,this.isShiftKeyPressed);this.onWillAccept(u)}))}this.update(this._isActive)}update(e){const n=this.getSuggestItemInfo();(this._isActive!==e||!MAr(this._currentSuggestItemInfo,n))&&(this._isActive=e,this._currentSuggestItemInfo=n,this._onDidSelectedItemChange.fire())}getSuggestItemInfo(){const e=mv.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const n=e.widget.value.getFocusedItem(),i=this.editor.getPosition(),r=this.editor.getModel();if(!(!n||!i||!r))return zB.fromSuggestion(e,r,i,n.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const e=mv.get(this.editor);e==null||e.stopForceRenderingAbove()}forceRenderingAbove(){const e=mv.get(this.editor);e==null||e.forceRenderingAbove()}}class zB{static fromSuggestion(e,n,i,r,o){let{insertText:s}=r.completion,a=!1;if(r.completion.insertTextRules&4){const c=new mA().parse(s);c.children.length<100&&tle.adjustWhitespace(n,i,!0,c),s=c.toString(),a=!0}const l=e.getOverwriteInfo(r,o);return new zB(ve.fromPositions(i.delta(0,-l.overwriteBefore),i.delta(0,Math.max(l.overwriteAfter,0))),s,r.completion.kind,a)}constructor(e,n,i,r){this.range=e,this.insertText=n,this.completionItemKind=i,this.isSnippetText=r}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new r4t(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new dw(this.range,this.insertText)}}function MAr(t,e){return t===e?!0:!t||!e?!1:t.equals(e)}var LAr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},S1=function(t,e){return function(n,i){e(n,i,t)}},t4e,i2;let mb=(i2=class extends ct{static get(e){return e.getContribution(t4e.ID)}constructor(e,n,i,r,o,s,a,l,c,u){super(),this.editor=e,this._instantiationService=n,this._contextKeyService=i,this._configurationService=r,this._commandService=o,this._debounceService=s,this._languageFeaturesService=a,this._accessibilitySignalService=l,this._keybindingService=c,this._accessibilityService=u,this._editorObs=hm(this.editor),this._positions=Vn(this,h=>{var f;return((f=this._editorObs.selections.read(h))==null?void 0:f.map(m=>m.getEndPosition()))??[new ot(1,1)]}),this._suggestWidgetAdaptor=this._register(new kAr(this.editor,()=>{var h,f;return this._editorObs.forceUpdate(),(f=(h=this.model.get())==null?void 0:h.selectedInlineCompletion.get())==null?void 0:f.toSingleTextEdit(void 0)},h=>this._editorObs.forceUpdate(f=>{var m;(m=this.model.get())==null||m.handleSuggestAccepted(h)}))),this._suggestWidgetSelectedItem=Oo(this,h=>this._suggestWidgetAdaptor.onDidSelectedItemChange(()=>{this._editorObs.forceUpdate(f=>h(void 0))}),()=>this._suggestWidgetAdaptor.selectedItem),this._enabledInConfig=Oo(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).enabled),this._isScreenReaderEnabled=Oo(this,this._accessibilityService.onDidChangeScreenReaderOptimized,()=>this._accessibilityService.isScreenReaderOptimized()),this._editorDictationInProgress=Oo(this,this._contextKeyService.onDidChangeContext,()=>this._contextKeyService.getContext(this.editor.getDomNode()).getValue("editorDictation.inProgress")===!0),this._enabled=Vn(this,h=>this._enabledInConfig.read(h)&&(!this._isScreenReaderEnabled.read(h)||!this._editorDictationInProgress.read(h))),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this.model=Vd(this,h=>{if(this._editorObs.isReadonly.read(h))return;const f=this._editorObs.model.read(h);return f?this._instantiationService.createInstance(UOe,f,this._suggestWidgetSelectedItem,this._editorObs.versionId,this._positions,this._debounceValue,Oo(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(119).preview),Oo(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(119).previewMode),Oo(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).mode),this._enabled):void 0}).recomputeInitiallyAndOnChange(this._store),this._ghostTexts=Vn(this,h=>{const f=this.model.read(h);return(f==null?void 0:f.ghostTexts.read(h))??[]}),this._stablizedGhostTexts=TAr(this._ghostTexts,this._store),this._ghostTextWidgets=MNi(this,this._stablizedGhostTexts,(h,f)=>f.add(this._instantiationService.createInstance(HOe,this.editor,{ghostText:h,minReservedLineCount:Gg(0),targetTextModel:this.model.map(m=>m==null?void 0:m.textModel)}))).recomputeInitiallyAndOnChange(this._store),this._playAccessibilitySignal=V6(this),this._fontFamily=Oo(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).fontFamily),this._register(new Em(this._contextKeyService,this.model)),this._register(M2e(this._editorObs.onDidType,(h,f)=>{var m;this._enabled.get()&&((m=this.model.get())==null||m.trigger())})),this._register(this._commandService.onDidExecuteCommand(h=>{new Set([E3.Tab.id,E3.DeleteLeft.id,E3.DeleteRight.id,Pqt,"acceptSelectedSuggestion"]).has(h.commandId)&&e.hasTextFocus()&&this._enabled.get()&&this._editorObs.forceUpdate(m=>{var p;(p=this.model.get())==null||p.trigger(m)})})),this._register(M2e(this._editorObs.selections,(h,f)=>{var m;f.some(p=>p.reason===3||p.source==="api")&&((m=this.model.get())==null||m.stop())})),this._register(this.editor.onDidBlurEditorWidget(()=>{this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(62).keepOnBlur||dF.dropDownVisible||ma(h=>{var f;(f=this.model.get())==null||f.stop(h)})})),this._register(ki(h=>{var m;const f=(m=this.model.read(h))==null?void 0:m.state.read(h);f!=null&&f.suggestItem?f.primaryGhostText.lineCount>=2&&this._suggestWidgetAdaptor.forceRenderingAbove():this._suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register(Kn(()=>{this._suggestWidgetAdaptor.stopForceRenderingAbove()}));const d=Fq(this,(h,f)=>{var g;const m=this.model.read(h),p=m==null?void 0:m.state.read(h);return this._suggestWidgetSelectedItem.get()?f:(g=p==null?void 0:p.inlineCompletion)==null?void 0:g.semanticId});this._register(VMi(Vn(h=>(this._playAccessibilitySignal.read(h),d.read(h),{})),async(h,f,m)=>{const p=this.model.get(),g=p==null?void 0:p.state.get();if(!g||!p)return;const y=p.textModel.getLineContent(g.primaryGhostText.lineNumber);await uw(50,gMe(m)),await $5t(this._suggestWidgetSelectedItem,Ud,()=>!1,gMe(m)),await this._accessibilitySignalService.playSignal(fp.inlineSuggestion),this.editor.getOption(8)&&this._provideScreenReaderUpdate(g.primaryGhostText.renderForScreenReader(y))})),this._register(new cOe(this.editor,this.model,this._instantiationService)),this._register(y2r(Vn(h=>{const f=this._fontFamily.read(h);return f===""||f==="default"?"":`
.monaco-editor .ghost-text-decoration,
.monaco-editor .ghost-text-decoration-preview,
.monaco-editor .ghost-text {
	font-family: ${f};
}`}))),this._register(this._configurationService.onDidChangeConfiguration(h=>{h.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})})),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}playAccessibilitySignal(e){this._playAccessibilitySignal.trigger(e)}_provideScreenReaderUpdate(e){const n=this._contextKeyService.getContextKeyValue("accessibleViewIsShown"),i=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let r;!n&&i&&this.editor.getOption(150)&&(r=I("showAccessibleViewHint","Inspect this in the accessible view ({0})",i.getAriaLabel())),Am(r?e+", "+r:e)}shouldShowHoverAt(e){var i;const n=(i=this.model.get())==null?void 0:i.primaryGhostText.get();return n?n.parts.some(r=>e.containsPosition(new ot(n.lineNumber,r.column))):!1}shouldShowHoverAtViewZone(e){var n;return((n=this._ghostTextWidgets.get()[0])==null?void 0:n.ownsViewZone(e))??!1}},t4e=i2,i2.ID="editor.contrib.inlineCompletionsController",i2);mb=t4e=LAr([S1(1,qn),S1(2,vi),S1(3,cr),S1(4,gs),S1(5,tg),S1(6,Ln),S1(7,lM),S1(8,vo),S1(9,Bm)],mb);function TAr(t,e){const n=lr("result",[]),i=[];return e.add(ki(r=>{const o=t.read(r);ma(s=>{if(o.length!==i.length){i.length=o.length;for(let a=0;a<i.length;a++)i[a]||(i[a]=lr("item",o[a]));n.set([...i],s)}i.forEach((a,l)=>a.set(o[l],s))})})),n}const Ace=class Ace extends En{constructor(){super({id:Ace.ID,label:I("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:Tt.and(Re.writable,Em.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}async run(e,n){var r;const i=mb.get(n);(r=i==null?void 0:i.model.get())==null||r.next()}};Ace.ID=jqt;let n4e=Ace;const Rce=class Rce extends En{constructor(){super({id:Rce.ID,label:I("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:Tt.and(Re.writable,Em.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}async run(e,n){var r;const i=mb.get(n);(r=i==null?void 0:i.model.get())==null||r.previous()}};Rce.ID=Oqt;let i4e=Rce;class IAr extends En{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:I("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:Re.writable})}async run(e,n){const i=mb.get(n);await O5t(async r=>{var o;await((o=i==null?void 0:i.model.get())==null?void 0:o.triggerExplicitly(r)),i==null||i.playAccessibilitySignal(r)})}}class AAr extends En{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:I("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:Tt.and(Re.writable,Em.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:Tt.and(Re.writable,Em.inlineSuggestionVisible)},menuOpts:[{menuId:Rn.InlineSuggestionToolbar,title:I("acceptWord","Accept Word"),group:"primary",order:2}]})}async run(e,n){var r;const i=mb.get(n);await((r=i==null?void 0:i.model.get())==null?void 0:r.acceptNextWord(i.editor))}}class RAr extends En{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:I("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:Tt.and(Re.writable,Em.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:Rn.InlineSuggestionToolbar,title:I("acceptLine","Accept Line"),group:"secondary",order:2}]})}async run(e,n){var r;const i=mb.get(n);await((r=i==null?void 0:i.model.get())==null?void 0:r.acceptNextLine(i.editor))}}class PAr extends En{constructor(){super({id:Pqt,label:I("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:Em.inlineSuggestionVisible,menuOpts:[{menuId:Rn.InlineSuggestionToolbar,title:I("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:Tt.and(Em.inlineSuggestionVisible,Re.tabMovesFocus.toNegated(),Em.inlineSuggestionHasIndentationLessThanTabSize,nr.Visible.toNegated(),Re.hoverFocused.toNegated())}})}async run(e,n){var r;const i=mb.get(n);i&&((r=i.model.get())==null||r.accept(i.editor),i.editor.focus())}}const Pce=class Pce extends En{constructor(){super({id:Pce.ID,label:I("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:Em.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}async run(e,n){const i=mb.get(n);ma(r=>{var o;(o=i==null?void 0:i.model.get())==null||o.stop(r)})}};Pce.ID="editor.action.inlineSuggest.hide";let r4e=Pce;const Oce=class Oce extends qh{constructor(){super({id:Oce.ID,title:I("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:Rn.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:Tt.equals("config.editor.inlineSuggest.showToolbar","always")})}async run(e,n){const i=e.get(cr),o=i.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";i.updateValue("editor.inlineSuggest.showToolbar",o)}};Oce.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar";let o4e=Oce;var OAr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},M7=function(t,e){return function(n,i){e(n,i,t)}};class jAr{constructor(e,n,i){this.owner=e,this.range=n,this.controller=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let s4e=class{constructor(e,n,i,r,o,s){this._editor=e,this._languageService=n,this._openerService=i,this.accessibilityService=r,this._instantiationService=o,this._telemetryService=s,this.hoverOrdinal=4}suggestHoverAnchor(e){const n=mb.get(this._editor);if(!n)return null;const i=e.target;if(i.type===8){const r=i.detail;if(n.shouldShowHoverAtViewZone(r.viewZoneId))return new $te(1e3,this,ve.fromPositions(this._editor.getModel().validatePosition(r.positionBefore||r.position)),e.event.posx,e.event.posy,!1)}return i.type===7&&n.shouldShowHoverAt(i.range)?new $te(1e3,this,i.range,e.event.posx,e.event.posy,!1):i.type===6&&i.detail.mightBeForeignElement&&n.shouldShowHoverAt(i.range)?new $te(1e3,this,i.range,e.event.posx,e.event.posy,!1):null}computeSync(e,n){if(this._editor.getOption(62).showToolbar!=="onHover")return[];const i=mb.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new jAr(this,e.range,i)]:[]}renderHoverParts(e,n){const i=new Lt,r=n[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&i.add(this.renderScreenReaderText(e,r));const o=r.controller.model.get(),s=this._instantiationService.createInstance(dF,this._editor,!1,Gg(null),o.selectedInlineCompletionIndex,o.inlineCompletionsCount,o.activeCommands),a=s.getDomNode();e.fragment.appendChild(a),o.triggerExplicitly(),i.add(s);const l={hoverPart:r,hoverElement:a,dispose(){i.dispose()}};return new vA([l])}renderScreenReaderText(e,n){const i=new Lt,r=Xt,o=r("div.hover-row.markdown-hover"),s=jt(o,r("div.hover-contents",{"aria-live":"assertive"})),a=i.add(new pS({editor:this._editor},this._languageService,this._openerService)),l=c=>{i.add(a.onDidRenderAsync(()=>{s.className="hover-contents code-hover-contents",e.onContentsChanged()}));const u=I("inlineSuggestionFollows","Suggestion:"),d=i.add(a.render(new rd().appendText(u).appendCodeblock("text",c)));s.replaceChildren(d.element)};return i.add(ki(c=>{var d;const u=(d=n.controller.model.read(c))==null?void 0:d.primaryGhostText.read(c);if(u){const h=this._editor.getModel().getLineContent(u.lineNumber);l(u.renderForScreenReader(h))}else ou(s)})),e.fragment.appendChild(o),i}};s4e=OAr([M7(1,Qs),M7(2,Wm),M7(3,Bm),M7(4,qn),M7(5,eh)],s4e);class FAr{}const Pge=new class{constructor(){this._implementations=[]}register(e){return this._implementations.push(e),{dispose:()=>{const n=this._implementations.indexOf(e);n!==-1&&this._implementations.splice(n,1)}}}getImplementations(){return this._implementations}};Wr(mb.ID,mb,3);Ht(IAr);Ht(n4e);Ht(i4e);Ht(AAr);Ht(RAr);Ht(PAr);Ht(r4e);cs(o4e);wR.register(s4e);Pge.register(new FAr);var $Ar=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},rNe=function(t,e){return function(n,i){e(n,i,t)}},f9,jD;let BU=(jD=class{constructor(e,n,i,r){this.textModelResolverService=n,this.languageService=i,this.languageFeaturesService=r,this.toUnhook=new Lt,this.toUnhookForKeyboard=new Lt,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const o=new Dge(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown(([s,a])=>{this.startFindDefinitionFromMouse(s,a??void 0)})),this.toUnhook.add(o.onExecute(s=>{this.isEnabled(s)&&this.gotoDefinition(s.target.position,s.hasSideBySideModifier).catch(a=>{ji(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(o.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(f9.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(n=>{n&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))}startFindDefinitionFromMouse(e,n){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,n)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const i=e.target.position;this.startFindDefinition(i)}async startFindDefinition(e){var s;this.toUnhookForKeyboard.clear();const n=e?(s=this.editor.getModel())==null?void 0:s.getWordAtPosition(e):null;if(!n){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===n.startColumn&&this.currentWordAtPosition.endColumn===n.endColumn&&this.currentWordAtPosition.word===n.word)return;this.currentWordAtPosition=n;const i=new i6t(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=cc(a=>this.findDefinition(e,a));let r;try{r=await this.previousPromise}catch(a){ji(a);return}if(!r||!r.length||!i.validate(this.editor)){this.removeLinkDecorations();return}const o=r[0].originSelectionRange?ve.lift(r[0].originSelectionRange):new ve(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);if(r.length>1){let a=o;for(const{originSelectionRange:l}of r)l&&(a=ve.plusRange(a,l));this.addDecoration(a,new rd().appendText(I("multipleResults","Click to show {0} definitions.",r.length)))}else{const a=r[0];if(!a.uri)return;this.textModelResolverService.createModelReference(a.uri).then(l=>{if(!l.object||!l.object.textEditorModel){l.dispose();return}const{object:{textEditorModel:c}}=l,{startLineNumber:u}=a.range;if(u<1||u>c.getLineCount()){l.dispose();return}const d=this.getPreviewValue(c,u,a),h=this.languageService.guessLanguageIdByFilepathOrFirstLine(c.uri);this.addDecoration(o,d?new rd().appendCodeblock(h||"",d):void 0),l.dispose()})}}getPreviewValue(e,n,i){let r=i.range;return r.endLineNumber-r.startLineNumber>=f9.MAX_SOURCE_PREVIEW_LINES&&(r=this.getPreviewRangeBasedOnIndentation(e,n)),this.stripIndentationFromPreviewRange(e,n,r)}stripIndentationFromPreviewRange(e,n,i){let o=e.getLineFirstNonWhitespaceColumn(n);for(let a=n+1;a<i.endLineNumber;a++){const l=e.getLineFirstNonWhitespaceColumn(a);o=Math.min(o,l)}return e.getValueInRange(i).replace(new RegExp(`^\\s{${o-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(e,n){const i=e.getLineFirstNonWhitespaceColumn(n),r=Math.min(e.getLineCount(),n+f9.MAX_SOURCE_PREVIEW_LINES);let o=n+1;for(;o<r;o++){const s=e.getLineFirstNonWhitespaceColumn(o);if(i===s)break}return new ve(n,1,o+1,1)}addDecoration(e,n){const i={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:n}};this.linkDecorations.set([i])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(e,n){var i;return this.editor.hasModel()&&e.isLeftClick&&e.isNoneOrSingleMouseDown&&e.target.type===6&&!(((i=e.target.detail.injectedText)==null?void 0:i.options)instanceof yk)&&(e.hasTriggerModifier||(n?n.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,n){const i=this.editor.getModel();return i?AG(this.languageFeaturesService.definitionProvider,i,e,!1,n):Promise.resolve(null)}gotoDefinition(e,n){return this.editor.setPosition(e),this.editor.invokeWithinContext(i=>{const r=!n&&this.editor.getOption(89)&&!this.isInPeekEditor(i);return new PG({openToSide:n,openInPeek:r,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(i)})}isInPeekEditor(e){const n=e.get(vi);return Lf.inPeekEditor.getValue(n)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}},f9=jD,jD.ID="editor.contrib.gotodefinitionatposition",jD.MAX_SOURCE_PREVIEW_LINES=8,jD);BU=f9=$Ar([rNe(1,Rf),rNe(2,Qs),rNe(3,Ln)],BU);Wr(BU.ID,BU,2);var kGt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},ale=function(t,e){return function(n,i){e(n,i,t)}};class N0t{constructor(e,n,i){this.marker=e,this.index=n,this.total=i}}let a4e=class{constructor(e,n,i){this._markerService=n,this._configService=i,this._onDidChange=new st,this.onDidChange=this._onDidChange.event,this._dispoables=new Lt,this._markers=[],this._nextIdx=-1,ri.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);const r=this._configService.getValue("problems.sortOrder"),o=(a,l)=>{let c=CH(a.resource.toString(),l.resource.toString());return c===0&&(r==="position"?c=ve.compareRangesUsingStarts(a,l)||Da.compare(a.severity,l.severity):c=Da.compare(a.severity,l.severity)||ve.compareRangesUsingStarts(a,l)),c},s=()=>{this._markers=this._markerService.read({resource:ri.isUri(e)?e:void 0,severities:Da.Error|Da.Warning|Da.Info}),typeof e=="function"&&(this._markers=this._markers.filter(a=>this._resourceFilter(a.resource))),this._markers.sort(o)};s(),this._dispoables.add(n.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&(s(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new N0t(e,this._nextIdx+1,this._markers.length)}_initIdx(e,n,i){let r=!1,o=this._markers.findIndex(s=>s.resource.toString()===e.uri.toString());o<0&&(o=fH(this._markers,{resource:e.uri},(s,a)=>CH(s.resource.toString(),a.resource.toString())),o<0&&(o=~o));for(let s=o;s<this._markers.length;s++){let a=ve.lift(this._markers[s]);if(a.isEmpty()){const l=e.getWordAtPosition(a.getStartPosition());l&&(a=new ve(a.startLineNumber,l.startColumn,a.startLineNumber,l.endColumn))}if(n&&(a.containsPosition(n)||n.isBeforeOrEqual(a.getStartPosition()))){this._nextIdx=s,r=!0;break}if(this._markers[s].resource.toString()!==e.uri.toString())break}r||(this._nextIdx=i?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(e,n,i){if(this._markers.length===0)return!1;const r=this._nextIdx;return this._nextIdx===-1?this._initIdx(n,i,e):e?this._nextIdx=(this._nextIdx+1)%this._markers.length:e||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),r!==this._nextIdx}find(e,n){let i=this._markers.findIndex(r=>r.resource.toString()===e.toString());if(!(i<0)){for(;i<this._markers.length;i++)if(ve.containsPosition(this._markers[i],n))return new N0t(this._markers[i],i+1,this._markers.length)}}};a4e=kGt([ale(1,Ow),ale(2,cr)],a4e);const MGt=Sr("IMarkerNavigationService");let l4e=class{constructor(e,n){this._markerService=e,this._configService=n,this._provider=new Ch}getMarkerList(e){for(const n of this._provider){const i=n.getMarkerList(e);if(i)return i}return new a4e(e,this._markerService,this._configService)}};l4e=kGt([ale(0,Ow),ale(1,cr)],l4e);Rr(MGt,l4e,1);var c4e;(function(t){function e(n){switch(n){case qa.Ignore:return"severity-ignore "+ci.asClassName(qt.info);case qa.Info:return ci.asClassName(qt.info);case qa.Warning:return ci.asClassName(qt.warning);case qa.Error:return ci.asClassName(qt.error);default:return""}}t.className=e})(c4e||(c4e={}));var VAr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},_O=function(t,e){return function(n,i){e(n,i,t)}},u4e;class BAr{constructor(e,n,i,r,o){this._openerService=r,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new Lt,this._editor=n;const s=document.createElement("div");s.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),s.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),s.appendChild(this._relatedBlock),this._disposables.add(Fa(this._relatedBlock,"click",a=>{a.preventDefault();const l=this._relatedDiagnostics.get(a.target);l&&i(l)})),this._scrollable=new Q3t(s,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{s.style.left=`-${a.scrollLeft}px`,s.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){Jo(this._disposables)}update(e){const{source:n,message:i,relatedInformation:r,code:o}=e;let s=((n==null?void 0:n.length)||0)+2;o&&(typeof o=="string"?s+=o.length:s+=o.value.length);const a=Tw(i);this._lines=a.length,this._longestLineLength=0;for(const h of a)this._longestLineLength=Math.max(h.length+s,this._longestLineLength);ru(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(const h of a)l=document.createElement("div"),l.innerText=h,h===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(n||o){const h=document.createElement("span");if(h.classList.add("details"),l.appendChild(h),n){const f=document.createElement("span");f.innerText=n,f.classList.add("source"),h.appendChild(f)}if(o)if(typeof o=="string"){const f=document.createElement("span");f.innerText=`(${o})`,f.classList.add("code"),h.appendChild(f)}else{this._codeLink=Xt("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=m=>{this._openerService.open(o.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()};const f=jt(this._codeLink,Xt("span"));f.innerText=o.value,h.appendChild(this._codeLink)}}if(ru(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),md(r)){const h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(67)*.66)}px`,this._lines+=1;for(const f of r){const m=document.createElement("div"),p=document.createElement("a");p.classList.add("filename"),p.innerText=`${this._labelService.getUriBasenameLabel(f.resource)}(${f.startLineNumber}, ${f.startColumn}): `,p.title=this._labelService.getUriLabel(f.resource),this._relatedDiagnostics.set(p,f);const g=document.createElement("span");g.innerText=f.message,m.appendChild(p),m.appendChild(g),this._lines+=1,h.appendChild(m)}}const c=this._editor.getOption(50),u=Math.ceil(c.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=c.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:u,scrollHeight:d})}layout(e,n){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${n}px`,this._scrollable.setScrollDimensions({width:n,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let n="";switch(e.severity){case Da.Error:n=I("Error","Error");break;case Da.Warning:n=I("Warning","Warning");break;case Da.Info:n=I("Info","Info");break;case Da.Hint:n=I("Hint","Hint");break}let i=I("marker aria","{0} at {1}. ",n,e.startLineNumber+":"+e.startColumn);const r=this._editor.getModel();return r&&e.startLineNumber<=r.getLineCount()&&e.startLineNumber>=1&&(i=`${r.getLineContent(e.startLineNumber)}, ${i}`),i}}var r2;let zU=(r2=class extends jae{constructor(e,n,i,r,o,s,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=n,this._openerService=i,this._menuService=r,this._contextKeyService=s,this._labelService=a,this._callOnDispose=new Lt,this._onDidSelectRelatedInformation=new st,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Da.Warning,this._backgroundColor=Rt.white,this._applyTheme(n.getColorTheme()),this._callOnDispose.add(n.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(UAr);let n=d4e,i=zAr;this._severity===Da.Warning?(n=Hte,i=HAr):this._severity===Da.Info&&(n=h4e,i=WAr);const r=e.getColor(n),o=e.getColor(i);this.style({arrowColor:r,frameColor:r,headerBackgroundColor:o,primaryHeadingColor:e.getColor(qqt),secondaryHeadingColor:e.getColor(Gqt)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(r=>this.editor.focus()));const n=[],i=this._menuService.getMenuActions(u4e.TitleMenu,this._contextKeyService);Cme(i,n),this._actionbarWidget.push(n,{label:!1,icon:!0,index:0})}_fillTitleIcon(e){this._icon=jt(e,Xt(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new BAr(this._container,this.editor,n=>this._onDidSelectRelatedInformation.fire(n),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,n,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const r=ve.lift(e),o=this.editor.getPosition(),s=o&&r.containsPosition(o)?o:r.getStartPosition();super.show(s,this.computeRequiredHeight());const a=this.editor.getModel();if(a){const l=i>1?I("problems","{0} of {1} problems",n,i):I("change","{0} of {1} problem",n,i);this.setTitle(cb(a.uri),l)}this._icon.className=`codicon ${c4e.className(Da.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(s,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,n){super._doLayoutBody(e,n),this._heightInPixel=e,this._message.layout(e,n),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}},u4e=r2,r2.TitleMenu=new Rn("gotoErrorTitleMenu"),r2);zU=u4e=VAr([_O(1,Ql),_O(2,Wm),_O(3,Jp),_O(4,qn),_O(5,vi),_O(6,g5)],zU);const E0t=jH(Zfe,obi),D0t=jH(mS,FH),k0t=jH(mw,$H),d4e=Fe("editorMarkerNavigationError.background",{dark:E0t,light:E0t,hcDark:$r,hcLight:$r},I("editorMarkerNavigationError","Editor marker navigation widget error color.")),zAr=Fe("editorMarkerNavigationError.headerBackground",{dark:rr(d4e,.1),light:rr(d4e,.1),hcDark:null,hcLight:null},I("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),Hte=Fe("editorMarkerNavigationWarning.background",{dark:D0t,light:D0t,hcDark:$r,hcLight:$r},I("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),HAr=Fe("editorMarkerNavigationWarning.headerBackground",{dark:rr(Hte,.1),light:rr(Hte,.1),hcDark:"#0C141F",hcLight:rr(Hte,.2)},I("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),h4e=Fe("editorMarkerNavigationInfo.background",{dark:k0t,light:k0t,hcDark:$r,hcLight:$r},I("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),WAr=Fe("editorMarkerNavigationInfo.headerBackground",{dark:rr(h4e,.1),light:rr(h4e,.1),hcDark:null,hcLight:null},I("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),UAr=Fe("editorMarkerNavigation.background",G0,I("editorMarkerNavigationBackground","Editor marker navigation widget background."));var KAr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},GJ=function(t,e){return function(n,i){e(n,i,t)}},m9,o2;let xA=(o2=class{static get(e){return e.getContribution(m9.ID)}constructor(e,n,i,r,o){this._markerNavigationService=n,this._contextKeyService=i,this._editorService=r,this._instantiationService=o,this._sessionDispoables=new Lt,this._editor=e,this._widgetVisible=LGt.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let n=!1;return this._model&&(n=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),n&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(zU,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(i=>{var r,o,s;(!((r=this._model)!=null&&r.selected)||!ve.containsPosition((o=this._model)==null?void 0:o.selected.marker,i.position))&&((s=this._model)==null||s.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const i=this._model.find(this._editor.getModel().uri,this._widget.position);i?this._widget.updateMarker(i.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(i=>{this._editorService.openCodeEditor({resource:i.resource,options:{pinned:!0,revealIfOpened:!0,selection:ve.lift(i).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const n=this._getOrCreateModel(this._editor.getModel().uri);n.resetIndex(),n.move(!0,this._editor.getModel(),new ot(e.startLineNumber,e.startColumn)),n.selected&&this._widget.showAtMarker(n.selected.marker,n.selected.index,n.selected.total)}}async nagivate(e,n){var i,r;if(this._editor.hasModel()){const o=this._getOrCreateModel(n?void 0:this._editor.getModel().uri);if(o.move(e,this._editor.getModel(),this._editor.getPosition()),!o.selected)return;if(o.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const s=await this._editorService.openCodeEditor({resource:o.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:o.selected.marker}},this._editor);s&&((i=m9.get(s))==null||i.close(),(r=m9.get(s))==null||r.nagivate(e,n))}else this._widget.showAtMarker(o.selected.marker,o.selected.index,o.selected.total)}}},m9=o2,o2.ID="editor.contrib.markerController",o2);xA=m9=KAr([GJ(1,MGt),GJ(2,vi),GJ(3,Yr),GJ(4,qn)],xA);class Oge extends En{constructor(e,n,i){super(i),this._next=e,this._multiFile=n}async run(e,n){var i;n.hasModel()&&((i=xA.get(n))==null||i.nagivate(this._next,this._multiFile))}}const CT=class CT extends Oge{constructor(){super(!0,!1,{id:CT.ID,label:CT.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Re.focus,primary:578,weight:100},menuOpts:{menuId:zU.TitleMenu,title:CT.LABEL,icon:ks("marker-navigation-next",qt.arrowDown,I("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}};CT.ID="editor.action.marker.next",CT.LABEL=I("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");let lle=CT;const ST=class ST extends Oge{constructor(){super(!1,!1,{id:ST.ID,label:ST.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Re.focus,primary:1602,weight:100},menuOpts:{menuId:zU.TitleMenu,title:ST.LABEL,icon:ks("marker-navigation-previous",qt.arrowUp,I("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}};ST.ID="editor.action.marker.prev",ST.LABEL=I("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");let f4e=ST;class qAr extends Oge{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:I("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Re.focus,primary:66,weight:100},menuOpts:{menuId:Rn.MenubarGoMenu,title:I({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class GAr extends Oge{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:I("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Re.focus,primary:1090,weight:100},menuOpts:{menuId:Rn.MenubarGoMenu,title:I({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}Wr(xA.ID,xA,4);Ht(lle);Ht(f4e);Ht(qAr);Ht(GAr);const LGt=new gn("markersNavigationVisible",!1),YAr=Zl.bindToContribution(xA.get);fn(new YAr({id:"closeMarkersNavigation",precondition:LGt,handler:t=>t.close(),kbOpts:{weight:150,kbExpr:Re.focus,primary:9,secondary:[1033]}}));var Ty;(function(t){t.NoAutoFocus="noAutoFocus",t.FocusIfVisible="focusIfVisible",t.AutoFocusImmediately="autoFocusImmediately"})(Ty||(Ty={}));class XAr extends En{constructor(){super({id:Rqt,label:I({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse."]},"Show or Focus Hover"),metadata:{description:Ci("showOrFocusHoverDescription","Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[Ty.NoAutoFocus,Ty.FocusIfVisible,Ty.AutoFocusImmediately],enumDescriptions:[I("showOrFocusHover.focus.noAutoFocus","The hover will not automatically take focus."),I("showOrFocusHover.focus.focusIfVisible","The hover will take focus only if it is already visible."),I("showOrFocusHover.focus.autoFocusImmediately","The hover will automatically take focus when it appears.")],default:Ty.FocusIfVisible}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2087),weight:100}})}run(e,n,i){if(!n.hasModel())return;const r=Jd.get(n);if(!r)return;const o=i==null?void 0:i.focus;let s=Ty.FocusIfVisible;Object.values(Ty).includes(o)?s=o:typeof o=="boolean"&&o&&(s=Ty.AutoFocusImmediately);const a=c=>{const u=n.getPosition(),d=new ve(u.lineNumber,u.column,u.lineNumber,u.column);r.showContentHover(d,1,1,c)},l=n.getOption(2)===2;r.isHoverVisible?s!==Ty.NoAutoFocus?r.focus():a(l):a(l||s===Ty.AutoFocusImmediately)}}class ZAr extends En{constructor(){super({id:dLr,label:I({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0,metadata:{description:Ci("showDefinitionPreviewHoverDescription","Show the definition preview hover in the editor.")}})}run(e,n){const i=Jd.get(n);if(!i)return;const r=n.getPosition();if(!r)return;const o=new ve(r.lineNumber,r.column,r.lineNumber,r.column),s=BU.get(n);if(!s)return;s.startFindDefinitionFromCursor(r).then(()=>{i.showContentHover(o,1,1,!0)})}}class QAr extends En{constructor(){super({id:hLr,label:I({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:Re.hoverFocused,kbOpts:{kbExpr:Re.hoverFocused,primary:16,weight:100},metadata:{description:Ci("scrollUpHoverDescription","Scroll up the editor hover.")}})}run(e,n){const i=Jd.get(n);i&&i.scrollUp()}}class JAr extends En{constructor(){super({id:fLr,label:I({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:Re.hoverFocused,kbOpts:{kbExpr:Re.hoverFocused,primary:18,weight:100},metadata:{description:Ci("scrollDownHoverDescription","Scroll down the editor hover.")}})}run(e,n){const i=Jd.get(n);i&&i.scrollDown()}}class eRr extends En{constructor(){super({id:mLr,label:I({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:Re.hoverFocused,kbOpts:{kbExpr:Re.hoverFocused,primary:15,weight:100},metadata:{description:Ci("scrollLeftHoverDescription","Scroll left the editor hover.")}})}run(e,n){const i=Jd.get(n);i&&i.scrollLeft()}}class tRr extends En{constructor(){super({id:pLr,label:I({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:Re.hoverFocused,kbOpts:{kbExpr:Re.hoverFocused,primary:17,weight:100},metadata:{description:Ci("scrollRightHoverDescription","Scroll right the editor hover.")}})}run(e,n){const i=Jd.get(n);i&&i.scrollRight()}}class nRr extends En{constructor(){super({id:gLr,label:I({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:Re.hoverFocused,kbOpts:{kbExpr:Re.hoverFocused,primary:11,secondary:[528],weight:100},metadata:{description:Ci("pageUpHoverDescription","Page up the editor hover.")}})}run(e,n){const i=Jd.get(n);i&&i.pageUp()}}class iRr extends En{constructor(){super({id:bLr,label:I({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:Re.hoverFocused,kbOpts:{kbExpr:Re.hoverFocused,primary:12,secondary:[530],weight:100},metadata:{description:Ci("pageDownHoverDescription","Page down the editor hover.")}})}run(e,n){const i=Jd.get(n);i&&i.pageDown()}}class rRr extends En{constructor(){super({id:vLr,label:I({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:Re.hoverFocused,kbOpts:{kbExpr:Re.hoverFocused,primary:14,secondary:[2064],weight:100},metadata:{description:Ci("goToTopHoverDescription","Go to the top of the editor hover.")}})}run(e,n){const i=Jd.get(n);i&&i.goToTop()}}class oRr extends En{constructor(){super({id:yLr,label:I({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:Re.hoverFocused,kbOpts:{kbExpr:Re.hoverFocused,primary:13,secondary:[2066],weight:100},metadata:{description:Ci("goToBottomHoverDescription","Go to the bottom of the editor hover.")}})}run(e,n){const i=Jd.get(n);i&&i.goToBottom()}}class sRr extends En{constructor(){super({id:Nge,label:_Lr,alias:"Increase Hover Verbosity Level",precondition:Re.hoverVisible})}run(e,n,i){const r=Jd.get(n);if(!r)return;const o=(i==null?void 0:i.index)!==void 0?i.index:r.focusedHoverPartIndex();r.updateHoverVerbosityLevel(rm.Increase,o,i==null?void 0:i.focus)}}class aRr extends En{constructor(){super({id:Ege,label:xLr,alias:"Decrease Hover Verbosity Level",precondition:Re.hoverVisible})}run(e,n,i){var s;const r=Jd.get(n);if(!r)return;const o=(i==null?void 0:i.index)!==void 0?i.index:r.focusedHoverPartIndex();(s=Jd.get(n))==null||s.updateHoverVerbosityLevel(rm.Decrease,o,i==null?void 0:i.focus)}}var lRr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},oNe=function(t,e){return function(n,i){e(n,i,t)}};const Bb=Xt;class cRr{constructor(e,n,i){this.owner=e,this.range=n,this.marker=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const M0t={type:1,filter:{include:js.QuickFix},triggerAction:Pm.QuickFixHover};let m4e=class{constructor(e,n,i,r){this._editor=e,this._markerDecorationsService=n,this._openerService=i,this._languageFeaturesService=r,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,n){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),r=e.range.startLineNumber,o=i.getLineMaxColumn(r),s=[];for(const a of n){const l=a.range.startLineNumber===r?a.range.startColumn:1,c=a.range.endLineNumber===r?a.range.endColumn:o,u=this._markerDecorationsService.getMarker(i.uri,a);if(!u)continue;const d=new ve(e.range.startLineNumber,l,e.range.startLineNumber,c);s.push(new cRr(this,d,u))}return s}renderHoverParts(e,n){if(!n.length)return new vA([]);const i=new Lt,r=[];n.forEach(s=>{const a=this._renderMarkerHover(s);e.fragment.appendChild(a.hoverElement),r.push(a)});const o=n.length===1?n[0]:n.sort((s,a)=>Da.compare(s.marker.severity,a.marker.severity))[0];return this.renderMarkerStatusbar(e,o,i),new vA(r)}_renderMarkerHover(e){const n=new Lt,i=Bb("div.hover-row"),r=jt(i,Bb("div.marker.hover-contents")),{source:o,message:s,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(r);const c=jt(r,Bb("span"));if(c.style.whiteSpace="pre-wrap",c.innerText=s,o||a)if(a&&typeof a!="string"){const d=Bb("span");if(o){const p=jt(d,Bb("span"));p.innerText=o}const h=jt(d,Bb("a.code-link"));h.setAttribute("href",a.target.toString()),n.add(yt(h,"click",p=>{this._openerService.open(a.target,{allowCommands:!0}),p.preventDefault(),p.stopPropagation()}));const f=jt(h,Bb("span"));f.innerText=a.value;const m=jt(r,d);m.style.opacity="0.6",m.style.paddingLeft="6px"}else{const d=jt(r,Bb("span"));d.style.opacity="0.6",d.style.paddingLeft="6px",d.innerText=o&&a?`${o}(${a})`:o||`(${a})`}if(md(l))for(const{message:d,resource:h,startLineNumber:f,startColumn:m}of l){const p=jt(r,Bb("div"));p.style.marginTop="8px";const g=jt(p,Bb("a"));g.innerText=`${cb(h)}(${f}, ${m}): `,g.style.cursor="pointer",n.add(yt(g,"click",_=>{_.stopPropagation(),_.preventDefault(),this._openerService&&this._openerService.open(h,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:f,startColumn:m}}}).catch(ji)}));const y=jt(p,Bb("span"));y.innerText=d,this._editor.applyFontInfo(y)}return{hoverPart:e,hoverElement:i,dispose:()=>n.dispose()}}renderMarkerStatusbar(e,n,i){if(n.marker.severity===Da.Error||n.marker.severity===Da.Warning||n.marker.severity===Da.Info){const r=xA.get(this._editor);r&&e.statusBar.addAction({label:I("view problem","View Problem"),commandId:lle.ID,run:()=>{e.hide(),r.showAtMarker(n.marker),this._editor.focus()}})}if(!this._editor.getOption(92)){const r=e.statusBar.append(Bb("div"));this.recentMarkerCodeActionsInfo&&(Xre.makeKey(this.recentMarkerCodeActionsInfo.marker)===Xre.makeKey(n.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(r.textContent=I("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?ct.None:dk(()=>r.textContent=I("checkingForQuickFixes","Checking for quick fixes..."),200,i);r.textContent||(r.textContent=" ");const s=this.getCodeActions(n.marker);i.add(Kn(()=>s.cancel())),s.then(a=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:n.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),r.textContent=I("noQuickFixes","No quick fixes available");return}r.style.display="none";let l=!1;i.add(Kn(()=>{l||a.dispose()})),e.statusBar.addAction({label:I("quick fixes","Quick Fix..."),commandId:rWe,run:c=>{l=!0;const u=cF.get(this._editor),d=Ga(c);e.hide(),u==null||u.showCodeActions(M0t,a,{x:d.left,y:d.top,width:d.width,height:d.height})}})},ji)}}getCodeActions(e){return cc(n=>$B(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new ve(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),M0t,Ux.None,n))}};m4e=lRr([oNe(1,J8e),oNe(2,Wm),oNe(3,Ln)],m4e);class uRr{}class dRr{}class hRr{}Wr(Jd.ID,Jd,2);Ht(XAr);Ht(ZAr);Ht(QAr);Ht(JAr);Ht(eRr);Ht(tRr);Ht(nRr);Ht(iRr);Ht(rRr);Ht(oRr);Ht(sRr);Ht(aRr);wR.register(OU);wR.register(m4e);_b((t,e)=>{const n=t.getColor(P3t);n&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${n.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${n.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${n.transparent(.5)}; }`))});Pge.register(new uRr);Pge.register(new dRr);Pge.register(new hRr);function Qf(t,e){let n=0;for(let i=0;i<t.length;i++)t.charAt(i)==="	"?n+=e:n++;return n}function HB(t,e,n){t=t<0?0:t;let i="";if(!n){const r=Math.floor(t/e);t=t%e;for(let o=0;o<r;o++)i+="	"}for(let r=0;r<t;r++)i+=" ";return i}function TGt(t,e,n,i){if(t.getLineCount()===1&&t.getLineMaxColumn(1)===1)return[];const r=e.getLanguageConfiguration(t.getLanguageId()).indentRulesSupport;if(!r)return[];const o=new _Ve(t,r,e);for(i=Math.min(i,t.getLineCount());n<=i&&o.shouldIgnore(n);)n++;if(n>i-1)return[];const{tabSize:s,indentSize:a,insertSpaces:l}=t.getOptions(),c=(p,g)=>(g=g||1,lb.shiftIndent(p,p.length+g,s,a,l)),u=(p,g)=>(g=g||1,lb.unshiftIndent(p,p.length+g,s,a,l)),d=[],h=t.getLineContent(n);let f=Zo(h),m=f;o.shouldIncrease(n)?(m=c(m),f=c(f)):o.shouldIndentNextLine(n)&&(m=c(m)),n++;for(let p=n;p<=i;p++){if(fRr(t,p))continue;const g=t.getLineContent(p),y=Zo(g),_=m;o.shouldDecrease(p,_)&&(m=u(m),f=u(f)),y!==m&&d.push(ia.replaceMove(new Pn(p,1,p,y.length+1),vVe(m,a,l))),!o.shouldIgnore(p)&&(o.shouldIncrease(p,_)?(f=c(f),m=f):o.shouldIndentNextLine(p,_)?m=c(m):m=f)}return d}function fRr(t,e){return t.tokenization.isCheapToTokenize(e)?t.tokenization.getLineTokens(e).getStandardTokenType(0)===2:!1}var mRr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},pRr=function(t,e){return function(n,i){e(n,i,t)}};const jce=class jce extends En{constructor(){super({id:jce.ID,label:I("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:Re.writable,metadata:{description:Ci("indentationToSpacesDescription","Convert the tab indentation to spaces.")}})}run(e,n){const i=n.getModel();if(!i)return;const r=i.getOptions(),o=n.getSelection();if(!o)return;const s=new _Rr(o,r.tabSize);n.pushUndoStop(),n.executeCommands(this.id,[s]),n.pushUndoStop(),i.updateOptions({insertSpaces:!0})}};jce.ID="editor.action.indentationToSpaces";let p4e=jce;const Fce=class Fce extends En{constructor(){super({id:Fce.ID,label:I("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:Re.writable,metadata:{description:Ci("indentationToTabsDescription","Convert the spaces indentation to tabs.")}})}run(e,n){const i=n.getModel();if(!i)return;const r=i.getOptions(),o=n.getSelection();if(!o)return;const s=new xRr(o,r.tabSize);n.pushUndoStop(),n.executeCommands(this.id,[s]),n.pushUndoStop(),i.updateOptions({insertSpaces:!1})}};Fce.ID="editor.action.indentationToTabs";let g4e=Fce;class TWe extends En{constructor(e,n,i){super(i),this.insertSpaces=e,this.displaySizeOnly=n}run(e,n){const i=e.get(wb),r=e.get(Ds),o=n.getModel();if(!o)return;const s=r.getCreationOptions(o.getLanguageId(),o.uri,o.isForSimpleWidget),a=o.getOptions(),l=[1,2,3,4,5,6,7,8].map(u=>({id:u.toString(),label:u.toString(),description:u===s.tabSize&&u===a.tabSize?I("configuredTabSize","Configured Tab Size"):u===s.tabSize?I("defaultTabSize","Default Tab Size"):u===a.tabSize?I("currentTabSize","Current Tab Size"):void 0})),c=Math.min(o.getOptions().tabSize-1,7);setTimeout(()=>{i.pick(l,{placeHolder:I({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:l[c]}).then(u=>{if(u&&o&&!o.isDisposed()){const d=parseInt(u.label,10);this.displaySizeOnly?o.updateOptions({tabSize:d}):o.updateOptions({tabSize:d,indentSize:d,insertSpaces:this.insertSpaces})}})},50)}}const $ce=class $ce extends TWe{constructor(){super(!1,!1,{id:$ce.ID,label:I("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0,metadata:{description:Ci("indentUsingTabsDescription","Use indentation with tabs.")}})}};$ce.ID="editor.action.indentUsingTabs";let b4e=$ce;const Vce=class Vce extends TWe{constructor(){super(!0,!1,{id:Vce.ID,label:I("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0,metadata:{description:Ci("indentUsingSpacesDescription","Use indentation with spaces.")}})}};Vce.ID="editor.action.indentUsingSpaces";let v4e=Vce;const Bce=class Bce extends TWe{constructor(){super(!0,!0,{id:Bce.ID,label:I("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0,metadata:{description:Ci("changeTabDisplaySizeDescription","Change the space size equivalent of the tab.")}})}};Bce.ID="editor.action.changeTabDisplaySize";let y4e=Bce;const zce=class zce extends En{constructor(){super({id:zce.ID,label:I("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0,metadata:{description:Ci("detectIndentationDescription","Detect the indentation from content.")}})}run(e,n){const i=e.get(Ds),r=n.getModel();if(!r)return;const o=i.getCreationOptions(r.getLanguageId(),r.uri,r.isForSimpleWidget);r.detectIndentation(o.insertSpaces,o.tabSize)}};zce.ID="editor.action.detectIndentation";let _4e=zce;class gRr extends En{constructor(){super({id:"editor.action.reindentlines",label:I("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:Re.writable,metadata:{description:Ci("editor.reindentlinesDescription","Reindent the lines of the editor.")}})}run(e,n){const i=e.get(bs),r=n.getModel();if(!r)return;const o=TGt(r,i,1,r.getLineCount());o.length>0&&(n.pushUndoStop(),n.executeEdits(this.id,o),n.pushUndoStop())}}class bRr extends En{constructor(){super({id:"editor.action.reindentselectedlines",label:I("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:Re.writable,metadata:{description:Ci("editor.reindentselectedlinesDescription","Reindent the selected lines of the editor.")}})}run(e,n){const i=e.get(bs),r=n.getModel();if(!r)return;const o=n.getSelections();if(o===null)return;const s=[];for(const a of o){let l=a.startLineNumber,c=a.endLineNumber;if(l!==c&&a.endColumn===1&&c--,l===1){if(l===c)continue}else l--;const u=TGt(r,i,l,c);s.push(...u)}s.length>0&&(n.pushUndoStop(),n.executeEdits(this.id,s),n.pushUndoStop())}}class vRr{constructor(e,n){this._initialSelection=n,this._edits=[],this._selectionId=null;for(const i of e)i.range&&typeof i.text=="string"&&this._edits.push(i)}getEditOperations(e,n){for(const r of this._edits)n.addEditOperation(ve.lift(r.range),r.text);let i=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=n.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=n.trackSelection(this._initialSelection,!1))),i||(this._selectionId=n.trackSelection(this._initialSelection))}computeCursorState(e,n){return n.getTrackedSelection(this._selectionId)}}var rj;let cle=(rj=class{constructor(e,n){this.editor=e,this._languageConfigurationService=n,this.callOnDispose=new Lt,this.callOnModel=new Lt,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(12)<4||this.editor.getOption(55))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){const n=this.editor.getSelections();if(n===null||n.length>1)return;const i=this.editor.getModel();if(!i||this.rangeContainsOnlyWhitespaceCharacters(i,e)||yRr(i,e)||!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const o=this.editor.getOption(12),{tabSize:s,indentSize:a,insertSpaces:l}=i.getOptions(),c=[],u={shiftIndent:m=>lb.shiftIndent(m,m.length+1,s,a,l),unshiftIndent:m=>lb.unshiftIndent(m,m.length+1,s,a,l)};let d=e.startLineNumber;for(;d<=e.endLineNumber;){if(this.shouldIgnoreLine(i,d)){d++;continue}break}if(d>e.endLineNumber)return;let h=i.getLineContent(d);if(!/\S/.test(h.substring(0,e.startColumn-1))){const m=Y9(o,i,i.getLanguageId(),d,u,this._languageConfigurationService);if(m!==null){const p=Zo(h),g=Qf(m,s),y=Qf(p,s);if(g!==y){const _=HB(g,s,l);c.push({range:new ve(d,1,d,p.length+1),text:_}),h=_+h.substring(p.length)}else{const _=fjt(i,d,this._languageConfigurationService);if(_===0||_===8)return}}}const f=d;for(;d<e.endLineNumber;){if(!/\S/.test(i.getLineContent(d+1))){d++;continue}break}if(d!==e.endLineNumber){const p=Y9(o,{tokenization:{getLineTokens:g=>i.tokenization.getLineTokens(g),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(g,y)=>i.getLanguageIdAtPosition(g,y)},getLineContent:g=>g===f?h:i.getLineContent(g)},i.getLanguageId(),d+1,u,this._languageConfigurationService);if(p!==null){const g=Qf(p,s),y=Qf(Zo(i.getLineContent(d+1)),s);if(g!==y){const _=g-y;for(let w=d+1;w<=e.endLineNumber;w++){const C=i.getLineContent(w),N=Zo(C),D=Qf(N,s)+_,k=HB(D,s,l);k!==N&&c.push({range:new ve(w,1,w,N.length+1),text:k})}}}}if(c.length>0){this.editor.pushUndoStop();const m=new vRr(c,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",m),this.editor.pushUndoStop()}}rangeContainsOnlyWhitespaceCharacters(e,n){const i=o=>o.trim().length===0;let r=!0;if(n.startLineNumber===n.endLineNumber){const s=e.getLineContent(n.startLineNumber).substring(n.startColumn-1,n.endColumn-1);r=i(s)}else for(let o=n.startLineNumber;o<=n.endLineNumber;o++){const s=e.getLineContent(o);if(o===n.startLineNumber){const a=s.substring(n.startColumn-1);r=i(a)}else if(o===n.endLineNumber){const a=s.substring(0,n.endColumn-1);r=i(a)}else r=e.getLineFirstNonWhitespaceColumn(o)===0;if(!r)break}return r}shouldIgnoreLine(e,n){e.tokenization.forceTokenization(n);const i=e.getLineFirstNonWhitespaceColumn(n);if(i===0)return!0;const r=e.tokenization.getLineTokens(n);if(r.getCount()>0){const o=r.findTokenIndexAtOffset(i);if(o>=0&&r.getStandardTokenType(o)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}},rj.ID="editor.contrib.autoIndentOnPaste",rj);cle=mRr([pRr(1,bs)],cle);function yRr(t,e){const n=i=>dgi(t,i)===2;return n(e.getStartPosition())||n(e.getEndPosition())}function IGt(t,e,n,i){if(t.getLineCount()===1&&t.getLineMaxColumn(1)===1)return;let r="";for(let s=0;s<n;s++)r+=" ";const o=new RegExp(r,"gi");for(let s=1,a=t.getLineCount();s<=a;s++){let l=t.getLineFirstNonWhitespaceColumn(s);if(l===0&&(l=t.getLineMaxColumn(s)),l===1)continue;const c=new ve(s,1,s,l),u=t.getValueInRange(c),d=i?u.replace(/\t/ig,r):u.replace(o,"	");e.addEditOperation(c,d)}}class _Rr{constructor(e,n){this.selection=e,this.tabSize=n,this.selectionId=null}getEditOperations(e,n){this.selectionId=n.trackSelection(this.selection),IGt(e,n,this.tabSize,!0)}computeCursorState(e,n){return n.getTrackedSelection(this.selectionId)}}class xRr{constructor(e,n){this.selection=e,this.tabSize=n,this.selectionId=null}getEditOperations(e,n){this.selectionId=n.trackSelection(this.selection),IGt(e,n,this.tabSize,!1)}computeCursorState(e,n){return n.getTrackedSelection(this.selectionId)}}Wr(cle.ID,cle,2);Ht(p4e);Ht(g4e);Ht(b4e);Ht(v4e);Ht(y4e);Ht(_4e);Ht(gRr);Ht(bRr);Wr(FU.ID,FU,1);wR.register(Bae);class wRr{constructor(e,n,i){this._editRange=e,this._originalSelection=n,this._text=i}getEditOperations(e,n){n.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,n){const r=n.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new Pn(r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn),r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn)):new Pn(r.endLineNumber,r.endColumn-this._text.length,r.endLineNumber,r.endColumn)}}var CRr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},SRr=function(t,e){return function(n,i){e(n,i,t)}},Wte,FD;let vF=(FD=class{static get(e){return e.getContribution(Wte.ID)}constructor(e,n){this.editor=e,this.editorWorkerService=n,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,n){var l;(l=this.currentRequest)==null||l.cancel();const i=this.editor.getSelection(),r=this.editor.getModel();if(!r||!i)return;let o=i;if(o.startLineNumber!==o.endLineNumber)return;const s=new i6t(this.editor,5),a=r.uri;return this.editorWorkerService.canNavigateValueSet(a)?(this.currentRequest=cc(c=>this.editorWorkerService.navigateValueSet(a,o,n)),this.currentRequest.then(c=>{var m;if(!c||!c.range||!c.value||!s.validate(this.editor))return;const u=ve.lift(c.range);let d=c.range;const h=c.value.length-(o.endColumn-o.startColumn);d={startLineNumber:d.startLineNumber,startColumn:d.startColumn,endLineNumber:d.endLineNumber,endColumn:d.startColumn+c.value.length},h>1&&(o=new Pn(o.startLineNumber,o.startColumn,o.endLineNumber,o.endColumn+h-1));const f=new wRr(u,o,c.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,f),this.editor.pushUndoStop(),this.decorations.set([{range:d,options:Wte.DECORATION}]),(m=this.decorationRemover)==null||m.cancel(),this.decorationRemover=uw(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(ji)}).catch(ji)):Promise.resolve(void 0)}},Wte=FD,FD.ID="editor.contrib.inPlaceReplaceController",FD.DECORATION=Hi.register({description:"in-place-replace",className:"valueSetReplacement"}),FD);vF=Wte=CRr([SRr(1,xb)],vF);class NRr extends En{constructor(){super({id:"editor.action.inPlaceReplace.up",label:I("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:Re.writable,kbOpts:{kbExpr:Re.editorTextFocus,primary:3159,weight:100}})}run(e,n){const i=vF.get(n);return i?i.run(this.id,!1):Promise.resolve(void 0)}}class ERr extends En{constructor(){super({id:"editor.action.inPlaceReplace.down",label:I("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:Re.writable,kbOpts:{kbExpr:Re.editorTextFocus,primary:3161,weight:100}})}run(e,n){const i=vF.get(n);return i?i.run(this.id,!0):Promise.resolve(void 0)}}Wr(vF.ID,vF,4);Ht(NRr);Ht(ERr);class DRr extends En{constructor(){super({id:"expandLineSelection",label:I("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:Re.textInputFocus,primary:2090}})}run(e,n,i){if(i=i||{},!n.hasModel())return;const r=n._getViewModel();r.model.pushStackElement(),r.setCursorStates(i.source,3,qc.expandLineSelection(r,r.getCursorStates())),r.revealAllCursors(i.source,!0)}}Ht(DRr);class kRr{constructor(e,n,i){this._selection=e,this._cursors=n,this._selectionId=null,this._trimInRegexesAndStrings=i}getEditOperations(e,n){const i=MRr(e,this._cursors,this._trimInRegexesAndStrings);for(let r=0,o=i.length;r<o;r++){const s=i[r];n.addEditOperation(s.range,s.text)}this._selectionId=n.trackSelection(this._selection)}computeCursorState(e,n){return n.getTrackedSelection(this._selectionId)}}function MRr(t,e,n){e.sort((a,l)=>a.lineNumber===l.lineNumber?a.column-l.column:a.lineNumber-l.lineNumber);for(let a=e.length-2;a>=0;a--)e[a].lineNumber===e[a+1].lineNumber&&e.splice(a,1);const i=[];let r=0,o=0;const s=e.length;for(let a=1,l=t.getLineCount();a<=l;a++){const c=t.getLineContent(a),u=c.length+1;let d=0;if(o<s&&e[o].lineNumber===a&&(d=e[o].column,o++,d===u)||c.length===0)continue;const h=w0(c);let f=0;if(h===-1)f=1;else if(h!==c.length-1)f=h+2;else continue;if(!n){if(!t.tokenization.hasAccurateTokensForLine(a))continue;const m=t.tokenization.getLineTokens(a),p=m.getStandardTokenType(m.findTokenIndexAtOffset(f));if(p===2||p===3)continue}f=Math.max(d,f),i[r++]=ia.delete(new ve(a,f,a,u))}return i}class AGt{constructor(e,n,i){this._selection=e,this._isCopyingDown=n,this._noop=i||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,n){let i=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,i.startLineNumber<i.endLineNumber&&i.endColumn===1&&(this._endLineNumberDelta=1,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));const r=[];for(let s=i.startLineNumber;s<=i.endLineNumber;s++)r.push(e.getLineContent(s));const o=r.join(`
`);o===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?n.addEditOperation(new ve(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber+1,1),i.endLineNumber===e.getLineCount()?"":`
`):this._isCopyingDown?n.addEditOperation(new ve(i.startLineNumber,1,i.startLineNumber,1),o+`
`):n.addEditOperation(new ve(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),`
`+o),this._selectionId=n.trackSelection(i),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,n){let i=n.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let r=i.startLineNumber,o=i.startColumn,s=i.endLineNumber,a=i.endColumn;this._startLineNumberDelta!==0&&(r=r+this._startLineNumberDelta,o=1),this._endLineNumberDelta!==0&&(s=s+this._endLineNumberDelta,a=1),i=Pn.createWithDirection(r,o,s,a,this._selectionDirection)}return i}}var LRr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},TRr=function(t,e){return function(n,i){e(n,i,t)}};let x4e=class{constructor(e,n,i,r){this._languageConfigurationService=r,this._selection=e,this._isMovingDown=n,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,n){const i=()=>e.getLanguageId(),r=(d,h)=>e.getLanguageIdAtPosition(d,h),o=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===o){this._selectionId=n.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=n.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let s=this._selection;s.startLineNumber<s.endLineNumber&&s.endColumn===1&&(this._moveEndPositionDown=!0,s=s.setEndPosition(s.endLineNumber-1,e.getLineMaxColumn(s.endLineNumber-1)));const{tabSize:a,indentSize:l,insertSpaces:c}=e.getOptions(),u=this.buildIndentConverter(a,l,c);if(s.startLineNumber===s.endLineNumber&&e.getLineMaxColumn(s.startLineNumber)===1){const d=s.startLineNumber,h=this._isMovingDown?d+1:d-1;e.getLineMaxColumn(h)===1?n.addEditOperation(new ve(1,1,1,1),null):(n.addEditOperation(new ve(d,1,d,1),e.getLineContent(h)),n.addEditOperation(new ve(h,1,h,e.getLineMaxColumn(h)),null)),s=new Pn(h,1,h,1)}else{let d,h;if(this._isMovingDown){d=s.endLineNumber+1,h=e.getLineContent(d),n.addEditOperation(new ve(d-1,e.getLineMaxColumn(d-1),d,e.getLineMaxColumn(d)),null);let f=h;if(this.shouldAutoIndent(e,s)){const m=this.matchEnterRule(e,u,a,d,s.startLineNumber-1);if(m!==null){const g=Zo(e.getLineContent(d)),y=m+Qf(g,a);f=HB(y,a,c)+this.trimStart(h)}else{const g={tokenization:{getLineTokens:_=>_===s.startLineNumber?e.tokenization.getLineTokens(d):e.tokenization.getLineTokens(_),getLanguageId:i,getLanguageIdAtPosition:r},getLineContent:_=>_===s.startLineNumber?e.getLineContent(d):e.getLineContent(_)},y=Y9(this._autoIndent,g,e.getLanguageIdAtPosition(d,1),s.startLineNumber,u,this._languageConfigurationService);if(y!==null){const _=Zo(e.getLineContent(d)),w=Qf(y,a),C=Qf(_,a);w!==C&&(f=HB(w,a,c)+this.trimStart(h))}}n.addEditOperation(new ve(s.startLineNumber,1,s.startLineNumber,1),f+`
`);const p=this.matchEnterRuleMovingDown(e,u,a,s.startLineNumber,d,f);if(p!==null)p!==0&&this.getIndentEditsOfMovingBlock(e,n,s,a,c,p);else{const g={tokenization:{getLineTokens:_=>_===s.startLineNumber?e.tokenization.getLineTokens(d):_>=s.startLineNumber+1&&_<=s.endLineNumber+1?e.tokenization.getLineTokens(_-1):e.tokenization.getLineTokens(_),getLanguageId:i,getLanguageIdAtPosition:r},getLineContent:_=>_===s.startLineNumber?f:_>=s.startLineNumber+1&&_<=s.endLineNumber+1?e.getLineContent(_-1):e.getLineContent(_)},y=Y9(this._autoIndent,g,e.getLanguageIdAtPosition(d,1),s.startLineNumber+1,u,this._languageConfigurationService);if(y!==null){const _=Zo(e.getLineContent(s.startLineNumber)),w=Qf(y,a),C=Qf(_,a);if(w!==C){const N=w-C;this.getIndentEditsOfMovingBlock(e,n,s,a,c,N)}}}}else n.addEditOperation(new ve(s.startLineNumber,1,s.startLineNumber,1),f+`
`)}else if(d=s.startLineNumber-1,h=e.getLineContent(d),n.addEditOperation(new ve(d,1,d+1,1),null),n.addEditOperation(new ve(s.endLineNumber,e.getLineMaxColumn(s.endLineNumber),s.endLineNumber,e.getLineMaxColumn(s.endLineNumber)),`
`+h),this.shouldAutoIndent(e,s)){const f={tokenization:{getLineTokens:p=>p===d?e.tokenization.getLineTokens(s.startLineNumber):e.tokenization.getLineTokens(p),getLanguageId:i,getLanguageIdAtPosition:r},getLineContent:p=>p===d?e.getLineContent(s.startLineNumber):e.getLineContent(p)},m=this.matchEnterRule(e,u,a,s.startLineNumber,s.startLineNumber-2);if(m!==null)m!==0&&this.getIndentEditsOfMovingBlock(e,n,s,a,c,m);else{const p=Y9(this._autoIndent,f,e.getLanguageIdAtPosition(s.startLineNumber,1),d,u,this._languageConfigurationService);if(p!==null){const g=Zo(e.getLineContent(s.startLineNumber)),y=Qf(p,a),_=Qf(g,a);if(y!==_){const w=y-_;this.getIndentEditsOfMovingBlock(e,n,s,a,c,w)}}}}}this._selectionId=n.trackSelection(s)}buildIndentConverter(e,n,i){return{shiftIndent:r=>lb.shiftIndent(r,r.length+1,e,n,i),unshiftIndent:r=>lb.unshiftIndent(r,r.length+1,e,n,i)}}parseEnterResult(e,n,i,r,o){if(o){let s=o.indentation;o.indentAction===kl.None||o.indentAction===kl.Indent?s=o.indentation+o.appendText:o.indentAction===kl.IndentOutdent?s=o.indentation:o.indentAction===kl.Outdent&&(s=n.unshiftIndent(o.indentation)+o.appendText);const a=e.getLineContent(r);if(this.trimStart(a).indexOf(this.trimStart(s))>=0){const l=Zo(e.getLineContent(r));let c=Zo(s);const u=fjt(e,r,this._languageConfigurationService);u!==null&&u&2&&(c=n.unshiftIndent(c));const d=Qf(c,i),h=Qf(l,i);return d-h}}return null}matchEnterRuleMovingDown(e,n,i,r,o,s){if(w0(s)>=0){const a=e.getLineMaxColumn(o),l=N3(this._autoIndent,e,new ve(o,a,o,a),this._languageConfigurationService);return this.parseEnterResult(e,n,i,r,l)}else{let a=r-1;for(;a>=1;){const u=e.getLineContent(a);if(w0(u)>=0)break;a--}if(a<1||r>e.getLineCount())return null;const l=e.getLineMaxColumn(a),c=N3(this._autoIndent,e,new ve(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,n,i,r,c)}}matchEnterRule(e,n,i,r,o,s){let a=o;for(;a>=1;){let u;if(a===o&&s!==void 0?u=s:u=e.getLineContent(a),w0(u)>=0)break;a--}if(a<1||r>e.getLineCount())return null;const l=e.getLineMaxColumn(a),c=N3(this._autoIndent,e,new ve(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,n,i,r,c)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,n){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(n.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(n.startLineNumber,1),r=e.getLanguageIdAtPosition(n.endLineNumber,1);return!(i!==r||this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,n,i,r,o,s){for(let a=i.startLineNumber;a<=i.endLineNumber;a++){const l=e.getLineContent(a),c=Zo(l),d=Qf(c,r)+s,h=HB(d,r,o);h!==c&&(n.addEditOperation(new ve(a,1,a,c.length+1),h),a===i.endLineNumber&&i.endColumn<=c.length+1&&h===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,n){let i=n.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber<i.endLineNumber&&(i=i.setEndPosition(i.endLineNumber,2)),i}};x4e=LRr([TRr(3,bs)],x4e);const X4=class X4{static getCollator(){return X4._COLLATOR||(X4._COLLATOR=new Intl.Collator),X4._COLLATOR}constructor(e,n){this.selection=e,this.descending=n,this.selectionId=null}getEditOperations(e,n){const i=IRr(e,this.selection,this.descending);i&&n.addEditOperation(i.range,i.text),this.selectionId=n.trackSelection(this.selection)}computeCursorState(e,n){return n.getTrackedSelection(this.selectionId)}static canRun(e,n,i){if(e===null)return!1;const r=RGt(e,n,i);if(!r)return!1;for(let o=0,s=r.before.length;o<s;o++)if(r.before[o]!==r.after[o])return!0;return!1}};X4._COLLATOR=null;let HU=X4;function RGt(t,e,n){const i=e.startLineNumber;let r=e.endLineNumber;if(e.endColumn===1&&r--,i>=r)return null;const o=[];for(let a=i;a<=r;a++)o.push(t.getLineContent(a));let s=o.slice(0);return s.sort(HU.getCollator().compare),n===!0&&(s=s.reverse()),{startLineNumber:i,endLineNumber:r,before:o,after:s}}function IRr(t,e,n){const i=RGt(t,e,n);return i?ia.replace(new ve(i.startLineNumber,1,i.endLineNumber,t.getLineMaxColumn(i.endLineNumber)),i.after.join(`
`)):null}class PGt extends En{constructor(e,n){super(n),this.down=e}run(e,n){if(!n.hasModel())return;const i=n.getSelections().map((s,a)=>({selection:s,index:a,ignore:!1}));i.sort((s,a)=>ve.compareRangesUsingStarts(s.selection,a.selection));let r=i[0];for(let s=1;s<i.length;s++){const a=i[s];r.selection.endLineNumber===a.selection.startLineNumber&&(r.index<a.index?a.ignore=!0:(r.ignore=!0,r=a))}const o=[];for(const s of i)o.push(new AGt(s.selection,this.down,s.ignore));n.pushUndoStop(),n.executeCommands(this.id,o),n.pushUndoStop()}}class ARr extends PGt{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:I("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:Re.writable,kbOpts:{kbExpr:Re.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:Rn.MenubarSelectionMenu,group:"2_line",title:I({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}class RRr extends PGt{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:I("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:Re.writable,kbOpts:{kbExpr:Re.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:Rn.MenubarSelectionMenu,group:"2_line",title:I({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}class PRr extends En{constructor(){super({id:"editor.action.duplicateSelection",label:I("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:Re.writable,menuOpts:{menuId:Rn.MenubarSelectionMenu,group:"2_line",title:I({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(e,n,i){if(!n.hasModel())return;const r=[],o=n.getSelections(),s=n.getModel();for(const a of o)if(a.isEmpty())r.push(new AGt(a,!0));else{const l=new Pn(a.endLineNumber,a.endColumn,a.endLineNumber,a.endColumn);r.push(new y0i(l,s.getValueInRange(a)))}n.pushUndoStop(),n.executeCommands(this.id,r),n.pushUndoStop()}}class OGt extends En{constructor(e,n){super(n),this.down=e}run(e,n){const i=e.get(bs),r=[],o=n.getSelections()||[],s=n.getOption(12);for(const a of o)r.push(new x4e(a,this.down,s,i));n.pushUndoStop(),n.executeCommands(this.id,r),n.pushUndoStop()}}class ORr extends OGt{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:I("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:Re.writable,kbOpts:{kbExpr:Re.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:Rn.MenubarSelectionMenu,group:"2_line",title:I({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}class jRr extends OGt{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:I("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:Re.writable,kbOpts:{kbExpr:Re.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:Rn.MenubarSelectionMenu,group:"2_line",title:I({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}class jGt extends En{constructor(e,n){super(n),this.descending=e}run(e,n){if(!n.hasModel())return;const i=n.getModel();let r=n.getSelections();r.length===1&&r[0].isEmpty()&&(r=[new Pn(1,1,i.getLineCount(),i.getLineMaxColumn(i.getLineCount()))]);for(const s of r)if(!HU.canRun(n.getModel(),s,this.descending))return;const o=[];for(let s=0,a=r.length;s<a;s++)o[s]=new HU(r[s],this.descending);n.pushUndoStop(),n.executeCommands(this.id,o),n.pushUndoStop()}}class FRr extends jGt{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:I("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:Re.writable})}}class $Rr extends jGt{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:I("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:Re.writable})}}class VRr extends En{constructor(){super({id:"editor.action.removeDuplicateLines",label:I("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:Re.writable})}run(e,n){if(!n.hasModel())return;const i=n.getModel();if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return;const r=[],o=[];let s=0,a=!0,l=n.getSelections();l.length===1&&l[0].isEmpty()&&(l=[new Pn(1,1,i.getLineCount(),i.getLineMaxColumn(i.getLineCount()))],a=!1);for(const c of l){const u=new Set,d=[];for(let p=c.startLineNumber;p<=c.endLineNumber;p++){const g=i.getLineContent(p);u.has(g)||(d.push(g),u.add(g))}const h=new Pn(c.startLineNumber,1,c.endLineNumber,i.getLineMaxColumn(c.endLineNumber)),f=c.startLineNumber-s,m=new Pn(f,1,f+d.length-1,d[d.length-1].length);r.push(ia.replace(h,d.join(`
`))),o.push(m),s+=c.endLineNumber-c.startLineNumber+1-d.length}n.pushUndoStop(),n.executeEdits(this.id,r,a?o:void 0),n.pushUndoStop()}}const Hce=class Hce extends En{constructor(){super({id:Hce.ID,label:I("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:Re.writable,kbOpts:{kbExpr:Re.editorTextFocus,primary:Tl(2089,2102),weight:100}})}run(e,n,i){let r=[];i.reason==="auto-save"&&(r=(n.getSelections()||[]).map(u=>new ot(u.positionLineNumber,u.positionColumn)));const o=n.getSelection();if(o===null)return;const s=e.get(cr),a=n.getModel(),l=s.getValue("files.trimTrailingWhitespaceInRegexAndStrings",{overrideIdentifier:a==null?void 0:a.getLanguageId(),resource:a==null?void 0:a.uri}),c=new kRr(o,r,l);n.pushUndoStop(),n.executeCommands(this.id,[c]),n.pushUndoStop()}};Hce.ID="editor.action.trimTrailingWhitespace";let w4e=Hce;class BRr extends En{constructor(){super({id:"editor.action.deleteLines",label:I("lines.delete","Delete Line"),alias:"Delete Line",precondition:Re.writable,kbOpts:{kbExpr:Re.textInputFocus,primary:3113,weight:100}})}run(e,n){if(!n.hasModel())return;const i=this._getLinesToRemove(n),r=n.getModel();if(r.getLineCount()===1&&r.getLineMaxColumn(1)===1)return;let o=0;const s=[],a=[];for(let l=0,c=i.length;l<c;l++){const u=i[l];let d=u.startLineNumber,h=u.endLineNumber,f=1,m=r.getLineMaxColumn(h);h<r.getLineCount()?(h+=1,m=1):d>1&&(d-=1,f=r.getLineMaxColumn(d)),s.push(ia.replace(new Pn(d,f,h,m),"")),a.push(new Pn(d-o,u.positionColumn,d-o,u.positionColumn)),o+=u.endLineNumber-u.startLineNumber+1}n.pushUndoStop(),n.executeEdits(this.id,s,a),n.pushUndoStop()}_getLinesToRemove(e){const n=e.getSelections().map(o=>{let s=o.endLineNumber;return o.startLineNumber<o.endLineNumber&&o.endColumn===1&&(s-=1),{startLineNumber:o.startLineNumber,selectionStartColumn:o.selectionStartColumn,endLineNumber:s,positionColumn:o.positionColumn}});n.sort((o,s)=>o.startLineNumber===s.startLineNumber?o.endLineNumber-s.endLineNumber:o.startLineNumber-s.startLineNumber);const i=[];let r=n[0];for(let o=1;o<n.length;o++)r.endLineNumber+1>=n[o].startLineNumber?r.endLineNumber=n[o].endLineNumber:(i.push(r),r=n[o]);return i.push(r),i}}class zRr extends En{constructor(){super({id:"editor.action.indentLines",label:I("lines.indent","Indent Line"),alias:"Indent Line",precondition:Re.writable,kbOpts:{kbExpr:Re.editorTextFocus,primary:2142,weight:100}})}run(e,n){const i=n._getViewModel();i&&(n.pushUndoStop(),n.executeCommands(this.id,NE.indent(i.cursorConfig,n.getModel(),n.getSelections())),n.pushUndoStop())}}class HRr extends En{constructor(){super({id:"editor.action.outdentLines",label:I("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:Re.writable,kbOpts:{kbExpr:Re.editorTextFocus,primary:2140,weight:100}})}run(e,n){E3.Outdent.runEditorCommand(e,n,null)}}class WRr extends En{constructor(){super({id:"editor.action.insertLineBefore",label:I("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:Re.writable,kbOpts:{kbExpr:Re.editorTextFocus,primary:3075,weight:100}})}run(e,n){const i=n._getViewModel();i&&(n.pushUndoStop(),n.executeCommands(this.id,ame.lineInsertBefore(i.cursorConfig,n.getModel(),n.getSelections())))}}class URr extends En{constructor(){super({id:"editor.action.insertLineAfter",label:I("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:Re.writable,kbOpts:{kbExpr:Re.editorTextFocus,primary:2051,weight:100}})}run(e,n){const i=n._getViewModel();i&&(n.pushUndoStop(),n.executeCommands(this.id,ame.lineInsertAfter(i.cursorConfig,n.getModel(),n.getSelections())))}}class FGt extends En{run(e,n){if(!n.hasModel())return;const i=n.getSelection(),r=this._getRangesToDelete(n),o=[];for(let l=0,c=r.length-1;l<c;l++){const u=r[l],d=r[l+1];ve.intersectRanges(u,d)===null?o.push(u):r[l+1]=ve.plusRange(u,d)}o.push(r[r.length-1]);const s=this._getEndCursorState(i,o),a=o.map(l=>ia.replace(l,""));n.pushUndoStop(),n.executeEdits(this.id,a,s),n.pushUndoStop()}}class KRr extends FGt{constructor(){super({id:"deleteAllLeft",label:I("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:Re.writable,kbOpts:{kbExpr:Re.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,n){let i=null;const r=[];let o=0;return n.forEach(s=>{let a;if(s.endColumn===1&&o>0){const l=s.startLineNumber-o;a=new Pn(l,s.startColumn,l,s.startColumn)}else a=new Pn(s.startLineNumber,s.startColumn,s.startLineNumber,s.startColumn);o+=s.endLineNumber-s.startLineNumber,s.intersectRanges(e)?i=a:r.push(a)}),i&&r.unshift(i),r}_getRangesToDelete(e){const n=e.getSelections();if(n===null)return[];let i=n;const r=e.getModel();return r===null?[]:(i.sort(ve.compareRangesUsingStarts),i=i.map(o=>{if(o.isEmpty())if(o.startColumn===1){const s=Math.max(1,o.startLineNumber-1),a=o.startLineNumber===1?1:r.getLineLength(s)+1;return new ve(s,a,o.startLineNumber,1)}else return new ve(o.startLineNumber,1,o.startLineNumber,o.startColumn);else return new ve(o.startLineNumber,1,o.endLineNumber,o.endColumn)}),i)}}class qRr extends FGt{constructor(){super({id:"deleteAllRight",label:I("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:Re.writable,kbOpts:{kbExpr:Re.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,n){let i=null;const r=[];for(let o=0,s=n.length,a=0;o<s;o++){const l=n[o],c=new Pn(l.startLineNumber-a,l.startColumn,l.startLineNumber-a,l.startColumn);l.intersectRanges(e)?i=c:r.push(c)}return i&&r.unshift(i),r}_getRangesToDelete(e){const n=e.getModel();if(n===null)return[];const i=e.getSelections();if(i===null)return[];const r=i.map(o=>{if(o.isEmpty()){const s=n.getLineMaxColumn(o.startLineNumber);return o.startColumn===s?new ve(o.startLineNumber,o.startColumn,o.startLineNumber+1,1):new ve(o.startLineNumber,o.startColumn,o.startLineNumber,s)}return o});return r.sort(ve.compareRangesUsingStarts),r}}class GRr extends En{constructor(){super({id:"editor.action.joinLines",label:I("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:Re.writable,kbOpts:{kbExpr:Re.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,n){const i=n.getSelections();if(i===null)return;let r=n.getSelection();if(r===null)return;i.sort(ve.compareRangesUsingStarts);const o=[],s=i.reduce((h,f)=>h.isEmpty()?h.endLineNumber===f.startLineNumber?(r.equalsSelection(h)&&(r=f),f):f.startLineNumber>h.endLineNumber+1?(o.push(h),f):new Pn(h.startLineNumber,h.startColumn,f.endLineNumber,f.endColumn):f.startLineNumber>h.endLineNumber?(o.push(h),f):new Pn(h.startLineNumber,h.startColumn,f.endLineNumber,f.endColumn));o.push(s);const a=n.getModel();if(a===null)return;const l=[],c=[];let u=r,d=0;for(let h=0,f=o.length;h<f;h++){const m=o[h],p=m.startLineNumber,g=1;let y=0,_,w;const C=a.getLineLength(m.endLineNumber)-m.endColumn;if(m.isEmpty()||m.startLineNumber===m.endLineNumber){const D=m.getStartPosition();D.lineNumber<a.getLineCount()?(_=p+1,w=a.getLineMaxColumn(_)):(_=D.lineNumber,w=a.getLineMaxColumn(D.lineNumber))}else _=m.endLineNumber,w=a.getLineMaxColumn(_);let N=a.getLineContent(p);for(let D=p+1;D<=_;D++){const k=a.getLineContent(D),M=a.getLineFirstNonWhitespaceColumn(D);if(M>=1){let T=!0;N===""&&(T=!1),T&&(N.charAt(N.length-1)===" "||N.charAt(N.length-1)==="	")&&(T=!1,N=N.replace(/[\s\uFEFF\xA0]+$/g," "));const A=k.substr(M-1);N+=(T?" ":"")+A,T?y=A.length+1:y=A.length}else y=0}const E=new ve(p,g,_,w);if(!E.isEmpty()){let D;m.isEmpty()?(l.push(ia.replace(E,N)),D=new Pn(E.startLineNumber-d,N.length-y+1,p-d,N.length-y+1)):m.startLineNumber===m.endLineNumber?(l.push(ia.replace(E,N)),D=new Pn(m.startLineNumber-d,m.startColumn,m.endLineNumber-d,m.endColumn)):(l.push(ia.replace(E,N)),D=new Pn(m.startLineNumber-d,m.startColumn,m.startLineNumber-d,N.length-C)),ve.intersectRanges(E,r)!==null?u=D:c.push(D)}d+=E.endLineNumber-E.startLineNumber}c.unshift(u),n.pushUndoStop(),n.executeEdits(this.id,l,c),n.pushUndoStop()}}class YRr extends En{constructor(){super({id:"editor.action.transpose",label:I("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:Re.writable})}run(e,n){const i=n.getSelections();if(i===null)return;const r=n.getModel();if(r===null)return;const o=[];for(let s=0,a=i.length;s<a;s++){const l=i[s];if(!l.isEmpty())continue;const c=l.getStartPosition(),u=r.getLineMaxColumn(c.lineNumber);if(c.column>=u){if(c.lineNumber===r.getLineCount())continue;const d=new ve(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h=r.getValueInRange(d).split("").reverse().join("");o.push(new Su(new Pn(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h))}else{const d=new ve(c.lineNumber,Math.max(1,c.column-1),c.lineNumber,c.column+1),h=r.getValueInRange(d).split("").reverse().join("");o.push(new yVe(d,h,new Pn(c.lineNumber,c.column+1,c.lineNumber,c.column+1)))}}n.pushUndoStop(),n.executeCommands(this.id,o),n.pushUndoStop()}}class NR extends En{run(e,n){const i=n.getSelections();if(i===null)return;const r=n.getModel();if(r===null)return;const o=n.getOption(132),s=[];for(const a of i)if(a.isEmpty()){const l=a.getStartPosition(),c=n.getConfiguredWordAtPosition(l);if(!c)continue;const u=new ve(l.lineNumber,c.startColumn,l.lineNumber,c.endColumn),d=r.getValueInRange(u);s.push(ia.replace(u,this._modifyText(d,o)))}else{const l=r.getValueInRange(a);s.push(ia.replace(a,this._modifyText(l,o)))}n.pushUndoStop(),n.executeEdits(this.id,s),n.pushUndoStop()}}class XRr extends NR{constructor(){super({id:"editor.action.transformToUppercase",label:I("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:Re.writable})}_modifyText(e,n){return e.toLocaleUpperCase()}}class ZRr extends NR{constructor(){super({id:"editor.action.transformToLowercase",label:I("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:Re.writable})}_modifyText(e,n){return e.toLocaleLowerCase()}}class qC{constructor(e,n){this._pattern=e,this._flags=n,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch{}}return this._actual}isSupported(){return this.get()!==null}}const Wce=class Wce extends NR{constructor(){super({id:"editor.action.transformToTitlecase",label:I("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:Re.writable})}_modifyText(e,n){const i=Wce.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,r=>r.toLocaleUpperCase()):e}};Wce.titleBoundary=new qC("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");let ule=Wce;const Z4=class Z4 extends NR{constructor(){super({id:"editor.action.transformToSnakecase",label:I("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:Re.writable})}_modifyText(e,n){const i=Z4.caseBoundary.get(),r=Z4.singleLetters.get();return!i||!r?e:e.replace(i,"$1_$2").replace(r,"$1_$2$3").toLocaleLowerCase()}};Z4.caseBoundary=new qC("(\\p{Ll})(\\p{Lu})","gmu"),Z4.singleLetters=new qC("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");let WB=Z4;const Uce=class Uce extends NR{constructor(){super({id:"editor.action.transformToCamelcase",label:I("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:Re.writable})}_modifyText(e,n){const i=Uce.wordBoundary.get();if(!i)return e;const r=e.split(i);return r.shift()+r.map(s=>s.substring(0,1).toLocaleUpperCase()+s.substring(1)).join("")}};Uce.wordBoundary=new qC("[_\\s-]","gm");let dle=Uce;const Q4=class Q4 extends NR{constructor(){super({id:"editor.action.transformToPascalcase",label:I("editor.transformToPascalcase","Transform to Pascal Case"),alias:"Transform to Pascal Case",precondition:Re.writable})}_modifyText(e,n){const i=Q4.wordBoundary.get(),r=Q4.wordBoundaryToMaintain.get();return!i||!r?e:e.split(r).map(a=>a.split(i)).flat().map(a=>a.substring(0,1).toLocaleUpperCase()+a.substring(1)).join("")}};Q4.wordBoundary=new qC("[_\\s-]","gm"),Q4.wordBoundaryToMaintain=new qC("(?<=\\.)","gm");let hle=Q4;const bE=class bE extends NR{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(n=>n.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:I("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:Re.writable})}_modifyText(e,n){const i=bE.caseBoundary.get(),r=bE.singleLetters.get(),o=bE.underscoreBoundary.get();return!i||!r||!o?e:e.replace(o,"$1-$3").replace(i,"$1-$2").replace(r,"$1-$2").toLocaleLowerCase()}};bE.caseBoundary=new qC("(\\p{Ll})(\\p{Lu})","gmu"),bE.singleLetters=new qC("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu"),bE.underscoreBoundary=new qC("(\\S)(_)(\\S)","gm");let fle=bE;Ht(ARr);Ht(RRr);Ht(PRr);Ht(ORr);Ht(jRr);Ht(FRr);Ht($Rr);Ht(VRr);Ht(w4e);Ht(BRr);Ht(zRr);Ht(HRr);Ht(WRr);Ht(URr);Ht(KRr);Ht(qRr);Ht(GRr);Ht(YRr);Ht(XRr);Ht(ZRr);WB.caseBoundary.isSupported()&&WB.singleLetters.isSupported()&&Ht(WB);dle.wordBoundary.isSupported()&&Ht(dle);hle.wordBoundary.isSupported()&&Ht(hle);ule.titleBoundary.isSupported()&&Ht(ule);fle.isSupported()&&Ht(fle);var QRr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},YJ=function(t,e){return function(n,i){e(n,i,t)}},Ute;const $Gt=new gn("LinkedEditingInputVisible",!1),JRr="linked-editing-decoration";var $D;let yF=($D=class extends ct{static get(e){return e.getContribution(Ute.ID)}constructor(e,n,i,r,o){super(),this.languageConfigurationService=r,this._syncRangesToken=0,this._localToDispose=this._register(new Lt),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=$Gt.bindTo(n),this._debounceInformation=o.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new Lt),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequestCts=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(s=>{(s.hasChanged(70)||s.hasChanged(94))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){const n=this._editor.getModel(),i=n!==null&&(this._editor.getOption(70)||this._editor.getOption(94))&&this._providers.has(n);if(i===this._enabled&&!e||(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||n===null))return;this._localToDispose.add(rn.runAndSubscribe(n.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition()}));const r=new Lv(this._debounceInformation.get(n)),o=()=>{this._rangeUpdateTriggerPromise=r.trigger(()=>this.updateRanges(),this._debounceDuration??this._debounceInformation.get(n))},s=new Lv(0),a=l=>{this._rangeSyncTriggerPromise=s.trigger(()=>this._syncRanges(l))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{o()})),this._localToDispose.add(this._editor.onDidChangeModelContent(l=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const c=this._currentDecorations.getRange(0);if(c&&l.changes.every(u=>c.intersectRanges(u.range))){a(this._syncRangesToken);return}}o()})),this._localToDispose.add({dispose:()=>{r.dispose(),s.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;const n=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const r=n.getValueInRange(i);if(this._currentWordPattern){const s=r.match(this._currentWordPattern);if((s?s[0].length:0)!==r.length)return this.clearRanges()}const o=[];for(let s=1,a=this._currentDecorations.length;s<a;s++){const l=this._currentDecorations.getRange(s);if(l)if(l.startLineNumber!==l.endLineNumber)o.push({range:l,text:r});else{let c=n.getValueInRange(l),u=r,d=l.startColumn,h=l.endColumn;const f=ck(c,u);d+=f,c=c.substr(f),u=u.substr(f);const m=$ie(c,u);h-=m,c=c.substr(0,c.length-m),u=u.substr(0,u.length-m),(d!==h||u.length!==0)&&o.push({range:new ve(l.startLineNumber,d,l.endLineNumber,h),text:u})}}if(o.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const s=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",o),this._editor._getViewModel().setPrevEditOperationType(s)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),this._currentRequestCts&&(this._currentRequestCts.cancel(),this._currentRequestCts=null,this._currentRequestPosition=null)}async updateRanges(e=!1){if(!this._editor.hasModel()){this.clearRanges();return}const n=this._editor.getPosition();if(!this._enabled&&!e||this._editor.getSelections().length>1){this.clearRanges();return}const i=this._editor.getModel(),r=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===r){if(n.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const s=this._currentDecorations.getRange(0);if(s&&s.containsPosition(n))return}}this.clearRanges(),this._currentRequestPosition=n,this._currentRequestModelVersion=r;const o=this._currentRequestCts=new oa;try{const s=new cu(!1),a=await VGt(this._providers,i,n,o.token);if(this._debounceInformation.update(i,s.elapsed()),o!==this._currentRequestCts||(this._currentRequestCts=null,r!==i.getVersionId()))return;let l=[];a!=null&&a.ranges&&(l=a.ranges),this._currentWordPattern=(a==null?void 0:a.wordPattern)||this._languageWordPattern;let c=!1;for(let d=0,h=l.length;d<h;d++)if(ve.containsPosition(l[d],n)){if(c=!0,d!==0){const f=l[d];l.splice(d,1),l.unshift(f)}break}if(!c){this.clearRanges();return}const u=l.map(d=>({range:d,options:Ute.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(u),this._syncRangesToken++}catch(s){yb(s)||ji(s),(this._currentRequestCts===o||!this._currentRequestCts)&&this.clearRanges()}}},Ute=$D,$D.ID="editor.contrib.linkedEditing",$D.DECORATION=Hi.register({description:"linked-editing",stickiness:0,className:JRr}),$D);yF=Ute=QRr([YJ(1,vi),YJ(2,Ln),YJ(3,bs),YJ(4,tg)],yF);class ePr extends En{constructor(){super({id:"editor.action.linkedEditing",label:I("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:Tt.and(Re.writable,Re.hasRenameProvider),kbOpts:{kbExpr:Re.editorTextFocus,primary:3132,weight:100}})}runCommand(e,n){const i=e.get(Yr),[r,o]=Array.isArray(n)&&n||[void 0,void 0];return ri.isUri(r)&&ot.isIPosition(o)?i.openCodeEditor({resource:r},i.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(o),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},ji):super.runCommand(e,n)}run(e,n){const i=yF.get(n);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const tPr=Zl.bindToContribution(yF.get);fn(new tPr({id:"cancelLinkedEditingInput",precondition:$Gt,handler:t=>t.clearRanges(),kbOpts:{kbExpr:Re.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));function VGt(t,e,n,i){const r=t.ordered(e);return D8e(r.map(o=>async()=>{try{return await o.provideLinkedEditingRanges(e,n,i)}catch(s){$a(s);return}}),o=>!!o&&md(o==null?void 0:o.ranges))}Fe("editor.linkedEditingBackground",{dark:Rt.fromHex("#f00").transparent(.3),light:Rt.fromHex("#f00").transparent(.3),hcDark:Rt.fromHex("#f00").transparent(.3),hcLight:Rt.white},I("editorLinkedEditingBackground","Background color when the editor auto renames on type."));Pf("_executeLinkedEditingProvider",(t,e,n)=>{const{linkedEditingRangeProvider:i}=t.get(Ln);return VGt(i,e,n,er.None)});Wr(yF.ID,yF,1);Ht(ePr);let nPr=class{constructor(e,n){this._link=e,this._provider=n}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(e){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,e)).then(n=>(this._link=n||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))}};class mle{constructor(e){this._disposables=new Lt;let n=[];for(const[i,r]of e){const o=i.links.map(s=>new nPr(s,r));n=mle._union(n,o),kfe(i)&&this._disposables.add(i)}this.links=n}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,n){const i=[];let r,o,s,a;for(r=0,s=0,o=e.length,a=n.length;r<o&&s<a;){const l=e[r],c=n[s];if(ve.areIntersectingOrTouching(l.range,c.range)){r++;continue}ve.compareRangesUsingStarts(l.range,c.range)<0?(i.push(l),r++):(i.push(c),s++)}for(;r<o;r++)i.push(e[r]);for(;s<a;s++)i.push(n[s]);return i}}function BGt(t,e,n){const i=[],r=t.ordered(e).reverse().map((o,s)=>Promise.resolve(o.provideLinks(e,n)).then(a=>{a&&(i[s]=[a,o])},$a));return Promise.all(r).then(()=>{const o=new mle(H0(i));return n.isCancellationRequested?(o.dispose(),new mle([])):o})}Ar.registerCommand("_executeLinkProvider",async(t,...e)=>{let[n,i]=e;Gr(n instanceof ri),typeof i!="number"&&(i=0);const{linkProvider:r}=t.get(Ln),o=t.get(Ds).getModel(n);if(!o)return[];const s=await BGt(r,o,er.None);if(!s)return[];for(let l=0;l<Math.min(i,s.links.length);l++)await s.links[l].resolve(er.None);const a=s.links.slice(0);return s.dispose(),a});var iPr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},XJ=function(t,e){return function(n,i){e(n,i,t)}},C4e,s2;let WU=(s2=class extends ct{static get(e){return e.getContribution(C4e.ID)}constructor(e,n,i,r,o){super(),this.editor=e,this.openerService=n,this.notificationService=i,this.languageFeaturesService=r,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=o.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new Wo(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const s=this._register(new Dge(e));this._register(s.onMouseMoveOrRelevantKeyDown(([a,l])=>{this._onEditorMouseMove(a,l)})),this._register(s.onExecute(a=>{this.onEditorMouseUp(a)})),this._register(s.onCancel(a=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(a=>{a.hasChanged(71)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(a=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(a=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(a=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(a=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(71))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=cc(n=>BGt(this.providers,e,n));try{const n=new cu(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,n.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(n){ji(n)}finally{this.computePromise=null}}}updateDecorations(e){const n=this.editor.getOption(78)==="altKey",i=[],r=Object.keys(this.currentOccurrences);for(const s of r){const a=this.currentOccurrences[s];i.push(a.decorationId)}const o=[];if(e)for(const s of e)o.push(X3.decoration(s,n));this.editor.changeDecorations(s=>{const a=s.deltaDecorations(i,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let l=0,c=a.length;l<c;l++){const u=new X3(e[l],a[l]);this.currentOccurrences[u.decorationId]=u}})}_onEditorMouseMove(e,n){const i=this.editor.getOption(78)==="altKey";if(this.isEnabled(e,n)){this.cleanUpActiveLinkDecoration();const r=this.getLinkOccurrence(e.target.position);r&&this.editor.changeDecorations(o=>{r.activate(o,i),this.activeLinkDecorationId=r.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e=this.editor.getOption(78)==="altKey";if(this.activeLinkDecorationId){const n=this.currentOccurrences[this.activeLinkDecorationId];n&&this.editor.changeDecorations(i=>{n.deactivate(i,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const n=this.getLinkOccurrence(e.target.position);n&&this.openLinkOccurrence(n,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,n,i=!1){if(!this.openerService)return;const{link:r}=e;r.resolve(er.None).then(o=>{if(typeof o=="string"&&this.editor.hasModel()){const s=this.editor.getModel().uri;if(s.scheme===Ti.file&&o.startsWith(`${Ti.file}:`)){const a=ri.parse(o);if(a.scheme===Ti.file){const l=Y_(a);let c=null;l.startsWith("/./")||l.startsWith("\\.\\")?c=`.${l.substr(1)}`:(l.startsWith("//./")||l.startsWith("\\\\.\\"))&&(c=`.${l.substr(2)}`),c&&(o=_xi(s,c))}}}return this.openerService.open(o,{openToSide:n,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},o=>{const s=o instanceof Error?o.message:o;s==="invalid"?this.notificationService.warn(I("invalid.url","Failed to open this link because it is not well-formed: {0}",r.url.toString())):s==="missing"?this.notificationService.warn(I("missing.url","Failed to open this link because its target is missing.")):ji(o)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const n=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const i of n){const r=this.currentOccurrences[i.id];if(r)return r}return null}isEnabled(e,n){return!!(e.target.type===6&&(e.hasTriggerModifier||n&&n.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&((e=this.activeLinksList)==null||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}},C4e=s2,s2.ID="editor.linkDetector",s2);WU=C4e=iPr([XJ(1,Wm),XJ(2,tl),XJ(3,Ln),XJ(4,tg)],WU);const L0t={general:Hi.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:Hi.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class X3{static decoration(e,n){return{range:e.range,options:X3._getOptions(e,n,!1)}}static _getOptions(e,n,i){const r={...i?L0t.active:L0t.general};return r.hoverMessage=rPr(e,n),r}constructor(e,n){this.link=e,this.decorationId=n}activate(e,n){e.changeDecorationOptions(this.decorationId,X3._getOptions(this.link,n,!0))}deactivate(e,n){e.changeDecorationOptions(this.decorationId,X3._getOptions(this.link,n,!1))}}function rPr(t,e){const n=t.url&&/^command:/i.test(t.url.toString()),i=t.tooltip?t.tooltip:n?I("links.navigate.executeCmd","Execute command"):I("links.navigate.follow","Follow link"),r=e?xr?I("links.navigate.kb.meta.mac","cmd + click"):I("links.navigate.kb.meta","ctrl + click"):xr?I("links.navigate.kb.alt.mac","option + click"):I("links.navigate.kb.alt","alt + click");if(t.url){let o="";if(/^command:/i.test(t.url.toString())){const a=t.url.toString().match(/^command:([^?#]+)/);if(a){const l=a[1];o=I("tooltip.explanation","Execute command {0}",l)}}return new rd("",!0).appendLink(t.url.toString(!0).replace(/ /g,"%20"),i,o).appendMarkdown(` (${r})`)}else return new rd().appendText(`${i} (${r})`)}class oPr extends En{constructor(){super({id:"editor.action.openLink",label:I("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,n){const i=WU.get(n);if(!i||!n.hasModel())return;const r=n.getSelections();for(const o of r){const s=i.getLinkOccurrence(o.getEndPosition());s&&i.openLinkOccurrence(s,!1)}}}Wr(WU.ID,WU,1);Ht(oPr);const XWe=class XWe extends ct{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(n=>{const i=this._editor.getOption(118);i>=0&&n.target.type===6&&n.target.position.column>=i&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}};XWe.ID="editor.contrib.longLinesHelper";let ple=XWe;Wr(ple.ID,ple,2);const sPr=Fe("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},I("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);Fe("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},I("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0);Fe("editor.wordHighlightTextBackground",sPr,I("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const aPr=Fe("editor.wordHighlightBorder",{light:null,dark:null,hcDark:Bs,hcLight:Bs},I("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));Fe("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:Bs,hcLight:Bs},I("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable."));Fe("editor.wordHighlightTextBorder",aPr,I("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));const lPr=Fe("editorOverviewRuler.wordHighlightForeground","#A0A0A0CC",I("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),cPr=Fe("editorOverviewRuler.wordHighlightStrongForeground","#C0A0C0CC",I("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),uPr=Fe("editorOverviewRuler.wordHighlightTextForeground",F3t,I("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),dPr=Hi.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Sa(cPr),position:Tp.Center},minimap:{color:Sa(Qfe),position:1}}),hPr=Hi.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:Sa(uPr),position:Tp.Center},minimap:{color:Sa(Qfe),position:1}}),fPr=Hi.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Sa(F3t),position:Tp.Center},minimap:{color:Sa(Qfe),position:1}}),mPr=Hi.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),pPr=Hi.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Sa(lPr),position:Tp.Center},minimap:{color:Sa(Qfe),position:1}});function gPr(t){return t===xH.Write?dPr:t===xH.Text?hPr:pPr}function bPr(t){return t?mPr:fPr}_b((t,e)=>{const n=t.getColor(rVe);n&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${n.transparent(.5)}; }`)});var vPr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},yPr=function(t,e){return function(n,i){e(n,i,t)}},S4e;function kM(t,e){const n=e.filter(i=>!t.find(r=>r.equals(i)));if(n.length>=1){const i=n.map(o=>`line ${o.viewState.position.lineNumber} column ${o.viewState.position.column}`).join(", "),r=n.length===1?I("cursorAdded","Cursor added: {0}",i):I("cursorsAdded","Cursors added: {0}",i);hw(r)}}class _Pr extends En{constructor(){super({id:"editor.action.insertCursorAbove",label:I("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:Re.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:Rn.MenubarSelectionMenu,group:"3_multi",title:I({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,n,i){if(!n.hasModel())return;let r=!0;i&&i.logicalLine===!1&&(r=!1);const o=n._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();const s=o.getCursorStates();o.setCursorStates(i.source,3,qc.addCursorUp(o,s,r)),o.revealTopMostCursor(i.source),kM(s,o.getCursorStates())}}class xPr extends En{constructor(){super({id:"editor.action.insertCursorBelow",label:I("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:Re.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:Rn.MenubarSelectionMenu,group:"3_multi",title:I({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,n,i){if(!n.hasModel())return;let r=!0;i&&i.logicalLine===!1&&(r=!1);const o=n._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();const s=o.getCursorStates();o.setCursorStates(i.source,3,qc.addCursorDown(o,s,r)),o.revealBottomMostCursor(i.source),kM(s,o.getCursorStates())}}class wPr extends En{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:I("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:Re.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:Rn.MenubarSelectionMenu,group:"3_multi",title:I({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,n,i){if(!e.isEmpty()){for(let r=e.startLineNumber;r<e.endLineNumber;r++){const o=n.getLineMaxColumn(r);i.push(new Pn(r,o,r,o))}e.endColumn>1&&i.push(new Pn(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,n){if(!n.hasModel())return;const i=n.getModel(),r=n.getSelections(),o=n._getViewModel(),s=o.getCursorStates(),a=[];r.forEach(l=>this.getCursorsForSelection(l,i,a)),a.length>0&&n.setSelections(a),kM(s,o.getCursorStates())}}class CPr extends En{constructor(){super({id:"editor.action.addCursorsToBottom",label:I("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,n){if(!n.hasModel())return;const i=n.getSelections(),r=n.getModel().getLineCount(),o=[];for(let l=i[0].startLineNumber;l<=r;l++)o.push(new Pn(l,i[0].startColumn,l,i[0].endColumn));const s=n._getViewModel(),a=s.getCursorStates();o.length>0&&n.setSelections(o),kM(a,s.getCursorStates())}}class SPr extends En{constructor(){super({id:"editor.action.addCursorsToTop",label:I("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,n){if(!n.hasModel())return;const i=n.getSelections(),r=[];for(let a=i[0].startLineNumber;a>=1;a--)r.push(new Pn(a,i[0].startColumn,a,i[0].endColumn));const o=n._getViewModel(),s=o.getCursorStates();r.length>0&&n.setSelections(r),kM(s,o.getCursorStates())}}class ZJ{constructor(e,n,i){this.selections=e,this.revealRange=n,this.revealScrollType=i}}class UU{static create(e,n){if(!e.hasModel())return null;const i=n.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new UU(e,n,!1,i.searchString,i.wholeWord,i.matchCase,null);let r=!1,o,s;const a=e.getSelections();a.length===1&&a[0].isEmpty()?(r=!0,o=!0,s=!0):(o=i.wholeWord,s=i.matchCase);const l=e.getSelection();let c,u=null;if(l.isEmpty()){const d=e.getConfiguredWordAtPosition(l.getStartPosition());if(!d)return null;c=d.word,u=new Pn(l.startLineNumber,d.startColumn,l.startLineNumber,d.endColumn)}else c=e.getModel().getValueInRange(l).replace(/\r\n/g,`
`);return new UU(e,n,r,c,o,s,u)}constructor(e,n,i,r,o,s,a){this._editor=e,this.findController=n,this.isDisconnectedFromFindController=i,this.searchText=r,this.wholeWord=o,this.matchCase=s,this.currentMatch=a}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const n=this._editor.getSelections();return new ZJ(n.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const n=this._editor.getSelections();return new ZJ(n.slice(0,n.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const r=this.currentMatch;return this.currentMatch=null,r}this.findController.highlightFindOptions();const e=this._editor.getSelections(),n=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,n.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1);return i?new Pn(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const n=this._editor.getSelections();return new ZJ(n.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const n=this._editor.getSelections();return new ZJ(n.slice(0,n.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const r=this.currentMatch;return this.currentMatch=null,r}this.findController.highlightFindOptions();const e=this._editor.getSelections(),n=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,n.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1);return i?new Pn(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const n=this._editor.getModel();return e?n.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1,1073741824):n.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1,1073741824)}}const Kce=class Kce extends ct{static get(e){return e.getContribution(Kce.ID)}constructor(e){super(),this._sessionDispose=this._register(new Lt),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const n=UU.create(this._editor,e);if(!n)return;this._session=n;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(r=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(r=>{(r.matchCase||r.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,n){if(!n.isEmpty())return n;const i=this._editor.getConfiguredWordAtPosition(n.getStartPosition());return i?new Pn(n.startLineNumber,i.startColumn,n.startLineNumber,i.endColumn):n}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const n=this._editor.getSelections();if(n.length>1){const r=e.getState().matchCase;if(!zGt(this._editor.getModel(),n,r)){const s=this._editor.getModel(),a=[];for(let l=0,c=n.length;l<c;l++)a[l]=this._expandEmptyToWord(s,n[l]);this._editor.setSelections(a);return}}}this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(e){if(!this._editor.hasModel())return;let n=null;const i=e.getState();if(i.isRevealed&&i.searchString.length>0&&i.isRegex){const r=this._editor.getModel();i.searchScope?n=r.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(132):null,!1,1073741824):n=r.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(132):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;n=this._session.selectAll(i.searchScope)}if(n.length>0){const r=this._editor.getSelection();for(let o=0,s=n.length;o<s;o++){const a=n[o];if(a.range.intersectRanges(r)){n[o]=n[0],n[0]=a;break}}this._setSelections(n.map(o=>new Pn(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)))}}};Kce.ID="editor.contrib.multiCursorController";let _F=Kce;class T$ extends En{run(e,n){const i=_F.get(n);if(!i)return;const r=n._getViewModel();if(r){const o=r.getCursorStates(),s=Tf.get(n);if(s)this._run(i,s);else{const a=e.get(qn).createInstance(Tf,n);this._run(i,a),a.dispose()}kM(o,r.getCursorStates())}}}class NPr extends T${constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:I("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:Re.focus,primary:2082,weight:100},menuOpts:{menuId:Rn.MenubarSelectionMenu,group:"3_multi",title:I({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,n){e.addSelectionToNextFindMatch(n)}}class EPr extends T${constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:I("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:Rn.MenubarSelectionMenu,group:"3_multi",title:I({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,n){e.addSelectionToPreviousFindMatch(n)}}class DPr extends T${constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:I("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:Re.focus,primary:Tl(2089,2082),weight:100}})}_run(e,n){e.moveSelectionToNextFindMatch(n)}}class kPr extends T${constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:I("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,n){e.moveSelectionToPreviousFindMatch(n)}}class MPr extends T${constructor(){super({id:"editor.action.selectHighlights",label:I("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:Re.focus,primary:3114,weight:100},menuOpts:{menuId:Rn.MenubarSelectionMenu,group:"3_multi",title:I({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,n){e.selectAll(n)}}class LPr extends T${constructor(){super({id:"editor.action.changeAll",label:I("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:Tt.and(Re.writable,Re.editorTextFocus),kbOpts:{kbExpr:Re.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,n){e.selectAll(n)}}class TPr{constructor(e,n,i,r,o){this._model=e,this._searchText=n,this._matchCase=i,this._wordSeparators=r,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,o&&this._model===o._model&&this._searchText===o._searchText&&this._matchCase===o._matchCase&&this._wordSeparators===o._wordSeparators&&this._modelVersionId===o._modelVersionId&&(this._cachedFindMatches=o._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(ve.compareRangesUsingStarts)),this._cachedFindMatches}}var a2;let gle=(a2=class extends ct{constructor(e,n){super(),this._languageFeaturesService=n,this.editor=e,this._isEnabled=e.getOption(109),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new Wo(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(r=>{this._isEnabled=e.getOption(109)})),this._register(e.onDidChangeCursorSelection(r=>{this._isEnabled&&(r.selection.isEmpty()?r.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(r=>{this._setState(null)})),this._register(e.onDidChangeModelContent(r=>{this._isEnabled&&this.updateSoon.schedule()}));const i=Tf.get(e);i&&this._register(i.getState().onFindReplaceStateChange(r=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(S4e._createState(this.state,this._isEnabled,this.editor))}static _createState(e,n,i){if(!n||!i.hasModel())return null;const r=i.getSelection();if(r.startLineNumber!==r.endLineNumber)return null;const o=_F.get(i);if(!o)return null;const s=Tf.get(i);if(!s)return null;let a=o.getSession(s);if(!a){const u=i.getSelections();if(u.length>1){const h=s.getState().matchCase;if(!zGt(i.getModel(),u,h))return null}a=UU.create(i,s)}if(!a||a.currentMatch||/^[ \t]+$/.test(a.searchText)||a.searchText.length>200)return null;const l=s.getState(),c=l.matchCase;if(l.isRevealed){let u=l.searchString;c||(u=u.toLowerCase());let d=a.searchText;if(c||(d=d.toLowerCase()),u===d&&a.matchCase===l.matchCase&&a.wholeWord===l.wholeWord&&!l.isRegex)return null}return new TPr(i.getModel(),a.searchText,a.matchCase,a.wholeWord?i.getOption(132):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const n=this.editor.getModel();if(n.isTooLargeForTokenization())return;const i=this.state.findMatches(),r=this.editor.getSelections();r.sort(ve.compareRangesUsingStarts);const o=[];for(let c=0,u=0,d=i.length,h=r.length;c<d;){const f=i[c];if(u>=h)o.push(f),c++;else{const m=ve.compareRangesUsingStarts(f,r[u]);m<0?((r[u].isEmpty()||!ve.areIntersecting(f,r[u]))&&o.push(f),c++):(m>0||c++,u++)}}const s=this.editor.getOption(81)!=="off",a=this._languageFeaturesService.documentHighlightProvider.has(n)&&s,l=o.map(c=>({range:c,options:bPr(a)}));this._decorations.set(l)}dispose(){this._setState(null),super.dispose()}},S4e=a2,a2.ID="editor.contrib.selectionHighlighter",a2);gle=S4e=vPr([yPr(1,Ln)],gle);function zGt(t,e,n){const i=T0t(t,e[0],!n);for(let r=1,o=e.length;r<o;r++){const s=e[r];if(s.isEmpty())return!1;const a=T0t(t,s,!n);if(i!==a)return!1}return!0}function T0t(t,e,n){const i=t.getValueInRange(e);return n?i.toLowerCase():i}class IPr extends En{constructor(){super({id:"editor.action.focusNextCursor",label:I("mutlicursor.focusNextCursor","Focus Next Cursor"),metadata:{description:I("mutlicursor.focusNextCursor.description","Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,n,i){if(!n.hasModel())return;const r=n._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();const o=Array.from(r.getCursorStates()),s=o.shift();s&&(o.push(s),r.setCursorStates(i.source,3,o),r.revealPrimaryCursor(i.source,!0),kM(o,r.getCursorStates()))}}class APr extends En{constructor(){super({id:"editor.action.focusPreviousCursor",label:I("mutlicursor.focusPreviousCursor","Focus Previous Cursor"),metadata:{description:I("mutlicursor.focusPreviousCursor.description","Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,n,i){if(!n.hasModel())return;const r=n._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();const o=Array.from(r.getCursorStates()),s=o.pop();s&&(o.unshift(s),r.setCursorStates(i.source,3,o),r.revealPrimaryCursor(i.source,!0),kM(o,r.getCursorStates()))}}Wr(_F.ID,_F,4);Wr(gle.ID,gle,1);Ht(_Pr);Ht(xPr);Ht(wPr);Ht(NPr);Ht(EPr);Ht(DPr);Ht(kPr);Ht(MPr);Ht(LPr);Ht(CPr);Ht(SPr);Ht(IPr);Ht(APr);const RPr="editor.action.inlineEdit.accept",PPr="editor.action.inlineEdit.reject",OPr="editor.action.inlineEdit.jumpTo",jPr="editor.action.inlineEdit.jumpBack";var FPr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},$Pr=function(t,e){return function(n,i){e(n,i,t)}};const sNe="inline-edit";let N4e=class extends ct{constructor(e,n,i){super(),this.editor=e,this.model=n,this.languageService=i,this.isDisposed=lr(this,!1),this.currentTextModel=Oo(this,this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=Vn(this,r=>{var _;if(this.isDisposed.read(r))return;const o=this.currentTextModel.read(r);if(o!==this.model.targetTextModel.read(r))return;const s=this.model.ghostText.read(r);if(!s)return;let a=(_=this.model.range)==null?void 0:_.read(r);a&&a.startLineNumber===a.endLineNumber&&a.startColumn===a.endColumn&&(a=void 0);const l=(a?a.startLineNumber===a.endLineNumber:!0)&&s.parts.length===1&&s.parts[0].lines.length===1,c=s.parts.length===1&&s.parts[0].lines.every(w=>w.length===0),u=[],d=[];function h(w,C){if(d.length>0){const N=d[d.length-1];C&&N.decorations.push(new Sh(N.content.length+1,N.content.length+1+w[0].length,C,0)),N.content+=w[0],w=w.slice(1)}for(const N of w)d.push({content:N,decorations:C?[new Sh(1,N.length+1,C,0)]:[]})}const f=o.getLineContent(s.lineNumber);let m,p=0;if(!c&&(l||!a)){for(const w of s.parts){let C=w.lines;a&&!l&&(h(C,sNe),C=[]),m===void 0?(u.push({column:w.column,text:C[0],preview:w.preview}),C=C.slice(1)):h([f.substring(p,w.column-1)],void 0),C.length>0&&(h(C,sNe),m===void 0&&w.column<=f.length&&(m=w.column)),p=w.column-1}m!==void 0&&h([f.substring(p)],void 0)}const g=m!==void 0?new CGt(m,f.length+1):void 0,y=l||!a?s.lineNumber:a.endLineNumber-1;return{inlineTexts:u,additionalLines:d,hiddenRange:g,lineNumber:y,additionalReservedLineCount:this.model.minReservedLineCount.read(r),targetTextModel:o,range:a,isSingleLine:l,isPureRemove:c}}),this.decorations=Vn(this,r=>{const o=this.uiState.read(r);if(!o)return[];const s=[];if(o.hiddenRange&&s.push({range:o.hiddenRange.toRange(o.lineNumber),options:{inlineClassName:"inline-edit-hidden",description:"inline-edit-hidden"}}),o.range){const a=[];if(o.isSingleLine)a.push(o.range);else if(!o.isPureRemove){const l=o.range.endLineNumber-o.range.startLineNumber;for(let c=0;c<l;c++){const u=o.range.startLineNumber+c,d=o.targetTextModel.getLineFirstNonWhitespaceColumn(u),h=o.targetTextModel.getLineLastNonWhitespaceColumn(u),f=new ve(u,d,u,h);a.push(f)}}for(const l of a)s.push({range:l,options:S5})}if(o.range&&!o.isSingleLine&&o.isPureRemove){const a=new ve(o.range.startLineNumber,1,o.range.endLineNumber-1,1);s.push({range:a,options:mW})}for(const a of o.inlineTexts)s.push({range:ve.fromPositions(new ot(o.lineNumber,a.column)),options:{description:sNe,after:{content:a.text,inlineClassName:a.preview?"inline-edit-decoration-preview":"inline-edit-decoration",cursorStops:dv.Left},showIfCollapsed:!0}});return s}),this._register(Kn(()=>{this.isDisposed.set(!0,void 0)})),this._register(SGt(this.editor,this.decorations))}};N4e=FPr([$Pr(2,Qs)],N4e);var IWe=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},yx=function(t,e){return function(n,i){e(n,i,t)}},Kte;let E4e=class extends ct{constructor(e,n,i){super(),this.editor=e,this.model=n,this.instantiationService=i,this.alwaysShowToolbar=Oo(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(63).showToolbar==="always"),this.sessionPosition=void 0,this.position=Vn(this,r=>{var l,c;const o=(l=this.model.read(r))==null?void 0:l.model.ghostText.read(r);if(!this.alwaysShowToolbar.read(r)||!o||o.parts.length===0)return this.sessionPosition=void 0,null;const s=o.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==o.lineNumber&&(this.sessionPosition=void 0);const a=new ot(o.lineNumber,Math.min(s,((c=this.sessionPosition)==null?void 0:c.column)??Number.MAX_SAFE_INTEGER));return this.sessionPosition=a,a}),this._register(Sf((r,o)=>{if(!this.model.read(r)||!this.alwaysShowToolbar.read(r))return;const a=o.add(this.instantiationService.createInstance(D4e,this.editor,!0,this.position));e.addContentWidget(a),o.add(Kn(()=>e.removeContentWidget(a)))}))}};E4e=IWe([yx(2,qn)],E4e);var VD;let D4e=(VD=class extends ct{constructor(e,n,i,r,o,s){super(),this.editor=e,this.withBorder=n,this._position=i,this._contextKeyService=o,this._menuService=s,this.id=`InlineEditHintsContentWidget${Kte.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=pr("div.inlineEditHints",{className:this.withBorder?".withBorder":""},[pr("div@toolBar")]),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(Rn.InlineEditActions,this._contextKeyService)),this.toolBar=this._register(r.createInstance(k4e,this.nodes.toolBar,this.editor,Rn.InlineEditToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:a=>a.startsWith("primary")},actionViewItemProvider:(a,l)=>{if(a instanceof wm)return r.createInstance(VPr,a,void 0)},telemetrySource:"InlineEditToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(a=>{Kte._dropDownVisible=a})),this._register(ki(a=>{this._position.read(a),this.editor.layoutContentWidget(this)})),this._register(ki(a=>{const l=[];for(const[c,u]of this.inlineCompletionsActionsMenus.getActions())for(const d of u)d instanceof wm&&l.push(d);l.length>0&&l.unshift(new dc),this.toolBar.setAdditionalSecondaryActions(l)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}},Kte=VD,VD._dropDownVisible=!1,VD.id=0,VD);D4e=Kte=IWe([yx(3,qn),yx(4,vi),yx(5,Jp)],D4e);class VPr extends _k{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const n=pr("div.keybinding").root;this._register(new W6(n,pm,{disableTitle:!0,...EFt})).set(e),this.label.textContent=this._action.label,this.label.appendChild(n),this.label.classList.add("inlineEditStatusBarItemLabel")}}updateTooltip(){}}let k4e=class extends gW{constructor(e,n,i,r,o,s,a,l,c,u){super(e,{resetMenu:i,...r},o,s,a,l,c,u),this.editor=n,this.menuId=i,this.options2=r,this.menuService=o,this.contextKeyService=s,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this._store.add(this.editor.onDidChangeCursorPosition(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var i,r,o,s,a,l,c;const e=[],n=[];Cme(this.menu,(i=this.options2)==null?void 0:i.menuOptions,{primary:e,secondary:n},(o=(r=this.options2)==null?void 0:r.toolbarOptions)==null?void 0:o.primaryGroup,(a=(s=this.options2)==null?void 0:s.toolbarOptions)==null?void 0:a.shouldInlineSubmenu,(c=(l=this.options2)==null?void 0:l.toolbarOptions)==null?void 0:c.useSeparatorsInPrimaryActions),n.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),this.setActions(e,n)}setAdditionalSecondaryActions(e){Xs(this.additionalActions,e,(n,i)=>n===i)||(this.additionalActions=e,this.updateToolbar())}};k4e=IWe([yx(4,Jp),yx(5,vi),yx(6,Hm),yx(7,vo),yx(8,gs),yx(9,eh)],k4e);var HGt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},qte=function(t,e){return function(n,i){e(n,i,t)}},p9,M4e;function*BPr(t,e,n=1){e===void 0&&([e,t]=[t,0]);for(let i=t;i<e;i+=n)yield i}function aNe(t){var i;const e=((i=t[0].match(/^\s*/))==null?void 0:i[0])??"",n=e.length;return{text:t.map(r=>r.replace(new RegExp("^"+e),"")),shift:n}}var l2;let L4e=(l2=class extends ct{static _createUniqueUri(){return ri.from({scheme:"inline-edit-widget",path:new Date().toString()+String(p9._modelId++)})}constructor(e,n,i,r,o){super(),this._editor=e,this._model=n,this._instantiationService=i,this._diffProviderFactoryService=r,this._modelService=o,this._position=Vn(this,s=>{const a=this._model.read(s);if(!a||a.text.length===0||a.range.startLineNumber===a.range.endLineNumber&&!(a.range.startColumn===a.range.endColumn&&a.range.startColumn===1))return null;const l=this._editor.getModel();if(!l)return null;const c=Array.from(BPr(a.range.startLineNumber,a.range.endLineNumber+1)),u=c.map(p=>l.getLineLastNonWhitespaceColumn(p)),d=Math.max(...u),h=c[u.indexOf(d)],f=new ot(h,d);return{top:a.range.startLineNumber,left:f}}),this._text=Vn(this,s=>{const a=this._model.read(s);if(!a)return{text:"",shift:0};const l=aNe(a.text.split(`
`));return{text:l.text.join(`
`),shift:l.shift}}),this._originalModel=Vd(()=>this._modelService.createModel("",null,p9._createUniqueUri())).keepObserved(this._store),this._modifiedModel=Vd(()=>this._modelService.createModel("",null,p9._createUniqueUri())).keepObserved(this._store),this._diff=Vn(this,s=>{var a,l;return(l=(a=this._diffPromise.read(s))==null?void 0:a.promiseResult.read(s))==null?void 0:l.data}),this._diffPromise=Vn(this,s=>{const a=this._model.read(s);if(!a)return;const l=this._editor.getModel();if(!l)return;const c=aNe(l.getValueInRange(a.range).split(`
`)).text.join(`
`),u=aNe(a.text.split(`
`)).text.join(`
`);this._originalModel.get().setValue(c),this._modifiedModel.get().setValue(u);const d=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:"advanced"});return xme.fromFn(async()=>{const h=await d.computeDiff(this._originalModel.get(),this._modifiedModel.get(),{computeMoves:!1,ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3},er.None);if(!h.identical)return h.changes})}),this._register(Sf((s,a)=>{if(!this._model.read(s)||this._position.get()===null)return;const c=a.add(this._instantiationService.createInstance(T4e,this._editor,this._position,this._text.map(u=>u.text),this._text.map(u=>u.shift),this._diff));e.addOverlayWidget(c),a.add(Kn(()=>e.removeOverlayWidget(c)))}))}},p9=l2,l2._modelId=0,l2);L4e=p9=HGt([qte(2,qn),qte(3,zq),qte(4,Ds)],L4e);var c2;let T4e=(c2=class extends ct{constructor(e,n,i,r,o,s){var a;super(),this._editor=e,this._position=n,this._text=i,this._shift=r,this._diff=o,this._instantiationService=s,this.id=`InlineEditSideBySideContentWidget${M4e.id++}`,this.allowEditorOverflow=!1,this._nodes=Xt("div.inlineEditSideBySide",void 0),this._scrollChanged=Nu("editor.onDidScrollChange",this._editor.onDidScrollChange),this._previewEditor=this._register(this._instantiationService.createInstance(Fv,this._nodes,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1,handleMouseWheel:!1},readOnly:!0,wordWrap:"off",wordWrapOverride1:"off",wordWrapOverride2:"off",wrappingIndent:"none",wrappingStrategy:void 0},{contributions:[],isSimpleWidget:!0},this._editor)),this._previewEditorObs=hm(this._previewEditor),this._editorObs=hm(this._editor),this._previewTextModel=this._register(this._instantiationService.createInstance(l0,"",((a=this._editor.getModel())==null?void 0:a.getLanguageId())??Ph,l0.DEFAULT_CREATION_OPTIONS,null)),this._setText=Vn(l=>{const c=this._text.read(l);c&&this._previewTextModel.setValue(c)}).recomputeInitiallyAndOnChange(this._store),this._decorations=Vn(this,l=>{this._setText.read(l);const c=this._position.read(l);if(!c)return{org:[],mod:[]};const u=this._diff.read(l);if(!u)return{org:[],mod:[]};const d=[],h=[];if(u.length===1&&u[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange()))return{org:[],mod:[]};const f=this._shift.get(),m=p=>new ve(p.startLineNumber+c.top-1,p.startColumn+f,p.endLineNumber+c.top-1,p.endColumn+f);for(const p of u)if(p.original.isEmpty||d.push({range:m(p.original.toInclusiveRange()),options:mW}),p.modified.isEmpty||h.push({range:p.modified.toInclusiveRange(),options:xoe}),p.modified.isEmpty||p.original.isEmpty)p.original.isEmpty||d.push({range:m(p.original.toInclusiveRange()),options:V7e}),p.modified.isEmpty||h.push({range:p.modified.toInclusiveRange(),options:F7e});else for(const g of p.innerChanges||[])p.original.contains(g.originalRange.startLineNumber)&&d.push({range:m(g.originalRange),options:g.originalRange.isEmpty()?B7e:S5}),p.modified.contains(g.modifiedRange.startLineNumber)&&h.push({range:g.modifiedRange,options:g.modifiedRange.isEmpty()?$7e:woe});return{org:d,mod:h}}),this._originalDecorations=Vn(this,l=>this._decorations.read(l).org),this._modifiedDecorations=Vn(this,l=>this._decorations.read(l).mod),this._previewEditor.setModel(this._previewTextModel),this._register(this._editorObs.setDecorations(this._originalDecorations)),this._register(this._previewEditorObs.setDecorations(this._modifiedDecorations)),this._register(ki(l=>{const c=this._previewEditorObs.contentWidth.read(l),u=this._text.read(l).split(`
`).length-1,d=this._editor.getOption(67)*u;c<=0||this._previewEditor.layout({height:d,width:c})})),this._register(ki(l=>{this._position.read(l),this._editor.layoutOverlayWidget(this)})),this._register(ki(l=>{this._scrollChanged.read(l),this._position.read(l)&&this._editor.layoutOverlayWidget(this)}))}getId(){return this.id}getDomNode(){return this._nodes}getPosition(){const e=this._position.get();if(!e)return null;const n=this._editor.getLayoutInfo(),i=this._editor.getScrolledVisiblePosition(new ot(e.top,1));if(!i)return null;const r=i.top-1,o=this._editor.getOffsetForColumn(e.left.lineNumber,e.left.column);return{preference:{left:n.contentLeft+o+10,top:r}}}},M4e=c2,c2.id=0,c2);T4e=M4e=HGt([qte(5,qn)],T4e);var zPr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},kL=function(t,e){return function(n,i){e(n,i,t)}},g9,Tg;let kh=(Tg=class extends ct{static get(e){return e.getContribution(g9.ID)}constructor(e,n,i,r,o,s,a,l){super(),this.editor=e,this.instantiationService=n,this.contextKeyService=i,this.languageFeaturesService=r,this._commandService=o,this._configurationService=s,this._diffProviderFactoryService=a,this._modelService=l,this._isVisibleContext=g9.inlineEditVisibleContext.bindTo(this.contextKeyService),this._isCursorAtInlineEditContext=g9.cursorAtInlineEditContext.bindTo(this.contextKeyService),this._currentEdit=lr(this,void 0),this._currentWidget=Vd(this._currentEdit,m=>{const p=this._currentEdit.read(m);if(!p)return;const g=p.range.endLineNumber,y=p.range.endColumn,_=p.text.endsWith(`
`)&&!(p.range.startLineNumber===p.range.endLineNumber&&p.range.startColumn===p.range.endColumn)?p.text.slice(0,-1):p.text,w=new $U(g,[new Xae(y,_,!1)]),C=p.range.startLineNumber===p.range.endLineNumber&&w.parts.length===1&&w.parts[0].lines.length===1,N=p.text==="";return!C&&!N?void 0:this.instantiationService.createInstance(N4e,this.editor,{ghostText:Gg(w),minReservedLineCount:Gg(0),targetTextModel:Gg(this.editor.getModel()??void 0),range:Gg(p.range)})}),this._isAccepting=lr(this,!1),this._enabled=Oo(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(63).enabled),this._fontFamily=Oo(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(63).fontFamily);const c=Nu("InlineEditController.modelContentChangedSignal",e.onDidChangeModelContent);this._register(ki(m=>{this._enabled.read(m)&&(c.read(m),!this._isAccepting.read(m)&&this.getInlineEdit(e,!0))}));const u=Oo(this,e.onDidChangeCursorPosition,()=>e.getPosition());this._register(ki(m=>{if(!this._enabled.read(m))return;const p=u.read(m);p&&this.checkCursorPosition(p)})),this._register(ki(m=>{const p=this._currentEdit.read(m);if(this._isCursorAtInlineEditContext.set(!1),!p){this._isVisibleContext.set(!1);return}this._isVisibleContext.set(!0);const g=e.getPosition();g&&this.checkCursorPosition(g)}));const d=Nu("InlineEditController.editorBlurSignal",e.onDidBlurEditorWidget);this._register(ki(async m=>{var p;this._enabled.read(m)&&(d.read(m),!(this._configurationService.getValue("editor.experimentalInlineEdit.keepOnBlur")||e.getOption(63).keepOnBlur)&&((p=this._currentRequestCts)==null||p.dispose(!0),this._currentRequestCts=void 0,await this.clear(!1)))}));const h=Nu("InlineEditController.editorFocusSignal",e.onDidFocusEditorText);this._register(ki(m=>{this._enabled.read(m)&&(h.read(m),this.getInlineEdit(e,!0))}));const f=this._register(O4t());this._register(ki(m=>{const p=this._fontFamily.read(m);f.setStyle(p===""||p==="default"?"":`
.monaco-editor .inline-edit-decoration,
.monaco-editor .inline-edit-decoration-preview,
.monaco-editor .inline-edit {
	font-family: ${p};
}`)})),this._register(new E4e(this.editor,this._currentWidget,this.instantiationService)),this._register(new L4e(this.editor,this._currentEdit,this.instantiationService,this._diffProviderFactoryService,this._modelService))}checkCursorPosition(e){if(!this._currentEdit){this._isCursorAtInlineEditContext.set(!1);return}const n=this._currentEdit.get();if(!n){this._isCursorAtInlineEditContext.set(!1);return}this._isCursorAtInlineEditContext.set(ve.containsPosition(n.range,e))}validateInlineEdit(e,n){var i;if(n.text.includes(`
`)&&n.range.startLineNumber!==n.range.endLineNumber&&n.range.startColumn!==n.range.endColumn){if(n.range.startColumn!==1)return!1;const o=n.range.endLineNumber,s=n.range.endColumn,a=((i=e.getModel())==null?void 0:i.getLineLength(o))??0;if(s!==a+1)return!1}return!0}async fetchInlineEdit(e,n){this._currentRequestCts&&this._currentRequestCts.dispose(!0);const i=e.getModel();if(!i)return;const r=i.getVersionId(),o=this.languageFeaturesService.inlineEditProvider.all(i);if(o.length===0)return;const s=o[0];this._currentRequestCts=new oa;const a=this._currentRequestCts.token,l=n?Fie.Automatic:Fie.Invoke;if(n&&await HPr(50,a),a.isCancellationRequested||i.isDisposed()||i.getVersionId()!==r)return;const u=await s.provideInlineEdit(i,{triggerKind:l},a);if(u&&!(a.isCancellationRequested||i.isDisposed()||i.getVersionId()!==r)&&this.validateInlineEdit(e,u))return u}async getInlineEdit(e,n){this._isCursorAtInlineEditContext.set(!1),await this.clear();const i=await this.fetchInlineEdit(e,n);i&&this._currentEdit.set(i,void 0)}async trigger(){await this.getInlineEdit(this.editor,!1)}async jumpBack(){this._jumpBackPosition&&(this.editor.setPosition(this._jumpBackPosition),this.editor.revealPositionInCenterIfOutsideViewport(this._jumpBackPosition))}async accept(){this._isAccepting.set(!0,void 0);const e=this._currentEdit.get();if(!e)return;let n=e.text;e.text.startsWith(`
`)&&(n=e.text.substring(1)),this.editor.pushUndoStop(),this.editor.executeEdits("acceptCurrent",[ia.replace(ve.lift(e.range),n)]),e.accepted&&await this._commandService.executeCommand(e.accepted.id,...e.accepted.arguments||[]).then(void 0,$a),this.freeEdit(e),ma(i=>{this._currentEdit.set(void 0,i),this._isAccepting.set(!1,i)})}jumpToCurrent(){var i;this._jumpBackPosition=(i=this.editor.getSelection())==null?void 0:i.getStartPosition();const e=this._currentEdit.get();if(!e)return;const n=ot.lift({lineNumber:e.range.startLineNumber,column:e.range.startColumn});this.editor.setPosition(n),this.editor.revealPositionInCenterIfOutsideViewport(n)}async clear(e=!0){const n=this._currentEdit.get();n&&(n!=null&&n.rejected)&&e&&await this._commandService.executeCommand(n.rejected.id,...n.rejected.arguments||[]).then(void 0,$a),n&&this.freeEdit(n),this._currentEdit.set(void 0,void 0)}freeEdit(e){const n=this.editor.getModel();if(!n)return;const i=this.languageFeaturesService.inlineEditProvider.all(n);i.length!==0&&i[0].freeInlineEdit(e)}},g9=Tg,Tg.ID="editor.contrib.inlineEditController",Tg.inlineEditVisibleKey="inlineEditVisible",Tg.inlineEditVisibleContext=new gn(Tg.inlineEditVisibleKey,!1),Tg.cursorAtInlineEditKey="cursorAtInlineEdit",Tg.cursorAtInlineEditContext=new gn(Tg.cursorAtInlineEditKey,!1),Tg);kh=g9=zPr([kL(1,qn),kL(2,vi),kL(3,Ln),kL(4,gs),kL(5,cr),kL(6,zq),kL(7,Ds)],kh);function HPr(t,e){return new Promise(n=>{let i;const r=setTimeout(()=>{i&&i.dispose(),n()},t);e&&(i=e.onCancellationRequested(()=>{clearTimeout(r),i&&i.dispose(),n()}))})}let WPr=class extends En{constructor(){super({id:RPr,label:"Accept Inline Edit",alias:"Accept Inline Edit",precondition:Tt.and(Re.writable,kh.inlineEditVisibleContext),kbOpts:[{weight:101,primary:2,kbExpr:Tt.and(Re.writable,kh.inlineEditVisibleContext,kh.cursorAtInlineEditContext)}],menuOpts:[{menuId:Rn.InlineEditToolbar,title:"Accept",group:"primary",order:1}]})}async run(e,n){const i=kh.get(n);await(i==null?void 0:i.accept())}};class UPr extends En{constructor(){const e=Tt.and(Re.writable,Tt.not(kh.inlineEditVisibleKey));super({id:"editor.action.inlineEdit.trigger",label:"Trigger Inline Edit",alias:"Trigger Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e}})}async run(e,n){const i=kh.get(n);i==null||i.trigger()}}class KPr extends En{constructor(){const e=Tt.and(Re.writable,kh.inlineEditVisibleContext,Tt.not(kh.cursorAtInlineEditKey));super({id:OPr,label:"Jump to Inline Edit",alias:"Jump to Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e},menuOpts:[{menuId:Rn.InlineEditToolbar,title:"Jump To Edit",group:"primary",order:3,when:e}]})}async run(e,n){const i=kh.get(n);i==null||i.jumpToCurrent()}}class qPr extends En{constructor(){const e=Tt.and(Re.writable,kh.cursorAtInlineEditContext);super({id:jPr,label:"Jump Back from Inline Edit",alias:"Jump Back from Inline Edit",precondition:e,kbOpts:{weight:110,primary:2646,kbExpr:e},menuOpts:[{menuId:Rn.InlineEditToolbar,title:"Jump Back",group:"primary",order:3,when:e}]})}async run(e,n){const i=kh.get(n);i==null||i.jumpBack()}}class GPr extends En{constructor(){const e=Tt.and(Re.writable,kh.inlineEditVisibleContext);super({id:PPr,label:"Reject Inline Edit",alias:"Reject Inline Edit",precondition:e,kbOpts:{weight:100,primary:9,kbExpr:e},menuOpts:[{menuId:Rn.InlineEditToolbar,title:"Reject",group:"secondary",order:2}]})}async run(e,n){const i=kh.get(n);await(i==null?void 0:i.clear())}}Ht(WPr);Ht(GPr);Ht(KPr);Ht(qPr);Ht(UPr);Wr(kh.ID,kh,3);const YPr="editor.action.inlineEdits.accept",XPr="editor.action.inlineEdits.showPrevious",ZPr="editor.action.inlineEdits.showNext",xF=new gn("inlineEditsVisible",!1,I("inlineEditsVisible","Whether an inline edit is visible")),QPr=new gn("inlineEditsIsPinned",!1,I("isPinned","Whether an inline edit is visible")),ZWe=class ZWe extends ct{constructor(e){super(),this._editor=e,this._editorObs=hm(this._editor),this._placeholderText=this._editorObs.getOption(88),this._state=gp({owner:this,equalsFn:zre},n=>{const i=this._placeholderText.read(n);if(i&&this._editorObs.valueIsEmpty.read(n))return{placeholder:i}}),this._shouldViewBeAlive=JPr(this,n=>{var i;return((i=this._state.read(n))==null?void 0:i.placeholder)!==void 0}),this._view=sM((n,i)=>{if(!this._shouldViewBeAlive.read(n))return;const r=pr("div.editorPlaceholder");i.add(ki(o=>{const s=this._state.read(o),a=(s==null?void 0:s.placeholder)!==void 0;r.root.style.display=a?"block":"none",r.root.innerText=(s==null?void 0:s.placeholder)??""})),i.add(ki(o=>{const s=this._editorObs.layoutInfo.read(o);r.root.style.left=`${s.contentLeft}px`,r.root.style.width=s.contentWidth-s.verticalScrollbarWidth+"px",r.root.style.top=`${this._editor.getTopForLineNumber(0)}px`})),i.add(ki(o=>{r.root.style.fontFamily=this._editorObs.getOption(49).read(o),r.root.style.fontSize=this._editorObs.getOption(52).read(o)+"px",r.root.style.lineHeight=this._editorObs.getOption(67).read(o)+"px"})),i.add(this._editorObs.createOverlayWidget({allowEditorOverflow:!1,minContentWidthInPx:Gg(0),position:Gg(null),domNode:r.root}))}),this._view.recomputeInitiallyAndOnChange(this._store)}};ZWe.ID="editor.contrib.placeholderText";let KU=ZWe;function JPr(t,e){return Fq(t,(n,i)=>i===!0?!0:e(n))}var eOr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},tOr=function(t,e){return function(n,i){e(n,i,t)}};class nOr{constructor(e,n,i){this.range=e,this.newLines=n,this.changes=i}}let I4e=class extends ct{constructor(e,n,i,r){super(),this._editor=e,this._edit=n,this._userPrompt=i,this._instantiationService=r,this._editorObs=hm(this._editor),this._elements=pr("div.inline-edits-widget",{style:{position:"absolute",overflow:"visible",top:"0px",left:"0px"}},[pr("div@editorContainer",{style:{position:"absolute",top:"0px",left:"0px",width:"500px",height:"500px"}},[pr("div.toolbar@toolbar",{style:{position:"absolute",top:"-25px",left:"0px"}}),pr("div.promptEditor@promptEditor",{style:{position:"absolute",top:"-25px",left:"80px",width:"300px",height:"22px"}}),pr("div.preview@editor",{style:{position:"absolute",top:"0px",left:"0px"}})]),qP("svg",{style:{overflow:"visible",pointerEvents:"none"}},[qP("defs",[qP("linearGradient",{id:"Gradient2",x1:"0",y1:"0",x2:"1",y2:"0"},[qP("stop",{offset:"0%",class:"gradient-stop"}),qP("stop",{offset:"100%",class:"gradient-stop"})])]),qP("path@path",{d:"",fill:"url(#Gradient2)"})])]),this._previewTextModel=this._register(this._instantiationService.createInstance(l0,"",Ph,l0.DEFAULT_CREATION_OPTIONS,null)),this._setText=Vn(s=>{const a=this._edit.read(s);a&&this._previewTextModel.setValue(a.newLines.join(`
`))}).recomputeInitiallyAndOnChange(this._store),this._promptTextModel=this._register(this._instantiationService.createInstance(l0,"",Ph,l0.DEFAULT_CREATION_OPTIONS,null)),this._promptEditor=this._register(this._instantiationService.createInstance(Fv,this._elements.promptEditor,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,placeholder:"Describe the change you want...",fontFamily:Cjt},{contributions:lI.getSomeEditorContributions([mv.ID,KU.ID,fF.ID]),isSimpleWidget:!0},this._editor)),this._previewEditor=this._register(this._instantiationService.createInstance(Fv,this._elements.editor,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0},{contributions:[]},this._editor)),this._previewEditorObs=hm(this._previewEditor),this._decorations=Vn(this,s=>{var u;this._setText.read(s);const a=(u=this._edit.read(s))==null?void 0:u.changes;if(!a)return[];const l=[],c=[];if(a.length===1&&a[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange()))return[];for(const d of a)if(d.original.isEmpty||l.push({range:d.original.toInclusiveRange(),options:mW}),d.modified.isEmpty||c.push({range:d.modified.toInclusiveRange(),options:xoe}),d.modified.isEmpty||d.original.isEmpty)d.original.isEmpty||l.push({range:d.original.toInclusiveRange(),options:V7e}),d.modified.isEmpty||c.push({range:d.modified.toInclusiveRange(),options:F7e});else for(const h of d.innerChanges||[])d.original.contains(h.originalRange.startLineNumber)&&l.push({range:h.originalRange,options:h.originalRange.isEmpty()?B7e:S5}),d.modified.contains(h.modifiedRange.startLineNumber)&&c.push({range:h.modifiedRange,options:h.modifiedRange.isEmpty()?$7e:woe});return c}),this._layout1=Vn(this,s=>{const a=this._editor.getModel(),l=this._edit.read(s);if(!l)return null;const c=l.range;let u=0;for(let f=c.startLineNumber;f<c.endLineNumberExclusive;f++){const m=a.getLineMaxColumn(f),p=this._editor.getOffsetForColumn(f,m);u=Math.max(u,p)}return{left:this._editor.getLayoutInfo().contentLeft+u}}),this._layout=Vn(this,s=>{const a=this._edit.read(s);if(!a)return null;const l=a.range,c=this._editorObs.scrollLeft.read(s),u=this._layout1.read(s).left+20-c,d=this._editor.getTopForLineNumber(l.startLineNumber)-this._editorObs.scrollTop.read(s),h=this._editor.getTopForLineNumber(l.endLineNumberExclusive)-this._editorObs.scrollTop.read(s),f=new P4(u,d),m=new P4(u,h),p=h-d,g=50,y=this._editor.getOption(67)*a.newLines.length,_=p-y,w=new P4(u+g,d+_/2),C=new P4(u+g,h-_/2);return{topCode:f,bottomCode:m,codeHeight:p,topEdit:w,bottomEdit:C,editHeight:y}});const o=Vn(this,s=>this._edit.read(s)!==void 0||this._userPrompt.read(s)!==void 0);this._register(gS(this._elements.root,{display:Vn(this,s=>o.read(s)?"block":"none")})),this._register(x4(this._editor.getDomNode(),this._elements.root)),this._register(hm(e).createOverlayWidget({domNode:this._elements.root,position:Gg(null),allowEditorOverflow:!1,minContentWidthInPx:Vn(s=>{var c;const a=(c=this._layout1.read(s))==null?void 0:c.left;if(a===void 0)return 0;const l=this._previewEditorObs.contentWidth.read(s);return a+l})})),this._previewEditor.setModel(this._previewTextModel),this._register(this._previewEditorObs.setDecorations(this._decorations)),this._register(ki(s=>{const a=this._layout.read(s);if(!a)return;const{topCode:l,bottomCode:c,topEdit:u,bottomEdit:d,editHeight:h}=a,f=10,m=0,p=40,g=new rOr().moveTo(l).lineTo(l.deltaX(f)).curveTo(l.deltaX(f+p),u.deltaX(-p-m),u.deltaX(-m)).lineTo(u).lineTo(d).lineTo(d.deltaX(-m)).curveTo(d.deltaX(-p-m),c.deltaX(f+p),c.deltaX(f)).lineTo(c).build();this._elements.path.setAttribute("d",g),this._elements.editorContainer.style.top=`${u.y}px`,this._elements.editorContainer.style.left=`${u.x}px`,this._elements.editorContainer.style.height=`${h}px`;const y=this._previewEditorObs.contentWidth.read(s);this._previewEditor.layout({height:h,width:y})})),this._promptEditor.setModel(this._promptTextModel),this._promptEditor.layout(),this._register(oOr(iOr(this._userPrompt,s=>s??"",s=>s),hm(this._promptEditor).value)),this._register(ki(s=>{const a=hm(this._promptEditor).isFocused.read(s);this._elements.root.classList.toggle("focused",a)}))}};I4e=eOr([tOr(3,qn)],I4e);function iOr(t,e,n){return Pq(void 0,i=>e(t.read(i)),(i,r)=>t.set(n(i),r))}class P4{constructor(e,n){this.x=e,this.y=n}deltaX(e){return new P4(this.x+e,this.y)}}class rOr{constructor(){this._data=""}moveTo(e){return this._data+=`M ${e.x} ${e.y} `,this}lineTo(e){return this._data+=`L ${e.x} ${e.y} `,this}curveTo(e,n,i){return this._data+=`C ${e.x} ${e.y} ${n.x} ${n.y} ${i.x} ${i.y} `,this}build(){return this._data}}function oOr(t,e){const n=new Lt;return n.add(ki(i=>{const r=t.read(i);e.set(r,void 0)})),n.add(ki(i=>{const r=e.read(i);t.set(r,void 0)})),n}var sOr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},lNe=function(t,e){return function(n,i){e(n,i,t)}},b9,u2;let A4e=(u2=class extends ct{static _createUniqueUri(){return ri.from({scheme:"inline-edits",path:new Date().toString()+String(b9._modelId++)})}constructor(e,n,i,r,o,s,a){super(),this.textModel=e,this._textModelVersionId=n,this._selection=i,this._debounceValue=r,this.languageFeaturesService=o,this._diffProviderFactoryService=s,this._modelService=a,this._forceUpdateExplicitlySignal=V6(this),this._selectedInlineCompletionId=lr(this,void 0),this._isActive=lr(this,!1),this._originalModel=Vd(()=>this._modelService.createModel("",null,b9._createUniqueUri())).keepObserved(this._store),this._modifiedModel=Vd(()=>this._modelService.createModel("",null,b9._createUniqueUri())).keepObserved(this._store),this._pinnedRange=new lOr(this.textModel,this._textModelVersionId),this.isPinned=this._pinnedRange.range.map(l=>!!l),this.userPrompt=lr(this,void 0),this.inlineEdit=Vn(this,l=>{var c,u;return(u=(c=this._inlineEdit.read(l))==null?void 0:c.promiseResult.read(l))==null?void 0:u.data}),this._inlineEdit=Vn(this,l=>{const c=this.selectedInlineEdit.read(l);if(!c)return;const u=c.inlineCompletion.range;if(c.inlineCompletion.insertText.trim()==="")return;let d=c.inlineCompletion.insertText.split(/\r\n|\r|\n/);function h(g){var _;const y=((_=g[0].match(/^\s*/))==null?void 0:_[0])??"";return g.map(w=>w.replace(new RegExp("^"+y),""))}d=h(d);let m=this.textModel.getValueInRange(u).split(/\r\n|\r|\n/);m=h(m),this._originalModel.get().setValue(m.join(`
`)),this._modifiedModel.get().setValue(d.join(`
`));const p=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:"advanced"});return xme.fromFn(async()=>{const g=await p.computeDiff(this._originalModel.get(),this._modifiedModel.get(),{computeMoves:!1,ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3},er.None);if(!g.identical)return new nOr(Ki.fromRangeInclusive(u),h(d),g.changes)})}),this._fetchStore=this._register(new Lt),this._inlineEditsFetchResult=sW(this,void 0),this._inlineEdits=gp({owner:this,equalsFn:zre},l=>{var c;return((c=this._inlineEditsFetchResult.read(l))==null?void 0:c.completions.map(u=>new aOr(u)))??[]}),this._fetchInlineEditsPromise=j5t({owner:this,createEmptyChangeSummary:()=>({inlineCompletionTriggerKind:x0.Automatic}),handleChange:(l,c)=>(l.didChange(this._forceUpdateExplicitlySignal)&&(c.inlineCompletionTriggerKind=x0.Explicit),!0)},async(l,c)=>{this._fetchStore.clear(),this._forceUpdateExplicitlySignal.read(l),this._textModelVersionId.read(l);function u(p,g){return g(p)}const d=this._pinnedRange.range.read(l)??u(this._selection.read(l),p=>p.isEmpty()?void 0:p);if(!d){this._inlineEditsFetchResult.set(void 0,void 0),this.userPrompt.set(void 0,void 0);return}const h={triggerKind:c.inlineCompletionTriggerKind,selectedSuggestionInfo:void 0,userPrompt:this.userPrompt.read(l)},f=gMe(this._fetchStore);await uw(200,f);const m=await NGt(this.languageFeaturesService.inlineCompletionsProvider,d,this.textModel,h,f);f.isCancellationRequested||this._inlineEditsFetchResult.set(m,void 0)}),this._filteredInlineEditItems=gp({owner:this,equalsFn:Bre()},l=>this._inlineEdits.read(l)),this.selectedInlineCompletionIndex=Vn(this,l=>{const c=this._selectedInlineCompletionId.read(l),u=this._filteredInlineEditItems.read(l),d=this._selectedInlineCompletionId===void 0?-1:u.findIndex(h=>h.semanticId===c);return d===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):d}),this.selectedInlineEdit=Vn(this,l=>{const c=this._filteredInlineEditItems.read(l),u=this.selectedInlineCompletionIndex.read(l);return c[u]}),this._register(B6(this._fetchInlineEditsPromise))}async triggerExplicitly(e){Q2(e,n=>{this._isActive.set(!0,n),this._forceUpdateExplicitlySignal.trigger(n)}),await this._fetchInlineEditsPromise.get()}stop(e){Q2(e,n=>{this.userPrompt.set(void 0,n),this._isActive.set(!1,n),this._inlineEditsFetchResult.set(void 0,n),this._pinnedRange.setRange(void 0,n)})}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const n=this._filteredInlineEditItems.get()||[];if(n.length>0){const i=(this.selectedInlineCompletionIndex.get()+e+n.length)%n.length;this._selectedInlineCompletionId.set(n[i].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){if(e.getModel()!==this.textModel)throw new co;const n=this.selectedInlineEdit.get();n&&(e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[n.inlineCompletion.toSingleTextEdit().toSingleEditOperation()]),this.stop())}},b9=u2,u2._modelId=0,u2);A4e=b9=sOr([lNe(4,Ln),lNe(5,zq),lNe(6,Ds)],A4e);class aOr{constructor(e){this.inlineCompletion=e,this.semanticId=this.inlineCompletion.hash()}}class lOr extends ct{constructor(e,n){super(),this._textModel=e,this._versionId=n,this._decorations=lr(this,[]),this.range=Vn(this,i=>{this._versionId.read(i);const r=this._decorations.read(i)[0];return r?this._textModel.getDecorationRange(r)??null:null}),this._register(Kn(()=>{this._textModel.deltaDecorations(this._decorations.get(),[])}))}setRange(e,n){this._decorations.set(this._textModel.deltaDecorations(this._decorations.get(),e?[{range:e,options:{description:"trackedRange"}}]:[]),n)}}var cOr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},L7=function(t,e){return function(n,i){e(n,i,t)}},R4e,d2;let kS=(d2=class extends ct{static get(e){return e.getContribution(R4e.ID)}constructor(e,n,i,r,o,s){super(),this.editor=e,this._instantiationService=n,this._contextKeyService=i,this._debounceService=r,this._languageFeaturesService=o,this._configurationService=s,this._enabled=KMi("editor.inlineEdits.enabled",!1,this._configurationService),this._editorObs=hm(this.editor),this._selection=Vn(this,a=>this._editorObs.cursorSelection.read(a)??new Pn(1,1,1,1)),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineEditsDebounce",{min:50,max:50}),this.model=Vd(this,a=>{if(!this._enabled.read(a)||this._editorObs.isReadonly.read(a))return;const l=this._editorObs.model.read(a);return l?this._instantiationService.createInstance(tm(A4e,a),l,this._editorObs.versionId,this._selection,this._debounceValue):void 0}),this._hadInlineEdit=Fq(this,(a,l)=>{var c;return l||((c=this.model.read(a))==null?void 0:c.inlineEdit.read(a))!==void 0}),this._widget=Vd(this,a=>{if(this._hadInlineEdit.read(a))return this._instantiationService.createInstance(tm(I4e,a),this.editor,this.model.map((l,c)=>l==null?void 0:l.inlineEdit.read(c)),uOr(l=>{var c;return((c=this.model.read(l))==null?void 0:c.userPrompt)??lr("empty","")}))}),this._register(My(xF,this._contextKeyService,a=>{var l;return!!((l=this.model.read(a))!=null&&l.inlineEdit.read(a))})),this._register(My(QPr,this._contextKeyService,a=>{var l;return!!((l=this.model.read(a))!=null&&l.isPinned.read(a))})),this.model.recomputeInitiallyAndOnChange(this._store),this._widget.recomputeInitiallyAndOnChange(this._store)}},R4e=d2,d2.ID="editor.contrib.inlineEditsController",d2);kS=R4e=cOr([L7(1,qn),L7(2,vi),L7(3,tg),L7(4,Ln),L7(5,cr)],kS);function uOr(t){return Pq(void 0,e=>t(e).read(e),(e,n)=>{t(void 0).set(e,n)})}function jG(t){return{label:t.value,alias:t.original}}const qce=class qce extends En{constructor(){super({id:qce.ID,...jG(Ci("action.inlineEdits.showNext","Show Next Inline Edit")),precondition:Tt.and(Re.writable,xF),kbOpts:{weight:100,primary:606}})}async run(e,n){var r;const i=kS.get(n);(r=i==null?void 0:i.model.get())==null||r.next()}};qce.ID=ZPr;let P4e=qce;const Gce=class Gce extends En{constructor(){super({id:Gce.ID,...jG(Ci("action.inlineEdits.showPrevious","Show Previous Inline Edit")),precondition:Tt.and(Re.writable,xF),kbOpts:{weight:100,primary:604}})}async run(e,n){var r;const i=kS.get(n);(r=i==null?void 0:i.model.get())==null||r.previous()}};Gce.ID=XPr;let O4e=Gce;class dOr extends En{constructor(){super({id:"editor.action.inlineEdits.trigger",...jG(Ci("action.inlineEdits.trigger","Trigger Inline Edit")),precondition:Re.writable})}async run(e,n){const i=kS.get(n);await O5t(async r=>{var o;await((o=i==null?void 0:i.model.get())==null?void 0:o.triggerExplicitly(r))})}}class hOr extends En{constructor(){super({id:YPr,...jG(Ci("action.inlineEdits.accept","Accept Inline Edit")),precondition:xF,menuOpts:{menuId:Rn.InlineEditsActions,title:I("inlineEditsActions","Accept Inline Edit"),group:"primary",order:1,icon:qt.check},kbOpts:{primary:2058,weight:2e4,kbExpr:xF}})}async run(e,n){var r;n instanceof Fv&&(n=n.getParentEditor());const i=kS.get(n);i&&((r=i.model.get())==null||r.accept(i.editor),i.editor.focus())}}const Yce=class Yce extends En{constructor(){super({id:Yce.ID,...jG(Ci("action.inlineEdits.hide","Hide Inline Edit")),precondition:xF,kbOpts:{weight:100,primary:9}})}async run(e,n){const i=kS.get(n);ma(r=>{var o;(o=i==null?void 0:i.model.get())==null||o.stop(r)})}};Yce.ID="editor.action.inlineEdits.hide";let j4e=Yce;Wr(kS.ID,kS,3);Ht(dOr);Ht(P4e);Ht(O4e);Ht(hOr);Ht(j4e);const wA={Visible:new gn("parameterHintsVisible",!1),MultipleSignatures:new gn("parameterHintsMultipleSignatures",!1)};async function WGt(t,e,n,i,r){const o=t.ordered(e);for(const s of o)try{const a=await s.provideSignatureHelp(e,n,r,i);if(a)return a}catch(a){$a(a)}}Ar.registerCommand("_executeSignatureHelpProvider",async(t,...e)=>{const[n,i,r]=e;Gr(ri.isUri(n)),Gr(ot.isIPosition(i)),Gr(typeof r=="string"||!r);const o=t.get(Ln),s=await t.get(Rf).createModelReference(n);try{const a=await WGt(o.signatureHelpProvider,s.object.textEditorModel,ot.lift(i),{triggerKind:Hx.Invoke,isRetrigger:!1,triggerCharacter:r},er.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{s.dispose()}});var dE;(function(t){t.Default={type:0};class e{constructor(r,o){this.request=r,this.previouslyActiveHints=o,this.type=2}}t.Pending=e;class n{constructor(r){this.hints=r,this.type=1}}t.Active=n})(dE||(dE={}));const Xce=class Xce extends ct{constructor(e,n,i=Xce.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new st),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=dE.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new mc),this.triggerChars=new Jie,this.retriggerChars=new Jie,this.triggerId=0,this.editor=e,this.providers=n,this.throttledDelayer=new Lv(i),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(r=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(r=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(r=>this.onCursorChange(r))),this._register(this.editor.onDidChangeModelContent(r=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(r=>this.onDidType(r))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=dE.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,n){const i=this.editor.getModel();if(!i||!this.providers.has(i))return;const r=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(r),n).catch(ji)}next(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,n=this.state.hints.activeSignature,i=n%e===e-1,r=this.editor.getOption(86).cycle;if((e<2||i)&&!r){this.cancel();return}this.updateActiveSignature(i&&r?0:n+1)}previous(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,n=this.state.hints.activeSignature,i=n===0,r=this.editor.getOption(86).cycle;if((e<2||i)&&!r){this.cancel();return}this.updateActiveSignature(i&&r?e-1:n-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new dE.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){const n=this.state.type===1||this.state.type===2,i=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const r=this._pendingTriggers.reduce(fOr);this._pendingTriggers=[];const o={triggerKind:r.triggerKind,triggerCharacter:r.triggerCharacter,isRetrigger:n,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const s=this.editor.getModel(),a=this.editor.getPosition();this.state=new dE.Pending(cc(l=>WGt(this.providers,s,a,o,l)),i);try{const l=await this.state.request;return e!==this.triggerId?(l==null||l.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l==null||l.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new dE.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=dE.Default),ji(l),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const n of this.providers.ordered(e)){for(const i of n.signatureHelpTriggerCharacters||[])if(i.length){const r=i.charCodeAt(0);this.triggerChars.add(r),this.retriggerChars.add(r)}for(const i of n.signatureHelpRetriggerCharacters||[])i.length&&this.retriggerChars.add(i.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const n=e.length-1,i=e.charCodeAt(n);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:Hx.TriggerCharacter,triggerCharacter:e.charAt(n)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:Hx.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:Hx.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(86).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}};Xce.DEFAULT_DELAY=120;let F4e=Xce;function fOr(t,e){switch(e.triggerKind){case Hx.Invoke:return e;case Hx.ContentChange:return t;case Hx.TriggerCharacter:default:return e}}var mOr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},QJ=function(t,e){return function(n,i){e(n,i,t)}},$4e;const Jm=Xt,pOr=ks("parameter-hints-next",qt.chevronDown,I("parameterHintsNextIcon","Icon for show next parameter hint.")),gOr=ks("parameter-hints-previous",qt.chevronUp,I("parameterHintsPreviousIcon","Icon for show previous parameter hint."));var h2;let V4e=(h2=class extends ct{constructor(e,n,i,r,o,s){super(),this.editor=e,this.model=n,this.telemetryService=s,this.renderDisposeables=this._register(new Lt),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new pS({editor:e},o,r)),this.keyVisible=wA.Visible.bindTo(i),this.keyMultipleSignatures=wA.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){const e=Jm(".editor-widget.parameter-hints-widget"),n=jt(e,Jm(".phwrapper"));n.tabIndex=-1;const i=jt(n,Jm(".controls")),r=jt(i,Jm(".button"+ci.asCSSSelector(gOr))),o=jt(i,Jm(".overloads")),s=jt(i,Jm(".button"+ci.asCSSSelector(pOr)));this._register(yt(r,"click",h=>{Mr.stop(h),this.previous()})),this._register(yt(s,"click",h=>{Mr.stop(h),this.next()}));const a=Jm(".body"),l=new Eq(a,{alwaysConsumeMouseWheel:!0});this._register(l),n.appendChild(l.getDomNode());const c=jt(a,Jm(".signature")),u=jt(a,Jm(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:c,overloads:o,docs:u,scrollbar:l},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(h=>{this.visible&&this.editor.layoutContentWidget(this)}));const d=()=>{if(!this.domNodes)return;const h=this.editor.getOption(50),f=this.domNodes.element;f.style.fontSize=`${h.fontSize}px`,f.style.lineHeight=`${h.lineHeight/h.fontSize}`,f.style.setProperty("--vscode-parameterHintsWidget-editorFontFamily",h.fontFamily),f.style.setProperty("--vscode-parameterHintsWidget-editorFontFamilyDefault",Rh.fontFamily)};d(),this._register(rn.chain(this.editor.onDidChangeConfiguration.bind(this.editor),h=>h.filter(f=>f.hasChanged(50)))(d)),this._register(this.editor.onDidLayoutChange(h=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{var e;(e=this.domNodes)==null||e.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,(e=this.domNodes)==null||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){if(this.renderDisposeables.clear(),!this.domNodes)return;const n=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",n),this.keyMultipleSignatures.set(n),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const i=e.signatures[e.activeSignature];if(!i)return;const r=jt(this.domNodes.signature,Jm(".code")),o=i.parameters.length>0,s=i.activeParameter??e.activeParameter;if(o)this.renderParameters(r,i,s);else{const c=jt(r,Jm("span"));c.textContent=i.label}const a=i.parameters[s];if(a!=null&&a.documentation){const c=Jm("span.documentation");if(typeof a.documentation=="string")c.textContent=a.documentation;else{const u=this.renderMarkdownDocs(a.documentation);c.appendChild(u.element)}jt(this.domNodes.docs,Jm("p",{},c))}if(i.documentation!==void 0)if(typeof i.documentation=="string")jt(this.domNodes.docs,Jm("p",{},i.documentation));else{const c=this.renderMarkdownDocs(i.documentation);jt(this.domNodes.docs,c.element)}const l=this.hasDocs(i,a);if(this.domNodes.signature.classList.toggle("has-docs",l),this.domNodes.docs.classList.toggle("empty",!l),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,a){let c="";const u=i.parameters[s];Array.isArray(u.label)?c=i.label.substring(u.label[0],u.label[1]):c=u.label,u.documentation&&(c+=typeof u.documentation=="string"?`, ${u.documentation}`:`, ${u.documentation.value}`),i.documentation&&(c+=typeof i.documentation=="string"?`, ${i.documentation}`:`, ${i.documentation.value}`),this.announcedLabel!==c&&(Am(I("hint","{0}, hint",c)),this.announcedLabel=c)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const n=new cu,i=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var o;(o=this.domNodes)==null||o.scrollbar.scanDomNode()}}));i.element.classList.add("markdown-docs");const r=n.elapsed();return r>300&&this.telemetryService.publicLog2("parameterHints.parseMarkdown",{renderDuration:r}),i}hasDocs(e,n){return!!(n&&typeof n.documentation=="string"&&VE(n.documentation).length>0||n&&typeof n.documentation=="object"&&VE(n.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&VE(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&VE(e.documentation.value).length>0)}renderParameters(e,n,i){const[r,o]=this.getParameterLabelOffsets(n,i),s=document.createElement("span");s.textContent=n.label.substring(0,r);const a=document.createElement("span");a.textContent=n.label.substring(r,o),a.className="parameter active";const l=document.createElement("span");l.textContent=n.label.substring(o),jt(e,s,a,l)}getParameterLabelOffsets(e,n){const i=e.parameters[n];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const r=new RegExp(`(\\W|^)${Hp(i.label)}(?=\\W|$)`,"g");r.test(e.label);const o=r.lastIndex-i.label.length;return o>=0?[o,r.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return $4e.ID}updateMaxHeight(){if(!this.domNodes)return;const n=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=n;const i=this.domNodes.element.getElementsByClassName("phwrapper");i.length&&(i[0].style.maxHeight=n)}},$4e=h2,h2.ID="editor.widget.parameterHintsWidget",h2);V4e=$4e=mOr([QJ(2,vi),QJ(3,Wm),QJ(4,Qs),QJ(5,eh)],V4e);Fe("editorHoverWidget.highlightForeground",h4,I("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));var bOr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},I0t=function(t,e){return function(n,i){e(n,i,t)}},B4e,f2;let wF=(f2=class extends ct{static get(e){return e.getContribution(B4e.ID)}constructor(e,n,i){super(),this.editor=e,this.model=this._register(new F4e(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints(r=>{var o;r?(this.widget.value.show(),this.widget.value.render(r)):(o=this.widget.rawValue)==null||o.hide()})),this.widget=new U0(()=>this._register(n.createInstance(V4e,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){var e;(e=this.widget.rawValue)==null||e.previous()}next(){var e;(e=this.widget.rawValue)==null||e.next()}trigger(e){this.model.trigger(e,0)}},B4e=f2,f2.ID="editor.controller.parameterHints",f2);wF=B4e=bOr([I0t(1,qn),I0t(2,Ln)],wF);class vOr extends En{constructor(){super({id:"editor.action.triggerParameterHints",label:I("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:Re.hasSignatureHelpProvider,kbOpts:{kbExpr:Re.editorTextFocus,primary:3082,weight:100}})}run(e,n){const i=wF.get(n);i==null||i.trigger({triggerKind:Hx.Invoke})}}Wr(wF.ID,wF,2);Ht(vOr);const AWe=175,RWe=Zl.bindToContribution(wF.get);fn(new RWe({id:"closeParameterHints",precondition:wA.Visible,handler:t=>t.cancel(),kbOpts:{weight:AWe,kbExpr:Re.focus,primary:9,secondary:[1033]}}));fn(new RWe({id:"showPrevParameterHint",precondition:Tt.and(wA.Visible,wA.MultipleSignatures),handler:t=>t.previous(),kbOpts:{weight:AWe,kbExpr:Re.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));fn(new RWe({id:"showNextParameterHint",precondition:Tt.and(wA.Visible,wA.MultipleSignatures),handler:t=>t.next(),kbOpts:{weight:AWe,kbExpr:Re.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));var yOr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},_Or=function(t,e){return function(n,i){e(n,i,t)}};class xOr{constructor(e){this.instantiationService=e}init(...e){}}function wOr(t,e){return class extends e{constructor(){super(...arguments),this._autorun=void 0}init(...i){this._autorun=Sf((r,o)=>{const s=tm(t(),r);o.add(this.instantiationService.createInstance(s,...i))})}dispose(){var i;(i=this._autorun)==null||i.dispose()}}}function COr(t){return Ime()?wOr(t,z4e):t()}let z4e=class extends xOr{constructor(e,n){super(n),this.init(e)}};z4e=yOr([_Or(1,qn)],z4e);Wr(KU.ID,COr(()=>KU),0);Fe("editor.placeholder.foreground",Uyi,I("placeholderForeground","Foreground color of the placeholder text in the editor."));var SOr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},JJ=function(t,e){return function(n,i){e(n,i,t)}};const I$=new gn("renameInputVisible",!1,I("renameInputVisible","Whether the rename input widget is visible"));new gn("renameInputFocused",!1,I("renameInputFocused","Whether the rename input widget is focused"));let H4e=class{constructor(e,n,i,r,o,s){this._editor=e,this._acceptKeybindings=n,this._themeService=i,this._keybindingService=r,this._logService=s,this.allowEditorOverflow=!0,this._disposables=new Lt,this._visibleContextKey=I$.bindTo(o),this._isEditingRenameCandidate=!1,this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,this._candidates=new Set,this._beforeFirstInputFieldEditSW=new cu,this._inputWithButton=new NOr,this._disposables.add(this._inputWithButton),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(50)&&this._updateFont()})),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputWithButton.domNode),this._renameCandidateListView=this._disposables.add(new PWe(this._domNode,{fontInfo:this._editor.getOption(50),onFocusChange:e=>{this._inputWithButton.input.value=e,this._isEditingRenameCandidate=!1},onSelectionChange:()=>{this._isEditingRenameCandidate=!1,this.acceptInput(!1)}})),this._disposables.add(this._inputWithButton.onDidInputChange(()=>{var e,n,i;((e=this._renameCandidateListView)==null?void 0:e.focusedCandidate)!==void 0&&(this._isEditingRenameCandidate=!0),this._timeBeforeFirstInputFieldEdit??(this._timeBeforeFirstInputFieldEdit=this._beforeFirstInputFieldEditSW.elapsed()),((n=this._renameCandidateProvidersCts)==null?void 0:n.token.isCancellationRequested)===!1&&this._renameCandidateProvidersCts.cancel(),(i=this._renameCandidateListView)==null||i.clearFocus()})),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){if(!this._domNode)return;const n=e.getColor(P6),i=e.getColor(O3t);this._domNode.style.backgroundColor=String(e.getColor(Kg)??""),this._domNode.style.boxShadow=n?` 0 0 8px 2px ${n}`:"",this._domNode.style.border=i?`1px solid ${i}`:"",this._domNode.style.color=String(e.getColor($3t)??"");const r=e.getColor(V3t);this._inputWithButton.domNode.style.backgroundColor=String(e.getColor(iTe)??""),this._inputWithButton.input.style.backgroundColor=String(e.getColor(iTe)??""),this._inputWithButton.domNode.style.borderWidth=r?"1px":"0px",this._inputWithButton.domNode.style.borderStyle=r?"solid":"none",this._inputWithButton.domNode.style.borderColor=(r==null?void 0:r.toString())??"none"}_updateFont(){if(this._domNode===void 0)return;Gr(this._label!==void 0,"RenameWidget#_updateFont: _label must not be undefined given _domNode is defined"),this._editor.applyFontInfo(this._inputWithButton.input);const e=this._editor.getOption(50);this._label.style.fontSize=`${this._computeLabelFontSize(e.fontSize)}px`}_computeLabelFontSize(e){return e*.8}getPosition(){if(!this._visible||!this._editor.hasModel()||!this._editor.getDomNode())return null;const e=hk(this.getDomNode().ownerDocument.body),n=Ga(this._editor.getDomNode()),i=this._getTopForPosition();this._nPxAvailableAbove=i+n.top,this._nPxAvailableBelow=e.height-this._nPxAvailableAbove;const r=this._editor.getOption(67),{totalHeight:o}=qU.getLayoutInfo({lineHeight:r}),s=this._nPxAvailableBelow>o*6?[2,1]:[1,2];return{position:this._position,preference:s}}beforeRender(){var i,r;const[e,n]=this._acceptKeybindings;return this._label.innerText=I({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",(i=this._keybindingService.lookupKeybinding(e))==null?void 0:i.getLabel(),(r=this._keybindingService.lookupKeybinding(n))==null?void 0:r.getLabel()),this._domNode.style.minWidth="200px",null}afterRender(e){if(this._trace("invoking afterRender, position: ",e?"not null":"null"),e===null){this.cancelInput(!0,"afterRender (because position is null)");return}if(!this._editor.hasModel()||!this._editor.getDomNode())return;Gr(this._renameCandidateListView),Gr(this._nPxAvailableAbove!==void 0),Gr(this._nPxAvailableBelow!==void 0);const n=oC(this._inputWithButton.domNode),i=oC(this._label);let r;e===2?r=this._nPxAvailableBelow:r=this._nPxAvailableAbove,this._renameCandidateListView.layout({height:r-i-n,width:Jf(this._inputWithButton.domNode)})}acceptInput(e){var n;this._trace("invoking acceptInput"),(n=this._currentAcceptInput)==null||n.call(this,e)}cancelInput(e,n){var i;this._trace(`invoking cancelInput, caller: ${n}, _currentCancelInput: ${this._currentAcceptInput?"not undefined":"undefined"}`),(i=this._currentCancelInput)==null||i.call(this,e)}focusNextRenameSuggestion(){var e;(e=this._renameCandidateListView)!=null&&e.focusNext()||(this._inputWithButton.input.value=this._currentName)}focusPreviousRenameSuggestion(){var e;(e=this._renameCandidateListView)!=null&&e.focusPrevious()||(this._inputWithButton.input.value=this._currentName)}getInput(e,n,i,r,o){const{start:s,end:a}=this._getSelection(e,n);this._renameCts=o;const l=new Lt;this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,r===void 0?this._inputWithButton.button.style.display="none":(this._inputWithButton.button.style.display="flex",this._requestRenameCandidatesOnce=r,this._requestRenameCandidates(n,!1),l.add(yt(this._inputWithButton.button,"click",()=>this._requestRenameCandidates(n,!0))),l.add(yt(this._inputWithButton.button,Yt.KEY_DOWN,u=>{const d=new as(u);(d.equals(3)||d.equals(10))&&(d.stopPropagation(),d.preventDefault(),this._requestRenameCandidates(n,!0))}))),this._isEditingRenameCandidate=!1,this._domNode.classList.toggle("preview",i),this._position=new ot(e.startLineNumber,e.startColumn),this._currentName=n,this._inputWithButton.input.value=n,this._inputWithButton.input.setAttribute("selectionStart",s.toString()),this._inputWithButton.input.setAttribute("selectionEnd",a.toString()),this._inputWithButton.input.size=Math.max((e.endColumn-e.startColumn)*1.1,20),this._beforeFirstInputFieldEditSW.reset(),l.add(Kn(()=>{this._renameCts=void 0,o.dispose(!0)})),l.add(Kn(()=>{this._renameCandidateProvidersCts!==void 0&&(this._renameCandidateProvidersCts.dispose(!0),this._renameCandidateProvidersCts=void 0)})),l.add(Kn(()=>this._candidates.clear()));const c=new k6;return c.p.finally(()=>{l.dispose(),this._hide()}),this._currentCancelInput=u=>{var d;return this._trace("invoking _currentCancelInput"),this._currentAcceptInput=void 0,this._currentCancelInput=void 0,(d=this._renameCandidateListView)==null||d.clearCandidates(),c.complete(u),!0},this._currentAcceptInput=u=>{this._trace("invoking _currentAcceptInput"),Gr(this._renameCandidateListView!==void 0);const d=this._renameCandidateListView.nCandidates;let h,f;const m=this._renameCandidateListView.focusedCandidate;if(m!==void 0?(this._trace("using new name from renameSuggestion"),h=m,f={k:"renameSuggestion"}):(this._trace("using new name from inputField"),h=this._inputWithButton.input.value,f=this._isEditingRenameCandidate?{k:"userEditedRenameSuggestion"}:{k:"inputField"}),h===n||h.trim().length===0){this.cancelInput(!0,"_currentAcceptInput (because newName === value || newName.trim().length === 0)");return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView.clearCandidates(),c.complete({newName:h,wantsPreview:i&&u,stats:{source:f,nRenameSuggestions:d,timeBeforeFirstInputFieldEdit:this._timeBeforeFirstInputFieldEdit,nRenameSuggestionsInvocations:this._nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:this._hadAutomaticRenameSuggestionsInvocation}})},l.add(o.token.onCancellationRequested(()=>this.cancelInput(!0,"cts.token.onCancellationRequested"))),l.add(this._editor.onDidBlurEditorWidget(()=>{var u;return this.cancelInput(!((u=this._domNode)!=null&&u.ownerDocument.hasFocus()),"editor.onDidBlurEditorWidget")})),this._show(),c.p}_requestRenameCandidates(e,n){if(this._requestRenameCandidatesOnce!==void 0&&(this._renameCandidateProvidersCts!==void 0&&this._renameCandidateProvidersCts.dispose(!0),Gr(this._renameCts),this._inputWithButton.buttonState!=="stop")){this._renameCandidateProvidersCts=new oa;const i=n?wH.Invoke:wH.Automatic,r=this._requestRenameCandidatesOnce(i,this._renameCandidateProvidersCts.token);if(r.length===0){this._inputWithButton.setSparkleButton();return}n||(this._hadAutomaticRenameSuggestionsInvocation=!0),this._nRenameSuggestionsInvocations+=1,this._inputWithButton.setStopButton(),this._updateRenameCandidates(r,e,this._renameCts.token)}}_getSelection(e,n){Gr(this._editor.hasModel());const i=this._editor.getSelection();let r=0,o=n.length;return!ve.isEmpty(i)&&!ve.spansMultipleLines(i)&&ve.containsRange(e,i)&&(r=Math.max(0,i.startColumn-e.startColumn),o=Math.min(e.endColumn,i.endColumn)-e.startColumn),{start:r,end:o}}_show(){this._trace("invoking _show"),this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._inputWithButton.input.focus(),this._inputWithButton.input.setSelectionRange(parseInt(this._inputWithButton.input.getAttribute("selectionStart")),parseInt(this._inputWithButton.input.getAttribute("selectionEnd")))},100)}async _updateRenameCandidates(e,n,i){const r=(...c)=>this._trace("_updateRenameCandidates",...c);r("start");const o=await vq(Promise.allSettled(e),i);if(this._inputWithButton.setSparkleButton(),o===void 0){r("returning early - received updateRenameCandidates results - undefined");return}const s=o.flatMap(c=>c.status==="fulfilled"&&zx(c.value)?c.value:[]);r(`received updateRenameCandidates results - total (unfiltered) ${s.length} candidates.`);const a=cS(s,c=>c.newSymbolName);r(`distinct candidates - ${a.length} candidates.`);const l=a.filter(({newSymbolName:c})=>c.trim().length>0&&c!==this._inputWithButton.input.value&&c!==n&&!this._candidates.has(c));if(r(`valid distinct candidates - ${s.length} candidates.`),l.forEach(c=>this._candidates.add(c.newSymbolName)),l.length<1){r("returning early - no valid distinct candidates");return}r("setting candidates"),this._renameCandidateListView.setCandidates(l),r("asking editor to re-layout"),this._editor.layoutContentWidget(this)}_hide(){this._trace("invoked _hide"),this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}_getTopForPosition(){const e=this._editor.getVisibleRanges();let n;return e.length>0?n=e[0].startLineNumber:(this._logService.warn("RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty"),n=Math.max(1,this._position.lineNumber-5)),this._editor.getTopForLineNumber(this._position.lineNumber)-this._editor.getTopForLineNumber(n)}_trace(...e){this._logService.trace("RenameWidget",...e)}};H4e=SOr([JJ(2,Ql),JJ(3,vo),JJ(4,vi),JJ(5,Nd)],H4e);class PWe{constructor(e,n){this._disposables=new Lt,this._availableHeight=0,this._minimumWidth=0,this._lineHeight=n.fontInfo.lineHeight,this._typicalHalfwidthCharacterWidth=n.fontInfo.typicalHalfwidthCharacterWidth,this._listContainer=document.createElement("div"),this._listContainer.className="rename-box rename-candidate-list-container",e.appendChild(this._listContainer),this._listWidget=PWe._createListWidget(this._listContainer,this._candidateViewHeight,n.fontInfo),this._listWidget.onDidChangeFocus(i=>{i.elements.length===1&&n.onFocusChange(i.elements[0].newSymbolName)},this._disposables),this._listWidget.onDidChangeSelection(i=>{i.elements.length===1&&n.onSelectionChange()},this._disposables),this._disposables.add(this._listWidget.onDidBlur(i=>{this._listWidget.setFocus([])})),this._listWidget.style(iR({listInactiveFocusForeground:VH,listInactiveFocusBackground:BH}))}dispose(){this._listWidget.dispose(),this._disposables.dispose()}layout({height:e,width:n}){this._availableHeight=e,this._minimumWidth=n}setCandidates(e){this._listWidget.splice(0,0,e);const n=this._pickListHeight(this._listWidget.length),i=this._pickListWidth(e);this._listWidget.layout(n,i),this._listContainer.style.height=`${n}px`,this._listContainer.style.width=`${i}px`,hw(I("renameSuggestionsReceivedAria","Received {0} rename suggestions",e.length))}clearCandidates(){this._listContainer.style.height="0px",this._listContainer.style.width="0px",this._listWidget.splice(0,this._listWidget.length,[])}get nCandidates(){return this._listWidget.length}get focusedCandidate(){if(this._listWidget.length===0)return;const e=this._listWidget.getSelectedElements()[0];if(e!==void 0)return e.newSymbolName;const n=this._listWidget.getFocusedElements()[0];if(n!==void 0)return n.newSymbolName}focusNext(){if(this._listWidget.length===0)return!1;const e=this._listWidget.getFocus();if(e.length===0)return this._listWidget.focusFirst(),this._listWidget.reveal(0),!0;if(e[0]===this._listWidget.length-1)return this._listWidget.setFocus([]),this._listWidget.reveal(0),!1;{this._listWidget.focusNext();const n=this._listWidget.getFocus()[0];return this._listWidget.reveal(n),!0}}focusPrevious(){if(this._listWidget.length===0)return!1;const e=this._listWidget.getFocus();if(e.length===0){this._listWidget.focusLast();const n=this._listWidget.getFocus()[0];return this._listWidget.reveal(n),!0}else{if(e[0]===0)return this._listWidget.setFocus([]),!1;{this._listWidget.focusPrevious();const n=this._listWidget.getFocus()[0];return this._listWidget.reveal(n),!0}}}clearFocus(){this._listWidget.setFocus([])}get _candidateViewHeight(){const{totalHeight:e}=qU.getLayoutInfo({lineHeight:this._lineHeight});return e}_pickListHeight(e){const n=this._candidateViewHeight*e;return Math.min(n,this._availableHeight,this._candidateViewHeight*7)}_pickListWidth(e){const n=Math.ceil(Math.max(...e.map(r=>r.newSymbolName.length))*this._typicalHalfwidthCharacterWidth);return Math.max(this._minimumWidth,25+n+10)}static _createListWidget(e,n,i){const r=new class{getTemplateId(s){return"candidate"}getHeight(s){return n}},o=new class{constructor(){this.templateId="candidate"}renderTemplate(s){return new qU(s,i)}renderElement(s,a,l){l.populate(s)}disposeTemplate(s){s.dispose()}};return new ng("NewSymbolNameCandidates",e,r,[o],{keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1})}}class NOr{constructor(){this._onDidInputChange=new st,this.onDidInputChange=this._onDidInputChange.event,this._disposables=new Lt}get domNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="rename-input-with-button",this._domNode.style.display="flex",this._domNode.style.flexDirection="row",this._domNode.style.alignItems="center",this._inputNode=document.createElement("input"),this._inputNode.className="rename-input",this._inputNode.type="text",this._inputNode.style.border="none",this._inputNode.setAttribute("aria-label",I("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._inputNode),this._buttonNode=document.createElement("div"),this._buttonNode.className="rename-suggestions-button",this._buttonNode.setAttribute("tabindex","0"),this._buttonGenHoverText=I("generateRenameSuggestionsButton","Generate new name suggestions"),this._buttonCancelHoverText=I("cancelRenameSuggestionsButton","Cancel"),this._buttonHover=d_().setupManagedHover(Yh("element"),this._buttonNode,this._buttonGenHoverText),this._disposables.add(this._buttonHover),this._domNode.appendChild(this._buttonNode),this._disposables.add(yt(this.input,Yt.INPUT,()=>this._onDidInputChange.fire())),this._disposables.add(yt(this.input,Yt.KEY_DOWN,e=>{const n=new as(e);(n.keyCode===15||n.keyCode===17)&&this._onDidInputChange.fire()})),this._disposables.add(yt(this.input,Yt.CLICK,()=>this._onDidInputChange.fire())),this._disposables.add(yt(this.input,Yt.FOCUS,()=>{this.domNode.style.outlineWidth="1px",this.domNode.style.outlineStyle="solid",this.domNode.style.outlineOffset="-1px",this.domNode.style.outlineColor="var(--vscode-focusBorder)"})),this._disposables.add(yt(this.input,Yt.BLUR,()=>{this.domNode.style.outline="none"}))),this._domNode}get input(){return Gr(this._inputNode),this._inputNode}get button(){return Gr(this._buttonNode),this._buttonNode}get buttonState(){return this._buttonState}setSparkleButton(){var e;this._buttonState="sparkle",this._sparkleIcon??(this._sparkleIcon=Y2(qt.sparkle)),ru(this.button),this.button.appendChild(this._sparkleIcon),this.button.setAttribute("aria-label","Generating new name suggestions"),(e=this._buttonHover)==null||e.update(this._buttonGenHoverText),this.input.focus()}setStopButton(){var e;this._buttonState="stop",this._stopIcon??(this._stopIcon=Y2(qt.primitiveSquare)),ru(this.button),this.button.appendChild(this._stopIcon),this.button.setAttribute("aria-label","Cancel generating new name suggestions"),(e=this._buttonHover)==null||e.update(this._buttonCancelHoverText),this.input.focus()}dispose(){this._disposables.dispose()}}const dz=class dz{constructor(e,n){this._domNode=document.createElement("div"),this._domNode.className="rename-box rename-candidate",this._domNode.style.display="flex",this._domNode.style.columnGap="5px",this._domNode.style.alignItems="center",this._domNode.style.height=`${n.lineHeight}px`,this._domNode.style.padding=`${dz._PADDING}px`;const i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.width=i.style.height=`${n.lineHeight*.8}px`,this._domNode.appendChild(i),this._icon=Y2(qt.sparkle),this._icon.style.display="none",i.appendChild(this._icon),this._label=document.createElement("div"),su(this._label,n),this._domNode.appendChild(this._label),e.appendChild(this._domNode)}populate(e){this._updateIcon(e),this._updateLabel(e)}_updateIcon(e){var i;const n=!!((i=e.tags)!=null&&i.includes(CMe.AIGenerated));this._icon.style.display=n?"inherit":"none"}_updateLabel(e){this._label.innerText=e.newSymbolName}static getLayoutInfo({lineHeight:e}){return{totalHeight:e+dz._PADDING*2}}dispose(){}};dz._PADDING=2;let qU=dz;var EOr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},WN=function(t,e){return function(n,i){e(n,i,t)}},W4e;class OWe{constructor(e,n,i){this.model=e,this.position=n,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){const n=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const r=this._providers[this._providerRenameIdx];if(!r.resolveRenameLocation)break;const o=await r.resolveRenameLocation(this.model,this.position,e);if(o){if(o.rejectReason){n.push(o.rejectReason);continue}return o}}this._providerRenameIdx=0;const i=this.model.getWordAtPosition(this.position);return i?{range:new ve(this.position.lineNumber,i.startColumn,this.position.lineNumber,i.endColumn),text:i.word,rejectReason:n.length>0?n.join(`
`):void 0}:{range:ve.fromPositions(this.position),text:"",rejectReason:n.length>0?n.join(`
`):void 0}}async provideRenameEdits(e,n){return this._provideRenameEdits(e,this._providerRenameIdx,[],n)}async _provideRenameEdits(e,n,i,r){const o=this._providers[n];if(!o)return{edits:[],rejectReason:i.join(`
`)};const s=await o.provideRenameEdits(this.model,this.position,e,r);if(s){if(s.rejectReason)return this._provideRenameEdits(e,n+1,i.concat(s.rejectReason),r)}else return this._provideRenameEdits(e,n+1,i.concat(I("no result","No result.")),r);return s}}async function DOr(t,e,n,i){const r=new OWe(e,n,t),o=await r.resolveRenameLocation(er.None);return o!=null&&o.rejectReason?{edits:[],rejectReason:o.rejectReason}:r.provideRenameEdits(i,er.None)}var m2;let Rk=(m2=class{static get(e){return e.getContribution(W4e.ID)}constructor(e,n,i,r,o,s,a,l,c){this.editor=e,this._instaService=n,this._notificationService=i,this._bulkEditService=r,this._progressService=o,this._logService=s,this._configService=a,this._languageFeaturesService=l,this._telemetryService=c,this._disposableStore=new Lt,this._cts=new oa,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(H4e,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){var m,p;const e=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new oa,!this.editor.hasModel()){e("editor has no model");return}const n=this.editor.getPosition(),i=new OWe(this.editor.getModel(),n,this._languageFeaturesService.renameProvider);if(!i.hasProvider()){e("skeleton has no provider");return}const r=new xk(this.editor,5,void 0,this._cts.token);let o;try{e("resolving rename location");const g=i.resolveRenameLocation(r.token);this._progressService.showWhile(g,250),o=await g,e("resolved rename location")}catch(g){g instanceof Mv?e("resolve rename location cancelled",JSON.stringify(g,null,"	")):(e("resolve rename location failed",g instanceof Error?g:JSON.stringify(g,null,"	")),(typeof g=="string"||E0(g))&&((m=Sm.get(this.editor))==null||m.showMessage(g||I("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),n)));return}finally{r.dispose()}if(!o){e("returning early - no loc");return}if(o.rejectReason){e(`returning early - rejected with reason: ${o.rejectReason}`,o.rejectReason),(p=Sm.get(this.editor))==null||p.showMessage(o.rejectReason,n);return}if(r.token.isCancellationRequested){e("returning early - cts1 cancelled");return}const s=new xk(this.editor,5,o.range,this._cts.token),a=this.editor.getModel(),l=this._languageFeaturesService.newSymbolNamesProvider.all(a),c=await Promise.all(l.map(async g=>[g,await g.supportsAutomaticNewSymbolNamesTriggerKind??!1])),u=(g,y)=>{let _=c.slice();return g===wH.Automatic&&(_=_.filter(([w,C])=>C)),_.map(([w])=>w.provideNewSymbolNames(a,o.range,g,y))};e("creating rename input field and awaiting its result");const d=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),h=await this._renameWidget.getInput(o.range,o.text,d,l.length>0?u:void 0,s);if(e("received response from rename input field"),l.length>0&&this._reportTelemetry(l.length,a.getLanguageId(),h),typeof h=="boolean"){e(`returning early - rename input field response - ${h}`),h&&this.editor.focus(),s.dispose();return}this.editor.focus(),e("requesting rename edits");const f=vq(i.provideRenameEdits(h.newName,s.token),s.token).then(async g=>{if(!g){e("returning early - no rename edits result");return}if(!this.editor.hasModel()){e("returning early - no model after rename edits are provided");return}if(g.rejectReason){e(`returning early - rejected with reason: ${g.rejectReason}`),this._notificationService.info(g.rejectReason);return}this.editor.setSelection(ve.fromPositions(this.editor.getSelection().getPosition())),e("applying edits"),this._bulkEditService.apply(g,{editor:this.editor,showPreview:h.wantsPreview,label:I("label","Renaming '{0}' to '{1}'",o==null?void 0:o.text,h.newName),code:"undoredo.rename",quotableLabel:I("quotableLabel","Renaming {0} to {1}",o==null?void 0:o.text,h.newName),respectAutoSaveConfig:!0}).then(y=>{e("edits applied"),y.ariaSummary&&Am(I("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",o.text,h.newName,y.ariaSummary))}).catch(y=>{e(`error when applying edits ${JSON.stringify(y,null,"	")}`),this._notificationService.error(I("rename.failedApply","Rename failed to apply edits")),this._logService.error(y)})},g=>{e("error when providing rename edits",JSON.stringify(g,null,"	")),this._notificationService.error(I("rename.failed","Rename failed to compute edits")),this._logService.error(g)}).finally(()=>{s.dispose()});return e("returning rename operation"),this._progressService.showWhile(f,250),f}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}_reportTelemetry(e,n,i){const r=typeof i=="boolean"?{kind:"cancelled",languageId:n,nRenameSuggestionProviders:e}:{kind:"accepted",languageId:n,nRenameSuggestionProviders:e,source:i.stats.source.k,nRenameSuggestions:i.stats.nRenameSuggestions,timeBeforeFirstInputFieldEdit:i.stats.timeBeforeFirstInputFieldEdit,wantsPreview:i.wantsPreview,nRenameSuggestionsInvocations:i.stats.nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:i.stats.hadAutomaticRenameSuggestionsInvocation};this._telemetryService.publicLog2("renameInvokedEvent",r)}},W4e=m2,m2.ID="editor.contrib.renameController",m2);Rk=W4e=EOr([WN(1,qn),WN(2,tl),WN(3,Iq),WN(4,oM),WN(5,Nd),WN(6,q8e),WN(7,Ln),WN(8,eh)],Rk);class kOr extends En{constructor(){super({id:"editor.action.rename",label:I("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:Tt.and(Re.writable,Re.hasRenameProvider),kbOpts:{kbExpr:Re.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,n){const i=e.get(Yr),[r,o]=Array.isArray(n)&&n||[void 0,void 0];return ri.isUri(r)&&ot.isIPosition(o)?i.openCodeEditor({resource:r},i.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(o),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},ji):super.runCommand(e,n)}run(e,n){const i=e.get(Nd),r=Rk.get(n);return r?(i.trace("[RenameAction] got controller, running..."),r.run()):(i.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}}Wr(Rk.ID,Rk,4);Ht(kOr);const jWe=Zl.bindToContribution(Rk.get);fn(new jWe({id:"acceptRenameInput",precondition:I$,handler:t=>t.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:Tt.and(Re.focus,Tt.not("isComposing")),primary:3}}));fn(new jWe({id:"acceptRenameInputWithPreview",precondition:Tt.and(I$,Tt.has("config.editor.rename.enablePreview")),handler:t=>t.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:Tt.and(Re.focus,Tt.not("isComposing")),primary:2051}}));fn(new jWe({id:"cancelRenameInput",precondition:I$,handler:t=>t.cancelRenameInput(),kbOpts:{weight:199,kbExpr:Re.focus,primary:9,secondary:[1033]}}));cs(class extends qh{constructor(){super({id:"focusNextRenameSuggestion",title:{...Ci("focusNextRenameSuggestion","Focus Next Rename Suggestion")},precondition:I$,keybinding:[{primary:18,weight:199}]})}run(e){const n=e.get(Yr).getFocusedCodeEditor();if(!n)return;const i=Rk.get(n);i&&i.focusNextRenameSuggestion()}});cs(class extends qh{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...Ci("focusPreviousRenameSuggestion","Focus Previous Rename Suggestion")},precondition:I$,keybinding:[{primary:16,weight:199}]})}run(e){const n=e.get(Yr).getFocusedCodeEditor();if(!n)return;const i=Rk.get(n);i&&i.focusPreviousRenameSuggestion()}});Pf("_executeDocumentRenameProvider",function(t,e,n,...i){const[r]=i;Gr(typeof r=="string");const{renameProvider:o}=t.get(Ln);return DOr(o,e,n,r)});Pf("_executePrepareRename",async function(t,e,n){const{renameProvider:i}=t.get(Ln),o=await new OWe(e,n,i).resolveRenameLocation(er.None);if(o!=null&&o.rejectReason)throw new Error(o.rejectReason);return o});la.as(Yv.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:I("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});var MOr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},A0t=function(t,e){return function(n,i){e(n,i,t)}},oj;let ble=(oj=class extends ct{constructor(e,n,i){super(),this.editor=e,this.languageConfigurationService=n,this.editorWorkerService=i,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(73)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel(r=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(e.onDidChangeModelLanguage(r=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(n.onDidChange(r=>{var s;const o=(s=this.editor.getModel())==null?void 0:s.getLanguageId();o&&r.affects(o)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(e.onDidChangeConfiguration(r=>{this.options&&!r.hasChanged(73)||(this.options=this.createOptions(e.getOption(73)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(this.editor.onDidChangeModelContent(r=>{this.computeSectionHeaders.schedule()})),this._register(e.onDidChangeModelTokens(r=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)})),this.computeSectionHeaders=this._register(new Wo(()=>{this.findSectionHeaders()},250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;const n=this.editor.getModel().getLanguageId();if(!n)return;const i=this.languageConfigurationService.getLanguageConfiguration(n).comments,r=this.languageConfigurationService.getLanguageConfiguration(n).foldingRules;if(!(!i&&!(r!=null&&r.markers)))return{foldingRules:r,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}}findSectionHeaders(){var i,r;if(!this.editor.hasModel()||!((i=this.options)!=null&&i.findMarkSectionHeaders)&&!((r=this.options)!=null&&r.findRegionSectionHeaders))return;const e=this.editor.getModel();if(e.isDisposed()||e.isTooLargeForSyncing())return;const n=e.getVersionId();this.editorWorkerService.findSectionHeaders(e.uri,this.options).then(o=>{e.isDisposed()||e.getVersionId()!==n||this.updateDecorations(o)})}updateDecorations(e){const n=this.editor.getModel();n&&(e=e.filter(o=>{if(!o.shouldBeInComments)return!0;const s=n.validateRange(o.range),a=n.tokenization.getLineTokens(s.startLineNumber),l=a.findTokenIndexAtOffset(s.startColumn-1),c=a.getStandardTokenType(l);return a.getLanguageId(l)===n.getLanguageId()&&c===1}));const i=Object.values(this.currentOccurrences).map(o=>o.decorationId),r=e.map(o=>LOr(o));this.editor.changeDecorations(o=>{const s=o.deltaDecorations(i,r);this.currentOccurrences={};for(let a=0,l=s.length;a<l;a++){const c={sectionHeader:e[a],decorationId:s[a]};this.currentOccurrences[c.decorationId]=c}})}stop(){this.computeSectionHeaders.cancel(),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop(),this.decorations.clear()}},oj.ID="editor.sectionHeaderDetector",oj);ble=MOr([A0t(1,bs),A0t(2,xb)],ble);function LOr(t){return{range:t.range,options:Hi.createDynamic({description:"section-header",stickiness:3,collapseOnReplaceEdit:!0,minimap:{color:void 0,position:1,sectionHeaderStyle:t.hasSeparatorLine?2:1,sectionHeaderText:t.text}})}}Wr(ble.ID,ble,1);function TOr(t){for(let e=0,n=t.length;e<n;e+=4){const i=t[e+0],r=t[e+1],o=t[e+2],s=t[e+3];t[e+0]=s,t[e+1]=o,t[e+2]=r,t[e+3]=i}}function IOr(t){const e=new Uint8Array(t.buffer,t.byteOffset,t.length*4);return $Ot()||TOr(e),Ufe.wrap(e)}function UGt(t){const e=new Uint32Array(AOr(t));let n=0;if(e[n++]=t.id,t.type==="full")e[n++]=1,e[n++]=t.data.length,e.set(t.data,n),n+=t.data.length;else{e[n++]=2,e[n++]=t.deltas.length;for(const i of t.deltas)e[n++]=i.start,e[n++]=i.deleteCount,i.data?(e[n++]=i.data.length,e.set(i.data,n),n+=i.data.length):e[n++]=0}return IOr(e)}function AOr(t){let e=0;if(e+=2,t.type==="full")e+=1+t.data.length;else{e+=1,e+=3*t.deltas.length;for(const n of t.deltas)n.data&&(e+=n.data.length)}return e}function jge(t){return t&&!!t.data}function KGt(t){return t&&Array.isArray(t.edits)}class ROr{constructor(e,n,i){this.provider=e,this.tokens=n,this.error=i}}function qGt(t,e){return t.has(e)}function POr(t,e){const n=t.orderedGroups(e);return n.length>0?n[0]:[]}async function GGt(t,e,n,i,r){const o=POr(t,e),s=await Promise.all(o.map(async a=>{let l,c=null;try{l=await a.provideDocumentSemanticTokens(e,a===n?i:null,r)}catch(u){c=u,l=null}return(!l||!jge(l)&&!KGt(l))&&(l=null),new ROr(a,l,c)}));for(const a of s){if(a.error)throw a.error;if(a.tokens)return a}return s.length>0?s[0]:null}function OOr(t,e){const n=t.orderedGroups(e);return n.length>0?n[0]:null}class jOr{constructor(e,n){this.provider=e,this.tokens=n}}function FOr(t,e){return t.has(e)}function YGt(t,e){const n=t.orderedGroups(e);return n.length>0?n[0]:[]}async function FWe(t,e,n,i){const r=YGt(t,e),o=await Promise.all(r.map(async s=>{let a;try{a=await s.provideDocumentRangeSemanticTokens(e,n,i)}catch(l){$a(l),a=null}return(!a||!jge(a))&&(a=null),new jOr(s,a)}));for(const s of o)if(s.tokens)return s;return o.length>0?o[0]:null}Ar.registerCommand("_provideDocumentSemanticTokensLegend",async(t,...e)=>{const[n]=e;Gr(n instanceof ri);const i=t.get(Ds).getModel(n);if(!i)return;const{documentSemanticTokensProvider:r}=t.get(Ln),o=OOr(r,i);return o?o[0].getLegend():t.get(gs).executeCommand("_provideDocumentRangeSemanticTokensLegend",n)});Ar.registerCommand("_provideDocumentSemanticTokens",async(t,...e)=>{const[n]=e;Gr(n instanceof ri);const i=t.get(Ds).getModel(n);if(!i)return;const{documentSemanticTokensProvider:r}=t.get(Ln);if(!qGt(r,i))return t.get(gs).executeCommand("_provideDocumentRangeSemanticTokens",n,i.getFullModelRange());const o=await GGt(r,i,null,null,er.None);if(!o)return;const{provider:s,tokens:a}=o;if(!a||!jge(a))return;const l=UGt({id:0,type:"full",data:a.data});return a.resultId&&s.releaseDocumentSemanticTokens(a.resultId),l});Ar.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(t,...e)=>{const[n,i]=e;Gr(n instanceof ri);const r=t.get(Ds).getModel(n);if(!r)return;const{documentRangeSemanticTokensProvider:o}=t.get(Ln),s=YGt(o,r);if(s.length===0)return;if(s.length===1)return s[0].getLegend();if(!i||!ve.isIRange(i))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),s[0].getLegend();const a=await FWe(o,r,ve.lift(i),er.None);if(a)return a.provider.getLegend()});Ar.registerCommand("_provideDocumentRangeSemanticTokens",async(t,...e)=>{const[n,i]=e;Gr(n instanceof ri),Gr(ve.isIRange(i));const r=t.get(Ds).getModel(n);if(!r)return;const{documentRangeSemanticTokensProvider:o}=t.get(Ln),s=await FWe(o,r,ve.lift(i),er.None);if(!(!s||!s.tokens))return UGt({id:0,type:"full",data:s.tokens.data})});const $We="editor.semanticHighlighting";function Gte(t,e,n){var r;const i=(r=n.getValue($We,{overrideIdentifier:t.getLanguageId(),resource:t.uri}))==null?void 0:r.enabled;return typeof i=="boolean"?i:e.getColorTheme().semanticHighlighting}var XGt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},_x=function(t,e){return function(n,i){e(n,i,t)}},QN;let U4e=class extends ct{constructor(e,n,i,r,o,s){super(),this._watchers=Object.create(null);const a=u=>{this._watchers[u.uri.toString()]=new K4e(u,e,i,o,s)},l=(u,d)=>{d.dispose(),delete this._watchers[u.uri.toString()]},c=()=>{for(const u of n.getModels()){const d=this._watchers[u.uri.toString()];Gte(u,i,r)?d||a(u):d&&l(u,d)}};n.getModels().forEach(u=>{Gte(u,i,r)&&a(u)}),this._register(n.onModelAdded(u=>{Gte(u,i,r)&&a(u)})),this._register(n.onModelRemoved(u=>{const d=this._watchers[u.uri.toString()];d&&l(u,d)})),this._register(r.onDidChangeConfiguration(u=>{u.affectsConfiguration($We)&&c()})),this._register(i.onDidColorThemeChange(c))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};U4e=XGt([_x(0,mme),_x(1,Ds),_x(2,Ql),_x(3,cr),_x(4,tg),_x(5,Ln)],U4e);var BD;let K4e=(BD=class extends ct{constructor(e,n,i,r,o){super(),this._semanticTokensStylingService=n,this._isDisposed=!1,this._model=e,this._provider=o.documentSemanticTokensProvider,this._debounceInformation=r.for(this._provider,"DocumentSemanticTokens",{min:QN.REQUEST_MIN_DELAY,max:QN.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new Wo(()=>this._fetchDocumentSemanticTokensNow(),QN.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const s=()=>{Jo(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};s(),this._register(this._provider.onDidChange(()=>{s(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(i.onDidColorThemeChange(a=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),Jo(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!qGt(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const e=new oa,n=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,r=GGt(this._provider,this._model,n,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const o=[],s=this._model.onDidChangeContent(l=>{o.push(l)}),a=new cu(!1);r.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,o);else{const{provider:c,tokens:u}=l,d=this._semanticTokensStylingService.getStyling(c);this._setDocumentSemanticTokens(c,u||null,d,o)}},l=>{l&&(yb(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||ji(l),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),(o.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,n,i,r,o){o=Math.min(o,i.length-r,e.length-n);for(let s=0;s<o;s++)i[r+s]=e[n+s]}_setDocumentSemanticTokens(e,n,i,r){const o=this._currentDocumentResponse,s=()=>{(r.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&n&&e.releaseDocumentSemanticTokens(n.resultId);return}if(!e||!i){this._model.tokenization.setSemanticTokens(null,!1);return}if(!n){this._model.tokenization.setSemanticTokens(null,!0),s();return}if(KGt(n)){if(!o){this._model.tokenization.setSemanticTokens(null,!0);return}if(n.edits.length===0)n={resultId:n.resultId,data:o.data};else{let a=0;for(const h of n.edits)a+=(h.data?h.data.length:0)-h.deleteCount;const l=o.data,c=new Uint32Array(l.length+a);let u=l.length,d=c.length;for(let h=n.edits.length-1;h>=0;h--){const f=n.edits[h];if(f.start>l.length){i.warnInvalidEditStart(o.resultId,n.resultId,h,f.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}const m=u-(f.start+f.deleteCount);m>0&&(QN._copy(l,u-m,c,d-m,m),d-=m),f.data&&(QN._copy(f.data,0,c,d-f.data.length,f.data.length),d-=f.data.length),u=f.start}u>0&&QN._copy(l,0,c,0,u),n={resultId:n.resultId,data:c}}}if(jge(n)){this._currentDocumentResponse=new $Or(e,n.resultId,n.data);const a=i5t(n,i,this._model.getLanguageId());if(r.length>0)for(const l of r)for(const c of a)for(const u of l.changes)c.applyEdit(u.range,u.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);s()}},QN=BD,BD.REQUEST_MIN_DELAY=300,BD.REQUEST_MAX_DELAY=2e3,BD);K4e=QN=XGt([_x(1,mme),_x(2,Ql),_x(3,tg),_x(4,Ln)],K4e);class $Or{constructor(e,n,i){this.provider=e,this.resultId=n,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}Bq(U4e);var VOr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},T7=function(t,e){return function(n,i){e(n,i,t)}},sj;let vle=(sj=class extends ct{constructor(e,n,i,r,o,s){super(),this._semanticTokensStylingService=n,this._themeService=i,this._configurationService=r,this._editor=e,this._provider=s.documentRangeSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new Wo(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(l=>{this._cancelAll(),a()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration($We)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()})),a()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let n=0,i=this._outstandingRequests.length;n<i;n++)if(this._outstandingRequests[n]===e){this._outstandingRequests.splice(n,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const e=this._editor.getModel();if(e.tokenization.hasCompleteSemanticTokens())return;if(!Gte(e,this._themeService,this._configurationService)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}if(!FOr(this._provider,e)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}const n=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(n.map(i=>this._requestRange(e,i)))}_requestRange(e,n){const i=e.getVersionId(),r=cc(s=>Promise.resolve(FWe(this._provider,e,n,s))),o=new cu(!1);return r.then(s=>{if(this._debounceInformation.update(e,o.elapsed()),!s||!s.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:a,tokens:l}=s,c=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(n,i5t(l,c,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(r),()=>this._removeOutstandingRequest(r)),r}},sj.ID="editor.contrib.viewportSemanticTokens",sj);vle=VOr([T7(1,mme),T7(2,Ql),T7(3,cr),T7(4,tg),T7(5,Ln)],vle);Wr(vle.ID,vle,1);class BOr{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,n){const i=[];for(const r of n){const o=[];i.push(o),this.selectSubwords&&this._addInWordRanges(o,e,r),this._addWordRanges(o,e,r),this._addWhitespaceLine(o,e,r),o.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,n,i){const r=n.getWordAtPosition(i);if(!r)return;const{word:o,startColumn:s}=r,a=i.column-s;let l=a,c=a,u=0;for(;l>=0;l--){const d=o.charCodeAt(l);if(l!==a&&(d===95||d===45))break;if(BE(d)&&px(u))break;u=d}for(l+=1;c<o.length;c++){const d=o.charCodeAt(c);if(px(d)&&BE(u))break;if(d===95||d===45)break;u=d}l<c&&e.push({range:new ve(i.lineNumber,s+l,i.lineNumber,s+c)})}_addWordRanges(e,n,i){const r=n.getWordAtPosition(i);r&&e.push({range:new ve(i.lineNumber,r.startColumn,i.lineNumber,r.endColumn)})}_addWhitespaceLine(e,n,i){n.getLineLength(i.lineNumber)>0&&n.getLineFirstNonWhitespaceColumn(i.lineNumber)===0&&n.getLineLastNonWhitespaceColumn(i.lineNumber)===0&&e.push({range:new ve(i.lineNumber,1,i.lineNumber,n.getLineMaxColumn(i.lineNumber))})}}var zOr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},HOr=function(t,e){return function(n,i){e(n,i,t)}},q4e;class VWe{constructor(e,n){this.index=e,this.ranges=n}mov(e){const n=this.index+(e?1:-1);if(n<0||n>=this.ranges.length)return this;const i=new VWe(n,this.ranges);return i.ranges[n].equalsRange(this.ranges[this.index])?i.mov(e):i}}var p2;let GU=(p2=class{static get(e){return e.getContribution(q4e.ID)}constructor(e,n){this._editor=e,this._languageFeaturesService=n,this._ignoreSelection=!1}dispose(){var e;(e=this._selectionListener)==null||e.dispose()}async run(e){if(!this._editor.hasModel())return;const n=this._editor.getSelections(),i=this._editor.getModel();if(this._state||await QGt(this._languageFeaturesService.selectionRangeProvider,i,n.map(o=>o.getPosition()),this._editor.getOption(114),er.None).then(o=>{var s;if(!(!md(o)||o.length!==n.length)&&!(!this._editor.hasModel()||!Xs(this._editor.getSelections(),n,(a,l)=>a.equalsSelection(l)))){for(let a=0;a<o.length;a++)o[a]=o[a].filter(l=>l.containsPosition(n[a].getStartPosition())&&l.containsPosition(n[a].getEndPosition())),o[a].unshift(n[a]);this._state=o.map(a=>new VWe(0,a)),(s=this._selectionListener)==null||s.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var a;this._ignoreSelection||((a=this._selectionListener)==null||a.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(o=>o.mov(e));const r=this._state.map(o=>Pn.fromPositions(o.ranges[o.index].getStartPosition(),o.ranges[o.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(r)}finally{this._ignoreSelection=!1}}},q4e=p2,p2.ID="editor.contrib.smartSelectController",p2);GU=q4e=zOr([HOr(1,Ln)],GU);class ZGt extends En{constructor(e,n){super(n),this._forward=e}async run(e,n){const i=GU.get(n);i&&await i.run(this._forward)}}class WOr extends ZGt{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:I("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:Re.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:Rn.MenubarSelectionMenu,group:"1_basic",title:I({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}Ar.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class UOr extends ZGt{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:I("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:Re.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:Rn.MenubarSelectionMenu,group:"1_basic",title:I({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}Wr(GU.ID,GU,4);Ht(WOr);Ht(UOr);async function QGt(t,e,n,i,r){const o=t.all(e).concat(new BOr(i.selectSubwords));o.length===1&&o.unshift(new ile);const s=[],a=[];for(const l of o)s.push(Promise.resolve(l.provideSelectionRanges(e,n,r)).then(c=>{if(md(c)&&c.length===n.length)for(let u=0;u<n.length;u++){a[u]||(a[u]=[]);for(const d of c[u])ve.isIRange(d.range)&&ve.containsPosition(d.range,n[u])&&a[u].push(ve.lift(d.range))}},$a));return await Promise.all(s),a.map(l=>{if(l.length===0)return[];l.sort((h,f)=>ot.isBefore(h.getStartPosition(),f.getStartPosition())?1:ot.isBefore(f.getStartPosition(),h.getStartPosition())||ot.isBefore(h.getEndPosition(),f.getEndPosition())?-1:ot.isBefore(f.getEndPosition(),h.getEndPosition())?1:0);const c=[];let u;for(const h of l)(!u||ve.containsRange(h,u)&&!ve.equalsRange(h,u))&&(c.push(h),u=h);if(!i.selectLeadingAndTrailingWhitespace)return c;const d=[c[0]];for(let h=1;h<c.length;h++){const f=c[h-1],m=c[h];if(m.startLineNumber!==f.startLineNumber||m.endLineNumber!==f.endLineNumber){const p=new ve(f.startLineNumber,e.getLineFirstNonWhitespaceColumn(f.startLineNumber),f.endLineNumber,e.getLineLastNonWhitespaceColumn(f.endLineNumber));p.containsRange(f)&&!p.equalsRange(f)&&m.containsRange(p)&&!m.equalsRange(p)&&d.push(p);const g=new ve(f.startLineNumber,1,f.endLineNumber,e.getLineMaxColumn(f.endLineNumber));g.containsRange(f)&&!g.equalsRange(p)&&m.containsRange(g)&&!m.equalsRange(g)&&d.push(g)}d.push(m)}return d})}Ar.registerCommand("_executeSelectionRangeProvider",async function(t,...e){const[n,i]=e;Gr(ri.isUri(n));const r=t.get(Ln).selectionRangeProvider,o=await t.get(Rf).createModelReference(n);try{return QGt(r,o.object.textEditorModel,i,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},er.None)}finally{o.dispose()}});const KOr=Object.freeze({View:Ci("view","View"),Help:Ci("help","Help"),Test:Ci("test","Test"),File:Ci("file","File"),Preferences:Ci("preferences","Preferences"),Developer:Ci({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer")});class UB{constructor(e,n,i,r=null){this.startLineNumbers=e,this.endLineNumbers=n,this.lastLineRelativePosition=i,this.showEndForLine=r}equals(e){return!!e&&this.lastLineRelativePosition===e.lastLineRelativePosition&&this.showEndForLine===e.showEndForLine&&Xs(this.startLineNumbers,e.startLineNumbers)&&Xs(this.endLineNumbers,e.endLineNumbers)}static get Empty(){return new UB([],[],0)}}const R0t=WS("stickyScrollViewLayer",{createHTML:t=>t}),cNe="data-sticky-line-index",P0t="data-sticky-is-line",qOr="data-sticky-is-line-number",O0t="data-sticky-is-folding-icon";class GOr extends ct{constructor(e){super(),this._editor=e,this._foldingIconStore=new Lt,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(67),this._renderedStickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof Fv),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const n=()=>{this._linesDomNode.style.left=this._editor.getOption(116).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(116)&&n(),i.hasChanged(67)&&(this._lineHeight=this._editor.getOption(67))})),this._register(this._editor.onDidScrollChange(i=>{i.scrollLeftChanged&&n(),i.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{n(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),n(),this._register(this._editor.onDidLayoutChange(i=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getRenderedStickyLine(e){return this._renderedStickyLines.find(n=>n.lineNumber===e)}getCurrentLines(){return this._lineNumbers}setState(e,n,i){if(i===void 0&&(!this._previousState&&!e||this._previousState&&this._previousState.equals(e)))return;const r=this._isWidgetHeightZero(e),o=r?void 0:e,s=r?0:this._findLineToRebuildWidgetFrom(e,i);this._renderRootNode(o,n,s),this._previousState=e}_isWidgetHeightZero(e){if(!e)return!0;const n=e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition;if(n>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const i=[...e.startLineNumbers];e.showEndForLine!==null&&(i[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=i}else this._lastLineRelativePosition=0,this._lineNumbers=[];return n===0}_findLineToRebuildWidgetFrom(e,n){if(!e||!this._previousState)return 0;if(n!==void 0)return n;const i=this._previousState,r=e.startLineNumbers.findIndex(o=>!i.startLineNumbers.includes(o));return r===-1?0:r}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),n=e.contentLeft;this._lineNumbersDomNode.style.width=`${n}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-e.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${e.width-e.verticalScrollbarWidth}px`}_clearStickyLinesFromLine(e){this._foldingIconStore.clear();for(let n=e;n<this._renderedStickyLines.length;n++){const i=this._renderedStickyLines[n];i.lineNumberDomNode.remove(),i.lineDomNode.remove()}this._renderedStickyLines=this._renderedStickyLines.slice(0,e),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(e){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${e?.5:0}s`)}_setFoldingIconsVisibility(e){for(const n of this._renderedStickyLines){const i=n.foldingIcon;i&&i.setVisible(e?!0:i.isCollapsed)}}async _renderRootNode(e,n,i){if(this._clearStickyLinesFromLine(i),!e)return;for(const a of this._renderedStickyLines)this._updateTopAndZIndexOfStickyLine(a);const r=this._editor.getLayoutInfo(),o=this._lineNumbers.slice(i);for(const[a,l]of o.entries()){const c=this._renderChildNode(a+i,l,n,r);c&&(this._linesDomNode.appendChild(c.lineDomNode),this._lineNumbersDomNode.appendChild(c.lineNumberDomNode),this._renderedStickyLines.push(c))}n&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));const s=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${s}px`,this._linesDomNodeScrollable.style.height=`${s}px`,this._rootDomNode.style.height=`${s}px`,this._rootDomNode.style.marginLeft="0px",this._minContentWidthInPx=Math.max(...this._renderedStickyLines.map(a=>a.scrollWidth))+r.verticalScrollbarWidth,this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){this._editor.getOption(111)==="mouseover"&&(this._foldingIconStore.add(yt(this._lineNumbersDomNode,Yt.MOUSE_ENTER,()=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(yt(this._lineNumbersDomNode,Yt.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,n,i,r){const o=this._editor._getViewModel();if(!o)return;const s=o.coordinatesConverter.convertModelPositionToViewPosition(new ot(n,1)).lineNumber,a=o.getViewLineRenderingData(s),l=this._editor.getOption(68);let c;try{c=Sh.filter(a.inlineDecorations,s,a.minColumn,a.maxColumn)}catch{c=[]}const u=new nM(!0,!0,a.content,a.continuesWithWrappedLine,a.isBasicASCII,a.containsRTL,0,a.tokens,c,a.tabSize,a.startVisibleColumn,1,1,1,500,"none",!0,!0,null),d=new I6(2e3),h=wq(u,d);let f;R0t?f=R0t.createHTML(d.build()):f=d.build();const m=document.createElement("span");m.setAttribute(cNe,String(e)),m.setAttribute(P0t,""),m.setAttribute("role","listitem"),m.tabIndex=0,m.className="sticky-line-content",m.classList.add(`stickyLine${n}`),m.style.lineHeight=`${this._lineHeight}px`,m.innerHTML=f;const p=document.createElement("span");p.setAttribute(cNe,String(e)),p.setAttribute(qOr,""),p.className="sticky-line-number",p.style.lineHeight=`${this._lineHeight}px`;const g=r.contentLeft;p.style.width=`${g}px`;const y=document.createElement("span");l.renderType===1||l.renderType===3&&n%10===0?y.innerText=n.toString():l.renderType===2&&(y.innerText=Math.abs(n-this._editor.getPosition().lineNumber).toString()),y.className="sticky-line-number-inner",y.style.lineHeight=`${this._lineHeight}px`,y.style.width=`${r.lineNumbersWidth}px`,y.style.paddingLeft=`${r.lineNumbersLeft}px`,p.appendChild(y);const _=this._renderFoldingIconForLine(i,n);_&&p.appendChild(_.domNode),this._editor.applyFontInfo(m),this._editor.applyFontInfo(y),p.style.lineHeight=`${this._lineHeight}px`,m.style.lineHeight=`${this._lineHeight}px`,p.style.height=`${this._lineHeight}px`,m.style.height=`${this._lineHeight}px`;const w=new YOr(e,n,m,p,_,h.characterMapping,m.scrollWidth);return this._updateTopAndZIndexOfStickyLine(w)}_updateTopAndZIndexOfStickyLine(e){var u;const n=e.index,i=e.lineDomNode,r=e.lineNumberDomNode,o=n===this._lineNumbers.length-1,s="0",a="1";i.style.zIndex=o?s:a,r.style.zIndex=o?s:a;const l=`${n*this._lineHeight+this._lastLineRelativePosition+((u=e.foldingIcon)!=null&&u.isCollapsed?1:0)}px`,c=`${n*this._lineHeight}px`;return i.style.top=o?l:c,r.style.top=o?l:c,e}_renderFoldingIconForLine(e,n){const i=this._editor.getOption(111);if(!e||i==="never")return;const r=e.regions,o=r.findRange(n),s=r.getStartLineNumber(o);if(!(n===s))return;const l=r.isCollapsed(o),c=new XOr(l,s,r.getEndLineNumber(o),this._lineHeight);return c.setVisible(this._isOnGlyphMargin?!0:l||i==="always"),c.domNode.setAttribute(O0t,""),c}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:2,stackOridinal:10}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e<this._renderedStickyLines.length&&this._renderedStickyLines[e].lineDomNode.focus()}getEditorPositionFromNode(e){if(!e||e.children.length>0)return null;const n=this._getRenderedStickyLineFromChildDomNode(e);if(!n)return null;const i=fVe(n.characterMapping,e,0);return new ot(n.lineNumber,i)}getLineNumberFromChildDomNode(e){var n;return((n=this._getRenderedStickyLineFromChildDomNode(e))==null?void 0:n.lineNumber)??null}_getRenderedStickyLineFromChildDomNode(e){const n=this.getLineIndexFromChildDomNode(e);return n===null||n<0||n>=this._renderedStickyLines.length?null:this._renderedStickyLines[n]}getLineIndexFromChildDomNode(e){const n=this._getAttributeValue(e,cNe);return n?parseInt(n,10):null}isInStickyLine(e){return this._getAttributeValue(e,P0t)!==void 0}isInFoldingIconDomNode(e){return this._getAttributeValue(e,O0t)!==void 0}_getAttributeValue(e,n){for(;e&&e!==this._rootDomNode;){const i=e.getAttribute(n);if(i!==null)return i;e=e.parentElement}}}class YOr{constructor(e,n,i,r,o,s,a){this.index=e,this.lineNumber=n,this.lineDomNode=i,this.lineNumberDomNode=r,this.foldingIcon=o,this.characterMapping=s,this.scrollWidth=a}}class XOr{constructor(e,n,i,r){this.isCollapsed=e,this.foldingStartLine=n,this.foldingEndLine=i,this.dimension=r,this.domNode=document.createElement("div"),this.domNode.style.width=`${r}px`,this.domNode.style.height=`${r}px`,this.domNode.className=ci.asClassName(e?Kae:Uae)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}class KB{constructor(e,n){this.startLineNumber=e,this.endLineNumber=n}}class yle{constructor(e,n,i){this.range=e,this.children=n,this.parent=i}}class JGt{constructor(e,n,i,r){this.uri=e,this.version=n,this.element=i,this.outlineProviderId=r}}var Fge=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},YU=function(t,e){return function(n,i){e(n,i,t)}},qB;(function(t){t.OUTLINE_MODEL="outlineModel",t.FOLDING_PROVIDER_MODEL="foldingProviderModel",t.INDENTATION_MODEL="indentationModel"})(qB||(qB={}));var lD;(function(t){t[t.VALID=0]="VALID",t[t.INVALID=1]="INVALID",t[t.CANCELED=2]="CANCELED"})(lD||(lD={}));let G4e=class extends ct{constructor(e,n,i,r){switch(super(),this._editor=e,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new Lv(300)),this._updateOperation=this._register(new Lt),this._editor.getOption(116).defaultModel){case qB.OUTLINE_MODEL:this._modelProviders.push(new Y4e(this._editor,r));case qB.FOLDING_PROVIDER_MODEL:this._modelProviders.push(new Z4e(this._editor,n,r));case qB.INDENTATION_MODEL:this._modelProviders.push(new X4e(this._editor,i));break}}dispose(){this._modelProviders.forEach(e=>e.dispose()),this._updateOperation.clear(),this._cancelModelPromise(),super.dispose()}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(e){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger(async()=>{for(const n of this._modelProviders){const{statusPromise:i,modelPromise:r}=n.computeStickyModel(e);this._modelPromise=r;const o=await i;if(this._modelPromise!==r)return null;switch(o){case lD.CANCELED:return this._updateOperation.clear(),null;case lD.VALID:return n.stickyModel}}return null}).catch(n=>(ji(n),null))}};G4e=Fge([YU(2,qn),YU(3,Ln)],G4e);class eYt extends ct{constructor(e){super(),this._editor=e,this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,lD.INVALID}computeStickyModel(e){if(e.isCancellationRequested||!this.isProviderValid())return{statusPromise:this._invalid(),modelPromise:null};const n=cc(i=>this.createModelFromProvider(i));return{statusPromise:n.then(i=>this.isModelValid(i)?e.isCancellationRequested?lD.CANCELED:(this._stickyModel=this.createStickyModel(e,i),lD.VALID):this._invalid()).then(void 0,i=>(ji(i),lD.CANCELED)),modelPromise:n}}isModelValid(e){return!0}isProviderValid(){return!0}}let Y4e=class extends eYt{constructor(e,n){super(e),this._languageFeaturesService=n}createModelFromProvider(e){return Y1.create(this._languageFeaturesService.documentSymbolProvider,this._editor.getModel(),e)}createStickyModel(e,n){var s;const{stickyOutlineElement:i,providerID:r}=this._stickyModelFromOutlineModel(n,(s=this._stickyModel)==null?void 0:s.outlineProviderId),o=this._editor.getModel();return new JGt(o.uri,o.getVersionId(),i,r)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,n){let i;if(Ir.first(e.children.values())instanceof xGt){const a=Ir.find(e.children.values(),l=>l.id===n);if(a)i=a.children;else{let l="",c=-1,u;for(const[d,h]of e.children.entries()){const f=this._findSumOfRangesOfGroup(h);f>c&&(u=h,c=f,l=h.id)}n=l,i=u.children}}else i=e.children;const r=[],o=Array.from(i.values()).sort((a,l)=>{const c=new KB(a.symbol.range.startLineNumber,a.symbol.range.endLineNumber),u=new KB(l.symbol.range.startLineNumber,l.symbol.range.endLineNumber);return this._comparator(c,u)});for(const a of o)r.push(this._stickyModelFromOutlineElement(a,a.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new yle(void 0,r,void 0),providerID:n}}_stickyModelFromOutlineElement(e,n){const i=[];for(const o of e.children.values())if(o.symbol.selectionRange.startLineNumber!==o.symbol.range.endLineNumber)if(o.symbol.selectionRange.startLineNumber!==n)i.push(this._stickyModelFromOutlineElement(o,o.symbol.selectionRange.startLineNumber));else for(const s of o.children.values())i.push(this._stickyModelFromOutlineElement(s,o.symbol.selectionRange.startLineNumber));i.sort((o,s)=>this._comparator(o.range,s.range));const r=new KB(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new yle(r,i,void 0)}_comparator(e,n){return e.startLineNumber!==n.startLineNumber?e.startLineNumber-n.startLineNumber:n.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let n=0;for(const i of e.children.values())n+=this._findSumOfRangesOfGroup(i);return e instanceof VOe?n+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:n}};Y4e=Fge([YU(1,Ln)],Y4e);class tYt extends eYt{constructor(e){super(e),this._foldingLimitReporter=new vGt(e)}createStickyModel(e,n){const i=this._fromFoldingRegions(n),r=this._editor.getModel();return new JGt(r.uri,r.getVersionId(),i,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){const n=e.length,i=[],r=new yle(void 0,[],void 0);for(let o=0;o<n;o++){const s=e.getParentIndex(o);let a;s!==-1?a=i[s]:a=r;const l=new yle(new KB(e.getStartLineNumber(o),e.getEndLineNumber(o)+1),[],a);a.children.push(l),i.push(l)}return r}}let X4e=class extends tYt{constructor(e,n){super(e),this._languageConfigurationService=n,this.provider=this._register(new NWe(e.getModel(),this._languageConfigurationService,this._foldingLimitReporter))}async createModelFromProvider(e){return this.provider.compute(e)}};X4e=Fge([YU(1,bs)],X4e);let Z4e=class extends tYt{constructor(e,n,i){super(e),this._languageFeaturesService=i;const r=Ak.getFoldingRangeProviders(this._languageFeaturesService,e.getModel());r.length>0&&(this.provider=this._register(new EWe(e.getModel(),r,n,this._foldingLimitReporter,void 0)))}isProviderValid(){return this.provider!==void 0}async createModelFromProvider(e){var n;return((n=this.provider)==null?void 0:n.compute(e))??null}};Z4e=Fge([YU(2,Ln)],Z4e);var ZOr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},j0t=function(t,e){return function(n,i){e(n,i,t)}};class QOr{constructor(e,n,i){this.startLineNumber=e,this.endLineNumber=n,this.nestingDepth=i}}let Q4e=class extends ct{constructor(e,n,i){super(),this._languageFeaturesService=n,this._languageConfigurationService=i,this._onDidChangeStickyScroll=this._register(new st),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new Lt),this._updateSoon=this._register(new Wo(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(116)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._sessionStore.clear(),this._editor.getOption(116).enabled&&(this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this.updateStickyModelProvider(),this._onDidChangeStickyScroll.fire(),this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this._sessionStore.add(Kn(()=>{var n;(n=this._stickyModelProvider)==null||n.dispose(),this._stickyModelProvider=null})),this.updateStickyModelProvider(),this.update())}getVersionId(){var e;return(e=this._model)==null?void 0:e.version}updateStickyModelProvider(){var n;(n=this._stickyModelProvider)==null||n.dispose(),this._stickyModelProvider=null;const e=this._editor;e.hasModel()&&(this._stickyModelProvider=new G4e(e,()=>this._updateSoon.schedule(),this._languageConfigurationService,this._languageFeaturesService))}async update(){var e;(e=this._cts)==null||e.dispose(!0),this._cts=new oa,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(e){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization()){this._model=null;return}const n=await this._stickyModelProvider.update(e);e.isCancellationRequested||(this._model=n)}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,n,i,r,o){if(n.children.length===0)return;let s=o;const a=[];for(let u=0;u<n.children.length;u++){const d=n.children[u];d.range&&a.push(d.range.startLineNumber)}const l=this.updateIndex(fH(a,e.startLineNumber,(u,d)=>u-d)),c=this.updateIndex(fH(a,e.startLineNumber+r,(u,d)=>u-d));for(let u=l;u<=c;u++){const d=n.children[u];if(!d)return;if(d.range){const h=d.range.startLineNumber,f=d.range.endLineNumber;e.startLineNumber<=f+1&&h-1<=e.endLineNumber&&h!==s&&(s=h,i.push(new QOr(h,f-1,r+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,d,i,r+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,d,i,r,o)}}getCandidateStickyLinesIntersecting(e){var r,o;if(!((r=this._model)!=null&&r.element))return[];let n=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,n,0,-1);const i=(o=this._editor._getViewModel())==null?void 0:o.getHiddenAreas();if(i)for(const s of i)n=n.filter(a=>!(a.startLineNumber>=s.startLineNumber&&a.endLineNumber<=s.endLineNumber+1));return n}};Q4e=ZOr([j0t(1,Ln),j0t(2,bs)],Q4e);var JOr=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},xO=function(t,e){return function(n,i){e(n,i,t)}},J4e,g2;let MS=(g2=class extends ct{constructor(e,n,i,r,o,s,a){super(),this._editor=e,this._contextMenuService=n,this._languageFeaturesService=i,this._instaService=r,this._contextKeyService=a,this._sessionStore=new Lt,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._stickyScrollWidget=new GOr(this._editor),this._stickyLineCandidateProvider=new Q4e(this._editor,i,o),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=UB.Empty,this._onDidResize(),this._readConfiguration();const l=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(u=>{this._readConfigurationChange(u)})),this._register(yt(l,Yt.CONTEXT_MENU,async u=>{this._onContextMenu(ei(l),u)})),this._stickyScrollFocusedContextKey=Re.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=Re.stickyScrollVisible.bindTo(this._contextKeyService);const c=this._register(q0(l));this._register(c.onDidBlur(u=>{this._positionRevealed===!1&&l.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(c.onDidFocus(u=>{this.focus()})),this._registerMouseListeners(),this._register(yt(l,Yt.MOUSE_DOWN,u=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(J4e.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),(e=this._focusDisposableStore)==null||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new Lt,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex<this._stickyScrollWidget.lineNumberCount-1&&this._focusNav(!0)}focusPrevious(){this._focusedStickyElementIndex>0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,()=>this._editor.revealPosition(e))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0))}_reveaInEditor(e,n){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,n(),this._editor.setSelection(ve.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new Lt),n=this._register(new Dge(this._editor,{extractLineNumberFromMouseEvent:o=>{const s=this._stickyScrollWidget.getEditorPositionFromNode(o.target.element);return s?s.lineNumber:0}})),i=o=>{if(!this._editor.hasModel()||o.target.type!==12||o.target.detail!==this._stickyScrollWidget.getId())return null;const s=o.target.element;if(!s||s.innerText!==s.innerHTML)return null;const a=this._stickyScrollWidget.getEditorPositionFromNode(s);return a?{range:new ve(a.lineNumber,a.column,a.lineNumber,a.column+s.innerText.length),textElement:s}:null},r=this._stickyScrollWidget.getDomNode();this._register(Fa(r,Yt.CLICK,o=>{if(o.ctrlKey||o.altKey||o.metaKey||!o.leftButton)return;if(o.shiftKey){const c=this._stickyScrollWidget.getLineIndexFromChildDomNode(o.target);if(c===null)return;const u=new ot(this._endLineNumbers[c],1);this._revealLineInCenterIfOutsideViewport(u);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(o.target)){const c=this._stickyScrollWidget.getLineNumberFromChildDomNode(o.target);this._toggleFoldingRegionForLine(c);return}if(!this._stickyScrollWidget.isInStickyLine(o.target))return;let l=this._stickyScrollWidget.getEditorPositionFromNode(o.target);if(!l){const c=this._stickyScrollWidget.getLineNumberFromChildDomNode(o.target);if(c===null)return;l=new ot(c,1)}this._revealPosition(l)})),this._register(Fa(r,Yt.MOUSE_MOVE,o=>{if(o.shiftKey){const s=this._stickyScrollWidget.getLineIndexFromChildDomNode(o.target);if(s===null||this._showEndForLine!==null&&this._showEndForLine===s)return;this._showEndForLine=s,this._renderStickyScroll();return}this._showEndForLine!==void 0&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._register(yt(r,Yt.MOUSE_LEAVE,o=>{this._showEndForLine!==void 0&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._register(n.onMouseMoveOrRelevantKeyDown(([o,s])=>{const a=i(o);if(!a||!o.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}const{range:l,textElement:c}=a;if(!l.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=l,e.clear();else if(c.style.textDecoration==="underline")return;const u=new oa;e.add(Kn(()=>u.dispose(!0)));let d;AG(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new ot(l.startLineNumber,l.startColumn+1),!1,u.token).then(h=>{if(!u.token.isCancellationRequested)if(h.length!==0){this._candidateDefinitionsLength=h.length;const f=c;d!==f?(e.clear(),d=f,d.style.textDecoration="underline",e.add(Kn(()=>{d.style.textDecoration="none"}))):d||(d=f,d.style.textDecoration="underline",e.add(Kn(()=>{d.style.textDecoration="none"})))}else e.clear()})})),this._register(n.onCancel(()=>{e.clear()})),this._register(n.onExecute(async o=>{if(o.target.type!==12||o.target.detail!==this._stickyScrollWidget.getId())return;const s=this._stickyScrollWidget.getEditorPositionFromNode(o.target.element);s&&(!this._editor.hasModel()||!this._stickyRangeProjectedOnEditor||(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:s.lineNumber,column:1})),this._instaService.invokeFunction(tGt,o,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor})))}))}_onContextMenu(e,n){const i=new uv(e,n);this._contextMenuService.showContextMenu({menuId:Rn.StickyScrollContext,getAnchor:()=>i})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||e===null)return;const n=this._stickyScrollWidget.getRenderedStickyLine(e),i=n==null?void 0:n.foldingIcon;if(!i)return;wWe(this._foldingModel,Number.MAX_VALUE,[e]),i.isCollapsed=!i.isCollapsed;const r=(i.isCollapsed?this._editor.getTopForLineNumber(i.foldingEndLine):this._editor.getTopForLineNumber(i.foldingStartLine))-this._editor.getOption(67)*n.index+1;this._editor.setScrollTop(r),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(116);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(i=>{i.scrollTopChanged&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(i=>this._onTokensChange(i))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=void 0,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(68).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=void 0,this._renderStickyScroll(0)}))}_readConfigurationChange(e){(e.hasChanged(116)||e.hasChanged(73)||e.hasChanged(67)||e.hasChanged(111)||e.hasChanged(68))&&this._readConfiguration(),e.hasChanged(68)&&this._renderStickyScroll(0)}_needsUpdate(e){const n=this._stickyScrollWidget.getCurrentLines();for(const i of n)for(const r of e.ranges)if(i>=r.fromLineNumber&&i<=r.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(0)}_onDidResize(){const n=this._editor.getLayoutInfo().height/this._editor.getOption(67);this._maxStickyLines=Math.round(n*.25)}async _renderStickyScroll(e){const n=this._editor.getModel();if(!n||n.isTooLargeForTokenization()){this._resetState();return}const i=this._updateAndGetMinRebuildFromLine(e),r=this._stickyLineCandidateProvider.getVersionId();if(r===void 0||r===n.getVersionId())if(!this._focused)await this._updateState(i);else if(this._focusedStickyElementIndex===-1)await this._updateState(i),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const s=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];await this._updateState(i),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(s)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}}_updateAndGetMinRebuildFromLine(e){if(e!==void 0){const n=this._minRebuildFromLine!==void 0?this._minRebuildFromLine:1/0;this._minRebuildFromLine=Math.min(e,n)}return this._minRebuildFromLine}async _updateState(e){var i;this._minRebuildFromLine=void 0,this._foldingModel=await((i=Ak.get(this._editor))==null?void 0:i.getFoldingModel())??void 0,this._widgetState=this.findScrollWidgetState();const n=this._widgetState.startLineNumbers.length>0;this._stickyScrollVisibleContextKey.set(n),this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e)}async _resetState(){this._minRebuildFromLine=void 0,this._foldingModel=void 0,this._widgetState=UB.Empty,this._stickyScrollVisibleContextKey.set(!1),this._stickyScrollWidget.setState(void 0,void 0)}findScrollWidgetState(){const e=this._editor.getOption(67),n=Math.min(this._maxStickyLines,this._editor.getOption(116).maxLineCount),i=this._editor.getScrollTop();let r=0;const o=[],s=[],a=this._editor.getVisibleRanges();if(a.length!==0){const l=new KB(a[0].startLineNumber,a[a.length-1].endLineNumber),c=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(l);for(const u of c){const d=u.startLineNumber,h=u.endLineNumber,f=u.nestingDepth;if(h-d>0){const m=(f-1)*e,p=f*e,g=this._editor.getBottomForLineNumber(d)-i,y=this._editor.getTopForLineNumber(h)-i,_=this._editor.getBottomForLineNumber(h)-i;if(m>y&&m<=_){o.push(d),s.push(h+1),r=_-p;break}else p>g&&p<=_&&(o.push(d),s.push(h+1));if(o.length===n)break}}}return this._endLineNumbers=s,new UB(o,s,r,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}},J4e=g2,g2.ID="store.contrib.stickyScrollController",g2);MS=J4e=JOr([xO(1,Hm),xO(2,Ln),xO(3,qn),xO(4,bs),xO(5,tg),xO(6,vi)],MS);class e4r extends qh{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...Ci("toggleEditorStickyScroll","Toggle Editor Sticky Scroll"),mnemonicTitle:I({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Editor Sticky Scroll")},metadata:{description:Ci("toggleEditorStickyScroll.description","Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:KOr.View,toggled:{condition:Tt.equals("config.editor.stickyScroll.enabled",!0),title:I("stickyScroll","Sticky Scroll"),mnemonicTitle:I({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:Rn.CommandPalette},{id:Rn.MenubarAppearanceMenu,group:"4_editor",order:3},{id:Rn.StickyScrollContext}]})}async run(e){const n=e.get(cr),i=!n.getValue("editor.stickyScroll.enabled");return n.updateValue("editor.stickyScroll.enabled",i)}}const $ge=100;class t4r extends c_{constructor(){super({id:"editor.action.focusStickyScroll",title:{...Ci("focusStickyScroll","Focus on the editor sticky scroll"),mnemonicTitle:I({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll")},precondition:Tt.and(Tt.has("config.editor.stickyScroll.enabled"),Re.stickyScrollVisible),menu:[{id:Rn.CommandPalette}]})}runEditorCommand(e,n){var i;(i=MS.get(n))==null||i.focus()}}class n4r extends c_{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:Ci("selectNextStickyScrollLine.title","Select the next editor sticky scroll line"),precondition:Re.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:$ge,primary:18}})}runEditorCommand(e,n){var i;(i=MS.get(n))==null||i.focusNext()}}class i4r extends c_{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:Ci("selectPreviousStickyScrollLine.title","Select the previous sticky scroll line"),precondition:Re.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:$ge,primary:16}})}runEditorCommand(e,n){var i;(i=MS.get(n))==null||i.focusPrevious()}}class r4r extends c_{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:Ci("goToFocusedStickyScrollLine.title","Go to the focused sticky scroll line"),precondition:Re.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:$ge,primary:3}})}runEditorCommand(e,n){var i;(i=MS.get(n))==null||i.goToFocused()}}class o4r extends c_{constructor(){super({id:"editor.action.selectEditor",title:Ci("selectEditor.title","Select Editor"),precondition:Re.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:$ge,primary:9}})}runEditorCommand(e,n){var i;(i=MS.get(n))==null||i.selectEditor()}}Wr(MS.ID,MS,1);cs(e4r);cs(t4r);cs(i4r);cs(n4r);cs(r4r);cs(o4r);var nYt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},v9=function(t,e){return function(n,i){e(n,i,t)}};class s4r{constructor(e,n,i,r,o,s){this.range=e,this.insertText=n,this.filterText=i,this.additionalTextEdits=r,this.command=o,this.completion=s}}let e3e=class extends tdi{constructor(e,n,i,r,o,s){super(o.disposable),this.model=e,this.line=n,this.word=i,this.completionModel=r,this._suggestMemoryService=s}canBeReused(e,n,i){return this.model===e&&this.line===n&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn<i.endColumn&&this.completionModel.getIncompleteProvider().size===0}get items(){const e=[],{items:n}=this.completionModel,i=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},n),r=Ir.slice(n,i),o=Ir.slice(n,0,i);let s=5;for(const a of Ir.concat(r,o)){if(a.score===N0.Default)continue;const l=new ve(a.editStart.lineNumber,a.editStart.column,a.editInsertEnd.lineNumber,a.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),c=a.completion.insertTextRules&&a.completion.insertTextRules&4?{snippet:a.completion.insertText}:a.completion.insertText;e.push(new s4r(l,c,a.filterTextLow??a.labelLow,a.completion.additionalTextEdits,a.completion.command,a)),s-->=0&&a.resolve(er.None)}return e}};e3e=nYt([v9(5,Rge)],e3e);let t3e=class extends ct{constructor(e,n,i,r){super(),this._languageFeatureService=e,this._clipboardService=n,this._suggestMemoryService=i,this._editorService=r,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,n,i,r){var f;if(i.selectedSuggestionInfo)return;let o;for(const m of this._editorService.listCodeEditors())if(m.getModel()===e){o=m;break}if(!o)return;const s=o.getOption(90);if(R4.isAllOff(s))return;e.tokenization.tokenizeIfCheap(n.lineNumber);const a=e.tokenization.getLineTokens(n.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(n.column-1-1,0)));if(R4.valueFor(s,l)!=="inline")return;let c=e.getWordAtPosition(n),u;if(c!=null&&c.word||(u=this._getTriggerCharacterInfo(e,n)),!(c!=null&&c.word)&&!u||(c||(c=e.getWordUntilPosition(n)),c.endColumn!==n.column))return;let d;const h=e.getValueInRange(new ve(n.lineNumber,1,n.lineNumber,n.column));if(!u&&((f=this._lastResult)!=null&&f.canBeReused(e,n.lineNumber,c))){const m=new S0t(h,n.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=m,this._lastResult.acquire(),d=this._lastResult}else{const m=await DWe(this._languageFeatureService.completionProvider,e,n,new VU(void 0,ole.createSuggestFilter(o).itemKind,u==null?void 0:u.providers),u&&{triggerKind:1,triggerCharacter:u.ch},r);let p;m.needsClipboard&&(p=await this._clipboardService.readText());const g=new ME(m.items,n.column,new S0t(h,0),rle.None,o.getOption(119),o.getOption(113),{boostFullMatch:!1,firstMatchCanBeWeak:!1},p);d=new e3e(e,n.lineNumber,c,g,m,this._suggestMemoryService)}return this._lastResult=d,d}handleItemDidShow(e,n){n.completion.resolve(er.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,n){var o;const i=e.getValueInRange(ve.fromPositions({lineNumber:n.lineNumber,column:n.column-1},n)),r=new Set;for(const s of this._languageFeatureService.completionProvider.all(e))(o=s.triggerCharacters)!=null&&o.includes(i)&&r.add(s);if(r.size!==0)return{providers:r,ch:i}}};t3e=nYt([v9(0,Ln),v9(1,GS),v9(2,Rge),v9(3,Yr)],t3e);Bq(t3e);class a4r extends En{constructor(){super({id:"editor.action.forceRetokenize",label:I("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,n){if(!n.hasModel())return;const i=n.getModel();i.tokenization.resetTokenization();const r=new cu;i.tokenization.forceTokenization(i.getLineCount()),r.stop(),console.log(`tokenization took ${r.elapsed()}`)}}Ht(a4r);const Zce=class Zce extends qh{constructor(){super({id:Zce.ID,title:Ci({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:Ci("tabMovesFocusDescriptions","Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){const n=!a5.getTabFocusMode();a5.setTabFocusMode(n),Am(n?I("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element"):I("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}};Zce.ID="editor.action.toggleTabFocusMode";let n3e=Zce;cs(n3e);var l4r=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},F0t=function(t,e){return function(n,i){e(n,i,t)}};let i3e=class extends ct{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,n,i={},r,o){super(),this._link=n,this._hoverService=r,this._enabled=!0,this.el=jt(e,Xt("a.monaco-link",{tabIndex:n.tabIndex??0,href:n.href},n.label)),this.hoverDelegate=i.hoverDelegate??Yh("mouse"),this.setTooltip(n.title),this.el.setAttribute("role","button");const s=this._register(new Er(this.el,"click")),a=this._register(new Er(this.el,"keypress")),l=rn.chain(a.event,d=>d.map(h=>new as(h)).filter(h=>h.keyCode===3)),c=this._register(new Er(this.el,hs.Tap)).event;this._register(xd.addTarget(this.el));const u=rn.any(s.event,l,c);this._register(u(d=>{this.enabled&&(Mr.stop(d,!0),i!=null&&i.opener?i.opener(this._link.href):o.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}setTooltip(e){this.hoverDelegate.showNativeHover?this.el.title=e??"":!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};i3e=l4r([F0t(3,Pw),F0t(4,Wm)],i3e);var iYt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},rYt=function(t,e){return function(n,i){e(n,i,t)}};const c4r=26;let r3e=class extends ct{constructor(e,n){super(),this._editor=e,this.instantiationService=n,this.banner=this._register(this.instantiationService.createInstance(o3e))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{var n;this.hide(),(n=e.onClose)==null||n.call(e)}}),this._editor.setBanner(this.banner.element,c4r)}};r3e=iYt([rYt(1,qn)],r3e);let o3e=class extends ct{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(pS,{}),this.element=Xt("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){const n=Xt("span");return n.innerText=e,n}return this.markdownRenderer.render(e).element}clear(){ru(this.element)}show(e){ru(this.element);const n=this.getAriaLabel(e);n&&this.element.setAttribute("aria-label",n);const i=jt(this.element,Xt("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild(Xt(`div${ci.asCSSSelector(e.icon)}`));const r=jt(this.element,Xt("div.message-container"));if(r.setAttribute("aria-hidden","true"),r.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=jt(this.element,Xt("div.message-actions-container")),e.actions)for(const s of e.actions)this._register(this.instantiationService.createInstance(i3e,this.messageActionsContainer,{...s,tabIndex:-1},{}));const o=jt(this.element,Xt("div.action-container"));this.actionBar=this._register(new Ap(o)),this.actionBar.push(this._register(new xm("banner.close","Close Banner",ci.asClassName(PFt),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};o3e=iYt([rYt(0,qn)],o3e);var BWe=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Z3=function(t,e){return function(n,i){e(n,i,t)}};const u4r=ks("extensions-warning-message",qt.warning,I("warningIcon","Icon shown with a warning message in the extensions editor."));var aj;let XU=(aj=class extends ct{constructor(e,n,i,r){super(),this._editor=e,this._editorWorkerService=n,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=o=>{if(o&&o.hasMore){if(this._bannerClosed)return;const s=Math.max(o.ambiguousCharacterCount,o.nonBasicAsciiCharacterCount,o.invisibleCharacterCount);let a;if(o.nonBasicAsciiCharacterCount>=s)a={message:I("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new QU};else if(o.ambiguousCharacterCount>=s)a={message:I("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new CA};else if(o.invisibleCharacterCount>=s)a={message:I("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new ZU};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:u4r,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(r.createInstance(r3e,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(126),this._register(i.onDidChangeTrust(o=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(o=>{o.hasChanged(126)&&(this._options=e.getOption(126),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=d4r(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(i=>i===!1))return;const n={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(i=>i.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(i=>i==="_os"?new Intl.NumberFormat().resolvedOptions().locale:i==="_vscode"?Jci:i)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new s3e(this._editor,n,this._updateState,this._editorWorkerService):this._highlighter=new h4r(this._editor,n,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}},aj.ID="editor.contrib.unicodeHighlighter",aj);XU=BWe([Z3(1,xb),Z3(2,M5t),Z3(3,qn)],XU);function d4r(t,e){return{nonBasicASCII:e.nonBasicASCII===ip?!t:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===ip?!t:e.includeComments,includeStrings:e.includeStrings===ip?!t:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}let s3e=class extends ct{constructor(e,n,i,r){super(),this._editor=e,this._options=n,this._updateState=i,this._editorWorkerService=r,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Wo(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(n=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(n);const i=[];if(!n.hasMore)for(const r of n.ranges)i.push({range:r,options:_le.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;const n=this._editor.getModel();if(!zVe(n,e))return null;const i=n.getValueInRange(e.range);return{reason:sYt(i,this._options),inComment:HVe(n,e),inString:WVe(n,e)}}};s3e=BWe([Z3(3,xb)],s3e);class h4r extends ct{constructor(e,n,i){super(),this._editor=e,this._options=n,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Wo(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._editor.getVisibleRanges(),n=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const r of e){const o=z8e.computeUnicodeHighlights(this._model,this._options,r);for(const s of o.ranges)i.ranges.push(s);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||o.hasMore}if(!i.hasMore)for(const r of i.ranges)n.push({range:r,options:_le.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(n)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const n=this._editor.getModel(),i=n.getValueInRange(e.range);return zVe(n,e)?{reason:sYt(i,this._options),inComment:HVe(n,e),inString:WVe(n,e)}:null}}const oYt=I("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options");let a3e=class{constructor(e,n,i){this._editor=e,this._languageService=n,this._openerService=i,this.hoverOrdinal=5}computeSync(e,n){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),r=this._editor.getContribution(XU.ID);if(!r)return[];const o=[],s=new Set;let a=300;for(const l of n){const c=r.getDecorationInfo(l);if(!c)continue;const d=i.getValueInRange(l.range).codePointAt(0),h=uNe(d);let f;switch(c.reason.kind){case 0:{gq(c.reason.confusableWith)?f=I("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,uNe(c.reason.confusableWith.codePointAt(0))):f=I("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,uNe(c.reason.confusableWith.codePointAt(0)));break}case 1:f=I("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:f=I("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}if(s.has(f))continue;s.add(f);const m={codePoint:d,reason:c.reason,inComment:c.inComment,inString:c.inString},p=I("unicodeHighlight.adjustSettings","Adjust settings"),g=`command:${xle.ID}?${encodeURIComponent(JSON.stringify(m))}`,y=new rd("",!0).appendMarkdown(f).appendText(" ").appendLink(g,p,oYt);o.push(new ov(this,l.range,[y],!1,a++))}return o}renderHoverParts(e,n){return zLr(e,n,this._editor,this._languageService,this._openerService)}};a3e=BWe([Z3(1,Qs),Z3(2,Wm)],a3e);function l3e(t){return`U+${t.toString(16).padStart(4,"0")}`}function uNe(t){let e=`\`${l3e(t)}\``;return rI.isInvisibleCharacter(t)||(e+=` "${`${f4r(t)}`}"`),e}function f4r(t){return t===96?"`` ` ``":"`"+String.fromCodePoint(t)+"`"}function sYt(t,e){return z8e.computeUnicodeHighlightReason(t,e)}const Qce=class Qce{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,n){const i=`${e}${n}`;let r=this.map.get(i);return r||(r=Hi.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:n}),this.map.set(i,r)),r}};Qce.instance=new Qce;let _le=Qce;class m4r extends En{constructor(){super({id:CA.ID,label:I("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=I("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}async run(e,n,i){const r=e==null?void 0:e.get(cr);r&&this.runAction(r)}async runAction(e){await e.updateValue(uf.includeComments,!1,2)}}class p4r extends En{constructor(){super({id:CA.ID,label:I("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=I("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}async run(e,n,i){const r=e==null?void 0:e.get(cr);r&&this.runAction(r)}async runAction(e){await e.updateValue(uf.includeStrings,!1,2)}}const Jce=class Jce extends En{constructor(){super({id:Jce.ID,label:I("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=I("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}async run(e,n,i){const r=e==null?void 0:e.get(cr);r&&this.runAction(r)}async runAction(e){await e.updateValue(uf.ambiguousCharacters,!1,2)}};Jce.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";let CA=Jce;const eue=class eue extends En{constructor(){super({id:eue.ID,label:I("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=I("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}async run(e,n,i){const r=e==null?void 0:e.get(cr);r&&this.runAction(r)}async runAction(e){await e.updateValue(uf.invisibleCharacters,!1,2)}};eue.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";let ZU=eue;const tue=class tue extends En{constructor(){super({id:tue.ID,label:I("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=I("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}async run(e,n,i){const r=e==null?void 0:e.get(cr);r&&this.runAction(r)}async runAction(e){await e.updateValue(uf.nonBasicASCII,!1,2)}};tue.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";let QU=tue;const nue=class nue extends En{constructor(){super({id:nue.ID,label:I("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}async run(e,n,i){const{codePoint:r,reason:o,inString:s,inComment:a}=i,l=String.fromCodePoint(r),c=e.get(wb),u=e.get(cr);function d(m){return rI.isInvisibleCharacter(m)?I("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",l3e(m)):I("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${l3e(m)} "${l}"`)}const h=[];if(o.kind===0)for(const m of o.notAmbiguousInLocales)h.push({label:I("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',m),run:async()=>{b4r(u,[m])}});if(h.push({label:d(r),run:()=>g4r(u,[r])}),a){const m=new m4r;h.push({label:m.label,run:async()=>m.runAction(u)})}else if(s){const m=new p4r;h.push({label:m.label,run:async()=>m.runAction(u)})}if(o.kind===0){const m=new CA;h.push({label:m.label,run:async()=>m.runAction(u)})}else if(o.kind===1){const m=new ZU;h.push({label:m.label,run:async()=>m.runAction(u)})}else if(o.kind===2){const m=new QU;h.push({label:m.label,run:async()=>m.runAction(u)})}else v4r(o);const f=await c.pick(h,{title:oYt});f&&await f.run()}};nue.ID="editor.action.unicodeHighlight.showExcludeOptions";let xle=nue;async function g4r(t,e){const n=t.getValue(uf.allowedCharacters);let i;typeof n=="object"&&n?i=n:i={};for(const r of e)i[String.fromCodePoint(r)]=!0;await t.updateValue(uf.allowedCharacters,i,2)}async function b4r(t,e){var r;const n=(r=t.inspect(uf.allowedLocales).user)==null?void 0:r.value;let i;typeof n=="object"&&n?i=Object.assign({},n):i={};for(const o of e)i[o]=!0;await t.updateValue(uf.allowedLocales,i,2)}function v4r(t){throw new Error(`Unexpected value: ${t}`)}Ht(CA);Ht(ZU);Ht(QU);Ht(xle);Wr(XU.ID,XU,1);wR.register(a3e);var y4r=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},$0t=function(t,e){return function(n,i){e(n,i,t)}};const aYt="ignoreUnusualLineTerminators";function _4r(t,e,n){t.setModelProperty(e.uri,aYt,n)}function x4r(t,e){return t.getModelProperty(e.uri,aYt)}var lj;let wle=(lj=class extends ct{constructor(e,n,i){super(),this._editor=e,this._dialogService=n,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(127),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(127)&&(this._config=this._editor.getOption(127),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(r=>{r.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||x4r(this._codeEditorService,e)===!0||this._editor.getOption(92))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=await this._dialogService.confirm({title:I("unusualLineTerminators.title","Unusual Line Terminators"),message:I("unusualLineTerminators.message","Detected unusual line terminators"),detail:I("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",cb(e.uri)),primaryButton:I({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:I("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!i.confirmed){_4r(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}},lj.ID="editor.contrib.unusualLineTerminatorsDetector",lj);wle=y4r([$0t(1,Lq),$0t(2,Yr)],wle);Wr(wle.ID,wle,1);var lYt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Yte=function(t,e){return function(n,i){e(n,i,t)}},Hl,c3e;const Vge=new gn("hasWordHighlights",!1);function cYt(t,e,n,i){const r=t.ordered(e);return D8e(r.map(o=>()=>Promise.resolve(o.provideDocumentHighlights(e,n,i)).then(void 0,$a)),md).then(o=>{if(o){const s=new Xl;return s.set(e.uri,o),s}return new Xl})}function w4r(t,e,n,i,r,o){const s=t.ordered(e);return D8e(s.map(a=>()=>{const l=o.filter(c=>h3t(c)).filter(c=>GVe(a.selector,c.uri,c.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(a.provideMultiDocumentHighlights(e,n,l,r)).then(void 0,$a)}),a=>a instanceof Xl&&a.size>0)}class zWe{constructor(e,n,i){this._model=e,this._selection=n,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,n),this._result=null}get result(){return this._result||(this._result=cc(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,n){const i=e.getWordAtPosition(n.getPosition());return i?new ve(n.startLineNumber,i.startColumn,n.startLineNumber,i.endColumn):null}isValid(e,n,i){const r=n.startLineNumber,o=n.startColumn,s=n.endColumn,a=this._getCurrentWordRange(e,n);let l=!!(this._wordRange&&this._wordRange.equalsRange(a));for(let c=0,u=i.length;!l&&c<u;c++){const d=i.getRange(c);d&&d.startLineNumber===r&&d.startColumn<=o&&d.endColumn>=s&&(l=!0)}return l}cancel(){this.result.cancel()}}class C4r extends zWe{constructor(e,n,i,r){super(e,n,i),this._providers=r}_compute(e,n,i,r){return cYt(this._providers,e,n.getPosition(),r).then(o=>o||new Xl)}}class S4r extends zWe{constructor(e,n,i,r,o){super(e,n,i),this._providers=r,this._otherModels=o}_compute(e,n,i,r){return w4r(this._providers,e,n.getPosition(),i,r,this._otherModels).then(o=>o||new Xl)}}class uYt extends zWe{constructor(e,n,i,r,o){super(e,n,r),this._otherModels=o,this._selectionIsEmpty=n.isEmpty(),this._word=i}_compute(e,n,i,r){return uw(250,r).then(()=>{const o=new Xl;let s;if(this._word?s=this._word:s=e.getWordAtPosition(n.getPosition()),!s)return new Xl;const a=[e,...this._otherModels];for(const l of a){if(l.isDisposed())continue;const u=l.findMatches(s.word,!0,!1,!0,i,!1).map(d=>({range:d.range,kind:xH.Text}));u&&o.set(l.uri,u)}return o})}isValid(e,n,i){const r=n.isEmpty();return this._selectionIsEmpty!==r?!1:super.isValid(e,n,i)}}function N4r(t,e,n,i,r){return t.has(e)?new C4r(e,n,r,t):new uYt(e,n,i,r,[])}function E4r(t,e,n,i,r,o){return t.has(e)?new S4r(e,n,r,t,o):new uYt(e,n,i,r,o)}Pf("_executeDocumentHighlights",async(t,e,n)=>{const i=t.get(Ln),r=await cYt(i.documentHighlightProvider,e,n,er.None);return r==null?void 0:r.get(e.uri)});var zD;let u3e=(zD=class{constructor(e,n,i,r,o){this.toUnhook=new Lt,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new Xl,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=n,this.multiDocumentProviders=i,this.codeEditorService=o,this._hasWordHighlights=Vge.bindTo(r),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(81),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(s=>{this._ignorePositionChangeEvent||this.occurrencesHighlight!=="off"&&this._onPositionChanged(s)})),this.toUnhook.add(e.onDidFocusEditorText(s=>{this.occurrencesHighlight!=="off"&&(this.workerRequest||this._run())})),this.toUnhook.add(e.onDidChangeModelContent(s=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(s=>{!s.newModelUrl&&s.oldModelUrl?this._stopSingular():Hl.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(s=>{const a=this.editor.getOption(81);this.occurrencesHighlight!==a&&(this.occurrencesHighlight=a,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,Hl.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight!=="off"&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(ve.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),i=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))+1)%e.length,r=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(r.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(r);const o=this._getWord();if(o){const s=this.editor.getModel().getLineContent(r.startLineNumber);Am(`${s}, ${i+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),i=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,r=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(r.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(r);const o=this._getWord();if(o){const s=this.editor.getModel().getLineContent(r.startLineNumber);Am(`${s}, ${i+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=Hl.storedDecorations.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),Hl.storedDecorations.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(){const e=this.codeEditorService.listCodeEditors(),n=[];for(const i of e){if(!i.hasModel())continue;const r=Hl.storedDecorations.get(i.getModel().uri);if(!r)continue;i.removeDecorations(r),n.push(i.getModel().uri);const o=Pk.get(i);o!=null&&o.wordHighlighter&&o.wordHighlighter.decorations.length>0&&(o.wordHighlighter.decorations.clear(),o.wordHighlighter.workerRequest=null,o.wordHighlighter._hasWordHighlights.set(!1))}for(const i of n)Hl.storedDecorations.delete(i)}_stopSingular(){var e,n,i,r;this._removeSingleDecorations(),this.editor.hasTextFocus()&&(((e=this.editor.getModel())==null?void 0:e.uri.scheme)!==Ti.vscodeNotebookCell&&((i=(n=Hl.query)==null?void 0:n.modelInfo)==null?void 0:i.model.uri.scheme)!==Ti.vscodeNotebookCell?(Hl.query=null,this._run()):(r=Hl.query)!=null&&r.modelInfo&&(Hl.query.modelInfo=null)),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(){this._removeAllDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){var n;if(this.occurrencesHighlight==="off"){this._stopAll();return}if(e.reason!==3&&((n=this.editor.getModel())==null?void 0:n.uri.scheme)!==Ti.vscodeNotebookCell){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),n=e.startLineNumber,i=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:n,column:i})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===Ti.vscodeNotebookCell){const o=[],s=this.codeEditorService.listCodeEditors();for(const a of s){const l=a.getModel();l&&l!==e&&l.uri.scheme===Ti.vscodeNotebookCell&&o.push(l)}return o}const i=[],r=this.codeEditorService.listCodeEditors();for(const o of r){if(!X7e(o))continue;const s=o.getModel();s&&e===s.modified&&i.push(s.modified)}if(i.length)return i;if(this.occurrencesHighlight==="singleFile")return[];for(const o of r){const s=o.getModel();s&&s!==e&&i.push(s)}return i}_run(){var i;let e;if(this.editor.hasTextFocus()){const r=this.editor.getSelection();if(!r||r.startLineNumber!==r.endLineNumber){Hl.query=null,this._stopAll();return}const o=r.startColumn,s=r.endColumn,a=this._getWord();if(!a||a.startColumn>o||a.endColumn<s){Hl.query=null,this._stopAll();return}e=this.workerRequest&&this.workerRequest.isValid(this.model,r,this.decorations),Hl.query={modelInfo:{model:this.model,selection:r},word:a}}else if(!Hl.query)return;if(this.lastCursorPositionChangeTime=new Date().getTime(),e)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();const r=++this.workerRequestTokenId;this.workerRequestCompleted=!1;const o=this.getOtherModelsToHighlight(this.editor.getModel());if(!Hl.query.modelInfo||Hl.query.modelInfo.model.isDisposed())return;this.workerRequest=this.computeWithModel(Hl.query.modelInfo.model,Hl.query.modelInfo.selection,Hl.query.word,o),(i=this.workerRequest)==null||i.result.then(s=>{r===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=s||[],this._beginRenderDecorations())},ji)}}computeWithModel(e,n,i,r){return r.length?E4r(this.multiDocumentProviders,e,n,i,this.editor.getOption(132),r):N4r(this.providers,e,n,i,this.editor.getOption(132))}_beginRenderDecorations(){const e=new Date().getTime(),n=this.lastCursorPositionChangeTime+250;e>=n?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},n-e)}renderDecorations(){var n,i,r;this.renderDecorationsTimer=-1;const e=this.codeEditorService.listCodeEditors();for(const o of e){const s=Pk.get(o);if(!s)continue;const a=[],l=(n=o.getModel())==null?void 0:n.uri;if(l&&this.workerRequestValue.has(l)){const c=Hl.storedDecorations.get(l),u=this.workerRequestValue.get(l);if(u)for(const h of u)h.range&&a.push({range:h.range,options:gPr(h.kind)});let d=[];o.changeDecorations(h=>{d=h.deltaDecorations(c??[],a)}),Hl.storedDecorations=Hl.storedDecorations.set(l,d),a.length>0&&((i=s.wordHighlighter)==null||i.decorations.set(a),(r=s.wordHighlighter)==null||r._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}},Hl=zD,zD.storedDecorations=new Xl,zD.query=null,zD);u3e=Hl=lYt([Yte(4,Yr)],u3e);var b2;let Pk=(b2=class extends ct{static get(e){return e.getContribution(c3e.ID)}constructor(e,n,i,r){super(),this._wordHighlighter=null;const o=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new u3e(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,n,r))};this._register(e.onDidChangeModel(s=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),o()})),o()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){var e;(e=this._wordHighlighter)==null||e.moveNext()}moveBack(){var e;(e=this._wordHighlighter)==null||e.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}},c3e=b2,b2.ID="editor.contrib.wordHighlighter",b2);Pk=c3e=lYt([Yte(1,vi),Yte(2,Ln),Yte(3,Yr)],Pk);class dYt extends En{constructor(e,n){super(n),this._isNext=e}run(e,n){const i=Pk.get(n);i&&(this._isNext?i.moveNext():i.moveBack())}}class D4r extends dYt{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:I("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:Vge,kbOpts:{kbExpr:Re.editorTextFocus,primary:65,weight:100}})}}class k4r extends dYt{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:I("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:Vge,kbOpts:{kbExpr:Re.editorTextFocus,primary:1089,weight:100}})}}class M4r extends En{constructor(){super({id:"editor.action.wordHighlight.trigger",label:I("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:Vge.toNegated(),kbOpts:{kbExpr:Re.editorTextFocus,primary:0,weight:100}})}run(e,n,i){const r=Pk.get(n);r&&r.restoreViewState(!0)}}Wr(Pk.ID,Pk,0);Ht(D4r);Ht(k4r);Ht(M4r);class Bge extends Zl{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,n,i){if(!n.hasModel())return;const r=ab(n.getOption(132),n.getOption(131)),o=n.getModel(),s=n.getSelections(),a=s.length>1,l=s.map(c=>{const u=new ot(c.positionLineNumber,c.positionColumn),d=this._move(r,o,u,this._wordNavigationType,a);return this._moveTo(c,d,this._inSelectionMode)});if(o.pushStackElement(),n._getViewModel().setCursorStates("moveWordCommand",3,l.map(c=>Kr.fromModelSelection(c))),l.length===1){const c=new ot(l[0].positionLineNumber,l[0].positionColumn);n.revealPosition(c,0)}}_moveTo(e,n,i){return i?new Pn(e.selectionStartLineNumber,e.selectionStartColumn,n.lineNumber,n.column):new Pn(n.lineNumber,n.column,n.lineNumber,n.column)}}class MM extends Bge{_move(e,n,i,r,o){return yo.moveWordLeft(e,n,i,r,o)}}class LM extends Bge{_move(e,n,i,r,o){return yo.moveWordRight(e,n,i,r)}}class L4r extends MM{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class T4r extends MM{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class I4r extends MM{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:Tt.and(Re.textInputFocus,(e=Tt.and(Cq,Sme))==null?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class A4r extends MM{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class R4r extends MM{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class P4r extends MM{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:Tt.and(Re.textInputFocus,(e=Tt.and(Cq,Sme))==null?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class O4r extends MM{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,n,i,r,o){return super._move(ab(l_.wordSeparators.defaultValue,e.intlSegmenterLocales),n,i,r,o)}}class j4r extends MM{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,n,i,r,o){return super._move(ab(l_.wordSeparators.defaultValue,e.intlSegmenterLocales),n,i,r,o)}}class F4r extends LM{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class $4r extends LM{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:Tt.and(Re.textInputFocus,(e=Tt.and(Cq,Sme))==null?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class V4r extends LM{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class B4r extends LM{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class z4r extends LM{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:Tt.and(Re.textInputFocus,(e=Tt.and(Cq,Sme))==null?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class H4r extends LM{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class W4r extends LM{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,n,i,r,o){return super._move(ab(l_.wordSeparators.defaultValue,e.intlSegmenterLocales),n,i,r,o)}}class U4r extends LM{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,n,i,r,o){return super._move(ab(l_.wordSeparators.defaultValue,e.intlSegmenterLocales),n,i,r,o)}}class zge extends Zl{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,n,i){const r=e.get(bs);if(!n.hasModel())return;const o=ab(n.getOption(132),n.getOption(131)),s=n.getModel(),a=n.getSelections(),l=n.getOption(6),c=n.getOption(11),u=r.getLanguageConfiguration(s.getLanguageId()).getAutoClosingPairs(),d=n._getViewModel(),h=a.map(f=>{const m=this._delete({wordSeparators:o,model:s,selection:f,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:n.getOption(9),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:u,autoClosedCharacters:d.getCursorAutoClosedCharacters()},this._wordNavigationType);return new Su(m,"")});n.pushUndoStop(),n.executeCommands(this.id,h),n.pushUndoStop()}}class HWe extends zge{_delete(e,n){const i=yo.deleteWordLeft(e,n);return i||new ve(1,1,1,1)}}class WWe extends zge{_delete(e,n){const i=yo.deleteWordRight(e,n);if(i)return i;const r=e.model.getLineCount(),o=e.model.getLineMaxColumn(r);return new ve(r,o,r,o)}}class K4r extends HWe{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:Re.writable})}}class q4r extends HWe{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:Re.writable})}}class G4r extends HWe{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:Re.writable,kbOpts:{kbExpr:Re.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class Y4r extends WWe{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:Re.writable})}}class X4r extends WWe{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:Re.writable})}}class Z4r extends WWe{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:Re.writable,kbOpts:{kbExpr:Re.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class Q4r extends En{constructor(){super({id:"deleteInsideWord",precondition:Re.writable,label:I("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,n,i){if(!n.hasModel())return;const r=ab(n.getOption(132),n.getOption(131)),o=n.getModel(),a=n.getSelections().map(l=>{const c=yo.deleteInsideWord(r,o,l);return new Su(c,"")});n.pushUndoStop(),n.executeCommands(this.id,a),n.pushUndoStop()}}fn(new L4r);fn(new T4r);fn(new I4r);fn(new A4r);fn(new R4r);fn(new P4r);fn(new F4r);fn(new $4r);fn(new V4r);fn(new B4r);fn(new z4r);fn(new H4r);fn(new O4r);fn(new j4r);fn(new W4r);fn(new U4r);fn(new K4r);fn(new q4r);fn(new G4r);fn(new Y4r);fn(new X4r);fn(new Z4r);Ht(Q4r);class J4r extends zge{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:Re.writable,kbOpts:{kbExpr:Re.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,n){const i=sme.deleteWordPartLeft(e);return i||new ve(1,1,1,1)}}class e3r extends zge{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:Re.writable,kbOpts:{kbExpr:Re.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,n){const i=sme.deleteWordPartRight(e);if(i)return i;const r=e.model.getLineCount(),o=e.model.getLineMaxColumn(r);return new ve(r,o,r,o)}}class hYt extends Bge{_move(e,n,i,r,o){return sme.moveWordPartLeft(e,n,i,o)}}class t3r extends hYt{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:Re.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}Ar.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class n3r extends hYt{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:Re.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}Ar.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class fYt extends Bge{_move(e,n,i,r,o){return sme.moveWordPartRight(e,n,i)}}class i3r extends fYt{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:Re.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class r3r extends fYt{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:Re.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}fn(new J4r);fn(new e3r);fn(new t3r);fn(new n3r);fn(new i3r);fn(new r3r);const QWe=class QWe extends ct{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const e=Sm.get(this.editor);if(e&&this.editor.hasModel()){let n=this.editor.getOptions().get(93);n||(this.editor.isSimpleWidget?n=new rd(I("editor.simple.readonly","Cannot edit in read-only input")):n=new rd(I("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(n,this.editor.getPosition())}}};QWe.ID="editor.contrib.readOnlyMessageController";let Cle=QWe;Wr(Cle.ID,Cle,2);var o3r=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},V0t=function(t,e){return function(n,i){e(n,i,t)}};let d3e=class extends ct{constructor(e,n,i){super(),this._textModel=e,this._languageFeaturesService=n,this._outlineModelService=i,this._currentModel=lr(this,void 0);const r=Nu("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),o=Nu("_textModel.onDidChangeContent",rn.debounce(s=>this._textModel.onDidChangeContent(s),()=>{},100));this._register(Sf(async(s,a)=>{r.read(s),o.read(s);const l=a.add(new uMi),c=await this._outlineModelService.getOrCreate(this._textModel,l.token);a.isDisposed||this._currentModel.set(c,void 0)}))}getBreadcrumbItems(e,n){const i=this._currentModel.read(n);if(!i)return[];const r=i.asListOfDocumentSymbols().filter(o=>e.contains(o.range.startLineNumber)&&!e.contains(o.range.endLineNumber));return r.sort(MOt(Ah(o=>o.range.endLineNumber-o.range.startLineNumber,vv))),r.map(o=>({name:o.name,kind:o.kind,startLineNumber:o.range.startLineNumber}))}};d3e=o3r([V0t(1,Ln),V0t(2,OG)],d3e);Soe.setBreadcrumbsSourceFactory((t,e)=>e.createInstance(d3e,t));const JWe=class JWe extends ct{constructor(e){super(),this.editor=e,this.widget=null,W0&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(92);!this.widget&&e?this.widget=new h3e(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}};JWe.ID="editor.contrib.iPadShowKeyboard";let Sle=JWe;const iue=class iue extends ct{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(yt(this._domNode,"touchstart",n=>{this.editor.focus()})),this._register(yt(this._domNode,"focus",n=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return iue.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};iue.ID="editor.contrib.ShowKeyboardWidget";let h3e=iue;Wr(Sle.ID,Sle,3);var s3r=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},B0t=function(t,e){return function(n,i){e(n,i,t)}},f3e,v2;let JU=(v2=class extends ct{static get(e){return e.getContribution(f3e.ID)}constructor(e,n,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel(r=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(r=>this.stop())),this._register(Ca.onDidChange(r=>this.stop())),this._register(this._editor.onKeyUp(r=>r.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new m3e(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}},f3e=v2,v2.ID="editor.contrib.inspectTokens",v2);JU=f3e=s3r([B0t(1,ig),B0t(2,Qs)],JU);class a3r extends En{constructor(){super({id:"editor.action.inspectTokens",label:oIe.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,n){const i=JU.get(n);i==null||i.launch()}}function l3r(t){let e="";for(let n=0,i=t.length;n<i;n++){const r=t.charCodeAt(n);switch(r){case 9:e+="→";break;case 32:e+="·";break;default:e+=String.fromCharCode(r)}}return e}function c3r(t,e){const n=Ca.get(e);if(n)return n;const i=t.encodeLanguageId(e);return{getInitialState:()=>s5,tokenize:(r,o,s)=>Y8e(e,s),tokenizeEncoded:(r,o,s)=>Gfe(i,s)}}const rue=class rue extends ct{constructor(e,n){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=n,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=c3r(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(i=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return rue._ID}_compute(e){const n=this._getTokensAtLine(e.lineNumber);let i=0;for(let l=n.tokens1.length-1;l>=0;l--){const c=n.tokens1[l];if(e.column-1>=c.offset){i=l;break}}let r=0;for(let l=n.tokens2.length>>>1;l>=0;l--)if(e.column-1>=n.tokens2[l<<1]){r=l;break}const o=this._model.getLineContent(e.lineNumber);let s="";if(i<n.tokens1.length){const l=n.tokens1[i].offset,c=i+1<n.tokens1.length?n.tokens1[i+1].offset:o.length;s=o.substring(l,c)}ou(this._domNode,Xt("h2.tm-token",void 0,l3r(s),Xt("span.tm-token-length",void 0,`${s.length} ${s.length===1?"char":"chars"}`))),jt(this._domNode,Xt("hr.tokens-inspect-separator",{style:"clear:both"}));const a=(r<<1)+1<n.tokens2.length?this._decodeMetadata(n.tokens2[(r<<1)+1]):null;jt(this._domNode,Xt("table.tm-metadata-table",void 0,Xt("tbody",void 0,Xt("tr",void 0,Xt("td.tm-metadata-key",void 0,"language"),Xt("td.tm-metadata-value",void 0,`${a?a.languageId:"-?-"}`)),Xt("tr",void 0,Xt("td.tm-metadata-key",void 0,"token type"),Xt("td.tm-metadata-value",void 0,`${a?this._tokenTypeToString(a.tokenType):"-?-"}`)),Xt("tr",void 0,Xt("td.tm-metadata-key",void 0,"font style"),Xt("td.tm-metadata-value",void 0,`${a?this._fontStyleToString(a.fontStyle):"-?-"}`)),Xt("tr",void 0,Xt("td.tm-metadata-key",void 0,"foreground"),Xt("td.tm-metadata-value",void 0,`${a?Rt.Format.CSS.formatHex(a.foreground):"-?-"}`)),Xt("tr",void 0,Xt("td.tm-metadata-key",void 0,"background"),Xt("td.tm-metadata-value",void 0,`${a?Rt.Format.CSS.formatHex(a.background):"-?-"}`))))),jt(this._domNode,Xt("hr.tokens-inspect-separator")),i<n.tokens1.length&&jt(this._domNode,Xt("span.tm-token-type",void 0,n.tokens1[i].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){const n=Ca.getColorMap(),i=mf.getLanguageId(e),r=mf.getTokenType(e),o=mf.getFontStyle(e),s=mf.getForeground(e),a=mf.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(i),tokenType:r,fontStyle:o,foreground:n[s],background:n[a]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(e){let n="";return e&1&&(n+="italic "),e&2&&(n+="bold "),e&4&&(n+="underline "),e&8&&(n+="strikethrough "),n.length===0&&(n="---"),n}_getTokensAtLine(e){const n=this._getStateBeforeLine(e),i=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,n),r=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,n);return{startState:n,tokens1:i.tokens,tokens2:r.tokens,endState:i.endState}}_getStateBeforeLine(e){let n=this._tokenizationSupport.getInitialState();for(let i=1;i<e;i++)n=this._tokenizationSupport.tokenize(this._model.getLineContent(i),!0,n).endState;return n}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}};rue._ID="editor.contrib.inspectTokensWidget";let m3e=rue;Wr(JU.ID,JU,4);Ht(a3r);var u3r=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},z0t=function(t,e){return function(n,i){e(n,i,t)}},y9,y2;let p3e=(y2=class{constructor(e,n){this.quickInputService=e,this.keybindingService=n,this.registry=la.as(rR.Quickaccess)}provide(e){const n=new Lt;return n.add(e.onDidAccept(()=>{const[i]=e.selectedItems;i&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),n.add(e.onDidChangeValue(i=>{const r=this.registry.getQuickAccessProvider(i.substr(y9.PREFIX.length));r&&r.prefix&&r.prefix!==y9.PREFIX&&this.quickInputService.quickAccess.show(r.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(i=>i.prefix!==y9.PREFIX),n}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((n,i)=>n.prefix.localeCompare(i.prefix)).flatMap(n=>this.createPicks(n))}createPicks(e){return e.helpEntries.map(n=>{const i=n.prefix||e.prefix,r=i||"…";return{prefix:i,label:r,keybinding:n.commandId?this.keybindingService.lookupKeybinding(n.commandId):void 0,ariaLabel:I("helpPickAriaLabel","{0}, {1}",r,n.description),description:n.description}})}},y9=y2,y2.PREFIX="?",y2);p3e=y9=u3r([z0t(0,wb),z0t(1,vo)],p3e);la.as(rR.Quickaccess).registerQuickAccessProvider({ctor:p3e,prefix:"",helpEntries:[{description:sIe.helpQuickAccessActionLabel}]});class mYt{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,n,i){var s;const r=new Lt;e.canAcceptInBackground=!!((s=this.options)!=null&&s.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const o=r.add(new mc);return o.value=this.doProvide(e,n,i),r.add(this.onDidActiveTextEditorControlChange(()=>{o.value=void 0,o.value=this.doProvide(e,n)})),r}doProvide(e,n,i){const r=new Lt,o=this.activeTextEditorControl;if(o&&this.canProvideWithTextEditor(o)){const s={editor:o},a=r6t(o);if(a){let l=o.saveViewState()??void 0;r.add(a.onDidChangeCursorPosition(()=>{l=o.saveViewState()??void 0})),s.restoreViewState=()=>{l&&o===this.activeTextEditorControl&&o.restoreViewState(l)},r.add(ak(n.onCancellationRequested)(()=>{var c;return(c=s.restoreViewState)==null?void 0:c.call(s)}))}r.add(Kn(()=>this.clearDecorations(o))),r.add(this.provideWithTextEditor(s,e,n,i))}else r.add(this.provideWithoutTextEditor(e,n));return r}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},n){e.setSelection(n.range,"code.jump"),e.revealRangeInCenter(n.range,0),n.preserveFocus||e.focus();const i=e.getModel();i&&"getLineContent"in i&&hw(`${i.getLineContent(n.range.startLineNumber)}`)}getModel(e){var n;return X7e(e)?(n=e.getModel())==null?void 0:n.modified:e.getModel()}addDecorations(e,n){e.changeDecorations(i=>{const r=[];this.rangeHighlightDecorationId&&(r.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),r.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const o=[{range:n,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:n,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Sa(rjt),position:Tp.Full}}}],[s,a]=i.deltaDecorations(r,o);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:a}})}clearDecorations(e){const n=this.rangeHighlightDecorationId;n&&(e.changeDecorations(i=>{i.deltaDecorations([n.overviewRulerDecorationId,n.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}const oue=class oue extends mYt{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const n=I("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:n}],e.ariaLabel=n,ct.None}provideWithTextEditor(e,n,i){const r=e.editor,o=new Lt;o.add(n.onDidAccept(l=>{const[c]=n.selectedItems;if(c){if(!this.isValidLineNumber(r,c.lineNumber))return;this.gotoLocation(e,{range:this.toRange(c.lineNumber,c.column),keyMods:n.keyMods,preserveFocus:l.inBackground}),l.inBackground||n.hide()}}));const s=()=>{const l=this.parsePosition(r,n.value.trim().substr(oue.PREFIX.length)),c=this.getPickLabel(r,l.lineNumber,l.column);if(n.items=[{lineNumber:l.lineNumber,column:l.column,label:c}],n.ariaLabel=c,!this.isValidLineNumber(r,l.lineNumber)){this.clearDecorations(r);return}const u=this.toRange(l.lineNumber,l.column);r.revealRangeInCenter(u,0),this.addDecorations(r,u)};s(),o.add(n.onDidChangeValue(()=>s()));const a=r6t(r);return a&&a.getOptions().get(68).renderType===2&&(a.updateOptions({lineNumbers:"on"}),o.add(Kn(()=>a.updateOptions({lineNumbers:"relative"})))),o}toRange(e=1,n=1){return{startLineNumber:e,startColumn:n,endLineNumber:e,endColumn:n}}parsePosition(e,n){const i=n.split(/,|:|#/).map(o=>parseInt(o,10)).filter(o=>!isNaN(o)),r=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:r+i[0],column:i[1]}}getPickLabel(e,n,i){if(this.isValidLineNumber(e,n))return this.isValidColumn(e,n,i)?I("gotoLineColumnLabel","Go to line {0} and character {1}.",n,i):I("gotoLineLabel","Go to line {0}.",n);const r=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?I("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",r.lineNumber,r.column,o):I("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",r.lineNumber,r.column)}isValidLineNumber(e,n){return!n||typeof n!="number"?!1:n>0&&n<=this.lineCount(e)}isValidColumn(e,n,i){if(!i||typeof i!="number")return!1;const r=this.getModel(e);if(!r)return!1;const o={lineNumber:n,column:i};return r.validatePosition(o).equals(o)}lineCount(e){var n;return((n=this.getModel(e))==null?void 0:n.getLineCount())??0}};oue.PREFIX=":";let g3e=oue;var d3r=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},h3r=function(t,e){return function(n,i){e(n,i,t)}};let eK=class extends g3e{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=rn.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};eK=d3r([h3r(0,Yr)],eK);var _2;let pYt=(_2=class extends En{constructor(){super({id:_2.ID,label:Fre.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:Re.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(wb).quickAccess.show(eK.PREFIX)}},_2.ID="editor.action.gotoLine",_2);Ht(pYt);la.as(rR.Quickaccess).registerQuickAccessProvider({ctor:eK,prefix:eK.PREFIX,helpEntries:[{description:Fre.gotoLineActionLabel,commandId:pYt.ID}]});const gYt=[void 0,[]];function dNe(t,e,n=0,i=0){const r=e;return r.values&&r.values.length>1?f3r(t,r.values,n,i):bYt(t,e,n,i)}function f3r(t,e,n,i){let r=0;const o=[];for(const s of e){const[a,l]=bYt(t,s,n,i);if(typeof a!="number")return gYt;r+=a,o.push(...l)}return[r,m3r(o)]}function bYt(t,e,n,i){const r=X2(e.original,e.originalLowercase,n,t,t.toLowerCase(),i,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return r?[r[0],Tq(r)]:gYt}function m3r(t){const e=t.sort((r,o)=>r.start-o.start),n=[];let i;for(const r of e)!i||!p3r(i,r)?(i=r,n.push(r)):(i.start=Math.min(i.start,r.start),i.end=Math.max(i.end,r.end));return n}function p3r(t,e){return!(t.end<e.start||e.end<t.start)}function H0t(t){return t.startsWith('"')&&t.endsWith('"')}const vYt=" ";function b3e(t){typeof t!="string"&&(t="");const e=t.toLowerCase(),{pathNormalized:n,normalized:i,normalizedLowercase:r}=W0t(t),o=n.indexOf(_0)>=0,s=H0t(t);let a;const l=t.split(vYt);if(l.length>1)for(const c of l){const u=H0t(c),{pathNormalized:d,normalized:h,normalizedLowercase:f}=W0t(c);h&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:d,normalized:h,normalizedLowercase:f,expectContiguousMatch:u}))}return{original:t,originalLowercase:e,pathNormalized:n,normalized:i,normalizedLowercase:r,values:a,containsPathSeparator:o,expectContiguousMatch:s}}function W0t(t){let e;Fu?e=t.replace(/\//g,_0):e=t.replace(/\\/g,_0);const n=Gdi(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:n,normalizedLowercase:n.toLowerCase()}}function U0t(t){return Array.isArray(t)?b3e(t.map(e=>e.original).join(vYt)):b3e(t.original)}var g3r=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},K0t=function(t,e){return function(n,i){e(n,i,t)}},Xte,Qy;let NI=(Qy=class extends mYt{constructor(e,n,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=n,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,I("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),ct.None}provideWithTextEditor(e,n,i,r){const o=e.editor,s=this.getModel(o);return s?this._languageFeaturesService.documentSymbolProvider.has(s)?this.doProvideWithEditorSymbols(e,s,n,i,r):this.doProvideWithoutEditorSymbols(e,s,n,i):ct.None}doProvideWithoutEditorSymbols(e,n,i,r){const o=new Lt;return this.provideLabelPick(i,I("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(async()=>!await this.waitForLanguageSymbolRegistry(n,o)||r.isCancellationRequested||o.add(this.doProvideWithEditorSymbols(e,n,i,r)))(),o}provideLabelPick(e,n){e.items=[{label:n,index:0,kind:14}],e.ariaLabel=n}async waitForLanguageSymbolRegistry(e,n){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new k6,r=n.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(r.dispose(),i.complete(!0))}));return n.add(Kn(()=>i.complete(!1))),i.p}doProvideWithEditorSymbols(e,n,i,r,o){var d;const s=e.editor,a=new Lt;a.add(i.onDidAccept(h=>{var m;const[f]=i.selectedItems;f&&f.range&&(this.gotoLocation(e,{range:f.range.selection,keyMods:i.keyMods,preserveFocus:h.inBackground}),(m=o==null?void 0:o.handleAccept)==null||m.call(o,f),h.inBackground||i.hide())})),a.add(i.onDidTriggerItemButton(({item:h})=>{h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));const l=this.getDocumentSymbols(n,r);let c;const u=async h=>{c==null||c.dispose(!0),i.busy=!1,c=new oa(r),i.busy=!0;try{const f=b3e(i.value.substr(Xte.PREFIX.length).trim()),m=await this.doGetSymbolPicks(l,f,void 0,c.token,n);if(r.isCancellationRequested)return;if(m.length>0){if(i.items=m,h&&f.original.length===0){const p=MH(m,g=>!!(g.type!=="separator"&&g.range&&ve.containsPosition(g.range.decoration,h)));p&&(i.activeItems=[p])}}else f.original.length>0?this.provideLabelPick(i,I("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,I("noSymbolResults","No editor symbols"))}finally{r.isCancellationRequested||(i.busy=!1)}};return a.add(i.onDidChangeValue(()=>u(void 0))),u((d=s.getSelection())==null?void 0:d.getPosition()),a.add(i.onDidChangeActive(()=>{const[h]=i.activeItems;h&&h.range&&(s.revealRangeInCenter(h.range.selection,0),this.addDecorations(s,h.range.decoration))})),a}async doGetSymbolPicks(e,n,i,r,o){var g,y;const s=await e;if(r.isCancellationRequested)return[];const a=n.original.indexOf(Xte.SCOPE_PREFIX)===0,l=a?1:0;let c,u;n.values&&n.values.length>1?(c=U0t(n.values[0]),u=U0t(n.values.slice(1))):c=n;let d;const h=(y=(g=this.options)==null?void 0:g.openSideBySideDirection)==null?void 0:y.call(g);h&&(d=[{iconClass:h==="right"?ci.asClassName(qt.splitHorizontal):ci.asClassName(qt.splitVertical),tooltip:h==="right"?I("openToSide","Open to the Side"):I("openToBottom","Open to the Bottom")}]);const f=[];for(let _=0;_<s.length;_++){const w=s[_],C=Kdi(w.name),N=`$(${Oie.toIcon(w.kind).id}) ${C}`,E=N.length-C.length;let D=w.containerName;i!=null&&i.extraContainerLabel&&(D?D=`${i.extraContainerLabel} • ${D}`:D=i.extraContainerLabel);let k,M,T,A;if(n.original.length>l){let P=!1;if(c!==n&&([k,M]=dNe(N,{...n,values:void 0},l,E),typeof k=="number"&&(P=!0)),typeof k!="number"&&([k,M]=dNe(N,c,l,E),typeof k!="number"))continue;if(!P&&u){if(D&&u.original.length>0&&([T,A]=dNe(D,u)),typeof T!="number")continue;typeof k=="number"&&(k+=T)}}const R=w.tags&&w.tags.indexOf(1)>=0;f.push({index:_,kind:w.kind,score:k,label:N,ariaLabel:$di(w.name,w.kind),description:D,highlights:R?void 0:{label:M,description:A},range:{selection:ve.collapseToStart(w.selectionRange),decoration:w.range},uri:o.uri,symbolName:C,strikethrough:R,buttons:d})}const m=f.sort((_,w)=>a?this.compareByKindAndScore(_,w):this.compareByScore(_,w));let p=[];if(a){let N=function(){w&&typeof _=="number"&&C>0&&(w.label=B2(fNe[_]||hNe,C))},_,w,C=0;for(const E of m)_!==E.kind?(N(),_=E.kind,C=1,w={type:"separator"},p.push(w)):C++,p.push(E);N()}else m.length>0&&(p=[{label:I("symbols","symbols ({0})",f.length),type:"separator"},...m]);return p}compareByScore(e,n){if(typeof e.score!="number"&&typeof n.score=="number")return 1;if(typeof e.score=="number"&&typeof n.score!="number")return-1;if(typeof e.score=="number"&&typeof n.score=="number"){if(e.score>n.score)return-1;if(e.score<n.score)return 1}return e.index<n.index?-1:e.index>n.index?1:0}compareByKindAndScore(e,n){const i=fNe[e.kind]||hNe,r=fNe[n.kind]||hNe,o=i.localeCompare(r);return o===0?this.compareByScore(e,n):o}async getDocumentSymbols(e,n){const i=await this._outlineModelService.getOrCreate(e,n);return n.isCancellationRequested?[]:i.asListOfDocumentSymbols()}},Xte=Qy,Qy.PREFIX="@",Qy.SCOPE_PREFIX=":",Qy.PREFIX_BY_CATEGORY=`${Qy.PREFIX}${Qy.SCOPE_PREFIX}`,Qy);NI=Xte=g3r([K0t(0,Ln),K0t(1,OG)],NI);const hNe=I("property","properties ({0})"),fNe={5:I("method","methods ({0})"),11:I("function","functions ({0})"),8:I("_constructor","constructors ({0})"),12:I("variable","variables ({0})"),4:I("class","classes ({0})"),22:I("struct","structs ({0})"),23:I("event","events ({0})"),24:I("operator","operators ({0})"),10:I("interface","interfaces ({0})"),2:I("namespace","namespaces ({0})"),3:I("package","packages ({0})"),25:I("typeParameter","type parameters ({0})"),1:I("modules","modules ({0})"),6:I("property","properties ({0})"),9:I("enum","enumerations ({0})"),21:I("enumMember","enumeration members ({0})"),14:I("string","strings ({0})"),0:I("file","files ({0})"),17:I("array","arrays ({0})"),15:I("number","numbers ({0})"),16:I("boolean","booleans ({0})"),18:I("object","objects ({0})"),19:I("key","keys ({0})"),7:I("field","fields ({0})"),13:I("constant","constants ({0})")};var b3r=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},mNe=function(t,e){return function(n,i){e(n,i,t)}};let v3e=class extends NI{constructor(e,n,i){super(n,i),this.editorService=e,this.onDidActiveTextEditorControlChange=rn.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};v3e=b3r([mNe(0,Yr),mNe(1,Ln),mNe(2,OG)],v3e);const sue=class sue extends En{constructor(){super({id:sue.ID,label:rW.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:Re.hasDocumentSymbolProvider,kbOpts:{kbExpr:Re.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(wb).quickAccess.show(NI.PREFIX,{itemActivation:Vy.NONE})}};sue.ID="editor.action.quickOutline";let Nle=sue;Ht(Nle);la.as(rR.Quickaccess).registerQuickAccessProvider({ctor:v3e,prefix:NI.PREFIX,helpEntries:[{description:rW.quickOutlineActionLabel,prefix:NI.PREFIX,commandId:Nle.ID},{description:rW.quickOutlineByCategoryActionLabel,prefix:NI.PREFIX_BY_CATEGORY}]});function v3r(t){const e=new Map;for(const n of t)e.set(n,(e.get(n)??0)+1);return e}class GB{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,n){const i=this.computeEmbedding(e),r=new Map,o=[];for(const[s,a]of this.documents){if(n.isCancellationRequested)return[];for(const l of a.chunks){const c=this.computeSimilarityScore(l,i,r);c>0&&o.push({key:s,score:c})}}return o}static termFrequencies(e){return v3r(GB.splitTerms(e))}static*splitTerms(e){const n=i=>i.toLowerCase();for(const[i]of e.matchAll(new RegExp("\\b\\p{Letter}[\\p{Letter}\\d]{2,}\\b","gu"))){yield n(i);const r=i.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(r.length>1)for(const o of r)o.length>2&&new RegExp("\\p{Letter}{3,}","gu").test(o)&&(yield n(o))}}updateDocuments(e){for(const{key:n}of e)this.deleteDocument(n);for(const n of e){const i=[];for(const r of n.textChunks){const o=GB.termFrequencies(r);for(const s of o.keys())this.chunkOccurrences.set(s,(this.chunkOccurrences.get(s)??0)+1);i.push({text:r,tf:o})}this.chunkCount+=i.length,this.documents.set(n.key,{chunks:i})}return this}deleteDocument(e){const n=this.documents.get(e);if(n){this.documents.delete(e),this.chunkCount-=n.chunks.length;for(const i of n.chunks)for(const r of i.tf.keys()){const o=this.chunkOccurrences.get(r);if(typeof o=="number"){const s=o-1;s<=0?this.chunkOccurrences.delete(r):this.chunkOccurrences.set(r,s)}}}}computeSimilarityScore(e,n,i){let r=0;for(const[o,s]of Object.entries(n)){const a=e.tf.get(o);if(!a)continue;let l=i.get(o);typeof l!="number"&&(l=this.computeIdf(o),i.set(o,l));const c=a*l;r+=c*s}return r}computeEmbedding(e){const n=GB.termFrequencies(e);return this.computeTfidf(n)}computeIdf(e){const n=this.chunkOccurrences.get(e)??0;return n>0?Math.log((this.chunkCount+1)/n):0}computeTfidf(e){const n=Object.create(null);for(const[i,r]of e){const o=this.computeIdf(i);o>0&&(n[i]=r*o)}return n}}function y3r(t){var i;const e=t.slice(0);e.sort((r,o)=>o.score-r.score);const n=((i=e[0])==null?void 0:i.score)??0;if(n>0)for(const r of e)r.score/=n;return e}var O4;(function(t){t[t.NO_ACTION=0]="NO_ACTION",t[t.CLOSE_PICKER=1]="CLOSE_PICKER",t[t.REFRESH_PICKER=2]="REFRESH_PICKER",t[t.REMOVE_ITEM=3]="REMOVE_ITEM"})(O4||(O4={}));function pNe(t){const e=t;return Array.isArray(e.items)}function q0t(t){const e=t;return!!e.picks&&e.additionalPicks instanceof Promise}class _3r extends ct{constructor(e,n){super(),this.prefix=e,this.options=n}provide(e,n,i){var c;const r=new Lt;e.canAcceptInBackground=!!((c=this.options)!=null&&c.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let o;const s=r.add(new mc),a=async()=>{var g;const u=s.value=new Lt;o==null||o.dispose(!0),e.busy=!1,o=new oa(n);const d=o.token;let h=e.value.substring(this.prefix.length);(g=this.options)!=null&&g.shouldSkipTrimPickFilter||(h=h.trim());const f=this._getPicks(h,u,d,i),m=(y,_)=>{var N;let w,C;if(pNe(y)?(w=y.items,C=y.active):w=y,w.length===0){if(_)return!1;(h.length>0||e.hideInput)&&((N=this.options)!=null&&N.noResultsPick)&&(pH(this.options.noResultsPick)?w=[this.options.noResultsPick(h)]:w=[this.options.noResultsPick])}return e.items=w,C&&(e.activeItems=[C]),!0},p=async y=>{let _=!1,w=!1;await Promise.all([(async()=>{typeof y.mergeDelay=="number"&&(await uw(y.mergeDelay),d.isCancellationRequested)||w||(_=m(y.picks,!0))})(),(async()=>{e.busy=!0;try{const C=await y.additionalPicks;if(d.isCancellationRequested)return;let N,E;pNe(y.picks)?(N=y.picks.items,E=y.picks.active):N=y.picks;let D,k;if(pNe(C)?(D=C.items,k=C.active):D=C,D.length>0||!_){let M;if(!E&&!k){const T=e.activeItems[0];T&&N.indexOf(T)!==-1&&(M=T)}m({items:[...N,...D],active:E||k||M})}}finally{d.isCancellationRequested||(e.busy=!1),w=!0}})()])};if(f!==null)if(q0t(f))await p(f);else if(!(f instanceof Promise))m(f);else{e.busy=!0;try{const y=await f;if(d.isCancellationRequested)return;q0t(y)?await p(y):m(y)}finally{d.isCancellationRequested||(e.busy=!1)}}};r.add(e.onDidChangeValue(()=>a())),a(),r.add(e.onDidAccept(u=>{var h;if(i!=null&&i.handleAccept){u.inBackground||e.hide(),(h=i.handleAccept)==null||h.call(i,e.activeItems[0]);return}const[d]=e.selectedItems;typeof(d==null?void 0:d.accept)=="function"&&(u.inBackground||e.hide(),d.accept(e.keyMods,u))}));const l=async(u,d)=>{var f;if(typeof d.trigger!="function")return;const h=((f=d.buttons)==null?void 0:f.indexOf(u))??-1;if(h>=0){const m=d.trigger(h,e.keyMods),p=typeof m=="number"?m:await m;if(n.isCancellationRequested)return;switch(p){case O4.NO_ACTION:break;case O4.CLOSE_PICKER:e.hide();break;case O4.REFRESH_PICKER:a();break;case O4.REMOVE_ITEM:{const g=e.items.indexOf(d);if(g!==-1){const y=e.items.slice(),_=y.splice(g,1),w=e.activeItems.filter(N=>N!==_[0]),C=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=y,w&&(e.activeItems=w),e.keepScrollPosition=C}break}}}};return r.add(e.onDidTriggerItemButton(({button:u,item:d})=>l(u,d))),r.add(e.onDidTriggerSeparatorButton(({button:u,separator:d})=>l(u,d))),r}}var yYt=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},LE=function(t,e){return function(n,i){e(n,i,t)}},GL,Ol,Mx;let y3e=(Mx=class extends _3r{constructor(e,n,i,r,o,s){super(GL.PREFIX,e),this.instantiationService=n,this.keybindingService=i,this.commandService=r,this.telemetryService=o,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(_3e)),this.options=e}async _getPicks(e,n,i,r){var f,m;const o=await this.getCommandPicks(i);if(i.isCancellationRequested)return[];const s=ak(()=>{const p=new GB;p.updateDocuments(o.map(y=>({key:y.commandId,textChunks:[this.getTfIdfChunk(y)]})));const g=p.calculateScores(e,i);return y3r(g).filter(y=>y.score>GL.TFIDF_THRESHOLD).slice(0,GL.TFIDF_MAX_RESULTS)}),a=[];for(const p of o){const g=GL.WORD_FILTER(e,p.label)??void 0,y=p.commandAlias?GL.WORD_FILTER(e,p.commandAlias)??void 0:void 0;if(g||y)p.highlights={label:g,detail:this.options.showAlias?y:void 0},a.push(p);else if(e===p.commandId)a.push(p);else if(e.length>=3){const _=s();if(i.isCancellationRequested)return[];const w=_.find(C=>C.key===p.commandId);w&&(p.tfIdfScore=w.score,a.push(p))}}const l=new Map;for(const p of a){const g=l.get(p.label);g?(p.description=p.commandId,g.description=g.commandId):l.set(p.label,p)}a.sort((p,g)=>{if(p.tfIdfScore&&g.tfIdfScore)return p.tfIdfScore===g.tfIdfScore?p.label.localeCompare(g.label):g.tfIdfScore-p.tfIdfScore;if(p.tfIdfScore)return 1;if(g.tfIdfScore)return-1;const y=this.commandsHistory.peek(p.commandId),_=this.commandsHistory.peek(g.commandId);if(y&&_)return y>_?-1:1;if(y)return-1;if(_)return 1;if(this.options.suggestedCommandIds){const w=this.options.suggestedCommandIds.has(p.commandId),C=this.options.suggestedCommandIds.has(g.commandId);if(w&&C)return 0;if(w)return-1;if(C)return 1}return p.label.localeCompare(g.label)});const c=[];let u=!1,d=!0,h=!!this.options.suggestedCommandIds;for(let p=0;p<a.length;p++){const g=a[p];p===0&&this.commandsHistory.peek(g.commandId)&&(c.push({type:"separator",label:I("recentlyUsed","recently used")}),u=!0),d&&g.tfIdfScore!==void 0&&(c.push({type:"separator",label:I("suggested","similar commands")}),d=!1),h&&g.tfIdfScore===void 0&&!this.commandsHistory.peek(g.commandId)&&((f=this.options.suggestedCommandIds)!=null&&f.has(g.commandId))&&(c.push({type:"separator",label:I("commonlyUsed","commonly used")}),u=!0,h=!1),u&&g.tfIdfScore===void 0&&!this.commandsHistory.peek(g.commandId)&&!((m=this.options.suggestedCommandIds)!=null&&m.has(g.commandId))&&(c.push({type:"separator",label:I("morecCommands","other commands")}),u=!1),c.push(this.toCommandPick(g,r))}return this.hasAdditionalCommandPicks(e,i)?{picks:c,additionalPicks:(async()=>{var y;const p=await this.getAdditionalCommandPicks(o,a,e,i);if(i.isCancellationRequested)return[];const g=p.map(_=>this.toCommandPick(_,r));return d&&((y=g[0])==null?void 0:y.type)!=="separator"&&g.unshift({type:"separator",label:I("suggested","similar commands")}),g})()}:c}toCommandPick(e,n){if(e.type==="separator")return e;const i=this.keybindingService.lookupKeybinding(e.commandId),r=i?I("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,i.getAriaLabel()):e.label;return{...e,ariaLabel:r,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:async()=>{var o;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:(n==null?void 0:n.from)??"quick open"});try{(o=e.args)!=null&&o.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(s){yb(s)||this.dialogService.error(I("canNotRun","Command '{0}' resulted in an error",e.label),Lae(s))}}}}getTfIdfChunk({label:e,commandAlias:n,commandDescription:i}){let r=e;return n&&n!==e&&(r+=` - ${n}`),i&&i.value!==e&&(r+=` - ${i.value===i.original?i.value:`${i.value} (${i.original})`}`),r}},GL=Mx,Mx.PREFIX=">",Mx.TFIDF_THRESHOLD=.5,Mx.TFIDF_MAX_RESULTS=5,Mx.WORD_FILTER=ZVe(eW,fCi,f5t),Mx);y3e=GL=yYt([LE(1,qn),LE(2,vo),LE(3,gs),LE(4,eh),LE(5,Lq)],y3e);var Jy;let _3e=(Jy=class extends ct{constructor(e,n,i){super(),this.storageService=e,this.configurationService=n,this.logService=i,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===lW.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=Ol.getConfiguredCommandHistoryLength(this.configurationService),Ol.cache&&Ol.cache.limit!==this.configuredCommandsHistoryLength&&(Ol.cache.limit=this.configuredCommandsHistoryLength,Ol.hasChanges=!0))}load(){const e=this.storageService.get(Ol.PREF_KEY_CACHE,0);let n;if(e)try{n=JSON.parse(e)}catch(r){this.logService.error(`[CommandsHistory] invalid data: ${r}`)}const i=Ol.cache=new Aw(this.configuredCommandsHistoryLength,1);if(n){let r;n.usesLRU?r=n.entries:r=n.entries.sort((o,s)=>o.value-s.value),r.forEach(o=>i.set(o.key,o.value))}Ol.counter=this.storageService.getNumber(Ol.PREF_KEY_COUNTER,0,Ol.counter)}push(e){Ol.cache&&(Ol.cache.set(e,Ol.counter++),Ol.hasChanges=!0)}peek(e){var n;return(n=Ol.cache)==null?void 0:n.peek(e)}saveState(){if(!Ol.cache||!Ol.hasChanges)return;const e={usesLRU:!0,entries:[]};Ol.cache.forEach((n,i)=>e.entries.push({key:i,value:n})),this.storageService.store(Ol.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(Ol.PREF_KEY_COUNTER,Ol.counter,0,0),Ol.hasChanges=!1}static getConfiguredCommandHistoryLength(e){var r,o;const i=(o=(r=e.getValue().workbench)==null?void 0:r.commandPalette)==null?void 0:o.history;return typeof i=="number"?i:Ol.DEFAULT_COMMANDS_HISTORY_LENGTH}},Ol=Jy,Jy.DEFAULT_COMMANDS_HISTORY_LENGTH=50,Jy.PREF_KEY_CACHE="commandPalette.mru.cache",Jy.PREF_KEY_COUNTER="commandPalette.mru.counter",Jy.counter=1,Jy.hasChanges=!1,Jy);_3e=Ol=yYt([LE(0,Xv),LE(1,cr),LE(2,Nd)],_3e);class x3r extends y3e{constructor(e,n,i,r,o,s){super(e,n,i,r,o,s)}getCodeEditorCommandPicks(){var i;const e=this.activeTextEditorControl;if(!e)return[];const n=[];for(const r of e.getSupportedActions()){let o;(i=r.metadata)!=null&&i.description&&(JNi(r.metadata.description)?o=r.metadata.description:o={original:r.metadata.description,value:r.metadata.description}),n.push({commandId:r.id,commandAlias:r.alias,commandDescription:o,label:i7e(r.label)||r.id})}return n}}var w3r=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},wO=function(t,e){return function(n,i){e(n,i,t)}};let tK=class extends x3r{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,n,i,r,o,s){super({showAlias:!1},e,i,r,o,s),this.codeEditorService=n}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};tK=w3r([wO(0,qn),wO(1,Yr),wO(2,vo),wO(3,gs),wO(4,eh),wO(5,Lq)],tK);const aue=class aue extends En{constructor(){super({id:aue.ID,label:$re.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:Re.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(wb).quickAccess.show(tK.PREFIX)}};aue.ID="editor.action.quickCommand";let Ele=aue;Ht(Ele);la.as(rR.Quickaccess).registerQuickAccessProvider({ctor:tK,prefix:tK.PREFIX,helpEntries:[{description:$re.quickCommandHelp,commandId:Ele.ID}]});var C3r=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},CO=function(t,e){return function(n,i){e(n,i,t)}};let x3e=class extends yA{constructor(e,n,i,r,o,s,a){super(!0,e,n,i,r,o,s,a)}};x3e=C3r([CO(1,vi),CO(2,Yr),CO(3,tl),CO(4,qn),CO(5,Xv),CO(6,cr)],x3e);Wr(yA.ID,x3e,4);class S3r extends En{constructor(){super({id:"editor.action.toggleHighContrast",label:aIe.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,n){const i=e.get(ig),r=i.getColorTheme();S0(r.type)?(i.setTheme(this._originalThemeName||(d5(r.type)?O3:tC)),this._originalThemeName=null):(i.setTheme(d5(r.type)?fI:mI),this._originalThemeName=r.themeName)}}Ht(S3r);function N3r(t){return new Worker("/assets/editor.worker-D6HJJPPO.js",{name:t==null?void 0:t.name})}function E3r(t){return new Worker("/assets/json.worker-2OAd2Oj0.js",{name:t==null?void 0:t.name})}function D3r(t){return new Worker("/assets/css.worker-DiOyNSwL.js",{name:t==null?void 0:t.name})}function k3r(t){return new Worker("/assets/html.worker-DHG0lb2b.js",{name:t==null?void 0:t.name})}function M3r(t){return new Worker("/assets/ts.worker-DIoKITWH.js",{name:t==null?void 0:t.name})}self.MonacoEnvironment={getWorker(t,e){return e==="json"?new E3r:e==="css"||e==="scss"||e==="less"?new D3r:e==="html"||e==="handlebars"||e==="razor"?new k3r:e==="typescript"||e==="javascript"?new M3r:new N3r}};gB.typescript.typescriptDefaults.setEagerModelSync(!0);upn({dsn:"https://dfd44d20d3ca48fe94b1d0dfe4e609cf@o4503925017346048.ingest.us.sentry.io/4505402129514496",integrations:[Spn({useEffect:b.useEffect,useLocation:Gp,useNavigationType:Sgn,createRoutesFromChildren:sEe,matchRoutes:vE}),Cwt(),Ofn({maskAllText:!1,blockAllMedia:!1}),_Pt],tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,beforeSend(t){return t.exception&&t.event_id&&BNe({eventId:t.event_id,colorScheme:"light",themeLight:{submitBackground:yd,submitBackgroundHover:dfe}}),t}});Rwt(document.getElementById("root")).render(v.jsxDEV(b.StrictMode,{children:v.jsxDEV(E1n,{children:v.jsxDEV(FDr,{},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/main.tsx",lineNumber:63,columnNumber:4},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/main.tsx",lineNumber:62,columnNumber:3},void 0)},void 0,!1,{fileName:"/opt/atlassian/pipelines/agent/build/frontend/dashboard/src/main.tsx",lineNumber:61,columnNumber:2},void 0));export{Hq as m,HKt as t};
